react-base-data-table 0.3.8 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +0 -6
  2. package/dist/index.cjs.js +23 -21
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.es.js +10073 -6021
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/style.css +1 -1
  7. package/dist/types/App.d.ts +3 -0
  8. package/dist/types/DUMMY_ITEMS.d.ts +6 -0
  9. package/dist/types/components/BaseButton.d.ts +19 -0
  10. package/dist/types/components/BaseCheckbox.d.ts +11 -0
  11. package/dist/types/components/BaseTable/BaseTable.d.ts +38 -0
  12. package/dist/types/components/BaseTable/BaseTableFooter.d.ts +10 -0
  13. package/dist/types/components/BaseTable/BaseTableGroupRow.d.ts +15 -0
  14. package/dist/types/components/BaseTable/BaseTableHeader.d.ts +13 -0
  15. package/dist/types/components/BaseTable/BaseTableHeaders.d.ts +15 -0
  16. package/dist/types/components/BaseTable/BaseTableRow.d.ts +11 -0
  17. package/dist/types/components/BaseTable/BaseTableWithContext.d.ts +3 -0
  18. package/dist/types/components/BaseTable/CommentPopup.d.ts +15 -0
  19. package/dist/types/components/BaseTable/CustomRenderItem.d.ts +11 -0
  20. package/dist/types/components/BaseTable/contextMenu/ContextMenu.d.ts +13 -0
  21. package/dist/types/components/BaseTable/contextMenu/actions/cellActions.d.ts +5 -0
  22. package/dist/types/components/BaseTable/contextMenu/actions/headerActions.d.ts +5 -0
  23. package/dist/types/components/BaseTable/contextMenu/actions/index.d.ts +2 -0
  24. package/dist/types/components/BaseTable/contexts/useTableInteractionContext.d.ts +54 -0
  25. package/dist/types/components/BaseTable/dialogs/DialogWrapper.d.ts +6 -0
  26. package/dist/types/components/BaseTable/dialogs/columnsDialog/ColumnsDialog.d.ts +2 -0
  27. package/dist/types/components/BaseTable/dialogs/columnsDialog/DragPreview.d.ts +5 -0
  28. package/dist/types/components/BaseTable/dialogs/columnsDialog/HeaderItem.d.ts +20 -0
  29. package/dist/types/components/BaseTable/hooks/useCellPopup.d.ts +16 -0
  30. package/dist/types/components/BaseTable/hooks/useRowDragDrop.d.ts +16 -0
  31. package/dist/types/components/BaseTable/hooks/useTableData.d.ts +19 -0
  32. package/dist/types/components/BaseTable/hooks/useTableFiltering.d.ts +13 -0
  33. package/dist/types/components/BaseTable/hooks/useTableGrouping.d.ts +14 -0
  34. package/dist/types/components/BaseTable/hooks/useTableInteractions.d.ts +43 -0
  35. package/dist/types/components/BaseTable/hooks/useTableSorting.d.ts +13 -0
  36. package/dist/types/components/BaseTable/hooks/useVirtualRows.d.ts +11 -0
  37. package/dist/types/components/BaseTable/models/ActiveTableFilter.d.ts +6 -0
  38. package/dist/types/components/BaseTable/models/AdvancedTableSettings.d.ts +19 -0
  39. package/dist/types/components/BaseTable/models/BaseTableHeaders.d.ts +38 -0
  40. package/dist/types/components/BaseTable/models/CellCordinate.d.ts +8 -0
  41. package/dist/types/components/BaseTable/models/CommentData.d.ts +10 -0
  42. package/dist/types/components/BaseTable/models/ContextMenu.d.ts +10 -0
  43. package/dist/types/components/BaseTable/models/ContextMenuAction.d.ts +12 -0
  44. package/dist/types/components/BaseTable/models/DialogItem.d.ts +9 -0
  45. package/dist/types/components/BaseTable/models/GroupInfo.d.ts +7 -0
  46. package/dist/types/components/BaseTable/models/HighlightCondition.d.ts +7 -0
  47. package/dist/types/components/BaseTable/models/ItemWithGroupInfo.d.ts +7 -0
  48. package/dist/types/components/BaseTable/models/LinkedGroup.d.ts +4 -0
  49. package/dist/types/components/BaseTable/models/TableConfiguration.d.ts +4 -0
  50. package/dist/types/components/BaseTable/models/TableItem.d.ts +4 -0
  51. package/dist/types/components/BaseTable/tableCell/BaseTableCell.d.ts +21 -0
  52. package/dist/types/components/BaseTable/tableCell/IndexCell.d.ts +8 -0
  53. package/dist/types/components/BaseTable/tableCell/cellImplementation/ListCell.d.ts +13 -0
  54. package/dist/types/components/BaseTable/tableCell/cellImplementation/NumberCell.d.ts +11 -0
  55. package/dist/types/components/BaseTable/tableCell/cellImplementation/OptionList.d.ts +11 -0
  56. package/dist/types/components/BaseTable/tableCell/cellImplementation/formatNumberFunctions.d.ts +1 -0
  57. package/dist/types/components/BaseTable/tableFilter/FilterDropdown.d.ts +13 -0
  58. package/dist/types/components/BaseTable/tableFilter/TableFilter.d.ts +17 -0
  59. package/dist/types/components/BaseTable/tableFilter/filterImplementations/NumberFilter/NumberConditionItem.d.ts +10 -0
  60. package/dist/types/components/BaseTable/tableFilter/filterImplementations/NumberFilter/NumberFilter.d.ts +16 -0
  61. package/dist/types/components/BaseTable/tableFilter/filterImplementations/TextFilter.d.ts +9 -0
  62. package/dist/types/components/BaseTable/tableFunctions/CellSelection.d.ts +8 -0
  63. package/dist/types/components/BaseTable/tableFunctions/FilteringAndSorting.d.ts +7 -0
  64. package/dist/types/components/BaseTable/tableFunctions/highlightCondition.d.ts +5 -0
  65. package/dist/types/components/ColorPicker.d.ts +7 -0
  66. package/dist/types/constants.d.ts +1 -0
  67. package/dist/types/enum/DateUnits.d.ts +8 -0
  68. package/dist/types/enum/FilterTypes.d.ts +4 -0
  69. package/dist/types/hooks/useClickOutside.d.ts +2 -0
  70. package/dist/types/index.d.ts +7 -0
  71. package/dist/types/main.d.ts +1 -0
  72. package/dist/types/stores/commentPopupStore.d.ts +13 -0
  73. package/dist/types/stores/contextMenuStore.d.ts +13 -0
  74. package/dist/types/stores/dialogsStore.d.ts +21 -0
  75. package/dist/types/stores/tableDataStore.d.ts +99 -0
  76. package/dist/types/stores/tableDragStore.d.ts +17 -0
  77. package/dist/types/stores/tableRefStore.d.ts +17 -0
  78. package/dist/types/stores/tableSelectionStore.d.ts +19 -0
  79. package/dist/types/utils/array.d.ts +6 -0
  80. package/dist/types/utils/cellIdCreation.d.ts +3 -0
  81. package/dist/types/utils/enum.d.ts +3 -0
  82. package/dist/types/utils/sorting.d.ts +4 -0
  83. package/package.json +5 -2
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),Ps=require("react-dom");function js(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const rr=js(c);var Kt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xr={exports:{}},_t={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),pt=require("react-dom");function Xs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ar=Xs(c),hu=Xs(pt);var Yn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fa={exports:{}},pn={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ia;function Is(){if(ia)return _t;ia=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,i){var o=null;if(i!==void 0&&(o=""+i),a.key!==void 0&&(o=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:e,type:n,key:o,ref:a!==void 0?a:null,props:i}}return _t.Fragment=t,_t.jsx=r,_t.jsxs=r,_t}var Ot={};/**
9
+ */var Ho;function pu(){if(Ho)return pn;Ho=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var i in a)i!=="key"&&(o[i]=a[i])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:s,ref:a!==void 0?a:null,props:o}}return pn.Fragment=t,pn.jsx=n,pn.jsxs=n,pn}var gn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,42 +14,37 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var oa;function ks(){return oa||(oa=1,process.env.NODE_ENV!=="production"&&function(){function e(g){if(g==null)return null;if(typeof g=="function")return g.$$typeof===ue?null:g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case m:return"Fragment";case x:return"Profiler";case b:return"StrictMode";case w:return"Suspense";case B:return"SuspenseList";case ce:return"Activity"}if(typeof g=="object")switch(typeof g.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),g.$$typeof){case h:return"Portal";case E:return(g.displayName||"Context")+".Provider";case S:return(g._context.displayName||"Context")+".Consumer";case R:var C=g.render;return g=g.displayName,g||(g=C.displayName||C.name||"",g=g!==""?"ForwardRef("+g+")":"ForwardRef"),g;case J:return C=g.displayName||null,C!==null?C:e(g.type)||"Memo";case te:C=g._payload,g=g._init;try{return e(g(C))}catch{}}return null}function t(g){return""+g}function r(g){try{t(g);var C=!1}catch{C=!0}if(C){C=console;var A=C.error,j=typeof Symbol=="function"&&Symbol.toStringTag&&g[Symbol.toStringTag]||g.constructor.name||"Object";return A.call(C,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",j),t(g)}}function n(g){if(g===m)return"<>";if(typeof g=="object"&&g!==null&&g.$$typeof===te)return"<...>";try{var C=e(g);return C?"<"+C+">":"<...>"}catch{return"<...>"}}function a(){var g=P.A;return g===null?null:g.getOwner()}function i(){return Error("react-stack-top-frame")}function o(g){if(_.call(g,"key")){var C=Object.getOwnPropertyDescriptor(g,"key").get;if(C&&C.isReactWarning)return!1}return g.key!==void 0}function s(g,C){function A(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",C))}A.isReactWarning=!0,Object.defineProperty(g,"key",{get:A,configurable:!0})}function l(){var g=e(this.type);return Z[g]||(Z[g]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),g=this.props.ref,g!==void 0?g:null}function u(g,C,A,j,I,N,z,L){return A=N.ref,g={$$typeof:v,type:g,key:C,props:N,_owner:I},(A!==void 0?A:null)!==null?Object.defineProperty(g,"ref",{enumerable:!1,get:l}):Object.defineProperty(g,"ref",{enumerable:!1,value:null}),g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(g,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(g,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.defineProperty(g,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:L}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g}function f(g,C,A,j,I,N,z,L){var D=C.children;if(D!==void 0)if(j)if(T(D)){for(j=0;j<D.length;j++)d(D[j]);Object.freeze&&Object.freeze(D)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(D);if(_.call(C,"key")){D=e(g);var U=Object.keys(C).filter(function(le){return le!=="key"});j=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",ne[D+j]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Lo;function gu(){return Lo||(Lo=1,process.env.NODE_ENV!=="production"&&function(){function e(v){if(v==null)return null;if(typeof v=="function")return v.$$typeof===V?null:v.displayName||v.name||null;if(typeof v=="string")return v;switch(v){case m:return"Fragment";case y:return"Profiler";case b:return"StrictMode";case C:return"Suspense";case $:return"SuspenseList";case L:return"Activity"}if(typeof v=="object")switch(typeof v.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),v.$$typeof){case h:return"Portal";case O:return(v.displayName||"Context")+".Provider";case E:return(v._context.displayName||"Context")+".Consumer";case A:var w=v.render;return v=v.displayName,v||(v=w.displayName||w.name||"",v=v!==""?"ForwardRef("+v+")":"ForwardRef"),v;case _:return w=v.displayName||null,w!==null?w:e(v.type)||"Memo";case I:w=v._payload,v=v._init;try{return e(v(w))}catch{}}return null}function t(v){return""+v}function n(v){try{t(v);var w=!1}catch{w=!0}if(w){w=console;var S=w.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&v[Symbol.toStringTag]||v.constructor.name||"Object";return S.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),t(v)}}function r(v){if(v===m)return"<>";if(typeof v=="object"&&v!==null&&v.$$typeof===I)return"<...>";try{var w=e(v);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function a(){var v=B.A;return v===null?null:v.getOwner()}function o(){return Error("react-stack-top-frame")}function s(v){if(W.call(v,"key")){var w=Object.getOwnPropertyDescriptor(v,"key").get;if(w&&w.isReactWarning)return!1}return v.key!==void 0}function i(v,w){function S(){Q||(Q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",w))}S.isReactWarning=!0,Object.defineProperty(v,"key",{get:S,configurable:!0})}function l(){var v=e(this.type);return ee[v]||(ee[v]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),v=this.props.ref,v!==void 0?v:null}function u(v,w,S,R,T,D,P,k){return S=D.ref,v={$$typeof:g,type:v,key:w,props:D,_owner:T},(S!==void 0?S:null)!==null?Object.defineProperty(v,"ref",{enumerable:!1,get:l}):Object.defineProperty(v,"ref",{enumerable:!1,value:null}),v._store={},Object.defineProperty(v._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(v,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(v,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.defineProperty(v,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.freeze&&(Object.freeze(v.props),Object.freeze(v)),v}function d(v,w,S,R,T,D,P,k){var F=w.children;if(F!==void 0)if(R)if(J(F)){for(R=0;R<F.length;R++)f(F[R]);Object.freeze&&Object.freeze(F)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(F);if(W.call(w,"key")){F=e(v);var G=Object.keys(w).filter(function(ne){return ne!=="key"});R=0<G.length?"{key: someKey, "+G.join(": ..., ")+": ...}":"{key: someKey}",j[F+R]||(G=0<G.length?"{"+G.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,j,D,U,D),ne[D+j]=!0)}if(D=null,A!==void 0&&(r(A),D=""+A),o(C)&&(r(C.key),D=""+C.key),"key"in C){A={};for(var V in C)V!=="key"&&(A[V]=C[V])}else A=C;return D&&s(A,typeof g=="function"?g.displayName||g.name||"Unknown":g),u(g,D,N,I,a(),A,z,L)}function d(g){typeof g=="object"&&g!==null&&g.$$typeof===v&&g._store&&(g._store.validated=1)}var p=c,v=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),E=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ue=Symbol.for("react.client.reference"),P=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=Object.prototype.hasOwnProperty,T=Array.isArray,H=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(g){return g()}};var X,Z={},q=p.react_stack_bottom_frame.bind(p,i)(),re=H(n(i)),ne={};Ot.Fragment=m,Ot.jsx=function(g,C,A,j,I){var N=1e4>P.recentlyCreatedOwnerStacks++;return f(g,C,A,!1,j,I,N?Error("react-stack-top-frame"):q,N?H(n(g)):re)},Ot.jsxs=function(g,C,A,j,I){var N=1e4>P.recentlyCreatedOwnerStacks++;return f(g,C,A,!0,j,I,N?Error("react-stack-top-frame"):q,N?H(n(g)):re)}}()),Ot}process.env.NODE_ENV==="production"?Xr.exports=Is():Xr.exports=ks();var y=Xr.exports,Fs="M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z",Ls="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z",Ds="M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z",Ns="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",Hs="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",Bs="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",zs="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",Gs="M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z",Us="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z",Vs="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22H9M11,6V9H8V11H11V14H13V11H16V9H13V6H11Z",Ws="M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z",qs="M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z",Ks="M2.39 1.73L1.11 3L9.5 11.37L9.97 12H10V17.87C9.96 18.16 10.06 18.47 10.29 18.7L12.3 20.71C12.69 21.1 13.32 21.1 13.71 20.71C13.94 20.5 14.04 20.18 14 19.88V15.89L20.84 22.73L22.11 21.46L14 13.35L9.41 8.76L4.15 3.5L2.39 1.73M6.21 3L14.54 11.34L19.79 4.62C20.13 4.19 20.05 3.56 19.62 3.22C19.43 3.08 19.22 3 19 3H6.21Z",Ys="M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z",Xs="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",Zs="M23 16V15.5A2.5 2.5 0 0 0 18 15.5V16A1 1 0 0 0 17 17V21A1 1 0 0 0 18 22H23A1 1 0 0 0 24 21V17A1 1 0 0 0 23 16M22 16H19V15.5A1.5 1.5 0 0 1 22 15.5M7 8.9H11V7H7A5 5 0 0 0 7 17H11V15.1H7A3.1 3.1 0 0 1 7 8.9M8 11V13H16V11M13 15.1V17H15V15.1M17 7H13V8.9H17A3.09 3.09 0 0 1 19.94 11A5.12 5.12 0 0 1 20.5 11H21.9A5 5 0 0 0 17 7Z",Js="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",Qs="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",Yt={exports:{}},Xt={exports:{}},Q={};/** @license React v16.13.1
22
+ <%s key={someKey} {...props} />`,R,F,G,F),j[F+R]=!0)}if(F=null,S!==void 0&&(n(S),F=""+S),s(w)&&(n(w.key),F=""+w.key),"key"in w){S={};for(var H in w)H!=="key"&&(S[H]=w[H])}else S=w;return F&&i(S,typeof v=="function"?v.displayName||v.name||"Unknown":v),u(v,F,D,T,a(),S,P,k)}function f(v){typeof v=="object"&&v!==null&&v.$$typeof===g&&v._store&&(v._store.validated=1)}var p=c,g=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),V=Symbol.for("react.client.reference"),B=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,J=Array.isArray,q=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(v){return v()}};var Q,ee={},Y=p.react_stack_bottom_frame.bind(p,o)(),ie=q(r(o)),j={};gn.Fragment=m,gn.jsx=function(v,w,S,R,T){var D=1e4>B.recentlyCreatedOwnerStacks++;return d(v,w,S,!1,R,T,D?Error("react-stack-top-frame"):Y,D?q(r(v)):ie)},gn.jsxs=function(v,w,S,R,T){var D=1e4>B.recentlyCreatedOwnerStacks++;return d(v,w,S,!0,R,T,D?Error("react-stack-top-frame"):Y,D?q(r(v)):ie)}}()),gn}process.env.NODE_ENV==="production"?fa.exports=pu():fa.exports=gu();var x=fa.exports,Kn={exports:{}},Xn={exports:{}},ae={};/** @license React v16.13.1
23
23
  * react-is.production.min.js
24
24
  *
25
25
  * Copyright (c) Facebook, Inc. and its affiliates.
26
26
  *
27
27
  * This source code is licensed under the MIT license found in the
28
28
  * LICENSE file in the root directory of this source tree.
29
- */var sa;function el(){if(sa)return Q;sa=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(w){if(typeof w=="object"&&w!==null){var B=w.$$typeof;switch(B){case t:switch(w=w.type,w){case l:case u:case n:case i:case a:case d:return w;default:switch(w=w&&w.$$typeof,w){case s:case f:case h:case v:case o:return w;default:return B}}case r:return B}}}function R(w){return E(w)===u}return Q.AsyncMode=l,Q.ConcurrentMode=u,Q.ContextConsumer=s,Q.ContextProvider=o,Q.Element=t,Q.ForwardRef=f,Q.Fragment=n,Q.Lazy=h,Q.Memo=v,Q.Portal=r,Q.Profiler=i,Q.StrictMode=a,Q.Suspense=d,Q.isAsyncMode=function(w){return R(w)||E(w)===l},Q.isConcurrentMode=R,Q.isContextConsumer=function(w){return E(w)===s},Q.isContextProvider=function(w){return E(w)===o},Q.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Q.isForwardRef=function(w){return E(w)===f},Q.isFragment=function(w){return E(w)===n},Q.isLazy=function(w){return E(w)===h},Q.isMemo=function(w){return E(w)===v},Q.isPortal=function(w){return E(w)===r},Q.isProfiler=function(w){return E(w)===i},Q.isStrictMode=function(w){return E(w)===a},Q.isSuspense=function(w){return E(w)===d},Q.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===u||w===i||w===a||w===d||w===p||typeof w=="object"&&w!==null&&(w.$$typeof===h||w.$$typeof===v||w.$$typeof===o||w.$$typeof===s||w.$$typeof===f||w.$$typeof===b||w.$$typeof===x||w.$$typeof===S||w.$$typeof===m)},Q.typeOf=E,Q}var ee={};/** @license React v16.13.1
29
+ */var Fo;function vu(){if(Fo)return ae;Fo=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function O(C){if(typeof C=="object"&&C!==null){var $=C.$$typeof;switch($){case t:switch(C=C.type,C){case l:case u:case r:case o:case a:case f:return C;default:switch(C=C&&C.$$typeof,C){case i:case d:case h:case g:case s:return C;default:return $}}case n:return $}}}function A(C){return O(C)===u}return ae.AsyncMode=l,ae.ConcurrentMode=u,ae.ContextConsumer=i,ae.ContextProvider=s,ae.Element=t,ae.ForwardRef=d,ae.Fragment=r,ae.Lazy=h,ae.Memo=g,ae.Portal=n,ae.Profiler=o,ae.StrictMode=a,ae.Suspense=f,ae.isAsyncMode=function(C){return A(C)||O(C)===l},ae.isConcurrentMode=A,ae.isContextConsumer=function(C){return O(C)===i},ae.isContextProvider=function(C){return O(C)===s},ae.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},ae.isForwardRef=function(C){return O(C)===d},ae.isFragment=function(C){return O(C)===r},ae.isLazy=function(C){return O(C)===h},ae.isMemo=function(C){return O(C)===g},ae.isPortal=function(C){return O(C)===n},ae.isProfiler=function(C){return O(C)===o},ae.isStrictMode=function(C){return O(C)===a},ae.isSuspense=function(C){return O(C)===f},ae.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===u||C===o||C===a||C===f||C===p||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===g||C.$$typeof===s||C.$$typeof===i||C.$$typeof===d||C.$$typeof===b||C.$$typeof===y||C.$$typeof===E||C.$$typeof===m)},ae.typeOf=O,ae}var oe={};/** @license React v16.13.1
30
30
  * react-is.development.js
31
31
  *
32
32
  * Copyright (c) Facebook, Inc. and its affiliates.
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var la;function tl(){return la||(la=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(O){return typeof O=="string"||typeof O=="function"||O===n||O===u||O===i||O===a||O===d||O===p||typeof O=="object"&&O!==null&&(O.$$typeof===h||O.$$typeof===v||O.$$typeof===o||O.$$typeof===s||O.$$typeof===f||O.$$typeof===b||O.$$typeof===x||O.$$typeof===S||O.$$typeof===m)}function R(O){if(typeof O=="object"&&O!==null){var pe=O.$$typeof;switch(pe){case t:var Ae=O.type;switch(Ae){case l:case u:case n:case i:case a:case d:return Ae;default:var qt=Ae&&Ae.$$typeof;switch(qt){case s:case f:case h:case v:case o:return qt;default:return pe}}case r:return pe}}}var w=l,B=u,J=s,te=o,ce=t,ue=f,P=n,_=h,T=v,H=r,X=i,Z=a,q=d,re=!1;function ne(O){return re||(re=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),g(O)||R(O)===l}function g(O){return R(O)===u}function C(O){return R(O)===s}function A(O){return R(O)===o}function j(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function I(O){return R(O)===f}function N(O){return R(O)===n}function z(O){return R(O)===h}function L(O){return R(O)===v}function D(O){return R(O)===r}function U(O){return R(O)===i}function V(O){return R(O)===a}function le(O){return R(O)===d}ee.AsyncMode=w,ee.ConcurrentMode=B,ee.ContextConsumer=J,ee.ContextProvider=te,ee.Element=ce,ee.ForwardRef=ue,ee.Fragment=P,ee.Lazy=_,ee.Memo=T,ee.Portal=H,ee.Profiler=X,ee.StrictMode=Z,ee.Suspense=q,ee.isAsyncMode=ne,ee.isConcurrentMode=g,ee.isContextConsumer=C,ee.isContextProvider=A,ee.isElement=j,ee.isForwardRef=I,ee.isFragment=N,ee.isLazy=z,ee.isMemo=L,ee.isPortal=D,ee.isProfiler=U,ee.isStrictMode=V,ee.isSuspense=le,ee.isValidElementType=E,ee.typeOf=R}()),ee}var ca;function to(){return ca||(ca=1,process.env.NODE_ENV==="production"?Xt.exports=el():Xt.exports=tl()),Xt.exports}/*
36
+ */var Bo;function mu(){return Bo||(Bo=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function O(M){return typeof M=="string"||typeof M=="function"||M===r||M===u||M===o||M===a||M===f||M===p||typeof M=="object"&&M!==null&&(M.$$typeof===h||M.$$typeof===g||M.$$typeof===s||M.$$typeof===i||M.$$typeof===d||M.$$typeof===b||M.$$typeof===y||M.$$typeof===E||M.$$typeof===m)}function A(M){if(typeof M=="object"&&M!==null){var se=M.$$typeof;switch(se){case t:var fe=M.type;switch(fe){case l:case u:case r:case o:case a:case f:return fe;default:var ve=fe&&fe.$$typeof;switch(ve){case i:case d:case h:case g:case s:return ve;default:return se}}case n:return se}}}var C=l,$=u,_=i,I=s,L=t,V=d,B=r,W=h,J=g,q=n,Q=o,ee=a,Y=f,ie=!1;function j(M){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),v(M)||A(M)===l}function v(M){return A(M)===u}function w(M){return A(M)===i}function S(M){return A(M)===s}function R(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function T(M){return A(M)===d}function D(M){return A(M)===r}function P(M){return A(M)===h}function k(M){return A(M)===g}function F(M){return A(M)===n}function G(M){return A(M)===o}function H(M){return A(M)===a}function ne(M){return A(M)===f}oe.AsyncMode=C,oe.ConcurrentMode=$,oe.ContextConsumer=_,oe.ContextProvider=I,oe.Element=L,oe.ForwardRef=V,oe.Fragment=B,oe.Lazy=W,oe.Memo=J,oe.Portal=q,oe.Profiler=Q,oe.StrictMode=ee,oe.Suspense=Y,oe.isAsyncMode=j,oe.isConcurrentMode=v,oe.isContextConsumer=w,oe.isContextProvider=S,oe.isElement=R,oe.isForwardRef=T,oe.isFragment=D,oe.isLazy=P,oe.isMemo=k,oe.isPortal=F,oe.isProfiler=G,oe.isStrictMode=H,oe.isSuspense=ne,oe.isValidElementType=O,oe.typeOf=A}()),oe}var zo;function Js(){return zo||(zo=1,process.env.NODE_ENV==="production"?Xn.exports=vu():Xn.exports=mu()),Xn.exports}/*
37
37
  object-assign
38
38
  (c) Sindre Sorhus
39
39
  @license MIT
40
- */var Mr,ua;function rl(){if(ua)return Mr;ua=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Mr=a()?Object.assign:function(i,o){for(var s,l=n(i),u,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){u=e(s);for(var p=0;p<u.length;p++)r.call(s,u[p])&&(l[u[p]]=s[u[p]])}}return l},Mr}var Pr,fa;function un(){if(fa)return Pr;fa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Pr=e,Pr}var jr,da;function ro(){return da||(da=1,jr=Function.call.bind(Object.prototype.hasOwnProperty)),jr}var Ir,ha;function nl(){if(ha)return Ir;ha=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=un(),r={},n=ro();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var f in i)if(n(i,f)){var d;try{if(typeof i[f]!="function"){var p=Error((l||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=i[f](o,f,l,s,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var v=u?u():"";e("Failed "+s+" type: "+d.message+(v??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Ir=a,Ir}var kr,pa;function al(){if(pa)return kr;pa=1;var e=to(),t=rl(),r=un(),n=ro(),a=nl(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return kr=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(g){var C=g&&(u&&g[u]||g[f]);if(typeof C=="function")return C}var p="<<anonymous>>",v={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:S(),arrayOf:E,element:R(),elementType:w(),instanceOf:B,node:ue(),objectOf:te,oneOf:J,oneOfType:ce,shape:_,exact:T};function h(g,C){return g===C?g!==0||1/g===1/C:g!==g&&C!==C}function m(g,C){this.message=g,this.data=C&&typeof C=="object"?C:{},this.stack=""}m.prototype=Error.prototype;function b(g){if(process.env.NODE_ENV!=="production")var C={},A=0;function j(N,z,L,D,U,V,le){if(D=D||p,V=V||L,le!==r){if(l){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=D+":"+L;!C[pe]&&A<3&&(i("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+D+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),C[pe]=!0,A++)}}return z[L]==null?N?z[L]===null?new m("The "+U+" `"+V+"` is marked as required "+("in `"+D+"`, but its value is `null`.")):new m("The "+U+" `"+V+"` is marked as required in "+("`"+D+"`, but its value is `undefined`.")):null:g(z,L,D,U,V)}var I=j.bind(null,!1);return I.isRequired=j.bind(null,!0),I}function x(g){function C(A,j,I,N,z,L){var D=A[j],U=Z(D);if(U!==g){var V=q(D);return new m("Invalid "+N+" `"+z+"` of type "+("`"+V+"` supplied to `"+I+"`, expected ")+("`"+g+"`."),{expectedType:g})}return null}return b(C)}function S(){return b(o)}function E(g){function C(A,j,I,N,z){if(typeof g!="function")return new m("Property `"+z+"` of component `"+I+"` has invalid PropType notation inside arrayOf.");var L=A[j];if(!Array.isArray(L)){var D=Z(L);return new m("Invalid "+N+" `"+z+"` of type "+("`"+D+"` supplied to `"+I+"`, expected an array."))}for(var U=0;U<L.length;U++){var V=g(L,U,I,N,z+"["+U+"]",r);if(V instanceof Error)return V}return null}return b(C)}function R(){function g(C,A,j,I,N){var z=C[A];if(!s(z)){var L=Z(z);return new m("Invalid "+I+" `"+N+"` of type "+("`"+L+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return b(g)}function w(){function g(C,A,j,I,N){var z=C[A];if(!e.isValidElementType(z)){var L=Z(z);return new m("Invalid "+I+" `"+N+"` of type "+("`"+L+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return b(g)}function B(g){function C(A,j,I,N,z){if(!(A[j]instanceof g)){var L=g.name||p,D=ne(A[j]);return new m("Invalid "+N+" `"+z+"` of type "+("`"+D+"` supplied to `"+I+"`, expected ")+("instance of `"+L+"`."))}return null}return b(C)}function J(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function C(A,j,I,N,z){for(var L=A[j],D=0;D<g.length;D++)if(h(L,g[D]))return null;var U=JSON.stringify(g,function(le,O){var pe=q(O);return pe==="symbol"?String(O):O});return new m("Invalid "+N+" `"+z+"` of value `"+String(L)+"` "+("supplied to `"+I+"`, expected one of "+U+"."))}return b(C)}function te(g){function C(A,j,I,N,z){if(typeof g!="function")return new m("Property `"+z+"` of component `"+I+"` has invalid PropType notation inside objectOf.");var L=A[j],D=Z(L);if(D!=="object")return new m("Invalid "+N+" `"+z+"` of type "+("`"+D+"` supplied to `"+I+"`, expected an object."));for(var U in L)if(n(L,U)){var V=g(L,U,I,N,z+"."+U,r);if(V instanceof Error)return V}return null}return b(C)}function ce(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var C=0;C<g.length;C++){var A=g[C];if(typeof A!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+re(A)+" at index "+C+"."),o}function j(I,N,z,L,D){for(var U=[],V=0;V<g.length;V++){var le=g[V],O=le(I,N,z,L,D,r);if(O==null)return null;O.data&&n(O.data,"expectedType")&&U.push(O.data.expectedType)}var pe=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new m("Invalid "+L+" `"+D+"` supplied to "+("`"+z+"`"+pe+"."))}return b(j)}function ue(){function g(C,A,j,I,N){return H(C[A])?null:new m("Invalid "+I+" `"+N+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return b(g)}function P(g,C,A,j,I){return new m((g||"React class")+": "+C+" type `"+A+"."+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+I+"`.")}function _(g){function C(A,j,I,N,z){var L=A[j],D=Z(L);if(D!=="object")return new m("Invalid "+N+" `"+z+"` of type `"+D+"` "+("supplied to `"+I+"`, expected `object`."));for(var U in g){var V=g[U];if(typeof V!="function")return P(I,N,z,U,q(V));var le=V(L,U,I,N,z+"."+U,r);if(le)return le}return null}return b(C)}function T(g){function C(A,j,I,N,z){var L=A[j],D=Z(L);if(D!=="object")return new m("Invalid "+N+" `"+z+"` of type `"+D+"` "+("supplied to `"+I+"`, expected `object`."));var U=t({},A[j],g);for(var V in U){var le=g[V];if(n(g,V)&&typeof le!="function")return P(I,N,z,V,q(le));if(!le)return new m("Invalid "+N+" `"+z+"` key `"+V+"` supplied to `"+I+"`.\nBad object: "+JSON.stringify(A[j],null," ")+`
41
- Valid keys: `+JSON.stringify(Object.keys(g),null," "));var O=le(L,V,I,N,z+"."+V,r);if(O)return O}return null}return b(C)}function H(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(H);if(g===null||s(g))return!0;var C=d(g);if(C){var A=C.call(g),j;if(C!==g.entries){for(;!(j=A.next()).done;)if(!H(j.value))return!1}else for(;!(j=A.next()).done;){var I=j.value;if(I&&!H(I[1]))return!1}}else return!1;return!0;default:return!1}}function X(g,C){return g==="symbol"?!0:C?C["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&C instanceof Symbol:!1}function Z(g){var C=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":X(C,g)?"symbol":C}function q(g){if(typeof g>"u"||g===null)return""+g;var C=Z(g);if(C==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return C}function re(g){var C=q(g);switch(C){case"array":case"object":return"an "+C;case"boolean":case"date":case"regexp":return"a "+C;default:return C}}function ne(g){return!g.constructor||!g.constructor.name?p:g.constructor.name}return v.checkPropTypes=a,v.resetWarningCache=a.resetWarningCache,v.PropTypes=v,v},kr}var Fr,ga;function il(){if(ga)return Fr;ga=1;var e=un();function t(){}function r(){}return r.resetWarningCache=t,Fr=function(){function n(o,s,l,u,f,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},Fr}var va;function no(){if(va)return Yt.exports;if(va=1,process.env.NODE_ENV!=="production"){var e=to(),t=!0;Yt.exports=al()(e.isElement,t)}else Yt.exports=il()();return Yt.exports}var ol=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(n,a,i){r.o(n,a)||Object.defineProperty(n,a,{enumerable:!0,get:i})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,a){if(1&a&&(n=r(n)),8&a||4&a&&typeof n=="object"&&n&&n.__esModule)return n;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&a&&typeof n!="string")for(var o in n)r.d(i,o,(function(s){return n[s]}).bind(null,o));return i},r.n=function(n){var a=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(a,"a",a),a},r.o=function(n,a){return Object.prototype.hasOwnProperty.call(n,a)},r.p="",r(r.s=2)}([function(e,t){e.exports=no()},function(e,t){e.exports=c},function(e,t,r){r.r(t);var n=r(1),a=r(0),i=function(){return(i=Object.assign||function(h){for(var m,b=1,x=arguments.length;b<x;b++)for(var S in m=arguments[b])Object.prototype.hasOwnProperty.call(m,S)&&(h[S]=m[S]);return h}).apply(this,arguments)},o=function(h,m){var b={};for(var x in h)Object.prototype.hasOwnProperty.call(h,x)&&m.indexOf(x)<0&&(b[x]=h[x]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var S=0;for(x=Object.getOwnPropertySymbols(h);S<x.length;S++)m.indexOf(x[S])<0&&Object.prototype.propertyIsEnumerable.call(h,x[S])&&(b[x[S]]=h[x[S]])}return b},s=0,l=n.forwardRef(function(h,m){var b=h.title,x=b===void 0?null:b,S=h.description,E=S===void 0?null:S,R=h.size,w=R===void 0?null:R,B=h.color,J=B===void 0?"currentColor":B,te=h.horizontal,ce=te===void 0?null:te,ue=h.vertical,P=ue===void 0?null:ue,_=h.rotate,T=_===void 0?null:_,H=h.spin,X=H===void 0?null:H,Z=h.style,q=Z===void 0?{}:Z,re=h.children,ne=o(h,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);s++;var g,C=X!==null&&X,A=n.Children.map(re,function(z){var L=z;C!==!0&&(C=(X===null?L.props.spin:X)===!0);var D=L.props.size;typeof w=="number"&&typeof L.props.size=="number"&&(D=L.props.size/w);var U={size:D,color:J===null?L.props.color:J,horizontal:ce===null?L.props.horizontal:ce,vertical:P===null?L.props.vertical:P,rotate:T===null?L.props.rotate:T,spin:X===null?L.props.spin:X,inStack:!0};return n.cloneElement(L,U)});w!==null&&(q.width=typeof w=="string"?w:1.5*w+"rem");var j,I="stack_labelledby_"+s,N="stack_describedby_"+s;if(x)g=E?I+" "+N:I;else if(j="presentation",E)throw new Error("title attribute required when description is set");return n.createElement("svg",i({ref:m,viewBox:"0 0 24 24",style:q,role:j,"aria-labelledby":g},ne),x&&n.createElement("title",{id:I},x),E&&n.createElement("desc",{id:N},E),C&&n.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }","@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"),A)});l.displayName="Stack",l.propTypes={size:a.oneOfType([a.number,a.string]),color:a.string,horizontal:a.bool,vertical:a.bool,rotate:a.number,spin:a.oneOfType([a.bool,a.number]),children:a.oneOfType([a.arrayOf(a.node),a.node]).isRequired,className:a.string,style:a.object},l.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var u=l;r.d(t,"Icon",function(){return v}),r.d(t,"Stack",function(){return u});var f=function(){return(f=Object.assign||function(h){for(var m,b=1,x=arguments.length;b<x;b++)for(var S in m=arguments[b])Object.prototype.hasOwnProperty.call(m,S)&&(h[S]=m[S]);return h}).apply(this,arguments)},d=function(h,m){var b={};for(var x in h)Object.prototype.hasOwnProperty.call(h,x)&&m.indexOf(x)<0&&(b[x]=h[x]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var S=0;for(x=Object.getOwnPropertySymbols(h);S<x.length;S++)m.indexOf(x[S])<0&&Object.prototype.propertyIsEnumerable.call(h,x[S])&&(b[x[S]]=h[x[S]])}return b},p=0,v=n.forwardRef(function(h,m){var b=h.path,x=h.id,S=x===void 0?++p:x,E=h.title,R=E===void 0?null:E,w=h.description,B=w===void 0?null:w,J=h.size,te=J===void 0?null:J,ce=h.color,ue=ce===void 0?"currentColor":ce,P=h.horizontal,_=P!==void 0&&P,T=h.vertical,H=T!==void 0&&T,X=h.rotate,Z=X===void 0?0:X,q=h.spin,re=q!==void 0&&q,ne=h.style,g=ne===void 0?{}:ne,C=h.inStack,A=C!==void 0&&C,j=d(h,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),I={},N=[];te!==null&&(A?N.push("scale("+te+")"):(g.width=typeof te=="string"?te:1.5*te+"rem",g.height=g.width)),_&&N.push("scaleX(-1)"),H&&N.push("scaleY(-1)"),Z!==0&&N.push("rotate("+Z+"deg)"),ue!==null&&(I.fill=ue);var z=n.createElement("path",f({d:b,style:I},A?j:{})),L=z;N.length>0&&(g.transform=N.join(" "),g.transformOrigin="center",A&&(L=n.createElement("g",{style:g},z,n.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var D,U=L,V=re===!0||typeof re!="number"?2:re,le=!A&&(_||H);if(V<0&&(le=!le),re&&(U=n.createElement("g",{style:{animation:"spin"+(le?"-inverse":"")+" linear "+Math.abs(V)+"s infinite",transformOrigin:"center"}},L,!(_||H||Z!==0)&&n.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),A)return U;var O,pe="icon_labelledby_"+S,Ae="icon_describedby_"+S;if(R)D=B?pe+" "+Ae:pe;else if(O="presentation",B)throw new Error("title attribute required when description is set");return n.createElement("svg",f({ref:m,viewBox:"0 0 24 24",style:g,role:O,"aria-labelledby":D},j),R&&n.createElement("title",{id:pe},R),B&&n.createElement("desc",{id:Ae},B),!A&&re&&(le?n.createElement("style",null,"@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"):n.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }")),U)});v.displayName="Icon",v.propTypes={path:a.string.isRequired,size:a.oneOfType([a.number,a.string]),color:a.string,horizontal:a.bool,vertical:a.bool,rotate:a.number,spin:a.oneOfType([a.bool,a.number]),style:a.object,inStack:a.bool,className:a.string},v.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=v}]);const Ie=eo(ol);function Re(e){const t=c.useMemo(()=>e.iconSize?e.iconSize:e.small?.8:1,[e.iconSize,e.small]),r=y.jsxs("button",{id:e.id,className:`btn ${e.className??""} ${e.ghost?" btn-ghost":""} ${e.small?"btn-xs":"btn-sm"} content-center ${e.circle?"btn-circle":""}`,onClick:e.onClick,disabled:e.disabled===!0,children:[e.icon&&y.jsx(Ie,{path:e.icon??"",color:e.disabled?e.iconColorDisabled??"lightgrey":e.iconColor,size:t}),e.text&&y.jsx("div",{className:`text-${e.small?"xs":"sm"}`,children:e.text})]});return y.jsx(y.Fragment,{children:e.tooltip?y.jsx("div",{className:`tooltip ${e.tooltipRight?"tooltip-right":"tooltip-top"} tooltip-top before:whitespace-pre-wrap text-left`,"data-tip":`${e.tooltip}`,children:r}):r})}function sl(e){return y.jsx(y.Fragment,{children:e.header.customRender(e.item,e.header,e.fromArrayData)})}const ao=c.createContext(void 0),fn=()=>{const e=c.useContext(ao);if(!e)throw new Error("useCommentPopupContext must be used within CommentPopupProvider");return e},ll=({children:e})=>{const[t,r]=c.useState(),[n,a]=c.useState("");return y.jsx(ao.Provider,{value:{openCommentCell:t,setOpenCommentCell:r,username:n,setUsername:a},children:e})};function cl(e){const{comment:t,style:r,isEditing:n,onMouseEnter:a,setIsEditing:i,onMouseLeave:o}=e,[s,l]=c.useState((t==null?void 0:t.text)||""),{setOpenCommentCell:u,username:f}=fn(),d=()=>{e.saveComment&&(e.saveComment({...t,text:s,columnId:e.columnId,author:f||"Unknown"}),e.isNewComment&&u(void 0),i==null||i(!1))},p=()=>{e.isNewComment&&u(void 0),l(t.text),i==null||i(!1)},v=c.useMemo(()=>(t.author||f||"Unknown").split(" ").map(m=>m.charAt(0).toUpperCase()).join("").slice(0,2),[t.author]);return y.jsxs("div",{style:r,onMouseEnter:a,onMouseLeave:o,children:[y.jsxs("div",{className:"flex justify-between mb-2",children:[y.jsxs("div",{className:"flex items-center gap-2 ",children:[y.jsx("div",{className:"avatar avatar-placeholder w-5",children:y.jsx("div",{className:"bg-neutral text-neutral-content w-5 rounded-full",children:y.jsx("span",{className:"text-xs",children:v})})}),y.jsx("div",{children:y.jsx("span",{className:"text-xs font-bold",children:(e.isNewComment?f:t.author)||"Unknown"})})]}),y.jsx("div",{children:!n&&y.jsxs("div",{children:[y.jsx(Re,{onClick:()=>{var h;return(h=e.deleteComment)==null?void 0:h.call(e,t)},className:"mb-1 h-5 min-h-5",iconSize:.6,small:!0,circle:!0,icon:Qs,iconColor:"var(--error-color)"}),y.jsx(Re,{onClick:()=>i==null?void 0:i(!0),className:"mb-1 ml-1 h-5 min-h-5",iconSize:.6,small:!0,circle:!0,icon:Js,iconColor:"var(--comment-color)"})]})})]}),y.jsx("div",{className:"ml-7",children:n?y.jsxs("div",{children:[y.jsx("input",{className:"input input-xs",type:"text",value:s,onChange:h=>l(h.target.value)}),y.jsxs("div",{className:"flex justify-end mt-2",children:[y.jsx(Re,{onClick:d,text:"Save",className:"mb-1 h-5 min-h-5 ",iconSize:.6,small:!0,icon:Ns,iconColor:"var(--comment-color)"}),y.jsx(Re,{onClick:p,className:"mb-1 h-5 min-h-5 ml-1",ghost:!0,iconSize:.6,small:!0,icon:zs,text:"Cancel",iconColor:"var(--error-color)"})]})]}):y.jsx("div",{className:"text-xs ",children:y.jsxs("div",{children:[y.jsx("div",{children:t.text}),y.jsx("span",{className:"text-gray-500 font-light text-tiny",children:t.formatDateFunction?t.formatDateFunction(t.date):new Date(t.date).toLocaleString()})]})})})]})}const Lr={LIST:"list",NUMBER:"number"};function ul(e){const[t,r]=c.useState(!0),[n,a]=c.useState(""),i=c.useMemo(()=>e.options.filter(o=>o.toLowerCase().includes(n.toLowerCase()||"")),[[e.options]]);return y.jsxs("div",{className:"relative ",children:[y.jsxs("div",{className:"flex justify-between min-h-4",onClick:()=>{console.log("clicked",!t),r(!t)},children:[y.jsx("div",{className:" truncate whitespace-nowrap overflow-ellipsis",children:e.value}),y.jsx("button",{className:"ml-1 w-0 h-0",style:{borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid #888",marginTop:"4px"},"aria-label":"dropdown indicator"})]}),t&&!e.hideOptions&&y.jsxs("div",{className:"absolute bg-base-100 border border-[var(--border-color)] z-1 w-52 p-2 shadow-sm",style:{left:"-8px",top:"23px"},children:[y.jsxs("div",{className:"flex",children:[y.jsxs("label",{className:"input input-xs",children:[y.jsx("svg",{className:"h-[1em] opacity-50",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:y.jsxs("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2.5",fill:"none",stroke:"currentColor",children:[y.jsx("circle",{cx:"11",cy:"11",r:"8"}),y.jsx("path",{d:"m21 21-4.3-4.3"})]})}),y.jsx("input",{type:"search",value:n,onChange:o=>a(o.target.value),required:!0,placeholder:"Search"})," "]}),n&&i.length===0&&y.jsx(Re,{className:"ml-2",small:!0,icon:Ls,iconColor:"#6161BB",circle:!0,disabled:e.options.includes(n.trim()),onClick:()=>{var o;(o=e.addOption)==null||o.call(e,n.trim()),a("")},tooltip:e.options.includes(n.trim())?"Option already in the list":""})]}),y.jsx("div",{className:"my-2"}),y.jsx("div",{className:"max-h-46 overflow-auto",children:i.map((o,s)=>y.jsx("div",{className:"cursor-pointer hover:bg-gray-100 p-1 truncate whitespace-nowrap overflow-ellipsis",onClick:()=>{e.onSelect(o),r(!1)},children:o},s))})]})]})}function fl(e){var B,J,te,ce,ue,P;const t=()=>e.fromArrayData?e.item[e.header.fromArray][e.fromArrayData.index][e.header.id]:e.item[e.header.id],[r,n]=c.useState(()=>t()),{openCommentCell:a,setOpenCommentCell:i}=fn();c.useEffect(()=>{n(t())},[e.item,e.header.id]);const o=_=>{const T=_.target;let H=T.value;if(T instanceof HTMLInputElement)switch(T.type){case"number":H=T.value===""?void 0:Number(T.value),typeof H=="number"&&isNaN(H)&&(H=void 0);break;case"date":H=T.value;break;default:H=T.value}else T instanceof HTMLSelectElement&&(H=T.value);n(H)},s=()=>{var _;(_=e.onBlur)==null||_.call(e,r,e.item,e.header,{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData})},l=_=>{var T;((a==null?void 0:a.columnIndex)!==e.columnIndex||a.rowIndex!==e.rowIndex)&&i(void 0),(T=e.onMouseDown)==null||T.call(e,_)},u=_=>{var T,H;if(_.key==="Enter")(T=e.onEnter)==null||T.call(e,r,e.item,e.header,{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData});else if(_.key==="Escape")n(t());else{if(f()&&["ArrowRight","ArrowLeft"].includes(_.key)&&!_.shiftKey)return;["ArrowDown","ArrowUp","Tab"].includes(_.key)&&s(),(H=e.onKeyDown)==null||H.call(e,_,e.rowIndex,e.columnIndex)}},f=()=>document.activeElement===p.current||document.activeElement===v.current,d=c.useMemo(()=>(a==null?void 0:a.columnIndex)===e.columnIndex&&a.rowIndex===e.rowIndex,[a,e.columnIndex,e.rowIndex]),p=c.useRef(null),v=c.useRef(null),h=c.useRef(null),m={width:"100%",outline:"none",border:"none",background:"transparent"},b=c.useMemo(()=>{var _,T,H;return((_=e.header.editOptions)==null?void 0:_.editable)&&!e.isInLinkedGroup&&!((H=(T=e.header.editOptions).isDisabled)!=null&&H.call(T,e.item,e.fromArrayData))},[(B=e.header.editOptions)==null?void 0:B.editable,e.isInLinkedGroup,(J=e.header.editOptions)==null?void 0:J.isDisabled,e.item]),x=()=>{var _;if(b&&e.isSelected)switch(e.header.editOptions.type){case Lr.NUMBER:return y.jsx("input",{ref:p,type:"number",value:r,onChange:o,onBlur:s,autoFocus:!0,style:m});case Lr.LIST:return y.jsx(ul,{value:r,options:e.header.editOptions.options||[],onSelect:T=>{var H;n(T),(H=e.onBlur)==null||H.call(e,T,e.item,e.header,{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData})},addOption:T=>{var H;(H=e.onAddOption)==null||H.call(e,T,e.header)},hideOptions:d});default:return y.jsx("div",{children:y.jsx("input",{ref:p,type:"text",value:r,onChange:o,onBlur:s,autoFocus:!0,style:m})})}else return e.header.customRender?y.jsx(sl,{item:e.item,header:e.header,fromArrayData:e.fromArrayData}):y.jsxs("div",{className:"flex justify-between",children:[y.jsx("span",{className:" truncate whitespace-nowrap overflow-ellipsis",title:String(e.item[e.header.id]),children:e.fromArrayData?y.jsx(y.Fragment,{children:e.item[e.header.fromArray]&&e.item[e.header.fromArray][e.fromArrayData.index]?e.item[e.header.fromArray][e.fromArrayData.index][e.header.id]:""}):y.jsxs(y.Fragment,{children:[" ",e.item[e.header.id]]})}),((_=e.header.editOptions)==null?void 0:_.type)===Lr.LIST&&y.jsx("div",{className:"ml-1 w-0 h-0",style:{borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid #888",marginTop:"4px"},"aria-label":"dropdown indicator"})]})},[S,E]=c.useState(!1),R=_=>{var T;(T=e.onMouseEnter)==null||T.call(e,_)},w=_=>{e.onDeleteComment&&(e.onDeleteComment(_,e.item),i(void 0))};return y.jsxs("td",{ref:h,tabIndex:0,onClick:e.onClick?()=>e.onClick({rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData}):void 0,style:{...e.style,textAlign:e.header.align,alignContent:"start",maxWidth:e.header.width?`${e.header.width}px`:"none"},rowSpan:e.rowSpan,className:`relative ${e.noBorder?"":"border-solid border border-gray-200 "}
42
- ${e.rowIndex%2||!e.contrastRow?"":"bg-blue-50/50"}
43
- ${e.isInExpandedSelection?"bg-blue-100/50":""}
44
- ${e.isSelected?"outline-2 outline-radius outline-blue-500! bg-transparent ":"outline-none"}
45
- ${e.isInLinkedGroup||!b&&((te=e.header.editOptions)!=null&&te.greyedOutIfNotEditable)?"bg-gray-200/50! ":""}
46
- `,onKeyDown:u,onMouseDown:l,onMouseEnter:R,onContextMenu:e.onContextMenu?_=>{e.onContextMenu(e.rowIndex,e.columnIndex,e.item,_)}:void 0,children:[e.comments&&e.comments.length>0&&y.jsx("div",{onClick:()=>i(d?void 0:{rowIndex:e.rowIndex,columnIndex:e.columnIndex}),className:"absolute top-0 right-0 ",style:{width:0,height:0,borderTop:"10px solid var(--comment-color)",borderLeft:"10px solid transparent"}}),x(),d&&y.jsx("div",{className:"absolute z-2000 w-[220px] mr-[-220px] bg-white border-2 border-[var(--comment-color)] rounded shadow-lg p-2 px-3 top-0 right-0",children:y.jsx(cl,{comment:((ce=e.comments)==null?void 0:ce[0])||{text:"",propertyId:e.header.id,value:e.item[e.header.id],date:new Date},columnId:e.header.id,isNewComment:((ue=e.comments)==null?void 0:ue.length)===0,saveComment:_=>{var T;(T=e.onSaveComment)==null||T.call(e,_,e.item)},deleteComment:_=>w(_),setIsEditing:E,isEditing:S||((P=e.comments)==null?void 0:P.length)===0})})]},`item-${e.columnIndex}-${e.rowIndex}`)}function dl(e,t){c.useEffect(()=>{function r(n){e.current&&n.target&&!e.current.contains(n.target)&&t()}return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[e,t])}function hl(e){var m;const[t,r]=c.useState(""),[n,a]=c.useState(!1),i=c.useRef(null),o=c.useRef(null),[s,l]=c.useState([]);c.useEffect(()=>{var b;l(((b=e.currentFilter)==null?void 0:b.itemsToHide)??[])},[(m=e.currentFilter)==null?void 0:m.itemsToHide,e.show]),c.useEffect(()=>{var b,x;if(e.show&&o.current){const S=o.current.getBoundingClientRect(),E=(x=(b=e.tableRef)==null?void 0:b.current)==null?void 0:x.getBoundingClientRect(),R=(E==null?void 0:E.width)??0,w=S.width+S.x>R;a(w)}else a(!1)},[e.show]),dl(i,()=>{e.show&&e.onShowOrHide(!1)});const u=()=>t?[...e.items].filter(b=>b==null?void 0:b.toString().toLocaleLowerCase().includes(t==null?void 0:t.toString().toLocaleLowerCase())):[...e.items],f=b=>{b.preventDefault(),t&&e.onSetFilter(e.headerId,[t])},d=()=>{l([...e.items])},p=()=>{l([])},v=b=>{const x=s.findIndex(E=>E===b);let S=[...s];x===-1?S=[...S,b]:S.splice(x,1),l(S)},h=()=>{const x=u().filter(E=>!s.includes(E)),S=[...e.items].filter(E=>!x.includes(E));e.onSetFilter(e.headerId,S.map(E=>E))};return y.jsxs("div",{ref:i,className:"relative",children:[y.jsx("button",{onClick:()=>e.onShowOrHide(!e.show),className:`border-solid border hover:!border-primary cursor-pointer border-gray-300 rounded focus:outline-hidden! ${e.currentFilter?"bg-purple-800":"bg-white"} `,children:y.jsx(Ie,{path:qs,color:e.currentFilter?"white":"grey",size:.6})}),e.show?y.jsxs("div",{ref:o,className:`absolute mt-1 bg-white shadow-xs p-3 w-60 z-200 rounded-md font-normal border border-border-color-light ${n?"right-0":""}`,children:[y.jsx("div",{className:"font-semibold mb-1",children:"Filter by value:"}),y.jsxs("form",{onSubmit:f,children:[y.jsx("input",{type:"text",value:t,onChange:b=>r(b==null?void 0:b.target.value),placeholder:"Search...",className:"input input-bordered input-xs w-full max-w-xs"}),y.jsx("input",{type:"submit",value:""})]}),y.jsxs("div",{className:"flex text-xs mt-1 font-semibold text-primary",children:[y.jsx("button",{onClick:p,onFocus:()=>{},className:"mr-4 cursor-pointer hover:border-none! border-none! focus:outline-hidden! bg-transparent btn-sm",children:"Select All"}),y.jsx("button",{onClick:d,onFocus:()=>{},className:"cursor-pointer hover:border-none! border-none! focus:outline-hidden! bg-transparent btn-sm",children:"Clear"})]}),y.jsx("div",{className:"overflow-auto max-h-44 mt-2",style:{scrollbarWidth:"thin"},children:u().map((b,x)=>y.jsxs("div",{className:"flex mt-2",children:[y.jsx("input",{type:"checkbox",onClick:()=>v(b),readOnly:!0,checked:!s.includes(b),className:"checkbox checkbox-primary checkbox-xs mr-2"}),y.jsx("p",{className:"text-xs",children:(b==null?void 0:b.toString())||y.jsx("span",{className:"italic",children:"(Blanks)"})})]},`filter-item-${b}-${x}`))}),y.jsxs("div",{className:"flex float-end mt-2",children:[y.jsx(Re,{onClick:()=>{h(),e.onShowOrHide(!1)},text:"OK",iconColor:"#6161bb",small:!0}),y.jsx(Re,{className:"ml-1",onClick:()=>e.onShowOrHide(!1),text:"Cancel",iconColor:"#6161bb",small:!0})]})]}):""]})}var io=(e=>(e.STRING="string",e.NUMBER="number",e))(io||{});function pl(e){const[t,r]=c.useState(""),n=(d,p)=>{if(!d){r("");return}r(p)},a=d=>{if(e.activeFilters)return e.activeFilters.find(p=>p.headerId===d)};function i(d,p,v=0){const h=u(d,p,v),m=d.filter(b=>b.children&&b.children.length>0).map(b=>b.children).flat();return m.length>0?[h,...i(m,p,v+1)]:[h]}const o=d=>e.filterItemsCache[d]??[];function s(d){return d.reduce((p,v)=>v.children&&v.children.length>0?Math.max(p,1+s(v.children)):Math.max(p,1),0)}function l(d){return d.children&&d.children.length>0?d.children.reduce((p,v)=>p+l(v),0):1}function u(d,p,v=0){return d.length===0?null:y.jsx("tr",{className:"z-100",children:d.map((h,m)=>{var E,R;const b=l(h),S=h.children&&h.children.length>0?1:p-v;return y.jsx("th",{colSpan:b,rowSpan:S,className:`${e.noBorder?"":"border-solid border border-gray-300! bg-slate-100"}`,children:y.jsxs("div",{style:{width:h.width?`${h.width}px`:"auto"},className:"flex justify-between",children:[y.jsxs("div",{className:"flex",children:[h.customHeader?h.customHeader(h):y.jsx("button",{onClick:()=>{var w;return(w=e.onSortByColumn)==null?void 0:w.call(e,h)},className:`font-semibold bg-transparent text-left text-slate-600 text-xs border-none outline-hidden! whitespace-pre ${h.sortable?"cursor-pointer hover:underline":"cursor-default"}`,children:h.text}),e.currentSortId===h.id&&y.jsxs(y.Fragment,{children:[y.jsx(Ie,{path:e.ascendingOrder?Ds:Fs,color:"grey",size:.6}),y.jsx("button",{onClick:e.onResetSort,className:`border-solid border bg-slate-300 hover:bg-slate-400! hover:border-transparent cursor-pointer rounded-lg h-min focus:outline-hidden!
47
- `,children:y.jsx(Ie,{path:Gs,color:"grey",size:.6})})]})]}),h.hasFilter?y.jsx("div",{className:"ml-2",children:y.jsx(hl,{show:t===h.id,tableRef:e.tableRef,currentFilter:a(h.id),filterName:h.text,headerId:h.id,filterType:io.STRING,items:o(h.id),itemsToHide:((R=(E=e.activeFilters)==null?void 0:E.find(w=>w.headerId===h.id))==null?void 0:R.itemsToHide)??[],onShowOrHide:w=>n(w,h.id),onSetFilter:e.onSetFilter??(()=>{})})}):y.jsx(y.Fragment,{})]})},h.id+`-${m}`)})},`header-row-${v}`)}const f=s(e.headers);return y.jsx("thead",{children:i(e.headers,f)})}const gl=e=>e.every(t=>typeof t=="number"),vl=(e,t)=>e<t?-1:e>t?1:0,bl=(e,t)=>e>t?-1:e<t?1:0,oo=" ",ml=(e,t)=>e.length===0?[]:t.length===0?[...e]:[...e].filter(r=>{for(const n of t){let a=r[n.headerId],i=!1;if(gl(n.itemsToHide)?(a=typeof a=="string"?a.split(oo).join(""):a,i=n.itemsToHide.includes(Number(a))):n.itemsToHide.includes(a)&&(i=!0),i)return!1}return!0}),yl=(e,t,r,n)=>{let a=[...e];if(!n)return a;const i=t.find(s=>s.id===n);if(i!=null&&i.customSort)return a.sort((s,l)=>i.customSort(s,l,r==="asc")),a;let o=!0;return a.forEach(s=>{var d;const l=(d=s[n])==null?void 0:d.toString();if(!l)return;const u=Dr(l),f=["NaN"];isNaN(u)&&!f.includes(l)&&(o=!1)}),o?(a.sort((s,l)=>{const u=Dr(s[n]),f=Dr(l[n]),d=typeof u=="number"&&!isNaN(u),p=typeof f=="number"&&!isNaN(f);return d&&!p?-1:!d&&p?1:r==="desc"?f-u:u-f}),a):(r==="desc"?a.sort((s,l)=>vl(l[n],s[n])):a.sort((s,l)=>bl(l[n],s[n])),a)},Dr=e=>typeof e=="number"?e:typeof e=="string"?Number(e.split(oo).join("")):e;function xl(e,t,r=[],n){const[a,i]=c.useState(r),o=()=>{i([])},s=(v,h)=>{const m=[...a],b=m.findIndex(x=>x.headerId===v);b!==-1?h.length>0?m[b]={headerId:v,itemsToHide:h}:m.splice(b,1):h.length>0&&m.push({headerId:v,itemsToHide:h}),i(m)},l=n||e,u=c.useMemo(()=>ml(l,a),[l,a]);function f(v){return v.flatMap(h=>h.children&&h.children.length>0?f(h.children):[h])}const d=c.useMemo(()=>f(t),[t]),p=c.useMemo(()=>{const v={};return d.forEach(h=>{let m=u.map(x=>x[h.id]);const b=a.find(x=>x.headerId===h.id);b&&(m=m.concat(b.itemsToHide)),v[h.id]=[...new Set(m)].filter(x=>typeof x=="string"||typeof x=="number")}),v},[u,a,d]);return{activeFilters:a,setActiveFilters:i,clearActiveFilters:o,setActiveTableFilter:s,filteredItems:u,filterItemsCache:p}}function wl(e,t,r,n){const[a,i]=c.useState(r),[o,s]=c.useState(!0);c.useEffect(()=>{i(r)},[r]);const l=()=>{i(void 0),s(!0)},u=d=>{if(!(d!=null&&d.sortable))return;let p;a===d.id?p=!o:p=!0,i(d.id),s(p),n&&n(d.id)},f=c.useMemo(()=>yl(e,t,o?"asc":"desc",a),[e,t,o,a]);return{currentSortId:a,setCurrentSortId:i,ascendingOrder:o,setAscendingOrder:s,onResetSort:l,onSortByColumn:u,sortedItems:f}}function Cl(e,t,r=[],n,a){const{currentSortId:i,setCurrentSortId:o,ascendingOrder:s,setAscendingOrder:l,onResetSort:u,onSortByColumn:f,sortedItems:d}=wl(e,t,n,a),{activeFilters:p,setActiveFilters:v,clearActiveFilters:h,setActiveTableFilter:m,filteredItems:b,filterItemsCache:x}=xl(e,t,r,d),S=c.useMemo(()=>b,[b]);return{activeFilters:p,setActiveFilters:v,clearActiveFilters:h,setActiveTableFilter:m,filterItemsCache:x,currentSortId:i,setCurrentSortId:o,ascendingOrder:s,setAscendingOrder:l,onResetSort:u,onSortByColumn:f,processedItems:S}}function Sl(e,t,r){const[n,a]=c.useState([]),i=c.useCallback(d=>{a(p=>p.includes(d)?p.filter(m=>m!==d):[...p,d])},[]),o=c.useMemo(()=>{if(!t)return{"":e.map((m,b)=>({rowIndex:b,item:m}))};const d=e.reduce((h,m)=>{const b=m[t];return h[b]||(h[b]=[]),h[b].push({rowIndex:0,item:m}),h},{});let p=0;const v={};return Object.keys(d).forEach(h=>{v[h]=d[h].map(({item:m})=>({rowIndex:p++,item:m}))}),v},[e,t]),s=c.useMemo(()=>{const d=Object.entries(o);if(!r||r.length===0)return d;const p=new Set(r.map(E=>E.master)),v=new Set(r.flatMap(E=>E.linked)),h=new Map(r.map(E=>[E.master,E.linked])),m=new Set,b=[],x=new Map(d.map(E=>[E[0],E]));for(const[E,R]of d)if(!m.has(E))if(p.has(E)){b.push([E,R]),m.add(E);const w=h.get(E)||[];for(const B of w){const J=x.get(B);J&&!m.has(B)&&(b.push(J),m.add(B))}}else{if(v.has(E))continue;b.push([E,R]),m.add(E)}let S=0;return b.map(([E,R])=>{const w=R.map(({item:B})=>({rowIndex:S++,item:B}));return[E,w]})},[o,r]),l=c.useMemo(()=>d=>{var p;return(p=r==null?void 0:r.find(v=>v.linked.includes(d)))==null?void 0:p.master},[r]),u=c.useMemo(()=>{const d=[];return s.forEach(([p,v])=>{var m;const h=(n==null?void 0:n.includes(p))??!1;d.push({isGroup:!0,groupName:p,isCollapsed:h,masterGroupName:l(p),linkedGroupNames:(m=r==null?void 0:r.find(b=>b.master===p))==null?void 0:m.linked}),h||v.forEach(({rowIndex:b,item:x})=>{d.push({isGroup:!1,rowIndex:b,groupName:p,isCollapsed:h,item:x})})}),d},[s,n]),f=c.useMemo(()=>d=>!!(r!=null&&r.some(p=>p.linked.includes(d))),[r]);return{groupedItems:o,groupedItemsEntries:s,collapsedGroups:n,flatGroupedItemsToDisplay:u,onCollapseGroup:i,setCollapsedGroup:a,isGroupLinked:f,getMasterGroupNameLinked:l}}const El=(e,t,r,n,a)=>{e.stopPropagation();let i=t,o=[...r];if(e.key==="Tab"){let s=(t==null?void 0:t.rowIndex)??0,l=(t==null?void 0:t.columnIndex)??0;if(r.length>1){const u=Math.min(...r.map(v=>v.rowIndex)),f=Math.max(...r.map(v=>v.rowIndex)),d=Math.min(...r.map(v=>v.columnIndex)),p=Math.max(...r.map(v=>v.columnIndex));e.shiftKey?(l--,l<d&&(l=p,s--,s<u&&(s=f))):(l++,l>p&&(l=d,s++,s>f&&(s=u)))}else l=((t==null?void 0:t.columnIndex)??0)+(e.shiftKey?-1:1),l>=n?(l=0,s++):l<0&&(l=n-1,s--),s>=a&&(s=0),s<0&&(s=a-1),o=[];i={rowIndex:s,columnIndex:l}}if(e.shiftKey&&["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&(o=$l(t,r,e.key)),!e.shiftKey&&["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)){let s=(t==null?void 0:t.rowIndex)??0,l=(t==null?void 0:t.columnIndex)??0;switch(e.key){case"ArrowDown":s=Math.min(a-1,s+1);break;case"ArrowUp":s=Math.max(0,s-1);break;case"ArrowRight":l=Math.min(n-1,l+1);break;case"ArrowLeft":l=Math.max(0,l-1);break}i={rowIndex:s,columnIndex:l},o=[]}return{newSelectedCell:i,newExpandedSelection:o}};function $l(e,t,r){if(!e)return t;let n,a,i,o;if(t.length===0)return[{...e}];n=Math.min(...t.map(h=>h.rowIndex)),a=Math.max(...t.map(h=>h.rowIndex)),i=Math.min(...t.map(h=>h.columnIndex)),o=Math.max(...t.map(h=>h.columnIndex));let s=0,l=0;switch(e.rowIndex===n?s=a:s=n,e.columnIndex===i?l=o:l=i,r){case"ArrowUp":s=s-1;break;case"ArrowDown":s=s+1;break;case"ArrowLeft":l=l-1;break;case"ArrowRight":l=l+1;break;default:return t}const u=Math.min(e.rowIndex,s),f=Math.max(e.rowIndex,s),d=Math.min(e.columnIndex,l),p=Math.max(e.columnIndex,l),v=[];for(let h=u;h<=f;h++)for(let m=d;m<=p;m++)v.push({rowIndex:h,columnIndex:m});return v}function _l({headers:e,items:t,groupedItemsEntries:r,onChange:n,onBulkChange:a,onRowDoubleClick:i}){const[o,s]=c.useState(),[l,u]=c.useState([]),f=c.useCallback(P=>{if(P)if(r){const _=r.flatMap(([T,H])=>H.filter(X=>X.rowIndex===P.rowIndex))[0];if(_)return _.item}else return t[P.rowIndex]},[r,t]),d=c.useCallback((P,_,T,H)=>{const X=t.findIndex(q=>q===_);let Z;if(H){const q=_[T.fromArray];q[H.index]={...q[H.index],[T.id]:P},Z={..._,[T.fromArray]:q}}else Z={..._,[T.id]:P};return{itemUpdated:Z,originalIndex:X}},[t]),p=c.useCallback((P,_,T,H)=>{var q;const{itemUpdated:X,originalIndex:Z}=d(P,_,T,H.fromArrayData);if(n){const re=(q=H.fromArrayData)==null?void 0:q.index;(re===void 0?_[T.id]!==P:_[T.fromArray][re]!==P)&&n(X,Z,re)}},[n,d]),v=c.useCallback((P,_,T)=>{T.preventDefault(),l.some(X=>X.rowIndex===P&&X.columnIndex===_)||(s({rowIndex:P,columnIndex:_}),u([]))},[l]),h=c.useCallback((P,_,T,H)=>{var Z;let X=[...l];if(o&&!l.some(q=>q.rowIndex===o.rowIndex&&q.columnIndex===o.columnIndex)&&(X=[...l,o]),(l==null?void 0:l.length)>1){const q=X.map(re=>{const ne=f(re);return ne?(console.log("Edit value",P),{itemUpdated:{...ne,[T.id]:P},originalIndex:t.findIndex(g=>g===ne)}):null}).filter(Boolean);a&&q.length>0&&a(q,T.id)}else{const{itemUpdated:q,originalIndex:re}=d(P,_,T);if(n){const ne=(Z=H.fromArrayData)==null?void 0:Z.index;(ne===void 0?_[T.id]!==P:_[T.fromArray][ne]!==P)&&n(q,re,ne)}}},[l,o,f,t,a,n,d]),m=c.useCallback(P=>{var _,T;((o==null?void 0:o.rowIndex)!==P.rowIndex||(o==null?void 0:o.columnIndex)!==P.columnIndex||((_=o==null?void 0:o.fromArrayData)==null?void 0:_.index)!==((T=P.fromArrayData)==null?void 0:T.index))&&(s(P),u([]))},[o]),b=c.useCallback(P=>{const{newSelectedCell:_,newExpandedSelection:T}=El(P,o,l,e.length,t.length);s(_),u(T)},[o,l,e.length,t.length]),x=c.useCallback(P=>{i&&i(P)},[i]),S=c.useRef(!1),[E,R]=c.useState(!1),[w,B]=c.useState(),J=c.useCallback((P,_,T)=>{S.current=!0,B({rowIndex:_,columnIndex:T})},[]),te=c.useCallback((P,_,T)=>{if(P.stopPropagation(),!E||!w)return;const H=Math.min(w.rowIndex,_),X=Math.max(w.rowIndex,_),Z=Math.min(w.columnIndex,T),q=Math.max(w.columnIndex,T),re=[];for(let ne=H;ne<=X;ne++)for(let g=Z;g<=q;g++)re.push({rowIndex:ne,columnIndex:g});u(re)},[E,w]),ce=c.useCallback(P=>{P.preventDefault(),S.current&&!E&&R(!0),E&&w!==o&&s(w)},[E,w,o]),ue=c.useCallback(()=>{S.current=!1,R(!1)},[]);return c.useEffect(()=>(window.addEventListener("mouseup",ue),()=>{window.removeEventListener("mouseup",ue)}),[ue]),{selectedCell:o,expandedSelection:l,isDragging:E,setSelectedCell:s,setExpandedSelection:u,onCellBlur:p,onCellEnter:h,onCellClick:m,handleCellKeyDown:b,handleRowDoubleClick:x,onCellMouseDown:J,onCellMouseEnter:te,onMouseMove:ce,onRightClick:v,getItemFromCellCoordinates:f}}function Je(e,t,r){let n=r.initialDeps??[],a;function i(){var o,s,l,u;let f;r.key&&((o=r.debug)!=null&&o.call(r))&&(f=Date.now());const d=e();if(!(d.length!==n.length||d.some((h,m)=>n[m]!==h)))return a;n=d;let v;if(r.key&&((s=r.debug)!=null&&s.call(r))&&(v=Date.now()),a=t(...d),r.key&&((l=r.debug)!=null&&l.call(r))){const h=Math.round((Date.now()-f)*100)/100,m=Math.round((Date.now()-v)*100)/100,b=m/16,x=(S,E)=>{for(S=String(S);S.length<E;)S=" "+S;return S};console.info(`%c⏱ ${x(m,5)} /${x(h,5)} ms`,`
40
+ */var Vr,Go;function bu(){if(Go)return Vr;Go=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function a(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},i=0;i<10;i++)s["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Vr=a()?Object.assign:function(o,s){for(var i,l=r(o),u,d=1;d<arguments.length;d++){i=Object(arguments[d]);for(var f in i)t.call(i,f)&&(l[f]=i[f]);if(e){u=e(i);for(var p=0;p<u.length;p++)n.call(i,u[p])&&(l[u[p]]=i[u[p]])}}return l},Vr}var Ur,Vo;function Ia(){if(Vo)return Ur;Vo=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ur=e,Ur}var Wr,Uo;function Zs(){return Uo||(Uo=1,Wr=Function.call.bind(Object.prototype.hasOwnProperty)),Wr}var Yr,Wo;function yu(){if(Wo)return Yr;Wo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ia(),n={},r=Zs();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(o,s,i,l,u){if(process.env.NODE_ENV!=="production"){for(var d in o)if(r(o,d)){var f;try{if(typeof o[d]!="function"){var p=Error((l||"React class")+": "+i+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=o[d](s,d,l,i,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+i+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var g=u?u():"";e("Failed "+i+" type: "+f.message+(g??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yr=a,Yr}var Kr,Yo;function xu(){if(Yo)return Kr;Yo=1;var e=Js(),t=bu(),n=Ia(),r=Zs(),a=yu(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(i){var l="Warning: "+i;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Kr=function(i,l){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(v){var w=v&&(u&&v[u]||v[d]);if(typeof w=="function")return w}var p="<<anonymous>>",g={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:E(),arrayOf:O,element:A(),elementType:C(),instanceOf:$,node:V(),objectOf:I,oneOf:_,oneOfType:L,shape:W,exact:J};function h(v,w){return v===w?v!==0||1/v===1/w:v!==v&&w!==w}function m(v,w){this.message=v,this.data=w&&typeof w=="object"?w:{},this.stack=""}m.prototype=Error.prototype;function b(v){if(process.env.NODE_ENV!=="production")var w={},S=0;function R(D,P,k,F,G,H,ne){if(F=F||p,H=H||k,ne!==n){if(l){var M=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw M.name="Invariant Violation",M}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=F+":"+k;!w[se]&&S<3&&(o("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+F+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),w[se]=!0,S++)}}return P[k]==null?D?P[k]===null?new m("The "+G+" `"+H+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new m("The "+G+" `"+H+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:v(P,k,F,G,H)}var T=R.bind(null,!1);return T.isRequired=R.bind(null,!0),T}function y(v){function w(S,R,T,D,P,k){var F=S[R],G=ee(F);if(G!==v){var H=Y(F);return new m("Invalid "+D+" `"+P+"` of type "+("`"+H+"` supplied to `"+T+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return b(w)}function E(){return b(s)}function O(v){function w(S,R,T,D,P){if(typeof v!="function")return new m("Property `"+P+"` of component `"+T+"` has invalid PropType notation inside arrayOf.");var k=S[R];if(!Array.isArray(k)){var F=ee(k);return new m("Invalid "+D+" `"+P+"` of type "+("`"+F+"` supplied to `"+T+"`, expected an array."))}for(var G=0;G<k.length;G++){var H=v(k,G,T,D,P+"["+G+"]",n);if(H instanceof Error)return H}return null}return b(w)}function A(){function v(w,S,R,T,D){var P=w[S];if(!i(P)){var k=ee(P);return new m("Invalid "+T+" `"+D+"` of type "+("`"+k+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return b(v)}function C(){function v(w,S,R,T,D){var P=w[S];if(!e.isValidElementType(P)){var k=ee(P);return new m("Invalid "+T+" `"+D+"` of type "+("`"+k+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return b(v)}function $(v){function w(S,R,T,D,P){if(!(S[R]instanceof v)){var k=v.name||p,F=j(S[R]);return new m("Invalid "+D+" `"+P+"` of type "+("`"+F+"` supplied to `"+T+"`, expected ")+("instance of `"+k+"`."))}return null}return b(w)}function _(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function w(S,R,T,D,P){for(var k=S[R],F=0;F<v.length;F++)if(h(k,v[F]))return null;var G=JSON.stringify(v,function(ne,M){var se=Y(M);return se==="symbol"?String(M):M});return new m("Invalid "+D+" `"+P+"` of value `"+String(k)+"` "+("supplied to `"+T+"`, expected one of "+G+"."))}return b(w)}function I(v){function w(S,R,T,D,P){if(typeof v!="function")return new m("Property `"+P+"` of component `"+T+"` has invalid PropType notation inside objectOf.");var k=S[R],F=ee(k);if(F!=="object")return new m("Invalid "+D+" `"+P+"` of type "+("`"+F+"` supplied to `"+T+"`, expected an object."));for(var G in k)if(r(k,G)){var H=v(k,G,T,D,P+"."+G,n);if(H instanceof Error)return H}return null}return b(w)}function L(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var w=0;w<v.length;w++){var S=v[w];if(typeof S!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ie(S)+" at index "+w+"."),s}function R(T,D,P,k,F){for(var G=[],H=0;H<v.length;H++){var ne=v[H],M=ne(T,D,P,k,F,n);if(M==null)return null;M.data&&r(M.data,"expectedType")&&G.push(M.data.expectedType)}var se=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new m("Invalid "+k+" `"+F+"` supplied to "+("`"+P+"`"+se+"."))}return b(R)}function V(){function v(w,S,R,T,D){return q(w[S])?null:new m("Invalid "+T+" `"+D+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return b(v)}function B(v,w,S,R,T){return new m((v||"React class")+": "+w+" type `"+S+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+T+"`.")}function W(v){function w(S,R,T,D,P){var k=S[R],F=ee(k);if(F!=="object")return new m("Invalid "+D+" `"+P+"` of type `"+F+"` "+("supplied to `"+T+"`, expected `object`."));for(var G in v){var H=v[G];if(typeof H!="function")return B(T,D,P,G,Y(H));var ne=H(k,G,T,D,P+"."+G,n);if(ne)return ne}return null}return b(w)}function J(v){function w(S,R,T,D,P){var k=S[R],F=ee(k);if(F!=="object")return new m("Invalid "+D+" `"+P+"` of type `"+F+"` "+("supplied to `"+T+"`, expected `object`."));var G=t({},S[R],v);for(var H in G){var ne=v[H];if(r(v,H)&&typeof ne!="function")return B(T,D,P,H,Y(ne));if(!ne)return new m("Invalid "+D+" `"+P+"` key `"+H+"` supplied to `"+T+"`.\nBad object: "+JSON.stringify(S[R],null," ")+`
41
+ Valid keys: `+JSON.stringify(Object.keys(v),null," "));var M=ne(k,H,T,D,P+"."+H,n);if(M)return M}return null}return b(w)}function q(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(q);if(v===null||i(v))return!0;var w=f(v);if(w){var S=w.call(v),R;if(w!==v.entries){for(;!(R=S.next()).done;)if(!q(R.value))return!1}else for(;!(R=S.next()).done;){var T=R.value;if(T&&!q(T[1]))return!1}}else return!1;return!0;default:return!1}}function Q(v,w){return v==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function ee(v){var w=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":Q(w,v)?"symbol":w}function Y(v){if(typeof v>"u"||v===null)return""+v;var w=ee(v);if(w==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return w}function ie(v){var w=Y(v);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function j(v){return!v.constructor||!v.constructor.name?p:v.constructor.name}return g.checkPropTypes=a,g.resetWarningCache=a.resetWarningCache,g.PropTypes=g,g},Kr}var Xr,Ko;function wu(){if(Ko)return Xr;Ko=1;var e=Ia();function t(){}function n(){}return n.resetWarningCache=t,Xr=function(){function r(s,i,l,u,d,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Xr}var Xo;function Qs(){if(Xo)return Kn.exports;if(Xo=1,process.env.NODE_ENV!=="production"){var e=Js(),t=!0;Kn.exports=xu()(e.isElement,t)}else Kn.exports=wu()();return Kn.exports}var Cu=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(r,a,o){n.o(r,a)||Object.defineProperty(r,a,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,a){if(1&a&&(r=n(r)),8&a||4&a&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&a&&typeof r!="string")for(var s in r)n.d(o,s,(function(i){return r[i]}).bind(null,s));return o},n.n=function(r){var a=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(a,"a",a),a},n.o=function(r,a){return Object.prototype.hasOwnProperty.call(r,a)},n.p="",n(n.s=2)}([function(e,t){e.exports=Qs()},function(e,t){e.exports=c},function(e,t,n){n.r(t);var r=n(1),a=n(0),o=function(){return(o=Object.assign||function(h){for(var m,b=1,y=arguments.length;b<y;b++)for(var E in m=arguments[b])Object.prototype.hasOwnProperty.call(m,E)&&(h[E]=m[E]);return h}).apply(this,arguments)},s=function(h,m){var b={};for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&m.indexOf(y)<0&&(b[y]=h[y]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var E=0;for(y=Object.getOwnPropertySymbols(h);E<y.length;E++)m.indexOf(y[E])<0&&Object.prototype.propertyIsEnumerable.call(h,y[E])&&(b[y[E]]=h[y[E]])}return b},i=0,l=r.forwardRef(function(h,m){var b=h.title,y=b===void 0?null:b,E=h.description,O=E===void 0?null:E,A=h.size,C=A===void 0?null:A,$=h.color,_=$===void 0?"currentColor":$,I=h.horizontal,L=I===void 0?null:I,V=h.vertical,B=V===void 0?null:V,W=h.rotate,J=W===void 0?null:W,q=h.spin,Q=q===void 0?null:q,ee=h.style,Y=ee===void 0?{}:ee,ie=h.children,j=s(h,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);i++;var v,w=Q!==null&&Q,S=r.Children.map(ie,function(P){var k=P;w!==!0&&(w=(Q===null?k.props.spin:Q)===!0);var F=k.props.size;typeof C=="number"&&typeof k.props.size=="number"&&(F=k.props.size/C);var G={size:F,color:_===null?k.props.color:_,horizontal:L===null?k.props.horizontal:L,vertical:B===null?k.props.vertical:B,rotate:J===null?k.props.rotate:J,spin:Q===null?k.props.spin:Q,inStack:!0};return r.cloneElement(k,G)});C!==null&&(Y.width=typeof C=="string"?C:1.5*C+"rem");var R,T="stack_labelledby_"+i,D="stack_describedby_"+i;if(y)v=O?T+" "+D:T;else if(R="presentation",O)throw new Error("title attribute required when description is set");return r.createElement("svg",o({ref:m,viewBox:"0 0 24 24",style:Y,role:R,"aria-labelledby":v},j),y&&r.createElement("title",{id:T},y),O&&r.createElement("desc",{id:D},O),w&&r.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }","@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"),S)});l.displayName="Stack",l.propTypes={size:a.oneOfType([a.number,a.string]),color:a.string,horizontal:a.bool,vertical:a.bool,rotate:a.number,spin:a.oneOfType([a.bool,a.number]),children:a.oneOfType([a.arrayOf(a.node),a.node]).isRequired,className:a.string,style:a.object},l.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var u=l;n.d(t,"Icon",function(){return g}),n.d(t,"Stack",function(){return u});var d=function(){return(d=Object.assign||function(h){for(var m,b=1,y=arguments.length;b<y;b++)for(var E in m=arguments[b])Object.prototype.hasOwnProperty.call(m,E)&&(h[E]=m[E]);return h}).apply(this,arguments)},f=function(h,m){var b={};for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&m.indexOf(y)<0&&(b[y]=h[y]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var E=0;for(y=Object.getOwnPropertySymbols(h);E<y.length;E++)m.indexOf(y[E])<0&&Object.prototype.propertyIsEnumerable.call(h,y[E])&&(b[y[E]]=h[y[E]])}return b},p=0,g=r.forwardRef(function(h,m){var b=h.path,y=h.id,E=y===void 0?++p:y,O=h.title,A=O===void 0?null:O,C=h.description,$=C===void 0?null:C,_=h.size,I=_===void 0?null:_,L=h.color,V=L===void 0?"currentColor":L,B=h.horizontal,W=B!==void 0&&B,J=h.vertical,q=J!==void 0&&J,Q=h.rotate,ee=Q===void 0?0:Q,Y=h.spin,ie=Y!==void 0&&Y,j=h.style,v=j===void 0?{}:j,w=h.inStack,S=w!==void 0&&w,R=f(h,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),T={},D=[];I!==null&&(S?D.push("scale("+I+")"):(v.width=typeof I=="string"?I:1.5*I+"rem",v.height=v.width)),W&&D.push("scaleX(-1)"),q&&D.push("scaleY(-1)"),ee!==0&&D.push("rotate("+ee+"deg)"),V!==null&&(T.fill=V);var P=r.createElement("path",d({d:b,style:T},S?R:{})),k=P;D.length>0&&(v.transform=D.join(" "),v.transformOrigin="center",S&&(k=r.createElement("g",{style:v},P,r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var F,G=k,H=ie===!0||typeof ie!="number"?2:ie,ne=!S&&(W||q);if(H<0&&(ne=!ne),ie&&(G=r.createElement("g",{style:{animation:"spin"+(ne?"-inverse":"")+" linear "+Math.abs(H)+"s infinite",transformOrigin:"center"}},k,!(W||q||ee!==0)&&r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),S)return G;var M,se="icon_labelledby_"+E,fe="icon_describedby_"+E;if(A)F=$?se+" "+fe:se;else if(M="presentation",$)throw new Error("title attribute required when description is set");return r.createElement("svg",d({ref:m,viewBox:"0 0 24 24",style:v,role:M,"aria-labelledby":F},R),A&&r.createElement("title",{id:se},A),$&&r.createElement("desc",{id:fe},$),!S&&ie&&(ne?r.createElement("style",null,"@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"):r.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }")),G)});g.displayName="Icon",g.propTypes={path:a.string.isRequired,size:a.oneOfType([a.number,a.string]),color:a.string,horizontal:a.bool,vertical:a.bool,rotate:a.number,spin:a.oneOfType([a.bool,a.number]),style:a.object,inStack:a.bool,className:a.string},g.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=g}]);const Pe=qs(Cu);var Eu="M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z",Su="M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z",Au="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",el="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",tl="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",nl="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",$u="M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z",Ou="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z",_u="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22H9M11,6V9H8V11H11V14H13V11H16V9H13V6H11Z",Tu="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",rl="M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z",Ru="M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z",Iu="M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z",Mu="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",Du="M23 16V15.5A2.5 2.5 0 0 0 18 15.5V16A1 1 0 0 0 17 17V21A1 1 0 0 0 18 22H23A1 1 0 0 0 24 21V17A1 1 0 0 0 23 16M22 16H19V15.5A1.5 1.5 0 0 1 22 15.5M7 8.9H11V7H7A5 5 0 0 0 7 17H11V15.1H7A3.1 3.1 0 0 1 7 8.9M8 11V13H16V11M13 15.1V17H15V15.1M17 7H13V8.9H17A3.09 3.09 0 0 1 19.94 11A5.12 5.12 0 0 1 20.5 11H21.9A5 5 0 0 0 17 7Z",ju="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",Pu="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",ku="M18 21L14 17H17V7H14L18 3L22 7H19V17H22M2 19V17H12V19M2 13V11H9V13M2 7V5H6V7H2Z",Nu="M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z",al="M12.35 20H10V17H12.09C12.21 16.28 12.46 15.61 12.81 15H10V12H14V13.54C14.58 13 15.25 12.61 16 12.35V12H20V12.35C20.75 12.61 21.42 13 22 13.54V5C22 3.9 21.1 3 20 3H4C2.9 3 2 3.9 2 5V20C2 21.1 2.9 22 4 22H13.54C13 21.42 12.61 20.75 12.35 20M16 7H20V10H16V7M10 7H14V10H10V7M8 20H4V17H8V20M8 15H4V12H8V15M8 10H4V7H8V10M17 14H19V17H22V19H19V22H17V19H14V17H17V14",Hu="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",Lu="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z";function Fu(e,t){c.useEffect(()=>{function n(r){Array.isArray(e)?e.every(o=>{var s;return!((s=o.current)!=null&&s.contains(r.target))})&&r.target&&t():e.current&&r.target&&!e.current.contains(r.target)&&t()}return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])}var Je=(e=>(e.STRING="string",e.NUMBER="number",e))(Je||{});function je(e){const t=c.useMemo(()=>e.iconSize?e.iconSize:e.small?.8:1,[e.iconSize,e.small]),n=x.jsxs("button",{type:e.type??"button",id:e.id,className:`btn ${e.className??""} ${e.ghost?" btn-ghost":""} ${e.small?"btn-xs":"btn-sm"} content-center ${e.circle?"btn-circle":""}`,onClick:e.onClick,disabled:e.disabled===!0,children:[e.icon&&x.jsx(Pe,{path:e.icon??"",color:e.disabled?e.iconColorDisabled??"lightgrey":e.iconColor,size:t}),e.text&&x.jsx("div",{className:`text-${e.small?"xs":"sm"}`,children:e.text})]});return x.jsx(x.Fragment,{children:e.tooltip?x.jsx("div",{className:`tooltip ${e.tooltipRight?"tooltip-right":"tooltip-top"} tooltip-top before:whitespace-pre-wrap text-left`,"data-tip":`${e.tooltip}`,children:n}):n})}const qo=e=>{let t;const n=new Set,r=(u,d)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const p=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(g=>g(t,p))}},a=()=>t,i={setState:r,getState:a,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,a,i);return i},Bu=e=>e?qo(e):qo,zu=e=>e;function Gu(e,t=zu){const n=c.useSyncExternalStore(e.subscribe,c.useCallback(()=>t(e.getState()),[e,t]),c.useCallback(()=>t(e.getInitialState()),[e,t]));return c.useDebugValue(n),n}const Jo=e=>{const t=Bu(e),n=r=>Gu(t,r);return Object.assign(n,t),n},vt=e=>e?Jo(e):Jo,Vu=e=>e.every(t=>typeof t=="number"),ol=(e,t)=>e<t?-1:e>t?1:0,Uu=(e,t)=>e>t?-1:e<t?1:0,il=" ",Wu=(e,t)=>{const n=JSON.parse(JSON.stringify(e));return e.length===0?[]:t.length===0?n:n.filter(r=>{for(const a of t){let o=r[a.headerId],s=!1;if(Vu(a.itemsToHide)?(o=typeof o=="string"?o.split(il).join(""):o,s=a.itemsToHide.includes(Number(o))):a.itemsToHide.includes(o)&&(s=!0),s)return!1}return!0})},Yu=(e,t,n,r)=>{const a=[...e];if(!r)return a;const o=t.find(i=>i.id===r);if(o!=null&&o.customSort)return a.sort((i,l)=>o.customSort(i,l,n==="asc")),a;let s=!0;return a.forEach(i=>{var f;const l=(f=i[r])==null?void 0:f.toString();if(!l)return;const u=qr(l),d=["NaN"];isNaN(u)&&!d.includes(l)&&(s=!1)}),s?(a.sort((i,l)=>{const u=qr(i[r]),d=qr(l[r]),f=typeof u=="number"&&!isNaN(u),p=typeof d=="number"&&!isNaN(d);return f&&!p?-1:!f&&p?1:n==="desc"?d-u:u-d}),a):(n==="desc"?a.sort((i,l)=>ol(l[r],i[r])):a.sort((i,l)=>Uu(l[r],i[r])),a)},qr=e=>typeof e=="number"?e:typeof e=="string"?Number(e.split(il).join("")):e,ye=vt((e,t)=>({items:[],headers:[],hiddenHeadersId:[],processedHeaders:[],leafHeaders:[],processedLeafHeaders:[],processedItems:[],activeFilters:[],filterItemsCache:{},ascendingOrder:!0,comments:[],highlightConditions:[],advancedSetting:void 0,groupBy:void 0,linkedGroups:void 0,collapsedGroups:[],actions:{setItems:n=>{e({items:n})},setHeaders:n=>{const r=ha(n);e({headers:n,leafHeaders:r})},setHiddenHeadersId:n=>{e({hiddenHeadersId:n})},setActiveFilter:(n,r,a)=>{const{activeFilters:o}=t(),s=[...o],i=s.findIndex(l=>l.headerId===n);i!==-1?r.length>0?s[i]={headerId:n,itemsToHide:r,numberConditions:a}:s.splice(i,1):r.length>0&&s.push({headerId:n,itemsToHide:r,numberConditions:a}),e({activeFilters:s})},clearActiveFilters:()=>{e({activeFilters:[]})},onResetSort:()=>{e({currentSortId:void 0,ascendingOrder:!0})},onSortByColumn:n=>{const{currentSortId:r,ascendingOrder:a}=t();if(!(n!=null&&n.sortable))return;let o;r===n.id?o=!a:o=!0,e({currentSortId:n.id,ascendingOrder:o})},processItems:()=>{const{items:n,activeFilters:r,headers:a,currentSortId:o,ascendingOrder:s}=t();let i=[...n];r.length>0&&(i=Ku(i,r)),o&&(i=Xu(i,a,s,o)),e({processedItems:i})},processHeaders:()=>{const{headers:n,hiddenHeadersId:r}=t(),a=new Map,o=(d,f)=>{for(const p of d)f&&a.set(p.id,f),p.children&&p.children.length>0&&o(p.children,p.id)};o(n);const s=d=>{if(r.includes(d))return!0;let f=d;for(;a.has(f);)if(f=a.get(f),r.includes(f))return!0;return!1},i=d=>d.filter(f=>!s(f.id)).map(f=>f.children&&f.children.length>0?{...f,children:i(f.children)}:f),l=i(n),u=ha(l);e({processedHeaders:l,processedLeafHeaders:u})},processFilterItemsCache:()=>{const{processedItems:n,activeFilters:r,leafHeaders:a}=t(),o={};a.forEach(s=>{let i=n.map(u=>u[s.id]);const l=r.find(u=>u.headerId===s.id);l&&(i=i.concat(l.itemsToHide)),o[s.id]=[...new Set(i)].filter(u=>typeof u=="string"||typeof u=="number")}),e({filterItemsCache:o})},setGroupBy:n=>{e({groupBy:n})},setLinkedGroups:n=>{e({linkedGroups:n})},collapseGroup:n=>{const{collapsedGroups:r}=t(),o=r.includes(n)?r.filter(s=>s!==n):[...r,n];e({collapsedGroups:o})},setCollapsedGroups:n=>{e({collapsedGroups:n})},setComments:n=>{e({comments:n})},setHighlightConditions:n=>{e({highlightConditions:n})},setAdvancedSettings:n=>{e({advancedSetting:n})}}}));function ha(e){return e.flatMap(t=>t.children&&t.children.length>0?ha(t.children):[t])}function Ku(e,t){return Wu(e,t)}function Xu(e,t,n,r){return Yu(e,t,n?"asc":"desc",r)}const sl=()=>ye(e=>e.headers),ll=()=>ye(e=>e.hiddenHeadersId),qu=()=>ye(e=>e.processedHeaders),xr=()=>ye(e=>e.processedLeafHeaders),cl=()=>ye(e=>e.items),ul=()=>ye(e=>e.filterItemsCache),wr=()=>ye(e=>e.processedItems),dl=()=>ye(e=>e.currentSortId),Ma=()=>ye(e=>e.ascendingOrder),Dn=()=>ye(e=>e.activeFilters),mt=()=>ye(e=>e.advancedSetting),fl=()=>ye(e=>e.comments),hl=()=>ye(e=>e.highlightConditions),Cr=()=>ye(e=>e.groupBy),Ju=()=>ye(e=>e.linkedGroups),pl=()=>ye(e=>e.collapsedGroups),bt=()=>ye(e=>e.actions);function Zu(e){const{setActiveFilter:t}=bt(),n=Dn(),r=c.useMemo(()=>n.find(h=>h.headerId===e.headerId),[n,e.headerId]),[a,o]=c.useState(""),[s,i]=c.useState([]);c.useEffect(()=>{i((r==null?void 0:r.itemsToHide)??[])},[r==null?void 0:r.itemsToHide]);const l=c.useMemo(()=>{let h=[];return a?(h=[...e.items].filter(m=>m==null?void 0:m.toString().toLocaleLowerCase().includes(a==null?void 0:a.toString().toLocaleLowerCase())),e.filterType===Je.STRING&&(h=h.sort(ol)),h):[...e.items]},[a,e.items]),u=h=>{h.preventDefault(),a&&t(e.headerId,[a])},d=()=>{i([...e.items])},f=()=>{i([])},p=h=>{const m=s.findIndex(y=>y===h);let b=[...s];m!==void 0&&(m===-1?b=[...b,h]:b.splice(m,1),i(b))},g=()=>{const h=l.filter(b=>!s.includes(b)),m=[...e.items].filter(b=>!h.includes(b));t(e.headerId,m.map(b=>b))};return x.jsxs("div",{children:[x.jsx("div",{className:"font-semibold text-sm mb-1",children:"Filter by value:"}),x.jsxs("form",{onSubmit:u,children:[x.jsx("input",{type:"text",value:a,onChange:h=>o(h==null?void 0:h.target.value),placeholder:"Search...",className:"input input-bordered input-xs w-full max-w-xs"}),x.jsx("input",{type:"submit",value:""})]}),x.jsxs("div",{className:"flex text-xs mt-1 font-semibold text-primary",children:[x.jsx("button",{onClick:f,onFocus:()=>{},className:"mr-4 cursor-pointer hover:border-none! border-none! focus:outline-hidden! bg-transparent btn-sm",children:"Select All"}),x.jsx("button",{onClick:d,onFocus:()=>{},className:"cursor-pointer hover:border-none! border-none! focus:outline-hidden! bg-transparent btn-sm",children:"Clear"})]}),x.jsx("div",{className:"overflow-auto max-h-44 mt-2",style:{scrollbarWidth:"thin"},children:l.map((h,m)=>x.jsxs("div",{className:"flex mt-2",children:[x.jsx("input",{type:"checkbox",onClick:()=>p(h),readOnly:!0,checked:!s.includes(h),className:"mr-2 "}),x.jsx("p",{className:"text-xs",children:(h==null?void 0:h.toString())||x.jsx("span",{className:"italic",children:"(Blanks)"})})]},`filter-item-${h}-${m}`))}),x.jsxs("div",{className:"flex float-end mt-2",children:[x.jsx(je,{onClick:()=>{g(),e.onShowOrHide(!1)},text:"OK",iconColor:"#6161bb",small:!0}),x.jsx(je,{className:"ml-1",onClick:()=>e.onShowOrHide(!1),text:"Cancel",iconColor:"#6161bb",small:!0})]})]})}function Zo(e){const[t,n]=c.useState(e.numberCondition.value1),[r,a]=c.useState(e.numberCondition.value2??0),o=c.useCallback((i,l)=>{e.updateCondition({id:e.numberCondition.id,operator:e.numberCondition.operator,value1:i==="value1"?l:e.numberCondition.value1,value2:i==="value2"?l:e.numberCondition.value2})},[e.numberCondition.id,e.numberCondition.operator]),s=(i,l)=>{i==null||i.preventDefault(),i==null||i.stopPropagation(),e.deleteCondition&&e.deleteCondition(l)};return x.jsxs("div",{className:"flex items-center gap-1 group",children:[x.jsxs("select",{value:e.numberCondition.operator,onChange:i=>e.updateCondition({id:e.numberCondition.id,operator:i.target.value,value1:e.numberCondition.value1,value2:e.numberCondition.value2}),className:" select select-xs px-1 grow",children:[x.jsx("option",{value:"=",children:"Equal"}),x.jsx("option",{value:">",children:"Greater than"}),x.jsx("option",{value:"<",children:"Less than"}),x.jsx("option",{value:">=",children:">="}),x.jsx("option",{value:"<=",children:"<="}),x.jsx("option",{value:"between",children:"Between"})]}),x.jsx("input",{type:"number",value:t,onChange:i=>{n(parseFloat(i.target.value)||0),e.immediatApply&&o("value1",parseFloat(i.target.value)||0)},onBlur:i=>o("value1",parseFloat(i.target.value)||0),className:"input input-xs w-12",step:"any"}),e.numberCondition.operator==="between"&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"text-xs font-semibold",children:"-"}),x.jsx("input",{type:"number",value:r,onChange:i=>{a(parseFloat(i.target.value)),e.immediatApply&&o("value2",parseFloat(i.target.value))},onBlur:i=>o("value2",parseFloat(i.target.value)),className:"input input-xs w-12",step:"any"})]}),e.isNew?x.jsx(x.Fragment,{}):x.jsx("button",{onClick:i=>s(i,e.numberCondition),className:"rounded bg-gray-200 p-0.5 cursor-pointer hover:bg-gray-300",children:x.jsx(Pe,{path:Tu,color:"#d11f1f",size:.7})})]},e.numberCondition.id)}function Qu(e){var h,m;const{setActiveFilter:t}=bt(),n=Dn(),r=c.useMemo(()=>n.find(b=>b.headerId===e.headerId),[n,e.headerId]),[a,o]=c.useState([]);c.useEffect(()=>{r!=null&&r.numberConditions&&o(r==null?void 0:r.numberConditions)},[r]),c.useEffect(()=>{u()},[a]);const[s,i]=c.useState({id:Date.now().toString()+Math.random().toString(36).substring(2),operator:"=",value1:0}),l=c.useMemo(()=>e.items.map(b=>typeof b=="string"?parseFloat(b):b).filter(b=>!isNaN(b)),[e.items]),u=c.useCallback(()=>{const b=e.items.filter((y,E)=>{const O=l[E];return typeof O!="number"?!0:a.some(A=>{switch(A.operator){case"=":return O!==A.value1;case">":return O<=A.value1;case"<":return O>=A.value1;case">=":return O<A.value1;case"<=":return O>A.value1;case"between":return A.value2===void 0?!0:O<A.value1||O>A.value2}})});e.items.length>0&&e.items[0],t(e.headerId,b,a)},[e.items,e.headerId,a,l,t]),d=b=>{b==null||b.preventDefault(),b==null||b.stopPropagation(),o(y=>[...y,s]),i({id:Date.now().toString(),operator:"=",value1:0})},f=(b,y)=>{o(E=>E.map(O=>O.id===b?{...O,...y}:O))},p=b=>{const y=a.filter(E=>E.id!==b);o(y)},g=()=>{o([]),t(e.headerId,[],[])};return x.jsxs("form",{onSubmit:d,className:"space-y-4",children:[x.jsxs("div",{className:"bg-blue-50/70 p-2 rounded-md",children:[x.jsx(Zo,{numberCondition:s,updateCondition:b=>i(b),isNew:!0,immediatApply:!0}),x.jsx("div",{className:"flex items-center gap-2 mt-2",children:x.jsx(je,{text:"Add Condition",type:"button",onClick:d,small:!0,className:"rounded-lg p-2 py-0",icon:Pu,iconColor:"var(--comment-color)",iconSize:.7})})]}),x.jsx("div",{className:"mt-4",children:(h=r==null?void 0:r.numberConditions)==null?void 0:h.map((b,y)=>x.jsx("div",{className:"mb-1",children:x.jsx(Zo,{numberCondition:b,updateCondition:E=>f(E.id,E),deleteCondition:()=>p(b.id),isNew:!1})},"condition-"+y))}),x.jsx("div",{className:"flex justify-end gap-2 mt-8",children:x.jsx(je,{text:"Clear filter",disabled:!(r!=null&&r.numberConditions)||((m=r==null?void 0:r.numberConditions)==null?void 0:m.length)===0,onClick:g,small:!0})})]})}function ed(e){const[t,n]=c.useState(!1),r=c.useRef(null);c.useEffect(()=>{var u,d;if(e.show&&r.current){const f=r.current.getBoundingClientRect(),p=(d=(u=e.tableRef)==null?void 0:u.current)==null?void 0:d.getBoundingClientRect(),g=(p==null?void 0:p.width)??0,h=f.width+f.x>g;n(h)}else n(!1)},[e.show]),Fu([e.wrapperRef,r],()=>{e.show&&e.onShowOrHide(!1)});const[a,o]=c.useState();c.useEffect(()=>{if(e.show&&e.filterButtonRef.current){const u=e.filterButtonRef.current.getBoundingClientRect();o({top:u.bottom+window.scrollY,left:u.left+window.scrollX})}},[e.show]);const i=(u=>{switch(u){case Je.NUMBER:return Qu;case Je.STRING:default:return Zu}})(e.filterType),l=e.show&&a?hu.createPortal(x.jsx("div",{ref:r,className:`fixed mt-1 bg-white shadow p-3 w-60 z-300 rounded-md font-normal border border-gray-300 ${t?"right-0":""}`,style:{top:`${a.top}px`,left:`${a.left}px`},children:x.jsx(i,{headerId:e.headerId,filterType:e.filterType,items:e.items,onShowOrHide:e.onShowOrHide})}),document.body):null;return x.jsx("div",{children:e.show?l:""})}function td(e){const t=c.useRef(null),n=c.useRef(null);return x.jsxs("div",{ref:t,className:"relative",children:[x.jsx("button",{ref:n,onClick:()=>e.onShowOrHide(!e.show),className:`border-solid border hover:!border-primary cursor-pointer border-gray-300 rounded focus:outline-hidden! ${e.currentFilter?"bg-purple-800":"bg-white"} `,children:x.jsx(Pe,{path:Ru,color:e.currentFilter?"white":"grey",size:.6})}),x.jsx(ed,{...e,filterButtonRef:n,wrapperRef:t})]})}const gl=vt(e=>({contextMenu:void 0,actions:{setContextMenu:t=>e({contextMenu:t})}})),nd=()=>gl(e=>e.contextMenu),Da=()=>gl(e=>e.actions),xn={LIST:"list",NUMBER:"number"},rd=c.memo(e=>{var g;const t=dl(),n=Dn(),r=ul(),a=mt(),o=Ma(),{setContextMenu:s}=Da(),{setActiveFilter:i,onResetSort:l,onSortByColumn:u}=bt(),d=h=>r[h]??[],f=h=>{if(n)return n.find(m=>m.headerId===h)},p=(h,m)=>{var O;if((O=h.editOptions)!=null&&O.type)switch(h.editOptions.type){case xn.NUMBER:return Je.NUMBER;default:return Je.STRING}const b=[];let y=0;for(;b.length<10&&y<m.length;){const A=m[y];A!=null&&b.push(A),y++}return b.length===0?Je.STRING:b.every(A=>typeof A=="number"?!0:typeof A=="string"?!isNaN(Number(A))&&A.trim()!=="":!1)?Je.NUMBER:Je.STRING};return x.jsx("th",{colSpan:e.colSpan,rowSpan:e.rowSpan,className:`${a!=null&&a.noBorder?"":"border-solid border-b border-r border-gray-300! bg-gray-50"}`,style:{...e.style},onContextMenu:h=>{h.preventDefault(),s({x:h.clientX,y:h.clientY,header:e.header})},children:x.jsxs("div",{style:{width:e.header.width?`${e.header.width}px`:"auto"},className:"flex justify-between",children:[x.jsxs("div",{className:"flex",children:[e.header.customHeader?e.header.customHeader(e.header):x.jsx("button",{onClick:()=>u==null?void 0:u(e.header),className:`font-semibold bg-transparent text-left text-slate-600 text-xs border-none outline-hidden! whitespace-pre ${e.header.sortable?"cursor-pointer hover:underline":"cursor-default"}`,children:e.header.text}),t===e.header.id&&x.jsxs(x.Fragment,{children:[x.jsx(Pe,{path:o?Su:Eu,color:"grey",size:.6}),x.jsx("button",{onClick:l,className:`border-solid border bg-slate-300 hover:bg-slate-400! hover:border-transparent cursor-pointer rounded-lg h-min focus:outline-hidden!
42
+ `,children:x.jsx(Pe,{path:$u,color:"grey",size:.6})})]})]}),e.header.hasFilter?x.jsx("div",{className:"ml-2",children:x.jsx(td,{show:e.showFilter,tableRef:e.tableRef,currentFilter:f(e.header.id),filterName:e.header.text,headerId:e.header.id,filterType:p(e.header,d(e.header.id)),items:d(e.header.id),itemsToHide:((g=n==null?void 0:n.find(h=>h.headerId===e.header.id))==null?void 0:g.itemsToHide)??[],onShowOrHide:h=>e.onShowFilter(h,e.header.id),onSetFilter:i})}):x.jsx(x.Fragment,{})]})},e.header.id+`-${e.index}`)});function ad(e){const[t,n]=c.useState(""),r=c.useRef([]),[a,o]=c.useState([]);c.useLayoutEffect(()=>{const p=r.current.map(g=>(g==null?void 0:g.getBoundingClientRect().height)||0);o(p)},[e.headers]);const s=(p,g)=>{if(!p){n("");return}n(g)},i=c.useMemo(()=>{function p(g){return g.reduce((h,m)=>m.children&&m.children.length>0?Math.max(h,1+p(m.children)):Math.max(h,1),0)}return p(e.headers)},[e.headers]),l=c.useCallback(p=>p.children&&p.children.length>0?p.children.reduce((g,h)=>g+l(h),0):1,[]);function u(p,g,h=0){const m=f(p,g,h),b=p.filter(y=>y.children&&y.children.length>0).map(y=>y.children).flat();return b.length>0?[m,...u(b,g,h+1)]:[m]}const d=c.useMemo(()=>{const p=f(e.headers,i,0),g=e.headers.filter(h=>h.children&&h.children.length>0).map(h=>h.children).flat();return g.length>0?[p,...u(g,i,1)]:[p]},[e.headers,t,a]);function f(p,g,h=0){return p.length===0?null:x.jsx("tr",{ref:m=>{r.current[h]=m},style:{zIndex:100-h},children:p.map((m,b)=>{const y=l(m),O=m.children&&m.children.length>0?1:g-h,A=a.slice(0,h).reduce((C,$)=>C+$,0);return x.jsx(rd,{header:m,colSpan:y,rowSpan:O,index:b,showFilter:t===m.id,onShowFilter:s,style:{position:"sticky",top:`${A}px`}})})},`header-row-${h}`)}return x.jsx("thead",{className:"relative",children:d})}function vl(){const e=pl(),t=Ju(),n=Cr(),r=wr(),a=c.useMemo(()=>{if(!n)return{"":r.map((g,h)=>({rowIndex:h,item:g}))};const u=r.reduce((p,g)=>{const h=g[n];return p[h]||(p[h]=[]),p[h].push({rowIndex:0,item:g}),p},{});let d=0;const f={};return Object.keys(u).forEach(p=>{f[p]=u[p].map(({item:g})=>({rowIndex:d++,item:g}))}),f},[r,n]),o=c.useMemo(()=>{const u=Object.entries(a);if(!t||t.length===0)return u;const d=new Set(t.map(y=>y.master)),f=new Set(t.flatMap(y=>y.linked)),p=new Map(t.map(y=>[y.master,y.linked])),g=new Set,h=[],m=new Map(u.map(y=>[y[0],y]));for(const[y,E]of u)if(!g.has(y))if(d.has(y)){h.push([y,E]),g.add(y);const O=p.get(y)||[];for(const A of O){const C=m.get(A);C&&!g.has(A)&&(h.push(C),g.add(A))}}else{if(f.has(y))continue;h.push([y,E]),g.add(y)}let b=0;return h.map(([y,E])=>{const O=E.map(({item:A})=>({rowIndex:b++,item:A}));return[y,O]})},[a,t]),s=c.useMemo(()=>u=>{var d;return(d=t==null?void 0:t.find(f=>f.linked.includes(u)))==null?void 0:d.master},[t]),i=c.useMemo(()=>{const u=[];return o.forEach(([d,f])=>{var g;const p=(e==null?void 0:e.includes(d))??!1;u.push({isGroup:!0,groupName:d,isCollapsed:p,masterGroupName:s(d),linkedGroupNames:(g=t==null?void 0:t.find(h=>h.master===d))==null?void 0:g.linked}),f.forEach(({rowIndex:h,item:m})=>{u.push({isGroup:!1,rowIndex:h,groupName:d,isCollapsed:p,item:m})})}),u},[o,e]),l=c.useMemo(()=>u=>!!(t!=null&&t.some(d=>d.linked.includes(u))),[t]);return{groupedItemsEntries:o,flatGroupedItems:i,isGroupLinked:l,getMasterGroupNameLinked:s}}function Tt(e,t,n){let r=n.initialDeps??[],a;function o(){var s,i,l,u;let d;n.key&&((s=n.debug)!=null&&s.call(n))&&(d=Date.now());const f=e();if(!(f.length!==r.length||f.some((h,m)=>r[m]!==h)))return a;r=f;let g;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(g=Date.now()),a=t(...f),n.key&&((l=n.debug)!=null&&l.call(n))){const h=Math.round((Date.now()-d)*100)/100,m=Math.round((Date.now()-g)*100)/100,b=m/16,y=(E,O)=>{for(E=String(E);E.length<O;)E=" "+E;return E};console.info(`%c⏱ ${y(m,5)} /${y(h,5)} ms`,`
48
43
  font-size: .6rem;
49
44
  font-weight: bold;
50
- color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(u=r==null?void 0:r.onChange)==null||u.call(r,a),a}return i.updateDeps=o=>{n=o},i}function nr(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Ol=(e,t)=>Math.abs(e-t)<1.01,Tl=(e,t,r)=>{let n;return function(...a){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,a),r)}},ba=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Al=e=>e,Rl=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let a=t;a<=r;a++)n.push(a);return n},Ml=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const a=o=>{const{width:s,height:l}=o;t({width:Math.round(s),height:Math.round(l)})};if(a(ba(r)),!n.ResizeObserver)return()=>{};const i=new n.ResizeObserver(o=>{const s=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){a({width:u.inlineSize,height:u.blockSize});return}}a(ba(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(r,{box:"border-box"}),()=>{i.unobserve(r)}},ma={passive:!0},ya=typeof window>"u"?!0:"onscrollend"in window,Pl=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let a=0;const i=e.options.useScrollendEvent&&ya?()=>{}:Tl(n,()=>{t(a,!1)},e.options.isScrollingResetDelay),o=f=>()=>{const{horizontal:d,isRtl:p}=e.options;a=d?r.scrollLeft*(p&&-1||1):r.scrollTop,i(),t(a,f)},s=o(!0),l=o(!1);l(),r.addEventListener("scroll",s,ma);const u=e.options.useScrollendEvent&&ya;return u&&r.addEventListener("scrollend",l,ma),()=>{r.removeEventListener("scroll",s),u&&r.removeEventListener("scrollend",l)}},jl=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},Il=(e,{adjustments:t=0,behavior:r},n)=>{var a,i;const o=e+t;(i=(a=n.scrollElement)==null?void 0:a.scrollTo)==null||i.call(a,{[n.options.horizontal?"left":"top"]:o,behavior:r})};class kl{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(a=>{a.forEach(i=>{const o=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var a;(a=n())==null||a.disconnect(),r=null},observe:a=>{var i;return(i=n())==null?void 0:i.observe(a,{box:"border-box"})},unobserve:a=>{var i;return(i=n())==null?void 0:i.unobserve(a)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,a])=>{typeof a>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Al,rangeExtractor:Rl,onChange:()=>{},measureElement:jl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,a;(a=(n=this.options).onChange)==null||a.call(n,this,r)},this.maybeNotify=Je(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const a=new Map,i=new Map;for(let o=n-1;o>=0;o--){const s=r[o];if(a.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&a.set(s.lane,!0),a.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Je(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,n,a,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Je(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let f=l;f<r;f++){const d=i(f),p=this.options.lanes===1?u[f-1]:this.getFurthestMeasurement(u,f),v=p?p.end+this.options.gap:n+a,h=s.get(d),m=typeof h=="number"?h:this.options.estimateSize(f),b=v+m,x=p?p.lane:f%this.options.lanes;u[f]={index:f,start:v,size:m,end:b,key:d,lane:x}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Je(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,a,i)=>this.range=r.length>0&&n>0?Fl({measurements:r,outerSize:n,scrollOffset:a,lanes:i}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Je(()=>{let r=null,n=null;const a=this.calculateRange();return a&&(r=a.startIndex,n=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,a,i,o)=>i===null||o===null?[]:r({startIndex:i,endIndex:o,overscan:n,count:a}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,a=r.getAttribute(n);return a?parseInt(a,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{const a=this.indexFromElement(r),i=this.measurementsCache[a];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==r&&(s&&this.observer.unobserve(s),this.observer.observe(r),this.elementsCache.set(o,r)),r.isConnected&&this.resizeItem(a,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{const a=this.measurementsCache[r];if(!a)return;const i=this.itemSizeCache.get(a.key)??a.size,o=n-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,o,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,n)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((n,a)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(a))});return}this._measureElement(r,void 0)},this.getVirtualItems=Je(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const a=[];for(let i=0,o=r.length;i<o;i++){const s=r[i],l=n[s];a.push(l)}return a},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return nr(n[so(0,n.length-1,a=>nr(n[a]).start,r)])},this.getOffsetForAlignment=(r,n,a=0)=>{const i=this.getSize(),o=this.getScrollOffset();n==="auto"&&(n=r>=o+i?"end":"start"),n==="center"?r+=(a-i)/2:n==="end"&&(r-=i);const s=this.getTotalSize()+this.options.scrollMargin-i;return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const a=this.measurementsCache[r];if(!a)return;const i=this.getSize(),o=this.getScrollOffset();if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];const s=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,n,a.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(r,{align:n="start",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:a})},this.scrollToIndex=(r,{align:n="auto",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r=Math.max(0,Math.min(r,this.options.count-1));let i=0;const o=10,s=u=>{if(!this.targetWindow)return;const f=this.getOffsetForIndex(r,u);if(!f){console.warn("Failed to get offset for index:",r);return}const[d,p]=f;this._scrollToOffset(d,{adjustments:void 0,behavior:a}),this.targetWindow.requestAnimationFrame(()=>{const v=this.getScrollOffset(),h=this.getOffsetForIndex(r,p);if(!h){console.warn("Failed to get offset for index:",r);return}Ol(h[0],v)||l(p)})},l=u=>{this.targetWindow&&(i++,i<o?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",i,o),this.targetWindow.requestAnimationFrame(()=>s(u))):console.warn(`Failed to scroll to index ${r} after ${o} attempts.`))};s(n)},this.scrollBy=(r,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let a;if(n.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((r=n[n.length-1])==null?void 0:r.end)??0;else{const i=Array(this.options.lanes).fill(null);let o=n.length-1;for(;o>=0&&i.some(s=>s===null);){const s=n[o];i[s.lane]===null&&(i[s.lane]=s.end),o--}a=Math.max(...i.filter(s=>s!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:a})=>{this.options.scrollToFn(r,{behavior:a,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const so=(e,t,r,n)=>{for(;e<=t;){const a=(e+t)/2|0,i=r(a);if(i<n)e=a+1;else if(i>n)t=a-1;else return a}return e>0?e-1:0};function Fl({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const a=e.length-1,i=l=>e[l].start;if(e.length<=n)return{startIndex:0,endIndex:a};let o=so(0,a,i,r),s=o;if(n===1)for(;s<a&&e[s].end<r+t;)s++;else if(n>1){const l=Array(n).fill(0);for(;s<a&&l.some(f=>f<r+t);){const f=e[s];l[f.lane]=f.end,s++}const u=Array(n).fill(r+t);for(;o>=0&&u.some(f=>f>=r);){const f=e[o];u[f.lane]=f.start,o--}o=Math.max(0,o-o%n),s=Math.min(a,s+(n-1-s%n))}return{startIndex:o,endIndex:s}}const xa=typeof document<"u"?rr.useLayoutEffect:rr.useEffect;function Ll(e){const t=rr.useReducer(()=>({}),{})[1],r={...e,onChange:(a,i)=>{var o;i?Ps.flushSync(t):t(),(o=e.onChange)==null||o.call(e,a,i)}},[n]=rr.useState(()=>new kl(r));return n.setOptions(r),xa(()=>n._didMount(),[]),xa(()=>n._willUpdate()),n}function Dl(e){return Ll({observeElementRect:Ml,observeElementOffset:Pl,scrollToFn:Il,...e})}const Nl=20,Hl=6,Bl=({rowsCount:e,scrollRef:t})=>{const r=Dl({count:e,getScrollElement:()=>t.current,estimateSize:()=>Nl,overscan:Hl}),n=r.getVirtualItems(),[a,i]=n.length>0?[nr(n[0]).start-r.options.scrollMargin,r.getTotalSize()-nr(n[n.length-1]).end]:[0,0];return{virtualRows:n,before:a,after:i}};function zl(e){return y.jsx("tr",{className:"bg-[#C294E910]",children:e.groupByCustomRender?e.groupByCustomRender(e.groupBy,e.groupName):y.jsx("td",{colSpan:e.colSpan,className:"font-semibold",children:y.jsxs("div",{className:"flex align-center items-center",children:[y.jsx(Re,{id:e.groupName,onClick:()=>e.onCollapseGroup(e.groupName),className:"mb-1 h-5 min-h-5 mx-4 bg-[#DADADA] border-none",iconSize:1,small:!0,circle:!0,icon:e.isCollapsed?Bs:Hs},e.groupName),y.jsx("div",{className:"ml-2",children:e.groupName}),y.jsxs("div",{className:"ml-8",children:[e.masterGroupName&&y.jsxs("div",{className:"flex font-normal text-white bg-[#a0a0a0] rounded-2xl px-3",children:[y.jsx(Ie,{path:Zs,color:"white",size:.8}),y.jsx("div",{className:"ml-2",children:y.jsx("span",{className:"ml-1",children:"Linked"})})]}),e.linkedGroupNames&&e.linkedGroupNames.length>0&&y.jsxs("div",{className:"flex font-normal text-white bg-[#6B21A8] rounded-2xl px-3",children:[y.jsx(Ie,{path:Xs,color:"white",size:.8}),y.jsxs("div",{className:"ml-2",children:[y.jsx("span",{className:"font-bold",children:e.linkedGroupNames.length}),y.jsx("span",{className:"ml-1",children:" linked groups"})]})]})]})]})})})}const Gl={position:"fixed",zIndex:1e3,background:"#fff",border:"1px solid #ccc",borderRadius:4,boxShadow:"0 2px 8px rgba(0,0,0,0.15)",minWidth:160};function Ul(e){const t=c.useRef(null),[r,n]=c.useState({left:e.x,top:e.y});c.useEffect(()=>{const i=o=>{t.current&&!t.current.contains(o.target)&&e.onClose()};return window.addEventListener("mousedown",i),()=>window.removeEventListener("mousedown",i)},[e.onClose]),c.useEffect(()=>{if(t.current){const{innerWidth:i,innerHeight:o}=window,s=t.current.getBoundingClientRect();let l=e.x,u=e.y;l+s.width>i&&(l=i-s.width-8),u+s.height>o&&(u=o-s.height-8),l=Math.max(l,8),u=Math.max(u,8),n({left:l,top:u})}},[e.x,e.y]);const a=(i,o)=>{i.preventDefault(),o.onClick(e.item,e.itemCoordinate),e.onClose()};return y.jsx("div",{ref:t,style:{...Gl,left:r.left,top:r.top},children:y.jsx("ul",{className:"menu menu-sm p-0.5 bg-base-200 rounded-box min-w-55 max-w-xs w-full",children:e.actions.map((i,o)=>y.jsx(c.Fragment,{children:i.customRender?y.jsx(y.Fragment,{children:y.jsx("li",{onClick:s=>a(s,i),children:y.jsxs("a",{children:[i.icon&&y.jsx(Ie,{path:i==null?void 0:i.icon,color:i.iconColor,size:.8}),i.text,i.customRender()]})})}):y.jsx(y.Fragment,{children:y.jsx("li",{onClick:s=>a(s,i),children:y.jsxs("a",{children:[i.icon&&y.jsx(Ie,{path:i==null?void 0:i.icon,color:i.iconColor,size:.8}),i.text]})})})},o))})})}var Se={},Dt={},Vl=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,lo=Vl,Wl=lo,ql=typeof self=="object"&&self&&self.Object===Object&&self,Kl=Wl||ql||Function("return this")(),Pe=Kl,Yl=Pe,Xl=Yl.Symbol,Nt=Xl,wa=Nt,co=Object.prototype,Zl=co.hasOwnProperty,Jl=co.toString,Tt=wa?wa.toStringTag:void 0;function Ql(e){var t=Zl.call(e,Tt),r=e[Tt];try{e[Tt]=void 0;var n=!0}catch{}var a=Jl.call(e);return n&&(t?e[Tt]=r:delete e[Tt]),a}var ec=Ql,tc=Object.prototype,rc=tc.toString;function nc(e){return rc.call(e)}var ac=nc,Ca=Nt,ic=ec,oc=ac,sc="[object Null]",lc="[object Undefined]",Sa=Ca?Ca.toStringTag:void 0;function cc(e){return e==null?e===void 0?lc:sc:Sa&&Sa in Object(e)?ic(e):oc(e)}var Ve=cc,uc=Array.isArray,Oe=uc;function fc(e){return e!=null&&typeof e=="object"}var ke=fc,dc=Ve,hc=Oe,pc=ke,gc="[object String]";function vc(e){return typeof e=="string"||!hc(e)&&pc(e)&&dc(e)==gc}var bc=vc;function mc(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(r(i[l],l,i)===!1)break}return t}}var yc=mc,xc=yc,wc=xc(),Cc=wc;function Sc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Ec=Sc,$c=Ve,_c=ke,Oc="[object Arguments]";function Tc(e){return _c(e)&&$c(e)==Oc}var Ac=Tc,Ea=Ac,Rc=ke,uo=Object.prototype,Mc=uo.hasOwnProperty,Pc=uo.propertyIsEnumerable,jc=Ea(function(){return arguments}())?Ea:function(e){return Rc(e)&&Mc.call(e,"callee")&&!Pc.call(e,"callee")},fo=jc,ar={exports:{}};function Ic(){return!1}var kc=Ic;ar.exports;(function(e,t){var r=Pe,n=kc,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u})(ar,ar.exports);var dn=ar.exports,Fc=9007199254740991,Lc=/^(?:0|[1-9]\d*)$/;function Dc(e,t){var r=typeof e;return t=t??Fc,!!t&&(r=="number"||r!="symbol"&&Lc.test(e))&&e>-1&&e%1==0&&e<t}var ho=Dc,Nc=9007199254740991;function Hc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Nc}var hn=Hc,Bc=Ve,zc=hn,Gc=ke,Uc="[object Arguments]",Vc="[object Array]",Wc="[object Boolean]",qc="[object Date]",Kc="[object Error]",Yc="[object Function]",Xc="[object Map]",Zc="[object Number]",Jc="[object Object]",Qc="[object RegExp]",eu="[object Set]",tu="[object String]",ru="[object WeakMap]",nu="[object ArrayBuffer]",au="[object DataView]",iu="[object Float32Array]",ou="[object Float64Array]",su="[object Int8Array]",lu="[object Int16Array]",cu="[object Int32Array]",uu="[object Uint8Array]",fu="[object Uint8ClampedArray]",du="[object Uint16Array]",hu="[object Uint32Array]",ie={};ie[iu]=ie[ou]=ie[su]=ie[lu]=ie[cu]=ie[uu]=ie[fu]=ie[du]=ie[hu]=!0;ie[Uc]=ie[Vc]=ie[nu]=ie[Wc]=ie[au]=ie[qc]=ie[Kc]=ie[Yc]=ie[Xc]=ie[Zc]=ie[Jc]=ie[Qc]=ie[eu]=ie[tu]=ie[ru]=!1;function pu(e){return Gc(e)&&zc(e.length)&&!!ie[Bc(e)]}var gu=pu;function vu(e){return function(t){return e(t)}}var pn=vu,ir={exports:{}};ir.exports;(function(e,t){var r=lo,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(ir,ir.exports);var gn=ir.exports,bu=gu,mu=pn,$a=gn,_a=$a&&$a.isTypedArray,yu=_a?mu(_a):bu,po=yu,xu=Ec,wu=fo,Cu=Oe,Su=dn,Eu=ho,$u=po,_u=Object.prototype,Ou=_u.hasOwnProperty;function Tu(e,t){var r=Cu(e),n=!r&&wu(e),a=!r&&!n&&Su(e),i=!r&&!n&&!a&&$u(e),o=r||n||a||i,s=o?xu(e.length,String):[],l=s.length;for(var u in e)(t||Ou.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Eu(u,l)))&&s.push(u);return s}var go=Tu,Au=Object.prototype;function Ru(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Au;return e===r}var vn=Ru;function Mu(e,t){return function(r){return e(t(r))}}var vo=Mu,Pu=vo,ju=Pu(Object.keys,Object),Iu=ju,ku=vn,Fu=Iu,Lu=Object.prototype,Du=Lu.hasOwnProperty;function Nu(e){if(!ku(e))return Fu(e);var t=[];for(var r in Object(e))Du.call(e,r)&&r!="constructor"&&t.push(r);return t}var Hu=Nu;function Bu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vt=Bu,zu=Ve,Gu=vt,Uu="[object AsyncFunction]",Vu="[object Function]",Wu="[object GeneratorFunction]",qu="[object Proxy]";function Ku(e){if(!Gu(e))return!1;var t=zu(e);return t==Vu||t==Wu||t==Uu||t==qu}var bo=Ku,Yu=bo,Xu=hn;function Zu(e){return e!=null&&Xu(e.length)&&!Yu(e)}var pr=Zu,Ju=go,Qu=Hu,ef=pr;function tf(e){return ef(e)?Ju(e):Qu(e)}var Ht=tf,rf=Cc,nf=Ht;function af(e,t){return e&&rf(e,t,nf)}var mo=af;function of(e){return e}var yo=of,sf=yo;function lf(e){return typeof e=="function"?e:sf}var cf=lf,uf=mo,ff=cf;function df(e,t){return e&&uf(e,ff(t))}var bn=df,hf=vo,pf=hf(Object.getPrototypeOf,Object),mn=pf,gf=Ve,vf=mn,bf=ke,mf="[object Object]",yf=Function.prototype,xf=Object.prototype,xo=yf.toString,wf=xf.hasOwnProperty,Cf=xo.call(Object);function Sf(e){if(!bf(e)||gf(e)!=mf)return!1;var t=vf(e);if(t===null)return!0;var r=wf.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&xo.call(r)==Cf}var Ef=Sf;function $f(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var wo=$f;function _f(){this.__data__=[],this.size=0}var Of=_f;function Tf(e,t){return e===t||e!==e&&t!==t}var yn=Tf,Af=yn;function Rf(e,t){for(var r=e.length;r--;)if(Af(e[r][0],t))return r;return-1}var gr=Rf,Mf=gr,Pf=Array.prototype,jf=Pf.splice;function If(e){var t=this.__data__,r=Mf(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():jf.call(t,r,1),--this.size,!0}var kf=If,Ff=gr;function Lf(e){var t=this.__data__,r=Ff(t,e);return r<0?void 0:t[r][1]}var Df=Lf,Nf=gr;function Hf(e){return Nf(this.__data__,e)>-1}var Bf=Hf,zf=gr;function Gf(e,t){var r=this.__data__,n=zf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Uf=Gf,Vf=Of,Wf=kf,qf=Df,Kf=Bf,Yf=Uf;function bt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}bt.prototype.clear=Vf;bt.prototype.delete=Wf;bt.prototype.get=qf;bt.prototype.has=Kf;bt.prototype.set=Yf;var vr=bt,Xf=vr;function Zf(){this.__data__=new Xf,this.size=0}var Jf=Zf;function Qf(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var ed=Qf;function td(e){return this.__data__.get(e)}var rd=td;function nd(e){return this.__data__.has(e)}var ad=nd,id=Pe,od=id["__core-js_shared__"],sd=od,Nr=sd,Oa=function(){var e=/[^.]+$/.exec(Nr&&Nr.keys&&Nr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ld(e){return!!Oa&&Oa in e}var cd=ld,ud=Function.prototype,fd=ud.toString;function dd(e){if(e!=null){try{return fd.call(e)}catch{}try{return e+""}catch{}}return""}var Co=dd,hd=bo,pd=cd,gd=vt,vd=Co,bd=/[\\^$.*+?()[\]{}|]/g,md=/^\[object .+?Constructor\]$/,yd=Function.prototype,xd=Object.prototype,wd=yd.toString,Cd=xd.hasOwnProperty,Sd=RegExp("^"+wd.call(Cd).replace(bd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ed(e){if(!gd(e)||pd(e))return!1;var t=hd(e)?Sd:md;return t.test(vd(e))}var $d=Ed;function _d(e,t){return e==null?void 0:e[t]}var Od=_d,Td=$d,Ad=Od;function Rd(e,t){var r=Ad(e,t);return Td(r)?r:void 0}var We=Rd,Md=We,Pd=Pe,jd=Md(Pd,"Map"),xn=jd,Id=We,kd=Id(Object,"create"),br=kd,Ta=br;function Fd(){this.__data__=Ta?Ta(null):{},this.size=0}var Ld=Fd;function Dd(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Nd=Dd,Hd=br,Bd="__lodash_hash_undefined__",zd=Object.prototype,Gd=zd.hasOwnProperty;function Ud(e){var t=this.__data__;if(Hd){var r=t[e];return r===Bd?void 0:r}return Gd.call(t,e)?t[e]:void 0}var Vd=Ud,Wd=br,qd=Object.prototype,Kd=qd.hasOwnProperty;function Yd(e){var t=this.__data__;return Wd?t[e]!==void 0:Kd.call(t,e)}var Xd=Yd,Zd=br,Jd="__lodash_hash_undefined__";function Qd(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Zd&&t===void 0?Jd:t,this}var eh=Qd,th=Ld,rh=Nd,nh=Vd,ah=Xd,ih=eh;function mt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mt.prototype.clear=th;mt.prototype.delete=rh;mt.prototype.get=nh;mt.prototype.has=ah;mt.prototype.set=ih;var oh=mt,Aa=oh,sh=vr,lh=xn;function ch(){this.size=0,this.__data__={hash:new Aa,map:new(lh||sh),string:new Aa}}var uh=ch;function fh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var dh=fh,hh=dh;function ph(e,t){var r=e.__data__;return hh(t)?r[typeof t=="string"?"string":"hash"]:r.map}var mr=ph,gh=mr;function vh(e){var t=gh(this,e).delete(e);return this.size-=t?1:0,t}var bh=vh,mh=mr;function yh(e){return mh(this,e).get(e)}var xh=yh,wh=mr;function Ch(e){return wh(this,e).has(e)}var Sh=Ch,Eh=mr;function $h(e,t){var r=Eh(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _h=$h,Oh=uh,Th=bh,Ah=xh,Rh=Sh,Mh=_h;function yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}yt.prototype.clear=Oh;yt.prototype.delete=Th;yt.prototype.get=Ah;yt.prototype.has=Rh;yt.prototype.set=Mh;var wn=yt,Ph=vr,jh=xn,Ih=wn,kh=200;function Fh(e,t){var r=this.__data__;if(r instanceof Ph){var n=r.__data__;if(!jh||n.length<kh-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ih(n)}return r.set(e,t),this.size=r.size,this}var Lh=Fh,Dh=vr,Nh=Jf,Hh=ed,Bh=rd,zh=ad,Gh=Lh;function xt(e){var t=this.__data__=new Dh(e);this.size=t.size}xt.prototype.clear=Nh;xt.prototype.delete=Hh;xt.prototype.get=Bh;xt.prototype.has=zh;xt.prototype.set=Gh;var Cn=xt,Uh="__lodash_hash_undefined__";function Vh(e){return this.__data__.set(e,Uh),this}var Wh=Vh;function qh(e){return this.__data__.has(e)}var Kh=qh,Yh=wn,Xh=Wh,Zh=Kh;function or(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Yh;++t<r;)this.add(e[t])}or.prototype.add=or.prototype.push=Xh;or.prototype.has=Zh;var Jh=or;function Qh(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var ep=Qh;function tp(e,t){return e.has(t)}var rp=tp,np=Jh,ap=ep,ip=rp,op=1,sp=2;function lp(e,t,r,n,a,i){var o=r&op,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,v=r&sp?new np:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],m=t[d];if(n)var b=o?n(m,h,d,t,e,i):n(h,m,d,e,t,i);if(b!==void 0){if(b)continue;p=!1;break}if(v){if(!ap(t,function(x,S){if(!ip(v,S)&&(h===x||a(h,x,r,n,i)))return v.push(S)})){p=!1;break}}else if(!(h===m||a(h,m,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var So=lp,cp=Pe,up=cp.Uint8Array,Eo=up;function fp(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var dp=fp;function hp(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var pp=hp,Ra=Nt,Ma=Eo,gp=yn,vp=So,bp=dp,mp=pp,yp=1,xp=2,wp="[object Boolean]",Cp="[object Date]",Sp="[object Error]",Ep="[object Map]",$p="[object Number]",_p="[object RegExp]",Op="[object Set]",Tp="[object String]",Ap="[object Symbol]",Rp="[object ArrayBuffer]",Mp="[object DataView]",Pa=Ra?Ra.prototype:void 0,Hr=Pa?Pa.valueOf:void 0;function Pp(e,t,r,n,a,i,o){switch(r){case Mp:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Rp:return!(e.byteLength!=t.byteLength||!i(new Ma(e),new Ma(t)));case wp:case Cp:case $p:return gp(+e,+t);case Sp:return e.name==t.name&&e.message==t.message;case _p:case Tp:return e==t+"";case Ep:var s=bp;case Op:var l=n&yp;if(s||(s=mp),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=xp,o.set(e,t);var f=vp(s(e),s(t),n,a,i,o);return o.delete(e),f;case Ap:if(Hr)return Hr.call(e)==Hr.call(t)}return!1}var jp=Pp;function Ip(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var $o=Ip,kp=$o,Fp=Oe;function Lp(e,t,r){var n=t(e);return Fp(e)?n:kp(n,r(e))}var _o=Lp;function Dp(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var Np=Dp;function Hp(){return[]}var Oo=Hp,Bp=Np,zp=Oo,Gp=Object.prototype,Up=Gp.propertyIsEnumerable,ja=Object.getOwnPropertySymbols,Vp=ja?function(e){return e==null?[]:(e=Object(e),Bp(ja(e),function(t){return Up.call(e,t)}))}:zp,Sn=Vp,Wp=_o,qp=Sn,Kp=Ht;function Yp(e){return Wp(e,Kp,qp)}var To=Yp,Ia=To,Xp=1,Zp=Object.prototype,Jp=Zp.hasOwnProperty;function Qp(e,t,r,n,a,i){var o=r&Xp,s=Ia(e),l=s.length,u=Ia(t),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=s[d];if(!(o?p in t:Jp.call(t,p)))return!1}var v=i.get(e),h=i.get(t);if(v&&h)return v==t&&h==e;var m=!0;i.set(e,t),i.set(t,e);for(var b=o;++d<l;){p=s[d];var x=e[p],S=t[p];if(n)var E=o?n(S,x,p,t,e,i):n(x,S,p,e,t,i);if(!(E===void 0?x===S||a(x,S,r,n,i):E)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){var R=e.constructor,w=t.constructor;R!=w&&"constructor"in e&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof w=="function"&&w instanceof w)&&(m=!1)}return i.delete(e),i.delete(t),m}var eg=Qp,tg=We,rg=Pe,ng=tg(rg,"DataView"),ag=ng,ig=We,og=Pe,sg=ig(og,"Promise"),lg=sg,cg=We,ug=Pe,fg=cg(ug,"Set"),dg=fg,hg=We,pg=Pe,gg=hg(pg,"WeakMap"),vg=gg,Zr=ag,Jr=xn,Qr=lg,en=dg,tn=vg,Ao=Ve,wt=Co,ka="[object Map]",bg="[object Object]",Fa="[object Promise]",La="[object Set]",Da="[object WeakMap]",Na="[object DataView]",mg=wt(Zr),yg=wt(Jr),xg=wt(Qr),wg=wt(en),Cg=wt(tn),Ge=Ao;(Zr&&Ge(new Zr(new ArrayBuffer(1)))!=Na||Jr&&Ge(new Jr)!=ka||Qr&&Ge(Qr.resolve())!=Fa||en&&Ge(new en)!=La||tn&&Ge(new tn)!=Da)&&(Ge=function(e){var t=Ao(e),r=t==bg?e.constructor:void 0,n=r?wt(r):"";if(n)switch(n){case mg:return Na;case yg:return ka;case xg:return Fa;case wg:return La;case Cg:return Da}return t});var yr=Ge,Br=Cn,Sg=So,Eg=jp,$g=eg,Ha=yr,Ba=Oe,za=dn,_g=po,Og=1,Ga="[object Arguments]",Ua="[object Array]",Zt="[object Object]",Tg=Object.prototype,Va=Tg.hasOwnProperty;function Ag(e,t,r,n,a,i){var o=Ba(e),s=Ba(t),l=o?Ua:Ha(e),u=s?Ua:Ha(t);l=l==Ga?Zt:l,u=u==Ga?Zt:u;var f=l==Zt,d=u==Zt,p=l==u;if(p&&za(e)){if(!za(t))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new Br),o||_g(e)?Sg(e,t,r,n,a,i):Eg(e,t,l,r,n,a,i);if(!(r&Og)){var v=f&&Va.call(e,"__wrapped__"),h=d&&Va.call(t,"__wrapped__");if(v||h){var m=v?e.value():e,b=h?t.value():t;return i||(i=new Br),a(m,b,r,n,i)}}return p?(i||(i=new Br),$g(e,t,r,n,a,i)):!1}var Rg=Ag,Mg=Rg,Wa=ke;function Ro(e,t,r,n,a){return e===t?!0:e==null||t==null||!Wa(e)&&!Wa(t)?e!==e&&t!==t:Mg(e,t,r,n,Ro,a)}var Mo=Ro,Pg=Cn,jg=Mo,Ig=1,kg=2;function Fg(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var l=s[0],u=e[l],f=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var d=new Pg;if(n)var p=n(u,f,l,e,t,d);if(!(p===void 0?jg(f,u,Ig|kg,n,d):p))return!1}}return!0}var Lg=Fg,Dg=vt;function Ng(e){return e===e&&!Dg(e)}var Po=Ng,Hg=Po,Bg=Ht;function zg(e){for(var t=Bg(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Hg(a)]}return t}var Gg=zg;function Ug(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var jo=Ug,Vg=Lg,Wg=Gg,qg=jo;function Kg(e){var t=Wg(e);return t.length==1&&t[0][2]?qg(t[0][0],t[0][1]):function(r){return r===e||Vg(r,e,t)}}var Yg=Kg,Xg=Ve,Zg=ke,Jg="[object Symbol]";function Qg(e){return typeof e=="symbol"||Zg(e)&&Xg(e)==Jg}var En=Qg,e0=Oe,t0=En,r0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n0=/^\w*$/;function a0(e,t){if(e0(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||t0(e)?!0:n0.test(e)||!r0.test(e)||t!=null&&e in Object(t)}var $n=a0,Io=wn,i0="Expected a function";function _n(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(i0);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(_n.Cache||Io),r}_n.Cache=Io;var o0=_n,s0=o0,l0=500;function c0(e){var t=s0(e,function(n){return r.size===l0&&r.clear(),n}),r=t.cache;return t}var u0=c0,f0=u0,d0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h0=/\\(\\)?/g,p0=f0(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(d0,function(r,n,a,i){t.push(a?i.replace(h0,"$1"):n||r)}),t}),g0=p0,qa=Nt,v0=wo,b0=Oe,m0=En,Ka=qa?qa.prototype:void 0,Ya=Ka?Ka.toString:void 0;function ko(e){if(typeof e=="string")return e;if(b0(e))return v0(e,ko)+"";if(m0(e))return Ya?Ya.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var y0=ko,x0=y0;function w0(e){return e==null?"":x0(e)}var C0=w0,S0=Oe,E0=$n,$0=g0,_0=C0;function O0(e,t){return S0(e)?e:E0(e,t)?[e]:$0(_0(e))}var Fo=O0,T0=En;function A0(e){if(typeof e=="string"||T0(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var xr=A0,R0=Fo,M0=xr;function P0(e,t){t=R0(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[M0(t[r++])];return r&&r==n?e:void 0}var Lo=P0,j0=Lo;function I0(e,t,r){var n=e==null?void 0:j0(e,t);return n===void 0?r:n}var k0=I0;function F0(e,t){return e!=null&&t in Object(e)}var L0=F0,D0=Fo,N0=fo,H0=Oe,B0=ho,z0=hn,G0=xr;function U0(e,t,r){t=D0(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=G0(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&z0(a)&&B0(o,a)&&(H0(e)||N0(e)))}var V0=U0,W0=L0,q0=V0;function K0(e,t){return e!=null&&q0(e,t,W0)}var Y0=K0,X0=Mo,Z0=k0,J0=Y0,Q0=$n,ev=Po,tv=jo,rv=xr,nv=1,av=2;function iv(e,t){return Q0(e)&&ev(t)?tv(rv(e),t):function(r){var n=Z0(r,e);return n===void 0&&n===t?J0(r,e):X0(t,n,nv|av)}}var ov=iv;function sv(e){return function(t){return t==null?void 0:t[e]}}var lv=sv,cv=Lo;function uv(e){return function(t){return cv(t,e)}}var fv=uv,dv=lv,hv=fv,pv=$n,gv=xr;function vv(e){return pv(e)?dv(gv(e)):hv(e)}var bv=vv,mv=Yg,yv=ov,xv=yo,wv=Oe,Cv=bv;function Sv(e){return typeof e=="function"?e:e==null?xv:typeof e=="object"?wv(e)?yv(e[0],e[1]):mv(e):Cv(e)}var Ev=Sv,$v=pr;function _v(e,t){return function(r,n){if(r==null)return r;if(!$v(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var Ov=_v,Tv=mo,Av=Ov,Rv=Av(Tv),Mv=Rv,Pv=Mv,jv=pr;function Iv(e,t){var r=-1,n=jv(e)?Array(e.length):[];return Pv(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var kv=Iv,Fv=wo,Lv=Ev,Dv=kv,Nv=Oe;function Hv(e,t){var r=Nv(e)?Fv:Dv;return r(e,Lv(t))}var Bv=Hv;Object.defineProperty(Dt,"__esModule",{value:!0});Dt.flattenNames=void 0;var zv=bc,Gv=wr(zv),Uv=bn,Vv=wr(Uv),Wv=Ef,qv=wr(Wv),Kv=Bv,Yv=wr(Kv);function wr(e){return e&&e.__esModule?e:{default:e}}var Xv=Dt.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[];return(0,Yv.default)(t,function(n){Array.isArray(n)?e(n).map(function(a){return r.push(a)}):(0,qv.default)(n)?(0,Vv.default)(n,function(a,i){a===!0&&r.push(i),r.push(i+"-"+a)}):(0,Gv.default)(n)&&r.push(n)}),r};Dt.default=Xv;var Bt={};function Zv(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Jv=Zv,Qv=We,eb=function(){try{var e=Qv(Object,"defineProperty");return e({},"",{}),e}catch{}}(),tb=eb,Xa=tb;function rb(e,t,r){t=="__proto__"&&Xa?Xa(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Do=rb,nb=Do,ab=yn,ib=Object.prototype,ob=ib.hasOwnProperty;function sb(e,t,r){var n=e[t];(!(ob.call(e,t)&&ab(n,r))||r===void 0&&!(t in e))&&nb(e,t,r)}var No=sb,lb=No,cb=Do;function ub(e,t,r,n){var a=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],l=n?n(r[s],e[s],s,r,e):void 0;l===void 0&&(l=e[s]),a?cb(r,s,l):lb(r,s,l)}return r}var Cr=ub,fb=Cr,db=Ht;function hb(e,t){return e&&fb(t,db(t),e)}var pb=hb;function gb(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var vb=gb,bb=vt,mb=vn,yb=vb,xb=Object.prototype,wb=xb.hasOwnProperty;function Cb(e){if(!bb(e))return yb(e);var t=mb(e),r=[];for(var n in e)n=="constructor"&&(t||!wb.call(e,n))||r.push(n);return r}var Sb=Cb,Eb=go,$b=Sb,_b=pr;function Ob(e){return _b(e)?Eb(e,!0):$b(e)}var On=Ob,Tb=Cr,Ab=On;function Rb(e,t){return e&&Tb(t,Ab(t),e)}var Mb=Rb,sr={exports:{}};sr.exports;(function(e,t){var r=Pe,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function l(u,f){if(f)return u.slice();var d=u.length,p=s?s(d):new u.constructor(d);return u.copy(p),p}e.exports=l})(sr,sr.exports);var Pb=sr.exports;function jb(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Ib=jb,kb=Cr,Fb=Sn;function Lb(e,t){return kb(e,Fb(e),t)}var Db=Lb,Nb=$o,Hb=mn,Bb=Sn,zb=Oo,Gb=Object.getOwnPropertySymbols,Ub=Gb?function(e){for(var t=[];e;)Nb(t,Bb(e)),e=Hb(e);return t}:zb,Ho=Ub,Vb=Cr,Wb=Ho;function qb(e,t){return Vb(e,Wb(e),t)}var Kb=qb,Yb=_o,Xb=Ho,Zb=On;function Jb(e){return Yb(e,Zb,Xb)}var Qb=Jb,em=Object.prototype,tm=em.hasOwnProperty;function rm(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&tm.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var nm=rm,Za=Eo;function am(e){var t=new e.constructor(e.byteLength);return new Za(t).set(new Za(e)),t}var Tn=am,im=Tn;function om(e,t){var r=t?im(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var sm=om,lm=/\w*$/;function cm(e){var t=new e.constructor(e.source,lm.exec(e));return t.lastIndex=e.lastIndex,t}var um=cm,Ja=Nt,Qa=Ja?Ja.prototype:void 0,ei=Qa?Qa.valueOf:void 0;function fm(e){return ei?Object(ei.call(e)):{}}var dm=fm,hm=Tn;function pm(e,t){var r=t?hm(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var gm=pm,vm=Tn,bm=sm,mm=um,ym=dm,xm=gm,wm="[object Boolean]",Cm="[object Date]",Sm="[object Map]",Em="[object Number]",$m="[object RegExp]",_m="[object Set]",Om="[object String]",Tm="[object Symbol]",Am="[object ArrayBuffer]",Rm="[object DataView]",Mm="[object Float32Array]",Pm="[object Float64Array]",jm="[object Int8Array]",Im="[object Int16Array]",km="[object Int32Array]",Fm="[object Uint8Array]",Lm="[object Uint8ClampedArray]",Dm="[object Uint16Array]",Nm="[object Uint32Array]";function Hm(e,t,r){var n=e.constructor;switch(t){case Am:return vm(e);case wm:case Cm:return new n(+e);case Rm:return bm(e,r);case Mm:case Pm:case jm:case Im:case km:case Fm:case Lm:case Dm:case Nm:return xm(e,r);case Sm:return new n;case Em:case Om:return new n(e);case $m:return mm(e);case _m:return new n;case Tm:return ym(e)}}var Bm=Hm,zm=vt,ti=Object.create,Gm=function(){function e(){}return function(t){if(!zm(t))return{};if(ti)return ti(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Um=Gm,Vm=Um,Wm=mn,qm=vn;function Km(e){return typeof e.constructor=="function"&&!qm(e)?Vm(Wm(e)):{}}var Ym=Km,Xm=yr,Zm=ke,Jm="[object Map]";function Qm(e){return Zm(e)&&Xm(e)==Jm}var e1=Qm,t1=e1,r1=pn,ri=gn,ni=ri&&ri.isMap,n1=ni?r1(ni):t1,a1=n1,i1=yr,o1=ke,s1="[object Set]";function l1(e){return o1(e)&&i1(e)==s1}var c1=l1,u1=c1,f1=pn,ai=gn,ii=ai&&ai.isSet,d1=ii?f1(ii):u1,h1=d1,p1=Cn,g1=Jv,v1=No,b1=pb,m1=Mb,y1=Pb,x1=Ib,w1=Db,C1=Kb,S1=To,E1=Qb,$1=yr,_1=nm,O1=Bm,T1=Ym,A1=Oe,R1=dn,M1=a1,P1=vt,j1=h1,I1=Ht,k1=On,F1=1,L1=2,D1=4,Bo="[object Arguments]",N1="[object Array]",H1="[object Boolean]",B1="[object Date]",z1="[object Error]",zo="[object Function]",G1="[object GeneratorFunction]",U1="[object Map]",V1="[object Number]",Go="[object Object]",W1="[object RegExp]",q1="[object Set]",K1="[object String]",Y1="[object Symbol]",X1="[object WeakMap]",Z1="[object ArrayBuffer]",J1="[object DataView]",Q1="[object Float32Array]",ey="[object Float64Array]",ty="[object Int8Array]",ry="[object Int16Array]",ny="[object Int32Array]",ay="[object Uint8Array]",iy="[object Uint8ClampedArray]",oy="[object Uint16Array]",sy="[object Uint32Array]",ae={};ae[Bo]=ae[N1]=ae[Z1]=ae[J1]=ae[H1]=ae[B1]=ae[Q1]=ae[ey]=ae[ty]=ae[ry]=ae[ny]=ae[U1]=ae[V1]=ae[Go]=ae[W1]=ae[q1]=ae[K1]=ae[Y1]=ae[ay]=ae[iy]=ae[oy]=ae[sy]=!0;ae[z1]=ae[zo]=ae[X1]=!1;function tr(e,t,r,n,a,i){var o,s=t&F1,l=t&L1,u=t&D1;if(r&&(o=a?r(e,n,a,i):r(e)),o!==void 0)return o;if(!P1(e))return e;var f=A1(e);if(f){if(o=_1(e),!s)return x1(e,o)}else{var d=$1(e),p=d==zo||d==G1;if(R1(e))return y1(e,s);if(d==Go||d==Bo||p&&!a){if(o=l||p?{}:T1(e),!s)return l?C1(e,m1(o,e)):w1(e,b1(o,e))}else{if(!ae[d])return a?e:{};o=O1(e,d,s)}}i||(i=new p1);var v=i.get(e);if(v)return v;i.set(e,o),j1(e)?e.forEach(function(b){o.add(tr(b,t,r,b,e,i))}):M1(e)&&e.forEach(function(b,x){o.set(x,tr(b,t,r,x,e,i))});var h=u?l?E1:S1:l?k1:I1,m=f?void 0:h(e);return g1(m||e,function(b,x){m&&(x=b,b=e[x]),v1(o,x,tr(b,t,r,x,e,i))}),o}var ly=tr,cy=ly,uy=1,fy=4;function dy(e){return cy(e,uy|fy)}var hy=dy;Object.defineProperty(Bt,"__esModule",{value:!0});Bt.mergeClasses=void 0;var py=bn,gy=Uo(py),vy=hy,by=Uo(vy),my=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Uo(e){return e&&e.__esModule?e:{default:e}}var yy=Bt.mergeClasses=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=t.default&&(0,by.default)(t.default)||{};return r.map(function(a){var i=t[a];return i&&(0,gy.default)(i,function(o,s){n[s]||(n[s]={}),n[s]=my({},n[s],i[s])}),a}),n};Bt.default=yy;var zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.autoprefix=void 0;var xy=bn,oi=Cy(xy),wy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Cy(e){return e&&e.__esModule?e:{default:e}}var Sy={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var r=t&&t.split(" ");return{position:"absolute",top:r&&r[0],right:r&&r[1],bottom:r&&r[2],left:r&&r[3]}},extend:function(t,r){var n=r[t];return n||{extend:t}}},Ey=zt.autoprefix=function(t){var r={};return(0,oi.default)(t,function(n,a){var i={};(0,oi.default)(n,function(o,s){var l=Sy[s];l?i=wy({},i,l(o)):i[s]=o}),r[a]=i}),r};zt.default=Ey;var Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.hover=void 0;var $y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_y=c,zr=Oy(_y);function Oy(e){return e&&e.__esModule?e:{default:e}}function Ty(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function si(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Ay(e,t){if(typeof t!="function"&&t!==null)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 Ry=Gt.hover=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){Ay(a,n);function a(){var i,o,s,l;Ty(this,a);for(var u=arguments.length,f=Array(u),d=0;d<u;d++)f[d]=arguments[d];return l=(o=(s=si(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(f))),s),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return zr.default.createElement(r,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},zr.default.createElement(t,$y({},s.props,s.state)))},o),si(s,l)}return a}(zr.default.Component)};Gt.default=Ry;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.active=void 0;var My=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Py=c,Gr=jy(Py);function jy(e){return e&&e.__esModule?e:{default:e}}function Iy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function li(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function ky(e,t){if(typeof t!="function"&&t!==null)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 Fy=Ut.active=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){ky(a,n);function a(){var i,o,s,l;Iy(this,a);for(var u=arguments.length,f=Array(u),d=0;d<u;d++)f[d]=arguments[d];return l=(o=(s=li(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(f))),s),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return Gr.default.createElement(r,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},Gr.default.createElement(t,My({},s.props,s.state)))},o),li(s,l)}return a}(Gr.default.Component)};Ut.default=Fy;var An={};Object.defineProperty(An,"__esModule",{value:!0});var Ly=function(t,r){var n={},a=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n[o]=s};return t===0&&a("first-child"),t===r-1&&a("last-child"),(t===0||t%2===0)&&a("even"),Math.abs(t%2)===1&&a("odd"),a("nth-child",t),n};An.default=Ly;Object.defineProperty(Se,"__esModule",{value:!0});Se.ReactCSS=Se.loop=Se.handleActive=Rn=Se.handleHover=Se.hover=void 0;var Dy=Dt,Ny=Ct(Dy),Hy=Bt,By=Ct(Hy),zy=zt,Gy=Ct(zy),Uy=Gt,Vo=Ct(Uy),Vy=Ut,Wy=Ct(Vy),qy=An,Ky=Ct(qy);function Ct(e){return e&&e.__esModule?e:{default:e}}Se.hover=Vo.default;var Rn=Se.handleHover=Vo.default;Se.handleActive=Wy.default;Se.loop=Ky.default;var Yy=Se.ReactCSS=function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var i=(0,Ny.default)(n),o=(0,By.default)(t,i);return(0,Gy.default)(o)},G=Se.default=Yy,Xy=function(t,r,n,a,i){var o=i.clientWidth,s=i.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,f=l-(i.getBoundingClientRect().left+window.pageXOffset),d=u-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var p=void 0;if(d<0?p=0:d>s?p=1:p=Math.round(d*100/s)/100,r.a!==p)return{h:r.h,s:r.s,l:r.l,a:p,source:"rgb"}}else{var v=void 0;if(f<0?v=0:f>o?v=1:v=Math.round(f*100/o)/100,a!==v)return{h:r.h,s:r.s,l:r.l,a:v,source:"rgb"}}return null},Ur={},Zy=function(t,r,n,a){if(typeof document>"u"&&!a)return null;var i=a?new a:document.createElement("canvas");i.width=n*2,i.height=n*2;var o=i.getContext("2d");return o?(o.fillStyle=t,o.fillRect(0,0,i.width,i.height),o.fillStyle=r,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null},Jy=function(t,r,n,a){var i=t+"-"+r+"-"+n+(a?"-server":"");if(Ur[i])return Ur[i];var o=Zy(t,r,n,a);return Ur[i]=o,o},ci=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},St=function(t){var r=t.white,n=t.grey,a=t.size,i=t.renderers,o=t.borderRadius,s=t.boxShadow,l=t.children,u=G({default:{grid:{borderRadius:o,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+Jy(r,n,a,i.canvas)+") center left"}}});return c.isValidElement(l)?c.cloneElement(l,ci({},l.props,{style:ci({},l.props.style,u.grid)})):c.createElement("div",{style:u.grid})};St.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var Qy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ex=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function tx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ui(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function rx(e,t){if(typeof t!="function"&&t!==null)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 Mn=function(e){rx(t,e);function t(){var r,n,a,i;tx(this,t);for(var o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return i=(n=(a=ui(this,(r=t.__proto__||Object.getPrototypeOf(t)).call.apply(r,[this].concat(s))),a),a.handleChange=function(u){var f=Xy(u,a.props.hsl,a.props.direction,a.props.a,a.container);f&&typeof a.props.onChange=="function"&&a.props.onChange(f,u)},a.handleMouseDown=function(u){a.handleChange(u),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},a.unbindEventListeners=function(){window.removeEventListener("mousemove",a.handleChange),window.removeEventListener("mouseup",a.handleMouseUp)},n),ui(a,i)}return ex(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var n=this,a=this.props.rgb,i=G({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
45
+ color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,a),a}return o.updateDeps=s=>{r=s},o}function or(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const od=(e,t)=>Math.abs(e-t)<1.01,id=(e,t,n)=>{let r;return function(...a){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,a),n)}},Qo=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},sd=e=>e,ld=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let a=t;a<=n;a++)r.push(a);return r},cd=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const a=s=>{const{width:i,height:l}=s;t({width:Math.round(i),height:Math.round(l)})};if(a(Qo(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(s=>{const i=()=>{const l=s[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){a({width:u.inlineSize,height:u.blockSize});return}}a(Qo(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},ei={passive:!0},ti=typeof window>"u"?!0:"onscrollend"in window,ud=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let a=0;const o=e.options.useScrollendEvent&&ti?()=>{}:id(r,()=>{t(a,!1)},e.options.isScrollingResetDelay),s=d=>()=>{const{horizontal:f,isRtl:p}=e.options;a=f?n.scrollLeft*(p&&-1||1):n.scrollTop,o(),t(a,d)},i=s(!0),l=s(!1);l(),n.addEventListener("scroll",i,ei);const u=e.options.useScrollendEvent&&ti;return u&&n.addEventListener("scrollend",l,ei),()=>{n.removeEventListener("scroll",i),u&&n.removeEventListener("scrollend",l)}},dd=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},fd=(e,{adjustments:t=0,behavior:n},r)=>{var a,o;const s=e+t;(o=(a=r.scrollElement)==null?void 0:a.scrollTo)==null||o.call(a,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class hd{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(a=>{a.forEach(o=>{const s=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var a;(a=r())==null||a.disconnect(),n=null},observe:a=>{var o;return(o=r())==null?void 0:o.observe(a,{box:"border-box"})},unobserve:a=>{var o;return(o=r())==null?void 0:o.unobserve(a)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,a])=>{typeof a>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:sd,rangeExtractor:ld,onChange:()=>{},measureElement:dd,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,a;(a=(r=this.options).onChange)==null||a.call(r,this,n)},this.maybeNotify=Tt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const a=new Map,o=new Map;for(let s=r-1;s>=0;s--){const i=n[s];if(a.has(i.lane))continue;const l=o.get(i.lane);if(l==null||i.end>l.end?o.set(i.lane,i):i.end<l.end&&a.set(i.lane,!0),a.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((s,i)=>s.end===i.end?s.index-i.index:s.end-i.end)[0]:void 0},this.getMeasurementOptions=Tt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,r,a,o,s)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:a,getItemKey:o,enabled:s}),{key:!1}),this.getMeasurements=Tt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:a,getItemKey:o,enabled:s},i)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let d=l;d<n;d++){const f=o(d),p=this.options.lanes===1?u[d-1]:this.getFurthestMeasurement(u,d),g=p?p.end+this.options.gap:r+a,h=i.get(f),m=typeof h=="number"?h:this.options.estimateSize(d),b=g+m,y=p?p.lane:d%this.options.lanes;u[d]={index:d,start:g,size:m,end:b,key:f,lane:y}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Tt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,a,o)=>this.range=n.length>0&&r>0?pd({measurements:n,outerSize:r,scrollOffset:a,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Tt(()=>{let n=null,r=null;const a=this.calculateRange();return a&&(n=a.startIndex,r=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,a,o,s)=>o===null||s===null?[]:n({startIndex:o,endIndex:s,overscan:r,count:a}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,a=n.getAttribute(r);return a?parseInt(a,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const a=this.indexFromElement(n),o=this.measurementsCache[a];if(!o)return;const s=o.key,i=this.elementsCache.get(s);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(s,n)),n.isConnected&&this.resizeItem(a,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const a=this.measurementsCache[n];if(!a)return;const o=this.itemSizeCache.get(a.key)??a.size,s=r-o;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,s,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,a)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(a))});return}this._measureElement(n,void 0)},this.getVirtualItems=Tt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const a=[];for(let o=0,s=n.length;o<s;o++){const i=n[o],l=r[i];a.push(l)}return a},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return or(r[ml(0,r.length-1,a=>or(r[a]).start,n)])},this.getOffsetForAlignment=(n,r,a=0)=>{const o=this.getSize(),s=this.getScrollOffset();r==="auto"&&(r=n>=s+o?"end":"start"),r==="center"?n+=(a-o)/2:r==="end"&&(n-=o);const i=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(i,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.measurementsCache[n];if(!a)return;const o=this.getSize(),s=this.getScrollOffset();if(r==="auto")if(a.end>=s+o-this.options.scrollPaddingEnd)r="end";else if(a.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];const i=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,r,a.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:a})},this.scrollToIndex=(n,{align:r="auto",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const s=10,i=u=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(n,u);if(!d){console.warn("Failed to get offset for index:",n);return}const[f,p]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:a}),this.targetWindow.requestAnimationFrame(()=>{const g=this.getScrollOffset(),h=this.getOffsetForIndex(n,p);if(!h){console.warn("Failed to get offset for index:",n);return}od(h[0],g)||l(p)})},l=u=>{this.targetWindow&&(o++,o<s?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,s),this.targetWindow.requestAnimationFrame(()=>i(u))):console.warn(`Failed to scroll to index ${n} after ${s} attempts.`))};i(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let a;if(r.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let s=r.length-1;for(;s>=0&&o.some(i=>i===null);){const i=r[s];o[i.lane]===null&&(o[i.lane]=i.end),s--}a=Math.max(...o.filter(i=>i!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:a})=>{this.options.scrollToFn(n,{behavior:a,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ml=(e,t,n,r)=>{for(;e<=t;){const a=(e+t)/2|0,o=n(a);if(o<r)e=a+1;else if(o>r)t=a-1;else return a}return e>0?e-1:0};function pd({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const a=e.length-1,o=l=>e[l].start;if(e.length<=r)return{startIndex:0,endIndex:a};let s=ml(0,a,o,n),i=s;if(r===1)for(;i<a&&e[i].end<n+t;)i++;else if(r>1){const l=Array(r).fill(0);for(;i<a&&l.some(d=>d<n+t);){const d=e[i];l[d.lane]=d.end,i++}const u=Array(r).fill(n+t);for(;s>=0&&u.some(d=>d>=n);){const d=e[s];u[d.lane]=d.start,s--}s=Math.max(0,s-s%r),i=Math.min(a,i+(r-1-i%r))}return{startIndex:s,endIndex:i}}const ni=typeof document<"u"?ar.useLayoutEffect:ar.useEffect;function gd(e){const t=ar.useReducer(()=>({}),{})[1],n={...e,onChange:(a,o)=>{var s;o?pt.flushSync(t):t(),(s=e.onChange)==null||s.call(e,a,o)}},[r]=ar.useState(()=>new hd(n));return r.setOptions(n),ni(()=>r._didMount(),[]),ni(()=>r._willUpdate()),r}function vd(e){return gd({observeElementRect:cd,observeElementOffset:ud,scrollToFn:fd,...e})}const md=25,bd=40,yd=20,xd=({rowsCount:e,scrollRef:t})=>{const n=vd({count:e,getScrollElement:()=>t.current,estimateSize:()=>md,overscan:bd,scrollMargin:yd,lanes:1,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?s=>s==null?void 0:s.getBoundingClientRect().height:void 0}),r=n.getVirtualItems(),[a,o]=r.length>0?[or(r[0]).start-n.options.scrollMargin,n.getTotalSize()-or(r[r.length-1]).end]:[0,0];return{virtualizer:n,virtualRows:r,before:a,after:o}};function wd(e){return x.jsx("tr",{className:"bg-[#C294E910]",ref:e.ref,"data-index":e.dataIndex,children:e.groupByCustomRender?e.groupByCustomRender(e.groupBy,e.groupName):x.jsx("td",{colSpan:e.colSpan,className:"font-semibold",children:x.jsxs("div",{className:"flex align-center items-center",children:[x.jsx(je,{id:e.groupName,onClick:()=>e.onCollapseGroup(e.groupName),className:" h-5 min-h-5 mx-4 bg-[#DADADA] border-none",iconSize:1,small:!0,circle:!0,icon:e.isCollapsed?tl:el},e.groupName),x.jsx("div",{className:"ml-2",children:e.groupName}),x.jsxs("div",{className:"ml-8",children:[e.masterGroupName&&x.jsxs("div",{className:"flex font-normal text-white bg-[#a0a0a0] rounded-2xl px-3",children:[x.jsx(Pe,{path:Du,color:"white",size:.8}),x.jsx("div",{className:"ml-2",children:x.jsx("span",{className:"ml-1",children:"Linked"})})]}),e.linkedGroupNames&&e.linkedGroupNames.length>0&&x.jsxs("div",{className:"flex font-normal text-white bg-[#6B21A8] rounded-2xl px-3",children:[x.jsx(Pe,{path:Mu,color:"white",size:.8}),x.jsxs("div",{className:"ml-2",children:[x.jsx("span",{className:"font-bold",children:e.linkedGroupNames.length}),x.jsx("span",{className:"ml-1",children:" linked groups"})]})]})]})]})})})}const st=(e,t,n)=>`cell-${e}-${t}${n?`-fromArray-${n.index}`:""}`,Cd=(e,t,n,r,a,o,s)=>{e.stopPropagation();let i=t,l=[...n];if(e.key==="Tab"){let u=(t==null?void 0:t.rowIndex)??0,d=(t==null?void 0:t.columnIndex)??0;if(n.length>1){const f=Math.min(...n.map(m=>m.rowIndex)),p=Math.max(...n.map(m=>m.rowIndex)),g=Math.min(...n.map(m=>m.columnIndex)),h=Math.max(...n.map(m=>m.columnIndex));e.shiftKey?(d--,d<g&&(d=h,u--,u<f&&(u=p))):(d++,d>h&&(d=g,u++,u>p&&(u=f)))}else{const f=Ed(e,o,t,s);if(f)return{newSelectedCell:f,newExpandedSelection:[]};d=((t==null?void 0:t.columnIndex)??0)+(e.shiftKey?-1:1),d>=r?(d=0,u++):d<0&&(d=r-1,u--),u>=a&&(u=0),u<0&&(u=a-1),l=[]}i={rowIndex:u,columnIndex:d}}if(e.shiftKey&&["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)&&(l=Sd(t,n,e.key)),!e.shiftKey&&["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(e.key)){let u=(t==null?void 0:t.rowIndex)??0,d=(t==null?void 0:t.columnIndex)??0;switch(e.key){case"ArrowDown":u=Math.min(a-1,u+1);break;case"ArrowUp":u=Math.max(0,u-1);break;case"ArrowRight":d=Math.min(r-1,d+1);break;case"ArrowLeft":d=Math.max(0,d-1);break}i={rowIndex:u,columnIndex:d},l=[]}return{newSelectedCell:i,newExpandedSelection:l}},Ed=(e,t,n,r)=>{const a=n==null?void 0:n.fromArrayData;if(!a||!r)return;const o=r[a.fromArray];if(!((o==null?void 0:o.length)??0))return;let i=document.getElementById(st(n.rowIndex,n.columnIndex+(e.shiftKey?-1:1),{index:a.index}));if(i)return{rowIndex:n.rowIndex,columnIndex:n.columnIndex+(e.shiftKey?-1:1),fromArrayData:{fromArray:n.fromArrayData.fromArray,index:a.index}};if(r&&r[n.fromArrayData.fromArray].length>0){const l=t.findIndex(d=>d.fromArray===n.fromArrayData.fromArray);let u;if(t.forEach(d=>{d.fromArray===n.fromArrayData.fromArray&&(u=t.indexOf(d))}),e.shiftKey){if(i=document.getElementById(st(n.rowIndex,u,{index:n.fromArrayData.index-1})),i)return{rowIndex:n.rowIndex,columnIndex:u,fromArrayData:{fromArray:n.fromArrayData.fromArray,index:n.fromArrayData.index-1}}}else if(i=document.getElementById(st(n.rowIndex,l,{index:n.fromArrayData.index+1})),i)return{rowIndex:n.rowIndex,columnIndex:l,fromArrayData:{fromArray:n.fromArrayData.fromArray,index:n.fromArrayData.index+1}}}};function Sd(e,t,n){if(!e)return t;let r,a,o,s;if(t.length===0)return[{...e}];r=Math.min(...t.map(h=>h.rowIndex)),a=Math.max(...t.map(h=>h.rowIndex)),o=Math.min(...t.map(h=>h.columnIndex)),s=Math.max(...t.map(h=>h.columnIndex));let i=0,l=0;switch(e.rowIndex===r?i=a:i=r,e.columnIndex===o?l=s:l=o,n){case"ArrowUp":i=i-1;break;case"ArrowDown":i=i+1;break;case"ArrowLeft":l=l-1;break;case"ArrowRight":l=l+1;break;default:return t}const u=Math.min(e.rowIndex,i),d=Math.max(e.rowIndex,i),f=Math.min(e.columnIndex,l),p=Math.max(e.columnIndex,l),g=[];for(let h=u;h<=d;h++)for(let m=f;m<=p;m++)g.push({rowIndex:h,columnIndex:m});return g}const Ie=vt(e=>({selectedCell:void 0,expandedSelection:[],actions:{setSelectedCell:t=>e({selectedCell:t}),setExpandedSelection:t=>e({expandedSelection:t}),clearSelection:()=>e({selectedCell:void 0,expandedSelection:[]})}})),bl=()=>Ie(e=>e.actions),Rt=vt(e=>({dragStartCell:void 0,isDragging:!1,actions:{setDragStartCell:t=>e({dragStartCell:t}),setIsDragging:t=>e({isDragging:t})}})),Ad=()=>Rt(e=>e.isDragging);function $d({items:e,groupedItemsEntries:t,onChange:n,onBulkChange:r,onRowDoubleClick:a,onSaveComment:o,onDeleteComment:s,onSetHighlightCondition:i,onRemoveHighlightCondition:l,onAddListOption:u}){const{setSelectedCell:d,setExpandedSelection:f}=bl(),p=xr(),g=sl(),{setDragStartCell:h,setIsDragging:m}=Rt(j=>j.actions),b=c.useCallback(j=>{if(j)if(t){const v=t.flatMap(([w,S])=>S.filter(R=>R.rowIndex===j.rowIndex))[0];if(v)return v.item}else return e[j.rowIndex]},[t,e]),y=c.useCallback((j,v,w,S)=>{const R=e.findIndex(D=>D===v);let T;if(S){const D=v[w.fromArray];D[S.index]={...D[S.index],[w.id]:j},T={...v,[w.fromArray]:D}}else T={...v,[w.id]:j};return{itemUpdated:T,originalIndex:R}},[e]),E=c.useCallback(async(j,v,w,S)=>{var D;const{itemUpdated:R,originalIndex:T}=y(j,v,w,S.fromArrayData);if(n){const P=(D=S.fromArrayData)==null?void 0:D.index;(P===void 0?v[w.id]!==j:v[w.fromArray][P]!==j)&&await n(R,T,P)}},[n,y]),O=c.useCallback((j,v)=>{v.preventDefault(),Ie.getState().expandedSelection.some(R=>{var T,D,P,k;return R.rowIndex===j.rowIndex&&R.columnIndex===j.columnIndex&&((T=R.fromArrayData)==null?void 0:T.index)===((D=j.fromArrayData)==null?void 0:D.index)&&((P=R.fromArrayData)==null?void 0:P.fromArray)===((k=j.fromArrayData)==null?void 0:k.fromArray)})||(d(j),f([]))},[]),A=c.useCallback(async(j,v,w,S)=>{var P;const R=Ie.getState().selectedCell,T=Ie.getState().expandedSelection;let D=[...T];if(R&&!T.some(k=>k.rowIndex===R.rowIndex&&k.columnIndex===R.columnIndex)&&(D=[...T,R]),(T==null?void 0:T.length)>1){const k=D.map(F=>{const G=b(F);return G?{itemUpdated:{...G,[w.id]:j},originalIndex:e.findIndex(H=>H===G)}:null}).filter(Boolean);r&&k.length>0&&await r(k,w.id)}else{const{itemUpdated:k,originalIndex:F}=y(j,v,w,S.fromArrayData);if(n){const G=(P=S.fromArrayData)==null?void 0:P.index;(G===void 0?v[w.id]!==j:v[w.fromArray][G]!==j)&&await n(k,F,G)}}},[b,e,r,n,y]),C=c.useCallback(j=>{var w,S;const v=Ie.getState().selectedCell;((v==null?void 0:v.rowIndex)!==j.rowIndex||(v==null?void 0:v.columnIndex)!==j.columnIndex||((w=v==null?void 0:v.fromArrayData)==null?void 0:w.index)!==((S=j.fromArrayData)==null?void 0:S.index))&&(d(j),f([]))},[]),$=c.useCallback(j=>{var P,k;const v=Ie.getState().selectedCell,w=Ie.getState().expandedSelection,S={...v},R=v?b(v):void 0,{newSelectedCell:T,newExpandedSelection:D}=Cd(j,v,w,p.length,e.length,p,R);(T==null?void 0:T.rowIndex)===(S==null?void 0:S.rowIndex)&&(T==null?void 0:T.columnIndex)===(S==null?void 0:S.columnIndex)&&((P=T==null?void 0:T.fromArrayData)==null?void 0:P.index)===((k=S==null?void 0:S.fromArrayData)==null?void 0:k.index)||(d(T),f(D),_(T))},[g.length,e.length,e]),_=j=>{if(j){const v=document.getElementById(st(j.rowIndex,j.columnIndex,j.fromArrayData));v&&v.focus()}},I=c.useCallback(async j=>{a&&await a(j)},[a]),L=c.useRef(!1),V=c.useCallback((j,v)=>{var R,T;const w=Ie.getState().selectedCell;if(j.ctrlKey||j.metaKey){w?_(w):d(v);const D=[...Ie.getState().expandedSelection,v];f(D)}else((w==null?void 0:w.rowIndex)!==v.rowIndex||(w==null?void 0:w.columnIndex)!==v.columnIndex||((R=w==null?void 0:w.fromArrayData)==null?void 0:R.index)!==((T=v.fromArrayData)==null?void 0:T.index))&&(d(v),f([]));L.current=!0,h(v)},[]),B=c.useCallback((j,v)=>{j.stopPropagation();const w=Rt.getState().dragStartCell;if(!Rt.getState().isDragging||!w)return;const R=[],T=document.getElementById(st(w.rowIndex,w.columnIndex,w.fromArrayData)),D=j.currentTarget;if(!T||!D)return;const P=T.getBoundingClientRect(),k=D.getBoundingClientRect(),F=Math.min(P.left,k.left),G=Math.min(P.top,k.top),H=Math.max(P.right,k.right),ne=Math.max(P.bottom,k.bottom),M=D.closest("table");if(!M)return;const se=M.getElementsByTagName("td"),fe=new Set;Array.from(se).forEach(ve=>{const xe=ve.getBoundingClientRect(),dt=Math.max(0,Math.min(H,xe.right)-Math.max(F,xe.left)),z=Math.max(0,Math.min(ne,xe.bottom)-Math.max(G,xe.top)),K=xe.width*xe.height;if(dt*z>=K*.3){const pe=parseInt(ve.getAttribute("data-row-index")||"-1"),ze=parseInt(ve.getAttribute("data-col-index")||"-1"),ft=ve.getAttribute("data-from-array"),$t=ve.getAttribute("data-array-index");if(pe>=0&&ze>=0){const Wn=ft&&$t!==null?`${pe}-${ze}-${ft}-${$t}`:`${pe}-${ze}`;if(fe.has(Wn))return;fe.add(Wn);const Ke={rowIndex:pe,columnIndex:ze};ft&&$t!==null&&(Ke.fromArrayData={fromArray:ft,index:parseInt($t)}),R.push(Ke)}}}),f(R)},[e,p]),W=c.useCallback(j=>{j.preventDefault();const v=Ie.getState().selectedCell,w=Rt.getState().dragStartCell,S=Rt.getState().isDragging;L.current&&!S&&m(!0),S&&w!==v&&d(w)},[]),J=c.useCallback(()=>{L.current=!1,m(!1)},[]),q=c.useCallback(async(j,v)=>{s&&await s(j,v)},[o,e]),Q=c.useCallback(async(j,v)=>{o&&await o(j,v)},[o,e]);return c.useEffect(()=>(window.addEventListener("mouseup",J),()=>{window.removeEventListener("mouseup",J)}),[J]),{setExpandedSelection:f,onCellBlur:E,onCellEnter:A,onCellClick:C,handleCellKeyDown:$,handleRowDoubleClick:I,saveCommentHandler:Q,deleteCommentHandler:q,setHighlightCondition:async(j,v,w)=>{const S={propertyId:v,value:j[v],columnId:v,style:w};await(i==null?void 0:i(S,j))},removeHighlightCondition:(j,v,w)=>{const S={propertyId:v,value:j[v],columnId:v,style:{}};l==null||l(S,w,j)},onCellMouseDown:V,onCellMouseEnter:B,onMouseMove:W,onRightClick:O,addListOption:async(j,v)=>{u&&await u(j,v)},getItemFromCellCoordinates:b}}const Od=({items:e,onRowsReordered:t,groupBy:n})=>{const[r,a]=c.useState(null),[o,s]=c.useState(null),[i,l]=c.useState(null),[u,d]=c.useState(!1),f=c.useCallback(()=>{console.log(e),a(null),l(null),d(!1),s(null)},[]),p=c.useCallback((m,b)=>{a(m),d(!0),s(b)},[]),g=c.useCallback(m=>{if(r!==null&&i!==null&&r!==i){if(n&&m[n]!==(o==null?void 0:o[n])){console.warn("Cannot reorder items across different groups");return}t==null||t(r,i,o,m)}a(null),l(null),d(!1),s(null)},[r,i,t]),h=c.useCallback(m=>{r!==null&&r!==m&&l(m)},[r]);return{draggedRowIndex:r,dropTargetIndex:i,isDraggingRow:u,handleRowDragStart:p,handleDrop:g,handleDragEnd:f,handleRowDragOver:h}},yl=c.createContext(void 0),_d=({children:e,groupedItemsEntries:t,onChange:n,onBulkChange:r,onRowDoubleClick:a,onRowsReordered:o,onSaveComment:s,onDeleteComment:i,onSetHighlightCondition:l,onRemoveHighlightCondition:u,onAddListOption:d})=>{const f=wr(),p=cl(),g=Cr(),h=$d({items:p,groupedItemsEntries:t,onChange:n,onBulkChange:r,onRowDoubleClick:a,onAddListOption:d,onSaveComment:s,onDeleteComment:i,onSetHighlightCondition:l,onRemoveHighlightCondition:u}),m=Od({items:f,onRowsReordered:o,groupBy:g}),b=c.useMemo(()=>({...h,...m}),[h,m]);return x.jsx(yl.Provider,{value:b,children:e})};function Xt(){const e=c.useContext(yl);if(e===void 0)throw new Error("useTableInteractionContext must be used within a TableInteractionProvider");return e}var De={},jn={},Td=typeof Yn=="object"&&Yn&&Yn.Object===Object&&Yn,xl=Td,Rd=xl,Id=typeof self=="object"&&self&&self.Object===Object&&self,Md=Rd||Id||Function("return this")(),Ye=Md,Dd=Ye,jd=Dd.Symbol,Pn=jd,ri=Pn,wl=Object.prototype,Pd=wl.hasOwnProperty,kd=wl.toString,vn=ri?ri.toStringTag:void 0;function Nd(e){var t=Pd.call(e,vn),n=e[vn];try{e[vn]=void 0;var r=!0}catch{}var a=kd.call(e);return r&&(t?e[vn]=n:delete e[vn]),a}var Hd=Nd,Ld=Object.prototype,Fd=Ld.toString;function Bd(e){return Fd.call(e)}var zd=Bd,ai=Pn,Gd=Hd,Vd=zd,Ud="[object Null]",Wd="[object Undefined]",oi=ai?ai.toStringTag:void 0;function Yd(e){return e==null?e===void 0?Wd:Ud:oi&&oi in Object(e)?Gd(e):Vd(e)}var yt=Yd,Kd=Array.isArray,Fe=Kd;function Xd(e){return e!=null&&typeof e=="object"}var Ze=Xd,qd=yt,Jd=Fe,Zd=Ze,Qd="[object String]";function ef(e){return typeof e=="string"||!Jd(e)&&Zd(e)&&qd(e)==Qd}var tf=ef;function nf(e){return function(t,n,r){for(var a=-1,o=Object(t),s=r(t),i=s.length;i--;){var l=s[e?i:++a];if(n(o[l],l,o)===!1)break}return t}}var rf=nf,af=rf,of=af(),sf=of;function lf(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var cf=lf,uf=yt,df=Ze,ff="[object Arguments]";function hf(e){return df(e)&&uf(e)==ff}var pf=hf,ii=pf,gf=Ze,Cl=Object.prototype,vf=Cl.hasOwnProperty,mf=Cl.propertyIsEnumerable,bf=ii(function(){return arguments}())?ii:function(e){return gf(e)&&vf.call(e,"callee")&&!mf.call(e,"callee")},El=bf,ir={exports:{}};function yf(){return!1}var xf=yf;ir.exports;(function(e,t){var n=Ye,r=xf,a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===a,i=s?n.Buffer:void 0,l=i?i.isBuffer:void 0,u=l||r;e.exports=u})(ir,ir.exports);var ja=ir.exports,wf=9007199254740991,Cf=/^(?:0|[1-9]\d*)$/;function Ef(e,t){var n=typeof e;return t=t??wf,!!t&&(n=="number"||n!="symbol"&&Cf.test(e))&&e>-1&&e%1==0&&e<t}var Sl=Ef,Sf=9007199254740991;function Af(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Sf}var Pa=Af,$f=yt,Of=Pa,_f=Ze,Tf="[object Arguments]",Rf="[object Array]",If="[object Boolean]",Mf="[object Date]",Df="[object Error]",jf="[object Function]",Pf="[object Map]",kf="[object Number]",Nf="[object Object]",Hf="[object RegExp]",Lf="[object Set]",Ff="[object String]",Bf="[object WeakMap]",zf="[object ArrayBuffer]",Gf="[object DataView]",Vf="[object Float32Array]",Uf="[object Float64Array]",Wf="[object Int8Array]",Yf="[object Int16Array]",Kf="[object Int32Array]",Xf="[object Uint8Array]",qf="[object Uint8ClampedArray]",Jf="[object Uint16Array]",Zf="[object Uint32Array]",ce={};ce[Vf]=ce[Uf]=ce[Wf]=ce[Yf]=ce[Kf]=ce[Xf]=ce[qf]=ce[Jf]=ce[Zf]=!0;ce[Tf]=ce[Rf]=ce[zf]=ce[If]=ce[Gf]=ce[Mf]=ce[Df]=ce[jf]=ce[Pf]=ce[kf]=ce[Nf]=ce[Hf]=ce[Lf]=ce[Ff]=ce[Bf]=!1;function Qf(e){return _f(e)&&Of(e.length)&&!!ce[$f(e)]}var eh=Qf;function th(e){return function(t){return e(t)}}var ka=th,sr={exports:{}};sr.exports;(function(e,t){var n=xl,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,s=o&&n.process,i=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=i})(sr,sr.exports);var Na=sr.exports,nh=eh,rh=ka,si=Na,li=si&&si.isTypedArray,ah=li?rh(li):nh,Al=ah,oh=cf,ih=El,sh=Fe,lh=ja,ch=Sl,uh=Al,dh=Object.prototype,fh=dh.hasOwnProperty;function hh(e,t){var n=sh(e),r=!n&&ih(e),a=!n&&!r&&lh(e),o=!n&&!r&&!a&&uh(e),s=n||r||a||o,i=s?oh(e.length,String):[],l=i.length;for(var u in e)(t||fh.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ch(u,l)))&&i.push(u);return i}var $l=hh,ph=Object.prototype;function gh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ph;return e===n}var Ha=gh;function vh(e,t){return function(n){return e(t(n))}}var Ol=vh,mh=Ol,bh=mh(Object.keys,Object),yh=bh,xh=Ha,wh=yh,Ch=Object.prototype,Eh=Ch.hasOwnProperty;function Sh(e){if(!xh(e))return wh(e);var t=[];for(var n in Object(e))Eh.call(e,n)&&n!="constructor"&&t.push(n);return t}var Ah=Sh;function $h(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var qt=$h,Oh=yt,_h=qt,Th="[object AsyncFunction]",Rh="[object Function]",Ih="[object GeneratorFunction]",Mh="[object Proxy]";function Dh(e){if(!_h(e))return!1;var t=Oh(e);return t==Rh||t==Ih||t==Th||t==Mh}var _l=Dh,jh=_l,Ph=Pa;function kh(e){return e!=null&&Ph(e.length)&&!jh(e)}var Er=kh,Nh=$l,Hh=Ah,Lh=Er;function Fh(e){return Lh(e)?Nh(e):Hh(e)}var kn=Fh,Bh=sf,zh=kn;function Gh(e,t){return e&&Bh(e,t,zh)}var Tl=Gh;function Vh(e){return e}var Rl=Vh,Uh=Rl;function Wh(e){return typeof e=="function"?e:Uh}var Yh=Wh,Kh=Tl,Xh=Yh;function qh(e,t){return e&&Kh(e,Xh(t))}var La=qh,Jh=Ol,Zh=Jh(Object.getPrototypeOf,Object),Fa=Zh,Qh=yt,ep=Fa,tp=Ze,np="[object Object]",rp=Function.prototype,ap=Object.prototype,Il=rp.toString,op=ap.hasOwnProperty,ip=Il.call(Object);function sp(e){if(!tp(e)||Qh(e)!=np)return!1;var t=ep(e);if(t===null)return!0;var n=op.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Il.call(n)==ip}var lp=sp;function cp(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var Ml=cp;function up(){this.__data__=[],this.size=0}var dp=up;function fp(e,t){return e===t||e!==e&&t!==t}var Ba=fp,hp=Ba;function pp(e,t){for(var n=e.length;n--;)if(hp(e[n][0],t))return n;return-1}var Sr=pp,gp=Sr,vp=Array.prototype,mp=vp.splice;function bp(e){var t=this.__data__,n=gp(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():mp.call(t,n,1),--this.size,!0}var yp=bp,xp=Sr;function wp(e){var t=this.__data__,n=xp(t,e);return n<0?void 0:t[n][1]}var Cp=wp,Ep=Sr;function Sp(e){return Ep(this.__data__,e)>-1}var Ap=Sp,$p=Sr;function Op(e,t){var n=this.__data__,r=$p(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var _p=Op,Tp=dp,Rp=yp,Ip=Cp,Mp=Ap,Dp=_p;function Jt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jt.prototype.clear=Tp;Jt.prototype.delete=Rp;Jt.prototype.get=Ip;Jt.prototype.has=Mp;Jt.prototype.set=Dp;var Ar=Jt,jp=Ar;function Pp(){this.__data__=new jp,this.size=0}var kp=Pp;function Np(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Hp=Np;function Lp(e){return this.__data__.get(e)}var Fp=Lp;function Bp(e){return this.__data__.has(e)}var zp=Bp,Gp=Ye,Vp=Gp["__core-js_shared__"],Up=Vp,Jr=Up,ci=function(){var e=/[^.]+$/.exec(Jr&&Jr.keys&&Jr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Wp(e){return!!ci&&ci in e}var Yp=Wp,Kp=Function.prototype,Xp=Kp.toString;function qp(e){if(e!=null){try{return Xp.call(e)}catch{}try{return e+""}catch{}}return""}var Dl=qp,Jp=_l,Zp=Yp,Qp=qt,eg=Dl,tg=/[\\^$.*+?()[\]{}|]/g,ng=/^\[object .+?Constructor\]$/,rg=Function.prototype,ag=Object.prototype,og=rg.toString,ig=ag.hasOwnProperty,sg=RegExp("^"+og.call(ig).replace(tg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lg(e){if(!Qp(e)||Zp(e))return!1;var t=Jp(e)?sg:ng;return t.test(eg(e))}var cg=lg;function ug(e,t){return e==null?void 0:e[t]}var dg=ug,fg=cg,hg=dg;function pg(e,t){var n=hg(e,t);return fg(n)?n:void 0}var xt=pg,gg=xt,vg=Ye,mg=gg(vg,"Map"),za=mg,bg=xt,yg=bg(Object,"create"),$r=yg,ui=$r;function xg(){this.__data__=ui?ui(null):{},this.size=0}var wg=xg;function Cg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Eg=Cg,Sg=$r,Ag="__lodash_hash_undefined__",$g=Object.prototype,Og=$g.hasOwnProperty;function _g(e){var t=this.__data__;if(Sg){var n=t[e];return n===Ag?void 0:n}return Og.call(t,e)?t[e]:void 0}var Tg=_g,Rg=$r,Ig=Object.prototype,Mg=Ig.hasOwnProperty;function Dg(e){var t=this.__data__;return Rg?t[e]!==void 0:Mg.call(t,e)}var jg=Dg,Pg=$r,kg="__lodash_hash_undefined__";function Ng(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pg&&t===void 0?kg:t,this}var Hg=Ng,Lg=wg,Fg=Eg,Bg=Tg,zg=jg,Gg=Hg;function Zt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zt.prototype.clear=Lg;Zt.prototype.delete=Fg;Zt.prototype.get=Bg;Zt.prototype.has=zg;Zt.prototype.set=Gg;var Vg=Zt,di=Vg,Ug=Ar,Wg=za;function Yg(){this.size=0,this.__data__={hash:new di,map:new(Wg||Ug),string:new di}}var Kg=Yg;function Xg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var qg=Xg,Jg=qg;function Zg(e,t){var n=e.__data__;return Jg(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Or=Zg,Qg=Or;function ev(e){var t=Qg(this,e).delete(e);return this.size-=t?1:0,t}var tv=ev,nv=Or;function rv(e){return nv(this,e).get(e)}var av=rv,ov=Or;function iv(e){return ov(this,e).has(e)}var sv=iv,lv=Or;function cv(e,t){var n=lv(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var uv=cv,dv=Kg,fv=tv,hv=av,pv=sv,gv=uv;function Qt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qt.prototype.clear=dv;Qt.prototype.delete=fv;Qt.prototype.get=hv;Qt.prototype.has=pv;Qt.prototype.set=gv;var Ga=Qt,vv=Ar,mv=za,bv=Ga,yv=200;function xv(e,t){var n=this.__data__;if(n instanceof vv){var r=n.__data__;if(!mv||r.length<yv-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bv(r)}return n.set(e,t),this.size=n.size,this}var wv=xv,Cv=Ar,Ev=kp,Sv=Hp,Av=Fp,$v=zp,Ov=wv;function en(e){var t=this.__data__=new Cv(e);this.size=t.size}en.prototype.clear=Ev;en.prototype.delete=Sv;en.prototype.get=Av;en.prototype.has=$v;en.prototype.set=Ov;var Va=en,_v="__lodash_hash_undefined__";function Tv(e){return this.__data__.set(e,_v),this}var Rv=Tv;function Iv(e){return this.__data__.has(e)}var Mv=Iv,Dv=Ga,jv=Rv,Pv=Mv;function lr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Dv;++t<n;)this.add(e[t])}lr.prototype.add=lr.prototype.push=jv;lr.prototype.has=Pv;var kv=lr;function Nv(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Hv=Nv;function Lv(e,t){return e.has(t)}var Fv=Lv,Bv=kv,zv=Hv,Gv=Fv,Vv=1,Uv=2;function Wv(e,t,n,r,a,o){var s=n&Vv,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,g=n&Uv?new Bv:void 0;for(o.set(e,t),o.set(t,e);++f<i;){var h=e[f],m=t[f];if(r)var b=s?r(m,h,f,t,e,o):r(h,m,f,e,t,o);if(b!==void 0){if(b)continue;p=!1;break}if(g){if(!zv(t,function(y,E){if(!Gv(g,E)&&(h===y||a(h,y,n,r,o)))return g.push(E)})){p=!1;break}}else if(!(h===m||a(h,m,n,r,o))){p=!1;break}}return o.delete(e),o.delete(t),p}var jl=Wv,Yv=Ye,Kv=Yv.Uint8Array,Pl=Kv;function Xv(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var qv=Xv;function Jv(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Zv=Jv,fi=Pn,hi=Pl,Qv=Ba,em=jl,tm=qv,nm=Zv,rm=1,am=2,om="[object Boolean]",im="[object Date]",sm="[object Error]",lm="[object Map]",cm="[object Number]",um="[object RegExp]",dm="[object Set]",fm="[object String]",hm="[object Symbol]",pm="[object ArrayBuffer]",gm="[object DataView]",pi=fi?fi.prototype:void 0,Zr=pi?pi.valueOf:void 0;function vm(e,t,n,r,a,o,s){switch(n){case gm:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pm:return!(e.byteLength!=t.byteLength||!o(new hi(e),new hi(t)));case om:case im:case cm:return Qv(+e,+t);case sm:return e.name==t.name&&e.message==t.message;case um:case fm:return e==t+"";case lm:var i=tm;case dm:var l=r&rm;if(i||(i=nm),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=am,s.set(e,t);var d=em(i(e),i(t),r,a,o,s);return s.delete(e),d;case hm:if(Zr)return Zr.call(e)==Zr.call(t)}return!1}var mm=vm;function bm(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var kl=bm,ym=kl,xm=Fe;function wm(e,t,n){var r=t(e);return xm(e)?r:ym(r,n(e))}var Nl=wm;function Cm(e,t){for(var n=-1,r=e==null?0:e.length,a=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[a++]=s)}return o}var Em=Cm;function Sm(){return[]}var Hl=Sm,Am=Em,$m=Hl,Om=Object.prototype,_m=Om.propertyIsEnumerable,gi=Object.getOwnPropertySymbols,Tm=gi?function(e){return e==null?[]:(e=Object(e),Am(gi(e),function(t){return _m.call(e,t)}))}:$m,Ua=Tm,Rm=Nl,Im=Ua,Mm=kn;function Dm(e){return Rm(e,Mm,Im)}var Ll=Dm,vi=Ll,jm=1,Pm=Object.prototype,km=Pm.hasOwnProperty;function Nm(e,t,n,r,a,o){var s=n&jm,i=vi(e),l=i.length,u=vi(t),d=u.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var p=i[f];if(!(s?p in t:km.call(t,p)))return!1}var g=o.get(e),h=o.get(t);if(g&&h)return g==t&&h==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=s;++f<l;){p=i[f];var y=e[p],E=t[p];if(r)var O=s?r(E,y,p,t,e,o):r(y,E,p,e,t,o);if(!(O===void 0?y===E||a(y,E,n,r,o):O)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){var A=e.constructor,C=t.constructor;A!=C&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof C=="function"&&C instanceof C)&&(m=!1)}return o.delete(e),o.delete(t),m}var Hm=Nm,Lm=xt,Fm=Ye,Bm=Lm(Fm,"DataView"),zm=Bm,Gm=xt,Vm=Ye,Um=Gm(Vm,"Promise"),Wm=Um,Ym=xt,Km=Ye,Xm=Ym(Km,"Set"),qm=Xm,Jm=xt,Zm=Ye,Qm=Jm(Zm,"WeakMap"),e0=Qm,pa=zm,ga=za,va=Wm,ma=qm,ba=e0,Fl=yt,tn=Dl,mi="[object Map]",t0="[object Object]",bi="[object Promise]",yi="[object Set]",xi="[object WeakMap]",wi="[object DataView]",n0=tn(pa),r0=tn(ga),a0=tn(va),o0=tn(ma),i0=tn(ba),ht=Fl;(pa&&ht(new pa(new ArrayBuffer(1)))!=wi||ga&&ht(new ga)!=mi||va&&ht(va.resolve())!=bi||ma&&ht(new ma)!=yi||ba&&ht(new ba)!=xi)&&(ht=function(e){var t=Fl(e),n=t==t0?e.constructor:void 0,r=n?tn(n):"";if(r)switch(r){case n0:return wi;case r0:return mi;case a0:return bi;case o0:return yi;case i0:return xi}return t});var _r=ht,Qr=Va,s0=jl,l0=mm,c0=Hm,Ci=_r,Ei=Fe,Si=ja,u0=Al,d0=1,Ai="[object Arguments]",$i="[object Array]",qn="[object Object]",f0=Object.prototype,Oi=f0.hasOwnProperty;function h0(e,t,n,r,a,o){var s=Ei(e),i=Ei(t),l=s?$i:Ci(e),u=i?$i:Ci(t);l=l==Ai?qn:l,u=u==Ai?qn:u;var d=l==qn,f=u==qn,p=l==u;if(p&&Si(e)){if(!Si(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new Qr),s||u0(e)?s0(e,t,n,r,a,o):l0(e,t,l,n,r,a,o);if(!(n&d0)){var g=d&&Oi.call(e,"__wrapped__"),h=f&&Oi.call(t,"__wrapped__");if(g||h){var m=g?e.value():e,b=h?t.value():t;return o||(o=new Qr),a(m,b,n,r,o)}}return p?(o||(o=new Qr),c0(e,t,n,r,a,o)):!1}var p0=h0,g0=p0,_i=Ze;function Bl(e,t,n,r,a){return e===t?!0:e==null||t==null||!_i(e)&&!_i(t)?e!==e&&t!==t:g0(e,t,n,r,Bl,a)}var zl=Bl,v0=Va,m0=zl,b0=1,y0=2;function x0(e,t,n,r){var a=n.length,o=a,s=!r;if(e==null)return!o;for(e=Object(e);a--;){var i=n[a];if(s&&i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){i=n[a];var l=i[0],u=e[l],d=i[1];if(s&&i[2]){if(u===void 0&&!(l in e))return!1}else{var f=new v0;if(r)var p=r(u,d,l,e,t,f);if(!(p===void 0?m0(d,u,b0|y0,r,f):p))return!1}}return!0}var w0=x0,C0=qt;function E0(e){return e===e&&!C0(e)}var Gl=E0,S0=Gl,A0=kn;function $0(e){for(var t=A0(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,S0(a)]}return t}var O0=$0;function _0(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Vl=_0,T0=w0,R0=O0,I0=Vl;function M0(e){var t=R0(e);return t.length==1&&t[0][2]?I0(t[0][0],t[0][1]):function(n){return n===e||T0(n,e,t)}}var D0=M0,j0=yt,P0=Ze,k0="[object Symbol]";function N0(e){return typeof e=="symbol"||P0(e)&&j0(e)==k0}var Wa=N0,H0=Fe,L0=Wa,F0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B0=/^\w*$/;function z0(e,t){if(H0(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||L0(e)?!0:B0.test(e)||!F0.test(e)||t!=null&&e in Object(t)}var Ya=z0,Ul=Ga,G0="Expected a function";function Ka(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(G0);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s)||o,s};return n.cache=new(Ka.Cache||Ul),n}Ka.Cache=Ul;var V0=Ka,U0=V0,W0=500;function Y0(e){var t=U0(e,function(r){return n.size===W0&&n.clear(),r}),n=t.cache;return t}var K0=Y0,X0=K0,q0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J0=/\\(\\)?/g,Z0=X0(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(q0,function(n,r,a,o){t.push(a?o.replace(J0,"$1"):r||n)}),t}),Q0=Z0,Ti=Pn,eb=Ml,tb=Fe,nb=Wa,Ri=Ti?Ti.prototype:void 0,Ii=Ri?Ri.toString:void 0;function Wl(e){if(typeof e=="string")return e;if(tb(e))return eb(e,Wl)+"";if(nb(e))return Ii?Ii.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var rb=Wl,ab=rb;function ob(e){return e==null?"":ab(e)}var ib=ob,sb=Fe,lb=Ya,cb=Q0,ub=ib;function db(e,t){return sb(e)?e:lb(e,t)?[e]:cb(ub(e))}var Yl=db,fb=Wa;function hb(e){if(typeof e=="string"||fb(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Tr=hb,pb=Yl,gb=Tr;function vb(e,t){t=pb(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[gb(t[n++])];return n&&n==r?e:void 0}var Kl=vb,mb=Kl;function bb(e,t,n){var r=e==null?void 0:mb(e,t);return r===void 0?n:r}var yb=bb;function xb(e,t){return e!=null&&t in Object(e)}var wb=xb,Cb=Yl,Eb=El,Sb=Fe,Ab=Sl,$b=Pa,Ob=Tr;function _b(e,t,n){t=Cb(t,e);for(var r=-1,a=t.length,o=!1;++r<a;){var s=Ob(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=a?o:(a=e==null?0:e.length,!!a&&$b(a)&&Ab(s,a)&&(Sb(e)||Eb(e)))}var Tb=_b,Rb=wb,Ib=Tb;function Mb(e,t){return e!=null&&Ib(e,t,Rb)}var Db=Mb,jb=zl,Pb=yb,kb=Db,Nb=Ya,Hb=Gl,Lb=Vl,Fb=Tr,Bb=1,zb=2;function Gb(e,t){return Nb(e)&&Hb(t)?Lb(Fb(e),t):function(n){var r=Pb(n,e);return r===void 0&&r===t?kb(n,e):jb(t,r,Bb|zb)}}var Vb=Gb;function Ub(e){return function(t){return t==null?void 0:t[e]}}var Wb=Ub,Yb=Kl;function Kb(e){return function(t){return Yb(t,e)}}var Xb=Kb,qb=Wb,Jb=Xb,Zb=Ya,Qb=Tr;function ey(e){return Zb(e)?qb(Qb(e)):Jb(e)}var ty=ey,ny=D0,ry=Vb,ay=Rl,oy=Fe,iy=ty;function sy(e){return typeof e=="function"?e:e==null?ay:typeof e=="object"?oy(e)?ry(e[0],e[1]):ny(e):iy(e)}var ly=sy,cy=Er;function uy(e,t){return function(n,r){if(n==null)return n;if(!cy(n))return e(n,r);for(var a=n.length,o=t?a:-1,s=Object(n);(t?o--:++o<a)&&r(s[o],o,s)!==!1;);return n}}var dy=uy,fy=Tl,hy=dy,py=hy(fy),gy=py,vy=gy,my=Er;function by(e,t){var n=-1,r=my(e)?Array(e.length):[];return vy(e,function(a,o,s){r[++n]=t(a,o,s)}),r}var yy=by,xy=Ml,wy=ly,Cy=yy,Ey=Fe;function Sy(e,t){var n=Ey(e)?xy:Cy;return n(e,wy(t))}var Ay=Sy;Object.defineProperty(jn,"__esModule",{value:!0});jn.flattenNames=void 0;var $y=tf,Oy=Rr($y),_y=La,Ty=Rr(_y),Ry=lp,Iy=Rr(Ry),My=Ay,Dy=Rr(My);function Rr(e){return e&&e.__esModule?e:{default:e}}var jy=jn.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,Dy.default)(t,function(r){Array.isArray(r)?e(r).map(function(a){return n.push(a)}):(0,Iy.default)(r)?(0,Ty.default)(r,function(a,o){a===!0&&n.push(o),n.push(o+"-"+a)}):(0,Oy.default)(r)&&n.push(r)}),n};jn.default=jy;var Nn={};function Py(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var ky=Py,Ny=xt,Hy=function(){try{var e=Ny(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ly=Hy,Mi=Ly;function Fy(e,t,n){t=="__proto__"&&Mi?Mi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Xl=Fy,By=Xl,zy=Ba,Gy=Object.prototype,Vy=Gy.hasOwnProperty;function Uy(e,t,n){var r=e[t];(!(Vy.call(e,t)&&zy(r,n))||n===void 0&&!(t in e))&&By(e,t,n)}var ql=Uy,Wy=ql,Yy=Xl;function Ky(e,t,n,r){var a=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var i=t[o],l=r?r(n[i],e[i],i,n,e):void 0;l===void 0&&(l=e[i]),a?Yy(n,i,l):Wy(n,i,l)}return n}var Ir=Ky,Xy=Ir,qy=kn;function Jy(e,t){return e&&Xy(t,qy(t),e)}var Zy=Jy;function Qy(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ex=Qy,tx=qt,nx=Ha,rx=ex,ax=Object.prototype,ox=ax.hasOwnProperty;function ix(e){if(!tx(e))return rx(e);var t=nx(e),n=[];for(var r in e)r=="constructor"&&(t||!ox.call(e,r))||n.push(r);return n}var sx=ix,lx=$l,cx=sx,ux=Er;function dx(e){return ux(e)?lx(e,!0):cx(e)}var Xa=dx,fx=Ir,hx=Xa;function px(e,t){return e&&fx(t,hx(t),e)}var gx=px,cr={exports:{}};cr.exports;(function(e,t){var n=Ye,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,s=o?n.Buffer:void 0,i=s?s.allocUnsafe:void 0;function l(u,d){if(d)return u.slice();var f=u.length,p=i?i(f):new u.constructor(f);return u.copy(p),p}e.exports=l})(cr,cr.exports);var vx=cr.exports;function mx(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var bx=mx,yx=Ir,xx=Ua;function wx(e,t){return yx(e,xx(e),t)}var Cx=wx,Ex=kl,Sx=Fa,Ax=Ua,$x=Hl,Ox=Object.getOwnPropertySymbols,_x=Ox?function(e){for(var t=[];e;)Ex(t,Ax(e)),e=Sx(e);return t}:$x,Jl=_x,Tx=Ir,Rx=Jl;function Ix(e,t){return Tx(e,Rx(e),t)}var Mx=Ix,Dx=Nl,jx=Jl,Px=Xa;function kx(e){return Dx(e,Px,jx)}var Nx=kx,Hx=Object.prototype,Lx=Hx.hasOwnProperty;function Fx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Lx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Bx=Fx,Di=Pl;function zx(e){var t=new e.constructor(e.byteLength);return new Di(t).set(new Di(e)),t}var qa=zx,Gx=qa;function Vx(e,t){var n=t?Gx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Ux=Vx,Wx=/\w*$/;function Yx(e){var t=new e.constructor(e.source,Wx.exec(e));return t.lastIndex=e.lastIndex,t}var Kx=Yx,ji=Pn,Pi=ji?ji.prototype:void 0,ki=Pi?Pi.valueOf:void 0;function Xx(e){return ki?Object(ki.call(e)):{}}var qx=Xx,Jx=qa;function Zx(e,t){var n=t?Jx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Qx=Zx,e1=qa,t1=Ux,n1=Kx,r1=qx,a1=Qx,o1="[object Boolean]",i1="[object Date]",s1="[object Map]",l1="[object Number]",c1="[object RegExp]",u1="[object Set]",d1="[object String]",f1="[object Symbol]",h1="[object ArrayBuffer]",p1="[object DataView]",g1="[object Float32Array]",v1="[object Float64Array]",m1="[object Int8Array]",b1="[object Int16Array]",y1="[object Int32Array]",x1="[object Uint8Array]",w1="[object Uint8ClampedArray]",C1="[object Uint16Array]",E1="[object Uint32Array]";function S1(e,t,n){var r=e.constructor;switch(t){case h1:return e1(e);case o1:case i1:return new r(+e);case p1:return t1(e,n);case g1:case v1:case m1:case b1:case y1:case x1:case w1:case C1:case E1:return a1(e,n);case s1:return new r;case l1:case d1:return new r(e);case c1:return n1(e);case u1:return new r;case f1:return r1(e)}}var A1=S1,$1=qt,Ni=Object.create,O1=function(){function e(){}return function(t){if(!$1(t))return{};if(Ni)return Ni(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),_1=O1,T1=_1,R1=Fa,I1=Ha;function M1(e){return typeof e.constructor=="function"&&!I1(e)?T1(R1(e)):{}}var D1=M1,j1=_r,P1=Ze,k1="[object Map]";function N1(e){return P1(e)&&j1(e)==k1}var H1=N1,L1=H1,F1=ka,Hi=Na,Li=Hi&&Hi.isMap,B1=Li?F1(Li):L1,z1=B1,G1=_r,V1=Ze,U1="[object Set]";function W1(e){return V1(e)&&G1(e)==U1}var Y1=W1,K1=Y1,X1=ka,Fi=Na,Bi=Fi&&Fi.isSet,q1=Bi?X1(Bi):K1,J1=q1,Z1=Va,Q1=ky,ew=ql,tw=Zy,nw=gx,rw=vx,aw=bx,ow=Cx,iw=Mx,sw=Ll,lw=Nx,cw=_r,uw=Bx,dw=A1,fw=D1,hw=Fe,pw=ja,gw=z1,vw=qt,mw=J1,bw=kn,yw=Xa,xw=1,ww=2,Cw=4,Zl="[object Arguments]",Ew="[object Array]",Sw="[object Boolean]",Aw="[object Date]",$w="[object Error]",Ql="[object Function]",Ow="[object GeneratorFunction]",_w="[object Map]",Tw="[object Number]",ec="[object Object]",Rw="[object RegExp]",Iw="[object Set]",Mw="[object String]",Dw="[object Symbol]",jw="[object WeakMap]",Pw="[object ArrayBuffer]",kw="[object DataView]",Nw="[object Float32Array]",Hw="[object Float64Array]",Lw="[object Int8Array]",Fw="[object Int16Array]",Bw="[object Int32Array]",zw="[object Uint8Array]",Gw="[object Uint8ClampedArray]",Vw="[object Uint16Array]",Uw="[object Uint32Array]",le={};le[Zl]=le[Ew]=le[Pw]=le[kw]=le[Sw]=le[Aw]=le[Nw]=le[Hw]=le[Lw]=le[Fw]=le[Bw]=le[_w]=le[Tw]=le[ec]=le[Rw]=le[Iw]=le[Mw]=le[Dw]=le[zw]=le[Gw]=le[Vw]=le[Uw]=!0;le[$w]=le[Ql]=le[jw]=!1;function tr(e,t,n,r,a,o){var s,i=t&xw,l=t&ww,u=t&Cw;if(n&&(s=a?n(e,r,a,o):n(e)),s!==void 0)return s;if(!vw(e))return e;var d=hw(e);if(d){if(s=uw(e),!i)return aw(e,s)}else{var f=cw(e),p=f==Ql||f==Ow;if(pw(e))return rw(e,i);if(f==ec||f==Zl||p&&!a){if(s=l||p?{}:fw(e),!i)return l?iw(e,nw(s,e)):ow(e,tw(s,e))}else{if(!le[f])return a?e:{};s=dw(e,f,i)}}o||(o=new Z1);var g=o.get(e);if(g)return g;o.set(e,s),mw(e)?e.forEach(function(b){s.add(tr(b,t,n,b,e,o))}):gw(e)&&e.forEach(function(b,y){s.set(y,tr(b,t,n,y,e,o))});var h=u?l?lw:sw:l?yw:bw,m=d?void 0:h(e);return Q1(m||e,function(b,y){m&&(y=b,b=e[y]),ew(s,y,tr(b,t,n,y,e,o))}),s}var Ww=tr,Yw=Ww,Kw=1,Xw=4;function qw(e){return Yw(e,Kw|Xw)}var Jw=qw;Object.defineProperty(Nn,"__esModule",{value:!0});Nn.mergeClasses=void 0;var Zw=La,Qw=tc(Zw),eC=Jw,tC=tc(eC),nC=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 tc(e){return e&&e.__esModule?e:{default:e}}var rC=Nn.mergeClasses=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,tC.default)(t.default)||{};return n.map(function(a){var o=t[a];return o&&(0,Qw.default)(o,function(s,i){r[i]||(r[i]={}),r[i]=nC({},r[i],o[i])}),a}),r};Nn.default=rC;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.autoprefix=void 0;var aC=La,zi=iC(aC),oC=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 iC(e){return e&&e.__esModule?e:{default:e}}var sC={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var n=t&&t.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(t,n){var r=n[t];return r||{extend:t}}},lC=Hn.autoprefix=function(t){var n={};return(0,zi.default)(t,function(r,a){var o={};(0,zi.default)(r,function(s,i){var l=sC[i];l?o=oC({},o,l(s)):o[i]=s}),n[a]=o}),n};Hn.default=lC;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.hover=void 0;var cC=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},uC=c,ea=dC(uC);function dC(e){return e&&e.__esModule?e:{default:e}}function fC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gi(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function hC(e,t){if(typeof t!="function"&&t!==null)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 pC=Ln.hover=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){hC(a,r);function a(){var o,s,i,l;fC(this,a);for(var u=arguments.length,d=Array(u),f=0;f<u;f++)d[f]=arguments[f];return l=(s=(i=Gi(this,(o=a.__proto__||Object.getPrototypeOf(a)).call.apply(o,[this].concat(d))),i),i.state={hover:!1},i.handleMouseOver=function(){return i.setState({hover:!0})},i.handleMouseOut=function(){return i.setState({hover:!1})},i.render=function(){return ea.default.createElement(n,{onMouseOver:i.handleMouseOver,onMouseOut:i.handleMouseOut},ea.default.createElement(t,cC({},i.props,i.state)))},s),Gi(i,l)}return a}(ea.default.Component)};Ln.default=pC;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.active=void 0;var gC=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},vC=c,ta=mC(vC);function mC(e){return e&&e.__esModule?e:{default:e}}function bC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vi(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function yC(e,t){if(typeof t!="function"&&t!==null)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 xC=Fn.active=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){yC(a,r);function a(){var o,s,i,l;bC(this,a);for(var u=arguments.length,d=Array(u),f=0;f<u;f++)d[f]=arguments[f];return l=(s=(i=Vi(this,(o=a.__proto__||Object.getPrototypeOf(a)).call.apply(o,[this].concat(d))),i),i.state={active:!1},i.handleMouseDown=function(){return i.setState({active:!0})},i.handleMouseUp=function(){return i.setState({active:!1})},i.render=function(){return ta.default.createElement(n,{onMouseDown:i.handleMouseDown,onMouseUp:i.handleMouseUp},ta.default.createElement(t,gC({},i.props,i.state)))},s),Vi(i,l)}return a}(ta.default.Component)};Fn.default=xC;var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0});var wC=function(t,n){var r={},a=function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[s]=i};return t===0&&a("first-child"),t===n-1&&a("last-child"),(t===0||t%2===0)&&a("even"),Math.abs(t%2)===1&&a("odd"),a("nth-child",t),r};Ja.default=wC;Object.defineProperty(De,"__esModule",{value:!0});De.ReactCSS=De.loop=De.handleActive=Za=De.handleHover=De.hover=void 0;var CC=jn,EC=nn(CC),SC=Nn,AC=nn(SC),$C=Hn,OC=nn($C),_C=Ln,nc=nn(_C),TC=Fn,RC=nn(TC),IC=Ja,MC=nn(IC);function nn(e){return e&&e.__esModule?e:{default:e}}De.hover=nc.default;var Za=De.handleHover=nc.default;De.handleActive=RC.default;De.loop=MC.default;var DC=De.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];var o=(0,EC.default)(r),s=(0,AC.default)(t,o);return(0,OC.default)(s)},X=De.default=DC,jC=function(t,n,r,a,o){var s=o.clientWidth,i=o.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,d=l-(o.getBoundingClientRect().left+window.pageXOffset),f=u-(o.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var p=void 0;if(f<0?p=0:f>i?p=1:p=Math.round(f*100/i)/100,n.a!==p)return{h:n.h,s:n.s,l:n.l,a:p,source:"rgb"}}else{var g=void 0;if(d<0?g=0:d>s?g=1:g=Math.round(d*100/s)/100,a!==g)return{h:n.h,s:n.s,l:n.l,a:g,source:"rgb"}}return null},na={},PC=function(t,n,r,a){if(typeof document>"u"&&!a)return null;var o=a?new a:document.createElement("canvas");o.width=r*2,o.height=r*2;var s=o.getContext("2d");return s?(s.fillStyle=t,s.fillRect(0,0,o.width,o.height),s.fillStyle=n,s.fillRect(0,0,r,r),s.translate(r,r),s.fillRect(0,0,r,r),o.toDataURL()):null},kC=function(t,n,r,a){var o=t+"-"+n+"-"+r+(a?"-server":"");if(na[o])return na[o];var s=PC(t,n,r,a);return na[o]=s,s},Ui=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},rn=function(t){var n=t.white,r=t.grey,a=t.size,o=t.renderers,s=t.borderRadius,i=t.boxShadow,l=t.children,u=X({default:{grid:{borderRadius:s,boxShadow:i,absolute:"0px 0px 0px 0px",background:"url("+kC(n,r,a,o.canvas)+") center left"}}});return c.isValidElement(l)?c.cloneElement(l,Ui({},l.props,{style:Ui({},l.props.style,u.grid)})):c.createElement("div",{style:u.grid})};rn.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var NC=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},HC=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function LC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wi(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function FC(e,t){if(typeof t!="function"&&t!==null)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 Qa=function(e){FC(t,e);function t(){var n,r,a,o;LC(this,t);for(var s=arguments.length,i=Array(s),l=0;l<s;l++)i[l]=arguments[l];return o=(r=(a=Wi(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(i))),a),a.handleChange=function(u){var d=jC(u,a.props.hsl,a.props.direction,a.props.a,a.container);d&&typeof a.props.onChange=="function"&&a.props.onChange(d,u)},a.handleMouseDown=function(u){a.handleChange(u),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},a.unbindEventListeners=function(){window.removeEventListener("mousemove",a.handleChange),window.removeEventListener("mouseup",a.handleMouseUp)},r),Wi(a,o)}return HC(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,a=this.props.rgb,o=X({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
51
46
  rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:a.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
52
- rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)"},pointer:{left:0,top:a.a*100+"%"}},overwrite:Qy({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return c.createElement("div",{style:i.alpha},c.createElement("div",{style:i.checkboard},c.createElement(St,{renderers:this.props.renderers})),c.createElement("div",{style:i.gradient}),c.createElement("div",{style:i.container,ref:function(s){return n.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("div",{style:i.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:i.slider}))))}}]),t}(c.PureComponent||c.Component),nx=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function ax(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ix(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ox(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function sx(e,t){if(typeof t!="function"&&t!==null)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 lx=1,Wo=38,cx=40,ux=[Wo,cx],fx=function(t){return ux.indexOf(t)>-1},dx=function(t){return Number(String(t).replace(/%/g,""))},hx=1,Y=function(e){sx(t,e);function t(r){ix(this,t);var n=ox(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(a){n.setUpdatedValue(a.target.value,a)},n.handleKeyDown=function(a){var i=dx(a.target.value);if(!isNaN(i)&&fx(a.keyCode)){var o=n.getArrowOffset(),s=a.keyCode===Wo?i+o:i-o;n.setUpdatedValue(s,a)}},n.handleDrag=function(a){if(n.props.dragLabel){var i=Math.round(n.props.value+a.movementX);i>=0&&i<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(i),a)}},n.handleMouseDown=function(a){n.props.dragLabel&&(a.preventDefault(),n.handleDrag(a),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(r.value).toUpperCase(),blurValue:String(r.value).toUpperCase()},n.inputId="rc-editable-input-"+hx++,n}return nx(t,[{key:"componentDidUpdate",value:function(n,a){this.props.value!==this.state.value&&(n.value!==this.props.value||a.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return ax({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||lx}},{key:"setUpdatedValue",value:function(n,a){var i=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(i,a),this.setState({value:n})}},{key:"render",value:function(){var n=this,a=G({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return c.createElement("div",{style:a.wrap},c.createElement("input",{id:this.inputId,style:a.input,ref:function(o){return n.input=o},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?c.createElement("label",{htmlFor:this.inputId,style:a.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(c.PureComponent||c.Component),px=function(t,r,n,a){var i=a.clientWidth,o=a.clientHeight,s=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=s-(a.getBoundingClientRect().left+window.pageXOffset),f=l-(a.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var d=void 0;if(f<0)d=359;else if(f>o)d=0;else{var p=-(f*100/o)+100;d=360*p/100}if(n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var v=void 0;if(u<0)v=0;else if(u>i)v=359;else{var h=u*100/i;v=360*h/100}if(n.h!==v)return{h:v,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},gx=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function vx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fi(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function bx(e,t){if(typeof t!="function"&&t!==null)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 Et=function(e){bx(t,e);function t(){var r,n,a,i;vx(this,t);for(var o=arguments.length,s=Array(o),l=0;l<o;l++)s[l]=arguments[l];return i=(n=(a=fi(this,(r=t.__proto__||Object.getPrototypeOf(t)).call.apply(r,[this].concat(s))),a),a.handleChange=function(u){var f=px(u,a.props.direction,a.props.hsl,a.container);f&&typeof a.props.onChange=="function"&&a.props.onChange(f,u)},a.handleMouseDown=function(u){a.handleChange(u),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},n),fi(a,i)}return gx(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.direction,i=a===void 0?"horizontal":a,o=G({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return c.createElement("div",{style:o.hue},c.createElement("div",{className:"hue-"+i,style:o.container,ref:function(l){return n.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("style",null,`
47
+ rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)"},pointer:{left:0,top:a.a*100+"%"}},overwrite:NC({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return c.createElement("div",{style:o.alpha},c.createElement("div",{style:o.checkboard},c.createElement(rn,{renderers:this.props.renderers})),c.createElement("div",{style:o.gradient}),c.createElement("div",{style:o.container,ref:function(i){return r.container=i},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("div",{style:o.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:o.slider}))))}}]),t}(c.PureComponent||c.Component),BC=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function zC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VC(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function UC(e,t){if(typeof t!="function"&&t!==null)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 WC=1,rc=38,YC=40,KC=[rc,YC],XC=function(t){return KC.indexOf(t)>-1},qC=function(t){return Number(String(t).replace(/%/g,""))},JC=1,te=function(e){UC(t,e);function t(n){GC(this,t);var r=VC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(a){r.setUpdatedValue(a.target.value,a)},r.handleKeyDown=function(a){var o=qC(a.target.value);if(!isNaN(o)&&XC(a.keyCode)){var s=r.getArrowOffset(),i=a.keyCode===rc?o+s:o-s;r.setUpdatedValue(i,a)}},r.handleDrag=function(a){if(r.props.dragLabel){var o=Math.round(r.props.value+a.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),a)}},r.handleMouseDown=function(a){r.props.dragLabel&&(a.preventDefault(),r.handleDrag(a),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+JC++,r}return BC(t,[{key:"componentDidUpdate",value:function(r,a){this.props.value!==this.state.value&&(r.value!==this.props.value||a.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return zC({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||WC}},{key:"setUpdatedValue",value:function(r,a){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,a),this.setState({value:r})}},{key:"render",value:function(){var r=this,a=X({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return c.createElement("div",{style:a.wrap},c.createElement("input",{id:this.inputId,style:a.input,ref:function(s){return r.input=s},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?c.createElement("label",{htmlFor:this.inputId,style:a.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(c.PureComponent||c.Component),ZC=function(t,n,r,a){var o=a.clientWidth,s=a.clientHeight,i=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=i-(a.getBoundingClientRect().left+window.pageXOffset),d=l-(a.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var f=void 0;if(d<0)f=359;else if(d>s)f=0;else{var p=-(d*100/s)+100;f=360*p/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var g=void 0;if(u<0)g=0;else if(u>o)g=359;else{var h=u*100/o;g=360*h/100}if(r.h!==g)return{h:g,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},QC=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function eE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yi(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function tE(e,t){if(typeof t!="function"&&t!==null)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 an=function(e){tE(t,e);function t(){var n,r,a,o;eE(this,t);for(var s=arguments.length,i=Array(s),l=0;l<s;l++)i[l]=arguments[l];return o=(r=(a=Yi(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(i))),a),a.handleChange=function(u){var d=ZC(u,a.props.direction,a.props.hsl,a.container);d&&typeof a.props.onChange=="function"&&a.props.onChange(d,u)},a.handleMouseDown=function(u){a.handleChange(u),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},r),Yi(a,o)}return QC(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,a=this.props.direction,o=a===void 0?"horizontal":a,s=X({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:o==="vertical"});return c.createElement("div",{style:s.hue},c.createElement("div",{className:"hue-"+o,style:s.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("style",null,`
53
48
  .hue-horizontal {
54
49
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
55
50
  33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
@@ -63,8 +58,8 @@ Valid keys: `+JSON.stringify(Object.keys(g),null," "));var O=le(L,V,I,N,z+"."+V
63
58
  background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
64
59
  #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
65
60
  }
66
- `),c.createElement("div",{style:o.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:o.slider}))))}}]),t}(c.PureComponent||c.Component),mx=no();const $=eo(mx);function yx(){this.__data__=[],this.size=0}function Vt(e,t){return e===t||e!==e&&t!==t}function Sr(e,t){for(var r=e.length;r--;)if(Vt(e[r][0],t))return r;return-1}var xx=Array.prototype,wx=xx.splice;function Cx(e){var t=this.__data__,r=Sr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():wx.call(t,r,1),--this.size,!0}function Sx(e){var t=this.__data__,r=Sr(t,e);return r<0?void 0:t[r][1]}function Ex(e){return Sr(this.__data__,e)>-1}function $x(e,t){var r=this.__data__,n=Sr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Fe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Fe.prototype.clear=yx;Fe.prototype.delete=Cx;Fe.prototype.get=Sx;Fe.prototype.has=Ex;Fe.prototype.set=$x;function _x(){this.__data__=new Fe,this.size=0}function Ox(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Tx(e){return this.__data__.get(e)}function Ax(e){return this.__data__.has(e)}var qo=typeof global=="object"&&global&&global.Object===Object&&global,Rx=typeof self=="object"&&self&&self.Object===Object&&self,Te=qo||Rx||Function("return this")(),He=Te.Symbol,Ko=Object.prototype,Mx=Ko.hasOwnProperty,Px=Ko.toString,At=He?He.toStringTag:void 0;function jx(e){var t=Mx.call(e,At),r=e[At];try{e[At]=void 0;var n=!0}catch{}var a=Px.call(e);return n&&(t?e[At]=r:delete e[At]),a}var Ix=Object.prototype,kx=Ix.toString;function Fx(e){return kx.call(e)}var Lx="[object Null]",Dx="[object Undefined]",di=He?He.toStringTag:void 0;function qe(e){return e==null?e===void 0?Dx:Lx:di&&di in Object(e)?jx(e):Fx(e)}function Ee(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Nx="[object AsyncFunction]",Hx="[object Function]",Bx="[object GeneratorFunction]",zx="[object Proxy]";function Pn(e){if(!Ee(e))return!1;var t=qe(e);return t==Hx||t==Bx||t==Nx||t==zx}var Vr=Te["__core-js_shared__"],hi=function(){var e=/[^.]+$/.exec(Vr&&Vr.keys&&Vr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Gx(e){return!!hi&&hi in e}var Ux=Function.prototype,Vx=Ux.toString;function Ke(e){if(e!=null){try{return Vx.call(e)}catch{}try{return e+""}catch{}}return""}var Wx=/[\\^$.*+?()[\]{}|]/g,qx=/^\[object .+?Constructor\]$/,Kx=Function.prototype,Yx=Object.prototype,Xx=Kx.toString,Zx=Yx.hasOwnProperty,Jx=RegExp("^"+Xx.call(Zx).replace(Wx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qx(e){if(!Ee(e)||Gx(e))return!1;var t=Pn(e)?Jx:qx;return t.test(Ke(e))}function ew(e,t){return e==null?void 0:e[t]}function Ye(e,t){var r=ew(e,t);return Qx(r)?r:void 0}var Ft=Ye(Te,"Map"),Lt=Ye(Object,"create");function tw(){this.__data__=Lt?Lt(null):{},this.size=0}function rw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nw="__lodash_hash_undefined__",aw=Object.prototype,iw=aw.hasOwnProperty;function ow(e){var t=this.__data__;if(Lt){var r=t[e];return r===nw?void 0:r}return iw.call(t,e)?t[e]:void 0}var sw=Object.prototype,lw=sw.hasOwnProperty;function cw(e){var t=this.__data__;return Lt?t[e]!==void 0:lw.call(t,e)}var uw="__lodash_hash_undefined__";function fw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Lt&&t===void 0?uw:t,this}function Ue(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ue.prototype.clear=tw;Ue.prototype.delete=rw;Ue.prototype.get=ow;Ue.prototype.has=cw;Ue.prototype.set=fw;function dw(){this.size=0,this.__data__={hash:new Ue,map:new(Ft||Fe),string:new Ue}}function hw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Er(e,t){var r=e.__data__;return hw(t)?r[typeof t=="string"?"string":"hash"]:r.map}function pw(e){var t=Er(this,e).delete(e);return this.size-=t?1:0,t}function gw(e){return Er(this,e).get(e)}function vw(e){return Er(this,e).has(e)}function bw(e,t){var r=Er(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Le(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Le.prototype.clear=dw;Le.prototype.delete=pw;Le.prototype.get=gw;Le.prototype.has=vw;Le.prototype.set=bw;var mw=200;function yw(e,t){var r=this.__data__;if(r instanceof Fe){var n=r.__data__;if(!Ft||n.length<mw-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Le(n)}return r.set(e,t),this.size=r.size,this}function Me(e){var t=this.__data__=new Fe(e);this.size=t.size}Me.prototype.clear=_x;Me.prototype.delete=Ox;Me.prototype.get=Tx;Me.prototype.has=Ax;Me.prototype.set=yw;var lr=function(){try{var e=Ye(Object,"defineProperty");return e({},"",{}),e}catch{}}();function jn(e,t,r){t=="__proto__"&&lr?lr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rn(e,t,r){(r!==void 0&&!Vt(e[t],r)||r===void 0&&!(t in e))&&jn(e,t,r)}function xw(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[++a];if(r(i[l],l,i)===!1)break}return t}}var Yo=xw(),Xo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pi=Xo&&typeof module=="object"&&module&&!module.nodeType&&module,ww=pi&&pi.exports===Xo,gi=ww?Te.Buffer:void 0;gi&&gi.allocUnsafe;function Cw(e,t){return e.slice()}var cr=Te.Uint8Array;function Sw(e){var t=new e.constructor(e.byteLength);return new cr(t).set(new cr(e)),t}function Ew(e,t){var r=Sw(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}function $w(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var vi=Object.create,_w=function(){function e(){}return function(t){if(!Ee(t))return{};if(vi)return vi(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Zo(e,t){return function(r){return e(t(r))}}var Jo=Zo(Object.getPrototypeOf,Object),Ow=Object.prototype;function In(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ow;return e===r}function Tw(e){return typeof e.constructor=="function"&&!In(e)?_w(Jo(e)):{}}function Be(e){return e!=null&&typeof e=="object"}var Aw="[object Arguments]";function bi(e){return Be(e)&&qe(e)==Aw}var Qo=Object.prototype,Rw=Qo.hasOwnProperty,Mw=Qo.propertyIsEnumerable,ur=bi(function(){return arguments}())?bi:function(e){return Be(e)&&Rw.call(e,"callee")&&!Mw.call(e,"callee")},we=Array.isArray,Pw=9007199254740991;function kn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Pw}function $t(e){return e!=null&&kn(e.length)&&!Pn(e)}function jw(e){return Be(e)&&$t(e)}function Iw(){return!1}var es=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mi=es&&typeof module=="object"&&module&&!module.nodeType&&module,kw=mi&&mi.exports===es,yi=kw?Te.Buffer:void 0,Fw=yi?yi.isBuffer:void 0,fr=Fw||Iw,Lw="[object Object]",Dw=Function.prototype,Nw=Object.prototype,ts=Dw.toString,Hw=Nw.hasOwnProperty,Bw=ts.call(Object);function zw(e){if(!Be(e)||qe(e)!=Lw)return!1;var t=Jo(e);if(t===null)return!0;var r=Hw.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ts.call(r)==Bw}var Gw="[object Arguments]",Uw="[object Array]",Vw="[object Boolean]",Ww="[object Date]",qw="[object Error]",Kw="[object Function]",Yw="[object Map]",Xw="[object Number]",Zw="[object Object]",Jw="[object RegExp]",Qw="[object Set]",e2="[object String]",t2="[object WeakMap]",r2="[object ArrayBuffer]",n2="[object DataView]",a2="[object Float32Array]",i2="[object Float64Array]",o2="[object Int8Array]",s2="[object Int16Array]",l2="[object Int32Array]",c2="[object Uint8Array]",u2="[object Uint8ClampedArray]",f2="[object Uint16Array]",d2="[object Uint32Array]",oe={};oe[a2]=oe[i2]=oe[o2]=oe[s2]=oe[l2]=oe[c2]=oe[u2]=oe[f2]=oe[d2]=!0;oe[Gw]=oe[Uw]=oe[r2]=oe[Vw]=oe[n2]=oe[Ww]=oe[qw]=oe[Kw]=oe[Yw]=oe[Xw]=oe[Zw]=oe[Jw]=oe[Qw]=oe[e2]=oe[t2]=!1;function h2(e){return Be(e)&&kn(e.length)&&!!oe[qe(e)]}function p2(e){return function(t){return e(t)}}var rs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kt=rs&&typeof module=="object"&&module&&!module.nodeType&&module,g2=kt&&kt.exports===rs,Wr=g2&&qo.process,xi=function(){try{var e=kt&&kt.require&&kt.require("util").types;return e||Wr&&Wr.binding&&Wr.binding("util")}catch{}}(),wi=xi&&xi.isTypedArray,Fn=wi?p2(wi):h2;function nn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var v2=Object.prototype,b2=v2.hasOwnProperty;function m2(e,t,r){var n=e[t];(!(b2.call(e,t)&&Vt(n,r))||r===void 0&&!(t in e))&&jn(e,t,r)}function y2(e,t,r,n){var a=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],l=void 0;l===void 0&&(l=e[s]),a?jn(r,s,l):m2(r,s,l)}return r}function x2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var w2=9007199254740991,C2=/^(?:0|[1-9]\d*)$/;function Ln(e,t){var r=typeof e;return t=t??w2,!!t&&(r=="number"||r!="symbol"&&C2.test(e))&&e>-1&&e%1==0&&e<t}var S2=Object.prototype,E2=S2.hasOwnProperty;function ns(e,t){var r=we(e),n=!r&&ur(e),a=!r&&!n&&fr(e),i=!r&&!n&&!a&&Fn(e),o=r||n||a||i,s=o?x2(e.length,String):[],l=s.length;for(var u in e)(t||E2.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ln(u,l)))&&s.push(u);return s}function $2(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var _2=Object.prototype,O2=_2.hasOwnProperty;function T2(e){if(!Ee(e))return $2(e);var t=In(e),r=[];for(var n in e)n=="constructor"&&(t||!O2.call(e,n))||r.push(n);return r}function as(e){return $t(e)?ns(e,!0):T2(e)}function A2(e){return y2(e,as(e))}function R2(e,t,r,n,a,i,o){var s=nn(e,r),l=nn(t,r),u=o.get(l);if(u){rn(e,r,u);return}var f=i?i(s,l,r+"",e,t,o):void 0,d=f===void 0;if(d){var p=we(l),v=!p&&fr(l),h=!p&&!v&&Fn(l);f=l,p||v||h?we(s)?f=s:jw(s)?f=$w(s):v?(d=!1,f=Cw(l)):h?(d=!1,f=Ew(l)):f=[]:zw(l)||ur(l)?(f=s,ur(s)?f=A2(s):(!Ee(s)||Pn(s))&&(f=Tw(l))):d=!1}d&&(o.set(l,f),a(f,l,n,i,o),o.delete(l)),rn(e,r,f)}function is(e,t,r,n,a){e!==t&&Yo(t,function(i,o){if(a||(a=new Me),Ee(i))R2(e,t,o,r,is,n,a);else{var s=n?n(nn(e,o),i,o+"",e,t,a):void 0;s===void 0&&(s=i),rn(e,o,s)}},as)}function $r(e){return e}function M2(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Ci=Math.max;function P2(e,t,r){return t=Ci(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Ci(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),M2(e,this,s)}}function j2(e){return function(){return e}}var I2=lr?function(e,t){return lr(e,"toString",{configurable:!0,enumerable:!1,value:j2(t),writable:!0})}:$r,k2=800,F2=16,L2=Date.now;function D2(e){var t=0,r=0;return function(){var n=L2(),a=F2-(n-r);if(r=n,a>0){if(++t>=k2)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var N2=D2(I2);function H2(e,t){return N2(P2(e,t,$r),e+"")}function B2(e,t,r){if(!Ee(r))return!1;var n=typeof t;return(n=="number"?$t(r)&&Ln(t,r.length):n=="string"&&t in r)?Vt(r[t],e):!1}function z2(e){return H2(function(t,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,o&&B2(r[0],r[1],o)&&(i=a<3?void 0:i,a=1),t=Object(t);++n<a;){var s=r[n];s&&e(t,s,n,i)}return t})}var be=z2(function(e,t,r){is(e,t,r)}),Wt=function(t){var r=t.zDepth,n=t.radius,a=t.background,i=t.children,o=t.styles,s=o===void 0?{}:o,l=G(be({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+r+"px "+r*4+"px rgba(0,0,0,.24)",borderRadius:n,background:a}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":r===1});return c.createElement("div",{style:l.wrap},c.createElement("div",{style:l.bg}),c.createElement("div",{style:l.content},i))};Wt.propTypes={background:$.string,zDepth:$.oneOf([0,1,2,3,4,5]),radius:$.number,styles:$.object};Wt.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var qr=function(){return Te.Date.now()},G2=/\s/;function U2(e){for(var t=e.length;t--&&G2.test(e.charAt(t)););return t}var V2=/^\s+/;function W2(e){return e&&e.slice(0,U2(e)+1).replace(V2,"")}var q2="[object Symbol]";function _r(e){return typeof e=="symbol"||Be(e)&&qe(e)==q2}var Si=NaN,K2=/^[-+]0x[0-9a-f]+$/i,Y2=/^0b[01]+$/i,X2=/^0o[0-7]+$/i,Z2=parseInt;function Ei(e){if(typeof e=="number")return e;if(_r(e))return Si;if(Ee(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ee(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=W2(e);var r=Y2.test(e);return r||X2.test(e)?Z2(e.slice(2),r?2:8):K2.test(e)?Si:+e}var J2="Expected a function",Q2=Math.max,eC=Math.min;function os(e,t,r){var n,a,i,o,s,l,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(J2);t=Ei(t)||0,Ee(r)&&(f=!!r.leading,d="maxWait"in r,i=d?Q2(Ei(r.maxWait)||0,t):i,p="trailing"in r?!!r.trailing:p);function v(B){var J=n,te=a;return n=a=void 0,u=B,o=e.apply(te,J),o}function h(B){return u=B,s=setTimeout(x,t),f?v(B):o}function m(B){var J=B-l,te=B-u,ce=t-J;return d?eC(ce,i-te):ce}function b(B){var J=B-l,te=B-u;return l===void 0||J>=t||J<0||d&&te>=i}function x(){var B=qr();if(b(B))return S(B);s=setTimeout(x,m(B))}function S(B){return s=void 0,p&&n?v(B):(n=a=void 0,o)}function E(){s!==void 0&&clearTimeout(s),u=0,n=l=a=s=void 0}function R(){return s===void 0?o:S(qr())}function w(){var B=qr(),J=b(B);if(n=arguments,a=this,l=B,J){if(s===void 0)return h(l);if(d)return clearTimeout(s),s=setTimeout(x,t),v(l)}return s===void 0&&(s=setTimeout(x,t)),o}return w.cancel=E,w.flush=R,w}var tC="Expected a function";function rC(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(tC);return Ee(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),os(e,t,{leading:n,maxWait:t,trailing:a})}var nC=function(t,r,n){var a=n.getBoundingClientRect(),i=a.width,o=a.height,s=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=s-(n.getBoundingClientRect().left+window.pageXOffset),f=l-(n.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>i&&(u=i),f<0?f=0:f>o&&(f=o);var d=u/i,p=1-f/o;return{h:r.h,s:d,v:p,a:r.a,source:"hsv"}},aC=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function iC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oC(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function sC(e,t){if(typeof t!="function"&&t!==null)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 Or=function(e){sC(t,e);function t(r){iC(this,t);var n=oC(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r));return n.handleChange=function(a){typeof n.props.onChange=="function"&&n.throttle(n.props.onChange,nC(a,n.props.hsl,n.container),a)},n.handleMouseDown=function(a){n.handleChange(a);var i=n.getContainerRenderWindow();i.addEventListener("mousemove",n.handleChange),i.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=rC(function(a,i,o){a(i,o)},50),n}return aC(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var n=this.container,a=window;!a.document.contains(n)&&a.parent!==a;)a=a.parent;return a}},{key:"unbindEventListeners",value:function(){var n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.style||{},i=a.color,o=a.white,s=a.black,l=a.pointer,u=a.circle,f=G({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
67
- 0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:o,black:s,pointer:l,circle:u}},{custom:!!this.props.style});return c.createElement("div",{style:f.color,ref:function(p){return n.container=p},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("style",null,`
61
+ `),c.createElement("div",{style:s.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:s.slider}))))}}]),t}(c.PureComponent||c.Component),nE=Qs();const N=qs(nE);function rE(){this.__data__=[],this.size=0}function Bn(e,t){return e===t||e!==e&&t!==t}function Mr(e,t){for(var n=e.length;n--;)if(Bn(e[n][0],t))return n;return-1}var aE=Array.prototype,oE=aE.splice;function iE(e){var t=this.__data__,n=Mr(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():oE.call(t,n,1),--this.size,!0}function sE(e){var t=this.__data__,n=Mr(t,e);return n<0?void 0:t[n][1]}function lE(e){return Mr(this.__data__,e)>-1}function cE(e,t){var n=this.__data__,r=Mr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Qe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qe.prototype.clear=rE;Qe.prototype.delete=iE;Qe.prototype.get=sE;Qe.prototype.has=lE;Qe.prototype.set=cE;function uE(){this.__data__=new Qe,this.size=0}function dE(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function fE(e){return this.__data__.get(e)}function hE(e){return this.__data__.has(e)}var ac=typeof global=="object"&&global&&global.Object===Object&&global,pE=typeof self=="object"&&self&&self.Object===Object&&self,Be=ac||pE||Function("return this")(),lt=Be.Symbol,oc=Object.prototype,gE=oc.hasOwnProperty,vE=oc.toString,mn=lt?lt.toStringTag:void 0;function mE(e){var t=gE.call(e,mn),n=e[mn];try{e[mn]=void 0;var r=!0}catch{}var a=vE.call(e);return r&&(t?e[mn]=n:delete e[mn]),a}var bE=Object.prototype,yE=bE.toString;function xE(e){return yE.call(e)}var wE="[object Null]",CE="[object Undefined]",Ki=lt?lt.toStringTag:void 0;function wt(e){return e==null?e===void 0?CE:wE:Ki&&Ki in Object(e)?mE(e):xE(e)}function ke(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var EE="[object AsyncFunction]",SE="[object Function]",AE="[object GeneratorFunction]",$E="[object Proxy]";function eo(e){if(!ke(e))return!1;var t=wt(e);return t==SE||t==AE||t==EE||t==$E}var ra=Be["__core-js_shared__"],Xi=function(){var e=/[^.]+$/.exec(ra&&ra.keys&&ra.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function OE(e){return!!Xi&&Xi in e}var _E=Function.prototype,TE=_E.toString;function Ct(e){if(e!=null){try{return TE.call(e)}catch{}try{return e+""}catch{}}return""}var RE=/[\\^$.*+?()[\]{}|]/g,IE=/^\[object .+?Constructor\]$/,ME=Function.prototype,DE=Object.prototype,jE=ME.toString,PE=DE.hasOwnProperty,kE=RegExp("^"+jE.call(PE).replace(RE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function NE(e){if(!ke(e)||OE(e))return!1;var t=eo(e)?kE:IE;return t.test(Ct(e))}function HE(e,t){return e==null?void 0:e[t]}function Et(e,t){var n=HE(e,t);return NE(n)?n:void 0}var _n=Et(Be,"Map"),Tn=Et(Object,"create");function LE(){this.__data__=Tn?Tn(null):{},this.size=0}function FE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var BE="__lodash_hash_undefined__",zE=Object.prototype,GE=zE.hasOwnProperty;function VE(e){var t=this.__data__;if(Tn){var n=t[e];return n===BE?void 0:n}return GE.call(t,e)?t[e]:void 0}var UE=Object.prototype,WE=UE.hasOwnProperty;function YE(e){var t=this.__data__;return Tn?t[e]!==void 0:WE.call(t,e)}var KE="__lodash_hash_undefined__";function XE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===void 0?KE:t,this}function gt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}gt.prototype.clear=LE;gt.prototype.delete=FE;gt.prototype.get=VE;gt.prototype.has=YE;gt.prototype.set=XE;function qE(){this.size=0,this.__data__={hash:new gt,map:new(_n||Qe),string:new gt}}function JE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Dr(e,t){var n=e.__data__;return JE(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ZE(e){var t=Dr(this,e).delete(e);return this.size-=t?1:0,t}function QE(e){return Dr(this,e).get(e)}function eS(e){return Dr(this,e).has(e)}function tS(e,t){var n=Dr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function et(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}et.prototype.clear=qE;et.prototype.delete=ZE;et.prototype.get=QE;et.prototype.has=eS;et.prototype.set=tS;var nS=200;function rS(e,t){var n=this.__data__;if(n instanceof Qe){var r=n.__data__;if(!_n||r.length<nS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new et(r)}return n.set(e,t),this.size=n.size,this}function Ue(e){var t=this.__data__=new Qe(e);this.size=t.size}Ue.prototype.clear=uE;Ue.prototype.delete=dE;Ue.prototype.get=fE;Ue.prototype.has=hE;Ue.prototype.set=rS;var ur=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch{}}();function to(e,t,n){t=="__proto__"&&ur?ur(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ya(e,t,n){(n!==void 0&&!Bn(e[t],n)||n===void 0&&!(t in e))&&to(e,t,n)}function aS(e){return function(t,n,r){for(var a=-1,o=Object(t),s=r(t),i=s.length;i--;){var l=s[++a];if(n(o[l],l,o)===!1)break}return t}}var ic=aS(),sc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qi=sc&&typeof module=="object"&&module&&!module.nodeType&&module,oS=qi&&qi.exports===sc,Ji=oS?Be.Buffer:void 0;Ji&&Ji.allocUnsafe;function iS(e,t){return e.slice()}var dr=Be.Uint8Array;function sS(e){var t=new e.constructor(e.byteLength);return new dr(t).set(new dr(e)),t}function lS(e,t){var n=sS(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function cS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Zi=Object.create,uS=function(){function e(){}return function(t){if(!ke(t))return{};if(Zi)return Zi(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function lc(e,t){return function(n){return e(t(n))}}var cc=lc(Object.getPrototypeOf,Object),dS=Object.prototype;function no(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||dS;return e===n}function fS(e){return typeof e.constructor=="function"&&!no(e)?uS(cc(e)):{}}function ct(e){return e!=null&&typeof e=="object"}var hS="[object Arguments]";function Qi(e){return ct(e)&&wt(e)==hS}var uc=Object.prototype,pS=uc.hasOwnProperty,gS=uc.propertyIsEnumerable,fr=Qi(function(){return arguments}())?Qi:function(e){return ct(e)&&pS.call(e,"callee")&&!gS.call(e,"callee")},Te=Array.isArray,vS=9007199254740991;function ro(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vS}function on(e){return e!=null&&ro(e.length)&&!eo(e)}function mS(e){return ct(e)&&on(e)}function bS(){return!1}var dc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,es=dc&&typeof module=="object"&&module&&!module.nodeType&&module,yS=es&&es.exports===dc,ts=yS?Be.Buffer:void 0,xS=ts?ts.isBuffer:void 0,hr=xS||bS,wS="[object Object]",CS=Function.prototype,ES=Object.prototype,fc=CS.toString,SS=ES.hasOwnProperty,AS=fc.call(Object);function $S(e){if(!ct(e)||wt(e)!=wS)return!1;var t=cc(e);if(t===null)return!0;var n=SS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fc.call(n)==AS}var OS="[object Arguments]",_S="[object Array]",TS="[object Boolean]",RS="[object Date]",IS="[object Error]",MS="[object Function]",DS="[object Map]",jS="[object Number]",PS="[object Object]",kS="[object RegExp]",NS="[object Set]",HS="[object String]",LS="[object WeakMap]",FS="[object ArrayBuffer]",BS="[object DataView]",zS="[object Float32Array]",GS="[object Float64Array]",VS="[object Int8Array]",US="[object Int16Array]",WS="[object Int32Array]",YS="[object Uint8Array]",KS="[object Uint8ClampedArray]",XS="[object Uint16Array]",qS="[object Uint32Array]",ue={};ue[zS]=ue[GS]=ue[VS]=ue[US]=ue[WS]=ue[YS]=ue[KS]=ue[XS]=ue[qS]=!0;ue[OS]=ue[_S]=ue[FS]=ue[TS]=ue[BS]=ue[RS]=ue[IS]=ue[MS]=ue[DS]=ue[jS]=ue[PS]=ue[kS]=ue[NS]=ue[HS]=ue[LS]=!1;function JS(e){return ct(e)&&ro(e.length)&&!!ue[wt(e)]}function ZS(e){return function(t){return e(t)}}var hc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sn=hc&&typeof module=="object"&&module&&!module.nodeType&&module,QS=Sn&&Sn.exports===hc,aa=QS&&ac.process,ns=function(){try{var e=Sn&&Sn.require&&Sn.require("util").types;return e||aa&&aa.binding&&aa.binding("util")}catch{}}(),rs=ns&&ns.isTypedArray,ao=rs?ZS(rs):JS;function xa(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var e2=Object.prototype,t2=e2.hasOwnProperty;function n2(e,t,n){var r=e[t];(!(t2.call(e,t)&&Bn(r,n))||n===void 0&&!(t in e))&&to(e,t,n)}function r2(e,t,n,r){var a=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var i=t[o],l=void 0;l===void 0&&(l=e[i]),a?to(n,i,l):n2(n,i,l)}return n}function a2(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var o2=9007199254740991,i2=/^(?:0|[1-9]\d*)$/;function oo(e,t){var n=typeof e;return t=t??o2,!!t&&(n=="number"||n!="symbol"&&i2.test(e))&&e>-1&&e%1==0&&e<t}var s2=Object.prototype,l2=s2.hasOwnProperty;function pc(e,t){var n=Te(e),r=!n&&fr(e),a=!n&&!r&&hr(e),o=!n&&!r&&!a&&ao(e),s=n||r||a||o,i=s?a2(e.length,String):[],l=i.length;for(var u in e)(t||l2.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||oo(u,l)))&&i.push(u);return i}function c2(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var u2=Object.prototype,d2=u2.hasOwnProperty;function f2(e){if(!ke(e))return c2(e);var t=no(e),n=[];for(var r in e)r=="constructor"&&(t||!d2.call(e,r))||n.push(r);return n}function gc(e){return on(e)?pc(e,!0):f2(e)}function h2(e){return r2(e,gc(e))}function p2(e,t,n,r,a,o,s){var i=xa(e,n),l=xa(t,n),u=s.get(l);if(u){ya(e,n,u);return}var d=o?o(i,l,n+"",e,t,s):void 0,f=d===void 0;if(f){var p=Te(l),g=!p&&hr(l),h=!p&&!g&&ao(l);d=l,p||g||h?Te(i)?d=i:mS(i)?d=cS(i):g?(f=!1,d=iS(l)):h?(f=!1,d=lS(l)):d=[]:$S(l)||fr(l)?(d=i,fr(i)?d=h2(i):(!ke(i)||eo(i))&&(d=fS(l))):f=!1}f&&(s.set(l,d),a(d,l,r,o,s),s.delete(l)),ya(e,n,d)}function vc(e,t,n,r,a){e!==t&&ic(t,function(o,s){if(a||(a=new Ue),ke(o))p2(e,t,s,n,vc,r,a);else{var i=r?r(xa(e,s),o,s+"",e,t,a):void 0;i===void 0&&(i=o),ya(e,s,i)}},gc)}function jr(e){return e}function g2(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var as=Math.max;function v2(e,t,n){return t=as(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=as(r.length-t,0),s=Array(o);++a<o;)s[a]=r[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=r[a];return i[t]=n(s),g2(e,this,i)}}function m2(e){return function(){return e}}var b2=ur?function(e,t){return ur(e,"toString",{configurable:!0,enumerable:!1,value:m2(t),writable:!0})}:jr,y2=800,x2=16,w2=Date.now;function C2(e){var t=0,n=0;return function(){var r=w2(),a=x2-(r-n);if(n=r,a>0){if(++t>=y2)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var E2=C2(b2);function S2(e,t){return E2(v2(e,t,jr),e+"")}function A2(e,t,n){if(!ke(n))return!1;var r=typeof t;return(r=="number"?on(n)&&oo(t,n.length):r=="string"&&t in n)?Bn(n[t],e):!1}function $2(e){return S2(function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(a--,o):void 0,s&&A2(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var i=n[r];i&&e(t,i,r,o)}return t})}var Ce=$2(function(e,t,n){vc(e,t,n)}),zn=function(t){var n=t.zDepth,r=t.radius,a=t.background,o=t.children,s=t.styles,i=s===void 0?{}:s,l=X(Ce({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:a}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},i),{"zDepth-1":n===1});return c.createElement("div",{style:l.wrap},c.createElement("div",{style:l.bg}),c.createElement("div",{style:l.content},o))};zn.propTypes={background:N.string,zDepth:N.oneOf([0,1,2,3,4,5]),radius:N.number,styles:N.object};zn.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var oa=function(){return Be.Date.now()},O2=/\s/;function _2(e){for(var t=e.length;t--&&O2.test(e.charAt(t)););return t}var T2=/^\s+/;function R2(e){return e&&e.slice(0,_2(e)+1).replace(T2,"")}var I2="[object Symbol]";function Pr(e){return typeof e=="symbol"||ct(e)&&wt(e)==I2}var os=NaN,M2=/^[-+]0x[0-9a-f]+$/i,D2=/^0b[01]+$/i,j2=/^0o[0-7]+$/i,P2=parseInt;function is(e){if(typeof e=="number")return e;if(Pr(e))return os;if(ke(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ke(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=R2(e);var n=D2.test(e);return n||j2.test(e)?P2(e.slice(2),n?2:8):M2.test(e)?os:+e}var k2="Expected a function",N2=Math.max,H2=Math.min;function mc(e,t,n){var r,a,o,s,i,l,u=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(k2);t=is(t)||0,ke(n)&&(d=!!n.leading,f="maxWait"in n,o=f?N2(is(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p);function g($){var _=r,I=a;return r=a=void 0,u=$,s=e.apply(I,_),s}function h($){return u=$,i=setTimeout(y,t),d?g($):s}function m($){var _=$-l,I=$-u,L=t-_;return f?H2(L,o-I):L}function b($){var _=$-l,I=$-u;return l===void 0||_>=t||_<0||f&&I>=o}function y(){var $=oa();if(b($))return E($);i=setTimeout(y,m($))}function E($){return i=void 0,p&&r?g($):(r=a=void 0,s)}function O(){i!==void 0&&clearTimeout(i),u=0,r=l=a=i=void 0}function A(){return i===void 0?s:E(oa())}function C(){var $=oa(),_=b($);if(r=arguments,a=this,l=$,_){if(i===void 0)return h(l);if(f)return clearTimeout(i),i=setTimeout(y,t),g(l)}return i===void 0&&(i=setTimeout(y,t)),s}return C.cancel=O,C.flush=A,C}var L2="Expected a function";function F2(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(L2);return ke(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),mc(e,t,{leading:r,maxWait:t,trailing:a})}var B2=function(t,n,r){var a=r.getBoundingClientRect(),o=a.width,s=a.height,i=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,l=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=i-(r.getBoundingClientRect().left+window.pageXOffset),d=l-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>o&&(u=o),d<0?d=0:d>s&&(d=s);var f=u/o,p=1-d/s;return{h:n.h,s:f,v:p,a:n.a,source:"hsv"}},z2=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function G2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V2(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function U2(e,t){if(typeof t!="function"&&t!==null)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 kr=function(e){U2(t,e);function t(n){G2(this,t);var r=V2(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.handleChange=function(a){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,B2(a,r.props.hsl,r.container),a)},r.handleMouseDown=function(a){r.handleChange(a);var o=r.getContainerRenderWindow();o.addEventListener("mousemove",r.handleChange),o.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=F2(function(a,o,s){a(o,s)},50),r}return z2(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,a=window;!a.document.contains(r)&&a.parent!==a;)a=a.parent;return a}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,a=this.props.style||{},o=a.color,s=a.white,i=a.black,l=a.pointer,u=a.circle,d=X({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
62
+ 0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:o,white:s,black:i,pointer:l,circle:u}},{custom:!!this.props.style});return c.createElement("div",{style:d.color,ref:function(p){return r.container=p},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},c.createElement("style",null,`
68
63
  .saturation-white {
69
64
  background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
70
65
  background: linear-gradient(to right, #fff, rgba(255,255,255,0));
@@ -73,7 +68,14 @@ Valid keys: `+JSON.stringify(Object.keys(g),null," "));var O=le(L,V,I,N,z+"."+V
73
68
  background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
74
69
  background: linear-gradient(to top, #000, rgba(0,0,0,0));
75
70
  }
76
- `),c.createElement("div",{style:f.white,className:"saturation-white"},c.createElement("div",{style:f.black,className:"saturation-black"}),c.createElement("div",{style:f.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:f.circle}))))}}]),t}(c.PureComponent||c.Component);function lC(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var cC=Zo(Object.keys,Object),uC=Object.prototype,fC=uC.hasOwnProperty;function dC(e){if(!In(e))return cC(e);var t=[];for(var r in Object(e))fC.call(e,r)&&r!="constructor"&&t.push(r);return t}function Dn(e){return $t(e)?ns(e):dC(e)}function hC(e,t){return e&&Yo(e,t,Dn)}function pC(e,t){return function(r,n){if(r==null)return r;if(!$t(r))return e(r,n);for(var a=r.length,i=-1,o=Object(r);++i<a&&n(o[i],i,o)!==!1;);return r}}var ss=pC(hC);function gC(e){return typeof e=="function"?e:$r}function vC(e,t){var r=we(e)?lC:ss;return r(e,gC(t))}function dr(e){"@babel/helpers - typeof";return dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(e)}var bC=/^\s+/,mC=/\s+$/;function F(e,t){if(e=e||"",t=t||{},e instanceof F)return e;if(!(this instanceof F))return new F(e,t);var r=yC(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}F.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),r,n,a,i,o,s;return r=t.r/255,n=t.g/255,a=t.b/255,r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*i+.7152*o+.0722*s},setAlpha:function(t){return this._a=ls(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=_i(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=_i(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+a+"%)":"hsva("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=$i(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=$i(this._r,this._g,this._b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+a+"%)":"hsla("+r+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return Oi(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return SC(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(se(this._r,255)*100)+"%",g:Math.round(se(this._g,255)*100)+"%",b:Math.round(se(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(se(this._r,255)*100)+"%, "+Math.round(se(this._g,255)*100)+"%, "+Math.round(se(this._b,255)*100)+"%)":"rgba("+Math.round(se(this._r,255)*100)+"%, "+Math.round(se(this._g,255)*100)+"%, "+Math.round(se(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:kC[Oi(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var r="#"+Ti(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=F(t);n="#"+Ti(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var r=!!t;t=t||this._format;var n=!1,a=this._a<1&&this._a>=0,i=!r&&a&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return F(this.toString())},_applyModification:function(t,r){var n=t.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(OC,arguments)},brighten:function(){return this._applyModification(TC,arguments)},darken:function(){return this._applyModification(AC,arguments)},desaturate:function(){return this._applyModification(EC,arguments)},saturate:function(){return this._applyModification($C,arguments)},greyscale:function(){return this._applyModification(_C,arguments)},spin:function(){return this._applyModification(RC,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(jC,arguments)},complement:function(){return this._applyCombination(MC,arguments)},monochromatic:function(){return this._applyCombination(IC,arguments)},splitcomplement:function(){return this._applyCombination(PC,arguments)},triad:function(){return this._applyCombination(Ai,[3])},tetrad:function(){return this._applyCombination(Ai,[4])}};F.fromRatio=function(e,t){if(dr(e)=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=Pt(e[n]));e=r}return F(e,t)};function yC(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,i=null,o=!1,s=!1;return typeof e=="string"&&(e=NC(e)),dr(e)=="object"&&(je(e.r)&&je(e.g)&&je(e.b)?(t=xC(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):je(e.h)&&je(e.s)&&je(e.v)?(n=Pt(e.s),a=Pt(e.v),t=CC(e.h,n,a),o=!0,s="hsv"):je(e.h)&&je(e.s)&&je(e.l)&&(n=Pt(e.s),i=Pt(e.l),t=wC(e.h,n,i),o=!0,s="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ls(r),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function xC(e,t,r){return{r:se(e,255)*255,g:se(t,255)*255,b:se(r,255)*255}}function $i(e,t,r){e=se(e,255),t=se(t,255),r=se(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),i,o,s=(n+a)/2;if(n==a)i=o=0;else{var l=n-a;switch(o=s>.5?l/(2-n-a):l/(n+a),n){case e:i=(t-r)/l+(t<r?6:0);break;case t:i=(r-e)/l+2;break;case r:i=(e-t)/l+4;break}i/=6}return{h:i,s:o,l:s}}function wC(e,t,r){var n,a,i;e=se(e,360),t=se(t,100),r=se(r,100);function o(u,f,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?u+(f-u)*6*d:d<1/2?f:d<2/3?u+(f-u)*(2/3-d)*6:u}if(t===0)n=a=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=o(l,s,e+1/3),a=o(l,s,e),i=o(l,s,e-1/3)}return{r:n*255,g:a*255,b:i*255}}function _i(e,t,r){e=se(e,255),t=se(t,255),r=se(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),i,o,s=n,l=n-a;if(o=n===0?0:l/n,n==a)i=0;else{switch(n){case e:i=(t-r)/l+(t<r?6:0);break;case t:i=(r-e)/l+2;break;case r:i=(e-t)/l+4;break}i/=6}return{h:i,s:o,v:s}}function CC(e,t,r){e=se(e,360)*6,t=se(t,100),r=se(r,100);var n=Math.floor(e),a=e-n,i=r*(1-t),o=r*(1-a*t),s=r*(1-(1-a)*t),l=n%6,u=[r,o,i,i,s,r][l],f=[s,r,r,o,i,i][l],d=[i,i,s,r,r,o][l];return{r:u*255,g:f*255,b:d*255}}function Oi(e,t,r,n){var a=[_e(Math.round(e).toString(16)),_e(Math.round(t).toString(16)),_e(Math.round(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function SC(e,t,r,n,a){var i=[_e(Math.round(e).toString(16)),_e(Math.round(t).toString(16)),_e(Math.round(r).toString(16)),_e(cs(n))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function Ti(e,t,r,n){var a=[_e(cs(n)),_e(Math.round(e).toString(16)),_e(Math.round(t).toString(16)),_e(Math.round(r).toString(16))];return a.join("")}F.equals=function(e,t){return!e||!t?!1:F(e).toRgbString()==F(t).toRgbString()};F.random=function(){return F.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function EC(e,t){t=t===0?0:t||10;var r=F(e).toHsl();return r.s-=t/100,r.s=Tr(r.s),F(r)}function $C(e,t){t=t===0?0:t||10;var r=F(e).toHsl();return r.s+=t/100,r.s=Tr(r.s),F(r)}function _C(e){return F(e).desaturate(100)}function OC(e,t){t=t===0?0:t||10;var r=F(e).toHsl();return r.l+=t/100,r.l=Tr(r.l),F(r)}function TC(e,t){t=t===0?0:t||10;var r=F(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),F(r)}function AC(e,t){t=t===0?0:t||10;var r=F(e).toHsl();return r.l-=t/100,r.l=Tr(r.l),F(r)}function RC(e,t){var r=F(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,F(r)}function MC(e){var t=F(e).toHsl();return t.h=(t.h+180)%360,F(t)}function Ai(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=F(e).toHsl(),n=[F(e)],a=360/t,i=1;i<t;i++)n.push(F({h:(r.h+i*a)%360,s:r.s,l:r.l}));return n}function PC(e){var t=F(e).toHsl(),r=t.h;return[F(e),F({h:(r+72)%360,s:t.s,l:t.l}),F({h:(r+216)%360,s:t.s,l:t.l})]}function jC(e,t,r){t=t||6,r=r||30;var n=F(e).toHsl(),a=360/r,i=[F(e)];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(F(n));return i}function IC(e,t){t=t||6;for(var r=F(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/t;t--;)o.push(F({h:n,s:a,v:i})),i=(i+s)%1;return o}F.mix=function(e,t,r){r=r===0?0:r||50;var n=F(e).toRgb(),a=F(t).toRgb(),i=r/100,o={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return F(o)};F.readability=function(e,t){var r=F(e),n=F(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};F.isReadable=function(e,t,r){var n=F.readability(e,t),a,i;switch(i=!1,a=HC(r),a.level+a.size){case"AAsmall":case"AAAlarge":i=n>=4.5;break;case"AAlarge":i=n>=3;break;case"AAAsmall":i=n>=7;break}return i};F.mostReadable=function(e,t,r){var n=null,a=0,i,o,s,l;r=r||{},o=r.includeFallbackColors,s=r.level,l=r.size;for(var u=0;u<t.length;u++)i=F.readability(e,t[u]),i>a&&(a=i,n=F(t[u]));return F.isReadable(e,n,{level:s,size:l})||!o?n:(r.includeFallbackColors=!1,F.mostReadable(e,["#fff","#000"],r))};var an=F.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},kC=F.hexNames=FC(an);function FC(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function ls(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function se(e,t){LC(e)&&(e="100%");var r=DC(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Tr(e){return Math.min(1,Math.max(0,e))}function xe(e){return parseInt(e,16)}function LC(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function DC(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _e(e){return e.length==1?"0"+e:""+e}function Pt(e){return e<=1&&(e=e*100+"%"),e}function cs(e){return Math.round(parseFloat(e)*255).toString(16)}function Ri(e){return xe(e)/255}var $e=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function je(e){return!!$e.CSS_UNIT.exec(e)}function NC(e){e=e.replace(bC,"").replace(mC,"").toLowerCase();var t=!1;if(an[e])e=an[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=$e.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=$e.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=$e.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=$e.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=$e.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=$e.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=$e.hex8.exec(e))?{r:xe(r[1]),g:xe(r[2]),b:xe(r[3]),a:Ri(r[4]),format:t?"name":"hex8"}:(r=$e.hex6.exec(e))?{r:xe(r[1]),g:xe(r[2]),b:xe(r[3]),format:t?"name":"hex"}:(r=$e.hex4.exec(e))?{r:xe(r[1]+""+r[1]),g:xe(r[2]+""+r[2]),b:xe(r[3]+""+r[3]),a:Ri(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=$e.hex3.exec(e))?{r:xe(r[1]+""+r[1]),g:xe(r[2]+""+r[2]),b:xe(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function HC(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var Mi=function(t){var r=["r","g","b","a","h","s","l","v"],n=0,a=0;return vC(r,function(i){if(t[i]&&(n+=1,isNaN(t[i])||(a+=1),i==="s"||i==="l")){var o=/^\d+%$/;o.test(t[i])&&(a+=1)}}),n===a?t:!1},jt=function(t,r){var n=t.hex?F(t.hex):F(t),a=n.toHsl(),i=n.toHsv(),o=n.toRgb(),s=n.toHex();a.s===0&&(a.h=r||0,i.h=r||0);var l=s==="000000"&&o.a===0;return{hsl:a,hex:l?"transparent":"#"+s,rgb:o,hsv:i,oldHue:t.h||r||a.h,source:t.source}},ze=function(t){if(t==="transparent")return!0;var r=String(t).charAt(0)==="#"?1:0;return t.length!==4+r&&t.length<7+r&&F(t).isValid()},Nn=function(t){if(!t)return"#fff";var r=jt(t);if(r.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(r.rgb.r*299+r.rgb.g*587+r.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},Kr=function(t,r){var n=t.replace("°","");return F(r+" ("+n+")")._ok},Rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},BC=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function zC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GC(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function UC(e,t){if(typeof t!="function"&&t!==null)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 me=function(t){var r=function(n){UC(a,n);function a(i){zC(this,a);var o=GC(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return o.handleChange=function(s,l){var u=Mi(s);if(u){var f=jt(s,s.h||o.state.oldHue);o.setState(f),o.props.onChangeComplete&&o.debounce(o.props.onChangeComplete,f,l),o.props.onChange&&o.props.onChange(f,l)}},o.handleSwatchHover=function(s,l){var u=Mi(s);if(u){var f=jt(s,s.h||o.state.oldHue);o.props.onSwatchHover&&o.props.onSwatchHover(f,l)}},o.state=Rt({},jt(i.color,0)),o.debounce=os(function(s,l,u){s(l,u)},100),o}return BC(a,[{key:"render",value:function(){var o={};return this.props.onSwatchHover&&(o.onSwatchHover=this.handleSwatchHover),c.createElement(t,Rt({},this.props,this.state,{onChange:this.handleChange},o))}}],[{key:"getDerivedStateFromProps",value:function(o,s){return Rt({},jt(o.color,s.oldHue))}}]),a}(c.PureComponent||c.Component);return r.propTypes=Rt({},t.propTypes),r.defaultProps=Rt({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),r},VC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WC=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function qC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pi(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function KC(e,t){if(typeof t!="function"&&t!==null)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 YC=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){KC(a,n);function a(){var i,o,s,l;qC(this,a);for(var u=arguments.length,f=Array(u),d=0;d<u;d++)f[d]=arguments[d];return l=(o=(s=Pi(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(f))),s),s.state={focus:!1},s.handleFocus=function(){return s.setState({focus:!0})},s.handleBlur=function(){return s.setState({focus:!1})},o),Pi(s,l)}return WC(a,[{key:"render",value:function(){return c.createElement(r,{onFocus:this.handleFocus,onBlur:this.handleBlur},c.createElement(t,VC({},this.props,this.state)))}}]),a}(c.Component)},ji=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},XC=13,ZC=function(t){var r=t.color,n=t.style,a=t.onClick,i=a===void 0?function(){}:a,o=t.onHover,s=t.title,l=s===void 0?r:s,u=t.children,f=t.focus,d=t.focusStyle,p=d===void 0?{}:d,v=r==="transparent",h=G({default:{swatch:ji({background:r,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,f?p:{})}}),m=function(R){return i(r,R)},b=function(R){return R.keyCode===XC&&i(r,R)},x=function(R){return o(r,R)},S={};return o&&(S.onMouseOver=x),c.createElement("div",ji({style:h.swatch,onClick:m,title:l,tabIndex:0,onKeyDown:b},S),u,v&&c.createElement(St,{borderRadius:h.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const Xe=YC(ZC);var JC=function(t){var r=t.direction,n=G({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return c.createElement("div",{style:n.picker})},QC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},us=function(t){var r=t.rgb,n=t.hsl,a=t.width,i=t.height,o=t.onChange,s=t.direction,l=t.style,u=t.renderers,f=t.pointer,d=t.className,p=d===void 0?"":d,v=G({default:{picker:{position:"relative",width:a,height:i},alpha:{radius:"2px",style:l}}});return c.createElement("div",{style:v.picker,className:"alpha-picker "+p},c.createElement(Mn,QC({},v.alpha,{rgb:r,hsl:n,pointer:f,renderers:u,onChange:o,direction:s})))};us.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:JC};me(us);function fs(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var eS="__lodash_hash_undefined__";function tS(e){return this.__data__.set(e,eS),this}function rS(e){return this.__data__.has(e)}function hr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Le;++t<r;)this.add(e[t])}hr.prototype.add=hr.prototype.push=tS;hr.prototype.has=rS;function nS(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function aS(e,t){return e.has(t)}var iS=1,oS=2;function ds(e,t,r,n,a,i){var o=r&iS,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,v=r&oS?new hr:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],m=t[d];if(n)var b=o?n(m,h,d,t,e,i):n(h,m,d,e,t,i);if(b!==void 0){if(b)continue;p=!1;break}if(v){if(!nS(t,function(x,S){if(!aS(v,S)&&(h===x||a(h,x,r,n,i)))return v.push(S)})){p=!1;break}}else if(!(h===m||a(h,m,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}function sS(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function lS(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var cS=1,uS=2,fS="[object Boolean]",dS="[object Date]",hS="[object Error]",pS="[object Map]",gS="[object Number]",vS="[object RegExp]",bS="[object Set]",mS="[object String]",yS="[object Symbol]",xS="[object ArrayBuffer]",wS="[object DataView]",Ii=He?He.prototype:void 0,Yr=Ii?Ii.valueOf:void 0;function CS(e,t,r,n,a,i,o){switch(r){case wS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xS:return!(e.byteLength!=t.byteLength||!i(new cr(e),new cr(t)));case fS:case dS:case gS:return Vt(+e,+t);case hS:return e.name==t.name&&e.message==t.message;case vS:case mS:return e==t+"";case pS:var s=sS;case bS:var l=n&cS;if(s||(s=lS),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=uS,o.set(e,t);var f=ds(s(e),s(t),n,a,i,o);return o.delete(e),f;case yS:if(Yr)return Yr.call(e)==Yr.call(t)}return!1}function SS(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function ES(e,t,r){var n=t(e);return we(e)?n:SS(n,r(e))}function $S(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}function _S(){return[]}var OS=Object.prototype,TS=OS.propertyIsEnumerable,ki=Object.getOwnPropertySymbols,AS=ki?function(e){return e==null?[]:(e=Object(e),$S(ki(e),function(t){return TS.call(e,t)}))}:_S;function Fi(e){return ES(e,Dn,AS)}var RS=1,MS=Object.prototype,PS=MS.hasOwnProperty;function jS(e,t,r,n,a,i){var o=r&RS,s=Fi(e),l=s.length,u=Fi(t),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=s[d];if(!(o?p in t:PS.call(t,p)))return!1}var v=i.get(e),h=i.get(t);if(v&&h)return v==t&&h==e;var m=!0;i.set(e,t),i.set(t,e);for(var b=o;++d<l;){p=s[d];var x=e[p],S=t[p];if(n)var E=o?n(S,x,p,t,e,i):n(x,S,p,e,t,i);if(!(E===void 0?x===S||a(x,S,r,n,i):E)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){var R=e.constructor,w=t.constructor;R!=w&&"constructor"in e&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof w=="function"&&w instanceof w)&&(m=!1)}return i.delete(e),i.delete(t),m}var on=Ye(Te,"DataView"),sn=Ye(Te,"Promise"),ln=Ye(Te,"Set"),cn=Ye(Te,"WeakMap"),Li="[object Map]",IS="[object Object]",Di="[object Promise]",Ni="[object Set]",Hi="[object WeakMap]",Bi="[object DataView]",kS=Ke(on),FS=Ke(Ft),LS=Ke(sn),DS=Ke(ln),NS=Ke(cn),Ne=qe;(on&&Ne(new on(new ArrayBuffer(1)))!=Bi||Ft&&Ne(new Ft)!=Li||sn&&Ne(sn.resolve())!=Di||ln&&Ne(new ln)!=Ni||cn&&Ne(new cn)!=Hi)&&(Ne=function(e){var t=qe(e),r=t==IS?e.constructor:void 0,n=r?Ke(r):"";if(n)switch(n){case kS:return Bi;case FS:return Li;case LS:return Di;case DS:return Ni;case NS:return Hi}return t});var HS=1,zi="[object Arguments]",Gi="[object Array]",Jt="[object Object]",BS=Object.prototype,Ui=BS.hasOwnProperty;function zS(e,t,r,n,a,i){var o=we(e),s=we(t),l=o?Gi:Ne(e),u=s?Gi:Ne(t);l=l==zi?Jt:l,u=u==zi?Jt:u;var f=l==Jt,d=u==Jt,p=l==u;if(p&&fr(e)){if(!fr(t))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new Me),o||Fn(e)?ds(e,t,r,n,a,i):CS(e,t,l,r,n,a,i);if(!(r&HS)){var v=f&&Ui.call(e,"__wrapped__"),h=d&&Ui.call(t,"__wrapped__");if(v||h){var m=v?e.value():e,b=h?t.value():t;return i||(i=new Me),a(m,b,r,n,i)}}return p?(i||(i=new Me),jS(e,t,r,n,a,i)):!1}function Hn(e,t,r,n,a){return e===t?!0:e==null||t==null||!Be(e)&&!Be(t)?e!==e&&t!==t:zS(e,t,r,n,Hn,a)}var GS=1,US=2;function VS(e,t,r,n){var a=r.length,i=a;if(e==null)return!i;for(e=Object(e);a--;){var o=r[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){o=r[a];var s=o[0],l=e[s],u=o[1];if(o[2]){if(l===void 0&&!(s in e))return!1}else{var f=new Me,d;if(!(d===void 0?Hn(u,l,GS|US,n,f):d))return!1}}return!0}function hs(e){return e===e&&!Ee(e)}function WS(e){for(var t=Dn(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,hs(a)]}return t}function ps(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function qS(e){var t=WS(e);return t.length==1&&t[0][2]?ps(t[0][0],t[0][1]):function(r){return r===e||VS(r,e,t)}}var KS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,YS=/^\w*$/;function Bn(e,t){if(we(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||_r(e)?!0:YS.test(e)||!KS.test(e)||t!=null&&e in Object(t)}var XS="Expected a function";function zn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(XS);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(zn.Cache||Le),r}zn.Cache=Le;var ZS=500;function JS(e){var t=zn(e,function(n){return r.size===ZS&&r.clear(),n}),r=t.cache;return t}var QS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eE=/\\(\\)?/g,tE=JS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(QS,function(r,n,a,i){t.push(a?i.replace(eE,"$1"):n||r)}),t}),Vi=He?He.prototype:void 0,Wi=Vi?Vi.toString:void 0;function gs(e){if(typeof e=="string")return e;if(we(e))return fs(e,gs)+"";if(_r(e))return Wi?Wi.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function rE(e){return e==null?"":gs(e)}function vs(e,t){return we(e)?e:Bn(e,t)?[e]:tE(rE(e))}function Ar(e){if(typeof e=="string"||_r(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function bs(e,t){t=vs(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Ar(t[r++])];return r&&r==n?e:void 0}function nE(e,t,r){var n=e==null?void 0:bs(e,t);return n===void 0?r:n}function aE(e,t){return e!=null&&t in Object(e)}function iE(e,t,r){t=vs(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=Ar(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&kn(a)&&Ln(o,a)&&(we(e)||ur(e)))}function oE(e,t){return e!=null&&iE(e,t,aE)}var sE=1,lE=2;function cE(e,t){return Bn(e)&&hs(t)?ps(Ar(e),t):function(r){var n=nE(r,e);return n===void 0&&n===t?oE(r,e):Hn(t,n,sE|lE)}}function uE(e){return function(t){return t==null?void 0:t[e]}}function fE(e){return function(t){return bs(t,e)}}function dE(e){return Bn(e)?uE(Ar(e)):fE(e)}function hE(e){return typeof e=="function"?e:e==null?$r:typeof e=="object"?we(e)?cE(e[0],e[1]):qS(e):dE(e)}function pE(e,t){var r=-1,n=$t(e)?Array(e.length):[];return ss(e,function(a,i,o){n[++r]=t(a,i,o)}),n}function Ze(e,t){var r=we(e)?fs:pE;return r(e,hE(t))}var gE=function(t){var r=t.colors,n=t.onClick,a=t.onSwatchHover,i=G({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return c.createElement("div",{style:i.swatches},Ze(r,function(o){return c.createElement(Xe,{key:o,color:o,style:i.swatch,onClick:n,onHover:a,focusStyle:{boxShadow:"0 0 4px "+o}})}),c.createElement("div",{style:i.clear}))},Gn=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.hex,i=t.colors,o=t.width,s=t.triangle,l=t.styles,u=l===void 0?{}:l,f=t.className,d=f===void 0?"":f,p=a==="transparent",v=function(b,x){ze(b)&&r({hex:b,source:"hex"},x)},h=G(be({default:{card:{width:o,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:a,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Nn(a),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+a+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},u),{"hide-triangle":s==="hide"});return c.createElement("div",{style:h.card,className:"block-picker "+d},c.createElement("div",{style:h.triangle}),c.createElement("div",{style:h.head},p&&c.createElement(St,{borderRadius:"6px 6px 0 0"}),c.createElement("div",{style:h.label},a)),c.createElement("div",{style:h.body},c.createElement(gE,{colors:i,onClick:v,onSwatchHover:n}),c.createElement(Y,{style:{input:h.input},value:a,onChange:v})))};Gn.propTypes={width:$.oneOfType([$.string,$.number]),colors:$.arrayOf($.string),triangle:$.oneOf(["top","hide"]),styles:$.object};Gn.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};me(Gn);var Qe={100:"#ffcdd2",300:"#e57373",500:"#f44336",700:"#d32f2f",900:"#b71c1c"},et={100:"#f8bbd0",300:"#f06292",500:"#e91e63",700:"#c2185b",900:"#880e4f"},tt={100:"#e1bee7",300:"#ba68c8",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},rt={100:"#d1c4e9",300:"#9575cd",500:"#673ab7",700:"#512da8",900:"#311b92"},nt={100:"#c5cae9",300:"#7986cb",500:"#3f51b5",700:"#303f9f",900:"#1a237e"},at={100:"#bbdefb",300:"#64b5f6",500:"#2196f3",700:"#1976d2",900:"#0d47a1"},it={100:"#b3e5fc",300:"#4fc3f7",500:"#03a9f4",700:"#0288d1",900:"#01579b"},ot={100:"#b2ebf2",300:"#4dd0e1",500:"#00bcd4",700:"#0097a7",900:"#006064"},st={100:"#b2dfdb",300:"#4db6ac",500:"#009688",700:"#00796b",900:"#004d40"},It={100:"#c8e6c9",300:"#81c784",500:"#4caf50",700:"#388e3c"},lt={100:"#dcedc8",300:"#aed581",500:"#8bc34a",700:"#689f38",900:"#33691e"},ct={100:"#f0f4c3",300:"#dce775",500:"#cddc39",700:"#afb42b",900:"#827717"},ut={100:"#fff9c4",300:"#fff176",500:"#ffeb3b",700:"#fbc02d",900:"#f57f17"},ft={100:"#ffecb3",300:"#ffd54f",500:"#ffc107",700:"#ffa000",900:"#ff6f00"},dt={100:"#ffe0b2",300:"#ffb74d",500:"#ff9800",700:"#f57c00",900:"#e65100"},ht={100:"#ffccbc",300:"#ff8a65",500:"#ff5722",700:"#e64a19",900:"#bf360c"},pt={100:"#d7ccc8",300:"#a1887f",500:"#795548",700:"#5d4037",900:"#3e2723"},gt={100:"#cfd8dc",300:"#90a4ae",500:"#607d8b",700:"#455a64",900:"#263238"},ms=function(t){var r=t.color,n=t.onClick,a=t.onSwatchHover,i=t.hover,o=t.active,s=t.circleSize,l=t.circleSpacing,u=G({default:{swatch:{width:s,height:s,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/2+1)+"px "+r,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+r}}},{hover:i,active:o});return c.createElement("div",{style:u.swatch},c.createElement(Xe,{style:u.Swatch,color:r,onClick:n,onHover:a,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+r}}))};ms.defaultProps={circleSize:28,circleSpacing:14};const vE=Rn(ms);var Un=function(t){var r=t.width,n=t.onChange,a=t.onSwatchHover,i=t.colors,o=t.hex,s=t.circleSize,l=t.styles,u=l===void 0?{}:l,f=t.circleSpacing,d=t.className,p=d===void 0?"":d,v=G(be({default:{card:{width:r,display:"flex",flexWrap:"wrap",marginRight:-f,marginBottom:-f}}},u)),h=function(b,x){return n({hex:b,source:"hex"},x)};return c.createElement("div",{style:v.card,className:"circle-picker "+p},Ze(i,function(m){return c.createElement(vE,{key:m,color:m,onClick:h,onSwatchHover:a,active:o===m.toLowerCase(),circleSize:s,circleSpacing:f})}))};Un.propTypes={width:$.oneOfType([$.string,$.number]),circleSize:$.number,circleSpacing:$.number,styles:$.object};Un.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[Qe[500],et[500],tt[500],rt[500],nt[500],at[500],it[500],ot[500],st[500],It[500],lt[500],ct[500],ut[500],ft[500],dt[500],ht[500],pt[500],gt[500]],styles:{}};me(Un);function qi(e){return e===void 0}var ys={};Object.defineProperty(ys,"__esModule",{value:!0});var Ki=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bE=c,Yi=mE(bE);function mE(e){return e&&e.__esModule?e:{default:e}}function yE(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var Qt=24,xE=ys.default=function(e){var t=e.fill,r=t===void 0?"currentColor":t,n=e.width,a=n===void 0?Qt:n,i=e.height,o=i===void 0?Qt:i,s=e.style,l=s===void 0?{}:s,u=yE(e,["fill","width","height","style"]);return Yi.default.createElement("svg",Ki({viewBox:"0 0 "+Qt+" "+Qt,style:Ki({fill:r,width:a,height:o},l)},u),Yi.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},wE=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function CE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SE(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function EE(e,t){if(typeof t!="function"&&t!==null)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 xs=function(e){EE(t,e);function t(r){CE(this,t);var n=SE(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){n.state.view==="hex"?n.setState({view:"rgb"}):n.state.view==="rgb"?n.setState({view:"hsl"}):n.state.view==="hsl"&&(n.props.hsl.a===1?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(a,i){a.hex?ze(a.hex)&&n.props.onChange({hex:a.hex,source:"hex"},i):a.r||a.g||a.b?n.props.onChange({r:a.r||n.props.rgb.r,g:a.g||n.props.rgb.g,b:a.b||n.props.rgb.b,source:"rgb"},i):a.a?(a.a<0?a.a=0:a.a>1&&(a.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(a.a*100)/100,source:"rgb"},i)):(a.h||a.s||a.l)&&(typeof a.s=="string"&&a.s.includes("%")&&(a.s=a.s.replace("%","")),typeof a.l=="string"&&a.l.includes("%")&&(a.l=a.l.replace("%","")),a.s==1?a.s=.01:a.l==1&&(a.l=.01),n.props.onChange({h:a.h||n.props.hsl.h,s:Number(qi(a.s)?n.props.hsl.s:a.s),l:Number(qi(a.l)?n.props.hsl.l:a.l),source:"hsl"},i))},n.showHighlight=function(a){a.currentTarget.style.background="#eee"},n.hideHighlight=function(a){a.currentTarget.style.background="transparent"},r.hsl.a!==1&&r.view==="hex"?n.state={view:"rgb"}:n.state={view:r.view},n}return wE(t,[{key:"render",value:function(){var n=this,a=G({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(Y,{style:{input:a.input,label:a.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(Y,{style:{input:a.input,label:a.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(Y,{style:{input:a.input,label:a.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(Y,{style:{input:a.input,label:a.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),c.createElement("div",{style:a.alpha},c.createElement(Y,{style:{input:a.input,label:a.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(Y,{style:{input:a.input,label:a.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(Y,{style:{input:a.input,label:a.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(Y,{style:{input:a.input,label:a.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),c.createElement("div",{style:a.alpha},c.createElement(Y,{style:{input:a.input,label:a.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),c.createElement("div",{style:a.wrap,className:"flexbox-fix"},i,c.createElement("div",{style:a.toggle},c.createElement("div",{style:a.icon,onClick:this.toggleViews,ref:function(s){return n.icon=s}},c.createElement(xE,{style:a.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.hsl.a!==1&&a.view==="hex"?{view:"rgb"}:null}}]),t}(c.Component);xs.defaultProps={view:"hex"};var Xi=function(){var t=G({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return c.createElement("div",{style:t.picker})},$E=function(){var t=G({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return c.createElement("div",{style:t.picker})},Vn=function(t){var r=t.width,n=t.onChange,a=t.disableAlpha,i=t.rgb,o=t.hsl,s=t.hsv,l=t.hex,u=t.renderers,f=t.styles,d=f===void 0?{}:f,p=t.className,v=p===void 0?"":p,h=t.defaultView,m=G(be({default:{picker:{width:r,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:a});return c.createElement("div",{style:m.picker,className:"chrome-picker "+v},c.createElement("div",{style:m.saturation},c.createElement(Or,{style:m.Saturation,hsl:o,hsv:s,pointer:$E,onChange:n})),c.createElement("div",{style:m.body},c.createElement("div",{style:m.controls,className:"flexbox-fix"},c.createElement("div",{style:m.color},c.createElement("div",{style:m.swatch},c.createElement("div",{style:m.active}),c.createElement(St,{renderers:u}))),c.createElement("div",{style:m.toggles},c.createElement("div",{style:m.hue},c.createElement(Et,{style:m.Hue,hsl:o,pointer:Xi,onChange:n})),c.createElement("div",{style:m.alpha},c.createElement(Mn,{style:m.Alpha,rgb:i,hsl:o,pointer:Xi,renderers:u,onChange:n})))),c.createElement(xs,{rgb:i,hsl:o,hex:l,view:h,onChange:n,disableAlpha:a})))};Vn.propTypes={width:$.oneOfType([$.string,$.number]),disableAlpha:$.bool,styles:$.object,defaultView:$.oneOf(["hex","rgb","hsl"])};Vn.defaultProps={width:225,disableAlpha:!1,styles:{}};me(Vn);var _E=function(t){var r=t.color,n=t.onClick,a=n===void 0?function(){}:n,i=t.onSwatchHover,o=t.active,s=G({default:{color:{background:r,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Nn(r),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return c.createElement(Xe,{style:s.color,color:r,onClick:a,onHover:i,focusStyle:{boxShadow:"0 0 4px "+r}},c.createElement("div",{style:s.dot}))},OE=function(t){var r=t.hex,n=t.rgb,a=t.onChange,i=G({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:r},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(l,u){l.r||l.g||l.b?a({r:l.r||n.r,g:l.g||n.g,b:l.b||n.b,source:"rgb"},u):a({hex:l.hex,source:"hex"},u)};return c.createElement("div",{style:i.fields,className:"flexbox-fix"},c.createElement("div",{style:i.active}),c.createElement(Y,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:r,onChange:o}),c.createElement(Y,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:o}),c.createElement(Y,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:o}),c.createElement(Y,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:o}))},Wn=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.colors,i=t.hex,o=t.rgb,s=t.styles,l=s===void 0?{}:s,u=t.className,f=u===void 0?"":u,d=G(be({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),p=function(h,m){h.hex?ze(h.hex)&&r({hex:h.hex,source:"hex"},m):r(h,m)};return c.createElement(Wt,{style:d.Compact,styles:l},c.createElement("div",{style:d.compact,className:"compact-picker "+f},c.createElement("div",null,Ze(a,function(v){return c.createElement(_E,{key:v,color:v,active:v.toLowerCase()===i,onClick:p,onSwatchHover:n})}),c.createElement("div",{style:d.clear})),c.createElement(OE,{hex:i,rgb:o,onChange:p})))};Wn.propTypes={colors:$.arrayOf($.string),styles:$.object};Wn.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};me(Wn);var TE=function(t){var r=t.hover,n=t.color,a=t.onClick,i=t.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=G({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:r});return c.createElement("div",{style:s.swatch},c.createElement(Xe,{color:n,onClick:a,onHover:i,focusStyle:o}))};const AE=Rn(TE);var qn=function(t){var r=t.width,n=t.colors,a=t.onChange,i=t.onSwatchHover,o=t.triangle,s=t.styles,l=s===void 0?{}:s,u=t.className,f=u===void 0?"":u,d=G(be({default:{card:{width:r,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":o==="hide","top-left-triangle":o==="top-left","top-right-triangle":o==="top-right","bottom-left-triangle":o==="bottom-left","bottom-right-triangle":o==="bottom-right"}),p=function(h,m){return a({hex:h,source:"hex"},m)};return c.createElement("div",{style:d.card,className:"github-picker "+f},c.createElement("div",{style:d.triangleShadow}),c.createElement("div",{style:d.triangle}),Ze(n,function(v){return c.createElement(AE,{color:v,key:v,onClick:p,onSwatchHover:i})}))};qn.propTypes={width:$.oneOfType([$.string,$.number]),colors:$.arrayOf($.string),triangle:$.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:$.object};qn.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};me(qn);var RE=function(t){var r=t.direction,n=G({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:r==="vertical"});return c.createElement("div",{style:n.picker})},ME=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kn=function(t){var r=t.width,n=t.height,a=t.onChange,i=t.hsl,o=t.direction,s=t.pointer,l=t.styles,u=l===void 0?{}:l,f=t.className,d=f===void 0?"":f,p=G(be({default:{picker:{position:"relative",width:r,height:n},hue:{radius:"2px"}}},u)),v=function(m){return a({a:1,h:m.h,l:.5,s:1})};return c.createElement("div",{style:p.picker,className:"hue-picker "+d},c.createElement(Et,ME({},p.hue,{hsl:i,pointer:s,onChange:v,direction:o})))};Kn.propTypes={styles:$.object};Kn.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:RE,styles:{}};me(Kn);var PE=function(t){var r=t.onChange,n=t.hex,a=t.rgb,i=t.styles,o=i===void 0?{}:i,s=t.className,l=s===void 0?"":s,u=G(be({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},o)),f=function(p,v){p.hex?ze(p.hex)&&r({hex:p.hex,source:"hex"},v):(p.r||p.g||p.b)&&r({r:p.r||a.r,g:p.g||a.g,b:p.b||a.b,source:"rgb"},v)};return c.createElement(Wt,{styles:o},c.createElement("div",{style:u.material,className:"material-picker "+l},c.createElement(Y,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:n,onChange:f}),c.createElement("div",{style:u.split,className:"flexbox-fix"},c.createElement("div",{style:u.third},c.createElement(Y,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:a.r,onChange:f})),c.createElement("div",{style:u.third},c.createElement(Y,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:a.g,onChange:f})),c.createElement("div",{style:u.third},c.createElement(Y,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:a.b,onChange:f})))))};me(PE);var jE=function(t){var r=t.onChange,n=t.rgb,a=t.hsv,i=t.hex,o=G({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),s=function(u,f){u["#"]?ze(u["#"])&&r({hex:u["#"],source:"hex"},f):u.r||u.g||u.b?r({r:u.r||n.r,g:u.g||n.g,b:u.b||n.b,source:"rgb"},f):(u.h||u.s||u.v)&&r({h:u.h||a.h,s:u.s||a.s,v:u.v||a.v,source:"hsv"},f)};return c.createElement("div",{style:o.fields},c.createElement(Y,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"h",value:Math.round(a.h),onChange:s}),c.createElement(Y,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"s",value:Math.round(a.s*100),onChange:s}),c.createElement(Y,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"v",value:Math.round(a.v*100),onChange:s}),c.createElement("div",{style:o.divider}),c.createElement(Y,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:s}),c.createElement(Y,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:s}),c.createElement(Y,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:s}),c.createElement("div",{style:o.divider}),c.createElement(Y,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"#",value:i.replace("#",""),onChange:s}),c.createElement("div",{style:o.fieldSymbols},c.createElement("div",{style:o.symbol},"°"),c.createElement("div",{style:o.symbol},"%"),c.createElement("div",{style:o.symbol},"%")))},IE=function(t){var r=t.hsl,n=G({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":r.l>.5});return c.createElement("div",{style:n.picker})},kE=function(){var t=G({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return c.createElement("div",{style:t.pointer},c.createElement("div",{style:t.left},c.createElement("div",{style:t.leftInside})),c.createElement("div",{style:t.right},c.createElement("div",{style:t.rightInside})))},Zi=function(t){var r=t.onClick,n=t.label,a=t.children,i=t.active,o=G({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return c.createElement("div",{style:o.button,onClick:r},n||a)},FE=function(t){var r=t.rgb,n=t.currentColor,a=G({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+r.r+","+r.g+", "+r.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return c.createElement("div",null,c.createElement("div",{style:a.label},"new"),c.createElement("div",{style:a.swatches},c.createElement("div",{style:a.new}),c.createElement("div",{style:a.current})),c.createElement("div",{style:a.label},"current"))},LE=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function DE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NE(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function HE(e,t){if(typeof t!="function"&&t!==null)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 Yn=function(e){HE(t,e);function t(r){DE(this,t);var n=NE(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:r.hex},n}return LE(t,[{key:"render",value:function(){var n=this.props,a=n.styles,i=a===void 0?{}:a,o=n.className,s=o===void 0?"":o,l=G(be({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return c.createElement("div",{style:l.picker,className:"photoshop-picker "+s},c.createElement("div",{style:l.head},this.props.header),c.createElement("div",{style:l.body,className:"flexbox-fix"},c.createElement("div",{style:l.saturation},c.createElement(Or,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:IE,onChange:this.props.onChange})),c.createElement("div",{style:l.hue},c.createElement(Et,{direction:"vertical",hsl:this.props.hsl,pointer:kE,onChange:this.props.onChange})),c.createElement("div",{style:l.controls},c.createElement("div",{style:l.top,className:"flexbox-fix"},c.createElement("div",{style:l.previews},c.createElement(FE,{rgb:this.props.rgb,currentColor:this.state.currentColor})),c.createElement("div",{style:l.actions},c.createElement(Zi,{label:"OK",onClick:this.props.onAccept,active:!0}),c.createElement(Zi,{label:"Cancel",onClick:this.props.onCancel}),c.createElement(jE,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(c.Component);Yn.propTypes={header:$.string,styles:$.object};Yn.defaultProps={header:"Color Picker",styles:{}};me(Yn);var BE=function(t){var r=t.onChange,n=t.rgb,a=t.hsl,i=t.hex,o=t.disableAlpha,s=G({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:o}),l=function(f,d){f.hex?ze(f.hex)&&r({hex:f.hex,source:"hex"},d):f.r||f.g||f.b?r({r:f.r||n.r,g:f.g||n.g,b:f.b||n.b,a:n.a,source:"rgb"},d):f.a&&(f.a<0?f.a=0:f.a>100&&(f.a=100),f.a/=100,r({h:a.h,s:a.s,l:a.l,a:f.a,source:"rgb"},d))};return c.createElement("div",{style:s.fields,className:"flexbox-fix"},c.createElement("div",{style:s.double},c.createElement(Y,{style:{input:s.input,label:s.label},label:"hex",value:i.replace("#",""),onChange:l})),c.createElement("div",{style:s.single},c.createElement(Y,{style:{input:s.input,label:s.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:s.single},c.createElement(Y,{style:{input:s.input,label:s.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:s.single},c.createElement(Y,{style:{input:s.input,label:s.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:s.alpha},c.createElement(Y,{style:{input:s.input,label:s.label},label:"a",value:Math.round(n.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},zE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ws=function(t){var r=t.colors,n=t.onClick,a=n===void 0?function(){}:n,i=t.onSwatchHover,o=G({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!r||!r.length}),s=function(u,f){a({hex:u,source:"hex"},f)};return c.createElement("div",{style:o.colors,className:"flexbox-fix"},r.map(function(l){var u=typeof l=="string"?{color:l}:l,f=""+u.color+(u.title||"");return c.createElement("div",{key:f,style:o.swatchWrap},c.createElement(Xe,zE({},u,{style:o.swatch,onClick:s,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+u.color}})))}))};ws.propTypes={colors:$.arrayOf($.oneOfType([$.string,$.shape({color:$.string,title:$.string})])).isRequired};var GE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xn=function(t){var r=t.width,n=t.rgb,a=t.hex,i=t.hsv,o=t.hsl,s=t.onChange,l=t.onSwatchHover,u=t.disableAlpha,f=t.presetColors,d=t.renderers,p=t.styles,v=p===void 0?{}:p,h=t.className,m=h===void 0?"":h,b=G(be({default:GE({picker:{width:r,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},v),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},v),{disableAlpha:u});return c.createElement("div",{style:b.picker,className:"sketch-picker "+m},c.createElement("div",{style:b.saturation},c.createElement(Or,{style:b.Saturation,hsl:o,hsv:i,onChange:s})),c.createElement("div",{style:b.controls,className:"flexbox-fix"},c.createElement("div",{style:b.sliders},c.createElement("div",{style:b.hue},c.createElement(Et,{style:b.Hue,hsl:o,onChange:s})),c.createElement("div",{style:b.alpha},c.createElement(Mn,{style:b.Alpha,rgb:n,hsl:o,renderers:d,onChange:s}))),c.createElement("div",{style:b.color},c.createElement(St,null),c.createElement("div",{style:b.activeColor}))),c.createElement(BE,{rgb:n,hsl:o,hex:a,onChange:s,disableAlpha:u}),c.createElement(ws,{colors:f,onClick:s,onSwatchHover:l}))};Xn.propTypes={disableAlpha:$.bool,width:$.oneOfType([$.string,$.number]),styles:$.object};Xn.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};me(Xn);var Mt=function(t){var r=t.hsl,n=t.offset,a=t.onClick,i=a===void 0?function(){}:a,o=t.active,s=t.first,l=t.last,u=G({default:{swatch:{height:"12px",background:"hsl("+r.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:o,first:s,last:l}),f=function(p){return i({h:r.h,s:.5,l:n,source:"hsl"},p)};return c.createElement("div",{style:u.swatch,onClick:f})},UE=function(t){var r=t.onClick,n=t.hsl,a=G({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return c.createElement("div",{style:a.swatches},c.createElement("div",{style:a.swatch},c.createElement(Mt,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<i&&Math.abs(n.s-.5)<i,onClick:r,first:!0})),c.createElement("div",{style:a.swatch},c.createElement(Mt,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<i&&Math.abs(n.s-.5)<i,onClick:r})),c.createElement("div",{style:a.swatch},c.createElement(Mt,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<i&&Math.abs(n.s-.5)<i,onClick:r})),c.createElement("div",{style:a.swatch},c.createElement(Mt,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<i&&Math.abs(n.s-.5)<i,onClick:r})),c.createElement("div",{style:a.swatch},c.createElement(Mt,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<i&&Math.abs(n.s-.5)<i,onClick:r,last:!0})),c.createElement("div",{style:a.clear}))},VE=function(){var t=G({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return c.createElement("div",{style:t.picker})},Zn=function(t){var r=t.hsl,n=t.onChange,a=t.pointer,i=t.styles,o=i===void 0?{}:i,s=t.className,l=s===void 0?"":s,u=G(be({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},o));return c.createElement("div",{style:u.wrap||{},className:"slider-picker "+l},c.createElement("div",{style:u.hue},c.createElement(Et,{style:u.Hue,hsl:r,pointer:a,onChange:n})),c.createElement("div",{style:u.swatches},c.createElement(UE,{hsl:r,onClick:n})))};Zn.propTypes={styles:$.object};Zn.defaultProps={pointer:VE,styles:{}};me(Zn);var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});var Ji=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WE=c,Qi=qE(WE);function qE(e){return e&&e.__esModule?e:{default:e}}function KE(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var er=24,YE=Cs.default=function(e){var t=e.fill,r=t===void 0?"currentColor":t,n=e.width,a=n===void 0?er:n,i=e.height,o=i===void 0?er:i,s=e.style,l=s===void 0?{}:s,u=KE(e,["fill","width","height","style"]);return Qi.default.createElement("svg",Ji({viewBox:"0 0 "+er+" "+er,style:Ji({fill:r,width:a,height:o},l)},u),Qi.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},XE=function(t){var r=t.color,n=t.onClick,a=n===void 0?function(){}:n,i=t.onSwatchHover,o=t.first,s=t.last,l=t.active,u=G({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:r,marginBottom:"1px"},check:{color:Nn(r),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:o,last:s,active:l,"color-#FFFFFF":r==="#FFFFFF",transparent:r==="transparent"});return c.createElement(Xe,{color:r,style:u.color,onClick:a,onHover:i,focusStyle:{boxShadow:"0 0 4px "+r}},c.createElement("div",{style:u.check},c.createElement(YE,null)))},ZE=function(t){var r=t.onClick,n=t.onSwatchHover,a=t.group,i=t.active,o=G({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return c.createElement("div",{style:o.group},Ze(a,function(s,l){return c.createElement(XE,{key:s,color:s,active:s.toLowerCase()===i,first:l===0,last:l===a.length-1,onClick:r,onSwatchHover:n})}))},Jn=function(t){var r=t.width,n=t.height,a=t.onChange,i=t.onSwatchHover,o=t.colors,s=t.hex,l=t.styles,u=l===void 0?{}:l,f=t.className,d=f===void 0?"":f,p=G(be({default:{picker:{width:r,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),v=function(m,b){return a({hex:m,source:"hex"},b)};return c.createElement("div",{style:p.picker,className:"swatches-picker "+d},c.createElement(Wt,null,c.createElement("div",{style:p.overflow},c.createElement("div",{style:p.body},Ze(o,function(h){return c.createElement(ZE,{key:h.toString(),group:h,active:s,onClick:v,onSwatchHover:i})}),c.createElement("div",{style:p.clear})))))};Jn.propTypes={width:$.oneOfType([$.string,$.number]),height:$.oneOfType([$.string,$.number]),colors:$.arrayOf($.arrayOf($.string)),styles:$.object};Jn.defaultProps={width:320,height:240,colors:[[Qe[900],Qe[700],Qe[500],Qe[300],Qe[100]],[et[900],et[700],et[500],et[300],et[100]],[tt[900],tt[700],tt[500],tt[300],tt[100]],[rt[900],rt[700],rt[500],rt[300],rt[100]],[nt[900],nt[700],nt[500],nt[300],nt[100]],[at[900],at[700],at[500],at[300],at[100]],[it[900],it[700],it[500],it[300],it[100]],[ot[900],ot[700],ot[500],ot[300],ot[100]],[st[900],st[700],st[500],st[300],st[100]],["#194D33",It[700],It[500],It[300],It[100]],[lt[900],lt[700],lt[500],lt[300],lt[100]],[ct[900],ct[700],ct[500],ct[300],ct[100]],[ut[900],ut[700],ut[500],ut[300],ut[100]],[ft[900],ft[700],ft[500],ft[300],ft[100]],[dt[900],dt[700],dt[500],dt[300],dt[100]],[ht[900],ht[700],ht[500],ht[300],ht[100]],[pt[900],pt[700],pt[500],pt[300],pt[100]],[gt[900],gt[700],gt[500],gt[300],gt[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};me(Jn);var Qn=function(t){var r=t.onChange,n=t.onSwatchHover,a=t.hex,i=t.colors,o=t.width,s=t.triangle,l=t.styles,u=l===void 0?{}:l,f=t.className,d=f===void 0?"":f,p=G(be({default:{card:{width:o,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),v=function(m,b){ze(m)&&r({hex:m,source:"hex"},b)};return c.createElement("div",{style:p.card,className:"twitter-picker "+d},c.createElement("div",{style:p.triangleShadow}),c.createElement("div",{style:p.triangle}),c.createElement("div",{style:p.body},Ze(i,function(h,m){return c.createElement(Xe,{key:m,color:h,hex:h,style:p.swatch,onClick:v,onHover:n,focusStyle:{boxShadow:"0 0 4px "+h}})}),c.createElement("div",{style:p.hash},"#"),c.createElement(Y,{label:null,style:{input:p.input},value:a.replace("#",""),onChange:v}),c.createElement("div",{style:p.clear})))};Qn.propTypes={width:$.oneOfType([$.string,$.number]),triangle:$.oneOf(["hide","top-left","top-right"]),colors:$.arrayOf($.string),styles:$.object};Qn.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};const JE=me(Qn);var ea=function(t){var r=G({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return c.createElement("div",{style:r.picker})};ea.propTypes={hsl:$.shape({h:$.number,s:$.number,l:$.number,a:$.number})};ea.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var ta=function(t){var r=G({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return c.createElement("div",{style:r.picker})};ta.propTypes={hsl:$.shape({h:$.number,s:$.number,l:$.number,a:$.number})};ta.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var QE=function(t){var r=t.onChange,n=t.rgb,a=t.hsl,i=t.hex,o=t.hsv,s=function(v,h){if(v.hex)ze(v.hex)&&r({hex:v.hex,source:"hex"},h);else if(v.rgb){var m=v.rgb.split(",");Kr(v.rgb,"rgb")&&r({r:m[0],g:m[1],b:m[2],a:1,source:"rgb"},h)}else if(v.hsv){var b=v.hsv.split(",");Kr(v.hsv,"hsv")&&(b[2]=b[2].replace("%",""),b[1]=b[1].replace("%",""),b[0]=b[0].replace("°",""),b[1]==1?b[1]=.01:b[2]==1&&(b[2]=.01),r({h:Number(b[0]),s:Number(b[1]),v:Number(b[2]),source:"hsv"},h))}else if(v.hsl){var x=v.hsl.split(",");Kr(v.hsl,"hsl")&&(x[2]=x[2].replace("%",""),x[1]=x[1].replace("%",""),x[0]=x[0].replace("°",""),d[1]==1?d[1]=.01:d[2]==1&&(d[2]=.01),r({h:Number(x[0]),s:Number(x[1]),v:Number(x[2]),source:"hsl"},h))}},l=G({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=n.r+", "+n.g+", "+n.b,f=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.l*100)+"%",d=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.v*100)+"%";return c.createElement("div",{style:l.wrap,className:"flexbox-fix"},c.createElement("div",{style:l.fields},c.createElement("div",{style:l.double},c.createElement(Y,{style:{input:l.input,label:l.label},label:"hex",value:i,onChange:s})),c.createElement("div",{style:l.column},c.createElement("div",{style:l.single},c.createElement(Y,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:s})),c.createElement("div",{style:l.single},c.createElement(Y,{style:{input:l.input2,label:l.label2},label:"hsv",value:d,onChange:s})),c.createElement("div",{style:l.single},c.createElement(Y,{style:{input:l.input2,label:l.label2},label:"hsl",value:f,onChange:s})))))},ra=function(t){var r=t.width,n=t.onChange,a=t.rgb,i=t.hsl,o=t.hsv,s=t.hex,l=t.header,u=t.styles,f=u===void 0?{}:u,d=t.className,p=d===void 0?"":d,v=G(be({default:{picker:{width:r,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+a.r+", "+a.g+", "+a.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},f));return c.createElement("div",{style:v.picker,className:"google-picker "+p},c.createElement("div",{style:v.head},l),c.createElement("div",{style:v.swatch}),c.createElement("div",{style:v.saturation},c.createElement(Or,{hsl:i,hsv:o,pointer:ea,onChange:n})),c.createElement("div",{style:v.body},c.createElement("div",{style:v.controls,className:"flexbox-fix"},c.createElement("div",{style:v.hue},c.createElement(Et,{style:v.Hue,hsl:i,radius:"4px",pointer:ta,onChange:n}))),c.createElement(QE,{rgb:a,hsl:i,hex:s,hsv:o,onChange:n})))};ra.propTypes={width:$.oneOfType([$.string,$.number]),styles:$.object,header:$.string};ra.defaultProps={width:652,styles:{},header:"Color picker"};me(ra);const e$=({initialColor:e,applyOpacity:t,onColorChange:r,onClose:n})=>{const[a,i]=c.useState(!1),[o,s]=c.useState({r:255,g:255,b:255,a:1}),l=h=>`rgba(${h.r}, ${h.g}, ${h.b}, ${t??h.a})`;function u(h,m=1){let b=h.replace("#","");b.length===3&&(b=b[0]+b[0]+b[1]+b[1]+b[2]+b[2]);const x=parseInt(b,16),S=x>>16&255,E=x>>8&255,R=x&255;return{r:S,g:E,b:R,a:m}}c.useEffect(()=>{if(e){if(typeof e=="string"&&/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)){const h=u(e,1);s(h)}else if(typeof e=="string"&&/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/.test(e)){const h=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/);if(h){const[,m,b,x,S]=h;s({r:Number(m),g:Number(b),b:Number(x),a:S!==void 0?Number(S):1})}}}},[e]);const f=h=>{h.stopPropagation(),i(!a)},d=()=>{i(!1),n==null||n()},p=h=>{t!==void 0&&(h.rgb.a=t),console.log("Color changed:",h),s(h.rgb),r(l(h.rgb))},v={background:l(o)};return y.jsxs("div",{className:"relative",children:[y.jsx("div",{className:"inline-block cursor-pointer bg-slate-50 rounded border border-neutral-100 shadow",onClick:f,children:y.jsx("div",{className:"w-8 h-4 rounded",style:v})}),a&&y.jsxs("div",{className:"absolute z-20 mt-2",onClick:h=>{h.stopPropagation(),h.preventDefault()},children:[y.jsx("div",{className:"fixed inset-0",onClick:d}),y.jsx(JE,{color:o,colors:["#ffc094","#fee7a8","#b5f1db","#d0ecfe","#9ed5f4","#d2d9df","#f8b2c4","#F78DA7","#d89ef9"],onChange:p})]})]})},t$=({items:e,onRowsReordered:t,groupBy:r})=>{const[n,a]=c.useState(null),[i,o]=c.useState(null),[s,l]=c.useState(null),[u,f]=c.useState(!1),d=c.useCallback(()=>{console.log(e),a(null),l(null),f(!1),o(null)},[]),p=c.useCallback((m,b)=>{a(m),f(!0),o(b)},[]),v=c.useCallback(m=>{if(n!==null&&s!==null&&n!==s){if(r&&m[r]!==(i==null?void 0:i[r])){console.warn("Cannot reorder items across different groups");return}t==null||t(n,s,i,m)}a(null),l(null),f(!1),o(null)},[n,s,t]),h=c.useCallback(m=>{n!==null&&n!==m&&l(m)},[n]);return{draggedRowIndex:n,dropTargetIndex:s,isDraggingRow:u,handleRowDragStart:p,handleDrop:v,handleDragEnd:d,handleRowDragOver:h}};function r$(e){const t=c.useRef(null),[r,n]=c.useState(null),{setOpenCommentCell:a,setUsername:i}=fn();c.useEffect(()=>{i==null||i(e.currentUsername??"Anonymous")},[e.currentUsername]);const o=c.useMemo(()=>{const k=new Map;return e.items.forEach((M,W)=>{k.set(M,W+1)}),k},[e.items]),s=c.useMemo(()=>e.showIndex?[{id:"_index",text:"",sortable:!1,align:"right",children:[],width:e.enableRowDragDrop?55:40},...e.headers]:e.headers,[e.headers,e.showIndex,e.enableRowDragDrop]);function l(k){return k.flatMap(M=>M.children&&M.children.length>0?l(M.children):[M])}const u=c.useMemo(()=>l(e.headers),[e.headers]),f=k=>{e.onRowDoubleClick&&e.onRowDoubleClick(k)},d=c.useCallback((k,M)=>{e.onDeleteComment&&e.onDeleteComment(k,M)},[e.onSaveComment,e.items]),p=c.useCallback((k,M)=>{e.onSaveComment&&e.onSaveComment(k,M)},[e.onSaveComment,e.items]),{activeFilters:v,clearActiveFilters:h,setActiveTableFilter:m,filterItemsCache:b,currentSortId:x,ascendingOrder:S,onResetSort:E,onSortByColumn:R,processedItems:w}=Cl(e.items,e.headers,e.activeFilters??[],e.currentSortId,e.onSortByColumn),{groupedItemsEntries:B,collapsedGroups:J,flatGroupedItemsToDisplay:te,onCollapseGroup:ce,isGroupLinked:ue}=Sl(w,e.groupBy,e.linkedGroups),{selectedCell:P,expandedSelection:_,setExpandedSelection:T,setSelectedCell:H,isDragging:X,onCellBlur:Z,onCellEnter:q,onCellClick:re,handleCellKeyDown:ne,onCellMouseDown:g,onCellMouseEnter:C,onMouseMove:A,onRightClick:j}=_l({headers:u,items:e.items,groupedItemsEntries:e.groupBy?B:void 0,onChange:e.onChange,onBulkChange:e.onBulkChange,onRowDoubleClick:e.onRowDoubleClick}),{draggedRowIndex:I,dropTargetIndex:N,handleDragEnd:z,handleRowDragStart:L,handleDrop:D,handleRowDragOver:U}=t$({items:w,onRowsReordered:e.onRowsReordered,groupBy:e.groupBy}),V=c.useRef(null);c.useEffect(()=>{n(null),h(),H(void 0),T([])},[e.headers]);const le=c.useMemo(()=>{if(e.groupBy){let k=0;return B.forEach(([M,W])=>{k+=1,J.includes(M)||(k+=W.length)}),k}else return w.length},[w,B,J,e.groupBy]),{virtualRows:O,before:pe,after:Ae}=Bl({scrollRef:V,rowsCount:le}),qt=(k,M,W,K)=>{j(k,M,K),n({x:K.clientX,y:K.clientY,rowIndex:k,columnIndex:M,item:W,header:u[M]})},Ss=c.useCallback(k=>{var W;return((W=e.highlightCondition)==null?void 0:W.filter(K=>k[K.propertyId]===K.value))||[]},[e.highlightCondition]),Es=c.useCallback((k,M)=>k.filter(K=>K.columnId===M).reduce((K,de)=>({...K,...de.style||{}}),{}),[e.highlightCondition]),$s=(k,M,W)=>{const K=N===k,de=I!==null&&I<k;return y.jsxs("td",{rowSpan:W,style:{alignContent:"start"},className:`text-right pr-2 bg-gray-100 font-medium relative ${e.enableRowDragDrop?"cursor-grab":""}`,draggable:e.enableRowDragDrop,onDragEnd:e.enableRowDragDrop?z:void 0,onDragStart:e.enableRowDragDrop?()=>L(k,M):void 0,onDrop:e.enableRowDragDrop?()=>D(M):void 0,onDragOver:e.enableRowDragDrop?ye=>{ye.preventDefault(),U(k)}:void 0,onDragEnter:e.enableRowDragDrop?ye=>{ye.preventDefault(),U(k)}:void 0,children:[K&&y.jsx("div",{style:{position:"absolute",top:de?"100%":0,left:0,width:"100vw",height:"2px",backgroundColor:"rgb(59, 130, 246)",zIndex:10}}),y.jsxs("div",{className:"flex grow items-center justify-between",children:[e.enableRowDragDrop&&y.jsx(Ie,{path:Ws,color:"grey",size:.8}),e.groupBy?e.indexUseOriginalOrder?o.get(w[k]):k+1:o.get(M)]})]})},_s=c.useCallback((k,M,W)=>{g(k,M,W)},[g]),Os=(k,M,W)=>{C(k,M,W)};function na(k,M,W,K,de,ye,Ce,he,ge){var fe;return y.jsx(fl,{style:Ce,isSelected:(P==null?void 0:P.rowIndex)===W&&(P==null?void 0:P.columnIndex)===K&&((fe=P==null?void 0:P.fromArrayData)==null?void 0:fe.index)===(ge==null?void 0:ge.index),isInLinkedGroup:ye,isInExpandedSelection:(_==null?void 0:_.some(ve=>{var De;return ve.rowIndex===W&&ve.columnIndex===K&&((De=ve.fromArrayData)==null?void 0:De.index)===(ge==null?void 0:ge.index)}))||!1,header:M,item:k,rowIndex:W,columnIndex:K,noBorder:e.noBorder,contrastRow:e.contrastRow,comments:he,onSaveComment:p,onDeleteComment:d,onClick:re,onEnter:q,onBlur:Z,onKeyDown:ne,onMouseDown:ve=>_s(ve,W,K),onMouseEnter:ve=>Os(ve,W,K),onContextMenu:qt,onAddOption:e.onAddListOption,rowSpan:de,fromArrayData:ge},`item-${W}-${K}`)}function aa(k,M,W){var ge;const K=Ss(k),de=((ge=e.comments)==null?void 0:ge.filter(fe=>k[fe.propertyId]===fe.value))||[],ye={...K.filter(fe=>!fe.columnId).reduce((fe,ve)=>({...fe,...ve.style||{}}),{}),opacity:I===M?.5:1,backgroundColor:N===M?"rgba(59, 130, 246, 0.1)":void 0,position:"relative"};let Ce=0;const he=u.filter(fe=>fe.fromArray);return he.length>0&&(u.forEach(fe=>{fe.fromArray&&Array.isArray(k[fe.fromArray])&&(Ce=Math.max(Ce,k[fe.fromArray].length))}),Ce++),y.jsxs(y.Fragment,{children:[y.jsxs("tr",{style:ye,className:`${e.onRowDoubleClick?"cursor-pointer":""}`,onDoubleClick:()=>f(k),children:[e.showIndex&&$s(M,k,Math.max(Ce,1)),u.map((fe,ve)=>{const De=Es(K,fe.id),Rr=de.filter(Ms=>Ms.columnId===fe.id);return na(k,fe,M,ve,fe.fromArray?1:Math.max(Ce,1),W?ue(W):void 0,De,Rr)})]},`item-${M}`),he.length>0&&Array.from({length:Ce-1}).map((fe,ve)=>y.jsx("tr",{children:he.map((De,Rr)=>na(k,De,M,Rr,De.fromArray?1:Ce,W?ue(W):void 0,{},[],{fromArray:De.fromArray,index:ve}))},`item-array-${M}-${ve}`))]})}const Ts=(k,M,W)=>{var de;const K={propertyId:M,value:k[M],columnId:M,style:W};(de=e.onSetHighlightCondition)==null||de.call(e,K,k)},As=(k,M,W)=>{var de;const K={propertyId:M,value:k[M],columnId:M,style:{}};(de=e.onRemoveHighlightCondition)==null||de.call(e,K,W,k)},Rs=(k,M)=>{var ye,Ce;const W=((ye=e.comments)==null?void 0:ye.filter(he=>k[he.propertyId]===he.value&&he.columnId===M))||[],K=(Ce=e.highlightCondition)==null?void 0:Ce.find(he=>k[he.propertyId]===he.value&&he.columnId===M&&he.style.backgroundColor),de=K==null?void 0:K.style.backgroundColor;return[{icon:Vs,iconColor:"var(--comment-color)",text:`${W.length>0?"Edit":"Add"} a comment`,onClick:(he,ge)=>{a({rowIndex:ge.rowIndex,columnIndex:ge.columnIndex})}},{icon:Ys,iconColor:"#299b42",text:"Set cell color",customRender:()=>y.jsxs(y.Fragment,{children:[y.jsx(e$,{initialColor:de,onColorChange:he=>Ts(k,M,{backgroundColor:he}),onClose:()=>n(null)}),de&&y.jsx(Re,{circle:!0,small:!0,icon:Us,iconSize:.6,iconColor:"var(--error-color)",className:"h-5 min-h-5 ",onClick:()=>As(k,M,"backgroundColor")})]}),onClick:(he,ge)=>{}}]};return y.jsxs(y.Fragment,{children:[r&&y.jsx(Ul,{x:r.x,y:r.y,item:r.item,itemCoordinate:{rowIndex:r.rowIndex,columnIndex:r.columnIndex},onClose:()=>n(null),actions:Rs(r.item,r.header.id)}),v.length>0&&y.jsx("div",{style:{width:"100%",display:"flex"},children:y.jsx(Re,{onClick:h,className:"mb-1 h-5 min-h-5 w-36 flex",small:!0,text:"Clear all filters",iconSize:.6,icon:Ks})}),y.jsx("div",{ref:V,className:"overflow-auto h-min",style:{overflow:"auto",height:e.height??`calc(100vh - ${e.marginTop?e.marginTop:"6rem"})`},children:y.jsxs("table",{ref:t,onMouseMove:A,style:{width:"100%",position:"unset",userSelect:X?"none":"auto",WebkitUserSelect:X?"none":"auto"},className:`table table-xs table-pin-rows
77
-
78
- ${e.pinColumns?" table-pin-cols":""} border border-gray-300!`,children:[y.jsx(pl,{headers:s,noBorder:e.noBorder,alignCenterInLine:e.alignCenterInLine,currentSortId:x,activeFilters:v,tableRef:t,ascendingOrder:S,filterItemsCache:b,onResetSort:E,onSortByColumn:R,onSetFilter:m}),y.jsxs("tbody",{children:[pe>0&&y.jsx("tr",{children:y.jsx("td",{colSpan:u.length,style:{height:pe}})}),e.groupBy?y.jsx(y.Fragment,{children:O.map(k=>{const M=te[k.index];if(M.isGroup===!0){const W=te.filter(K=>M.groupName===K.groupName&&!K.isGroup);return y.jsx(c.Fragment,{children:y.jsx(zl,{colSpan:u.length+(e.showIndex?1:0),groupBy:e.groupBy,groupName:M.groupName,isCollapsed:J.includes(M.groupName),masterGroupName:M.masterGroupName,linkedGroupNames:M.linkedGroupNames,onCollapseGroup:ce,groupByCustomRender:(K,de)=>{var ye;return(ye=e.groupByCustomRender)==null?void 0:ye.call(e,K,de,u.length+(e.showIndex?1:0),M.isCollapsed||!1,ce,W,M.masterGroupName,M.linkedGroupNames)}})},`group-${M.groupName}`)}else{const W=M;return aa(W.item,W.rowIndex,W.groupName)}})}):y.jsx(y.Fragment,{children:O.map(k=>{const M=w[k.index];return aa(M,k.index)})}),Ae>0&&y.jsx("tr",{children:y.jsx("td",{colSpan:u.length,style:{height:Ae}})})]})]})})]})}function n$(e){return y.jsx("div",{className:"react-base-table",children:y.jsx(ll,{children:y.jsx(r$,{...e})})})}exports.BaseTable=n$;
71
+ `),c.createElement("div",{style:d.white,className:"saturation-white"},c.createElement("div",{style:d.black,className:"saturation-black"}),c.createElement("div",{style:d.pointer},this.props.pointer?c.createElement(this.props.pointer,this.props):c.createElement("div",{style:d.circle}))))}}]),t}(c.PureComponent||c.Component);function W2(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Y2=lc(Object.keys,Object),K2=Object.prototype,X2=K2.hasOwnProperty;function q2(e){if(!no(e))return Y2(e);var t=[];for(var n in Object(e))X2.call(e,n)&&n!="constructor"&&t.push(n);return t}function io(e){return on(e)?pc(e):q2(e)}function J2(e,t){return e&&ic(e,t,io)}function Z2(e,t){return function(n,r){if(n==null)return n;if(!on(n))return e(n,r);for(var a=n.length,o=-1,s=Object(n);++o<a&&r(s[o],o,s)!==!1;);return n}}var bc=Z2(J2);function Q2(e){return typeof e=="function"?e:jr}function eA(e,t){var n=Te(e)?W2:bc;return n(e,Q2(t))}function pr(e){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pr(e)}var tA=/^\s+/,nA=/\s+$/;function U(e,t){if(e=e||"",t=t||{},e instanceof U)return e;if(!(this instanceof U))return new U(e,t);var n=rA(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}U.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,a,o,s,i;return n=t.r/255,r=t.g/255,a=t.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*o+.7152*s+.0722*i},setAlpha:function(t){return this._a=yc(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=ls(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=ls(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),a=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+a+"%)":"hsva("+n+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=ss(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ss(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),a=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+a+"%)":"hsla("+n+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return cs(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return sA(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(de(this._r,255)*100)+"%",g:Math.round(de(this._g,255)*100)+"%",b:Math.round(de(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(de(this._r,255)*100)+"%, "+Math.round(de(this._g,255)*100)+"%, "+Math.round(de(this._b,255)*100)+"%)":"rgba("+Math.round(de(this._r,255)*100)+"%, "+Math.round(de(this._g,255)*100)+"%, "+Math.round(de(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:yA[cs(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+us(this._r,this._g,this._b,this._a),r=n,a=this._gradientType?"GradientType = 1, ":"";if(t){var o=U(t);r="#"+us(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,a=this._a<1&&this._a>=0,o=!n&&a&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return U(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(dA,arguments)},brighten:function(){return this._applyModification(fA,arguments)},darken:function(){return this._applyModification(hA,arguments)},desaturate:function(){return this._applyModification(lA,arguments)},saturate:function(){return this._applyModification(cA,arguments)},greyscale:function(){return this._applyModification(uA,arguments)},spin:function(){return this._applyModification(pA,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(mA,arguments)},complement:function(){return this._applyCombination(gA,arguments)},monochromatic:function(){return this._applyCombination(bA,arguments)},splitcomplement:function(){return this._applyCombination(vA,arguments)},triad:function(){return this._applyCombination(ds,[3])},tetrad:function(){return this._applyCombination(ds,[4])}};U.fromRatio=function(e,t){if(pr(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=wn(e[r]));e=n}return U(e,t)};function rA(e){var t={r:0,g:0,b:0},n=1,r=null,a=null,o=null,s=!1,i=!1;return typeof e=="string"&&(e=EA(e)),pr(e)=="object"&&(qe(e.r)&&qe(e.g)&&qe(e.b)?(t=aA(e.r,e.g,e.b),s=!0,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):qe(e.h)&&qe(e.s)&&qe(e.v)?(r=wn(e.s),a=wn(e.v),t=iA(e.h,r,a),s=!0,i="hsv"):qe(e.h)&&qe(e.s)&&qe(e.l)&&(r=wn(e.s),o=wn(e.l),t=oA(e.h,r,o),s=!0,i="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=yc(n),{ok:s,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function aA(e,t,n){return{r:de(e,255)*255,g:de(t,255)*255,b:de(n,255)*255}}function ss(e,t,n){e=de(e,255),t=de(t,255),n=de(n,255);var r=Math.max(e,t,n),a=Math.min(e,t,n),o,s,i=(r+a)/2;if(r==a)o=s=0;else{var l=r-a;switch(s=i>.5?l/(2-r-a):l/(r+a),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s,l:i}}function oA(e,t,n){var r,a,o;e=de(e,360),t=de(t,100),n=de(n,100);function s(u,d,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(d-u)*6*f:f<1/2?d:f<2/3?u+(d-u)*(2/3-f)*6:u}if(t===0)r=a=o=n;else{var i=n<.5?n*(1+t):n+t-n*t,l=2*n-i;r=s(l,i,e+1/3),a=s(l,i,e),o=s(l,i,e-1/3)}return{r:r*255,g:a*255,b:o*255}}function ls(e,t,n){e=de(e,255),t=de(t,255),n=de(n,255);var r=Math.max(e,t,n),a=Math.min(e,t,n),o,s,i=r,l=r-a;if(s=r===0?0:l/r,r==a)o=0;else{switch(r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s,v:i}}function iA(e,t,n){e=de(e,360)*6,t=de(t,100),n=de(n,100);var r=Math.floor(e),a=e-r,o=n*(1-t),s=n*(1-a*t),i=n*(1-(1-a)*t),l=r%6,u=[n,s,o,o,i,n][l],d=[i,n,n,s,o,o][l],f=[o,o,i,n,n,s][l];return{r:u*255,g:d*255,b:f*255}}function cs(e,t,n,r){var a=[He(Math.round(e).toString(16)),He(Math.round(t).toString(16)),He(Math.round(n).toString(16))];return r&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function sA(e,t,n,r,a){var o=[He(Math.round(e).toString(16)),He(Math.round(t).toString(16)),He(Math.round(n).toString(16)),He(xc(r))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function us(e,t,n,r){var a=[He(xc(r)),He(Math.round(e).toString(16)),He(Math.round(t).toString(16)),He(Math.round(n).toString(16))];return a.join("")}U.equals=function(e,t){return!e||!t?!1:U(e).toRgbString()==U(t).toRgbString()};U.random=function(){return U.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function lA(e,t){t=t===0?0:t||10;var n=U(e).toHsl();return n.s-=t/100,n.s=Nr(n.s),U(n)}function cA(e,t){t=t===0?0:t||10;var n=U(e).toHsl();return n.s+=t/100,n.s=Nr(n.s),U(n)}function uA(e){return U(e).desaturate(100)}function dA(e,t){t=t===0?0:t||10;var n=U(e).toHsl();return n.l+=t/100,n.l=Nr(n.l),U(n)}function fA(e,t){t=t===0?0:t||10;var n=U(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),U(n)}function hA(e,t){t=t===0?0:t||10;var n=U(e).toHsl();return n.l-=t/100,n.l=Nr(n.l),U(n)}function pA(e,t){var n=U(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,U(n)}function gA(e){var t=U(e).toHsl();return t.h=(t.h+180)%360,U(t)}function ds(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=U(e).toHsl(),r=[U(e)],a=360/t,o=1;o<t;o++)r.push(U({h:(n.h+o*a)%360,s:n.s,l:n.l}));return r}function vA(e){var t=U(e).toHsl(),n=t.h;return[U(e),U({h:(n+72)%360,s:t.s,l:t.l}),U({h:(n+216)%360,s:t.s,l:t.l})]}function mA(e,t,n){t=t||6,n=n||30;var r=U(e).toHsl(),a=360/n,o=[U(e)];for(r.h=(r.h-(a*t>>1)+720)%360;--t;)r.h=(r.h+a)%360,o.push(U(r));return o}function bA(e,t){t=t||6;for(var n=U(e).toHsv(),r=n.h,a=n.s,o=n.v,s=[],i=1/t;t--;)s.push(U({h:r,s:a,v:o})),o=(o+i)%1;return s}U.mix=function(e,t,n){n=n===0?0:n||50;var r=U(e).toRgb(),a=U(t).toRgb(),o=n/100,s={r:(a.r-r.r)*o+r.r,g:(a.g-r.g)*o+r.g,b:(a.b-r.b)*o+r.b,a:(a.a-r.a)*o+r.a};return U(s)};U.readability=function(e,t){var n=U(e),r=U(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};U.isReadable=function(e,t,n){var r=U.readability(e,t),a,o;switch(o=!1,a=SA(n),a.level+a.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o};U.mostReadable=function(e,t,n){var r=null,a=0,o,s,i,l;n=n||{},s=n.includeFallbackColors,i=n.level,l=n.size;for(var u=0;u<t.length;u++)o=U.readability(e,t[u]),o>a&&(a=o,r=U(t[u]));return U.isReadable(e,r,{level:i,size:l})||!s?r:(n.includeFallbackColors=!1,U.mostReadable(e,["#fff","#000"],n))};var wa=U.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},yA=U.hexNames=xA(wa);function xA(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function yc(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function de(e,t){wA(e)&&(e="100%");var n=CA(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Nr(e){return Math.min(1,Math.max(0,e))}function _e(e){return parseInt(e,16)}function wA(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function CA(e){return typeof e=="string"&&e.indexOf("%")!=-1}function He(e){return e.length==1?"0"+e:""+e}function wn(e){return e<=1&&(e=e*100+"%"),e}function xc(e){return Math.round(parseFloat(e)*255).toString(16)}function fs(e){return _e(e)/255}var Ne=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function qe(e){return!!Ne.CSS_UNIT.exec(e)}function EA(e){e=e.replace(tA,"").replace(nA,"").toLowerCase();var t=!1;if(wa[e])e=wa[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Ne.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Ne.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ne.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Ne.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ne.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Ne.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ne.hex8.exec(e))?{r:_e(n[1]),g:_e(n[2]),b:_e(n[3]),a:fs(n[4]),format:t?"name":"hex8"}:(n=Ne.hex6.exec(e))?{r:_e(n[1]),g:_e(n[2]),b:_e(n[3]),format:t?"name":"hex"}:(n=Ne.hex4.exec(e))?{r:_e(n[1]+""+n[1]),g:_e(n[2]+""+n[2]),b:_e(n[3]+""+n[3]),a:fs(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Ne.hex3.exec(e))?{r:_e(n[1]+""+n[1]),g:_e(n[2]+""+n[2]),b:_e(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function SA(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var hs=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,a=0;return eA(n,function(o){if(t[o]&&(r+=1,isNaN(t[o])||(a+=1),o==="s"||o==="l")){var s=/^\d+%$/;s.test(t[o])&&(a+=1)}}),r===a?t:!1},Cn=function(t,n){var r=t.hex?U(t.hex):U(t),a=r.toHsl(),o=r.toHsv(),s=r.toRgb(),i=r.toHex();a.s===0&&(a.h=n||0,o.h=n||0);var l=i==="000000"&&s.a===0;return{hsl:a,hex:l?"transparent":"#"+i,rgb:s,hsv:o,oldHue:t.h||n||a.h,source:t.source}},ut=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&U(t).isValid()},so=function(t){if(!t)return"#fff";var n=Cn(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},ia=function(t,n){var r=t.replace("°","");return U(n+" ("+r+")")._ok},bn=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},AA=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function $A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OA(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function _A(e,t){if(typeof t!="function"&&t!==null)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 Ee=function(t){var n=function(r){_A(a,r);function a(o){$A(this,a);var s=OA(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return s.handleChange=function(i,l){var u=hs(i);if(u){var d=Cn(i,i.h||s.state.oldHue);s.setState(d),s.props.onChangeComplete&&s.debounce(s.props.onChangeComplete,d,l),s.props.onChange&&s.props.onChange(d,l)}},s.handleSwatchHover=function(i,l){var u=hs(i);if(u){var d=Cn(i,i.h||s.state.oldHue);s.props.onSwatchHover&&s.props.onSwatchHover(d,l)}},s.state=bn({},Cn(o.color,0)),s.debounce=mc(function(i,l,u){i(l,u)},100),s}return AA(a,[{key:"render",value:function(){var s={};return this.props.onSwatchHover&&(s.onSwatchHover=this.handleSwatchHover),c.createElement(t,bn({},this.props,this.state,{onChange:this.handleChange},s))}}],[{key:"getDerivedStateFromProps",value:function(s,i){return bn({},Cn(s.color,i.oldHue))}}]),a}(c.PureComponent||c.Component);return n.propTypes=bn({},t.propTypes),n.defaultProps=bn({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},TA=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},RA=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function IA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ps(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function MA(e,t){if(typeof t!="function"&&t!==null)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 DA=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){MA(a,r);function a(){var o,s,i,l;IA(this,a);for(var u=arguments.length,d=Array(u),f=0;f<u;f++)d[f]=arguments[f];return l=(s=(i=ps(this,(o=a.__proto__||Object.getPrototypeOf(a)).call.apply(o,[this].concat(d))),i),i.state={focus:!1},i.handleFocus=function(){return i.setState({focus:!0})},i.handleBlur=function(){return i.setState({focus:!1})},s),ps(i,l)}return RA(a,[{key:"render",value:function(){return c.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},c.createElement(t,TA({},this.props,this.state)))}}]),a}(c.Component)},gs=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},jA=13,PA=function(t){var n=t.color,r=t.style,a=t.onClick,o=a===void 0?function(){}:a,s=t.onHover,i=t.title,l=i===void 0?n:i,u=t.children,d=t.focus,f=t.focusStyle,p=f===void 0?{}:f,g=n==="transparent",h=X({default:{swatch:gs({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,d?p:{})}}),m=function(A){return o(n,A)},b=function(A){return A.keyCode===jA&&o(n,A)},y=function(A){return s(n,A)},E={};return s&&(E.onMouseOver=y),c.createElement("div",gs({style:h.swatch,onClick:m,title:l,tabIndex:0,onKeyDown:b},E),u,g&&c.createElement(rn,{borderRadius:h.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const St=DA(PA);var kA=function(t){var n=t.direction,r=X({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return c.createElement("div",{style:r.picker})},NA=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},wc=function(t){var n=t.rgb,r=t.hsl,a=t.width,o=t.height,s=t.onChange,i=t.direction,l=t.style,u=t.renderers,d=t.pointer,f=t.className,p=f===void 0?"":f,g=X({default:{picker:{position:"relative",width:a,height:o},alpha:{radius:"2px",style:l}}});return c.createElement("div",{style:g.picker,className:"alpha-picker "+p},c.createElement(Qa,NA({},g.alpha,{rgb:n,hsl:r,pointer:d,renderers:u,onChange:s,direction:i})))};wc.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:kA};Ee(wc);function Cc(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var HA="__lodash_hash_undefined__";function LA(e){return this.__data__.set(e,HA),this}function FA(e){return this.__data__.has(e)}function gr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new et;++t<n;)this.add(e[t])}gr.prototype.add=gr.prototype.push=LA;gr.prototype.has=FA;function BA(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function zA(e,t){return e.has(t)}var GA=1,VA=2;function Ec(e,t,n,r,a,o){var s=n&GA,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,g=n&VA?new gr:void 0;for(o.set(e,t),o.set(t,e);++f<i;){var h=e[f],m=t[f];if(r)var b=s?r(m,h,f,t,e,o):r(h,m,f,e,t,o);if(b!==void 0){if(b)continue;p=!1;break}if(g){if(!BA(t,function(y,E){if(!zA(g,E)&&(h===y||a(h,y,n,r,o)))return g.push(E)})){p=!1;break}}else if(!(h===m||a(h,m,n,r,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function UA(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}function WA(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var YA=1,KA=2,XA="[object Boolean]",qA="[object Date]",JA="[object Error]",ZA="[object Map]",QA="[object Number]",e$="[object RegExp]",t$="[object Set]",n$="[object String]",r$="[object Symbol]",a$="[object ArrayBuffer]",o$="[object DataView]",vs=lt?lt.prototype:void 0,sa=vs?vs.valueOf:void 0;function i$(e,t,n,r,a,o,s){switch(n){case o$:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case a$:return!(e.byteLength!=t.byteLength||!o(new dr(e),new dr(t)));case XA:case qA:case QA:return Bn(+e,+t);case JA:return e.name==t.name&&e.message==t.message;case e$:case n$:return e==t+"";case ZA:var i=UA;case t$:var l=r&YA;if(i||(i=WA),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=KA,s.set(e,t);var d=Ec(i(e),i(t),r,a,o,s);return s.delete(e),d;case r$:if(sa)return sa.call(e)==sa.call(t)}return!1}function s$(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}function l$(e,t,n){var r=t(e);return Te(e)?r:s$(r,n(e))}function c$(e,t){for(var n=-1,r=e==null?0:e.length,a=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[a++]=s)}return o}function u$(){return[]}var d$=Object.prototype,f$=d$.propertyIsEnumerable,ms=Object.getOwnPropertySymbols,h$=ms?function(e){return e==null?[]:(e=Object(e),c$(ms(e),function(t){return f$.call(e,t)}))}:u$;function bs(e){return l$(e,io,h$)}var p$=1,g$=Object.prototype,v$=g$.hasOwnProperty;function m$(e,t,n,r,a,o){var s=n&p$,i=bs(e),l=i.length,u=bs(t),d=u.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var p=i[f];if(!(s?p in t:v$.call(t,p)))return!1}var g=o.get(e),h=o.get(t);if(g&&h)return g==t&&h==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=s;++f<l;){p=i[f];var y=e[p],E=t[p];if(r)var O=s?r(E,y,p,t,e,o):r(y,E,p,e,t,o);if(!(O===void 0?y===E||a(y,E,n,r,o):O)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){var A=e.constructor,C=t.constructor;A!=C&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof C=="function"&&C instanceof C)&&(m=!1)}return o.delete(e),o.delete(t),m}var Ca=Et(Be,"DataView"),Ea=Et(Be,"Promise"),Sa=Et(Be,"Set"),Aa=Et(Be,"WeakMap"),ys="[object Map]",b$="[object Object]",xs="[object Promise]",ws="[object Set]",Cs="[object WeakMap]",Es="[object DataView]",y$=Ct(Ca),x$=Ct(_n),w$=Ct(Ea),C$=Ct(Sa),E$=Ct(Aa),ot=wt;(Ca&&ot(new Ca(new ArrayBuffer(1)))!=Es||_n&&ot(new _n)!=ys||Ea&&ot(Ea.resolve())!=xs||Sa&&ot(new Sa)!=ws||Aa&&ot(new Aa)!=Cs)&&(ot=function(e){var t=wt(e),n=t==b$?e.constructor:void 0,r=n?Ct(n):"";if(r)switch(r){case y$:return Es;case x$:return ys;case w$:return xs;case C$:return ws;case E$:return Cs}return t});var S$=1,Ss="[object Arguments]",As="[object Array]",Jn="[object Object]",A$=Object.prototype,$s=A$.hasOwnProperty;function $$(e,t,n,r,a,o){var s=Te(e),i=Te(t),l=s?As:ot(e),u=i?As:ot(t);l=l==Ss?Jn:l,u=u==Ss?Jn:u;var d=l==Jn,f=u==Jn,p=l==u;if(p&&hr(e)){if(!hr(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new Ue),s||ao(e)?Ec(e,t,n,r,a,o):i$(e,t,l,n,r,a,o);if(!(n&S$)){var g=d&&$s.call(e,"__wrapped__"),h=f&&$s.call(t,"__wrapped__");if(g||h){var m=g?e.value():e,b=h?t.value():t;return o||(o=new Ue),a(m,b,n,r,o)}}return p?(o||(o=new Ue),m$(e,t,n,r,a,o)):!1}function lo(e,t,n,r,a){return e===t?!0:e==null||t==null||!ct(e)&&!ct(t)?e!==e&&t!==t:$$(e,t,n,r,lo,a)}var O$=1,_$=2;function T$(e,t,n,r){var a=n.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var s=n[a];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<o;){s=n[a];var i=s[0],l=e[i],u=s[1];if(s[2]){if(l===void 0&&!(i in e))return!1}else{var d=new Ue,f;if(!(f===void 0?lo(u,l,O$|_$,r,d):f))return!1}}return!0}function Sc(e){return e===e&&!ke(e)}function R$(e){for(var t=io(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Sc(a)]}return t}function Ac(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function I$(e){var t=R$(e);return t.length==1&&t[0][2]?Ac(t[0][0],t[0][1]):function(n){return n===e||T$(n,e,t)}}var M$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D$=/^\w*$/;function co(e,t){if(Te(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Pr(e)?!0:D$.test(e)||!M$.test(e)||t!=null&&e in Object(t)}var j$="Expected a function";function uo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(j$);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return n.cache=o.set(a,s)||o,s};return n.cache=new(uo.Cache||et),n}uo.Cache=et;var P$=500;function k$(e){var t=uo(e,function(r){return n.size===P$&&n.clear(),r}),n=t.cache;return t}var N$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H$=/\\(\\)?/g,L$=k$(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(N$,function(n,r,a,o){t.push(a?o.replace(H$,"$1"):r||n)}),t}),Os=lt?lt.prototype:void 0,_s=Os?Os.toString:void 0;function $c(e){if(typeof e=="string")return e;if(Te(e))return Cc(e,$c)+"";if(Pr(e))return _s?_s.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function F$(e){return e==null?"":$c(e)}function Oc(e,t){return Te(e)?e:co(e,t)?[e]:L$(F$(e))}function Hr(e){if(typeof e=="string"||Pr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _c(e,t){t=Oc(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Hr(t[n++])];return n&&n==r?e:void 0}function B$(e,t,n){var r=e==null?void 0:_c(e,t);return r===void 0?n:r}function z$(e,t){return e!=null&&t in Object(e)}function G$(e,t,n){t=Oc(t,e);for(var r=-1,a=t.length,o=!1;++r<a;){var s=Hr(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=a?o:(a=e==null?0:e.length,!!a&&ro(a)&&oo(s,a)&&(Te(e)||fr(e)))}function V$(e,t){return e!=null&&G$(e,t,z$)}var U$=1,W$=2;function Y$(e,t){return co(e)&&Sc(t)?Ac(Hr(e),t):function(n){var r=B$(n,e);return r===void 0&&r===t?V$(n,e):lo(t,r,U$|W$)}}function K$(e){return function(t){return t==null?void 0:t[e]}}function X$(e){return function(t){return _c(t,e)}}function q$(e){return co(e)?K$(Hr(e)):X$(e)}function J$(e){return typeof e=="function"?e:e==null?jr:typeof e=="object"?Te(e)?Y$(e[0],e[1]):I$(e):q$(e)}function Z$(e,t){var n=-1,r=on(e)?Array(e.length):[];return bc(e,function(a,o,s){r[++n]=t(a,o,s)}),r}function At(e,t){var n=Te(e)?Cc:Z$;return n(e,J$(t))}var Q$=function(t){var n=t.colors,r=t.onClick,a=t.onSwatchHover,o=X({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return c.createElement("div",{style:o.swatches},At(n,function(s){return c.createElement(St,{key:s,color:s,style:o.swatch,onClick:r,onHover:a,focusStyle:{boxShadow:"0 0 4px "+s}})}),c.createElement("div",{style:o.clear}))},fo=function(t){var n=t.onChange,r=t.onSwatchHover,a=t.hex,o=t.colors,s=t.width,i=t.triangle,l=t.styles,u=l===void 0?{}:l,d=t.className,f=d===void 0?"":d,p=a==="transparent",g=function(b,y){ut(b)&&n({hex:b,source:"hex"},y)},h=X(Ce({default:{card:{width:s,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:a,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:so(a),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+a+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},u),{"hide-triangle":i==="hide"});return c.createElement("div",{style:h.card,className:"block-picker "+f},c.createElement("div",{style:h.triangle}),c.createElement("div",{style:h.head},p&&c.createElement(rn,{borderRadius:"6px 6px 0 0"}),c.createElement("div",{style:h.label},a)),c.createElement("div",{style:h.body},c.createElement(Q$,{colors:o,onClick:g,onSwatchHover:r}),c.createElement(te,{style:{input:h.input},value:a,onChange:g})))};fo.propTypes={width:N.oneOfType([N.string,N.number]),colors:N.arrayOf(N.string),triangle:N.oneOf(["top","hide"]),styles:N.object};fo.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};Ee(fo);var It={100:"#ffcdd2",300:"#e57373",500:"#f44336",700:"#d32f2f",900:"#b71c1c"},Mt={100:"#f8bbd0",300:"#f06292",500:"#e91e63",700:"#c2185b",900:"#880e4f"},Dt={100:"#e1bee7",300:"#ba68c8",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},jt={100:"#d1c4e9",300:"#9575cd",500:"#673ab7",700:"#512da8",900:"#311b92"},Pt={100:"#c5cae9",300:"#7986cb",500:"#3f51b5",700:"#303f9f",900:"#1a237e"},kt={100:"#bbdefb",300:"#64b5f6",500:"#2196f3",700:"#1976d2",900:"#0d47a1"},Nt={100:"#b3e5fc",300:"#4fc3f7",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Ht={100:"#b2ebf2",300:"#4dd0e1",500:"#00bcd4",700:"#0097a7",900:"#006064"},Lt={100:"#b2dfdb",300:"#4db6ac",500:"#009688",700:"#00796b",900:"#004d40"},En={100:"#c8e6c9",300:"#81c784",500:"#4caf50",700:"#388e3c"},Ft={100:"#dcedc8",300:"#aed581",500:"#8bc34a",700:"#689f38",900:"#33691e"},Bt={100:"#f0f4c3",300:"#dce775",500:"#cddc39",700:"#afb42b",900:"#827717"},zt={100:"#fff9c4",300:"#fff176",500:"#ffeb3b",700:"#fbc02d",900:"#f57f17"},Gt={100:"#ffecb3",300:"#ffd54f",500:"#ffc107",700:"#ffa000",900:"#ff6f00"},Vt={100:"#ffe0b2",300:"#ffb74d",500:"#ff9800",700:"#f57c00",900:"#e65100"},Ut={100:"#ffccbc",300:"#ff8a65",500:"#ff5722",700:"#e64a19",900:"#bf360c"},Wt={100:"#d7ccc8",300:"#a1887f",500:"#795548",700:"#5d4037",900:"#3e2723"},Yt={100:"#cfd8dc",300:"#90a4ae",500:"#607d8b",700:"#455a64",900:"#263238"},Tc=function(t){var n=t.color,r=t.onClick,a=t.onSwatchHover,o=t.hover,s=t.active,i=t.circleSize,l=t.circleSpacing,u=X({default:{swatch:{width:i,height:i,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(i/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:o,active:s});return c.createElement("div",{style:u.swatch},c.createElement(St,{style:u.Swatch,color:n,onClick:r,onHover:a,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+n}}))};Tc.defaultProps={circleSize:28,circleSpacing:14};const eO=Za(Tc);var ho=function(t){var n=t.width,r=t.onChange,a=t.onSwatchHover,o=t.colors,s=t.hex,i=t.circleSize,l=t.styles,u=l===void 0?{}:l,d=t.circleSpacing,f=t.className,p=f===void 0?"":f,g=X(Ce({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-d,marginBottom:-d}}},u)),h=function(b,y){return r({hex:b,source:"hex"},y)};return c.createElement("div",{style:g.card,className:"circle-picker "+p},At(o,function(m){return c.createElement(eO,{key:m,color:m,onClick:h,onSwatchHover:a,active:s===m.toLowerCase(),circleSize:i,circleSpacing:d})}))};ho.propTypes={width:N.oneOfType([N.string,N.number]),circleSize:N.number,circleSpacing:N.number,styles:N.object};ho.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[It[500],Mt[500],Dt[500],jt[500],Pt[500],kt[500],Nt[500],Ht[500],Lt[500],En[500],Ft[500],Bt[500],zt[500],Gt[500],Vt[500],Ut[500],Wt[500],Yt[500]],styles:{}};Ee(ho);function Ts(e){return e===void 0}var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0});var Rs=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},tO=c,Is=nO(tO);function nO(e){return e&&e.__esModule?e:{default:e}}function rO(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}var Zn=24,aO=Rc.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,a=r===void 0?Zn:r,o=e.height,s=o===void 0?Zn:o,i=e.style,l=i===void 0?{}:i,u=rO(e,["fill","width","height","style"]);return Is.default.createElement("svg",Rs({viewBox:"0 0 "+Zn+" "+Zn,style:Rs({fill:n,width:a,height:s},l)},u),Is.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},oO=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function iO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sO(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function lO(e,t){if(typeof t!="function"&&t!==null)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 Ic=function(e){lO(t,e);function t(n){iO(this,t);var r=sO(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(a,o){a.hex?ut(a.hex)&&r.props.onChange({hex:a.hex,source:"hex"},o):a.r||a.g||a.b?r.props.onChange({r:a.r||r.props.rgb.r,g:a.g||r.props.rgb.g,b:a.b||r.props.rgb.b,source:"rgb"},o):a.a?(a.a<0?a.a=0:a.a>1&&(a.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(a.a*100)/100,source:"rgb"},o)):(a.h||a.s||a.l)&&(typeof a.s=="string"&&a.s.includes("%")&&(a.s=a.s.replace("%","")),typeof a.l=="string"&&a.l.includes("%")&&(a.l=a.l.replace("%","")),a.s==1?a.s=.01:a.l==1&&(a.l=.01),r.props.onChange({h:a.h||r.props.hsl.h,s:Number(Ts(a.s)?r.props.hsl.s:a.s),l:Number(Ts(a.l)?r.props.hsl.l:a.l),source:"hsl"},o))},r.showHighlight=function(a){a.currentTarget.style.background="#eee"},r.hideHighlight=function(a){a.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return oO(t,[{key:"render",value:function(){var r=this,a=X({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(te,{style:{input:a.input,label:a.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(te,{style:{input:a.input,label:a.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(te,{style:{input:a.input,label:a.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(te,{style:{input:a.input,label:a.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),c.createElement("div",{style:a.alpha},c.createElement(te,{style:{input:a.input,label:a.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=c.createElement("div",{style:a.fields,className:"flexbox-fix"},c.createElement("div",{style:a.field},c.createElement(te,{style:{input:a.input,label:a.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(te,{style:{input:a.input,label:a.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),c.createElement("div",{style:a.field},c.createElement(te,{style:{input:a.input,label:a.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),c.createElement("div",{style:a.alpha},c.createElement(te,{style:{input:a.input,label:a.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),c.createElement("div",{style:a.wrap,className:"flexbox-fix"},o,c.createElement("div",{style:a.toggle},c.createElement("div",{style:a.icon,onClick:this.toggleViews,ref:function(i){return r.icon=i}},c.createElement(aO,{style:a.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.hsl.a!==1&&a.view==="hex"?{view:"rgb"}:null}}]),t}(c.Component);Ic.defaultProps={view:"hex"};var Ms=function(){var t=X({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return c.createElement("div",{style:t.picker})},cO=function(){var t=X({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return c.createElement("div",{style:t.picker})},po=function(t){var n=t.width,r=t.onChange,a=t.disableAlpha,o=t.rgb,s=t.hsl,i=t.hsv,l=t.hex,u=t.renderers,d=t.styles,f=d===void 0?{}:d,p=t.className,g=p===void 0?"":p,h=t.defaultView,m=X(Ce({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:a});return c.createElement("div",{style:m.picker,className:"chrome-picker "+g},c.createElement("div",{style:m.saturation},c.createElement(kr,{style:m.Saturation,hsl:s,hsv:i,pointer:cO,onChange:r})),c.createElement("div",{style:m.body},c.createElement("div",{style:m.controls,className:"flexbox-fix"},c.createElement("div",{style:m.color},c.createElement("div",{style:m.swatch},c.createElement("div",{style:m.active}),c.createElement(rn,{renderers:u}))),c.createElement("div",{style:m.toggles},c.createElement("div",{style:m.hue},c.createElement(an,{style:m.Hue,hsl:s,pointer:Ms,onChange:r})),c.createElement("div",{style:m.alpha},c.createElement(Qa,{style:m.Alpha,rgb:o,hsl:s,pointer:Ms,renderers:u,onChange:r})))),c.createElement(Ic,{rgb:o,hsl:s,hex:l,view:h,onChange:r,disableAlpha:a})))};po.propTypes={width:N.oneOfType([N.string,N.number]),disableAlpha:N.bool,styles:N.object,defaultView:N.oneOf(["hex","rgb","hsl"])};po.defaultProps={width:225,disableAlpha:!1,styles:{}};Ee(po);var uO=function(t){var n=t.color,r=t.onClick,a=r===void 0?function(){}:r,o=t.onSwatchHover,s=t.active,i=X({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:so(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return c.createElement(St,{style:i.color,color:n,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},c.createElement("div",{style:i.dot}))},dO=function(t){var n=t.hex,r=t.rgb,a=t.onChange,o=X({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(l,u){l.r||l.g||l.b?a({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},u):a({hex:l.hex,source:"hex"},u)};return c.createElement("div",{style:o.fields,className:"flexbox-fix"},c.createElement("div",{style:o.active}),c.createElement(te,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:n,onChange:s}),c.createElement(te,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:s}),c.createElement(te,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:s}),c.createElement(te,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:s}))},go=function(t){var n=t.onChange,r=t.onSwatchHover,a=t.colors,o=t.hex,s=t.rgb,i=t.styles,l=i===void 0?{}:i,u=t.className,d=u===void 0?"":u,f=X(Ce({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),p=function(h,m){h.hex?ut(h.hex)&&n({hex:h.hex,source:"hex"},m):n(h,m)};return c.createElement(zn,{style:f.Compact,styles:l},c.createElement("div",{style:f.compact,className:"compact-picker "+d},c.createElement("div",null,At(a,function(g){return c.createElement(uO,{key:g,color:g,active:g.toLowerCase()===o,onClick:p,onSwatchHover:r})}),c.createElement("div",{style:f.clear})),c.createElement(dO,{hex:o,rgb:s,onChange:p})))};go.propTypes={colors:N.arrayOf(N.string),styles:N.object};go.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Ee(go);var fO=function(t){var n=t.hover,r=t.color,a=t.onClick,o=t.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},i=X({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:n});return c.createElement("div",{style:i.swatch},c.createElement(St,{color:r,onClick:a,onHover:o,focusStyle:s}))};const hO=Za(fO);var vo=function(t){var n=t.width,r=t.colors,a=t.onChange,o=t.onSwatchHover,s=t.triangle,i=t.styles,l=i===void 0?{}:i,u=t.className,d=u===void 0?"":u,f=X(Ce({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right","bottom-left-triangle":s==="bottom-left","bottom-right-triangle":s==="bottom-right"}),p=function(h,m){return a({hex:h,source:"hex"},m)};return c.createElement("div",{style:f.card,className:"github-picker "+d},c.createElement("div",{style:f.triangleShadow}),c.createElement("div",{style:f.triangle}),At(r,function(g){return c.createElement(hO,{color:g,key:g,onClick:p,onSwatchHover:o})}))};vo.propTypes={width:N.oneOfType([N.string,N.number]),colors:N.arrayOf(N.string),triangle:N.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:N.object};vo.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Ee(vo);var pO=function(t){var n=t.direction,r=X({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return c.createElement("div",{style:r.picker})},gO=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},mo=function(t){var n=t.width,r=t.height,a=t.onChange,o=t.hsl,s=t.direction,i=t.pointer,l=t.styles,u=l===void 0?{}:l,d=t.className,f=d===void 0?"":d,p=X(Ce({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},u)),g=function(m){return a({a:1,h:m.h,l:.5,s:1})};return c.createElement("div",{style:p.picker,className:"hue-picker "+f},c.createElement(an,gO({},p.hue,{hsl:o,pointer:i,onChange:g,direction:s})))};mo.propTypes={styles:N.object};mo.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:pO,styles:{}};Ee(mo);var vO=function(t){var n=t.onChange,r=t.hex,a=t.rgb,o=t.styles,s=o===void 0?{}:o,i=t.className,l=i===void 0?"":i,u=X(Ce({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},s)),d=function(p,g){p.hex?ut(p.hex)&&n({hex:p.hex,source:"hex"},g):(p.r||p.g||p.b)&&n({r:p.r||a.r,g:p.g||a.g,b:p.b||a.b,source:"rgb"},g)};return c.createElement(zn,{styles:s},c.createElement("div",{style:u.material,className:"material-picker "+l},c.createElement(te,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:r,onChange:d}),c.createElement("div",{style:u.split,className:"flexbox-fix"},c.createElement("div",{style:u.third},c.createElement(te,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:a.r,onChange:d})),c.createElement("div",{style:u.third},c.createElement(te,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:a.g,onChange:d})),c.createElement("div",{style:u.third},c.createElement(te,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:a.b,onChange:d})))))};Ee(vO);var mO=function(t){var n=t.onChange,r=t.rgb,a=t.hsv,o=t.hex,s=X({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),i=function(u,d){u["#"]?ut(u["#"])&&n({hex:u["#"],source:"hex"},d):u.r||u.g||u.b?n({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,source:"rgb"},d):(u.h||u.s||u.v)&&n({h:u.h||a.h,s:u.s||a.s,v:u.v||a.v,source:"hsv"},d)};return c.createElement("div",{style:s.fields},c.createElement(te,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"h",value:Math.round(a.h),onChange:i}),c.createElement(te,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"s",value:Math.round(a.s*100),onChange:i}),c.createElement(te,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"v",value:Math.round(a.v*100),onChange:i}),c.createElement("div",{style:s.divider}),c.createElement(te,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:r.r,onChange:i}),c.createElement(te,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:r.g,onChange:i}),c.createElement(te,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:r.b,onChange:i}),c.createElement("div",{style:s.divider}),c.createElement(te,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"#",value:o.replace("#",""),onChange:i}),c.createElement("div",{style:s.fieldSymbols},c.createElement("div",{style:s.symbol},"°"),c.createElement("div",{style:s.symbol},"%"),c.createElement("div",{style:s.symbol},"%")))},bO=function(t){var n=t.hsl,r=X({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return c.createElement("div",{style:r.picker})},yO=function(){var t=X({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return c.createElement("div",{style:t.pointer},c.createElement("div",{style:t.left},c.createElement("div",{style:t.leftInside})),c.createElement("div",{style:t.right},c.createElement("div",{style:t.rightInside})))},Ds=function(t){var n=t.onClick,r=t.label,a=t.children,o=t.active,s=X({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return c.createElement("div",{style:s.button,onClick:n},r||a)},xO=function(t){var n=t.rgb,r=t.currentColor,a=X({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return c.createElement("div",null,c.createElement("div",{style:a.label},"new"),c.createElement("div",{style:a.swatches},c.createElement("div",{style:a.new}),c.createElement("div",{style:a.current})),c.createElement("div",{style:a.label},"current"))},wO=function(){function e(t,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function CO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EO(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function SO(e,t){if(typeof t!="function"&&t!==null)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 bo=function(e){SO(t,e);function t(n){CO(this,t);var r=EO(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.state={currentColor:n.hex},r}return wO(t,[{key:"render",value:function(){var r=this.props,a=r.styles,o=a===void 0?{}:a,s=r.className,i=s===void 0?"":s,l=X(Ce({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},o));return c.createElement("div",{style:l.picker,className:"photoshop-picker "+i},c.createElement("div",{style:l.head},this.props.header),c.createElement("div",{style:l.body,className:"flexbox-fix"},c.createElement("div",{style:l.saturation},c.createElement(kr,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:bO,onChange:this.props.onChange})),c.createElement("div",{style:l.hue},c.createElement(an,{direction:"vertical",hsl:this.props.hsl,pointer:yO,onChange:this.props.onChange})),c.createElement("div",{style:l.controls},c.createElement("div",{style:l.top,className:"flexbox-fix"},c.createElement("div",{style:l.previews},c.createElement(xO,{rgb:this.props.rgb,currentColor:this.state.currentColor})),c.createElement("div",{style:l.actions},c.createElement(Ds,{label:"OK",onClick:this.props.onAccept,active:!0}),c.createElement(Ds,{label:"Cancel",onClick:this.props.onCancel}),c.createElement(mO,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(c.Component);bo.propTypes={header:N.string,styles:N.object};bo.defaultProps={header:"Color Picker",styles:{}};Ee(bo);var AO=function(t){var n=t.onChange,r=t.rgb,a=t.hsl,o=t.hex,s=t.disableAlpha,i=X({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:s}),l=function(d,f){d.hex?ut(d.hex)&&n({hex:d.hex,source:"hex"},f):d.r||d.g||d.b?n({r:d.r||r.r,g:d.g||r.g,b:d.b||r.b,a:r.a,source:"rgb"},f):d.a&&(d.a<0?d.a=0:d.a>100&&(d.a=100),d.a/=100,n({h:a.h,s:a.s,l:a.l,a:d.a,source:"rgb"},f))};return c.createElement("div",{style:i.fields,className:"flexbox-fix"},c.createElement("div",{style:i.double},c.createElement(te,{style:{input:i.input,label:i.label},label:"hex",value:o.replace("#",""),onChange:l})),c.createElement("div",{style:i.single},c.createElement(te,{style:{input:i.input,label:i.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:i.single},c.createElement(te,{style:{input:i.input,label:i.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:i.single},c.createElement(te,{style:{input:i.input,label:i.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),c.createElement("div",{style:i.alpha},c.createElement(te,{style:{input:i.input,label:i.label},label:"a",value:Math.round(r.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},$O=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},Mc=function(t){var n=t.colors,r=t.onClick,a=r===void 0?function(){}:r,o=t.onSwatchHover,s=X({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),i=function(u,d){a({hex:u,source:"hex"},d)};return c.createElement("div",{style:s.colors,className:"flexbox-fix"},n.map(function(l){var u=typeof l=="string"?{color:l}:l,d=""+u.color+(u.title||"");return c.createElement("div",{key:d,style:s.swatchWrap},c.createElement(St,$O({},u,{style:s.swatch,onClick:i,onHover:o,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+u.color}})))}))};Mc.propTypes={colors:N.arrayOf(N.oneOfType([N.string,N.shape({color:N.string,title:N.string})])).isRequired};var OO=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},yo=function(t){var n=t.width,r=t.rgb,a=t.hex,o=t.hsv,s=t.hsl,i=t.onChange,l=t.onSwatchHover,u=t.disableAlpha,d=t.presetColors,f=t.renderers,p=t.styles,g=p===void 0?{}:p,h=t.className,m=h===void 0?"":h,b=X(Ce({default:OO({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},g),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},g),{disableAlpha:u});return c.createElement("div",{style:b.picker,className:"sketch-picker "+m},c.createElement("div",{style:b.saturation},c.createElement(kr,{style:b.Saturation,hsl:s,hsv:o,onChange:i})),c.createElement("div",{style:b.controls,className:"flexbox-fix"},c.createElement("div",{style:b.sliders},c.createElement("div",{style:b.hue},c.createElement(an,{style:b.Hue,hsl:s,onChange:i})),c.createElement("div",{style:b.alpha},c.createElement(Qa,{style:b.Alpha,rgb:r,hsl:s,renderers:f,onChange:i}))),c.createElement("div",{style:b.color},c.createElement(rn,null),c.createElement("div",{style:b.activeColor}))),c.createElement(AO,{rgb:r,hsl:s,hex:a,onChange:i,disableAlpha:u}),c.createElement(Mc,{colors:d,onClick:i,onSwatchHover:l}))};yo.propTypes={disableAlpha:N.bool,width:N.oneOfType([N.string,N.number]),styles:N.object};yo.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};Ee(yo);var yn=function(t){var n=t.hsl,r=t.offset,a=t.onClick,o=a===void 0?function(){}:a,s=t.active,i=t.first,l=t.last,u=X({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:i,last:l}),d=function(p){return o({h:n.h,s:.5,l:r,source:"hsl"},p)};return c.createElement("div",{style:u.swatch,onClick:d})},_O=function(t){var n=t.onClick,r=t.hsl,a=X({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),o=.1;return c.createElement("div",{style:a.swatches},c.createElement("div",{style:a.swatch},c.createElement(yn,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<o&&Math.abs(r.s-.5)<o,onClick:n,first:!0})),c.createElement("div",{style:a.swatch},c.createElement(yn,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<o&&Math.abs(r.s-.5)<o,onClick:n})),c.createElement("div",{style:a.swatch},c.createElement(yn,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<o&&Math.abs(r.s-.5)<o,onClick:n})),c.createElement("div",{style:a.swatch},c.createElement(yn,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<o&&Math.abs(r.s-.5)<o,onClick:n})),c.createElement("div",{style:a.swatch},c.createElement(yn,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<o&&Math.abs(r.s-.5)<o,onClick:n,last:!0})),c.createElement("div",{style:a.clear}))},TO=function(){var t=X({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return c.createElement("div",{style:t.picker})},xo=function(t){var n=t.hsl,r=t.onChange,a=t.pointer,o=t.styles,s=o===void 0?{}:o,i=t.className,l=i===void 0?"":i,u=X(Ce({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},s));return c.createElement("div",{style:u.wrap||{},className:"slider-picker "+l},c.createElement("div",{style:u.hue},c.createElement(an,{style:u.Hue,hsl:n,pointer:a,onChange:r})),c.createElement("div",{style:u.swatches},c.createElement(_O,{hsl:n,onClick:r})))};xo.propTypes={styles:N.object};xo.defaultProps={pointer:TO,styles:{}};Ee(xo);var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0});var js=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},RO=c,Ps=IO(RO);function IO(e){return e&&e.__esModule?e:{default:e}}function MO(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}var Qn=24,DO=Dc.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,a=r===void 0?Qn:r,o=e.height,s=o===void 0?Qn:o,i=e.style,l=i===void 0?{}:i,u=MO(e,["fill","width","height","style"]);return Ps.default.createElement("svg",js({viewBox:"0 0 "+Qn+" "+Qn,style:js({fill:n,width:a,height:s},l)},u),Ps.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},jO=function(t){var n=t.color,r=t.onClick,a=r===void 0?function(){}:r,o=t.onSwatchHover,s=t.first,i=t.last,l=t.active,u=X({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:so(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:s,last:i,active:l,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return c.createElement(St,{color:n,style:u.color,onClick:a,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},c.createElement("div",{style:u.check},c.createElement(DO,null)))},PO=function(t){var n=t.onClick,r=t.onSwatchHover,a=t.group,o=t.active,s=X({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return c.createElement("div",{style:s.group},At(a,function(i,l){return c.createElement(jO,{key:i,color:i,active:i.toLowerCase()===o,first:l===0,last:l===a.length-1,onClick:n,onSwatchHover:r})}))},wo=function(t){var n=t.width,r=t.height,a=t.onChange,o=t.onSwatchHover,s=t.colors,i=t.hex,l=t.styles,u=l===void 0?{}:l,d=t.className,f=d===void 0?"":d,p=X(Ce({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),g=function(m,b){return a({hex:m,source:"hex"},b)};return c.createElement("div",{style:p.picker,className:"swatches-picker "+f},c.createElement(zn,null,c.createElement("div",{style:p.overflow},c.createElement("div",{style:p.body},At(s,function(h){return c.createElement(PO,{key:h.toString(),group:h,active:i,onClick:g,onSwatchHover:o})}),c.createElement("div",{style:p.clear})))))};wo.propTypes={width:N.oneOfType([N.string,N.number]),height:N.oneOfType([N.string,N.number]),colors:N.arrayOf(N.arrayOf(N.string)),styles:N.object};wo.defaultProps={width:320,height:240,colors:[[It[900],It[700],It[500],It[300],It[100]],[Mt[900],Mt[700],Mt[500],Mt[300],Mt[100]],[Dt[900],Dt[700],Dt[500],Dt[300],Dt[100]],[jt[900],jt[700],jt[500],jt[300],jt[100]],[Pt[900],Pt[700],Pt[500],Pt[300],Pt[100]],[kt[900],kt[700],kt[500],kt[300],kt[100]],[Nt[900],Nt[700],Nt[500],Nt[300],Nt[100]],[Ht[900],Ht[700],Ht[500],Ht[300],Ht[100]],[Lt[900],Lt[700],Lt[500],Lt[300],Lt[100]],["#194D33",En[700],En[500],En[300],En[100]],[Ft[900],Ft[700],Ft[500],Ft[300],Ft[100]],[Bt[900],Bt[700],Bt[500],Bt[300],Bt[100]],[zt[900],zt[700],zt[500],zt[300],zt[100]],[Gt[900],Gt[700],Gt[500],Gt[300],Gt[100]],[Vt[900],Vt[700],Vt[500],Vt[300],Vt[100]],[Ut[900],Ut[700],Ut[500],Ut[300],Ut[100]],[Wt[900],Wt[700],Wt[500],Wt[300],Wt[100]],[Yt[900],Yt[700],Yt[500],Yt[300],Yt[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Ee(wo);var Co=function(t){var n=t.onChange,r=t.onSwatchHover,a=t.hex,o=t.colors,s=t.width,i=t.triangle,l=t.styles,u=l===void 0?{}:l,d=t.className,f=d===void 0?"":d,p=X(Ce({default:{card:{width:s,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":i==="hide","top-left-triangle":i==="top-left","top-right-triangle":i==="top-right"}),g=function(m,b){ut(m)&&n({hex:m,source:"hex"},b)};return c.createElement("div",{style:p.card,className:"twitter-picker "+f},c.createElement("div",{style:p.triangleShadow}),c.createElement("div",{style:p.triangle}),c.createElement("div",{style:p.body},At(o,function(h,m){return c.createElement(St,{key:m,color:h,hex:h,style:p.swatch,onClick:g,onHover:r,focusStyle:{boxShadow:"0 0 4px "+h}})}),c.createElement("div",{style:p.hash},"#"),c.createElement(te,{label:null,style:{input:p.input},value:a.replace("#",""),onChange:g}),c.createElement("div",{style:p.clear})))};Co.propTypes={width:N.oneOfType([N.string,N.number]),triangle:N.oneOf(["hide","top-left","top-right"]),colors:N.arrayOf(N.string),styles:N.object};Co.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};const kO=Ee(Co);var Eo=function(t){var n=X({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return c.createElement("div",{style:n.picker})};Eo.propTypes={hsl:N.shape({h:N.number,s:N.number,l:N.number,a:N.number})};Eo.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var So=function(t){var n=X({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return c.createElement("div",{style:n.picker})};So.propTypes={hsl:N.shape({h:N.number,s:N.number,l:N.number,a:N.number})};So.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var NO=function(t){var n=t.onChange,r=t.rgb,a=t.hsl,o=t.hex,s=t.hsv,i=function(g,h){if(g.hex)ut(g.hex)&&n({hex:g.hex,source:"hex"},h);else if(g.rgb){var m=g.rgb.split(",");ia(g.rgb,"rgb")&&n({r:m[0],g:m[1],b:m[2],a:1,source:"rgb"},h)}else if(g.hsv){var b=g.hsv.split(",");ia(g.hsv,"hsv")&&(b[2]=b[2].replace("%",""),b[1]=b[1].replace("%",""),b[0]=b[0].replace("°",""),b[1]==1?b[1]=.01:b[2]==1&&(b[2]=.01),n({h:Number(b[0]),s:Number(b[1]),v:Number(b[2]),source:"hsv"},h))}else if(g.hsl){var y=g.hsl.split(",");ia(g.hsl,"hsl")&&(y[2]=y[2].replace("%",""),y[1]=y[1].replace("%",""),y[0]=y[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(y[0]),s:Number(y[1]),v:Number(y[2]),source:"hsl"},h))}},l=X({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=r.r+", "+r.g+", "+r.b,d=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.l*100)+"%",f=Math.round(s.h)+"°, "+Math.round(s.s*100)+"%, "+Math.round(s.v*100)+"%";return c.createElement("div",{style:l.wrap,className:"flexbox-fix"},c.createElement("div",{style:l.fields},c.createElement("div",{style:l.double},c.createElement(te,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:i})),c.createElement("div",{style:l.column},c.createElement("div",{style:l.single},c.createElement(te,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:i})),c.createElement("div",{style:l.single},c.createElement(te,{style:{input:l.input2,label:l.label2},label:"hsv",value:f,onChange:i})),c.createElement("div",{style:l.single},c.createElement(te,{style:{input:l.input2,label:l.label2},label:"hsl",value:d,onChange:i})))))},Ao=function(t){var n=t.width,r=t.onChange,a=t.rgb,o=t.hsl,s=t.hsv,i=t.hex,l=t.header,u=t.styles,d=u===void 0?{}:u,f=t.className,p=f===void 0?"":f,g=X(Ce({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+a.r+", "+a.g+", "+a.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},d));return c.createElement("div",{style:g.picker,className:"google-picker "+p},c.createElement("div",{style:g.head},l),c.createElement("div",{style:g.swatch}),c.createElement("div",{style:g.saturation},c.createElement(kr,{hsl:o,hsv:s,pointer:Eo,onChange:r})),c.createElement("div",{style:g.body},c.createElement("div",{style:g.controls,className:"flexbox-fix"},c.createElement("div",{style:g.hue},c.createElement(an,{style:g.Hue,hsl:o,radius:"4px",pointer:So,onChange:r}))),c.createElement(NO,{rgb:a,hsl:o,hex:i,hsv:s,onChange:r})))};Ao.propTypes={width:N.oneOfType([N.string,N.number]),styles:N.object,header:N.string};Ao.defaultProps={width:652,styles:{},header:"Color picker"};Ee(Ao);const HO=({initialColor:e,applyOpacity:t,onColorChange:n,onClose:r})=>{const[a,o]=c.useState(!1),[s,i]=c.useState({r:255,g:255,b:255,a:1}),[l,u]=c.useState("left"),d=c.useRef(null),f=E=>`rgba(${E.r}, ${E.g}, ${E.b}, ${t??E.a})`;function p(E,O=1){let A=E.replace("#","");A.length===3&&(A=A[0]+A[0]+A[1]+A[1]+A[2]+A[2]);const C=parseInt(A,16),$=C>>16&255,_=C>>8&255,I=C&255;return{r:$,g:_,b:I,a:O}}c.useEffect(()=>{if(e){if(typeof e=="string"&&/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)){const E=p(e,1);i(E)}else if(typeof e=="string"&&/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/.test(e)){const E=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/);if(E){const[,O,A,C,$]=E;i({r:Number(O),g:Number(A),b:Number(C),a:$!==void 0?Number($):1})}}}},[e]);const g=()=>{if(d.current){const E=d.current.getBoundingClientRect();window.innerWidth-E.right<276+20?u("right"):u("left")}},h=E=>{E.stopPropagation(),g(),o(!a)},m=()=>{o(!1),r==null||r()},b=E=>{t!==void 0&&(E.rgb.a=t),console.log("Color changed:",E),i(E.rgb),n(f(E.rgb))},y={background:f(s)};return x.jsxs("div",{className:"relative",children:[x.jsx("div",{ref:d,className:"inline-block cursor-pointer bg-slate-50 rounded border border-neutral-100 shadow",onClick:h,children:x.jsx("div",{className:"w-8 h-4 rounded",style:y})}),a&&x.jsxs("div",{className:`absolute z-20 mt-2 ${l==="right"?"right-0":"left-0"}`,onClick:E=>{E.stopPropagation(),E.preventDefault()},children:[x.jsx("div",{className:"fixed inset-0",onClick:m}),x.jsx(kO,{color:s,triangle:l==="right"?"top-right":"top-left",colors:["#ffc094","#fee7a8","#b5f1db","#d0ecfe","#9ed5f4","#d2d9df","#f8b2c4","#F78DA7","#d89ef9"],onChange:b})]})]})},jc=vt(e=>({openCommentCell:void 0,actions:{setOpenCommentCell:t=>e({openCommentCell:t})}})),LO=()=>jc(e=>e.openCommentCell),$o=()=>jc(e=>e.actions);function FO(){const e=fl(),t=hl(),{setOpenCommentCell:n}=$o();return{getCellActions:(a,o,s,i,l)=>{const u=e.filter(p=>a[p.propertyId]===p.value&&p.columnId===o)||[],d=t==null?void 0:t.find(p=>a[p.propertyId]===p.value&&p.columnId===o&&p.style.backgroundColor),f=d==null?void 0:d.style.backgroundColor;return[{icon:_u,iconColor:"#5588b4",text:`${u.length>0?"Edit":"Add"} a comment`,onClick:(p,g,h)=>{console.log(h),h&&(console.log("Opening comment cell at:",h),n(h))}},{icon:Iu,iconColor:"#299b42",text:"Set cell color",customRender:()=>x.jsxs(x.Fragment,{children:[x.jsx(HO,{initialColor:f,onColorChange:p=>s(a,o,{backgroundColor:p}),onClose:l}),f&&x.jsx(je,{circle:!0,small:!0,icon:Ou,iconSize:.6,iconColor:"var(--error-color)",className:"h-5 min-h-5",onClick:()=>i(a,o,"backgroundColor")})]}),onClick:()=>{}}]}}}function BO(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(a=>a(r))},t)}const Lr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sn(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Oo(e){return"nodeType"in e}function Se(e){var t,n;return e?sn(e)?e:Oo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function _o(e){const{Document:t}=Se(e);return e instanceof t}function Gn(e){return sn(e)?!1:e instanceof Se(e).HTMLElement}function Pc(e){return e instanceof Se(e).SVGElement}function ln(e){return e?sn(e)?e.document:Oo(e)?_o(e)?e:Gn(e)||Pc(e)?e.ownerDocument:document:document:document}const We=Lr?c.useLayoutEffect:c.useEffect;function To(e){const t=c.useRef(e);return We(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return t.current==null?void 0:t.current(...r)},[])}function zO(){const e=c.useRef(null),t=c.useCallback((r,a)=>{e.current=setInterval(r,a)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Rn(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return We(()=>{n.current!==e&&(n.current=e)},t),n}function Vn(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function vr(e){const t=To(e),n=c.useRef(null),r=c.useCallback(a=>{a!==n.current&&(t==null||t(a,n.current)),n.current=a},[]);return[n,r]}function $a(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let la={};function Un(e,t){return c.useMemo(()=>{if(t)return t;const n=la[e]==null?0:la[e]+1;return la[e]=n,e+"-"+n},[e,t])}function kc(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return r.reduce((o,s)=>{const i=Object.entries(s);for(const[l,u]of i){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},{...t})}}const Kt=kc(1),mr=kc(-1);function GO(e){return"clientX"in e&&"clientY"in e}function Ro(e){if(!e)return!1;const{KeyboardEvent:t}=Se(e.target);return t&&e instanceof t}function VO(e){if(!e)return!1;const{TouchEvent:t}=Se(e.target);return t&&e instanceof t}function Oa(e){if(VO(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return GO(e)?{x:e.clientX,y:e.clientY}:null}const In=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[In.Translate.toString(e),In.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ks="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function UO(e){return e.matches(ks)?e:e.querySelector(ks)}const WO={display:"none"};function YO(e){let{id:t,value:n}=e;return c.createElement("div",{id:t,style:WO},n)}function KO(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return c.createElement("div",{id:t,style:a,role:"status","aria-live":r,"aria-atomic":!0},n)}function XO(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Nc=c.createContext(null);function qO(e){const t=c.useContext(Nc);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function JO(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:a,event:o}=r;e.forEach(s=>{var i;return(i=s[a])==null?void 0:i.call(s,o)})},[e]),t]}const ZO={draggable:`
72
+ To pick up a draggable item, press the space bar.
73
+ While dragging, use the arrow keys to move the item.
74
+ Press space again to drop the item in its new position, or press escape to cancel.
75
+ `},QO={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function e_(e){let{announcements:t=QO,container:n,hiddenTextDescribedById:r,screenReaderInstructions:a=ZO}=e;const{announce:o,announcement:s}=XO(),i=Un("DndLiveRegion"),[l,u]=c.useState(!1);if(c.useEffect(()=>{u(!0)},[]),qO(c.useMemo(()=>({onDragStart(f){let{active:p}=f;o(t.onDragStart({active:p}))},onDragMove(f){let{active:p,over:g}=f;t.onDragMove&&o(t.onDragMove({active:p,over:g}))},onDragOver(f){let{active:p,over:g}=f;o(t.onDragOver({active:p,over:g}))},onDragEnd(f){let{active:p,over:g}=f;o(t.onDragEnd({active:p,over:g}))},onDragCancel(f){let{active:p,over:g}=f;o(t.onDragCancel({active:p,over:g}))}}),[o,t])),!l)return null;const d=c.createElement(c.Fragment,null,c.createElement(YO,{id:r,value:a.draggable}),c.createElement(KO,{id:i,announcement:s}));return n?pt.createPortal(d,n):d}var ge;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ge||(ge={}));function br(){}const Le=Object.freeze({x:0,y:0});function t_(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function n_(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function r_(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=a-r,i=o-n;if(r<a&&n<o){const l=t.width*t.height,u=e.width*e.height,d=s*i,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const a_=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=[];for(const o of r){const{id:s}=o,i=n.get(s);if(i){const l=r_(i,t);l>0&&a.push({id:s,data:{droppableContainer:o,value:l}})}}return a.sort(t_)};function o_(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Hc(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Le}function i_(e){return function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return a.reduce((s,i)=>({...s,top:s.top+e*i.y,bottom:s.bottom+e*i.y,left:s.left+e*i.x,right:s.right+e*i.x}),{...n})}}const s_=i_(1);function l_(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function c_(e,t,n){const r=l_(t);if(!r)return e;const{scaleX:a,scaleY:o,x:s,y:i}=r,l=e.left-s-(1-a)*parseFloat(n),u=e.top-i-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=a?e.width/a:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const u_={ignoreTransform:!1};function cn(e,t){t===void 0&&(t=u_);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Se(e).getComputedStyle(e);u&&(n=c_(n,u,d))}const{top:r,left:a,width:o,height:s,bottom:i,right:l}=n;return{top:r,left:a,width:o,height:s,bottom:i,right:l}}function Ns(e){return cn(e,{ignoreTransform:!0})}function d_(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function f_(e,t){return t===void 0&&(t=Se(e).getComputedStyle(e)),t.position==="fixed"}function h_(e,t){t===void 0&&(t=Se(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const o=t[a];return typeof o=="string"?n.test(o):!1})}function Io(e,t){const n=[];function r(a){if(t!=null&&n.length>=t||!a)return n;if(_o(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!Gn(a)||Pc(a)||n.includes(a))return n;const o=Se(e).getComputedStyle(a);return a!==e&&h_(a,o)&&n.push(a),f_(a,o)?n:r(a.parentNode)}return e?r(e):n}function Lc(e){const[t]=Io(e,1);return t??null}function ca(e){return!Lr||!e?null:sn(e)?e:Oo(e)?_o(e)||e===ln(e).scrollingElement?window:Gn(e)?e:null:null}function Fc(e){return sn(e)?e.scrollX:e.scrollLeft}function Bc(e){return sn(e)?e.scrollY:e.scrollTop}function _a(e){return{x:Fc(e),y:Bc(e)}}var me;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(me||(me={}));function zc(e){return!Lr||!e?!1:e===document.scrollingElement}function Gc(e){const t={x:0,y:0},n=zc(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},a=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,i=e.scrollLeft>=r.x;return{isTop:a,isLeft:o,isBottom:s,isRight:i,maxScroll:r,minScroll:t}}const p_={x:.2,y:.2};function g_(e,t,n,r,a){let{top:o,left:s,right:i,bottom:l}=n;r===void 0&&(r=10),a===void 0&&(a=p_);const{isTop:u,isBottom:d,isLeft:f,isRight:p}=Gc(e),g={x:0,y:0},h={x:0,y:0},m={height:t.height*a.y,width:t.width*a.x};return!u&&o<=t.top+m.height?(g.y=me.Backward,h.y=r*Math.abs((t.top+m.height-o)/m.height)):!d&&l>=t.bottom-m.height&&(g.y=me.Forward,h.y=r*Math.abs((t.bottom-m.height-l)/m.height)),!p&&i>=t.right-m.width?(g.x=me.Forward,h.x=r*Math.abs((t.right-m.width-i)/m.width)):!f&&s<=t.left+m.width&&(g.x=me.Backward,h.x=r*Math.abs((t.left+m.width-s)/m.width)),{direction:g,speed:h}}function v_(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Vc(e){return e.reduce((t,n)=>Kt(t,_a(n)),Le)}function m_(e){return e.reduce((t,n)=>t+Fc(n),0)}function b_(e){return e.reduce((t,n)=>t+Bc(n),0)}function y_(e,t){if(t===void 0&&(t=cn),!e)return;const{top:n,left:r,bottom:a,right:o}=t(e);Lc(e)&&(a<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const x_=[["x",["left","right"],m_],["y",["top","bottom"],b_]];class Mo{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Io(n),a=Vc(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,i]of x_)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=i(r),d=a[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class An{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var a;(a=this.target)==null||a.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function w_(e){const{EventTarget:t}=Se(e);return e instanceof t?e:ln(e)}function ua(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Me;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Me||(Me={}));function Hs(e){e.preventDefault()}function C_(e){e.stopPropagation()}var re;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(re||(re={}));const Uc={start:[re.Space,re.Enter],cancel:[re.Esc],end:[re.Space,re.Enter,re.Tab]},E_=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case re.Right:return{...n,x:n.x+25};case re.Left:return{...n,x:n.x-25};case re.Down:return{...n,y:n.y+25};case re.Up:return{...n,y:n.y-25}}};class Wc{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new An(ln(n)),this.windowListeners=new An(Se(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Me.Resize,this.handleCancel),this.windowListeners.add(Me.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Me.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&y_(r),n(Le)}handleKeyDown(t){if(Ro(t)){const{active:n,context:r,options:a}=this.props,{keyboardCodes:o=Uc,coordinateGetter:s=E_,scrollBehavior:i="smooth"}=a,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:Le;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:n,context:r.current,currentCoordinates:d});if(f){const p=mr(f,d),g={x:0,y:0},{scrollableAncestors:h}=r.current;for(const m of h){const b=t.code,{isTop:y,isRight:E,isLeft:O,isBottom:A,maxScroll:C,minScroll:$}=Gc(m),_=v_(m),I={x:Math.min(b===re.Right?_.right-_.width/2:_.right,Math.max(b===re.Right?_.left:_.left+_.width/2,f.x)),y:Math.min(b===re.Down?_.bottom-_.height/2:_.bottom,Math.max(b===re.Down?_.top:_.top+_.height/2,f.y))},L=b===re.Right&&!E||b===re.Left&&!O,V=b===re.Down&&!A||b===re.Up&&!y;if(L&&I.x!==f.x){const B=m.scrollLeft+p.x,W=b===re.Right&&B<=C.x||b===re.Left&&B>=$.x;if(W&&!p.y){m.scrollTo({left:B,behavior:i});return}W?g.x=m.scrollLeft-B:g.x=b===re.Right?m.scrollLeft-C.x:m.scrollLeft-$.x,g.x&&m.scrollBy({left:-g.x,behavior:i});break}else if(V&&I.y!==f.y){const B=m.scrollTop+p.y,W=b===re.Down&&B<=C.y||b===re.Up&&B>=$.y;if(W&&!p.x){m.scrollTo({top:B,behavior:i});return}W?g.y=m.scrollTop-B:g.y=b===re.Down?m.scrollTop-C.y:m.scrollTop-$.y,g.y&&m.scrollBy({top:-g.y,behavior:i});break}}this.handleMove(t,Kt(mr(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Wc.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Uc,onActivation:a}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const i=o.activatorNode.current;return i&&e.target!==i?!1:(e.preventDefault(),a==null||a({event:e.nativeEvent}),!0)}return!1}}];function Ls(e){return!!(e&&"distance"in e)}function Fs(e){return!!(e&&"delay"in e)}class Do{constructor(t,n,r){var a;r===void 0&&(r=w_(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=ln(s),this.documentListeners=new An(this.document),this.listeners=new An(r),this.windowListeners=new An(Se(s)),this.initialCoordinates=(a=Oa(o))!=null?a:Le,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Me.Resize,this.handleCancel),this.windowListeners.add(Me.DragStart,Hs),this.windowListeners.add(Me.VisibilityChange,this.handleCancel),this.windowListeners.add(Me.ContextMenu,Hs),this.documentListeners.add(Me.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Fs(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Ls(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:a}=this.props;a(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Me.Click,C_,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Me.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:a,props:o}=this,{onMove:s,options:{activationConstraint:i}}=o;if(!a)return;const l=(n=Oa(t))!=null?n:Le,u=mr(a,l);if(!r&&i){if(Ls(i)){if(i.tolerance!=null&&ua(u,i.tolerance))return this.handleCancel();if(ua(u,i.distance))return this.handleStart()}if(Fs(i)&&ua(u,i.tolerance))return this.handleCancel();this.handlePending(i,u);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===re.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const S_={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Yc extends Do{constructor(t){const{event:n}=t,r=ln(n.target);super(t,S_,r)}}Yc.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const A_={move:{name:"mousemove"},end:{name:"mouseup"}};var Ta;(function(e){e[e.RightClick=2]="RightClick"})(Ta||(Ta={}));class $_ extends Do{constructor(t){super(t,A_,ln(t.event.target))}}$_.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Ta.RightClick?!1:(r==null||r({event:n}),!0)}}];const da={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class O_ extends Do{constructor(t){super(t,da)}static setup(){return window.addEventListener(da.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(da.move.name,t)};function t(){}}}O_.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:a}=n;return a.length>1?!1:(r==null||r({event:n}),!0)}}];var $n;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})($n||($n={}));var yr;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(yr||(yr={}));function __(e){let{acceleration:t,activator:n=$n.Pointer,canScroll:r,draggingRect:a,enabled:o,interval:s=5,order:i=yr.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e;const g=R_({delta:f,disabled:!o}),[h,m]=zO(),b=c.useRef({x:0,y:0}),y=c.useRef({x:0,y:0}),E=c.useMemo(()=>{switch(n){case $n.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case $n.DraggableRect:return a}},[n,a,l]),O=c.useRef(null),A=c.useCallback(()=>{const $=O.current;if(!$)return;const _=b.current.x*y.current.x,I=b.current.y*y.current.y;$.scrollBy(_,I)},[]),C=c.useMemo(()=>i===yr.TreeOrder?[...u].reverse():u,[i,u]);c.useEffect(()=>{if(!o||!u.length||!E){m();return}for(const $ of C){if((r==null?void 0:r($))===!1)continue;const _=u.indexOf($),I=d[_];if(!I)continue;const{direction:L,speed:V}=g_($,I,E,t,p);for(const B of["x","y"])g[B][L[B]]||(V[B]=0,L[B]=0);if(V.x>0||V.y>0){m(),O.current=$,h(A,s),b.current=V,y.current=L;return}}b.current={x:0,y:0},y.current={x:0,y:0},m()},[t,A,r,m,o,s,JSON.stringify(E),JSON.stringify(g),h,u,C,d,JSON.stringify(p)])}const T_={x:{[me.Backward]:!1,[me.Forward]:!1},y:{[me.Backward]:!1,[me.Forward]:!1}};function R_(e){let{delta:t,disabled:n}=e;const r=$a(t);return Vn(a=>{if(n||!r||!a)return T_;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[me.Backward]:a.x[me.Backward]||o.x===-1,[me.Forward]:a.x[me.Forward]||o.x===1},y:{[me.Backward]:a.y[me.Backward]||o.y===-1,[me.Forward]:a.y[me.Forward]||o.y===1}}},[n,t,r])}function I_(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Vn(a=>{var o;return t==null?null:(o=r??a)!=null?o:null},[r,t])}function M_(e,t){return c.useMemo(()=>e.reduce((n,r)=>{const{sensor:a}=r,o=a.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var Mn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Mn||(Mn={}));var Ra;(function(e){e.Optimized="optimized"})(Ra||(Ra={}));const Bs=new Map;function D_(e,t){let{dragging:n,dependencies:r,config:a}=t;const[o,s]=c.useState(null),{frequency:i,measure:l,strategy:u}=a,d=c.useRef(e),f=b(),p=Rn(f),g=c.useCallback(function(y){y===void 0&&(y=[]),!p.current&&s(E=>E===null?y:E.concat(y.filter(O=>!E.includes(O))))},[p]),h=c.useRef(null),m=Vn(y=>{if(f&&!n)return Bs;if(!y||y===Bs||d.current!==e||o!=null){const E=new Map;for(let O of e){if(!O)continue;if(o&&o.length>0&&!o.includes(O.id)&&O.rect.current){E.set(O.id,O.rect.current);continue}const A=O.node.current,C=A?new Mo(l(A),A):null;O.rect.current=C,C&&E.set(O.id,C)}return E}return y},[e,o,n,f,l]);return c.useEffect(()=>{d.current=e},[e]),c.useEffect(()=>{f||g()},[n,f]),c.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),c.useEffect(()=>{f||typeof i!="number"||h.current!==null||(h.current=setTimeout(()=>{g(),h.current=null},i))},[i,f,g,...r]),{droppableRects:m,measureDroppableContainers:g,measuringScheduled:o!=null};function b(){switch(u){case Mn.Always:return!1;case Mn.BeforeDragging:return n;default:return!n}}}function Kc(e,t){return Vn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function j_(e,t){return Kc(e,t)}function P_(e){let{callback:t,disabled:n}=e;const r=To(t),a=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return c.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Fr(e){let{callback:t,disabled:n}=e;const r=To(t),a=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return c.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function k_(e){return new Mo(cn(e),e)}function zs(e,t,n){t===void 0&&(t=k_);const[r,a]=c.useState(null);function o(){a(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const s=P_({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),i=Fr({callback:o});return We(()=>{o(),e?(i==null||i.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),s==null||s.disconnect())},[e]),r}function N_(e){const t=Kc(e);return Hc(e,t)}const Gs=[];function H_(e){const t=c.useRef(e),n=Vn(r=>e?r&&r!==Gs&&e&&t.current&&e.parentNode===t.current.parentNode?r:Io(e):Gs,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function L_(e){const[t,n]=c.useState(null),r=c.useRef(e),a=c.useCallback(o=>{const s=ca(o.target);s&&n(i=>i?(i.set(s,_a(s)),new Map(i)):null)},[]);return c.useEffect(()=>{const o=r.current;if(e!==o){s(o);const i=e.map(l=>{const u=ca(l);return u?(u.addEventListener("scroll",a,{passive:!0}),[u,_a(u)]):null}).filter(l=>l!=null);n(i.length?new Map(i):null),r.current=e}return()=>{s(e),s(o)};function s(i){i.forEach(l=>{const u=ca(l);u==null||u.removeEventListener("scroll",a)})}},[a,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Kt(o,s),Le):Vc(e):Le,[e,t])}function Vs(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==Le;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?mr(e,n.current):Le}function F_(e){c.useEffect(()=>{if(!Lr)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function B_(e,t){return c.useMemo(()=>e.reduce((n,r)=>{let{eventName:a,handler:o}=r;return n[a]=s=>{o(s,t)},n},{}),[e,t])}function Xc(e){return c.useMemo(()=>e?d_(e):null,[e])}const Us=[];function z_(e,t){t===void 0&&(t=cn);const[n]=e,r=Xc(n?Se(n):null),[a,o]=c.useState(Us);function s(){o(()=>e.length?e.map(l=>zc(l)?r:new Mo(t(l),l)):Us)}const i=Fr({callback:s});return We(()=>{i==null||i.disconnect(),s(),e.forEach(l=>i==null?void 0:i.observe(l))},[e]),a}function G_(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Gn(t)?t:e}function V_(e){let{measure:t}=e;const[n,r]=c.useState(null),a=c.useCallback(u=>{for(const{target:d}of u)if(Gn(d)){r(f=>{const p=t(d);return f?{...f,width:p.width,height:p.height}:p});break}},[t]),o=Fr({callback:a}),s=c.useCallback(u=>{const d=G_(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[i,l]=vr(s);return c.useMemo(()=>({nodeRef:i,rect:n,setRef:l}),[n,i,l])}const U_=[{sensor:Yc,options:{}},{sensor:Wc,options:{}}],W_={current:{}},nr={draggable:{measure:Ns},droppable:{measure:Ns,strategy:Mn.WhileDragging,frequency:Ra.Optimized},dragOverlay:{measure:cn}};class On extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Y_={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new On,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:br},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:nr,measureDroppableContainers:br,windowRect:null,measuringScheduled:!1},K_={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:br,draggableNodes:new Map,over:null,measureDroppableContainers:br},Br=c.createContext(K_),qc=c.createContext(Y_);function X_(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new On}}}function q_(e,t){switch(t.type){case ge.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ge.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ge.DragEnd:case ge.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ge.RegisterDroppable:{const{element:n}=t,{id:r}=n,a=new On(e.droppable.containers);return a.set(r,n),{...e,droppable:{...e.droppable,containers:a}}}case ge.SetDroppableDisabled:{const{id:n,key:r,disabled:a}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new On(e.droppable.containers);return s.set(n,{...o,disabled:a}),{...e,droppable:{...e.droppable,containers:s}}}case ge.UnregisterDroppable:{const{id:n,key:r}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const o=new On(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function J_(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:a}=c.useContext(Br),o=$a(r),s=$a(n==null?void 0:n.id);return c.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!Ro(o)||document.activeElement===o.target)return;const i=a.get(s);if(!i)return;const{activatorNode:l,node:u}=i;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=UO(d);if(f){f.focus();break}}})}},[r,t,a,s,o]),null}function Z_(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((a,o)=>o({transform:a,...r}),n):n}function Q_(e){return c.useMemo(()=>({draggable:{...nr.draggable,...e==null?void 0:e.draggable},droppable:{...nr.droppable,...e==null?void 0:e.droppable},dragOverlay:{...nr.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function eT(e){let{activeNode:t,measure:n,initialRect:r,config:a=!0}=e;const o=c.useRef(!1),{x:s,y:i}=typeof a=="boolean"?{x:a,y:a}:a;We(()=>{if(!s&&!i||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=Hc(d,r);if(s||(f.x=0),i||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const p=Lc(u);p&&p.scrollBy({top:f.y,left:f.x})}},[t,s,i,r,n])}const Jc=c.createContext({...Le,scaleX:1,scaleY:1});var it;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(it||(it={}));const tT=c.memo(function(t){var n,r,a,o;let{id:s,accessibility:i,autoScroll:l=!0,children:u,sensors:d=U_,collisionDetection:f=a_,measuring:p,modifiers:g,...h}=t;const m=c.useReducer(q_,void 0,X_),[b,y]=m,[E,O]=JO(),[A,C]=c.useState(it.Uninitialized),$=A===it.Initialized,{draggable:{active:_,nodes:I,translate:L},droppable:{containers:V}}=b,B=_!=null?I.get(_):null,W=c.useRef({initial:null,translated:null}),J=c.useMemo(()=>{var we;return _!=null?{id:_,data:(we=B==null?void 0:B.data)!=null?we:W_,rect:W}:null},[_,B]),q=c.useRef(null),[Q,ee]=c.useState(null),[Y,ie]=c.useState(null),j=Rn(h,Object.values(h)),v=Un("DndDescribedBy",s),w=c.useMemo(()=>V.getEnabled(),[V]),S=Q_(p),{droppableRects:R,measureDroppableContainers:T,measuringScheduled:D}=D_(w,{dragging:$,dependencies:[L.x,L.y],config:S.droppable}),P=I_(I,_),k=c.useMemo(()=>Y?Oa(Y):null,[Y]),F=fu(),G=j_(P,S.draggable.measure);eT({activeNode:_!=null?I.get(_):null,config:F.layoutShiftCompensation,initialRect:G,measure:S.draggable.measure});const H=zs(P,S.draggable.measure,G),ne=zs(P?P.parentElement:null),M=c.useRef({activatorEvent:null,active:null,activeNode:P,collisionRect:null,collisions:null,droppableRects:R,draggableNodes:I,draggingNode:null,draggingNodeRect:null,droppableContainers:V,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),se=V.getNodeFor((n=M.current.over)==null?void 0:n.id),fe=V_({measure:S.dragOverlay.measure}),ve=(r=fe.nodeRef.current)!=null?r:P,xe=$?(a=fe.rect)!=null?a:H:null,dt=!!(fe.nodeRef.current&&fe.rect),z=N_(dt?null:H),K=Xc(ve?Se(ve):null),Z=H_($?se??P:null),he=z_(Z),pe=Z_(g,{transform:{x:L.x-z.x,y:L.y-z.y,scaleX:1,scaleY:1},activatorEvent:Y,active:J,activeNodeRect:H,containerNodeRect:ne,draggingNodeRect:xe,over:M.current.over,overlayNodeRect:fe.rect,scrollableAncestors:Z,scrollableAncestorRects:he,windowRect:K}),ze=k?Kt(k,L):null,ft=L_(Z),$t=Vs(ft),Wn=Vs(ft,[H]),Ke=Kt(pe,$t),Ot=xe?s_(xe,pe):null,un=J&&Ot?f({active:J,collisionRect:Ot,droppableRects:R,droppableContainers:w,pointerCoordinates:ze}):null,jo=n_(un,"id"),[tt,Po]=c.useState(null),su=dt?pe:Kt(pe,Wn),lu=o_(su,(o=tt==null?void 0:tt.rect)!=null?o:null,H),zr=c.useRef(null),ko=c.useCallback((we,Ae)=>{let{sensor:$e,options:nt}=Ae;if(q.current==null)return;const Re=I.get(q.current);if(!Re)return;const Oe=we.nativeEvent,Ge=new $e({active:q.current,activeNode:Re,event:Oe,options:nt,context:M,onAbort(be){if(!I.get(be))return;const{onDragAbort:Ve}=j.current,Xe={id:be};Ve==null||Ve(Xe),E({type:"onDragAbort",event:Xe})},onPending(be,rt,Ve,Xe){if(!I.get(be))return;const{onDragPending:fn}=j.current,at={id:be,constraint:rt,initialCoordinates:Ve,offset:Xe};fn==null||fn(at),E({type:"onDragPending",event:at})},onStart(be){const rt=q.current;if(rt==null)return;const Ve=I.get(rt);if(!Ve)return;const{onDragStart:Xe}=j.current,dn={activatorEvent:Oe,active:{id:rt,data:Ve.data,rect:W}};pt.unstable_batchedUpdates(()=>{Xe==null||Xe(dn),C(it.Initializing),y({type:ge.DragStart,initialCoordinates:be,active:rt}),E({type:"onDragStart",event:dn}),ee(zr.current),ie(Oe)})},onMove(be){y({type:ge.DragMove,coordinates:be})},onEnd:_t(ge.DragEnd),onCancel:_t(ge.DragCancel)});zr.current=Ge;function _t(be){return async function(){const{active:Ve,collisions:Xe,over:dn,scrollAdjustedTranslate:fn}=M.current;let at=null;if(Ve&&fn){const{cancelDrop:hn}=j.current;at={activatorEvent:Oe,active:Ve,collisions:Xe,delta:fn,over:dn},be===ge.DragEnd&&typeof hn=="function"&&await Promise.resolve(hn(at))&&(be=ge.DragCancel)}q.current=null,pt.unstable_batchedUpdates(()=>{y({type:be}),C(it.Uninitialized),Po(null),ee(null),ie(null),zr.current=null;const hn=be===ge.DragEnd?"onDragEnd":"onDragCancel";if(at){const Gr=j.current[hn];Gr==null||Gr(at),E({type:hn,event:at})}})}}},[I]),cu=c.useCallback((we,Ae)=>($e,nt)=>{const Re=$e.nativeEvent,Oe=I.get(nt);if(q.current!==null||!Oe||Re.dndKit||Re.defaultPrevented)return;const Ge={active:Oe};we($e,Ae.options,Ge)===!0&&(Re.dndKit={capturedBy:Ae.sensor},q.current=nt,ko($e,Ae))},[I,ko]),No=M_(d,cu);F_(d),We(()=>{H&&A===it.Initializing&&C(it.Initialized)},[H,A]),c.useEffect(()=>{const{onDragMove:we}=j.current,{active:Ae,activatorEvent:$e,collisions:nt,over:Re}=M.current;if(!Ae||!$e)return;const Oe={active:Ae,activatorEvent:$e,collisions:nt,delta:{x:Ke.x,y:Ke.y},over:Re};pt.unstable_batchedUpdates(()=>{we==null||we(Oe),E({type:"onDragMove",event:Oe})})},[Ke.x,Ke.y]),c.useEffect(()=>{const{active:we,activatorEvent:Ae,collisions:$e,droppableContainers:nt,scrollAdjustedTranslate:Re}=M.current;if(!we||q.current==null||!Ae||!Re)return;const{onDragOver:Oe}=j.current,Ge=nt.get(jo),_t=Ge&&Ge.rect.current?{id:Ge.id,rect:Ge.rect.current,data:Ge.data,disabled:Ge.disabled}:null,be={active:we,activatorEvent:Ae,collisions:$e,delta:{x:Re.x,y:Re.y},over:_t};pt.unstable_batchedUpdates(()=>{Po(_t),Oe==null||Oe(be),E({type:"onDragOver",event:be})})},[jo]),We(()=>{M.current={activatorEvent:Y,active:J,activeNode:P,collisionRect:Ot,collisions:un,droppableRects:R,draggableNodes:I,draggingNode:ve,draggingNodeRect:xe,droppableContainers:V,over:tt,scrollableAncestors:Z,scrollAdjustedTranslate:Ke},W.current={initial:xe,translated:Ot}},[J,P,un,Ot,I,ve,xe,R,V,tt,Z,Ke]),__({...F,delta:L,draggingRect:Ot,pointerCoordinates:ze,scrollableAncestors:Z,scrollableAncestorRects:he});const uu=c.useMemo(()=>({active:J,activeNode:P,activeNodeRect:H,activatorEvent:Y,collisions:un,containerNodeRect:ne,dragOverlay:fe,draggableNodes:I,droppableContainers:V,droppableRects:R,over:tt,measureDroppableContainers:T,scrollableAncestors:Z,scrollableAncestorRects:he,measuringConfiguration:S,measuringScheduled:D,windowRect:K}),[J,P,H,Y,un,ne,fe,I,V,R,tt,T,Z,he,S,D,K]),du=c.useMemo(()=>({activatorEvent:Y,activators:No,active:J,activeNodeRect:H,ariaDescribedById:{draggable:v},dispatch:y,draggableNodes:I,over:tt,measureDroppableContainers:T}),[Y,No,J,H,y,v,I,tt,T]);return c.createElement(Nc.Provider,{value:O},c.createElement(Br.Provider,{value:du},c.createElement(qc.Provider,{value:uu},c.createElement(Jc.Provider,{value:lu},u)),c.createElement(J_,{disabled:(i==null?void 0:i.restoreFocus)===!1})),c.createElement(e_,{...i,hiddenTextDescribedById:v}));function fu(){const we=(Q==null?void 0:Q.autoScrollEnabled)===!1,Ae=typeof l=="object"?l.enabled===!1:l===!1,$e=$&&!we&&!Ae;return typeof l=="object"?{...l,enabled:$e}:{enabled:$e}}}),nT=c.createContext(null),Ws="button",rT="Draggable";function aT(e){let{id:t,data:n,disabled:r=!1,attributes:a}=e;const o=Un(rT),{activators:s,activatorEvent:i,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=c.useContext(Br),{role:g=Ws,roleDescription:h="draggable",tabIndex:m=0}=a??{},b=(l==null?void 0:l.id)===t,y=c.useContext(b?Jc:nT),[E,O]=vr(),[A,C]=vr(),$=B_(s,t),_=Rn(n);We(()=>(f.set(t,{id:t,key:o,node:E,activatorNode:A,data:_}),()=>{const L=f.get(t);L&&L.key===o&&f.delete(t)}),[f,t]);const I=c.useMemo(()=>({role:g,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&g===Ws?!0:void 0,"aria-roledescription":h,"aria-describedby":d.draggable}),[r,g,m,b,h,d.draggable]);return{active:l,activatorEvent:i,activeNodeRect:u,attributes:I,isDragging:b,listeners:r?void 0:$,node:E,over:p,setNodeRef:O,setActivatorNodeRef:C,transform:y}}function oT(){return c.useContext(qc)}const iT="Droppable",sT={timeout:25};function lT(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:a}=e;const o=Un(iT),{active:s,dispatch:i,over:l,measureDroppableContainers:u}=c.useContext(Br),d=c.useRef({disabled:n}),f=c.useRef(!1),p=c.useRef(null),g=c.useRef(null),{disabled:h,updateMeasurementsFor:m,timeout:b}={...sT,...a},y=Rn(m??r),E=c.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),g.current=null},b)},[b]),O=Fr({callback:E,disabled:h||!s}),A=c.useCallback((I,L)=>{O&&(L&&(O.unobserve(L),f.current=!1),I&&O.observe(I))},[O]),[C,$]=vr(A),_=Rn(t);return c.useEffect(()=>{!O||!C.current||(O.disconnect(),f.current=!1,O.observe(C.current))},[C,O]),c.useEffect(()=>(i({type:ge.RegisterDroppable,element:{id:r,key:o,disabled:n,node:C,rect:p,data:_}}),()=>i({type:ge.UnregisterDroppable,key:o,id:r})),[r]),c.useEffect(()=>{n!==d.current.disabled&&(i({type:ge.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,i]),{active:s,rect:p,isOver:(l==null?void 0:l.id)===r,node:C,over:l,setNodeRef:$}}function Zc(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function cT(e,t){return e.reduce((n,r,a)=>{const o=t.get(r);return o&&(n[a]=o),n},Array(e.length))}function er(e){return e!==null&&e>=0}function uT(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function dT(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Qc=e=>{let{rects:t,activeIndex:n,overIndex:r,index:a}=e;const o=Zc(t,r,n),s=t[a],i=o[a];return!i||!s?null:{x:i.left-s.left,y:i.top-s.top,scaleX:i.width/s.width,scaleY:i.height/s.height}},eu="Sortable",tu=c.createContext({activeIndex:-1,containerId:eu,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Qc,disabled:{draggable:!1,droppable:!1}});function fT(e){let{children:t,id:n,items:r,strategy:a=Qc,disabled:o=!1}=e;const{active:s,dragOverlay:i,droppableRects:l,over:u,measureDroppableContainers:d}=oT(),f=Un(eu,n),p=i.rect!==null,g=c.useMemo(()=>r.map($=>typeof $=="object"&&"id"in $?$.id:$),[r]),h=s!=null,m=s?g.indexOf(s.id):-1,b=u?g.indexOf(u.id):-1,y=c.useRef(g),E=!uT(g,y.current),O=b!==-1&&m===-1||E,A=dT(o);We(()=>{E&&h&&d(g)},[E,g,h,d]),c.useEffect(()=>{y.current=g},[g]);const C=c.useMemo(()=>({activeIndex:m,containerId:f,disabled:A,disableTransforms:O,items:g,overIndex:b,useDragOverlay:p,sortedRects:cT(g,l),strategy:a}),[m,f,A.draggable,A.droppable,O,g,b,l,p,a]);return c.createElement(tu.Provider,{value:C},t)}const hT=e=>{let{id:t,items:n,activeIndex:r,overIndex:a}=e;return Zc(n,r,a).indexOf(t)},pT=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:a,items:o,newIndex:s,previousItems:i,previousContainerId:l,transition:u}=e;return!u||!r||i!==o&&a===s?!1:n?!0:s!==a&&t===l},gT={duration:200,easing:"ease"},nu="transform",vT=In.Transition.toString({property:nu,duration:0,easing:"linear"}),mT={roleDescription:"sortable"};function bT(e){let{disabled:t,index:n,node:r,rect:a}=e;const[o,s]=c.useState(null),i=c.useRef(n);return We(()=>{if(!t&&n!==i.current&&r.current){const l=a.current;if(l){const u=cn(r.current,{ignoreTransform:!0}),d={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(d.x||d.y)&&s(d)}}n!==i.current&&(i.current=n)},[t,n,r,a]),c.useEffect(()=>{o&&s(null)},[o]),o}function yT(e){let{animateLayoutChanges:t=pT,attributes:n,disabled:r,data:a,getNewIndex:o=hT,id:s,strategy:i,resizeObserverConfig:l,transition:u=gT}=e;const{items:d,containerId:f,activeIndex:p,disabled:g,disableTransforms:h,sortedRects:m,overIndex:b,useDragOverlay:y,strategy:E}=c.useContext(tu),O=xT(r,g),A=d.indexOf(s),C=c.useMemo(()=>({sortable:{containerId:f,index:A,items:d},...a}),[f,a,A,d]),$=c.useMemo(()=>d.slice(d.indexOf(s)),[d,s]),{rect:_,node:I,isOver:L,setNodeRef:V}=lT({id:s,data:C,disabled:O.droppable,resizeObserverConfig:{updateMeasurementsFor:$,...l}}),{active:B,activatorEvent:W,activeNodeRect:J,attributes:q,setNodeRef:Q,listeners:ee,isDragging:Y,over:ie,setActivatorNodeRef:j,transform:v}=aT({id:s,data:C,attributes:{...mT,...n},disabled:O.draggable}),w=BO(V,Q),S=!!B,R=S&&!h&&er(p)&&er(b),T=!y&&Y,D=T&&R?v:null,k=R?D??(i??E)({rects:m,activeNodeRect:J,activeIndex:p,overIndex:b,index:A}):null,F=er(p)&&er(b)?o({id:s,items:d,activeIndex:p,overIndex:b}):A,G=B==null?void 0:B.id,H=c.useRef({activeId:G,items:d,newIndex:F,containerId:f}),ne=d!==H.current.items,M=t({active:B,containerId:f,isDragging:Y,isSorting:S,id:s,index:A,items:d,newIndex:H.current.newIndex,previousItems:H.current.items,previousContainerId:H.current.containerId,transition:u,wasDragging:H.current.activeId!=null}),se=bT({disabled:!M,index:A,node:I,rect:_});return c.useEffect(()=>{S&&H.current.newIndex!==F&&(H.current.newIndex=F),f!==H.current.containerId&&(H.current.containerId=f),d!==H.current.items&&(H.current.items=d)},[S,F,f,d]),c.useEffect(()=>{if(G===H.current.activeId)return;if(G!=null&&H.current.activeId==null){H.current.activeId=G;return}const ve=setTimeout(()=>{H.current.activeId=G},50);return()=>clearTimeout(ve)},[G]),{active:B,activeIndex:p,attributes:q,data:C,rect:_,index:A,newIndex:F,items:d,isOver:L,isSorting:S,isDragging:Y,listeners:ee,node:I,overIndex:b,over:ie,setNodeRef:w,setActivatorNodeRef:j,setDroppableNodeRef:V,setDraggableNodeRef:Q,transform:se??k,transition:fe()};function fe(){if(se||ne&&H.current.newIndex===A)return vT;if(!(T&&!Ro(W)||!u)&&(S||M))return In.Transition.toString({...u,property:nu})}}function xT(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}re.Down,re.Right,re.Up,re.Left;function wT(e){return x.jsx("input",{type:"checkbox",className:`checkbox rounded ${e.small?"checkbox-xs":"checkbox-sm"} ${e.className?e.className:""}`,checked:e.checked,onChange:e.onChange,disabled:e.disabled})}const ru=({header:e,depth:t,idx:n,hiddenColumns:r,dropIndicator:a,dragInfo:o,setDragInfo:s,onCheckboxChange:i,getAllChildrenIds:l})=>{const{setNodeRef:u,listeners:d,transform:f,transition:p}=yT({id:n,disabled:!0}),g={transform:In.Transform.toString(f),transition:p},h=!r.includes(e.id),m=c.useMemo(()=>l(e),[e,l]),b=O=>{i(e.id,O),e.children&&m.forEach(A=>{i(A,O)})},[y,E]=c.useState(!0);return x.jsxs("div",{className:"relative",ref:u,...d,style:{marginLeft:`${t*20}px`,...g},children:[x.jsxs("div",{className:"flex mb-1 justify-start items-end",children:[x.jsx("div",{className:"w-7 pr-1",children:e.children&&x.jsx("div",{onClick:()=>E(!y),"data-no-dnd":"true",className:"hover:bg-gray-200 rounded-lg flex justify-end items-center cursor-pointer",children:x.jsx(Pe,{path:y?el:tl})})}),x.jsx("div",{draggable:!0,className:"cursor-grab pr-2",onClick:()=>E(!y),children:x.jsx(Pe,{path:rl,color:"lightGrey",size:.8})}),x.jsx("div",{"data-no-dnd":"true",children:x.jsx(wT,{checked:h,small:!0,onChange:()=>b(!h)})}),e.text?x.jsx("p",{className:"text-sm ml-2",children:e.text||e.id}):x.jsx("p",{className:"text-xs ml-2 italic text-gray-400",children:e.text||e.id})]}),a&&(a==="above"?x.jsx("div",{className:"absolute left-0 right-0 h-0.5 bg-blue-500",style:{top:0}}):x.jsx("div",{className:"absolute left-0 right-0 h-0.5 bg-blue-500",style:{bottom:0}})),e.children&&y&&x.jsx(x.Fragment,{children:e.children.map((O,A)=>x.jsx(ru,{header:O,idx:A,parentId:e.id,depth:t+1,hiddenColumns:r,onCheckboxChange:i,getAllChildrenIds:l,dragInfo:o,setDragInfo:s},O.id))})]})},CT=()=>{const e=sl(),[t,n]=c.useState([]),[r,a]=c.useState();c.useEffect(()=>{n(e)},[e]);const o=bt(),s=ll(),[i,l]=c.useState(s);c.useEffect(()=>{l(s)},[s]);const u=c.useCallback(C=>!C.children||C.children.length===0?[]:C.children.reduce(($,_)=>[...$,_.id,...u(_)],[]),[]),d=c.useMemo(()=>{const C=new Map,$=_=>{_.children&&_.children.forEach(I=>{C.set(I.id,_.id),$(I)})};return e.forEach(_=>$(_)),C},[e]),f=c.useCallback((C,$)=>{l(_=>{let I=[..._];if($){I=I.filter(V=>V!==C);let L=d.get(C);for(;L;)I=I.filter(V=>V!==L),L=d.get(L)}else{I.includes(C)||I.push(C);const L=V=>{const B=d.get(V);if(!B)return;const W=[];e.forEach(q=>{q.id===B&&q.children?W.push(...q.children.map(Q=>Q.id)):q.children&&q.children.forEach(Q=>{Q.id===B&&Q.children&&W.push(...Q.children.map(ee=>ee.id))})}),W.every(q=>I.includes(q))&&!I.includes(B)&&(I.push(B),L(B))};L(C)}return o.setHiddenHeadersId(I),I})},[d,e]),p=()=>{o.setHiddenHeadersId([]),l([])},[g,h]=c.useState(),[m,b]=c.useState(),y=C=>{const{over:$,active:_}=C;n(I=>{const L=I.findIndex(J=>J.id===_.id),V=I.findIndex(J=>J.id===($==null?void 0:$.id));if(L===-1||V===-1)return I;const B=[...I],[W]=B.splice(L,1);return B.splice(V,0,W),B}),h(void 0)},E=C=>{},O=C=>{console.log("drag started:",C)},A=C=>{var B;const{active:$,over:_}=C,I=_==null?void 0:_.id,L=$.id.toString(),V=(B=t.find((W,J)=>J===I))==null?void 0:B.id;h(V),I!==void 0&&(L>I?b("above"):b("below"))};return x.jsxs("div",{children:[x.jsx("div",{className:"flex",children:x.jsx(je,{text:"Reset selection",small:!0,icon:Lu,iconColor:"grey",onClick:p,ghost:!0})}),x.jsx("div",{className:" rounded mt-4 max-h-[400px] overflow-y-auto",children:x.jsx(tT,{onDragStart:O,onDragEnd:y,onDragMove:E,onDragOver:A,children:x.jsx(fT,{items:t,children:t.map((C,$)=>x.jsx(ru,{parentId:void 0,idx:$,header:C,depth:0,hiddenColumns:i,onCheckboxChange:f,getAllChildrenIds:u,dragInfo:r,setDragInfo:a,dropIndicator:g===C.id?m:void 0},C.id))})})})]})},au=vt((e,t)=>({openedDialogs:[],actions:{openDialog:(n,r,a)=>{if(t().openedDialogs.some(i=>i.title===r))return;const s={id:`dialog-${Date.now()}-${t().openedDialogs.length}`,title:r,position:n,dialogImplementation:a};e({openedDialogs:[...t().openedDialogs,s]})},closeDialog:n=>{e({openedDialogs:t().openedDialogs.filter(r=>r.id!==n)})}}})),ET=()=>au(e=>e.openedDialogs),ou=()=>au(e=>e.actions);function ST(){const e=ou(),t=bt();return{getHeaderActions:(r,a,o,s)=>{const i=[];return r.sortable&&i.push({icon:ku,iconColor:"#444",text:"Sort",onClick:()=>a(r)}),i.push({icon:al,iconColor:"#5588b4",text:"Choose columns",onClick:l=>{e.openDialog({x:l.clientX||100,y:l.clientY||100},"Choose Columns",x.jsx(CT,{}))}}),i.push({icon:Nu,iconColor:"#9d2015",text:"Reset columns",onClick:()=>{t.setHiddenHeadersId([])}}),i}}}const AT={position:"fixed",zIndex:1e3,background:"#fff",border:"1px solid #ccc",borderRadius:4,boxShadow:"0 2px 8px rgba(0,0,0,0.15)",minWidth:160};function $T(e){const t=c.useRef(null),[n,r]=c.useState({left:e.x,top:e.y}),{getCellActions:a}=FO(),{getHeaderActions:o}=ST(),{setHighlightCondition:s,removeHighlightCondition:i}=Xt();c.useEffect(()=>{const f=p=>{t.current&&!t.current.contains(p.target)&&e.onClose()};return window.addEventListener("mousedown",f),()=>window.removeEventListener("mousedown",f)},[e.onClose]),c.useEffect(()=>{if(t.current){const{innerWidth:f,innerHeight:p}=window,g=t.current.getBoundingClientRect();let h=e.x,m=e.y;h+g.width>f&&(h=f-g.width-8),m+g.height>p&&(m=p-g.height-8),h=Math.max(h,8),m=Math.max(m,8),r({left:h,top:m})}},[e.x,e.y]);const l=(f,p)=>{f.preventDefault(),console.log("OO",e.itemCoordinate),p.onClick(f,e.item,e.itemCoordinate),e.onClose()},d=e.item===void 0?o(e.header,()=>{},()=>{},()=>{}):e.item?a(e.item,e.header.id,s,i,e.onClose):[];return x.jsx("div",{ref:t,style:{...AT,left:n.left,top:n.top},children:x.jsx("ul",{className:"menu menu-sm p-0.5 bg-base-200 rounded-box min-w-55 max-w-xs w-full",children:d.map((f,p)=>x.jsx(c.Fragment,{children:x.jsx("li",{onClick:g=>l(g,f),children:x.jsxs("a",{children:[f.icon&&x.jsx(Pe,{path:f.icon,color:f.iconColor,size:.7}),f.text,f.customRender&&f.customRender()]})})},p))})})}function OT(e){return x.jsx(x.Fragment,{children:e.header.customRender(e.item,e.header,e.fromArrayData)})}function _T(e){const{comment:t,style:n,isEditing:r,onMouseEnter:a,setIsEditing:o,onMouseLeave:s}=e,[i,l]=c.useState((t==null?void 0:t.text)||""),{setOpenCommentCell:u}=$o(),d=mt(),f=()=>{e.saveComment&&(e.saveComment({...t,text:i,columnId:e.columnId,author:(d==null?void 0:d.currentUsername)||"Unknown"}),e.isNewComment&&u(void 0),o==null||o(!1))},p=()=>{e.isNewComment&&u(void 0),l(t.text),o==null||o(!1)},g=c.useMemo(()=>(t.author||(d==null?void 0:d.currentUsername)||"Unknown").split(" ").map(m=>m.charAt(0).toUpperCase()).join("").slice(0,2),[t.author]);return x.jsxs("div",{style:n,onMouseEnter:a,onMouseLeave:s,children:[x.jsxs("div",{className:"flex justify-between mb-2",children:[x.jsxs("div",{className:"flex items-center gap-2 ",children:[x.jsx("div",{className:"avatar avatar-placeholder w-5",children:x.jsx("div",{className:"bg-neutral text-neutral-content w-5 rounded-full",children:x.jsx("span",{className:"text-xs",children:g})})}),x.jsx("div",{children:x.jsx("span",{className:"text-xs font-bold",children:(e.isNewComment?d==null?void 0:d.currentUsername:t.author)||"Unknown"})})]}),x.jsx("div",{children:!r&&x.jsxs("div",{children:[x.jsx(je,{onClick:()=>{var h;return(h=e.deleteComment)==null?void 0:h.call(e,t)},className:"mb-1 h-5 min-h-5",iconSize:.6,small:!0,circle:!0,icon:Hu,iconColor:"var(--error-color)"}),x.jsx(je,{onClick:()=>o==null?void 0:o(!0),className:"mb-1 ml-1 h-5 min-h-5",iconSize:.6,small:!0,circle:!0,icon:ju,iconColor:"var(--comment-color)"})]})})]}),x.jsx("div",{className:"ml-7",children:r?x.jsxs("div",{children:[x.jsx("input",{onMouseUp:h=>{h.stopPropagation()},onClick:h=>{h.stopPropagation()},onMouseDown:h=>{h.stopPropagation()},onKeyDown:h=>{h.stopPropagation()},className:"input input-xs",type:"text",value:i,onChange:h=>l(h.target.value)}),x.jsxs("div",{className:"flex justify-end mt-2",children:[x.jsx(je,{onClick:f,text:"Save",className:"mb-1 h-5 min-h-5 ",iconSize:.6,small:!0,icon:Au,iconColor:"var(--comment-color)"}),x.jsx(je,{onClick:p,className:"mb-1 h-5 min-h-5 ml-1",ghost:!0,iconSize:.6,small:!0,icon:nl,text:"Cancel",iconColor:"var(--error-color)"})]})]}):x.jsx("div",{className:"text-xs ",children:x.jsxs("div",{children:[x.jsx("div",{children:t.text}),x.jsx("span",{className:"text-gray-500 font-light text-tiny",children:t.formatDateFunction?t.formatDateFunction(t.date):new Date(t.date).toLocaleString()})]})})})]})}function TT(e){return x.jsx("div",{className:"flex",children:x.jsxs("button",{className:`px-2 cursor-pointer grow-1 text-left hover:bg-gray-100 p-1 truncate whitespace-nowrap overflow-ellipsis ${e.italic?"italic text-gray-400":""} ${e.isSelected?"bg-[var(--primary-color_background)] rounded":""}`,onClick:()=>e.onClick(e.value,e.isOptionToAdd),children:[e.isOptionToAdd&&x.jsx("strong",{children:"Add "}),e.text]},"0-empty-option")},e.optionKey)}const iu=vt(e=>({tableRef:c.createRef(),scrollRef:c.createRef(),actions:{setTableRef:t=>e({tableRef:t}),setScrollRef:t=>e({scrollRef:t})}})),RT=()=>iu(e=>e.scrollRef),IT=()=>iu(e=>e.actions);function MT(e){const[t,n]=c.useState(!1),[r,a]=c.useState(""),[o,s]=c.useState(),i=c.useRef(null),l=mt(),{addListOption:u}=Xt(),d=c.useMemo(()=>{var I;const $=[];$.push({value:"",toAdd:!1}),r&&(l!=null&&l.canAddListOptions)&&((I=e.header.editOptions)==null?void 0:I.canAddNewOption)!==!1&&!e.options.some(L=>L.toLowerCase()===r.toLowerCase())&&$.push({value:r,toAdd:!0});let _=[];return r===""||e.options.includes(r)?_=e.options.map(L=>({value:L,toAdd:!1})):_=e.options.filter(L=>r===""||e.options.includes(r)||L.toLowerCase().includes(r.toLowerCase())).map(L=>({value:L,toAdd:!1})),$.push(..._),$},[e.options,r,l==null?void 0:l.canAddListOptions]);c.useEffect(()=>{a(e.value||"")},[e.value]),c.useEffect(()=>{},[d]),c.useEffect(()=>{if(t&&o!==void 0&&i.current){const $=i.current,_=$.children[o];if(_){const I=$.scrollTop,L=I+$.clientHeight,V=_.offsetTop,B=V+_.offsetHeight;V<I?$.scrollTop=V:B>L&&($.scrollTop=B-$.clientHeight)}}},[o,t]);const f=async($,_)=>{_&&await u($,e.header),e.onSelect($),n(!1)},p=async($,_)=>{_&&await u($,e.header),e.onEnter($),n(!1)},g=async $=>{if($.key==="ArrowDown"||$.key==="ArrowUp"){if($.preventDefault(),n(!0),d.length>0){let _=(o??-1)+($.key==="ArrowDown"?1:-1);_<0?_=d.length-1:_>=d.length&&(_=0),s(_)}}else $.key==="Enter"&&($.preventDefault(),$.stopPropagation(),t&&o!==void 0?await p(d[o].value,d[o].toAdd&&(l==null?void 0:l.canAddListOptions)):r&&[...e.options,""].includes(r)?await p(r,!1):console.log("Input does not match any option"))},h={width:"100%",outline:"none",border:"none",background:"transparent"},m=$=>{a($.target.value),n(!0)},b=c.useRef(null),y=c.useRef(null),E=RT(),[O,A]=c.useState({left:"-8px",top:"23px"});c.useEffect(()=>{C()},[t,E]);const C=()=>{if(t&&b.current&&y.current&&E.current){const $=b.current.getBoundingClientRect(),_=y.current.getBoundingClientRect(),I=E.current.getBoundingClientRect(),L=$.left-I.left,V=$.top-I.top,B=L+_.width>E.current.clientWidth,W=V+_.height>E.current.clientHeight,J={left:B?`${-_.width+$.width}px`:"-8px",top:W?`${-_.height}px`:"23px"};A(J)}};return x.jsxs("div",{className:"relative ",ref:b,children:[x.jsxs("div",{className:"flex justify-between min-h-4",onClick:()=>{n(!t)},children:[x.jsx("input",{ref:e.inputRef,type:"text",value:r,onChange:m,onKeyDown:g,required:!0,style:h}),x.jsx("button",{className:"ml-1 w-0 h-0",style:{borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid #888",marginTop:"4px"},"aria-label":"dropdown indicator"})]}),t&&!e.hideOptions&&x.jsx("div",{ref:y,className:"absolute bg-base-100 border border-[var(--border-color)] z-300 w-52 p-1 shadow-sm",style:{left:O.left,top:O.top},children:x.jsx("div",{ref:i,className:"max-h-46 overflow-auto",children:d.map(($,_)=>x.jsx(TT,{optionKey:_+"-"+$,onClick:(I,L)=>{f(I,L)},isOptionToAdd:(l==null?void 0:l.canAddListOptions)&&$.toAdd===!0,value:$.value,text:$.value===""?"<Empty>":$.value,italic:$.value==="",isSelected:o===_}))})})]})}const rr=(e,t=5)=>{const n=typeof e=="string"?parseFloat(e):e;if(!Number.isFinite(n))return"";const r=Math.pow(10,t);return(Math.round(n*r)/r).toFixed(t).replace(/\.?0+$/,"")};function DT(e){const[t,n]=c.useState(rr(e.initialValue??""));c.useEffect(()=>{n(rr(e.initialValue??""))},[]);const r=o=>{o.key==="Escape"&&n(rr(e.cellValue??""))},a={width:"100%",outline:"none",border:"none",background:"transparent"};return x.jsx("input",{id:e.id,ref:e.inputRef,className:"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",type:"string",inputMode:"decimal",value:t,onKeyDown:r,onChange:o=>{n(o.target.value),e.onChange(o)},onBlur:e.onBlur,style:a})}const jT="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfqSURBVHgB7d3/URtHHEDxQ6aAlEAJbiEdJBXYqQCoIHYFimnATgUpISXEJVCCKzC5BYxBSHB32h9vv/feDANO/M+O9ZmVdveWk6HzPn369GX89m78+vb9+/dfLy8vvw4dNo7jw/jtz/s/vj8/P/976LCdcXwYx/Fx6LDtdvs2vZZOho4TB6soOK6urt7f3Nx8Hn/8uBk6TRysAuJI3XQ5g4iDVVAct+PoDog4WEXGkX7oCog4WEXHkermM8gjHNfiaN8acKS6mEH24LgeOkwcrF7DkcIDEQerNeFIoYGIg9XacKSwn0HEwSoKjjSOqThSyBlEHKwi4RhmjgM3gwTE8W0QR/OWjgM1g0TEEWhJenU4Uggg2+32lzdv3nwe3xv+NogDkTjuag4k4dhsNv+OP74dxIFIHD9rCkQcvFxYeFozIOLgJY7nNQEiDl7i2F91IOLgJY7DVQUSDMdf47fzQRyISi0sVAMSDMeXwedSMJVcdasCRBy8xDGt4kDEwUsc0ysKRBy8xDGvYkDEwUsc8ysCRBy8xLGs7EDEwSsojirjyApEHLzEcVzZgIiDlziOLwsQcfASR56OBiIOXuLI11FAxMFLHHlbDEQcvMSRv0VAxMFLHGWaDUQcvMRRrllAxMFLHGWbfHFcUBz+KgVA5HFMmkGC47geOkwcdXp1BhlxnImDlTjq9eIM8gjH2SAORDt3/l6Io2wHgYiDl7eo1G8vEHHwEkebngERBy9xtOsJEHHwEkfbHoBEweGvUuDV86rbLZBIOLzWlFXvS9In4uAlDk6n4mDlnb+sTgdxYPIAJas0jnTURByAxMHqxzg24mhfQBxhfvX14kduWyYOXlEXFroDIg5ekVfdugIiDl7Rl6S7ASIOXmvYr+kCiDh4rWUzEw9EHLzWtNOPBiIOXms7BoMFIg5eazwGgwQiDl5r3emffC9WrcTBa807/agZRBy81v7ZCQNEHLxcWIAAEQcvcdzV/DOId/7yEsfPms4g3vnLSxxPawZEHLzE8bwmQMTBSxz7qw5EHLzc6T9cVSD3Vwz9M4gDk6tuL1cNiNea8hLH61UBIg5e4phWcSDe+ctLHNMrCsRrTXmJY17FgIiDlzjmV+SoiTh4eQxmWdlnEHHwcmFheVmBiIOXOI4rGxBx8BLH8WUBIg5e4sjT0UDEwUsc+ToKiDh4iSNvi4GIg5c48rcIiDhYeQymXLOBiIOVO/1lm7WTLg5W7vSXb/IMsoPj6ziI331RtcvPTnWaBGQPjjSIb0NniYMXfWHhVSDiYCWOur0IRBysxFG/g0DEwUocbdoLRBysxNGuZ0DEwUocbXsCRBys3Olv3wMQcbByHIxugYiDlePgdCIOVo6D1SYIjjNfVJyijCMtKpwOcXCcDb6omhcJx/jtXTrNK47GiYPV42P3G3G0TRysdp9JKXo3b6nEwSoqjvRMSndAxMEqMo7037sCIg5W0XGkugEiDlZrwJEqcrt77sTBKiCOg8/B42cQcbAKjON6399DAxEHq7XhSGHfYgXC4TEYUHOfSUHOIAFxnA3iaN6SB7ZwQMTBas04Uigg4mC1dhwpDBBxsBLHXQgg4mAVAUeu5+CbAwl05684IOUcQ1Mg2ziP+4oDUu4xNAMiDlbi2F8TIOJgJY7DVd9JFwerCDv9JYFXnUHEwSrCOErPftWAiIOVOKZVBYg4WIljesWBiIOVOOZVFIg4WIljfsWAiIOVOJZVZJk3KI6v4mhXq72a7DNIcBzOgA1quZGZFYg4WInj+LIBEQcrceQpCxBxsBJHvo4GIg5W4sjbUUDEwUoc+VsMRBysxFGmRUDEwUoc5ZoNRBysxFG2WTvp4mAVYaefjCM1eQYRB6sI46DjSE0C4ouKlTjq9epbLF9UrILg6OY5+BeBPP7HuLm5+eKLqm3iqN/Bt1i7OC4uLv4YOkwcnHpccdsLRBysxNGuZ0DEwUocbXsCRBysxNG+ByDiYCUORrdAxMFKHJxOxMFKHJzSZubpOJD/xp9/EUf7xMHpx05/2igUByBxcHp8DGYjjvaJg9PuGbHJp3lp7X52Gr8uxdGmqDjSOLoE4sICp8g40ji6AyIOTtFxpP/XFRBxcFoDjlQ3QMTBaS04UtV/ieeSxMEpwnPwqe3EJxrxM4g4OAVaVp/8uC8aiDg4rRFHCvsWaxzI2/tjMOJoXMAN2cmP+yJnkHscaSAeg2nc2i/Yw80gEXH0euHF2nGkUDNIVBw9jkMcd2GAiIOTOH6GACIOTuJ4WnMg4uAkjuc1BSIOTuLYXzMg4uAkjsM1ASIOTuJ4uepAAuHofhzieL2qQMTBSRzTqgZEHJzEMb0qQMTBSRzzKg5EHJzEMb+iQMTBSRzLKgZEHJzEsbwix90fv6jGrw/iaFdQHNWehc8+g+ziOD8//zh0mDg4tRxHViDi4CSOPGUDIg5O4shXFiDi4CSOvB39IV0cnCI8B58iIT9qBhEHpwgni1O0GXAxEHFwEke5Fr3Furq6en9/qZs4GieOss2eQRKO8R/i8/0fxdEwcZRv1gwSEcfQ6U6/OOo0eQaJiqPHcYijXpOAiIOTOOr2KhBxcAp0QrqbzcwXgYiDkzjadBCIODiJo117gYiDkzja9gyIODiJo31P9kGi4Iiw0y8ORg8zSCQcvY9DHJxugYiDkzhYnYiDkzh4bcTBSBzMfnxIF0fDxMHtf+oC30w+QkZFAAAAAElFTkSuQmCC",Ys=c.memo(e=>{var F,G,H,ne,M,se,fe,ve,xe,dt;const{onCellBlur:t,onCellEnter:n,handleCellKeyDown:r,onCellMouseDown:a,onCellMouseEnter:o,saveCommentHandler:s,deleteCommentHandler:i,onRightClick:l}=Xt(),u=c.useMemo(()=>e.fromArrayData?e.item[e.header.fromArray][e.fromArrayData.index][e.header.id]:e.item[e.header.id],[e.item,e.header,e.fromArrayData]),d=()=>u,[f,p]=c.useState(()=>d()),g=c.useMemo(()=>{var z;return((z=e.header.editOptions)==null?void 0:z.type)===xn.NUMBER&&!isNaN(Number(f))?Number(f):f},[f]),h=xr(),m=LO(),{setOpenCommentCell:b}=$o(),y=mt(),{setContextMenu:E}=Da(),O=c.useMemo(()=>({rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData}),[e.rowIndex,e.columnIndex,e.fromArrayData]);c.useEffect(()=>{p(d())},[e.item,e.header.id]);const A=z=>{const K=z.target;let Z=K.value;if(K instanceof HTMLInputElement)switch(K.type){case"number":Z=K.value===""?void 0:Number(K.value),typeof Z=="number"&&isNaN(Z)&&(Z=void 0);break;case"date":Z=K.value;break;default:Z=K.value}else K instanceof HTMLSelectElement&&(Z=K.value);p(Z)},C=async()=>{console.log("Blurred with value:",f),await t(g,e.item,e.header,{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData})},$=z=>{((m==null?void 0:m.columnIndex)!==e.columnIndex||m.rowIndex!==e.rowIndex)&&b(void 0),a(z,{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData})},_=z=>{if(z.key==="Enter")n(g,e.item,e.header,{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData});else if(z.key==="Escape")p(d());else{if(I()&&["ArrowRight","ArrowLeft","ArrowDown","ArrowUp"].includes(z.key)&&!z.shiftKey)return;z.ctrlKey&&(z.key==="z"||z.key==="y")?z.preventDefault():(["ArrowDown","ArrowUp","Tab"].includes(z.key),r(z))}},I=()=>(document.activeElement===V.current||document.activeElement===B.current)&&ee,L=c.useMemo(()=>{var z,K,Z,he;return(m==null?void 0:m.columnIndex)===e.columnIndex&&m.rowIndex===e.rowIndex&&((z=m.fromArrayData)==null?void 0:z.fromArray)===((K=e.fromArrayData)==null?void 0:K.fromArray)&&((Z=m.fromArrayData)==null?void 0:Z.index)===((he=e.fromArrayData)==null?void 0:he.index)},[m,e.columnIndex,e.rowIndex]),V=c.useRef(null),B=c.useRef(null),W=Ie(z=>{var K,Z,he,pe,ze;return((K=z.selectedCell)==null?void 0:K.rowIndex)===e.rowIndex&&((Z=z.selectedCell)==null?void 0:Z.columnIndex)===e.columnIndex&&((pe=(he=z.selectedCell)==null?void 0:he.fromArrayData)==null?void 0:pe.index)===((ze=e.fromArrayData)==null?void 0:ze.index)}),J=Ie(z=>{var K;return((K=z.expandedSelection)==null?void 0:K.some(Z=>{var he,pe;return Z.rowIndex===e.rowIndex&&Z.columnIndex===e.columnIndex&&((he=Z.fromArrayData)==null?void 0:he.index)===((pe=e.fromArrayData)==null?void 0:pe.index)}))||!1}),q={width:"100%",outline:"none",border:"none",background:"transparent"},Q=c.useMemo(()=>{var z,K;return(K=(z=e.header.editOptions)==null?void 0:z.notApplicable)==null?void 0:K.call(z,e.item,e.fromArrayData)},[(F=e.header.editOptions)==null?void 0:F.notApplicable,e.item,e.fromArrayData]),ee=c.useMemo(()=>{var z,K,Z;return((z=e.header.editOptions)==null?void 0:z.editable)&&!e.isInLinkedGroup&&!((Z=(K=e.header.editOptions).isDisabled)!=null&&Z.call(K,e.item,e.fromArrayData))&&!Q},[(G=e.header.editOptions)==null?void 0:G.editable,e.isInLinkedGroup,(H=e.header.editOptions)==null?void 0:H.isDisabled,Q,e.item,e.fromArrayData]),Y=c.useMemo(()=>{var pe;const z=e.style||{};if(Q)return{...z,backgroundImage:`url(${jT})`,backgroundRepeat:"repeat",backgroundSize:"22px 22px"};const K=e.isInLinkedGroup||!ee&&((pe=e.header.editOptions)==null?void 0:pe.greyedOutIfNotEditable);let Z=z.backgroundColor,he;return J&&!W&&(he="rgba(191, 219, 254, 0.5)"),K&&(Z=z.backgroundColor||"rgba(229, 231, 235, 0.5)"),e.rowIndex%2!==0&&(y!=null&&y.contrastRow)&&!z.backgroundColor&&(Z=Z||"rgba(239, 246, 255, 0.5)"),he&&Z?{...z,background:`
76
+ linear-gradient(${he}, ${he}),
77
+ linear-gradient(${Z}, ${Z})
78
+ `}:{...z,background:Z||he,textAlign:e.header.align,maxWidth:e.header.width?`${e.header.width}px`:"none"}},[e.style,e.isInLinkedGroup,(ne=e.header.editOptions)==null?void 0:ne.editable,(M=e.header.editOptions)==null?void 0:M.greyedOutIfNotEditable,e.rowIndex,y==null?void 0:y.contrastRow,J,W,e.header.align,e.header.width]),ie=c.useMemo(()=>{var z;if(Q)return x.jsx("div",{});if(ee&&W)switch(e.header.editOptions.type){case xn.NUMBER:return x.jsx(DT,{id:st(e.rowIndex,e.columnIndex,e.fromArrayData),inputRef:V,initialValue:f!==void 0?String(f):void 0,cellValue:u,onChange:A,onBlur:C});case xn.LIST:return x.jsx(MT,{inputRef:V,header:e.header,value:f,options:e.header.editOptions.options||[],onEnter:K=>{p(K),n(K,e.item,e.header,{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData})},onSelect:K=>{p(K),t(K,e.item,e.header,{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData})}});default:return x.jsx("div",{children:x.jsx("input",{ref:V,type:"text",value:f,onChange:A,autoFocus:!0,style:q})})}else{if(e.header.customRender)return x.jsx(OT,{item:e.item,header:e.header,fromArrayData:e.fromArrayData});{let K=u;return typeof u=="number"&&(K=rr(u)),x.jsxs("div",{className:"flex justify-between",children:[x.jsx("span",{className:"truncate whitespace-nowrap overflow-ellipsis",title:String(K),children:K}),((z=e.header.editOptions)==null?void 0:z.type)===xn.LIST&&x.jsx("div",{className:"ml-1 w-0 h-0",style:{borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid #888",marginTop:"4px"},"aria-label":"dropdown indicator"})]})}}},[ee,W,u,f,L,y==null?void 0:y.selectNewOptionOnAdd,e.item]),[j,v]=c.useState(!1),w=z=>{o(z,O)},S=z=>{i==null||i(z,e.item),b(void 0)},R=()=>{L||setTimeout(()=>{requestAnimationFrame(()=>{var z;(z=V.current)==null||z.focus()})},0)},T=c.useRef(!1);c.useEffect(()=>{D()},[W,ee]);const D=async()=>{W?T.current=!0:T.current&&ee&&W===!1&&(await C(),T.current=!1,p(u))},[P,k]=c.useState(!1);return c.useEffect(()=>{var z;if(L){const K=document.getElementById(st(e.rowIndex,e.columnIndex,e.fromArrayData));if(K){const Z=K.getBoundingClientRect(),he=(z=K.closest("table"))==null?void 0:z.getBoundingClientRect();if(he){const pe=Z.right+220>he.right;k(pe)}}}},[L,e.rowIndex,e.columnIndex,e.fromArrayData]),x.jsxs("td",{id:st(e.rowIndex,e.columnIndex,e.fromArrayData),"data-row-index":e.rowIndex,"data-col-index":e.columnIndex,"data-from-array":(se=e.fromArrayData)==null?void 0:se.fromArray,"data-array-index":(fe=e.fromArrayData)==null?void 0:fe.index,tabIndex:0,onFocus:R,style:{...Y,alignContent:"start",outline:W?"2px solid #3b82f6":"none"},rowSpan:e.rowSpan,className:`relative ${y!=null&&y.noBorder?"":"border-solid border border-gray-200"} ${W?"cell-selected":""}`,onKeyDown:_,onMouseDown:$,onMouseEnter:w,onContextMenu:z=>{l({rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData},z),E({x:z.clientX,y:z.clientY,cellCoordinate:{rowIndex:e.rowIndex,columnIndex:e.columnIndex,fromArrayData:e.fromArrayData},item:e.item,header:h[e.columnIndex]})},children:[e.comments&&e.comments.length>0&&x.jsx("div",{onClick:()=>b(L?void 0:O),className:"absolute top-0 right-0 ",style:{width:0,height:0,borderTop:"10px solid var(--comment-color)",borderLeft:"10px solid transparent"}}),ie,L&&x.jsx("div",{className:`absolute z-2000 w-[220px] bg-white border-2 border-[var(--comment-color)] rounded shadow-lg p-2 px-3 top-0 ${P?"left-0 ml-[-220px]":"right-0 mr-[-220px]"}`,children:x.jsx(_T,{comment:((ve=e.comments)==null?void 0:ve[0])||{text:"",propertyId:e.header.id,value:e.item[e.header.id],date:new Date},columnId:e.header.id,isNewComment:((xe=e.comments)==null?void 0:xe.length)===0,saveComment:z=>{s(z,e.item)},deleteComment:z=>S(z),setIsEditing:v,isEditing:j||((dt=e.comments)==null?void 0:dt.length)===0})})]},`item-${e.columnIndex}-${e.rowIndex}`)}),PT=(e,t)=>e.filter(r=>r.columnId===t).reduce((r,a)=>({...r,...a.style||{}}),{}),kT=(e,t)=>t.filter(r=>e[r.propertyId]===r.value)||[],NT=c.memo(e=>{const t=mt(),n=Cr(),r=wr(),a=cl(),{draggedRowIndex:o,dropTargetIndex:s,handleDragEnd:i,handleRowDragStart:l,handleDrop:u,handleRowDragOver:d}=Xt(),f=c.useMemo(()=>{const h=new Map;return a.forEach((m,b)=>{h.set(m,b+1)}),h},[a]),p=c.useMemo(()=>s===e.rowIndex,[s,e.rowIndex]),g=c.useMemo(()=>o!==null&&o<e.rowIndex,[o,e.rowIndex]);return x.jsxs("td",{rowSpan:e.rowSpan,style:{alignContent:"start"},className:`text-right pr-2 bg-gray-100 font-medium relative ${t!=null&&t.enableRowDragDrop?"cursor-grab":""}`,draggable:t==null?void 0:t.enableRowDragDrop,onDragEnd:t!=null&&t.enableRowDragDrop?i:void 0,onDragStart:t!=null&&t.enableRowDragDrop?()=>l(e.rowIndex,e.item):void 0,onDrop:t!=null&&t.enableRowDragDrop?()=>u(e.item):void 0,onDragOver:t!=null&&t.enableRowDragDrop?h=>{h.preventDefault(),d(e.rowIndex)}:void 0,onDragEnter:t!=null&&t.enableRowDragDrop?h=>{h.preventDefault(),d(e.rowIndex)}:void 0,children:[p&&x.jsx("div",{style:{position:"absolute",top:g?"100%":0,left:0,width:"100vw",height:"2px",backgroundColor:"rgb(59, 130, 246)",zIndex:10}}),x.jsxs("div",{className:"flex grow items-center justify-between",children:[(t==null?void 0:t.enableRowDragDrop)&&x.jsx(Pe,{path:rl,color:"grey",size:.8}),n?t!=null&&t.indexUseOriginalOrder?f.get(r[e.rowIndex]):e.rowIndex+1:f.get(e.item)]})]})}),Ks=c.memo(e=>{const t=mt(),n=xr(),r=Cr(),a=fl(),o=hl(),{draggedRowIndex:s,dropTargetIndex:i,onRowDoubleClick:l}=Xt(),u=c.useMemo(()=>kT(e.item,o),[o,e.item]),d=c.useMemo(()=>({...u.filter(b=>!b.columnId).reduce((b,y)=>({...b,...y.style||{}}),{}),opacity:s===e.index?.5:1,backgroundColor:i===e.index?"rgba(59, 130, 246, 0.1)":void 0,position:"relative"}),[u,s,i,e.index]);let f=0;const p=n.filter(b=>b.fromArray);p.length>0&&(n.forEach(b=>{b.fromArray&&Array.isArray(e.item[b.fromArray])&&(f=Math.max(f,e.item[b.fromArray].length))}),f++);const g=c.useMemo(()=>n.map((b,y)=>{const E=PT(u,b.id),O=a.filter(A=>A.columnId===b.id&&e.item[A.propertyId]===A.value);return x.jsx(Ys,{isInLinkedGroup:(e.groupName&&e.isGroupLinked?e.isGroupLinked(e.groupName):void 0)||!1,header:b,item:e.item,style:E,rowIndex:e.index,columnIndex:y,comments:O,rowSpan:b.fromArray?1:Math.max(f,1)},`item-${e.index}-${y}-${b.id}`)}),[n,e.index,e.item,e.groupName,e.isGroupLinked,u,a,f]),h=c.useMemo(()=>t!=null&&t.rowIdProperty?String(e.item[t.rowIdProperty]):void 0,[e.item]),m=c.useMemo(()=>p.length===0||f<=1?null:Array.from({length:f-1}).map((b,y)=>x.jsx("tr",{children:p.map((E,O)=>{const A=n.findIndex(C=>C.id===E.id);return x.jsx(Ys,{isInLinkedGroup:(e.groupName&&e.isGroupLinked?e.isGroupLinked(e.groupName):void 0)||!1,header:E,item:e.item,style:{},rowIndex:e.index,columnIndex:A,comments:[],rowSpan:E.fromArray?1:f,fromArrayData:{fromArray:E.fromArray,index:y}},`item-${e.index}-${O}`)})},`item-array-${e.index}-${y}`)),[p,e.index,e.item,e.groupName,e.isGroupLinked,f]);return x.jsxs(x.Fragment,{children:[x.jsxs("tr",{id:h,style:d,className:`${l?"cursor-pointer":""}`,onDoubleClick:l?()=>l(e.item):void 0,ref:e.ref,"data-index":e.dataIndex,children:[(t==null?void 0:t.showIndex)&&x.jsx(NT,{item:e.item,rowIndex:e.index,rowSpan:Math.max(f,1)}),g]},`item-${r?e.item.groupName:""}-${e.index}`),m]})});function HT(e){return x.jsx("div",{className:"relative h-6 w-full bg-[#f0f0f0] border border-gray-200 text-sm font-semibold",children:e.footerCustomRender?e.footerCustomRender(e.itemsCount,e.filteredItemsCount,e.colSpan):x.jsxs("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 flex justify-end gap-8 items-center text-gray-600",children:[e.filteredItemsCount!==e.itemsCount&&x.jsxs("div",{children:["Rows: ",e.filteredItemsCount," of ",e.itemsCount]}),x.jsxs("div",{children:["Total Rows: ",e.itemsCount]}),x.jsxs("div",{children:["Filtered: ",e.filteredItemsCount]})]})})}const LT=c.memo(HT),FT="main-base-table",BT=({dialogItem:e})=>{const[t,n]=c.useState(e.position),[r,a]=c.useState(!1),[o,s]=c.useState({x:0,y:0}),i=c.useRef(null),{closeDialog:l}=ou(),u=(p,g,h,m)=>{const b=window.innerWidth-h,y=window.innerHeight-m;return{x:Math.min(Math.max(0,p),b),y:Math.min(Math.max(0,g),y)}},d=p=>{var g;if(p.target===p.currentTarget||p.target.closest(".dialog-header")){a(!0);const h=(g=i.current)==null?void 0:g.getBoundingClientRect();h&&s({x:p.clientX-h.left,y:p.clientY-h.top})}};c.useEffect(()=>{if(!r)return;const p=h=>{var y;const m=(y=i.current)==null?void 0:y.getBoundingClientRect();if(!m)return;const b=u(h.clientX-o.x,h.clientY-o.y,m.width,m.height);n(b)},g=()=>{a(!1)};return document.addEventListener("mousemove",p),document.addEventListener("mouseup",g),()=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",g)}},[r,o]),c.useEffect(()=>{const p=g=>{g.key==="Escape"&&f()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[]);const f=()=>{l(e.id)};return x.jsxs("div",{ref:i,className:"fixed shadow-2xl bg-white rounded-md z-50 border border-gray-300",style:{left:t.x,top:t.y,width:"300px",cursor:r?"grabbing":"default",userSelect:r?"none":"text"},children:[x.jsxs("div",{className:"dialog-header flex justify-between items-center px-3 py-1 cursor-grab bg-gray-50 rounded-t-md border-b border-gray-200",onMouseDown:d,children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx(Pe,{path:al,color:"#5588b4",size:1}),x.jsx("p",{className:"text-sm font-semibold ml-2 ",children:e.title})]}),x.jsx(je,{icon:nl,className:"bg-white rounded-3xl hover:bg-gray-200",onClick:f,small:!0})]}),x.jsx("div",{className:"p-4 max-h-[calc(80vh-3rem)] overflow-y-auto",children:e.dialogImplementation})]})};function zT(e){const t=Ad(),n=wr(),r=Dn(),a=xr(),o=ul(),s=Ma(),i=pl(),l=mt(),u=nd(),{clearActiveFilters:d,setActiveFilter:f,onResetSort:p,onSortByColumn:g,collapseGroup:h}=bt(),{setSelectedCell:m,setExpandedSelection:b}=bl(),{setContextMenu:y}=Da(),{setTableRef:E,setScrollRef:O}=IT(),A=ET(),{groupedItemsEntries:C,flatGroupedItems:$,isGroupLinked:_}=vl(),I=c.useMemo(()=>$.filter(v=>v.isGroup?!0:!i.includes(v.groupName)),[$,i]),{onMouseMove:L}=Xt(),V=c.useRef(null),B=c.useRef(null);c.useEffect(()=>{E(V)},[V]),c.useEffect(()=>{O(B)},[B]),c.useEffect(()=>{if(!(l!=null&&l.focusedRowIndex))return;let v=l.focusedRowIndex;if(e.groupBy){let w=0;for(let S=0;S<I.length;S++)if(!I[S].isGroup){if(w===l.focusedRowIndex){v=S;break}w++}}requestAnimationFrame(()=>{Y.virtualizer.scrollToIndex(v,{align:"center",behavior:"auto"})})},[l==null?void 0:l.focusedRowIndex]);const W=qu(),J=c.useMemo(()=>l!=null&&l.showIndex?[{id:"_index",text:"",sortable:!1,align:"right",children:[],width:l!=null&&l.enableRowDragDrop?55:40},...W]:W,[W,l==null?void 0:l.showIndex,l==null?void 0:l.enableRowDragDrop]),q=c.useMemo(()=>({ids:e.headers.map(v=>v.id).join(","),count:e.headers.length}),[e.headers]);c.useEffect(()=>{y(void 0),d(),m(void 0),b([])},[q.ids,q.count]);const Q=c.useMemo(()=>{if(e.groupBy){let v=0;return C.forEach(([w,S])=>{v+=1,i.includes(w)||(v+=S.length)}),v}else return n.length},[n,C,i,e.groupBy]),ee=c.useMemo(()=>{if(e.groupBy){let v=0;return C.forEach(([w,S])=>{i.includes(w)||(v+=S.length)}),v}else return n.length},[n,C,e.groupBy]),Y=xd({scrollRef:B,rowsCount:Q}),ie=c.useMemo(()=>{const v=new Map;return e.groupBy&&$.forEach(w=>{w.isGroup||(v.has(w.groupName)||v.set(w.groupName,[]),v.get(w.groupName).push(w))}),v},[$,e.groupBy]),j=c.useMemo(()=>{const v=Y.virtualRows;return e.groupBy?Y.virtualRows.map(w=>{const S=I[w.index];if(S.isGroup){const R=ie.get(S.groupName)||[];return x.jsx(c.Fragment,{children:x.jsx(wd,{dataIndex:w.index,ref:Y.virtualizer.measureElement,colSpan:a.length+(l!=null&&l.showIndex?1:0),groupBy:e.groupBy,groupName:S.groupName,isCollapsed:i.includes(S.groupName),masterGroupName:S.masterGroupName,linkedGroupNames:S.linkedGroupNames,onCollapseGroup:h,groupByCustomRender:e.groupByCustomRender?(T,D)=>{var P;return(P=e.groupByCustomRender)==null?void 0:P.call(e,T,D,a.length+(l!=null&&l.showIndex?1:0),S.isCollapsed||!1,h,R,S.masterGroupName,S.linkedGroupNames)}:void 0})},`group-${S.groupName}`)}else{const R=S;return x.jsx(c.Fragment,{children:x.jsx(Ks,{dataIndex:w.index,ref:Y.virtualizer.measureElement,item:R.item,index:R.rowIndex,groupName:R.groupName,isGroupLinked:_})},`group-${S.groupName}-item-${R.rowIndex}`)}}):v.map(w=>{const S=n[w.index];return x.jsx(Ks,{dataIndex:w.index,ref:Y.virtualizer.measureElement,item:S,index:w.index,isGroupLinked:_})})},[Y.virtualRows,Y.virtualizer.measureElement,e,I,ie,a.length,l==null?void 0:l.showIndex,i,h,_,n]);return x.jsxs(x.Fragment,{children:[u&&x.jsx($T,{x:u.x,y:u.y,item:u.item,itemCoordinate:u.cellCoordinate,header:u.header,onClose:()=>y(void 0)}),x.jsxs("div",{ref:B,className:"overflow-auto h-min",style:{overflow:"auto",border:"1px solid lightgray",height:e.height?`calc(${e.height} - ${l!=null&&l.showFooter?"20px":"0rem"})`:`calc(100vh - ${l!=null&&l.marginTop?l==null?void 0:l.marginTop:"6rem"} - ${l!=null&&l.showFooter?"20px":"0rem"})`},children:[A.map(v=>x.jsx(BT,{dialogItem:v})),x.jsxs("table",{ref:V,onMouseMove:L,id:(l==null?void 0:l.tableId)??FT,style:{width:"100%",position:"unset",userSelect:t?"none":"auto",WebkitUserSelect:t?"none":"auto",MozUserSelect:t?"none":"auto",msUserSelect:t?"none":"auto"},className:`base-table table table-xs table-pin-rows
79
+ will-change-transform overflow-contain transform-gpu
80
+ ${l!=null&&l.pinColumns?" table-pin-cols":""} `,children:[x.jsx(ad,{headers:J,noBorder:l==null?void 0:l.noBorder,alignCenterInLine:l==null?void 0:l.alignCenterInLine,activeFilters:r,tableRef:V,ascendingOrder:s,filterItemsCache:o,onResetSort:p,onSortByColumn:g,onSetFilter:f}),x.jsxs("tbody",{children:[Y.before>0&&x.jsx("tr",{style:{height:Y.before},children:x.jsx("td",{colSpan:a.length+(l!=null&&l.showIndex?1:0),style:{height:Y.before}})}),j,Y.after>0&&x.jsx("tr",{children:x.jsx("td",{colSpan:a.length+(l!=null&&l.showIndex?1:0),style:{height:Y.after}})})]})]})]}),x.jsx(LT,{itemsCount:e.items.length,filteredItemsCount:ee,colSpan:a.length+(l!=null&&l.showIndex?1:0)})]})}function GT(e){const t=Dn(),n=dl(),r=Ma(),a=ll(),{setItems:o,processItems:s,setHeaders:i,processFilterItemsCache:l,setGroupBy:u,setLinkedGroups:d,setHighlightConditions:f,setComments:p,setAdvancedSettings:g,processHeaders:h}=bt();c.useEffect(()=>{o(e.items),s(),l()},[e.items,e.headers,n,r,t]),c.useEffect(()=>{i(e.headers),h()},[e.headers,a]),c.useEffect(()=>{p(e.comments||[])},[e.comments]),c.useEffect(()=>{f(e.highlightCondition||[])},[e.highlightCondition]),c.useEffect(()=>{u(e.groupBy)},[e.groupBy]),c.useEffect(()=>{g(e.advancedSettings)},[e.advancedSettings]),c.useEffect(()=>{d(e.linkedGroups)},[e.linkedGroups]);const{groupedItemsEntries:m}=vl();return x.jsx(_d,{groupedItemsEntries:e.groupBy?m:void 0,onChange:e.onChange,onBulkChange:e.onBulkChange,onRowDoubleClick:e.onRowDoubleClick,onRowsReordered:e.onRowsReordered,onDeleteComment:e.onDeleteComment,onSaveComment:e.onSaveComment,onSetHighlightCondition:e.onSetHighlightCondition,onRemoveHighlightCondition:e.onRemoveHighlightCondition,onAddListOption:e.onAddListOption,children:x.jsx(zT,{...e})})}exports.BaseTable=GT;
79
81
  //# sourceMappingURL=index.cjs.js.map