From 80c71f3aca5f532eeacf7a2bbd8628a3719f76ea Mon Sep 17 00:00:00 2001 From: Jamie Neighbours Date: Wed, 19 Jun 2024 11:49:53 +0100 Subject: [PATCH] inlude feedback passthrough on rich text component --- dist/components/form/Form.d.ts | 5 ++++- dist/components/form/Form.d.ts.map | 2 +- dist/components/form/components/FormRichText.d.ts | 5 ++++- dist/components/form/components/FormRichText.d.ts.map | 2 +- dist/components/form/components/FormRichText.js | 8 +++++--- dist/components/form/components/FormRichText.js.map | 2 +- dist/index.es.js | 8 ++++---- dist/index.js | 7 ++++--- dist/index.min.js | 8 ++++---- src/components/form/components/FormRichText.tsx | 3 +++ 10 files changed, 31 insertions(+), 19 deletions(-) diff --git a/dist/components/form/Form.d.ts b/dist/components/form/Form.d.ts index 9b7c9bf..99f9c13 100644 --- a/dist/components/form/Form.d.ts +++ b/dist/components/form/Form.d.ts @@ -18,7 +18,10 @@ declare const Form: { ({ type, className, ...rest }: import("./components/FormCheck").FormCheckProps): React.JSX.Element; Feedback: import("react-bootstrap/esm/helpers").BsPrefixRefForwardingComponent<"div", import("react-bootstrap/esm/Feedback").FeedbackProps>; }; - RichText: ({ modules, value, onChange, theme, importCallback, debug, ...rest }: import("./components/FormRichText").QuillEditorProps) => React.JSX.Element; + RichText: { + ({ modules, value, onChange, theme, importCallback, debug, ...rest }: import("./components/FormRichText").QuillEditorProps): React.JSX.Element; + Feedback: import("react-bootstrap/esm/helpers").BsPrefixRefForwardingComponent<"div", import("react-bootstrap/esm/Feedback").FeedbackProps>; + }; DateTime: { ({ className, ...rest }: import("./components/FormDateTime").FormDateTimeProps): React.JSX.Element; Feedback: import("react-bootstrap/esm/helpers").BsPrefixRefForwardingComponent<"div", import("react-bootstrap/esm/Feedback").FeedbackProps>; diff --git a/dist/components/form/Form.d.ts.map b/dist/components/form/Form.d.ts.map index e9eb68a..51db181 100644 --- a/dist/components/form/Form.d.ts.map +++ b/dist/components/form/Form.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/form/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,EAGL,SAAS,IAAI,kBAAkB,EAChC,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,SAAU,SAAQ,kBAAkB;CAAG;AAExD,QAAA,MAAM,IAAI;4BAA2B,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE7C,CAAC;AAcF,eAAe,IAAI,CAAC"} \ No newline at end of file +{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/form/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,EAGL,SAAS,IAAI,kBAAkB,EAChC,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,SAAU,SAAQ,kBAAkB;CAAG;AAExD,QAAA,MAAM,IAAI;4BAA2B,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE7C,CAAC;AAcF,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/components/form/components/FormRichText.d.ts b/dist/components/form/components/FormRichText.d.ts index 5dbdbd7..12b29bb 100644 --- a/dist/components/form/components/FormRichText.d.ts +++ b/dist/components/form/components/FormRichText.d.ts @@ -11,6 +11,9 @@ export interface QuillEditorProps { onChange?(value: string): any; importCallback?(): any; } -declare const FormRichText: ({ modules, value, onChange, theme, importCallback, debug, ...rest }: QuillEditorProps) => React.JSX.Element; +declare const FormRichText: { + ({ modules, value, onChange, theme, importCallback, debug, ...rest }: QuillEditorProps): React.JSX.Element; + Feedback: import("react-bootstrap/esm/helpers").BsPrefixRefForwardingComponent<"div", import("react-bootstrap/esm/Feedback").FeedbackProps>; +}; export default FormRichText; //# sourceMappingURL=FormRichText.d.ts.map \ No newline at end of file diff --git a/dist/components/form/components/FormRichText.d.ts.map b/dist/components/form/components/FormRichText.d.ts.map index 285e9ab..163e7a4 100644 --- a/dist/components/form/components/FormRichText.d.ts.map +++ b/dist/components/form/components/FormRichText.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"FormRichText.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/FormRichText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAS,aAAa,EAAY,MAAM,OAAO,CAAC;AAE9D,OAAO,2BAA2B,CAAC;AAEnC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;IAC9B,cAAc,CAAC,IAAI,GAAG,CAAC;CACxB;AAED,QAAA,MAAM,YAAY,wEAAuE,gBAAgB,sBA0DxG,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file +{"version":3,"file":"FormRichText.d.ts","sourceRoot":"","sources":["../../../../src/components/form/components/FormRichText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAU,aAAa,EAAa,MAAM,OAAO,CAAC;AAGhE,OAAO,2BAA2B,CAAC;AAEnC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;IAC9B,cAAc,CAAC,IAAI,GAAG,CAAC;CACxB;AAED,QAAA,MAAM,YAAY;0EAQf,gBAAgB;;CA+DlB,CAAC;AAIF,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/components/form/components/FormRichText.js b/dist/components/form/components/FormRichText.js index b9cc12e..16dcc11 100644 --- a/dist/components/form/components/FormRichText.js +++ b/dist/components/form/components/FormRichText.js @@ -21,13 +21,14 @@ var __rest = (this && this.__rest) || function (s, e) { return t; }; import React, { useRef, useEffect } from 'react'; +import Feedback from 'react-bootstrap/esm/Feedback'; import Quill from 'quill'; import 'quill/dist/quill.snow.css'; var FormRichText = function (_a) { var modules = _a.modules, value = _a.value, onChange = _a.onChange, theme = _a.theme, importCallback = _a.importCallback, debug = _a.debug, rest = __rest(_a, ["modules", "value", "onChange", "theme", "importCallback", "debug"]); var quillRef = useRef(null); var containerRef = useRef(null); - //Set debug mode, false results in no output. + // Set debug mode, false results in no output. Quill.debug(debug || false); var quillOptions = __assign(__assign({}, modules), { theme: theme || 'snow' }); var setValue = function (quillRef) { @@ -45,7 +46,7 @@ var FormRichText = function (_a) { useEffect(function () { if (containerRef.current) { if (importCallback) { - //Callback to import new modules into quill, needs to be done within the same instance as the quill object. + // Callback to import new modules into quill, needs to be done within the same instance as the quill object. importCallback(); } var container_1 = containerRef.current; @@ -64,7 +65,8 @@ var FormRichText = function (_a) { // NOTE: Run effect once on component mount, please recheck dependencies if effect is updated. // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - return React.createElement("div", { ref: containerRef, style: rest.style, id: rest.id, className: rest.className }); + return (React.createElement("div", { ref: containerRef, style: rest.style, id: rest.id, className: rest.className })); }; +FormRichText.Feedback = Feedback; export default FormRichText; //# sourceMappingURL=FormRichText.js.map \ No newline at end of file diff --git a/dist/components/form/components/FormRichText.js.map b/dist/components/form/components/FormRichText.js.map index 2b2c188..174fa54 100644 --- a/dist/components/form/components/FormRichText.js.map +++ b/dist/components/form/components/FormRichText.js.map @@ -1 +1 @@ -{"version":3,"file":"FormRichText.js","sourceRoot":"","sources":["../../../../src/components/form/components/FormRichText.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAC,MAAM,EAAiB,SAAS,EAAC,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,2BAA2B,CAAC;AAenC,IAAM,YAAY,GAAG,UAAC,EAAmF;IAAlF,IAAA,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,KAAK,WAAA,EAAE,cAAc,oBAAA,EAAE,KAAK,WAAA,EAAK,IAAI,cAAhE,oEAAiE,CAAD;IAEpF,IAAM,QAAQ,GAAG,MAAM,CAAe,IAAI,CAAC,CAAC;IAC5C,IAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,6CAA6C;IAC7C,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;IAE5B,IAAM,YAAY,yBACb,OAAO,KACV,KAAK,EAAE,KAAK,IAAI,MAAM,GACvB,CAAC;IAEF,IAAM,QAAQ,GAAG,UAAC,QAAe;QAC/B,IAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1D,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,IAAM,kBAAkB,GAAG,UAAC,KAAY;QACtC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE;;YACjC,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,CAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,eAAe,EAAE,KAAI,EAAE,CAAC,CAAC;aACrD;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,SAAS,CAAC;QACR,IAAI,YAAY,CAAC,OAAO,EAAE;YAExB,IAAI,cAAc,EAAE;gBAClB,2GAA2G;gBAC3G,cAAc,EAAE,CAAC;aAClB;YAED,IAAM,WAAS,GAAG,YAAY,CAAC,OAAyB,CAAC;YACzD,IAAM,eAAe,GAAG,WAAS,CAAC,WAAW,CAC3C,WAAS,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAC7C,CAAC;YAEF,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;YACvD,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,oCAAoC;YAE9D,IAAI,KAAK,EAAE;gBACT,QAAQ,CAAC,KAAK,CAAC,CAAC;aACjB;YACD,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAE1B,OAAO;gBACL,WAAS,CAAC,SAAS,GAAG,EAAE,CAAC;gBACxB,QAAQ,CAAC,OAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAC5D,CAAC,CAAC;SACH;QAED,8FAA8F;QAC9F,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,6BAAK,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,CAAC;AAC9F,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file +{"version":3,"file":"FormRichText.js","sourceRoot":"","sources":["../../../../src/components/form/components/FormRichText.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,QAAQ,MAAM,8BAA8B,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,2BAA2B,CAAC;AAenC,IAAM,YAAY,GAAG,UAAC,EAQH;IAPjB,IAAA,OAAO,aAAA,EACP,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,cAAc,oBAAA,EACd,KAAK,WAAA,EACF,IAAI,cAPa,oEAQrB,CADQ;IAEP,IAAM,QAAQ,GAAG,MAAM,CAAe,IAAI,CAAC,CAAC;IAC5C,IAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,8CAA8C;IAC9C,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;IAE5B,IAAM,YAAY,yBACb,OAAO,KACV,KAAK,EAAE,KAAK,IAAI,MAAM,GACvB,CAAC;IAEF,IAAM,QAAQ,GAAG,UAAC,QAAe;QAC/B,IAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1D,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC,CAAC;IAEF,IAAM,kBAAkB,GAAG,UAAC,KAAY;QACtC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE;;YACjC,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,CAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,eAAe,EAAE,KAAI,EAAE,CAAC,CAAC;aACrD;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,SAAS,CAAC;QACR,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,IAAI,cAAc,EAAE;gBAClB,4GAA4G;gBAC5G,cAAc,EAAE,CAAC;aAClB;YAED,IAAM,WAAS,GAAG,YAAY,CAAC,OAAyB,CAAC;YACzD,IAAM,eAAe,GAAG,WAAS,CAAC,WAAW,CAC3C,WAAS,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAC7C,CAAC;YAEF,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;YACvD,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,oCAAoC;YAE9D,IAAI,KAAK,EAAE;gBACT,QAAQ,CAAC,KAAK,CAAC,CAAC;aACjB;YACD,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAE1B,OAAO;gBACL,WAAS,CAAC,SAAS,GAAG,EAAE,CAAC;gBACxB,QAAQ,CAAC,OAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAC5D,CAAC,CAAC;SACH;QAED,8FAA8F;QAC9F,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,6BACE,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,SAAS,EAAE,IAAI,CAAC,SAAS,GACzB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAEjC,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/index.es.js b/dist/index.es.js index 0d95e28..796cd5b 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -16,7 +16,7 @@ import*as e from"react";import t,{useRef as n,useState as r,useCallback as a,use object-assign (c) Sindre Sorhus @license MIT -*/function pe(){if(te)return ee;te=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return ee=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(r,a){for(var i,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l1?"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]).":"Invalid argument supplied to oneOf, expected an array."),o)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return m((function(t,r,a,i,o){var s=t[r],l=y(s);if("object"!==l)return new p("Invalid "+i+" `"+o+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(a,i,o,c,E(u));var d=u(s,c,a,i,o+"."+c,n);if(d)return d}return null}))},exact:function(e){return m((function(a,i,o,s,l){var c=a[i],u=y(c);if("object"!==u)return new p("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+o+"`, expected `object`.");var d=t({},a[i],e);for(var h in d){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(o,s,l,h,E(f));if(!f)return new p("Invalid "+s+" `"+l+"` key `"+h+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(a[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,o,s,l+"."+h,n);if(m)return m}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function a(a,o,s,c,u,h,f){if(c=c||d,h=h||s,f!==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}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+s;!t[v]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. 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."),t[v]=!0,r++)}}return null==o[s]?a?null===o[s]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(o,s,c,u,h)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function v(e){return m((function(t,n,r,a,i,o){var s=t[n];return y(s)!==e?new p("Invalid "+a+" `"+i+"` of type `"+E(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,a){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e[u]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var a=n.value;if(a&&!b(a[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},le}()(ge.isElement,!0)}else G.exports=function(){if(de)return ue;de=1;var e=me();function t(){}function n(){}return n.resetWarningCache=t,ue=function(){function r(t,n,r,a,i,o){if(o!==e){var s=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 s.name="Invariant Violation",s}}function a(){return r}r.isRequired=r;var i={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 i.PropTypes=i,i}}()();var be=N(G.exports),ye=!1,Ee="production"!==process.env.NODE_ENV?be.oneOfType([be.number,be.shape({enter:be.number,exit:be.number,appear:be.number}).isRequired]):null;"production"!==process.env.NODE_ENV&&be.oneOfType([be.string,be.shape({enter:be.string,exit:be.string,active:be.string}),be.shape({enter:be.string,enterDone:be.string,enterActive:be.string,exit:be.string,exitDone:be.string,exitActive:be.string})]);var we=t.createContext(null),xe="unmounted",Ne="exited",ke="entering",Oe="entered",Le="exiting",Ae=function(e){var n,r;function a(t,n){var r;r=e.call(this,t,n)||this;var a,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(a=Ne,r.appearStatus=ke):a=Oe:a=t.unmountOnExit||t.mountOnEnter?xe:Ne,r.state={status:a},r.nextCallback=null,r}r=e,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,R(n,r),a.getDerivedStateFromProps=function(e,t){return e.in&&t.status===xe?{status:Ne}:null};var i=a.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==ke&&n!==Oe&&(t=ke):n!==ke&&n!==Oe||(t=Le)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===ke){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:y.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ne&&this.setState({status:xe})},i.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,a=this.props.nodeRef?[r]:[y.findDOMNode(this),r],i=a[0],o=a[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||ye?this.safeSetState({status:Oe},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,o),this.safeSetState({status:ke},(function(){t.props.onEntering(i,o),t.onTransitionEnd(l,(function(){t.safeSetState({status:Oe},(function(){t.props.onEntered(i,o)}))}))})))},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:y.findDOMNode(this);t&&!ye?(this.props.onExit(r),this.safeSetState({status:Le},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Ne},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Ne},(function(){e.props.onExited(r)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:y.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=a[0],o=a[1];this.props.addEndListener(i,o)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===xe)return null;var n=this.props,r=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var a=A(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return t.createElement(we.Provider,{value:null},"function"==typeof r?r(e,a):t.cloneElement(t.Children.only(r),a))},a}(t.Component);function Se(){}Ae.contextType=we,Ae.propTypes="production"!==process.env.NODE_ENV?{nodeRef:be.shape({current:"undefined"==typeof Element?be.any:function(e,t,n,r,a,i){var o=e[t];return be.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,a,i)}}),children:be.oneOfType([be.func.isRequired,be.element.isRequired]).isRequired,in:be.bool,mountOnEnter:be.bool,unmountOnExit:be.bool,appear:be.bool,enter:be.bool,exit:be.bool,timeout:function(e){var t=Ee;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a{n.target===e&&(a(),t(n))}),n+r)}function Be(...e){return e.filter((e=>null!=e)).reduce(((e,t)=>{if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(...n){e.apply(this,n),t.apply(this,n)}}),null)}function $e(e){e.offsetHeight}const He=e=>e&&"function"!=typeof e?t=>{e.current=t}:e;function Ue(e,t){return o((()=>function(e,t){const n=He(e),r=He(t);return e=>{n&&n(e),r&&r(e)}}(e,t)),[e,t])}function Fe(e){return e&&"setState"in e?y.findDOMNode(e):null!=e?e:null}const Ve=t.forwardRef((({onEnter:e,onEntering:r,onEntered:i,onExit:o,onExiting:s,onExited:l,addEndListener:c,children:u,childRef:d,...h},f)=>{const p=n(null),v=Ue(p,d),g=e=>{v(Fe(e))},b=e=>t=>{e&&p.current&&e(p.current,t)},y=a(b(e),[e]),E=a(b(r),[r]),w=a(b(i),[i]),x=a(b(o),[o]),N=a(b(s),[s]),k=a(b(l),[l]),O=a(b(c),[c]);return m(Ae,{ref:f,...h,onEnter:y,onEntered:w,onEntering:E,onExit:x,onExited:k,onExiting:N,addEndListener:O,nodeRef:p,children:"function"==typeof u?(e,t)=>u(e,{...t,ref:g}):t.cloneElement(u,{ref:g})})}));var ze=Ve;const We={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function Ke(e,t){const n=t[`offset${e[0].toUpperCase()}${e.slice(1)}`],r=We[e];return n+parseInt(K(t,r[0]),10)+parseInt(K(t,r[1]),10)}const Ze={[Ne]:"collapse",[Le]:"collapsing",[ke]:"collapsing",[Oe]:"collapse show"};var Ge=t.forwardRef((({onEnter:e,onEntering:n,onEntered:r,onExit:a,onExiting:i,className:s,children:l,dimension:c="height",in:u=!1,timeout:d=300,mountOnEnter:h=!1,unmountOnExit:f=!1,appear:p=!1,getDimensionValue:v=Ke,...g},b)=>{const y="function"==typeof c?c():c,E=o((()=>Be((e=>{e.style[y]="0"}),e)),[y,e]),w=o((()=>Be((e=>{const t=`scroll${y[0].toUpperCase()}${y.slice(1)}`;e.style[y]=`${e[t]}px`}),n)),[y,n]),x=o((()=>Be((e=>{e.style[y]=null}),r)),[y,r]),N=o((()=>Be((e=>{e.style[y]=`${v(y,e)}px`,$e(e)}),a)),[a,v,y]),k=o((()=>Be((e=>{e.style[y]=null}),i)),[y,i]);return m(ze,{ref:b,addEndListener:De,...g,"aria-expanded":g.role?u:null,onEnter:E,onEntering:w,onEntered:x,onExit:N,onExiting:k,childRef:l.ref,in:u,timeout:d,mountOnEnter:h,unmountOnExit:f,appear:p,children:(e,n)=>t.cloneElement(l,{...n,className:O(s,l.props.className,Ze[e],"width"===y&&"collapse-horizontal")})})}));function Ye(e){const t=function(e){const t=n(e);return s((()=>{t.current=e}),[e]),t}(e);return a((function(...e){return t.current&&t.current(...e)}),[t])}var Xe=t=>e.forwardRef(((e,n)=>m("div",{...e,ref:n,className:O(e.className,t)})));function Je(){return r(null)}function Qe(){const e=n(!0),t=n((()=>e.current));return s((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}function et(e){const t=n(null);return s((()=>{t.current=e})),t.current}const tt="undefined"!=typeof global&&global.navigator&&"ReactNative"===global.navigator.product;var nt="undefined"!=typeof document||tt?l:s;const rt=["as","disabled"];function at({tagName:e,disabled:t,href:n,target:r,rel:a,role:i,onClick:o,tabIndex:s=0,type:l}){e||(e=null!=n||null!=r||null!=a?"a":"button");const c={tagName:e};if("button"===e)return[{type:l||"button",disabled:t},c];const u=r=>{(t||"a"===e&&function(e){return!e||"#"===e.trim()}(n))&&r.preventDefault(),t?r.stopPropagation():null==o||o(r)};return"a"===e&&(n||(n="#"),t&&(n=void 0)),[{role:null!=i?i:"button",disabled:void 0,tabIndex:t?void 0:s,href:n,target:"a"===e?r:void 0,"aria-disabled":t||void 0,rel:"a"===e?a:void 0,onClick:u,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),u(e))}},c]}const it=e.forwardRef(((e,t)=>{let{as:n,disabled:r}=e,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,rt);const[i,{tagName:o}]=at(Object.assign({tagName:n,disabled:r},a));return m(o,Object.assign({},a,i,{ref:t}))}));it.displayName="Button";const ot=["onKeyDown"];const st=e.forwardRef(((e,t)=>{let{onKeyDown:n}=e,r=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,ot);const[a]=at(Object.assign({tagName:"a"},r)),i=Ye((e=>{a.onKeyDown(e),null==n||n(e)}));return(o=r.href)&&"#"!==o.trim()&&"button"!==r.role?m("a",Object.assign({ref:t},r,{onKeyDown:n})):m("a",Object.assign({ref:t},r,a,{onKeyDown:i}));var o}));st.displayName="Anchor";var lt=st;const ct={[ke]:"show",[Oe]:"show"},ut=e.forwardRef((({className:t,children:n,transitionClasses:r={},onEnter:i,...o},s)=>{const l={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},c=a(((e,t)=>{$e(e),null==i||i(e,t)}),[i]);return m(ze,{ref:s,addEndListener:De,...l,onEnter:c,childRef:n.ref,children:(a,i)=>e.cloneElement(n,{...i,className:O("fade",t,n.props.className,ct[a],r[a])})})}));ut.displayName="Fade";var dt=ut;const ht={"aria-label":be.string,onClick:be.func,variant:be.oneOf(["white"])},ft=e.forwardRef((({className:e,variant:t,"aria-label":n="Close",...r},a)=>m("button",{ref:a,type:"button",className:O("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r})));ft.displayName="CloseButton",ft.propTypes=ht;var pt=ft;const mt=e.forwardRef((({as:e,bsPrefix:t,variant:n="primary",size:r,active:a=!1,disabled:i=!1,className:o,...s},l)=>{const c=I(t,"btn"),[u,{tagName:d}]=at({tagName:e,disabled:i,...s});return m(d,{...u,...s,ref:l,disabled:i,className:O(o,c,a&&"active",n&&`${c}-${n}`,r&&`${c}-${r}`,s.href&&i&&"disabled")})}));mt.displayName="Button";var vt=mt;const gt=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"card-body"),m(n,{ref:a,className:O(e,t),...r}))));gt.displayName="CardBody";var bt=gt;const yt=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"card-footer"),m(n,{ref:a,className:O(e,t),...r}))));yt.displayName="CardFooter";var Et=yt;const wt=e.createContext(null);wt.displayName="CardHeaderContext";var xt=wt;const Nt=e.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},a)=>{const i=I(e,"card-header"),s=o((()=>({cardHeaderBsPrefix:i})),[i]);return m(xt.Provider,{value:s,children:m(n,{ref:a,...r,className:O(t,i)})})}));Nt.displayName="CardHeader";var kt=Nt;const Ot=e.forwardRef((({bsPrefix:e,className:t,variant:n,as:r="img",...a},i)=>{const o=I(e,"card-img");return m(r,{ref:i,className:O(n?`${o}-${n}`:o,t),...a})}));Ot.displayName="CardImg";var Lt=Ot;const At=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"card-img-overlay"),m(n,{ref:a,className:O(e,t),...r}))));At.displayName="CardImgOverlay";var St=At;const jt=e.forwardRef((({className:e,bsPrefix:t,as:n="a",...r},a)=>(t=I(t,"card-link"),m(n,{ref:a,className:O(e,t),...r}))));jt.displayName="CardLink";var Mt=jt;const Ct=Xe("h6"),Tt=e.forwardRef((({className:e,bsPrefix:t,as:n=Ct,...r},a)=>(t=I(t,"card-subtitle"),m(n,{ref:a,className:O(e,t),...r}))));Tt.displayName="CardSubtitle";var _t=Tt;const Pt=e.forwardRef((({className:e,bsPrefix:t,as:n="p",...r},a)=>(t=I(t,"card-text"),m(n,{ref:a,className:O(e,t),...r}))));Pt.displayName="CardText";var Rt=Pt;const qt=Xe("h5"),It=e.forwardRef((({className:e,bsPrefix:t,as:n=qt,...r},a)=>(t=I(t,"card-title"),m(n,{ref:a,className:O(e,t),...r}))));It.displayName="CardTitle";var Dt=It;const Bt=e.forwardRef((({bsPrefix:e,className:t,bg:n,text:r,border:a,body:i=!1,children:o,as:s="div",...l},c)=>{const u=I(e,"card");return m(s,{ref:c,...l,className:O(t,u,n&&`bg-${n}`,r&&`text-${r}`,a&&`border-${a}`),children:i?m(bt,{children:o}):o})}));Bt.displayName="Card";var $t=Object.assign(Bt,{Img:Lt,Title:Dt,Subtitle:_t,Body:bt,Link:Mt,Text:Rt,Header:kt,Footer:Et,ImgOverlay:St});function Ht(e){const t=function(e){const t=n(e);return t.current=e,t}(e);s((()=>()=>t.current()),[])}const Ut=2**31-1;function Ft(e,t,n){const r=n-Date.now();e.current=r<=Ut?setTimeout(t,r):setTimeout((()=>Ft(e,t,n)),Ut)}function Vt(){const e=Qe(),t=n();return Ht((()=>clearTimeout(t.current))),o((()=>{const n=()=>clearTimeout(t.current);return{set:function(r,a=0){e()&&(n(),a<=Ut?t.current=setTimeout(r,a):Ft(t,r,Date.now()+a))},clear:n,handleRef:t}}),[])}const zt=e.forwardRef(((e,t)=>{const[{className:n,...r},{as:a="div",bsPrefix:i,spans:o}]=function({as:e,bsPrefix:t,className:n,...r}){t=I(t,"col");const a=D(),i=B(),o=[],s=[];return a.forEach((e=>{const n=r[e];let a,l,c;delete r[e],"object"==typeof n&&null!=n?({span:a,offset:l,order:c}=n):a=n;const u=e!==i?`-${e}`:"";a&&o.push(!0===a?`${t}${u}`:`${t}${u}-${a}`),null!=c&&s.push(`order${u}-${c}`),null!=l&&s.push(`offset${u}-${l}`)})),[{...r,className:O(n,...o,...s)},{as:e,bsPrefix:t,spans:o}]}(e);return m(a,{...r,ref:t,className:O(n,!o.length&&i)})}));zt.displayName="Col";var Wt=zt;const Kt=e.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...a},i)=>{const o=I(e,"container");return m(n,{ref:i,...a,className:O(r,t?`${o}${"string"==typeof t?`-${t}`:"-fluid"}`:o)})}));Kt.displayName="Container";var Zt=Kt,Gt=Function.prototype.bind.call(Function.prototype.call,[].slice);function Yt(e,t){return Gt(e.querySelectorAll(t))}function Xt(){const[,e]=c((e=>!e),!1);return e}var Jt=e.createContext(null),Qt=Object.prototype.hasOwnProperty;function en(e,t,n){for(n of e.keys())if(tn(n,t))return n}function tn(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&tn(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=en(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=en(t,a)))return!1;if(!tn(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(Qt.call(e,n)&&++r&&!Qt.call(t,n))return!1;if(!(n in t)||!tn(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}var nn="top",rn="bottom",an="right",on="left",sn="auto",ln=[nn,rn,an,on],cn="start",un="end",dn="clippingParents",hn="viewport",fn="popper",pn="reference",mn=ln.reduce((function(e,t){return e.concat([t+"-"+cn,t+"-"+un])}),[]),vn=[].concat(ln,[sn]).reduce((function(e,t){return e.concat([t,t+"-"+cn,t+"-"+un])}),[]),gn=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function bn(e){return e.split("-")[0]}function yn(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function En(e){return e instanceof yn(e).Element||e instanceof Element}function wn(e){return e instanceof yn(e).HTMLElement||e instanceof HTMLElement}function xn(e){return"undefined"!=typeof ShadowRoot&&(e instanceof yn(e).ShadowRoot||e instanceof ShadowRoot)}var Nn=Math.max,kn=Math.min,On=Math.round;function Ln(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function An(){return!/^((?!chrome|android).)*safari/i.test(Ln())}function Sn(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),a=1,i=1;t&&wn(e)&&(a=e.offsetWidth>0&&On(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&On(r.height)/e.offsetHeight||1);var o=(En(e)?yn(e):window).visualViewport,s=!An()&&n,l=(r.left+(s&&o?o.offsetLeft:0))/a,c=(r.top+(s&&o?o.offsetTop:0))/i,u=r.width/a,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function jn(e){var t=Sn(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Mn(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&xn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Cn(e){return e?(e.nodeName||"").toLowerCase():null}function Tn(e){return yn(e).getComputedStyle(e)}function _n(e){return["table","td","th"].indexOf(Cn(e))>=0}function Pn(e){return((En(e)?e.ownerDocument:e.document)||window.document).documentElement}function Rn(e){return"html"===Cn(e)?e:e.assignedSlot||e.parentNode||(xn(e)?e.host:null)||Pn(e)}function qn(e){return wn(e)&&"fixed"!==Tn(e).position?e.offsetParent:null}function In(e){for(var t=yn(e),n=qn(e);n&&_n(n)&&"static"===Tn(n).position;)n=qn(n);return n&&("html"===Cn(n)||"body"===Cn(n)&&"static"===Tn(n).position)?t:n||function(e){var t=/firefox/i.test(Ln());if(/Trident/i.test(Ln())&&wn(e)&&"fixed"===Tn(e).position)return null;var n=Rn(e);for(xn(n)&&(n=n.host);wn(n)&&["html","body"].indexOf(Cn(n))<0;){var r=Tn(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Dn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bn(e,t,n){return Nn(e,kn(t,n))}function $n(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Hn(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Un={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,a=e.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,s=bn(n.placement),l=Dn(s),c=[on,an].indexOf(s)>=0?"height":"width";if(i&&o){var u=function(e,t){return $n("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Hn(e,ln))}(a.padding,n),d=jn(i),h="y"===l?nn:on,f="y"===l?rn:an,p=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],m=o[l]-n.rects.reference[l],v=In(i),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=p/2-m/2,y=u[h],E=g-d[c]-u[f],w=g/2-d[c]/2+b,x=Bn(y,w,E),N=l;n.modifiersData[r]=((t={})[N]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Mn(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fn(e){return e.split("-")[1]}var Vn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function zn(e){var t,n=e.popper,r=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=o.x,f=void 0===h?0:h,p=o.y,m=void 0===p?0:p,v="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var g=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),y=on,E=nn,w=window;if(c){var x=In(n),N="clientHeight",k="clientWidth";if(x===yn(n)&&"static"!==Tn(x=Pn(n)).position&&"absolute"===s&&(N="scrollHeight",k="scrollWidth"),a===nn||(a===on||a===an)&&i===un)E=rn,m-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[N])-r.height,m*=l?1:-1;if(a===on||(a===nn||a===rn)&&i===un)y=an,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[k])-r.width,f*=l?1:-1}var O,L=Object.assign({position:s},c&&Vn),A=!0===u?function(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:On(n*a)/a||0,y:On(r*a)/a||0}}({x:f,y:m},yn(n)):{x:f,y:m};return f=A.x,m=A.y,l?Object.assign({},L,((O={})[E]=b?"0":"",O[y]=g?"0":"",O.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",O)):Object.assign({},L,((t={})[E]=b?m+"px":"",t[y]=g?f+"px":"",t.transform="",t))}var Wn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=void 0===r||r,i=n.adaptive,o=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:bn(t.placement),variation:Fn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,zn(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,zn(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Kn={passive:!0};var Zn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,i=void 0===a||a,o=r.resize,s=void 0===o||o,l=yn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Kn)})),s&&l.addEventListener("resize",n.update,Kn),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Kn)})),s&&l.removeEventListener("resize",n.update,Kn)}},data:{}},Gn={left:"right",right:"left",bottom:"top",top:"bottom"};function Yn(e){return e.replace(/left|right|bottom|top/g,(function(e){return Gn[e]}))}var Xn={start:"end",end:"start"};function Jn(e){return e.replace(/start|end/g,(function(e){return Xn[e]}))}function Qn(e){var t=yn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function er(e){return Sn(Pn(e)).left+Qn(e).scrollLeft}function tr(e){var t=Tn(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function nr(e){return["html","body","#document"].indexOf(Cn(e))>=0?e.ownerDocument.body:wn(e)&&tr(e)?e:nr(Rn(e))}function rr(e,t){var n;void 0===t&&(t=[]);var r=nr(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),i=yn(r),o=a?[i].concat(i.visualViewport||[],tr(r)?r:[]):r,s=t.concat(o);return a?s:s.concat(rr(Rn(o)))}function ar(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ir(e,t,n){return t===hn?ar(function(e,t){var n=yn(e),r=Pn(e),a=n.visualViewport,i=r.clientWidth,o=r.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;var c=An();(c||!c&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s+er(e),y:l}}(e,n)):En(t)?function(e,t){var n=Sn(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ar(function(e){var t,n=Pn(e),r=Qn(e),a=null==(t=e.ownerDocument)?void 0:t.body,i=Nn(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=Nn(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-r.scrollLeft+er(e),l=-r.scrollTop;return"rtl"===Tn(a||n).direction&&(s+=Nn(n.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}(Pn(e)))}function or(e,t,n,r){var a="clippingParents"===t?function(e){var t=rr(Rn(e)),n=["absolute","fixed"].indexOf(Tn(e).position)>=0&&wn(e)?In(e):e;return En(n)?t.filter((function(e){return En(e)&&Mn(e,n)&&"body"!==Cn(e)})):[]}(e):[].concat(t),i=[].concat(a,[n]),o=i[0],s=i.reduce((function(t,n){var a=ir(e,n,r);return t.top=Nn(a.top,t.top),t.right=kn(a.right,t.right),t.bottom=kn(a.bottom,t.bottom),t.left=Nn(a.left,t.left),t}),ir(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function sr(e){var t,n=e.reference,r=e.element,a=e.placement,i=a?bn(a):null,o=a?Fn(a):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case nn:t={x:s,y:n.y-r.height};break;case rn:t={x:s,y:n.y+n.height};break;case an:t={x:n.x+n.width,y:l};break;case on:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Dn(i):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case cn:t[c]=t[c]-(n[u]/2-r[u]/2);break;case un:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function lr(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,i=n.strategy,o=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?dn:s,c=n.rootBoundary,u=void 0===c?hn:c,d=n.elementContext,h=void 0===d?fn:d,f=n.altBoundary,p=void 0!==f&&f,m=n.padding,v=void 0===m?0:m,g=$n("number"!=typeof v?v:Hn(v,ln)),b=h===fn?pn:fn,y=e.rects.popper,E=e.elements[p?b:h],w=or(En(E)?E:E.contextElement||Pn(e.elements.popper),l,u,o),x=Sn(e.elements.reference),N=sr({reference:x,element:y,strategy:"absolute",placement:a}),k=ar(Object.assign({},y,N)),O=h===fn?k:x,L={top:w.top-O.top+g.top,bottom:O.bottom-w.bottom+g.bottom,left:w.left-O.left+g.left,right:O.right-w.right+g.right},A=e.modifiersData.offset;if(h===fn&&A){var S=A[a];Object.keys(L).forEach((function(e){var t=[an,rn].indexOf(e)>=0?1:-1,n=[nn,rn].indexOf(e)>=0?"y":"x";L[e]+=S[n]*t}))}return L}function cr(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?vn:l,u=Fn(r),d=u?s?mn:mn.filter((function(e){return Fn(e)===u})):ln,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=lr(e,{placement:n,boundary:a,rootBoundary:i,padding:o})[bn(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}var ur={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,i=void 0===a||a,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,v=t.options.placement,g=bn(v),b=l||(g===v||!p?[Yn(v)]:function(e){if(bn(e)===sn)return[];var t=Yn(e);return[Jn(e),t,Jn(t)]}(v)),y=[v].concat(b).reduce((function(e,n){return e.concat(bn(n)===sn?cr(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),E=t.rects.reference,w=t.rects.popper,x=new Map,N=!0,k=y[0],O=0;O=0,M=j?"width":"height",C=lr(t,{placement:L,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),T=j?S?an:on:S?rn:nn;E[M]>w[M]&&(T=Yn(T));var _=Yn(T),P=[];if(i&&P.push(C[A]<=0),s&&P.push(C[T]<=0,C[_]<=0),P.every((function(e){return e}))){k=L,N=!1;break}x.set(L,P)}if(N)for(var R=function(e){var t=y.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},q=p?3:1;q>0;q--){if("break"===R(q))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function dr(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function hr(e){return[nn,an,rn,on].some((function(t){return e[t]>=0}))}var fr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=lr(t,{elementContext:"reference"}),s=lr(t,{altBoundary:!0}),l=dr(o,r),c=dr(s,a,i),u=hr(l),d=hr(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var pr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.offset,i=void 0===a?[0,0]:a,o=vn.reduce((function(e,n){return e[n]=function(e,t,n){var r=bn(e),a=[on,nn].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[on,an].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,i),e}),{}),s=o[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}};var mr={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=sr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var vr={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,i=void 0===a||a,o=n.altAxis,s=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,m=void 0===p?0:p,v=lr(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=bn(t.placement),b=Fn(t.placement),y=!b,E=Dn(g),w="x"===E?"y":"x",x=t.modifiersData.popperOffsets,N=t.rects.reference,k=t.rects.popper,O="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,L="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(x){if(i){var j,M="y"===E?nn:on,C="y"===E?rn:an,T="y"===E?"height":"width",_=x[E],P=_+v[M],R=_-v[C],q=f?-k[T]/2:0,I=b===cn?N[T]:k[T],D=b===cn?-k[T]:-N[T],B=t.elements.arrow,$=f&&B?jn(B):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=H[M],F=H[C],V=Bn(0,N[T],$[T]),z=y?N[T]/2-q-V-U-L.mainAxis:I-V-U-L.mainAxis,W=y?-N[T]/2+q+V+F+L.mainAxis:D+V+F+L.mainAxis,K=t.elements.arrow&&In(t.elements.arrow),Z=K?"y"===E?K.clientTop||0:K.clientLeft||0:0,G=null!=(j=null==A?void 0:A[E])?j:0,Y=_+W-G,X=Bn(f?kn(P,_+z-G-Z):P,_,f?Nn(R,Y):R);x[E]=X,S[E]=X-_}if(s){var J,Q="x"===E?nn:on,ee="x"===E?rn:an,te=x[w],ne="y"===w?"height":"width",re=te+v[Q],ae=te-v[ee],ie=-1!==[nn,on].indexOf(g),oe=null!=(J=null==A?void 0:A[w])?J:0,se=ie?re:te-N[ne]-k[ne]-oe+L.altAxis,le=ie?te+N[ne]+k[ne]-oe-L.altAxis:ae,ce=f&&ie?function(e,t,n){var r=Bn(e,t,n);return r>n?n:r}(se,te,le):Bn(f?se:re,te,f?le:ae);x[w]=ce,S[w]=ce-te}t.modifiersData[r]=S}},requiresIfExists:["offset"]};function gr(e,t,n){void 0===n&&(n=!1);var r,a,i=wn(t),o=wn(t)&&function(e){var t=e.getBoundingClientRect(),n=On(t.width)/e.offsetWidth||1,r=On(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=Pn(t),l=Sn(e,o,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&(("body"!==Cn(t)||tr(s))&&(c=(r=t)!==yn(r)&&wn(r)?{scrollLeft:(a=r).scrollLeft,scrollTop:a.scrollTop}:Qn(r)),wn(t)?((u=Sn(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=er(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function br(e){var t=new Map,n=new Set,r=[];function a(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&a(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||a(e)})),r}var yr={placement:"bottom",modifiers:[],strategy:"absolute"};function Er(){for(var e=arguments.length,t=new Array(e),n=0;n{}},Or={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const e=(t.getAttribute("aria-describedby")||"").split(",").filter((e=>e.trim()!==n.id));e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,a=null==(t=n.getAttribute("role"))?void 0:t.toLowerCase();if(n.id&&"tooltip"===a&&"setAttribute"in r){const e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(n.id))return;r.setAttribute("aria-describedby",e?`${e},${n.id}`:n.id)}}},Lr=[];function Ar(e,t,i={}){let{enabled:l=!0,placement:c="bottom",strategy:u="absolute",modifiers:d=Lr}=i,h=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(i,Nr);const f=n(d),p=n(),m=a((()=>{var e;null==(e=p.current)||e.update()}),[]),v=a((()=>{var e;null==(e=p.current)||e.forceUpdate()}),[]),[g,b]=function(e){const t=Qe();return[e[0],a((n=>{if(t())return e[1](n)}),[t,e[1]])]}(r({placement:c,update:m,forceUpdate:v,attributes:{},styles:{popper:{},arrow:{}}})),y=o((()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{const t={},n={};Object.keys(e.elements).forEach((r=>{t[r]=e.styles[r],n[r]=e.attributes[r]})),b({state:e,styles:t,attributes:n,update:m,forceUpdate:v,placement:e.placement})}})),[m,v,b]),E=o((()=>(tn(f.current,d)||(f.current=d),f.current)),[d]);return s((()=>{p.current&&l&&p.current.setOptions({placement:c,strategy:u,modifiers:[...E,y,kr]})}),[u,c,y,l,E]),s((()=>{if(l&&null!=e&&null!=t)return p.current=xr(e,t,Object.assign({},h,{placement:c,strategy:u,modifiers:[...E,Or,y]})),()=>{null!=p.current&&(p.current.destroy(),p.current=void 0,b((e=>Object.assign({},e,{attributes:{},styles:{popper:{}}}))))}}),[l,e,t]),g}function Sr(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var jr=function(){};if("production"!==process.env.NODE_ENV){var Mr=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r2?r-2:0);for(var a=2;a{};const _r=e=>e&&("current"in e?e.current:e),Pr={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Rr(e,t=Tr,{disabled:r,clickTrigger:i="click"}={}){const o=n(!1),l=n(!1),c=a((t=>{const n=_r(e);var r;Cr(!!n,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),o.current=!n||!!((r=t).metaKey||r.altKey||r.ctrlKey||r.shiftKey)||!function(e){return 0===e.button}(t)||!!Sr(n,t.target)||l.current,l.current=!1}),[e]),u=Ye((t=>{const n=_r(e);n&&Sr(n,t.target)&&(l.current=!0)})),d=Ye((e=>{o.current||t(e)}));s((()=>{var t,n;if(r||null==e)return;const a=H(_r(e)),o=a.defaultView||window;let s=null!=(t=o.event)?t:null==(n=o.parent)?void 0:n.event,l=null;Pr[i]&&(l=Pe(a,Pr[i],u,!0));const h=Pe(a,i,c,!0),f=Pe(a,i,(e=>{e!==s?d(e):s=void 0}));let p=[];return"ontouchstart"in a.documentElement&&(p=[].slice.call(a.body.children).map((e=>Pe(e,"mousemove",Tr)))),()=>{null==l||l(),h(),f(),p.forEach((e=>e()))}}),[e,r,i,c,u,d])}function qr(e={}){return Array.isArray(e)?e:Object.keys(e).map((t=>(e[t].name=t,e[t])))}function Ir({enabled:e,enableEvents:t,placement:n,flip:r,offset:a,fixed:i,containerPadding:o,arrowElement:s,popperConfig:l={}}){var c,u,d,h,f;const p=function(e){const t={};return Array.isArray(e)?(null==e||e.forEach((e=>{t[e.name]=e})),t):e||t}(l.modifiers);return Object.assign({},l,{placement:n,enabled:e,strategy:i?"fixed":l.strategy,modifiers:qr(Object.assign({},p,{eventListeners:{enabled:t,options:null==(c=p.eventListeners)?void 0:c.options},preventOverflow:Object.assign({},p.preventOverflow,{options:o?Object.assign({padding:o},null==(u=p.preventOverflow)?void 0:u.options):null==(d=p.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:a},null==(h=p.offset)?void 0:h.options)},arrow:Object.assign({},p.arrow,{enabled:!!s,options:Object.assign({},null==(f=p.arrow)?void 0:f.options,{element:s})}),flip:Object.assign({enabled:!!r},p.flip)}))})}const Dr=["children"];const Br=()=>{};function $r(e={}){const t=i(Jt),[r,a]=Je(),o=n(!1),{flip:s,offset:l,rootCloseEvent:c,fixed:u=!1,placement:d,popperConfig:h={},enableEventListeners:f=!0,usePopper:p=!!t}=e,m=null==(null==t?void 0:t.show)?!!e.show:t.show;m&&!o.current&&(o.current=!0);const{placement:v,setMenu:g,menuElement:b,toggleElement:y}=t||{},E=Ar(y,b,Ir({placement:d||v||"bottom-start",enabled:p,enableEvents:null==f?m:f,offset:l,flip:s,fixed:u,arrowElement:r,popperConfig:h})),w=Object.assign({ref:g||Br,"aria-labelledby":null==y?void 0:y.id},E.attributes.popper,{style:E.styles.popper}),x={show:m,placement:v,hasShown:o.current,toggle:null==t?void 0:t.toggle,popper:p?E:null,arrowProps:p?Object.assign({ref:a},E.attributes.arrow,{style:E.styles.arrow}):{}};return Rr(b,(e=>{null==t||t.toggle(!1,e)}),{clickTrigger:c,disabled:!m}),[w,x]}function Hr(e){let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,Dr);const[r,a]=$r(n);return m(v,{children:t(r,a)})}Hr.displayName="DropdownMenu",Hr.defaultProps={usePopper:!0};const Ur={prefix:String(Math.round(1e10*Math.random())),current:0},Fr=t.createContext(Ur),Vr=t.createContext(!1);let zr=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),Wr=new WeakMap;const Kr="function"==typeof t.useId?function(e){let n=t.useId(),[a]=r("function"==typeof t.useSyncExternalStore?t.useSyncExternalStore(Yr,Zr,Gr):i(Vr)),o=a||"test"===process.env.NODE_ENV?"react-aria":`react-aria${Ur.prefix}`;return e||`${o}-${n}`}:function(e){let r=i(Fr);r!==Ur||zr||console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let a=function(e=!1){let r=i(Fr),a=n(null);if(null===a.current&&!e){var o,s;let e=null===(s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===s||null===(o=s.ReactCurrentOwner)||void 0===o?void 0:o.current;if(e){let t=Wr.get(e);null==t?Wr.set(e,{id:r.current,state:e.memoizedState}):e.memoizedState!==t.state&&(r.current=t.id,Wr.delete(e))}a.current=++r.current}return a.current}(!!e),o=r===Ur&&"test"===process.env.NODE_ENV?"react-aria":`react-aria${r.prefix}`;return e||`${o}-${a}`};function Zr(){return!1}function Gr(){return!0}function Yr(e){return()=>{}}const Xr=e=>{var t;return"menu"===(null==(t=e.getAttribute("role"))?void 0:t.toLowerCase())},Jr=()=>{};function Qr(){const e=Kr(),{show:t=!1,toggle:n=Jr,setToggle:r,menuElement:o}=i(Jt)||{},s=a((e=>{n(!t,e)}),[t,n]),l={id:e,ref:r||Jr,onClick:s,"aria-expanded":!!t};return o&&Xr(o)&&(l["aria-haspopup"]=!0),[l,{show:t,toggle:n}]}function ea({children:e}){const[t,n]=Qr();return m(v,{children:e(t,n)})}ea.displayName="DropdownToggle";const ta=e.createContext(null),na=(e,t=null)=>null!=e?String(e):t||null,ra=e.createContext(null);ra.displayName="NavContext";var aa=ra;const ia="data-rr-ui-";function oa(e){return`${ia}${e}`}const sa=["eventKey","disabled","onClick","active","as"];function la({key:e,href:t,active:n,disabled:r,onClick:a}){const o=i(ta),s=i(aa),{activeKey:l}=s||{},c=na(e,t),u=null==n&&null!=e?na(l)===c:n;return[{onClick:Ye((e=>{r||(null==a||a(e),o&&!e.isPropagationStopped()&&o(c,e))})),"aria-disabled":r||void 0,"aria-selected":u,[oa("dropdown-item")]:""},{isActive:u}]}const ca=e.forwardRef(((e,t)=>{let{eventKey:n,disabled:r,onClick:a,active:i,as:o=it}=e,s=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,sa);const[l]=la({key:n,href:s.href,disabled:r,onClick:a,active:i});return m(o,Object.assign({},s,{ref:t},l))}));ca.displayName="DropdownItem";const ua=u(je?window:void 0);function da(){return i(ua)}function ha(){const e=Xt(),t=n(null),r=a((n=>{t.current=n,e()}),[e]);return[t,r]}function fa({defaultShow:e,show:t,onSelect:l,onToggle:c,itemSelector:u=`* [${oa("dropdown-item")}]`,focusFirstItemOnShow:d,placement:h="bottom-start",children:f}){const p=da(),[v,g]=function(e,t,i){const o=n(void 0!==e),[s,l]=r(t),c=void 0!==e,u=o.current;return o.current=c,!c&&u&&s!==t&&l(t),[c?e:s,a(((...e)=>{const[t,...n]=e;let r=null==i?void 0:i(t,...n);return l(t),r}),[i])]}(t,e,c),[b,y]=ha(),E=b.current,[w,x]=ha(),N=w.current,k=et(v),O=n(null),L=n(!1),A=i(ta),S=a(((e,t,n=(null==t?void 0:t.type))=>{g(e,{originalEvent:t,source:n})}),[g]),j=Ye(((e,t)=>{null==l||l(e,t),S(!1,t,"select"),t.isPropagationStopped()||null==A||A(e,t)})),M=o((()=>({toggle:S,placement:h,show:v,menuElement:E,toggleElement:N,setMenu:y,setToggle:x})),[S,h,v,E,N,y,x]);E&&k&&!v&&(L.current=E.contains(E.ownerDocument.activeElement));const C=Ye((()=>{N&&N.focus&&N.focus()})),T=Ye((()=>{const e=O.current;let t=d;if(null==t&&(t=!(!b.current||!Xr(b.current))&&"keyboard"),!1===t||"keyboard"===t&&!/^key.+$/.test(e))return;const n=Yt(b.current,u)[0];n&&n.focus&&n.focus()}));s((()=>{v?T():L.current&&(L.current=!1,C())}),[v,L,C,T]),s((()=>{O.current=null}));const _=(e,t)=>{if(!b.current)return null;const n=Yt(b.current,u);let r=n.indexOf(e)+t;return r=Math.max(0,Math.min(r,n.length)),n[r]};return function(e,t,n,r=!1){const a=Ye(n);s((()=>{const n="function"==typeof e?e():e;return n.addEventListener(t,a,r),()=>n.removeEventListener(t,a,r)}),[e])}(a((()=>p.document),[p]),"keydown",(e=>{var t,n;const{key:r}=e,a=e.target,i=null==(t=b.current)?void 0:t.contains(a),o=null==(n=w.current)?void 0:n.contains(a);if(/input|textarea/i.test(a.tagName)&&(" "===r||"Escape"!==r&&i||"Escape"===r&&"search"===a.type))return;if(!i&&!o)return;if(!("Tab"!==r||b.current&&v))return;O.current=e.type;const s={originalEvent:e,source:e.type};switch(r){case"ArrowUp":{const t=_(a,-1);return t&&t.focus&&t.focus(),void e.preventDefault()}case"ArrowDown":if(e.preventDefault(),v){const e=_(a,1);e&&e.focus&&e.focus()}else g(!0,s);return;case"Tab":_e(a.ownerDocument,"keyup",(e=>{var t;("Tab"!==e.key||e.target)&&null!=(t=b.current)&&t.contains(e.target)||g(!1,s)}),{once:!0});break;case"Escape":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),g(!1,s)}})),m(ta.Provider,{value:j,children:m(Jt.Provider,{value:M,children:f})})}ua.Provider,fa.displayName="Dropdown",fa.Menu=Hr,fa.Toggle=ea,fa.Item=ca;const pa=e.createContext({});pa.displayName="DropdownContext";var ma=pa;const va=e.forwardRef((({className:e,bsPrefix:t,as:n="hr",role:r="separator",...a},i)=>(t=I(t,"dropdown-divider"),m(n,{ref:i,className:O(e,t),role:r,...a}))));va.displayName="DropdownDivider";var ga=va;const ba=e.forwardRef((({className:e,bsPrefix:t,as:n="div",role:r="heading",...a},i)=>(t=I(t,"dropdown-header"),m(n,{ref:i,className:O(e,t),role:r,...a}))));ba.displayName="DropdownHeader";var ya=ba;const Ea=e.forwardRef((({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:a,active:i,as:o=lt,...s},l)=>{const c=I(e,"dropdown-item"),[u,d]=la({key:n,href:s.href,disabled:r,onClick:a,active:i});return m(o,{...s,...u,ref:l,className:O(t,c,d.isActive&&"active",r&&"disabled")})}));Ea.displayName="DropdownItem";var wa=Ea;const xa=e.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=I(t,"dropdown-item-text"),m(n,{ref:a,className:O(e,t),...r}))));xa.displayName="DropdownItemText";var Na=xa;const ka=e.createContext(null);ka.displayName="InputGroupContext";var Oa=ka;const La=e.createContext(null);La.displayName="NavbarContext";var Aa=La;function Sa(e,t){if("production"===process.env.NODE_ENV)return e;return Ue(a((e=>{null!=e&&e.isReactComponent&&("production"!==process.env.NODE_ENV?M(!1,`${t} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`):M(!1))}),[t]),e)}function ja(e,t,n){let r=e?n?"bottom-start":"bottom-end":n?"bottom-end":"bottom-start";return"up"===t?r=e?n?"top-start":"top-end":n?"top-end":"top-start":"end"===t?r=e?n?"left-end":"right-end":n?"left-start":"right-start":"start"===t?r=e?n?"right-end":"left-end":n?"right-start":"left-start":"down-centered"===t?r="bottom":"up-centered"===t&&(r="top"),r}const Ma=e.forwardRef((({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:a=!0,show:o,renderOnMount:s,as:l="div",popperConfig:c,variant:u,...d},h)=>{let f=!1;const p=i(Aa),v=I(e,"dropdown-menu"),{align:g,drop:b,isRTL:y}=i(ma);n=n||g;const E=i(Oa),w=[];if(n)if("object"==typeof n){const e=Object.keys(n);if("production"!==process.env.NODE_ENV&&Cr(1===e.length,"There should only be 1 breakpoint when passing an object to `align`"),e.length){const t=e[0],r=n[t];f="start"===r,w.push(`${v}-${t}-${r}`)}}else"end"===n&&(f=!0);const x=ja(f,b,y),[N,{hasShown:k,popper:L,show:A,toggle:S}]=$r({flip:a,rootCloseEvent:r,show:o,usePopper:!p&&0===w.length,offset:[0,2],popperConfig:c,placement:x});if(N.ref=Ue(Sa(h,"DropdownMenu"),N.ref),nt((()=>{A&&(null==L||L.update())}),[A]),!k&&!s&&!E)return null;"string"!=typeof l&&(N.show=A,N.close=()=>null==S?void 0:S(!1),N.align=n);let j=d.style;return null!=L&&L.placement&&(j={...d.style,...N.style},d["x-placement"]=L.placement),m(l,{...d,...N,style:j,...(w.length||p)&&{"data-bs-popper":"static"},className:O(t,v,A&&"show",f&&`${v}-end`,u&&`${v}-${u}`,...w)})}));Ma.displayName="DropdownMenu";var Ca=Ma;const Ta=e.forwardRef((({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:a=vt,...o},s)=>{const l=I(e,"dropdown-toggle"),c=i(Jt);void 0!==r&&(o.bsPrefix=r);const[u]=Qr();return u.ref=Ue(u.ref,Sa(s,"DropdownToggle")),m(a,{className:O(n,l,t&&`${l}-split`,(null==c?void 0:c.show)&&"show"),...u,...o})}));Ta.displayName="DropdownToggle";var _a=Ta;const Pa=e.forwardRef(((e,t)=>{const{bsPrefix:n,drop:r="down",show:a,className:s,align:l="start",onSelect:c,onToggle:u,focusFirstItemOnShow:d,as:h="div",navbar:f,autoClose:p=!0,...v}=P(e,{show:"onToggle"}),g=i(Oa),b=I(n,"dropdown"),y=$(),E=Ye(((e,t)=>{var n,r;var a;(null==(n=t.originalEvent)||null==(r=n.target)?void 0:r.classList.contains("dropdown-toggle"))&&"mousedown"===t.source||(t.originalEvent.currentTarget!==document||"keydown"===t.source&&"Escape"!==t.originalEvent.key||(t.source="rootClose"),a=t.source,(!1===p?"click"===a:"inside"===p?"rootClose"!==a:"outside"!==p||"select"!==a)&&(null==u||u(e,t)))})),w=ja("end"===l,r,y),x=o((()=>({align:l,drop:r,isRTL:y})),[l,r,y]),N={down:b,"down-centered":`${b}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return m(ma.Provider,{value:x,children:m(fa,{placement:w,show:a,onSelect:c,onToggle:E,focusFirstItemOnShow:d,itemSelector:`.${b}-item:not(.disabled):not(:disabled)`,children:g?v.children:m(h,{...v,ref:t,className:O(s,a&&"show",N[r])})})})}));Pa.displayName="Dropdown";var Ra=Object.assign(Pa,{Toggle:_a,Menu:Ca,Item:wa,ItemText:Na,Divider:ga,Header:ya});const qa={type:be.string,tooltip:be.bool,as:be.elementType},Ia=e.forwardRef((({as:e="div",className:t,type:n="valid",tooltip:r=!1,...a},i)=>m(e,{...a,ref:i,className:O(t,`${n}-${r?"tooltip":"feedback"}`)})));Ia.displayName="Feedback",Ia.propTypes=qa;var Da=Ia;var Ba=e.createContext({});const $a=e.forwardRef((({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:a=!1,isInvalid:o=!1,as:s="input",...l},c)=>{const{controlId:u}=i(Ba);return t=I(t,"form-check-input"),m(s,{...l,ref:c,type:r,id:e||u,className:O(n,t,a&&"is-valid",o&&"is-invalid")})}));$a.displayName="FormCheckInput";var Ha=$a;const Ua=e.forwardRef((({bsPrefix:e,className:t,htmlFor:n,...r},a)=>{const{controlId:o}=i(Ba);return e=I(e,"form-check-label"),m("label",{...r,ref:a,htmlFor:n||o,className:O(t,e)})}));Ua.displayName="FormCheckLabel";var Fa=Ua;const Va=e.forwardRef((({id:t,bsPrefix:n,bsSwitchPrefix:r,inline:a=!1,reverse:s=!1,disabled:l=!1,isValid:c=!1,isInvalid:u=!1,feedbackTooltip:d=!1,feedback:h,feedbackType:f,className:p,style:b,title:y="",type:E="checkbox",label:w,children:x,as:N="input",...k},L)=>{n=I(n,"form-check"),r=I(r,"form-switch");const{controlId:A}=i(Ba),S=o((()=>({controlId:t||A})),[A,t]),j=!x&&null!=w&&!1!==w||function(t,n){return e.Children.toArray(t).some((t=>e.isValidElement(t)&&t.type===n))}(x,Fa),M=m(Ha,{...k,type:"switch"===E?"checkbox":E,ref:L,isValid:c,isInvalid:u,disabled:l,as:N});return m(Ba.Provider,{value:S,children:m("div",{style:b,className:O(p,j&&n,a&&`${n}-inline`,s&&`${n}-reverse`,"switch"===E&&r),children:x||g(v,{children:[M,j&&m(Fa,{title:y,children:w}),h&&m(Da,{type:f,tooltip:d,children:h})]})})})}));Va.displayName="FormCheck";var za=Object.assign(Va,{Input:Ha,Label:Fa});const Wa=e.forwardRef((({bsPrefix:e,type:t,size:n,htmlSize:r,id:a,className:o,isValid:s=!1,isInvalid:l=!1,plaintext:c,readOnly:u,as:d="input",...h},f)=>{const{controlId:p}=i(Ba);return e=I(e,"form-control"),"production"!==process.env.NODE_ENV&&Cr(null==p||!a,"`controlId` is ignored on `` when `id` is specified."),m(d,{...h,type:t,size:r,ref:f,readOnly:u,id:a||p,className:O(o,c?`${e}-plaintext`:e,n&&`${e}-${n}`,"color"===t&&`${e}-color`,s&&"is-valid",l&&"is-invalid")})}));Wa.displayName="FormControl";var Ka=Object.assign(Wa,{Feedback:Da});const Za=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"form-floating"),m(n,{ref:a,className:O(e,t),...r}))));Za.displayName="FormFloating";var Ga=Za;const Ya=e.forwardRef((({controlId:e,as:t="div",...n},r)=>{const a=o((()=>({controlId:e})),[e]);return m(Ba.Provider,{value:a,children:m(t,{...n,ref:r})})}));Ya.displayName="FormGroup";var Xa=Ya;const Ja=e.forwardRef((({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:a,htmlFor:o,...s},l)=>{const{controlId:c}=i(Ba);t=I(t,"form-label");let u="col-form-label";"string"==typeof n&&(u=`${u} ${u}-${n}`);const d=O(a,t,r&&"visually-hidden",n&&u);return"production"!==process.env.NODE_ENV&&Cr(null==c||!o,"`controlId` is ignored on `` when `htmlFor` is specified."),o=o||c,n?m(Wt,{ref:l,as:"label",className:d,htmlFor:o,...s}):m(e,{ref:l,className:d,htmlFor:o,...s})}));Ja.displayName="FormLabel";var Qa=Ja;const ei=e.forwardRef((({bsPrefix:e,className:t,id:n,...r},a)=>{const{controlId:o}=i(Ba);return e=I(e,"form-range"),m("input",{...r,type:"range",ref:a,className:O(t,e),id:n||o})}));ei.displayName="FormRange";var ti=ei;const ni=e.forwardRef((({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:a=!1,isInvalid:o=!1,id:s,...l},c)=>{const{controlId:u}=i(Ba);return e=I(e,"form-select"),m("select",{...l,size:n,ref:c,className:O(r,e,t&&`${e}-${t}`,a&&"is-valid",o&&"is-invalid"),id:s||u})}));ni.displayName="FormSelect";var ri=ni;const ai=e.forwardRef((({bsPrefix:e,className:t,as:n="small",muted:r,...a},i)=>(e=I(e,"form-text"),m(n,{...a,ref:i,className:O(t,e,r&&"text-muted")}))));ai.displayName="FormText";var ii=ai;const oi=e.forwardRef(((e,t)=>m(za,{...e,ref:t,type:"switch"})));oi.displayName="Switch";var si=Object.assign(oi,{Input:za.Input,Label:za.Label});const li=e.forwardRef((({bsPrefix:e,className:t,children:n,controlId:r,label:a,...i},o)=>(e=I(e,"form-floating"),g(Xa,{ref:o,className:O(t,e),controlId:r,...i,children:[n,m("label",{htmlFor:r,children:a})]}))));li.displayName="FloatingLabel";var ci=li;const ui={_ref:be.any,validated:be.bool,as:be.elementType},di=e.forwardRef((({className:e,validated:t,as:n="form",...r},a)=>m(n,{...r,ref:a,className:O(e,t&&"was-validated")})));di.displayName="Form",di.propTypes=ui;var hi=Object.assign(di,{Group:Xa,Control:Ka,Floating:Ga,Check:za,Switch:si,Label:Qa,Text:ii,Range:ti,Select:ri,FloatingLabel:ci});const fi=e.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=I(t,"input-group-text"),m(n,{ref:a,className:O(e,t),...r}))));fi.displayName="InputGroupText";var pi=fi;const mi=e.forwardRef((({bsPrefix:e,size:t,hasValidation:n,className:r,as:a="div",...i},s)=>{e=I(e,"input-group");const l=o((()=>({})),[]);return m(Oa.Provider,{value:l,children:m(a,{ref:s,...i,className:O(r,e,t&&`${e}-${t}`,n&&"has-validation")})})}));mi.displayName="InputGroup";var vi=Object.assign(mi,{Text:pi,Radio:e=>m(pi,{children:m(Ha,{type:"radio",...e})}),Checkbox:e=>m(pi,{children:m(Ha,{type:"checkbox",...e})})});var gi=e.createContext(null);const bi=["as","active","eventKey"];function yi({key:e,onClick:t,active:n,id:r,role:a,disabled:o}){const s=i(ta),l=i(aa),c=i(gi);let u=n;const d={role:a};if(l){a||"tablist"!==l.role||(d.role="tab");const t=l.getControllerId(null!=e?e:null),i=l.getControlledId(null!=e?e:null);d[oa("event-key")]=e,d.id=t||r,u=null==n&&null!=e?l.activeKey===e:n,!u&&(null!=c&&c.unmountOnExit||null!=c&&c.mountOnEnter)||(d["aria-controls"]=i)}return"tab"===d.role&&(d["aria-selected"]=u,u||(d.tabIndex=-1),o&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=Ye((n=>{o||(null==t||t(n),null!=e&&s&&!n.isPropagationStopped()&&s(e,n))})),[d,{isActive:u}]}const Ei=e.forwardRef(((e,t)=>{let{as:n=it,active:r,eventKey:a}=e,i=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,bi);const[o,s]=yi(Object.assign({key:na(a,i.href),active:r},i));return o[oa("active")]=s.isActive,m(n,Object.assign({},i,o,{ref:t}))}));Ei.displayName="NavItem";var wi=Ei;const xi=["as","onSelect","activeKey","role","onKeyDown"];const Ni=()=>{},ki=oa("event-key"),Oi=e.forwardRef(((e,t)=>{let{as:r="div",onSelect:a,activeKey:o,role:l,onKeyDown:c}=e,u=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,xi);const d=Xt(),h=n(!1),f=i(ta),p=i(gi);let v,g;p&&(l=l||"tablist",o=p.activeKey,v=p.getControlledId,g=p.getControllerId);const b=n(null),y=e=>{const t=b.current;if(!t)return null;const n=Yt(t,`[${ki}]:not([aria-disabled=true])`),r=t.querySelector("[aria-selected=true]");if(!r||r!==document.activeElement)return null;const a=n.indexOf(r);if(-1===a)return null;let i=a+e;return i>=n.length&&(i=0),i<0&&(i=n.length-1),n[i]},E=(e,t)=>{null!=e&&(null==a||a(e,t),null==f||f(e,t))};s((()=>{if(b.current&&h.current){const e=b.current.querySelector(`[${ki}][aria-selected=true]`);null==e||e.focus()}h.current=!1}));const w=Ue(t,b);return m(ta.Provider,{value:E,children:m(aa.Provider,{value:{role:l,activeKey:na(o),getControlledId:v||Ni,getControllerId:g||Ni},children:m(r,Object.assign({},u,{onKeyDown:e=>{if(null==c||c(e),!p)return;let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=y(-1);break;case"ArrowRight":case"ArrowDown":t=y(1);break;default:return}var n;t&&(e.preventDefault(),E(t.dataset[(n="EventKey",`rrUi${n}`)]||null,e),h.current=!0,d())},ref:w,role:l}))})})}));Oi.displayName="Nav";var Li=Object.assign(Oi,{Item:wi});function Ai(e){void 0===e&&(e=H());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}const Si=oa("modal-open");var ji=class{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}={}){this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(K(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(Si,""),K(r,t)}reset(){[...this.modals].forEach((e=>this.remove(e)))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(Si),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t?t:(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),t)}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}};const Mi=(e,t)=>je?null==e?(t||H()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Ci(e,t){const n=da(),[a,i]=r((()=>Mi(e,null==n?void 0:n.document)));if(!a){const t=Mi(e);t&&i(t)}return s((()=>{t&&a&&t(a)}),[t,a]),s((()=>{const t=Mi(e);t!==a&&i(t)}),[e,a]),a}function Ti({children:e,in:t,onExited:r,mountOnEnter:a,unmountOnExit:i}){const o=n(null),l=n(t),c=Ye(r);s((()=>{t?l.current=!0:c(o.current)}),[t,c]);const u=Ue(o,e.ref),h=d(e,{ref:u});return t?h:i||!l.current&&a?null:h}function _i({children:e,in:t,onExited:a,onEntered:i,transition:o}){const[s,l]=r(!t);t&&s&&l(!1);const c=function({in:e,onTransition:t}){const r=n(null),a=n(!0),i=Ye(t);return nt((()=>{if(!r.current)return;let t=!1;return i({in:e,element:r.current,initial:a.current,isStale:()=>t}),()=>{t=!0}}),[e,i]),nt((()=>(a.current=!1,()=>{a.current=!0})),[]),r}({in:!!t,onTransition:e=>{Promise.resolve(o(e)).then((()=>{e.isStale()||(e.in?null==i||i(e.element,e.initial):(l(!0),null==a||a(e.element)))}),(t=>{throw e.in||l(!0),t}))}}),u=Ue(c,e.ref);return s&&!t?null:d(e,{ref:u})}function Pi(e,t,n){return e?m(e,Object.assign({},n)):t?m(_i,Object.assign({},n,{transition:t})):m(Ti,Object.assign({},n))}function Ri(e){return"Escape"===e.code||27===e.keyCode}const qi=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let Ii;function Di(e){const t=da(),r=e||function(e){return Ii||(Ii=new ji({ownerDocument:null==e?void 0:e.document})),Ii}(t),i=n({dialog:null,backdrop:null});return Object.assign(i.current,{add:()=>r.add(i.current),remove:()=>r.remove(i.current),isTopModal:()=>r.isTopModal(i.current),setDialogRef:a((e=>{i.current.dialog=e}),[]),setBackdropRef:a((e=>{i.current.backdrop=e}),[])})}const Bi=h(((t,a)=>{let{show:i=!1,role:o="dialog",className:l,style:c,children:u,backdrop:d=!0,keyboard:h=!0,onBackdropClick:p,onEscapeKeyDown:b,transition:E,runTransition:w,backdropTransition:x,runBackdropTransition:N,autoFocus:k=!0,enforceFocus:O=!0,restoreFocus:L=!0,restoreFocusOptions:A,renderDialog:S,renderBackdrop:j=(e=>m("div",Object.assign({},e))),manager:M,container:C,onShow:T,onHide:_=(()=>{}),onExit:P,onExited:R,onExiting:q,onEnter:I,onEntering:D,onEntered:B}=t,$=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(t,qi);const H=da(),U=Ci(C),F=Di(M),V=Qe(),z=et(i),[W,K]=r(!i),Z=n(null);f(a,(()=>F),[F]),je&&!z&&i&&(Z.current=Ai(null==H?void 0:H.document)),i&&W&&K(!1);const G=Ye((()=>{if(F.add(),te.current=Pe(document,"keydown",Q),ee.current=Pe(document,"focus",(()=>setTimeout(X)),!0),T&&T(),k){var e,t;const n=Ai(null!=(e=null==(t=F.dialog)?void 0:t.ownerDocument)?e:null==H?void 0:H.document);F.dialog&&n&&!Sr(F.dialog,n)&&(Z.current=n,F.dialog.focus())}})),Y=Ye((()=>{var e;(F.remove(),null==te.current||te.current(),null==ee.current||ee.current(),L)&&(null==(e=Z.current)||null==e.focus||e.focus(A),Z.current=null)}));s((()=>{i&&U&&G()}),[i,U,G]),s((()=>{W&&Y()}),[W,Y]),Ht((()=>{Y()}));const X=Ye((()=>{if(!O||!V()||!F.isTopModal())return;const e=Ai(null==H?void 0:H.document);F.dialog&&e&&!Sr(F.dialog,e)&&F.dialog.focus()})),J=Ye((e=>{e.target===e.currentTarget&&(null==p||p(e),!0===d&&_())})),Q=Ye((e=>{h&&Ri(e)&&F.isTopModal()&&(null==b||b(e),e.defaultPrevented||_())})),ee=n(),te=n();if(!U)return null;const ne=Object.assign({role:o,ref:F.setDialogRef,"aria-modal":"dialog"===o||void 0},$,{style:c,className:l,tabIndex:-1});let re=S?S(ne):m("div",Object.assign({},ne,{children:e.cloneElement(u,{role:"document"})}));re=Pi(E,w,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!i,onExit:P,onExiting:q,onExited:(...e)=>{K(!0),null==R||R(...e)},onEnter:I,onEntering:D,onEntered:B,children:re});let ae=null;return d&&(ae=j({ref:F.setBackdropRef,onClick:J}),ae=Pi(x,N,{in:!!i,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ae})),m(v,{children:y.createPortal(g(v,{children:[ae,re]}),U)})}));Bi.displayName="Modal";var $i=Object.assign(Bi,{Manager:ji});function Hi(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}function Ui(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Fi=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Vi=".sticky-top",zi=".navbar-toggler";class Wi extends ji{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,K(t,{[e]:`${parseFloat(K(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],K(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();var n,r;if(r="modal-open",(n=t).classList?n.classList.add(r):Hi(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)),!e.scrollBarWidth)return;const a=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Yt(t,Fi).forEach((t=>this.adjustAndStore(a,t,e.scrollBarWidth))),Yt(t,Vi).forEach((t=>this.adjustAndStore(i,t,-e.scrollBarWidth))),Yt(t,zi).forEach((t=>this.adjustAndStore(i,t,e.scrollBarWidth)))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();var n,r;r="modal-open",(n=t).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Ui(n.className,r):n.setAttribute("class",Ui(n.className&&n.className.baseVal||"",r));const a=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Yt(t,Fi).forEach((e=>this.restore(a,e))),Yt(t,Vi).forEach((e=>this.restore(i,e))),Yt(t,zi).forEach((e=>this.restore(i,e)))}}let Ki;var Zi=Wi;var Gi=e.createContext({onHide(){}});const Yi=e.forwardRef((({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:a,...o},s)=>{const l=i(Gi),c=Ye((()=>{null==l||l.onHide(),null==r||r()}));return g("div",{ref:s,...o,children:[a,n&&m(pt,{"aria-label":e,variant:t,onClick:c})]})}));var Xi=Yi,Ji={exports:{}},Qi={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,a,i,o){var s=a||"<>",l=o||r;if(null==n[r])return t?new Error("Required "+i+" `"+l+"` was not specified in `"+s+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),d=6;d(t=I(t,"nav-item"),m(n,{ref:a,className:O(e,t),...r}))));to.displayName="NavItem";var no=to;const ro=e.forwardRef((({bsPrefix:e,className:t,as:n=lt,active:r,eventKey:a,disabled:i=!1,...o},s)=>{e=I(e,"nav-link");const[l,c]=yi({key:na(a,o.href),active:r,disabled:i,...o});return m(n,{...o,...l,ref:s,disabled:i,className:O(t,e,i&&"disabled",c.isActive&&"active")})}));ro.displayName="NavLink";var ao=ro;const io=e.forwardRef(((e,t)=>{const{as:n="div",bsPrefix:r,variant:a,fill:o=!1,justify:s=!1,navbar:l,navbarScroll:c,className:u,activeKey:d,...h}=P(e,{activeKey:"onSelect"}),f=I(r,"nav");let p,v,g=!1;const b=i(Aa),y=i(xt);return b?(p=b.bsPrefix,g=null==l||l):y&&({cardHeaderBsPrefix:v}=y),m(Li,{as:n,ref:t,activeKey:d,className:O(u,{[f]:!g,[`${p}-nav`]:g,[`${p}-nav-scroll`]:g&&c,[`${v}-${a}`]:!!v,[`${f}-${a}`]:!!a,[`${f}-fill`]:o,[`${f}-justified`]:s}),...h})}));io.displayName="Nav";var oo=Object.assign(io,{Item:no,Link:ao});const so=e.forwardRef((({bsPrefix:e,className:t,as:n,...r},a)=>{e=I(e,"navbar-brand");const i=n||(r.href?"a":"span");return m(i,{...r,ref:a,className:O(t,e)})}));so.displayName="NavbarBrand";var lo=so;const co=e.forwardRef((({children:e,bsPrefix:t,...n},r)=>{t=I(t,"navbar-collapse");const a=i(Aa);return m(Ge,{in:!(!a||!a.expanded),...n,children:m("div",{ref:r,className:t,children:e})})}));co.displayName="NavbarCollapse";var uo=co;const ho=e.forwardRef((({bsPrefix:e,className:t,children:n,label:r="Toggle navigation",as:a="button",onClick:o,...s},l)=>{e=I(e,"navbar-toggler");const{onToggle:c,expanded:u}=i(Aa)||{},d=Ye((e=>{o&&o(e),c&&c()}));return"button"===a&&(s.type="button"),m(a,{...s,ref:l,onClick:d,"aria-label":r,className:O(t,e,!u&&"collapsed"),children:n||m("span",{className:`${e}-icon`})})}));ho.displayName="NavbarToggle";var fo=ho;const po=new WeakMap,mo=(e,t)=>{if(!e||!t)return;const n=po.get(t)||new Map;po.set(t,n);let r=n.get(e);return r||(r=t.matchMedia(e),r.refCount=0,n.set(r.media,r)),r};function vo(e,t=("undefined"==typeof window?void 0:window)){const n=mo(e,t),[a,i]=r((()=>!!n&&n.matches));return nt((()=>{let n=mo(e,t);if(!n)return i(!1);let r=po.get(t);const a=()=>{i(n.matches)};return n.refCount++,n.addListener(a),a(),()=>{n.removeListener(a),n.refCount--,n.refCount<=0&&(null==r||r.delete(n.media)),n=void 0}}),[e]),a}const go=function(e){const t=Object.keys(e);function n(e,t){return e===t?t:e?`${e} and ${t}`:t}function r(n){const r=function(e){return t[Math.min(t.indexOf(e)+1,t.length-1)]}(n);let a=e[r];return a="number"==typeof a?a-.2+"px":`calc(${a} - 0.2px)`,`(max-width: ${a})`}return function(t,a,i){let s;return"object"==typeof t?(s=t,i=a,a=!0):s={[t]:a=a||!0},vo(o((()=>Object.entries(s).reduce(((t,[a,i])=>("up"!==i&&!0!==i||(t=n(t,function(t){let n=e[t];return"number"==typeof n&&(n=`${n}px`),`(min-width: ${n})`}(a))),"down"!==i&&!0!==i||(t=n(t,r(a))),t)),"")),[JSON.stringify(s)]),i)}}({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400}),bo=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"offcanvas-body"),m(n,{ref:a,className:O(e,t),...r}))));bo.displayName="OffcanvasBody";var yo=bo;const Eo={[ke]:"show",[Oe]:"show"},wo=e.forwardRef((({bsPrefix:t,className:n,children:r,in:a=!1,mountOnEnter:i=!1,unmountOnExit:o=!1,appear:s=!1,...l},c)=>(t=I(t,"offcanvas"),m(ze,{ref:c,addEndListener:De,in:a,mountOnEnter:i,unmountOnExit:o,appear:s,...l,childRef:r.ref,children:(a,i)=>e.cloneElement(r,{...i,className:O(n,r.props.className,(a===ke||a===Le)&&`${t}-toggling`,Eo[a])})}))));wo.displayName="OffcanvasToggling";var xo=wo;const No=e.forwardRef((({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...a},i)=>(e=I(e,"offcanvas-header"),m(Xi,{ref:i,...a,className:O(t,e),closeLabel:n,closeButton:r}))));No.displayName="OffcanvasHeader";var ko=No;const Oo=Xe("h5"),Lo=e.forwardRef((({className:e,bsPrefix:t,as:n=Oo,...r},a)=>(t=I(t,"offcanvas-title"),m(n,{ref:a,className:O(e,t),...r}))));Lo.displayName="OffcanvasTitle";var Ao=Lo;function So(e){return m(xo,{...e})}function jo(e){return m(dt,{...e})}const Mo=e.forwardRef((({bsPrefix:e,className:t,children:l,"aria-labelledby":c,placement:u="start",responsive:d,show:h=!1,backdrop:f=!0,keyboard:p=!0,scroll:b=!1,onEscapeKeyDown:y,onShow:E,onHide:w,container:x,autoFocus:N=!0,enforceFocus:k=!0,restoreFocus:L=!0,restoreFocusOptions:A,onEntered:S,onExit:j,onExiting:M,onEnter:C,onEntering:T,onExited:_,backdropClassName:P,manager:R,renderStaticNode:q=!1,...D},B)=>{const $=n();e=I(e,"offcanvas");const{onToggle:H}=i(Aa)||{},[U,F]=r(!1),V=go(d||"xs","up");s((()=>{F(d?h&&!V:h)}),[h,d,V]);const z=Ye((()=>{null==H||H(),null==w||w()})),W=o((()=>({onHide:z})),[z]);const K=a((t=>m("div",{...t,className:O(`${e}-backdrop`,P)})),[P,e]),Z=n=>m("div",{...n,...D,className:O(t,d?`${e}-${d}`:e,`${e}-${u}`),"aria-labelledby":c,children:l});return g(v,{children:[!U&&(d||q)&&Z({}),m(Gi.Provider,{value:W,children:m($i,{show:U,ref:B,backdrop:f,container:x,keyboard:p,autoFocus:N,enforceFocus:k&&!b,restoreFocus:L,restoreFocusOptions:A,onEscapeKeyDown:y,onShow:E,onHide:z,onEnter:(e,...t)=>{e&&(e.style.visibility="visible"),null==C||C(e,...t)},onEntering:T,onEntered:S,onExit:j,onExiting:M,onExited:(e,...t)=>{e&&(e.style.visibility=""),null==_||_(...t)},manager:R||(b?($.current||($.current=new Zi({handleContainerOverflow:!1})),$.current):function(e){return Ki||(Ki=new Wi(e)),Ki}()),transition:So,backdropTransition:jo,renderBackdrop:K,renderDialog:Z})})]})}));Mo.displayName="Offcanvas";var Co=Object.assign(Mo,{Body:yo,Header:ko,Title:Ao});const To=e.forwardRef(((e,t)=>{const n=i(Aa);return m(Co,{ref:t,show:!(null==n||!n.expanded),...e,renderStaticNode:!0})}));To.displayName="NavbarOffcanvas";var _o=To;const Po=e.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=I(t,"navbar-text"),m(n,{ref:a,className:O(e,t),...r}))));Po.displayName="NavbarText";var Ro=Po;const qo=e.forwardRef(((e,t)=>{const{bsPrefix:n,expand:r=!0,variant:i="light",bg:s,fixed:l,sticky:c,className:u,as:d="nav",expanded:h,onToggle:f,onSelect:p,collapseOnSelect:v=!1,...g}=P(e,{expanded:"onToggle"}),b=I(n,"navbar"),y=a(((...e)=>{null==p||p(...e),v&&h&&(null==f||f(!1))}),[p,v,h,f]);void 0===g.role&&"nav"!==d&&(g.role="navigation");let E=`${b}-expand`;"string"==typeof r&&(E=`${E}-${r}`);const w=o((()=>({onToggle:()=>null==f?void 0:f(!h),bsPrefix:b,expanded:!!h,expand:r})),[b,h,r,f]);return m(Aa.Provider,{value:w,children:m(ta.Provider,{value:y,children:m(d,{ref:t,...g,className:O(u,b,r&&E,i&&`${b}-${i}`,s&&`bg-${s}`,c&&`sticky-${c}`,l&&`fixed-${l}`)})})})}));qo.displayName="Navbar";var Io=Object.assign(qo,{Brand:lo,Collapse:uo,Offcanvas:_o,Text:Ro,Toggle:fo});const Do=()=>{};const Bo=e.forwardRef(((e,t)=>{const{flip:n,offset:a,placement:i,containerPadding:o,popperConfig:l={},transition:c,runTransition:u}=e,[d,h]=Je(),[f,p]=Je(),m=Ue(h,t),v=Ci(e.container),g=Ci(e.target),[b,E]=r(!e.show),w=Ar(g,d,Ir({placement:i,enableEvents:!!e.show,containerPadding:o||5,flip:n,offset:a,arrowElement:f,popperConfig:l}));e.show&&b&&E(!1);const x=e.show||!b;if(function(e,t,{disabled:n,clickTrigger:r}={}){const a=t||Do;Rr(e,a,{disabled:n,clickTrigger:r});const i=Ye((e=>{Ri(e)&&a(e)}));s((()=>{if(n||null==e)return;const t=H(_r(e));let r=(t.defaultView||window).event;const a=Pe(t,"keyup",(e=>{e!==r?i(e):r=void 0}));return()=>{a()}}),[e,n,i])}(d,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!x)return null;const{onExit:N,onExiting:k,onEnter:O,onEntering:L,onEntered:A}=e;let S=e.children(Object.assign({},w.attributes.popper,{style:w.styles.popper,ref:m}),{popper:w,placement:i,show:!!e.show,arrowProps:Object.assign({},w.attributes.arrow,{style:w.styles.arrow,ref:p})});return S=Pi(c,u,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:S,onExit:N,onExiting:k,onExited:(...t)=>{E(!0),e.onExited&&e.onExited(...t)},onEnter:O,onEntering:L,onEntered:A}),v?y.createPortal(S,v):null}));Bo.displayName="Overlay";var $o=Bo;const Ho=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"popover-header"),m(n,{ref:a,className:O(e,t),...r}))));Ho.displayName="PopoverHeader";var Uo=Ho;const Fo=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"popover-body"),m(n,{ref:a,className:O(e,t),...r}))));Fo.displayName="PopoverBody";var Vo=Fo;function zo(e,t){let n=e;return"left"===e?n=t?"end":"start":"right"===e&&(n=t?"start":"end"),n}function Wo(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const Ko=e.forwardRef((({bsPrefix:e,placement:t="right",className:n,style:r,children:a,body:i,arrowProps:o,hasDoneInitialMeasure:s,popper:l,show:c,...u},d)=>{const h=I(e,"popover"),f=$(),[p]=(null==t?void 0:t.split("-"))||[],v=zo(p,f);let b=r;return c&&!s&&(b={...r,...Wo(null==l?void 0:l.strategy)}),g("div",{ref:d,role:"tooltip",style:b,"x-placement":p,className:O(n,h,p&&`bs-popover-${v}`),...u,children:[m("div",{className:"popover-arrow",...o}),i?m(Vo,{children:a}):a]})}));var Zo=Object.assign(Ko,{Header:Uo,Body:Vo,POPPER_OFFSET:[0,8]});const Go=e.forwardRef((({bsPrefix:e,placement:t="right",className:n,style:r,children:a,arrowProps:i,hasDoneInitialMeasure:o,popper:s,show:l,...c},u)=>{e=I(e,"tooltip");const d=$(),[h]=(null==t?void 0:t.split("-"))||[],f=zo(h,d);let p=r;return l&&!o&&(p={...r,...Wo(null==s?void 0:s.strategy)}),g("div",{ref:u,style:p,role:"tooltip","x-placement":h,className:O(n,e,`bs-tooltip-${f}`),...c,children:[m("div",{className:"tooltip-arrow",...i}),m("div",{className:`${e}-inner`,children:a})]})}));Go.displayName="Tooltip";var Yo=Object.assign(Go,{TOOLTIP_OFFSET:[0,6]});const Xo=e.forwardRef((({children:t,transition:a=dt,popperConfig:i={},rootClose:l=!1,placement:c="top",show:u=!1,...d},h)=>{const f=n({}),[p,v]=r(null),[g,b]=function(e){const t=n(null),r=I(void 0,"popover"),a=I(void 0,"tooltip"),i=o((()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(Hi(t.current,r))return Zo.POPPER_OFFSET;if(Hi(t.current,a))return Yo.TOOLTIP_OFFSET}return[0,0]}}})),[e,r,a]);return[t,[i]]}(d.offset),y=Ue(h,g),E=!0===a?dt:a||void 0,w=Ye((e=>{v(e),null==i||null==i.onFirstUpdate||i.onFirstUpdate(e)}));return nt((()=>{p&&d.target&&(null==f.current.scheduleUpdate||f.current.scheduleUpdate())}),[p,d.target]),s((()=>{u||v(null)}),[u]),m($o,{...d,ref:y,popperConfig:{...i,modifiers:b.concat(i.modifiers||[]),onFirstUpdate:w},transition:E,rootClose:l,placement:c,show:u,children:(n,{arrowProps:r,popper:o,show:s})=>{var l,c;!function(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=e=>n(Fe(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(Fe(e)))}(n,r);const u=null==o?void 0:o.placement,d=Object.assign(f.current,{state:null==o?void 0:o.state,scheduleUpdate:null==o?void 0:o.update,placement:u,outOfBoundaries:(null==o||null==(l=o.state)||null==(c=l.modifiersData.hide)?void 0:c.isReferenceHidden)||!1,strategy:i.strategy}),h=!!p;return"function"==typeof t?t({...n,placement:u,show:s,...!a&&s&&{className:"show"},popper:d,arrowProps:r,hasDoneInitialMeasure:h}):e.cloneElement(t,{...n,placement:u,arrowProps:r,popper:d,hasDoneInitialMeasure:h,className:O(t.props.className,!a&&s&&"show"),style:{...t.props.style,...n.style}})}})}));Xo.displayName="Overlay";var Jo=Xo;function Qo(e,t,n){const[r]=t,a=r.currentTarget,i=r.relatedTarget||r.nativeEvent[n];i&&i===a||Sr(a,i)||e(...t)}be.oneOf(["click","hover","focus"]);var es=({trigger:t=["hover","focus"],overlay:r,children:i,popperConfig:o={},show:s,defaultShow:l=!1,onToggle:c,delay:u,placement:h,flip:f=h&&-1!==h.indexOf("auto"),...p})=>{const b=n(null),y=Ue(b,i.ref),E=Vt(),w=n(""),[x,N]=_(s,l,c),k=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(u),{onFocus:O,onBlur:L,onClick:A}="function"!=typeof i?e.Children.only(i).props:{},S=a((()=>{E.clear(),w.current="show",k.show?E.set((()=>{"show"===w.current&&N(!0)}),k.show):N(!0)}),[k.show,N,E]),j=a((()=>{E.clear(),w.current="hide",k.hide?E.set((()=>{"hide"===w.current&&N(!1)}),k.hide):N(!1)}),[k.hide,N,E]),M=a(((...e)=>{S(),null==O||O(...e)}),[S,O]),C=a(((...e)=>{j(),null==L||L(...e)}),[j,L]),T=a(((...e)=>{N(!x),null==A||A(...e)}),[A,N,x]),P=a(((...e)=>{Qo(S,e,"fromElement")}),[S]),R=a(((...e)=>{Qo(j,e,"toElement")}),[j]),q=null==t?[]:[].concat(t),I={ref:e=>{y(Fe(e))}};return-1!==q.indexOf("click")&&(I.onClick=T),-1!==q.indexOf("focus")&&(I.onFocus=M,I.onBlur=C),-1!==q.indexOf("hover")&&("production"!==process.env.NODE_ENV&&Cr(q.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),I.onMouseOver=P,I.onMouseOut=R),g(v,{children:["function"==typeof i?i(I):d(i,I),m(Jo,{...p,show:x,onHide:j,flip:f,placement:h,popperConfig:o,target:b.current,children:r})]})};const ts=e.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},a)=>{const i=I(e,"row"),o=D(),s=B(),l=`${i}-cols`,c=[];return o.forEach((e=>{const t=r[e];let n;delete r[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const a=e!==s?`-${e}`:"";null!=n&&c.push(`${l}${a}-${n}`)})),m(n,{ref:a,...r,className:O(t,i,...c)})}));ts.displayName="Row";var ns=ts;var rs,as=e.forwardRef((({bsPrefix:e,className:t,striped:n,bordered:r,borderless:a,hover:i,size:o,variant:s,responsive:l,...c},u)=>{const d=I(e,"table"),h=O(t,d,s&&`${d}-${s}`,o&&`${d}-${o}`,n&&`${d}-${"string"==typeof n?`striped-${n}`:"striped"}`,r&&`${d}-bordered`,a&&`${d}-borderless`,i&&`${d}-hover`),f=m("table",{...c,className:h,ref:u});if(l){let e=`${d}-responsive`;return"string"==typeof l&&(e=`${e}-${l}`),m("div",{className:e,children:f})}return f})),is=function(e){var n=e.label,r=e.icon,a=e.children,i=e.className,o=e.variant,s=w(e,["label","icon","children","className","variant"]);return t.createElement(vt,E({className:i,variant:o||"primary"},s),n||null,r?t.createElement("i",{className:"bi bi-".concat(r)}):null,a)};!function(e){e[e.NONE=0]="NONE",e[e.HEAD=1]="HEAD",e[e.BODY=2]="BODY"}(rs||(rs={}));var os=u(rs.NONE),ss=function(e){var n=e.className,r=e.children,a=w(e,["className","children"]);return t.createElement(as,E({className:O(n,"texmo-table")},a),r)};ss.Head=function(e){var n=e.children,r=w(e,["children"]);return t.createElement(os.Provider,{value:rs.HEAD},t.createElement("thead",E({},r),n))},ss.Row=function(e){var n=e.borderColour,r=e.className,a=e.style,i=e.children,o=w(e,["borderColour","className","style","children"]);return t.createElement("tr",E({className:O(r,"table-responsive text-center h-100 mt-3 mx-0"),style:E({border:"2px solid ".concat(n)},a)},o),i)},ss.Cell=function(e){var n=e.borderStart,r=e.className,a=e.children,o=w(e,["borderStart","className","children"]),s=n?"border-start":void 0;switch(i(os)){case rs.HEAD:return t.createElement("th",E({scope:"col list-cell",className:r},o),a);case rs.BODY:case rs.NONE:default:return t.createElement("td",E({className:"px-0 pt-0 pb-3 texmo-table"},o),t.createElement("div",E({className:O(r,"h-100 d-flex align-items-center list-cell")},o),t.createElement($t,{className:"h-100 w-100 py-3"},t.createElement($t.Body,{className:"d-flex justify-content-center align-items-center py-0 ".concat(s)},t.createElement("div",{className:"w-100 h-100"},a)))))}},ss.Body=function(e){var n=e.children,r=w(e,["children"]);return t.createElement("tbody",E({},r),t.createElement(os.Provider,{value:rs.BODY},n))};var ls=function(e){var n=e.className,r=w(e,["className"]);return t.createElement(Ka,E({as:"input",className:n},r))};ls.Feedback=Da;var cs=function(e){var n=e.label,r=e.children,a=e.className;return t.createElement(Qa,{className:a},n?t.createElement("small",{className:"text-muted"},n):null,r)},us=function(e){var n=e.className,r=e.children,a=w(e,["className","children"]);return t.createElement(ri,E({className:n},a),r)};us.Feedback=Da;var ds=function(e){var n=e.type,r=e.className,a=w(e,["type","className"]);return t.createElement(za,E({type:n},a,{className:r}))};ds.Feedback=Da;var hs="object"==typeof global&&global&&global.Object===Object&&global,fs="object"==typeof self&&self&&self.Object===Object&&self,ps=hs||fs||Function("return this")(),ms=ps.Symbol,vs=Object.prototype,gs=vs.hasOwnProperty,bs=vs.toString,ys=ms?ms.toStringTag:void 0;var Es=Object.prototype.toString;var ws="[object Null]",xs="[object Undefined]",Ns=ms?ms.toStringTag:void 0;function ks(e){return null==e?void 0===e?xs:ws:Ns&&Ns in Object(e)?function(e){var t=gs.call(e,ys),n=e[ys];try{e[ys]=void 0;var r=!0}catch(e){}var a=bs.call(e);return r&&(t?e[ys]=n:delete e[ys]),a}(e):function(e){return Es.call(e)}(e)}function Os(e){return null!=e&&"object"==typeof e}var Ls=Array.isArray;function As(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ss(e){return e}var js="[object AsyncFunction]",Ms="[object Function]",Cs="[object GeneratorFunction]",Ts="[object Proxy]";function _s(e){if(!As(e))return!1;var t=ks(e);return t==Ms||t==Cs||t==js||t==Ts}var Ps,Rs=ps["__core-js_shared__"],qs=(Ps=/[^.]+$/.exec(Rs&&Rs.keys&&Rs.keys.IE_PROTO||""))?"Symbol(src)_1."+Ps:"";var Is=Function.prototype.toString;function Ds(e){if(null!=e){try{return Is.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Bs=/^\[object .+?Constructor\]$/,$s=Function.prototype,Hs=Object.prototype,Us=$s.toString,Fs=Hs.hasOwnProperty,Vs=RegExp("^"+Us.call(Fs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zs(e){return!(!As(e)||(t=e,qs&&qs in t))&&(_s(e)?Vs:Bs).test(Ds(e));var t}function Ws(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return zs(n)?n:void 0}var Ks=Ws(ps,"WeakMap"),Zs=Object.create,Gs=function(){function e(){}return function(t){if(!As(t))return{};if(Zs)return Zs(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ys(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0){if(++Qs>=800)return arguments[0]}else Qs=0;return Js.apply(void 0,arguments)});var il=9007199254740991,ol=/^(?:0|[1-9]\d*)$/;function sl(e,t){var n=typeof e;return!!(t=null==t?il:t)&&("number"==n||"symbol"!=n&&ol.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=ml}function gl(e){return null!=e&&vl(e.length)&&!_s(e)}var bl=Object.prototype;function yl(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||bl)}function El(e){return Os(e)&&"[object Arguments]"==ks(e)}var wl=Object.prototype,xl=wl.hasOwnProperty,Nl=wl.propertyIsEnumerable,kl=El(function(){return arguments}())?El:function(e){return Os(e)&&xl.call(e,"callee")&&!Nl.call(e,"callee")};var Ol="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ll=Ol&&"object"==typeof module&&module&&!module.nodeType&&module,Al=Ll&&Ll.exports===Ol?ps.Buffer:void 0,Sl=(Al?Al.isBuffer:void 0)||function(){return!1},jl={};function Ml(e){return function(t){return e(t)}}jl["[object Float32Array]"]=jl["[object Float64Array]"]=jl["[object Int8Array]"]=jl["[object Int16Array]"]=jl["[object Int32Array]"]=jl["[object Uint8Array]"]=jl["[object Uint8ClampedArray]"]=jl["[object Uint16Array]"]=jl["[object Uint32Array]"]=!0,jl["[object Arguments]"]=jl["[object Array]"]=jl["[object ArrayBuffer]"]=jl["[object Boolean]"]=jl["[object DataView]"]=jl["[object Date]"]=jl["[object Error]"]=jl["[object Function]"]=jl["[object Map]"]=jl["[object Number]"]=jl["[object Object]"]=jl["[object RegExp]"]=jl["[object Set]"]=jl["[object String]"]=jl["[object WeakMap]"]=!1;var Cl="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tl=Cl&&"object"==typeof module&&module&&!module.nodeType&&module,_l=Tl&&Tl.exports===Cl&&hs.process,Pl=function(){try{var e=Tl&&Tl.require&&Tl.require("util").types;return e||_l&&_l.binding&&_l.binding("util")}catch(e){}}(),Rl=Pl&&Pl.isTypedArray,ql=Rl?Ml(Rl):function(e){return Os(e)&&vl(e.length)&&!!jl[ks(e)]},Il=Object.prototype.hasOwnProperty;function Dl(e,t){var n=Ls(e),r=!n&&kl(e),a=!n&&!r&&Sl(e),i=!n&&!r&&!a&&ql(e),o=n||r||a||i,s=o?function(e,t){for(var n=-1,r=Array(e);++n-1},Jl.prototype.set=function(e,t){var n=this.__data__,r=Yl(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Ql=Ws(ps,"Map");function ec(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function tc(e){var t=-1,n=null==e?0:e.length;for(this.clear();++ts))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Tu?new ju:void 0;for(i.set(e,t),i.set(t,e);++d1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(a=fd.length>3&&"function"==typeof a?(r--,a):void 0,i&&function(e,t,n){if(!As(n))return!1;var r=typeof t;return!!("number"==r?gl(n)&&sl(t,n.length):"string"==r&&t in n)&&cl(n[t],e)}(t[0],t[1],i)&&(a=r<3?void 0:a,r=1),e=Object(e);++n(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(md||{});class vd{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const r=md.TYPE&md.ATTRIBUTE;this.scope=null!=n.scope?n.scope&md.LEVEL|r:md.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map((e=>e.name))}add(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)}canAdd(e,t){return null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1)}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class gd extends Error{constructor(e){super(e="[Parchment] "+e),this.message=e,this.name=this.constructor.name}}const bd=class e{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(null==e)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(t,n,r){const a=this.query(n);if(null==a)throw new gd(`Unable to create ${n} blot`);const i=a,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:i.create(r),s=new i(t,o,r);return e.blots.set(s.domNode,s),s}find(t,n=!1){return e.find(t,n)}query(e,t=md.ANY){let n;return"string"==typeof e?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof e?e&md.LEVEL&md.BLOCK?n=this.types.block:e&md.LEVEL&md.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some((e=>(n=this.classes[e],!!n))),n=n||this.tags[e.tagName]),null==n?null:"scope"in n&&t&md.LEVEL&n.scope&&t&md.TYPE&n.scope?n:null}register(...e){return e.map((e=>{const t="blotName"in e,n="attrName"in e;if(!t&&!n)throw new gd("Invalid definition");if(t&&"abstract"===e.blotName)throw new gd("Cannot register abstract class");const r=t?e.blotName:n?e.attrName:void 0;return this.types[r]=e,n?"string"==typeof e.keyName&&(this.attributes[e.keyName]=e):t&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map((e=>e.toUpperCase())):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach((t=>{(null==this.tags[t]||null==e.className)&&(this.tags[t]=e)})))),e}))}};bd.blots=new WeakMap;let yd=bd;function Ed(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((e=>0===e.indexOf(`${t}-`)))}const wd=class extends vd{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map((e=>e.split("-").slice(0,-1).join("-")))}add(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0)}remove(e){Ed(e,this.keyName).forEach((t=>{e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")}value(e){const t=(Ed(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}};function xd(e){const t=e.split("-"),n=t.slice(1).map((e=>e[0].toUpperCase()+e.slice(1))).join("");return t[0]+n}const Nd=class extends vd{static keys(e){return(e.getAttribute("style")||"").split(";").map((e=>e.split(":")[0].trim()))}add(e,t){return!!this.canAdd(e,t)&&(e.style[xd(this.keyName)]=t,!0)}remove(e){e.style[xd(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[xd(this.keyName)];return this.canAdd(e,t)?t:""}};const kd=class{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=yd.find(this.domNode);if(null==e)return;const t=vd.keys(this.domNode),n=wd.keys(this.domNode),r=Nd.keys(this.domNode);t.concat(n).concat(r).forEach((t=>{const n=e.scroll.query(t,md.ATTRIBUTE);n instanceof vd&&(this.attributes[n.attrName]=n)}))}copy(e){Object.keys(this.attributes).forEach((t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)}))}move(e){this.copy(e),Object.keys(this.attributes).forEach((e=>{this.attributes[e].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e)),{})}},Od=class{constructor(e,t){this.scroll=e,this.domNode=t,yd.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(null==this.tagName)throw new gd("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?("string"==typeof e?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):"number"==typeof e&&(n=e),t="number"==typeof n?document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?document.createElement(n):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){null!=this.parent&&this.parent.removeChild(this),yd.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,r){const a=this.isolate(e,t);if(null!=this.scroll.query(n,md.BLOT)&&r)a.wrap(n,r);else if(null!=this.scroll.query(n,md.ATTRIBUTE)){const e=this.scroll.create(this.statics.scope);a.wrap(e),e.format(n,r)}}insertAt(e,t,n){const r=null==n?this.scroll.create("text",t):this.scroll.create(t,n),a=this.split(e);this.parent.insertBefore(r,a||void 0)}isolate(e,t){const n=this.split(e);if(null==n)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return null==this.parent||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n="string"==typeof e?this.scroll.create(e,t):e;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return 0===e?this:this.next}update(e,t){}wrap(e,t){const n="string"==typeof e?this.scroll.create(e,t):e;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new gd(`Cannot wrap ${e}`);return n.appendChild(this),n}};Od.blotName="abstract";let Ld=Od;const Ad=class extends Ld{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Ad.scope=md.INLINE_BLOT;const Sd=Ad;class jd{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),r=0;for(;n;){if(n===e)return r;r+=1,n=t()}return-1}insertBefore(e,t){null!=e&&(this.remove(e),e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return null!=e&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let r=n();for(;r;){const a=r.length();if(ei?n(s,e-i,Math.min(t,i+r-e)):n(s,0,Math.min(r,e+t-i)),i+=r,s=o()}}map(e){return this.reduce(((t,n)=>(t.push(e(n)),t)),[])}reduce(e,t){const n=this.iterator();let r=n();for(;r;)t=e(t,r),r=n();return t}}function Md(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const n=t.create(md.INLINE);return Array.from(e.childNodes).forEach((e=>{n.domNode.appendChild(e)})),e.parentNode&&e.parentNode.replaceChild(n.domNode,e),n.attach(),n}}const Cd=class e extends Ld{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach((e=>{e.attach()}))}attachUI(t){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=t,e.uiClass&&this.uiNode.classList.add(e.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new jd,Array.from(this.domNode.childNodes).filter((e=>e!==this.uiNode)).reverse().forEach((e=>{try{const t=Md(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(e){if(e instanceof gd)return;throw e}}))}deleteAt(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,((e,t,n)=>{e.deleteAt(t,n)}))}descendant(t,n=0){const[r,a]=this.children.find(n);return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,a]:r instanceof e?r.descendant(t,a):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let a=[],i=r;return this.children.forEachAt(n,r,((n,r,o)=>{(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&a.push(n),n instanceof e&&(a=a.concat(n.descendants(t,r,i))),i-=o})),a}detach(){this.children.forEach((e=>{e.detach()})),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach((n=>{t||this.statics.allowedChildren.some((e=>n instanceof e))||(n.statics.scope===md.BLOCK_BLOT?(null!=n.next&&this.splitAfter(n),null!=n.prev&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof e?n.unwrap():n.remove())}))}formatAt(e,t,n,r){this.children.forEachAt(e,t,((e,t,a)=>{e.formatAt(t,a,n,r)}))}insertAt(e,t,n){const[r,a]=this.children.find(e);if(r)r.insertAt(a,t,n);else{const e=null==n?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(e)}}insertBefore(e,t){null!=e.parent&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,null!=t&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce(((e,t)=>e+t.length()),0)}moveChildren(e,t){this.children.forEach((n=>{e.insertBefore(n,t)}))}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,n=!1){const[r,a]=this.children.find(t,n),i=[[this,t]];return r instanceof e?i.concat(r.path(a,n)):(null!=r&&i.push([r,a]),i)}removeChild(e){this.children.remove(e)}replaceWith(t,n){const r="string"==typeof t?this.scroll.create(t,n):t;return r instanceof e&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(0===e)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),((e,r,a)=>{const i=e.split(r,t);null!=i&&n.appendChild(i)})),n}splitAfter(e){const t=this.clone();for(;null!=e.next;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],r=[];e.forEach((e=>{e.target===this.domNode&&"childList"===e.type&&(n.push(...e.addedNodes),r.push(...e.removedNodes))})),r.forEach((e=>{if(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const t=this.scroll.find(e);null!=t&&(null==t.domNode.parentNode||t.domNode.parentNode===this.domNode)&&t.detach()})),n.filter((e=>e.parentNode===this.domNode&&e!==this.uiNode)).sort(((e,t)=>e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((e=>{let t=null;null!=e.nextSibling&&(t=this.scroll.find(e.nextSibling));const n=Md(e,this.scroll);(n.next!==t||null==n.next)&&(null!=n.parent&&n.parent.removeChild(this),this.insertBefore(n,t||void 0))})),this.enforceAllowedChildren()}};Cd.uiClass="";const Td=Cd;const _d=class e extends Td{static create(e){return super.create(e)}static formats(t,n){const r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new kd(this.domNode)}format(t,n){if(t!==this.statics.blotName||n){const e=this.scroll.query(t,md.INLINE);if(null==e)return;e instanceof vd?this.attributes.attribute(e,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}else this.children.forEach((t=>{t instanceof e||(t=t.wrap(e.blotName,!0)),this.attributes.copy(t)})),this.unwrap()}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return null!=t&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,r){null!=this.formats()[n]||this.scroll.query(n,md.ATTRIBUTE)?this.isolate(e,t).format(n,r):super.formatAt(e,t,n,r)}optimize(t){super.optimize(t);const n=this.formats();if(0===Object.keys(n).length)return this.unwrap();const r=this.next;r instanceof e&&r.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some((e=>e.target===this.domNode&&"attributes"===e.type))&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof e&&this.attributes.move(r),r}};_d.allowedChildren=[_d,Sd],_d.blotName="inline",_d.scope=md.INLINE_BLOT,_d.tagName="SPAN";const Pd=_d,Rd=class e extends Td{static create(e){return super.create(e)}static formats(t,n){const r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new kd(this.domNode)}format(t,n){const r=this.scroll.query(t,md.BLOCK);null!=r&&(r instanceof vd?this.attributes.attribute(r,n):t!==this.statics.blotName||n?n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n):this.replaceWith(e.blotName))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return null!=t&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,r){null!=this.scroll.query(n,md.BLOCK)?this.format(n,r):super.formatAt(e,t,n,r)}insertAt(e,t,n){if(null==n||null!=this.scroll.query(t,md.INLINE))super.insertAt(e,t,n);else{const r=this.split(e);if(null==r)throw new Error("Attempt to insertAt after block boundaries");{const e=this.scroll.create(t,n);r.parent.insertBefore(e,r)}}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some((e=>e.target===this.domNode&&"attributes"===e.type))&&this.attributes.build()}};Rd.blotName="block",Rd.scope=md.BLOCK_BLOT,Rd.tagName="P",Rd.allowedChildren=[Pd,Rd,Sd];const qd=Rd,Id=class extends Td{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,r){super.formatAt(e,t,n,r),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Id.blotName="container",Id.scope=md.BLOCK_BLOT;const Dd=Id;const Bd=class extends Sd{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,r){0===e&&t===this.length()?this.format(n,r):super.formatAt(e,t,n,r)}formats(){return this.statics.formats(this.domNode,this.scroll)}},$d={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Hd=class extends Td{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver((e=>{this.update(e)})),this.observer.observe(this.domNode,$d),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=md.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),0===e&&t===this.length()?this.children.forEach((e=>{e.remove()})):super.deleteAt(e,t)}formatAt(e,t,n,r){this.update(),super.formatAt(e,t,n,r)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let r=Array.from(this.observer.takeRecords());for(;r.length>0;)e.push(r.pop());const a=(e,t=!0)=>{null==e||e===this||null!=e.domNode.parentNode&&(n.has(e.domNode)||n.set(e.domNode,[]),t&&a(e.parent))},i=e=>{n.has(e.domNode)&&(e instanceof Td&&e.children.forEach(i),n.delete(e.domNode),e.optimize(t))};let o=e;for(let t=0;o.length>0;t+=1){if(t>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach((e=>{const t=this.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(a(this.find(e.previousSibling,!1)),Array.from(e.addedNodes).forEach((e=>{const t=this.find(e,!1);a(t,!1),t instanceof Td&&t.children.forEach((e=>{a(e,!1)}))}))):"attributes"===e.type&&a(t.prev)),a(t))})),this.children.forEach(i),o=Array.from(this.observer.takeRecords()),r=o.slice();r.length>0;)e.push(r.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map((e=>{const t=this.find(e.target,!0);return null==t?null:n.has(t.domNode)?(n.get(t.domNode).push(e),null):(n.set(t.domNode,[e]),t)})).forEach((e=>{null!=e&&e!==this&&n.has(e.domNode)&&e.update(n.get(e.domNode)||[],t)})),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};Hd.blotName="scroll",Hd.defaultChild=qd,Hd.allowedChildren=[qd,Dd],Hd.scope=md.BLOCK_BLOT,Hd.tagName="DIV";const Ud=Hd,Fd=class e extends Sd{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){null==n?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(0===e)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some((e=>"characterData"===e.type&&e.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Fd.blotName="text",Fd.scope=md.INLINE_BLOT;const Vd=Fd;var zd=Object.freeze({__proto__:null,Attributor:vd,AttributorStore:kd,BlockBlot:qd,ClassAttributor:wd,ContainerBlot:Dd,EmbedBlot:Bd,InlineBlot:Pd,LeafBlot:Sd,ParentBlot:Td,Registry:yd,Scope:md,ScrollBlot:Ud,StyleAttributor:Nd,TextBlot:Vd}),Wd={exports:{}},Kd=-1,Zd=1,Gd=0;function Yd(e,t,n,r,a){if(e===t)return e?[[Gd,e]]:[];if(null!=n){var i=function(e,t,n){var r="number"==typeof n?{index:n,length:0}:n.oldRange,a="number"==typeof n?null:n.newRange,i=e.length,o=t.length;if(0===r.length&&(null===a||0===a.length)){var s=r.index,l=e.slice(0,s),c=e.slice(s),u=a?a.index:null,d=s+o-i;if((null===u||u===d)&&!(d<0||d>o)){var h=t.slice(0,d);if((m=t.slice(d))===c){var f=Math.min(s,d);if((g=l.slice(0,f))===(y=h.slice(0,f)))return dh(g,l.slice(f),h.slice(f),c)}}if(null===u||u===s){var p=s,m=(h=t.slice(0,p),t.slice(p));if(h===l){var v=Math.min(i-p,o-p);if((b=c.slice(c.length-v))===(E=m.slice(m.length-v)))return dh(l,c.slice(0,c.length-v),m.slice(0,m.length-v),b)}}}if(r.length>0&&a&&0===a.length){var g=e.slice(0,r.index),b=e.slice(r.index+r.length);if(!(o<(f=g.length)+(v=b.length))){var y=t.slice(0,f),E=t.slice(o-v);if(g===y&&b===E)return dh(g,e.slice(f,i-v),t.slice(f,o-v),b)}}return null}(e,t,n);if(i)return i}var o=Jd(e,t),s=e.substring(0,o);o=eh(e=e.substring(o),t=t.substring(o));var l=e.substring(e.length-o),c=function(e,t){var n;if(!e)return[[Zd,t]];if(!t)return[[Kd,e]];var r=e.length>t.length?e:t,a=e.length>t.length?t:e,i=r.indexOf(a);if(-1!==i)return n=[[Zd,r.substring(0,i)],[Gd,a],[Zd,r.substring(i+a.length)]],e.length>t.length&&(n[0][0]=n[2][0]=Kd),n;if(1===a.length)return[[Kd,e],[Zd,t]];var o=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,a,i,o,c]:null}var i,o,s,l,c,u=a(n,r,Math.ceil(n.length/4)),d=a(n,r,Math.ceil(n.length/2));if(!u&&!d)return null;i=d?u&&u[4].length>d[4].length?u:d:u;e.length>t.length?(o=i[0],s=i[1],l=i[2],c=i[3]):(l=i[0],c=i[1],o=i[2],s=i[3]);var h=i[4];return[o,s,l,c,h]}(e,t);if(o){var s=o[0],l=o[1],c=o[2],u=o[3],d=o[4],h=Yd(s,c),f=Yd(l,u);return h.concat([[Gd,d]],f)}return function(e,t){for(var n=e.length,r=t.length,a=Math.ceil((n+r)/2),i=a,o=2*a,s=new Array(o),l=new Array(o),c=0;cn)f+=2;else if(y>r)h+=2;else if(d){if((x=i+u-g)>=0&&x=(w=n-l[x]))return Xd(e,t,k,y)}}for(var E=-v+p;E<=v-m;E+=2){for(var w,x=i+E,N=(w=E===-v||E!==v&&l[x-1]n)m+=2;else if(N>r)p+=2;else if(!d){if((b=i+u-E)>=0&&b=(w=n-w))return Xd(e,t,k,y)}}}}return[[Kd,e],[Zd,t]]}(e,t)}(e=e.substring(0,e.length-o),t=t.substring(0,t.length-o));return s&&c.unshift([Gd,s]),l&&c.push([Gd,l]),oh(c,a),r&&function(e){var t=!1,n=[],r=0,a=null,i=0,o=0,s=0,l=0,c=0;for(;i0?n[r-1]:-1,o=0,s=0,l=0,c=0,a=null,t=!0)),i++;t&&oh(e);(function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),r=t.charAt(0),a=n.match(th),i=r.match(th),o=a&&n.match(nh),s=i&&r.match(nh),l=o&&n.match(rh),c=s&&r.match(rh),u=l&&e.match(ah),d=c&&t.match(ih);return u||d?5:l||c?4:a&&!o&&s?3:o||s?2:a||i?1:0}var n=1;for(;n=d&&(d=h,l=r,c=a,u=i)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}})(e),i=1;for(;i=f?(h>=u.length/2||h>=d.length/2)&&(e.splice(i,0,[Gd,d.substring(0,h)]),e[i-1][1]=u.substring(0,u.length-h),e[i+1][1]=d.substring(h),i++):(f>=u.length/2||f>=d.length/2)&&(e.splice(i,0,[Gd,u.substring(0,f)]),e[i-1][0]=Zd,e[i-1][1]=d.substring(0,d.length-f),e[i+1][0]=Kd,e[i+1][1]=u.substring(f),i++),i++}i++}}(c),c}function Xd(e,t,n,r){var a=e.substring(0,n),i=t.substring(0,r),o=e.substring(n),s=t.substring(r),l=Yd(a,i),c=Yd(o,s);return l.concat(c)}function Jd(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),a=r,i=0;nr?e=e.substring(n-r):n=0&&uh(e[l][1])){var c=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),o=c+o,s=c+s,!e[l][1]){e.splice(l,1),r--;var u=l-1;e[u]&&e[u][0]===Zd&&(i++,s=e[u][1]+s,u--),e[u]&&e[u][0]===Kd&&(a++,o=e[u][1]+o,u--),l=u}}if(ch(e[r][1])){c=e[r][1].charAt(0);e[r][1]=e[r][1].slice(1),o+=c,s+=c}}if(r0||s.length>0){o.length>0&&s.length>0&&(0!==(n=Jd(s,o))&&(l>=0?e[l][1]+=s.substring(0,n):(e.splice(0,0,[Gd,s.substring(0,n)]),r++),s=s.substring(n),o=o.substring(n)),0!==(n=eh(s,o))&&(e[r][1]=s.substring(s.length-n)+e[r][1],s=s.substring(0,s.length-n),o=o.substring(0,o.length-n)));var d=i+a;0===o.length&&0===s.length?(e.splice(r-d,d),r-=d):0===o.length?(e.splice(r-d,d,[Zd,s]),r=r-d+1):0===s.length?(e.splice(r-d,d,[Kd,o]),r=r-d+1):(e.splice(r-d,d,[Kd,o],[Zd,s]),r=r-d+2)}0!==r&&e[r-1][0]===Gd?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,i=0,a=0,o="",s=""}""===e[e.length-1][1]&&e.pop();var h=!1;for(r=1;r=55296&&e<=56319}function lh(e){return e>=56320&&e<=57343}function ch(e){return lh(e.charCodeAt(0))}function uh(e){return sh(e.charCodeAt(e.length-1))}function dh(e,t,n,r){return uh(e)||ch(r)?null:function(e){for(var t=[],n=0;n0&&t.push(e[n]);return t}([[Gd,e],[Kd,t],[Zd,n],[Gd,r]])}function hh(e,t,n,r){return Yd(e,t,n,r,!0)}hh.INSERT=Zd,hh.DELETE=Kd,hh.EQUAL=Gd;var fh=hh,ph={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,a="[object Arguments]",i="[object Boolean]",o="[object Date]",s="[object Function]",l="[object GeneratorFunction]",c="[object Map]",u="[object Number]",d="[object Object]",h="[object Promise]",f="[object RegExp]",p="[object Set]",m="[object String]",v="[object Symbol]",g="[object WeakMap]",b="[object ArrayBuffer]",y="[object DataView]",E="[object Float32Array]",w="[object Float64Array]",N="[object Int8Array]",k="[object Int16Array]",O="[object Int32Array]",L="[object Uint8Array]",A="[object Uint8ClampedArray]",S="[object Uint16Array]",j="[object Uint32Array]",M=/\w*$/,C=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,_={};_[a]=_["[object Array]"]=_[b]=_[y]=_[i]=_[o]=_[E]=_[w]=_[N]=_[k]=_[O]=_[c]=_[u]=_[d]=_[f]=_[p]=_[m]=_[v]=_[L]=_[A]=_[S]=_[j]=!0,_["[object Error]"]=_[s]=_[g]=!1;var P="object"==typeof x&&x&&x.Object===Object&&x,R="object"==typeof self&&self&&self.Object===Object&&self,q=P||R||Function("return this")(),I=t&&!t.nodeType&&t,D=I&&e&&!e.nodeType&&e,B=D&&D.exports===I;function $(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function U(e,t,n,r){var a=-1,i=e?e.length:0;for(r&&i&&(n=e[++a]);++a-1},Le.prototype.set=function(e,t){var n=this.__data__,r=Ce(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Ae.prototype.clear=function(){this.__data__={hash:new Oe,map:new(fe||Le),string:new Oe}},Ae.prototype.delete=function(e){return qe(this,e).delete(e)},Ae.prototype.get=function(e){return qe(this,e).get(e)},Ae.prototype.has=function(e){return qe(this,e).has(e)},Ae.prototype.set=function(e,t){return qe(this,e).set(e,t),this},Se.prototype.clear=function(){this.__data__=new Le},Se.prototype.delete=function(e){return this.__data__.delete(e)},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Le){var r=n.__data__;if(!fe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Ae(r)}return n.set(e,t),this};var De=ce?z(ce,Object):function(){return[]},Be=function(e){return ee.call(e)};function $e(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||T.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!Ke(e)}var We=ue||function(){return!1};function Ke(e){var t=Ze(e)?ee.call(e):"";return t==s||t==l}function Ze(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ge(e){return ze(e)?je(e):function(e){if(!He(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}}(ph,ph.exports);var mh=ph.exports,vh={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,a=2,i=9007199254740991,o="[object Arguments]",s="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",u="[object Date]",d="[object Error]",h="[object Function]",f="[object GeneratorFunction]",p="[object Map]",m="[object Number]",v="[object Null]",g="[object Object]",b="[object Promise]",y="[object Proxy]",E="[object RegExp]",w="[object Set]",N="[object String]",k="[object Symbol]",O="[object Undefined]",L="[object WeakMap]",A="[object ArrayBuffer]",S="[object DataView]",j=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[o]=C[s]=C[A]=C[c]=C[S]=C[u]=C[d]=C[h]=C[p]=C[m]=C[g]=C[E]=C[w]=C[N]=C[L]=!1;var T="object"==typeof x&&x&&x.Object===Object&&x,_="object"==typeof self&&self&&self.Object===Object&&self,P=T||_||Function("return this")(),R=t&&!t.nodeType&&t,q=R&&e&&!e.nodeType&&e,I=q&&q.exports===R,D=I&&T.process,B=function(){try{return D&&D.binding&&D.binding("util")}catch(e){}}(),$=B&&B.isTypedArray;function H(e,t){for(var n=-1,r=null==e?0:e.length;++nc))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=n&a?new ke:void 0;for(s.set(e,t),s.set(t,e);++h-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Ae(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ne.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(ce||xe),string:new we}},Ne.prototype.delete=function(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t},Ne.prototype.get=function(e){return Re(this,e).get(e)},Ne.prototype.has=function(e){return Re(this,e).has(e)},Ne.prototype.set=function(e,t){var n=Re(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ke.prototype.add=ke.prototype.push=function(e){return this.__data__.set(e,n),this},ke.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new xe,this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ne(r)}return n.set(e,t),this.size=n.size,this};var Ie=ie?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=i}function Ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ze(e){return null!=e&&"object"==typeof e}var Ge=$?function(e){return function(t){return e(t)}}($):function(e){return Ze(e)&&We(e.length)&&!!C[Se(e)]};function Ye(e){return null!=(t=e)&&We(t.length)&&!ze(t)?Le(e):Te(e);var t}e.exports=function(e,t){return Me(e,t)}}(vh,vh.exports);var gh=vh.exports,bh={};Object.defineProperty(bh,"__esModule",{value:!0});const yh=mh,Eh=gh;var wh;!function(e){e.compose=function(e={},t={},n=!1){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});let r=yh(t);n||(r=Object.keys(r).reduce(((e,t)=>(null!=r[t]&&(e[t]=r[t]),e)),{}));for(const n in e)void 0!==e[n]&&void 0===t[n]&&(r[n]=e[n]);return Object.keys(r).length>0?r:void 0},e.diff=function(e={},t={}){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});const n=Object.keys(e).concat(Object.keys(t)).reduce(((n,r)=>(Eh(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),n)),{});return Object.keys(n).length>0?n:void 0},e.invert=function(e={},t={}){e=e||{};const n=Object.keys(t).reduce(((n,r)=>(t[r]!==e[r]&&void 0!==e[r]&&(n[r]=t[r]),n)),{});return Object.keys(e).reduce(((n,r)=>(e[r]!==t[r]&&void 0===t[r]&&(n[r]=null),n)),n)},e.transform=function(e,t,n=!1){if("object"!=typeof e)return t;if("object"!=typeof t)return;if(!n)return t;const r=Object.keys(t).reduce(((n,r)=>(void 0===e[r]&&(n[r]=t[r]),n)),{});return Object.keys(r).length>0?r:void 0}}(wh||(wh={})),bh.default=wh;var xh,Nh={};Object.defineProperty(Nh,"__esModule",{value:!0}),function(e){e.length=function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"object"==typeof e.retain&&null!==e.retain?1:"string"==typeof e.insert?e.insert.length:1}}(xh||(xh={})),Nh.default=xh;var kh={};Object.defineProperty(kh,"__esModule",{value:!0});const Oh=Nh;kh.default=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const t=this.ops[this.index];if(t){const n=this.offset,r=Oh.default.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};{const r={};return t.attributes&&(r.attributes=t.attributes),"number"==typeof t.retain?r.retain=e:"object"==typeof t.retain&&null!==t.retain?r.retain=t.retain:"string"==typeof t.insert?r.insert=t.insert.substr(n,e):r.insert=t.insert,r}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Oh.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?"number"==typeof e.delete?"delete":"number"==typeof e.retain||"object"==typeof e.retain&&null!==e.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}}return[]}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=fh,r=mh,a=gh,i=bh;t.AttributeMap=i.default;const o=Nh;t.Op=o.default;const s=kh;t.OpIterator=s.default;const l=String.fromCharCode(0),c=(e,t)=>{if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);const n=Object.keys(e)[0];if(!n||n!==Object.keys(t)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(t)[0]}`);return[n,e[n],t[n]]};class u{constructor(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}static registerEmbed(e,t){this.handlers[e]=t}static unregisterEmbed(e){delete this.handlers[e]}static getHandler(e){const t=this.handlers[e];if(!t)throw new Error(`no handlers for embed type "${e}"`);return t}insert(e,t){const n={};return"string"==typeof e&&0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))}delete(e){return e<=0?this:this.push({delete:e})}retain(e,t){if("number"==typeof e&&e<=0)return this;const n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)}push(e){let t=this.ops.length,n=this.ops[t-1];if(e=r(e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,n=this.ops[t-1],"object"!=typeof n))return this.ops.unshift(e),this;if(a(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this}chop(){const e=this.ops[this.ops.length-1];return e&&"number"==typeof e.retain&&!e.attributes&&this.ops.pop(),this}filter(e){return this.ops.filter(e)}forEach(e){this.ops.forEach(e)}map(e){return this.ops.map(e)}partition(e){const t=[],n=[];return this.forEach((r=>{(e(r)?t:n).push(r)})),[t,n]}reduce(e,t){return this.ops.reduce(e,t)}changeLength(){return this.reduce(((e,t)=>t.insert?e+o.default.length(t):t.delete?e-t.delete:e),0)}length(){return this.reduce(((e,t)=>e+o.default.length(t)),0)}slice(e=0,t=1/0){const n=[],r=new s.default(this.ops);let a=0;for(;a0&&n.next(o.retain-e)}const l=new u(r);for(;t.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===t.peekType())l.push(t.next());else{const e=Math.min(t.peekLength(),n.peekLength()),r=t.next(e),o=n.next(e);if(o.retain){const s={};if("number"==typeof r.retain)s.retain="number"==typeof o.retain?e:o.retain;else if("number"==typeof o.retain)null==r.retain?s.insert=r.insert:s.retain=r.retain;else{const e=null==r.retain?"insert":"retain",[t,n,a]=c(r[e],o.retain),i=u.getHandler(t);s[e]={[t]:i.compose(n,a,"retain"===e)}}const d=i.default.compose(r.attributes,o.attributes,"number"==typeof r.retain);if(d&&(s.attributes=d),l.push(s),!n.hasNext()&&a(l.ops[l.ops.length-1],s)){const e=new u(t.rest());return l.concat(e).chop()}}else"number"==typeof o.delete&&("number"==typeof r.retain||"object"==typeof r.retain&&null!==r.retain)&&l.push(o)}return l.chop()}concat(e){const t=new u(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t}diff(e,t){if(this.ops===e.ops)return new u;const r=[this,e].map((t=>t.map((n=>{if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join(""))),o=new u,c=n(r[0],r[1],t,!0),d=new s.default(this.ops),h=new s.default(e.ops);return c.forEach((e=>{let t=e[1].length;for(;t>0;){let r=0;switch(e[0]){case n.INSERT:r=Math.min(h.peekLength(),t),o.push(h.next(r));break;case n.DELETE:r=Math.min(t,d.peekLength()),d.next(r),o.delete(r);break;case n.EQUAL:r=Math.min(d.peekLength(),h.peekLength(),t);const e=d.next(r),s=h.next(r);a(e.insert,s.insert)?o.retain(r,i.default.diff(e.attributes,s.attributes)):o.push(s).delete(r)}t-=r}})),o.chop()}eachLine(e,t="\n"){const n=new s.default(this.ops);let r=new u,a=0;for(;n.hasNext();){if("insert"!==n.peekType())return;const i=n.peek(),s=o.default.length(i)-n.peekLength(),l="string"==typeof i.insert?i.insert.indexOf(t,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===e(r,n.next(1).attributes||{},a))return;a+=1,r=new u}}r.length()>0&&e(r,{},a)}invert(e){const t=new u;return this.reduce(((n,r)=>{if(r.insert)t.delete(o.default.length(r));else{if("number"==typeof r.retain&&null==r.attributes)return t.retain(r.retain),n+r.retain;if(r.delete||"number"==typeof r.retain){const a=r.delete||r.retain;return e.slice(n,n+a).forEach((e=>{r.delete?t.push(e):r.retain&&r.attributes&&t.retain(o.default.length(e),i.default.invert(r.attributes,e.attributes))})),n+a}if("object"==typeof r.retain&&null!==r.retain){const a=e.slice(n,n+1),o=new s.default(a.ops).next(),[l,d,h]=c(r.retain,o.insert),f=u.getHandler(l);return t.retain({[l]:f.invert(d,h)},i.default.invert(r.attributes,o.attributes)),n+1}}return n}),0),t.chop()}transform(e,t=!1){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);const n=e,r=new s.default(this.ops),a=new s.default(n.ops),l=new u;for(;r.hasNext()||a.hasNext();)if("insert"!==r.peekType()||!t&&"insert"===a.peekType())if("insert"===a.peekType())l.push(a.next());else{const e=Math.min(r.peekLength(),a.peekLength()),n=r.next(e),o=a.next(e);if(n.delete)continue;if(o.delete)l.push(o);else{const r=n.retain,a=o.retain;let s="object"==typeof a&&null!==a?a:e;if("object"==typeof r&&null!==r&&"object"==typeof a&&null!==a){const e=Object.keys(r)[0];if(e===Object.keys(a)[0]){const n=u.getHandler(e);n&&(s={[e]:n.transform(r[e],a[e],t)})}}l.retain(s,i.default.transform(n.attributes,o.attributes,t))}}else l.retain(o.default.length(r.next()));return l.chop()}transformPosition(e,t=!1){t=!!t;const n=new s.default(this.ops);let r=0;for(;n.hasNext()&&r<=e;){const a=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r"']/g,(e=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[e])))}class Ch extends Pd{static allowedChildren=[Ch,Sh,Bd,jh];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(e,t){const n=Ch.order.indexOf(e),r=Ch.order.indexOf(t);return n>=0||r>=0?n-r:e===t?0:e0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}class Th extends qd{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=Ph(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,r){t<=0||(this.scroll.query(n,md.BLOCK)?e+t===this.length()&&this.format(n,r):super.formatAt(e,Math.min(t,this.length()-e-1),n,r),this.cache={})}insertAt(e,t,n){if(null!=n)return super.insertAt(e,t,n),void(this.cache={});if(0===t.length)return;const r=t.split("\n"),a=r.shift();a.length>0&&(e(i=i.split(e,!0),i.insertAt(0,t),t.length)),e+a.length)}insertBefore(e,t){const{head:n}=this.children;super.insertBefore(e,t),n instanceof Sh&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t&&(0===e||e>=this.length()-1)){const t=this.clone();return 0===e?(this.parent.insertBefore(t,this),this):(this.parent.insertBefore(t,this.next),t)}const n=super.split(e,t);return this.cache={},n}}Th.blotName="block",Th.tagName="P",Th.defaultChild=Sh,Th.allowedChildren=[Sh,Ch,Bd,jh];class _h extends Bd{attach(){super.attach(),this.attributes=new kd(this.domNode)}delta(){return(new Ah).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const n=this.scroll.query(e,md.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}formatAt(e,t,n,r){this.format(n,r)}insertAt(e,t,n){if(null!=n)return void super.insertAt(e,t,n);const r=t.split("\n"),a=r.pop(),i=r.map((e=>{const t=this.scroll.create(Th.blotName);return t.insertAt(0,e),t})),o=this.split(e);i.forEach((e=>{this.parent.insertBefore(e,o)})),a&&this.parent.insertBefore(this.scroll.create("text",a),o)}}function Ph(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.descendants(Sd).reduce(((e,n)=>0===n.length()?e:e.insert(n.value(),Rh(n,{},t))),new Ah).insert("\n",Rh(e))}function Rh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==e?t:("formats"in e&&"function"==typeof e.formats&&(t={...t,...e.formats()},n&&delete t["code-token"]),null==e.parent||"scroll"===e.parent.statics.blotName||e.parent.statics.scope!==e.statics.scope?t:Rh(e.parent,t,n))}_h.scope=md.BLOCK_BLOT;class qh extends Bd{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(e,t,n){super(e,t),this.selection=n,this.textNode=document.createTextNode(qh.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(e,t){if(0!==this.savedLength)return void super.format(e,t);let n=this,r=0;for(;null!=n&&n.statics.scope!==md.BLOCK_BLOT;)r+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=qh.CONTENTS.length,n.optimize(),n.formatAt(r,qh.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const e=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof jh?this.prev:null,n=t?t.length():0,r=this.next instanceof jh?this.next:null,a=r?r.text:"",{textNode:i}=this,o=i.data.split(qh.CONTENTS).join("");let s;if(i.data=qh.CONTENTS,t)s=t,(o||r)&&(t.insertAt(t.length(),o+a),r&&r.remove());else if(r)s=r,r.insertAt(0,o);else{const e=document.createTextNode(o);s=this.scroll.create(e),this.parent.insertBefore(s,this)}if(this.remove(),e){const a=(e,a)=>t&&e===t.domNode?a:e===i?n+a-1:r&&e===r.domNode?n+o.length+a:null,l=a(e.start.node,e.start.offset),c=a(e.end.node,e.end.offset);if(null!==l&&null!==c)return{startNode:s.domNode,startOffset:l,endNode:s.domNode,endOffset:c}}return null}update(e,t){if(e.some((e=>"characterData"===e.type&&e.target===this.textNode))){const e=this.restore();e&&(t.range=e)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if("A"===t.domNode.tagName){this.savedLength=qh.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}}var Ih={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new a(r,i||e,o),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,o=new Array(i);a1?t-1:0),r=1;r(t[n]=Uh.bind(console,n,e),t)),{})}Fh.level=e=>{Hh=e},Uh.level=Fh.level;const Vh=Fh("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((e=>{document.addEventListener(e,(function(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=Bh.get(e);n&&n.emitter&&n.emitter.handleDOM(...t)}))}))}));class zh extends Dh{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",Vh.error)}emit(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r{let{node:r,handler:a}=t;(e.target===r||r.contains(e.target))&&a(e,...n)}))}listenDOM(e,t,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:n})}}const Wh=Fh("quill:selection");class Kh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=e,this.length=t}}class Zh{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Kh(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(()=>{this.mouseDown||this.composing||setTimeout(this.update.bind(this,zh.sources.USER),1)})),this.emitter.on(zh.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const e=this.getNativeRange();null!=e&&e.start.node!==this.cursor.textNode&&this.emitter.once(zh.events.SCROLL_UPDATE,((t,n)=>{try{this.root.contains(e.start.node)&&this.root.contains(e.end.node)&&this.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset);const r=n.some((e=>"characterData"===e.type||"childList"===e.type||"attributes"===e.type&&e.target===this.root));this.update(r?zh.sources.SILENT:t)}catch(e){}}))})),this.emitter.on(zh.events.SCROLL_OPTIMIZE,((e,t)=>{if(t.range){const{startNode:e,startOffset:n,endNode:r,endOffset:a}=t.range;this.setNativeRange(e,n,r,a),this.update(zh.sources.SILENT)}})),this.update(zh.sources.SILENT)}handleComposition(){this.emitter.on(zh.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(zh.events.COMPOSITION_END,(()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout((()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=!1,this.update(zh.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(e,md.BLOCK)){if(n.start.node!==this.cursor.textNode){const e=this.scroll.find(n.start.node,!1);if(null==e)return;if(e instanceof Sd){const t=e.split(n.start.offset);e.parent.insertBefore(this.cursor,t)}else e.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.scroll.length();let r;e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;let[a,i]=this.scroll.leaf(e);if(null==a)return null;if(t>0&&i===a.length()){const[t]=this.scroll.leaf(e+1);if(t){const[n]=this.scroll.line(e),[r]=this.scroll.line(e+1);n===r&&(a=t,i=0)}}[r,i]=a.position(i,!0);const o=document.createRange();if(t>0)return o.setStart(r,i),[a,i]=this.scroll.leaf(e+t),null==a?null:([r,i]=a.position(i,!0),o.setEnd(r,i),o.getBoundingClientRect());let s,l="left";if(r instanceof Text){if(!r.data.length)return null;i0&&(l="right")}return{bottom:s.top+s.height,height:s.height,left:s[l],right:s[l],top:s.top,width:0}}getNativeRange(){const e=document.getSelection();if(null==e||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(null==t)return null;const n=this.normalizeNative(t);return Wh.info("getNativeRange",n),n}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();if(null==t)return[null,null];return[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&Gh(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const n=t.map((e=>{const[t,n]=e,r=this.scroll.find(t,!0),a=r.offset(this.scroll);return 0===n?a:r instanceof Sd?a+r.index(t,n):a+r.length()})),r=Math.min(Math.max(...n),this.scroll.length()-1),a=Math.min(r,...n);return new Kh(a,r-a)}normalizeNative(e){if(!Gh(this.root,e.startContainer)||!e.collapsed&&!Gh(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((e=>{let{node:t,offset:n}=e;for(;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;t=t.lastChild,n=t instanceof Text?t.data.length:t.childNodes.length>0?t.childNodes.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}rangeToNative(e){const t=this.scroll.length(),n=(e,n)=>{e=Math.min(t-1,e);const[r,a]=this.scroll.leaf(e);return r?r.position(a,n):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(Wh.info("setNativeRange",e,t,n,r),null!=e&&(null==this.root.parentNode||null==e.parentNode||null==n.parentNode))return;const i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};if(null==o||a||e!==o.startContainer||t!==o.startOffset||n!==o.endContainer||r!==o.endOffset){e instanceof Element&&"BR"===e.tagName&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&"BR"===n.tagName&&(r=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const a=document.createRange();a.setStart(e,t),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:zh.sources.API;if("string"==typeof t&&(n=t,t=!1),Wh.info("setRange",e),null!=e){const n=this.rangeToNative(e);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zh.sources.USER;const t=this.lastRange,[n,r]=this.getRange();if(this.lastRange=n,this.lastNative=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!hd(t,this.lastRange)){if(!this.composing&&null!=r&&r.native.collapsed&&r.start.node!==this.cursor.textNode){const e=this.cursor.restore();e&&this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}const n=[zh.events.SELECTION_CHANGE,Su(this.lastRange),Su(t),e];this.emitter.emit(zh.events.EDITOR_CHANGE,...n),e!==zh.sources.SILENT&&this.emitter.emit(...n)}}}function Gh(e,t){try{t.parentNode}catch(e){return!1}return e.contains(t)}const Yh=/^[ -~]*$/;class Xh{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const n=nf(e),r=new Ah;return function(e){const t=[];return e.forEach((e=>{if("string"==typeof e.insert){e.insert.split("\n").forEach(((n,r)=>{r&&t.push({insert:"\n",attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}))}else t.push(e)})),t}(n.ops.slice()).reduce(((e,n)=>{const a=Lh.Op.length(n);let i=n.attributes||{},o=!1,s=!1;if(null!=n.insert){if(r.retain(a),"string"==typeof n.insert){const r=n.insert;s=!r.endsWith("\n")&&(t<=e||!!this.scroll.descendant(_h,e)[0]),this.scroll.insertAt(e,r);const[a,o]=this.scroll.line(e);let l=pd({},Rh(a));if(a instanceof Th){const[e]=a.descendant(Sd,o);e&&(l=pd(l,Rh(e)))}i=Lh.AttributeMap.diff(l,i)||{}}else if("object"==typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return e;const a=null!=this.scroll.query(r,md.INLINE);if(a)(t<=e||this.scroll.descendant(_h,e)[0])&&(s=!0);else if(e>0){const[t,n]=this.scroll.descendant(Sd,e-1);if(t instanceof jh){"\n"!==t.value()[n]&&(o=!0)}else t instanceof Bd&&t.statics.scope===md.INLINE_BLOT&&(o=!0)}if(this.scroll.insertAt(e,r,n.insert[r]),a){const[t]=this.scroll.descendant(Sd,e);if(t){const e=pd({},Rh(t));i=Lh.AttributeMap.diff(e,i)||{}}}}t+=a}else if(r.push(n),null!==n.retain&&"object"==typeof n.retain){const t=Object.keys(n.retain)[0];if(null==t)return e;this.scroll.updateEmbedAt(e,t,n.retain[t])}Object.keys(i).forEach((t=>{this.scroll.formatAt(e,a,t,i[t])}));const l=o?1:0,c=s?1:0;return t+=l+c,r.retain(l),r.delete(c),e+a+l+c}),0),r.reduce(((e,t)=>"number"==typeof t.delete?(this.scroll.deleteAt(e,t.delete),e):e+Lh.Op.length(t)),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update((new Ah).retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach((r=>{this.scroll.lines(e,Math.max(t,1)).forEach((e=>{e.format(r,n[r])}))})),this.scroll.optimize();const r=(new Ah).retain(e).retain(t,Su(n));return this.update(r)}formatText(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach((r=>{this.scroll.formatAt(e,t,r,n[r])}));const r=(new Ah).retain(e).retain(t,Su(n));return this.update(r)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce(((e,t)=>e.concat(t.delta())),new Ah)}getFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach((e=>{const[t]=e;t instanceof Th?n.push(t):t instanceof Sd&&r.push(t)})):(n=this.scroll.lines(e,t),r=this.scroll.descendants(Sd,e,t));const[a,i]=[n,r].map((e=>{const t=e.shift();if(null==t)return{};let n=Rh(t);for(;Object.keys(n).length>0;){const t=e.shift();if(null==t)return n;n=ef(Rh(t),n)}return n}));return{...a,...i}}getHTML(e,t){const[n,r]=this.scroll.line(e);if(n){const a=n.length();return!(n.length()>=r+t)||0===r&&t===a?Qh(this.scroll,e,t,!0):Qh(n,r,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter((e=>"string"==typeof e.insert)).map((e=>e.insert)).join("")}insertContents(e,t){const n=nf(t),r=(new Ah).retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(r)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new Ah).retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(n).forEach((r=>{this.scroll.formatAt(e,t.length,r,n[r])})),this.update((new Ah).retain(e).insert(t,Su(n)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if(e?.statics.blotName!==Th.blotName)return!1;const t=e;return!(t.children.length>1)&&t.children.head instanceof Sh}removeFormat(e,t){const n=this.getText(e,t),[r,a]=this.scroll.line(e+t);let i=0,o=new Ah;null!=r&&(i=r.length()-a,o=r.delta().slice(a,a+i-1).insert("\n"));const s=this.getContents(e,t+i).diff((new Ah).insert(n).concat(o)),l=(new Ah).retain(e).concat(s);return this.applyDelta(l)}update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(Yh)&&this.scroll.find(t[0].target)){const a=this.scroll.find(t[0].target),i=Rh(a),o=a.offset(this.scroll),s=t[0].oldValue.replace(qh.CONTENTS,""),l=(new Ah).insert(s),c=(new Ah).insert(a.value()),u=n&&{oldRange:rf(n.oldRange,-o),newRange:rf(n.newRange,-o)};e=(new Ah).retain(o).concat(l.diff(c,u)).reduce(((e,t)=>t.insert?e.insert(t.insert,i):e.push(t)),new Ah),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&hd(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}function Jh(e,t,n){if(0===e.length){const[e]=tf(n.pop());return t<=0?``:`${Jh([],t-1,n)}`}const[{child:r,offset:a,length:i,indent:o,type:s},...l]=e,[c,u]=tf(s);if(o>t)return n.push(s),o===t+1?`<${c}>${Qh(r,a,i)}${Jh(l,o,n)}`:`<${c}>
  • ${Jh(e,t+1,n)}`;const d=n[n.length-1];if(o===t&&s===d)return`
  • ${Qh(r,a,i)}${Jh(l,o,n)}`;const[h]=tf(n.pop());return`${Jh(e,t-1,n)}`}function Qh(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in e&&"function"==typeof e.html)return e.html(t,n);if(e instanceof jh)return Mh(e.value().slice(t,t+n));if(e instanceof Td){if("list-container"===e.statics.blotName){const r=[];return e.children.forEachAt(t,n,((e,t,n)=>{const a="formats"in e&&"function"==typeof e.formats?e.formats():{};r.push({child:e,offset:t,length:n,indent:a.indent||0,type:a.list})})),Jh(r,-1,[])}const a=[];if(e.children.forEachAt(t,n,((e,t,n)=>{a.push(Qh(e,t,n))})),r||"list"===e.statics.blotName)return a.join("");const{outerHTML:i,innerHTML:o}=e.domNode,[s,l]=i.split(`>${o}<`);return"${a.join("")}<${l}`:`${s}>${a.join("")}<${l}`}return e.domNode instanceof Element?e.domNode.outerHTML:""}function ef(e,t){return Object.keys(t).reduce(((n,r)=>{if(null==e[r])return n;const a=t[r];return a===e[r]?n[r]=a:Array.isArray(a)?a.indexOf(e[r])<0?n[r]=a.concat([e[r]]):n[r]=a:n[r]=[a,e[r]],n}),{})}function tf(e){const t="ordered"===e?"ol":"ul";switch(e){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function nf(e){return e.reduce(((e,t)=>{if("string"==typeof t.insert){const n=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(n,t.attributes)}return e.push(t)}),new Ah)}function rf(e,t){let{index:n,length:r}=e;return new Kh(n+t,r)}class af{static DEFAULTS={};constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=e,this.options=t}}const of="\ufeff";class sf extends Bd{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach((e=>{this.contentNode.appendChild(e)})),this.leftGuard=document.createTextNode(of),this.rightGuard=document.createTextNode(of),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t,n=null;const r=e.data.split(of).join("");if(e===this.leftGuard)if(this.prev instanceof jh){const e=this.prev.length();this.prev.insertAt(e,r),n={startNode:this.prev.domNode,startOffset:e+r.length}}else t=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(t),this),n={startNode:t,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof jh?(this.next.insertAt(0,r),n={startNode:this.next.domNode,startOffset:r.length}):(t=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(t),this.next),n={startNode:t,startOffset:r.length}));return e.data=of,n}update(e,t){e.forEach((e=>{if("characterData"===e.type&&(e.target===this.leftGuard||e.target===this.rightGuard)){const n=this.restore(e.target);n&&(t.range=n)}}))}}class lf{isComposing=!1;constructor(e,t){this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",(e=>{this.isComposing||this.handleCompositionStart(e)})),this.scroll.domNode.addEventListener("compositionend",(e=>{this.isComposing&&queueMicrotask((()=>{this.handleCompositionEnd(e)}))}))}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;!t||t instanceof sf||(this.emitter.emit(zh.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(zh.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(zh.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(zh.events.COMPOSITION_END,e),this.isComposing=!1}}class cf{static DEFAULTS={modules:{}};static themes={default:cf};modules={};constructor(e,t){this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach((e=>{null==this.modules[e]&&this.addModule(e)}))}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}const uf=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},df=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},hf=(e,t,n,r,a,i)=>er?0:er?t-e>r-n?e+a-n:t-r+i:0,ff=["block","break","cursor","inline","scroll","text"],pf=Fh("quill"),mf=new yd;Td.uiClass="ql-ui";class vf{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:mf,theme:"default"};static events=zh.events;static sources=zh.sources;static version="2.0.2";static imports={delta:Ah,parchment:zd,"core/module":af,"core/theme":cf};static debug(e){!0===e&&(e="log"),Fh.level(e)}static find(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Bh.get(e)||mf.find(e,t)}static import(e){return null==this.imports[e]&&pf.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const e=arguments.length<=0?void 0:arguments[0],t=!!(arguments.length<=1?void 0:arguments[1]),n="attrName"in e?e.attrName:e.blotName;"string"==typeof n?this.register(`formats/${n}`,e,t):Object.keys(e).forEach((n=>{this.register(n,e[n],t)}))}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[e]||n||pf.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&"boolean"!=typeof t&&"abstract"!==t.blotName&&mf.register(t),"function"==typeof t.register&&t.register(mf)}}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(e,t){const n=gf(e);if(!n)throw new Error("Invalid Quill container");const r=!t.theme||t.theme===vf.DEFAULTS.theme,a=r?cf:vf.import(`themes/${t.theme}`);if(!a)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:i,...o}=vf.DEFAULTS,{modules:s,...l}=a.DEFAULTS;let c=bf(t.modules);null!=c&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=pd({},bf(i),bf(s),c),d={...o,...yf(l),...yf(t)};let h=t.registry;h?t.formats&&pf.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?((e,t,n)=>{const r=new yd;return ff.forEach((e=>{const n=t.query(e);n&&r.register(n)})),e.forEach((e=>{let a=t.query(e);a||n.error(`Cannot register "${e}" specified in "formats" config. Are you sure it was registered?`);let i=0;for(;a;)if(r.register(a),a="blotName"in a?a.requiredContainer??null:null,i+=1,i>100){n.error(`Cycle detected in registering blot requiredContainer: "${e}"`);break}})),r})(t.formats,d.registry,pf):d.registry;return{...d,registry:h,container:n,theme:a,modules:Object.entries(u).reduce(((e,t)=>{let[n,r]=t;if(!r)return e;const a=vf.import(`modules/${n}`);return null==a?(pf.error(`Cannot load ${n} module. Are you sure you registered it?`),e):{...e,[n]:pd({},a.DEFAULTS||{},r)}}),{}),bounds:gf(d.bounds)}}(e,t),this.container=this.options.container,null==this.container)return void pf.error("Invalid Quill container",e);this.options.debug&&vf.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Bh.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new zh;const r=Ud.blotName,a=this.options.registry.query(r);if(!a||!("blotName"in a))throw new Error(`Cannot initialize Quill without "${r}" blot`);if(this.scroll=new a(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Xh(this.scroll),this.selection=new Zh(this.scroll,this.emitter),this.composition=new lf(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(zh.events.EDITOR_CHANGE,(e=>{e===zh.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(zh.events.SCROLL_UPDATE,((e,t)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),a=n&&r?{oldRange:n,newRange:r}:void 0;Ef.call(this,(()=>this.editor.update(null,t,a)),e)})),this.emitter.on(zh.events.SCROLL_EMBED_UPDATE,((e,t)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),a=n&&r?{oldRange:n,newRange:r}:void 0;Ef.call(this,(()=>{const n=(new Ah).retain(e.offset(this)).retain({[e.statics.blotName]:t});return this.editor.update(n,[],a)}),vf.sources.USER)})),n){const e=this.clipboard.convert({html:`${n}


    `,text:"\n"});this.setContents(e)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){const t=e;(e=document.createElement("div")).classList.add(t)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=wf(e,t,n),Ef.call(this,(()=>this.editor.deleteText(e,t)),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:zh.sources.API;return Ef.call(this,(()=>{const n=this.getSelection(!0);let r=new Ah;if(null==n)return r;if(this.scroll.query(e,md.BLOCK))r=this.editor.formatLine(n.index,n.length,{[e]:t});else{if(0===n.length)return this.selection.format(e,t),r;r=this.editor.formatText(n.index,n.length,{[e]:t})}return this.setSelection(n,zh.sources.SILENT),r}),n)}formatLine(e,t,n,r,a){let i;return[e,t,i,a]=wf(e,t,n,r,a),Ef.call(this,(()=>this.editor.formatLine(e,t,i)),a,e,0)}formatText(e,t,n,r,a){let i;return[e,t,i,a]=wf(e,t,n,r,a),Ef.call(this,(()=>this.editor.formatText(e,t,i)),a,e,0)}getBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null;if(n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length),!n)return null;const r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}getContents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e;return[e,t]=wf(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return"number"==typeof e&&(t=t??this.getLength()-e),[e,t]=wf(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return"number"==typeof e&&(t=t??this.getLength()-e),[e,t]=wf(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vf.sources.API;return Ef.call(this,(()=>this.editor.insertEmbed(e,t,n)),r,e)}insertText(e,t,n,r,a){let i;return[e,,i,a]=wf(e,0,n,r,a),Ef.call(this,(()=>this.editor.insertText(e,t,i)),a,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=wf(e,t,n),Ef.call(this,(()=>this.editor.removeFormat(e,t)),n,e)}scrollRectIntoView(e){((e,t)=>{const n=e.ownerDocument;let r=t,a=e;for(;a;){const e=a===n.body,t=e?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:uf(a),o=getComputedStyle(a),s=hf(r.left,r.right,t.left,t.right,df(o.scrollPaddingLeft),df(o.scrollPaddingRight)),l=hf(r.top,r.bottom,t.top,t.bottom,df(o.scrollPaddingTop),df(o.scrollPaddingBottom));if(s||l)if(e)n.defaultView?.scrollBy(s,l);else{const{scrollLeft:e,scrollTop:t}=a;l&&(a.scrollTop+=l),s&&(a.scrollLeft+=s);const n=a.scrollLeft-e,i=a.scrollTop-t;r={left:r.left-n,top:r.top-i,right:r.right-n,bottom:r.bottom-i}}a=e||"fixed"===o.position?null:(i=a).parentElement||i.getRootNode().host||null}var i})(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zh.sources.API;return Ef.call(this,(()=>{e=new Ah(e);const t=this.getLength(),n=this.editor.deleteText(0,t),r=this.editor.insertContents(0,e),a=this.editor.deleteText(this.getLength()-1,1);return n.compose(r).compose(a)}),t)}setSelection(e,t,n){null==e?this.selection.setRange(null,t||vf.sources.API):([e,t,,n]=wf(e,t,n),this.selection.setRange(new Kh(Math.max(0,e),t),n),n!==zh.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zh.sources.API;const n=(new Ah).insert(e);return this.setContents(n,t)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zh.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zh.sources.API;return Ef.call(this,(()=>(e=new Ah(e),this.editor.applyDelta(e))),t,!0)}}function gf(e){return"string"==typeof e?document.querySelector(e):e}function bf(e){return Object.entries(e??{}).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:!0===r?{}:r}}),{})}function yf(e){return Object.fromEntries(Object.entries(e).filter((e=>void 0!==e[1])))}function Ef(e,t,n,r){if(!this.isEnabled()&&t===zh.sources.USER&&!this.allowReadOnlyEdits)return new Ah;let a=null==n?null:this.getSelection();const i=this.editor.delta,o=e();if(null!=a&&(!0===n&&(n=a.index),null==r?a=xf(a,o,t):0!==r&&(a=xf(a,n,r,t)),this.setSelection(a,zh.sources.SILENT)),o.length()>0){const e=[zh.events.TEXT_CHANGE,o,i,t];this.emitter.emit(zh.events.EDITOR_CHANGE,...e),t!==zh.sources.SILENT&&this.emitter.emit(...e)}return o}function wf(e,t,n,r,a){let i={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(a=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(a=r,r=n,n=t,t=0),"object"==typeof n?(i=n,a=r):"string"==typeof n&&(null!=r?i[n]=r:a=n),[e,t,i,a=a||zh.sources.API]}function xf(e,t,n,r){const a="number"==typeof n?n:0;if(null==e)return null;let i,o;return t&&"function"==typeof t.transformPosition?[i,o]=[e.index,e.index+e.length].map((e=>t.transformPosition(e,r!==zh.sources.USER))):[i,o]=[e.index,e.index+e.length].map((e=>e=0?e+a:Math.max(t,e+a))),new Kh(i,o-i)}class Nf extends Dd{}function kf(e){return e instanceof Th||e instanceof _h}function Of(e){return"function"==typeof e.updateContent}function Lf(e,t,n){n.reduce(((t,n)=>{const r=Lh.Op.length(n);let a=n.attributes||{};if(null!=n.insert)if("string"==typeof n.insert){const r=n.insert;e.insertAt(t,r);const[i]=e.descendant(Sd,t),o=Rh(i);a=Lh.AttributeMap.diff(o,a)||{}}else if("object"==typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return t;e.insertAt(t,r,n.insert[r]);if(null!=e.scroll.query(r,md.INLINE)){const[n]=e.descendant(Sd,t),r=Rh(n);a=Lh.AttributeMap.diff(r,a)||{}}}return Object.keys(a).forEach((n=>{e.formatAt(t,r,n,a[n])})),t+r}),t)}const Af={scope:md.BLOCK,whitelist:["right","center","justify"]},Sf=new vd("align","align",Af),jf=new wd("align","ql-align",Af),Mf=new Nd("align","text-align",Af);class Cf extends Nd{value(e){let t=super.value(e);if(!t.startsWith("rgb("))return t;t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"");return`#${t.split(",").map((e=>`00${parseInt(e,10).toString(16)}`.slice(-2))).join("")}`}}const Tf=new wd("color","ql-color",{scope:md.INLINE}),_f=new Cf("color","color",{scope:md.INLINE}),Pf=new wd("background","ql-bg",{scope:md.INLINE}),Rf=new Cf("background","background-color",{scope:md.INLINE});class qf extends Nf{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map((e=>e.length()<=1?"":e.domNode.innerText)).join("\n").slice(e,e+t)}html(e,t){return`
    \n${Mh(this.code(e,t))}\n
    `}}class If extends Th{static TAB=" ";static register(){vf.register(qf)}}class Df extends Ch{}Df.blotName="code",Df.tagName="CODE",If.blotName="code-block",If.className="ql-code-block",If.tagName="DIV",qf.blotName="code-block-container",qf.className="ql-code-block-container",qf.tagName="DIV",qf.allowedChildren=[If],If.allowedChildren=[jh,Sh,qh],If.requiredContainer=qf;const Bf={scope:md.BLOCK,whitelist:["rtl"]},$f=new vd("direction","dir",Bf),Hf=new wd("direction","ql-direction",Bf),Uf=new Nd("direction","direction",Bf),Ff={scope:md.INLINE,whitelist:["serif","monospace"]},Vf=new wd("font","ql-font",Ff);const zf=new class extends Nd{value(e){return super.value(e).replace(/["']/g,"")}}("font","font-family",Ff),Wf=new wd("size","ql-size",{scope:md.INLINE,whitelist:["small","large","huge"]}),Kf=new Nd("size","font-size",{scope:md.INLINE,whitelist:["10px","18px","32px"]}),Zf=Fh("quill:keyboard"),Gf=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Yf extends af{static match(e,t){return!["altKey","ctrlKey","metaKey","shiftKey"].some((n=>!!t[n]!==e[n]&&null!==t[n]))&&(t.key===e.key||t.key===e.which)}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach((e=>{this.options.bindings[e]&&this.addBinding(this.options.bindings[e])})),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},(()=>{})),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(e){if("string"==typeof e||"number"==typeof e)e={key:e};else{if("object"!=typeof e)return null;e=Su(e)}e.shortKey&&(e[Gf]=e.shortKey,delete e.shortKey);return e}(e);if(null==r)return void Zf.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n});(Array.isArray(r.key)?r.key:[r.key]).forEach((e=>{const a={...r,key:e,...t,...n};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)}))}listen(){this.quill.root.addEventListener("keydown",(e=>{if(e.defaultPrevented||e.isComposing)return;if(229===e.keyCode&&("Enter"===e.key||"Backspace"===e.key))return;const t=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter((t=>Yf.match(e,t)));if(0===t.length)return;const n=vf.find(e.target,!0);if(n&&n.scroll!==this.quill.scroll)return;const r=this.quill.getSelection();if(null==r||!this.quill.hasFocus())return;const[a,i]=this.quill.getLine(r.index),[o,s]=this.quill.getLeaf(r.index),[l,c]=0===r.length?[o,s]:this.quill.getLeaf(r.index+r.length),u=o instanceof Vd?o.value().slice(0,s):"",d=l instanceof Vd?l.value().slice(c):"",h={collapsed:0===r.length,empty:0===r.length&&a.length()<=1,format:this.quill.getFormat(r),line:a,offset:i,prefix:u,suffix:d,event:e};t.some((e=>{if(null!=e.collapsed&&e.collapsed!==h.collapsed)return!1;if(null!=e.empty&&e.empty!==h.empty)return!1;if(null!=e.offset&&e.offset!==h.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((e=>null==h.format[e])))return!1}else if("object"==typeof e.format&&!Object.keys(e.format).every((t=>!0===e.format[t]?null!=h.format[t]:!1===e.format[t]?null==h.format[t]:hd(e.format[t],h.format[t]))))return!1;return!(null!=e.prefix&&!e.prefix.test(h.prefix))&&(!(null!=e.suffix&&!e.suffix.test(h.suffix))&&!0!==e.handler.call(this,r,h,e))}))&&e.preventDefault()}))}handleBackspace(e,t){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(0===e.index||this.quill.getLength()<=1)return;let r={};const[a]=this.quill.getLine(e.index);let i=(new Ah).retain(e.index-n).delete(n);if(0===t.offset){const[t]=this.quill.getLine(e.index-1);if(t){if(!("block"===t.statics.blotName&&t.length()<=1)){const t=a.formats(),n=this.quill.getFormat(e.index-1,1);if(r=Lh.AttributeMap.diff(t,n)||{},Object.keys(r).length>0){const t=(new Ah).retain(e.index+a.length()-2).retain(1,r);i=i.compose(t)}}}}this.quill.updateContents(i,vf.sources.USER),this.quill.focus()}handleDelete(e,t){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let r={};const[a]=this.quill.getLine(e.index);let i=(new Ah).retain(e.index).delete(n);if(t.offset>=a.length()-1){const[t]=this.quill.getLine(e.index+1);if(t){const n=a.formats(),o=this.quill.getFormat(e.index,1);r=Lh.AttributeMap.diff(n,o)||{},Object.keys(r).length>0&&(i=i.retain(t.length()-1).retain(1,r))}}this.quill.updateContents(i,vf.sources.USER),this.quill.focus()}handleDeleteRange(e){np({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const n=Object.keys(t.format).reduce(((e,n)=>(this.quill.scroll.query(n,md.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e)),{}),r=(new Ah).retain(e.index).delete(e.length).insert("\n",n);this.quill.updateContents(r,vf.sources.USER),this.quill.setSelection(e.index+1,vf.sources.SILENT),this.quill.focus()}}const Xf={bindings:{bold:ep("bold"),italic:ep("italic"),underline:ep("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return!(!t.collapsed||0===t.offset)||(this.quill.format("indent","+1",vf.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return!(!t.collapsed||0===t.offset)||(this.quill.format("indent","-1",vf.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){null!=t.format.indent?this.quill.format("indent","-1",vf.sources.USER):null!=t.format.list&&this.quill.format("list",!1,vf.sources.USER)}},"indent code-block":Jf(!0),"outdent code-block":Jf(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,vf.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();const n=(new Ah).retain(e.index).delete(e.length).insert("\t");return this.quill.updateContents(n,vf.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,vf.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,vf.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){const n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,vf.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(e){const[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:"checked"},a=(new Ah).retain(e.index).insert("\n",r).retain(t.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,vf.sources.USER),this.quill.setSelection(e.index+1,vf.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){const[n,r]=this.quill.getLine(e.index),a=(new Ah).retain(e.index).insert("\n",t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(a,vf.sources.USER),this.quill.setSelection(e.index+1,vf.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(e){const t=this.quill.getModule("table");if(t){const[n,r,a,i]=t.getTable(e),o=function(e,t,n,r){if(null==t.prev&&null==t.next)return null==n.prev&&null==n.next?0===r?-1:1:null==n.prev?-1:1;if(null==t.prev)return-1;if(null==t.next)return 1;return null}(0,r,a,i);if(null==o)return;let s=n.offset();if(o<0){const t=(new Ah).retain(s).insert("\n");this.quill.updateContents(t,vf.sources.USER),this.quill.setSelection(e.index+1,e.length,vf.sources.SILENT)}else if(o>0){s+=n.length();const e=(new Ah).retain(s).insert("\n");this.quill.updateContents(e,vf.sources.USER),this.quill.setSelection(s,vf.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,a=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(a-1,vf.sources.USER):this.quill.setSelection(a+r.length(),vf.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(null==this.quill.scroll.query("list"))return!0;const{length:n}=t.prefix,[r,a]=this.quill.getLine(e.index);if(a>n)return!0;let i;switch(t.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(e.index," ",vf.sources.USER),this.quill.history.cutoff();const o=(new Ah).retain(e.index-a).delete(n+1).retain(r.length()-2-a).retain(1,{list:i});return this.quill.updateContents(o,vf.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,vf.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,a=t;for(;null!=a&&a.length()<=1&&a.formats()["code-block"];)if(a=a.prev,r-=1,r<=0){const r=(new Ah).retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(r,vf.sources.USER),this.quill.setSelection(e.index-1,vf.sources.SILENT),!1}return!0}},"embed left":Qf("ArrowLeft",!1),"embed left shift":Qf("ArrowLeft",!0),"embed right":Qf("ArrowRight",!1),"embed right shift":Qf("ArrowRight",!0),"table down":tp(!1),"table up":tp(!0)}};function Jf(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const a=this.quill.scroll.query("code-block"),{TAB:i}=a;if(0===t.length&&!r.shiftKey)return this.quill.insertText(t.index,i,vf.sources.USER),void this.quill.setSelection(t.index+i.length,vf.sources.SILENT);const o=0===t.length?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:s,length:l}=t;o.forEach(((t,n)=>{e?(t.insertAt(0,i),0===n?s+=i.length:l+=i.length):t.domNode.textContent.startsWith(i)&&(t.deleteAt(0,i.length),0===n?s-=i.length:l-=i.length)})),this.quill.update(vf.sources.USER),this.quill.setSelection(s,l,vf.sources.SILENT)}}}function Qf(e,t){return{key:e,shiftKey:t,altKey:null,["ArrowLeft"===e?"prefix":"suffix"]:/^$/,handler(n){let{index:r}=n;"ArrowRight"===e&&(r+=n.length+1);const[a]=this.quill.getLeaf(r);return!(a instanceof Bd)||("ArrowLeft"===e?t?this.quill.setSelection(n.index-1,n.length+1,vf.sources.USER):this.quill.setSelection(n.index-1,vf.sources.USER):t?this.quill.setSelection(n.index,n.length+1,vf.sources.USER):this.quill.setSelection(n.index+n.length+1,vf.sources.USER),!1)}}}function ep(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],vf.sources.USER)}}}function tp(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",a=n.line,i=a.parent[r];if(null!=i){if("table-row"===i.statics.blotName){let e=i.children.head,t=a;for(;null!=t.prev;)t=t.prev,e=e.next;const r=e.offset(this.quill.scroll)+Math.min(n.offset,e.length()-1);this.quill.setSelection(r,0,vf.sources.USER)}}else{const t=a.table()[r];null!=t&&(e?this.quill.setSelection(t.offset(this.quill.scroll)+t.length()-1,0,vf.sources.USER):this.quill.setSelection(t.offset(this.quill.scroll),0,vf.sources.USER))}return!1}}}function np(e){let{quill:t,range:n}=e;const r=t.getLines(n);let a={};if(r.length>1){const e=r[0].formats(),t=r[r.length-1].formats();a=Lh.AttributeMap.diff(t,e)||{}}t.deleteText(n,vf.sources.USER),Object.keys(a).length>0&&t.formatLine(n.index,1,a,vf.sources.USER),t.setSelection(n.index,vf.sources.SILENT)}Yf.DEFAULTS=Xf;const rp=/font-weight:\s*normal/,ap=["P","OL","UL"],ip=e=>e&&ap.includes(e.tagName);const op=/\bmso-list:[^;]*ignore/i,sp=/\bmso-list:[^;]*\bl(\d+)/i,lp=/\bmso-list:[^;]*\blevel(\d+)/i,cp=e=>{const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach((e=>{(e.getAttribute("style")||"").match(op)?n.push(e):r.push(e)})),n.forEach((e=>e.parentNode?.removeChild(e)));const a=e.documentElement.innerHTML,i=r.map((e=>((e,t)=>{const n=e.getAttribute("style"),r=n?.match(sp);if(!r)return null;const a=Number(r[1]),i=n?.match(lp),o=i?Number(i[1]):1,s=new RegExp(`@list l${a}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(s);return{id:a,indent:o,type:l&&"bullet"===l[1]?"bullet":"ordered",element:e}})(e,a))).filter((e=>e));for(;i.length;){const e=[];let t=i.shift();for(;t;)e.push(t),t=i.length&&i[0]?.element===t.element.nextElementSibling&&i[0].id===t.id?i.shift():null;const n=document.createElement("ul");e.forEach((e=>{const t=document.createElement("li");t.setAttribute("data-list",e.type),e.indent>1&&t.setAttribute("class","ql-indent-"+(e.indent-1)),t.innerHTML=e.element.innerHTML,n.appendChild(t)}));const r=e[0]?.element,{parentNode:a}=r??{};r&&a?.replaceChild(n,r),e.slice(1).forEach((e=>{let{element:t}=e;a?.removeChild(t)}))}};const up=[function(e){"urn:schemas-microsoft-com:office:word"===e.documentElement.getAttribute("xmlns:w")&&cp(e)},function(e){e.querySelector('[id^="docs-internal-guid-"]')&&((e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter((e=>e.getAttribute("style")?.match(rp))).forEach((t=>{const n=e.createDocumentFragment();n.append(...t.childNodes),t.parentNode?.replaceChild(n,t)}))})(e),(e=>{Array.from(e.querySelectorAll("br")).filter((e=>ip(e.previousElementSibling)&&ip(e.nextElementSibling))).forEach((e=>{e.parentNode?.removeChild(e)}))})(e))}],dp=Fh("quill:clipboard"),hp=[[Node.TEXT_NODE,function(e,t,n){let r=e.data;if("O:P"===e.parentElement?.tagName)return t.insert(r.trim());if(!yp(e)){if(0===r.trim().length&&r.includes("\n")&&!function(e,t){return e.previousElementSibling&&e.nextElementSibling&&!gp(e.previousElementSibling,t)&&!gp(e.nextElementSibling,t)}(e,n))return t;const a=(e,t)=>{const n=t.replace(/[^\u00a0]/g,"");return n.length<1&&e?" ":n};r=r.replace(/\r\n/g," ").replace(/\n/g," "),r=r.replace(/\s\s+/g,a.bind(a,!0)),(null==e.previousSibling&&null!=e.parentElement&&gp(e.parentElement,n)||e.previousSibling instanceof Element&&gp(e.previousSibling,n))&&(r=r.replace(/^\s+/,a.bind(a,!1))),(null==e.nextSibling&&null!=e.parentElement&&gp(e.parentElement,n)||e.nextSibling instanceof Element&&gp(e.nextSibling,n))&&(r=r.replace(/\s+$/,a.bind(a,!1)))}return t.insert(r)}],[Node.TEXT_NODE,xp],["br",function(e,t){vp(t,"\n")||t.insert("\n");return t}],[Node.ELEMENT_NODE,xp],[Node.ELEMENT_NODE,function(e,t,n){const r=n.query(e);if(null==r)return t;if(r.prototype instanceof Bd){const t={},a=r.value(e);if(null!=a)return t[r.blotName]=a,(new Ah).insert(t,r.formats(e,n))}else if(r.prototype instanceof qd&&!vp(t,"\n")&&t.insert("\n"),"blotName"in r&&"formats"in r&&"function"==typeof r.formats)return mp(t,r.blotName,r.formats(e,n),n);return t}],[Node.ELEMENT_NODE,function(e,t,n){const r=vd.keys(e),a=wd.keys(e),i=Nd.keys(e),o={};return r.concat(a).concat(i).forEach((t=>{let r=n.query(t,md.ATTRIBUTE);null!=r&&(o[r.attrName]=r.value(e),o[r.attrName])||(r=fp[t],null==r||r.attrName!==t&&r.keyName!==t||(o[r.attrName]=r.value(e)||void 0),r=pp[t],null==r||r.attrName!==t&&r.keyName!==t||(r=pp[t],o[r.attrName]=r.value(e)||void 0))})),Object.entries(o).reduce(((e,t)=>{let[r,a]=t;return mp(e,r,a,n)}),t)}],[Node.ELEMENT_NODE,function(e,t,n){const r={},a=e.style||{};"italic"===a.fontStyle&&(r.italic=!0);"underline"===a.textDecoration&&(r.underline=!0);"line-through"===a.textDecoration&&(r.strike=!0);(a.fontWeight?.startsWith("bold")||parseInt(a.fontWeight,10)>=700)&&(r.bold=!0);if(t=Object.entries(r).reduce(((e,t)=>{let[r,a]=t;return mp(e,r,a,n)}),t),parseFloat(a.textIndent||0)>0)return(new Ah).insert("\t").concat(t);return t}],["li",function(e,t,n){const r=n.query(e);if(null==r||"list"!==r.blotName||!vp(t,"\n"))return t;let a=-1,i=e.parentNode;for(;null!=i;)["OL","UL"].includes(i.tagName)&&(a+=1),i=i.parentNode;return a<=0?t:t.reduce(((e,t)=>t.insert?t.attributes&&"number"==typeof t.attributes.indent?e.push(t):e.insert(t.insert,{indent:a,...t.attributes||{}}):e),new Ah)}],["ol, ul",function(e,t,n){const r=e;let a="OL"===r.tagName?"ordered":"bullet";const i=r.getAttribute("data-checked");i&&(a="true"===i?"checked":"unchecked");return mp(t,"list",a,n)}],["pre",function(e,t,n){const r=n.query("code-block"),a=!r||!("formats"in r)||"function"!=typeof r.formats||r.formats(e,n);return mp(t,"code-block",a,n)}],["tr",function(e,t,n){const r="TABLE"===e.parentElement?.tagName?e.parentElement:e.parentElement?.parentElement;if(null!=r){return mp(t,"table",Array.from(r.querySelectorAll("tr")).indexOf(e)+1,n)}return t}],["b",wp("bold")],["i",wp("italic")],["strike",wp("strike")],["style",function(){return new Ah}]],fp=[Sf,$f].reduce(((e,t)=>(e[t.keyName]=t,e)),{}),pp=[Mf,Rf,_f,Uf,zf,Kf].reduce(((e,t)=>(e[t.keyName]=t,e)),{});function mp(e,t,n,r){return r.query(t)?e.reduce(((e,r)=>{if(!r.insert)return e;if(r.attributes&&r.attributes[t])return e.push(r);const a=n?{[t]:n}:{};return e.insert(r.insert,{...a,...r.attributes})}),new Ah):e}function vp(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.lengthr(t,n,e)),new Ah):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce(((i,o)=>{let s=Ep(e,o,n,r,a);return o.nodeType===t.ELEMENT_NODE&&(s=n.reduce(((t,n)=>n(o,t,e)),s),s=(a.get(o)||[]).reduce(((t,n)=>n(o,t,e)),s)),i.concat(s)}),new Ah):new Ah}function wp(e){return(t,n,r)=>mp(n,e,!0,r)}function xp(e,t,n){if(!vp(t,"\n")){if(gp(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert("\n");if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;null!=r;){if(gp(r,n))return t.insert("\n");const e=n.query(r);if(e&&e.prototype instanceof _h)return t.insert("\n");r=r.firstChild}}}return t}function Np(e,t){let n=t;for(let t=e.length-1;t>=0;t-=1){const r=e[t];e[t]={delta:n.transform(r.delta,!0),range:r.range&&kp(r.range,n)},n=r.delta.transform(n),0===e[t].delta.length()&&e.splice(t,1)}}function kp(e,t){if(!e)return e;const n=t.transformPosition(e.index);return{index:n,length:t.transformPosition(e.index+e.length)-n}}class Op extends af{constructor(e,t){super(e,t),e.root.addEventListener("drop",(t=>{t.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(t.clientX,t.clientY);else if(document.caretPositionFromPoint){const e=document.caretPositionFromPoint(t.clientX,t.clientY);n=document.createRange(),n.setStart(e.offsetNode,e.offset),n.setEnd(e.offsetNode,e.offset)}const r=n&&e.selection.normalizeNative(n);if(r){const n=e.selection.normalizedToRange(r);t.dataTransfer?.files&&this.upload(n,t.dataTransfer.files)}}))}upload(e,t){const n=[];Array.from(t).forEach((e=>{e&&this.options.mimetypes?.includes(e.type)&&n.push(e)})),n.length>0&&this.options.handler.call(this,e,n)}}Op.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map((e=>new Promise((t=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}))));Promise.all(n).then((t=>{const n=t.reduce(((e,t)=>e.insert({image:t})),(new Ah).retain(e.index).delete(e.length));this.quill.updateContents(n,zh.sources.USER),this.quill.setSelection(e.index+t.length,zh.sources.SILENT)}))}};const Lp=["insertText","insertReplacementText"];const Ap=/Mac/i.test(navigator.platform);vf.register({"blots/block":Th,"blots/block/embed":_h,"blots/break":Sh,"blots/container":Nf,"blots/cursor":qh,"blots/embed":sf,"blots/inline":Ch,"blots/scroll":class extends Ud{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=Th;static allowedChildren=[Th,_h,Nf];constructor(e,t,n){let{emitter:r}=n;super(e,t),this.emitter=r,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",(e=>this.handleDragStart(e)))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(zh.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(zh.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(zh.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[n,r]=this.line(e),[a]=this.line(e+t);if(super.deleteAt(e,t),null!=a&&n!==a&&r>0){if(n instanceof _h||a instanceof _h)return void this.optimize();const e=a.children.head instanceof Sh?null:a.children.head;n.moveChildren(a,e),n.remove()}this.optimize()}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,n,r){super.formatAt(e,t,n,r),this.optimize()}insertAt(e,t,n){if(e>=this.length())if(null==n||null==this.scroll.query(t,md.BLOCK)){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e),null==n&&t.endsWith("\n")?e.insertAt(0,t.slice(0,-1),n):e.insertAt(0,t,n)}else{const e=this.scroll.create(t,n);this.appendChild(e)}else super.insertAt(e,t,n);this.optimize()}insertBefore(e,t){if(e.statics.scope===md.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,t)}else super.insertBefore(e,t)}insertContents(e,t){const n=this.deltaToRenderBlocks(t.concat((new Ah).insert("\n"))),r=n.pop();if(null==r)return;this.batchStart();const a=n.shift();if(a){const t="block"===a.type&&(0===a.delta.length()||!this.descendant(_h,e)[0]&&e{this.formatAt(i-1,1,e,s[e])})),e=i}let[i,o]=this.children.find(e);if(n.length&&(i&&(i=i.split(o),o=0),n.forEach((e=>{if("block"===e.type){Lf(this.createBlock(e.attributes,i||void 0),0,e.delta)}else{const t=this.create(e.key,e.value);this.insertBefore(t,i||void 0),Object.keys(e.attributes).forEach((n=>{t.format(n,e.attributes[n])}))}}))),"block"===r.type&&r.delta.length()){Lf(this,i?i.offset(i.scroll)+o:this.length(),r.delta)}this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[n,r]=t;return n instanceof Sd?[n,r]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(kf,e)}lines(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const n=(e,t,r)=>{let a=[],i=r;return e.children.forEachAt(t,r,((e,t,r)=>{kf(e)?a.push(e):e instanceof Dd&&(a=a.concat(n(e,t,i))),i-=r})),a};return n(this,e,t)}optimize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(zh.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch)return void(Array.isArray(e)&&(this.batch=this.batch.concat(e)));let t=zh.sources.USER;"string"==typeof e&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),(e=e.filter((e=>{let{target:t}=e;const n=this.find(t,!0);return n&&!Of(n)}))).length>0&&this.emitter.emit(zh.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(zh.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){const[r]=this.descendant((e=>e instanceof _h),e);r&&r.statics.blotName===t&&Of(r)&&r.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let n=new Ah;return e.forEach((e=>{const r=e?.insert;if(r)if("string"==typeof r){const a=r.split("\n");a.slice(0,-1).forEach((r=>{n.insert(r,e.attributes),t.push({type:"block",delta:n,attributes:e.attributes??{}}),n=new Ah}));const i=a[a.length-1];i&&n.insert(i,e.attributes)}else{const a=Object.keys(r)[0];if(!a)return;this.query(a,md.INLINE)?n.push(e):(n.length()&&t.push({type:"block",delta:n,attributes:{}}),n=new Ah,t.push({type:"blockEmbed",key:a,value:r[a],attributes:e.attributes??{}}))}})),n.length()&&t.push({type:"block",delta:n,attributes:{}}),t}createBlock(e,t){let n;const r={};Object.entries(e).forEach((e=>{let[t,a]=e;null!=this.query(t,md.BLOCK&md.BLOT)?n=t:r[t]=a}));const a=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(a,t||void 0);const i=a.length();return Object.entries(r).forEach((e=>{let[t,n]=e;a.formatAt(0,i,t,n)})),a}},"blots/text":jh,"modules/clipboard":class extends af{static DEFAULTS={matchers:[]};constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",(e=>this.onCaptureCopy(e,!1))),this.quill.root.addEventListener("cut",(e=>this.onCaptureCopy(e,!0))),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],hp.concat(this.options.matchers??[]).forEach((e=>{let[t,n]=e;this.addMatcher(t,n)}))}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:n}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r[If.blotName])return(new Ah).insert(n||"",{[If.blotName]:r[If.blotName]});if(!t)return(new Ah).insert(n||"",r);const a=this.convertHTML(t);return vp(a,"\n")&&(null==a.ops[a.ops.length-1].attributes||r.table)?a.compose((new Ah).retain(a.length()-1).delete(1)):a}normalizeHTML(e){(e=>{e.documentElement&&up.forEach((t=>{t(e)}))})(e)}convertHTML(e){const t=(new DOMParser).parseFromString(e,"text/html");this.normalizeHTML(t);const n=t.body,r=new WeakMap,[a,i]=this.prepareMatching(n,r);return Ep(this.quill.scroll,n,a,i,r)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vf.sources.API;if("string"==typeof e){const n=this.convert({html:e,text:""});this.quill.setContents(n,t),this.quill.setSelection(0,vf.sources.SILENT)}else{const r=this.convert({html:t,text:""});this.quill.updateContents((new Ah).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),vf.sources.SILENT)}}onCaptureCopy(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.defaultPrevented)return;e.preventDefault();const[n]=this.quill.selection.getRange();if(null==n)return;const{html:r,text:a}=this.onCopy(n,t);e.clipboardData?.setData("text/plain",a),e.clipboardData?.setData("text/html",r),t&&np({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter((e=>"#"!==e[0])).join("\n")}onCapturePaste(e){if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(null==t)return;const n=e.clipboardData?.getData("text/html");let r=e.clipboardData?.getData("text/plain");if(!n&&!r){const t=e.clipboardData?.getData("text/uri-list");t&&(r=this.normalizeURIList(t))}const a=Array.from(e.clipboardData?.files||[]);if(!n&&a.length>0)this.quill.uploader.upload(t,a);else{if(n&&a.length>0){const e=(new DOMParser).parseFromString(n,"text/html");if(1===e.body.childElementCount&&"IMG"===e.body.firstElementChild?.tagName)return void this.quill.uploader.upload(t,a)}this.onPaste(t,{html:n,text:r})}}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:r}=t;const a=this.quill.getFormat(e.index),i=this.convert({text:n,html:r},a);dp.log("onPaste",i,{text:n,html:r});const o=(new Ah).retain(e.index).delete(e.length).concat(i);this.quill.updateContents(o,vf.sources.USER),this.quill.setSelection(o.length()-e.length,vf.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const n=[],r=[];return this.matchers.forEach((a=>{const[i,o]=a;switch(i){case Node.TEXT_NODE:r.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(e.querySelectorAll(i)).forEach((e=>{if(t.has(e)){const n=t.get(e);n?.push(o)}else t.set(e,[o])}))}})),[n,r]}},"modules/history":class extends af{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(e,t){super(e,t),this.quill.on(vf.events.EDITOR_CHANGE,((e,t,n,r)=>{e===vf.events.SELECTION_CHANGE?t&&r!==vf.sources.SILENT&&(this.currentRange=t):e===vf.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&r!==vf.sources.USER?this.transform(t):this.record(t,n)),this.currentRange=kp(this.currentRange,t))})),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",(e=>{"historyUndo"===e.inputType?(this.undo(),e.preventDefault()):"historyRedo"===e.inputType&&(this.redo(),e.preventDefault())}))}change(e,t){if(0===this.stack[e].length)return;const n=this.stack[e].pop();if(!n)return;const r=this.quill.getContents(),a=n.delta.invert(r);this.stack[t].push({delta:a,range:kp(n.range,a)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,vf.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,t){if(0===e.ops.length)return;this.stack.redo=[];let n=e.invert(t),r=this.currentRange;const a=Date.now();if(this.lastRecorded+this.options.delay>a&&this.stack.undo.length>0){const e=this.stack.undo.pop();e&&(n=n.compose(e.delta),r=e.range)}else this.lastRecorded=a;0!==n.length()&&(this.stack.undo.push({delta:n,range:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){Np(this.stack.undo,e),Np(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,vf.sources.USER);else{const t=function(e,t){const n=t.reduce(((e,t)=>e+(t.delete||0)),0);let r=t.length()-n;(function(e,t){const n=t.ops[t.ops.length-1];if(null==n)return!1;if(null!=n.insert)return"string"==typeof n.insert&&n.insert.endsWith("\n");if(null!=n.attributes)return Object.keys(n.attributes).some((t=>null!=e.query(t,md.BLOCK)));return!1})(e,t)&&(r-=1);return r}(this.quill.scroll,e.delta);this.quill.setSelection(t,vf.sources.USER)}}},"modules/keyboard":Yf,"modules/uploader":Op,"modules/input":class extends af{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",(e=>{this.handleBeforeInput(e)})),/Android/i.test(navigator.userAgent)||e.on(vf.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(e){np({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===e.length)return!1;if(t){const n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents((new Ah).retain(e.index).insert(t,n),vf.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,vf.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!Lp.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||!0===t.collapsed)return;const n=function(e){if("string"==typeof e.data)return e.data;if(e.dataTransfer?.types.includes("text/plain"))return e.dataTransfer.getData("text/plain");return null}(e);if(null==n)return;const r=this.quill.selection.normalizeNative(t),a=r?this.quill.selection.normalizedToRange(r):null;a&&this.replaceText(a,n)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}},"modules/uiNode":class extends af{isListening=!1;selectionChangeDeadline=0;constructor(e,t){super(e,t),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,t){let{line:n,event:r}=t;if(!(n instanceof Td&&n.uiNode))return!0;const a="rtl"===getComputedStyle(n.domNode).direction;return!!(a&&"ArrowRight"!==r.key||!a&&"ArrowLeft"!==r.key)||(this.quill.setSelection(e.index-1,e.length+(r.shiftKey?1:0),vf.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(e=>{!e.defaultPrevented&&(e=>"ArrowLeft"===e.key||"ArrowRight"===e.key||"ArrowUp"===e.key||"ArrowDown"===e.key||"Home"===e.key||!(!Ap||"a"!==e.key||!0!==e.ctrlKey))(e)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+100,this.isListening)return;this.isListening=!0;document.addEventListener("selectionchange",(()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()}),{once:!0})}handleSelectionChange(){const e=document.getSelection();if(!e)return;const t=e.getRangeAt(0);if(!0!==t.collapsed||0!==t.startOffset)return;const n=this.quill.scroll.find(t.startContainer);if(!(n instanceof Td&&n.uiNode))return;const r=document.createRange();r.setStartAfter(n.uiNode),r.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(r)}}});const Sp=new class extends wd{add(e,t){let n=0;if("+1"===t||"-1"===t){const r=this.value(e)||0;n="+1"===t?r+1:r-1}else"number"==typeof t&&(n=t);return 0===n?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}("indent","ql-indent",{scope:md.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class jp extends Nf{}jp.blotName="list-container",jp.tagName="OL";class Mp extends Th{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){vf.register(jp)}constructor(e,t){super(e,t);const n=t.ownerDocument.createElement("span"),r=n=>{if(!e.isEnabled())return;const r=this.statics.formats(t,e);"checked"===r?(this.format("list","unchecked"),n.preventDefault()):"unchecked"===r&&(this.format("list","checked"),n.preventDefault())};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r),this.attachUI(n)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}Mp.blotName="list",Mp.tagName="LI",jp.allowedChildren=[Mp],Mp.requiredContainer=jp;class Cp extends Ch{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}let Tp=class extends Ch{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return _p(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("href",this.constructor.sanitize(t)):super.format(e,t)}};function _p(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}const Pp=["alt","height","width"];const Rp=["height","width"];const qp=new wd("code-token","hljs",{scope:md.INLINE});class Ip extends Ch{static formats(e,t){for(;null!=e&&e!==t.domNode;){if(e.classList&&e.classList.contains(If.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,n){super(e,t,n),qp.add(this.domNode,n)}format(e,t){e!==Ip.blotName?super.format(e,t):t?qp.add(this.domNode,t):(qp.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),qp.value(this.domNode)||this.unwrap()}}Ip.blotName="code-token",Ip.className="ql-token";class Dp extends If{static create(e){const t=super.create(e);return"string"==typeof e&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),Ip.blotName,!1),super.replaceWith(e,t)}}class Bp extends qf{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===Dp.blotName&&(this.forceNext=!0,this.children.forEach((n=>{n.format(e,t)})))}formatAt(e,t,n,r){n===Dp.blotName&&(this.forceNext=!0),super.formatAt(e,t,n,r)}highlight(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.children.head)return;const n=`${Array.from(this.domNode.childNodes).filter((e=>e!==this.uiNode)).map((e=>e.textContent)).join("\n")}\n`,r=Dp.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||null==this.cachedText){const t=this.children.reduce(((e,t)=>e.concat(Ph(t,!1))),new Ah),a=e(n,r);t.diff(a).reduce(((e,t)=>{let{retain:n,attributes:r}=t;return n?(r&&Object.keys(r).forEach((t=>{[Dp.blotName,Ip.blotName].includes(t)&&this.formatAt(e,n,t,r[t])})),e+n):e}),0)}this.cachedText=n,this.forceNext=!1}}html(e,t){const[n]=this.children.find(e);return`
    \n${Mh(this.code(e,t))}\n
    `}optimize(e){if(super.optimize(e),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){const e=Dp.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}}Bp.allowedChildren=[Dp],Dp.requiredContainer=Bp,Dp.allowedChildren=[Ip,qh,jh,Sh];class $p extends af{static register(){vf.register(Ip,!0),vf.register(Dp,!0),vf.register(Bp,!0)}constructor(e,t){if(super(e,t),null==this.options.hljs)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce(((e,t)=>{let{key:n}=t;return e[n]=!0,e}),{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(vf.events.SCROLL_BLOT_MOUNT,(e=>{if(!(e instanceof Bp))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach((e=>{let{key:n,label:r}=e;const a=t.ownerDocument.createElement("option");a.textContent=r,a.setAttribute("value",n),t.appendChild(a)})),t.addEventListener("change",(()=>{e.format(Dp.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)})),null==e.uiNode&&(e.attachUI(t),e.children.head&&(t.value=Dp.formats(e.children.head.domNode)))}))}initTimer(){let e=null;this.quill.on(vf.events.SCROLL_OPTIMIZE,(()=>{e&&clearTimeout(e),e=setTimeout((()=>{this.highlight(),e=null}),this.options.interval)}))}highlight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.quill.selection.composing)return;this.quill.update(vf.sources.USER);const n=this.quill.getSelection();(null==e?this.quill.scroll.descendants(Bp):[e]).forEach((e=>{e.highlight(this.highlightBlot,t)})),this.quill.update(vf.sources.SILENT),null!=n&&this.quill.setSelection(n,vf.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plain";if(t=this.languages[t]?t:"plain","plain"===t)return Mh(e).split("\n").reduce(((e,n,r)=>(0!==r&&e.insert("\n",{[If.blotName]:t}),e.insert(n))),new Ah);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(If.className),n.innerHTML=((e,t,n)=>{if("string"==typeof e.versionString){const r=e.versionString.split(".")[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value})(this.options.hljs,t,e),Ep(this.quill.scroll,n,[(e,t)=>{const n=qp.value(e);return n?t.compose((new Ah).retain(t.length(),{[Ip.blotName]:n})):t}],[(e,n)=>e.data.split("\n").reduce(((e,n,r)=>(0!==r&&e.insert("\n",{[If.blotName]:t}),e.insert(n))),n)],new WeakMap)}}$p.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class Hp extends Th{static blotName="table";static tagName="TD";static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",zp()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Hp.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class Up extends Nf{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),r=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===r.table}return!1}optimize(e){super.optimize(e),this.children.forEach((e=>{if(null==e.next)return;const t=e.formats(),n=e.next.formats();if(t.table!==n.table){const t=this.splitAfter(e);t&&t.optimize(),this.prev&&this.prev.optimize()}}))}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class Fp extends Nf{static blotName="table-body";static tagName="TBODY"}class Vp extends Nf{static blotName="table-container";static tagName="TABLE";balanceCells(){const e=this.descendants(Up),t=e.reduce(((e,t)=>Math.max(t.children.length,e)),0);e.forEach((e=>{new Array(t-e.children.length).fill(0).forEach((()=>{let t;null!=e.children.head&&(t=Hp.formats(e.children.head.domNode));const n=this.scroll.create(Hp.blotName,t);e.appendChild(n),n.optimize()}))}))}cells(e){return this.rows().map((t=>t.children.at(e)))}deleteColumn(e){const[t]=this.descendant(Fp);null!=t&&null!=t.children.head&&t.children.forEach((t=>{const n=t.children.at(e);null!=n&&n.remove()}))}insertColumn(e){const[t]=this.descendant(Fp);null!=t&&null!=t.children.head&&t.children.forEach((t=>{const n=t.children.at(e),r=Hp.formats(t.children.head.domNode),a=this.scroll.create(Hp.blotName,r);t.insertBefore(a,n)}))}insertRow(e){const[t]=this.descendant(Fp);if(null==t||null==t.children.head)return;const n=zp(),r=this.scroll.create(Up.blotName);t.children.head.children.forEach((()=>{const e=this.scroll.create(Hp.blotName,n);r.appendChild(e)}));const a=t.children.at(e);t.insertBefore(r,a)}rows(){const e=this.children.head;return null==e?[]:e.children.map((e=>e))}}function zp(){return`row-${Math.random().toString(36).slice(2,6)}`}Vp.allowedChildren=[Fp],Fp.requiredContainer=Vp,Fp.allowedChildren=[Up],Up.requiredContainer=Fp,Up.allowedChildren=[Hp],Hp.requiredContainer=Up;const Wp=Fh("quill:toolbar");class Kp extends af{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){const t=document.createElement("div");t.setAttribute("role","toolbar"),function(e,t){Array.isArray(t[0])||(t=[t]);t.forEach((t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach((e=>{if("string"==typeof e)Zp(n,e);else{const t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach((e=>{const t=document.createElement("option");!1!==e?t.setAttribute("value",String(e)):t.setAttribute("selected","selected"),r.appendChild(t)})),e.appendChild(r)}(n,t,r):Zp(n,t,r)}})),e.appendChild(n)}))}(t,this.options.container),e.container?.parentNode?.insertBefore(t,e.container),this.container=t}else"string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach((e=>{const t=this.options.handlers?.[e];t&&this.addHandler(e,t)})),Array.from(this.container.querySelectorAll("button, select")).forEach((e=>{this.attach(e)})),this.quill.on(vf.events.EDITOR_CHANGE,(()=>{const[e]=this.quill.selection.getRange();this.update(e)}))):Wp.error("Container required for toolbar",this.options)}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find((e=>0===e.indexOf("ql-")));if(!t)return;if(t=t.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[t]&&null==this.quill.scroll.query(t))return void Wp.warn("ignoring attaching to nonexistent format",t,e);const n="SELECT"===e.tagName?"change":"click";e.addEventListener(n,(n=>{let r;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;const t=e.options[e.selectedIndex];r=!t.hasAttribute("selected")&&(t.value||!1)}else r=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),n.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(null!=this.handlers[t])this.handlers[t].call(this,r);else if(this.quill.scroll.query(t).prototype instanceof Bd){if(r=prompt(`Enter ${t}`),!r)return;this.quill.updateContents((new Ah).retain(a.index).delete(a.length).insert({[t]:r}),vf.sources.USER)}else this.quill.format(t,r,vf.sources.USER);this.update(a)})),this.controls.push([t,e])}update(e){const t=null==e?{}:this.quill.getFormat(e);this.controls.forEach((n=>{const[r,a]=n;if("SELECT"===a.tagName){let n=null;if(null==e)n=null;else if(null==t[r])n=a.querySelector("option[selected]");else if(!Array.isArray(t[r])){let e=t[r];"string"==typeof e&&(e=e.replace(/"/g,'\\"')),n=a.querySelector(`option[value="${e}"]`)}null==n?(a.value="",a.selectedIndex=-1):n.selected=!0}else if(null==e)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){const e=t[r],n=e===a.getAttribute("value")||null!=e&&e.toString()===a.getAttribute("value")||null==e&&!a.getAttribute("value");a.classList.toggle("ql-active",n),a.setAttribute("aria-pressed",n.toString())}else{const e=null!=t[r];a.classList.toggle("ql-active",e),a.setAttribute("aria-pressed",e.toString())}}))}}function Zp(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),null!=n?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}Kp.DEFAULTS={},Kp.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(null!=e)if(0===e.length){const e=this.quill.getFormat();Object.keys(e).forEach((e=>{null!=this.quill.scroll.query(e,md.INLINE)&&this.quill.format(e,!1,vf.sources.USER)}))}else this.quill.removeFormat(e.index,e.length,vf.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();"rtl"===e&&null==t?this.quill.format("align","right",vf.sources.USER):e||"right"!==t||this.quill.format("align",!1,vf.sources.USER),this.quill.format("direction",e,vf.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if("+1"===e||"-1"===e){let t="+1"===e?1:-1;"rtl"===n.direction&&(t*=-1),this.quill.format("indent",r+t,vf.sources.USER)}},link(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,vf.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,vf.sources.USER):this.quill.format("list","unchecked",vf.sources.USER):this.quill.format("list",e,vf.sources.USER)}}};const Gp='';var Yp={align:{"":'',center:'',right:'',justify:''},background:'',blockquote:'',bold:'',clean:'',code:Gp,"code-block":Gp,color:'',direction:{"":'',rtl:''},formula:'',header:{1:'',2:'',3:'',4:'',5:'',6:''},italic:'',image:'',indent:{"+1":'',"-1":''},link:'',list:{bullet:'',check:'',ordered:''},script:{sub:'',super:''},strike:'',table:'',underline:'',video:''};let Xp=0;function Jp(e,t){e.setAttribute(t,`${!("true"===e.getAttribute(t))}`)}class Qp{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(()=>{this.togglePicker()})),this.label.addEventListener("keydown",(e=>{switch(e.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Jp(this.label,"aria-expanded"),Jp(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",(()=>{this.selectItem(t,!0)})),t.addEventListener("keydown",(e=>{switch(e.key){case"Enter":this.selectItem(t,!0),e.preventDefault();break;case"Escape":this.escape(),e.preventDefault()}})),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML='',e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Xp}`,Xp+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach((t=>{const n=this.buildItem(t);e.appendChild(n),!0===t.selected&&this.selectItem(n)})),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach((e=>{this.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout((()=>this.label.focus()),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.container.querySelector(".ql-selected");e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);const t=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class em extends Qp{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach((e=>{e.classList.add("ql-primary")}))}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),r=e&&e.getAttribute("data-value")||"";n&&("line"===n.tagName?n.style.stroke=r:n.style.fill=r)}}class tm extends Qp{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach((e=>{e.innerHTML=t[e.getAttribute("data-value")||""]})),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(null!=n){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}class nm{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,(e=>{const{overflowY:t}=getComputedStyle(e,null);return"visible"!==t&&"clip"!==t})(this.quill.root)&&this.quill.root.addEventListener("scroll",(()=>{this.root.style.marginTop=-1*this.quill.root.scrollTop+"px"})),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const r=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect();let i=0;if(a.right>r.right&&(i=r.right-a.right,this.root.style.left=`${t+i}px`),a.leftr.bottom){const t=a.bottom-a.top,r=e.bottom-e.top+t;this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")}return i}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const rm=[!1,"center","right","justify"],am=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],im=[!1,"serif","monospace"],om=["1","2","3",!1],sm=["small",!1,"large","huge"];class lm extends cf{constructor(e,t){super(e,t);const n=t=>{document.body.contains(e.root)?(null==this.tooltip||this.tooltip.root.contains(t.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach((e=>{e.container.contains(t.target)||e.close()}))):document.body.removeEventListener("click",n)};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return"toolbar"===e&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach((e=>{(e.getAttribute("class")||"").split(/\s+/).forEach((n=>{if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{const r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}}))}))}buildPickers(e,t){this.pickers=Array.from(e).map((e=>{if(e.classList.contains("ql-align")&&(null==e.querySelector("option")&&um(e,rm),"object"==typeof t.align))return new tm(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){const n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&um(e,am,"background"===n?"#ffffff":"#000000"),new em(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?um(e,im):e.classList.contains("ql-header")?um(e,om):e.classList.contains("ql-size")&&um(e,sm)),new Qp(e)}));this.quill.on(zh.events.EDITOR_CHANGE,(()=>{this.pickers.forEach((e=>{e.update()}))}))}}lm.DEFAULTS=pd({},cf.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");null==e&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",(()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""})),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class cm extends nm{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",(e=>{"Enter"===e.key?(this.save(),e.preventDefault()):"Escape"===e.key&&(this.cancel(),e.preventDefault())}))}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);null!=n&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,zh.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,zh.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=function(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(t)return`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`;if(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`;return e}(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(null!=t){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,zh.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(n+1," ",zh.sources.USER),this.quill.setSelection(n+2,zh.sources.USER)}break}}this.textbox.value="",this.hide()}}function um(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((t=>{const r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",String(t)),e.appendChild(r)}))}const dm=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class hm extends cm{static TEMPLATE=['','
    ','','',"
    "].join("");constructor(e,t){super(e,t),this.quill.on(zh.events.EDITOR_CHANGE,((e,t,n,r)=>{if(e===zh.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&r===zh.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const e=this.quill.getLines(t.index,t.length);if(1===e.length){const e=this.quill.getBounds(t);null!=e&&this.position(e)}else{const n=e[e.length-1],r=this.quill.getIndex(n),a=Math.min(n.length()-1,t.index+t.length-r),i=this.quill.getBounds(new Kh(r,a));null!=i&&this.position(i)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()}))}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",(()=>{this.root.classList.remove("ql-editing")})),this.quill.on(zh.events.SCROLL_OPTIMIZE,(()=>{setTimeout((()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(null!=e){const t=this.quill.getBounds(e);null!=t&&this.position(t)}}),1)}))}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",0!==t&&(n.style.marginLeft=-1*t-n.offsetWidth/2+"px"),t}}class fm extends lm{constructor(e,t){null!=t.modules.toolbar&&null==t.modules.toolbar.container&&(t.modules.toolbar.container=dm),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new hm(this.quill,this.options.bounds),null!=e.container&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Yp),this.buildPickers(e.container.querySelectorAll("select"),Yp))}}fm.DEFAULTS=pd({},lm.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,vf.sources.USER)}}}}});const pm=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class mm extends cm{static TEMPLATE=['','','',''].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",(e=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(e=>{if(null!=this.linkRange){const e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,"link",!1,zh.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()})),this.quill.on(zh.events.SELECTION_CHANGE,((e,t,n)=>{if(null!=e){if(0===e.length&&n===zh.sources.USER){const[t,n]=this.quill.scroll.descendant(Tp,e.index);if(null!=t){this.linkRange=new Kh(e.index-n,t.length());const r=Tp.formats(t.domNode);this.preview.textContent=r,this.preview.setAttribute("href",r),this.show();const a=this.quill.getBounds(this.linkRange);return void(null!=a&&this.position(a))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}class vm extends lm{constructor(e,t){null!=t.modules.toolbar&&null==t.modules.toolbar.container&&(t.modules.toolbar.container=pm),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){null!=e.container&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Yp),this.buildPickers(e.container.querySelectorAll("select"),Yp),this.tooltip=new mm(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},((t,n)=>{e.handlers.link.call(e,!n.format.link)})))}}vm.DEFAULTS=pd({},lm.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const e=this.quill.getSelection();if(null==e||0===e.length)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&0!==t.indexOf("mailto:")&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,vf.sources.USER)}}}}}),vf.register({"attributors/attribute/direction":$f,"attributors/class/align":jf,"attributors/class/background":Pf,"attributors/class/color":Tf,"attributors/class/direction":Hf,"attributors/class/font":Vf,"attributors/class/size":Wf,"attributors/style/align":Mf,"attributors/style/background":Rf,"attributors/style/color":_f,"attributors/style/direction":Uf,"attributors/style/font":zf,"attributors/style/size":Kf},!0),vf.register({"formats/align":jf,"formats/direction":Hf,"formats/indent":Sp,"formats/background":Rf,"formats/color":_f,"formats/font":Vf,"formats/size":Wf,"formats/blockquote":class extends Th{static blotName="blockquote";static tagName="blockquote"},"formats/code-block":If,"formats/header":class extends Th{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(e){return this.tagName.indexOf(e.tagName)+1}},"formats/list":Mp,"formats/bold":Cp,"formats/code":Df,"formats/italic":class extends Cp{static blotName="italic";static tagName=["EM","I"]},"formats/link":Tp,"formats/script":class extends Ch{static blotName="script";static tagName=["SUB","SUP"];static create(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):super.create(e)}static formats(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}},"formats/strike":class extends Cp{static blotName="strike";static tagName=["S","STRIKE"]},"formats/underline":class extends Ch{static blotName="underline";static tagName="U"},"formats/formula":class extends sf{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(e){if(null==window.katex)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return"string"==typeof e&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`${e}`}},"formats/image":class extends Bd{static blotName="image";static tagName="IMG";static create(e){const t=super.create(e);return"string"==typeof e&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Pp.reduce(((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t)),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return _p(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){Pp.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}},"formats/video":class extends _h{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Rp.reduce(((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t)),{})}static sanitize(e){return Tp.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Rp.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`${e}`}},"modules/syntax":$p,"modules/table":class extends af{static register(){vf.register(Hp),vf.register(Up),vf.register(Fp),vf.register(Vp)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Vp).forEach((e=>{e.balanceCells()}))}deleteColumn(){const[e,,t]=this.getTable();null!=t&&(e.deleteColumn(t.cellOffset()),this.quill.update(vf.sources.USER))}deleteRow(){const[,e]=this.getTable();null!=e&&(e.remove(),this.quill.update(vf.sources.USER))}deleteTable(){const[e]=this.getTable();if(null==e)return;const t=e.offset();e.remove(),this.quill.update(vf.sources.USER),this.quill.setSelection(t,vf.sources.SILENT)}getTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(null==e)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(null==t||t.statics.blotName!==Hp.blotName)return[null,null,null,-1];const r=t.parent;return[r.parent.parent,r,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,r,a]=this.getTable(t);if(null==a)return;const i=a.cellOffset();n.insertColumn(i+e),this.quill.update(vf.sources.USER);let o=r.rowOffset();0===e&&(o+=1),this.quill.setSelection(t.index+o,t.length,vf.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,r,a]=this.getTable(t);if(null==a)return;const i=r.rowOffset();n.insertRow(i+e),this.quill.update(vf.sources.USER),e>0?this.quill.setSelection(t,vf.sources.SILENT):this.quill.setSelection(t.index+r.children.length,t.length,vf.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(null==n)return;const r=new Array(e).fill(0).reduce((e=>{const n=new Array(t).fill("\n").join("");return e.insert(n,{table:zp()})}),(new Ah).retain(n.index));this.quill.updateContents(r,vf.sources.USER),this.quill.setSelection(n.index,vf.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(vf.events.SCROLL_OPTIMIZE,(e=>{e.some((e=>!!["TD","TR","TBODY","TABLE"].includes(e.target.tagName)&&(this.quill.once(vf.events.TEXT_CHANGE,((e,t,n)=>{n===vf.sources.USER&&this.balanceTables()})),!0)))}))}},"modules/toolbar":Kp,"themes/bubble":fm,"themes/snow":vm,"ui/icons":Yp,"ui/picker":Qp,"ui/icon-picker":tm,"ui/color-picker":em,"ui/tooltip":nm},!0);var gm=function(e){var n=e.className,r=w(e,["className"]);return t.createElement(hi.Control,E({as:"input",type:"datetime-local",className:n},r))};function bm(e){return bm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bm(e)}function ym(e){var t=function(e,t){if("object"!=bm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bm(t)?t:String(t)}function Em(e,t,n){return(t=ym(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wm(e,t){if(null==e)return{};var n,r,a=A(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}gm.Feedback=Da;var xm=NaN,Nm="[object Symbol]",km=/^\s+|\s+$/g,Om=/^[-+]0x[0-9a-f]+$/i,Lm=/^0b[01]+$/i,Am=/^0o[0-7]+$/i,Sm=parseInt,jm="object"==typeof x&&x&&x.Object===Object&&x,Mm="object"==typeof self&&self&&self.Object===Object&&self,Cm=jm||Mm||Function("return this")(),Tm=Object.prototype.toString,_m=Math.max,Pm=Math.min,Rm=function(){return Cm.Date.now()};function qm(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Im(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Tm.call(e)==Nm}(e))return xm;if(qm(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qm(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(km,"");var n=Lm.test(e);return n||Am.test(e)?Sm(e.slice(2),n?2:8):Om.test(e)?xm:+e}var Dm=function(e,t,n){var r,a,i,o,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,i=a;return r=a=void 0,c=t,o=e.apply(i,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=Rm();if(p(e))return v(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Pm(n,i-(e-c)):n}(e))}function v(e){return s=void 0,h&&r?f(e):(r=a=void 0,o)}function g(){var e=Rm(),n=p(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):o}(l);if(d)return s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),o}return t=Im(t)||0,qm(n)&&(u=!!n.leading,i=(d="maxWait"in n)?_m(Im(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),g.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=a=s=void 0},g.flush=function(){return void 0===s?o:v(Rm())},g},Bm=N(Dm),$m="label";function Hm(e){return"string"==typeof e?e:$m}function Um(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Fm=0;function Vm(e){return"function"==typeof e}function zm(e){return"string"==typeof e}function Wm(){}function Km(e,t){var n={};return t.forEach((function(t){n[t]=e[t]})),n}function Zm(e,t){return zm(e)||!Um(e,"paginationOption")&&!Um(e,"customOption")?(n=Vm(t)?t(e):zm(e)?e:e[t],zm(n)||("production"!==process.env.NODE_ENV?M(!1,"One or more options does not have a valid label string. Check the `labelKey` prop to ensure that it matches the correct option key and provides a string for filtering and display."):M(!1)),n):e[Hm(t)];var n}var Gm=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;0!=a--;){var o=i[a];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n},Ym=N(Gm);function Xm(e,t){if(!zm(e))return e[t]}var Jm=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹÐ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}].reduce((function(e,t){var n=t.base;return t.letters.split("").forEach((function(t){e[t]=n})),e}),{}),Qm="̀-ͯ",ev="゙゚";function tv(e){return e.normalize("NFD").replace(new RegExp("[".concat(Qm).concat(ev,"]"),"g"),"").replace(/[^\u0000-\u007E]/g,(function(e){return Jm[e]||e}))}var nv={};function rv(e,t){if(!e&&-1!==t.indexOf("deprecated")){if(nv[t])return;nv[t]=!0}for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a1?arguments[1]:void 0;return"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"","-item-").concat(e)}var dv=["activeIndex","id","isFocused","isMenuShown","multiple","onClick","onFocus","placeholder"];function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fv(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},d=Um(u,"className")?String(u.className):void 0;return fv(fv(fv(fv({autoComplete:"off",placeholder:l,type:"text"},u),c),{},{"aria-activedescendant":t>=0?uv(n,t):void 0,"aria-autocomplete":"both","aria-expanded":a,"aria-haspopup":"listbox","aria-multiselectable":i||void 0,"aria-owns":a?n:void 0,className:O((e={},Em(e,d||"",!i),Em(e,"focus",r),e))},i&&{inputClassName:d}),{},{onClick:o,onFocus:s,role:"combobox"})}};function mv(e){var t=e.activeItem,n=e.labelKey,r=e.multiple,a=e.selected,i=e.text;return t?Zm(t,n):!r&&a.length&&a[0]?Zm(a[0],n):i}function vv(e){var t=e.allowNew,n=e.highlightOnlyResult,r=e.results;return!(!n||t)&&(1===r.length&&!Xm(r[0],"disabled"))}function gv(e,t){var n=t[e];return!!n&&!!Xm(n,"disabled")}function bv(e,t,n){for(var r=e;gv(r,n);)r+="ArrowUp"===t?-1:1;return r}function yv(e){e.preventDefault()}function Ev(e){return"lg"===e}function wv(e){return"sm"===e}var xv=["className","isInvalid","isValid","size"];function Nv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kv(e){for(var t=1;t-1||s.length&&!o)return"";var c=Zm(n,i),u=cv(c.toLowerCase(),l.toLowerCase());return u&&0===u.start?l+c.slice(u.end,c.length):""}(e);s((function(){r||h.length||c()}));var m=n(!0);s((function(){m.current?m.current=!1:d(o)}),[o,d]);var v=Vv(Vv({},Km(e,Wv)),{},{getInputProps:pv(Vv(Vv({},Km(e,zv)),{},{onKeyDown:function(t){if(u(t),i){var n="Enter"===t.key&&vv(e),r=p&&function(e,t){var n=!1;return"ArrowRight"===e.key&&(n=!ov(e.currentTarget)||e.currentTarget.selectionStart===e.currentTarget.value.length),"Tab"===e.key&&(e.preventDefault(),n=!0),t?t(n,e):n}(t,f);(n||r)&&l(i)}},value:mv(e)}))}),g=Vv(Vv({},Km(e,Kv)),{},{hintText:p,isOnlyResult:vv(e)});return t.createElement(Hv.Provider,{value:g},Vm(a)?a(v):a)};function Gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yv(e){for(var t=1;t1&&(o=o.slice(0,1))),{activeIndex:-1,activeItem:void 0,initialItem:void 0,isFocused:!1,selected:o,showMenu:n,shownResults:a,text:s}}function Jv(e,t){return Yv(Yv({},Xv(t)),{},{isFocused:e.isFocused,selected:[],text:""})}function Qv(e){return Yv(Yv({},e),{},{isFocused:!0,showMenu:!0})}function eg(e,t){var n=Xv(t),r=n.activeIndex,a=n.activeItem,i=n.initialItem,o=n.shownResults;return Yv(Yv({},e),{},{activeIndex:r,activeItem:a,initialItem:i,showMenu:!1,shownResults:o})}function tg(e,t){return e.showMenu?eg(e,t):Yv(Yv({},e),{},{showMenu:!0})}var ng=["onChange"];function rg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ag(e){for(var t=1;t=0?e.activeItem:void 0}}))})),Em(Iv(e),"_handleActiveItemChange",(function(t){Ym(t,e.state.activeItem)||e.setState({activeItem:t})})),Em(Iv(e),"_handleBlur",(function(t){t.persist(),e.setState({isFocused:!1},(function(){return e.props.onBlur(t)}))})),Em(Iv(e),"_handleChange",(function(t){e.props.onChange&&e.props.onChange(t)})),Em(Iv(e),"_handleClear",(function(){e.inputNode&&function(e,t){var n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value");n&&n.set&&n.set.call(e,t);var r=new Event("input",{bubbles:!0});e.dispatchEvent(r)}(e.inputNode,""),e.setState(Jv,(function(){e.props.multiple&&e._handleChange([])}))})),Em(Iv(e),"_handleClick",(function(t){var n;t.persist();var r=null===(n=e.props.inputProps)||void 0===n?void 0:n.onClick;e.setState(Qv,(function(){return Vm(r)&&r(t)}))})),Em(Iv(e),"_handleFocus",(function(t){t.persist(),e.setState(Qv,(function(){return e.props.onFocus(t)}))})),Em(Iv(e),"_handleInitialItemChange",(function(t){Ym(t,e.state.initialItem)||e.setState({initialItem:t})})),Em(Iv(e),"_handleInputChange",(function(t){t.persist();var n=t.currentTarget.value,r=e.props,a=r.multiple,i=r.onInputChange,o=e.state.selected.length&&!a;e.setState((function(e,t){var r=Xv(t),a=r.activeIndex,i=r.activeItem,s=r.shownResults;return{activeIndex:a,activeItem:i,selected:o?[]:e.selected,showMenu:!0,shownResults:s,text:n}}),(function(){i(n,t),o&&e._handleChange([])}))})),Em(Iv(e),"_handleKeyDown",(function(t){var n,r,a,i,o=e.state.activeItem;if(!e.isMenuShown)return"ArrowUp"!==t.key&&"ArrowDown"!==t.key||e.setState({showMenu:!0}),void e.props.onKeyDown(t);switch(t.key){case"ArrowUp":case"ArrowDown":t.preventDefault(),e._handleActiveIndexChange((n=e.state.activeIndex,r=t.key,a=e.items,i=n,(i=bv(i+="ArrowUp"===r?-1:1,r,a))===a.length?i=-1:-2===i&&(i=bv(i=a.length-1,r,a)),i));break;case"Enter":t.preventDefault(),o&&e._handleMenuItemSelect(o,t);break;case"Escape":case"Tab":e.hideMenu()}e.props.onKeyDown(t)})),Em(Iv(e),"_handleMenuItemSelect",(function(t,n){Xm(t,"paginationOption")?e._handlePaginate(n):e._handleSelectionAdd(t)})),Em(Iv(e),"_handlePaginate",(function(t){t.persist(),e.setState((function(e,t){return{shownResults:e.shownResults+t.maxResults}}),(function(){return e.props.onPaginate(t,e.state.shownResults)}))})),Em(Iv(e),"_handleSelectionAdd",(function(t){var n,r,a,i=e.props,o=i.multiple,s=i.labelKey,l=t;!zm(l)&&l.customOption&&(l=ag(ag({},l),{},{id:(a="new-id-",Fm+=1,(null==a?"":String(a))+Fm)})),o?(n=e.state.selected.concat(l),r=""):(n=[l],r=Zm(l,s)),e.setState((function(e,t){return ag(ag({},eg(e,t)),{},{initialItem:l,selected:n,text:r})}),(function(){return e._handleChange(n)}))})),Em(Iv(e),"_handleSelectionRemove",(function(t){var n=e.state.selected.filter((function(e){return!Ym(e,t)}));e.focus(),e.setState((function(e,t){return ag(ag({},eg(e,t)),{},{selected:n})}),(function(){return e._handleChange(n)}))})),e}return qv(r,[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.focus()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.labelKey,a=n.multiple,i=n.selected;!function(e,t){var n,r,a,i=!e&&t;i?(n="uncontrolled",r="controlled",a="an"):(n="controlled",r="uncontrolled",a="a"),rv(!(i||e&&!t),"You are changing ".concat(a," ").concat(n," typeahead to be ").concat(r,". ")+"Input elements should not switch from ".concat(n," to ").concat(r," (or vice versa). ")+"Decide between using a controlled or uncontrolled element for the lifetime of the component.")}(i,e.selected),i&&!Ym(i,t.selected)&&(this.setState({selected:i}),a||this.setState({text:i.length?Zm(i[0],r):""}))}},{key:"render",value:function(){var e=this.props;e.onChange;var n=ag(ag({},wm(e,ng)),this.state),r=n.filterBy,a=n.labelKey,i=n.options,o=n.paginate,s=n.shownResults,l=n.text;this.isMenuShown=function(e){var t=e.open,n=e.minLength,r=e.showMenu,a=e.text;return t||!1===t?t:!(a.lengths;if(c=function(e,t){return!t||t>=e.length?e:e.slice(0,t)}(c,s),function(e,t){var n=t.allowNew,r=t.labelKey,a=t.text;return!(!n||!a.trim())&&(Vm(n)?n(e,t):!e.some((function(e){return Zm(e,r)===a})))}(c,n)&&c.push(Em({customOption:!0},Hm(a),l)),h)c.push((Em(d={},Hm(a),""),Em(d,"paginationOption",!0),d))}return t.createElement(Zv,L({},n,{hideMenu:this.hideMenu,inputNode:this.inputNode,inputRef:this.inputRef,isMenuShown:this.isMenuShown,onActiveItemChange:this._handleActiveItemChange,onAdd:this._handleSelectionAdd,onBlur:this._handleBlur,onChange:this._handleInputChange,onClear:this._handleClear,onClick:this._handleClick,onFocus:this._handleFocus,onHide:this.hideMenu,onInitialItemChange:this._handleInitialItemChange,onKeyDown:this._handleKeyDown,onMenuItemClick:this._handleMenuItemSelect,onRemove:this._handleSelectionRemove,results:c,setItem:this.setItem,toggleMenu:this.toggleMenu}))}}]),r}();Em(lg,"propTypes",og),Em(lg,"defaultProps",sg);var cg=["className","label","onClick","onKeyDown","size"],ug={label:be.string,onClick:be.func,onKeyDown:be.func,size:Av},dg=function(e){var n=e.className,r=e.label,a=void 0===r?"Clear":r,i=e.onClick,o=e.onKeyDown,s=e.size,l=wm(e,cg);return t.createElement("button",L({},l,{"aria-label":a,className:O("close","btn-close","rbt-close",{"rbt-close-lg":Ev(s),"rbt-close-sm":wv(s)},n),onClick:function(e){e.stopPropagation(),i&&i(e)},onKeyDown:function(e){"Backspace"===e.key&&e.preventDefault(),o&&o(e)},type:"button"}),t.createElement("span",{"aria-hidden":"true",className:"rbt-close-content"},"×"),t.createElement("span",{className:"sr-only visually-hidden"},a))};dg.propTypes=ug;var hg={label:be.string},fg=function(e){var n=e.label,r=void 0===n?"Loading...":n;return t.createElement("div",{className:"rbt-loader spinner-border spinner-border-sm",role:"status"},t.createElement("span",{className:"sr-only visually-hidden"},r))};function pg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:"";return n&&(n=n.replace(n[0],n[0].toUpperCase())),["Top","Right","Bottom","Left"].map((function(r){return e["".concat(t).concat(r).concat(n)]})).join(" ")}var tb=function(){var e=Uv(),t=e.hintText,r=e.inputNode,a=n(null);return s((function(){r&&a.current&&function(e,t){var n=window.getComputedStyle(e);t.style.borderStyle=eb(n,"border","style"),t.style.borderWidth=eb(n,"border","width"),t.style.fontSize=n.fontSize,t.style.fontWeight=n.fontWeight,t.style.height=n.height,t.style.lineHeight=n.lineHeight,t.style.margin=eb(n,"margin"),t.style.padding=eb(n,"padding")}(r,a.current)})),{hintRef:a,hintText:t}},nb=function(e){var n=e.children,r=e.className,a=tb(),i=a.hintRef,o=a.hintText;return t.createElement("div",{className:r,style:{display:"flex",flex:1,height:"100%",position:"relative"}},n,t.createElement("input",{"aria-hidden":!0,className:"rbt-input-hint",ref:i,readOnly:!0,style:{backgroundColor:"transparent",borderColor:"transparent",boxShadow:"none",color:"rgba(0, 0, 0, 0.54)",left:0,pointerEvents:"none",position:"absolute",top:0,width:"100%"},tabIndex:-1,value:o}))},rb=h((function(e,n){return t.createElement("input",L({},e,{className:O("rbt-input-main",e.className),ref:n}))})),ab=["children","className","inputClassName","inputRef","referenceElementRef","selected"];function ib(e){var n=t.useRef(null),r=t.useRef(null),a=Ov(e),i=a.children,o=a.className,s=a.inputClassName;a.inputRef;var l=a.referenceElementRef,c=a.selected,u=wm(a,ab);function d(t){if(e.disabled)t.currentTarget.blur();else{var n=r.current;!n||t.currentTarget.contains(t.target)&&t.currentTarget!==t.target||(ov(n)&&(n.selectionStart=n.value.length),n.focus())}}return t.createElement("div",{className:O("rbt-input-multi",{disabled:e.disabled},o),onClick:d,onFocus:d,ref:l,tabIndex:-1},t.createElement("div",{className:"rbt-input-wrapper",ref:n},i,t.createElement(nb,null,t.createElement(rb,L({},u,{className:s,onKeyDown:function(t){if("Backspace"===t.key&&c.length&&!e.value){var r;t.preventDefault();var a=null===(r=n.current)||void 0===r?void 0:r.children;if(null!=a&&a.length){var i=a[a.length-2];null==i||i.focus()}}e.onKeyDown&&e.onKeyDown(t)},ref:function(t){r.current=t,e.inputRef(t)},style:{backgroundColor:"transparent",border:0,boxShadow:"none",cursor:"inherit",outline:"none",padding:0,width:"100%",zIndex:1}})))))}var ob=["inputRef","referenceElementRef"],sb=function(e){var n=e.inputRef,r=e.referenceElementRef,a=wm(e,ob);return t.createElement(nb,null,t.createElement(rb,L({},Ov(a),{ref:function(e){n(e),r(e)}})))},lb={children:be.string.isRequired,highlightClassName:be.string,search:be.string.isRequired},cb=function(e){var n=e.children,r=e.highlightClassName,a=void 0===r?"rbt-highlight-text":r,i=e.search;if(!i||!n)return t.createElement(t.Fragment,null,n);for(var o=0,s=n,l=[];s;){var c=cv(s,i);if(!c){l.push(s);break}var u=s.slice(0,c.start);u&&l.push(u);var d=s.slice(c.start,c.end);l.push(t.createElement("mark",{className:a,key:o},d)),o+=1,s=s.slice(c.end)}return t.createElement(t.Fragment,null,l)};cb.propTypes=lb;const ub=e=>"object"==typeof e&&null!=e&&1===e.nodeType,db=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,hb=(e,t)=>{if(e.clientHeight{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeightit||i>e&&o=t&&s>=n?i-e-r:o>t&&sn?o-t+a:0,pb=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},mb=(e,t)=>{var n,r,a,i;if("undefined"==typeof document)return[];const{scrollMode:o,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=t,d="function"==typeof c?c:e=>e!==c;if(!ub(e))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,f=[];let p=e;for(;ub(p)&&d(p);){if(p=pb(p),p===h){f.push(p);break}null!=p&&p===document.body&&hb(p)&&!hb(document.documentElement)||null!=p&&hb(p,u)&&f.push(p)}const m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(a=window.visualViewport)?void 0:a.height)?i:innerHeight,{scrollX:g,scrollY:b}=window,{height:y,width:E,top:w,right:x,bottom:N,left:k}=e.getBoundingClientRect(),{top:O,right:L,bottom:A,left:S}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let j="start"===s||"nearest"===s?w-O:"end"===s?N+A:w+y/2-O+A,M="center"===l?k+E/2-S+L:"end"===l?x+L:k-S;const C=[];for(let e=0;e=0&&k>=0&&N<=v&&x<=m&&w>=a&&N<=c&&k>=u&&x<=i)return C;const d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),O=parseInt(d.borderTopWidth,10),L=parseInt(d.borderRightWidth,10),A=parseInt(d.borderBottomWidth,10);let S=0,T=0;const _="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-L:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-O-A:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,q="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(h===t)S="start"===s?j:"end"===s?j-v:"nearest"===s?fb(b,b+v,v,O,A,b+j,b+j+y,y):j-v/2,T="start"===l?M:"center"===l?M-m/2:"end"===l?M-m:fb(g,g+m,m,p,L,g+M,g+M+E,E),S=Math.max(0,S+b),T=Math.max(0,T+g);else{S="start"===s?j-a-O:"end"===s?j-c+A+P:"nearest"===s?fb(a,c,n,O,A+P,j,j+y,y):j-(a+n/2)+P/2,T="start"===l?M-u-p:"center"===l?M-(u+r/2)+_/2:"end"===l?M-i+L+_:fb(u,i,r,p,L+_,M,M+E,E);const{scrollLeft:e,scrollTop:o}=t;S=0===q?0:Math.max(0,Math.min(o+S/q,t.scrollHeight-n/q+P)),T=0===R?0:Math.max(0,Math.min(e+T/R,t.scrollWidth-r/R+_)),j+=o-S,M+=e-T}C.push({el:t,top:S,left:T})}return C},vb=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};var gb=["label","onClick","option","position"];function bb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yb(e){for(var t=1;t{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(mb(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:a,top:i,left:o}of mb(e,vb(t))){const e=i-n.top+n.bottom,t=o-n.left+n.right;a.scroll({top:e,left:t,behavior:r})}}(e,{boundary:e.parentNode,scrollMode:"if-needed"})}}),[u,f,i,o]);var b=a((function(e){m(i,e),r&&r(e)}),[r,m,i]),y=h||u===o;return v(i,o),yb(yb({},l),{},{active:y,"aria-label":t,"aria-selected":y,id:uv(d,o),onClick:b,onMouseDown:yv,ref:g,role:"option"})}Mv.isRequired,be.number;var wb=["active","children","className","disabled","onClick"],xb=h((function(e,n){var r=e.active,a=e.children,i=e.className,o=e.disabled,s=e.onClick,l=wm(e,wb);return t.createElement("a",L({},l,{className:O("dropdown-item",{active:r,disabled:o},i),href:l.href||"#",onClick:function(e){e.preventDefault(),!o&&s&&s(e)},ref:n}),a)}));function Nb(e){return t.createElement(xb,Eb(e))}var kb=["emptyLabel","innerRef","maxHeight","style"];function Ob(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lb(e){for(var t=1;t1?"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]).":"Invalid argument supplied to oneOf, expected an array."),o)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return m((function(t,r,a,i,o){var s=t[r],l=y(s);if("object"!==l)return new p("Invalid "+i+" `"+o+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(a,i,o,c,E(u));var d=u(s,c,a,i,o+"."+c,n);if(d)return d}return null}))},exact:function(e){return m((function(a,i,o,s,l){var c=a[i],u=y(c);if("object"!==u)return new p("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+o+"`, expected `object`.");var d=t({},a[i],e);for(var h in d){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(o,s,l,h,E(f));if(!f)return new p("Invalid "+s+" `"+l+"` key `"+h+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(a[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,o,s,l+"."+h,n);if(m)return m}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function m(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function a(a,o,s,c,u,h,f){if(c=c||d,h=h||s,f!==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}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=c+":"+s;!t[v]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. 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."),t[v]=!0,r++)}}return null==o[s]?a?null===o[s]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(o,s,c,u,h)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function v(e){return m((function(t,n,r,a,i,o){var s=t[n];return y(s)!==e?new p("Invalid "+a+" `"+i+"` of type `"+E(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,a){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e[u]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var a=n.value;if(a&&!b(a[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function E(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=E(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},le}()(ge.isElement,!0)}else G.exports=function(){if(de)return ue;de=1;var e=me();function t(){}function n(){}return n.resetWarningCache=t,ue=function(){function r(t,n,r,a,i,o){if(o!==e){var s=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 s.name="Invariant Violation",s}}function a(){return r}r.isRequired=r;var i={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 i.PropTypes=i,i}}()();var be=N(G.exports),ye=!1,Ee="production"!==process.env.NODE_ENV?be.oneOfType([be.number,be.shape({enter:be.number,exit:be.number,appear:be.number}).isRequired]):null;"production"!==process.env.NODE_ENV&&be.oneOfType([be.string,be.shape({enter:be.string,exit:be.string,active:be.string}),be.shape({enter:be.string,enterDone:be.string,enterActive:be.string,exit:be.string,exitDone:be.string,exitActive:be.string})]);var we=t.createContext(null),xe="unmounted",Ne="exited",ke="entering",Oe="entered",Le="exiting",Ae=function(e){var n,r;function a(t,n){var r;r=e.call(this,t,n)||this;var a,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(a=Ne,r.appearStatus=ke):a=Oe:a=t.unmountOnExit||t.mountOnEnter?xe:Ne,r.state={status:a},r.nextCallback=null,r}r=e,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,R(n,r),a.getDerivedStateFromProps=function(e,t){return e.in&&t.status===xe?{status:Ne}:null};var i=a.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==ke&&n!==Oe&&(t=ke):n!==ke&&n!==Oe||(t=Le)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===ke){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:y.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ne&&this.setState({status:xe})},i.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,a=this.props.nodeRef?[r]:[y.findDOMNode(this),r],i=a[0],o=a[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||ye?this.safeSetState({status:Oe},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,o),this.safeSetState({status:ke},(function(){t.props.onEntering(i,o),t.onTransitionEnd(l,(function(){t.safeSetState({status:Oe},(function(){t.props.onEntered(i,o)}))}))})))},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:y.findDOMNode(this);t&&!ye?(this.props.onExit(r),this.safeSetState({status:Le},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Ne},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Ne},(function(){e.props.onExited(r)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:y.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=a[0],o=a[1];this.props.addEndListener(i,o)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===xe)return null;var n=this.props,r=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var a=A(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return t.createElement(we.Provider,{value:null},"function"==typeof r?r(e,a):t.cloneElement(t.Children.only(r),a))},a}(t.Component);function Se(){}Ae.contextType=we,Ae.propTypes="production"!==process.env.NODE_ENV?{nodeRef:be.shape({current:"undefined"==typeof Element?be.any:function(e,t,n,r,a,i){var o=e[t];return be.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,a,i)}}),children:be.oneOfType([be.func.isRequired,be.element.isRequired]).isRequired,in:be.bool,mountOnEnter:be.bool,unmountOnExit:be.bool,appear:be.bool,enter:be.bool,exit:be.bool,timeout:function(e){var t=Ee;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a{n.target===e&&(a(),t(n))}),n+r)}function Be(...e){return e.filter((e=>null!=e)).reduce(((e,t)=>{if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(...n){e.apply(this,n),t.apply(this,n)}}),null)}function $e(e){e.offsetHeight}const He=e=>e&&"function"!=typeof e?t=>{e.current=t}:e;function Ue(e,t){return o((()=>function(e,t){const n=He(e),r=He(t);return e=>{n&&n(e),r&&r(e)}}(e,t)),[e,t])}function Fe(e){return e&&"setState"in e?y.findDOMNode(e):null!=e?e:null}const Ve=t.forwardRef((({onEnter:e,onEntering:r,onEntered:i,onExit:o,onExiting:s,onExited:l,addEndListener:c,children:u,childRef:d,...h},f)=>{const p=n(null),v=Ue(p,d),g=e=>{v(Fe(e))},b=e=>t=>{e&&p.current&&e(p.current,t)},y=a(b(e),[e]),E=a(b(r),[r]),w=a(b(i),[i]),x=a(b(o),[o]),N=a(b(s),[s]),k=a(b(l),[l]),O=a(b(c),[c]);return m(Ae,{ref:f,...h,onEnter:y,onEntered:w,onEntering:E,onExit:x,onExited:k,onExiting:N,addEndListener:O,nodeRef:p,children:"function"==typeof u?(e,t)=>u(e,{...t,ref:g}):t.cloneElement(u,{ref:g})})}));var ze=Ve;const We={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function Ke(e,t){const n=t[`offset${e[0].toUpperCase()}${e.slice(1)}`],r=We[e];return n+parseInt(K(t,r[0]),10)+parseInt(K(t,r[1]),10)}const Ze={[Ne]:"collapse",[Le]:"collapsing",[ke]:"collapsing",[Oe]:"collapse show"};var Ge=t.forwardRef((({onEnter:e,onEntering:n,onEntered:r,onExit:a,onExiting:i,className:s,children:l,dimension:c="height",in:u=!1,timeout:d=300,mountOnEnter:h=!1,unmountOnExit:f=!1,appear:p=!1,getDimensionValue:v=Ke,...g},b)=>{const y="function"==typeof c?c():c,E=o((()=>Be((e=>{e.style[y]="0"}),e)),[y,e]),w=o((()=>Be((e=>{const t=`scroll${y[0].toUpperCase()}${y.slice(1)}`;e.style[y]=`${e[t]}px`}),n)),[y,n]),x=o((()=>Be((e=>{e.style[y]=null}),r)),[y,r]),N=o((()=>Be((e=>{e.style[y]=`${v(y,e)}px`,$e(e)}),a)),[a,v,y]),k=o((()=>Be((e=>{e.style[y]=null}),i)),[y,i]);return m(ze,{ref:b,addEndListener:De,...g,"aria-expanded":g.role?u:null,onEnter:E,onEntering:w,onEntered:x,onExit:N,onExiting:k,childRef:l.ref,in:u,timeout:d,mountOnEnter:h,unmountOnExit:f,appear:p,children:(e,n)=>t.cloneElement(l,{...n,className:O(s,l.props.className,Ze[e],"width"===y&&"collapse-horizontal")})})}));function Ye(e){const t=function(e){const t=n(e);return s((()=>{t.current=e}),[e]),t}(e);return a((function(...e){return t.current&&t.current(...e)}),[t])}var Xe=t=>e.forwardRef(((e,n)=>m("div",{...e,ref:n,className:O(e.className,t)})));function Je(){return r(null)}function Qe(){const e=n(!0),t=n((()=>e.current));return s((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}function et(e){const t=n(null);return s((()=>{t.current=e})),t.current}const tt="undefined"!=typeof global&&global.navigator&&"ReactNative"===global.navigator.product;var nt="undefined"!=typeof document||tt?l:s;const rt=["as","disabled"];function at({tagName:e,disabled:t,href:n,target:r,rel:a,role:i,onClick:o,tabIndex:s=0,type:l}){e||(e=null!=n||null!=r||null!=a?"a":"button");const c={tagName:e};if("button"===e)return[{type:l||"button",disabled:t},c];const u=r=>{(t||"a"===e&&function(e){return!e||"#"===e.trim()}(n))&&r.preventDefault(),t?r.stopPropagation():null==o||o(r)};return"a"===e&&(n||(n="#"),t&&(n=void 0)),[{role:null!=i?i:"button",disabled:void 0,tabIndex:t?void 0:s,href:n,target:"a"===e?r:void 0,"aria-disabled":t||void 0,rel:"a"===e?a:void 0,onClick:u,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),u(e))}},c]}const it=e.forwardRef(((e,t)=>{let{as:n,disabled:r}=e,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,rt);const[i,{tagName:o}]=at(Object.assign({tagName:n,disabled:r},a));return m(o,Object.assign({},a,i,{ref:t}))}));it.displayName="Button";const ot=["onKeyDown"];const st=e.forwardRef(((e,t)=>{let{onKeyDown:n}=e,r=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,ot);const[a]=at(Object.assign({tagName:"a"},r)),i=Ye((e=>{a.onKeyDown(e),null==n||n(e)}));return(o=r.href)&&"#"!==o.trim()&&"button"!==r.role?m("a",Object.assign({ref:t},r,{onKeyDown:n})):m("a",Object.assign({ref:t},r,a,{onKeyDown:i}));var o}));st.displayName="Anchor";var lt=st;const ct={[ke]:"show",[Oe]:"show"},ut=e.forwardRef((({className:t,children:n,transitionClasses:r={},onEnter:i,...o},s)=>{const l={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},c=a(((e,t)=>{$e(e),null==i||i(e,t)}),[i]);return m(ze,{ref:s,addEndListener:De,...l,onEnter:c,childRef:n.ref,children:(a,i)=>e.cloneElement(n,{...i,className:O("fade",t,n.props.className,ct[a],r[a])})})}));ut.displayName="Fade";var dt=ut;const ht={"aria-label":be.string,onClick:be.func,variant:be.oneOf(["white"])},ft=e.forwardRef((({className:e,variant:t,"aria-label":n="Close",...r},a)=>m("button",{ref:a,type:"button",className:O("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r})));ft.displayName="CloseButton",ft.propTypes=ht;var pt=ft;const mt=e.forwardRef((({as:e,bsPrefix:t,variant:n="primary",size:r,active:a=!1,disabled:i=!1,className:o,...s},l)=>{const c=I(t,"btn"),[u,{tagName:d}]=at({tagName:e,disabled:i,...s});return m(d,{...u,...s,ref:l,disabled:i,className:O(o,c,a&&"active",n&&`${c}-${n}`,r&&`${c}-${r}`,s.href&&i&&"disabled")})}));mt.displayName="Button";var vt=mt;const gt=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"card-body"),m(n,{ref:a,className:O(e,t),...r}))));gt.displayName="CardBody";var bt=gt;const yt=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"card-footer"),m(n,{ref:a,className:O(e,t),...r}))));yt.displayName="CardFooter";var Et=yt;const wt=e.createContext(null);wt.displayName="CardHeaderContext";var xt=wt;const Nt=e.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},a)=>{const i=I(e,"card-header"),s=o((()=>({cardHeaderBsPrefix:i})),[i]);return m(xt.Provider,{value:s,children:m(n,{ref:a,...r,className:O(t,i)})})}));Nt.displayName="CardHeader";var kt=Nt;const Ot=e.forwardRef((({bsPrefix:e,className:t,variant:n,as:r="img",...a},i)=>{const o=I(e,"card-img");return m(r,{ref:i,className:O(n?`${o}-${n}`:o,t),...a})}));Ot.displayName="CardImg";var Lt=Ot;const At=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"card-img-overlay"),m(n,{ref:a,className:O(e,t),...r}))));At.displayName="CardImgOverlay";var St=At;const jt=e.forwardRef((({className:e,bsPrefix:t,as:n="a",...r},a)=>(t=I(t,"card-link"),m(n,{ref:a,className:O(e,t),...r}))));jt.displayName="CardLink";var Mt=jt;const Ct=Xe("h6"),Tt=e.forwardRef((({className:e,bsPrefix:t,as:n=Ct,...r},a)=>(t=I(t,"card-subtitle"),m(n,{ref:a,className:O(e,t),...r}))));Tt.displayName="CardSubtitle";var _t=Tt;const Pt=e.forwardRef((({className:e,bsPrefix:t,as:n="p",...r},a)=>(t=I(t,"card-text"),m(n,{ref:a,className:O(e,t),...r}))));Pt.displayName="CardText";var Rt=Pt;const qt=Xe("h5"),It=e.forwardRef((({className:e,bsPrefix:t,as:n=qt,...r},a)=>(t=I(t,"card-title"),m(n,{ref:a,className:O(e,t),...r}))));It.displayName="CardTitle";var Dt=It;const Bt=e.forwardRef((({bsPrefix:e,className:t,bg:n,text:r,border:a,body:i=!1,children:o,as:s="div",...l},c)=>{const u=I(e,"card");return m(s,{ref:c,...l,className:O(t,u,n&&`bg-${n}`,r&&`text-${r}`,a&&`border-${a}`),children:i?m(bt,{children:o}):o})}));Bt.displayName="Card";var $t=Object.assign(Bt,{Img:Lt,Title:Dt,Subtitle:_t,Body:bt,Link:Mt,Text:Rt,Header:kt,Footer:Et,ImgOverlay:St});function Ht(e){const t=function(e){const t=n(e);return t.current=e,t}(e);s((()=>()=>t.current()),[])}const Ut=2**31-1;function Ft(e,t,n){const r=n-Date.now();e.current=r<=Ut?setTimeout(t,r):setTimeout((()=>Ft(e,t,n)),Ut)}function Vt(){const e=Qe(),t=n();return Ht((()=>clearTimeout(t.current))),o((()=>{const n=()=>clearTimeout(t.current);return{set:function(r,a=0){e()&&(n(),a<=Ut?t.current=setTimeout(r,a):Ft(t,r,Date.now()+a))},clear:n,handleRef:t}}),[])}const zt=e.forwardRef(((e,t)=>{const[{className:n,...r},{as:a="div",bsPrefix:i,spans:o}]=function({as:e,bsPrefix:t,className:n,...r}){t=I(t,"col");const a=D(),i=B(),o=[],s=[];return a.forEach((e=>{const n=r[e];let a,l,c;delete r[e],"object"==typeof n&&null!=n?({span:a,offset:l,order:c}=n):a=n;const u=e!==i?`-${e}`:"";a&&o.push(!0===a?`${t}${u}`:`${t}${u}-${a}`),null!=c&&s.push(`order${u}-${c}`),null!=l&&s.push(`offset${u}-${l}`)})),[{...r,className:O(n,...o,...s)},{as:e,bsPrefix:t,spans:o}]}(e);return m(a,{...r,ref:t,className:O(n,!o.length&&i)})}));zt.displayName="Col";var Wt=zt;const Kt=e.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...a},i)=>{const o=I(e,"container");return m(n,{ref:i,...a,className:O(r,t?`${o}${"string"==typeof t?`-${t}`:"-fluid"}`:o)})}));Kt.displayName="Container";var Zt=Kt,Gt=Function.prototype.bind.call(Function.prototype.call,[].slice);function Yt(e,t){return Gt(e.querySelectorAll(t))}function Xt(){const[,e]=c((e=>!e),!1);return e}var Jt=e.createContext(null),Qt=Object.prototype.hasOwnProperty;function en(e,t,n){for(n of e.keys())if(tn(n,t))return n}function tn(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&tn(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=en(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=en(t,a)))return!1;if(!tn(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(Qt.call(e,n)&&++r&&!Qt.call(t,n))return!1;if(!(n in t)||!tn(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}var nn="top",rn="bottom",an="right",on="left",sn="auto",ln=[nn,rn,an,on],cn="start",un="end",dn="clippingParents",hn="viewport",fn="popper",pn="reference",mn=ln.reduce((function(e,t){return e.concat([t+"-"+cn,t+"-"+un])}),[]),vn=[].concat(ln,[sn]).reduce((function(e,t){return e.concat([t,t+"-"+cn,t+"-"+un])}),[]),gn=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function bn(e){return e.split("-")[0]}function yn(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function En(e){return e instanceof yn(e).Element||e instanceof Element}function wn(e){return e instanceof yn(e).HTMLElement||e instanceof HTMLElement}function xn(e){return"undefined"!=typeof ShadowRoot&&(e instanceof yn(e).ShadowRoot||e instanceof ShadowRoot)}var Nn=Math.max,kn=Math.min,On=Math.round;function Ln(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function An(){return!/^((?!chrome|android).)*safari/i.test(Ln())}function Sn(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),a=1,i=1;t&&wn(e)&&(a=e.offsetWidth>0&&On(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&On(r.height)/e.offsetHeight||1);var o=(En(e)?yn(e):window).visualViewport,s=!An()&&n,l=(r.left+(s&&o?o.offsetLeft:0))/a,c=(r.top+(s&&o?o.offsetTop:0))/i,u=r.width/a,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function jn(e){var t=Sn(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Mn(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&xn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Cn(e){return e?(e.nodeName||"").toLowerCase():null}function Tn(e){return yn(e).getComputedStyle(e)}function _n(e){return["table","td","th"].indexOf(Cn(e))>=0}function Pn(e){return((En(e)?e.ownerDocument:e.document)||window.document).documentElement}function Rn(e){return"html"===Cn(e)?e:e.assignedSlot||e.parentNode||(xn(e)?e.host:null)||Pn(e)}function qn(e){return wn(e)&&"fixed"!==Tn(e).position?e.offsetParent:null}function In(e){for(var t=yn(e),n=qn(e);n&&_n(n)&&"static"===Tn(n).position;)n=qn(n);return n&&("html"===Cn(n)||"body"===Cn(n)&&"static"===Tn(n).position)?t:n||function(e){var t=/firefox/i.test(Ln());if(/Trident/i.test(Ln())&&wn(e)&&"fixed"===Tn(e).position)return null;var n=Rn(e);for(xn(n)&&(n=n.host);wn(n)&&["html","body"].indexOf(Cn(n))<0;){var r=Tn(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Dn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bn(e,t,n){return Nn(e,kn(t,n))}function $n(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Hn(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Un={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,a=e.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,s=bn(n.placement),l=Dn(s),c=[on,an].indexOf(s)>=0?"height":"width";if(i&&o){var u=function(e,t){return $n("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Hn(e,ln))}(a.padding,n),d=jn(i),h="y"===l?nn:on,f="y"===l?rn:an,p=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],m=o[l]-n.rects.reference[l],v=In(i),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=p/2-m/2,y=u[h],E=g-d[c]-u[f],w=g/2-d[c]/2+b,x=Bn(y,w,E),N=l;n.modifiersData[r]=((t={})[N]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Mn(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fn(e){return e.split("-")[1]}var Vn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function zn(e){var t,n=e.popper,r=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=o.x,f=void 0===h?0:h,p=o.y,m=void 0===p?0:p,v="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var g=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),y=on,E=nn,w=window;if(c){var x=In(n),N="clientHeight",k="clientWidth";if(x===yn(n)&&"static"!==Tn(x=Pn(n)).position&&"absolute"===s&&(N="scrollHeight",k="scrollWidth"),a===nn||(a===on||a===an)&&i===un)E=rn,m-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[N])-r.height,m*=l?1:-1;if(a===on||(a===nn||a===rn)&&i===un)y=an,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[k])-r.width,f*=l?1:-1}var O,L=Object.assign({position:s},c&&Vn),A=!0===u?function(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:On(n*a)/a||0,y:On(r*a)/a||0}}({x:f,y:m},yn(n)):{x:f,y:m};return f=A.x,m=A.y,l?Object.assign({},L,((O={})[E]=b?"0":"",O[y]=g?"0":"",O.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",O)):Object.assign({},L,((t={})[E]=b?m+"px":"",t[y]=g?f+"px":"",t.transform="",t))}var Wn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=void 0===r||r,i=n.adaptive,o=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:bn(t.placement),variation:Fn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,zn(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,zn(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Kn={passive:!0};var Zn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,i=void 0===a||a,o=r.resize,s=void 0===o||o,l=yn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Kn)})),s&&l.addEventListener("resize",n.update,Kn),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Kn)})),s&&l.removeEventListener("resize",n.update,Kn)}},data:{}},Gn={left:"right",right:"left",bottom:"top",top:"bottom"};function Yn(e){return e.replace(/left|right|bottom|top/g,(function(e){return Gn[e]}))}var Xn={start:"end",end:"start"};function Jn(e){return e.replace(/start|end/g,(function(e){return Xn[e]}))}function Qn(e){var t=yn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function er(e){return Sn(Pn(e)).left+Qn(e).scrollLeft}function tr(e){var t=Tn(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function nr(e){return["html","body","#document"].indexOf(Cn(e))>=0?e.ownerDocument.body:wn(e)&&tr(e)?e:nr(Rn(e))}function rr(e,t){var n;void 0===t&&(t=[]);var r=nr(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),i=yn(r),o=a?[i].concat(i.visualViewport||[],tr(r)?r:[]):r,s=t.concat(o);return a?s:s.concat(rr(Rn(o)))}function ar(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ir(e,t,n){return t===hn?ar(function(e,t){var n=yn(e),r=Pn(e),a=n.visualViewport,i=r.clientWidth,o=r.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;var c=An();(c||!c&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s+er(e),y:l}}(e,n)):En(t)?function(e,t){var n=Sn(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ar(function(e){var t,n=Pn(e),r=Qn(e),a=null==(t=e.ownerDocument)?void 0:t.body,i=Nn(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=Nn(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-r.scrollLeft+er(e),l=-r.scrollTop;return"rtl"===Tn(a||n).direction&&(s+=Nn(n.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}(Pn(e)))}function or(e,t,n,r){var a="clippingParents"===t?function(e){var t=rr(Rn(e)),n=["absolute","fixed"].indexOf(Tn(e).position)>=0&&wn(e)?In(e):e;return En(n)?t.filter((function(e){return En(e)&&Mn(e,n)&&"body"!==Cn(e)})):[]}(e):[].concat(t),i=[].concat(a,[n]),o=i[0],s=i.reduce((function(t,n){var a=ir(e,n,r);return t.top=Nn(a.top,t.top),t.right=kn(a.right,t.right),t.bottom=kn(a.bottom,t.bottom),t.left=Nn(a.left,t.left),t}),ir(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function sr(e){var t,n=e.reference,r=e.element,a=e.placement,i=a?bn(a):null,o=a?Fn(a):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case nn:t={x:s,y:n.y-r.height};break;case rn:t={x:s,y:n.y+n.height};break;case an:t={x:n.x+n.width,y:l};break;case on:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Dn(i):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case cn:t[c]=t[c]-(n[u]/2-r[u]/2);break;case un:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function lr(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=void 0===r?e.placement:r,i=n.strategy,o=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?dn:s,c=n.rootBoundary,u=void 0===c?hn:c,d=n.elementContext,h=void 0===d?fn:d,f=n.altBoundary,p=void 0!==f&&f,m=n.padding,v=void 0===m?0:m,g=$n("number"!=typeof v?v:Hn(v,ln)),b=h===fn?pn:fn,y=e.rects.popper,E=e.elements[p?b:h],w=or(En(E)?E:E.contextElement||Pn(e.elements.popper),l,u,o),x=Sn(e.elements.reference),N=sr({reference:x,element:y,strategy:"absolute",placement:a}),k=ar(Object.assign({},y,N)),O=h===fn?k:x,L={top:w.top-O.top+g.top,bottom:O.bottom-w.bottom+g.bottom,left:w.left-O.left+g.left,right:O.right-w.right+g.right},A=e.modifiersData.offset;if(h===fn&&A){var S=A[a];Object.keys(L).forEach((function(e){var t=[an,rn].indexOf(e)>=0?1:-1,n=[nn,rn].indexOf(e)>=0?"y":"x";L[e]+=S[n]*t}))}return L}function cr(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?vn:l,u=Fn(r),d=u?s?mn:mn.filter((function(e){return Fn(e)===u})):ln,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=lr(e,{placement:n,boundary:a,rootBoundary:i,padding:o})[bn(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}var ur={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,i=void 0===a||a,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,v=t.options.placement,g=bn(v),b=l||(g===v||!p?[Yn(v)]:function(e){if(bn(e)===sn)return[];var t=Yn(e);return[Jn(e),t,Jn(t)]}(v)),y=[v].concat(b).reduce((function(e,n){return e.concat(bn(n)===sn?cr(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),E=t.rects.reference,w=t.rects.popper,x=new Map,N=!0,k=y[0],O=0;O=0,M=j?"width":"height",C=lr(t,{placement:L,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),T=j?S?an:on:S?rn:nn;E[M]>w[M]&&(T=Yn(T));var _=Yn(T),P=[];if(i&&P.push(C[A]<=0),s&&P.push(C[T]<=0,C[_]<=0),P.every((function(e){return e}))){k=L,N=!1;break}x.set(L,P)}if(N)for(var R=function(e){var t=y.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},q=p?3:1;q>0;q--){if("break"===R(q))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function dr(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function hr(e){return[nn,an,rn,on].some((function(t){return e[t]>=0}))}var fr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=lr(t,{elementContext:"reference"}),s=lr(t,{altBoundary:!0}),l=dr(o,r),c=dr(s,a,i),u=hr(l),d=hr(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var pr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.offset,i=void 0===a?[0,0]:a,o=vn.reduce((function(e,n){return e[n]=function(e,t,n){var r=bn(e),a=[on,nn].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[on,an].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,i),e}),{}),s=o[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}};var mr={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=sr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var vr={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,i=void 0===a||a,o=n.altAxis,s=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,m=void 0===p?0:p,v=lr(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=bn(t.placement),b=Fn(t.placement),y=!b,E=Dn(g),w="x"===E?"y":"x",x=t.modifiersData.popperOffsets,N=t.rects.reference,k=t.rects.popper,O="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,L="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(x){if(i){var j,M="y"===E?nn:on,C="y"===E?rn:an,T="y"===E?"height":"width",_=x[E],P=_+v[M],R=_-v[C],q=f?-k[T]/2:0,I=b===cn?N[T]:k[T],D=b===cn?-k[T]:-N[T],B=t.elements.arrow,$=f&&B?jn(B):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=H[M],F=H[C],V=Bn(0,N[T],$[T]),z=y?N[T]/2-q-V-U-L.mainAxis:I-V-U-L.mainAxis,W=y?-N[T]/2+q+V+F+L.mainAxis:D+V+F+L.mainAxis,K=t.elements.arrow&&In(t.elements.arrow),Z=K?"y"===E?K.clientTop||0:K.clientLeft||0:0,G=null!=(j=null==A?void 0:A[E])?j:0,Y=_+W-G,X=Bn(f?kn(P,_+z-G-Z):P,_,f?Nn(R,Y):R);x[E]=X,S[E]=X-_}if(s){var J,Q="x"===E?nn:on,ee="x"===E?rn:an,te=x[w],ne="y"===w?"height":"width",re=te+v[Q],ae=te-v[ee],ie=-1!==[nn,on].indexOf(g),oe=null!=(J=null==A?void 0:A[w])?J:0,se=ie?re:te-N[ne]-k[ne]-oe+L.altAxis,le=ie?te+N[ne]+k[ne]-oe-L.altAxis:ae,ce=f&&ie?function(e,t,n){var r=Bn(e,t,n);return r>n?n:r}(se,te,le):Bn(f?se:re,te,f?le:ae);x[w]=ce,S[w]=ce-te}t.modifiersData[r]=S}},requiresIfExists:["offset"]};function gr(e,t,n){void 0===n&&(n=!1);var r,a,i=wn(t),o=wn(t)&&function(e){var t=e.getBoundingClientRect(),n=On(t.width)/e.offsetWidth||1,r=On(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=Pn(t),l=Sn(e,o,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&(("body"!==Cn(t)||tr(s))&&(c=(r=t)!==yn(r)&&wn(r)?{scrollLeft:(a=r).scrollLeft,scrollTop:a.scrollTop}:Qn(r)),wn(t)?((u=Sn(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=er(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function br(e){var t=new Map,n=new Set,r=[];function a(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&a(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||a(e)})),r}var yr={placement:"bottom",modifiers:[],strategy:"absolute"};function Er(){for(var e=arguments.length,t=new Array(e),n=0;n{}},Or={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const e=(t.getAttribute("aria-describedby")||"").split(",").filter((e=>e.trim()!==n.id));e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,a=null==(t=n.getAttribute("role"))?void 0:t.toLowerCase();if(n.id&&"tooltip"===a&&"setAttribute"in r){const e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(n.id))return;r.setAttribute("aria-describedby",e?`${e},${n.id}`:n.id)}}},Lr=[];function Ar(e,t,i={}){let{enabled:l=!0,placement:c="bottom",strategy:u="absolute",modifiers:d=Lr}=i,h=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(i,Nr);const f=n(d),p=n(),m=a((()=>{var e;null==(e=p.current)||e.update()}),[]),v=a((()=>{var e;null==(e=p.current)||e.forceUpdate()}),[]),[g,b]=function(e){const t=Qe();return[e[0],a((n=>{if(t())return e[1](n)}),[t,e[1]])]}(r({placement:c,update:m,forceUpdate:v,attributes:{},styles:{popper:{},arrow:{}}})),y=o((()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{const t={},n={};Object.keys(e.elements).forEach((r=>{t[r]=e.styles[r],n[r]=e.attributes[r]})),b({state:e,styles:t,attributes:n,update:m,forceUpdate:v,placement:e.placement})}})),[m,v,b]),E=o((()=>(tn(f.current,d)||(f.current=d),f.current)),[d]);return s((()=>{p.current&&l&&p.current.setOptions({placement:c,strategy:u,modifiers:[...E,y,kr]})}),[u,c,y,l,E]),s((()=>{if(l&&null!=e&&null!=t)return p.current=xr(e,t,Object.assign({},h,{placement:c,strategy:u,modifiers:[...E,Or,y]})),()=>{null!=p.current&&(p.current.destroy(),p.current=void 0,b((e=>Object.assign({},e,{attributes:{},styles:{popper:{}}}))))}}),[l,e,t]),g}function Sr(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var jr=function(){};if("production"!==process.env.NODE_ENV){var Mr=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r2?r-2:0);for(var a=2;a{};const _r=e=>e&&("current"in e?e.current:e),Pr={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Rr(e,t=Tr,{disabled:r,clickTrigger:i="click"}={}){const o=n(!1),l=n(!1),c=a((t=>{const n=_r(e);var r;Cr(!!n,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),o.current=!n||!!((r=t).metaKey||r.altKey||r.ctrlKey||r.shiftKey)||!function(e){return 0===e.button}(t)||!!Sr(n,t.target)||l.current,l.current=!1}),[e]),u=Ye((t=>{const n=_r(e);n&&Sr(n,t.target)&&(l.current=!0)})),d=Ye((e=>{o.current||t(e)}));s((()=>{var t,n;if(r||null==e)return;const a=H(_r(e)),o=a.defaultView||window;let s=null!=(t=o.event)?t:null==(n=o.parent)?void 0:n.event,l=null;Pr[i]&&(l=Pe(a,Pr[i],u,!0));const h=Pe(a,i,c,!0),f=Pe(a,i,(e=>{e!==s?d(e):s=void 0}));let p=[];return"ontouchstart"in a.documentElement&&(p=[].slice.call(a.body.children).map((e=>Pe(e,"mousemove",Tr)))),()=>{null==l||l(),h(),f(),p.forEach((e=>e()))}}),[e,r,i,c,u,d])}function qr(e={}){return Array.isArray(e)?e:Object.keys(e).map((t=>(e[t].name=t,e[t])))}function Ir({enabled:e,enableEvents:t,placement:n,flip:r,offset:a,fixed:i,containerPadding:o,arrowElement:s,popperConfig:l={}}){var c,u,d,h,f;const p=function(e){const t={};return Array.isArray(e)?(null==e||e.forEach((e=>{t[e.name]=e})),t):e||t}(l.modifiers);return Object.assign({},l,{placement:n,enabled:e,strategy:i?"fixed":l.strategy,modifiers:qr(Object.assign({},p,{eventListeners:{enabled:t,options:null==(c=p.eventListeners)?void 0:c.options},preventOverflow:Object.assign({},p.preventOverflow,{options:o?Object.assign({padding:o},null==(u=p.preventOverflow)?void 0:u.options):null==(d=p.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:a},null==(h=p.offset)?void 0:h.options)},arrow:Object.assign({},p.arrow,{enabled:!!s,options:Object.assign({},null==(f=p.arrow)?void 0:f.options,{element:s})}),flip:Object.assign({enabled:!!r},p.flip)}))})}const Dr=["children"];const Br=()=>{};function $r(e={}){const t=i(Jt),[r,a]=Je(),o=n(!1),{flip:s,offset:l,rootCloseEvent:c,fixed:u=!1,placement:d,popperConfig:h={},enableEventListeners:f=!0,usePopper:p=!!t}=e,m=null==(null==t?void 0:t.show)?!!e.show:t.show;m&&!o.current&&(o.current=!0);const{placement:v,setMenu:g,menuElement:b,toggleElement:y}=t||{},E=Ar(y,b,Ir({placement:d||v||"bottom-start",enabled:p,enableEvents:null==f?m:f,offset:l,flip:s,fixed:u,arrowElement:r,popperConfig:h})),w=Object.assign({ref:g||Br,"aria-labelledby":null==y?void 0:y.id},E.attributes.popper,{style:E.styles.popper}),x={show:m,placement:v,hasShown:o.current,toggle:null==t?void 0:t.toggle,popper:p?E:null,arrowProps:p?Object.assign({ref:a},E.attributes.arrow,{style:E.styles.arrow}):{}};return Rr(b,(e=>{null==t||t.toggle(!1,e)}),{clickTrigger:c,disabled:!m}),[w,x]}function Hr(e){let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,Dr);const[r,a]=$r(n);return m(v,{children:t(r,a)})}Hr.displayName="DropdownMenu",Hr.defaultProps={usePopper:!0};const Ur={prefix:String(Math.round(1e10*Math.random())),current:0},Fr=t.createContext(Ur),Vr=t.createContext(!1);let zr=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),Wr=new WeakMap;const Kr="function"==typeof t.useId?function(e){let n=t.useId(),[a]=r("function"==typeof t.useSyncExternalStore?t.useSyncExternalStore(Yr,Zr,Gr):i(Vr)),o=a||"test"===process.env.NODE_ENV?"react-aria":`react-aria${Ur.prefix}`;return e||`${o}-${n}`}:function(e){let r=i(Fr);r!==Ur||zr||console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let a=function(e=!1){let r=i(Fr),a=n(null);if(null===a.current&&!e){var o,s;let e=null===(s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===s||null===(o=s.ReactCurrentOwner)||void 0===o?void 0:o.current;if(e){let t=Wr.get(e);null==t?Wr.set(e,{id:r.current,state:e.memoizedState}):e.memoizedState!==t.state&&(r.current=t.id,Wr.delete(e))}a.current=++r.current}return a.current}(!!e),o=r===Ur&&"test"===process.env.NODE_ENV?"react-aria":`react-aria${r.prefix}`;return e||`${o}-${a}`};function Zr(){return!1}function Gr(){return!0}function Yr(e){return()=>{}}const Xr=e=>{var t;return"menu"===(null==(t=e.getAttribute("role"))?void 0:t.toLowerCase())},Jr=()=>{};function Qr(){const e=Kr(),{show:t=!1,toggle:n=Jr,setToggle:r,menuElement:o}=i(Jt)||{},s=a((e=>{n(!t,e)}),[t,n]),l={id:e,ref:r||Jr,onClick:s,"aria-expanded":!!t};return o&&Xr(o)&&(l["aria-haspopup"]=!0),[l,{show:t,toggle:n}]}function ea({children:e}){const[t,n]=Qr();return m(v,{children:e(t,n)})}ea.displayName="DropdownToggle";const ta=e.createContext(null),na=(e,t=null)=>null!=e?String(e):t||null,ra=e.createContext(null);ra.displayName="NavContext";var aa=ra;const ia="data-rr-ui-";function oa(e){return`${ia}${e}`}const sa=["eventKey","disabled","onClick","active","as"];function la({key:e,href:t,active:n,disabled:r,onClick:a}){const o=i(ta),s=i(aa),{activeKey:l}=s||{},c=na(e,t),u=null==n&&null!=e?na(l)===c:n;return[{onClick:Ye((e=>{r||(null==a||a(e),o&&!e.isPropagationStopped()&&o(c,e))})),"aria-disabled":r||void 0,"aria-selected":u,[oa("dropdown-item")]:""},{isActive:u}]}const ca=e.forwardRef(((e,t)=>{let{eventKey:n,disabled:r,onClick:a,active:i,as:o=it}=e,s=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,sa);const[l]=la({key:n,href:s.href,disabled:r,onClick:a,active:i});return m(o,Object.assign({},s,{ref:t},l))}));ca.displayName="DropdownItem";const ua=u(je?window:void 0);function da(){return i(ua)}function ha(){const e=Xt(),t=n(null),r=a((n=>{t.current=n,e()}),[e]);return[t,r]}function fa({defaultShow:e,show:t,onSelect:l,onToggle:c,itemSelector:u=`* [${oa("dropdown-item")}]`,focusFirstItemOnShow:d,placement:h="bottom-start",children:f}){const p=da(),[v,g]=function(e,t,i){const o=n(void 0!==e),[s,l]=r(t),c=void 0!==e,u=o.current;return o.current=c,!c&&u&&s!==t&&l(t),[c?e:s,a(((...e)=>{const[t,...n]=e;let r=null==i?void 0:i(t,...n);return l(t),r}),[i])]}(t,e,c),[b,y]=ha(),E=b.current,[w,x]=ha(),N=w.current,k=et(v),O=n(null),L=n(!1),A=i(ta),S=a(((e,t,n=(null==t?void 0:t.type))=>{g(e,{originalEvent:t,source:n})}),[g]),j=Ye(((e,t)=>{null==l||l(e,t),S(!1,t,"select"),t.isPropagationStopped()||null==A||A(e,t)})),M=o((()=>({toggle:S,placement:h,show:v,menuElement:E,toggleElement:N,setMenu:y,setToggle:x})),[S,h,v,E,N,y,x]);E&&k&&!v&&(L.current=E.contains(E.ownerDocument.activeElement));const C=Ye((()=>{N&&N.focus&&N.focus()})),T=Ye((()=>{const e=O.current;let t=d;if(null==t&&(t=!(!b.current||!Xr(b.current))&&"keyboard"),!1===t||"keyboard"===t&&!/^key.+$/.test(e))return;const n=Yt(b.current,u)[0];n&&n.focus&&n.focus()}));s((()=>{v?T():L.current&&(L.current=!1,C())}),[v,L,C,T]),s((()=>{O.current=null}));const _=(e,t)=>{if(!b.current)return null;const n=Yt(b.current,u);let r=n.indexOf(e)+t;return r=Math.max(0,Math.min(r,n.length)),n[r]};return function(e,t,n,r=!1){const a=Ye(n);s((()=>{const n="function"==typeof e?e():e;return n.addEventListener(t,a,r),()=>n.removeEventListener(t,a,r)}),[e])}(a((()=>p.document),[p]),"keydown",(e=>{var t,n;const{key:r}=e,a=e.target,i=null==(t=b.current)?void 0:t.contains(a),o=null==(n=w.current)?void 0:n.contains(a);if(/input|textarea/i.test(a.tagName)&&(" "===r||"Escape"!==r&&i||"Escape"===r&&"search"===a.type))return;if(!i&&!o)return;if(!("Tab"!==r||b.current&&v))return;O.current=e.type;const s={originalEvent:e,source:e.type};switch(r){case"ArrowUp":{const t=_(a,-1);return t&&t.focus&&t.focus(),void e.preventDefault()}case"ArrowDown":if(e.preventDefault(),v){const e=_(a,1);e&&e.focus&&e.focus()}else g(!0,s);return;case"Tab":_e(a.ownerDocument,"keyup",(e=>{var t;("Tab"!==e.key||e.target)&&null!=(t=b.current)&&t.contains(e.target)||g(!1,s)}),{once:!0});break;case"Escape":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),g(!1,s)}})),m(ta.Provider,{value:j,children:m(Jt.Provider,{value:M,children:f})})}ua.Provider,fa.displayName="Dropdown",fa.Menu=Hr,fa.Toggle=ea,fa.Item=ca;const pa=e.createContext({});pa.displayName="DropdownContext";var ma=pa;const va=e.forwardRef((({className:e,bsPrefix:t,as:n="hr",role:r="separator",...a},i)=>(t=I(t,"dropdown-divider"),m(n,{ref:i,className:O(e,t),role:r,...a}))));va.displayName="DropdownDivider";var ga=va;const ba=e.forwardRef((({className:e,bsPrefix:t,as:n="div",role:r="heading",...a},i)=>(t=I(t,"dropdown-header"),m(n,{ref:i,className:O(e,t),role:r,...a}))));ba.displayName="DropdownHeader";var ya=ba;const Ea=e.forwardRef((({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:a,active:i,as:o=lt,...s},l)=>{const c=I(e,"dropdown-item"),[u,d]=la({key:n,href:s.href,disabled:r,onClick:a,active:i});return m(o,{...s,...u,ref:l,className:O(t,c,d.isActive&&"active",r&&"disabled")})}));Ea.displayName="DropdownItem";var wa=Ea;const xa=e.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=I(t,"dropdown-item-text"),m(n,{ref:a,className:O(e,t),...r}))));xa.displayName="DropdownItemText";var Na=xa;const ka=e.createContext(null);ka.displayName="InputGroupContext";var Oa=ka;const La=e.createContext(null);La.displayName="NavbarContext";var Aa=La;function Sa(e,t){if("production"===process.env.NODE_ENV)return e;return Ue(a((e=>{null!=e&&e.isReactComponent&&("production"!==process.env.NODE_ENV?M(!1,`${t} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`):M(!1))}),[t]),e)}function ja(e,t,n){let r=e?n?"bottom-start":"bottom-end":n?"bottom-end":"bottom-start";return"up"===t?r=e?n?"top-start":"top-end":n?"top-end":"top-start":"end"===t?r=e?n?"left-end":"right-end":n?"left-start":"right-start":"start"===t?r=e?n?"right-end":"left-end":n?"right-start":"left-start":"down-centered"===t?r="bottom":"up-centered"===t&&(r="top"),r}const Ma=e.forwardRef((({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:a=!0,show:o,renderOnMount:s,as:l="div",popperConfig:c,variant:u,...d},h)=>{let f=!1;const p=i(Aa),v=I(e,"dropdown-menu"),{align:g,drop:b,isRTL:y}=i(ma);n=n||g;const E=i(Oa),w=[];if(n)if("object"==typeof n){const e=Object.keys(n);if("production"!==process.env.NODE_ENV&&Cr(1===e.length,"There should only be 1 breakpoint when passing an object to `align`"),e.length){const t=e[0],r=n[t];f="start"===r,w.push(`${v}-${t}-${r}`)}}else"end"===n&&(f=!0);const x=ja(f,b,y),[N,{hasShown:k,popper:L,show:A,toggle:S}]=$r({flip:a,rootCloseEvent:r,show:o,usePopper:!p&&0===w.length,offset:[0,2],popperConfig:c,placement:x});if(N.ref=Ue(Sa(h,"DropdownMenu"),N.ref),nt((()=>{A&&(null==L||L.update())}),[A]),!k&&!s&&!E)return null;"string"!=typeof l&&(N.show=A,N.close=()=>null==S?void 0:S(!1),N.align=n);let j=d.style;return null!=L&&L.placement&&(j={...d.style,...N.style},d["x-placement"]=L.placement),m(l,{...d,...N,style:j,...(w.length||p)&&{"data-bs-popper":"static"},className:O(t,v,A&&"show",f&&`${v}-end`,u&&`${v}-${u}`,...w)})}));Ma.displayName="DropdownMenu";var Ca=Ma;const Ta=e.forwardRef((({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:a=vt,...o},s)=>{const l=I(e,"dropdown-toggle"),c=i(Jt);void 0!==r&&(o.bsPrefix=r);const[u]=Qr();return u.ref=Ue(u.ref,Sa(s,"DropdownToggle")),m(a,{className:O(n,l,t&&`${l}-split`,(null==c?void 0:c.show)&&"show"),...u,...o})}));Ta.displayName="DropdownToggle";var _a=Ta;const Pa=e.forwardRef(((e,t)=>{const{bsPrefix:n,drop:r="down",show:a,className:s,align:l="start",onSelect:c,onToggle:u,focusFirstItemOnShow:d,as:h="div",navbar:f,autoClose:p=!0,...v}=P(e,{show:"onToggle"}),g=i(Oa),b=I(n,"dropdown"),y=$(),E=Ye(((e,t)=>{var n,r;var a;(null==(n=t.originalEvent)||null==(r=n.target)?void 0:r.classList.contains("dropdown-toggle"))&&"mousedown"===t.source||(t.originalEvent.currentTarget!==document||"keydown"===t.source&&"Escape"!==t.originalEvent.key||(t.source="rootClose"),a=t.source,(!1===p?"click"===a:"inside"===p?"rootClose"!==a:"outside"!==p||"select"!==a)&&(null==u||u(e,t)))})),w=ja("end"===l,r,y),x=o((()=>({align:l,drop:r,isRTL:y})),[l,r,y]),N={down:b,"down-centered":`${b}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return m(ma.Provider,{value:x,children:m(fa,{placement:w,show:a,onSelect:c,onToggle:E,focusFirstItemOnShow:d,itemSelector:`.${b}-item:not(.disabled):not(:disabled)`,children:g?v.children:m(h,{...v,ref:t,className:O(s,a&&"show",N[r])})})})}));Pa.displayName="Dropdown";var Ra=Object.assign(Pa,{Toggle:_a,Menu:Ca,Item:wa,ItemText:Na,Divider:ga,Header:ya});const qa={type:be.string,tooltip:be.bool,as:be.elementType},Ia=e.forwardRef((({as:e="div",className:t,type:n="valid",tooltip:r=!1,...a},i)=>m(e,{...a,ref:i,className:O(t,`${n}-${r?"tooltip":"feedback"}`)})));Ia.displayName="Feedback",Ia.propTypes=qa;var Da=Ia;var Ba=e.createContext({});const $a=e.forwardRef((({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:a=!1,isInvalid:o=!1,as:s="input",...l},c)=>{const{controlId:u}=i(Ba);return t=I(t,"form-check-input"),m(s,{...l,ref:c,type:r,id:e||u,className:O(n,t,a&&"is-valid",o&&"is-invalid")})}));$a.displayName="FormCheckInput";var Ha=$a;const Ua=e.forwardRef((({bsPrefix:e,className:t,htmlFor:n,...r},a)=>{const{controlId:o}=i(Ba);return e=I(e,"form-check-label"),m("label",{...r,ref:a,htmlFor:n||o,className:O(t,e)})}));Ua.displayName="FormCheckLabel";var Fa=Ua;const Va=e.forwardRef((({id:t,bsPrefix:n,bsSwitchPrefix:r,inline:a=!1,reverse:s=!1,disabled:l=!1,isValid:c=!1,isInvalid:u=!1,feedbackTooltip:d=!1,feedback:h,feedbackType:f,className:p,style:b,title:y="",type:E="checkbox",label:w,children:x,as:N="input",...k},L)=>{n=I(n,"form-check"),r=I(r,"form-switch");const{controlId:A}=i(Ba),S=o((()=>({controlId:t||A})),[A,t]),j=!x&&null!=w&&!1!==w||function(t,n){return e.Children.toArray(t).some((t=>e.isValidElement(t)&&t.type===n))}(x,Fa),M=m(Ha,{...k,type:"switch"===E?"checkbox":E,ref:L,isValid:c,isInvalid:u,disabled:l,as:N});return m(Ba.Provider,{value:S,children:m("div",{style:b,className:O(p,j&&n,a&&`${n}-inline`,s&&`${n}-reverse`,"switch"===E&&r),children:x||g(v,{children:[M,j&&m(Fa,{title:y,children:w}),h&&m(Da,{type:f,tooltip:d,children:h})]})})})}));Va.displayName="FormCheck";var za=Object.assign(Va,{Input:Ha,Label:Fa});const Wa=e.forwardRef((({bsPrefix:e,type:t,size:n,htmlSize:r,id:a,className:o,isValid:s=!1,isInvalid:l=!1,plaintext:c,readOnly:u,as:d="input",...h},f)=>{const{controlId:p}=i(Ba);return e=I(e,"form-control"),"production"!==process.env.NODE_ENV&&Cr(null==p||!a,"`controlId` is ignored on `` when `id` is specified."),m(d,{...h,type:t,size:r,ref:f,readOnly:u,id:a||p,className:O(o,c?`${e}-plaintext`:e,n&&`${e}-${n}`,"color"===t&&`${e}-color`,s&&"is-valid",l&&"is-invalid")})}));Wa.displayName="FormControl";var Ka=Object.assign(Wa,{Feedback:Da});const Za=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"form-floating"),m(n,{ref:a,className:O(e,t),...r}))));Za.displayName="FormFloating";var Ga=Za;const Ya=e.forwardRef((({controlId:e,as:t="div",...n},r)=>{const a=o((()=>({controlId:e})),[e]);return m(Ba.Provider,{value:a,children:m(t,{...n,ref:r})})}));Ya.displayName="FormGroup";var Xa=Ya;const Ja=e.forwardRef((({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:a,htmlFor:o,...s},l)=>{const{controlId:c}=i(Ba);t=I(t,"form-label");let u="col-form-label";"string"==typeof n&&(u=`${u} ${u}-${n}`);const d=O(a,t,r&&"visually-hidden",n&&u);return"production"!==process.env.NODE_ENV&&Cr(null==c||!o,"`controlId` is ignored on `` when `htmlFor` is specified."),o=o||c,n?m(Wt,{ref:l,as:"label",className:d,htmlFor:o,...s}):m(e,{ref:l,className:d,htmlFor:o,...s})}));Ja.displayName="FormLabel";var Qa=Ja;const ei=e.forwardRef((({bsPrefix:e,className:t,id:n,...r},a)=>{const{controlId:o}=i(Ba);return e=I(e,"form-range"),m("input",{...r,type:"range",ref:a,className:O(t,e),id:n||o})}));ei.displayName="FormRange";var ti=ei;const ni=e.forwardRef((({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:a=!1,isInvalid:o=!1,id:s,...l},c)=>{const{controlId:u}=i(Ba);return e=I(e,"form-select"),m("select",{...l,size:n,ref:c,className:O(r,e,t&&`${e}-${t}`,a&&"is-valid",o&&"is-invalid"),id:s||u})}));ni.displayName="FormSelect";var ri=ni;const ai=e.forwardRef((({bsPrefix:e,className:t,as:n="small",muted:r,...a},i)=>(e=I(e,"form-text"),m(n,{...a,ref:i,className:O(t,e,r&&"text-muted")}))));ai.displayName="FormText";var ii=ai;const oi=e.forwardRef(((e,t)=>m(za,{...e,ref:t,type:"switch"})));oi.displayName="Switch";var si=Object.assign(oi,{Input:za.Input,Label:za.Label});const li=e.forwardRef((({bsPrefix:e,className:t,children:n,controlId:r,label:a,...i},o)=>(e=I(e,"form-floating"),g(Xa,{ref:o,className:O(t,e),controlId:r,...i,children:[n,m("label",{htmlFor:r,children:a})]}))));li.displayName="FloatingLabel";var ci=li;const ui={_ref:be.any,validated:be.bool,as:be.elementType},di=e.forwardRef((({className:e,validated:t,as:n="form",...r},a)=>m(n,{...r,ref:a,className:O(e,t&&"was-validated")})));di.displayName="Form",di.propTypes=ui;var hi=Object.assign(di,{Group:Xa,Control:Ka,Floating:Ga,Check:za,Switch:si,Label:Qa,Text:ii,Range:ti,Select:ri,FloatingLabel:ci});const fi=e.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=I(t,"input-group-text"),m(n,{ref:a,className:O(e,t),...r}))));fi.displayName="InputGroupText";var pi=fi;const mi=e.forwardRef((({bsPrefix:e,size:t,hasValidation:n,className:r,as:a="div",...i},s)=>{e=I(e,"input-group");const l=o((()=>({})),[]);return m(Oa.Provider,{value:l,children:m(a,{ref:s,...i,className:O(r,e,t&&`${e}-${t}`,n&&"has-validation")})})}));mi.displayName="InputGroup";var vi=Object.assign(mi,{Text:pi,Radio:e=>m(pi,{children:m(Ha,{type:"radio",...e})}),Checkbox:e=>m(pi,{children:m(Ha,{type:"checkbox",...e})})});var gi=e.createContext(null);const bi=["as","active","eventKey"];function yi({key:e,onClick:t,active:n,id:r,role:a,disabled:o}){const s=i(ta),l=i(aa),c=i(gi);let u=n;const d={role:a};if(l){a||"tablist"!==l.role||(d.role="tab");const t=l.getControllerId(null!=e?e:null),i=l.getControlledId(null!=e?e:null);d[oa("event-key")]=e,d.id=t||r,u=null==n&&null!=e?l.activeKey===e:n,!u&&(null!=c&&c.unmountOnExit||null!=c&&c.mountOnEnter)||(d["aria-controls"]=i)}return"tab"===d.role&&(d["aria-selected"]=u,u||(d.tabIndex=-1),o&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=Ye((n=>{o||(null==t||t(n),null!=e&&s&&!n.isPropagationStopped()&&s(e,n))})),[d,{isActive:u}]}const Ei=e.forwardRef(((e,t)=>{let{as:n=it,active:r,eventKey:a}=e,i=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,bi);const[o,s]=yi(Object.assign({key:na(a,i.href),active:r},i));return o[oa("active")]=s.isActive,m(n,Object.assign({},i,o,{ref:t}))}));Ei.displayName="NavItem";var wi=Ei;const xi=["as","onSelect","activeKey","role","onKeyDown"];const Ni=()=>{},ki=oa("event-key"),Oi=e.forwardRef(((e,t)=>{let{as:r="div",onSelect:a,activeKey:o,role:l,onKeyDown:c}=e,u=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,xi);const d=Xt(),h=n(!1),f=i(ta),p=i(gi);let v,g;p&&(l=l||"tablist",o=p.activeKey,v=p.getControlledId,g=p.getControllerId);const b=n(null),y=e=>{const t=b.current;if(!t)return null;const n=Yt(t,`[${ki}]:not([aria-disabled=true])`),r=t.querySelector("[aria-selected=true]");if(!r||r!==document.activeElement)return null;const a=n.indexOf(r);if(-1===a)return null;let i=a+e;return i>=n.length&&(i=0),i<0&&(i=n.length-1),n[i]},E=(e,t)=>{null!=e&&(null==a||a(e,t),null==f||f(e,t))};s((()=>{if(b.current&&h.current){const e=b.current.querySelector(`[${ki}][aria-selected=true]`);null==e||e.focus()}h.current=!1}));const w=Ue(t,b);return m(ta.Provider,{value:E,children:m(aa.Provider,{value:{role:l,activeKey:na(o),getControlledId:v||Ni,getControllerId:g||Ni},children:m(r,Object.assign({},u,{onKeyDown:e=>{if(null==c||c(e),!p)return;let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=y(-1);break;case"ArrowRight":case"ArrowDown":t=y(1);break;default:return}var n;t&&(e.preventDefault(),E(t.dataset[(n="EventKey",`rrUi${n}`)]||null,e),h.current=!0,d())},ref:w,role:l}))})})}));Oi.displayName="Nav";var Li=Object.assign(Oi,{Item:wi});function Ai(e){void 0===e&&(e=H());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}const Si=oa("modal-open");var ji=class{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}={}){this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(K(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(Si,""),K(r,t)}reset(){[...this.modals].forEach((e=>this.remove(e)))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(Si),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t?t:(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),t)}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}};const Mi=(e,t)=>je?null==e?(t||H()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Ci(e,t){const n=da(),[a,i]=r((()=>Mi(e,null==n?void 0:n.document)));if(!a){const t=Mi(e);t&&i(t)}return s((()=>{t&&a&&t(a)}),[t,a]),s((()=>{const t=Mi(e);t!==a&&i(t)}),[e,a]),a}function Ti({children:e,in:t,onExited:r,mountOnEnter:a,unmountOnExit:i}){const o=n(null),l=n(t),c=Ye(r);s((()=>{t?l.current=!0:c(o.current)}),[t,c]);const u=Ue(o,e.ref),h=d(e,{ref:u});return t?h:i||!l.current&&a?null:h}function _i({children:e,in:t,onExited:a,onEntered:i,transition:o}){const[s,l]=r(!t);t&&s&&l(!1);const c=function({in:e,onTransition:t}){const r=n(null),a=n(!0),i=Ye(t);return nt((()=>{if(!r.current)return;let t=!1;return i({in:e,element:r.current,initial:a.current,isStale:()=>t}),()=>{t=!0}}),[e,i]),nt((()=>(a.current=!1,()=>{a.current=!0})),[]),r}({in:!!t,onTransition:e=>{Promise.resolve(o(e)).then((()=>{e.isStale()||(e.in?null==i||i(e.element,e.initial):(l(!0),null==a||a(e.element)))}),(t=>{throw e.in||l(!0),t}))}}),u=Ue(c,e.ref);return s&&!t?null:d(e,{ref:u})}function Pi(e,t,n){return e?m(e,Object.assign({},n)):t?m(_i,Object.assign({},n,{transition:t})):m(Ti,Object.assign({},n))}function Ri(e){return"Escape"===e.code||27===e.keyCode}const qi=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let Ii;function Di(e){const t=da(),r=e||function(e){return Ii||(Ii=new ji({ownerDocument:null==e?void 0:e.document})),Ii}(t),i=n({dialog:null,backdrop:null});return Object.assign(i.current,{add:()=>r.add(i.current),remove:()=>r.remove(i.current),isTopModal:()=>r.isTopModal(i.current),setDialogRef:a((e=>{i.current.dialog=e}),[]),setBackdropRef:a((e=>{i.current.backdrop=e}),[])})}const Bi=h(((t,a)=>{let{show:i=!1,role:o="dialog",className:l,style:c,children:u,backdrop:d=!0,keyboard:h=!0,onBackdropClick:p,onEscapeKeyDown:b,transition:E,runTransition:w,backdropTransition:x,runBackdropTransition:N,autoFocus:k=!0,enforceFocus:O=!0,restoreFocus:L=!0,restoreFocusOptions:A,renderDialog:S,renderBackdrop:j=(e=>m("div",Object.assign({},e))),manager:M,container:C,onShow:T,onHide:_=(()=>{}),onExit:P,onExited:R,onExiting:q,onEnter:I,onEntering:D,onEntered:B}=t,$=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(t,qi);const H=da(),U=Ci(C),F=Di(M),V=Qe(),z=et(i),[W,K]=r(!i),Z=n(null);f(a,(()=>F),[F]),je&&!z&&i&&(Z.current=Ai(null==H?void 0:H.document)),i&&W&&K(!1);const G=Ye((()=>{if(F.add(),te.current=Pe(document,"keydown",Q),ee.current=Pe(document,"focus",(()=>setTimeout(X)),!0),T&&T(),k){var e,t;const n=Ai(null!=(e=null==(t=F.dialog)?void 0:t.ownerDocument)?e:null==H?void 0:H.document);F.dialog&&n&&!Sr(F.dialog,n)&&(Z.current=n,F.dialog.focus())}})),Y=Ye((()=>{var e;(F.remove(),null==te.current||te.current(),null==ee.current||ee.current(),L)&&(null==(e=Z.current)||null==e.focus||e.focus(A),Z.current=null)}));s((()=>{i&&U&&G()}),[i,U,G]),s((()=>{W&&Y()}),[W,Y]),Ht((()=>{Y()}));const X=Ye((()=>{if(!O||!V()||!F.isTopModal())return;const e=Ai(null==H?void 0:H.document);F.dialog&&e&&!Sr(F.dialog,e)&&F.dialog.focus()})),J=Ye((e=>{e.target===e.currentTarget&&(null==p||p(e),!0===d&&_())})),Q=Ye((e=>{h&&Ri(e)&&F.isTopModal()&&(null==b||b(e),e.defaultPrevented||_())})),ee=n(),te=n();if(!U)return null;const ne=Object.assign({role:o,ref:F.setDialogRef,"aria-modal":"dialog"===o||void 0},$,{style:c,className:l,tabIndex:-1});let re=S?S(ne):m("div",Object.assign({},ne,{children:e.cloneElement(u,{role:"document"})}));re=Pi(E,w,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!i,onExit:P,onExiting:q,onExited:(...e)=>{K(!0),null==R||R(...e)},onEnter:I,onEntering:D,onEntered:B,children:re});let ae=null;return d&&(ae=j({ref:F.setBackdropRef,onClick:J}),ae=Pi(x,N,{in:!!i,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ae})),m(v,{children:y.createPortal(g(v,{children:[ae,re]}),U)})}));Bi.displayName="Modal";var $i=Object.assign(Bi,{Manager:ji});function Hi(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}function Ui(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Fi=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Vi=".sticky-top",zi=".navbar-toggler";class Wi extends ji{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,K(t,{[e]:`${parseFloat(K(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],K(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();var n,r;if(r="modal-open",(n=t).classList?n.classList.add(r):Hi(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)),!e.scrollBarWidth)return;const a=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Yt(t,Fi).forEach((t=>this.adjustAndStore(a,t,e.scrollBarWidth))),Yt(t,Vi).forEach((t=>this.adjustAndStore(i,t,-e.scrollBarWidth))),Yt(t,zi).forEach((t=>this.adjustAndStore(i,t,e.scrollBarWidth)))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();var n,r;r="modal-open",(n=t).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Ui(n.className,r):n.setAttribute("class",Ui(n.className&&n.className.baseVal||"",r));const a=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Yt(t,Fi).forEach((e=>this.restore(a,e))),Yt(t,Vi).forEach((e=>this.restore(i,e))),Yt(t,zi).forEach((e=>this.restore(i,e)))}}let Ki;var Zi=Wi;var Gi=e.createContext({onHide(){}});const Yi=e.forwardRef((({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:a,...o},s)=>{const l=i(Gi),c=Ye((()=>{null==l||l.onHide(),null==r||r()}));return g("div",{ref:s,...o,children:[a,n&&m(pt,{"aria-label":e,variant:t,onClick:c})]})}));var Xi=Yi,Ji={exports:{}},Qi={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,a,i,o){var s=a||"<>",l=o||r;if(null==n[r])return t?new Error("Required "+i+" `"+l+"` was not specified in `"+s+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),d=6;d(t=I(t,"nav-item"),m(n,{ref:a,className:O(e,t),...r}))));to.displayName="NavItem";var no=to;const ro=e.forwardRef((({bsPrefix:e,className:t,as:n=lt,active:r,eventKey:a,disabled:i=!1,...o},s)=>{e=I(e,"nav-link");const[l,c]=yi({key:na(a,o.href),active:r,disabled:i,...o});return m(n,{...o,...l,ref:s,disabled:i,className:O(t,e,i&&"disabled",c.isActive&&"active")})}));ro.displayName="NavLink";var ao=ro;const io=e.forwardRef(((e,t)=>{const{as:n="div",bsPrefix:r,variant:a,fill:o=!1,justify:s=!1,navbar:l,navbarScroll:c,className:u,activeKey:d,...h}=P(e,{activeKey:"onSelect"}),f=I(r,"nav");let p,v,g=!1;const b=i(Aa),y=i(xt);return b?(p=b.bsPrefix,g=null==l||l):y&&({cardHeaderBsPrefix:v}=y),m(Li,{as:n,ref:t,activeKey:d,className:O(u,{[f]:!g,[`${p}-nav`]:g,[`${p}-nav-scroll`]:g&&c,[`${v}-${a}`]:!!v,[`${f}-${a}`]:!!a,[`${f}-fill`]:o,[`${f}-justified`]:s}),...h})}));io.displayName="Nav";var oo=Object.assign(io,{Item:no,Link:ao});const so=e.forwardRef((({bsPrefix:e,className:t,as:n,...r},a)=>{e=I(e,"navbar-brand");const i=n||(r.href?"a":"span");return m(i,{...r,ref:a,className:O(t,e)})}));so.displayName="NavbarBrand";var lo=so;const co=e.forwardRef((({children:e,bsPrefix:t,...n},r)=>{t=I(t,"navbar-collapse");const a=i(Aa);return m(Ge,{in:!(!a||!a.expanded),...n,children:m("div",{ref:r,className:t,children:e})})}));co.displayName="NavbarCollapse";var uo=co;const ho=e.forwardRef((({bsPrefix:e,className:t,children:n,label:r="Toggle navigation",as:a="button",onClick:o,...s},l)=>{e=I(e,"navbar-toggler");const{onToggle:c,expanded:u}=i(Aa)||{},d=Ye((e=>{o&&o(e),c&&c()}));return"button"===a&&(s.type="button"),m(a,{...s,ref:l,onClick:d,"aria-label":r,className:O(t,e,!u&&"collapsed"),children:n||m("span",{className:`${e}-icon`})})}));ho.displayName="NavbarToggle";var fo=ho;const po=new WeakMap,mo=(e,t)=>{if(!e||!t)return;const n=po.get(t)||new Map;po.set(t,n);let r=n.get(e);return r||(r=t.matchMedia(e),r.refCount=0,n.set(r.media,r)),r};function vo(e,t=("undefined"==typeof window?void 0:window)){const n=mo(e,t),[a,i]=r((()=>!!n&&n.matches));return nt((()=>{let n=mo(e,t);if(!n)return i(!1);let r=po.get(t);const a=()=>{i(n.matches)};return n.refCount++,n.addListener(a),a(),()=>{n.removeListener(a),n.refCount--,n.refCount<=0&&(null==r||r.delete(n.media)),n=void 0}}),[e]),a}const go=function(e){const t=Object.keys(e);function n(e,t){return e===t?t:e?`${e} and ${t}`:t}function r(n){const r=function(e){return t[Math.min(t.indexOf(e)+1,t.length-1)]}(n);let a=e[r];return a="number"==typeof a?a-.2+"px":`calc(${a} - 0.2px)`,`(max-width: ${a})`}return function(t,a,i){let s;return"object"==typeof t?(s=t,i=a,a=!0):s={[t]:a=a||!0},vo(o((()=>Object.entries(s).reduce(((t,[a,i])=>("up"!==i&&!0!==i||(t=n(t,function(t){let n=e[t];return"number"==typeof n&&(n=`${n}px`),`(min-width: ${n})`}(a))),"down"!==i&&!0!==i||(t=n(t,r(a))),t)),"")),[JSON.stringify(s)]),i)}}({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400}),bo=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"offcanvas-body"),m(n,{ref:a,className:O(e,t),...r}))));bo.displayName="OffcanvasBody";var yo=bo;const Eo={[ke]:"show",[Oe]:"show"},wo=e.forwardRef((({bsPrefix:t,className:n,children:r,in:a=!1,mountOnEnter:i=!1,unmountOnExit:o=!1,appear:s=!1,...l},c)=>(t=I(t,"offcanvas"),m(ze,{ref:c,addEndListener:De,in:a,mountOnEnter:i,unmountOnExit:o,appear:s,...l,childRef:r.ref,children:(a,i)=>e.cloneElement(r,{...i,className:O(n,r.props.className,(a===ke||a===Le)&&`${t}-toggling`,Eo[a])})}))));wo.displayName="OffcanvasToggling";var xo=wo;const No=e.forwardRef((({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...a},i)=>(e=I(e,"offcanvas-header"),m(Xi,{ref:i,...a,className:O(t,e),closeLabel:n,closeButton:r}))));No.displayName="OffcanvasHeader";var ko=No;const Oo=Xe("h5"),Lo=e.forwardRef((({className:e,bsPrefix:t,as:n=Oo,...r},a)=>(t=I(t,"offcanvas-title"),m(n,{ref:a,className:O(e,t),...r}))));Lo.displayName="OffcanvasTitle";var Ao=Lo;function So(e){return m(xo,{...e})}function jo(e){return m(dt,{...e})}const Mo=e.forwardRef((({bsPrefix:e,className:t,children:l,"aria-labelledby":c,placement:u="start",responsive:d,show:h=!1,backdrop:f=!0,keyboard:p=!0,scroll:b=!1,onEscapeKeyDown:y,onShow:E,onHide:w,container:x,autoFocus:N=!0,enforceFocus:k=!0,restoreFocus:L=!0,restoreFocusOptions:A,onEntered:S,onExit:j,onExiting:M,onEnter:C,onEntering:T,onExited:_,backdropClassName:P,manager:R,renderStaticNode:q=!1,...D},B)=>{const $=n();e=I(e,"offcanvas");const{onToggle:H}=i(Aa)||{},[U,F]=r(!1),V=go(d||"xs","up");s((()=>{F(d?h&&!V:h)}),[h,d,V]);const z=Ye((()=>{null==H||H(),null==w||w()})),W=o((()=>({onHide:z})),[z]);const K=a((t=>m("div",{...t,className:O(`${e}-backdrop`,P)})),[P,e]),Z=n=>m("div",{...n,...D,className:O(t,d?`${e}-${d}`:e,`${e}-${u}`),"aria-labelledby":c,children:l});return g(v,{children:[!U&&(d||q)&&Z({}),m(Gi.Provider,{value:W,children:m($i,{show:U,ref:B,backdrop:f,container:x,keyboard:p,autoFocus:N,enforceFocus:k&&!b,restoreFocus:L,restoreFocusOptions:A,onEscapeKeyDown:y,onShow:E,onHide:z,onEnter:(e,...t)=>{e&&(e.style.visibility="visible"),null==C||C(e,...t)},onEntering:T,onEntered:S,onExit:j,onExiting:M,onExited:(e,...t)=>{e&&(e.style.visibility=""),null==_||_(...t)},manager:R||(b?($.current||($.current=new Zi({handleContainerOverflow:!1})),$.current):function(e){return Ki||(Ki=new Wi(e)),Ki}()),transition:So,backdropTransition:jo,renderBackdrop:K,renderDialog:Z})})]})}));Mo.displayName="Offcanvas";var Co=Object.assign(Mo,{Body:yo,Header:ko,Title:Ao});const To=e.forwardRef(((e,t)=>{const n=i(Aa);return m(Co,{ref:t,show:!(null==n||!n.expanded),...e,renderStaticNode:!0})}));To.displayName="NavbarOffcanvas";var _o=To;const Po=e.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},a)=>(t=I(t,"navbar-text"),m(n,{ref:a,className:O(e,t),...r}))));Po.displayName="NavbarText";var Ro=Po;const qo=e.forwardRef(((e,t)=>{const{bsPrefix:n,expand:r=!0,variant:i="light",bg:s,fixed:l,sticky:c,className:u,as:d="nav",expanded:h,onToggle:f,onSelect:p,collapseOnSelect:v=!1,...g}=P(e,{expanded:"onToggle"}),b=I(n,"navbar"),y=a(((...e)=>{null==p||p(...e),v&&h&&(null==f||f(!1))}),[p,v,h,f]);void 0===g.role&&"nav"!==d&&(g.role="navigation");let E=`${b}-expand`;"string"==typeof r&&(E=`${E}-${r}`);const w=o((()=>({onToggle:()=>null==f?void 0:f(!h),bsPrefix:b,expanded:!!h,expand:r})),[b,h,r,f]);return m(Aa.Provider,{value:w,children:m(ta.Provider,{value:y,children:m(d,{ref:t,...g,className:O(u,b,r&&E,i&&`${b}-${i}`,s&&`bg-${s}`,c&&`sticky-${c}`,l&&`fixed-${l}`)})})})}));qo.displayName="Navbar";var Io=Object.assign(qo,{Brand:lo,Collapse:uo,Offcanvas:_o,Text:Ro,Toggle:fo});const Do=()=>{};const Bo=e.forwardRef(((e,t)=>{const{flip:n,offset:a,placement:i,containerPadding:o,popperConfig:l={},transition:c,runTransition:u}=e,[d,h]=Je(),[f,p]=Je(),m=Ue(h,t),v=Ci(e.container),g=Ci(e.target),[b,E]=r(!e.show),w=Ar(g,d,Ir({placement:i,enableEvents:!!e.show,containerPadding:o||5,flip:n,offset:a,arrowElement:f,popperConfig:l}));e.show&&b&&E(!1);const x=e.show||!b;if(function(e,t,{disabled:n,clickTrigger:r}={}){const a=t||Do;Rr(e,a,{disabled:n,clickTrigger:r});const i=Ye((e=>{Ri(e)&&a(e)}));s((()=>{if(n||null==e)return;const t=H(_r(e));let r=(t.defaultView||window).event;const a=Pe(t,"keyup",(e=>{e!==r?i(e):r=void 0}));return()=>{a()}}),[e,n,i])}(d,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!x)return null;const{onExit:N,onExiting:k,onEnter:O,onEntering:L,onEntered:A}=e;let S=e.children(Object.assign({},w.attributes.popper,{style:w.styles.popper,ref:m}),{popper:w,placement:i,show:!!e.show,arrowProps:Object.assign({},w.attributes.arrow,{style:w.styles.arrow,ref:p})});return S=Pi(c,u,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:S,onExit:N,onExiting:k,onExited:(...t)=>{E(!0),e.onExited&&e.onExited(...t)},onEnter:O,onEntering:L,onEntered:A}),v?y.createPortal(S,v):null}));Bo.displayName="Overlay";var $o=Bo;const Ho=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"popover-header"),m(n,{ref:a,className:O(e,t),...r}))));Ho.displayName="PopoverHeader";var Uo=Ho;const Fo=e.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},a)=>(t=I(t,"popover-body"),m(n,{ref:a,className:O(e,t),...r}))));Fo.displayName="PopoverBody";var Vo=Fo;function zo(e,t){let n=e;return"left"===e?n=t?"end":"start":"right"===e&&(n=t?"start":"end"),n}function Wo(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const Ko=e.forwardRef((({bsPrefix:e,placement:t="right",className:n,style:r,children:a,body:i,arrowProps:o,hasDoneInitialMeasure:s,popper:l,show:c,...u},d)=>{const h=I(e,"popover"),f=$(),[p]=(null==t?void 0:t.split("-"))||[],v=zo(p,f);let b=r;return c&&!s&&(b={...r,...Wo(null==l?void 0:l.strategy)}),g("div",{ref:d,role:"tooltip",style:b,"x-placement":p,className:O(n,h,p&&`bs-popover-${v}`),...u,children:[m("div",{className:"popover-arrow",...o}),i?m(Vo,{children:a}):a]})}));var Zo=Object.assign(Ko,{Header:Uo,Body:Vo,POPPER_OFFSET:[0,8]});const Go=e.forwardRef((({bsPrefix:e,placement:t="right",className:n,style:r,children:a,arrowProps:i,hasDoneInitialMeasure:o,popper:s,show:l,...c},u)=>{e=I(e,"tooltip");const d=$(),[h]=(null==t?void 0:t.split("-"))||[],f=zo(h,d);let p=r;return l&&!o&&(p={...r,...Wo(null==s?void 0:s.strategy)}),g("div",{ref:u,style:p,role:"tooltip","x-placement":h,className:O(n,e,`bs-tooltip-${f}`),...c,children:[m("div",{className:"tooltip-arrow",...i}),m("div",{className:`${e}-inner`,children:a})]})}));Go.displayName="Tooltip";var Yo=Object.assign(Go,{TOOLTIP_OFFSET:[0,6]});const Xo=e.forwardRef((({children:t,transition:a=dt,popperConfig:i={},rootClose:l=!1,placement:c="top",show:u=!1,...d},h)=>{const f=n({}),[p,v]=r(null),[g,b]=function(e){const t=n(null),r=I(void 0,"popover"),a=I(void 0,"tooltip"),i=o((()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(Hi(t.current,r))return Zo.POPPER_OFFSET;if(Hi(t.current,a))return Yo.TOOLTIP_OFFSET}return[0,0]}}})),[e,r,a]);return[t,[i]]}(d.offset),y=Ue(h,g),E=!0===a?dt:a||void 0,w=Ye((e=>{v(e),null==i||null==i.onFirstUpdate||i.onFirstUpdate(e)}));return nt((()=>{p&&d.target&&(null==f.current.scheduleUpdate||f.current.scheduleUpdate())}),[p,d.target]),s((()=>{u||v(null)}),[u]),m($o,{...d,ref:y,popperConfig:{...i,modifiers:b.concat(i.modifiers||[]),onFirstUpdate:w},transition:E,rootClose:l,placement:c,show:u,children:(n,{arrowProps:r,popper:o,show:s})=>{var l,c;!function(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=e=>n(Fe(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(Fe(e)))}(n,r);const u=null==o?void 0:o.placement,d=Object.assign(f.current,{state:null==o?void 0:o.state,scheduleUpdate:null==o?void 0:o.update,placement:u,outOfBoundaries:(null==o||null==(l=o.state)||null==(c=l.modifiersData.hide)?void 0:c.isReferenceHidden)||!1,strategy:i.strategy}),h=!!p;return"function"==typeof t?t({...n,placement:u,show:s,...!a&&s&&{className:"show"},popper:d,arrowProps:r,hasDoneInitialMeasure:h}):e.cloneElement(t,{...n,placement:u,arrowProps:r,popper:d,hasDoneInitialMeasure:h,className:O(t.props.className,!a&&s&&"show"),style:{...t.props.style,...n.style}})}})}));Xo.displayName="Overlay";var Jo=Xo;function Qo(e,t,n){const[r]=t,a=r.currentTarget,i=r.relatedTarget||r.nativeEvent[n];i&&i===a||Sr(a,i)||e(...t)}be.oneOf(["click","hover","focus"]);var es=({trigger:t=["hover","focus"],overlay:r,children:i,popperConfig:o={},show:s,defaultShow:l=!1,onToggle:c,delay:u,placement:h,flip:f=h&&-1!==h.indexOf("auto"),...p})=>{const b=n(null),y=Ue(b,i.ref),E=Vt(),w=n(""),[x,N]=_(s,l,c),k=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(u),{onFocus:O,onBlur:L,onClick:A}="function"!=typeof i?e.Children.only(i).props:{},S=a((()=>{E.clear(),w.current="show",k.show?E.set((()=>{"show"===w.current&&N(!0)}),k.show):N(!0)}),[k.show,N,E]),j=a((()=>{E.clear(),w.current="hide",k.hide?E.set((()=>{"hide"===w.current&&N(!1)}),k.hide):N(!1)}),[k.hide,N,E]),M=a(((...e)=>{S(),null==O||O(...e)}),[S,O]),C=a(((...e)=>{j(),null==L||L(...e)}),[j,L]),T=a(((...e)=>{N(!x),null==A||A(...e)}),[A,N,x]),P=a(((...e)=>{Qo(S,e,"fromElement")}),[S]),R=a(((...e)=>{Qo(j,e,"toElement")}),[j]),q=null==t?[]:[].concat(t),I={ref:e=>{y(Fe(e))}};return-1!==q.indexOf("click")&&(I.onClick=T),-1!==q.indexOf("focus")&&(I.onFocus=M,I.onBlur=C),-1!==q.indexOf("hover")&&("production"!==process.env.NODE_ENV&&Cr(q.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),I.onMouseOver=P,I.onMouseOut=R),g(v,{children:["function"==typeof i?i(I):d(i,I),m(Jo,{...p,show:x,onHide:j,flip:f,placement:h,popperConfig:o,target:b.current,children:r})]})};const ts=e.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},a)=>{const i=I(e,"row"),o=D(),s=B(),l=`${i}-cols`,c=[];return o.forEach((e=>{const t=r[e];let n;delete r[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const a=e!==s?`-${e}`:"";null!=n&&c.push(`${l}${a}-${n}`)})),m(n,{ref:a,...r,className:O(t,i,...c)})}));ts.displayName="Row";var ns=ts;var rs,as=e.forwardRef((({bsPrefix:e,className:t,striped:n,bordered:r,borderless:a,hover:i,size:o,variant:s,responsive:l,...c},u)=>{const d=I(e,"table"),h=O(t,d,s&&`${d}-${s}`,o&&`${d}-${o}`,n&&`${d}-${"string"==typeof n?`striped-${n}`:"striped"}`,r&&`${d}-bordered`,a&&`${d}-borderless`,i&&`${d}-hover`),f=m("table",{...c,className:h,ref:u});if(l){let e=`${d}-responsive`;return"string"==typeof l&&(e=`${e}-${l}`),m("div",{className:e,children:f})}return f})),is=function(e){var n=e.label,r=e.icon,a=e.children,i=e.className,o=e.variant,s=w(e,["label","icon","children","className","variant"]);return t.createElement(vt,E({className:i,variant:o||"primary"},s),n||null,r?t.createElement("i",{className:"bi bi-".concat(r)}):null,a)};!function(e){e[e.NONE=0]="NONE",e[e.HEAD=1]="HEAD",e[e.BODY=2]="BODY"}(rs||(rs={}));var os=u(rs.NONE),ss=function(e){var n=e.className,r=e.children,a=w(e,["className","children"]);return t.createElement(as,E({className:O(n,"texmo-table")},a),r)};ss.Head=function(e){var n=e.children,r=w(e,["children"]);return t.createElement(os.Provider,{value:rs.HEAD},t.createElement("thead",E({},r),n))},ss.Row=function(e){var n=e.borderColour,r=e.className,a=e.style,i=e.children,o=w(e,["borderColour","className","style","children"]);return t.createElement("tr",E({className:O(r,"table-responsive text-center h-100 mt-3 mx-0"),style:E({border:"2px solid ".concat(n)},a)},o),i)},ss.Cell=function(e){var n=e.borderStart,r=e.className,a=e.children,o=w(e,["borderStart","className","children"]),s=n?"border-start":void 0;switch(i(os)){case rs.HEAD:return t.createElement("th",E({scope:"col list-cell",className:r},o),a);case rs.BODY:case rs.NONE:default:return t.createElement("td",E({className:"px-0 pt-0 pb-3 texmo-table"},o),t.createElement("div",E({className:O(r,"h-100 d-flex align-items-center list-cell")},o),t.createElement($t,{className:"h-100 w-100 py-3"},t.createElement($t.Body,{className:"d-flex justify-content-center align-items-center py-0 ".concat(s)},t.createElement("div",{className:"w-100 h-100"},a)))))}},ss.Body=function(e){var n=e.children,r=w(e,["children"]);return t.createElement("tbody",E({},r),t.createElement(os.Provider,{value:rs.BODY},n))};var ls=function(e){var n=e.className,r=w(e,["className"]);return t.createElement(Ka,E({as:"input",className:n},r))};ls.Feedback=Da;var cs=function(e){var n=e.label,r=e.children,a=e.className;return t.createElement(Qa,{className:a},n?t.createElement("small",{className:"text-muted"},n):null,r)},us=function(e){var n=e.className,r=e.children,a=w(e,["className","children"]);return t.createElement(ri,E({className:n},a),r)};us.Feedback=Da;var ds=function(e){var n=e.type,r=e.className,a=w(e,["type","className"]);return t.createElement(za,E({type:n},a,{className:r}))};ds.Feedback=Da;var hs="object"==typeof global&&global&&global.Object===Object&&global,fs="object"==typeof self&&self&&self.Object===Object&&self,ps=hs||fs||Function("return this")(),ms=ps.Symbol,vs=Object.prototype,gs=vs.hasOwnProperty,bs=vs.toString,ys=ms?ms.toStringTag:void 0;var Es=Object.prototype.toString;var ws="[object Null]",xs="[object Undefined]",Ns=ms?ms.toStringTag:void 0;function ks(e){return null==e?void 0===e?xs:ws:Ns&&Ns in Object(e)?function(e){var t=gs.call(e,ys),n=e[ys];try{e[ys]=void 0;var r=!0}catch(e){}var a=bs.call(e);return r&&(t?e[ys]=n:delete e[ys]),a}(e):function(e){return Es.call(e)}(e)}function Os(e){return null!=e&&"object"==typeof e}var Ls=Array.isArray;function As(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ss(e){return e}var js="[object AsyncFunction]",Ms="[object Function]",Cs="[object GeneratorFunction]",Ts="[object Proxy]";function _s(e){if(!As(e))return!1;var t=ks(e);return t==Ms||t==Cs||t==js||t==Ts}var Ps,Rs=ps["__core-js_shared__"],qs=(Ps=/[^.]+$/.exec(Rs&&Rs.keys&&Rs.keys.IE_PROTO||""))?"Symbol(src)_1."+Ps:"";var Is=Function.prototype.toString;function Ds(e){if(null!=e){try{return Is.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Bs=/^\[object .+?Constructor\]$/,$s=Function.prototype,Hs=Object.prototype,Us=$s.toString,Fs=Hs.hasOwnProperty,Vs=RegExp("^"+Us.call(Fs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zs(e){return!(!As(e)||(t=e,qs&&qs in t))&&(_s(e)?Vs:Bs).test(Ds(e));var t}function Ws(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return zs(n)?n:void 0}var Ks=Ws(ps,"WeakMap"),Zs=Object.create,Gs=function(){function e(){}return function(t){if(!As(t))return{};if(Zs)return Zs(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ys(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0){if(++Qs>=800)return arguments[0]}else Qs=0;return Js.apply(void 0,arguments)});var il=9007199254740991,ol=/^(?:0|[1-9]\d*)$/;function sl(e,t){var n=typeof e;return!!(t=null==t?il:t)&&("number"==n||"symbol"!=n&&ol.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=ml}function gl(e){return null!=e&&vl(e.length)&&!_s(e)}var bl=Object.prototype;function yl(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||bl)}function El(e){return Os(e)&&"[object Arguments]"==ks(e)}var wl=Object.prototype,xl=wl.hasOwnProperty,Nl=wl.propertyIsEnumerable,kl=El(function(){return arguments}())?El:function(e){return Os(e)&&xl.call(e,"callee")&&!Nl.call(e,"callee")};var Ol="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ll=Ol&&"object"==typeof module&&module&&!module.nodeType&&module,Al=Ll&&Ll.exports===Ol?ps.Buffer:void 0,Sl=(Al?Al.isBuffer:void 0)||function(){return!1},jl={};function Ml(e){return function(t){return e(t)}}jl["[object Float32Array]"]=jl["[object Float64Array]"]=jl["[object Int8Array]"]=jl["[object Int16Array]"]=jl["[object Int32Array]"]=jl["[object Uint8Array]"]=jl["[object Uint8ClampedArray]"]=jl["[object Uint16Array]"]=jl["[object Uint32Array]"]=!0,jl["[object Arguments]"]=jl["[object Array]"]=jl["[object ArrayBuffer]"]=jl["[object Boolean]"]=jl["[object DataView]"]=jl["[object Date]"]=jl["[object Error]"]=jl["[object Function]"]=jl["[object Map]"]=jl["[object Number]"]=jl["[object Object]"]=jl["[object RegExp]"]=jl["[object Set]"]=jl["[object String]"]=jl["[object WeakMap]"]=!1;var Cl="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tl=Cl&&"object"==typeof module&&module&&!module.nodeType&&module,_l=Tl&&Tl.exports===Cl&&hs.process,Pl=function(){try{var e=Tl&&Tl.require&&Tl.require("util").types;return e||_l&&_l.binding&&_l.binding("util")}catch(e){}}(),Rl=Pl&&Pl.isTypedArray,ql=Rl?Ml(Rl):function(e){return Os(e)&&vl(e.length)&&!!jl[ks(e)]},Il=Object.prototype.hasOwnProperty;function Dl(e,t){var n=Ls(e),r=!n&&kl(e),a=!n&&!r&&Sl(e),i=!n&&!r&&!a&&ql(e),o=n||r||a||i,s=o?function(e,t){for(var n=-1,r=Array(e);++n-1},Jl.prototype.set=function(e,t){var n=this.__data__,r=Yl(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Ql=Ws(ps,"Map");function ec(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function tc(e){var t=-1,n=null==e?0:e.length;for(this.clear();++ts))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&Tu?new ju:void 0;for(i.set(e,t),i.set(t,e);++d1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(a=fd.length>3&&"function"==typeof a?(r--,a):void 0,i&&function(e,t,n){if(!As(n))return!1;var r=typeof t;return!!("number"==r?gl(n)&&sl(t,n.length):"string"==r&&t in n)&&cl(n[t],e)}(t[0],t[1],i)&&(a=r<3?void 0:a,r=1),e=Object(e);++n(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(md||{});class vd{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const r=md.TYPE&md.ATTRIBUTE;this.scope=null!=n.scope?n.scope&md.LEVEL|r:md.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map((e=>e.name))}add(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)}canAdd(e,t){return null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1)}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class gd extends Error{constructor(e){super(e="[Parchment] "+e),this.message=e,this.name=this.constructor.name}}const bd=class e{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(null==e)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(t,n,r){const a=this.query(n);if(null==a)throw new gd(`Unable to create ${n} blot`);const i=a,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:i.create(r),s=new i(t,o,r);return e.blots.set(s.domNode,s),s}find(t,n=!1){return e.find(t,n)}query(e,t=md.ANY){let n;return"string"==typeof e?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof e?e&md.LEVEL&md.BLOCK?n=this.types.block:e&md.LEVEL&md.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some((e=>(n=this.classes[e],!!n))),n=n||this.tags[e.tagName]),null==n?null:"scope"in n&&t&md.LEVEL&n.scope&&t&md.TYPE&n.scope?n:null}register(...e){return e.map((e=>{const t="blotName"in e,n="attrName"in e;if(!t&&!n)throw new gd("Invalid definition");if(t&&"abstract"===e.blotName)throw new gd("Cannot register abstract class");const r=t?e.blotName:n?e.attrName:void 0;return this.types[r]=e,n?"string"==typeof e.keyName&&(this.attributes[e.keyName]=e):t&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map((e=>e.toUpperCase())):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach((t=>{(null==this.tags[t]||null==e.className)&&(this.tags[t]=e)})))),e}))}};bd.blots=new WeakMap;let yd=bd;function Ed(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((e=>0===e.indexOf(`${t}-`)))}const wd=class extends vd{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map((e=>e.split("-").slice(0,-1).join("-")))}add(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0)}remove(e){Ed(e,this.keyName).forEach((t=>{e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")}value(e){const t=(Ed(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}};function xd(e){const t=e.split("-"),n=t.slice(1).map((e=>e[0].toUpperCase()+e.slice(1))).join("");return t[0]+n}const Nd=class extends vd{static keys(e){return(e.getAttribute("style")||"").split(";").map((e=>e.split(":")[0].trim()))}add(e,t){return!!this.canAdd(e,t)&&(e.style[xd(this.keyName)]=t,!0)}remove(e){e.style[xd(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[xd(this.keyName)];return this.canAdd(e,t)?t:""}};const kd=class{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=yd.find(this.domNode);if(null==e)return;const t=vd.keys(this.domNode),n=wd.keys(this.domNode),r=Nd.keys(this.domNode);t.concat(n).concat(r).forEach((t=>{const n=e.scroll.query(t,md.ATTRIBUTE);n instanceof vd&&(this.attributes[n.attrName]=n)}))}copy(e){Object.keys(this.attributes).forEach((t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)}))}move(e){this.copy(e),Object.keys(this.attributes).forEach((e=>{this.attributes[e].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e)),{})}},Od=class{constructor(e,t){this.scroll=e,this.domNode=t,yd.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(null==this.tagName)throw new gd("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?("string"==typeof e?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):"number"==typeof e&&(n=e),t="number"==typeof n?document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?document.createElement(n):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){null!=this.parent&&this.parent.removeChild(this),yd.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,r){const a=this.isolate(e,t);if(null!=this.scroll.query(n,md.BLOT)&&r)a.wrap(n,r);else if(null!=this.scroll.query(n,md.ATTRIBUTE)){const e=this.scroll.create(this.statics.scope);a.wrap(e),e.format(n,r)}}insertAt(e,t,n){const r=null==n?this.scroll.create("text",t):this.scroll.create(t,n),a=this.split(e);this.parent.insertBefore(r,a||void 0)}isolate(e,t){const n=this.split(e);if(null==n)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return null==this.parent||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n="string"==typeof e?this.scroll.create(e,t):e;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return 0===e?this:this.next}update(e,t){}wrap(e,t){const n="string"==typeof e?this.scroll.create(e,t):e;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new gd(`Cannot wrap ${e}`);return n.appendChild(this),n}};Od.blotName="abstract";let Ld=Od;const Ad=class extends Ld{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Ad.scope=md.INLINE_BLOT;const Sd=Ad;class jd{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),r=0;for(;n;){if(n===e)return r;r+=1,n=t()}return-1}insertBefore(e,t){null!=e&&(this.remove(e),e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return null!=e&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let r=n();for(;r;){const a=r.length();if(ei?n(s,e-i,Math.min(t,i+r-e)):n(s,0,Math.min(r,e+t-i)),i+=r,s=o()}}map(e){return this.reduce(((t,n)=>(t.push(e(n)),t)),[])}reduce(e,t){const n=this.iterator();let r=n();for(;r;)t=e(t,r),r=n();return t}}function Md(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const n=t.create(md.INLINE);return Array.from(e.childNodes).forEach((e=>{n.domNode.appendChild(e)})),e.parentNode&&e.parentNode.replaceChild(n.domNode,e),n.attach(),n}}const Cd=class e extends Ld{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach((e=>{e.attach()}))}attachUI(t){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=t,e.uiClass&&this.uiNode.classList.add(e.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new jd,Array.from(this.domNode.childNodes).filter((e=>e!==this.uiNode)).reverse().forEach((e=>{try{const t=Md(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(e){if(e instanceof gd)return;throw e}}))}deleteAt(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,((e,t,n)=>{e.deleteAt(t,n)}))}descendant(t,n=0){const[r,a]=this.children.find(n);return null==t.blotName&&t(r)||null!=t.blotName&&r instanceof t?[r,a]:r instanceof e?r.descendant(t,a):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let a=[],i=r;return this.children.forEachAt(n,r,((n,r,o)=>{(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&a.push(n),n instanceof e&&(a=a.concat(n.descendants(t,r,i))),i-=o})),a}detach(){this.children.forEach((e=>{e.detach()})),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach((n=>{t||this.statics.allowedChildren.some((e=>n instanceof e))||(n.statics.scope===md.BLOCK_BLOT?(null!=n.next&&this.splitAfter(n),null!=n.prev&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof e?n.unwrap():n.remove())}))}formatAt(e,t,n,r){this.children.forEachAt(e,t,((e,t,a)=>{e.formatAt(t,a,n,r)}))}insertAt(e,t,n){const[r,a]=this.children.find(e);if(r)r.insertAt(a,t,n);else{const e=null==n?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(e)}}insertBefore(e,t){null!=e.parent&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,null!=t&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce(((e,t)=>e+t.length()),0)}moveChildren(e,t){this.children.forEach((n=>{e.insertBefore(n,t)}))}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,n=!1){const[r,a]=this.children.find(t,n),i=[[this,t]];return r instanceof e?i.concat(r.path(a,n)):(null!=r&&i.push([r,a]),i)}removeChild(e){this.children.remove(e)}replaceWith(t,n){const r="string"==typeof t?this.scroll.create(t,n):t;return r instanceof e&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(0===e)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),((e,r,a)=>{const i=e.split(r,t);null!=i&&n.appendChild(i)})),n}splitAfter(e){const t=this.clone();for(;null!=e.next;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],r=[];e.forEach((e=>{e.target===this.domNode&&"childList"===e.type&&(n.push(...e.addedNodes),r.push(...e.removedNodes))})),r.forEach((e=>{if(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const t=this.scroll.find(e);null!=t&&(null==t.domNode.parentNode||t.domNode.parentNode===this.domNode)&&t.detach()})),n.filter((e=>e.parentNode===this.domNode&&e!==this.uiNode)).sort(((e,t)=>e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((e=>{let t=null;null!=e.nextSibling&&(t=this.scroll.find(e.nextSibling));const n=Md(e,this.scroll);(n.next!==t||null==n.next)&&(null!=n.parent&&n.parent.removeChild(this),this.insertBefore(n,t||void 0))})),this.enforceAllowedChildren()}};Cd.uiClass="";const Td=Cd;const _d=class e extends Td{static create(e){return super.create(e)}static formats(t,n){const r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new kd(this.domNode)}format(t,n){if(t!==this.statics.blotName||n){const e=this.scroll.query(t,md.INLINE);if(null==e)return;e instanceof vd?this.attributes.attribute(e,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}else this.children.forEach((t=>{t instanceof e||(t=t.wrap(e.blotName,!0)),this.attributes.copy(t)})),this.unwrap()}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return null!=t&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,r){null!=this.formats()[n]||this.scroll.query(n,md.ATTRIBUTE)?this.isolate(e,t).format(n,r):super.formatAt(e,t,n,r)}optimize(t){super.optimize(t);const n=this.formats();if(0===Object.keys(n).length)return this.unwrap();const r=this.next;r instanceof e&&r.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some((e=>e.target===this.domNode&&"attributes"===e.type))&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof e&&this.attributes.move(r),r}};_d.allowedChildren=[_d,Sd],_d.blotName="inline",_d.scope=md.INLINE_BLOT,_d.tagName="SPAN";const Pd=_d,Rd=class e extends Td{static create(e){return super.create(e)}static formats(t,n){const r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new kd(this.domNode)}format(t,n){const r=this.scroll.query(t,md.BLOCK);null!=r&&(r instanceof vd?this.attributes.attribute(r,n):t!==this.statics.blotName||n?n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n):this.replaceWith(e.blotName))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return null!=t&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,r){null!=this.scroll.query(n,md.BLOCK)?this.format(n,r):super.formatAt(e,t,n,r)}insertAt(e,t,n){if(null==n||null!=this.scroll.query(t,md.INLINE))super.insertAt(e,t,n);else{const r=this.split(e);if(null==r)throw new Error("Attempt to insertAt after block boundaries");{const e=this.scroll.create(t,n);r.parent.insertBefore(e,r)}}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some((e=>e.target===this.domNode&&"attributes"===e.type))&&this.attributes.build()}};Rd.blotName="block",Rd.scope=md.BLOCK_BLOT,Rd.tagName="P",Rd.allowedChildren=[Pd,Rd,Sd];const qd=Rd,Id=class extends Td{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,r){super.formatAt(e,t,n,r),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Id.blotName="container",Id.scope=md.BLOCK_BLOT;const Dd=Id;const Bd=class extends Sd{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,r){0===e&&t===this.length()?this.format(n,r):super.formatAt(e,t,n,r)}formats(){return this.statics.formats(this.domNode,this.scroll)}},$d={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Hd=class extends Td{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver((e=>{this.update(e)})),this.observer.observe(this.domNode,$d),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=md.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),0===e&&t===this.length()?this.children.forEach((e=>{e.remove()})):super.deleteAt(e,t)}formatAt(e,t,n,r){this.update(),super.formatAt(e,t,n,r)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let r=Array.from(this.observer.takeRecords());for(;r.length>0;)e.push(r.pop());const a=(e,t=!0)=>{null==e||e===this||null!=e.domNode.parentNode&&(n.has(e.domNode)||n.set(e.domNode,[]),t&&a(e.parent))},i=e=>{n.has(e.domNode)&&(e instanceof Td&&e.children.forEach(i),n.delete(e.domNode),e.optimize(t))};let o=e;for(let t=0;o.length>0;t+=1){if(t>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach((e=>{const t=this.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(a(this.find(e.previousSibling,!1)),Array.from(e.addedNodes).forEach((e=>{const t=this.find(e,!1);a(t,!1),t instanceof Td&&t.children.forEach((e=>{a(e,!1)}))}))):"attributes"===e.type&&a(t.prev)),a(t))})),this.children.forEach(i),o=Array.from(this.observer.takeRecords()),r=o.slice();r.length>0;)e.push(r.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map((e=>{const t=this.find(e.target,!0);return null==t?null:n.has(t.domNode)?(n.get(t.domNode).push(e),null):(n.set(t.domNode,[e]),t)})).forEach((e=>{null!=e&&e!==this&&n.has(e.domNode)&&e.update(n.get(e.domNode)||[],t)})),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};Hd.blotName="scroll",Hd.defaultChild=qd,Hd.allowedChildren=[qd,Dd],Hd.scope=md.BLOCK_BLOT,Hd.tagName="DIV";const Ud=Hd,Fd=class e extends Sd{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){null==n?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(0===e)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some((e=>"characterData"===e.type&&e.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Fd.blotName="text",Fd.scope=md.INLINE_BLOT;const Vd=Fd;var zd=Object.freeze({__proto__:null,Attributor:vd,AttributorStore:kd,BlockBlot:qd,ClassAttributor:wd,ContainerBlot:Dd,EmbedBlot:Bd,InlineBlot:Pd,LeafBlot:Sd,ParentBlot:Td,Registry:yd,Scope:md,ScrollBlot:Ud,StyleAttributor:Nd,TextBlot:Vd}),Wd={exports:{}},Kd=-1,Zd=1,Gd=0;function Yd(e,t,n,r,a){if(e===t)return e?[[Gd,e]]:[];if(null!=n){var i=function(e,t,n){var r="number"==typeof n?{index:n,length:0}:n.oldRange,a="number"==typeof n?null:n.newRange,i=e.length,o=t.length;if(0===r.length&&(null===a||0===a.length)){var s=r.index,l=e.slice(0,s),c=e.slice(s),u=a?a.index:null,d=s+o-i;if((null===u||u===d)&&!(d<0||d>o)){var h=t.slice(0,d);if((m=t.slice(d))===c){var f=Math.min(s,d);if((g=l.slice(0,f))===(y=h.slice(0,f)))return dh(g,l.slice(f),h.slice(f),c)}}if(null===u||u===s){var p=s,m=(h=t.slice(0,p),t.slice(p));if(h===l){var v=Math.min(i-p,o-p);if((b=c.slice(c.length-v))===(E=m.slice(m.length-v)))return dh(l,c.slice(0,c.length-v),m.slice(0,m.length-v),b)}}}if(r.length>0&&a&&0===a.length){var g=e.slice(0,r.index),b=e.slice(r.index+r.length);if(!(o<(f=g.length)+(v=b.length))){var y=t.slice(0,f),E=t.slice(o-v);if(g===y&&b===E)return dh(g,e.slice(f,i-v),t.slice(f,o-v),b)}}return null}(e,t,n);if(i)return i}var o=Jd(e,t),s=e.substring(0,o);o=eh(e=e.substring(o),t=t.substring(o));var l=e.substring(e.length-o),c=function(e,t){var n;if(!e)return[[Zd,t]];if(!t)return[[Kd,e]];var r=e.length>t.length?e:t,a=e.length>t.length?t:e,i=r.indexOf(a);if(-1!==i)return n=[[Zd,r.substring(0,i)],[Gd,a],[Zd,r.substring(i+a.length)]],e.length>t.length&&(n[0][0]=n[2][0]=Kd),n;if(1===a.length)return[[Kd,e],[Zd,t]];var o=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,a,i,o,c]:null}var i,o,s,l,c,u=a(n,r,Math.ceil(n.length/4)),d=a(n,r,Math.ceil(n.length/2));if(!u&&!d)return null;i=d?u&&u[4].length>d[4].length?u:d:u;e.length>t.length?(o=i[0],s=i[1],l=i[2],c=i[3]):(l=i[0],c=i[1],o=i[2],s=i[3]);var h=i[4];return[o,s,l,c,h]}(e,t);if(o){var s=o[0],l=o[1],c=o[2],u=o[3],d=o[4],h=Yd(s,c),f=Yd(l,u);return h.concat([[Gd,d]],f)}return function(e,t){for(var n=e.length,r=t.length,a=Math.ceil((n+r)/2),i=a,o=2*a,s=new Array(o),l=new Array(o),c=0;cn)f+=2;else if(y>r)h+=2;else if(d){if((x=i+u-g)>=0&&x=(w=n-l[x]))return Xd(e,t,k,y)}}for(var E=-v+p;E<=v-m;E+=2){for(var w,x=i+E,N=(w=E===-v||E!==v&&l[x-1]n)m+=2;else if(N>r)p+=2;else if(!d){if((b=i+u-E)>=0&&b=(w=n-w))return Xd(e,t,k,y)}}}}return[[Kd,e],[Zd,t]]}(e,t)}(e=e.substring(0,e.length-o),t=t.substring(0,t.length-o));return s&&c.unshift([Gd,s]),l&&c.push([Gd,l]),oh(c,a),r&&function(e){var t=!1,n=[],r=0,a=null,i=0,o=0,s=0,l=0,c=0;for(;i0?n[r-1]:-1,o=0,s=0,l=0,c=0,a=null,t=!0)),i++;t&&oh(e);(function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),r=t.charAt(0),a=n.match(th),i=r.match(th),o=a&&n.match(nh),s=i&&r.match(nh),l=o&&n.match(rh),c=s&&r.match(rh),u=l&&e.match(ah),d=c&&t.match(ih);return u||d?5:l||c?4:a&&!o&&s?3:o||s?2:a||i?1:0}var n=1;for(;n=d&&(d=h,l=r,c=a,u=i)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}})(e),i=1;for(;i=f?(h>=u.length/2||h>=d.length/2)&&(e.splice(i,0,[Gd,d.substring(0,h)]),e[i-1][1]=u.substring(0,u.length-h),e[i+1][1]=d.substring(h),i++):(f>=u.length/2||f>=d.length/2)&&(e.splice(i,0,[Gd,u.substring(0,f)]),e[i-1][0]=Zd,e[i-1][1]=d.substring(0,d.length-f),e[i+1][0]=Kd,e[i+1][1]=u.substring(f),i++),i++}i++}}(c),c}function Xd(e,t,n,r){var a=e.substring(0,n),i=t.substring(0,r),o=e.substring(n),s=t.substring(r),l=Yd(a,i),c=Yd(o,s);return l.concat(c)}function Jd(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),a=r,i=0;nr?e=e.substring(n-r):n=0&&uh(e[l][1])){var c=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),o=c+o,s=c+s,!e[l][1]){e.splice(l,1),r--;var u=l-1;e[u]&&e[u][0]===Zd&&(i++,s=e[u][1]+s,u--),e[u]&&e[u][0]===Kd&&(a++,o=e[u][1]+o,u--),l=u}}if(ch(e[r][1])){c=e[r][1].charAt(0);e[r][1]=e[r][1].slice(1),o+=c,s+=c}}if(r0||s.length>0){o.length>0&&s.length>0&&(0!==(n=Jd(s,o))&&(l>=0?e[l][1]+=s.substring(0,n):(e.splice(0,0,[Gd,s.substring(0,n)]),r++),s=s.substring(n),o=o.substring(n)),0!==(n=eh(s,o))&&(e[r][1]=s.substring(s.length-n)+e[r][1],s=s.substring(0,s.length-n),o=o.substring(0,o.length-n)));var d=i+a;0===o.length&&0===s.length?(e.splice(r-d,d),r-=d):0===o.length?(e.splice(r-d,d,[Zd,s]),r=r-d+1):0===s.length?(e.splice(r-d,d,[Kd,o]),r=r-d+1):(e.splice(r-d,d,[Kd,o],[Zd,s]),r=r-d+2)}0!==r&&e[r-1][0]===Gd?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,i=0,a=0,o="",s=""}""===e[e.length-1][1]&&e.pop();var h=!1;for(r=1;r=55296&&e<=56319}function lh(e){return e>=56320&&e<=57343}function ch(e){return lh(e.charCodeAt(0))}function uh(e){return sh(e.charCodeAt(e.length-1))}function dh(e,t,n,r){return uh(e)||ch(r)?null:function(e){for(var t=[],n=0;n0&&t.push(e[n]);return t}([[Gd,e],[Kd,t],[Zd,n],[Gd,r]])}function hh(e,t,n,r){return Yd(e,t,n,r,!0)}hh.INSERT=Zd,hh.DELETE=Kd,hh.EQUAL=Gd;var fh=hh,ph={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,a="[object Arguments]",i="[object Boolean]",o="[object Date]",s="[object Function]",l="[object GeneratorFunction]",c="[object Map]",u="[object Number]",d="[object Object]",h="[object Promise]",f="[object RegExp]",p="[object Set]",m="[object String]",v="[object Symbol]",g="[object WeakMap]",b="[object ArrayBuffer]",y="[object DataView]",E="[object Float32Array]",w="[object Float64Array]",N="[object Int8Array]",k="[object Int16Array]",O="[object Int32Array]",L="[object Uint8Array]",A="[object Uint8ClampedArray]",S="[object Uint16Array]",j="[object Uint32Array]",M=/\w*$/,C=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,_={};_[a]=_["[object Array]"]=_[b]=_[y]=_[i]=_[o]=_[E]=_[w]=_[N]=_[k]=_[O]=_[c]=_[u]=_[d]=_[f]=_[p]=_[m]=_[v]=_[L]=_[A]=_[S]=_[j]=!0,_["[object Error]"]=_[s]=_[g]=!1;var P="object"==typeof x&&x&&x.Object===Object&&x,R="object"==typeof self&&self&&self.Object===Object&&self,q=P||R||Function("return this")(),I=t&&!t.nodeType&&t,D=I&&e&&!e.nodeType&&e,B=D&&D.exports===I;function $(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function U(e,t,n,r){var a=-1,i=e?e.length:0;for(r&&i&&(n=e[++a]);++a-1},Le.prototype.set=function(e,t){var n=this.__data__,r=Ce(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Ae.prototype.clear=function(){this.__data__={hash:new Oe,map:new(fe||Le),string:new Oe}},Ae.prototype.delete=function(e){return qe(this,e).delete(e)},Ae.prototype.get=function(e){return qe(this,e).get(e)},Ae.prototype.has=function(e){return qe(this,e).has(e)},Ae.prototype.set=function(e,t){return qe(this,e).set(e,t),this},Se.prototype.clear=function(){this.__data__=new Le},Se.prototype.delete=function(e){return this.__data__.delete(e)},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Le){var r=n.__data__;if(!fe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Ae(r)}return n.set(e,t),this};var De=ce?z(ce,Object):function(){return[]},Be=function(e){return ee.call(e)};function $e(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||T.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!Ke(e)}var We=ue||function(){return!1};function Ke(e){var t=Ze(e)?ee.call(e):"";return t==s||t==l}function Ze(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ge(e){return ze(e)?je(e):function(e){if(!He(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}}(ph,ph.exports);var mh=ph.exports,vh={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,a=2,i=9007199254740991,o="[object Arguments]",s="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",u="[object Date]",d="[object Error]",h="[object Function]",f="[object GeneratorFunction]",p="[object Map]",m="[object Number]",v="[object Null]",g="[object Object]",b="[object Promise]",y="[object Proxy]",E="[object RegExp]",w="[object Set]",N="[object String]",k="[object Symbol]",O="[object Undefined]",L="[object WeakMap]",A="[object ArrayBuffer]",S="[object DataView]",j=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[o]=C[s]=C[A]=C[c]=C[S]=C[u]=C[d]=C[h]=C[p]=C[m]=C[g]=C[E]=C[w]=C[N]=C[L]=!1;var T="object"==typeof x&&x&&x.Object===Object&&x,_="object"==typeof self&&self&&self.Object===Object&&self,P=T||_||Function("return this")(),R=t&&!t.nodeType&&t,q=R&&e&&!e.nodeType&&e,I=q&&q.exports===R,D=I&&T.process,B=function(){try{return D&&D.binding&&D.binding("util")}catch(e){}}(),$=B&&B.isTypedArray;function H(e,t){for(var n=-1,r=null==e?0:e.length;++nc))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,f=!0,p=n&a?new ke:void 0;for(s.set(e,t),s.set(t,e);++h-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Ae(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Ne.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(ce||xe),string:new we}},Ne.prototype.delete=function(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t},Ne.prototype.get=function(e){return Re(this,e).get(e)},Ne.prototype.has=function(e){return Re(this,e).has(e)},Ne.prototype.set=function(e,t){var n=Re(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ke.prototype.add=ke.prototype.push=function(e){return this.__data__.set(e,n),this},ke.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.clear=function(){this.__data__=new xe,this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!ce||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ne(r)}return n.set(e,t),this.size=n.size,this};var Ie=ie?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=i}function Ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ze(e){return null!=e&&"object"==typeof e}var Ge=$?function(e){return function(t){return e(t)}}($):function(e){return Ze(e)&&We(e.length)&&!!C[Se(e)]};function Ye(e){return null!=(t=e)&&We(t.length)&&!ze(t)?Le(e):Te(e);var t}e.exports=function(e,t){return Me(e,t)}}(vh,vh.exports);var gh=vh.exports,bh={};Object.defineProperty(bh,"__esModule",{value:!0});const yh=mh,Eh=gh;var wh;!function(e){e.compose=function(e={},t={},n=!1){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});let r=yh(t);n||(r=Object.keys(r).reduce(((e,t)=>(null!=r[t]&&(e[t]=r[t]),e)),{}));for(const n in e)void 0!==e[n]&&void 0===t[n]&&(r[n]=e[n]);return Object.keys(r).length>0?r:void 0},e.diff=function(e={},t={}){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});const n=Object.keys(e).concat(Object.keys(t)).reduce(((n,r)=>(Eh(e[r],t[r])||(n[r]=void 0===t[r]?null:t[r]),n)),{});return Object.keys(n).length>0?n:void 0},e.invert=function(e={},t={}){e=e||{};const n=Object.keys(t).reduce(((n,r)=>(t[r]!==e[r]&&void 0!==e[r]&&(n[r]=t[r]),n)),{});return Object.keys(e).reduce(((n,r)=>(e[r]!==t[r]&&void 0===t[r]&&(n[r]=null),n)),n)},e.transform=function(e,t,n=!1){if("object"!=typeof e)return t;if("object"!=typeof t)return;if(!n)return t;const r=Object.keys(t).reduce(((n,r)=>(void 0===e[r]&&(n[r]=t[r]),n)),{});return Object.keys(r).length>0?r:void 0}}(wh||(wh={})),bh.default=wh;var xh,Nh={};Object.defineProperty(Nh,"__esModule",{value:!0}),function(e){e.length=function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"object"==typeof e.retain&&null!==e.retain?1:"string"==typeof e.insert?e.insert.length:1}}(xh||(xh={})),Nh.default=xh;var kh={};Object.defineProperty(kh,"__esModule",{value:!0});const Oh=Nh;kh.default=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const t=this.ops[this.index];if(t){const n=this.offset,r=Oh.default.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};{const r={};return t.attributes&&(r.attributes=t.attributes),"number"==typeof t.retain?r.retain=e:"object"==typeof t.retain&&null!==t.retain?r.retain=t.retain:"string"==typeof t.insert?r.insert=t.insert.substr(n,e):r.insert=t.insert,r}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Oh.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?"number"==typeof e.delete?"delete":"number"==typeof e.retain||"object"==typeof e.retain&&null!==e.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}}return[]}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=fh,r=mh,a=gh,i=bh;t.AttributeMap=i.default;const o=Nh;t.Op=o.default;const s=kh;t.OpIterator=s.default;const l=String.fromCharCode(0),c=(e,t)=>{if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);const n=Object.keys(e)[0];if(!n||n!==Object.keys(t)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(t)[0]}`);return[n,e[n],t[n]]};class u{constructor(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}static registerEmbed(e,t){this.handlers[e]=t}static unregisterEmbed(e){delete this.handlers[e]}static getHandler(e){const t=this.handlers[e];if(!t)throw new Error(`no handlers for embed type "${e}"`);return t}insert(e,t){const n={};return"string"==typeof e&&0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))}delete(e){return e<=0?this:this.push({delete:e})}retain(e,t){if("number"==typeof e&&e<=0)return this;const n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)}push(e){let t=this.ops.length,n=this.ops[t-1];if(e=r(e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,n=this.ops[t-1],"object"!=typeof n))return this.ops.unshift(e),this;if(a(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this}chop(){const e=this.ops[this.ops.length-1];return e&&"number"==typeof e.retain&&!e.attributes&&this.ops.pop(),this}filter(e){return this.ops.filter(e)}forEach(e){this.ops.forEach(e)}map(e){return this.ops.map(e)}partition(e){const t=[],n=[];return this.forEach((r=>{(e(r)?t:n).push(r)})),[t,n]}reduce(e,t){return this.ops.reduce(e,t)}changeLength(){return this.reduce(((e,t)=>t.insert?e+o.default.length(t):t.delete?e-t.delete:e),0)}length(){return this.reduce(((e,t)=>e+o.default.length(t)),0)}slice(e=0,t=1/0){const n=[],r=new s.default(this.ops);let a=0;for(;a0&&n.next(o.retain-e)}const l=new u(r);for(;t.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===t.peekType())l.push(t.next());else{const e=Math.min(t.peekLength(),n.peekLength()),r=t.next(e),o=n.next(e);if(o.retain){const s={};if("number"==typeof r.retain)s.retain="number"==typeof o.retain?e:o.retain;else if("number"==typeof o.retain)null==r.retain?s.insert=r.insert:s.retain=r.retain;else{const e=null==r.retain?"insert":"retain",[t,n,a]=c(r[e],o.retain),i=u.getHandler(t);s[e]={[t]:i.compose(n,a,"retain"===e)}}const d=i.default.compose(r.attributes,o.attributes,"number"==typeof r.retain);if(d&&(s.attributes=d),l.push(s),!n.hasNext()&&a(l.ops[l.ops.length-1],s)){const e=new u(t.rest());return l.concat(e).chop()}}else"number"==typeof o.delete&&("number"==typeof r.retain||"object"==typeof r.retain&&null!==r.retain)&&l.push(o)}return l.chop()}concat(e){const t=new u(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t}diff(e,t){if(this.ops===e.ops)return new u;const r=[this,e].map((t=>t.map((n=>{if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join(""))),o=new u,c=n(r[0],r[1],t,!0),d=new s.default(this.ops),h=new s.default(e.ops);return c.forEach((e=>{let t=e[1].length;for(;t>0;){let r=0;switch(e[0]){case n.INSERT:r=Math.min(h.peekLength(),t),o.push(h.next(r));break;case n.DELETE:r=Math.min(t,d.peekLength()),d.next(r),o.delete(r);break;case n.EQUAL:r=Math.min(d.peekLength(),h.peekLength(),t);const e=d.next(r),s=h.next(r);a(e.insert,s.insert)?o.retain(r,i.default.diff(e.attributes,s.attributes)):o.push(s).delete(r)}t-=r}})),o.chop()}eachLine(e,t="\n"){const n=new s.default(this.ops);let r=new u,a=0;for(;n.hasNext();){if("insert"!==n.peekType())return;const i=n.peek(),s=o.default.length(i)-n.peekLength(),l="string"==typeof i.insert?i.insert.indexOf(t,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===e(r,n.next(1).attributes||{},a))return;a+=1,r=new u}}r.length()>0&&e(r,{},a)}invert(e){const t=new u;return this.reduce(((n,r)=>{if(r.insert)t.delete(o.default.length(r));else{if("number"==typeof r.retain&&null==r.attributes)return t.retain(r.retain),n+r.retain;if(r.delete||"number"==typeof r.retain){const a=r.delete||r.retain;return e.slice(n,n+a).forEach((e=>{r.delete?t.push(e):r.retain&&r.attributes&&t.retain(o.default.length(e),i.default.invert(r.attributes,e.attributes))})),n+a}if("object"==typeof r.retain&&null!==r.retain){const a=e.slice(n,n+1),o=new s.default(a.ops).next(),[l,d,h]=c(r.retain,o.insert),f=u.getHandler(l);return t.retain({[l]:f.invert(d,h)},i.default.invert(r.attributes,o.attributes)),n+1}}return n}),0),t.chop()}transform(e,t=!1){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);const n=e,r=new s.default(this.ops),a=new s.default(n.ops),l=new u;for(;r.hasNext()||a.hasNext();)if("insert"!==r.peekType()||!t&&"insert"===a.peekType())if("insert"===a.peekType())l.push(a.next());else{const e=Math.min(r.peekLength(),a.peekLength()),n=r.next(e),o=a.next(e);if(n.delete)continue;if(o.delete)l.push(o);else{const r=n.retain,a=o.retain;let s="object"==typeof a&&null!==a?a:e;if("object"==typeof r&&null!==r&&"object"==typeof a&&null!==a){const e=Object.keys(r)[0];if(e===Object.keys(a)[0]){const n=u.getHandler(e);n&&(s={[e]:n.transform(r[e],a[e],t)})}}l.retain(s,i.default.transform(n.attributes,o.attributes,t))}}else l.retain(o.default.length(r.next()));return l.chop()}transformPosition(e,t=!1){t=!!t;const n=new s.default(this.ops);let r=0;for(;n.hasNext()&&r<=e;){const a=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r"']/g,(e=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[e])))}class Ch extends Pd{static allowedChildren=[Ch,Sh,Bd,jh];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(e,t){const n=Ch.order.indexOf(e),r=Ch.order.indexOf(t);return n>=0||r>=0?n-r:e===t?0:e0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}class Th extends qd{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=Ph(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,r){t<=0||(this.scroll.query(n,md.BLOCK)?e+t===this.length()&&this.format(n,r):super.formatAt(e,Math.min(t,this.length()-e-1),n,r),this.cache={})}insertAt(e,t,n){if(null!=n)return super.insertAt(e,t,n),void(this.cache={});if(0===t.length)return;const r=t.split("\n"),a=r.shift();a.length>0&&(e(i=i.split(e,!0),i.insertAt(0,t),t.length)),e+a.length)}insertBefore(e,t){const{head:n}=this.children;super.insertBefore(e,t),n instanceof Sh&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t&&(0===e||e>=this.length()-1)){const t=this.clone();return 0===e?(this.parent.insertBefore(t,this),this):(this.parent.insertBefore(t,this.next),t)}const n=super.split(e,t);return this.cache={},n}}Th.blotName="block",Th.tagName="P",Th.defaultChild=Sh,Th.allowedChildren=[Sh,Ch,Bd,jh];class _h extends Bd{attach(){super.attach(),this.attributes=new kd(this.domNode)}delta(){return(new Ah).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const n=this.scroll.query(e,md.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}formatAt(e,t,n,r){this.format(n,r)}insertAt(e,t,n){if(null!=n)return void super.insertAt(e,t,n);const r=t.split("\n"),a=r.pop(),i=r.map((e=>{const t=this.scroll.create(Th.blotName);return t.insertAt(0,e),t})),o=this.split(e);i.forEach((e=>{this.parent.insertBefore(e,o)})),a&&this.parent.insertBefore(this.scroll.create("text",a),o)}}function Ph(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.descendants(Sd).reduce(((e,n)=>0===n.length()?e:e.insert(n.value(),Rh(n,{},t))),new Ah).insert("\n",Rh(e))}function Rh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==e?t:("formats"in e&&"function"==typeof e.formats&&(t={...t,...e.formats()},n&&delete t["code-token"]),null==e.parent||"scroll"===e.parent.statics.blotName||e.parent.statics.scope!==e.statics.scope?t:Rh(e.parent,t,n))}_h.scope=md.BLOCK_BLOT;class qh extends Bd{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(e,t,n){super(e,t),this.selection=n,this.textNode=document.createTextNode(qh.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(e,t){if(0!==this.savedLength)return void super.format(e,t);let n=this,r=0;for(;null!=n&&n.statics.scope!==md.BLOCK_BLOT;)r+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=qh.CONTENTS.length,n.optimize(),n.formatAt(r,qh.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const e=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof jh?this.prev:null,n=t?t.length():0,r=this.next instanceof jh?this.next:null,a=r?r.text:"",{textNode:i}=this,o=i.data.split(qh.CONTENTS).join("");let s;if(i.data=qh.CONTENTS,t)s=t,(o||r)&&(t.insertAt(t.length(),o+a),r&&r.remove());else if(r)s=r,r.insertAt(0,o);else{const e=document.createTextNode(o);s=this.scroll.create(e),this.parent.insertBefore(s,this)}if(this.remove(),e){const a=(e,a)=>t&&e===t.domNode?a:e===i?n+a-1:r&&e===r.domNode?n+o.length+a:null,l=a(e.start.node,e.start.offset),c=a(e.end.node,e.end.offset);if(null!==l&&null!==c)return{startNode:s.domNode,startOffset:l,endNode:s.domNode,endOffset:c}}return null}update(e,t){if(e.some((e=>"characterData"===e.type&&e.target===this.textNode))){const e=this.restore();e&&(t.range=e)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if("A"===t.domNode.tagName){this.savedLength=qh.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}}var Ih={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new a(r,i||e,o),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,o=new Array(i);a1?t-1:0),r=1;r(t[n]=Uh.bind(console,n,e),t)),{})}Fh.level=e=>{Hh=e},Uh.level=Fh.level;const Vh=Fh("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((e=>{document.addEventListener(e,(function(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=Bh.get(e);n&&n.emitter&&n.emitter.handleDOM(...t)}))}))}));class zh extends Dh{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",Vh.error)}emit(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r{let{node:r,handler:a}=t;(e.target===r||r.contains(e.target))&&a(e,...n)}))}listenDOM(e,t,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:n})}}const Wh=Fh("quill:selection");class Kh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=e,this.length=t}}class Zh{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Kh(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(()=>{this.mouseDown||this.composing||setTimeout(this.update.bind(this,zh.sources.USER),1)})),this.emitter.on(zh.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const e=this.getNativeRange();null!=e&&e.start.node!==this.cursor.textNode&&this.emitter.once(zh.events.SCROLL_UPDATE,((t,n)=>{try{this.root.contains(e.start.node)&&this.root.contains(e.end.node)&&this.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset);const r=n.some((e=>"characterData"===e.type||"childList"===e.type||"attributes"===e.type&&e.target===this.root));this.update(r?zh.sources.SILENT:t)}catch(e){}}))})),this.emitter.on(zh.events.SCROLL_OPTIMIZE,((e,t)=>{if(t.range){const{startNode:e,startOffset:n,endNode:r,endOffset:a}=t.range;this.setNativeRange(e,n,r,a),this.update(zh.sources.SILENT)}})),this.update(zh.sources.SILENT)}handleComposition(){this.emitter.on(zh.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(zh.events.COMPOSITION_END,(()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout((()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=!1,this.update(zh.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(e,md.BLOCK)){if(n.start.node!==this.cursor.textNode){const e=this.scroll.find(n.start.node,!1);if(null==e)return;if(e instanceof Sd){const t=e.split(n.start.offset);e.parent.insertBefore(this.cursor,t)}else e.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.scroll.length();let r;e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;let[a,i]=this.scroll.leaf(e);if(null==a)return null;if(t>0&&i===a.length()){const[t]=this.scroll.leaf(e+1);if(t){const[n]=this.scroll.line(e),[r]=this.scroll.line(e+1);n===r&&(a=t,i=0)}}[r,i]=a.position(i,!0);const o=document.createRange();if(t>0)return o.setStart(r,i),[a,i]=this.scroll.leaf(e+t),null==a?null:([r,i]=a.position(i,!0),o.setEnd(r,i),o.getBoundingClientRect());let s,l="left";if(r instanceof Text){if(!r.data.length)return null;i0&&(l="right")}return{bottom:s.top+s.height,height:s.height,left:s[l],right:s[l],top:s.top,width:0}}getNativeRange(){const e=document.getSelection();if(null==e||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(null==t)return null;const n=this.normalizeNative(t);return Wh.info("getNativeRange",n),n}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();if(null==t)return[null,null];return[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&Gh(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const n=t.map((e=>{const[t,n]=e,r=this.scroll.find(t,!0),a=r.offset(this.scroll);return 0===n?a:r instanceof Sd?a+r.index(t,n):a+r.length()})),r=Math.min(Math.max(...n),this.scroll.length()-1),a=Math.min(r,...n);return new Kh(a,r-a)}normalizeNative(e){if(!Gh(this.root,e.startContainer)||!e.collapsed&&!Gh(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((e=>{let{node:t,offset:n}=e;for(;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;t=t.lastChild,n=t instanceof Text?t.data.length:t.childNodes.length>0?t.childNodes.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}rangeToNative(e){const t=this.scroll.length(),n=(e,n)=>{e=Math.min(t-1,e);const[r,a]=this.scroll.leaf(e);return r?r.position(a,n):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(Wh.info("setNativeRange",e,t,n,r),null!=e&&(null==this.root.parentNode||null==e.parentNode||null==n.parentNode))return;const i=document.getSelection();if(null!=i)if(null!=e){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};if(null==o||a||e!==o.startContainer||t!==o.startOffset||n!==o.endContainer||r!==o.endOffset){e instanceof Element&&"BR"===e.tagName&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&"BR"===n.tagName&&(r=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const a=document.createRange();a.setStart(e,t),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:zh.sources.API;if("string"==typeof t&&(n=t,t=!1),Wh.info("setRange",e),null!=e){const n=this.rangeToNative(e);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zh.sources.USER;const t=this.lastRange,[n,r]=this.getRange();if(this.lastRange=n,this.lastNative=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!hd(t,this.lastRange)){if(!this.composing&&null!=r&&r.native.collapsed&&r.start.node!==this.cursor.textNode){const e=this.cursor.restore();e&&this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}const n=[zh.events.SELECTION_CHANGE,Su(this.lastRange),Su(t),e];this.emitter.emit(zh.events.EDITOR_CHANGE,...n),e!==zh.sources.SILENT&&this.emitter.emit(...n)}}}function Gh(e,t){try{t.parentNode}catch(e){return!1}return e.contains(t)}const Yh=/^[ -~]*$/;class Xh{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const n=nf(e),r=new Ah;return function(e){const t=[];return e.forEach((e=>{if("string"==typeof e.insert){e.insert.split("\n").forEach(((n,r)=>{r&&t.push({insert:"\n",attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}))}else t.push(e)})),t}(n.ops.slice()).reduce(((e,n)=>{const a=Lh.Op.length(n);let i=n.attributes||{},o=!1,s=!1;if(null!=n.insert){if(r.retain(a),"string"==typeof n.insert){const r=n.insert;s=!r.endsWith("\n")&&(t<=e||!!this.scroll.descendant(_h,e)[0]),this.scroll.insertAt(e,r);const[a,o]=this.scroll.line(e);let l=pd({},Rh(a));if(a instanceof Th){const[e]=a.descendant(Sd,o);e&&(l=pd(l,Rh(e)))}i=Lh.AttributeMap.diff(l,i)||{}}else if("object"==typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return e;const a=null!=this.scroll.query(r,md.INLINE);if(a)(t<=e||this.scroll.descendant(_h,e)[0])&&(s=!0);else if(e>0){const[t,n]=this.scroll.descendant(Sd,e-1);if(t instanceof jh){"\n"!==t.value()[n]&&(o=!0)}else t instanceof Bd&&t.statics.scope===md.INLINE_BLOT&&(o=!0)}if(this.scroll.insertAt(e,r,n.insert[r]),a){const[t]=this.scroll.descendant(Sd,e);if(t){const e=pd({},Rh(t));i=Lh.AttributeMap.diff(e,i)||{}}}}t+=a}else if(r.push(n),null!==n.retain&&"object"==typeof n.retain){const t=Object.keys(n.retain)[0];if(null==t)return e;this.scroll.updateEmbedAt(e,t,n.retain[t])}Object.keys(i).forEach((t=>{this.scroll.formatAt(e,a,t,i[t])}));const l=o?1:0,c=s?1:0;return t+=l+c,r.retain(l),r.delete(c),e+a+l+c}),0),r.reduce(((e,t)=>"number"==typeof t.delete?(this.scroll.deleteAt(e,t.delete),e):e+Lh.Op.length(t)),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update((new Ah).retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach((r=>{this.scroll.lines(e,Math.max(t,1)).forEach((e=>{e.format(r,n[r])}))})),this.scroll.optimize();const r=(new Ah).retain(e).retain(t,Su(n));return this.update(r)}formatText(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach((r=>{this.scroll.formatAt(e,t,r,n[r])}));const r=(new Ah).retain(e).retain(t,Su(n));return this.update(r)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce(((e,t)=>e.concat(t.delta())),new Ah)}getFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach((e=>{const[t]=e;t instanceof Th?n.push(t):t instanceof Sd&&r.push(t)})):(n=this.scroll.lines(e,t),r=this.scroll.descendants(Sd,e,t));const[a,i]=[n,r].map((e=>{const t=e.shift();if(null==t)return{};let n=Rh(t);for(;Object.keys(n).length>0;){const t=e.shift();if(null==t)return n;n=ef(Rh(t),n)}return n}));return{...a,...i}}getHTML(e,t){const[n,r]=this.scroll.line(e);if(n){const a=n.length();return!(n.length()>=r+t)||0===r&&t===a?Qh(this.scroll,e,t,!0):Qh(n,r,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter((e=>"string"==typeof e.insert)).map((e=>e.insert)).join("")}insertContents(e,t){const n=nf(t),r=(new Ah).retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(r)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new Ah).retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(n).forEach((r=>{this.scroll.formatAt(e,t.length,r,n[r])})),this.update((new Ah).retain(e).insert(t,Su(n)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if(e?.statics.blotName!==Th.blotName)return!1;const t=e;return!(t.children.length>1)&&t.children.head instanceof Sh}removeFormat(e,t){const n=this.getText(e,t),[r,a]=this.scroll.line(e+t);let i=0,o=new Ah;null!=r&&(i=r.length()-a,o=r.delta().slice(a,a+i-1).insert("\n"));const s=this.getContents(e,t+i).diff((new Ah).insert(n).concat(o)),l=(new Ah).retain(e).concat(s);return this.applyDelta(l)}update(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(Yh)&&this.scroll.find(t[0].target)){const a=this.scroll.find(t[0].target),i=Rh(a),o=a.offset(this.scroll),s=t[0].oldValue.replace(qh.CONTENTS,""),l=(new Ah).insert(s),c=(new Ah).insert(a.value()),u=n&&{oldRange:rf(n.oldRange,-o),newRange:rf(n.newRange,-o)};e=(new Ah).retain(o).concat(l.diff(c,u)).reduce(((e,t)=>t.insert?e.insert(t.insert,i):e.push(t)),new Ah),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&hd(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}function Jh(e,t,n){if(0===e.length){const[e]=tf(n.pop());return t<=0?``:`${Jh([],t-1,n)}`}const[{child:r,offset:a,length:i,indent:o,type:s},...l]=e,[c,u]=tf(s);if(o>t)return n.push(s),o===t+1?`<${c}>${Qh(r,a,i)}${Jh(l,o,n)}`:`<${c}>
  • ${Jh(e,t+1,n)}`;const d=n[n.length-1];if(o===t&&s===d)return`
  • ${Qh(r,a,i)}${Jh(l,o,n)}`;const[h]=tf(n.pop());return`${Jh(e,t-1,n)}`}function Qh(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in e&&"function"==typeof e.html)return e.html(t,n);if(e instanceof jh)return Mh(e.value().slice(t,t+n));if(e instanceof Td){if("list-container"===e.statics.blotName){const r=[];return e.children.forEachAt(t,n,((e,t,n)=>{const a="formats"in e&&"function"==typeof e.formats?e.formats():{};r.push({child:e,offset:t,length:n,indent:a.indent||0,type:a.list})})),Jh(r,-1,[])}const a=[];if(e.children.forEachAt(t,n,((e,t,n)=>{a.push(Qh(e,t,n))})),r||"list"===e.statics.blotName)return a.join("");const{outerHTML:i,innerHTML:o}=e.domNode,[s,l]=i.split(`>${o}<`);return"${a.join("")}<${l}`:`${s}>${a.join("")}<${l}`}return e.domNode instanceof Element?e.domNode.outerHTML:""}function ef(e,t){return Object.keys(t).reduce(((n,r)=>{if(null==e[r])return n;const a=t[r];return a===e[r]?n[r]=a:Array.isArray(a)?a.indexOf(e[r])<0?n[r]=a.concat([e[r]]):n[r]=a:n[r]=[a,e[r]],n}),{})}function tf(e){const t="ordered"===e?"ol":"ul";switch(e){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function nf(e){return e.reduce(((e,t)=>{if("string"==typeof t.insert){const n=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(n,t.attributes)}return e.push(t)}),new Ah)}function rf(e,t){let{index:n,length:r}=e;return new Kh(n+t,r)}class af{static DEFAULTS={};constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=e,this.options=t}}const of="\ufeff";class sf extends Bd{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach((e=>{this.contentNode.appendChild(e)})),this.leftGuard=document.createTextNode(of),this.rightGuard=document.createTextNode(of),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t,n=null;const r=e.data.split(of).join("");if(e===this.leftGuard)if(this.prev instanceof jh){const e=this.prev.length();this.prev.insertAt(e,r),n={startNode:this.prev.domNode,startOffset:e+r.length}}else t=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(t),this),n={startNode:t,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof jh?(this.next.insertAt(0,r),n={startNode:this.next.domNode,startOffset:r.length}):(t=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(t),this.next),n={startNode:t,startOffset:r.length}));return e.data=of,n}update(e,t){e.forEach((e=>{if("characterData"===e.type&&(e.target===this.leftGuard||e.target===this.rightGuard)){const n=this.restore(e.target);n&&(t.range=n)}}))}}class lf{isComposing=!1;constructor(e,t){this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",(e=>{this.isComposing||this.handleCompositionStart(e)})),this.scroll.domNode.addEventListener("compositionend",(e=>{this.isComposing&&queueMicrotask((()=>{this.handleCompositionEnd(e)}))}))}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;!t||t instanceof sf||(this.emitter.emit(zh.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(zh.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(zh.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(zh.events.COMPOSITION_END,e),this.isComposing=!1}}class cf{static DEFAULTS={modules:{}};static themes={default:cf};modules={};constructor(e,t){this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach((e=>{null==this.modules[e]&&this.addModule(e)}))}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}const uf=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},df=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},hf=(e,t,n,r,a,i)=>er?0:er?t-e>r-n?e+a-n:t-r+i:0,ff=["block","break","cursor","inline","scroll","text"],pf=Fh("quill"),mf=new yd;Td.uiClass="ql-ui";class vf{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:mf,theme:"default"};static events=zh.events;static sources=zh.sources;static version="2.0.2";static imports={delta:Ah,parchment:zd,"core/module":af,"core/theme":cf};static debug(e){!0===e&&(e="log"),Fh.level(e)}static find(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Bh.get(e)||mf.find(e,t)}static import(e){return null==this.imports[e]&&pf.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const e=arguments.length<=0?void 0:arguments[0],t=!!(arguments.length<=1?void 0:arguments[1]),n="attrName"in e?e.attrName:e.blotName;"string"==typeof n?this.register(`formats/${n}`,e,t):Object.keys(e).forEach((n=>{this.register(n,e[n],t)}))}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[e]||n||pf.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&"boolean"!=typeof t&&"abstract"!==t.blotName&&mf.register(t),"function"==typeof t.register&&t.register(mf)}}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(e,t){const n=gf(e);if(!n)throw new Error("Invalid Quill container");const r=!t.theme||t.theme===vf.DEFAULTS.theme,a=r?cf:vf.import(`themes/${t.theme}`);if(!a)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:i,...o}=vf.DEFAULTS,{modules:s,...l}=a.DEFAULTS;let c=bf(t.modules);null!=c&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=pd({},bf(i),bf(s),c),d={...o,...yf(l),...yf(t)};let h=t.registry;h?t.formats&&pf.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?((e,t,n)=>{const r=new yd;return ff.forEach((e=>{const n=t.query(e);n&&r.register(n)})),e.forEach((e=>{let a=t.query(e);a||n.error(`Cannot register "${e}" specified in "formats" config. Are you sure it was registered?`);let i=0;for(;a;)if(r.register(a),a="blotName"in a?a.requiredContainer??null:null,i+=1,i>100){n.error(`Cycle detected in registering blot requiredContainer: "${e}"`);break}})),r})(t.formats,d.registry,pf):d.registry;return{...d,registry:h,container:n,theme:a,modules:Object.entries(u).reduce(((e,t)=>{let[n,r]=t;if(!r)return e;const a=vf.import(`modules/${n}`);return null==a?(pf.error(`Cannot load ${n} module. Are you sure you registered it?`),e):{...e,[n]:pd({},a.DEFAULTS||{},r)}}),{}),bounds:gf(d.bounds)}}(e,t),this.container=this.options.container,null==this.container)return void pf.error("Invalid Quill container",e);this.options.debug&&vf.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Bh.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new zh;const r=Ud.blotName,a=this.options.registry.query(r);if(!a||!("blotName"in a))throw new Error(`Cannot initialize Quill without "${r}" blot`);if(this.scroll=new a(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Xh(this.scroll),this.selection=new Zh(this.scroll,this.emitter),this.composition=new lf(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(zh.events.EDITOR_CHANGE,(e=>{e===zh.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(zh.events.SCROLL_UPDATE,((e,t)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),a=n&&r?{oldRange:n,newRange:r}:void 0;Ef.call(this,(()=>this.editor.update(null,t,a)),e)})),this.emitter.on(zh.events.SCROLL_EMBED_UPDATE,((e,t)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),a=n&&r?{oldRange:n,newRange:r}:void 0;Ef.call(this,(()=>{const n=(new Ah).retain(e.offset(this)).retain({[e.statics.blotName]:t});return this.editor.update(n,[],a)}),vf.sources.USER)})),n){const e=this.clipboard.convert({html:`${n}


    `,text:"\n"});this.setContents(e)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){const t=e;(e=document.createElement("div")).classList.add(t)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=wf(e,t,n),Ef.call(this,(()=>this.editor.deleteText(e,t)),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:zh.sources.API;return Ef.call(this,(()=>{const n=this.getSelection(!0);let r=new Ah;if(null==n)return r;if(this.scroll.query(e,md.BLOCK))r=this.editor.formatLine(n.index,n.length,{[e]:t});else{if(0===n.length)return this.selection.format(e,t),r;r=this.editor.formatText(n.index,n.length,{[e]:t})}return this.setSelection(n,zh.sources.SILENT),r}),n)}formatLine(e,t,n,r,a){let i;return[e,t,i,a]=wf(e,t,n,r,a),Ef.call(this,(()=>this.editor.formatLine(e,t,i)),a,e,0)}formatText(e,t,n,r,a){let i;return[e,t,i,a]=wf(e,t,n,r,a),Ef.call(this,(()=>this.editor.formatText(e,t,i)),a,e,0)}getBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null;if(n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length),!n)return null;const r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}getContents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e;return[e,t]=wf(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return"number"==typeof e&&(t=t??this.getLength()-e),[e,t]=wf(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return"number"==typeof e&&(t=t??this.getLength()-e),[e,t]=wf(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vf.sources.API;return Ef.call(this,(()=>this.editor.insertEmbed(e,t,n)),r,e)}insertText(e,t,n,r,a){let i;return[e,,i,a]=wf(e,0,n,r,a),Ef.call(this,(()=>this.editor.insertText(e,t,i)),a,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=wf(e,t,n),Ef.call(this,(()=>this.editor.removeFormat(e,t)),n,e)}scrollRectIntoView(e){((e,t)=>{const n=e.ownerDocument;let r=t,a=e;for(;a;){const e=a===n.body,t=e?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:uf(a),o=getComputedStyle(a),s=hf(r.left,r.right,t.left,t.right,df(o.scrollPaddingLeft),df(o.scrollPaddingRight)),l=hf(r.top,r.bottom,t.top,t.bottom,df(o.scrollPaddingTop),df(o.scrollPaddingBottom));if(s||l)if(e)n.defaultView?.scrollBy(s,l);else{const{scrollLeft:e,scrollTop:t}=a;l&&(a.scrollTop+=l),s&&(a.scrollLeft+=s);const n=a.scrollLeft-e,i=a.scrollTop-t;r={left:r.left-n,top:r.top-i,right:r.right-n,bottom:r.bottom-i}}a=e||"fixed"===o.position?null:(i=a).parentElement||i.getRootNode().host||null}var i})(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zh.sources.API;return Ef.call(this,(()=>{e=new Ah(e);const t=this.getLength(),n=this.editor.deleteText(0,t),r=this.editor.insertContents(0,e),a=this.editor.deleteText(this.getLength()-1,1);return n.compose(r).compose(a)}),t)}setSelection(e,t,n){null==e?this.selection.setRange(null,t||vf.sources.API):([e,t,,n]=wf(e,t,n),this.selection.setRange(new Kh(Math.max(0,e),t),n),n!==zh.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zh.sources.API;const n=(new Ah).insert(e);return this.setContents(n,t)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zh.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zh.sources.API;return Ef.call(this,(()=>(e=new Ah(e),this.editor.applyDelta(e))),t,!0)}}function gf(e){return"string"==typeof e?document.querySelector(e):e}function bf(e){return Object.entries(e??{}).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:!0===r?{}:r}}),{})}function yf(e){return Object.fromEntries(Object.entries(e).filter((e=>void 0!==e[1])))}function Ef(e,t,n,r){if(!this.isEnabled()&&t===zh.sources.USER&&!this.allowReadOnlyEdits)return new Ah;let a=null==n?null:this.getSelection();const i=this.editor.delta,o=e();if(null!=a&&(!0===n&&(n=a.index),null==r?a=xf(a,o,t):0!==r&&(a=xf(a,n,r,t)),this.setSelection(a,zh.sources.SILENT)),o.length()>0){const e=[zh.events.TEXT_CHANGE,o,i,t];this.emitter.emit(zh.events.EDITOR_CHANGE,...e),t!==zh.sources.SILENT&&this.emitter.emit(...e)}return o}function wf(e,t,n,r,a){let i={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(a=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(a=r,r=n,n=t,t=0),"object"==typeof n?(i=n,a=r):"string"==typeof n&&(null!=r?i[n]=r:a=n),[e,t,i,a=a||zh.sources.API]}function xf(e,t,n,r){const a="number"==typeof n?n:0;if(null==e)return null;let i,o;return t&&"function"==typeof t.transformPosition?[i,o]=[e.index,e.index+e.length].map((e=>t.transformPosition(e,r!==zh.sources.USER))):[i,o]=[e.index,e.index+e.length].map((e=>e=0?e+a:Math.max(t,e+a))),new Kh(i,o-i)}class Nf extends Dd{}function kf(e){return e instanceof Th||e instanceof _h}function Of(e){return"function"==typeof e.updateContent}function Lf(e,t,n){n.reduce(((t,n)=>{const r=Lh.Op.length(n);let a=n.attributes||{};if(null!=n.insert)if("string"==typeof n.insert){const r=n.insert;e.insertAt(t,r);const[i]=e.descendant(Sd,t),o=Rh(i);a=Lh.AttributeMap.diff(o,a)||{}}else if("object"==typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return t;e.insertAt(t,r,n.insert[r]);if(null!=e.scroll.query(r,md.INLINE)){const[n]=e.descendant(Sd,t),r=Rh(n);a=Lh.AttributeMap.diff(r,a)||{}}}return Object.keys(a).forEach((n=>{e.formatAt(t,r,n,a[n])})),t+r}),t)}const Af={scope:md.BLOCK,whitelist:["right","center","justify"]},Sf=new vd("align","align",Af),jf=new wd("align","ql-align",Af),Mf=new Nd("align","text-align",Af);class Cf extends Nd{value(e){let t=super.value(e);if(!t.startsWith("rgb("))return t;t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"");return`#${t.split(",").map((e=>`00${parseInt(e,10).toString(16)}`.slice(-2))).join("")}`}}const Tf=new wd("color","ql-color",{scope:md.INLINE}),_f=new Cf("color","color",{scope:md.INLINE}),Pf=new wd("background","ql-bg",{scope:md.INLINE}),Rf=new Cf("background","background-color",{scope:md.INLINE});class qf extends Nf{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map((e=>e.length()<=1?"":e.domNode.innerText)).join("\n").slice(e,e+t)}html(e,t){return`
    \n${Mh(this.code(e,t))}\n
    `}}class If extends Th{static TAB=" ";static register(){vf.register(qf)}}class Df extends Ch{}Df.blotName="code",Df.tagName="CODE",If.blotName="code-block",If.className="ql-code-block",If.tagName="DIV",qf.blotName="code-block-container",qf.className="ql-code-block-container",qf.tagName="DIV",qf.allowedChildren=[If],If.allowedChildren=[jh,Sh,qh],If.requiredContainer=qf;const Bf={scope:md.BLOCK,whitelist:["rtl"]},$f=new vd("direction","dir",Bf),Hf=new wd("direction","ql-direction",Bf),Uf=new Nd("direction","direction",Bf),Ff={scope:md.INLINE,whitelist:["serif","monospace"]},Vf=new wd("font","ql-font",Ff);const zf=new class extends Nd{value(e){return super.value(e).replace(/["']/g,"")}}("font","font-family",Ff),Wf=new wd("size","ql-size",{scope:md.INLINE,whitelist:["small","large","huge"]}),Kf=new Nd("size","font-size",{scope:md.INLINE,whitelist:["10px","18px","32px"]}),Zf=Fh("quill:keyboard"),Gf=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Yf extends af{static match(e,t){return!["altKey","ctrlKey","metaKey","shiftKey"].some((n=>!!t[n]!==e[n]&&null!==t[n]))&&(t.key===e.key||t.key===e.which)}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach((e=>{this.options.bindings[e]&&this.addBinding(this.options.bindings[e])})),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},(()=>{})),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(e){if("string"==typeof e||"number"==typeof e)e={key:e};else{if("object"!=typeof e)return null;e=Su(e)}e.shortKey&&(e[Gf]=e.shortKey,delete e.shortKey);return e}(e);if(null==r)return void Zf.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n});(Array.isArray(r.key)?r.key:[r.key]).forEach((e=>{const a={...r,key:e,...t,...n};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)}))}listen(){this.quill.root.addEventListener("keydown",(e=>{if(e.defaultPrevented||e.isComposing)return;if(229===e.keyCode&&("Enter"===e.key||"Backspace"===e.key))return;const t=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter((t=>Yf.match(e,t)));if(0===t.length)return;const n=vf.find(e.target,!0);if(n&&n.scroll!==this.quill.scroll)return;const r=this.quill.getSelection();if(null==r||!this.quill.hasFocus())return;const[a,i]=this.quill.getLine(r.index),[o,s]=this.quill.getLeaf(r.index),[l,c]=0===r.length?[o,s]:this.quill.getLeaf(r.index+r.length),u=o instanceof Vd?o.value().slice(0,s):"",d=l instanceof Vd?l.value().slice(c):"",h={collapsed:0===r.length,empty:0===r.length&&a.length()<=1,format:this.quill.getFormat(r),line:a,offset:i,prefix:u,suffix:d,event:e};t.some((e=>{if(null!=e.collapsed&&e.collapsed!==h.collapsed)return!1;if(null!=e.empty&&e.empty!==h.empty)return!1;if(null!=e.offset&&e.offset!==h.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((e=>null==h.format[e])))return!1}else if("object"==typeof e.format&&!Object.keys(e.format).every((t=>!0===e.format[t]?null!=h.format[t]:!1===e.format[t]?null==h.format[t]:hd(e.format[t],h.format[t]))))return!1;return!(null!=e.prefix&&!e.prefix.test(h.prefix))&&(!(null!=e.suffix&&!e.suffix.test(h.suffix))&&!0!==e.handler.call(this,r,h,e))}))&&e.preventDefault()}))}handleBackspace(e,t){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(0===e.index||this.quill.getLength()<=1)return;let r={};const[a]=this.quill.getLine(e.index);let i=(new Ah).retain(e.index-n).delete(n);if(0===t.offset){const[t]=this.quill.getLine(e.index-1);if(t){if(!("block"===t.statics.blotName&&t.length()<=1)){const t=a.formats(),n=this.quill.getFormat(e.index-1,1);if(r=Lh.AttributeMap.diff(t,n)||{},Object.keys(r).length>0){const t=(new Ah).retain(e.index+a.length()-2).retain(1,r);i=i.compose(t)}}}}this.quill.updateContents(i,vf.sources.USER),this.quill.focus()}handleDelete(e,t){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let r={};const[a]=this.quill.getLine(e.index);let i=(new Ah).retain(e.index).delete(n);if(t.offset>=a.length()-1){const[t]=this.quill.getLine(e.index+1);if(t){const n=a.formats(),o=this.quill.getFormat(e.index,1);r=Lh.AttributeMap.diff(n,o)||{},Object.keys(r).length>0&&(i=i.retain(t.length()-1).retain(1,r))}}this.quill.updateContents(i,vf.sources.USER),this.quill.focus()}handleDeleteRange(e){np({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const n=Object.keys(t.format).reduce(((e,n)=>(this.quill.scroll.query(n,md.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e)),{}),r=(new Ah).retain(e.index).delete(e.length).insert("\n",n);this.quill.updateContents(r,vf.sources.USER),this.quill.setSelection(e.index+1,vf.sources.SILENT),this.quill.focus()}}const Xf={bindings:{bold:ep("bold"),italic:ep("italic"),underline:ep("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return!(!t.collapsed||0===t.offset)||(this.quill.format("indent","+1",vf.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return!(!t.collapsed||0===t.offset)||(this.quill.format("indent","-1",vf.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){null!=t.format.indent?this.quill.format("indent","-1",vf.sources.USER):null!=t.format.list&&this.quill.format("list",!1,vf.sources.USER)}},"indent code-block":Jf(!0),"outdent code-block":Jf(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,vf.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();const n=(new Ah).retain(e.index).delete(e.length).insert("\t");return this.quill.updateContents(n,vf.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,vf.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,vf.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){const n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,vf.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(e){const[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:"checked"},a=(new Ah).retain(e.index).insert("\n",r).retain(t.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,vf.sources.USER),this.quill.setSelection(e.index+1,vf.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){const[n,r]=this.quill.getLine(e.index),a=(new Ah).retain(e.index).insert("\n",t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(a,vf.sources.USER),this.quill.setSelection(e.index+1,vf.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(e){const t=this.quill.getModule("table");if(t){const[n,r,a,i]=t.getTable(e),o=function(e,t,n,r){if(null==t.prev&&null==t.next)return null==n.prev&&null==n.next?0===r?-1:1:null==n.prev?-1:1;if(null==t.prev)return-1;if(null==t.next)return 1;return null}(0,r,a,i);if(null==o)return;let s=n.offset();if(o<0){const t=(new Ah).retain(s).insert("\n");this.quill.updateContents(t,vf.sources.USER),this.quill.setSelection(e.index+1,e.length,vf.sources.SILENT)}else if(o>0){s+=n.length();const e=(new Ah).retain(s).insert("\n");this.quill.updateContents(e,vf.sources.USER),this.quill.setSelection(s,vf.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,a=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(a-1,vf.sources.USER):this.quill.setSelection(a+r.length(),vf.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(null==this.quill.scroll.query("list"))return!0;const{length:n}=t.prefix,[r,a]=this.quill.getLine(e.index);if(a>n)return!0;let i;switch(t.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(e.index," ",vf.sources.USER),this.quill.history.cutoff();const o=(new Ah).retain(e.index-a).delete(n+1).retain(r.length()-2-a).retain(1,{list:i});return this.quill.updateContents(o,vf.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,vf.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,a=t;for(;null!=a&&a.length()<=1&&a.formats()["code-block"];)if(a=a.prev,r-=1,r<=0){const r=(new Ah).retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(r,vf.sources.USER),this.quill.setSelection(e.index-1,vf.sources.SILENT),!1}return!0}},"embed left":Qf("ArrowLeft",!1),"embed left shift":Qf("ArrowLeft",!0),"embed right":Qf("ArrowRight",!1),"embed right shift":Qf("ArrowRight",!0),"table down":tp(!1),"table up":tp(!0)}};function Jf(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const a=this.quill.scroll.query("code-block"),{TAB:i}=a;if(0===t.length&&!r.shiftKey)return this.quill.insertText(t.index,i,vf.sources.USER),void this.quill.setSelection(t.index+i.length,vf.sources.SILENT);const o=0===t.length?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:s,length:l}=t;o.forEach(((t,n)=>{e?(t.insertAt(0,i),0===n?s+=i.length:l+=i.length):t.domNode.textContent.startsWith(i)&&(t.deleteAt(0,i.length),0===n?s-=i.length:l-=i.length)})),this.quill.update(vf.sources.USER),this.quill.setSelection(s,l,vf.sources.SILENT)}}}function Qf(e,t){return{key:e,shiftKey:t,altKey:null,["ArrowLeft"===e?"prefix":"suffix"]:/^$/,handler(n){let{index:r}=n;"ArrowRight"===e&&(r+=n.length+1);const[a]=this.quill.getLeaf(r);return!(a instanceof Bd)||("ArrowLeft"===e?t?this.quill.setSelection(n.index-1,n.length+1,vf.sources.USER):this.quill.setSelection(n.index-1,vf.sources.USER):t?this.quill.setSelection(n.index,n.length+1,vf.sources.USER):this.quill.setSelection(n.index+n.length+1,vf.sources.USER),!1)}}}function ep(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],vf.sources.USER)}}}function tp(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",a=n.line,i=a.parent[r];if(null!=i){if("table-row"===i.statics.blotName){let e=i.children.head,t=a;for(;null!=t.prev;)t=t.prev,e=e.next;const r=e.offset(this.quill.scroll)+Math.min(n.offset,e.length()-1);this.quill.setSelection(r,0,vf.sources.USER)}}else{const t=a.table()[r];null!=t&&(e?this.quill.setSelection(t.offset(this.quill.scroll)+t.length()-1,0,vf.sources.USER):this.quill.setSelection(t.offset(this.quill.scroll),0,vf.sources.USER))}return!1}}}function np(e){let{quill:t,range:n}=e;const r=t.getLines(n);let a={};if(r.length>1){const e=r[0].formats(),t=r[r.length-1].formats();a=Lh.AttributeMap.diff(t,e)||{}}t.deleteText(n,vf.sources.USER),Object.keys(a).length>0&&t.formatLine(n.index,1,a,vf.sources.USER),t.setSelection(n.index,vf.sources.SILENT)}Yf.DEFAULTS=Xf;const rp=/font-weight:\s*normal/,ap=["P","OL","UL"],ip=e=>e&&ap.includes(e.tagName);const op=/\bmso-list:[^;]*ignore/i,sp=/\bmso-list:[^;]*\bl(\d+)/i,lp=/\bmso-list:[^;]*\blevel(\d+)/i,cp=e=>{const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach((e=>{(e.getAttribute("style")||"").match(op)?n.push(e):r.push(e)})),n.forEach((e=>e.parentNode?.removeChild(e)));const a=e.documentElement.innerHTML,i=r.map((e=>((e,t)=>{const n=e.getAttribute("style"),r=n?.match(sp);if(!r)return null;const a=Number(r[1]),i=n?.match(lp),o=i?Number(i[1]):1,s=new RegExp(`@list l${a}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(s);return{id:a,indent:o,type:l&&"bullet"===l[1]?"bullet":"ordered",element:e}})(e,a))).filter((e=>e));for(;i.length;){const e=[];let t=i.shift();for(;t;)e.push(t),t=i.length&&i[0]?.element===t.element.nextElementSibling&&i[0].id===t.id?i.shift():null;const n=document.createElement("ul");e.forEach((e=>{const t=document.createElement("li");t.setAttribute("data-list",e.type),e.indent>1&&t.setAttribute("class","ql-indent-"+(e.indent-1)),t.innerHTML=e.element.innerHTML,n.appendChild(t)}));const r=e[0]?.element,{parentNode:a}=r??{};r&&a?.replaceChild(n,r),e.slice(1).forEach((e=>{let{element:t}=e;a?.removeChild(t)}))}};const up=[function(e){"urn:schemas-microsoft-com:office:word"===e.documentElement.getAttribute("xmlns:w")&&cp(e)},function(e){e.querySelector('[id^="docs-internal-guid-"]')&&((e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter((e=>e.getAttribute("style")?.match(rp))).forEach((t=>{const n=e.createDocumentFragment();n.append(...t.childNodes),t.parentNode?.replaceChild(n,t)}))})(e),(e=>{Array.from(e.querySelectorAll("br")).filter((e=>ip(e.previousElementSibling)&&ip(e.nextElementSibling))).forEach((e=>{e.parentNode?.removeChild(e)}))})(e))}],dp=Fh("quill:clipboard"),hp=[[Node.TEXT_NODE,function(e,t,n){let r=e.data;if("O:P"===e.parentElement?.tagName)return t.insert(r.trim());if(!yp(e)){if(0===r.trim().length&&r.includes("\n")&&!function(e,t){return e.previousElementSibling&&e.nextElementSibling&&!gp(e.previousElementSibling,t)&&!gp(e.nextElementSibling,t)}(e,n))return t;const a=(e,t)=>{const n=t.replace(/[^\u00a0]/g,"");return n.length<1&&e?" ":n};r=r.replace(/\r\n/g," ").replace(/\n/g," "),r=r.replace(/\s\s+/g,a.bind(a,!0)),(null==e.previousSibling&&null!=e.parentElement&&gp(e.parentElement,n)||e.previousSibling instanceof Element&&gp(e.previousSibling,n))&&(r=r.replace(/^\s+/,a.bind(a,!1))),(null==e.nextSibling&&null!=e.parentElement&&gp(e.parentElement,n)||e.nextSibling instanceof Element&&gp(e.nextSibling,n))&&(r=r.replace(/\s+$/,a.bind(a,!1)))}return t.insert(r)}],[Node.TEXT_NODE,xp],["br",function(e,t){vp(t,"\n")||t.insert("\n");return t}],[Node.ELEMENT_NODE,xp],[Node.ELEMENT_NODE,function(e,t,n){const r=n.query(e);if(null==r)return t;if(r.prototype instanceof Bd){const t={},a=r.value(e);if(null!=a)return t[r.blotName]=a,(new Ah).insert(t,r.formats(e,n))}else if(r.prototype instanceof qd&&!vp(t,"\n")&&t.insert("\n"),"blotName"in r&&"formats"in r&&"function"==typeof r.formats)return mp(t,r.blotName,r.formats(e,n),n);return t}],[Node.ELEMENT_NODE,function(e,t,n){const r=vd.keys(e),a=wd.keys(e),i=Nd.keys(e),o={};return r.concat(a).concat(i).forEach((t=>{let r=n.query(t,md.ATTRIBUTE);null!=r&&(o[r.attrName]=r.value(e),o[r.attrName])||(r=fp[t],null==r||r.attrName!==t&&r.keyName!==t||(o[r.attrName]=r.value(e)||void 0),r=pp[t],null==r||r.attrName!==t&&r.keyName!==t||(r=pp[t],o[r.attrName]=r.value(e)||void 0))})),Object.entries(o).reduce(((e,t)=>{let[r,a]=t;return mp(e,r,a,n)}),t)}],[Node.ELEMENT_NODE,function(e,t,n){const r={},a=e.style||{};"italic"===a.fontStyle&&(r.italic=!0);"underline"===a.textDecoration&&(r.underline=!0);"line-through"===a.textDecoration&&(r.strike=!0);(a.fontWeight?.startsWith("bold")||parseInt(a.fontWeight,10)>=700)&&(r.bold=!0);if(t=Object.entries(r).reduce(((e,t)=>{let[r,a]=t;return mp(e,r,a,n)}),t),parseFloat(a.textIndent||0)>0)return(new Ah).insert("\t").concat(t);return t}],["li",function(e,t,n){const r=n.query(e);if(null==r||"list"!==r.blotName||!vp(t,"\n"))return t;let a=-1,i=e.parentNode;for(;null!=i;)["OL","UL"].includes(i.tagName)&&(a+=1),i=i.parentNode;return a<=0?t:t.reduce(((e,t)=>t.insert?t.attributes&&"number"==typeof t.attributes.indent?e.push(t):e.insert(t.insert,{indent:a,...t.attributes||{}}):e),new Ah)}],["ol, ul",function(e,t,n){const r=e;let a="OL"===r.tagName?"ordered":"bullet";const i=r.getAttribute("data-checked");i&&(a="true"===i?"checked":"unchecked");return mp(t,"list",a,n)}],["pre",function(e,t,n){const r=n.query("code-block"),a=!r||!("formats"in r)||"function"!=typeof r.formats||r.formats(e,n);return mp(t,"code-block",a,n)}],["tr",function(e,t,n){const r="TABLE"===e.parentElement?.tagName?e.parentElement:e.parentElement?.parentElement;if(null!=r){return mp(t,"table",Array.from(r.querySelectorAll("tr")).indexOf(e)+1,n)}return t}],["b",wp("bold")],["i",wp("italic")],["strike",wp("strike")],["style",function(){return new Ah}]],fp=[Sf,$f].reduce(((e,t)=>(e[t.keyName]=t,e)),{}),pp=[Mf,Rf,_f,Uf,zf,Kf].reduce(((e,t)=>(e[t.keyName]=t,e)),{});function mp(e,t,n,r){return r.query(t)?e.reduce(((e,r)=>{if(!r.insert)return e;if(r.attributes&&r.attributes[t])return e.push(r);const a=n?{[t]:n}:{};return e.insert(r.insert,{...a,...r.attributes})}),new Ah):e}function vp(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.lengthr(t,n,e)),new Ah):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce(((i,o)=>{let s=Ep(e,o,n,r,a);return o.nodeType===t.ELEMENT_NODE&&(s=n.reduce(((t,n)=>n(o,t,e)),s),s=(a.get(o)||[]).reduce(((t,n)=>n(o,t,e)),s)),i.concat(s)}),new Ah):new Ah}function wp(e){return(t,n,r)=>mp(n,e,!0,r)}function xp(e,t,n){if(!vp(t,"\n")){if(gp(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert("\n");if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;null!=r;){if(gp(r,n))return t.insert("\n");const e=n.query(r);if(e&&e.prototype instanceof _h)return t.insert("\n");r=r.firstChild}}}return t}function Np(e,t){let n=t;for(let t=e.length-1;t>=0;t-=1){const r=e[t];e[t]={delta:n.transform(r.delta,!0),range:r.range&&kp(r.range,n)},n=r.delta.transform(n),0===e[t].delta.length()&&e.splice(t,1)}}function kp(e,t){if(!e)return e;const n=t.transformPosition(e.index);return{index:n,length:t.transformPosition(e.index+e.length)-n}}class Op extends af{constructor(e,t){super(e,t),e.root.addEventListener("drop",(t=>{t.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(t.clientX,t.clientY);else if(document.caretPositionFromPoint){const e=document.caretPositionFromPoint(t.clientX,t.clientY);n=document.createRange(),n.setStart(e.offsetNode,e.offset),n.setEnd(e.offsetNode,e.offset)}const r=n&&e.selection.normalizeNative(n);if(r){const n=e.selection.normalizedToRange(r);t.dataTransfer?.files&&this.upload(n,t.dataTransfer.files)}}))}upload(e,t){const n=[];Array.from(t).forEach((e=>{e&&this.options.mimetypes?.includes(e.type)&&n.push(e)})),n.length>0&&this.options.handler.call(this,e,n)}}Op.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map((e=>new Promise((t=>{const n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}))));Promise.all(n).then((t=>{const n=t.reduce(((e,t)=>e.insert({image:t})),(new Ah).retain(e.index).delete(e.length));this.quill.updateContents(n,zh.sources.USER),this.quill.setSelection(e.index+t.length,zh.sources.SILENT)}))}};const Lp=["insertText","insertReplacementText"];const Ap=/Mac/i.test(navigator.platform);vf.register({"blots/block":Th,"blots/block/embed":_h,"blots/break":Sh,"blots/container":Nf,"blots/cursor":qh,"blots/embed":sf,"blots/inline":Ch,"blots/scroll":class extends Ud{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=Th;static allowedChildren=[Th,_h,Nf];constructor(e,t,n){let{emitter:r}=n;super(e,t),this.emitter=r,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",(e=>this.handleDragStart(e)))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(zh.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(zh.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(zh.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[n,r]=this.line(e),[a]=this.line(e+t);if(super.deleteAt(e,t),null!=a&&n!==a&&r>0){if(n instanceof _h||a instanceof _h)return void this.optimize();const e=a.children.head instanceof Sh?null:a.children.head;n.moveChildren(a,e),n.remove()}this.optimize()}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,n,r){super.formatAt(e,t,n,r),this.optimize()}insertAt(e,t,n){if(e>=this.length())if(null==n||null==this.scroll.query(t,md.BLOCK)){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e),null==n&&t.endsWith("\n")?e.insertAt(0,t.slice(0,-1),n):e.insertAt(0,t,n)}else{const e=this.scroll.create(t,n);this.appendChild(e)}else super.insertAt(e,t,n);this.optimize()}insertBefore(e,t){if(e.statics.scope===md.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,t)}else super.insertBefore(e,t)}insertContents(e,t){const n=this.deltaToRenderBlocks(t.concat((new Ah).insert("\n"))),r=n.pop();if(null==r)return;this.batchStart();const a=n.shift();if(a){const t="block"===a.type&&(0===a.delta.length()||!this.descendant(_h,e)[0]&&e{this.formatAt(i-1,1,e,s[e])})),e=i}let[i,o]=this.children.find(e);if(n.length&&(i&&(i=i.split(o),o=0),n.forEach((e=>{if("block"===e.type){Lf(this.createBlock(e.attributes,i||void 0),0,e.delta)}else{const t=this.create(e.key,e.value);this.insertBefore(t,i||void 0),Object.keys(e.attributes).forEach((n=>{t.format(n,e.attributes[n])}))}}))),"block"===r.type&&r.delta.length()){Lf(this,i?i.offset(i.scroll)+o:this.length(),r.delta)}this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[n,r]=t;return n instanceof Sd?[n,r]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(kf,e)}lines(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const n=(e,t,r)=>{let a=[],i=r;return e.children.forEachAt(t,r,((e,t,r)=>{kf(e)?a.push(e):e instanceof Dd&&(a=a.concat(n(e,t,i))),i-=r})),a};return n(this,e,t)}optimize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(zh.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch)return void(Array.isArray(e)&&(this.batch=this.batch.concat(e)));let t=zh.sources.USER;"string"==typeof e&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),(e=e.filter((e=>{let{target:t}=e;const n=this.find(t,!0);return n&&!Of(n)}))).length>0&&this.emitter.emit(zh.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(zh.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){const[r]=this.descendant((e=>e instanceof _h),e);r&&r.statics.blotName===t&&Of(r)&&r.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let n=new Ah;return e.forEach((e=>{const r=e?.insert;if(r)if("string"==typeof r){const a=r.split("\n");a.slice(0,-1).forEach((r=>{n.insert(r,e.attributes),t.push({type:"block",delta:n,attributes:e.attributes??{}}),n=new Ah}));const i=a[a.length-1];i&&n.insert(i,e.attributes)}else{const a=Object.keys(r)[0];if(!a)return;this.query(a,md.INLINE)?n.push(e):(n.length()&&t.push({type:"block",delta:n,attributes:{}}),n=new Ah,t.push({type:"blockEmbed",key:a,value:r[a],attributes:e.attributes??{}}))}})),n.length()&&t.push({type:"block",delta:n,attributes:{}}),t}createBlock(e,t){let n;const r={};Object.entries(e).forEach((e=>{let[t,a]=e;null!=this.query(t,md.BLOCK&md.BLOT)?n=t:r[t]=a}));const a=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(a,t||void 0);const i=a.length();return Object.entries(r).forEach((e=>{let[t,n]=e;a.formatAt(0,i,t,n)})),a}},"blots/text":jh,"modules/clipboard":class extends af{static DEFAULTS={matchers:[]};constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",(e=>this.onCaptureCopy(e,!1))),this.quill.root.addEventListener("cut",(e=>this.onCaptureCopy(e,!0))),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],hp.concat(this.options.matchers??[]).forEach((e=>{let[t,n]=e;this.addMatcher(t,n)}))}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:n}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r[If.blotName])return(new Ah).insert(n||"",{[If.blotName]:r[If.blotName]});if(!t)return(new Ah).insert(n||"",r);const a=this.convertHTML(t);return vp(a,"\n")&&(null==a.ops[a.ops.length-1].attributes||r.table)?a.compose((new Ah).retain(a.length()-1).delete(1)):a}normalizeHTML(e){(e=>{e.documentElement&&up.forEach((t=>{t(e)}))})(e)}convertHTML(e){const t=(new DOMParser).parseFromString(e,"text/html");this.normalizeHTML(t);const n=t.body,r=new WeakMap,[a,i]=this.prepareMatching(n,r);return Ep(this.quill.scroll,n,a,i,r)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vf.sources.API;if("string"==typeof e){const n=this.convert({html:e,text:""});this.quill.setContents(n,t),this.quill.setSelection(0,vf.sources.SILENT)}else{const r=this.convert({html:t,text:""});this.quill.updateContents((new Ah).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),vf.sources.SILENT)}}onCaptureCopy(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.defaultPrevented)return;e.preventDefault();const[n]=this.quill.selection.getRange();if(null==n)return;const{html:r,text:a}=this.onCopy(n,t);e.clipboardData?.setData("text/plain",a),e.clipboardData?.setData("text/html",r),t&&np({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter((e=>"#"!==e[0])).join("\n")}onCapturePaste(e){if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(null==t)return;const n=e.clipboardData?.getData("text/html");let r=e.clipboardData?.getData("text/plain");if(!n&&!r){const t=e.clipboardData?.getData("text/uri-list");t&&(r=this.normalizeURIList(t))}const a=Array.from(e.clipboardData?.files||[]);if(!n&&a.length>0)this.quill.uploader.upload(t,a);else{if(n&&a.length>0){const e=(new DOMParser).parseFromString(n,"text/html");if(1===e.body.childElementCount&&"IMG"===e.body.firstElementChild?.tagName)return void this.quill.uploader.upload(t,a)}this.onPaste(t,{html:n,text:r})}}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:r}=t;const a=this.quill.getFormat(e.index),i=this.convert({text:n,html:r},a);dp.log("onPaste",i,{text:n,html:r});const o=(new Ah).retain(e.index).delete(e.length).concat(i);this.quill.updateContents(o,vf.sources.USER),this.quill.setSelection(o.length()-e.length,vf.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const n=[],r=[];return this.matchers.forEach((a=>{const[i,o]=a;switch(i){case Node.TEXT_NODE:r.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(e.querySelectorAll(i)).forEach((e=>{if(t.has(e)){const n=t.get(e);n?.push(o)}else t.set(e,[o])}))}})),[n,r]}},"modules/history":class extends af{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(e,t){super(e,t),this.quill.on(vf.events.EDITOR_CHANGE,((e,t,n,r)=>{e===vf.events.SELECTION_CHANGE?t&&r!==vf.sources.SILENT&&(this.currentRange=t):e===vf.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&r!==vf.sources.USER?this.transform(t):this.record(t,n)),this.currentRange=kp(this.currentRange,t))})),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",(e=>{"historyUndo"===e.inputType?(this.undo(),e.preventDefault()):"historyRedo"===e.inputType&&(this.redo(),e.preventDefault())}))}change(e,t){if(0===this.stack[e].length)return;const n=this.stack[e].pop();if(!n)return;const r=this.quill.getContents(),a=n.delta.invert(r);this.stack[t].push({delta:a,range:kp(n.range,a)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,vf.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,t){if(0===e.ops.length)return;this.stack.redo=[];let n=e.invert(t),r=this.currentRange;const a=Date.now();if(this.lastRecorded+this.options.delay>a&&this.stack.undo.length>0){const e=this.stack.undo.pop();e&&(n=n.compose(e.delta),r=e.range)}else this.lastRecorded=a;0!==n.length()&&(this.stack.undo.push({delta:n,range:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){Np(this.stack.undo,e),Np(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,vf.sources.USER);else{const t=function(e,t){const n=t.reduce(((e,t)=>e+(t.delete||0)),0);let r=t.length()-n;(function(e,t){const n=t.ops[t.ops.length-1];if(null==n)return!1;if(null!=n.insert)return"string"==typeof n.insert&&n.insert.endsWith("\n");if(null!=n.attributes)return Object.keys(n.attributes).some((t=>null!=e.query(t,md.BLOCK)));return!1})(e,t)&&(r-=1);return r}(this.quill.scroll,e.delta);this.quill.setSelection(t,vf.sources.USER)}}},"modules/keyboard":Yf,"modules/uploader":Op,"modules/input":class extends af{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",(e=>{this.handleBeforeInput(e)})),/Android/i.test(navigator.userAgent)||e.on(vf.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(e){np({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===e.length)return!1;if(t){const n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents((new Ah).retain(e.index).insert(t,n),vf.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,vf.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!Lp.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||!0===t.collapsed)return;const n=function(e){if("string"==typeof e.data)return e.data;if(e.dataTransfer?.types.includes("text/plain"))return e.dataTransfer.getData("text/plain");return null}(e);if(null==n)return;const r=this.quill.selection.normalizeNative(t),a=r?this.quill.selection.normalizedToRange(r):null;a&&this.replaceText(a,n)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}},"modules/uiNode":class extends af{isListening=!1;selectionChangeDeadline=0;constructor(e,t){super(e,t),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,t){let{line:n,event:r}=t;if(!(n instanceof Td&&n.uiNode))return!0;const a="rtl"===getComputedStyle(n.domNode).direction;return!!(a&&"ArrowRight"!==r.key||!a&&"ArrowLeft"!==r.key)||(this.quill.setSelection(e.index-1,e.length+(r.shiftKey?1:0),vf.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(e=>{!e.defaultPrevented&&(e=>"ArrowLeft"===e.key||"ArrowRight"===e.key||"ArrowUp"===e.key||"ArrowDown"===e.key||"Home"===e.key||!(!Ap||"a"!==e.key||!0!==e.ctrlKey))(e)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+100,this.isListening)return;this.isListening=!0;document.addEventListener("selectionchange",(()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()}),{once:!0})}handleSelectionChange(){const e=document.getSelection();if(!e)return;const t=e.getRangeAt(0);if(!0!==t.collapsed||0!==t.startOffset)return;const n=this.quill.scroll.find(t.startContainer);if(!(n instanceof Td&&n.uiNode))return;const r=document.createRange();r.setStartAfter(n.uiNode),r.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(r)}}});const Sp=new class extends wd{add(e,t){let n=0;if("+1"===t||"-1"===t){const r=this.value(e)||0;n="+1"===t?r+1:r-1}else"number"==typeof t&&(n=t);return 0===n?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}("indent","ql-indent",{scope:md.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class jp extends Nf{}jp.blotName="list-container",jp.tagName="OL";class Mp extends Th{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){vf.register(jp)}constructor(e,t){super(e,t);const n=t.ownerDocument.createElement("span"),r=n=>{if(!e.isEnabled())return;const r=this.statics.formats(t,e);"checked"===r?(this.format("list","unchecked"),n.preventDefault()):"unchecked"===r&&(this.format("list","checked"),n.preventDefault())};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r),this.attachUI(n)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}Mp.blotName="list",Mp.tagName="LI",jp.allowedChildren=[Mp],Mp.requiredContainer=jp;class Cp extends Ch{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}let Tp=class extends Ch{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return _p(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("href",this.constructor.sanitize(t)):super.format(e,t)}};function _p(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}const Pp=["alt","height","width"];const Rp=["height","width"];const qp=new wd("code-token","hljs",{scope:md.INLINE});class Ip extends Ch{static formats(e,t){for(;null!=e&&e!==t.domNode;){if(e.classList&&e.classList.contains(If.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,n){super(e,t,n),qp.add(this.domNode,n)}format(e,t){e!==Ip.blotName?super.format(e,t):t?qp.add(this.domNode,t):(qp.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),qp.value(this.domNode)||this.unwrap()}}Ip.blotName="code-token",Ip.className="ql-token";class Dp extends If{static create(e){const t=super.create(e);return"string"==typeof e&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),Ip.blotName,!1),super.replaceWith(e,t)}}class Bp extends qf{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===Dp.blotName&&(this.forceNext=!0,this.children.forEach((n=>{n.format(e,t)})))}formatAt(e,t,n,r){n===Dp.blotName&&(this.forceNext=!0),super.formatAt(e,t,n,r)}highlight(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.children.head)return;const n=`${Array.from(this.domNode.childNodes).filter((e=>e!==this.uiNode)).map((e=>e.textContent)).join("\n")}\n`,r=Dp.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||null==this.cachedText){const t=this.children.reduce(((e,t)=>e.concat(Ph(t,!1))),new Ah),a=e(n,r);t.diff(a).reduce(((e,t)=>{let{retain:n,attributes:r}=t;return n?(r&&Object.keys(r).forEach((t=>{[Dp.blotName,Ip.blotName].includes(t)&&this.formatAt(e,n,t,r[t])})),e+n):e}),0)}this.cachedText=n,this.forceNext=!1}}html(e,t){const[n]=this.children.find(e);return`
    \n${Mh(this.code(e,t))}\n
    `}optimize(e){if(super.optimize(e),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){const e=Dp.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}}Bp.allowedChildren=[Dp],Dp.requiredContainer=Bp,Dp.allowedChildren=[Ip,qh,jh,Sh];class $p extends af{static register(){vf.register(Ip,!0),vf.register(Dp,!0),vf.register(Bp,!0)}constructor(e,t){if(super(e,t),null==this.options.hljs)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce(((e,t)=>{let{key:n}=t;return e[n]=!0,e}),{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(vf.events.SCROLL_BLOT_MOUNT,(e=>{if(!(e instanceof Bp))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach((e=>{let{key:n,label:r}=e;const a=t.ownerDocument.createElement("option");a.textContent=r,a.setAttribute("value",n),t.appendChild(a)})),t.addEventListener("change",(()=>{e.format(Dp.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)})),null==e.uiNode&&(e.attachUI(t),e.children.head&&(t.value=Dp.formats(e.children.head.domNode)))}))}initTimer(){let e=null;this.quill.on(vf.events.SCROLL_OPTIMIZE,(()=>{e&&clearTimeout(e),e=setTimeout((()=>{this.highlight(),e=null}),this.options.interval)}))}highlight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.quill.selection.composing)return;this.quill.update(vf.sources.USER);const n=this.quill.getSelection();(null==e?this.quill.scroll.descendants(Bp):[e]).forEach((e=>{e.highlight(this.highlightBlot,t)})),this.quill.update(vf.sources.SILENT),null!=n&&this.quill.setSelection(n,vf.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plain";if(t=this.languages[t]?t:"plain","plain"===t)return Mh(e).split("\n").reduce(((e,n,r)=>(0!==r&&e.insert("\n",{[If.blotName]:t}),e.insert(n))),new Ah);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(If.className),n.innerHTML=((e,t,n)=>{if("string"==typeof e.versionString){const r=e.versionString.split(".")[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value})(this.options.hljs,t,e),Ep(this.quill.scroll,n,[(e,t)=>{const n=qp.value(e);return n?t.compose((new Ah).retain(t.length(),{[Ip.blotName]:n})):t}],[(e,n)=>e.data.split("\n").reduce(((e,n,r)=>(0!==r&&e.insert("\n",{[If.blotName]:t}),e.insert(n))),n)],new WeakMap)}}$p.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class Hp extends Th{static blotName="table";static tagName="TD";static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",zp()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Hp.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class Up extends Nf{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),r=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===r.table}return!1}optimize(e){super.optimize(e),this.children.forEach((e=>{if(null==e.next)return;const t=e.formats(),n=e.next.formats();if(t.table!==n.table){const t=this.splitAfter(e);t&&t.optimize(),this.prev&&this.prev.optimize()}}))}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class Fp extends Nf{static blotName="table-body";static tagName="TBODY"}class Vp extends Nf{static blotName="table-container";static tagName="TABLE";balanceCells(){const e=this.descendants(Up),t=e.reduce(((e,t)=>Math.max(t.children.length,e)),0);e.forEach((e=>{new Array(t-e.children.length).fill(0).forEach((()=>{let t;null!=e.children.head&&(t=Hp.formats(e.children.head.domNode));const n=this.scroll.create(Hp.blotName,t);e.appendChild(n),n.optimize()}))}))}cells(e){return this.rows().map((t=>t.children.at(e)))}deleteColumn(e){const[t]=this.descendant(Fp);null!=t&&null!=t.children.head&&t.children.forEach((t=>{const n=t.children.at(e);null!=n&&n.remove()}))}insertColumn(e){const[t]=this.descendant(Fp);null!=t&&null!=t.children.head&&t.children.forEach((t=>{const n=t.children.at(e),r=Hp.formats(t.children.head.domNode),a=this.scroll.create(Hp.blotName,r);t.insertBefore(a,n)}))}insertRow(e){const[t]=this.descendant(Fp);if(null==t||null==t.children.head)return;const n=zp(),r=this.scroll.create(Up.blotName);t.children.head.children.forEach((()=>{const e=this.scroll.create(Hp.blotName,n);r.appendChild(e)}));const a=t.children.at(e);t.insertBefore(r,a)}rows(){const e=this.children.head;return null==e?[]:e.children.map((e=>e))}}function zp(){return`row-${Math.random().toString(36).slice(2,6)}`}Vp.allowedChildren=[Fp],Fp.requiredContainer=Vp,Fp.allowedChildren=[Up],Up.requiredContainer=Fp,Up.allowedChildren=[Hp],Hp.requiredContainer=Up;const Wp=Fh("quill:toolbar");class Kp extends af{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){const t=document.createElement("div");t.setAttribute("role","toolbar"),function(e,t){Array.isArray(t[0])||(t=[t]);t.forEach((t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach((e=>{if("string"==typeof e)Zp(n,e);else{const t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach((e=>{const t=document.createElement("option");!1!==e?t.setAttribute("value",String(e)):t.setAttribute("selected","selected"),r.appendChild(t)})),e.appendChild(r)}(n,t,r):Zp(n,t,r)}})),e.appendChild(n)}))}(t,this.options.container),e.container?.parentNode?.insertBefore(t,e.container),this.container=t}else"string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach((e=>{const t=this.options.handlers?.[e];t&&this.addHandler(e,t)})),Array.from(this.container.querySelectorAll("button, select")).forEach((e=>{this.attach(e)})),this.quill.on(vf.events.EDITOR_CHANGE,(()=>{const[e]=this.quill.selection.getRange();this.update(e)}))):Wp.error("Container required for toolbar",this.options)}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find((e=>0===e.indexOf("ql-")));if(!t)return;if(t=t.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[t]&&null==this.quill.scroll.query(t))return void Wp.warn("ignoring attaching to nonexistent format",t,e);const n="SELECT"===e.tagName?"change":"click";e.addEventListener(n,(n=>{let r;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;const t=e.options[e.selectedIndex];r=!t.hasAttribute("selected")&&(t.value||!1)}else r=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),n.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(null!=this.handlers[t])this.handlers[t].call(this,r);else if(this.quill.scroll.query(t).prototype instanceof Bd){if(r=prompt(`Enter ${t}`),!r)return;this.quill.updateContents((new Ah).retain(a.index).delete(a.length).insert({[t]:r}),vf.sources.USER)}else this.quill.format(t,r,vf.sources.USER);this.update(a)})),this.controls.push([t,e])}update(e){const t=null==e?{}:this.quill.getFormat(e);this.controls.forEach((n=>{const[r,a]=n;if("SELECT"===a.tagName){let n=null;if(null==e)n=null;else if(null==t[r])n=a.querySelector("option[selected]");else if(!Array.isArray(t[r])){let e=t[r];"string"==typeof e&&(e=e.replace(/"/g,'\\"')),n=a.querySelector(`option[value="${e}"]`)}null==n?(a.value="",a.selectedIndex=-1):n.selected=!0}else if(null==e)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){const e=t[r],n=e===a.getAttribute("value")||null!=e&&e.toString()===a.getAttribute("value")||null==e&&!a.getAttribute("value");a.classList.toggle("ql-active",n),a.setAttribute("aria-pressed",n.toString())}else{const e=null!=t[r];a.classList.toggle("ql-active",e),a.setAttribute("aria-pressed",e.toString())}}))}}function Zp(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),null!=n?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}Kp.DEFAULTS={},Kp.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(null!=e)if(0===e.length){const e=this.quill.getFormat();Object.keys(e).forEach((e=>{null!=this.quill.scroll.query(e,md.INLINE)&&this.quill.format(e,!1,vf.sources.USER)}))}else this.quill.removeFormat(e.index,e.length,vf.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();"rtl"===e&&null==t?this.quill.format("align","right",vf.sources.USER):e||"right"!==t||this.quill.format("align",!1,vf.sources.USER),this.quill.format("direction",e,vf.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if("+1"===e||"-1"===e){let t="+1"===e?1:-1;"rtl"===n.direction&&(t*=-1),this.quill.format("indent",r+t,vf.sources.USER)}},link(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,vf.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,vf.sources.USER):this.quill.format("list","unchecked",vf.sources.USER):this.quill.format("list",e,vf.sources.USER)}}};const Gp='';var Yp={align:{"":'',center:'',right:'',justify:''},background:'',blockquote:'',bold:'',clean:'',code:Gp,"code-block":Gp,color:'',direction:{"":'',rtl:''},formula:'',header:{1:'',2:'',3:'',4:'',5:'',6:''},italic:'',image:'',indent:{"+1":'',"-1":''},link:'',list:{bullet:'',check:'',ordered:''},script:{sub:'',super:''},strike:'',table:'',underline:'',video:''};let Xp=0;function Jp(e,t){e.setAttribute(t,`${!("true"===e.getAttribute(t))}`)}class Qp{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(()=>{this.togglePicker()})),this.label.addEventListener("keydown",(e=>{switch(e.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Jp(this.label,"aria-expanded"),Jp(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",(()=>{this.selectItem(t,!0)})),t.addEventListener("keydown",(e=>{switch(e.key){case"Enter":this.selectItem(t,!0),e.preventDefault();break;case"Escape":this.escape(),e.preventDefault()}})),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML='',e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Xp}`,Xp+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach((t=>{const n=this.buildItem(t);e.appendChild(n),!0===t.selected&&this.selectItem(n)})),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach((e=>{this.container.setAttribute(e.name,e.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout((()=>this.label.focus()),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.container.querySelector(".ql-selected");e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);const t=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class em extends Qp{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach((e=>{e.classList.add("ql-primary")}))}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),r=e&&e.getAttribute("data-value")||"";n&&("line"===n.tagName?n.style.stroke=r:n.style.fill=r)}}class tm extends Qp{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach((e=>{e.innerHTML=t[e.getAttribute("data-value")||""]})),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(null!=n){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}class nm{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,(e=>{const{overflowY:t}=getComputedStyle(e,null);return"visible"!==t&&"clip"!==t})(this.quill.root)&&this.quill.root.addEventListener("scroll",(()=>{this.root.style.marginTop=-1*this.quill.root.scrollTop+"px"})),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const r=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect();let i=0;if(a.right>r.right&&(i=r.right-a.right,this.root.style.left=`${t+i}px`),a.leftr.bottom){const t=a.bottom-a.top,r=e.bottom-e.top+t;this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")}return i}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const rm=[!1,"center","right","justify"],am=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],im=[!1,"serif","monospace"],om=["1","2","3",!1],sm=["small",!1,"large","huge"];class lm extends cf{constructor(e,t){super(e,t);const n=t=>{document.body.contains(e.root)?(null==this.tooltip||this.tooltip.root.contains(t.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach((e=>{e.container.contains(t.target)||e.close()}))):document.body.removeEventListener("click",n)};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return"toolbar"===e&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach((e=>{(e.getAttribute("class")||"").split(/\s+/).forEach((n=>{if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{const r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}}))}))}buildPickers(e,t){this.pickers=Array.from(e).map((e=>{if(e.classList.contains("ql-align")&&(null==e.querySelector("option")&&um(e,rm),"object"==typeof t.align))return new tm(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){const n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&um(e,am,"background"===n?"#ffffff":"#000000"),new em(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?um(e,im):e.classList.contains("ql-header")?um(e,om):e.classList.contains("ql-size")&&um(e,sm)),new Qp(e)}));this.quill.on(zh.events.EDITOR_CHANGE,(()=>{this.pickers.forEach((e=>{e.update()}))}))}}lm.DEFAULTS=pd({},cf.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");null==e&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",(()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""})),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class cm extends nm{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",(e=>{"Enter"===e.key?(this.save(),e.preventDefault()):"Escape"===e.key&&(this.cancel(),e.preventDefault())}))}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);null!=n&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,zh.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,zh.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=function(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(t)return`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`;if(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`;return e}(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(null!=t){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,zh.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(n+1," ",zh.sources.USER),this.quill.setSelection(n+2,zh.sources.USER)}break}}this.textbox.value="",this.hide()}}function um(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((t=>{const r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",String(t)),e.appendChild(r)}))}const dm=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class hm extends cm{static TEMPLATE=['','
    ','','',"
    "].join("");constructor(e,t){super(e,t),this.quill.on(zh.events.EDITOR_CHANGE,((e,t,n,r)=>{if(e===zh.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&r===zh.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const e=this.quill.getLines(t.index,t.length);if(1===e.length){const e=this.quill.getBounds(t);null!=e&&this.position(e)}else{const n=e[e.length-1],r=this.quill.getIndex(n),a=Math.min(n.length()-1,t.index+t.length-r),i=this.quill.getBounds(new Kh(r,a));null!=i&&this.position(i)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()}))}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",(()=>{this.root.classList.remove("ql-editing")})),this.quill.on(zh.events.SCROLL_OPTIMIZE,(()=>{setTimeout((()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(null!=e){const t=this.quill.getBounds(e);null!=t&&this.position(t)}}),1)}))}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",0!==t&&(n.style.marginLeft=-1*t-n.offsetWidth/2+"px"),t}}class fm extends lm{constructor(e,t){null!=t.modules.toolbar&&null==t.modules.toolbar.container&&(t.modules.toolbar.container=dm),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new hm(this.quill,this.options.bounds),null!=e.container&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Yp),this.buildPickers(e.container.querySelectorAll("select"),Yp))}}fm.DEFAULTS=pd({},lm.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,vf.sources.USER)}}}}});const pm=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class mm extends cm{static TEMPLATE=['','','',''].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",(e=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),e.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(e=>{if(null!=this.linkRange){const e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,"link",!1,zh.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()})),this.quill.on(zh.events.SELECTION_CHANGE,((e,t,n)=>{if(null!=e){if(0===e.length&&n===zh.sources.USER){const[t,n]=this.quill.scroll.descendant(Tp,e.index);if(null!=t){this.linkRange=new Kh(e.index-n,t.length());const r=Tp.formats(t.domNode);this.preview.textContent=r,this.preview.setAttribute("href",r),this.show();const a=this.quill.getBounds(this.linkRange);return void(null!=a&&this.position(a))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}class vm extends lm{constructor(e,t){null!=t.modules.toolbar&&null==t.modules.toolbar.container&&(t.modules.toolbar.container=pm),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){null!=e.container&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Yp),this.buildPickers(e.container.querySelectorAll("select"),Yp),this.tooltip=new mm(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},((t,n)=>{e.handlers.link.call(e,!n.format.link)})))}}vm.DEFAULTS=pd({},lm.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const e=this.quill.getSelection();if(null==e||0===e.length)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&0!==t.indexOf("mailto:")&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,vf.sources.USER)}}}}}),vf.register({"attributors/attribute/direction":$f,"attributors/class/align":jf,"attributors/class/background":Pf,"attributors/class/color":Tf,"attributors/class/direction":Hf,"attributors/class/font":Vf,"attributors/class/size":Wf,"attributors/style/align":Mf,"attributors/style/background":Rf,"attributors/style/color":_f,"attributors/style/direction":Uf,"attributors/style/font":zf,"attributors/style/size":Kf},!0),vf.register({"formats/align":jf,"formats/direction":Hf,"formats/indent":Sp,"formats/background":Rf,"formats/color":_f,"formats/font":Vf,"formats/size":Wf,"formats/blockquote":class extends Th{static blotName="blockquote";static tagName="blockquote"},"formats/code-block":If,"formats/header":class extends Th{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(e){return this.tagName.indexOf(e.tagName)+1}},"formats/list":Mp,"formats/bold":Cp,"formats/code":Df,"formats/italic":class extends Cp{static blotName="italic";static tagName=["EM","I"]},"formats/link":Tp,"formats/script":class extends Ch{static blotName="script";static tagName=["SUB","SUP"];static create(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):super.create(e)}static formats(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}},"formats/strike":class extends Cp{static blotName="strike";static tagName=["S","STRIKE"]},"formats/underline":class extends Ch{static blotName="underline";static tagName="U"},"formats/formula":class extends sf{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(e){if(null==window.katex)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return"string"==typeof e&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`${e}`}},"formats/image":class extends Bd{static blotName="image";static tagName="IMG";static create(e){const t=super.create(e);return"string"==typeof e&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Pp.reduce(((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t)),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return _p(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){Pp.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}},"formats/video":class extends _h{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Rp.reduce(((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t)),{})}static sanitize(e){return Tp.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Rp.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`${e}`}},"modules/syntax":$p,"modules/table":class extends af{static register(){vf.register(Hp),vf.register(Up),vf.register(Fp),vf.register(Vp)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Vp).forEach((e=>{e.balanceCells()}))}deleteColumn(){const[e,,t]=this.getTable();null!=t&&(e.deleteColumn(t.cellOffset()),this.quill.update(vf.sources.USER))}deleteRow(){const[,e]=this.getTable();null!=e&&(e.remove(),this.quill.update(vf.sources.USER))}deleteTable(){const[e]=this.getTable();if(null==e)return;const t=e.offset();e.remove(),this.quill.update(vf.sources.USER),this.quill.setSelection(t,vf.sources.SILENT)}getTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(null==e)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(null==t||t.statics.blotName!==Hp.blotName)return[null,null,null,-1];const r=t.parent;return[r.parent.parent,r,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,r,a]=this.getTable(t);if(null==a)return;const i=a.cellOffset();n.insertColumn(i+e),this.quill.update(vf.sources.USER);let o=r.rowOffset();0===e&&(o+=1),this.quill.setSelection(t.index+o,t.length,vf.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,r,a]=this.getTable(t);if(null==a)return;const i=r.rowOffset();n.insertRow(i+e),this.quill.update(vf.sources.USER),e>0?this.quill.setSelection(t,vf.sources.SILENT):this.quill.setSelection(t.index+r.children.length,t.length,vf.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(null==n)return;const r=new Array(e).fill(0).reduce((e=>{const n=new Array(t).fill("\n").join("");return e.insert(n,{table:zp()})}),(new Ah).retain(n.index));this.quill.updateContents(r,vf.sources.USER),this.quill.setSelection(n.index,vf.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(vf.events.SCROLL_OPTIMIZE,(e=>{e.some((e=>!!["TD","TR","TBODY","TABLE"].includes(e.target.tagName)&&(this.quill.once(vf.events.TEXT_CHANGE,((e,t,n)=>{n===vf.sources.USER&&this.balanceTables()})),!0)))}))}},"modules/toolbar":Kp,"themes/bubble":fm,"themes/snow":vm,"ui/icons":Yp,"ui/picker":Qp,"ui/icon-picker":tm,"ui/color-picker":em,"ui/tooltip":nm},!0);var gm=function(e){var r=e.modules,a=e.value,i=e.onChange,o=e.theme,l=e.importCallback,c=e.debug,u=w(e,["modules","value","onChange","theme","importCallback","debug"]),d=n(null),h=n(null);vf.debug(c||!1);var f=E(E({},r),{theme:o||"snow"});return s((function(){if(h.current){l&&l();var e=h.current,t=e.appendChild(e.ownerDocument.createElement("div")),n=new vf(t,f);return d.current=n,a&&function(e){var t=e.clipboard.convert({html:a});e.setContents(t,"silent")}(n),function(e){e.on(vf.events.TEXT_CHANGE,(function(){var e;i&&i((null===(e=d.current)||void 0===e?void 0:e.getSemanticHTML())||"")}))}(n),function(){e.innerHTML="",d.current.off(vf.events.TEXT_CHANGE)}}}),[]),t.createElement("div",{ref:h,style:u.style,id:u.id,className:u.className})};gm.Feedback=Da;var bm=function(e){var n=e.className,r=w(e,["className"]);return t.createElement(hi.Control,E({as:"input",type:"datetime-local",className:n},r))};function ym(e){return ym="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ym(e)}function Em(e){var t=function(e,t){if("object"!=ym(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ym(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ym(t)?t:String(t)}function wm(e,t,n){return(t=Em(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xm(e,t){if(null==e)return{};var n,r,a=A(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}bm.Feedback=Da;var Nm=NaN,km="[object Symbol]",Om=/^\s+|\s+$/g,Lm=/^[-+]0x[0-9a-f]+$/i,Am=/^0b[01]+$/i,Sm=/^0o[0-7]+$/i,jm=parseInt,Mm="object"==typeof x&&x&&x.Object===Object&&x,Cm="object"==typeof self&&self&&self.Object===Object&&self,Tm=Mm||Cm||Function("return this")(),_m=Object.prototype.toString,Pm=Math.max,Rm=Math.min,qm=function(){return Tm.Date.now()};function Im(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Dm(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&_m.call(e)==km}(e))return Nm;if(Im(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Im(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Om,"");var n=Am.test(e);return n||Sm.test(e)?jm(e.slice(2),n?2:8):Lm.test(e)?Nm:+e}var Bm=function(e,t,n){var r,a,i,o,s,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,i=a;return r=a=void 0,c=t,o=e.apply(i,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=qm();if(p(e))return v(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?Rm(n,i-(e-c)):n}(e))}function v(e){return s=void 0,h&&r?f(e):(r=a=void 0,o)}function g(){var e=qm(),n=p(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?f(e):o}(l);if(d)return s=setTimeout(m,t),f(l)}return void 0===s&&(s=setTimeout(m,t)),o}return t=Dm(t)||0,Im(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Pm(Dm(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),g.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=a=s=void 0},g.flush=function(){return void 0===s?o:v(qm())},g},$m=N(Bm),Hm="label";function Um(e){return"string"==typeof e?e:Hm}function Fm(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Vm=0;function zm(e){return"function"==typeof e}function Wm(e){return"string"==typeof e}function Km(){}function Zm(e,t){var n={};return t.forEach((function(t){n[t]=e[t]})),n}function Gm(e,t){return Wm(e)||!Fm(e,"paginationOption")&&!Fm(e,"customOption")?(n=zm(t)?t(e):Wm(e)?e:e[t],Wm(n)||("production"!==process.env.NODE_ENV?M(!1,"One or more options does not have a valid label string. Check the `labelKey` prop to ensure that it matches the correct option key and provides a string for filtering and display."):M(!1)),n):e[Um(t)];var n}var Ym=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;0!=a--;){var o=i[a];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n},Xm=N(Ym);function Jm(e,t){if(!Wm(e))return e[t]}var Qm=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹÐ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}].reduce((function(e,t){var n=t.base;return t.letters.split("").forEach((function(t){e[t]=n})),e}),{}),ev="̀-ͯ",tv="゙゚";function nv(e){return e.normalize("NFD").replace(new RegExp("[".concat(ev).concat(tv,"]"),"g"),"").replace(/[^\u0000-\u007E]/g,(function(e){return Qm[e]||e}))}var rv={};function av(e,t){if(!e&&-1!==t.indexOf("deprecated")){if(rv[t])return;rv[t]=!0}for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a1?arguments[1]:void 0;return"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"","-item-").concat(e)}var hv=["activeIndex","id","isFocused","isMenuShown","multiple","onClick","onFocus","placeholder"];function fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},d=Fm(u,"className")?String(u.className):void 0;return pv(pv(pv(pv({autoComplete:"off",placeholder:l,type:"text"},u),c),{},{"aria-activedescendant":t>=0?dv(n,t):void 0,"aria-autocomplete":"both","aria-expanded":a,"aria-haspopup":"listbox","aria-multiselectable":i||void 0,"aria-owns":a?n:void 0,className:O((e={},wm(e,d||"",!i),wm(e,"focus",r),e))},i&&{inputClassName:d}),{},{onClick:o,onFocus:s,role:"combobox"})}};function vv(e){var t=e.activeItem,n=e.labelKey,r=e.multiple,a=e.selected,i=e.text;return t?Gm(t,n):!r&&a.length&&a[0]?Gm(a[0],n):i}function gv(e){var t=e.allowNew,n=e.highlightOnlyResult,r=e.results;return!(!n||t)&&(1===r.length&&!Jm(r[0],"disabled"))}function bv(e,t){var n=t[e];return!!n&&!!Jm(n,"disabled")}function yv(e,t,n){for(var r=e;bv(r,n);)r+="ArrowUp"===t?-1:1;return r}function Ev(e){e.preventDefault()}function wv(e){return"lg"===e}function xv(e){return"sm"===e}var Nv=["className","isInvalid","isValid","size"];function kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ov(e){for(var t=1;t-1||s.length&&!o)return"";var c=Gm(n,i),u=uv(c.toLowerCase(),l.toLowerCase());return u&&0===u.start?l+c.slice(u.end,c.length):""}(e);s((function(){r||h.length||c()}));var m=n(!0);s((function(){m.current?m.current=!1:d(o)}),[o,d]);var v=zv(zv({},Zm(e,Kv)),{},{getInputProps:mv(zv(zv({},Zm(e,Wv)),{},{onKeyDown:function(t){if(u(t),i){var n="Enter"===t.key&&gv(e),r=p&&function(e,t){var n=!1;return"ArrowRight"===e.key&&(n=!sv(e.currentTarget)||e.currentTarget.selectionStart===e.currentTarget.value.length),"Tab"===e.key&&(e.preventDefault(),n=!0),t?t(n,e):n}(t,f);(n||r)&&l(i)}},value:vv(e)}))}),g=zv(zv({},Zm(e,Zv)),{},{hintText:p,isOnlyResult:gv(e)});return t.createElement(Uv.Provider,{value:g},zm(a)?a(v):a)};function Yv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t1&&(o=o.slice(0,1))),{activeIndex:-1,activeItem:void 0,initialItem:void 0,isFocused:!1,selected:o,showMenu:n,shownResults:a,text:s}}function Qv(e,t){return Xv(Xv({},Jv(t)),{},{isFocused:e.isFocused,selected:[],text:""})}function eg(e){return Xv(Xv({},e),{},{isFocused:!0,showMenu:!0})}function tg(e,t){var n=Jv(t),r=n.activeIndex,a=n.activeItem,i=n.initialItem,o=n.shownResults;return Xv(Xv({},e),{},{activeIndex:r,activeItem:a,initialItem:i,showMenu:!1,shownResults:o})}function ng(e,t){return e.showMenu?tg(e,t):Xv(Xv({},e),{},{showMenu:!0})}var rg=["onChange"];function ag(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ig(e){for(var t=1;t=0?e.activeItem:void 0}}))})),wm(Dv(e),"_handleActiveItemChange",(function(t){Xm(t,e.state.activeItem)||e.setState({activeItem:t})})),wm(Dv(e),"_handleBlur",(function(t){t.persist(),e.setState({isFocused:!1},(function(){return e.props.onBlur(t)}))})),wm(Dv(e),"_handleChange",(function(t){e.props.onChange&&e.props.onChange(t)})),wm(Dv(e),"_handleClear",(function(){e.inputNode&&function(e,t){var n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value");n&&n.set&&n.set.call(e,t);var r=new Event("input",{bubbles:!0});e.dispatchEvent(r)}(e.inputNode,""),e.setState(Qv,(function(){e.props.multiple&&e._handleChange([])}))})),wm(Dv(e),"_handleClick",(function(t){var n;t.persist();var r=null===(n=e.props.inputProps)||void 0===n?void 0:n.onClick;e.setState(eg,(function(){return zm(r)&&r(t)}))})),wm(Dv(e),"_handleFocus",(function(t){t.persist(),e.setState(eg,(function(){return e.props.onFocus(t)}))})),wm(Dv(e),"_handleInitialItemChange",(function(t){Xm(t,e.state.initialItem)||e.setState({initialItem:t})})),wm(Dv(e),"_handleInputChange",(function(t){t.persist();var n=t.currentTarget.value,r=e.props,a=r.multiple,i=r.onInputChange,o=e.state.selected.length&&!a;e.setState((function(e,t){var r=Jv(t),a=r.activeIndex,i=r.activeItem,s=r.shownResults;return{activeIndex:a,activeItem:i,selected:o?[]:e.selected,showMenu:!0,shownResults:s,text:n}}),(function(){i(n,t),o&&e._handleChange([])}))})),wm(Dv(e),"_handleKeyDown",(function(t){var n,r,a,i,o=e.state.activeItem;if(!e.isMenuShown)return"ArrowUp"!==t.key&&"ArrowDown"!==t.key||e.setState({showMenu:!0}),void e.props.onKeyDown(t);switch(t.key){case"ArrowUp":case"ArrowDown":t.preventDefault(),e._handleActiveIndexChange((n=e.state.activeIndex,r=t.key,a=e.items,i=n,(i=yv(i+="ArrowUp"===r?-1:1,r,a))===a.length?i=-1:-2===i&&(i=yv(i=a.length-1,r,a)),i));break;case"Enter":t.preventDefault(),o&&e._handleMenuItemSelect(o,t);break;case"Escape":case"Tab":e.hideMenu()}e.props.onKeyDown(t)})),wm(Dv(e),"_handleMenuItemSelect",(function(t,n){Jm(t,"paginationOption")?e._handlePaginate(n):e._handleSelectionAdd(t)})),wm(Dv(e),"_handlePaginate",(function(t){t.persist(),e.setState((function(e,t){return{shownResults:e.shownResults+t.maxResults}}),(function(){return e.props.onPaginate(t,e.state.shownResults)}))})),wm(Dv(e),"_handleSelectionAdd",(function(t){var n,r,a,i=e.props,o=i.multiple,s=i.labelKey,l=t;!Wm(l)&&l.customOption&&(l=ig(ig({},l),{},{id:(a="new-id-",Vm+=1,(null==a?"":String(a))+Vm)})),o?(n=e.state.selected.concat(l),r=""):(n=[l],r=Gm(l,s)),e.setState((function(e,t){return ig(ig({},tg(e,t)),{},{initialItem:l,selected:n,text:r})}),(function(){return e._handleChange(n)}))})),wm(Dv(e),"_handleSelectionRemove",(function(t){var n=e.state.selected.filter((function(e){return!Xm(e,t)}));e.focus(),e.setState((function(e,t){return ig(ig({},tg(e,t)),{},{selected:n})}),(function(){return e._handleChange(n)}))})),e}return Iv(r,[{key:"componentDidMount",value:function(){this.props.autoFocus&&this.focus()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.labelKey,a=n.multiple,i=n.selected;!function(e,t){var n,r,a,i=!e&&t;i?(n="uncontrolled",r="controlled",a="an"):(n="controlled",r="uncontrolled",a="a"),av(!(i||e&&!t),"You are changing ".concat(a," ").concat(n," typeahead to be ").concat(r,". ")+"Input elements should not switch from ".concat(n," to ").concat(r," (or vice versa). ")+"Decide between using a controlled or uncontrolled element for the lifetime of the component.")}(i,e.selected),i&&!Xm(i,t.selected)&&(this.setState({selected:i}),a||this.setState({text:i.length?Gm(i[0],r):""}))}},{key:"render",value:function(){var e=this.props;e.onChange;var n=ig(ig({},xm(e,rg)),this.state),r=n.filterBy,a=n.labelKey,i=n.options,o=n.paginate,s=n.shownResults,l=n.text;this.isMenuShown=function(e){var t=e.open,n=e.minLength,r=e.showMenu,a=e.text;return t||!1===t?t:!(a.lengths;if(c=function(e,t){return!t||t>=e.length?e:e.slice(0,t)}(c,s),function(e,t){var n=t.allowNew,r=t.labelKey,a=t.text;return!(!n||!a.trim())&&(zm(n)?n(e,t):!e.some((function(e){return Gm(e,r)===a})))}(c,n)&&c.push(wm({customOption:!0},Um(a),l)),h)c.push((wm(d={},Um(a),""),wm(d,"paginationOption",!0),d))}return t.createElement(Gv,L({},n,{hideMenu:this.hideMenu,inputNode:this.inputNode,inputRef:this.inputRef,isMenuShown:this.isMenuShown,onActiveItemChange:this._handleActiveItemChange,onAdd:this._handleSelectionAdd,onBlur:this._handleBlur,onChange:this._handleInputChange,onClear:this._handleClear,onClick:this._handleClick,onFocus:this._handleFocus,onHide:this.hideMenu,onInitialItemChange:this._handleInitialItemChange,onKeyDown:this._handleKeyDown,onMenuItemClick:this._handleMenuItemSelect,onRemove:this._handleSelectionRemove,results:c,setItem:this.setItem,toggleMenu:this.toggleMenu}))}}]),r}();wm(cg,"propTypes",sg),wm(cg,"defaultProps",lg);var ug=["className","label","onClick","onKeyDown","size"],dg={label:be.string,onClick:be.func,onKeyDown:be.func,size:Sv},hg=function(e){var n=e.className,r=e.label,a=void 0===r?"Clear":r,i=e.onClick,o=e.onKeyDown,s=e.size,l=xm(e,ug);return t.createElement("button",L({},l,{"aria-label":a,className:O("close","btn-close","rbt-close",{"rbt-close-lg":wv(s),"rbt-close-sm":xv(s)},n),onClick:function(e){e.stopPropagation(),i&&i(e)},onKeyDown:function(e){"Backspace"===e.key&&e.preventDefault(),o&&o(e)},type:"button"}),t.createElement("span",{"aria-hidden":"true",className:"rbt-close-content"},"×"),t.createElement("span",{className:"sr-only visually-hidden"},a))};hg.propTypes=dg;var fg={label:be.string},pg=function(e){var n=e.label,r=void 0===n?"Loading...":n;return t.createElement("div",{className:"rbt-loader spinner-border spinner-border-sm",role:"status"},t.createElement("span",{className:"sr-only visually-hidden"},r))};function mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:"";return n&&(n=n.replace(n[0],n[0].toUpperCase())),["Top","Right","Bottom","Left"].map((function(r){return e["".concat(t).concat(r).concat(n)]})).join(" ")}var nb=function(){var e=Fv(),t=e.hintText,r=e.inputNode,a=n(null);return s((function(){r&&a.current&&function(e,t){var n=window.getComputedStyle(e);t.style.borderStyle=tb(n,"border","style"),t.style.borderWidth=tb(n,"border","width"),t.style.fontSize=n.fontSize,t.style.fontWeight=n.fontWeight,t.style.height=n.height,t.style.lineHeight=n.lineHeight,t.style.margin=tb(n,"margin"),t.style.padding=tb(n,"padding")}(r,a.current)})),{hintRef:a,hintText:t}},rb=function(e){var n=e.children,r=e.className,a=nb(),i=a.hintRef,o=a.hintText;return t.createElement("div",{className:r,style:{display:"flex",flex:1,height:"100%",position:"relative"}},n,t.createElement("input",{"aria-hidden":!0,className:"rbt-input-hint",ref:i,readOnly:!0,style:{backgroundColor:"transparent",borderColor:"transparent",boxShadow:"none",color:"rgba(0, 0, 0, 0.54)",left:0,pointerEvents:"none",position:"absolute",top:0,width:"100%"},tabIndex:-1,value:o}))},ab=h((function(e,n){return t.createElement("input",L({},e,{className:O("rbt-input-main",e.className),ref:n}))})),ib=["children","className","inputClassName","inputRef","referenceElementRef","selected"];function ob(e){var n=t.useRef(null),r=t.useRef(null),a=Lv(e),i=a.children,o=a.className,s=a.inputClassName;a.inputRef;var l=a.referenceElementRef,c=a.selected,u=xm(a,ib);function d(t){if(e.disabled)t.currentTarget.blur();else{var n=r.current;!n||t.currentTarget.contains(t.target)&&t.currentTarget!==t.target||(sv(n)&&(n.selectionStart=n.value.length),n.focus())}}return t.createElement("div",{className:O("rbt-input-multi",{disabled:e.disabled},o),onClick:d,onFocus:d,ref:l,tabIndex:-1},t.createElement("div",{className:"rbt-input-wrapper",ref:n},i,t.createElement(rb,null,t.createElement(ab,L({},u,{className:s,onKeyDown:function(t){if("Backspace"===t.key&&c.length&&!e.value){var r;t.preventDefault();var a=null===(r=n.current)||void 0===r?void 0:r.children;if(null!=a&&a.length){var i=a[a.length-2];null==i||i.focus()}}e.onKeyDown&&e.onKeyDown(t)},ref:function(t){r.current=t,e.inputRef(t)},style:{backgroundColor:"transparent",border:0,boxShadow:"none",cursor:"inherit",outline:"none",padding:0,width:"100%",zIndex:1}})))))}var sb=["inputRef","referenceElementRef"],lb=function(e){var n=e.inputRef,r=e.referenceElementRef,a=xm(e,sb);return t.createElement(rb,null,t.createElement(ab,L({},Lv(a),{ref:function(e){n(e),r(e)}})))},cb={children:be.string.isRequired,highlightClassName:be.string,search:be.string.isRequired},ub=function(e){var n=e.children,r=e.highlightClassName,a=void 0===r?"rbt-highlight-text":r,i=e.search;if(!i||!n)return t.createElement(t.Fragment,null,n);for(var o=0,s=n,l=[];s;){var c=uv(s,i);if(!c){l.push(s);break}var u=s.slice(0,c.start);u&&l.push(u);var d=s.slice(c.start,c.end);l.push(t.createElement("mark",{className:a,key:o},d)),o+=1,s=s.slice(c.end)}return t.createElement(t.Fragment,null,l)};ub.propTypes=cb;const db=e=>"object"==typeof e&&null!=e&&1===e.nodeType,hb=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,fb=(e,t)=>{if(e.clientHeight{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeightit||i>e&&o=t&&s>=n?i-e-r:o>t&&sn?o-t+a:0,mb=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},vb=(e,t)=>{var n,r,a,i;if("undefined"==typeof document)return[];const{scrollMode:o,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=t,d="function"==typeof c?c:e=>e!==c;if(!db(e))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,f=[];let p=e;for(;db(p)&&d(p);){if(p=mb(p),p===h){f.push(p);break}null!=p&&p===document.body&&fb(p)&&!fb(document.documentElement)||null!=p&&fb(p,u)&&f.push(p)}const m=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(a=window.visualViewport)?void 0:a.height)?i:innerHeight,{scrollX:g,scrollY:b}=window,{height:y,width:E,top:w,right:x,bottom:N,left:k}=e.getBoundingClientRect(),{top:O,right:L,bottom:A,left:S}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let j="start"===s||"nearest"===s?w-O:"end"===s?N+A:w+y/2-O+A,M="center"===l?k+E/2-S+L:"end"===l?x+L:k-S;const C=[];for(let e=0;e=0&&k>=0&&N<=v&&x<=m&&w>=a&&N<=c&&k>=u&&x<=i)return C;const d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),O=parseInt(d.borderTopWidth,10),L=parseInt(d.borderRightWidth,10),A=parseInt(d.borderBottomWidth,10);let S=0,T=0;const _="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-L:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-O-A:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,q="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(h===t)S="start"===s?j:"end"===s?j-v:"nearest"===s?pb(b,b+v,v,O,A,b+j,b+j+y,y):j-v/2,T="start"===l?M:"center"===l?M-m/2:"end"===l?M-m:pb(g,g+m,m,p,L,g+M,g+M+E,E),S=Math.max(0,S+b),T=Math.max(0,T+g);else{S="start"===s?j-a-O:"end"===s?j-c+A+P:"nearest"===s?pb(a,c,n,O,A+P,j,j+y,y):j-(a+n/2)+P/2,T="start"===l?M-u-p:"center"===l?M-(u+r/2)+_/2:"end"===l?M-i+L+_:pb(u,i,r,p,L+_,M,M+E,E);const{scrollLeft:e,scrollTop:o}=t;S=0===q?0:Math.max(0,Math.min(o+S/q,t.scrollHeight-n/q+P)),T=0===R?0:Math.max(0,Math.min(e+T/R,t.scrollWidth-r/R+_)),j+=o-S,M+=e-T}C.push({el:t,top:S,left:T})}return C},gb=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};var bb=["label","onClick","option","position"];function yb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Eb(e){for(var t=1;t{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(vb(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:a,top:i,left:o}of vb(e,gb(t))){const e=i-n.top+n.bottom,t=o-n.left+n.right;a.scroll({top:e,left:t,behavior:r})}}(e,{boundary:e.parentNode,scrollMode:"if-needed"})}}),[u,f,i,o]);var b=a((function(e){m(i,e),r&&r(e)}),[r,m,i]),y=h||u===o;return v(i,o),Eb(Eb({},l),{},{active:y,"aria-label":t,"aria-selected":y,id:dv(d,o),onClick:b,onMouseDown:Ev,ref:g,role:"option"})}Cv.isRequired,be.number;var xb=["active","children","className","disabled","onClick"],Nb=h((function(e,n){var r=e.active,a=e.children,i=e.className,o=e.disabled,s=e.onClick,l=xm(e,xb);return t.createElement("a",L({},l,{className:O("dropdown-item",{active:r,disabled:o},i),href:l.href||"#",onClick:function(e){e.preventDefault(),!o&&s&&s(e)},ref:n}),a)}));function kb(e){return t.createElement(Nb,wb(e))}var Ob=["emptyLabel","innerRef","maxHeight","style"];function Lb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ab(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function py(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);dy("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let i=new RegExp(a,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=s[n]||"";o=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=a&&!l?void 0:function(e,t){try{return decodeURIComponent(e)}catch(n){return dy(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(l||"",r),e}),{}),pathname:i,pathnameBase:o,pattern:e}}function my(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function vy(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function gy(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function by(e,t,n,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=fy(e):(a=cy({},e),uy(!a.pathname||!a.pathname.includes("?"),vy("?","pathname","search",a)),uy(!a.pathname||!a.pathname.includes("#"),vy("#","pathname","hash",a)),uy(!a.search||!a.search.includes("#"),vy("#","search","hash",a)));let i,o=""===e||""===a.pathname,s=o?"/":a.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?fy(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:Ey(r),hash:wy(a)}}(a,i),c=s&&"/"!==s&&s.endsWith("/"),u=(o||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}ly.Input=function(e){var n=e.className,r=w(e,["className"]);return t.createElement("div",{className:"form-outline w-100"},t.createElement(Ka,E({className:O(n,"search-input")},r)))},ly.Button=function(e){var n=e.className,r=w(e,["className"]);return t.createElement(vt,E({variant:"light",className:O(n,"input-group-button")},r),t.createElement("i",{className:"bi bi-search"}))},function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(ay||(ay={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(iy||(iy={}));const yy=e=>e.join("/").replace(/\/\/+/g,"/"),Ey=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",wy=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",xy=["post","put","patch","delete"];new Set(xy);const Ny=["get",...xy]; +function uy(){return uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function my(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);hy("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let i=new RegExp(a,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=s[n]||"";o=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=a&&!l?void 0:function(e,t){try{return decodeURIComponent(e)}catch(n){return hy(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(l||"",r),e}),{}),pathname:i,pathnameBase:o,pattern:e}}function vy(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function gy(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function by(e,t){let n=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function yy(e,t,n,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=py(e):(a=uy({},e),dy(!a.pathname||!a.pathname.includes("?"),gy("?","pathname","search",a)),dy(!a.pathname||!a.pathname.includes("#"),gy("#","pathname","hash",a)),dy(!a.search||!a.search.includes("#"),gy("#","search","hash",a)));let i,o=""===e||""===a.pathname,s=o?"/":a.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?py(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:wy(r),hash:xy(a)}}(a,i),c=s&&"/"!==s&&s.endsWith("/"),u=(o||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}cy.Input=function(e){var n=e.className,r=w(e,["className"]);return t.createElement("div",{className:"form-outline w-100"},t.createElement(Ka,E({className:O(n,"search-input")},r)))},cy.Button=function(e){var n=e.className,r=w(e,["className"]);return t.createElement(vt,E({variant:"light",className:O(n,"input-group-button")},r),t.createElement("i",{className:"bi bi-search"}))},function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(iy||(iy={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(oy||(oy={}));const Ey=e=>e.join("/").replace(/\/\/+/g,"/"),wy=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",xy=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",Ny=["post","put","patch","delete"];new Set(Ny);const ky=["get",...Ny]; /** * React Router v6.22.0 * @@ -38,7 +38,7 @@ function cy(){return cy=Object.assign?Object.assign.bind():function(e){for(var t * * @license MIT */ -function ky(){return ky=Object.assign?Object.assign.bind():function(e){for(var t=1;t component."):uy(!1)),e.useContext(jy).location}"production"!==process.env.NODE_ENV&&(Cy.displayName="RouteError");const Py="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ry(t){e.useContext(Sy).static||e.useLayoutEffect(t)}function qy(){let{isDataRoute:t}=e.useContext(My);return t?function(){let{router:t}=function(t){let n=e.useContext(Oy);return n||("production"!==process.env.NODE_ENV?uy(!1,$y(t)):uy(!1)),n}(Dy.UseNavigateStable),n=Hy(By.UseNavigateStable),r=e.useRef(!1);Ry((()=>{r.current=!0}));let a=e.useCallback((function(e,a){void 0===a&&(a={}),"production"!==process.env.NODE_ENV&&dy(r.current,Py),r.current&&("number"==typeof e?t.navigate(e):t.navigate(e,ky({fromRouteId:n},a)))}),[t,n]);return a}():function(){Ty()||("production"!==process.env.NODE_ENV?uy(!1,"useNavigate() may be used only in the context of a component."):uy(!1));let t=e.useContext(Oy),{basename:n,future:r,navigator:a}=e.useContext(Sy),{matches:i}=e.useContext(My),{pathname:o}=_y(),s=JSON.stringify(gy(i,r.v7_relativeSplatPath)),l=e.useRef(!1);Ry((()=>{l.current=!0}));let c=e.useCallback((function(e,r){if(void 0===r&&(r={}),"production"!==process.env.NODE_ENV&&dy(l.current,Py),!l.current)return;if("number"==typeof e)return void a.go(e);let i=by(e,JSON.parse(s),o,"path"===r.relative);null==t&&"/"!==n&&(i.pathname="/"===i.pathname?n:yy([n,i.pathname])),(r.replace?a.replace:a.push)(i,r.state,r)}),[n,a,s,o,t]);return c}()}function Iy(t,n){let{relative:r}=void 0===n?{}:n,{future:a}=e.useContext(Sy),{matches:i}=e.useContext(My),{pathname:o}=_y(),s=JSON.stringify(gy(i,a.v7_relativeSplatPath));return e.useMemo((()=>by(t,JSON.parse(s),o,"path"===r)),[t,s,o,r])}var Dy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Dy||{}),By=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(By||{});function $y(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Hy(t){let n=function(t){let n=e.useContext(My);return n||("production"!==process.env.NODE_ENV?uy(!1,$y(t)):uy(!1)),n}(t),r=n.matches[n.matches.length-1];return r.route.id||("production"!==process.env.NODE_ENV?uy(!1,t+' can only be used on routes that contain a unique "id"'):uy(!1)),r.route.id} +function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t component."):dy(!1)),e.useContext(My).location}"production"!==process.env.NODE_ENV&&(Ty.displayName="RouteError");const Ry="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qy(t){e.useContext(jy).static||e.useLayoutEffect(t)}function Iy(){let{isDataRoute:t}=e.useContext(Cy);return t?function(){let{router:t}=function(t){let n=e.useContext(Ly);return n||("production"!==process.env.NODE_ENV?dy(!1,Hy(t)):dy(!1)),n}(By.UseNavigateStable),n=Uy($y.UseNavigateStable),r=e.useRef(!1);qy((()=>{r.current=!0}));let a=e.useCallback((function(e,a){void 0===a&&(a={}),"production"!==process.env.NODE_ENV&&hy(r.current,Ry),r.current&&("number"==typeof e?t.navigate(e):t.navigate(e,Oy({fromRouteId:n},a)))}),[t,n]);return a}():function(){_y()||("production"!==process.env.NODE_ENV?dy(!1,"useNavigate() may be used only in the context of a component."):dy(!1));let t=e.useContext(Ly),{basename:n,future:r,navigator:a}=e.useContext(jy),{matches:i}=e.useContext(Cy),{pathname:o}=Py(),s=JSON.stringify(by(i,r.v7_relativeSplatPath)),l=e.useRef(!1);qy((()=>{l.current=!0}));let c=e.useCallback((function(e,r){if(void 0===r&&(r={}),"production"!==process.env.NODE_ENV&&hy(l.current,Ry),!l.current)return;if("number"==typeof e)return void a.go(e);let i=yy(e,JSON.parse(s),o,"path"===r.relative);null==t&&"/"!==n&&(i.pathname="/"===i.pathname?n:Ey([n,i.pathname])),(r.replace?a.replace:a.push)(i,r.state,r)}),[n,a,s,o,t]);return c}()}function Dy(t,n){let{relative:r}=void 0===n?{}:n,{future:a}=e.useContext(jy),{matches:i}=e.useContext(Cy),{pathname:o}=Py(),s=JSON.stringify(by(i,a.v7_relativeSplatPath));return e.useMemo((()=>yy(t,JSON.parse(s),o,"path"===r)),[t,s,o,r])}var By=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(By||{}),$y=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($y||{});function Hy(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Uy(t){let n=function(t){let n=e.useContext(Cy);return n||("production"!==process.env.NODE_ENV?dy(!1,Hy(t)):dy(!1)),n}(t),r=n.matches[n.matches.length-1];return r.route.id||("production"!==process.env.NODE_ENV?dy(!1,t+' can only be used on routes that contain a unique "id"'):dy(!1)),r.route.id} /** * React Router DOM v6.22.0 * @@ -49,4 +49,4 @@ function ky(){return ky=Object.assign?Object.assign.bind():function(e){for(var t * * @license MIT */ -function Uy(){return Uy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}new Promise((()=>{}));const Vy="get",zy="application/x-www-form-urlencoded";function Wy(e){return null!=e&&"string"==typeof e.tagName}let Ky=null;const Zy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gy(e){return null==e||Zy.has(e)?e:("production"!==process.env.NODE_ENV&&dy(!1,'"'+e+'" is not a valid `encType` for `
    `/`` and will default to "'+zy+'"'),null)}function Yy(e,t){let n,r,a,i,o;if(Wy(s=e)&&"form"===s.tagName.toLowerCase()){let o=e.getAttribute("action");r=o?my(o,t):null,n=e.getAttribute("method")||Vy,a=Gy(e.getAttribute("enctype"))||zy,i=new FormData(e)}else if(function(e){return Wy(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Wy(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a