/*! For license information please see 457.42305613.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[457],{51137:(e,t,o)=>{"use strict";function n(e,t){var o=void 0;return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];o&&clearTimeout(o),o=setTimeout((function(){return e.apply(void 0,r)}),t)}}function r(e){return{current:e}}function i(e){return e!==Object(e)}function s(e,t){if(e===t)return!0;if(i(e)||i(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var o=0,n=Object.keys(e);o<n.length;o++){var r=n[o];if(!(r in t))return!1;if(!s(e[r],t[r]))return!1}return!0}o.d(t,{H:()=>Hn});var a=function(){};function l(e){var t=e.item,o=e.items;return{index:t.__autocomplete_indexName,items:[t],positions:[1+o.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,i,s,a=[],l=!0,c=!1;try{if(i=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;l=!1}else for(;!(l=(n=i.call(o)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=o.return&&(s=o.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var u=["items"],h=["items"];function m(e){return m="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},m(e)}function p(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function f(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function b(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function v(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){y(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function y(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==m(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===m(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function x(e){return e.map((function(e){var t=e.items,o=f(e,u);return v(v({},o),{},{objectIDs:(null==t?void 0:t.map((function(e){return e.objectID})))||o.objectIDs})}))}function w(e){var t,o,n,r=(t=c((e.version||"").split(".").map(Number),2),o=t[0],n=t[1],o>=3||2===o&&n>=4||1===o&&n>=10);function i(t,o,n){if(r&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,s={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(p(o),[{headers:s}]))}else e.apply(void 0,[t].concat(p(o)))}return{init:function(t,o){e("init",{appId:t,apiKey:o})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t.length>0&&i("clickedObjectIDsAfterSearch",x(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t.length>0&&i("clickedObjectIDs",x(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];o.length>0&&e.apply(void 0,["clickedFilters"].concat(o))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t.length>0&&i("convertedObjectIDsAfterSearch",x(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t.length>0&&i("convertedObjectIDs",x(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];o.length>0&&e.apply(void 0,["convertedFilters"].concat(o))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t.length>0&&t.reduce((function(e,t){var o=t.items,n=f(t,h);return[].concat(p(e),p(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,o=[],n=0;n<e.objectIDs.length;n+=t)o.push(v(v({},e),{},{objectIDs:e.objectIDs.slice(n,n+t)}));return o}(v(v({},n),{},{objectIDs:(null==o?void 0:o.map((function(e){return e.objectID})))||n.objectIDs})).map((function(e){return{items:o,payload:e}}))))}),[]).forEach((function(e){var t=e.items;return i("viewedObjectIDs",[e.payload],t)}))},viewedFilters:function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];o.length>0&&e.apply(void 0,["viewedFilters"].concat(o))}}}function _(e){var t=e.items.reduce((function(e,t){var o;return e[t.__autocomplete_indexName]=(null!==(o=e[t.__autocomplete_indexName])&&void 0!==o?o:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function S(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function C(e){return C="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},C(e)}function k(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return E(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function T(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function O(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?T(Object(o),!0).forEach((function(t){A(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):T(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function A(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==C(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===C(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var M="2.6.0",P="https://cdn.jsdelivr.net/npm/search-insights@".concat(M,"/dist/search-insights.min.js"),D=n((function(e){var t=e.onItemsChange,o=e.items,n=e.insights,r=e.state;t({insights:n,insightsEvents:_({items:o}).map((function(e){return O({eventName:"Items Viewed"},e)})),state:r})}),400);function L(e){var t=function(e){return O({onItemsChange:function(e){var t=e.insights,o=e.insightsEvents;t.viewedObjectIDs.apply(t,k(o.map((function(e){return O(O({},e),{},{algoliaSource:[].concat(k(e.algoliaSource||[]),["autocomplete-internal"])})}))))},onSelect:function(e){var t=e.insights,o=e.insightsEvents;t.clickedObjectIDsAfterSearch.apply(t,k(o.map((function(e){return O(O({},e),{},{algoliaSource:[].concat(k(e.algoliaSource||[]),["autocomplete-internal"])})}))))},onActive:a},e)}(e),o=t.insightsClient,i=t.onItemsChange,c=t.onSelect,d=t.onActive,u=o;o||function(e){if("undefined"!=typeof window)e({window})}((function(e){var t=e.window,o=t.AlgoliaAnalyticsObject||"aa";"string"==typeof o&&(u=t[o]),u||(t.AlgoliaAnalyticsObject=o,t[o]||(t[o]=function(){t[o].queue||(t[o].queue=[]);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t[o].queue.push(n)}),t[o].version=M,u=t[o],function(e){var t="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var o=e.document.createElement("script");o.async=!0,o.src=P,o.onerror=function(){console.error(t)},document.body.appendChild(o)}catch(e){console.error(t)}}(t))}));var h=w(u),m=r([]),p=n((function(e){var t=e.state;if(t.isOpen){var o=t.collections.reduce((function(e,t){return[].concat(k(e),k(t.items))}),[]).filter(S);s(m.current.map((function(e){return e.objectID})),o.map((function(e){return e.objectID})))||(m.current=o,o.length>0&&D({onItemsChange:i,items:o,insights:h,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,o=e.onSelect,n=e.onActive;u("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:h}}),o((function(e){var t=e.item,o=e.state,n=e.event;S(t)&&c({state:o,event:n,insights:h,item:t,insightsEvents:[O({eventName:"Item Selected"},l({item:t,items:m.current}))]})})),n((function(e){var t=e.item,o=e.state,n=e.event;S(t)&&d({state:o,event:n,insights:h,item:t,insightsEvents:[O({eventName:"Item Active"},l({item:t,items:m.current}))]})}))},onStateChange:function(e){var t=e.state;p({state:t})},__autocomplete_pluginOptions:e}}function R(e){return R="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},R(e)}function N(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function I(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==R(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===R(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function B(e,t,o){var n,r=t.initialState;return{getState:function(){return r},dispatch:function(n,i){var s=function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?N(Object(o),!0).forEach((function(t){I(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):N(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},r);r=e(r,{type:n,props:t,payload:i}),o({state:r,prevState:s})},pendingRequests:(n=[],{add:function(e){return n.push(e),e.finally((function(){n=n.filter((function(t){return t!==e}))}))},cancelAll:function(){n.forEach((function(e){return e.cancel()}))},isEmpty:function(){return 0===n.length}})}}function z(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function H(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function j(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?H(Object(o),!0).forEach((function(t){V(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):H(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function V(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==F(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==F(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===F(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function U(e){return 0===e.collections.length?0:e.collections.reduce((function(e,t){return e+t.items.length}),0)}var Z=0;function $(){return"autocomplete-".concat(Z++)}function W(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function q(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?W(Object(o),!0).forEach((function(t){G(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):W(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function G(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==Y(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Y(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Y(e){return Y="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},Y(e)}function K(e){return K="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},K(e)}function X(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return J(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function Q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ee(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(o),!0).forEach((function(t){te(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Q(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function te(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==K(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==K(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===K(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function oe(e,t){var o,n="undefined"!=typeof window?window:{},r=e.plugins||[];return ee(ee({debug:!1,openOnFocus:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:!1,environment:n,shouldPanelOpen:function(e){return U(e.state)>0},reshape:function(e){return e.sources}},e),{},{id:null!==(o=e.id)&&void 0!==o?o:$(),plugins:r,initialState:ee({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var o;null===(o=e.onStateChange)||void 0===o||o.call(e,t),r.forEach((function(e){var o;return null===(o=e.onStateChange)||void 0===o?void 0:o.call(e,t)}))},onSubmit:function(t){var o;null===(o=e.onSubmit)||void 0===o||o.call(e,t),r.forEach((function(e){var o;return null===(o=e.onSubmit)||void 0===o?void 0:o.call(e,t)}))},onReset:function(t){var o;null===(o=e.onReset)||void 0===o||o.call(e,t),r.forEach((function(e){var o;return null===(o=e.onReset)||void 0===o?void 0:o.call(e,t)}))},getSources:function(o){return Promise.all([].concat(X(r.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var o=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,o.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));o.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:a,onResolve:a};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=q(q({},t),e);return Promise.resolve(n)})))}))}(e,o)}))).then((function(e){return z(e)})).then((function(e){return e.map((function(e){return ee(ee({},e),{},{onSelect:function(o){e.onSelect(o),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,o)}))},onActive:function(o){e.onActive(o),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,o)}))},onResolve:function(o){e.onResolve(o),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,o)}))}})}))}))},navigator:ee({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,o=n.open(t,"_blank","noopener");null==o||o.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function ne(e){return ne="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},ne(e)}function re(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ie(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?re(Object(o),!0).forEach((function(t){se(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):re(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function se(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==ne(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ne(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ae(e){return ae="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},ae(e)}function le(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ce(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?le(Object(o),!0).forEach((function(t){de(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function de(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==ae(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ae(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ue(e){return ue="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},ue(e)}function he(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function me(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?he(Object(o),!0).forEach((function(t){pe(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):he(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function pe(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==ue(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ue(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ge(e){return function(e){if(Array.isArray(e))return fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return fe(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return fe(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function be(e){return Boolean(e.execute)}function ve(e,t,o){if(r=e,Boolean(null==r?void 0:r.execute)){var n="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(ge(Object.keys(o.context).map((function(e){var t;return null===(t=o.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return me(me({},e),{},{requests:e.queries.map((function(o){return{query:"algolia"===e.requesterId?me(me({},o),{},{params:me(me({},n),o.params)}):o,sourceId:t,transformResponse:e.transformResponse}}))})}var r;return{items:e,sourceId:t}}function ye(e){var t=e.reduce((function(e,t){if(!be(t))return e.push(t),e;var o=t.searchClient,n=t.execute,r=t.requesterId,i=t.requests,s=e.find((function(e){return be(t)&&be(e)&&e.searchClient===o&&Boolean(r)&&e.requesterId===r}));if(s){var a;(a=s.items).push.apply(a,ge(i))}else{var l={execute:n,requesterId:r,items:i,searchClient:o};e.push(l)}return e}),[]).map((function(e){if(!be(e))return Promise.resolve(e);var t=e,o=t.execute,n=t.items;return o({searchClient:t.searchClient,requests:n})}));return Promise.all(t).then((function(e){return z(e)}))}function xe(e,t,o){return t.map((function(t){var n=e.filter((function(e){return e.sourceId===t.sourceId})),r=n.map((function(e){return e.items})),i=n[0].transformResponse,s=i?i(function(e){var t=e.map((function(e){var t;return ce(ce({},e),{},{hits:null===(t=e.hits)||void 0===t?void 0:t.map((function(t){return ce(ce({},t),{},{__autocomplete_indexName:e.index,__autocomplete_queryID:e.queryID})}))})}));return{results:t,hits:t.map((function(e){return e.hits})).filter(Boolean),facetHits:t.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}}(r)):r;return t.onResolve({source:t,results:r,items:s,state:o.getState()}),Array.isArray(s),s.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:s}}))}function we(e,t){var o=t;return{then:function(t,n){return we(e.then(Ce(t,o,e),Ce(n,o,e)),o)},catch:function(t){return we(e.catch(Ce(t,o,e)),o)},finally:function(t){return t&&o.onCancelList.push(t),we(e.finally(Ce(t&&function(){return o.onCancelList=[],t()},o,e)),o)},cancel:function(){o.isCanceled=!0;var e=o.onCancelList;o.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===o.isCanceled}}}function _e(e){return we(new Promise((function(t,o){return e(t,o)})),{isCanceled:!1,onCancelList:[]})}function Se(e){return we(e,{isCanceled:!1,onCancelList:[]})}function Ce(e,t,o){return e?function(o){return t.isCanceled?o:e(o)}:o}function ke(e){var t=function(e){var t=e.collections.map((function(e){return e.items.length})).reduce((function(e,t,o){var n=(e[o-1]||0)+t;return e.push(n),e}),[]).reduce((function(t,o){return o<=e.activeItemId?t+1:t}),0);return e.collections[t]}(e);if(!t)return null;var o=t.items[function(e){for(var t=e.state,o=e.collection,n=!1,r=0,i=0;!1===n;){var s=t.collections[r];if(s===o){n=!0;break}i+=s.items.length,r++}return t.activeItemId-i}({state:e,collection:t})],n=t.source;return{item:o,itemInputValue:n.getItemInputValue({item:o,state:e}),itemUrl:n.getItemUrl({item:o,state:e}),source:n}}function Ee(e){return Ee="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},Ee(e)}_e.resolve=function(e){return Se(Promise.resolve(e))},_e.reject=function(e){return Se(Promise.reject(e))};var Te=["event","nextState","props","query","refresh","store"];function Oe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ae(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(o),!0).forEach((function(t){Me(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Oe(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function Me(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==Ee(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ee(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Pe(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var De,Le,Re,Ne=null,Ie=(De=-1,Le=-1,Re=void 0,function(e){var t=++De;return Promise.resolve(e).then((function(e){return Re&&t<Le?Re:(Le=t,Re=e,e)}))});function Be(e){var t=e.event,o=e.nextState,n=void 0===o?{}:o,r=e.props,i=e.query,s=e.refresh,a=e.store,l=Pe(e,Te);Ne&&r.environment.clearTimeout(Ne);var c=l.setCollections,d=l.setIsOpen,u=l.setQuery,h=l.setActiveItemId,m=l.setStatus;if(u(i),h(r.defaultActiveItemId),!i&&!1===r.openOnFocus){var p,g=a.getState().collections.map((function(e){return Ae(Ae({},e),{},{items:[]})}));m("idle"),c(g),d(null!==(p=n.isOpen)&&void 0!==p?p:r.shouldPanelOpen({state:a.getState()}));var f=Se(Ie(g).then((function(){return Promise.resolve()})));return a.pendingRequests.add(f)}m("loading"),Ne=r.environment.setTimeout((function(){m("stalled")}),r.stallThreshold);var b=Se(Ie(r.getSources(Ae({query:i,refresh:s,state:a.getState()},l)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(Ae({query:i,refresh:s,state:a.getState()},l))).then((function(t){return ve(t,e.sourceId,a.getState())}))}))).then(ye).then((function(t){return xe(t,e,a)})).then((function(e){return function(e){var t=e.collections,o=e.props,n=e.state,r=t.reduce((function(e,t){return ie(ie({},e),{},se({},t.source.sourceId,ie(ie({},t.source),{},{getItems:function(){return z(t.items)}})))}),{}),i=o.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return z(o.reshape({sourcesBySourceId:i,sources:Object.values(i),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:r,state:a.getState()})}))})))).then((function(e){var o;m("idle"),c(e);var u=r.shouldPanelOpen({state:a.getState()});d(null!==(o=n.isOpen)&&void 0!==o?o:r.openOnFocus&&!i&&u||u);var h=ke(a.getState());if(null!==a.getState().activeItemId&&h){var p=h.item,g=h.itemInputValue,f=h.itemUrl,b=h.source;b.onActive(Ae({event:t,item:p,itemInputValue:g,itemUrl:f,refresh:s,source:b,state:a.getState()},l))}})).finally((function(){m("idle"),Ne&&r.environment.clearTimeout(Ne)}));return a.pendingRequests.add(b)}function ze(e){return ze="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},ze(e)}var Fe=["event","props","refresh","store"];function He(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function je(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?He(Object(o),!0).forEach((function(t){Ve(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):He(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function Ve(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==ze(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ze(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Ue(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var Ze=/((gt|sm)-|galaxy nexus)|samsung[- ]/i;function $e(e){return $e="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},$e(e)}var We=["props","refresh","store"],qe=["inputElement","formElement","panelElement"],Ge=["inputElement"],Ye=["inputElement","maxLength"],Ke=["sourceIndex"],Xe=["sourceIndex"],Je=["item","source","sourceIndex"];function Qe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function et(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(o),!0).forEach((function(t){tt(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Qe(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function tt(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==$e(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==$e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===$e(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ot(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function nt(e){var t=e.props,o=e.refresh,n=e.store,r=ot(e,We),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var o=e.inputElement,r=e.formElement,i=e.panelElement;function s(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===o||!1===[r,i].some((function(t){return o=t,n=e.target,o===n||o.contains(n);var o,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return et({onTouchStart:s,onMouseDown:s,onTouchMove:function(e){!1!==n.getState().isOpen&&o===t.environment.document.activeElement&&e.target!==o&&o.blur()}},ot(e,qe))},getRootProps:function(e){return et({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return et({action:"",noValidate:!0,role:"search",onSubmit:function(i){var s;i.preventDefault(),t.onSubmit(et({event:i,refresh:o,state:n.getState()},r)),n.dispatch("submit",null),null===(s=e.inputElement)||void 0===s||s.blur()},onReset:function(i){var s;i.preventDefault(),t.onReset(et({event:i,refresh:o,state:n.getState()},r)),n.dispatch("reset",null),null===(s=e.inputElement)||void 0===s||s.focus()}},ot(e,Ge))},getLabelProps:function(e){var o=e||{},n=o.sourceIndex,r=ot(o,Ke);return et({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},r)},getInputProps:function(e){var i;function s(e){(t.openOnFocus||Boolean(n.getState().query))&&Be(et({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:o,store:n},r)),n.dispatch("focus",null)}var l=e||{},c=(l.inputElement,l.maxLength),d=void 0===c?512:c,u=ot(l,Ye),h=ke(n.getState()),m=function(e){return Boolean(e&&e.match(Ze))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),p=null!=h&&h.itemUrl&&!m?"go":"search";return et({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:d,type:"search",onChange:function(e){Be(et({event:e,props:t,query:e.currentTarget.value.slice(0,d),refresh:o,store:n},r))},onKeyDown:function(e){!function(e){var t=e.event,o=e.props,n=e.refresh,r=e.store,i=Ue(e,Fe);if("ArrowUp"===t.key||"ArrowDown"===t.key){var s=function(){var e=o.environment.document.getElementById("".concat(o.id,"-item-").concat(r.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},a=function(){var e=ke(r.getState());if(null!==r.getState().activeItemId&&e){var o=e.item,s=e.itemInputValue,a=e.itemUrl,l=e.source;l.onActive(je({event:t,item:o,itemInputValue:s,itemUrl:a,refresh:n,source:l,state:r.getState()},i))}};t.preventDefault(),!1===r.getState().isOpen&&(o.openOnFocus||Boolean(r.getState().query))?Be(je({event:t,props:o,query:r.getState().query,refresh:n,store:r},i)).then((function(){r.dispatch(t.key,{nextActiveItemId:o.defaultActiveItemId}),a(),setTimeout(s,0)})):(r.dispatch(t.key,{}),a(),s())}else if("Escape"===t.key)t.preventDefault(),r.dispatch(t.key,null),r.pendingRequests.cancelAll();else if("Tab"===t.key)r.dispatch("blur",null),r.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===r.getState().activeItemId||r.getState().collections.every((function(e){return 0===e.items.length})))return void(o.debug||r.pendingRequests.cancelAll());t.preventDefault();var l=ke(r.getState()),c=l.item,d=l.itemInputValue,u=l.itemUrl,h=l.source;if(t.metaKey||t.ctrlKey)void 0!==u&&(h.onSelect(je({event:t,item:c,itemInputValue:d,itemUrl:u,refresh:n,source:h,state:r.getState()},i)),o.navigator.navigateNewTab({itemUrl:u,item:c,state:r.getState()}));else if(t.shiftKey)void 0!==u&&(h.onSelect(je({event:t,item:c,itemInputValue:d,itemUrl:u,refresh:n,source:h,state:r.getState()},i)),o.navigator.navigateNewWindow({itemUrl:u,item:c,state:r.getState()}));else if(t.altKey);else{if(void 0!==u)return h.onSelect(je({event:t,item:c,itemInputValue:d,itemUrl:u,refresh:n,source:h,state:r.getState()},i)),void o.navigator.navigate({itemUrl:u,item:c,state:r.getState()});Be(je({event:t,nextState:{isOpen:!1},props:o,query:d,refresh:n,store:r},i)).then((function(){h.onSelect(je({event:t,item:c,itemInputValue:d,itemUrl:u,refresh:n,source:h,state:r.getState()},i))}))}}}(et({event:e,props:t,refresh:o,store:n},r))},onFocus:s,onBlur:a,onClick:function(o){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||s(o)}},u)},getPanelProps:function(e){return et({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var o=e||{},n=o.sourceIndex,r=ot(o,Xe);return et({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},r)},getItemProps:function(e){var s=e.item,a=e.source,l=e.sourceIndex,c=ot(e,Je);return et({id:"".concat(i(t.id,l),"-item-").concat(s.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===s.__autocomplete_id,onMouseMove:function(e){if(s.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",s.__autocomplete_id);var t=ke(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,a=t.itemInputValue,l=t.itemUrl,c=t.source;c.onActive(et({event:e,item:i,itemInputValue:a,itemUrl:l,refresh:o,source:c,state:n.getState()},r))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=a.getItemInputValue({item:s,state:n.getState()}),l=a.getItemUrl({item:s,state:n.getState()});(l?Promise.resolve():Be(et({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:o,store:n},r))).then((function(){a.onSelect(et({event:e,item:s,itemInputValue:i,itemUrl:l,refresh:o,source:a,state:n.getState()},r))}))}},c)}}}var rt="1.9.2",it=[{segment:"autocomplete-core",version:rt}];function st(e){return st="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},st(e)}function at(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function lt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?at(Object(o),!0).forEach((function(t){ct(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):at(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function ct(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==st(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===st(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function dt(e){var t,o,n,r,i=e.plugins,s=e.options,a=null===(t=((null===(o=s.__autocomplete_metadata)||void 0===o?void 0:o.userAgents)||[])[0])||void 0===t?void 0:t.segment,l=a?ct({},a,Object.keys((null===(n=s.__autocomplete_metadata)||void 0===n?void 0:n.options)||{})):{};return{plugins:i.map((function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}})),options:lt({"autocomplete-core":Object.keys(s)},l),ua:it.concat((null===(r=s.__autocomplete_metadata)||void 0===r?void 0:r.userAgents)||[])}}function ut(e){var t,o=e.state;return!1===o.isOpen||null===o.activeItemId?null:(null===(t=ke(o))||void 0===t?void 0:t.itemInputValue)||null}function ht(e,t,o,n){if(!o)return null;if(e<0&&(null===t||null!==n&&0===t))return o+e;var r=(null===t?-1:t)+e;return r<=-1||r>=o?null===n?null:0:r}function mt(e){return mt="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},mt(e)}function pt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function gt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(o),!0).forEach((function(t){ft(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):pt(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function ft(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==mt(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===mt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var bt=function(e,t){switch(t.type){case"setActiveItemId":case"mousemove":return gt(gt({},e),{},{activeItemId:t.payload});case"setQuery":return gt(gt({},e),{},{query:t.payload,completion:null});case"setCollections":return gt(gt({},e),{},{collections:t.payload});case"setIsOpen":return gt(gt({},e),{},{isOpen:t.payload});case"setStatus":return gt(gt({},e),{},{status:t.payload});case"setContext":return gt(gt({},e),{},{context:gt(gt({},e.context),t.payload)});case"ArrowDown":var o=gt(gt({},e),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:ht(1,e.activeItemId,U(e),t.props.defaultActiveItemId)});return gt(gt({},o),{},{completion:ut({state:o})});case"ArrowUp":var n=gt(gt({},e),{},{activeItemId:ht(-1,e.activeItemId,U(e),t.props.defaultActiveItemId)});return gt(gt({},n),{},{completion:ut({state:n})});case"Escape":return e.isOpen?gt(gt({},e),{},{activeItemId:null,isOpen:!1,completion:null}):gt(gt({},e),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return gt(gt({},e),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return gt(gt({},e),{},{activeItemId:!0===t.props.openOnFocus?t.props.defaultActiveItemId:null,status:"idle",query:""});case"focus":return gt(gt({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||Boolean(e.query))&&t.props.shouldPanelOpen({state:e})});case"blur":return t.props.debug?e:gt(gt({},e),{},{isOpen:!1,activeItemId:null});case"mouseleave":return gt(gt({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function vt(e){return vt="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},vt(e)}function yt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function xt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(o),!0).forEach((function(t){wt(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):yt(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function wt(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==vt(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===vt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _t(e){var t=[],o=oe(e,t),n=B(bt,o,(function(e){var t=e.prevState,n=e.state;o.onStateChange(xt({prevState:t,state:n,refresh:s,navigator:o.navigator},r))})),r=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch("setActiveItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var o=0,n=e.map((function(e){return j(j({},e),{},{items:z(e.items).map((function(e){return j(j({},e),{},{__autocomplete_id:o++})}))})}));t.dispatch("setCollections",n)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:n}),i=nt(xt({props:o,refresh:s,store:n,navigator:o.navigator},r));function s(){return Be(xt({event:new Event("input"),nextState:{isOpen:n.getState().isOpen},props:o,navigator:o.navigator,query:n.getState().query,refresh:s,store:n},r))}if(e.insights&&!o.plugins.some((function(e){return"aa.algoliaInsightsPlugin"===e.name}))){var a="boolean"==typeof e.insights?{}:e.insights;o.plugins.push(L(a))}return o.plugins.forEach((function(e){var n;return null===(n=e.subscribe)||void 0===n?void 0:n.call(e,xt(xt({},r),{},{navigator:o.navigator,refresh:s,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))})),function(e){var t,o,n=e.metadata,r=e.environment;if(null===(t=r.navigator)||void 0===t||null===(o=t.userAgent)||void 0===o?void 0:o.includes("Algolia Crawler")){var i=r.document.createElement("meta"),s=r.document.querySelector("head");i.name="algolia:metadata",setTimeout((function(){i.content=JSON.stringify(n),s.appendChild(i)}),0)}}({metadata:dt({plugins:o.plugins,options:e}),environment:o.environment}),xt(xt({refresh:s,navigator:o.navigator},i),r)}var St=function(e,t,o,n){var r;t[0]=0;for(var i=1;i<t.length;i++){var s=t[i++],a=t[i]?(t[0]|=s?1:2,o[t[i++]]):t[++i];3===s?n[0]=a:4===s?n[1]=Object.assign(n[1]||{},a):5===s?(n[1]=n[1]||{})[t[++i]]=a:6===s?n[1][t[++i]]+=a+"":s?(r=e.apply(a,St(e,a,o,["",null])),n.push(r),a[0]?t[0]|=2:(t[i-2]=0,t[i]=r)):n.push(a)}return n},Ct=new Map;function kt(e){var t=Ct.get(this);return t||(t=new Map,Ct.set(this,t)),(t=St(this,t.get(e)||(t.set(e,t=function(e){for(var t,o,n=1,r="",i="",s=[0],a=function(e){1===n&&(e||(r=r.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,e,r):3===n&&(e||r)?(s.push(3,e,r),n=2):2===n&&"..."===r&&e?s.push(4,e,0):2===n&&r&&!e?s.push(5,0,!0,r):n>=5&&((r||!e&&5===n)&&(s.push(n,0,r,o),n=6),e&&(s.push(n,e,0,o),n=6)),r=""},l=0;l<e.length;l++){l&&(1===n&&a(),a(l));for(var c=0;c<e[l].length;c++)t=e[l][c],1===n?"<"===t?(a(),s=[s],n=3):r+=t:4===n?"--"===r&&">"===t?(n=1,r=""):r=t+r[0]:i?t===i?i="":r+=t:'"'===t||"'"===t?i=t:">"===t?(a(),n=1):n&&("="===t?(n=5,o=r,r=""):"/"===t&&(n<5||">"===e[l][c+1])?(a(),3===n&&(s=s[0]),n=s,(s=s[0]).push(2,0,n),n=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(a(),n=2):r+=t),3===n&&"!--"===r&&(n=4,s=s[0])}return a(),s}(e)),t),arguments,[])).length>1?t:t[0]}var Et=function(e){var t=e.environment,o=t.document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("class","aa-SubmitIcon"),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("width","20"),o.setAttribute("height","20"),o.setAttribute("fill","currentColor");var n=t.document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"),o.appendChild(n),o},Tt=function(e){var t=e.environment,o=t.document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("class","aa-ClearIcon"),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("width","18"),o.setAttribute("height","18"),o.setAttribute("fill","currentColor");var n=t.document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"),o.appendChild(n),o},Ot=function(e){var t=e.environment.document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("class","aa-LoadingIcon"),t.setAttribute("viewBox","0 0 100 100"),t.setAttribute("width","20"),t.setAttribute("height","20"),t.innerHTML='<circle\n  cx="50"\n  cy="50"\n  fill="none"\n  r="35"\n  stroke="currentColor"\n  stroke-dasharray="164.93361431346415 56.97787143782138"\n  stroke-width="6"\n>\n  <animateTransform\n    attributeName="transform"\n    type="rotate"\n    repeatCount="indefinite"\n    dur="1s"\n    values="0 50 50;90 50 50;180 50 50;360 50 50"\n    keyTimes="0;0.40;0.65;1"\n  />\n</circle>',t},At=["ontouchstart","ontouchend","ontouchmove","ontouchcancel"];function Mt(e,t,o){e[t]=null===o?"":"number"!=typeof o?o:o+"px"}function Pt(e){this._listeners[e.type](e)}function Dt(e,t,o){var n,r,i=e[t];if("style"===t)if("string"==typeof o)e.style=o;else if(null===o)e.style="";else for(t in o)i&&o[t]===i[t]||Mt(e.style,t,o[t]);else"o"===t[0]&&"n"===t[1]?(n=t!==(t=t.replace(/Capture$/,"")),((r=t.toLowerCase())in e||At.includes(r))&&(t=r),t=t.slice(2),e._listeners||(e._listeners={}),e._listeners[t]=o,o?i||e.addEventListener(t,Pt,n):e.removeEventListener(t,Pt,n)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&"download"!==t&&"href"!==t&&t in e?e[t]=null==o?"":o:"function"!=typeof o&&"dangerouslySetInnerHTML"!==t&&(null==o||!1===o&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,o))}function Lt(e){return"onChange"===e?"onInput":e}function Rt(e,t){for(var o in t)Dt(e,Lt(o),t[o])}function Nt(e,t){for(var o in t)"o"===o[0]&&"n"===o[1]||Dt(e,Lt(o),t[o])}var It=["children"];function Bt(e){return function(e){if(Array.isArray(e))return zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zt(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return zt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function Ft(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function Ht(e){return function(t,o){var n=o.children,r=void 0===n?[]:n,i=Ft(o,It),s=e.document.createElement(t);return Rt(s,i),s.append.apply(s,Bt(r)),s}}function jt(e){return jt="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},jt(e)}var Vt=["autocompleteScopeApi","environment","classNames","getInputProps","getInputPropsCore","isDetached","state"];function Ut(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Zt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(o),!0).forEach((function(t){$t(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ut(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function $t(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==jt(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===jt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Wt(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var qt=function(e){var t=e.autocompleteScopeApi,o=e.environment,n=(e.classNames,e.getInputProps),r=e.getInputPropsCore,i=e.isDetached,s=e.state,a=Wt(e,Vt),l=Ht(o)("input",a),c=n(Zt({state:s,props:r({inputElement:l}),inputElement:l},t));return Rt(l,Zt(Zt({},c),{},{onKeyDown:function(e){i&&"Tab"===e.key||c.onKeyDown(e)}})),l};function Gt(e){return Gt="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},Gt(e)}function Yt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Kt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(o),!0).forEach((function(t){Xt(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Yt(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function Xt(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==Gt(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==Gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Gt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Jt,Qt,eo,to,oo,no,ro,io={},so=[],ao=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function lo(e,t){for(var o in t)e[o]=t[o];return e}function co(e){var t=e.parentNode;t&&t.removeChild(e)}function uo(e,t,o){var n,r,i,s={};for(i in t)"key"==i?n=t[i]:"ref"==i?r=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Jt.call(arguments,2):o),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return ho(e,s,n,r,null)}function ho(e,t,o,n,r){var i={type:e,props:t,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++eo:r};return null==r&&null!=Qt.vnode&&Qt.vnode(i),i}function mo(e){return e.children}function po(e,t){this.props=e,this.context=t}function go(e,t){if(null==t)return e.__?go(e.__,e.__.__k.indexOf(e)+1):null;for(var o;t<e.__k.length;t++)if(null!=(o=e.__k[t])&&null!=o.__e)return o.__e;return"function"==typeof e.type?go(e):null}function fo(e){var t,o;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(o=e.__k[t])&&null!=o.__e){e.__e=e.__c.base=o.__e;break}return fo(e)}}function bo(e){(!e.__d&&(e.__d=!0)&&to.push(e)&&!vo.__r++||oo!==Qt.debounceRendering)&&((oo=Qt.debounceRendering)||no)(vo)}function vo(){var e,t,o,n,r,i,s,a;for(to.sort(ro);e=to.shift();)e.__d&&(t=to.length,n=void 0,r=void 0,s=(i=(o=e).__v).__e,(a=o.__P)&&(n=[],(r=lo({},i)).__v=i.__v+1,To(a,i,r,o.__n,void 0!==a.ownerSVGElement,null!=i.__h?[s]:null,n,null==s?go(i):s,i.__h),Oo(n,i),i.__e!=s&&fo(i)),to.length>t&&to.sort(ro));vo.__r=0}function yo(e,t,o,n,r,i,s,a,l,c){var d,u,h,m,p,g,f,b=n&&n.__k||so,v=b.length;for(o.__k=[],d=0;d<t.length;d++)if(null!=(m=o.__k[d]=null==(m=t[d])||"boolean"==typeof m||"function"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?ho(null,m,null,null,m):Array.isArray(m)?ho(mo,{children:m},null,null,null):m.__b>0?ho(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)){if(m.__=o,m.__b=o.__b+1,null===(h=b[d])||h&&m.key==h.key&&m.type===h.type)b[d]=void 0;else for(u=0;u<v;u++){if((h=b[u])&&m.key==h.key&&m.type===h.type){b[u]=void 0;break}h=null}To(e,m,h=h||io,r,i,s,a,l,c),p=m.__e,(u=m.ref)&&h.ref!=u&&(f||(f=[]),h.ref&&f.push(h.ref,null,m),f.push(u,m.__c||p,m)),null!=p?(null==g&&(g=p),"function"==typeof m.type&&m.__k===h.__k?m.__d=l=xo(m,l,e):l=wo(e,m,h,b,p,l),"function"==typeof o.type&&(o.__d=l)):l&&h.__e==l&&l.parentNode!=e&&(l=go(h))}for(o.__e=g,d=v;d--;)null!=b[d]&&("function"==typeof o.type&&null!=b[d].__e&&b[d].__e==o.__d&&(o.__d=_o(n).nextSibling),Po(b[d],b[d]));if(f)for(d=0;d<f.length;d++)Mo(f[d],f[++d],f[++d])}function xo(e,t,o){for(var n,r=e.__k,i=0;r&&i<r.length;i++)(n=r[i])&&(n.__=e,t="function"==typeof n.type?xo(n,t,o):wo(o,n,n,r,n.__e,t));return t}function wo(e,t,o,n,r,i){var s,a,l;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(null==o||r!=i||null==r.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(r),s=null;else{for(a=i,l=0;(a=a.nextSibling)&&l<n.length;l+=1)if(a==r)break e;e.insertBefore(r,i),s=i}return void 0!==s?s:r.nextSibling}function _o(e){var t,o,n;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((o=e.__k[t])&&(n=_o(o)))return n;return null}function So(e,t,o){"-"===t[0]?e.setProperty(t,null==o?"":o):e[t]=null==o?"":"number"!=typeof o||ao.test(t)?o:o+"px"}function Co(e,t,o,n,r){var i;e:if("style"===t)if("string"==typeof o)e.style.cssText=o;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)o&&t in o||So(e.style,t,"");if(o)for(t in o)n&&o[t]===n[t]||So(e.style,t,o[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=o,o?n||e.addEventListener(t,i?Eo:ko,i):e.removeEventListener(t,i?Eo:ko,i);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==o?"":o;break e}catch(e){}"function"==typeof o||(null==o||!1===o&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,o))}}function ko(e){return this.l[e.type+!1](Qt.event?Qt.event(e):e)}function Eo(e){return this.l[e.type+!0](Qt.event?Qt.event(e):e)}function To(e,t,o,n,r,i,s,a,l){var c,d,u,h,m,p,g,f,b,v,y,x,w,_,S,C=t.type;if(void 0!==t.constructor)return null;null!=o.__h&&(l=o.__h,a=t.__e=o.__e,t.__h=null,i=[a]),(c=Qt.__b)&&c(t);try{e:if("function"==typeof C){if(f=t.props,b=(c=C.contextType)&&n[c.__c],v=c?b?b.props.value:c.__:n,o.__c?g=(d=t.__c=o.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(f,v):(t.__c=d=new po(f,v),d.constructor=C,d.render=Do),b&&b.sub(d),d.props=f,d.state||(d.state={}),d.context=v,d.__n=n,u=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=lo({},d.__s)),lo(d.__s,C.getDerivedStateFromProps(f,d.__s))),h=d.props,m=d.state,d.__v=t,u)null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==C.getDerivedStateFromProps&&f!==h&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(f,v),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(f,d.__s,v)||t.__v===o.__v){for(t.__v!==o.__v&&(d.props=f,d.state=d.__s,d.__d=!1),d.__e=!1,t.__e=o.__e,t.__k=o.__k,t.__k.forEach((function(e){e&&(e.__=t)})),y=0;y<d._sb.length;y++)d.__h.push(d._sb[y]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(f,d.__s,v),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(h,m,p)}))}if(d.context=v,d.props=f,d.__P=e,x=Qt.__r,w=0,"prototype"in C&&C.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),_=0;_<d._sb.length;_++)d.__h.push(d._sb[_]);d._sb=[]}else do{d.__d=!1,x&&x(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(n=lo(lo({},n),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(h,m)),S=null!=c&&c.type===mo&&null==c.key?c.props.children:c,yo(e,Array.isArray(S)?S:[S],t,o,n,r,i,s,a,l),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),g&&(d.__E=d.__=null),d.__e=!1}else null==i&&t.__v===o.__v?(t.__k=o.__k,t.__e=o.__e):t.__e=Ao(o.__e,t,o,n,r,i,s,l);(c=Qt.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=i)&&(t.__e=a,t.__h=!!l,i[i.indexOf(a)]=null),Qt.__e(e,t,o)}}function Oo(e,t){Qt.__c&&Qt.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Qt.__e(e,t.__v)}}))}function Ao(e,t,o,n,r,i,s,a){var l,c,d,u=o.props,h=t.props,m=t.type,p=0;if("svg"===m&&(r=!0),null!=i)for(;p<i.length;p++)if((l=i[p])&&"setAttribute"in l==!!m&&(m?l.localName===m:3===l.nodeType)){e=l,i[p]=null;break}if(null==e){if(null===m)return document.createTextNode(h);e=r?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,h.is&&h),i=null,a=!1}if(null===m)u===h||a&&e.data===h||(e.data=h);else{if(i=i&&Jt.call(e.childNodes),c=(u=o.props||io).dangerouslySetInnerHTML,d=h.dangerouslySetInnerHTML,!a){if(null!=i)for(u={},p=0;p<e.attributes.length;p++)u[e.attributes[p].name]=e.attributes[p].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,o,n,r){var i;for(i in o)"children"===i||"key"===i||i in t||Co(e,i,null,o[i],n);for(i in t)r&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||o[i]===t[i]||Co(e,i,t[i],o[i],n)}(e,h,u,r,a),d)t.__k=[];else if(p=t.props.children,yo(e,Array.isArray(p)?p:[p],t,o,n,r&&"foreignObject"!==m,i,s,i?i[0]:o.__k&&go(o,0),a),null!=i)for(p=i.length;p--;)null!=i[p]&&co(i[p]);a||("value"in h&&void 0!==(p=h.value)&&(p!==e.value||"progress"===m&&!p||"option"===m&&p!==u.value)&&Co(e,"value",p,u.value,!1),"checked"in h&&void 0!==(p=h.checked)&&p!==e.checked&&Co(e,"checked",p,u.checked,!1))}return e}function Mo(e,t,o){try{"function"==typeof e?e(t):e.current=t}catch(e){Qt.__e(e,o)}}function Po(e,t,o){var n,r;if(Qt.unmount&&Qt.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Mo(n,null,t)),null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){Qt.__e(e,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(r=0;r<n.length;r++)n[r]&&Po(n[r],t,o||"function"!=typeof e.type);o||null==e.__e||co(e.__e),e.__=e.__e=e.__d=void 0}function Do(e,t,o){return this.constructor(e,o)}function Lo(e,t,o){var n,r,i;Qt.__&&Qt.__(e,t),r=(n="function"==typeof o)?null:o&&o.__k||t.__k,i=[],To(t,e=(!n&&o||t).__k=uo(mo,null,[e]),r||io,io,void 0!==t.ownerSVGElement,!n&&o?[o]:r?null:t.firstChild?Jt.call(t.childNodes):null,i,!n&&o?o:r?r.__e:t.firstChild,n),Oo(i,e)}function Ro(e,t){return t.reduce((function(e,t){return e&&e[t]}),e)}Jt=so.slice,Qt={__e:function(e,t,o,n){for(var r,i,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,n||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},eo=0,po.prototype.setState=function(e,t){var o;o=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=lo({},this.state),"function"==typeof e&&(e=e(lo({},o),this.props)),e&&lo(o,e),null!=e&&this.__v&&(t&&this._sb.push(t),bo(this))},po.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),bo(this))},po.prototype.render=mo,to=[],no="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ro=function(e,t){return e.__v.__b-t.__v.__b},vo.__r=0;var No="__aa-highlight__",Io="__/aa-highlight__";function Bo(e){var t=e.highlightedValue.split(No),o=t.shift(),n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{get:function(){return e},add:function(t){var o=e[e.length-1];(null==o?void 0:o.isHighlighted)===t.isHighlighted?e[e.length-1]={value:o.value+t.value,isHighlighted:o.isHighlighted}:e.push(t)}}}(o?[{value:o,isHighlighted:!1}]:[]);return t.forEach((function(e){var t=e.split(Io);n.add({value:t[0],isHighlighted:!0}),""!==t[1]&&n.add({value:t[1],isHighlighted:!1})})),n.get()}function zo(e){return function(e){if(Array.isArray(e))return Fo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Fo(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Fo(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function Ho(e){var t=e.hit,o=e.attribute,n=Array.isArray(o)?o:[o],r=Ro(t,["_highlightResult"].concat(zo(n),["value"]));return"string"!=typeof r&&(r=Ro(t,n)||""),Bo({highlightedValue:r})}function jo(e){var t=e.createElement,o=e.Fragment;function n(e){var n=e.hit,r=e.attribute,i=e.tagName,s=void 0===i?"mark":i;return t(o,{},Ho({hit:n,attribute:r}).map((function(e,o){return e.isHighlighted?t(s,{key:o},e.value):e.value})))}return n.__autocomplete_componentName="Highlight",n}var Vo={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Uo=new RegExp(/\w/i),Zo=/&(amp|quot|lt|gt|#39);/g,$o=RegExp(Zo.source);function Wo(e,t){var o,n,r,i=e[t],s=(null===(o=e[t+1])||void 0===o?void 0:o.isHighlighted)||!0,a=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return Uo.test((r=i.value)&&$o.test(r)?r.replace(Zo,(function(e){return Vo[e]})):r)||a!==s?i.isHighlighted:a}function qo(e){return qo="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},qo(e)}function Go(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Yo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Go(Object(o),!0).forEach((function(t){Ko(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Go(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function Ko(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==qo(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==qo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===qo(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Xo(e){return e.some((function(e){return e.isHighlighted}))?e.map((function(t,o){return Yo(Yo({},t),{},{isHighlighted:!Wo(e,o)})})):e.map((function(e){return Yo(Yo({},e),{},{isHighlighted:!1})}))}function Jo(e){var t=e.createElement,o=e.Fragment;function n(e){var n,r=e.hit,i=e.attribute,s=e.tagName,a=void 0===s?"mark":s;return t(o,{},(n={hit:r,attribute:i},Xo(Ho(n))).map((function(e,o){return e.isHighlighted?t(a,{key:o},e.value):e.value})))}return n.__autocomplete_componentName="ReverseHighlight",n}function Qo(e){return function(e){if(Array.isArray(e))return en(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return en(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return en(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function tn(e){var t=e.hit,o=e.attribute,n=Array.isArray(o)?o:[o],r=Ro(t,["_snippetResult"].concat(Qo(n),["value"]));return"string"!=typeof r&&(r=Ro(t,n)||""),Bo({highlightedValue:r})}function on(e){var t=e.createElement,o=e.Fragment;function n(e){var n,r=e.hit,i=e.attribute,s=e.tagName,a=void 0===s?"mark":s;return t(o,{},(n={hit:r,attribute:i},Xo(tn(n))).map((function(e,o){return e.isHighlighted?t(a,{key:o},e.value):e.value})))}return n.__autocomplete_componentName="ReverseSnippet",n}function nn(e){var t=e.createElement,o=e.Fragment;function n(e){var n=e.hit,r=e.attribute,i=e.tagName,s=void 0===i?"mark":i;return t(o,{},tn({hit:n,attribute:r}).map((function(e,o){return e.isHighlighted?t(s,{key:o},e.value):e.value})))}return n.__autocomplete_componentName="Snippet",n}function rn(e,t){if("string"==typeof t){var o=e.document.querySelector(t);return"The element ".concat(JSON.stringify(t)," is not in the document."),o}return t}function sn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.reduce((function(e,t){return Object.keys(t).forEach((function(o){var n=e[o],r=t[o];n!==r&&(e[o]=[n,r].filter(Boolean).join(" "))})),e}),{})}function an(e){return an="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},an(e)}var ln=["classNames","container","getEnvironmentProps","getFormProps","getInputProps","getItemProps","getLabelProps","getListProps","getPanelProps","getRootProps","panelContainer","panelPlacement","render","renderNoResults","renderer","detachedMediaQuery","components","translations"];function cn(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function dn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(o),!0).forEach((function(t){un(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):cn(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function un(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==an(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==an(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===an(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function hn(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var mn={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",detachedSearchButtonQuery:"aa-DetachedSearchButtonQuery",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout aa-Panel--scrollable",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},pn=function(e,t){var o=e.children;(0,e.render)(o,t)},gn={createElement:uo,Fragment:mo,render:Lo};function fn(e){var t=e.panelPlacement,o=e.container,n=e.form,r=e.environment,i=o.getBoundingClientRect(),s=(r.pageYOffset||r.document.documentElement.scrollTop||r.document.body.scrollTop||0)+i.top+i.height;switch(t){case"start":return{top:s,left:i.left};case"end":return{top:s,right:r.document.documentElement.clientWidth-(i.left+i.width)};case"full-width":return{top:s,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":var a=n.getBoundingClientRect();return{top:s,left:a.left,right:r.document.documentElement.clientWidth-(a.left+a.width),width:"unset",maxWidth:"unset"};default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(t)," is not valid."))}}function bn(e){return bn="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},bn(e)}function vn(){return vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},vn.apply(this,arguments)}function yn(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function xn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(o),!0).forEach((function(t){wn(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):yn(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function wn(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==bn(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===bn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var _n=[{segment:"autocomplete-js",version:rt}];function Sn(e){return function(e){if(Array.isArray(e))return Cn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Cn(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Cn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function kn(e){return kn="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},kn(e)}var En=function(e){return e&&"object"===kn(e)&&"[object Object]"===Object.prototype.toString.call(e)};function Tn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.reduce((function(e,t){return Object.keys(t).forEach((function(o){var n=e[o],r=t[o];Array.isArray(n)&&Array.isArray(r)?e[o]=n.concat.apply(n,Sn(r)):En(n)&&En(r)?e[o]=Tn(n,r):e[o]=r})),e}),{})}function On(e){return On="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},On(e)}function An(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Mn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?An(Object(o),!0).forEach((function(t){Pn(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):An(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function Pn(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==On(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==On(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===On(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Dn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,i,s,a=[],l=!0,c=!1;try{if(i=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;l=!1}else for(;!(l=(n=i.call(o)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=o.return&&(s=o.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ln(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Ln(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ln(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var Rn=["components"];function Nn(e){return Nn="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},Nn(e)}function In(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function Bn(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function zn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(o),!0).forEach((function(t){Fn(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Bn(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function Fn(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==Nn(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==Nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Nn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Hn(e){var t,o=function(){var e=[],t=[];function o(o){e.push(o);var n=o();t.push(n)}return{runEffect:o,cleanupEffects:function(){var e=t;t=[],e.forEach((function(e){e()}))},runEffects:function(){var t=e;e=[],t.forEach((function(e){o(e)}))}}}(),i=o.runEffect,s=o.cleanupEffects,a=o.runEffects,l=(t=[],{reactive:function(e){var o=e(),n={_fn:e,_ref:{current:o},get value(){return this._ref.current},set value(e){this._ref.current=e}};return t.push(n),n},runReactives:function(){t.forEach((function(e){e._ref.current=e._fn()}))}}),c=l.reactive,d=l.runReactives,u=r(!1),h=r(e),m=r(void 0),p=c((function(){return function(e){var t,o=e.classNames,n=e.container,r=e.getEnvironmentProps,i=e.getFormProps,s=e.getInputProps,a=e.getItemProps,l=e.getLabelProps,c=e.getListProps,d=e.getPanelProps,u=e.getRootProps,h=e.panelContainer,m=e.panelPlacement,p=e.render,g=e.renderNoResults,f=e.renderer,b=e.detachedMediaQuery,v=e.components,y=e.translations,x=hn(e,ln),w="undefined"!=typeof window?window:{},_=rn(w,n);_.tagName;var S=dn(dn({},gn),f),C={Highlight:jo(S),ReverseHighlight:Jo(S),ReverseSnippet:on(S),Snippet:nn(S)};return{renderer:{classNames:sn(mn,null!=o?o:{}),container:_,getEnvironmentProps:null!=r?r:function(e){return e.props},getFormProps:null!=i?i:function(e){return e.props},getInputProps:null!=s?s:function(e){return e.props},getItemProps:null!=a?a:function(e){return e.props},getLabelProps:null!=l?l:function(e){return e.props},getListProps:null!=c?c:function(e){return e.props},getPanelProps:null!=d?d:function(e){return e.props},getRootProps:null!=u?u:function(e){return e.props},panelContainer:h?rn(w,h):w.document.body,panelPlacement:null!=m?m:"input-wrapper-width",render:null!=p?p:pn,renderNoResults:g,renderer:S,detachedMediaQuery:null!=b?b:getComputedStyle(w.document.documentElement).getPropertyValue("--aa-detached-media-query"),components:dn(dn({},C),v),translations:dn(dn({},{clearButtonTitle:"Clear",detachedCancelButtonText:"Cancel",submitButtonTitle:"Submit"}),y)},core:dn(dn({},x),{},{id:null!==(t=x.id)&&void 0!==t?t:$(),environment:w})}}(h.current)})),g=c((function(){return p.value.core.environment.matchMedia(p.value.renderer.detachedMediaQuery).matches})),f=c((function(){return _t(zn(zn({},p.value.core),{},{onStateChange:function(e){var t,o,n;u.current=e.state.collections.some((function(e){return e.source.templates.noResults})),null===(t=m.current)||void 0===t||t.call(m,e),null===(o=(n=p.value.core).onStateChange)||void 0===o||o.call(n,e)},shouldPanelOpen:h.current.shouldPanelOpen||function(e){var t=e.state;if(g.value)return!0;var o=U(t)>0;if(!p.value.core.openOnFocus&&!t.query)return o;var n=Boolean(u.current||p.value.renderer.renderNoResults);return!o&&n||o},__autocomplete_metadata:{userAgents:_n,options:e}}))})),b=r(zn({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},p.value.core.initialState)),v={getEnvironmentProps:p.value.renderer.getEnvironmentProps,getFormProps:p.value.renderer.getFormProps,getInputProps:p.value.renderer.getInputProps,getItemProps:p.value.renderer.getItemProps,getLabelProps:p.value.renderer.getLabelProps,getListProps:p.value.renderer.getListProps,getPanelProps:p.value.renderer.getPanelProps,getRootProps:p.value.renderer.getRootProps},y={setActiveItemId:f.value.setActiveItemId,setQuery:f.value.setQuery,setCollections:f.value.setCollections,setIsOpen:f.value.setIsOpen,setStatus:f.value.setStatus,setContext:f.value.setContext,refresh:f.value.refresh,navigator:f.value.navigator},x=c((function(){return kt.bind(p.value.renderer.renderer.createElement)})),w=c((function(){return function(e){var t=e.autocomplete,o=e.autocompleteScopeApi,n=e.classNames,r=e.environment,i=e.isDetached,s=e.placeholder,a=void 0===s?"Search":s,l=e.propGetters,c=e.setIsModalOpen,d=e.state,u=e.translations,h=Ht(r),m=l.getRootProps(Kt({state:d,props:t.getRootProps({})},o)),p=h("div",Kt({class:n.root},m)),g=h("div",{class:n.detachedContainer,onMouseDown:function(e){e.stopPropagation()}}),f=h("div",{class:n.detachedOverlay,children:[g],onMouseDown:function(){c(!1),t.setIsOpen(!1)}}),b=l.getLabelProps(Kt({state:d,props:t.getLabelProps({})},o)),v=h("button",{class:n.submitButton,type:"submit",title:u.submitButtonTitle,children:[Et({environment:r})]}),y=h("label",Kt({class:n.label,children:[v]},b)),x=h("button",{class:n.clearButton,type:"reset",title:u.clearButtonTitle,children:[Tt({environment:r})]}),w=h("div",{class:n.loadingIndicator,children:[Ot({environment:r})]}),_=qt({class:n.input,environment:r,state:d,getInputProps:l.getInputProps,getInputPropsCore:t.getInputProps,autocompleteScopeApi:o,isDetached:i}),S=h("div",{class:n.inputWrapperPrefix,children:[y,w]}),C=h("div",{class:n.inputWrapperSuffix,children:[x]}),k=h("div",{class:n.inputWrapper,children:[_]}),E=l.getFormProps(Kt({state:d,props:t.getFormProps({inputElement:_})},o)),T=h("form",Kt({class:n.form,children:[S,k,C]},E)),O=l.getPanelProps(Kt({state:d,props:t.getPanelProps({})},o)),A=h("div",Kt({class:n.panel},O)),M=h("div",{class:n.detachedSearchButtonQuery,textContent:d.query}),P=h("div",{class:n.detachedSearchButtonPlaceholder,hidden:Boolean(d.query),textContent:a});if(i){var D=h("div",{class:n.detachedSearchButtonIcon,children:[Et({environment:r})]}),L=h("button",{type:"button",class:n.detachedSearchButton,onClick:function(){c(!0)},children:[D,P,M]}),R=h("button",{type:"button",class:n.detachedCancelButton,textContent:u.detachedCancelButtonText,onTouchStart:function(e){e.stopPropagation()},onClick:function(){t.setIsOpen(!1),c(!1)}}),N=h("div",{class:n.detachedFormContainer,children:[T,R]});g.appendChild(N),p.appendChild(L)}else p.appendChild(T);return{detachedContainer:g,detachedOverlay:f,detachedSearchButtonQuery:M,detachedSearchButtonPlaceholder:P,inputWrapper:k,input:_,root:p,form:T,label:y,submitButton:v,clearButton:x,loadingIndicator:w,panel:A}}({autocomplete:f.value,autocompleteScopeApi:y,classNames:p.value.renderer.classNames,environment:p.value.core.environment,isDetached:g.value,placeholder:p.value.core.placeholder,propGetters:v,setIsModalOpen:k,state:b.current,translations:p.value.renderer.translations})}));function _(){Rt(w.value.panel,{style:g.value?{}:fn({panelPlacement:p.value.renderer.panelPlacement,container:w.value.root,form:w.value.form,environment:p.value.core.environment})})}function S(e){b.current=e;var t={autocomplete:f.value,autocompleteScopeApi:y,classNames:p.value.renderer.classNames,components:p.value.renderer.components,container:p.value.renderer.container,html:x.value,dom:w.value,panelContainer:g.value?w.value.detachedContainer:p.value.renderer.panelContainer,propGetters:v,state:b.current,renderer:p.value.renderer.renderer},o=!U(e)&&!u.current&&p.value.renderer.renderNoResults||p.value.renderer.render;!function(e){var t=e.autocomplete,o=e.autocompleteScopeApi,n=e.dom,r=e.propGetters,i=e.state;Nt(n.root,r.getRootProps(xn({state:i,props:t.getRootProps({})},o))),Nt(n.input,r.getInputProps(xn({state:i,props:t.getInputProps({inputElement:n.input}),inputElement:n.input},o))),Rt(n.label,{hidden:"stalled"===i.status}),Rt(n.loadingIndicator,{hidden:"stalled"!==i.status}),Rt(n.clearButton,{hidden:!i.query}),Rt(n.detachedSearchButtonQuery,{textContent:i.query}),Rt(n.detachedSearchButtonPlaceholder,{hidden:Boolean(i.query)})}(t),function(e,t){var o=t.autocomplete,n=t.autocompleteScopeApi,r=t.classNames,i=t.html,s=t.dom,a=t.panelContainer,l=t.propGetters,c=t.state,d=t.components,u=t.renderer;if(c.isOpen){a.contains(s.panel)||"loading"===c.status||a.appendChild(s.panel),s.panel.classList.toggle("aa-Panel--stalled","stalled"===c.status);var h=c.collections.filter((function(e){var t=e.source,o=e.items;return t.templates.noResults||o.length>0})).map((function(e,t){var s=e.source,a=e.items;return u.createElement("section",{key:t,className:r.source,"data-autocomplete-source-id":s.sourceId},s.templates.header&&u.createElement("div",{className:r.sourceHeader},s.templates.header({components:d,createElement:u.createElement,Fragment:u.Fragment,items:a,source:s,state:c,html:i})),s.templates.noResults&&0===a.length?u.createElement("div",{className:r.sourceNoResults},s.templates.noResults({components:d,createElement:u.createElement,Fragment:u.Fragment,source:s,state:c,html:i})):u.createElement("ul",vn({className:r.list},l.getListProps(xn({state:c,props:o.getListProps({sourceIndex:t})},n))),a.map((function(e){var a=o.getItemProps({item:e,source:s,sourceIndex:t});return u.createElement("li",vn({key:a.id,className:r.item},l.getItemProps(xn({state:c,props:a},n))),s.templates.item({components:d,createElement:u.createElement,Fragment:u.Fragment,item:e,state:c,html:i}))}))),s.templates.footer&&u.createElement("div",{className:r.sourceFooter},s.templates.footer({components:d,createElement:u.createElement,Fragment:u.Fragment,items:a,source:s,state:c,html:i})))})),m=u.createElement(u.Fragment,null,u.createElement("div",{className:r.panelLayout},h),u.createElement("div",{className:"aa-GradientBottom"})),p=h.reduce((function(e,t){return e[t.props["data-autocomplete-source-id"]]=t,e}),{});e(xn(xn({children:m,state:c,sections:h,elements:p},u),{},{components:d,html:i},n),s.panel)}else a.contains(s.panel)&&a.removeChild(s.panel)}(o,t)}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s();var t,o,n=p.value.renderer,r=n.components,i=In(n,Rn);h.current=Tn(i,p.value.core,{components:(t=r,o=function(e){return!e.value.hasOwnProperty("__autocomplete_componentName")},Object.entries(t).reduce((function(e,t){var n=Dn(t,2),r=n[0],i=n[1];return o({key:r,value:i})?Mn(Mn({},e),{},Pn({},r,i)):e}),{})),initialState:b.current},e),d(),a(),f.value.refresh().then((function(){S(b.current)}))}function k(e){requestAnimationFrame((function(){var t=p.value.core.environment.document.body.contains(w.value.detachedOverlay);e!==t&&(e?(p.value.core.environment.document.body.appendChild(w.value.detachedOverlay),p.value.core.environment.document.body.classList.add("aa-Detached"),w.value.input.focus()):(p.value.core.environment.document.body.removeChild(w.value.detachedOverlay),p.value.core.environment.document.body.classList.remove("aa-Detached")))}))}return i((function(){var e=f.value.getEnvironmentProps({formElement:w.value.form,panelElement:w.value.panel,inputElement:w.value.input});return Rt(p.value.core.environment,e),function(){Rt(p.value.core.environment,Object.keys(e).reduce((function(e,t){return zn(zn({},e),{},Fn({},t,void 0))}),{}))}})),i((function(){var e=g.value?p.value.core.environment.document.body:p.value.renderer.panelContainer,t=g.value?w.value.detachedOverlay:w.value.panel;return g.value&&b.current.isOpen&&k(!0),S(b.current),function(){e.contains(t)&&e.removeChild(t)}})),i((function(){var e=p.value.renderer.container;return e.appendChild(w.value.root),function(){e.removeChild(w.value.root)}})),i((function(){var e=n((function(e){S(e.state)}),0);return m.current=function(t){var o=t.state,n=t.prevState;(g.value&&n.isOpen!==o.isOpen&&k(o.isOpen),g.value||!o.isOpen||n.isOpen||_(),o.query!==n.query)&&p.value.core.environment.document.querySelectorAll(".aa-Panel--scrollable").forEach((function(e){0!==e.scrollTop&&(e.scrollTop=0)}));e({state:o})},function(){m.current=void 0}})),i((function(){var e=n((function(){var e=g.value;g.value=p.value.core.environment.matchMedia(p.value.renderer.detachedMediaQuery).matches,e!==g.value?C({}):requestAnimationFrame(_)}),20);return p.value.core.environment.addEventListener("resize",e),function(){p.value.core.environment.removeEventListener("resize",e)}})),i((function(){if(!g.value)return function(){};function e(e){w.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",e)}function t(t){e(t.matches)}var o=p.value.core.environment.matchMedia(getComputedStyle(p.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));e(o.matches);var n=Boolean(o.addEventListener);return n?o.addEventListener("change",t):o.addListener(t),function(){n?o.removeEventListener("change",t):o.removeListener(t)}})),i((function(){return requestAnimationFrame(_),function(){}})),zn(zn({},y),{},{update:C,destroy:function(){s()}})}},6599:(e,t,o)=>{"use strict";o.d(t,{Mx:()=>K,Qr:()=>re});class n{constructor(e,t,o){this.eventTarget=e,this.eventName=t,this.eventOptions=o,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=function(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}(e);for(const e of this.bindings){if(t.immediatePropagationStopped)break;e.handleEvent(t)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort(((e,t)=>{const o=e.index,n=t.index;return o<n?-1:o>n?1:0}))}}class r{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach((e=>e.connect())))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach((e=>e.disconnect())))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((e,t)=>e.concat(Array.from(t.values()))),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),t&&this.clearEventListenersForBinding(e)}handleError(e,t,o={}){this.application.handleError(e,`Error ${t}`,o)}clearEventListenersForBinding(e){const t=this.fetchEventListenerForBinding(e);t.hasBindings()||(t.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){const{eventTarget:t,eventName:o,eventOptions:n}=e,r=this.fetchEventListenerMapForEventTarget(t),i=this.cacheKey(o,n);r.delete(i),0==r.size&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:o,eventOptions:n}=e;return this.fetchEventListener(t,o,n)}fetchEventListener(e,t,o){const n=this.fetchEventListenerMapForEventTarget(e),r=this.cacheKey(t,o);let i=n.get(r);return i||(i=this.createEventListener(e,t,o),n.set(r,i)),i}createEventListener(e,t,o){const r=new n(e,t,o);return this.started&&r.connect(),r}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){const o=[e];return Object.keys(t).sort().forEach((e=>{o.push(`${t[e]?"":"!"}${e}`)})),o.join(":")}}const i={stop:({event:e,value:t})=>(t&&e.stopPropagation(),!0),prevent:({event:e,value:t})=>(t&&e.preventDefault(),!0),self:({event:e,value:t,element:o})=>!t||o===e.target},s=/^(?:(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function a(e){return"window"==e?window:"document"==e?document:void 0}function l(e){return e.replace(/(?:[_-])([a-z0-9])/g,((e,t)=>t.toUpperCase()))}function c(e){return l(e.replace(/--/g,"-").replace(/__/g,"_"))}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}function u(e){return e.replace(/([A-Z])/g,((e,t)=>`-${t.toLowerCase()}`))}class h{constructor(e,t,o,n){this.element=e,this.index=t,this.eventTarget=o.eventTarget||e,this.eventName=o.eventName||function(e){const t=e.tagName.toLowerCase();if(t in m)return m[t](e)}(e)||p("missing event name"),this.eventOptions=o.eventOptions||{},this.identifier=o.identifier||p("missing identifier"),this.methodName=o.methodName||p("missing method name"),this.keyFilter=o.keyFilter||"",this.schema=n}static forToken(e,t){return new this(e.element,e.index,function(e){const t=e.trim().match(s)||[];let o=t[1],n=t[2];return n&&!["keydown","keyup","keypress"].includes(o)&&(o+=`.${n}`,n=""),{eventTarget:a(t[3]),eventName:o,eventOptions:t[6]?(r=t[6],r.split(":").reduce(((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)})),{})):{},identifier:t[4],methodName:t[5],keyFilter:n};var r}(e.content),t)}toString(){const e=this.keyFilter?`.${this.keyFilter}`:"",t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}isFilterTarget(e){if(!this.keyFilter)return!1;const t=this.keyFilter.split("+"),o=["meta","ctrl","alt","shift"],[n,r,i,s]=o.map((e=>t.includes(e)));if(e.metaKey!==n||e.ctrlKey!==r||e.altKey!==i||e.shiftKey!==s)return!0;const a=t.filter((e=>!o.includes(e)))[0];return!!a&&(Object.prototype.hasOwnProperty.call(this.keyMappings,a)||p(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[a].toLowerCase()!==e.key.toLowerCase())}get params(){const e={},t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:o,value:n}of Array.from(this.element.attributes)){const r=o.match(t),i=r&&r[1];i&&(e[l(i)]=g(n))}return e}get eventTargetName(){return(e=this.eventTarget)==window?"window":e==document?"document":void 0;var e}get keyMappings(){return this.schema.keyMappings}}const m={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function p(e){throw new Error(e)}function g(e){try{return JSON.parse(e)}catch(t){return e}}class f{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){this.willBeInvokedByEvent(e)&&this.applyEventModifiers(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){const{element:t}=this.action,{actionDescriptorFilters:o}=this.context.application;let n=!0;for(const[r,i]of Object.entries(this.eventOptions))if(r in o){const s=o[r];n=n&&s({name:r,value:i,event:e,element:t})}return n}invokeWithEvent(e){const{target:t,currentTarget:o}=e;try{const{params:n}=this.action,r=Object.assign(e,{params:n});this.method.call(this.controller,r),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:o,action:this.methodName})}catch(t){const{identifier:o,controller:n,element:r,index:i}=this,s={identifier:o,controller:n,element:r,index:i,event:e};this.context.handleError(t,`invoking action "${this.action}"`,s)}}willBeInvokedByEvent(e){const t=e.target;return!(e instanceof KeyboardEvent&&this.action.isFilterTarget(e))&&(this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element)))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class b{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){const o=e;this.elements.has(o)?this.delegate.elementAttributeChanged&&this.matchElement(o)?this.delegate.elementAttributeChanged(o,t):this.removeElement(o):this.matchElement(o)&&this.addElement(o)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const o of this.matchElementsInTree(e))t.call(this,o)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}}class v{constructor(e,t,o){this.attributeName=t,this.delegate=o,this.elementObserver=new b(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],o=Array.from(e.querySelectorAll(this.selector));return t.concat(o)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}function y(e,t,o){w(e,t).add(o)}function x(e,t,o){w(e,t).delete(o),function(e,t){const o=e.get(t);null!=o&&0==o.size&&e.delete(t)}(e,t)}function w(e,t){let o=e.get(t);return o||(o=new Set,e.set(t,o)),o}class _{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce(((e,t)=>e.concat(Array.from(t))),[])}get size(){return Array.from(this.valuesByKey.values()).reduce(((e,t)=>e+t.size),0)}add(e,t){y(this.valuesByKey,e,t)}delete(e,t){x(this.valuesByKey,e,t)}has(e,t){const o=this.valuesByKey.get(e);return null!=o&&o.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some((t=>t.has(e)))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter((([t,o])=>o.has(e))).map((([e,t])=>e))}}class S{constructor(e,t,o,n={}){this.selector=t,this.details=n,this.elementObserver=new b(e,this),this.delegate=o,this.matchesByElement=new _}get started(){return this.elementObserver.started}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){const t=e.matches(this.selector);return this.delegate.selectorMatchElement?t&&this.delegate.selectorMatchElement(e,this.details):t}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],o=Array.from(e.querySelectorAll(this.selector)).filter((e=>this.matchElement(e)));return t.concat(o)}elementMatched(e){this.selectorMatched(e)}elementUnmatched(e){this.selectorUnmatched(e)}elementAttributeChanged(e,t){const o=this.matchElement(e),n=this.matchesByElement.has(this.selector,e);!o&&n&&this.selectorUnmatched(e)}selectorMatched(e){this.delegate.selectorMatched&&(this.delegate.selectorMatched(e,this.selector,this.details),this.matchesByElement.add(this.selector,e))}selectorUnmatched(e){this.delegate.selectorUnmatched(e,this.selector,this.details),this.matchesByElement.delete(this.selector,e)}}class C{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((e=>this.processMutations(e)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const o=this.delegate.getStringMapKeyForAttribute(e);if(null!=o){this.stringMap.has(e)||this.stringMapKeyAdded(o,e);const n=this.element.getAttribute(e);if(this.stringMap.get(e)!=n&&this.stringMapValueChanged(n,o,t),null==n){const t=this.stringMap.get(e);this.stringMap.delete(e),t&&this.stringMapKeyRemoved(o,e,t)}else this.stringMap.set(e,n)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,o){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,o)}stringMapKeyRemoved(e,t,o){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,o)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((e=>e.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class k{constructor(e,t,o){this.attributeObserver=new v(e,t,this),this.delegate=o,this.tokensByElement=new _}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,o]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(o)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach((e=>this.tokenMatched(e)))}tokensUnmatched(e){e.forEach((e=>this.tokenUnmatched(e)))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e),o=this.readTokensForElement(e),n=function(e,t){const o=Math.max(e.length,t.length);return Array.from({length:o},((o,n)=>[e[n],t[n]]))}(t,o).findIndex((([e,t])=>{return n=t,!((o=e)&&n&&o.index==n.index&&o.content==n.content);var o,n}));return-1==n?[[],[]]:[t.slice(n),o.slice(n)]}readTokensForElement(e){const t=this.attributeName;return function(e,t,o){return e.trim().split(/\s+/).filter((e=>e.length)).map(((e,n)=>({element:t,attributeName:o,content:e,index:n})))}(e.getAttribute(t)||"",e,t)}}class E{constructor(e,t,o){this.tokenListObserver=new k(e,t,this),this.delegate=o,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e,{value:o}=this.fetchParseResultForToken(e);o&&(this.fetchValuesByTokenForElement(t).set(e,o),this.delegate.elementMatchedValue(t,o))}tokenUnmatched(e){const{element:t}=e,{value:o}=this.fetchParseResultForToken(e);o&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,o))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}}}class T{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new E(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new f(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach((e=>this.delegate.bindingDisconnected(e,!0))),this.bindingsByAction.clear()}parseValueForToken(e){const t=h.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class O{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new C(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const o=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,o.writer(this.receiver[e]),o.writer(o.defaultValue))}stringMapValueChanged(e,t,o){const n=this.valueDescriptorNameMap[t];null!==e&&(null===o&&(o=n.writer(n.defaultValue)),this.invokeChangedCallback(t,e,o))}stringMapKeyRemoved(e,t,o){const n=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,n.writer(this.receiver[e]),o):this.invokeChangedCallback(e,n.writer(n.defaultValue),o)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:o,writer:n}of this.valueDescriptors)null==o||this.controller.data.has(e)||this.invokeChangedCallback(t,n(o),void 0)}invokeChangedCallback(e,t,o){const n=`${e}Changed`,r=this.receiver[n];if("function"==typeof r){const n=this.valueDescriptorNameMap[e];try{const e=n.reader(t);let i=o;o&&(i=n.reader(o)),r.call(this.receiver,e,i)}catch(e){throw e instanceof TypeError&&(e.message=`Stimulus Value "${this.context.identifier}.${n.name}" - ${e.message}`),e}}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map((t=>e[t]))}get valueDescriptorNameMap(){const e={};return Object.keys(this.valueDescriptorMap).forEach((t=>{const o=this.valueDescriptorMap[t];e[o.name]=o})),e}hasValue(e){const t=`has${d(this.valueDescriptorNameMap[e].name)}`;return this.receiver[t]}}class A{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new _}start(){this.tokenListObserver||(this.tokenListObserver=new k(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var o;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),null===(o=this.tokenListObserver)||void 0===o||o.pause((()=>this.delegate.targetConnected(e,t))))}disconnectTarget(e,t){var o;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),null===(o=this.tokenListObserver)||void 0===o||o.pause((()=>this.delegate.targetDisconnected(e,t))))}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function M(e,t){const o=D(e);return Array.from(o.reduce(((e,o)=>(function(e,t){const o=e[t];return Array.isArray(o)?o:[]}(o,t).forEach((t=>e.add(t))),e)),new Set))}function P(e,t){return D(e).reduce(((e,o)=>(e.push(...function(e,t){const o=e[t];return o?Object.keys(o).map((e=>[e,o[e]])):[]}(o,t)),e)),[])}function D(e){const t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}class L{constructor(e,t){this.context=e,this.delegate=t,this.outletsByName=new _,this.outletElementsByName=new _,this.selectorObserverMap=new Map}start(){0===this.selectorObserverMap.size&&(this.outletDefinitions.forEach((e=>{const t=this.selector(e),o={outletName:e};t&&this.selectorObserverMap.set(e,new S(document.body,t,this,o))})),this.selectorObserverMap.forEach((e=>e.start()))),this.dependentContexts.forEach((e=>e.refresh()))}stop(){this.selectorObserverMap.size>0&&(this.disconnectAllOutlets(),this.selectorObserverMap.forEach((e=>e.stop())),this.selectorObserverMap.clear())}refresh(){this.selectorObserverMap.forEach((e=>e.refresh()))}selectorMatched(e,t,{outletName:o}){const n=this.getOutlet(e,o);n&&this.connectOutlet(n,e,o)}selectorUnmatched(e,t,{outletName:o}){const n=this.getOutletFromMap(e,o);n&&this.disconnectOutlet(n,e,o)}selectorMatchElement(e,{outletName:t}){return this.hasOutlet(e,t)&&e.matches(`[${this.context.application.schema.controllerAttribute}~=${t}]`)}connectOutlet(e,t,o){var n;this.outletElementsByName.has(o,t)||(this.outletsByName.add(o,e),this.outletElementsByName.add(o,t),null===(n=this.selectorObserverMap.get(o))||void 0===n||n.pause((()=>this.delegate.outletConnected(e,t,o))))}disconnectOutlet(e,t,o){var n;this.outletElementsByName.has(o,t)&&(this.outletsByName.delete(o,e),this.outletElementsByName.delete(o,t),null===(n=this.selectorObserverMap.get(o))||void 0===n||n.pause((()=>this.delegate.outletDisconnected(e,t,o))))}disconnectAllOutlets(){for(const e of this.outletElementsByName.keys)for(const t of this.outletElementsByName.getValuesForKey(e))for(const o of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(o,t,e)}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}get outletDependencies(){const e=new _;return this.router.modules.forEach((t=>{M(t.definition.controllerConstructor,"outlets").forEach((o=>e.add(o,t.identifier)))})),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const e=this.dependentControllerIdentifiers;return this.router.contexts.filter((t=>e.includes(t.identifier)))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find((t=>t.element===e))}get scope(){return this.context.scope}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class R{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:o,controller:n,element:r}=this;t=Object.assign({identifier:o,controller:n,element:r},t),this.application.logDebugActivity(this.identifier,e,t)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new T(this,this.dispatcher),this.valueObserver=new O(this,this.controller),this.targetObserver=new A(this,this),this.outletObserver=new L(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,o={}){const{identifier:n,controller:r,element:i}=this;o=Object.assign({identifier:n,controller:r,element:i},o),this.application.handleError(e,`Error ${t}`,o)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,o){this.invokeControllerMethod(`${c(o)}OutletConnected`,e,t)}outletDisconnected(e,t,o){this.invokeControllerMethod(`${c(o)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){const o=this.controller;"function"==typeof o[e]&&o[e](...t)}}function N(e){return function(e,t){const o=B(e),n=function(e,t){return I(t).reduce(((o,n)=>{const r=function(e,t,o){const n=Object.getOwnPropertyDescriptor(e,o);if(!n||!("value"in n)){const e=Object.getOwnPropertyDescriptor(t,o).value;return n&&(e.get=n.get||e.get,e.set=n.set||e.set),e}}(e,t,n);return r&&Object.assign(o,{[n]:r}),o}),{})}(e.prototype,t);return Object.defineProperties(o.prototype,n),o}(e,function(e){const t=M(e,"blessings");return t.reduce(((t,o)=>{const n=o(e);for(const e in n){const o=t[e]||{};t[e]=Object.assign(o,n[e])}return t}),{})}(e))}const I="function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames,B=(()=>{function e(e){function t(){return Reflect.construct(e,arguments,new.target)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return function(){const t=e((function(){this.a.call(this)}));t.prototype.a=function(){},new t}(),e}catch(e){return e=>class extends e{}}})();class z{constructor(e,t){this.application=e,this.definition=function(e){return{identifier:e.identifier,controllerConstructor:N(e.controllerConstructor)}}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new R(this,e),this.contextsByScope.set(e,t)),t}}class F{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){const t=this.data.get(this.getDataKey(e))||"";return t.match(/[^\s]+/g)||[]}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class H{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const o=this.getAttributeNameForKey(e);return this.element.setAttribute(o,t),this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${u(e)}`}}class j{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,o){let n=this.warnedKeysByObject.get(e);n||(n=new Set,this.warnedKeysByObject.set(e,n)),n.has(t)||(n.add(t),this.logger.warn(o,e))}}function V(e,t){return`[${e}~="${t}"]`}class U{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)]),[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){return V(this.schema.targetAttributeForScope(this.identifier),e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map((t=>this.deprecate(t,e)))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return V(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:o}=this,n=this.schema.targetAttribute,r=this.schema.targetAttributeForScope(o);this.guide.warn(e,`target:${t}`,`Please replace ${n}="${o}.${t}" with ${r}="${t}". The ${n} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class Z{constructor(e,t){this.scope=e,this.controllerElement=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce(((e,t)=>e||this.findOutlet(t)),void 0)}findAll(...e){return e.reduce(((e,t)=>[...e,...this.findAllOutlets(t)]),[])}getSelectorForOutletName(e){const t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){const t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){const t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){return this.scope.queryElements(e).filter((o=>this.matchesElement(o,e,t)))[0]}findAllElements(e,t){return this.scope.queryElements(e).filter((o=>this.matchesElement(o,e,t)))}matchesElement(e,t,o){const n=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&n.split(" ").includes(o)}}class ${constructor(e,t,o,n){this.targets=new U(this),this.classes=new F(this),this.data=new H(this),this.containsElement=e=>e.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=o,this.guide=new j(n),this.outlets=new Z(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return V(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new $(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class W{constructor(e,t,o){this.element=e,this.schema=t,this.delegate=o,this.valueListObserver=new E(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:o}=e,n=this.fetchScopesByIdentifierForElement(t);let r=n.get(o);return r||(r=this.delegate.createScopeForElementAndIdentifier(t,o),n.set(o,r)),r}elementMatchedValue(e,t){const o=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,o),1==o&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const o=this.scopeReferenceCounts.get(t);o&&(this.scopeReferenceCounts.set(t,o-1),1==o&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}}class q{constructor(e){this.application=e,this.scopeObserver=new W(this.element,this.schema,this),this.scopesByIdentifier=new _,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((e,t)=>e.concat(t.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new z(this.application,e);this.connectModule(t);const o=e.controllerConstructor.afterLoad;o&&o(e.identifier,this.application)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const o=this.modulesByIdentifier.get(t);if(o)return o.contexts.find((t=>t.element==e))}handleError(e,t,o){this.application.handleError(e,t,o)}createScopeForElementAndIdentifier(e,t){return new $(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((t=>e.connectContextForScope(t)))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((t=>e.disconnectContextForScope(t)))}}const G={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`,outletAttributeForScope:(e,t)=>`data-${e}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End"},Y("abcdefghijklmnopqrstuvwxyz".split("").map((e=>[e,e])))),Y("0123456789".split("").map((e=>[e,e]))))};function Y(e){return e.reduce(((e,[t,o])=>Object.assign(Object.assign({},e),{[t]:o})),{})}class K{constructor(e=document.documentElement,t=G){this.logger=console,this.debug=!1,this.logDebugActivity=(e,t,o={})=>{this.debug&&this.logFormattedMessage(e,t,o)},this.element=e,this.schema=t,this.dispatcher=new r(this),this.router=new q(this),this.actionDescriptorFilters=Object.assign({},i)}static start(e,t){const o=new this(e,t);return o.start(),o}async start(){await new Promise((e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>e())):e()})),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach((e=>{e.controllerConstructor.shouldLoad&&this.router.loadDefinition(e)}))}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach((e=>this.router.unloadIdentifier(e)))}get controllers(){return this.router.contexts.map((e=>e.controller))}getControllerForElementAndIdentifier(e,t){const o=this.router.getContextForElementAndIdentifier(e,t);return o?o.controller:null}handleError(e,t,o){var n;this.logger.error("%s\n\n%o\n\n%o",t,e,o),null===(n=window.onerror)||void 0===n||n.call(window,t,"",0,0,e)}logFormattedMessage(e,t,o={}){o=Object.assign({application:this},o),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},o)),this.logger.groupEnd()}}function X([e,t],o){return function(e){const t=`${u(e.token)}-value`,o=function(e){const t=function(e){const t=J(e.typeObject.type);if(!t)return;const o=Q(e.typeObject.default);if(t!==o){const n=e.controller?`${e.controller}.${e.token}`:e.token;throw new Error(`The specified default value for the Stimulus Value "${n}" must match the defined type "${t}". The provided default value of "${e.typeObject.default}" is of type "${o}".`)}return t}({controller:e.controller,token:e.token,typeObject:e.typeDefinition}),o=Q(e.typeDefinition),n=J(e.typeDefinition),r=t||o||n;if(r)return r;const i=e.controller?`${e.controller}.${e.typeDefinition}`:e.token;throw new Error(`Unknown value type "${i}" for "${e.token}" value`)}(e);return{type:o,key:t,name:l(t),get defaultValue(){return function(e){const t=J(e);if(t)return ee[t];const o=e.default;return void 0!==o?o:e}(e.typeDefinition)},get hasCustomDefaultValue(){return void 0!==Q(e.typeDefinition)},reader:te[o],writer:oe[o]||oe.default}}({controller:o,token:e,typeDefinition:t})}function J(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function Q(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}const ee={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},te={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${e}" of type "${Q(t)}"`);return t},boolean:e=>!("0"==e||"false"==String(e).toLowerCase()),number:e=>Number(e),object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${e}" of type "${Q(t)}"`);return t},string:e=>e},oe={default:function(e){return`${e}`},array:ne,object:ne};function ne(e){return JSON.stringify(e)}class re{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:o={},prefix:n=this.identifier,bubbles:r=!0,cancelable:i=!0}={}){const s=new CustomEvent(n?`${n}:${e}`:e,{detail:o,bubbles:r,cancelable:i});return t.dispatchEvent(s),s}}re.blessings=[function(e){return M(e,"classes").reduce(((e,t)=>{return Object.assign(e,{[`${o=t}Class`]:{get(){const{classes:e}=this;if(e.has(o))return e.get(o);{const t=e.getAttributeName(o);throw new Error(`Missing attribute "${t}"`)}}},[`${o}Classes`]:{get(){return this.classes.getAll(o)}},[`has${d(o)}Class`]:{get(){return this.classes.has(o)}}});var o}),{})},function(e){return M(e,"targets").reduce(((e,t)=>{return Object.assign(e,{[`${o=t}Target`]:{get(){const e=this.targets.find(o);if(e)return e;throw new Error(`Missing target element "${o}" for "${this.identifier}" controller`)}},[`${o}Targets`]:{get(){return this.targets.findAll(o)}},[`has${d(o)}Target`]:{get(){return this.targets.has(o)}}});var o}),{})},function(e){const t=P(e,"values"),o={valueDescriptorMap:{get(){return t.reduce(((e,t)=>{const o=X(t,this.identifier),n=this.data.getAttributeNameForKey(o.key);return Object.assign(e,{[n]:o})}),{})}}};return t.reduce(((e,t)=>Object.assign(e,function(e,t){const o=X(e,t),{key:n,name:r,reader:i,writer:s}=o;return{[r]:{get(){const e=this.data.get(n);return null!==e?i(e):o.defaultValue},set(e){void 0===e?this.data.delete(n):this.data.set(n,s(e))}},[`has${d(r)}`]:{get(){return this.data.has(n)||o.hasCustomDefaultValue}}}}(t))),o)},function(e){return M(e,"outlets").reduce(((e,t)=>Object.assign(e,function(e){const t=c(e);return{[`${t}Outlet`]:{get(){const t=this.outlets.find(e);if(t){const o=this.application.getControllerForElementAndIdentifier(t,e);if(o)return o;throw new Error(`Missing "data-controller=${e}" attribute on outlet element for "${this.identifier}" controller`)}throw new Error(`Missing outlet element "${e}" for "${this.identifier}" controller`)}},[`${t}Outlets`]:{get(){const t=this.outlets.findAll(e);return t.length>0?t.map((t=>{const o=this.application.getControllerForElementAndIdentifier(t,e);if(o)return o;console.warn(`The provided outlet element is missing the outlet controller "${e}" for "${this.identifier}"`,t)})).filter((e=>e)):[]}},[`${t}OutletElement`]:{get(){const t=this.outlets.find(e);if(t)return t;throw new Error(`Missing outlet element "${e}" for "${this.identifier}" controller`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${d(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}(t))),{})}],re.targets=[],re.outlets=[],re.values={}},36184:(e,t,o)=>{"use strict";o.d(t,{Vn:()=>Ae}),function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.polyfillWrapFlushCallback)return;const e=HTMLElement,t=function(){return Reflect.construct(e,[],this.constructor)};window.HTMLElement=t,HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}(),function(e){function t(e,t,o){throw new e("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+t+".",o)}"function"!=typeof e.requestSubmit&&(e.requestSubmit=function(e){e?(!function(e,o){e instanceof HTMLElement||t(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==e.type||t(TypeError,"The specified element is not a submit button"),e.form==o||t(DOMException,"The specified element is not owned by this form element","NotFoundError")}(e,this),e.click()):((e=document.createElement("input")).type="submit",e.hidden=!0,this.appendChild(e),e.click(),this.removeChild(e))})}(HTMLFormElement.prototype);const n=new WeakMap;function r(e){const t=function(e){const t=e instanceof Element?e:e instanceof Node?e.parentElement:null,o=t?t.closest("input, button"):null;return"submit"==(null==o?void 0:o.type)?o:null}(e.target);t&&t.form&&n.set(t.form,t)}var i,s,a,l,c,d;!function(){if("submitter"in Event.prototype)return;let e=window.Event.prototype;if("SubmitEvent"in window&&/Apple Computer/.test(navigator.vendor))e=window.SubmitEvent.prototype;else if("SubmitEvent"in window)return;addEventListener("click",r,!0),Object.defineProperty(e,"submitter",{get(){if("submit"==this.type&&this.target instanceof HTMLFormElement)return n.get(this.target)}})}(),function(e){e.eager="eager",e.lazy="lazy"}(i||(i={}));class u extends HTMLElement{static get observedAttributes(){return["disabled","complete","loading","src"]}constructor(){super(),this.loaded=Promise.resolve(),this.delegate=new u.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){"loading"==e?this.delegate.loadingStyleChanged():"complete"==e?this.delegate.completeChanged():"src"==e?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get loading(){return function(e){if("lazy"===e.toLowerCase())return i.lazy;return i.eager}(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){var e,t;return null===(t=null===(e=this.ownerDocument)||void 0===e?void 0:e.documentElement)||void 0===t?void 0:t.hasAttribute("data-turbo-preview")}}function h(e){return new URL(e.toString(),document.baseURI)}function m(e){let t;return e.hash?e.hash.slice(1):(t=e.href.match(/#(.*)$/))?t[1]:void 0}function p(e,t){return h((null==t?void 0:t.getAttribute("formaction"))||e.getAttribute("action")||e.action)}function g(e){return(function(e){return function(e){return e.pathname.split("/").slice(1)}(e).slice(-1)[0]}(e).match(/\.[^.]*$/)||[])[0]||""}function f(e,t){const o=function(e){return t=e.origin+e.pathname,t.endsWith("/")?t:t+"/";var t}(t);return e.href===h(o).href||e.href.startsWith(o)}function b(e,t){return f(e,t)&&!!g(e).match(/^(?:|\.(?:htm|html|xhtml|php))$/)}function v(e){const t=m(e);return null!=t?e.href.slice(0,-(t.length+1)):e.href}function y(e){return v(e)}class x{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return h(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}}function w(e){if("false"==e.getAttribute("data-turbo-eval"))return e;{const t=document.createElement("script"),o=R("csp-nonce");return o&&(t.nonce=o),t.textContent=e.textContent,t.async=!1,function(e,t){for(const{name:o,value:n}of t.attributes)e.setAttribute(o,n)}(t,e),t}}function _(e,{target:t,cancelable:o,detail:n}={}){const r=new CustomEvent(e,{cancelable:o,bubbles:!0,composed:!0,detail:n});return t&&t.isConnected?t.dispatchEvent(r):document.documentElement.dispatchEvent(r),r}function S(){return new Promise((e=>requestAnimationFrame((()=>e()))))}function C(e=""){return(new DOMParser).parseFromString(e,"text/html")}function k(e,...t){const o=function(e,t){return e.reduce(((e,o,n)=>e+o+(null==t[n]?"":t[n])),"")}(e,t).replace(/^\n/,"").split("\n"),n=o[0].match(/^\s+/),r=n?n[0].length:0;return o.map((e=>e.slice(r))).join("\n")}function E(){return Array.from({length:36}).map(((e,t)=>8==t||13==t||18==t||23==t?"-":14==t?"4":19==t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16))).join("")}function T(e,...t){for(const o of t.map((t=>null==t?void 0:t.getAttribute(e))))if("string"==typeof o)return o;return null}function O(...e){for(const t of e)"turbo-frame"==t.localName&&t.setAttribute("busy",""),t.setAttribute("aria-busy","true")}function A(...e){for(const t of e)"turbo-frame"==t.localName&&t.removeAttribute("busy"),t.removeAttribute("aria-busy")}function M(e,t=2e3){return new Promise((o=>{const n=()=>{e.removeEventListener("error",n),e.removeEventListener("load",n),o()};e.addEventListener("load",n,{once:!0}),e.addEventListener("error",n,{once:!0}),setTimeout(o,t)}))}function P(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function D(...e){const t=T("data-turbo-action",...e);return function(e){return"advance"==e||"replace"==e||"restore"==e}(t)?t:null}function L(e){return document.querySelector(`meta[name="${e}"]`)}function R(e){const t=L(e);return t&&t.content}function N(e,t){var o;if(e instanceof Element)return e.closest(t)||N(e.assignedSlot||(null===(o=e.getRootNode())||void 0===o?void 0:o.host),t)}!function(e){e[e.get=0]="get",e[e.post=1]="post",e[e.put=2]="put",e[e.patch=3]="patch",e[e.delete=4]="delete"}(s||(s={}));class I{constructor(e,t,o,n=new URLSearchParams,r=null){this.abortController=new AbortController,this.resolveRequestPromise=e=>{},this.delegate=e,this.method=t,this.headers=this.defaultHeaders,this.body=n,this.url=o,this.target=r}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){const{fetchOptions:e}=this;this.delegate.prepareRequest(this),await this.allowRequestToBeIntercepted(e);try{this.delegate.requestStarted(this);const t=await fetch(this.url.href,e);return await this.receive(t)}catch(e){if("AbortError"!==e.name)throw this.willDelegateErrorHandling(e)&&this.delegate.requestErrored(this,e),e}finally{this.delegate.requestFinished(this)}}async receive(e){const t=new x(e);return _("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get fetchOptions(){var e;return{method:s[this.method].toUpperCase(),credentials:"same-origin",headers:this.headers,redirect:"follow",body:this.isSafe?null:this.body,signal:this.abortSignal,referrer:null===(e=this.delegate.referrer)||void 0===e?void 0:e.href}}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isSafe(){return this.method===s.get}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async allowRequestToBeIntercepted(e){const t=new Promise((e=>this.resolveRequestPromise=e));_("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.resolveRequestPromise},target:this.target}).defaultPrevented&&await t}willDelegateErrorHandling(e){return!_("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}}class B{constructor(e,t){this.started=!1,this.intersect=e=>{const t=e.slice(-1)[0];(null==t?void 0:t.isIntersecting)&&this.delegate.elementAppearedInViewport(this.element)},this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}}class z{static wrap(e){return"string"==typeof e?new this(function(e){const t=document.createElement("template");return t.innerHTML=e,t.content}(e)):e}constructor(e){this.fragment=function(e){for(const t of e.querySelectorAll("turbo-stream")){const e=document.importNode(t,!0);for(const t of e.templateElement.content.querySelectorAll("script"))t.replaceWith(w(t));t.replaceWith(e)}return e}(e)}}z.contentType="text/vnd.turbo-stream.html",function(e){e[e.initialized=0]="initialized",e[e.requesting=1]="requesting",e[e.waiting=2]="waiting",e[e.receiving=3]="receiving",e[e.stopping=4]="stopping",e[e.stopped=5]="stopped"}(a||(a={})),function(e){e.urlEncoded="application/x-www-form-urlencoded",e.multipart="multipart/form-data",e.plain="text/plain"}(l||(l={}));class F{static confirmMethod(e,t,o){return Promise.resolve(confirm(e))}constructor(e,t,o,n=!1){this.state=a.initialized,this.delegate=e,this.formElement=t,this.submitter=o,this.formData=function(e,t){const o=new FormData(e),n=null==t?void 0:t.getAttribute("name"),r=null==t?void 0:t.getAttribute("value");n&&o.append(n,r||"");return o}(t,o),this.location=h(this.action),this.method==s.get&&function(e,t){const o=new URLSearchParams;for(const[e,n]of t)n instanceof File||o.append(e,n);e.search=o.toString()}(this.location,[...this.body.entries()]),this.fetchRequest=new I(this,this.method,this.location,this.body,this.formElement),this.mustRedirect=n}get method(){var e;return function(e){switch(e.toLowerCase()){case"get":return s.get;case"post":return s.post;case"put":return s.put;case"patch":return s.patch;case"delete":return s.delete}}(((null===(e=this.submitter)||void 0===e?void 0:e.getAttribute("formmethod"))||this.formElement.getAttribute("method")||"").toLowerCase())||s.get}get action(){var e;const t="string"==typeof this.formElement.action?this.formElement.action:null;return(null===(e=this.submitter)||void 0===e?void 0:e.hasAttribute("formaction"))?this.submitter.getAttribute("formaction")||"":this.formElement.getAttribute("action")||t||""}get body(){return this.enctype==l.urlEncoded||this.method==s.get?new URLSearchParams(this.stringFormData):this.formData}get enctype(){var e;return function(e){switch(e.toLowerCase()){case l.multipart:return l.multipart;case l.plain:return l.plain;default:return l.urlEncoded}}((null===(e=this.submitter)||void 0===e?void 0:e.getAttribute("formenctype"))||this.formElement.enctype)}get isSafe(){return this.fetchRequest.isSafe}get stringFormData(){return[...this.formData].reduce(((e,[t,o])=>e.concat("string"==typeof o?[[t,o]]:[])),[])}async start(){const{initialized:e,requesting:t}=a,o=T("data-turbo-confirm",this.submitter,this.formElement);if("string"==typeof o){if(!await F.confirmMethod(o,this.formElement,this.submitter))return}if(this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){const{stopping:e,stopped:t}=a;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareRequest(e){if(!e.isSafe){const t=function(e){if(null!=e){const t=(document.cookie?document.cookie.split("; "):[]).find((t=>t.startsWith(e)));if(t){const e=t.split("=").slice(1).join("=");return e?decodeURIComponent(e):void 0}}}(R("csrf-param"))||R("csrf-token");t&&(e.headers["X-CSRF-Token"]=t)}this.requestAcceptsTurboStreamResponse(e)&&e.acceptResponseType(z.contentType)}requestStarted(e){var t;this.state=a.waiting,null===(t=this.submitter)||void 0===t||t.setAttribute("disabled",""),this.setSubmitsWith(),_("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError)this.delegate.formSubmissionFailedWithResponse(this,t);else if(this.requestMustRedirect(e)&&function(e){return 200==e.statusCode&&!e.redirected}(t)){const e=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,e)}else this.state=a.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){var t;this.state=a.stopped,null===(t=this.submitter)||void 0===t||t.removeAttribute("disabled"),this.resetSubmitterText(),_("turbo:submit-end",{target:this.formElement,detail:Object.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){if(this.submitter&&this.submitsWith)if(this.submitter.matches("button"))this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith;else if(this.submitter.matches("input")){const e=this.submitter;this.originalSubmitText=e.value,e.value=this.submitsWith}}resetSubmitterText(){if(this.submitter&&this.originalSubmitText)if(this.submitter.matches("button"))this.submitter.innerHTML=this.originalSubmitText;else if(this.submitter.matches("input")){this.submitter.value=this.originalSubmitText}}requestMustRedirect(e){return!e.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isSafe||function(e,...t){return t.some((t=>t&&t.hasAttribute(e)))}("data-turbo-stream",this.submitter,this.formElement)}get submitsWith(){var e;return null===(e=this.submitter)||void 0===e?void 0:e.getAttribute("data-turbo-submits-with")}}class H{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return null!=this.getElementForAnchor(e)}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){for(const e of this.element.querySelectorAll("[autofocus]"))if(null==e.closest("[inert], :disabled, [hidden], details:not([open]), dialog:not([open])"))return e;return null}get permanentElements(){return V(this.element)}getPermanentElementById(e){return j(this.element,e)}getPermanentElementMapForSnapshot(e){const t={};for(const o of this.permanentElements){const{id:n}=o,r=e.getPermanentElementById(n);r&&(t[n]=[o,r])}return t}}function j(e,t){return e.querySelector(`#${t}[data-turbo-permanent]`)}function V(e){return e.querySelectorAll("[id][data-turbo-permanent]")}class U{constructor(e,t){this.started=!1,this.submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)},this.submitBubbled=e=>{if(!e.defaultPrevented){const t=e.target instanceof HTMLFormElement?e.target:void 0,o=e.submitter||void 0;t&&function(e,t){const o=(null==t?void 0:t.getAttribute("formmethod"))||e.getAttribute("method");return"dialog"!=o}(t,o)&&function(e,t){if((null==t?void 0:t.hasAttribute("formtarget"))||e.hasAttribute("target")){const o=(null==t?void 0:t.getAttribute("formtarget"))||e.target;for(const e of document.getElementsByName(o))if(e instanceof HTMLIFrameElement)return!1;return!0}return!0}(t,o)&&this.delegate.willSubmitForm(t,o)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmitted(t,o))}},this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}}class Z{constructor(e,t){this.resolveRenderPromise=e=>{},this.resolveInterceptionPromise=e=>{},this.delegate=e,this.element=t}scrollToAnchor(e){const t=this.snapshot.getElementForAnchor(e);t?(this.scrollToElement(t),this.focusElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(m(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}async render(e){const{isPreview:t,shouldRender:o,newSnapshot:n}=e;if(o)try{this.renderPromise=new Promise((e=>this.resolveRenderPromise=e)),this.renderer=e,await this.prepareToRenderSnapshot(e);const o=new Promise((e=>this.resolveInterceptionPromise=e)),r={resume:this.resolveInterceptionPromise,render:this.renderer.renderElement};this.delegate.allowsImmediateRender(n,r)||await o,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(n,t),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}}class $ extends Z{missing(){this.element.innerHTML='<strong class="turbo-frame-error">Content missing</strong>'}get snapshot(){return new H(this.element)}}class W{constructor(e,t){this.clickBubbled=e=>{this.respondsToEventTarget(e.target)?this.clickEvent=e:delete this.clickEvent},this.linkClicked=e=>{this.clickEvent&&this.respondsToEventTarget(e.target)&&e.target instanceof Element&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.originalEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delete this.clickEvent},this.willVisit=e=>{delete this.clickEvent},this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}respondsToEventTarget(e){const t=e instanceof Element?e:e instanceof Node?e.parentElement:null;return t&&t.closest("turbo-frame, html")==this.element}}class q{constructor(e,t){this.started=!1,this.clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)},this.clickBubbled=e=>{if(e instanceof MouseEvent&&this.clickEventIsSignificant(e)){const t=e.composedPath&&e.composedPath()[0]||e.target,o=this.findLinkFromClickTarget(t);if(o&&function(e){if(e.hasAttribute("target")){for(const t of document.getElementsByName(e.target))if(t instanceof HTMLIFrameElement)return!1;return!0}return!0}(o)){const t=this.getLocationForLink(o);this.delegate.willFollowLinkToLocation(o,t,e)&&(e.preventDefault(),this.delegate.followedLinkToLocation(o,t))}}},this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}findLinkFromClickTarget(e){return N(e,"a[href]:not([target^=_]):not([download])")}getLocationForLink(e){return h(e.getAttribute("href")||"")}}class G{constructor(e,t){this.delegate=e,this.linkInterceptor=new q(this,t)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}willFollowLinkToLocation(e,t,o){return this.delegate.willSubmitFormLinkToLocation(e,t,o)&&e.hasAttribute("data-turbo-method")}followedLinkToLocation(e,t){const o=document.createElement("form");for(const[e,n]of t.searchParams)o.append(Object.assign(document.createElement("input"),{type:"hidden",name:e,value:n}));const n=Object.assign(t,{search:""});o.setAttribute("data-turbo","true"),o.setAttribute("action",n.href),o.setAttribute("hidden","");const r=e.getAttribute("data-turbo-method");r&&o.setAttribute("method",r);const i=e.getAttribute("data-turbo-frame");i&&o.setAttribute("data-turbo-frame",i);const s=D(e);s&&o.setAttribute("data-turbo-action",s);const a=e.getAttribute("data-turbo-confirm");a&&o.setAttribute("data-turbo-confirm",a);e.hasAttribute("data-turbo-stream")&&o.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,t,o),document.body.appendChild(o),o.addEventListener("turbo:submit-end",(()=>o.remove()),{once:!0}),requestAnimationFrame((()=>o.requestSubmit()))}}class Y{static async preservingPermanentElements(e,t,o){const n=new this(e,t);n.enter(),await o(),n.leave()}constructor(e,t){this.delegate=e,this.permanentElementMap=t}enter(){for(const e in this.permanentElementMap){const[t,o]=this.permanentElementMap[e];this.delegate.enteringBardo(t,o),this.replaceNewPermanentElementWithPlaceholder(o)}}leave(){for(const e in this.permanentElementMap){const[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPermanentElementWithPlaceholder(e){const t=function(e){const t=document.createElement("meta");return t.setAttribute("name","turbo-permanent-placeholder"),t.setAttribute("content",e.id),t}(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){const t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){const t=this.getPlaceholderById(e.id);null==t||t.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find((t=>t.content==e))}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}}class K{constructor(e,t,o,n,r=!0){this.activeElement=null,this.currentSnapshot=e,this.newSnapshot=t,this.isPreview=n,this.willRender=r,this.renderElement=o,this.promise=new Promise(((e,t)=>this.resolvingFunctions={resolve:e,reject:t}))}get shouldRender(){return!0}get reloadReason(){}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await Y.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){const e=this.connectedSnapshot.firstAutofocusableElement;(function(e){return e&&"function"==typeof e.focus})(e)&&e.focus()}enteringBardo(e){this.activeElement||e.contains(this.currentSnapshot.activeElement)&&(this.activeElement=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.activeElement)&&this.activeElement instanceof HTMLElement&&(this.activeElement.focus(),this.activeElement=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}}class X extends K{static renderElement(e,t){var o;const n=document.createRange();n.selectNodeContents(e),n.deleteContents();const r=t,i=null===(o=r.ownerDocument)||void 0===o?void 0:o.createRange();i&&(i.selectNodeContents(r),e.appendChild(i.extractContents()))}constructor(e,t,o,n,r,i=!0){super(t,o,n,r,i),this.delegate=e}get shouldRender(){return!0}async render(){await S(),this.preservingPermanentElements((()=>{this.loadFrameElement()})),this.scrollFrameIntoView(),await S(),this.focusFirstAutofocusableElement(),await S(),this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){const o=this.currentElement.firstElementChild,n=(e=this.currentElement.getAttribute("data-autoscroll-block"),t="end","end"==e||"start"==e||"center"==e||"nearest"==e?e:t),r=function(e,t){return"auto"==e||"smooth"==e?e:t}(this.currentElement.getAttribute("data-autoscroll-behavior"),"auto");if(o)return o.scrollIntoView({block:n,behavior:r}),!0}var e,t;return!1}activateScriptElements(){for(const e of this.newScriptElements){const t=w(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}}class J{static get defaultCSS(){return k`
      .turbo-progress-bar {
        position: fixed;
        display: block;
        top: 0;
        left: 0;
        height: 3px;
        background: #0076ff;
        z-index: 2147483647;
        transition:
          width ${J.animationDuration}ms ease-out,
          opacity ${J.animationDuration/2}ms ${J.animationDuration/2}ms ease-in;
        transform: translate3d(0, 0, 0);
      }
    `}constructor(){this.hiding=!1,this.value=0,this.visible=!1,this.trickle=()=>{this.setValue(this.value+Math.random()/100)},this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement((()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1})))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,1.5*J.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,J.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame((()=>{this.progressElement.style.width=10+90*this.value+"%"}))}createStylesheetElement(){const e=document.createElement("style");return e.type="text/css",e.textContent=J.defaultCSS,this.cspNonce&&(e.nonce=this.cspNonce),e}createProgressElement(){const e=document.createElement("div");return e.className="turbo-progress-bar",e}get cspNonce(){return R("csp-nonce")}}J.animationDuration=300;class Q extends H{constructor(){super(...arguments),this.detailsByOuterHTML=this.children.filter((e=>!function(e){const t=e.localName;return"noscript"==t}(e))).map((e=>function(e){e.hasAttribute("nonce")&&e.setAttribute("nonce","");return e}(e))).reduce(((e,t)=>{const{outerHTML:o}=t,n=o in e?e[o]:{type:ee(t),tracked:te(t),elements:[]};return Object.assign(Object.assign({},e),{[o]:Object.assign(Object.assign({},n),{elements:[...n.elements,t]})})}),{})}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter((e=>this.detailsByOuterHTML[e].tracked)).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter((e=>!(e in t.detailsByOuterHTML))).map((e=>this.detailsByOuterHTML[e])).filter((({type:t})=>t==e)).map((({elements:[e]})=>e))}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce(((e,t)=>{const{type:o,tracked:n,elements:r}=this.detailsByOuterHTML[t];return null!=o||n?r.length>1?[...e,...r.slice(1)]:e:[...e,...r]}),[])}getMetaValue(e){const t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce(((t,o)=>{const{elements:[n]}=this.detailsByOuterHTML[o];return function(e,t){const o=e.localName;return"meta"==o&&e.getAttribute("name")==t}(n,e)?n:t}),void 0)}}function ee(e){return function(e){const t=e.localName;return"script"==t}(e)?"script":function(e){const t=e.localName;return"style"==t||"link"==t&&"stylesheet"==e.getAttribute("rel")}(e)?"stylesheet":void 0}function te(e){return"reload"==e.getAttribute("data-turbo-track")}class oe extends H{static fromHTMLString(e=""){return this.fromDocument(C(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({head:e,body:t}){return new this(t,new Q(e))}constructor(e,t){super(e),this.headSnapshot=t}clone(){const e=this.element.cloneNode(!0),t=this.element.querySelectorAll("select"),o=e.querySelectorAll("select");for(const[e,n]of t.entries()){const t=o[e];for(const e of t.selectedOptions)e.selected=!1;for(const e of n.selectedOptions)t.options[e.index].selected=!0}for(const t of e.querySelectorAll('input[type="password"]'))t.value="";return new oe(e,this.headSnapshot)}get headElement(){return this.headSnapshot.element}get rootLocation(){var e;return h(null!==(e=this.getSetting("root"))&&void 0!==e?e:"/")}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return"no-preview"!=this.cacheControlValue}get isCacheable(){return"no-cache"!=this.cacheControlValue}get isVisitable(){return"reload"!=this.getSetting("visit-control")}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}}!function(e){e.visitStart="visitStart",e.requestStart="requestStart",e.requestEnd="requestEnd",e.visitEnd="visitEnd"}(c||(c={})),function(e){e.initialized="initialized",e.started="started",e.canceled="canceled",e.failed="failed",e.completed="completed"}(d||(d={}));const ne={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1};var re,ie;!function(e){e[e.networkFailure=0]="networkFailure",e[e.timeoutFailure=-1]="timeoutFailure",e[e.contentTypeMismatch=-2]="contentTypeMismatch"}(re||(re={}));class se{constructor(e,t,o,n={}){this.identifier=E(),this.timingMetrics={},this.followedRedirect=!1,this.historyChanged=!1,this.scrolled=!1,this.shouldCacheSnapshot=!0,this.acceptsStreamResponse=!1,this.snapshotCached=!1,this.state=d.initialized,this.delegate=e,this.location=t,this.restorationIdentifier=o||E();const{action:r,historyChanged:i,referrer:s,snapshot:a,snapshotHTML:l,response:c,visitCachedSnapshot:u,willRender:h,updateHistory:m,shouldCacheSnapshot:p,acceptsStreamResponse:g}=Object.assign(Object.assign({},ne),n);this.action=r,this.historyChanged=i,this.referrer=s,this.snapshot=a,this.snapshotHTML=l,this.response=c,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.visitCachedSnapshot=u,this.willRender=h,this.updateHistory=m,this.scrolled=!h,this.shouldCacheSnapshot=p,this.acceptsStreamResponse=g}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==d.initialized&&(this.recordTimingMetric(c.visitStart),this.state=d.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==d.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=d.canceled)}complete(){this.state==d.started&&(this.recordTimingMetric(c.visitEnd),this.state=d.completed,this.followRedirect(),this.followedRedirect||(this.adapter.visitCompleted(this),this.delegate.visitCompleted(this)))}fail(){this.state==d.started&&(this.state=d.failed,this.adapter.visitFailed(this))}changeHistory(){var e;if(!this.historyChanged&&this.updateHistory){const t=P(this.location.href===(null===(e=this.referrer)||void 0===e?void 0:e.href)?"replace":this.action);this.history.update(t,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new I(this,s.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(c.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){const{statusCode:t}=e;ae(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(c.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode:e,responseHTML:t}=this.response;this.render((async()=>{this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,ae(e)&&null!=t?(await this.view.renderPage(oe.fromHTMLString(t),!1,this.willRender,this),this.performScroll(),this.adapter.visitRendered(this),this.complete()):(await this.view.renderError(oe.fromHTMLString(t),this),this.adapter.visitRendered(this),this.fail())}))}}getCachedSnapshot(){const e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!m(this.location)||e.hasAnchor(m(this.location)))&&("restore"==this.action||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return oe.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){const e=this.getCachedSnapshot();if(e){const t=this.shouldIssueRequest();this.render((async()=>{this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.view.renderPage(e,t,this.willRender,this),this.performScroll(),this.adapter.visitRendered(this),t||this.complete())}))}}followRedirect(){var e;this.redirectedToLocation&&!this.followedRedirect&&(null===(e=this.response)||void 0===e?void 0:e.redirected)&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render((async()=>{this.cacheSnapshot(),this.performScroll(),this.changeHistory(),this.adapter.visitRendered(this)}))}prepareRequest(e){this.acceptsStreamResponse&&e.acceptResponseType(z.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){const o=await t.responseHTML,{redirected:n,statusCode:r}=t;null==o?this.recordResponse({statusCode:re.contentTypeMismatch,redirected:n}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.recordResponse({statusCode:r,responseHTML:o,redirected:n}))}async requestFailedWithResponse(e,t){const o=await t.responseHTML,{redirected:n,statusCode:r}=t;null==o?this.recordResponse({statusCode:re.contentTypeMismatch,redirected:n}):this.recordResponse({statusCode:r,responseHTML:o,redirected:n})}requestErrored(e,t){this.recordResponse({statusCode:re.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||this.view.forceReloaded||("restore"==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){const{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){const e=m(this.location);if(null!=e)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=(new Date).getTime()}getTimingMetrics(){return Object.assign({},this.timingMetrics)}getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}hasPreloadedResponse(){return"object"==typeof this.response}shouldIssueRequest(){return!this.isSamePage&&("restore"==this.action?!this.hasCachedSnapshot():this.willRender)}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then((e=>e&&this.visitCachedSnapshot(e))),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise((e=>{this.frame=requestAnimationFrame((()=>e()))})),await e(),delete this.frame}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function ae(e){return e>=200&&e<300}class le{constructor(e){this.progressBar=new J,this.showProgressBar=()=>{this.progressBar.show()},this.session=e}visitProposedToLocation(e,t){this.navigator.startVisit(e,(null==t?void 0:t.restorationIdentifier)||E(),t)}visitStarted(e){this.location=e.location,e.loadCachedSnapshot(),e.issueRequest(),e.goToSamePageAnchor()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||"restore"!=e.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithStatusCode(e,t){switch(t){case re.networkFailure:case re.timeoutFailure:case re.contentTypeMismatch:return this.reload({reason:"request_failed",context:{statusCode:t}});default:return e.loadResponse()}}visitRequestFinished(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitCompleted(e){}pageInvalidated(e){this.reload(e)}visitFailed(e){}visitRendered(e){}formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}reload(e){var t;_("turbo:reload",{detail:e}),window.location.href=(null===(t=this.location)||void 0===t?void 0:t.toString())||window.location.href}get navigator(){return this.session.navigator}}class ce{constructor(){this.selector="[data-turbo-temporary]",this.deprecatedSelector="[data-turbo-cache=false]",this.started=!1,this.removeTemporaryElements=e=>{for(const e of this.temporaryElements)e.remove()}}start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}get temporaryElements(){return[...document.querySelectorAll(this.selector),...this.temporaryElementsWithDeprecation]}get temporaryElementsWithDeprecation(){const e=document.querySelectorAll(this.deprecatedSelector);return e.length&&console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`),[...e]}}class de{constructor(e,t){this.session=e,this.element=t,this.linkInterceptor=new W(this,t),this.formSubmitObserver=new U(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,t,o){return this.shouldRedirect(e)}linkClickIntercepted(e,t,o){const n=this.findFrameElement(e);n&&n.delegate.linkClickIntercepted(e,t,o)}willSubmitForm(e,t){return null==e.closest("turbo-frame")&&this.shouldSubmit(e,t)&&this.shouldRedirect(e,t)}formSubmitted(e,t){const o=this.findFrameElement(e,t);o&&o.delegate.formSubmitted(e,t)}shouldSubmit(e,t){var o;const n=p(e,t),r=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),i=h(null!==(o=null==r?void 0:r.content)&&void 0!==o?o:"/");return this.shouldRedirect(e,t)&&b(n,i)}shouldRedirect(e,t){if(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNavigatable(e)){const o=this.findFrameElement(e,t);return!!o&&o!=e.closest("turbo-frame")}return!1}findFrameElement(e,t){const o=(null==t?void 0:t.getAttribute("data-turbo-frame"))||e.getAttribute("data-turbo-frame");if(o&&"_top"!=o){const e=this.element.querySelector(`#${o}:not([disabled])`);if(e instanceof u)return e}}}class ue{constructor(e){this.restorationIdentifier=E(),this.restorationData={},this.started=!1,this.pageLoaded=!1,this.onPopState=e=>{if(this.shouldHandlePopState()){const{turbo:t}=e.state||{};if(t){this.location=new URL(window.location.href);const{restorationIdentifier:e}=t;this.restorationIdentifier=e,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,e)}}},this.onPageLoad=async e=>{await Promise.resolve(),this.pageLoaded=!0},this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,o=E()){const n={turbo:{restorationIdentifier:o}};e.call(history,n,"",t.href),this.location=t,this.restorationIdentifier=o}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){const{restorationIdentifier:t}=this,o=this.restorationData[t];this.restorationData[t]=Object.assign(Object.assign({},o),e)}assumeControlOfScrollRestoration(){var e;this.previousScrollRestoration||(this.previousScrollRestoration=null!==(e=history.scrollRestoration)&&void 0!==e?e:"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||"complete"==document.readyState}}class he{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&(b(e,this.view.snapshot.rootLocation)?this.delegate.visitProposedToLocation(e,t):window.location.href=e.toString())}startVisit(e,t,o={}){this.stop(),this.currentVisit=new se(this,h(e),t,Object.assign({referrer:this.location},o)),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new F(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}formSubmissionStarted(e){"function"==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){const o=await t.responseHTML;if(o){const n=e.isSafe;n||this.view.clearSnapshotCache();const{statusCode:r,redirected:i}=t,s={action:this.getActionForFormSubmission(e),shouldCacheSnapshot:n,response:{statusCode:r,responseHTML:o,redirected:i}};this.proposeVisit(t.location,s)}}}async formSubmissionFailedWithResponse(e,t){const o=await t.responseHTML;if(o){const e=oe.fromHTMLString(o);t.serverError?await this.view.renderError(e,this.currentVisit):await this.view.renderPage(e,!1,!0,this.currentVisit),this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){"function"==typeof this.adapter.formSubmissionFinished&&this.adapter.formSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e)}locationWithActionIsSamePage(e,t){const o=m(e),n=m(this.view.lastRenderedLocation),r="restore"===t&&void 0===o;return"replace"!==t&&v(e)===v(this.view.lastRenderedLocation)&&(r||null!=o&&o!==n)}visitScrolledToSamePageLocation(e,t){this.delegate.visitScrolledToSamePageLocation(e,t)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}getActionForFormSubmission({submitter:e,formElement:t}){return D(e,t)||"advance"}}!function(e){e[e.initial=0]="initial",e[e.loading=1]="loading",e[e.interactive=2]="interactive",e[e.complete=3]="complete"}(ie||(ie={}));class me{constructor(e){this.stage=ie.initial,this.started=!1,this.interpretReadyState=()=>{const{readyState:e}=this;"interactive"==e?this.pageIsInteractive():"complete"==e&&this.pageIsComplete()},this.pageWillUnload=()=>{this.delegate.pageWillUnload()},this.delegate=e}start(){this.started||(this.stage==ie.initial&&(this.stage=ie.loading),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}pageIsInteractive(){this.stage==ie.loading&&(this.stage=ie.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==ie.interactive&&(this.stage=ie.complete,this.delegate.pageLoaded())}get readyState(){return document.readyState}}class pe{constructor(e){this.started=!1,this.onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}updatePosition(e){this.delegate.scrollPositionChanged(e)}}class ge{render({fragment:e}){Y.preservingPermanentElements(this,function(e){const t=V(document.documentElement),o={};for(const n of t){const{id:t}=n;for(const r of e.querySelectorAll("turbo-stream")){const e=j(r.templateElement.content,t);e&&(o[t]=[n,e])}}return o}(e),(()=>document.documentElement.appendChild(e)))}enteringBardo(e,t){t.replaceWith(e.cloneNode(!0))}leavingBardo(){}}class fe{constructor(e){this.sources=new Set,this.started=!1,this.inspectFetchResponse=e=>{const t=function(e){var t;const o=null===(t=e.detail)||void 0===t?void 0:t.fetchResponse;if(o instanceof x)return o}(e);t&&function(e){var t;const o=null!==(t=e.contentType)&&void 0!==t?t:"";return o.startsWith(z.contentType)}(t)&&(e.preventDefault(),this.receiveMessageResponse(t))},this.receiveMessageEvent=e=>{this.started&&"string"==typeof e.data&&this.receiveMessageHTML(e.data)},this.delegate=e}start(){this.started||(this.started=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}async receiveMessageResponse(e){const t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(z.wrap(e))}}class be extends K{static renderElement(e,t){const{documentElement:o,body:n}=document;o.replaceChild(t,n)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){const{documentElement:e,head:t}=document;e.replaceChild(this.newHead,t),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(const e of this.scriptElements){const t=e.parentNode;if(t){const o=w(e);t.replaceChild(o,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}}class ve extends K{static renderElement(e,t){document.body&&t instanceof HTMLBodyElement?document.body.replaceWith(t):document.documentElement.appendChild(t)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){return this.newSnapshot.isVisitable?this.trackedElementsAreIdentical?void 0:{reason:"tracked_element_mismatch"}:{reason:"turbo_visit_control_is_reload"}}async prepareToRender(){await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}async mergeHead(){const e=this.mergeProvisionalElements(),t=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),await e,await t}async replaceBody(){await this.preservingPermanentElements((async()=>{this.activateNewBody(),await this.assignNewBody()}))}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){const e=[];for(const t of this.newHeadStylesheetElements)e.push(M(t)),document.head.appendChild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(const e of this.newHeadScriptElements)document.head.appendChild(w(e))}async mergeProvisionalElements(){const e=[...this.newHeadProvisionalElements];for(const t of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(t,e)||document.head.removeChild(t);for(const t of e)document.head.appendChild(t)}isCurrentElementInElementList(e,t){for(const[o,n]of t.entries()){if("TITLE"==e.tagName){if("TITLE"!=n.tagName)continue;if(e.innerHTML==n.innerHTML)return t.splice(o,1),!0}if(n.isEqualNode(e))return t.splice(o,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(const e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(const e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(const e of this.newBodyScriptElements){const t=w(e);e.replaceWith(t)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}}class ye{constructor(e){this.keys=[],this.snapshots={},this.size=e}has(e){return y(e)in this.snapshots}get(e){if(this.has(e)){const t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){this.snapshots={}}read(e){return this.snapshots[y(e)]}write(e,t){this.snapshots[y(e)]=t}touch(e){const t=y(e),o=this.keys.indexOf(t);o>-1&&this.keys.splice(o,1),this.keys.unshift(t),this.trim()}trim(){for(const e of this.keys.splice(this.size))delete this.snapshots[e]}}class xe extends Z{constructor(){super(...arguments),this.snapshotCache=new ye(10),this.lastRenderedLocation=new URL(location.href),this.forceReloaded=!1}renderPage(e,t=!1,o=!0,n){const r=new ve(this.snapshot,e,ve.renderElement,t,o);return r.shouldRender?null==n||n.changeHistory():this.forceReloaded=!0,this.render(r)}renderError(e,t){null==t||t.changeHistory();const o=new be(this.snapshot,e,be.renderElement,!1);return this.render(o)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();const{lastRenderedLocation:t}=this;await new Promise((e=>setTimeout((()=>e()),0)));const o=e.clone();return this.snapshotCache.put(t,o),o}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}get snapshot(){return oe.fromElement(this.element)}}class we{constructor(e){this.selector="a[data-turbo-preload]",this.delegate=e}get snapshotCache(){return this.delegate.navigator.view.snapshotCache}start(){if("loading"===document.readyState)return document.addEventListener("DOMContentLoaded",(()=>{this.preloadOnLoadLinksForView(document.body)}));this.preloadOnLoadLinksForView(document.body)}preloadOnLoadLinksForView(e){for(const t of e.querySelectorAll(this.selector))this.preloadURL(t)}async preloadURL(e){const t=new URL(e.href);if(!this.snapshotCache.has(t))try{const e=await fetch(t.toString(),{headers:{"VND.PREFETCH":"true",Accept:"text/html"}}),o=await e.text(),n=oe.fromHTMLString(o);this.snapshotCache.put(t,n)}catch(e){}}}function _e(e){Object.defineProperties(e,Se)}const Se={absoluteURL:{get(){return this.toString()}}};const Ce={after(){this.targetElements.forEach((e=>{var t;return null===(t=e.parentElement)||void 0===t?void 0:t.insertBefore(this.templateContent,e.nextSibling)}))},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach((e=>e.append(this.templateContent)))},before(){this.targetElements.forEach((e=>{var t;return null===(t=e.parentElement)||void 0===t?void 0:t.insertBefore(this.templateContent,e)}))},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach((e=>e.prepend(this.templateContent)))},remove(){this.targetElements.forEach((e=>e.remove()))},replace(){this.targetElements.forEach((e=>e.replaceWith(this.templateContent)))},update(){this.targetElements.forEach((e=>{e.innerHTML="",e.append(this.templateContent)}))}},ke=new class{constructor(){this.navigator=new he(this),this.history=new ue(this),this.preloader=new we(this),this.view=new xe(this,document.documentElement),this.adapter=new le(this),this.pageObserver=new me(this),this.cacheObserver=new ce,this.linkClickObserver=new q(this,window),this.formSubmitObserver=new U(this,document),this.scrollObserver=new pe(this),this.streamObserver=new fe(this),this.formLinkClickObserver=new G(this,document.documentElement),this.frameRedirector=new de(this,document.documentElement),this.streamMessageRenderer=new ge,this.drive=!0,this.enabled=!0,this.progressBarDelay=500,this.started=!1,this.formMode="on"}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){const o=t.frame?document.getElementById(t.frame):null;o instanceof u?(o.src=e.toString(),o.loaded):this.navigator.proposeVisit(h(e),t)}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(z.wrap(e))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){this.progressBarDelay=e}setFormMode(e){this.formMode=e}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}historyPoppedToLocationWithRestorationIdentifier(e,t){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.elementIsNavigatable(e)&&b(t,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}willFollowLinkToLocation(e,t,o){return this.elementIsNavigatable(e)&&b(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t,o)}followedLinkToLocation(e,t){const o=this.getActionForLink(e),n=e.hasAttribute("data-turbo-stream");this.visit(t.href,{action:o,acceptsStreamResponse:n})}allowsVisitingLocationWithAction(e,t){return this.locationWithActionIsSamePage(e,t)||this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){_e(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){e.acceptsStreamResponse||O(document.documentElement),_e(e.location),e.silent||this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){A(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}locationWithActionIsSamePage(e,t){return this.navigator.locationWithActionIsSamePage(e,t)}visitScrolledToSamePageLocation(e,t){this.notifyApplicationAfterVisitingSamePageLocation(e,t)}willSubmitForm(e,t){const o=p(e,t);return this.submissionIsNavigatable(e,t)&&b(h(o),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){var e;(null===(e=this.navigator.currentVisit)||void 0===e?void 0:e.silent)||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){const o=this.notifyApplicationBeforeRender(e,t),{defaultPrevented:n,detail:{render:r}}=o;return this.view.renderer&&r&&(this.view.renderer.renderElement=r),!n}viewRenderedSnapshot(e,t){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender()}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t,o){return!this.notifyApplicationAfterClickingLinkToLocation(e,t,o).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t,o){return _("turbo:click",{target:e,detail:{url:t.href,originalEvent:o},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return _("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return _("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return _("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return _("turbo:before-render",{detail:Object.assign({newBody:e},t),cancelable:!0})}notifyApplicationAfterRender(){return _("turbo:render")}notifyApplicationAfterPageLoad(e={}){return _("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterVisitingSamePageLocation(e,t){dispatchEvent(new HashChangeEvent("hashchange",{oldURL:e.toString(),newURL:t.toString()}))}notifyApplicationAfterFrameLoad(e){return _("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,t){return _("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if("off"==this.formMode)return!1;{const o=!t||this.elementIsNavigatable(t);return"optin"==this.formMode?o&&null!=e.closest('[data-turbo="true"]'):o&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){const t=N(e,"[data-turbo]"),o=N(e,"turbo-frame");return this.drive||o?!t||"false"!=t.getAttribute("data-turbo"):!!t&&"true"==t.getAttribute("data-turbo")}getActionForLink(e){return D(e)||"advance"}get snapshot(){return this.view.snapshot}},Ee=new class{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.setCacheControl("")}exemptPageFromCache(){this.setCacheControl("no-cache")}exemptPageFromPreview(){this.setCacheControl("no-preview")}setCacheControl(e){!function(e,t){let o=L(e);o||(o=document.createElement("meta"),o.setAttribute("name",e),document.head.appendChild(o)),o.setAttribute("content",t)}("turbo-cache-control",e)}}(ke),{navigator:Te}=ke;function Oe(){ke.start()}function Ae(e,t){ke.visit(e,t)}function Me(e){ke.connectStreamSource(e)}function Pe(e){ke.disconnectStreamSource(e)}var De=Object.freeze({__proto__:null,navigator:Te,session:ke,cache:Ee,PageRenderer:ve,PageSnapshot:oe,FrameRenderer:X,start:Oe,registerAdapter:function(e){ke.registerAdapter(e)},visit:Ae,connectStreamSource:Me,disconnectStreamSource:Pe,renderStreamMessage:function(e){ke.renderStreamMessage(e)},clearCache:function(){console.warn("Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),ke.clearCache()},setProgressBarDelay:function(e){ke.setProgressBarDelay(e)},setConfirmMethod:function(e){F.confirmMethod=e},setFormMode:function(e){ke.setFormMode(e)},StreamActions:Ce});class Le extends Error{}function Re(e){if(null!=e){const t=document.getElementById(e);if(t instanceof u)return t}}function Ne(e,t){if(e){const n=e.getAttribute("src");if(null!=n&&null!=t&&(o=t,h(n).href==h(o).href))throw new Error(`Matching <turbo-frame id="${e.id}"> element has a source URL which references itself`);if(e.ownerDocument!==document&&(e=document.importNode(e,!0)),e instanceof u)return e.connectedCallback(),e.disconnectedCallback(),e}var o}class Ie extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){var e;return null!==(e=this.renderPromise)&&void 0!==e?e:this.renderPromise=(async()=>{const e=this.beforeRenderEvent;this.dispatchEvent(e)&&(await S(),await e.detail.render(this))})()}disconnect(){try{this.remove()}catch(e){}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach((e=>e.remove()))}get duplicateChildren(){var e;const t=this.targetElements.flatMap((e=>[...e.children])).filter((e=>!!e.id)),o=[...(null===(e=this.templateContent)||void 0===e?void 0:e.children)||[]].filter((e=>!!e.id)).map((e=>e.id));return t.filter((e=>o.includes(e.id)))}get performAction(){if(this.action){const e=Ce[this.action];if(e)return e;this.raise("unknown action")}this.raise("action attribute is missing")}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.raise("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(null===this.firstElementChild){const e=this.ownerDocument.createElement("template");return this.appendChild(e),e}if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.raise("first child element must be a <template> element")}get action(){return this.getAttribute("action")}get target(){return this.getAttribute("target")}get targets(){return this.getAttribute("targets")}raise(e){throw new Error(`${this.description}: ${e}`)}get description(){var e,t;return null!==(t=(null!==(e=this.outerHTML.match(/<[^>]+>/))&&void 0!==e?e:[])[0])&&void 0!==t?t:"<turbo-stream>"}get beforeRenderEvent(){return new CustomEvent("turbo:before-stream-render",{bubbles:!0,cancelable:!0,detail:{newStream:this,render:Ie.renderElement}})}get targetElementsById(){var e;const t=null===(e=this.ownerDocument)||void 0===e?void 0:e.getElementById(this.target);return null!==t?[t]:[]}get targetElementsByQuery(){var e;const t=null===(e=this.ownerDocument)||void 0===e?void 0:e.querySelectorAll(this.targets);return 0!==t.length?Array.prototype.slice.call(t):[]}}class Be extends HTMLElement{constructor(){super(...arguments),this.streamSource=null}connectedCallback(){this.streamSource=this.src.match(/^ws{1,2}:/)?new WebSocket(this.src):new EventSource(this.src),Me(this.streamSource)}disconnectedCallback(){this.streamSource&&Pe(this.streamSource)}get src(){return this.getAttribute("src")||""}}u.delegateConstructor=class{constructor(e){this.fetchResponseLoaded=e=>{},this.currentFetchRequest=null,this.resolveVisitPromise=()=>{},this.connected=!1,this.hasBeenLoaded=!1,this.ignoredAttributes=new Set,this.action=null,this.visitCachedSnapshot=({element:e})=>{const t=e.querySelector("#"+this.element.id);t&&this.previousFrameElement&&t.replaceChildren(...this.previousFrameElement.children),delete this.previousFrameElement},this.element=e,this.view=new $(this,this.element),this.appearanceObserver=new B(this,this.element),this.formLinkClickObserver=new G(this,this.element),this.linkInterceptor=new W(this,this.element),this.restorationIdentifier=E(),this.formSubmitObserver=new U(this,this.element)}connect(){this.connected||(this.connected=!0,this.loadingStyle==i.lazy?this.appearanceObserver.start():this.loadSourceURL(),this.formLinkClickObserver.start(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconnect(){this.connected&&(this.connected=!1,this.appearanceObserver.stop(),this.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmitObserver.stop())}disabledChanged(){this.loadingStyle==i.eager&&this.loadSourceURL()}sourceURLChanged(){this.isIgnoringChangesTo("src")||(this.element.isConnected&&(this.complete=!1),(this.loadingStyle==i.eager||this.hasBeenLoaded)&&this.loadSourceURL())}sourceURLReloaded(){const{src:e}=this.element;return this.ignoringChangesToAttribute("complete",(()=>{this.element.removeAttribute("complete")})),this.element.src=null,this.element.src=e,this.element.loaded}completeChanged(){this.isIgnoringChangesTo("complete")||this.loadSourceURL()}loadingStyleChanged(){this.loadingStyle==i.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.loadSourceURL())}async loadSourceURL(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&(this.element.loaded=this.visit(h(this.sourceURL)),this.appearanceObserver.stop(),await this.element.loaded,this.hasBeenLoaded=!0)}async loadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=e.response.url);try{const t=await e.responseHTML;if(t){const o=C(t);oe.fromDocument(o).isVisitable?await this.loadFrameResponse(e,o):await this.handleUnvisitableFrameResponse(e)}}finally{this.fetchResponseLoaded=()=>{}}}elementAppearedInViewport(e){this.proposeVisitIfNavigatedWithAction(e,e),this.loadSourceURL()}willSubmitFormLinkToLocation(e){return this.shouldInterceptNavigation(e)}submittedFormLinkToLocation(e,t,o){const n=this.findFrameElement(e);n&&o.setAttribute("data-turbo-frame",n.id)}shouldInterceptLinkClick(e,t,o){return this.shouldInterceptNavigation(e)}linkClickIntercepted(e,t){this.navigateFrame(e,t)}willSubmitForm(e,t){return e.closest("turbo-frame")==this.element&&this.shouldInterceptNavigation(e,t)}formSubmitted(e,t){this.formSubmission&&this.formSubmission.stop(),this.formSubmission=new F(this,e,t);const{fetchRequest:o}=this.formSubmission;this.prepareRequest(o),this.formSubmission.start()}prepareRequest(e){var t;e.headers["Turbo-Frame"]=this.id,(null===(t=this.currentNavigationElement)||void 0===t?void 0:t.hasAttribute("data-turbo-stream"))&&e.acceptResponseType(z.contentType)}requestStarted(e){O(this.element)}requestPreventedHandlingResponse(e,t){this.resolveVisitPromise()}async requestSucceededWithResponse(e,t){await this.loadResponse(t),this.resolveVisitPromise()}async requestFailedWithResponse(e,t){await this.loadResponse(t),this.resolveVisitPromise()}requestErrored(e,t){console.error(t),this.resolveVisitPromise()}requestFinished(e){A(this.element)}formSubmissionStarted({formElement:e}){O(e,this.findFrameElement(e))}formSubmissionSucceededWithResponse(e,t){const o=this.findFrameElement(e.formElement,e.submitter);o.delegate.proposeVisitIfNavigatedWithAction(o,e.formElement,e.submitter),o.delegate.loadResponse(t),e.isSafe||ke.clearCache()}formSubmissionFailedWithResponse(e,t){this.element.delegate.loadResponse(t),ke.clearCache()}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished({formElement:e}){A(e,this.findFrameElement(e))}allowsImmediateRender({element:e},t){const o=_("turbo:before-frame-render",{target:this.element,detail:Object.assign({newFrame:e},t),cancelable:!0}),{defaultPrevented:n,detail:{render:r}}=o;return this.view.renderer&&r&&(this.view.renderer.renderElement=r),!n}viewRenderedSnapshot(e,t){}preloadOnLoadLinksForView(e){ke.preloadOnLoadLinksForView(e)}viewInvalidated(){}willRenderFrame(e,t){this.previousFrameElement=e.cloneNode(!0)}async loadFrameResponse(e,t){const o=await this.extractForeignFrameElement(t.body);if(o){const t=new H(o),n=new X(this,this.view.snapshot,t,X.renderElement,!1,!1);this.view.renderPromise&&await this.view.renderPromise,this.changeHistory(),await this.view.render(n),this.complete=!0,ke.frameRendered(e,this.element),ke.frameLoaded(this.element),this.fetchResponseLoaded(e)}else this.willHandleFrameMissingFromResponse(e)&&this.handleFrameMissingFromResponse(e)}async visit(e){var t;const o=new I(this,s.get,e,new URLSearchParams,this.element);return null===(t=this.currentFetchRequest)||void 0===t||t.cancel(),this.currentFetchRequest=o,new Promise((e=>{this.resolveVisitPromise=()=>{this.resolveVisitPromise=()=>{},this.currentFetchRequest=null,e()},o.perform()}))}navigateFrame(e,t,o){const n=this.findFrameElement(e,o);n.delegate.proposeVisitIfNavigatedWithAction(n,e,o),this.withCurrentNavigationElement(e,(()=>{n.src=t}))}proposeVisitIfNavigatedWithAction(e,t,o){if(this.action=D(o,t,e),this.action){const t=oe.fromElement(e).clone(),{visitCachedSnapshot:o}=e.delegate;e.delegate.fetchResponseLoaded=n=>{if(e.src){const{statusCode:r,redirected:i}=n,s={response:{statusCode:r,redirected:i,responseHTML:e.ownerDocument.documentElement.outerHTML},visitCachedSnapshot:o,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationIdentifier,snapshot:t};this.action&&(s.action=this.action),ke.visit(e.src,s)}}}}changeHistory(){if(this.action){const e=P(this.action);ke.history.update(e,h(this.element.src||""),this.restorationIdentifier)}}async handleUnvisitableFrameResponse(e){console.warn(`The response (${e.statusCode}) from <turbo-frame id="${this.element.id}"> is performing a full page visit due to turbo-visit-control.`),await this.visitResponse(e.response)}willHandleFrameMissingFromResponse(e){this.element.setAttribute("complete","");const t=e.response;return!_("turbo:frame-missing",{target:this.element,detail:{response:t,visit:async(e,t={})=>{e instanceof Response?this.visitResponse(e):ke.visit(e,t)}},cancelable:!0}).defaultPrevented}handleFrameMissingFromResponse(e){this.view.missing(),this.throwFrameMissingError(e)}throwFrameMissingError(e){const t=`The response (${e.statusCode}) did not contain the expected <turbo-frame id="${this.element.id}"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;throw new Le(t)}async visitResponse(e){const t=new x(e),o=await t.responseHTML,{location:n,redirected:r,statusCode:i}=t;return ke.visit(n,{response:{redirected:r,statusCode:i,responseHTML:o}})}findFrameElement(e,t){var o;return null!==(o=Re(T("data-turbo-frame",t,e)||this.element.getAttribute("target")))&&void 0!==o?o:this.element}async extractForeignFrameElement(e){let t;const o=CSS.escape(this.id);try{if(t=Ne(e.querySelector(`turbo-frame#${o}`),this.sourceURL),t)return t;if(t=Ne(e.querySelector(`turbo-frame[src][recurse~=${o}]`),this.sourceURL),t)return await t.loaded,await this.extractForeignFrameElement(t)}catch(e){return console.error(e),new u}return null}formActionIsVisitable(e,t){return b(h(p(e,t)),this.rootLocation)}shouldInterceptNavigation(e,t){const o=T("data-turbo-frame",t,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&&!this.formActionIsVisitable(e,t))return!1;if(!this.enabled||"_top"==o)return!1;if(o){const e=Re(o);if(e)return!e.disabled}return!!ke.elementIsNavigatable(e)&&!(t&&!ke.elementIsNavigatable(t))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}set sourceURL(e){this.ignoringChangesToAttribute("src",(()=>{this.element.src=null!=e?e:null}))}get loadingStyle(){return this.element.loading}get isLoading(){return void 0!==this.formSubmission||void 0!==this.resolveVisitPromise()}get complete(){return this.element.hasAttribute("complete")}set complete(e){this.ignoringChangesToAttribute("complete",(()=>{e?this.element.setAttribute("complete",""):this.element.removeAttribute("complete")}))}get isActive(){return this.element.isActive&&this.connected}get rootLocation(){var e;const t=this.element.ownerDocument.querySelector('meta[name="turbo-root"]');return h(null!==(e=null==t?void 0:t.content)&&void 0!==e?e:"/")}isIgnoringChangesTo(e){return this.ignoredAttributes.has(e)}ignoringChangesToAttribute(e,t){this.ignoredAttributes.add(e),t(),this.ignoredAttributes.delete(e)}withCurrentNavigationElement(e,t){this.currentNavigationElement=e,t(),delete this.currentNavigationElement}},void 0===customElements.get("turbo-frame")&&customElements.define("turbo-frame",u),void 0===customElements.get("turbo-stream")&&customElements.define("turbo-stream",Ie),void 0===customElements.get("turbo-stream-source")&&customElements.define("turbo-stream-source",Be),(()=>{let e=document.currentScript;if(e&&!e.hasAttribute("data-turbo-suppress-warning"))for(e=e.parentElement;e;){if(e==document.body)return console.warn(k`
        You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!

        Load your application’s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.

        For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements

        ——
        Suppress this warning by adding a "data-turbo-suppress-warning" attribute to: %s
      `,e.outerHTML);e=e.parentElement}})(),window.Turbo=De,Oe()},42192:(e,t,o)=>{"use strict";o.d(t,{x:()=>s});var n=o(6599),r=o(97193);function i(e){return e.keys().map((t=>function(e,t){const o=function(e){const t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}(t);if(o)return function(e,t){const o=e.default;if("function"==typeof o)return{identifier:t,controllerConstructor:o}}(e(t),o)}(e,t))).filter((e=>e))}function s(e){const t=n.Mx.start();e&&t.load(i(e));for(const e in r.Z)r.Z.hasOwnProperty(e)&&t.register(e,r.Z[e]);return t}},8273:(e,t,o)=>{"use strict";o.d(t,{I:()=>r});var n=function(){return n=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},r=function(){function e(e,t,o){var r=this;this.endVal=t,this.options=o,this.version="2.6.2",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(e){r.startTime||(r.startTime=e);var t=e-r.startTime;r.remaining=r.duration-t,r.useEasing?r.countDown?r.frameVal=r.startVal-r.easingFn(t,0,r.startVal-r.endVal,r.duration):r.frameVal=r.easingFn(t,r.startVal,r.endVal-r.startVal,r.duration):r.frameVal=r.startVal+(r.endVal-r.startVal)*(t/r.duration);var o=r.countDown?r.frameVal<r.endVal:r.frameVal>r.endVal;r.frameVal=o?r.endVal:r.frameVal,r.frameVal=Number(r.frameVal.toFixed(r.options.decimalPlaces)),r.printValue(r.frameVal),t<r.duration?r.rAF=requestAnimationFrame(r.count):null!==r.finalEndVal?r.update(r.finalEndVal):r.options.onCompleteCallback&&r.options.onCompleteCallback()},this.formatNumber=function(e){var t,o,n,i,s=e<0?"-":"";t=Math.abs(e).toFixed(r.options.decimalPlaces);var a=(t+="").split(".");if(o=a[0],n=a.length>1?r.options.decimal+a[1]:"",r.options.useGrouping){i="";for(var l=3,c=0,d=0,u=o.length;d<u;++d)r.options.useIndianSeparators&&4===d&&(l=2,c=1),0!==d&&c%l==0&&(i=r.options.separator+i),c++,i=o[u-d-1]+i;o=i}return r.options.numerals&&r.options.numerals.length&&(o=o.replace(/[0-9]/g,(function(e){return r.options.numerals[+e]})),n=n.replace(/[0-9]/g,(function(e){return r.options.numerals[+e]}))),s+r.options.prefix+o+n+r.options.suffix},this.easeOutExpo=function(e,t,o,n){return o*(1-Math.pow(2,-10*e/n))*1024/1023+t},this.options=n(n({},this.defaults),o),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(t),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el="string"==typeof e?document.getElementById(e):e,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined","undefined"!=typeof window&&this.options.enableScrollSpy&&(this.error?console.error(this.error,e):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push((function(){return r.handleScroll(r)})),window.onscroll=function(){window.onScrollFns.forEach((function(e){return e()}))},this.handleScroll(this)))}return e.prototype.handleScroll=function(e){if(e&&window&&!e.once){var t=window.innerHeight+window.scrollY,o=e.el.getBoundingClientRect(),n=o.top+window.pageYOffset,r=o.top+o.height+window.pageYOffset;r<t&&r>window.scrollY&&e.paused?(e.paused=!1,setTimeout((function(){return e.start()}),e.options.scrollSpyDelay),e.options.scrollSpyOnce&&(e.once=!0)):(window.scrollY>r||n>t)&&!e.paused&&e.reset()}},e.prototype.determineDirectionAndSmartEasing=function(){var e=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>e;var t=e-this.startVal;if(Math.abs(t)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=e;var o=this.countDown?1:-1;this.endVal=e+o*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=e,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},e.prototype.start=function(e){this.error||(e&&(this.options.onCompleteCallback=e),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},e.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},e.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},e.prototype.update=function(e){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(e),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},e.prototype.printValue=function(e){var t;if(this.el){var o=this.formattingFn(e);(null===(t=this.options.plugin)||void 0===t?void 0:t.render)?this.options.plugin.render(this.el,o):"INPUT"===this.el.tagName?this.el.value=o:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=o:this.el.innerHTML=o}},e.prototype.ensureNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.prototype.validateValue=function(e){var t=Number(e);return this.ensureNumber(t)?t:(this.error="[CountUp] invalid start or end value: ".concat(e),null)},e.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},e}()},70531:function(e,t){!function(e){"use strict";function t(e){for(var t,o,n=1,r=arguments.length;n<r;n++)for(t in o=arguments[n])e[t]=o[t];return e}var o=Object.create||function(e){return n.prototype=e,new n};function n(){}function r(e,t){var o,n=Array.prototype.slice;return e.bind?e.bind.apply(e,n.call(arguments,1)):(o=n.call(arguments,2),function(){return e.apply(t,o.length?o.concat(n.call(arguments)):arguments)})}var i=0;function s(e){return"_leaflet_id"in e||(e._leaflet_id=++i),e._leaflet_id}function a(e,t,o){var n,r,i=function(){n=!1,r&&(s.apply(o,r),r=!1)},s=function(){n?r=arguments:(e.apply(o,arguments),setTimeout(i,t),n=!0)};return s}function l(e,t,o){var n=t[1],r=n-(t=t[0]);return e===n&&o?e:((e-t)%r+r)%r+t}function c(){return!1}function d(e,t){return!1===t?e:(t=Math.pow(10,void 0===t?6:t),Math.round(e*t)/t)}function u(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function h(e){return u(e).split(/\s+/)}function m(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?o(e.options):{}),t)e.options[n]=t[n];return e.options}function p(e,t,o){var n,r=[];for(n in e)r.push(encodeURIComponent(o?n.toUpperCase():n)+"="+encodeURIComponent(e[n]));return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")}var g=/\{ *([\w_ -]+) *\}/g;function f(e,t){return e.replace(g,(function(e,o){if(void 0===(o=t[o]))throw new Error("No value provided for variable "+e);return"function"==typeof o?o(t):o}))}var b=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function v(e,t){for(var o=0;o<e.length;o++)if(e[o]===t)return o;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var w=0;function _(e){var t=+new Date,o=Math.max(0,16-(t-w));return w=t+o,window.setTimeout(e,o)}var S=window.requestAnimationFrame||x("RequestAnimationFrame")||_,C=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function k(e,t,o){if(!o||S!==_)return S.call(window,r(e,t));e.call(t)}function E(e){e&&C.call(window,e)}var T={__proto__:null,extend:t,create:o,bind:r,get lastId(){return i},stamp:s,throttle:a,wrapNum:l,falseFn:c,formatNum:d,trim:u,splitWords:h,setOptions:m,getParamString:p,template:f,isArray:b,indexOf:v,emptyImageUrl:y,requestFn:S,cancelFn:C,requestAnimFrame:k,cancelAnimFrame:E};function O(){}O.extend=function(e){function n(){m(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var r,i=n.__super__=this.prototype,s=o(i);for(r in(s.constructor=n).prototype=s,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);if(e.statics&&t(n,e.statics),e.includes){var a=e.includes;if("undefined"!=typeof L&&L&&L.Mixin){a=b(a)?a:[a];for(var l=0;l<a.length;l++)a[l]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}t.apply(null,[s].concat(e.includes))}return t(s,e),delete s.statics,delete s.includes,s.options&&(s.options=i.options?o(i.options):{},t(s.options,e.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=s._initHooks.length;e<t;e++)s._initHooks[e].call(this)}},n},O.include=function(e){var o=this.prototype.options;return t(this.prototype,e),e.options&&(this.prototype.options=o,this.mergeOptions(e.options)),this},O.mergeOptions=function(e){return t(this.prototype.options,e),this},O.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),o="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(o),this};var A={on:function(e,t,o){if("object"==typeof e)for(var n in e)this._on(n,e[n],t);else for(var r=0,i=(e=h(e)).length;r<i;r++)this._on(e[r],t,o);return this},off:function(e,t,o){if(arguments.length)if("object"==typeof e)for(var n in e)this._off(n,e[n],t);else{e=h(e);for(var r=1===arguments.length,i=0,s=e.length;i<s;i++)r?this._off(e[i]):this._off(e[i],t,o)}else delete this._events;return this},_on:function(e,t,o,n){"function"!=typeof t?console.warn("wrong listener type: "+typeof t):!1===this._listens(e,t,o)&&(t={fn:t,ctx:o=o===this?void 0:o},n&&(t.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t))},_off:function(e,t,o){var n,r,i;if(this._events&&(n=this._events[e]))if(1===arguments.length){if(this._firingCount)for(r=0,i=n.length;r<i;r++)n[r].fn=c;delete this._events[e]}else"function"!=typeof t?console.warn("wrong listener type: "+typeof t):!1!==(t=this._listens(e,t,o))&&(o=n[t],this._firingCount&&(o.fn=c,this._events[e]=n=n.slice()),n.splice(t,1))},fire:function(e,o,n){if(this.listens(e,n)){var r=t({},o,{type:e,target:this,sourceTarget:o&&o.sourceTarget||this});if(this._events){var i=this._events[e];if(i){this._firingCount=this._firingCount+1||1;for(var s=0,a=i.length;s<a;s++){var l=i[s],c=l.fn;l.once&&this.off(e,c,l.ctx),c.call(l.ctx||this,r)}this._firingCount--}}n&&this._propagateEvent(r)}return this},listens:function(e,t,o,n){"string"!=typeof e&&console.warn('"string" type argument expected');var r=t,i=("function"!=typeof t&&(n=!!t,o=r=void 0),this._events&&this._events[e]);if(i&&i.length&&!1!==this._listens(e,r,o))return!0;if(n)for(var s in this._eventParents)if(this._eventParents[s].listens(e,t,o,n))return!0;return!1},_listens:function(e,t,o){if(this._events){var n=this._events[e]||[];if(!t)return!!n.length;o===this&&(o=void 0);for(var r=0,i=n.length;r<i;r++)if(n[r].fn===t&&n[r].ctx===o)return r}return!1},once:function(e,t,o){if("object"==typeof e)for(var n in e)this._on(n,e[n],t,!0);else for(var r=0,i=(e=h(e)).length;r<i;r++)this._on(e[r],t,o,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[s(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[s(e)],this},_propagateEvent:function(e){for(var o in this._eventParents)this._eventParents[o].fire(e.type,t({layer:e.target,propagatedFrom:e.target},e),!0)}},M=(A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens,O.extend(A));function P(e,t,o){this.x=o?Math.round(e):e,this.y=o?Math.round(t):t}var D=Math.trunc||function(e){return 0<e?Math.floor(e):Math.ceil(e)};function R(e,t,o){return e instanceof P?e:b(e)?new P(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new P(e.x,e.y):new P(e,t,o)}function N(e,t){if(e)for(var o=t?[e,t]:e,n=0,r=o.length;n<r;n++)this.extend(o[n])}function I(e,t){return!e||e instanceof N?e:new N(e,t)}function B(e,t){if(e)for(var o=t?[e,t]:e,n=0,r=o.length;n<r;n++)this.extend(o[n])}function z(e,t){return e instanceof B?e:new B(e,t)}function F(e,t,o){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==o&&(this.alt=+o)}function H(e,t,o){return e instanceof F?e:b(e)&&"object"!=typeof e[0]?3===e.length?new F(e[0],e[1],e[2]):2===e.length?new F(e[0],e[1]):null:null==e?e:"object"==typeof e&&"lat"in e?new F(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new F(e,t,o)}P.prototype={clone:function(){return new P(this.x,this.y)},add:function(e){return this.clone()._add(R(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(R(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new P(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new P(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=D(this.x),this.y=D(this.y),this},distanceTo:function(e){var t=(e=R(e)).x-this.x;return e=e.y-this.y,Math.sqrt(t*t+e*e)},equals:function(e){return(e=R(e)).x===this.x&&e.y===this.y},contains:function(e){return e=R(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+d(this.x)+", "+d(this.y)+")"}},N.prototype={extend:function(e){var t,o;if(e){if(e instanceof P||"number"==typeof e[0]||"x"in e)t=o=R(e);else if(t=(e=I(e)).min,o=e.max,!t||!o)return this;this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(o.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(o.y,this.max.y)):(this.min=t.clone(),this.max=o.clone())}return this},getCenter:function(e){return R((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return R(this.min.x,this.max.y)},getTopRight:function(){return R(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,o;return(e=("number"==typeof e[0]||e instanceof P?R:I)(e))instanceof N?(t=e.min,o=e.max):t=o=e,t.x>=this.min.x&&o.x<=this.max.x&&t.y>=this.min.y&&o.y<=this.max.y},intersects:function(e){e=I(e);var t=this.min,o=this.max,n=e.min,r=(e=e.max).x>=t.x&&n.x<=o.x;return e=e.y>=t.y&&n.y<=o.y,r&&e},overlaps:function(e){e=I(e);var t=this.min,o=this.max,n=e.min,r=(e=e.max).x>t.x&&n.x<o.x;return e=e.y>t.y&&n.y<o.y,r&&e},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,o=this.max,n=Math.abs(t.x-o.x)*e;return e=Math.abs(t.y-o.y)*e,I(R(t.x-n,t.y-e),R(o.x+n,o.y+e))},equals:function(e){return!!e&&(e=I(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},B.prototype={extend:function(e){var t,o,n=this._southWest,r=this._northEast;if(e instanceof F)o=t=e;else{if(!(e instanceof B))return e?this.extend(H(e)||z(e)):this;if(t=e._southWest,o=e._northEast,!t||!o)return this}return n||r?(n.lat=Math.min(t.lat,n.lat),n.lng=Math.min(t.lng,n.lng),r.lat=Math.max(o.lat,r.lat),r.lng=Math.max(o.lng,r.lng)):(this._southWest=new F(t.lat,t.lng),this._northEast=new F(o.lat,o.lng)),this},pad:function(e){var t=this._southWest,o=this._northEast,n=Math.abs(t.lat-o.lat)*e;return e=Math.abs(t.lng-o.lng)*e,new B(new F(t.lat-n,t.lng-e),new F(o.lat+n,o.lng+e))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e=("number"==typeof e[0]||e instanceof F||"lat"in e?H:z)(e);var t,o,n=this._southWest,r=this._northEast;return e instanceof B?(t=e.getSouthWest(),o=e.getNorthEast()):t=o=e,t.lat>=n.lat&&o.lat<=r.lat&&t.lng>=n.lng&&o.lng<=r.lng},intersects:function(e){e=z(e);var t=this._southWest,o=this._northEast,n=e.getSouthWest(),r=(e=e.getNorthEast()).lat>=t.lat&&n.lat<=o.lat;return e=e.lng>=t.lng&&n.lng<=o.lng,r&&e},overlaps:function(e){e=z(e);var t=this._southWest,o=this._northEast,n=e.getSouthWest(),r=(e=e.getNorthEast()).lat>t.lat&&n.lat<o.lat;return e=e.lng>t.lng&&n.lng<o.lng,r&&e},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=z(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}};var j={latLngToPoint:function(e,t){return e=this.projection.project(e),t=this.scale(t),this.transformation._transform(e,t)},pointToLatLng:function(e,t){return t=this.scale(t),e=this.transformation.untransform(e,t),this.projection.unproject(e)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){var t;return this.infinite?null:(t=this.projection.bounds,e=this.scale(e),new N(this.transformation.transform(t.min,e),this.transformation.transform(t.max,e)))},infinite:!(F.prototype={equals:function(e,t){return!!e&&(e=H(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+d(this.lat,e)+", "+d(this.lng,e)+")"},distanceTo:function(e){return V.distance(this,H(e))},wrap:function(){return V.wrapLatLng(this)},toBounds:function(e){var t=(e=180*e/40075017)/Math.cos(Math.PI/180*this.lat);return z([this.lat-e,this.lng-t],[this.lat+e,this.lng+t])},clone:function(){return new F(this.lat,this.lng,this.alt)}}),wrapLatLng:function(e){var t=this.wrapLng?l(e.lng,this.wrapLng,!0):e.lng;return new F(this.wrapLat?l(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),o=this.wrapLatLng(t),n=t.lat-o.lat;return t=t.lng-o.lng,0==n&&0==t?e:(o=e.getSouthWest(),e=e.getNorthEast(),new B(new F(o.lat-n,o.lng-t),new F(e.lat-n,e.lng-t)))}},V=t({},j,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var o=Math.PI/180,n=e.lat*o,r=t.lat*o,i=Math.sin((t.lat-e.lat)*o/2);return t=Math.sin((t.lng-e.lng)*o/2),e=i*i+Math.cos(n)*Math.cos(r)*t*t,o=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e)),this.R*o}}),U={R:U=6378137,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,o=this.MAX_LATITUDE;return o=Math.max(Math.min(o,e.lat),-o),o=Math.sin(o*t),new P(this.R*e.lng*t,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(e){var t=180/Math.PI;return new F((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:new N([-(U*=Math.PI),-U],[U,U])};function Z(e,t,o,n){b(e)?(this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3]):(this._a=e,this._b=t,this._c=o,this._d=n)}function $(e,t,o,n){return new Z(e,t,o,n)}Z.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return e.x=(t=t||1)*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return new P((e.x/(t=t||1)-this._b)/this._a,(e.y/t-this._d)/this._c)}};var W=t({},V,{code:"EPSG:3857",projection:U,transformation:$(W=.5/(Math.PI*U.R),.5,-W,.5)}),q=t({},W,{code:"EPSG:900913"});function G(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Y(e,t){for(var o,n,r,i,s="",a=0,l=e.length;a<l;a++){for(o=0,n=(r=e[a]).length;o<n;o++)s+=(o?"L":"M")+(i=r[o]).x+" "+i.y;s+=t?Oe.svg?"z":"x":""}return s||"M0 0"}var K=document.documentElement.style,X="ActiveXObject"in window,J=X&&!document.addEventListener,Q="msLaunchUri"in navigator&&!("documentMode"in document),ee=Te("webkit"),te=Te("android"),oe=Te("android 2")||Te("android 3"),ne=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),re=(ne=te&&Te("Google")&&ne<537&&!("AudioNode"in window),!!window.opera),ie=!Q&&Te("chrome"),se=Te("gecko")&&!ee&&!re&&!X,ae=!ie&&Te("safari"),le=Te("phantom"),ce="OTransition"in K,de=0===navigator.platform.indexOf("Win"),ue=X&&"transition"in K,he="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!oe,me=(K="MozPerspective"in K,!window.L_DISABLE_3D&&(ue||he||K)&&!ce&&!le),pe=(Yo="undefined"!=typeof orientation||Te("mobile"))&&ee,ge=Yo&&he,fe=!window.PointerEvent&&window.MSPointerEvent,be=!(!window.PointerEvent&&!fe),ve="ontouchstart"in window||!!window.TouchEvent,ye=!window.L_NO_TOUCH&&(ve||be),xe=Yo&&re,we=Yo&&se,_e=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Se=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",c,t),window.removeEventListener("testPassiveEventSupport",c,t)}catch(e){}return e}(),Ce=!!document.createElement("canvas").getContext,ke=!(!document.createElementNS||!G("svg").createSVGRect),Ee=!!ke&&((Ee=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Ee.firstChild&&Ee.firstChild.namespaceURI));function Te(e){return 0<=navigator.userAgent.toLowerCase().indexOf(e)}var Oe={ie:X,ielt9:J,edge:Q,webkit:ee,android:te,android23:oe,androidStock:ne,opera:re,chrome:ie,gecko:se,safari:ae,phantom:le,opera12:ce,win:de,ie3d:ue,webkit3d:he,gecko3d:K,any3d:me,mobile:Yo,mobileWebkit:pe,mobileWebkit3d:ge,msPointer:fe,pointer:be,touch:ye,touchNative:ve,mobileOpera:xe,mobileGecko:we,retina:_e,passiveEvents:Se,canvas:Ce,svg:ke,vml:!ke&&function(){try{var e=document.createElement("div"),t=(e.innerHTML='<v:shape adj="1"/>',e.firstChild);return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}(),inlineSvg:Ee,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ae=Oe.msPointer?"MSPointerDown":"pointerdown",Me=Oe.msPointer?"MSPointerMove":"pointermove",Pe=Oe.msPointer?"MSPointerUp":"pointerup",De=Oe.msPointer?"MSPointerCancel":"pointercancel",Le={touchstart:Ae,touchmove:Me,touchend:Pe,touchcancel:De},Re={touchstart:function(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Dt(t),je(e,t)},touchmove:je,touchend:je,touchcancel:je},Ne={},Ie=!1;function Be(e,t,o){return"touchstart"!==t||Ie||(document.addEventListener(Ae,ze,!0),document.addEventListener(Me,Fe,!0),document.addEventListener(Pe,He,!0),document.addEventListener(De,He,!0),Ie=!0),Re[t]?(o=Re[t].bind(this,o),e.addEventListener(Le[t],o,!1),o):(console.warn("wrong event specified:",t),c)}function ze(e){Ne[e.pointerId]=e}function Fe(e){Ne[e.pointerId]&&(Ne[e.pointerId]=e)}function He(e){delete Ne[e.pointerId]}function je(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var o in t.touches=[],Ne)t.touches.push(Ne[o]);t.changedTouches=[t],e(t)}}var Ve=200;function Ue(e,t){e.addEventListener("dblclick",t);var o,n=0;function r(e){var r;1!==e.detail?o=e.detail:"mouse"===e.pointerType||e.sourceCapabilities&&!e.sourceCapabilities.firesTouchEvents||(r=Rt(e)).some((function(e){return e instanceof HTMLLabelElement&&e.attributes.for}))&&!r.some((function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement}))||((r=Date.now())-n<=Ve?2==++o&&t(function(e){var t,o,n={};for(o in e)t=e[o],n[o]=t&&t.bind?t.bind(e):t;return(e=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(e)):o=1,n=r)}return e.addEventListener("click",r),{dblclick:t,simDblclick:r}}var Ze,$e,We,qe,Ge,Ye,Ke=ht(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Xe=ht(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Je="webkitTransition"===Xe||"OTransition"===Xe?Xe+"End":"transitionend";function Qe(e){return"string"==typeof e?document.getElementById(e):e}function et(e,t){var o=e.style[t]||e.currentStyle&&e.currentStyle[t];return"auto"===(o=o&&"auto"!==o||!document.defaultView?o:(e=document.defaultView.getComputedStyle(e,null))?e[t]:null)?null:o}function tt(e,t,o){return(e=document.createElement(e)).className=t||"",o&&o.appendChild(e),e}function ot(e){var t=e.parentNode;t&&t.removeChild(e)}function nt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function rt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function it(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function st(e,t){return void 0!==e.classList?e.classList.contains(t):0<(e=dt(e)).length&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e)}function at(e,t){var o;if(void 0!==e.classList)for(var n=h(t),r=0,i=n.length;r<i;r++)e.classList.add(n[r]);else st(e,t)||ct(e,((o=dt(e))?o+" ":"")+t)}function lt(e,t){void 0!==e.classList?e.classList.remove(t):ct(e,u((" "+dt(e)+" ").replace(" "+t+" "," ")))}function ct(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function dt(e){return void 0===(e=e.correspondingElement?e.correspondingElement:e).className.baseVal?e.className:e.className.baseVal}function ut(e,t){if("opacity"in e.style)e.style.opacity=t;else if("filter"in e.style){var o=!1,n="DXImageTransform.Microsoft.Alpha";try{o=e.filters.item(n)}catch(e){if(1===t)return}t=Math.round(100*t),o?(o.Enabled=100!==t,o.Opacity=t):e.style.filter+=" progid:"+n+"(opacity="+t+")"}}function ht(e){for(var t=document.documentElement.style,o=0;o<e.length;o++)if(e[o]in t)return e[o];return!1}function mt(e,t,o){t=t||new P(0,0),e.style[Ke]=(Oe.ie3d?"translate("+t.x+"px,"+t.y+"px)":"translate3d("+t.x+"px,"+t.y+"px,0)")+(o?" scale("+o+")":"")}function pt(e,t){e._leaflet_pos=t,Oe.any3d?mt(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function gt(e){return e._leaflet_pos||new P(0,0)}function ft(){_t(window,"dragstart",Dt)}function bt(){Ct(window,"dragstart",Dt)}function vt(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(yt(),Ye=(Ge=e).style.outline,e.style.outline="none",_t(window,"keydown",yt))}function yt(){Ge&&(Ge.style.outline=Ye,Ye=Ge=void 0,Ct(window,"keydown",yt))}function xt(e){for(;!((e=e.parentNode).offsetWidth&&e.offsetHeight||e===document.body););return e}function wt(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}function _t(e,t,o,n){if(t&&"object"==typeof t)for(var r in t)Tt(e,r,t[r],o);else for(var i=0,s=(t=h(t)).length;i<s;i++)Tt(e,t[i],o,n);return this}qe="onselectstart"in document?(We=function(){_t(window,"selectstart",Dt)},function(){Ct(window,"selectstart",Dt)}):($e=ht(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),We=function(){var e;$e&&(e=document.documentElement.style,Ze=e[$e],e[$e]="none")},function(){$e&&(document.documentElement.style[$e]=Ze,Ze=void 0)}),X={__proto__:null,TRANSFORM:Ke,TRANSITION:Xe,TRANSITION_END:Je,get:Qe,getStyle:et,create:tt,remove:ot,empty:nt,toFront:rt,toBack:it,hasClass:st,addClass:at,removeClass:lt,setClass:ct,getClass:dt,setOpacity:ut,testProp:ht,setTransform:mt,setPosition:pt,getPosition:gt,get disableTextSelection(){return We},get enableTextSelection(){return qe},disableImageDrag:ft,enableImageDrag:bt,preventOutline:vt,restoreOutline:yt,getSizedParentNode:xt,getScale:wt};var St="_leaflet_events";function Ct(e,t,o,n){if(1===arguments.length)kt(e),delete e[St];else if(t&&"object"==typeof t)for(var r in t)Ot(e,r,t[r],o);else if(t=h(t),2===arguments.length)kt(e,(function(e){return-1!==v(t,e)}));else for(var i=0,s=t.length;i<s;i++)Ot(e,t[i],o,n);return this}function kt(e,t){for(var o in e[St]){var n=o.split(/\d/)[0];t&&!t(n)||Ot(e,n,null,null,o)}}var Et={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Tt(e,t,o,n){var r,i,a=t+s(o)+(n?"_"+s(n):"");e[St]&&e[St][a]||(i=r=function(t){return o.call(n||e,t||window.event)},!Oe.touchNative&&Oe.pointer&&0===t.indexOf("touch")?r=Be(e,t,r):Oe.touch&&"dblclick"===t?r=Ue(e,r):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(Et[t]||t,r,!!Oe.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?e.addEventListener(Et[t],r=function(t){t=t||window.event,zt(e,t)&&i(t)},!1):e.addEventListener(t,i,!1):e.attachEvent("on"+t,r),e[St]=e[St]||{},e[St][a]=r)}function Ot(e,t,o,n,r){var i,a;r=r||t+s(o)+(n?"_"+s(n):""),(o=e[St]&&e[St][r])&&(!Oe.touchNative&&Oe.pointer&&0===t.indexOf("touch")?(n=e,a=o,Le[i=t]?n.removeEventListener(Le[i],a,!1):console.warn("wrong event specified:",i)):Oe.touch&&"dblclick"===t?(n=o,(a=e).removeEventListener("dblclick",n.dblclick),a.removeEventListener("click",n.simDblclick)):"removeEventListener"in e?e.removeEventListener(Et[t]||t,o,!1):e.detachEvent("on"+t,o),e[St][r]=null)}function At(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Mt(e){return Tt(e,"wheel",At),this}function Pt(e){return _t(e,"mousedown touchstart dblclick contextmenu",At),e._leaflet_disable_click=!0,this}function Dt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Lt(e){return Dt(e),At(e),this}function Rt(e){if(e.composedPath)return e.composedPath();for(var t=[],o=e.target;o;)t.push(o),o=o.parentNode;return t}function Nt(e,t){var o,n;return t?(n=(o=wt(t)).boundingClientRect,new P((e.clientX-n.left)/o.x-t.clientLeft,(e.clientY-n.top)/o.y-t.clientTop)):new P(e.clientX,e.clientY)}var It=Oe.linux&&Oe.chrome?window.devicePixelRatio:Oe.mac?3*window.devicePixelRatio:0<window.devicePixelRatio?2*window.devicePixelRatio:1;function Bt(e){return Oe.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/It:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function zt(e,t){var o=t.relatedTarget;if(!o)return!0;try{for(;o&&o!==e;)o=o.parentNode}catch(e){return!1}return o!==e}J={__proto__:null,on:_t,off:Ct,stopPropagation:At,disableScrollPropagation:Mt,disableClickPropagation:Pt,preventDefault:Dt,stop:Lt,getPropagationPath:Rt,getMousePosition:Nt,getWheelDelta:Bt,isExternalTarget:zt,addListener:_t,removeListener:Ct};var Ft=M.extend({run:function(e,t,o,n){this.stop(),this._el=e,this._inProgress=!0,this._duration=o||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=gt(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=k(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,o=1e3*this._duration;t<o?this._runFrame(this._easeOut(t/o),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){e=this._startPos.add(this._offset.multiplyBy(e)),t&&e._round(),pt(this._el,e),this.fire("step")},_complete:function(){E(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),Ht=M.extend({options:{crs:W,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=m(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom)),t.center&&void 0!==t.zoom&&this.setView(H(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Xe&&Oe.any3d&&!Oe.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),_t(this._proxy,Je,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,o,n){return o=void 0===o?this._zoom:this._limitZoom(o),e=this._limitCenter(H(e),o,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=t({animate:n.animate},n.zoom),n.pan=t({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==o?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,o,n.zoom):this._tryAnimatedPan(e,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,o,n.pan&&n.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(Oe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(Oe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,o){var n=this.getZoomScale(t),r=this.getSize().divideBy(2);return e=(e instanceof P?e:this.latLngToContainerPoint(e)).subtract(r).multiplyBy(1-1/n),n=this.containerPointToLatLng(r.add(e)),this.setView(n,t,{zoom:o})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():z(e);var o=R(t.paddingTopLeft||t.padding||[0,0]),n=R(t.paddingBottomRight||t.padding||[0,0]),r=this.getBoundsZoom(e,!1,o.add(n));return(r="number"==typeof t.maxZoom?Math.min(t.maxZoom,r):r)===1/0?{center:e.getCenter(),zoom:r}:(t=n.subtract(o).divideBy(2),n=this.project(e.getSouthWest(),r),o=this.project(e.getNorthEast(),r),{center:this.unproject(n.add(o).divideBy(2).add(t),r),zoom:r})},fitBounds:function(e,t){if((e=z(e)).isValid())return e=this._getBoundsCenterZoom(e,t),this.setView(e.center,e.zoom,t);throw new Error("Bounds are not valid.")},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){var o;return t=t||{},(e=R(e).round()).x||e.y?(!0===t.animate||this.getSize().contains(e)?(this._panAnim||(this._panAnim=new Ft,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate?(at(this._mapPane,"leaflet-pan-anim"),o=this._getMapPanePos().subtract(e).round(),this._panAnim.run(this._mapPane,o,t.duration||.25,t.easeLinearity)):(this._rawPanBy(e),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this):this.fire("moveend")},flyTo:function(e,t,o){if(!1===(o=o||{}).animate||!Oe.any3d)return this.setView(e,t,o);this._stop();var n=this.project(this.getCenter()),r=this.project(e),i=this.getSize(),s=this._zoom,a=(e=H(e),t=void 0===t?s:t,Math.max(i.x,i.y)),l=a*this.getZoomScale(s,t),c=r.distanceTo(n)||1,d=1.42,u=d*d;function h(e){return e=(l*l-a*a+(e?-1:1)*u*u*c*c)/(2*(e?l:a)*u*c),(e=Math.sqrt(e*e+1)-e)<1e-9?-18:Math.log(e)}function m(e){return(Math.exp(e)-Math.exp(-e))/2}function p(e){return(Math.exp(e)+Math.exp(-e))/2}var g=h(0);function f(e){return a*(p(g)*(m(e=g+d*e)/p(e))-m(g))/u}var b=Date.now(),v=(h(1)-g)/d,y=o.duration?1e3*o.duration:1e3*v*.8;return this._moveStart(!0,o.noMoveStart),function o(){var i=(Date.now()-b)/y,l=(1-Math.pow(1-i,1.5))*v;i<=1?(this._flyToFrame=k(o,this),this._move(this.unproject(n.add(r.subtract(n).multiplyBy(f(l)/c)),s),this.getScaleZoom(a/(i=l,a*(p(g)/p(g+d*i))),s),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}.call(this),this},flyToBounds:function(e,t){return e=this._getBoundsCenterZoom(e,t),this.flyTo(e.center,e.zoom,t)},setMaxBounds:function(e){return e=z(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var o=this.getCenter();return e=this._limitCenter(o,this._zoom,z(e)),o.equals(e)||this.panTo(e,t),this._enforcingBounds=!1,this},panInside:function(e,t){var o=R((t=t||{}).paddingTopLeft||t.padding||[0,0]),n=R(t.paddingBottomRight||t.padding||[0,0]),r=this.project(this.getCenter()),i=(e=this.project(e),(o=I([(i=this.getPixelBounds()).min.add(o),i.max.subtract(n)])).getSize());return o.contains(e)||(this._enforcingBounds=!0,n=e.subtract(o.getCenter()),o=o.extend(e).getSize().subtract(i),r.x+=n.x<0?-o.x:o.x,r.y+=n.y<0?-o.y:o.y,this.panTo(this.unproject(r),t),this._enforcingBounds=!1),this},invalidateSize:function(e){if(!this._loaded)return this;e=t({animate:!1,pan:!0},!0===e?{animate:!0}:e);var o=this.getSize(),n=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),i=o.divideBy(2).round(),s=n.divideBy(2).round();return(i=i.subtract(s)).x||i.y?(e.animate&&e.pan?this.panBy(i):(e.pan&&this._rawPanBy(i),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:o,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){var o,n;return e=this._locateOptions=t({timeout:1e4,watch:!1},e),"geolocation"in navigator?(o=r(this._handleGeolocationResponse,this),n=r(this._handleGeolocationError,this),e.watch?this._locationWatchId=navigator.geolocation.watchPosition(o,n,e):navigator.geolocation.getCurrentPosition(o,n,e)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){var t;this._container._leaflet_id&&(t=e.code,e=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+e+"."}))},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t,o,n=new F(e.coords.latitude,e.coords.longitude),r=n.toBounds(2*e.coords.accuracy),i=this._locateOptions,s=(i.setView&&(t=this.getBoundsZoom(r),this.setView(n,i.maxZoom?Math.min(t,i.maxZoom):t)),{latlng:n,bounds:r,timestamp:e.timestamp});for(o in e.coords)"number"==typeof e.coords[o]&&(s[o]=e.coords[o]);this.fire("locationfound",s)}},addHandler:function(e,t){return t&&(t=this[e]=new t(this),this._handlers.push(t),this.options[e]&&t.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}for(var e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ot(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)ot(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){return t=tt("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane),e&&(this._panes[e]=t),t},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new B(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,o){e=z(e),o=R(o||[0,0]);var n=this.getZoom()||0,r=this.getMinZoom(),i=this.getMaxZoom(),s=e.getNorthWest(),a=(e=e.getSouthEast(),o=this.getSize().subtract(o),e=I(this.project(e,n),this.project(s,n)).getSize(),s=Oe.any3d?this.options.zoomSnap:1,o.x/e.x);return o=o.y/e.y,e=t?Math.max(a,o):Math.min(a,o),n=this.getScaleZoom(e,n),s&&(n=Math.round(n/(s/100))*(s/100),n=t?Math.ceil(n/s)*s:Math.floor(n/s)*s),Math.max(r,Math.min(i,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new P(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){return new N(e=this._getTopLeftPoint(e,t),e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var o=this.options.crs;return t=void 0===t?this._zoom:t,o.scale(e)/o.scale(t)},getScaleZoom:function(e,t){var o=this.options.crs;return t=void 0===t?this._zoom:t,e=o.zoom(e*o.scale(t)),isNaN(e)?1/0:e},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(H(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(R(e),t)},layerPointToLatLng:function(e){return e=R(e).add(this.getPixelOrigin()),this.unproject(e)},latLngToLayerPoint:function(e){return this.project(H(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(H(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(z(e))},distance:function(e,t){return this.options.crs.distance(H(e),H(t))},containerPointToLayerPoint:function(e){return R(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return R(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){return e=this.containerPointToLayerPoint(R(e)),this.layerPointToLatLng(e)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(H(e)))},mouseEventToContainerPoint:function(e){return Nt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){if(!(e=this._container=Qe(e)))throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");_t(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var e=this._container,t=(this._fadeAnimated=this.options.fadeAnimation&&Oe.any3d,at(e,"leaflet-container"+(Oe.touch?" leaflet-touch":"")+(Oe.retina?" leaflet-retina":"")+(Oe.ielt9?" leaflet-oldie":"")+(Oe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),et(e,"position"));"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),pt(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(at(e.markerPane,"leaflet-zoom-hide"),at(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,o){pt(this._mapPane,new P(0,0));var n=!this._loaded,r=(this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset"),this._zoom!==t);this._moveStart(r,o)._move(e,t)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,o,n){void 0===t&&(t=this._zoom);var r=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),n?o&&o.pinch&&this.fire("zoom",o):((r||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){pt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={};var t=e?Ct:_t;t((this._targets[s(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Oe.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=k((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var o,n=[],r="mouseout"===t||"mouseover"===t,i=e.target||e.srcElement,a=!1;i;){if((o=this._targets[s(i)])&&("click"===t||"preclick"===t)&&this._draggableMoved(o)){a=!0;break}if(o&&o.listens(t,!0)){if(r&&!zt(i,e))break;if(n.push(o),r)break}if(i===this._container)break;i=i.parentNode}return n.length||a||r||!this.listens(t,!0)?n:[this]},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t,o=e.target||e.srcElement;!this._loaded||o._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(o)||("mousedown"===(t=e.type)&&vt(o),this._fireDOMEvent(e,t))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,o,n){"click"===e.type&&((l=t({},e)).type="preclick",this._fireDOMEvent(l,l.type,n));var r=this._findEventTargets(e,o);if(n){for(var i=[],s=0;s<n.length;s++)n[s].listens(o,!0)&&i.push(n[s]);r=i.concat(r)}if(r.length){"contextmenu"===o&&Dt(e);var a,l=r[0],c={originalEvent:e};for("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type&&(a=l.getLatLng&&(!l._radius||l._radius<=10),c.containerPoint=a?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(e),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=a?l.getLatLng():this.layerPointToLatLng(c.layerPoint)),s=0;s<r.length;s++)if(r[s].fire(o,c,!0),c.originalEvent._stopped||!1===r[s].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,o))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return gt(this._mapPane)||new P(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var o=this.getSize()._divideBy(2);return this.project(e,t)._subtract(o)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,o){return o=this._getNewPixelOrigin(o,t),this.project(e,t)._subtract(o)},_latLngBoundsToNewLayerBounds:function(e,t,o){return o=this._getNewPixelOrigin(o,t),I([this.project(e.getSouthWest(),t)._subtract(o),this.project(e.getNorthWest(),t)._subtract(o),this.project(e.getSouthEast(),t)._subtract(o),this.project(e.getNorthEast(),t)._subtract(o)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,o){var n,r;return!o||(n=this.project(e,t),r=this.getSize().divideBy(2),r=new N(n.subtract(r),n.add(r)),r=this._getBoundsOffset(r,o,t),Math.abs(r.x)<=1&&Math.abs(r.y)<=1)?e:this.unproject(n.add(r),t)},_limitOffset:function(e,t){var o;return t?(o=new N((o=this.getPixelBounds()).min.add(e),o.max.add(e)),e.add(this._getBoundsOffset(o,t))):e},_getBoundsOffset:function(e,t,o){return o=(t=I(this.project(t.getNorthEast(),o),this.project(t.getSouthWest(),o))).min.subtract(e.min),t=t.max.subtract(e.max),new P(this._rebound(o.x,-t.x),this._rebound(o.y,-t.y))},_rebound:function(e,t){return 0<e+t?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),o=this.getMaxZoom(),n=Oe.any3d?this.options.zoomSnap:1;return n&&(e=Math.round(e/n)*n),Math.max(t,Math.min(o,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){lt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){return e=this._getCenterOffset(e)._trunc(),!(!0!==(t&&t.animate)&&!this.getSize().contains(e)||(this.panBy(e,t),0))},_createAnimProxy:function(){var e=this._proxy=tt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",(function(e){var t=Ke,o=this._proxy.style[t];mt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),o===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ot(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();mt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&0<=e.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,o){if(!this._animatingZoom){if(o=o||{},!this._zoomAnimated||!1===o.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(t);if(n=this._getCenterOffset(e)._divideBy(1-1/n),!0!==o.animate&&!this.getSize().contains(n))return!1;k((function(){this._moveStart(!0,!1)._animateZoom(e,t,!0)}),this)}return!0},_animateZoom:function(e,t,o,n){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,at(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&lt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function jt(e){return new Ut(e)}var Vt,Ut=O.extend({options:{position:"topright"},initialize:function(e){m(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),o=this.getPosition();return e=e._controlCorners[o],at(t,"leaflet-control"),-1!==o.indexOf("bottom")?e.insertBefore(t,e.firstChild):e.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ot(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(e){this._map&&e&&0<e.screenX&&0<e.screenY&&this._map.getContainer().focus()}}),Zt=(Ht.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",o=this._controlContainer=tt("div",t+"control-container",this._container);function n(n,r){e[n+r]=tt("div",t+n+" "+t+r,o)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)ot(this._controlCorners[e]);ot(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}),Ut.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,o,n){return o<n?-1:n<o?1:0}},initialize:function(e,t,o){for(var n in m(this,o),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,e)this._addLayer(e[n],n);for(n in t)this._addLayer(t[n],n,!0)},onAdd:function(e){this._initLayout(),this._update(),(this._map=e).on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return Ut.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){return e.off("add remove",this._onLayerChange,this),(e=this._getLayer(s(e)))&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){at(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(at(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):lt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return lt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=tt("div",e),o=this.options.collapsed,n=(t.setAttribute("aria-haspopup",!0),Pt(t),Mt(t),this._section=tt("section",e+"-list")),r=(o&&(this._map.on("click",this.collapse,this),_t(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this)),this._layersLink=tt("a",e+"-toggle",t));r.href="#",r.title="Layers",r.setAttribute("role","button"),_t(r,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){Dt(e),this._expandSafely()}},this),o||this.expand(),this._baseLayersList=tt("div",e+"-base",n),this._separator=tt("div",e+"-separator",n),this._overlaysList=tt("div",e+"-overlays",n),t.appendChild(n)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&s(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,o){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:o}),this.options.sortLayers&&this._layers.sort(r((function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)}),this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(this._container){nt(this._baseLayersList),nt(this._overlaysList),this._layerControlInputs=[];for(var e,t,o,n=0,r=0;r<this._layers.length;r++)o=this._layers[r],this._addItem(o),t=t||o.overlay,e=e||!o.overlay,n+=o.overlay?0:1;this.options.hideSingleBase&&(this._baseLayersList.style.display=(e=e&&1<n)?"":"none"),this._separator.style.display=t&&e?"":"none"}return this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(s(e.target));(e=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null)&&this._map.fire(e,t)},_createRadioElement:function(e,t){return e='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",(t=document.createElement("div")).innerHTML=e,t.firstChild},_addItem:function(e){var t,o=document.createElement("label"),n=this._map.hasLayer(e.layer),r=((e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=n):t=this._createRadioElement("leaflet-base-layers_"+s(this),n),this._layerControlInputs.push(t),t.layerId=s(e.layer),_t(t,"click",this._onInputClick,this),n=document.createElement("span")).innerHTML=" "+e.name,document.createElement("span"));return o.appendChild(r),r.appendChild(t),r.appendChild(n),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(o),this._checkDisabledLayers(),o},_onInputClick:function(){var e,t,o=this._layerControlInputs,n=[],r=[];this._handlingClick=!0;for(var i=o.length-1;0<=i;i--)e=o[i],t=this._getLayer(e.layerId).layer,e.checked?n.push(t):e.checked||r.push(t);for(i=0;i<r.length;i++)this._map.hasLayer(r[i])&&this._map.removeLayer(r[i]);for(i=0;i<n.length;i++)this._map.hasLayer(n[i])||this._map.addLayer(n[i]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var e,t,o=this._layerControlInputs,n=this._map.getZoom(),r=o.length-1;0<=r;r--)e=o[r],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&n<t.options.minZoom||void 0!==t.options.maxZoom&&n>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;_t(e,"click",Dt),this.expand(),setTimeout((function(){Ct(e,"click",Dt)}))}})),$t=Ut.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",o=tt("div",t+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,t+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,t+"-out",o,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,o,n,r){return(o=tt("a",o,n)).innerHTML=e,o.href="#",o.title=t,o.setAttribute("role","button"),o.setAttribute("aria-label",t),Pt(o),_t(o,"click",Lt),_t(o,"click",r,this),_t(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";lt(this._zoomInButton,t),lt(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&e._zoom!==e.getMinZoom()||(at(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&e._zoom!==e.getMaxZoom()||(at(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Wt=(Ht.mergeOptions({zoomControl:!0}),Ht.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new $t,this.addControl(this.zoomControl))})),Ut.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",o=tt("div",t),n=this.options;return this._addScales(n,t+"-line",o),e.on(n.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),o},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,o){e.metric&&(this._mScale=tt("div",t,o)),e.imperial&&(this._iScale=tt("div",t,o))},_update:function(){var e=(t=this._map).getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e);this._updateScale(this._mScale,t<1e3?t+" m":t/1e3+" km",t/e)},_updateImperial:function(e){var t,o;5280<(e*=3.2808399)?(o=this._getRoundNum(t=e/5280),this._updateScale(this._iScale,o+" mi",o/t)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(e,t,o){e.style.width=Math.round(this.options.maxWidth*o)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1);return t*(10<=(e/=t)?10:5<=e?5:3<=e?3:2<=e?2:1)}})),qt=Ut.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Oe.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(e){m(this,e),this._attributions={}},onAdd:function(e){for(var t in(e.attributionControl=this)._container=tt("div","leaflet-control-attribution"),Pt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",(function(){this.removeAttribution(e.layer.getAttribution())}),this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e&&(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update()),this},removeAttribution:function(e){return e&&this._attributions[e]&&(this._attributions[e]--,this._update()),this},_update:function(){if(this._map){var e,t=[];for(e in this._attributions)this._attributions[e]&&t.push(e);var o=[];this.options.prefix&&o.push(this.options.prefix),t.length&&o.push(t.join(", ")),this._container.innerHTML=o.join(' <span aria-hidden="true">|</span> ')}}}),Gt=(Ht.mergeOptions({attributionControl:!0}),Ht.addInitHook((function(){this.options.attributionControl&&(new qt).addTo(this)})),Ut.Layers=Zt,Ut.Zoom=$t,Ut.Scale=Wt,Ut.Attribution=qt,jt.layers=function(e,t,o){return new Zt(e,t,o)},jt.zoom=function(e){return new $t(e)},jt.scale=function(e){return new Wt(e)},jt.attribution=function(e){return new qt(e)},Q=O.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}}),Q.addTo=function(e,t){return e.addHandler(t,this),this},ee={Events:A},Oe.touch?"touchstart mousedown":"mousedown"),Yt=M.extend({options:{clickTolerance:3},initialize:function(e,t,o,n){m(this,n),this._element=e,this._dragStartTarget=t||e,this._preventOutline=o},enable:function(){this._enabled||(_t(this._dragStartTarget,Gt,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Yt._dragging===this&&this.finishDrag(!0),Ct(this._dragStartTarget,Gt,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){var t,o;this._enabled&&(this._moved=!1,st(this._element,"leaflet-zoom-anim")||(e.touches&&1!==e.touches.length?Yt._dragging===this&&this.finishDrag():Yt._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||((Yt._dragging=this)._preventOutline&&vt(this._element),ft(),We(),this._moving||(this.fire("down"),o=e.touches?e.touches[0]:e,t=xt(this._element),this._startPoint=new P(o.clientX,o.clientY),this._startPos=gt(this._element),this._parentScale=wt(t),o="mousedown"===e.type,_t(document,o?"mousemove":"touchmove",this._onMove,this),_t(document,o?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(e){var t;this._enabled&&(e.touches&&1<e.touches.length?this._moved=!0:!(t=new P((t=e.touches&&1===e.touches.length?e.touches[0]:e).clientX,t.clientY)._subtract(this._startPoint)).x&&!t.y||Math.abs(t.x)+Math.abs(t.y)<this.options.clickTolerance||(t.x/=this._parentScale.x,t.y/=this._parentScale.y,Dt(e),this._moved||(this.fire("dragstart"),this._moved=!0,at(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),at(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(t),this._moving=!0,this._lastEvent=e,this._updatePosition()))},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),pt(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){lt(document.body,"leaflet-dragging"),this._lastTarget&&(lt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ct(document,"mousemove touchmove",this._onMove,this),Ct(document,"mouseup touchend touchcancel",this._onUp,this),bt(),qe(),this._moved&&this._moving&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,Yt._dragging=!1}});function Kt(e,t){if(t&&e.length){var o=e=function(e,t){for(var o=[e[0]],n=1,r=0,i=e.length;n<i;n++)(function(e,t){var o=t.x-e.x;return o*o+(t=t.y-e.y)*t})(e[n],e[r])>t&&(o.push(e[n]),r=n);return r<i-1&&o.push(e[i-1]),o}(e,t*=t),n=o.length,r=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);r[0]=r[n-1]=1,function e(t,o,n,r,i){var s,a,l,c=0;for(a=r+1;a<=i-1;a++)c<(l=to(t[a],t[r],t[i],!0))&&(s=a,c=l);n<c&&(o[s]=1,e(t,o,n,r,s),e(t,o,n,s,i))}(o,r,t,0,n-1);var i,s=[];for(i=0;i<n;i++)r[i]&&s.push(o[i]);return s}return e.slice()}function Xt(e,t,o){return Math.sqrt(to(e,t,o,!0))}function Jt(e,t,o,n,r){var i,s,a,l=n?Vt:eo(e,o),c=eo(t,o);for(Vt=c;;){if(!(l|c))return[e,t];if(l&c)return!1;a=eo(s=Qt(e,t,i=l||c,o,r),o),i===l?(e=s,l=a):(t=s,c=a)}}function Qt(e,t,o,n,r){var i,s,a=t.x-e.x,l=(t=t.y-e.y,n.min);return n=n.max,8&o?(i=e.x+a*(n.y-e.y)/t,s=n.y):4&o?(i=e.x+a*(l.y-e.y)/t,s=l.y):2&o?(i=n.x,s=e.y+t*(n.x-e.x)/a):1&o&&(i=l.x,s=e.y+t*(l.x-e.x)/a),new P(i,s,r)}function eo(e,t){var o=0;return e.x<t.min.x?o|=1:e.x>t.max.x&&(o|=2),e.y<t.min.y?o|=4:e.y>t.max.y&&(o|=8),o}function to(e,t,o,n){var r=t.x,i=(t=t.y,o.x-r),s=o.y-t,a=i*i+s*s;return 0<a&&(1<(a=((e.x-r)*i+(e.y-t)*s)/a)?(r=o.x,t=o.y):0<a&&(r+=i*a,t+=s*a)),i=e.x-r,s=e.y-t,n?i*i+s*s:new P(r,t)}function oo(e){return!b(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function no(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),oo(e)}function ro(e,t){var o,n,r,i,s;if(!e||0===e.length)throw new Error("latlngs not passed");oo(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var a,l=[];for(a in e)l.push(t.project(H(e[a])));for(var c=l.length,d=0,u=0;d<c-1;d++)u+=l[d].distanceTo(l[d+1])/2;if(0===u)s=l[0];else for(o=d=0;d<c-1;d++)if(n=l[d],r=l[d+1],u<(o+=i=n.distanceTo(r))){s=[r.x-(i=(o-u)/i)*(r.x-n.x),r.y-i*(r.y-n.y)];break}return t.unproject(R(s))}function io(e,t,o){for(var n,r,i,s,a,l,c,d=[1,4,2,8],u=0,h=e.length;u<h;u++)e[u]._code=eo(e[u],t);for(i=0;i<4;i++){for(l=d[i],n=[],u=0,r=(h=e.length)-1;u<h;r=u++)s=e[u],a=e[r],s._code&l?a._code&l||((c=Qt(a,s,l,t,o))._code=eo(c,t),n.push(c)):(a._code&l&&((c=Qt(a,s,l,t,o))._code=eo(c,t),n.push(c)),n.push(s));e=n}return e}function so(e,t){var o,n,r,i,s,a;if(!e||0===e.length)throw new Error("latlngs not passed");oo(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var l,c=[];for(l in e)c.push(t.project(H(e[l])));for(var d=c.length,u=i=s=0,h=0,m=d-1;h<d;m=h++)o=c[h],n=c[m],r=o.y*n.x-n.y*o.x,i+=(o.x+n.x)*r,s+=(o.y+n.y)*r,u+=3*r;return a=0===u?c[0]:[i/u,s/u],t.unproject(R(a))}te={__proto__:null,simplify:Kt,pointToSegmentDistance:Xt,closestPointOnSegment:function(e,t,o){return to(e,t,o)},clipSegment:Jt,_getEdgeIntersection:Qt,_getBitCode:eo,_sqClosestPointOnSegment:to,isFlat:oo,_flat:no,polylineCenter:ro},oe={__proto__:null,clipPolygon:io,polygonCenter:so},ne={project:function(e){return new P(e.lng,e.lat)},unproject:function(e){return new F(e.y,e.x)},bounds:new N([-180,-90],[180,90])},re={R:6378137,R_MINOR:6356752.314245179,bounds:new N([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,o=this.R,n=e.lat*t,r=this.R_MINOR/o,i=(r=Math.sqrt(1-r*r))*Math.sin(n);return i=Math.tan(Math.PI/4-n/2)/Math.pow((1-i)/(1+i),r/2),n=-o*Math.log(Math.max(i,1e-10)),new P(e.lng*t*o,n)},unproject:function(e){for(var t,o=180/Math.PI,n=this.R,r=this.R_MINOR/n,i=Math.sqrt(1-r*r),s=Math.exp(-e.y/n),a=Math.PI/2-2*Math.atan(s),l=0,c=.1;l<15&&1e-7<Math.abs(c);l++)t=i*Math.sin(a),t=Math.pow((1-t)/(1+t),i/2),a+=c=Math.PI/2-2*Math.atan(s*t)-a;return new F(a*o,e.x*o/n)}},ie={__proto__:null,LonLat:ne,Mercator:re,SphericalMercator:U},ae=t({},V,{code:"EPSG:3395",projection:re,transformation:$(se=.5/(Math.PI*re.R),.5,-se,.5)});var ao=t({},V,{code:"EPSG:4326",projection:ne,transformation:$(1/180,1,-1/180,.5)}),lo=(le=t({},j,{projection:ne,transformation:$(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var o=t.lng-e.lng;return t=t.lat-e.lat,Math.sqrt(o*o+t*t)},infinite:!0}),j.Earth=V,j.EPSG3395=ae,j.EPSG3857=W,j.EPSG900913=q,j.EPSG4326=ao,j.Simple=le,ce=M.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[s(e)]=this},removeInteractiveTarget:function(e){return delete this._map._targets[s(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t,o=e.target;o.hasLayer(this)&&(this._map=o,this._zoomAnimated=o._zoomAnimated,this.getEvents&&(t=this.getEvents(),o.on(t,this),this.once("remove",(function(){o.off(t,this)}),this)),this.onAdd(o),this.fire("add"),o.fire("layeradd",{layer:this}))}}),Ht.include({addLayer:function(e){var t;if(e._layerAdd)return t=s(e),this._layers[t]||((this._layers[t]=e)._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this;throw new Error("The provided object is not a Layer.")},removeLayer:function(e){var t=s(e);return this._layers[t]&&(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null),this},hasLayer:function(e){return s(e)in this._layers},eachLayer:function(e,t){for(var o in this._layers)e.call(t,this._layers[o]);return this},_addLayers:function(e){for(var t=0,o=(e=e?b(e)?e:[e]:[]).length;t<o;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[s(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){e=s(e),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var e,t=1/0,o=-1/0,n=this._getZoomSpan();for(e in this._zoomBoundLayers){var r=this._zoomBoundLayers[e].options;t=void 0===r.minZoom?t:Math.min(t,r.minZoom),o=void 0===r.maxZoom?o:Math.max(o,r.maxZoom)}this._layersMaxZoom=o===-1/0?void 0:o,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}}),ce.extend({initialize:function(e,t){var o,n;if(m(this,t),this._layers={},e)for(o=0,n=e.length;o<n;o++)this.addLayer(e[o])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){return e=e in this._layers?e:this.getLayerId(e),this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,o,n=Array.prototype.slice.call(arguments,1);for(t in this._layers)(o=this._layers[t])[e]&&o[e].apply(o,n);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var o in this._layers)e.call(t,this._layers[o]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:s})),co=lo.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),lo.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?((e=e in this._layers?this._layers[e]:e).removeEventParent(this),lo.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e,t=new B;for(e in this._layers){var o=this._layers[e];t.extend(o.getBounds?o.getBounds():o.getLatLng())}return t}}),uo=O.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){m(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var o=this._getIconUrl(e);if(o)return o=this._createImg(o,t&&"IMG"===t.tagName?t:null),this._setIconStyles(o,e),!this.options.crossOrigin&&""!==this.options.crossOrigin||(o.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),o;if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null},_setIconStyles:function(e,t){var o=this.options,n=R(n="number"==typeof(n=o[t+"Size"])?[n,n]:n),r=R("shadow"===t&&o.shadowAnchor||o.iconAnchor||n&&n.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(o.className||""),r&&(e.style.marginLeft=-r.x+"px",e.style.marginTop=-r.y+"px"),n&&(e.style.width=n.x+"px",e.style.height=n.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return Oe.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}}),ho=uo.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return"string"!=typeof ho.imagePath&&(ho.imagePath=this._detectIconPath()),(this.options.imagePath||ho.imagePath)+uo.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){function t(e,t,o){return(t=t.exec(e))&&t[o]}return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=tt("div","leaflet-default-icon-path",document.body),t=et(e,"background-image")||et(e,"backgroundImage");return document.body.removeChild(e),(t=this._stripUrl(t))?t:(e=document.querySelector('link[href$="leaflet.css"]'))?e.href.substring(0,e.href.length-11-1):""}}),mo=Q.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new Yt(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),at(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&lt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,o=t._map,n=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,i=gt(t._icon),s=o.getPixelBounds(),a=o.getPixelOrigin();(a=I(s.min._subtract(a).add(r),s.max._subtract(a).subtract(r))).contains(i)||(r=R((Math.max(a.max.x,i.x)-a.max.x)/(s.max.x-a.max.x)-(Math.min(a.min.x,i.x)-a.min.x)/(s.min.x-a.min.x),(Math.max(a.max.y,i.y)-a.max.y)/(s.max.y-a.max.y)-(Math.min(a.min.y,i.y)-a.min.y)/(s.min.y-a.min.y)).multiplyBy(n),o.panBy(r,{animate:!1}),this._draggable._newPos._add(r),this._draggable._startPos._add(r),pt(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=k(this._adjustPan.bind(this,e)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,o=t._shadow,n=gt(t._icon),r=t._map.layerPointToLatLng(n);o&&pt(o,n),t._latlng=r,e.latlng=r,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){E(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),po=ce.extend({options:{icon:new ho,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){m(this,t),this._latlng=H(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=H(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var e;return this._icon&&this._map&&(e=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(e)),this},_initIcon:function(){var e,t=this.options,o="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=!1,r=!1;(e=t.icon.createIcon(this._icon))!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),at(e,o),t.keyboard&&(e.tabIndex="0",e.setAttribute("role","button")),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&_t(e,"focus",this._panOnFocus,this),(e=t.icon.createShadow(this._shadow))!==this._shadow&&(this._removeShadow(),r=!0),e&&(at(e,o),e.alt=""),this._shadow=e,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),e&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ct(this._icon,"focus",this._panOnFocus,this),ot(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ot(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&pt(this._icon,e),this._shadow&&pt(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round(),this._setPos(e)},_initInteraction:function(){var e;this.options.interactive&&(at(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),mo&&(e=this.options.draggable,this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new mo(this),e&&this.dragging.enable()))},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&ut(this._icon,e),this._shadow&&ut(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e,t,o=this._map;o&&(e=(t=this.options.icon.options).iconSize?R(t.iconSize):R(0,0),t=t.iconAnchor?R(t.iconAnchor):R(0,0),o.panInside(this._latlng,{paddingTopLeft:t,paddingBottomRight:e.subtract(t)}))},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),go=ce.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return m(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),fo=go.extend({options:{fill:!0,radius:10},initialize:function(e,t){m(this,t),this._latlng=H(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=H(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return go.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,o=this._clickTolerance();e=[e+o,t+o],this._pxBounds=new N(this._point.subtract(e),this._point.add(e))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),bo=fo.extend({initialize:function(e,o,n){if(m(this,o="number"==typeof o?t({},n,{radius:o}):o),this._latlng=H(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new B(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:go.prototype.setStyle,_project:function(){var e,t,o,n,r,i=this._latlng.lng,s=this._latlng.lat,a=this._map,l=a.options.crs;l.distance===V.distance?(n=Math.PI/180,r=this._mRadius/V.R/n,e=a.project([s+r,i]),t=a.project([s-r,i]),t=e.add(t).divideBy(2),o=a.unproject(t).lat,n=Math.acos((Math.cos(r*n)-Math.sin(s*n)*Math.sin(o*n))/(Math.cos(s*n)*Math.cos(o*n)))/n,!isNaN(n)&&0!==n||(n=r/Math.cos(Math.PI/180*s)),this._point=t.subtract(a.getPixelOrigin()),this._radius=isNaN(n)?0:t.x-a.project([o,i-n]).x,this._radiusY=t.y-e.y):(r=l.unproject(l.project(this._latlng).subtract([this._mRadius,0])),this._point=a.latLngToLayerPoint(this._latlng),this._radius=this._point.x-a.latLngToLayerPoint(r).x),this._updateBounds()}}),vo=go.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){m(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t=1/0,o=null,n=to,r=0,i=this._parts.length;r<i;r++)for(var s=this._parts[r],a=1,l=s.length;a<l;a++){var c,d,u=n(e,c=s[a-1],d=s[a],!0);u<t&&(t=u,o=n(e,c,d))}return o&&(o.distance=Math.sqrt(t)),o},getCenter:function(){if(this._map)return ro(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=H(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new B,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return oo(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],o=oo(e),n=0,r=e.length;n<r;n++)o?(t[n]=H(e[n]),this._bounds.extend(t[n])):t[n]=this._convertLatLngs(e[n]);return t},_project:function(){var e=new N;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=new P(e=this._clickTolerance(),e);this._rawPxBounds&&(this._pxBounds=new N([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(e,t,o){var n,r,i=e[0]instanceof F,s=e.length;if(i){for(r=[],n=0;n<s;n++)r[n]=this._map.latLngToLayerPoint(e[n]),o.extend(r[n]);t.push(r)}else for(n=0;n<s;n++)this._projectLatlngs(e[n],t,o)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var t,o,n,r,i=this._parts,s=0,a=0,l=this._rings.length;s<l;s++)for(t=0,o=(r=this._rings[s]).length;t<o-1;t++)(n=Jt(r[t],r[t+1],e,t,!0))&&(i[a]=i[a]||[],i[a].push(n[0]),n[1]===r[t+1]&&t!==o-2||(i[a].push(n[1]),a++))},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,o=0,n=e.length;o<n;o++)e[o]=Kt(e[o],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var o,n,r,i,s,a,l=this._clickTolerance();if(this._pxBounds&&this._pxBounds.contains(e))for(o=0,i=this._parts.length;o<i;o++)for(n=0,r=(s=(a=this._parts[o]).length)-1;n<s;r=n++)if((t||0!==n)&&Xt(e,a[r],a[n])<=l)return!0;return!1}});vo._flat=no;var yo=vo.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(this._map)return so(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},_convertLatLngs:function(e){var t=(e=vo.prototype._convertLatLngs.call(this,e)).length;return 2<=t&&e[0]instanceof F&&e[0].equals(e[t-1])&&e.pop(),e},_setLatLngs:function(e){vo.prototype._setLatLngs.call(this,e),oo(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(oo(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var e=this._renderer._bounds,t=new P(t=this.options.weight,t);if(e=new N(e.min.subtract(t),e.max.add(t)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var o,n=0,r=this._rings.length;n<r;n++)(o=io(this._rings[n],e,!0)).length&&this._parts.push(o)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,o,n,r,i,s,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(r=0,a=this._parts.length;r<a;r++)for(i=0,s=(l=(t=this._parts[r]).length)-1;i<l;s=i++)o=t[i],n=t[s],o.y>e.y!=n.y>e.y&&e.x<(n.x-o.x)*(e.y-o.y)/(n.y-o.y)+o.x&&(c=!c);return c||vo.prototype._containsPoint.call(this,e,!0)}}),xo=co.extend({initialize:function(e,t){m(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,o,n,r=b(e)?e:e.features;if(r){for(t=0,o=r.length;t<o;t++)((n=r[t]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var i,s=this.options;return s.filter&&!s.filter(e)||!(i=wo(e,s))?this:(i.feature=Oo(e),i.defaultOptions=i.options,this.resetStyle(i),s.onEachFeature&&s.onEachFeature(e,i),this.addLayer(i))},resetStyle:function(e){return void 0===e?this.eachLayer(this.resetStyle,this):(e.options=t({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer((function(t){this._setLayerStyle(t,e)}),this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function wo(e,t){var o,n,r,i,s="Feature"===e.type?e.geometry:e,a=s?s.coordinates:null,l=[],c=t&&t.pointToLayer,d=t&&t.coordsToLatLng||So;if(!a&&!s)return null;switch(s.type){case"Point":return _o(c,e,o=d(a),t);case"MultiPoint":for(r=0,i=a.length;r<i;r++)o=d(a[r]),l.push(_o(c,e,o,t));return new co(l);case"LineString":case"MultiLineString":return n=Co(a,"LineString"===s.type?0:1,d),new vo(n,t);case"Polygon":case"MultiPolygon":return n=Co(a,"Polygon"===s.type?1:2,d),new yo(n,t);case"GeometryCollection":for(r=0,i=s.geometries.length;r<i;r++){var u=wo({geometry:s.geometries[r],type:"Feature",properties:e.properties},t);u&&l.push(u)}return new co(l);case"FeatureCollection":for(r=0,i=s.features.length;r<i;r++){var h=wo(s.features[r],t);h&&l.push(h)}return new co(l);default:throw new Error("Invalid GeoJSON object.")}}function _o(e,t,o,n){return e?e(t,o):new po(o,n&&n.markersInheritOptions&&n)}function So(e){return new F(e[1],e[0],e[2])}function Co(e,t,o){for(var n,r=[],i=0,s=e.length;i<s;i++)n=t?Co(e[i],t-1,o):(o||So)(e[i]),r.push(n);return r}function ko(e,t){return void 0!==(e=H(e)).alt?[d(e.lng,t),d(e.lat,t),d(e.alt,t)]:[d(e.lng,t),d(e.lat,t)]}function Eo(e,t,o,n){for(var r=[],i=0,s=e.length;i<s;i++)r.push(t?Eo(e[i],oo(e[i])?0:t-1,o,n):ko(e[i],n));return!t&&o&&r.push(r[0].slice()),r}function To(e,o){return e.feature?t({},e.feature,{geometry:o}):Oo(o)}function Oo(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}function Ao(e,t){return new xo(e,t)}de={toGeoJSON:function(e){return To(this,{type:"Point",coordinates:ko(this.getLatLng(),e)})}},po.include(de),bo.include(de),fo.include(de),vo.include({toGeoJSON:function(e){var t=!oo(this._latlngs);return To(this,{type:(t?"Multi":"")+"LineString",coordinates:Eo(this._latlngs,t?1:0,!1,e)})}}),yo.include({toGeoJSON:function(e){var t=!oo(this._latlngs),o=t&&!oo(this._latlngs[0]);return e=Eo(this._latlngs,o?2:t?1:0,!0,e),To(this,{type:(o?"Multi":"")+"Polygon",coordinates:e=t?e:[e]})}}),lo.include({toMultiPoint:function(e){var t=[];return this.eachLayer((function(o){t.push(o.toGeoJSON(e).geometry.coordinates)})),To(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t,o,n=this.feature&&this.feature.geometry&&this.feature.geometry.type;return"MultiPoint"===n?this.toMultiPoint(e):(t="GeometryCollection"===n,o=[],this.eachLayer((function(n){n.toGeoJSON&&(n=n.toGeoJSON(e),t?o.push(n.geometry):"FeatureCollection"===(n=Oo(n)).type?o.push.apply(o,n.features):o.push(n))})),t?To(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o})}}),ue=Ao;var Mo=ce.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,o){this._url=e,this._bounds=z(t),m(this,o)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(at(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ot(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&rt(this._image),this},bringToBack:function(){return this._map&&it(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=z(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:tt("img");at(t,"leaflet-image-layer"),this._zoomAnimated&&at(t,"leaflet-zoom-animated"),this.options.className&&at(t,this.options.className),t.onselectstart=c,t.onmousemove=c,t.onload=r(this.fire,this,"load"),t.onerror=r(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom);e=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min,mt(this._image,e,t)},_reset:function(){var e=this._image,t=new N(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=t.getSize();pt(e,t.min),e.style.width=o.x+"px",e.style.height=o.y+"px"},_updateOpacity:function(){ut(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Po=Mo.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:tt("video");if(at(t,"leaflet-image-layer"),this._zoomAnimated&&at(t,"leaflet-zoom-animated"),this.options.className&&at(t,this.options.className),t.onselectstart=c,t.onmousemove=c,t.onloadeddata=r(this.fire,this,"load"),e){for(var o=t.getElementsByTagName("source"),n=[],i=0;i<o.length;i++)n.push(o[i].src);this._url=0<o.length?n:[t.src]}else{b(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var a=tt("source");a.src=this._url[s],t.appendChild(a)}}}}),Do=Mo.extend({_initImage:function(){var e=this._image=this._url;at(e,"leaflet-image-layer"),this._zoomAnimated&&at(e,"leaflet-zoom-animated"),this.options.className&&at(e,this.options.className),e.onselectstart=c,e.onmousemove=c}}),Lo=ce.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof F||b(e))?(this._latlng=H(e),m(this,t)):(m(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&ut(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&ut(this._container,1),this.bringToFront(),this.options.interactive&&(at(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(ut(this._container,0),this._removeTimeout=setTimeout(r(ot,void 0,this._container),200)):ot(this._container),this.options.interactive&&(lt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=H(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&rt(this._container),this},bringToBack:function(){return this._map&&it(this._container),this},_prepareOpen:function(e){if(!(o=this._source)._map)return!1;if(o instanceof co){var t,o=null,n=this._source._layers;for(t in n)if(n[t]._map){o=n[t];break}if(!o)return!1;this._source=o}if(!e)if(o.getCenter)e=o.getCenter();else if(o.getLatLng)e=o.getLatLng();else{if(!o.getBounds)throw new Error("Unable to get source layer LatLng.");e=o.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){var e,t,o;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),e=R(this.options.offset),o=this._getAnchor(),this._zoomAnimated?pt(this._container,t.add(o)):e=e.add(t).add(o),t=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x,this._container.style.bottom=t+"px",this._container.style.left=o+"px")},_getAnchor:function(){return[0,0]}}),Ro=(Ht.include({_initOverlay:function(e,t,o,n){var r=t;return r instanceof e||(r=new e(n).setContent(t)),o&&r.setLatLng(o),r}}),ce.include({_initOverlay:function(e,t,o,n){var r=o;return r instanceof e?(m(r,n),r._source=this):(r=t&&!n?t:new e(n,this)).setContent(o),r}}),Lo.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Lo.prototype.openOn.call(this,e)},onAdd:function(e){Lo.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof go||this._source.on("preclick",At))},onRemove:function(e){Lo.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof go||this._source.off("preclick",At))},getEvents:function(){var e=Lo.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=tt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),o=this._wrapper=tt("div",e+"-content-wrapper",t);this._contentNode=tt("div",e+"-content",o),Pt(t),Mt(this._contentNode),_t(t,"contextmenu",At),this._tipContainer=tt("div",e+"-tip-container",t),this._tip=tt("div",e+"-tip",this._tipContainer),this.options.closeButton&&((o=this._closeButton=tt("a",e+"-close-button",t)).setAttribute("role","button"),o.setAttribute("aria-label","Close popup"),o.href="#close",o.innerHTML='<span aria-hidden="true">&#215;</span>',_t(o,"click",(function(e){Dt(e),this.close()}),this))},_updateLayout:function(){var e=this._contentNode,t=e.style,o=(t.width="",t.whiteSpace="nowrap",e.offsetWidth),n=(o=Math.min(o,this.options.maxWidth),o=Math.max(o,this.options.minWidth),t.width=o+1+"px",t.whiteSpace="",t.height="",o=e.offsetHeight,this.options.maxHeight),r="leaflet-popup-scrolled";(n&&n<o?(t.height=n+"px",at):lt)(e,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);var t=this._getAnchor();pt(this._container,e.add(t))},_adjustPan:function(){var e,t,o,n,r,i,s,a;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning?this._autopanning=!1:(e=this._map,t=parseInt(et(this._container,"marginBottom"),10)||0,t=this._container.offsetHeight+t,a=this._containerWidth,(o=new P(this._containerLeft,-t-this._containerBottom))._add(gt(this._container)),o=e.layerPointToContainerPoint(o),r=R(this.options.autoPanPadding),n=R(this.options.autoPanPaddingTopLeft||r),r=R(this.options.autoPanPaddingBottomRight||r),i=e.getSize(),s=0,o.x+a+r.x>i.x&&(s=o.x+a-i.x+r.x),o.x-s-n.x<(a=0)&&(s=o.x-n.x),o.y+t+r.y>i.y&&(a=o.y+t-i.y+r.y),o.y-a-n.y<0&&(a=o.y-n.y),(s||a)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([s,a]))))},_getAnchor:function(){return R(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),No=(Ht.mergeOptions({closePopupOnClick:!0}),Ht.include({openPopup:function(e,t,o){return this._initOverlay(Ro,e,t,o).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),ce.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Ro,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof co||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){var t;this._popup&&this._map&&(Lt(e),t=e.layer||e.target,this._popup._source!==t||t instanceof go?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng))},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}}),Lo.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Lo.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Lo.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Lo.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=tt("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+s(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,o=this._map,n=this._container,r=o.latLngToContainerPoint(o.getCenter()),i=(o=o.layerPointToContainerPoint(e),this.options.direction),s=n.offsetWidth,a=n.offsetHeight,l=R(this.options.offset),c=this._getAnchor();o="top"===i?(t=s/2,a):"bottom"===i?(t=s/2,0):(t="center"===i?s/2:"right"===i?0:"left"===i?s:o.x<r.x?(i="right",0):(i="left",s+2*(l.x+c.x)),a/2),e=e.subtract(R(t,o,!0)).add(l).add(c),lt(n,"leaflet-tooltip-right"),lt(n,"leaflet-tooltip-left"),lt(n,"leaflet-tooltip-top"),lt(n,"leaflet-tooltip-bottom"),at(n,"leaflet-tooltip-"+i),pt(n,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&ut(this._container,e)},_animateZoom:function(e){e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),this._setPosition(e)},_getAnchor:function(){return R(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}})),Io=(Ht.include({openTooltip:function(e,t,o){return this._initOverlay(No,e,t,o).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),ce.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(No,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){var t,o;!e&&this._tooltipHandlersAdded||(t=e?"off":"on",o={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?o.add=this._openTooltip:(o.mouseover=this._openTooltip,o.mouseout=this.closeTooltip,o.click=this._openTooltip,this._map?this._addFocusListeners():o.add=this._addFocusListeners),this._tooltip.options.sticky&&(o.mousemove=this._moveTooltip),this[t](o),this._tooltipHandlersAdded=!e)},openTooltip:function(e){return this._tooltip&&(this instanceof co||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t=e.getElement();t&&(_t(t,"focus",(function(){this._tooltip._source=e,this.openTooltip()}),this),_t(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){(e=e.getElement())&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0))},_moveTooltip:function(e){var t=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(e=this._map.mouseEventToContainerPoint(e.originalEvent),e=this._map.containerPointToLayerPoint(e),t=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(t)}}),uo.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){e=e&&"DIV"===e.tagName?e:document.createElement("div");var t=this.options;return t.html instanceof Element?(nt(e),e.appendChild(t.html)):e.innerHTML=!1!==t.html?t.html:"",t.bgPos&&(t=R(t.bgPos),e.style.backgroundPosition=-t.x+"px "+-t.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}}));uo.Default=ho;var Bo=ce.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Oe.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){m(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),ot(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(rt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(it(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){var e;return this._map&&(this._removeAllTiles(),(e=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()),this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof P?e:new P(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,o=this.getPane().children,n=-e(-1/0,1/0),r=0,i=o.length;r<i;r++)t=o[r].style.zIndex,o[r]!==this._container&&t&&(n=e(n,+t));isFinite(n)&&(this.options.zIndex=n+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Oe.ielt9){ut(this._container,this.options.opacity);var e,t=+new Date,o=!1,n=!1;for(e in this._tiles){var r,i=this._tiles[e];i.current&&i.loaded&&(r=Math.min(1,(t-i.loaded)/200),ut(i.el,r),r<1?o=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0))}n&&!this._noPrune&&this._pruneTiles(),o&&(E(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=tt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var o in this._levels)o=Number(o),this._levels[o].el.children.length||o===e?(this._levels[o].el.style.zIndex=t-Math.abs(e-o),this._onUpdateLevel(o)):(ot(this._levels[o].el),this._removeTilesAtZoom(o),this._onRemoveLevel(o),delete this._levels[o]);var n=this._levels[e],r=this._map;return n||((n=this._levels[e]={}).el=tt("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=t,n.origin=r.project(r.unproject(r.getPixelOrigin()),e).round(),n.zoom=e,this._setZoomTransform(n,r.getCenter(),r.getZoom()),c(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var e,t,o,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(o=this._tiles[e]).retain=o.current;for(e in this._tiles)(o=this._tiles[e]).current&&!o.active&&(t=o.coords,this._retainParent(t.x,t.y,t.z,t.z-5)||this._retainChildren(t.x,t.y,t.z,t.z+2));for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)ot(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,o,n){o-=1;var r=((r=new P(+(e=Math.floor(e/2)),+(t=Math.floor(t/2)))).z=o,this._tileCoordsToKey(r));return(r=this._tiles[r])&&r.active?r.retain=!0:(r&&r.loaded&&(r.retain=!0),n<o&&this._retainParent(e,t,o,n))},_retainChildren:function(e,t,o,n){for(var r=2*e;r<2*e+2;r++)for(var i=2*t;i<2*t+2;i++){var s=((s=new P(r,i)).z=o+1,this._tileCoordsToKey(s));(s=this._tiles[s])&&s.active?s.retain=!0:(s&&s.loaded&&(s.retain=!0),o+1<n&&this._retainChildren(r,i,o+1,n))}},_resetView:function(e){e=e&&(e.pinch||e.flyTo),this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,o,n){var r=Math.round(t),i=(r=void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom?void 0:this._clampZoom(r),this.options.updateWhenZooming&&r!==this._tileZoom);n&&!i||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(e),o||this._pruneTiles(),this._noPrune=!!o),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var o in this._levels)this._setZoomTransform(this._levels[o],e,t)},_setZoomTransform:function(e,t,o){var n=this._map.getZoomScale(o,e.zoom);t=e.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(t,o)).round(),Oe.any3d?mt(e.el,t,n):pt(e.el,t)},_resetGrid:function(){var e=this._map,t=e.options.crs,o=this._tileSize=this.getTileSize(),n=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],n).x/o.x),Math.ceil(e.project([0,t.wrapLng[1]],n).x/o.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],n).y/o.x),Math.ceil(e.project([t.wrapLat[1],0],n).y/o.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=(o=this._map)._animatingZoom?Math.max(o._animateToZoom,o.getZoom()):o.getZoom(),o=(t=o.getZoomScale(t,this._tileZoom),e=o.project(e,this._tileZoom).floor(),o.getSize().divideBy(2*t));return new N(e.subtract(o),e.add(o))},_update:function(e){if(n=this._map){var t=this._clampZoom(n.getZoom());if(void 0===e&&(e=n.getCenter()),void 0!==this._tileZoom){var o,n=this._getTiledPixelBounds(e),r=this._pxBoundsToTileRange(n),i=r.getCenter(),s=[],a=(n=this.options.keepBuffer,new N(r.getBottomLeft().subtract([n,-n]),r.getTopRight().add([n,-n])));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(o in this._tiles){var l=this._tiles[o].coords;l.z===this._tileZoom&&a.contains(new P(l.x,l.y))||(this._tiles[o].current=!1)}if(1<Math.abs(t-this._tileZoom))this._setView(e,t);else{for(var c=r.min.y;c<=r.max.y;c++)for(var d=r.min.x;d<=r.max.x;d++){var u,h=new P(d,c);h.z=this._tileZoom,this._isValidTile(h)&&((u=this._tiles[this._tileCoordsToKey(h)])?u.current=!0:s.push(h))}if(s.sort((function(e,t){return e.distanceTo(i)-t.distanceTo(i)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var o=this._globalTileRange;if(!t.wrapLng&&(e.x<o.min.x||e.x>o.max.x)||!t.wrapLat&&(e.y<o.min.y||e.y>o.max.y))return!1}return!this.options.bounds||(t=this._tileCoordsToBounds(e),z(this.options.bounds).overlaps(t))},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,o=this.getTileSize(),n=e.scaleBy(o);return o=n.add(o),[t.unproject(n,e.z),t.unproject(o,e.z)]},_tileCoordsToBounds:function(e){return e=new B((e=this._tileCoordsToNwSe(e))[0],e[1]),this.options.noWrap?e:this._map.wrapLatLngBounds(e)},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=new P(+(e=e.split(":"))[0],+e[1]);return t.z=+e[2],t},_removeTile:function(e){var t=this._tiles[e];t&&(ot(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){at(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=c,e.onmousemove=c,Oe.ielt9&&this.options.opacity<1&&ut(e,this.options.opacity)},_addTile:function(e,t){var o=this._getTilePos(e),n=this._tileCoordsToKey(e),i=this.createTile(this._wrapCoords(e),r(this._tileReady,this,e));this._initTile(i),this.createTile.length<2&&k(r(this._tileReady,this,e,null,i)),pt(i,o),this._tiles[n]={el:i,coords:e,current:!0},t.appendChild(i),this.fire("tileloadstart",{tile:i,coords:e})},_tileReady:function(e,t,o){t&&this.fire("tileerror",{error:t,tile:o,coords:e});var n=this._tileCoordsToKey(e);(o=this._tiles[n])&&(o.loaded=+new Date,this._map._fadeAnimated?(ut(o.el,0),E(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),t||(at(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Oe.ielt9||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new P(this._wrapX?l(e.x,this._wrapX):e.x,this._wrapY?l(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new N(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}}),zo=Bo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=m(this,t)).detectRetina&&Oe.retina&&0<t.maxZoom?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var o=document.createElement("img");return _t(o,"load",r(this._tileOnLoad,this,t,o)),_t(o,"error",r(this._tileOnError,this,t,o)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(o.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(o.referrerPolicy=this.options.referrerPolicy),o.alt="",o.src=this.getTileUrl(e),o},getTileUrl:function(e){var o={r:Oe.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(e=this._globalTileRange.max.y-e.y,this.options.tms&&(o.y=e),o["-y"]=e),f(this._url,t(o,this.options))},_tileOnLoad:function(e,t){Oe.ielt9?setTimeout(r(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,o){var n=this.options.errorTileUrl;n&&t.getAttribute("src")!==n&&(t.src=n),e(o,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return(e=this.options.zoomReverse?t-e:e)+this.options.zoomOffset},_getSubdomain:function(e){return e=Math.abs(e.x+e.y)%this.options.subdomains.length,this.options.subdomains[e]},_abortLoading:function(){var e,t,o;for(e in this._tiles)this._tiles[e].coords.z!==this._tileZoom&&((o=this._tiles[e].el).onload=c,o.onerror=c,o.complete||(o.src=y,t=this._tiles[e].coords,ot(o),delete this._tiles[e],this.fire("tileabort",{tile:o,coords:t})))},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",y),Bo.prototype._removeTile.call(this,e)},_tileReady:function(e,t,o){if(this._map&&(!o||o.getAttribute("src")!==y))return Bo.prototype._tileReady.call(this,e,t,o)}});function Fo(e,t){return new zo(e,t)}var Ho=zo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,o){this._url=e;var n,r=t({},this.defaultWmsParams);for(n in o)n in this.options||(r[n]=o[n]);e=(o=m(this,o)).detectRetina&&Oe.retina?2:1;var i=this.getTileSize();r.width=i.x*e,r.height=i.y*e,this.wmsParams=r},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[t]=this._crs.code,zo.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),o=(t=(o=I((o=this._crs).project(t[0]),o.project(t[1]))).min,o.max);return t=(1.3<=this._wmsVersion&&this._crs===ao?[t.y,t.x,o.y,o.x]:[t.x,t.y,o.x,o.y]).join(","),(o=zo.prototype.getTileUrl.call(this,e))+p(this.wmsParams,o,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+t},setParams:function(e,o){return t(this.wmsParams,e),o||this.redraw(),this}});zo.WMS=Ho,Fo.wms=function(e,t){return new Ho(e,t)};var jo=ce.extend({options:{padding:.1},initialize:function(e){m(this,e),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&at(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var o=this._map.getZoomScale(t,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,t);n=n.multiplyBy(-o).add(r).subtract(this._map._getNewPixelOrigin(e,t)),Oe.any3d?mt(this._container,n,o):pt(this._container,n)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),o=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new N(o,o.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Vo=jo.extend({options:{tolerance:0},getEvents:function(){var e=jo.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){jo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");_t(e,"mousemove",this._onMouseMove,this),_t(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),_t(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,ot(this._container),Ct(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){var e,t,o,n;this._map._animatingZoom&&this._bounds||(jo.prototype._update.call(this),e=this._bounds,t=this._container,o=e.getSize(),n=Oe.retina?2:1,pt(t,e.min),t.width=n*o.x,t.height=n*o.y,t.style.width=o.x+"px",t.style.height=o.y+"px",Oe.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update"))},_reset:function(){jo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),e=(this._layers[s(e)]=e)._order={layer:e,prev:this._drawLast,next:null},this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=(o=e._order).next,o=o.prev;t?t.prev=o:this._drawLast=o,o?o.next=t:this._drawFirst=t,delete e._order,delete this._layers[s(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){for(var t,o=e.options.dashArray.split(/[, ]+/),n=[],r=0;r<o.length;r++){if(t=Number(o[r]),isNaN(t))return;n.push(t)}e.options._dashArray=n}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},_extendRedrawBounds:function(e){var t;e._pxBounds&&(t=(e.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new N,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e,t=this._redrawBounds;t?(e=t.getSize(),this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var e,t,o=this._redrawBounds;this._ctx.save(),o&&(t=o.getSize(),this._ctx.beginPath(),this._ctx.rect(o.min.x,o.min.y,t.x,t.y),this._ctx.clip()),this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)e=n.layer,(!o||e._pxBounds&&e._pxBounds.intersects(o))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var o,n,r,i,s=e._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),o=0;o<a;o++){for(n=0,r=s[o].length;n<r;n++)i=s[o][n],l[n?"lineTo":"moveTo"](i.x,i.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){var t,o,n,r;this._drawing&&!e._empty()&&(t=e._point,o=this._ctx,n=Math.max(Math.round(e._radius),1),1!=(r=(Math.max(Math.round(e._radiusY),1)||n)/n)&&(o.save(),o.scale(1,r)),o.beginPath(),o.arc(t.x,t.y/r,n,0,2*Math.PI,!1),1!=r&&o.restore(),this._fillStroke(o,e))},_fillStroke:function(e,t){var o=t.options;o.fill&&(e.globalAlpha=o.fillOpacity,e.fillStyle=o.fillColor||o.color,e.fill(o.fillRule||"evenodd")),o.stroke&&0!==o.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=o.opacity,e.lineWidth=o.weight,e.strokeStyle=o.color,e.lineCap=o.lineCap,e.lineJoin=o.lineJoin,e.stroke())},_onClick:function(e){for(var t,o,n=this._map.mouseEventToLayerPoint(e),r=this._drawFirst;r;r=r.next)(t=r.layer).options.interactive&&t._containsPoint(n)&&(("click"===e.type||"preclick"===e.type)&&this._map._draggableMoved(t)||(o=t));this._fireEvent(!!o&&[o],e)},_onMouseMove:function(e){var t;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(t=this._map.mouseEventToLayerPoint(e),this._handleMouseHover(e,t))},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(lt(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var o,n,i=this._drawFirst;i;i=i.next)(o=i.layer).options.interactive&&o._containsPoint(t)&&(n=o);n!==this._hoveredLayer&&(this._handleMouseOut(e),n&&(at(this._container,"leaflet-interactive"),this._fireEvent([n],e,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(r((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(e,t,o){this._map._fireDOMEvent(t,o||t.type,e)},_bringToFront:function(e){var t,o,n=e._order;n&&(t=n.next,o=n.prev,t&&((t.prev=o)?o.next=t:t&&(this._drawFirst=t),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(e)))},_bringToBack:function(e){var t,o,n=e._order;n&&(t=n.next,(o=n.prev)&&((o.next=t)?t.prev=o:o&&(this._drawLast=o),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(e)))}});function Uo(e){return Oe.canvas?new Vo(e):null}var Zo=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),$o=(he={_initContainer:function(){this._container=tt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(jo.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=Zo("shape");at(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=Zo("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[s(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;ot(t),e.removeInteractiveTarget(t),delete this._layers[s(e)]},_updateStyle:function(e){var t=e._stroke,o=e._fill,n=e.options,r=e._container;r.stroked=!!n.stroke,r.filled=!!n.fill,n.stroke?(t=t||(e._stroke=Zo("stroke")),r.appendChild(t),t.weight=n.weight+"px",t.color=n.color,t.opacity=n.opacity,n.dashArray?t.dashStyle=b(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=n.lineCap.replace("butt","flat"),t.joinstyle=n.lineJoin):t&&(r.removeChild(t),e._stroke=null),n.fill?(o=o||(e._fill=Zo("fill")),r.appendChild(o),o.color=n.fillColor||n.color,o.opacity=n.fillOpacity):o&&(r.removeChild(o),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),o=Math.round(e._radius),n=Math.round(e._radiusY||o);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+o+","+n+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){rt(e._container)},_bringToBack:function(e){it(e._container)}},Oe.vml?Zo:G),Wo=jo.extend({_initContainer:function(){this._container=$o("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=$o("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ot(this._container),Ct(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var e,t,o;this._map._animatingZoom&&this._bounds||(jo.prototype._update.call(this),t=(e=this._bounds).getSize(),o=this._container,this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,o.setAttribute("width",t.x),o.setAttribute("height",t.y)),pt(o,e.min),o.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update"))},_initPath:function(e){var t=e._path=$o("path");e.options.className&&at(t,e.options.className),e.options.interactive&&at(t,"leaflet-interactive"),this._updateStyle(e),this._layers[s(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){ot(e._path),e.removeInteractiveTarget(e._path),delete this._layers[s(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path;e=e.options,t&&(e.stroke?(t.setAttribute("stroke",e.color),t.setAttribute("stroke-opacity",e.opacity),t.setAttribute("stroke-width",e.weight),t.setAttribute("stroke-linecap",e.lineCap),t.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?t.setAttribute("stroke-dasharray",e.dashArray):t.removeAttribute("stroke-dasharray"),e.dashOffset?t.setAttribute("stroke-dashoffset",e.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),e.fill?(t.setAttribute("fill",e.fillColor||e.color),t.setAttribute("fill-opacity",e.fillOpacity),t.setAttribute("fill-rule",e.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,Y(e._parts,t))},_updateCircle:function(e){var t=e._point,o=Math.max(Math.round(e._radius),1),n="a"+o+","+(Math.max(Math.round(e._radiusY),1)||o)+" 0 1,0 ";t=e._empty()?"M0 0":"M"+(t.x-o)+","+t.y+n+2*o+",0 "+n+2*-o+",0 ",this._setPath(e,t)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){rt(e._path)},_bringToBack:function(e){it(e._path)}});function qo(e){return Oe.svg||Oe.vml?new Wo(e):null}Oe.vml&&Wo.include(he),Ht.include({getRenderer:function(e){return e=(e=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(e){var t;return"overlayPane"!==e&&void 0!==e&&(void 0===(t=this._paneRenderers[e])&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t)},_createRenderer:function(e){return this.options.preferCanvas&&Uo(e)||qo(e)}});var Go=yo.extend({initialize:function(e,t){yo.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=z(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});Wo.create=$o,Wo.pointsToPath=Y,xo.geometryToLayer=wo,xo.coordsToLatLng=So,xo.coordsToLatLngs=Co,xo.latLngToCoords=ko,xo.latLngsToCoords=Eo,xo.getFeature=To,xo.asFeature=Oo,Ht.mergeOptions({boxZoom:!0}),K=Q.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){_t(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ct(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ot(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),We(),ft(),this._startPoint=this._map.mouseEventToContainerPoint(e),_t(document,{contextmenu:Lt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=tt("div","leaflet-zoom-box",this._container),at(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=(e=new N(this._point,this._startPoint)).getSize();pt(this._box,e.min),this._box.style.width=t.x+"px",this._box.style.height=t.y+"px"},_finish:function(){this._moved&&(ot(this._box),lt(this._container,"leaflet-crosshair")),qe(),bt(),Ct(document,{contextmenu:Lt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){1!==e.which&&1!==e.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0),e=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})))},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ht.addInitHook("addHandler","boxZoom",K),Ht.mergeOptions({doubleClickZoom:!0}),me=Q.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,o=t.getZoom(),n=t.options.zoomDelta;o=e.originalEvent.shiftKey?o-n:o+n,"center"===t.options.doubleClickZoom?t.setZoom(o):t.setZoomAround(e.containerPoint,o)}});var Yo=(Ht.addInitHook("addHandler","doubleClickZoom",me),Ht.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),Q.extend({addHooks:function(){var e;this._draggable||(e=this._map,this._draggable=new Yt(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))),at(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){lt(this._map._container,"leaflet-grab"),lt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e,t=this._map;t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(e=z(this._map.options.maxBounds),this._offsetLimit=I(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){var t,o;this._map.options.inertia&&(t=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(o),this._times.push(t),this._prunePositions(t)),this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;1<this._positions.length&&50<e-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){var e,t;this._viscosity&&this._offsetLimit&&(e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit,e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e))},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),o=this._initialWorldOffset,n=((r=this._draggable._newPos.x)-t+o)%e+t-o,r=(r+t+o)%e-t-o;e=Math.abs(n+o)<Math.abs(r+o)?n:r,this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=e},_onDragEnd:function(e){var t,o,n,r,i=this._map,s=i.options,a=!s.inertia||e.noInertia||this._times.length<2;i.fire("dragend",e),!a&&(this._prunePositions(+new Date),e=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,t=s.easeLinearity,a=(e=e.multiplyBy(t/a)).distanceTo([0,0]),o=Math.min(s.inertiaMaxSpeed,a),e=e.multiplyBy(o/a),n=o/(s.inertiaDeceleration*t),(r=e.multiplyBy(-n/2).round()).x||r.y)?(r=i._limitOffset(r,i.options.maxBounds),k((function(){i.panBy(r,{duration:n,easeLinearity:t,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}})),Ko=(Ht.addInitHook("addHandler","dragging",Yo),Ht.mergeOptions({keyboard:!0,keyboardPanDelta:80}),pe=Q.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),_t(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ct(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var e,t,o;this._focused||(o=document.body,e=document.documentElement,t=o.scrollTop||e.scrollTop,o=o.scrollLeft||e.scrollLeft,this._map._container.focus(),window.scrollTo(o,t))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){for(var t=this._panKeys={},o=this.keyCodes,n=0,r=o.left.length;n<r;n++)t[o.left[n]]=[-1*e,0];for(n=0,r=o.right.length;n<r;n++)t[o.right[n]]=[e,0];for(n=0,r=o.down.length;n<r;n++)t[o.down[n]]=[0,e];for(n=0,r=o.up.length;n<r;n++)t[o.up[n]]=[0,-1*e]},_setZoomDelta:function(e){for(var t=this._zoomKeys={},o=this.keyCodes,n=0,r=o.zoomIn.length;n<r;n++)t[o.zoomIn[n]]=e;for(n=0,r=o.zoomOut.length;n<r;n++)t[o.zoomOut[n]]=-e},_addHooks:function(){_t(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ct(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,o,n=e.keyCode,r=this._map;if(n in this._panKeys)r._panAnim&&r._panAnim._inProgress||(o=this._panKeys[n],e.shiftKey&&(o=R(o).multiplyBy(3)),r.options.maxBounds&&(o=r._limitOffset(R(o),r.options.maxBounds)),r.options.worldCopyJump?(t=r.wrapLatLng(r.unproject(r.project(r.getCenter()).add(o))),r.panTo(t)):r.panBy(o));else if(n in this._zoomKeys)r.setZoom(r.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!r._popup||!r._popup.options.closeOnEscapeKey)return;r.closePopup()}Lt(e)}}}),Ht.addInitHook("addHandler","keyboard",pe),Ht.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),ge=Q.extend({addHooks:function(){_t(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ct(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=Bt(e),o=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date),t=Math.max(o-(+new Date-this._startTime),0),clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),t),Lt(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),o=this._map.options.zoomSnap||0,n=(e._stop(),this._delta/(4*this._map.options.wheelPxPerZoomLevel));n=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=o?Math.ceil(n/o)*o:n,n=e._limitZoom(t+(0<this._delta?o:-o))-t,this._delta=0,this._startTime=null,n&&("center"===e.options.scrollWheelZoom?e.setZoom(t+n):e.setZoomAround(this._lastMousePos,t+n))}}),Ht.addInitHook("addHandler","scrollWheelZoom",ge),Ht.mergeOptions({tapHold:Oe.touchNative&&Oe.safari&&Oe.mobile,tapTolerance:15}),fe=Q.extend({addHooks:function(){_t(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ct(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){var t;clearTimeout(this._holdTimeout),1===e.touches.length&&(t=e.touches[0],this._startPos=this._newPos=new P(t.clientX,t.clientY),this._holdTimeout=setTimeout(r((function(){this._cancel(),this._isTapValid()&&(_t(document,"touchend",Dt),_t(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))}),this),600),_t(document,"touchend touchcancel contextmenu",this._cancel,this),_t(document,"touchmove",this._onMove,this))},_cancelClickPrevent:function e(){Ct(document,"touchend",Dt),Ct(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Ct(document,"touchend touchcancel contextmenu",this._cancel,this),Ct(document,"touchmove",this._onMove,this)},_onMove:function(e){e=e.touches[0],this._newPos=new P(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){(e=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY}))._simulated=!0,t.target.dispatchEvent(e)}}),Ht.addInitHook("addHandler","tapHold",fe),Ht.mergeOptions({touchZoom:Oe.touch,bounceAtZoomLimits:!0}),be=Q.extend({addHooks:function(){at(this._map._container,"leaflet-touch-zoom"),_t(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){lt(this._map._container,"leaflet-touch-zoom"),Ct(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t,o,n=this._map;!e.touches||2!==e.touches.length||n._animatingZoom||this._zooming||(t=n.mouseEventToContainerPoint(e.touches[0]),o=n.mouseEventToContainerPoint(e.touches[1]),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),"center"!==n.options.touchZoom&&(this._pinchStartLatLng=n.containerPointToLatLng(t.add(o)._divideBy(2))),this._startDist=t.distanceTo(o),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),_t(document,"touchmove",this._onTouchMove,this),_t(document,"touchend touchcancel",this._onTouchEnd,this),Dt(e))},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,o=t.mouseEventToContainerPoint(e.touches[0]),n=t.mouseEventToContainerPoint(e.touches[1]),i=o.distanceTo(n)/this._startDist;if(this._zoom=t.getScaleZoom(i,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&i<1||this._zoom>t.getMaxZoom()&&1<i)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1==i)return}else{if(o=o._add(n)._divideBy(2)._subtract(this._centerPoint),1==i&&0===o.x&&0===o.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),E(this._animRequest),n=r(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0),this._animRequest=k(n,this,!0),Dt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),Ct(document,"touchmove",this._onTouchMove,this),Ct(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}}),Ht.addInitHook("addHandler","touchZoom",be),Ht.BoxZoom=K,Ht.DoubleClickZoom=me,Ht.Drag=Yo,Ht.Keyboard=pe,Ht.ScrollWheelZoom=ge,Ht.TapHold=fe,Ht.TouchZoom=be,e.Bounds=N,e.Browser=Oe,e.CRS=j,e.Canvas=Vo,e.Circle=bo,e.CircleMarker=fo,e.Class=O,e.Control=Ut,e.DivIcon=Io,e.DivOverlay=Lo,e.DomEvent=J,e.DomUtil=X,e.Draggable=Yt,e.Evented=M,e.FeatureGroup=co,e.GeoJSON=xo,e.GridLayer=Bo,e.Handler=Q,e.Icon=uo,e.ImageOverlay=Mo,e.LatLng=F,e.LatLngBounds=B,e.Layer=ce,e.LayerGroup=lo,e.LineUtil=te,e.Map=Ht,e.Marker=po,e.Mixin=ee,e.Path=go,e.Point=P,e.PolyUtil=oe,e.Polygon=yo,e.Polyline=vo,e.Popup=Ro,e.PosAnimation=Ft,e.Projection=ie,e.Rectangle=Go,e.Renderer=jo,e.SVG=Wo,e.SVGOverlay=Do,e.TileLayer=zo,e.Tooltip=No,e.Transformation=Z,e.Util=T,e.VideoOverlay=Po,e.bind=r,e.bounds=I,e.canvas=Uo,e.circle=function(e,t,o){return new bo(e,t,o)},e.circleMarker=function(e,t){return new fo(e,t)},e.control=jt,e.divIcon=function(e){return new Io(e)},e.extend=t,e.featureGroup=function(e,t){return new co(e,t)},e.geoJSON=Ao,e.geoJson=ue,e.gridLayer=function(e){return new Bo(e)},e.icon=function(e){return new uo(e)},e.imageOverlay=function(e,t,o){return new Mo(e,t,o)},e.latLng=H,e.latLngBounds=z,e.layerGroup=function(e,t){return new lo(e,t)},e.map=function(e,t){return new Ht(e,t)},e.marker=function(e,t){return new po(e,t)},e.point=R,e.polygon=function(e,t){return new yo(e,t)},e.polyline=function(e,t){return new vo(e,t)},e.popup=function(e,t){return new Ro(e,t)},e.rectangle=function(e,t){return new Go(e,t)},e.setOptions=m,e.stamp=s,e.svg=qo,e.svgOverlay=function(e,t,o){return new Do(e,t,o)},e.tileLayer=Fo,e.tooltip=function(e,t){return new No(e,t)},e.transformation=$,e.version="1.9.3",e.videoOverlay=function(e,t,o){return new Po(e,t,o)},window.L);e.noConflict=function(){return window.L=Ko,this},window.L=e}(t)},14921:(e,t,o)=>{"use strict";o.d(t,{U4:()=>ke,S1:()=>ye,on:()=>be,PF:()=>Ce});Object.create||function(){function e(){}}();var n=0;function r(e){return"_leaflet_id"in e||(e._leaflet_id=++n),e._leaflet_id}function i(){return!1}function s(e,t){if(!1===t)return e;var o=Math.pow(10,void 0===t?6:t);return Math.round(e*o)/o}function a(e){return function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).split(/\s+/)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function c(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var d=0;function u(e){var t=+new Date,o=Math.max(0,16-(t-d));return d=t+o,window.setTimeout(e,o)}window.requestAnimationFrame||c("RequestAnimationFrame"),window.cancelAnimationFrame||c("CancelAnimationFrame")||c("CancelRequestAnimationFrame");function h(e,t,o){this.x=o?Math.round(e):e,this.y=o?Math.round(t):t}var m=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};function p(e,t,o){return e instanceof h?e:l(e)?new h(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new h(e.x,e.y):new h(e,t,o)}h.prototype={clone:function(){return new h(this.x,this.y)},add:function(e){return this.clone()._add(p(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(p(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new h(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new h(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=m(this.x),this.y=m(this.y),this},distanceTo:function(e){var t=(e=p(e)).x-this.x,o=e.y-this.y;return Math.sqrt(t*t+o*o)},equals:function(e){return(e=p(e)).x===this.x&&e.y===this.y},contains:function(e){return e=p(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+s(this.x)+", "+s(this.y)+")"}};var g,f,b=document.documentElement.style,v="ActiveXObject"in window,y=v&&!document.addEventListener,x="msLaunchUri"in navigator&&!("documentMode"in document),w=J("webkit"),_=J("android"),S=J("android 2")||J("android 3"),C=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),k=_&&J("Google")&&C<537&&!("AudioNode"in window),E=!!window.opera,T=!x&&J("chrome"),O=J("gecko")&&!w&&!E&&!v,A=!T&&J("safari"),M=J("phantom"),P="OTransition"in b,D=0===navigator.platform.indexOf("Win"),L=v&&"transition"in b,R="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!S,N="MozPerspective"in b,I=!window.L_DISABLE_3D&&(L||R||N)&&!P&&!M,B="undefined"!=typeof orientation||J("mobile"),z=B&&w,F=B&&R,H=!window.PointerEvent&&window.MSPointerEvent,j=!(!window.PointerEvent&&!H),V="ontouchstart"in window||!!window.TouchEvent,U=!window.L_NO_TOUCH&&(V||j),Z=B&&E,$=B&&O,W=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,q=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",i,t),window.removeEventListener("testPassiveEventSupport",i,t)}catch(e){}return e}(),G=!!document.createElement("canvas").getContext,Y=!(!document.createElementNS||!(g="svg",document.createElementNS("http://www.w3.org/2000/svg",g)).createSVGRect),K=!!Y&&((f=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(f.firstChild&&f.firstChild.namespaceURI)),X=!Y&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}();function J(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}const Q={ie:v,ielt9:y,edge:x,webkit:w,android:_,android23:S,androidStock:k,opera:E,chrome:T,gecko:O,safari:A,phantom:M,opera12:P,win:D,ie3d:L,webkit3d:R,gecko3d:N,any3d:I,mobile:B,mobileWebkit:z,mobileWebkit3d:F,msPointer:H,pointer:j,touch:U,touchNative:V,mobileOpera:Z,mobileGecko:$,retina:W,passiveEvents:q,canvas:G,svg:Y,vml:X,inlineSvg:K,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")};var ee=Q.msPointer?"MSPointerDown":"pointerdown",te=Q.msPointer?"MSPointerMove":"pointermove",oe=Q.msPointer?"MSPointerUp":"pointerup",ne=Q.msPointer?"MSPointerCancel":"pointercancel",re={touchstart:ee,touchmove:te,touchend:oe,touchcancel:ne},ie={touchstart:function(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ce(t);he(e,t)},touchmove:he,touchend:he,touchcancel:he},se={},ae=!1;function le(e,t,o){return"touchstart"===t&&(ae||(document.addEventListener(ee,ce,!0),document.addEventListener(te,de,!0),document.addEventListener(oe,ue,!0),document.addEventListener(ne,ue,!0),ae=!0)),ie[t]?(o=ie[t].bind(this,o),e.addEventListener(re[t],o,!1),o):(console.warn("wrong event specified:",t),i)}function ce(e){se[e.pointerId]=e}function de(e){se[e.pointerId]&&(se[e.pointerId]=e)}function ue(e){delete se[e.pointerId]}function he(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var o in t.touches=[],se)t.touches.push(se[o]);t.changedTouches=[t],e(t)}}var me=200;var pe;ge(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ge(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function ge(e){for(var t=document.documentElement.style,o=0;o<e.length;o++)if(e[o]in t)return e[o];return!1}if("onselectstart"in document)(function(){be(window,"selectstart",Ce)}),function(){ye(window,"selectstart",Ce)};else{var fe=ge(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);(function(){if(fe){var e=document.documentElement.style;pe=e[fe],e[fe]="none"}}),function(){fe&&(document.documentElement.style[fe]=pe,pe=void 0)}}function be(e,t,o,n){if(t&&"object"==typeof t)for(var r in t)_e(e,r,t[r],o);else for(var i=0,s=(t=a(t)).length;i<s;i++)_e(e,t[i],o,n);return this}var ve="_leaflet_events";function ye(e,t,o,n){if(1===arguments.length)xe(e),delete e[ve];else if(t&&"object"==typeof t)for(var r in t)Se(e,r,t[r],o);else if(t=a(t),2===arguments.length)xe(e,(function(e){return-1!==function(e,t){for(var o=0;o<e.length;o++)if(e[o]===t)return o;return-1}(t,e)}));else for(var i=0,s=t.length;i<s;i++)Se(e,t[i],o,n);return this}function xe(e,t){for(var o in e[ve]){var n=o.split(/\d/)[0];t&&!t(n)||Se(e,n,null,null,o)}}var we={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function _e(e,t,o,n){var i=t+r(o)+(n?"_"+r(n):"");if(e[ve]&&e[ve][i])return this;var s=function(t){return o.call(n||e,t||window.event)},a=s;!Q.touchNative&&Q.pointer&&0===t.indexOf("touch")?s=le(e,t,s):Q.touch&&"dblclick"===t?s=function(e,t){e.addEventListener("dblclick",t);var o,n=0;function r(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var r=ke(e);if(!r.some((function(e){return e instanceof HTMLLabelElement&&e.attributes.for}))||r.some((function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement}))){var i=Date.now();i-n<=me?2==++o&&t(function(e){var t,o,n={};for(o in e)t=e[o],n[o]=t&&t.bind?t.bind(e):t;return e=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(e)):o=1,n=i}}}else o=e.detail}return e.addEventListener("click",r),{dblclick:t,simDblclick:r}}(e,s):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(we[t]||t,s,!!Q.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(s=function(t){t=t||window.event,function(e,t){var o=t.relatedTarget;if(!o)return!0;try{for(;o&&o!==e;)o=o.parentNode}catch(e){return!1}return o!==e}(e,t)&&a(t)},e.addEventListener(we[t],s,!1)):e.addEventListener(t,a,!1):e.attachEvent("on"+t,s),e[ve]=e[ve]||{},e[ve][i]=s}function Se(e,t,o,n,i){i=i||t+r(o)+(n?"_"+r(n):"");var s=e[ve]&&e[ve][i];if(!s)return this;!Q.touchNative&&Q.pointer&&0===t.indexOf("touch")?function(e,t,o){re[t]?e.removeEventListener(re[t],o,!1):console.warn("wrong event specified:",t)}(e,t,s):Q.touch&&"dblclick"===t?function(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}(e,s):"removeEventListener"in e?e.removeEventListener(we[t]||t,s,!1):e.detachEvent("on"+t,s),e[ve][i]=null}function Ce(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function ke(e){if(e.composedPath)return e.composedPath();for(var t=[],o=e.target;o;)t.push(o),o=o.parentNode;return t}(Q.linux&&Q.chrome||Q.mac||window.devicePixelRatio>0)&&window.devicePixelRatio},35493:()=>{},46685:(e,t,o)=>{"use strict";o.d(t,{Iq:()=>d});var n,r=function(){return r=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},r.apply(this,arguments)},i=function(){function e(e){this.options=e,this.listeners={}}return e.prototype.on=function(e,t){var o=this.listeners[e]||[];this.listeners[e]=o.concat([t])},e.prototype.triggerEvent=function(e,t){var o=this;(this.listeners[e]||[]).forEach((function(e){return e({target:o,event:t})}))},e}();!function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(n||(n={}));var s,a=function(){function e(){this.notifications=[]}return e.prototype.push=function(e){this.notifications.push(e),this.updateFn(e,n.Add,this.notifications)},e.prototype.splice=function(e,t){var o=this.notifications.splice(e,t)[0];return this.updateFn(o,n.Remove,this.notifications),o},e.prototype.indexOf=function(e){return this.notifications.indexOf(e)},e.prototype.onUpdate=function(e){this.updateFn=e},e}();!function(e){e.Dismiss="dismiss",e.Click="click"}(s||(s={}));var l={types:[{type:"success",className:"notyf__toast--success",backgroundColor:"#3dc763",icon:{className:"notyf__icon--success",tagName:"i"}},{type:"error",className:"notyf__toast--error",backgroundColor:"#ed3d3d",icon:{className:"notyf__icon--error",tagName:"i"}}],duration:2e3,ripple:!0,position:{x:"right",y:"bottom"},dismissible:!1},c=function(){function e(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:"flex-start",center:"center",right:"flex-end"},this.Y_POSITION_FLEX_MAP={top:"flex-start",center:"center",bottom:"flex-end"};var e=document.createDocumentFragment(),t=this._createHTMLElement({tagName:"div",className:"notyf"});e.appendChild(t),document.body.appendChild(e),this.container=t,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}return e.prototype.on=function(e,t){var o;this.events=r(r({},this.events),((o={})[e]=t,o))},e.prototype.update=function(e,t){t===n.Add?this.addNotification(e):t===n.Remove&&this.removeNotification(e)},e.prototype.removeNotification=function(e){var t,o,n=this,r=this._popRenderedNotification(e);r&&((t=r.node).classList.add("notyf__toast--disappear"),t.addEventListener(this.animationEndEventName,o=function(e){e.target===t&&(t.removeEventListener(n.animationEndEventName,o),n.container.removeChild(t))}))},e.prototype.addNotification=function(e){var t=this._renderNotification(e);this.notifications.push({notification:e,node:t}),this._announce(e.options.message||"Notification")},e.prototype._renderNotification=function(e){var t,o=this._buildNotificationCard(e),n=e.options.className;return n&&(t=o.classList).add.apply(t,n.split(" ")),this.container.appendChild(o),o},e.prototype._popRenderedNotification=function(e){for(var t=-1,o=0;o<this.notifications.length&&t<0;o++)this.notifications[o].notification===e&&(t=o);if(-1!==t)return this.notifications.splice(t,1)[0]},e.prototype.getXPosition=function(e){var t;return(null===(t=null==e?void 0:e.position)||void 0===t?void 0:t.x)||"right"},e.prototype.getYPosition=function(e){var t;return(null===(t=null==e?void 0:e.position)||void 0===t?void 0:t.y)||"bottom"},e.prototype.adjustContainerAlignment=function(e){var t=this.X_POSITION_FLEX_MAP[this.getXPosition(e)],o=this.Y_POSITION_FLEX_MAP[this.getYPosition(e)],n=this.container.style;n.setProperty("justify-content",o),n.setProperty("align-items",t)},e.prototype._buildNotificationCard=function(e){var t=this,o=e.options,n=o.icon;this.adjustContainerAlignment(o);var r=this._createHTMLElement({tagName:"div",className:"notyf__toast"}),i=this._createHTMLElement({tagName:"div",className:"notyf__ripple"}),a=this._createHTMLElement({tagName:"div",className:"notyf__wrapper"}),l=this._createHTMLElement({tagName:"div",className:"notyf__message"});l.innerHTML=o.message||"";var c=o.background||o.backgroundColor;if(n){var d=this._createHTMLElement({tagName:"div",className:"notyf__icon"});if(("string"==typeof n||n instanceof String)&&(d.innerHTML=new String(n).valueOf()),"object"==typeof n){var u=n.tagName,h=void 0===u?"i":u,m=n.className,p=n.text,g=n.color,f=void 0===g?c:g,b=this._createHTMLElement({tagName:h,className:m,text:p});f&&(b.style.color=f),d.appendChild(b)}a.appendChild(d)}if(a.appendChild(l),r.appendChild(a),c&&(o.ripple?(i.style.background=c,r.appendChild(i)):r.style.background=c),o.dismissible){var v=this._createHTMLElement({tagName:"div",className:"notyf__dismiss"}),y=this._createHTMLElement({tagName:"button",className:"notyf__dismiss-btn"});v.appendChild(y),a.appendChild(v),r.classList.add("notyf__toast--dismissible"),y.addEventListener("click",(function(o){var n,r;null===(r=(n=t.events)[s.Dismiss])||void 0===r||r.call(n,{target:e,event:o}),o.stopPropagation()}))}r.addEventListener("click",(function(o){var n,r;return null===(r=(n=t.events)[s.Click])||void 0===r?void 0:r.call(n,{target:e,event:o})}));var x="top"===this.getYPosition(o)?"upper":"lower";return r.classList.add("notyf__toast--"+x),r},e.prototype._createHTMLElement=function(e){var t=e.tagName,o=e.className,n=e.text,r=document.createElement(t);return o&&(r.className=o),r.textContent=n||null,r},e.prototype._createA11yContainer=function(){var e=this._createHTMLElement({tagName:"div",className:"notyf-announcer"});e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),e.style.border="0",e.style.clip="rect(0 0 0 0)",e.style.height="1px",e.style.margin="-1px",e.style.overflow="hidden",e.style.padding="0",e.style.position="absolute",e.style.width="1px",e.style.outline="0",document.body.appendChild(e),this.a11yContainer=e},e.prototype._announce=function(e){var t=this;this.a11yContainer.textContent="",setTimeout((function(){t.a11yContainer.textContent=e}),100)},e.prototype._getAnimationEndEventName=function(){var e,t=document.createElement("_fake"),o={MozTransition:"animationend",OTransition:"oAnimationEnd",WebkitTransition:"webkitAnimationEnd",transition:"animationend"};for(e in o)if(void 0!==t.style[e])return o[e];return"animationend"},e}(),d=function(){function e(e){var t=this;this.dismiss=this._removeNotification,this.notifications=new a,this.view=new c;var o=this.registerTypes(e);this.options=r(r({},l),e),this.options.types=o,this.notifications.onUpdate((function(e,o){return t.view.update(e,o)})),this.view.on(s.Dismiss,(function(e){var o=e.target,n=e.event;t._removeNotification(o),o.triggerEvent(s.Dismiss,n)})),this.view.on(s.Click,(function(e){var t=e.target,o=e.event;return t.triggerEvent(s.Click,o)}))}return e.prototype.error=function(e){var t=this.normalizeOptions("error",e);return this.open(t)},e.prototype.success=function(e){var t=this.normalizeOptions("success",e);return this.open(t)},e.prototype.open=function(e){var t=this.options.types.find((function(t){return t.type===e.type}))||{},o=r(r({},t),e);this.assignProps(["ripple","position","dismissible"],o);var n=new i(o);return this._pushNotification(n),n},e.prototype.dismissAll=function(){for(;this.notifications.splice(0,1););},e.prototype.assignProps=function(e,t){var o=this;e.forEach((function(e){t[e]=null==t[e]?o.options[e]:t[e]}))},e.prototype._pushNotification=function(e){var t=this;this.notifications.push(e);var o=void 0!==e.options.duration?e.options.duration:this.options.duration;o&&setTimeout((function(){return t._removeNotification(e)}),o)},e.prototype._removeNotification=function(e){var t=this.notifications.indexOf(e);-1!==t&&this.notifications.splice(t,1)},e.prototype.normalizeOptions=function(e,t){var o={type:e};return"string"==typeof t?o.message=t:"object"==typeof t&&(o=r(r({},o),t)),o},e.prototype.registerTypes=function(e){var t=(e&&e.types||[]).slice();return l.types.map((function(e){var o=-1;t.forEach((function(t,n){t.type===e.type&&(o=n)}));var n=-1!==o?t.splice(o,1)[0]:{};return r(r({},e),n)})).concat(t)},e}()},51474:(e,t,o)=>{"use strict";function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function r(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){s(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(e){return i="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},i(e)}function s(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},a.apply(this,arguments)}function l(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}o.d(t,{ZP:()=>st});function c(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var d=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=c(/Edge/i),h=c(/firefox/i),m=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),g=c(/chrome/i)&&c(/android/i),f={capture:!1,passive:!1};function b(e,t,o){e.addEventListener(t,o,!d&&f)}function v(e,t,o){e.removeEventListener(t,o,!d&&f)}function y(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function x(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function w(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&y(e,t):y(e,t))||n&&e===o)return e;if(e===o)break}while(e=x(e))}return null}var _,S=/\s+/g;function C(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(S," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(S," ")}}function k(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function E(e,t){var o="";if("string"==typeof e)o=e;else do{var n=k(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(o)}function T(e,t,o){if(e){var n=e.getElementsByTagName(t),r=0,i=n.length;if(o)for(;r<i;r++)o(n[r],r);return n}return[]}function O(){var e=document.scrollingElement;return e||document.documentElement}function A(e,t,o,n,r){if(e.getBoundingClientRect||e===window){var i,s,a,l,c,u,h;if(e!==window&&e.parentNode&&e!==O()?(s=(i=e.getBoundingClientRect()).top,a=i.left,l=i.bottom,c=i.right,u=i.height,h=i.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(t||o)&&e!==window&&(r=r||e.parentNode,!d))do{if(r&&r.getBoundingClientRect&&("none"!==k(r,"transform")||o&&"static"!==k(r,"position"))){var m=r.getBoundingClientRect();s-=m.top+parseInt(k(r,"border-top-width")),a-=m.left+parseInt(k(r,"border-left-width")),l=s+i.height,c=a+i.width;break}}while(r=r.parentNode);if(n&&e!==window){var p=E(r||e),g=p&&p.a,f=p&&p.d;p&&(l=(s/=f)+(u/=f),c=(a/=g)+(h/=g))}return{top:s,left:a,bottom:l,right:c,width:h,height:u}}}function M(e,t,o){for(var n=N(e,!0),r=A(e)[t];n;){var i=A(n)[o];if(!("top"===o||"left"===o?r>=i:r<=i))return n;if(n===O())break;n=N(n,!1)}return!1}function P(e,t,o,n){for(var r=0,i=0,s=e.children;i<s.length;){if("none"!==s[i].style.display&&s[i]!==Fe.ghost&&(n||s[i]!==Fe.dragged)&&w(s[i],o.draggable,e,!1)){if(r===t)return s[i];r++}i++}return null}function D(e,t){for(var o=e.lastElementChild;o&&(o===Fe.ghost||"none"===k(o,"display")||t&&!y(o,t));)o=o.previousElementSibling;return o||null}function L(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Fe.clone||t&&!y(e,t)||o++;return o}function R(e){var t=0,o=0,n=O();if(e)do{var r=E(e),i=r.a,s=r.d;t+=e.scrollLeft*i,o+=e.scrollTop*s}while(e!==n&&(e=e.parentNode));return[t,o]}function N(e,t){if(!e||!e.getBoundingClientRect)return O();var o=e,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var r=k(o);if(o.clientWidth<o.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!o.getBoundingClientRect||o===document.body)return O();if(n||t)return o;n=!0}}}while(o=o.parentNode);return O()}function I(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function B(e,t){return function(){if(!_){var o=arguments;1===o.length?e.call(this,o[0]):e.apply(this,o),_=setTimeout((function(){_=void 0}),t)}}}function z(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function F(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}var H="Sortable"+(new Date).getTime();function j(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==k(e,"display")&&e!==Fe.ghost){t.push({target:e,rect:A(e)});var o=r({},t[t.length-1].rect);if(e.thisAnimationDuration){var n=E(e,!0);n&&(o.top-=n.f,o.left-=n.e)}e.fromRect=o}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var o in e)if(e.hasOwnProperty(o))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[o][n])return Number(o);return-1}(t,{target:e}),1)},animateAll:function(o){var n=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof o&&o());var r=!1,i=0;t.forEach((function(e){var t=0,o=e.target,s=o.fromRect,a=A(o),l=o.prevFromRect,c=o.prevToRect,d=e.rect,u=E(o,!0);u&&(a.top-=u.f,a.left-=u.e),o.toRect=a,o.thisAnimationDuration&&I(l,a)&&!I(s,a)&&(d.top-a.top)/(d.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(t=function(e,t,o,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*n.animation}(d,l,c,n.options)),I(a,s)||(o.prevFromRect=s,o.prevToRect=a,t||(t=n.options.animation),n.animate(o,d,a,t)),t&&(r=!0,i=Math.max(i,t),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),t),o.thisAnimationDuration=t)})),clearTimeout(e),r?e=setTimeout((function(){"function"==typeof o&&o()}),i):"function"==typeof o&&o(),t=[]},animate:function(e,t,o,n){if(n){k(e,"transition",""),k(e,"transform","");var r=E(this.el),i=r&&r.a,s=r&&r.d,a=(t.left-o.left)/(i||1),l=(t.top-o.top)/(s||1);e.animatingX=!!a,e.animatingY=!!l,k(e,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),k(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),k(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){k(e,"transition",""),k(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),n)}}}}var V=[],U={initializeByDefault:!0},Z={mount:function(e){for(var t in U)U.hasOwnProperty(t)&&!(t in e)&&(e[t]=U[t]);V.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),V.push(e)},pluginEvent:function(e,t,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var i=e+"Global";V.forEach((function(n){t[n.pluginName]&&(t[n.pluginName][i]&&t[n.pluginName][i](r({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](r({sortable:t},o)))}))},initializePlugins:function(e,t,o,n){for(var r in V.forEach((function(n){var r=n.pluginName;if(e.options[r]||n.initializeByDefault){var i=new n(e,t,e.options);i.sortable=e,i.options=e.options,e[r]=i,a(o,i.defaults)}})),e.options)if(e.options.hasOwnProperty(r)){var i=this.modifyOption(e,r,e.options[r]);void 0!==i&&(e.options[r]=i)}},getEventProperties:function(e,t){var o={};return V.forEach((function(n){"function"==typeof n.eventProperties&&a(o,n.eventProperties.call(t[n.pluginName],e))})),o},modifyOption:function(e,t,o){var n;return V.forEach((function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(n=r.optionListeners[t].call(e[r.pluginName],o))})),n}};function $(e){var t=e.sortable,o=e.rootEl,n=e.name,i=e.targetEl,s=e.cloneEl,a=e.toEl,l=e.fromEl,c=e.oldIndex,h=e.newIndex,m=e.oldDraggableIndex,p=e.newDraggableIndex,g=e.originalEvent,f=e.putSortable,b=e.extraEventProperties;if(t=t||o&&o[H]){var v,y=t.options,x="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||d||u?(v=document.createEvent("Event")).initEvent(n,!0,!0):v=new CustomEvent(n,{bubbles:!0,cancelable:!0}),v.to=a||o,v.from=l||o,v.item=i||o,v.clone=s,v.oldIndex=c,v.newIndex=h,v.oldDraggableIndex=m,v.newDraggableIndex=p,v.originalEvent=g,v.pullMode=f?f.lastPutMode:void 0;var w=r(r({},b),Z.getEventProperties(n,t));for(var _ in w)v[_]=w[_];o&&o.dispatchEvent(v),y[x]&&y[x].call(t,v)}}var W=["evt"],q=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,i=l(o,W);Z.pluginEvent.bind(Fe)(e,t,r({dragEl:Y,parentEl:K,ghostEl:X,rootEl:J,nextEl:Q,lastDownEl:ee,cloneEl:te,cloneHidden:oe,dragStarted:ge,putSortable:le,activeSortable:Fe.active,originalEvent:n,oldIndex:ne,oldDraggableIndex:ie,newIndex:re,newDraggableIndex:se,hideGhostForTarget:Ne,unhideGhostForTarget:Ie,cloneNowHidden:function(){oe=!0},cloneNowShown:function(){oe=!1},dispatchSortableEvent:function(e){G({sortable:t,name:e,originalEvent:n})}},i))};function G(e){$(r({putSortable:le,cloneEl:te,targetEl:Y,rootEl:J,oldIndex:ne,oldDraggableIndex:ie,newIndex:re,newDraggableIndex:se},e))}var Y,K,X,J,Q,ee,te,oe,ne,re,ie,se,ae,le,ce,de,ue,he,me,pe,ge,fe,be,ve,ye,xe=!1,we=!1,_e=[],Se=!1,Ce=!1,ke=[],Ee=!1,Te=[],Oe="undefined"!=typeof document,Ae=p,Me=u||d?"cssFloat":"float",Pe=Oe&&!g&&!p&&"draggable"in document.createElement("div"),De=function(){if(Oe){if(d)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Le=function(e,t){var o=k(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=P(e,0,t),i=P(e,1,t),s=r&&k(r),a=i&&k(i),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(r).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(i).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&"none"!==s.float){var d="left"===s.float?"left":"right";return!i||"both"!==a.clear&&a.clear!==d?"horizontal":"vertical"}return r&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=n&&"none"===o[Me]||i&&"none"===o[Me]&&l+c>n)?"vertical":"horizontal"},Re=function(e){function t(e,o){return function(n,r,i,s){var a=n.options.group.name&&r.options.group.name&&n.options.group.name===r.options.group.name;if(null==e&&(o||a))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,r,i,s),o)(n,r,i,s);var l=(o?n:r).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var o={},n=e.group;n&&"object"==i(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},Ne=function(){!De&&X&&k(X,"display","none")},Ie=function(){!De&&X&&k(X,"display","")};Oe&&!g&&document.addEventListener("click",(function(e){if(we)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),we=!1,!1}),!0);var Be=function(e){if(Y){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,i=e.clientY,_e.some((function(e){var t=e[H].options.emptyInsertThreshold;if(t&&!D(e)){var o=A(e),n=r>=o.left-t&&r<=o.right+t,a=i>=o.top-t&&i<=o.bottom+t;return n&&a?s=e:void 0}})),s);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[H]._onDragOver(o)}}var r,i,s},ze=function(e){Y&&Y.parentNode[H]._isOutsideThisEl(e.target)};function Fe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=a({},t),e[H]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Le(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Fe.supportPointer&&"PointerEvent"in window&&!m,emptyInsertThreshold:5};for(var n in Z.initializePlugins(this,e,o),o)!(n in t)&&(t[n]=o[n]);for(var r in Re(t),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!t.forceFallback&&Pe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?b(e,"pointerdown",this._onTapStart):(b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),_e.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),a(this,j())}function He(e,t,o,n,r,i,s,a){var l,c,h=e[H],m=h.options.onMove;return!window.CustomEvent||d||u?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=o,l.draggedRect=n,l.related=r||t,l.relatedRect=i||A(t),l.willInsertAfter=a,l.originalEvent=s,e.dispatchEvent(l),m&&(c=m.call(h,l,s)),c}function je(e){e.draggable=!1}function Ve(){Ee=!1}function Ue(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,n=0;o--;)n+=t.charCodeAt(o);return n.toString(36)}function Ze(e){return setTimeout(e,0)}function $e(e){return clearTimeout(e)}Fe.prototype={constructor:Fe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(fe=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Y):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,n=this.options,r=n.preventOnFilter,i=e.type,s=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,a=(s||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||a,c=n.filter;if(function(e){Te.length=0;var t=e.getElementsByTagName("input"),o=t.length;for(;o--;){var n=t[o];n.checked&&Te.push(n)}}(o),!Y&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!m||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=w(a,n.draggable,o,!1))&&a.animated||ee===a)){if(ne=L(a),ie=L(a,n.draggable),"function"==typeof c){if(c.call(this,e,a,this))return G({sortable:t,rootEl:l,name:"filter",targetEl:a,toEl:o,fromEl:o}),q("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=w(l,n.trim(),o,!1))return G({sortable:t,rootEl:n,name:"filter",targetEl:a,fromEl:o,toEl:o}),q("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());n.handle&&!w(l,n.handle,o,!1)||this._prepareDragStart(e,s,a)}}},_prepareDragStart:function(e,t,o){var n,r=this,i=r.el,s=r.options,a=i.ownerDocument;if(o&&!Y&&o.parentNode===i){var l=A(o);if(J=i,K=(Y=o).parentNode,Q=Y.nextSibling,ee=o,ae=s.group,Fe.dragged=Y,ce={target:Y,clientX:(t||e).clientX,clientY:(t||e).clientY},me=ce.clientX-l.left,pe=ce.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Y.style["will-change"]="all",n=function(){q("delayEnded",r,{evt:e}),Fe.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!h&&r.nativeDraggable&&(Y.draggable=!0),r._triggerDragStart(e,t),G({sortable:r,name:"choose",originalEvent:e}),C(Y,s.chosenClass,!0))},s.ignore.split(",").forEach((function(e){T(Y,e.trim(),je)})),b(a,"dragover",Be),b(a,"mousemove",Be),b(a,"touchmove",Be),b(a,"mouseup",r._onDrop),b(a,"touchend",r._onDrop),b(a,"touchcancel",r._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Y.draggable=!0),q("delayStart",this,{evt:e}),!s.delay||s.delayOnTouchOnly&&!t||this.nativeDraggable&&(u||d))n();else{if(Fe.eventCanceled)return void this._onDrop();b(a,"mouseup",r._disableDelayedDrag),b(a,"touchend",r._disableDelayedDrag),b(a,"touchcancel",r._disableDelayedDrag),b(a,"mousemove",r._delayedDragTouchMoveHandler),b(a,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&b(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(n,s.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Y&&je(Y),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._disableDelayedDrag),v(e,"touchend",this._disableDelayedDrag),v(e,"touchcancel",this._disableDelayedDrag),v(e,"mousemove",this._delayedDragTouchMoveHandler),v(e,"touchmove",this._delayedDragTouchMoveHandler),v(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?b(document,"pointermove",this._onTouchMove):b(document,t?"touchmove":"mousemove",this._onTouchMove):(b(Y,"dragend",this),b(J,"dragstart",this._onDragStart));try{document.selection?Ze((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(xe=!1,J&&Y){q("dragStarted",this,{evt:t}),this.nativeDraggable&&b(document,"dragover",ze);var o=this.options;!e&&C(Y,o.dragClass,!1),C(Y,o.ghostClass,!0),Fe.active=this,e&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(de){this._lastX=de.clientX,this._lastY=de.clientY,Ne();for(var e=document.elementFromPoint(de.clientX,de.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(de.clientX,de.clientY))!==t;)t=e;if(Y.parentNode[H]._isOutsideThisEl(e),t)do{if(t[H]){if(t[H]._onDragOver({clientX:de.clientX,clientY:de.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ie()}},_onTouchMove:function(e){if(ce){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,r=e.touches?e.touches[0]:e,i=X&&E(X,!0),s=X&&i&&i.a,a=X&&i&&i.d,l=Ae&&ye&&R(ye),c=(r.clientX-ce.clientX+n.x)/(s||1)+(l?l[0]-ke[0]:0)/(s||1),d=(r.clientY-ce.clientY+n.y)/(a||1)+(l?l[1]-ke[1]:0)/(a||1);if(!Fe.active&&!xe){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(X){i?(i.e+=c-(ue||0),i.f+=d-(he||0)):i={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");k(X,"webkitTransform",u),k(X,"mozTransform",u),k(X,"msTransform",u),k(X,"transform",u),ue=c,he=d,de=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!X){var e=this.options.fallbackOnBody?document.body:J,t=A(Y,!0,Ae,!0,e),o=this.options;if(Ae){for(ye=e;"static"===k(ye,"position")&&"none"===k(ye,"transform")&&ye!==document;)ye=ye.parentNode;ye!==document.body&&ye!==document.documentElement?(ye===document&&(ye=O()),t.top+=ye.scrollTop,t.left+=ye.scrollLeft):ye=O(),ke=R(ye)}C(X=Y.cloneNode(!0),o.ghostClass,!1),C(X,o.fallbackClass,!0),C(X,o.dragClass,!0),k(X,"transition",""),k(X,"transform",""),k(X,"box-sizing","border-box"),k(X,"margin",0),k(X,"top",t.top),k(X,"left",t.left),k(X,"width",t.width),k(X,"height",t.height),k(X,"opacity","0.8"),k(X,"position",Ae?"absolute":"fixed"),k(X,"zIndex","100000"),k(X,"pointerEvents","none"),Fe.ghost=X,e.appendChild(X),k(X,"transform-origin",me/parseInt(X.style.width)*100+"% "+pe/parseInt(X.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,n=e.dataTransfer,r=o.options;q("dragStart",this,{evt:e}),Fe.eventCanceled?this._onDrop():(q("setupClone",this),Fe.eventCanceled||((te=F(Y)).removeAttribute("id"),te.draggable=!1,te.style["will-change"]="",this._hideClone(),C(te,this.options.chosenClass,!1),Fe.clone=te),o.cloneId=Ze((function(){q("clone",o),Fe.eventCanceled||(o.options.removeCloneOnHide||J.insertBefore(te,Y),o._hideClone(),G({sortable:o,name:"clone"}))})),!t&&C(Y,r.dragClass,!0),t?(we=!0,o._loopId=setInterval(o._emulateDragOver,50)):(v(document,"mouseup",o._onDrop),v(document,"touchend",o._onDrop),v(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(o,n,Y)),b(document,"drop",o),k(Y,"transform","translateZ(0)")),xe=!0,o._dragStartId=Ze(o._dragStarted.bind(o,t,e)),b(document,"selectstart",o),ge=!0,m&&k(document.body,"user-select","none"))},_onDragOver:function(e){var t,o,n,i,s=this.el,a=e.target,l=this.options,c=l.group,d=Fe.active,u=ae===c,h=l.sort,m=le||d,p=this,g=!1;if(!Ee){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=w(a,l.draggable,s,!0),F("dragOver"),Fe.eventCanceled)return g;if(Y.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return V(!1);if(we=!1,d&&!l.disabled&&(u?h||(n=K!==J):le===this||(this.lastPutMode=ae.checkPull(this,d,Y,e))&&c.checkPut(this,d,Y,e))){if(i="vertical"===this._getDirection(e,a),t=A(Y),F("dragOverValid"),Fe.eventCanceled)return g;if(n)return K=J,j(),this._hideClone(),F("revert"),Fe.eventCanceled||(Q?J.insertBefore(Y,Q):J.appendChild(Y)),V(!0);var f=D(s,l.draggable);if(!f||function(e,t,o){var n=A(D(o.el,o.options.draggable)),r=10;return t?e.clientX>n.right+r||e.clientX<=n.right&&e.clientY>n.bottom&&e.clientX>=n.left:e.clientX>n.right&&e.clientY>n.top||e.clientX<=n.right&&e.clientY>n.bottom+r}(e,i,this)&&!f.animated){if(f===Y)return V(!1);if(f&&s===e.target&&(a=f),a&&(o=A(a)),!1!==He(J,s,Y,t,a,o,e,!!a))return j(),f&&f.nextSibling?s.insertBefore(Y,f.nextSibling):s.appendChild(Y),K=s,U(),V(!0)}else if(f&&function(e,t,o){var n=A(P(o.el,0,o.options,!0)),r=10;return t?e.clientX<n.left-r||e.clientY<n.top&&e.clientX<n.right:e.clientY<n.top-r||e.clientY<n.bottom&&e.clientX<n.left}(e,i,this)){var b=P(s,0,l,!0);if(b===Y)return V(!1);if(o=A(a=b),!1!==He(J,s,Y,t,a,o,e,!1))return j(),s.insertBefore(Y,b),K=s,U(),V(!0)}else if(a.parentNode===s){o=A(a);var v,y,x,_=Y.parentNode!==s,S=!function(e,t,o){var n=o?e.left:e.top,r=o?e.right:e.bottom,i=o?e.width:e.height,s=o?t.left:t.top,a=o?t.right:t.bottom,l=o?t.width:t.height;return n===s||r===a||n+i/2===s+l/2}(Y.animated&&Y.toRect||t,a.animated&&a.toRect||o,i),E=i?"top":"left",T=M(a,"top","top")||M(Y,"top","top"),O=T?T.scrollTop:void 0;if(fe!==a&&(y=o[E],Se=!1,Ce=!S&&l.invertSwap||_),v=function(e,t,o,n,r,i,s,a){var l=n?e.clientY:e.clientX,c=n?o.height:o.width,d=n?o.top:o.left,u=n?o.bottom:o.right,h=!1;if(!s)if(a&&ve<c*r){if(!Se&&(1===be?l>d+c*i/2:l<u-c*i/2)&&(Se=!0),Se)h=!0;else if(1===be?l<d+ve:l>u-ve)return-be}else if(l>d+c*(1-r)/2&&l<u-c*(1-r)/2)return function(e){return L(Y)<L(e)?1:-1}(t);if((h=h||s)&&(l<d+c*i/2||l>u-c*i/2))return l>d+c/2?1:-1;return 0}(e,a,o,i,S?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Ce,fe===a),0!==v){var R=L(Y);do{R-=v,x=K.children[R]}while(x&&("none"===k(x,"display")||x===X))}if(0===v||x===a)return V(!1);fe=a,be=v;var N=a.nextElementSibling,I=!1,B=He(J,s,Y,t,a,o,e,I=1===v);if(!1!==B)return 1!==B&&-1!==B||(I=1===B),Ee=!0,setTimeout(Ve,30),j(),I&&!N?s.appendChild(Y):a.parentNode.insertBefore(Y,I?N:a),T&&z(T,0,O-T.scrollTop),K=Y.parentNode,void 0===y||Ce||(ve=Math.abs(y-A(a)[E])),U(),V(!0)}if(s.contains(Y))return V(!1)}return!1}function F(l,c){q(l,p,r({evt:e,isOwner:u,axis:i?"vertical":"horizontal",revert:n,dragRect:t,targetRect:o,canSort:h,fromSortable:m,target:a,completed:V,onMove:function(o,n){return He(J,s,Y,t,o,A(o),e,n)},changed:U},c))}function j(){F("dragOverAnimationCapture"),p.captureAnimationState(),p!==m&&m.captureAnimationState()}function V(t){return F("dragOverCompleted",{insertion:t}),t&&(u?d._hideClone():d._showClone(p),p!==m&&(C(Y,le?le.options.ghostClass:d.options.ghostClass,!1),C(Y,l.ghostClass,!0)),le!==p&&p!==Fe.active?le=p:p===Fe.active&&le&&(le=null),m===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){F("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(a===Y&&!Y.animated||a===s&&!a.animated)&&(fe=null),l.dragoverBubble||e.rootEl||a===document||(Y.parentNode[H]._isOutsideThisEl(e.target),!t&&Be(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function U(){re=L(Y),se=L(Y,l.draggable),G({sortable:p,name:"change",toEl:s,newIndex:re,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",Be),v(document,"mousemove",Be),v(document,"touchmove",Be)},_offUpEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._onDrop),v(e,"touchend",this._onDrop),v(e,"pointerup",this._onDrop),v(e,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;re=L(Y),se=L(Y,o.draggable),q("drop",this,{evt:e}),K=Y&&Y.parentNode,re=L(Y),se=L(Y,o.draggable),Fe.eventCanceled||(xe=!1,Ce=!1,Se=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$e(this.cloneId),$e(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),m&&k(document.body,"user-select",""),k(Y,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),X&&X.parentNode&&X.parentNode.removeChild(X),(J===K||le&&"clone"!==le.lastPutMode)&&te&&te.parentNode&&te.parentNode.removeChild(te),Y&&(this.nativeDraggable&&v(Y,"dragend",this),je(Y),Y.style["will-change"]="",ge&&!xe&&C(Y,le?le.options.ghostClass:this.options.ghostClass,!1),C(Y,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:K,newIndex:null,newDraggableIndex:null,originalEvent:e}),J!==K?(re>=0&&(G({rootEl:K,name:"add",toEl:K,fromEl:J,originalEvent:e}),G({sortable:this,name:"remove",toEl:K,originalEvent:e}),G({rootEl:K,name:"sort",toEl:K,fromEl:J,originalEvent:e}),G({sortable:this,name:"sort",toEl:K,originalEvent:e})),le&&le.save()):re!==ne&&re>=0&&(G({sortable:this,name:"update",toEl:K,originalEvent:e}),G({sortable:this,name:"sort",toEl:K,originalEvent:e})),Fe.active&&(null!=re&&-1!==re||(re=ne,se=ie),G({sortable:this,name:"end",toEl:K,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){q("nulling",this),J=Y=K=X=Q=te=ee=oe=ce=de=ge=re=se=ne=ie=fe=be=le=ae=Fe.dragged=Fe.ghost=Fe.clone=Fe.active=null,Te.forEach((function(e){e.checked=!0})),Te.length=ue=he=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Y&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,r=o.length,i=this.options;n<r;n++)w(e=o[n],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||Ue(e));return t},sort:function(e,t){var o={},n=this.el;this.toArray().forEach((function(e,t){var r=n.children[t];w(r,this.options.draggable,n,!1)&&(o[e]=r)}),this),t&&this.captureAnimationState(),e.forEach((function(e){o[e]&&(n.removeChild(o[e]),n.appendChild(o[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return w(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(void 0===t)return o[e];var n=Z.modifyOption(this,e,t);o[e]=void 0!==n?n:t,"group"===e&&Re(o)},destroy:function(){q("destroy",this);var e=this.el;e[H]=null,v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart),v(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_e.splice(_e.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!oe){if(q("hideClone",this),Fe.eventCanceled)return;k(te,"display","none"),this.options.removeCloneOnHide&&te.parentNode&&te.parentNode.removeChild(te),oe=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(oe){if(q("showClone",this),Fe.eventCanceled)return;Y.parentNode!=J||this.options.group.revertClone?Q?J.insertBefore(te,Q):J.appendChild(te):J.insertBefore(te,Y),this.options.group.revertClone&&this.animate(Y,te),k(te,"display",""),oe=!1}}else this._hideClone()}},Oe&&b(document,"touchmove",(function(e){(Fe.active||xe)&&e.cancelable&&e.preventDefault()})),Fe.utils={on:b,off:v,css:k,find:T,is:function(e,t){return!!w(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},throttle:B,closest:w,toggleClass:C,clone:F,index:L,nextTick:Ze,cancelNextTick:$e,detectDirection:Le,getChild:P},Fe.get=function(e){return e[H]},Fe.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Fe.utils=r(r({},Fe.utils),e.utils)),Z.mount(e)}))},Fe.create=function(e,t){return new Fe(e,t)},Fe.version="1.15.0";var We,qe,Ge,Ye,Ke,Xe,Je=[],Qe=!1;function et(){Je.forEach((function(e){clearInterval(e.pid)})),Je=[]}function tt(){clearInterval(Xe)}var ot=B((function(e,t,o,n){if(t.scroll){var r,i=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,c=O(),d=!1;qe!==o&&(qe=o,et(),We=t.scroll,r=t.scrollFn,!0===We&&(We=N(o,!0)));var u=0,h=We;do{var m=h,p=A(m),g=p.top,f=p.bottom,b=p.left,v=p.right,y=p.width,x=p.height,w=void 0,_=void 0,S=m.scrollWidth,C=m.scrollHeight,E=k(m),T=m.scrollLeft,M=m.scrollTop;m===c?(w=y<S&&("auto"===E.overflowX||"scroll"===E.overflowX||"visible"===E.overflowX),_=x<C&&("auto"===E.overflowY||"scroll"===E.overflowY||"visible"===E.overflowY)):(w=y<S&&("auto"===E.overflowX||"scroll"===E.overflowX),_=x<C&&("auto"===E.overflowY||"scroll"===E.overflowY));var P=w&&(Math.abs(v-i)<=a&&T+y<S)-(Math.abs(b-i)<=a&&!!T),D=_&&(Math.abs(f-s)<=a&&M+x<C)-(Math.abs(g-s)<=a&&!!M);if(!Je[u])for(var L=0;L<=u;L++)Je[L]||(Je[L]={});Je[u].vx==P&&Je[u].vy==D&&Je[u].el===m||(Je[u].el=m,Je[u].vx=P,Je[u].vy=D,clearInterval(Je[u].pid),0==P&&0==D||(d=!0,Je[u].pid=setInterval(function(){n&&0===this.layer&&Fe.active._onTouchMove(Ke);var t=Je[this.layer].vy?Je[this.layer].vy*l:0,o=Je[this.layer].vx?Je[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(Fe.dragged.parentNode[H],o,t,e,Ke,Je[this.layer].el)||z(Je[this.layer].el,o,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&h!==c&&(h=N(h,!1)));Qe=d}}),30),nt=function(e){var t=e.originalEvent,o=e.putSortable,n=e.dragEl,r=e.activeSortable,i=e.dispatchSortableEvent,s=e.hideGhostForTarget,a=e.unhideGhostForTarget;if(t){var l=o||r;s();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(d)&&(i("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function rt(){}function it(){}rt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=P(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:nt},a(rt,{pluginName:"revertOnSpill"}),it.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:nt},a(it,{pluginName:"removeOnSpill"});Fe.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):this.options.supportPointer?b(document,"pointermove",this._handleFallbackAutoScroll):t.touches?b(document,"touchmove",this._handleFallbackAutoScroll):b(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):(v(document,"pointermove",this._handleFallbackAutoScroll),v(document,"touchmove",this._handleFallbackAutoScroll),v(document,"mousemove",this._handleFallbackAutoScroll)),tt(),et(),clearTimeout(_),_=void 0},nulling:function(){Ke=qe=We=Qe=Xe=Ge=Ye=null,Je.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,n=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(n,r);if(Ke=e,t||this.options.forceAutoScrollFallback||u||d||m){ot(e,this.options,i,t);var s=N(i,!0);!Qe||Xe&&n===Ge&&r===Ye||(Xe&&tt(),Xe=setInterval((function(){var i=N(document.elementFromPoint(n,r),!0);i!==s&&(s=i,et()),ot(e,o.options,i,t)}),10),Ge=n,Ye=r)}else{if(!this.options.bubbleScroll||N(i,!0)===O())return void et();ot(e,this.options,N(i,!1),!1)}}},a(e,{pluginName:"scroll",initializeByDefault:!0})}),Fe.mount(it,rt);const st=Fe},86455:function(e){e.exports=function(){"use strict";function e(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}function t(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(t,o){return t.get(e(t,o))}function n(e,o,n){t(e,o),o.set(e,n)}function r(t,o,n){return t.set(e(t,o),n),n}const i=100,s={},a=()=>{s.previousActiveElement instanceof HTMLElement?(s.previousActiveElement.focus(),s.previousActiveElement=null):document.body&&document.body.focus()},l=e=>new Promise((t=>{if(!e)return t();const o=window.scrollX,n=window.scrollY;s.restoreFocusTimeout=setTimeout((()=>{a(),t()}),i),window.scrollTo(o,n)})),c="swal2-",d=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce(((e,t)=>(e[t]=c+t,e)),{}),u=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=c+t,e)),{}),h="SweetAlert2:",m=e=>e.charAt(0).toUpperCase()+e.slice(1),p=e=>{console.warn(`${h} ${"object"==typeof e?e.join(" "):e}`)},g=e=>{console.error(`${h} ${e}`)},f=[],b=e=>{f.includes(e)||(f.push(e),p(e))},v=(e,t=null)=>{b(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`)},y=e=>"function"==typeof e?e():e,x=e=>e&&"function"==typeof e.toPromise,w=e=>x(e)?e.toPromise():Promise.resolve(e),_=e=>e&&Promise.resolve(e)===e,S=()=>document.body.querySelector(`.${d.container}`),C=e=>{const t=S();return t?t.querySelector(e):null},k=e=>C(`.${e}`),E=()=>k(d.popup),T=()=>k(d.icon),O=()=>k(d["icon-content"]),A=()=>k(d.title),M=()=>k(d["html-container"]),P=()=>k(d.image),D=()=>k(d["progress-steps"]),L=()=>k(d["validation-message"]),R=()=>C(`.${d.actions} .${d.confirm}`),N=()=>C(`.${d.actions} .${d.cancel}`),I=()=>C(`.${d.actions} .${d.deny}`),B=()=>k(d["input-label"]),z=()=>C(`.${d.loader}`),F=()=>k(d.actions),H=()=>k(d.footer),j=()=>k(d["timer-progress-bar"]),V=()=>k(d.close),U='\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n',Z=()=>{const e=E();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),o=Array.from(t).sort(((e,t)=>{const o=parseInt(e.getAttribute("tabindex")||"0"),n=parseInt(t.getAttribute("tabindex")||"0");return o>n?1:o<n?-1:0})),n=e.querySelectorAll(U),r=Array.from(n).filter((e=>"-1"!==e.getAttribute("tabindex")));return[...new Set(o.concat(r))].filter((e=>de(e)))},$=()=>Y(document.body,d.shown)&&!Y(document.body,d["toast-shown"])&&!Y(document.body,d["no-backdrop"]),W=()=>{const e=E();return!!e&&Y(e,d.toast)},q=()=>{const e=E();return!!e&&e.hasAttribute("data-loading")},G=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html"),n=o.querySelector("head");n&&Array.from(n.childNodes).forEach((t=>{e.appendChild(t)}));const r=o.querySelector("body");r&&Array.from(r.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},Y=(e,t)=>{if(!t)return!1;const o=t.split(/\s+/);for(let t=0;t<o.length;t++)if(!e.classList.contains(o[t]))return!1;return!0},K=(e,t)=>{Array.from(e.classList).forEach((o=>{Object.values(d).includes(o)||Object.values(u).includes(o)||Object.values(t.showClass||{}).includes(o)||e.classList.remove(o)}))},X=(e,t,o)=>{if(K(e,t),!t.customClass)return;const n=t.customClass[o];n&&("string"==typeof n||n.forEach?te(e,n):p(`Invalid type of customClass.${o}! Expected string or iterable object, got "${typeof n}"`))},J=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${d.popup} > .${d[t]}`);case"checkbox":return e.querySelector(`.${d.popup} > .${d.checkbox} input`);case"radio":return e.querySelector(`.${d.popup} > .${d.radio} input:checked`)||e.querySelector(`.${d.popup} > .${d.radio} input:first-child`);case"range":return e.querySelector(`.${d.popup} > .${d.range} input`);default:return e.querySelector(`.${d.popup} > .${d.input}`)}},Q=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},ee=(e,t,o)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{o?e.classList.add(t):e.classList.remove(t)})):o?e.classList.add(t):e.classList.remove(t)})))},te=(e,t)=>{ee(e,t,!0)},oe=(e,t)=>{ee(e,t,!1)},ne=(e,t)=>{const o=Array.from(e.children);for(let e=0;e<o.length;e++){const n=o[e];if(n instanceof HTMLElement&&Y(n,t))return n}},re=(e,t,o)=>{o===`${parseInt(`${o}`)}`&&(o=parseInt(o)),o||0===parseInt(`${o}`)?e.style.setProperty(t,"number"==typeof o?`${o}px`:o):e.style.removeProperty(t)},ie=(e,t="flex")=>{e&&(e.style.display=t)},se=e=>{e&&(e.style.display="none")},ae=(e,t="block")=>{e&&new MutationObserver((()=>{ce(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},le=(e,t,o,n)=>{const r=e.querySelector(t);r&&r.style.setProperty(o,n)},ce=(e,t,o="flex")=>{t?ie(e,o):se(e)},de=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),ue=()=>!de(R())&&!de(I())&&!de(N()),he=e=>!!(e.scrollHeight>e.clientHeight),me=(e,t)=>{let o=e;for(;o&&o!==t;){if(he(o))return!0;o=o.parentElement}return!1},pe=e=>{const t=window.getComputedStyle(e),o=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return o>0||n>0},ge=(e,t=!1)=>{const o=j();o&&de(o)&&(t&&(o.style.transition="none",o.style.width="100%"),setTimeout((()=>{o.style.transition=`width ${e/1e3}s linear`,o.style.width="0%"}),10))},fe=()=>{const e=j();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const o=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${o}%`},be=()=>"undefined"==typeof window||"undefined"==typeof document,ve=`\n <div aria-labelledby="${d.title}" aria-describedby="${d["html-container"]}" class="${d.popup}" tabindex="-1">\n   <button type="button" class="${d.close}"></button>\n   <ul class="${d["progress-steps"]}"></ul>\n   <div class="${d.icon}"></div>\n   <img class="${d.image}" />\n   <h2 class="${d.title}" id="${d.title}"></h2>\n   <div class="${d["html-container"]}" id="${d["html-container"]}"></div>\n   <input class="${d.input}" id="${d.input}" />\n   <input type="file" class="${d.file}" />\n   <div class="${d.range}">\n     <input type="range" />\n     <output></output>\n   </div>\n   <select class="${d.select}" id="${d.select}"></select>\n   <div class="${d.radio}"></div>\n   <label class="${d.checkbox}">\n     <input type="checkbox" id="${d.checkbox}" />\n     <span class="${d.label}"></span>\n   </label>\n   <textarea class="${d.textarea}" id="${d.textarea}"></textarea>\n   <div class="${d["validation-message"]}" id="${d["validation-message"]}"></div>\n   <div class="${d.actions}">\n     <div class="${d.loader}"></div>\n     <button type="button" class="${d.confirm}"></button>\n     <button type="button" class="${d.deny}"></button>\n     <button type="button" class="${d.cancel}"></button>\n   </div>\n   <div class="${d.footer}"></div>\n   <div class="${d["timer-progress-bar-container"]}">\n     <div class="${d["timer-progress-bar"]}"></div>\n   </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ye=()=>{const e=S();return!!e&&(e.remove(),oe([document.documentElement,document.body],[d["no-backdrop"],d["toast-shown"],d["has-column"]]),!0)},xe=()=>{s.currentInstance.resetValidationMessage()},we=()=>{const e=E(),t=ne(e,d.input),o=ne(e,d.file),n=e.querySelector(`.${d.range} input`),r=e.querySelector(`.${d.range} output`),i=ne(e,d.select),s=e.querySelector(`.${d.checkbox} input`),a=ne(e,d.textarea);t.oninput=xe,o.onchange=xe,i.onchange=xe,s.onchange=xe,a.oninput=xe,n.oninput=()=>{xe(),r.value=n.value},n.onchange=()=>{xe(),r.value=n.value}},_e=e=>"string"==typeof e?document.querySelector(e):e,Se=e=>{const t=E();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")},Ce=e=>{"rtl"===window.getComputedStyle(e).direction&&te(S(),d.rtl)},ke=e=>{const t=ye();if(be())return void g("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=d.container,t&&te(o,d["no-transition"]),G(o,ve),o.dataset.swal2Theme=e.theme;const n=_e(e.target);n.appendChild(o),e.topLayer&&(o.setAttribute("popover",""),o.showPopover()),Se(e),Ce(n),we()},Ee=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?Te(e,t):e&&G(t,e)},Te=(e,t)=>{e.jquery?Oe(t,e):G(t,e.toString())},Oe=(e,t)=>{if(e.textContent="",0 in t)for(let o=0;o in t;o++)e.appendChild(t[o].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},Ae=(e,t)=>{const o=F(),n=z();o&&n&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?ie(o):se(o),X(o,t,"actions"),Me(o,n,t),G(n,t.loaderHtml||""),X(n,t,"loader"))};function Me(e,t,o){const n=R(),r=I(),i=N();n&&r&&i&&(Le(n,"confirm",o),Le(r,"deny",o),Le(i,"cancel",o),Pe(n,r,i,o),o.reverseButtons&&(o.toast?(e.insertBefore(i,n),e.insertBefore(r,n)):(e.insertBefore(i,t),e.insertBefore(r,t),e.insertBefore(n,t))))}function Pe(e,t,o,n){n.buttonsStyling?(te([e,t,o],d.styled),n.confirmButtonColor&&e.style.setProperty("--swal2-confirm-button-background-color",n.confirmButtonColor),n.denyButtonColor&&t.style.setProperty("--swal2-deny-button-background-color",n.denyButtonColor),n.cancelButtonColor&&o.style.setProperty("--swal2-cancel-button-background-color",n.cancelButtonColor),De(e),De(t),De(o)):oe([e,t,o],d.styled)}function De(e){const t=window.getComputedStyle(e);if(t.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const o=t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");e.style.setProperty("--swal2-action-button-focus-box-shadow",t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${o}`))}function Le(e,t,o){const n=m(t);ce(e,o[`show${n}Button`],"inline-block"),G(e,o[`${t}ButtonText`]||""),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]||""),e.className=d[t],X(e,o,`${t}Button`)}const Re=(e,t)=>{const o=V();o&&(G(o,t.closeButtonHtml||""),X(o,t,"closeButton"),ce(o,t.showCloseButton),o.setAttribute("aria-label",t.closeButtonAriaLabel||""))},Ne=(e,t)=>{const o=S();o&&(Ie(o,t.backdrop),Be(o,t.position),ze(o,t.grow),X(o,t,"container"))};function Ie(e,t){"string"==typeof t?e.style.background=t:t||te([document.documentElement,document.body],d["no-backdrop"])}function Be(e,t){t&&(t in d?te(e,d[t]):(p('The "position" parameter is not valid, defaulting to "center"'),te(e,d.center)))}function ze(e,t){t&&te(e,d[`grow-${t}`])}var Fe={innerParams:new WeakMap,domCache:new WeakMap};const He=["input","file","range","select","radio","checkbox","textarea"],je=(e,t)=>{const o=E();if(!o)return;const n=Fe.innerParams.get(e),r=!n||t.input!==n.input;He.forEach((e=>{const n=ne(o,d[e]);n&&(Ze(e,t.inputAttributes),n.className=d[e],r&&se(n))})),t.input&&(r&&Ve(t),$e(t))},Ve=e=>{if(!e.input)return;if(!Ke[e.input])return void g(`Unexpected type of input! Expected ${Object.keys(Ke).join(" | ")}, got "${e.input}"`);const t=Ge(e.input);if(!t)return;const o=Ke[e.input](t,e);ie(t),e.inputAutoFocus&&setTimeout((()=>{Q(o)}))},Ue=e=>{for(let t=0;t<e.attributes.length;t++){const o=e.attributes[t].name;["id","type","value","style"].includes(o)||e.removeAttribute(o)}},Ze=(e,t)=>{const o=E();if(!o)return;const n=J(o,e);if(n){Ue(n);for(const e in t)n.setAttribute(e,t[e])}},$e=e=>{if(!e.input)return;const t=Ge(e.input);t&&X(t,e,"input")},We=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},qe=(e,t,o)=>{if(o.inputLabel){const n=document.createElement("label"),r=d["input-label"];n.setAttribute("for",e.id),n.className=r,"object"==typeof o.customClass&&te(n,o.customClass.inputLabel),n.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",n)}},Ge=e=>{const t=E();if(t)return ne(t,d[e]||d.input)},Ye=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:_(t)||p(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ke={};Ke.text=Ke.email=Ke.password=Ke.number=Ke.tel=Ke.url=Ke.search=Ke.date=Ke["datetime-local"]=Ke.time=Ke.week=Ke.month=(e,t)=>(Ye(e,t.inputValue),qe(e,e,t),We(e,t),e.type=t.input,e),Ke.file=(e,t)=>(qe(e,e,t),We(e,t),e),Ke.range=(e,t)=>{const o=e.querySelector("input"),n=e.querySelector("output");return Ye(o,t.inputValue),o.type=t.input,Ye(n,t.inputValue),qe(o,e,t),e},Ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const o=document.createElement("option");G(o,t.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,e.appendChild(o)}return qe(e,e,t),e},Ke.radio=e=>(e.textContent="",e),Ke.checkbox=(e,t)=>{const o=J(E(),"checkbox");o.value="1",o.checked=Boolean(t.inputValue);const n=e.querySelector("span");return G(n,t.inputPlaceholder||t.inputLabel),o},Ke.textarea=(e,t)=>{Ye(e,t.inputValue),We(e,t),qe(e,e,t);const o=e=>parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight);return setTimeout((()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(E()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const r=e.offsetWidth+o(e);r>n?E().style.width=`${r}px`:re(E(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Xe=(e,t)=>{const o=M();o&&(ae(o),X(o,t,"htmlContainer"),t.html?(Ee(t.html,o),ie(o,"block")):t.text?(o.textContent=t.text,ie(o,"block")):se(o),je(e,t))},Je=(e,t)=>{const o=H();o&&(ae(o),ce(o,Boolean(t.footer),"block"),t.footer&&Ee(t.footer,o),X(o,t,"footer"))},Qe=(e,t)=>{const o=Fe.innerParams.get(e),n=T();if(n){if(o&&t.icon===o.icon)return rt(n,t),void et(n,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(u).indexOf(t.icon))return g(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void se(n);ie(n),rt(n,t),et(n,t),te(n,t.showClass&&t.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",tt)}else se(n)}},et=(e,t)=>{for(const[o,n]of Object.entries(u))t.icon!==o&&oe(e,n);te(e,t.icon&&u[t.icon]),it(e,t),tt(),X(e,t,"icon")},tt=()=>{const e=E();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<o.length;e++)o[e].style.backgroundColor=t},ot=e=>`\n  ${e.animation?'<div class="swal2-success-circular-line-left"></div>':""}\n  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n  <div class="swal2-success-ring"></div>\n  ${e.animation?'<div class="swal2-success-fix"></div>':""}\n  ${e.animation?'<div class="swal2-success-circular-line-right"></div>':""}\n`,nt='\n  <span class="swal2-x-mark">\n    <span class="swal2-x-mark-line-left"></span>\n    <span class="swal2-x-mark-line-right"></span>\n  </span>\n',rt=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let o=e.innerHTML,n="";t.iconHtml?n=st(t.iconHtml):"success"===t.icon?(n=ot(t),o=o.replace(/ style=".*?"/g,"")):"error"===t.icon?n=nt:t.icon&&(n=st({question:"?",warning:"!",info:"i"}[t.icon])),o.trim()!==n.trim()&&G(e,n)},it=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])le(e,o,"background-color",t.iconColor);le(e,".swal2-success-ring","border-color",t.iconColor)}},st=e=>`<div class="${d["icon-content"]}">${e}</div>`,at=(e,t)=>{const o=P();o&&(t.imageUrl?(ie(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt||""),re(o,"width",t.imageWidth),re(o,"height",t.imageHeight),o.className=d.image,X(o,t,"image")):se(o))};let lt=!1,ct=0,dt=0,ut=0,ht=0;const mt=e=>{e.addEventListener("mousedown",gt),document.body.addEventListener("mousemove",ft),e.addEventListener("mouseup",bt),e.addEventListener("touchstart",gt),document.body.addEventListener("touchmove",ft),e.addEventListener("touchend",bt)},pt=e=>{e.removeEventListener("mousedown",gt),document.body.removeEventListener("mousemove",ft),e.removeEventListener("mouseup",bt),e.removeEventListener("touchstart",gt),document.body.removeEventListener("touchmove",ft),e.removeEventListener("touchend",bt)},gt=e=>{const t=E();if(e.target===t||T().contains(e.target)){lt=!0;const o=vt(e);ct=o.clientX,dt=o.clientY,ut=parseInt(t.style.insetInlineStart)||0,ht=parseInt(t.style.insetBlockStart)||0,te(t,"swal2-dragging")}},ft=e=>{const t=E();if(lt){let{clientX:o,clientY:n}=vt(e);t.style.insetInlineStart=`${ut+(o-ct)}px`,t.style.insetBlockStart=`${ht+(n-dt)}px`}},bt=()=>{const e=E();lt=!1,oe(e,"swal2-dragging")},vt=e=>{let t=0,o=0;return e.type.startsWith("mouse")?(t=e.clientX,o=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,o=e.touches[0].clientY),{clientX:t,clientY:o}},yt=(e,t)=>{const o=S(),n=E();if(o&&n){if(t.toast){re(o,"width",t.width),n.style.width="100%";const e=z();e&&n.insertBefore(e,T())}else re(n,"width",t.width);re(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),se(L()),xt(n,t),t.draggable&&!t.toast?(te(n,d.draggable),mt(n)):(oe(n,d.draggable),pt(n))}},xt=(e,t)=>{const o=t.showClass||{};e.className=`${d.popup} ${de(e)?o.popup:""}`,t.toast?(te([document.documentElement,document.body],d["toast-shown"]),te(e,d.toast)):te(e,d.modal),X(e,t,"popup"),"string"==typeof t.customClass&&te(e,t.customClass),t.icon&&te(e,d[`icon-${t.icon}`])},wt=(e,t)=>{const o=D();if(!o)return;const{progressSteps:n,currentProgressStep:r}=t;n&&0!==n.length&&void 0!==r?(ie(o),o.textContent="",r>=n.length&&p("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),n.forEach(((e,i)=>{const s=_t(e);if(o.appendChild(s),i===r&&te(s,d["active-progress-step"]),i!==n.length-1){const e=St(t);o.appendChild(e)}}))):se(o)},_t=e=>{const t=document.createElement("li");return te(t,d["progress-step"]),G(t,e),t},St=e=>{const t=document.createElement("li");return te(t,d["progress-step-line"]),e.progressStepsDistance&&re(t,"width",e.progressStepsDistance),t},Ct=(e,t)=>{const o=A();o&&(ae(o),ce(o,Boolean(t.title||t.titleText),"block"),t.title&&Ee(t.title,o),t.titleText&&(o.innerText=t.titleText),X(o,t,"title"))},kt=(e,t)=>{yt(e,t),Ne(e,t),wt(e,t),Qe(e,t),at(e,t),Ct(e,t),Re(e,t),Xe(e,t),Ae(e,t),Je(e,t);const o=E();"function"==typeof t.didRender&&o&&t.didRender(o),s.eventEmitter.emit("didRender",o)},Et=()=>de(E()),Tt=()=>{var e;return null===(e=R())||void 0===e?void 0:e.click()},Ot=()=>{var e;return null===(e=I())||void 0===e?void 0:e.click()},At=()=>{var e;return null===(e=N())||void 0===e?void 0:e.click()},Mt=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Pt=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Dt=(e,t,o)=>{Pt(e),t.toast||(e.keydownHandler=e=>It(t,e,o),e.keydownTarget=t.keydownListenerCapture?window:E(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},Lt=(e,t)=>{var o;const n=Z();if(n.length)return-2===(e+=t)&&(e=n.length-1),e===n.length?e=0:-1===e&&(e=n.length-1),void n[e].focus();null===(o=E())||void 0===o||o.focus()},Rt=["ArrowRight","ArrowDown"],Nt=["ArrowLeft","ArrowUp"],It=(e,t,o)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Bt(t,e):"Tab"===t.key?zt(t):[...Rt,...Nt].includes(t.key)?Ft(t.key):"Escape"===t.key&&Ht(t,e,o)))},Bt=(e,t)=>{if(!y(t.allowEnterKey))return;const o=J(E(),t.input);if(e.target&&o&&e.target instanceof HTMLElement&&e.target.outerHTML===o.outerHTML){if(["textarea","file"].includes(t.input))return;Tt(),e.preventDefault()}},zt=e=>{const t=e.target,o=Z();let n=-1;for(let e=0;e<o.length;e++)if(t===o[e]){n=e;break}e.shiftKey?Lt(n,-1):Lt(n,1),e.stopPropagation(),e.preventDefault()},Ft=e=>{const t=F(),o=R(),n=I(),r=N();if(!(t&&o&&n&&r))return;const i=[o,n,r];if(document.activeElement instanceof HTMLElement&&!i.includes(document.activeElement))return;const s=Rt.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e<t.children.length;e++){if(a=a[s],!a)return;if(a instanceof HTMLButtonElement&&de(a))break}a instanceof HTMLButtonElement&&a.focus()}},Ht=(e,t,o)=>{e.preventDefault(),y(t.allowEscapeKey)&&o(Mt.esc)};var jt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const Vt=()=>{const e=S();Array.from(document.body.children).forEach((t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))}))},Ut=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},Zt="undefined"!=typeof window&&!!window.GestureEvent,$t=()=>{if(Zt&&!Y(document.body,d.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",te(document.body,d.iosfix),Wt()}},Wt=()=>{const e=S();if(!e)return;let t;e.ontouchstart=e=>{t=qt(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},qt=e=>{const t=e.target,o=S(),n=M();return!(!o||!n||Gt(e)||Yt(e)||t!==o&&(he(o)||!(t instanceof HTMLElement)||me(t,n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||he(n)&&n.contains(t)))},Gt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Yt=e=>e.touches&&e.touches.length>1,Kt=()=>{if(Y(document.body,d.iosfix)){const e=parseInt(document.body.style.top,10);oe(document.body,d.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},Xt=()=>{const e=document.createElement("div");e.className=d["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t};let Jt=null;const Qt=e=>{null===Jt&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(Jt=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${Jt+Xt()}px`)},eo=()=>{null!==Jt&&(document.body.style.paddingRight=`${Jt}px`,Jt=null)};function to(e,t,o,n){W()?uo(e,n):(l(o).then((()=>uo(e,n))),Pt(s)),Zt?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),$()&&(eo(),Kt(),Ut()),oo()}function oo(){oe([document.documentElement,document.body],[d.shown,d["height-auto"],d["no-backdrop"],d["toast-shown"]])}function no(e){e=ao(e);const t=jt.swalPromiseResolve.get(this),o=ro(this);this.isAwaitingPromise?e.isDismissed||(so(this),t(e)):o&&t(e)}const ro=e=>{const t=E();if(!t)return!1;const o=Fe.innerParams.get(e);if(!o||Y(t,o.hideClass.popup))return!1;oe(t,o.showClass.popup),te(t,o.hideClass.popup);const n=S();return oe(n,o.showClass.backdrop),te(n,o.hideClass.backdrop),lo(e,t,o),!0};function io(e){const t=jt.swalPromiseReject.get(this);so(this),t&&t(e)}const so=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,Fe.innerParams.get(e)||e._destroy())},ao=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),lo=(e,t,o)=>{var n;const r=S(),i=pe(t);"function"==typeof o.willClose&&o.willClose(t),null===(n=s.eventEmitter)||void 0===n||n.emit("willClose",t),i?co(e,t,r,o.returnFocus,o.didClose):to(e,r,o.returnFocus,o.didClose)},co=(e,t,o,n,r)=>{s.swalCloseEventFinishedCallback=to.bind(null,e,o,n,r);const i=function(e){var o;e.target===t&&(null===(o=s.swalCloseEventFinishedCallback)||void 0===o||o.call(s),delete s.swalCloseEventFinishedCallback,t.removeEventListener("animationend",i),t.removeEventListener("transitionend",i))};t.addEventListener("animationend",i),t.addEventListener("transitionend",i)},uo=(e,t)=>{setTimeout((()=>{var o;"function"==typeof t&&t.bind(e.params)(),null===(o=s.eventEmitter)||void 0===o||o.emit("didClose"),e._destroy&&e._destroy()}))},ho=e=>{let t=E();if(t||new fr,t=E(),!t)return;const o=z();W()?se(T()):mo(t,e),ie(o),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},mo=(e,t)=>{const o=F(),n=z();o&&n&&(!t&&de(R())&&(t=R()),ie(o),t&&(se(t),n.setAttribute("data-button-to-replace",t.className),o.insertBefore(n,t)),te([e,o],d.loading))},po=(e,t)=>{"select"===t.input||"radio"===t.input?yo(e,t):["text","email","number","tel","textarea"].some((e=>e===t.input))&&(x(t.inputValue)||_(t.inputValue))&&(ho(R()),xo(e,t))},go=(e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return fo(o);case"radio":return bo(o);case"file":return vo(o);default:return t.inputAutoTrim?o.value.trim():o.value}},fo=e=>e.checked?1:0,bo=e=>e.checked?e.value:null,vo=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,yo=(e,t)=>{const o=E();if(!o)return;const n=e=>{"select"===t.input?wo(o,So(e),t):"radio"===t.input&&_o(o,So(e),t)};x(t.inputOptions)||_(t.inputOptions)?(ho(R()),w(t.inputOptions).then((t=>{e.hideLoading(),n(t)}))):"object"==typeof t.inputOptions?n(t.inputOptions):g("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},xo=(e,t)=>{const o=e.getInput();o&&(se(o),w(t.inputValue).then((n=>{o.value="number"===t.input?`${parseFloat(n)||0}`:`${n}`,ie(o),o.focus(),e.hideLoading()})).catch((t=>{g(`Error in inputValue promise: ${t}`),o.value="",ie(o),o.focus(),e.hideLoading()})))};function wo(e,t,o){const n=ne(e,d.select);if(!n)return;const r=(e,t,n)=>{const r=document.createElement("option");r.value=n,G(r,t),r.selected=Co(n,o.inputValue),e.appendChild(r)};t.forEach((e=>{const t=e[0],o=e[1];if(Array.isArray(o)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),o.forEach((t=>r(e,t[1],t[0])))}else r(n,o,t)})),n.focus()}function _o(e,t,o){const n=ne(e,d.radio);if(!n)return;t.forEach((e=>{const t=e[0],r=e[1],i=document.createElement("input"),s=document.createElement("label");i.type="radio",i.name=d.radio,i.value=t,Co(t,o.inputValue)&&(i.checked=!0);const a=document.createElement("span");G(a,r),a.className=d.label,s.appendChild(i),s.appendChild(a),n.appendChild(s)}));const r=n.querySelectorAll("input");r.length&&r[0].focus()}const So=e=>{const t=[];return e instanceof Map?e.forEach(((e,o)=>{let n=e;"object"==typeof n&&(n=So(n)),t.push([o,n])})):Object.keys(e).forEach((o=>{let n=e[o];"object"==typeof n&&(n=So(n)),t.push([o,n])})),t},Co=(e,t)=>!!t&&t.toString()===e.toString(),ko=e=>{const t=Fe.innerParams.get(e);e.disableButtons(),t.input?Oo(e,"confirm"):Lo(e,!0)},Eo=e=>{const t=Fe.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?Oo(e,"deny"):Mo(e,!1)},To=(e,t)=>{e.disableButtons(),t(Mt.cancel)},Oo=(e,t)=>{const o=Fe.innerParams.get(e);if(!o.input)return void g(`The "input" parameter is needed to be set when using returnInputValueOn${m(t)}`);const n=e.getInput(),r=go(e,o);o.inputValidator?Ao(e,r,t):n&&!n.checkValidity()?(e.enableButtons(),e.showValidationMessage(o.validationMessage||n.validationMessage)):"deny"===t?Mo(e,r):Lo(e,r)},Ao=(e,t,o)=>{const n=Fe.innerParams.get(e);e.disableInput(),Promise.resolve().then((()=>w(n.inputValidator(t,n.validationMessage)))).then((n=>{e.enableButtons(),e.enableInput(),n?e.showValidationMessage(n):"deny"===o?Mo(e,t):Lo(e,t)}))},Mo=(e,t)=>{const o=Fe.innerParams.get(e||void 0);o.showLoaderOnDeny&&ho(I()),o.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then((()=>w(o.preDeny(t,o.validationMessage)))).then((o=>{!1===o?(e.hideLoading(),so(e)):e.close({isDenied:!0,value:void 0===o?t:o})})).catch((t=>Do(e||void 0,t)))):e.close({isDenied:!0,value:t})},Po=(e,t)=>{e.close({isConfirmed:!0,value:t})},Do=(e,t)=>{e.rejectPromise(t)},Lo=(e,t)=>{const o=Fe.innerParams.get(e||void 0);o.showLoaderOnConfirm&&ho(),o.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then((()=>w(o.preConfirm(t,o.validationMessage)))).then((o=>{de(L())||!1===o?(e.hideLoading(),so(e)):Po(e,void 0===o?t:o)})).catch((t=>Do(e||void 0,t)))):Po(e,t)};function Ro(){const e=Fe.innerParams.get(this);if(!e)return;const t=Fe.domCache.get(this);se(t.loader),W()?e.icon&&ie(T()):No(t),oe([t.popup,t.actions],d.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const No=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?ie(t[0],"inline-block"):ue()&&se(e.actions)};function Io(){const e=Fe.innerParams.get(this),t=Fe.domCache.get(this);return t?J(t.popup,e.input):null}function Bo(e,t,o){const n=Fe.domCache.get(e);t.forEach((e=>{n[e].disabled=o}))}function zo(e,t){const o=E();if(o&&e)if("radio"===e.type){const e=o.querySelectorAll(`[name="${d.radio}"]`);for(let o=0;o<e.length;o++)e[o].disabled=t}else e.disabled=t}function Fo(){Bo(this,["confirmButton","denyButton","cancelButton"],!1)}function Ho(){Bo(this,["confirmButton","denyButton","cancelButton"],!0)}function jo(){zo(this.getInput(),!1)}function Vo(){zo(this.getInput(),!0)}function Uo(e){const t=Fe.domCache.get(this),o=Fe.innerParams.get(this);G(t.validationMessage,e),t.validationMessage.className=d["validation-message"],o.customClass&&o.customClass.validationMessage&&te(t.validationMessage,o.customClass.validationMessage),ie(t.validationMessage);const n=this.getInput();n&&(n.setAttribute("aria-invalid","true"),n.setAttribute("aria-describedby",d["validation-message"]),Q(n),te(n,d.inputerror))}function Zo(){const e=Fe.domCache.get(this);e.validationMessage&&se(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),oe(t,d.inputerror))}const $o={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},Wo=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],qo={allowEnterKey:void 0},Go=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Yo=e=>Object.prototype.hasOwnProperty.call($o,e),Ko=e=>-1!==Wo.indexOf(e),Xo=e=>qo[e],Jo=e=>{Yo(e)||p(`Unknown parameter "${e}"`)},Qo=e=>{Go.includes(e)&&p(`The parameter "${e}" is incompatible with toasts`)},en=e=>{const t=Xo(e);t&&v(e,t)},tn=e=>{!1===e.backdrop&&e.allowOutsideClick&&p('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(e.theme)&&p(`Invalid theme "${e.theme}"`);for(const t in e)Jo(t),e.toast&&Qo(t),en(t)};function on(e){const t=S(),o=E(),n=Fe.innerParams.get(this);if(!o||Y(o,n.hideClass.popup))return void p("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const r=nn(e),i=Object.assign({},n,r);tn(i),t.dataset.swal2Theme=i.theme,kt(this,i),Fe.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const nn=e=>{const t={};return Object.keys(e).forEach((o=>{Ko(o)?t[o]=e[o]:p(`Invalid parameter to update: ${o}`)})),t};function rn(){const e=Fe.domCache.get(this),t=Fe.innerParams.get(this);t?(e.popup&&s.swalCloseEventFinishedCallback&&(s.swalCloseEventFinishedCallback(),delete s.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),s.eventEmitter.emit("didDestroy"),sn(this)):an(this)}const sn=e=>{an(e),delete e.params,delete s.keydownHandler,delete s.keydownTarget,delete s.currentInstance},an=e=>{e.isAwaitingPromise?(ln(Fe,e),e.isAwaitingPromise=!0):(ln(jt,e),ln(Fe,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},ln=(e,t)=>{for(const o in e)e[o].delete(t)};var cn=Object.freeze({__proto__:null,_destroy:rn,close:no,closeModal:no,closePopup:no,closeToast:no,disableButtons:Ho,disableInput:Vo,disableLoading:Ro,enableButtons:Fo,enableInput:jo,getInput:Io,handleAwaitingPromise:so,hideLoading:Ro,rejectPromise:io,resetValidationMessage:Zo,showValidationMessage:Uo,update:on});const dn=(e,t,o)=>{e.toast?un(e,t,o):(pn(t),gn(t),fn(e,t,o))},un=(e,t,o)=>{t.popup.onclick=()=>{e&&(hn(e)||e.timer||e.input)||o(Mt.close)}},hn=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let mn=!1;const pn=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(mn=!0)}}},gn=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(mn=!0)}}},fn=(e,t,o)=>{t.container.onclick=n=>{mn?mn=!1:n.target===t.container&&y(e.allowOutsideClick)&&o(Mt.backdrop)}},bn=e=>"object"==typeof e&&e.jquery,vn=e=>e instanceof Element||bn(e),yn=e=>{const t={};return"object"!=typeof e[0]||vn(e[0])?["title","html","icon"].forEach(((o,n)=>{const r=e[n];"string"==typeof r||vn(r)?t[o]=r:void 0!==r&&g(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof r}`)})):Object.assign(t,e[0]),t};function xn(...e){return new this(...e)}function wn(e){class t extends(this){_main(t,o){return super._main(t,Object.assign({},e,o))}}return t}const _n=()=>s.timeout&&s.timeout.getTimerLeft(),Sn=()=>{if(s.timeout)return fe(),s.timeout.stop()},Cn=()=>{if(s.timeout){const e=s.timeout.start();return ge(e),e}},kn=()=>{const e=s.timeout;return e&&(e.running?Sn():Cn())},En=e=>{if(s.timeout){const t=s.timeout.increase(e);return ge(t,!0),t}},Tn=()=>!(!s.timeout||!s.timeout.isRunning());let On=!1;const An={};function Mn(e="data-swal-template"){An[e]=this,On||(document.body.addEventListener("click",Pn),On=!0)}const Pn=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in An){const o=t.getAttribute(e);if(o)return void An[e].fire({template:o})}};class Dn{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const o=this._getHandlersByEventName(e);o.includes(t)||o.push(t)}once(e,t){const o=(...n)=>{this.removeListener(e,o),t.apply(this,n)};this.on(e,o)}emit(e,...t){this._getHandlersByEventName(e).forEach((e=>{try{e.apply(this,t)}catch(e){console.error(e)}}))}removeListener(e,t){const o=this._getHandlersByEventName(e),n=o.indexOf(t);n>-1&&o.splice(n,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}}s.eventEmitter=new Dn;const Ln=(e,t)=>{s.eventEmitter.on(e,t)},Rn=(e,t)=>{s.eventEmitter.once(e,t)},Nn=(e,t)=>{e?t?s.eventEmitter.removeListener(e,t):s.eventEmitter.removeAllListeners(e):s.eventEmitter.reset()};var In=Object.freeze({__proto__:null,argsToParams:yn,bindClickHandler:Mn,clickCancel:At,clickConfirm:Tt,clickDeny:Ot,enableLoading:ho,fire:xn,getActions:F,getCancelButton:N,getCloseButton:V,getConfirmButton:R,getContainer:S,getDenyButton:I,getFocusableElements:Z,getFooter:H,getHtmlContainer:M,getIcon:T,getIconContent:O,getImage:P,getInputLabel:B,getLoader:z,getPopup:E,getProgressSteps:D,getTimerLeft:_n,getTimerProgressBar:j,getTitle:A,getValidationMessage:L,increaseTimer:En,isDeprecatedParameter:Xo,isLoading:q,isTimerRunning:Tn,isUpdatableParameter:Ko,isValidParameter:Yo,isVisible:Et,mixin:wn,off:Nn,on:Ln,once:Rn,resumeTimer:Cn,showLoading:ho,stopTimer:Sn,toggleTimer:kn});class Bn{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const zn=["swal-title","swal-html","swal-footer"],Fn=e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return qn(o),Object.assign(Hn(o),jn(o),Vn(o),Un(o),Zn(o),$n(o),Wn(o,zn))},Hn=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{Gn(e,["name","value"]);const o=e.getAttribute("name"),n=e.getAttribute("value");o&&n&&("boolean"==typeof $o[o]?t[o]="false"!==n:"object"==typeof $o[o]?t[o]=JSON.parse(n):t[o]=n)})),t},jn=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const o=e.getAttribute("name"),n=e.getAttribute("value");o&&n&&(t[o]=new Function(`return ${n}`)())})),t},Vn=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{Gn(e,["type","color","aria-label"]);const o=e.getAttribute("type");o&&["confirm","cancel","deny"].includes(o)&&(t[`${o}ButtonText`]=e.innerHTML,t[`show${m(o)}Button`]=!0,e.hasAttribute("color")&&(t[`${o}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${o}ButtonAriaLabel`]=e.getAttribute("aria-label")))})),t},Un=e=>{const t={},o=e.querySelector("swal-image");return o&&(Gn(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")||void 0),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")||void 0),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")||void 0),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt")||void 0)),t},Zn=e=>{const t={},o=e.querySelector("swal-icon");return o&&(Gn(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},$n=e=>{const t={},o=e.querySelector("swal-input");o&&(Gn(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach((e=>{Gn(e,["value"]);const o=e.getAttribute("value");if(!o)return;const n=e.innerHTML;t.inputOptions[o]=n}))),t},Wn=(e,t)=>{const o={};for(const n in t){const r=t[n],i=e.querySelector(r);i&&(Gn(i,[]),o[r.replace(/^swal-/,"")]=i.innerHTML.trim())}return o},qn=e=>{const t=zn.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const o=e.tagName.toLowerCase();t.includes(o)||p(`Unrecognized element <${o}>`)}))},Gn=(e,t)=>{Array.from(e.attributes).forEach((o=>{-1===t.indexOf(o.name)&&p([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])}))},Yn=10,Kn=e=>{const t=S(),o=E();"function"==typeof e.willOpen&&e.willOpen(o),s.eventEmitter.emit("willOpen",o);const n=window.getComputedStyle(document.body).overflowY;er(t,o,e),setTimeout((()=>{Jn(t,o)}),Yn),$()&&(Qn(t,e.scrollbarPadding,n),Vt()),W()||s.previousActiveElement||(s.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(o))),s.eventEmitter.emit("didOpen",o)},Xn=e=>{const t=E();if(e.target!==t)return;const o=S();t.removeEventListener("animationend",Xn),t.removeEventListener("transitionend",Xn),o.style.overflowY="auto",oe(o,d["no-transition"])},Jn=(e,t)=>{pe(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",Xn),t.addEventListener("transitionend",Xn)):e.style.overflowY="auto"},Qn=(e,t,o)=>{$t(),t&&"hidden"!==o&&Qt(o),setTimeout((()=>{e.scrollTop=0}))},er=(e,t,o)=>{te(e,o.showClass.backdrop),o.animation?(t.style.setProperty("opacity","0","important"),ie(t,"grid"),setTimeout((()=>{te(t,o.showClass.popup),t.style.removeProperty("opacity")}),Yn)):ie(t,"grid"),te([document.documentElement,document.body],d.shown),o.heightAuto&&o.backdrop&&!o.toast&&te([document.documentElement,document.body],d["height-auto"])};var tr={email:(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function or(e){e.inputValidator||("email"===e.input&&(e.inputValidator=tr.email),"url"===e.input&&(e.inputValidator=tr.url))}function nr(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(p('Target parameter is not valid, defaulting to "body"'),e.target="body")}function rr(e){or(e),e.showLoaderOnConfirm&&!e.preConfirm&&p("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),nr(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),ke(e)}let ir;var sr=new WeakMap;class ar{constructor(...e){if(n(this,sr,void 0),"undefined"==typeof window)return;ir=this;const t=Object.freeze(this.constructor.argsToParams(e));this.params=t,this.isAwaitingPromise=!1,r(sr,this,this._main(ir.params))}_main(e,t={}){if(tn(Object.assign({},t,e)),s.currentInstance){const e=jt.swalPromiseResolve.get(s.currentInstance),{isAwaitingPromise:t}=s.currentInstance;s.currentInstance._destroy(),t||e({isDismissed:!0}),$()&&Ut()}s.currentInstance=ir;const o=cr(e,t);rr(o),Object.freeze(o),s.timeout&&(s.timeout.stop(),delete s.timeout),clearTimeout(s.restoreFocusTimeout);const n=dr(ir);return kt(ir,o),Fe.innerParams.set(ir,o),lr(ir,n,o)}then(e){return o(sr,this).then(e)}finally(e){return o(sr,this).finally(e)}}const lr=(e,t,o)=>new Promise(((n,r)=>{const i=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};jt.swalPromiseResolve.set(e,n),jt.swalPromiseReject.set(e,r),t.confirmButton.onclick=()=>{ko(e)},t.denyButton.onclick=()=>{Eo(e)},t.cancelButton.onclick=()=>{To(e,i)},t.closeButton.onclick=()=>{i(Mt.close)},dn(o,t,i),Dt(s,o,i),po(e,o),Kn(o),ur(s,o,i),hr(t,o),setTimeout((()=>{t.container.scrollTop=0}))})),cr=(e,t)=>{const o=Fn(e),n=Object.assign({},$o,t,o,e);return n.showClass=Object.assign({},$o.showClass,n.showClass),n.hideClass=Object.assign({},$o.hideClass,n.hideClass),!1===n.animation&&(n.showClass={backdrop:"swal2-noanimation"},n.hideClass={}),n},dr=e=>{const t={popup:E(),container:S(),actions:F(),confirmButton:R(),denyButton:I(),cancelButton:N(),loader:z(),closeButton:V(),validationMessage:L(),progressSteps:D()};return Fe.domCache.set(e,t),t},ur=(e,t,o)=>{const n=j();se(n),t.timer&&(e.timeout=new Bn((()=>{o("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(ie(n),X(n,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&ge(t.timer)}))))},hr=(e,t)=>{if(!t.toast)return y(t.allowEnterKey)?void(mr(e)||pr(e,t)||Lt(-1,1)):(v("allowEnterKey"),void gr())},mr=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&de(e))return e.focus(),!0;return!1},pr=(e,t)=>t.focusDeny&&de(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&de(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!de(e.confirmButton)||(e.confirmButton.focus(),0)),gr=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};ar.prototype.disableButtons=Ho,ar.prototype.enableButtons=Fo,ar.prototype.getInput=Io,ar.prototype.disableInput=Vo,ar.prototype.enableInput=jo,ar.prototype.hideLoading=Ro,ar.prototype.disableLoading=Ro,ar.prototype.showValidationMessage=Uo,ar.prototype.resetValidationMessage=Zo,ar.prototype.close=no,ar.prototype.closePopup=no,ar.prototype.closeModal=no,ar.prototype.closeToast=no,ar.prototype.rejectPromise=io,ar.prototype.update=on,ar.prototype._destroy=rn,Object.assign(ar,In),Object.keys(cn).forEach((e=>{ar[e]=function(...t){return ir&&ir[e]?ir[e](...t):null}})),ar.DismissReason=Mt,ar.version="11.26.3";const fr=ar;return fr.default=fr,fr}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var o=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(o),o.styleSheet)o.styleSheet.disabled||(o.styleSheet.cssText=t);else try{o.innerHTML=t}catch(e){o.innerText=t}}(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}')},48542:function(e){e.exports=function(){"use strict";function e(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}function t(t,o){return t.get(e(t,o))}function o(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}const n={},r=e=>new Promise((t=>{if(!e)return t();const o=window.scrollX,r=window.scrollY;n.restoreFocusTimeout=setTimeout((()=>{n.previousActiveElement instanceof HTMLElement?(n.previousActiveElement.focus(),n.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(o,r)})),i="swal2-",s=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce(((e,t)=>(e[t]=i+t,e)),{}),a=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=i+t,e)),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),d=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},u=e=>{console.error(`${l} ${e}`)},h=[],m=(e,t=null)=>{var o;o=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,h.includes(o)||(h.push(o),d(o))},p=e=>"function"==typeof e?e():e,g=e=>e&&"function"==typeof e.toPromise,f=e=>g(e)?e.toPromise():Promise.resolve(e),b=e=>e&&Promise.resolve(e)===e,v=()=>document.body.querySelector(`.${s.container}`),y=e=>{const t=v();return t?t.querySelector(e):null},x=e=>y(`.${e}`),w=()=>x(s.popup),_=()=>x(s.icon),S=()=>x(s.title),C=()=>x(s["html-container"]),k=()=>x(s.image),E=()=>x(s["progress-steps"]),T=()=>x(s["validation-message"]),O=()=>y(`.${s.actions} .${s.confirm}`),A=()=>y(`.${s.actions} .${s.cancel}`),M=()=>y(`.${s.actions} .${s.deny}`),P=()=>y(`.${s.loader}`),D=()=>x(s.actions),L=()=>x(s.footer),R=()=>x(s["timer-progress-bar"]),N=()=>x(s.close),I=()=>{const e=w();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),o=Array.from(t).sort(((e,t)=>{const o=parseInt(e.getAttribute("tabindex")||"0"),n=parseInt(t.getAttribute("tabindex")||"0");return o>n?1:o<n?-1:0})),n=e.querySelectorAll('\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n'),r=Array.from(n).filter((e=>"-1"!==e.getAttribute("tabindex")));return[...new Set(o.concat(r))].filter((e=>ee(e)))},B=()=>H(document.body,s.shown)&&!H(document.body,s["toast-shown"])&&!H(document.body,s["no-backdrop"]),z=()=>{const e=w();return!!e&&H(e,s.toast)},F=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html"),n=o.querySelector("head");n&&Array.from(n.childNodes).forEach((t=>{e.appendChild(t)}));const r=o.querySelector("body");r&&Array.from(r.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},H=(e,t)=>{if(!t)return!1;const o=t.split(/\s+/);for(let t=0;t<o.length;t++)if(!e.classList.contains(o[t]))return!1;return!0},j=(e,t,o)=>{if(((e,t)=>{Array.from(e.classList).forEach((o=>{Object.values(s).includes(o)||Object.values(a).includes(o)||Object.values(t.showClass||{}).includes(o)||e.classList.remove(o)}))})(e,t),!t.customClass)return;const n=t.customClass[o];n&&("string"==typeof n||n.forEach?$(e,n):d(`Invalid type of customClass.${o}! Expected string or iterable object, got "${typeof n}"`))},V=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${s.popup} > .${s[t]}`);case"checkbox":return e.querySelector(`.${s.popup} > .${s.checkbox} input`);case"radio":return e.querySelector(`.${s.popup} > .${s.radio} input:checked`)||e.querySelector(`.${s.popup} > .${s.radio} input:first-child`);case"range":return e.querySelector(`.${s.popup} > .${s.range} input`);default:return e.querySelector(`.${s.popup} > .${s.input}`)}},U=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},Z=(e,t,o)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{o?e.classList.add(t):e.classList.remove(t)})):o?e.classList.add(t):e.classList.remove(t)})))},$=(e,t)=>{Z(e,t,!0)},W=(e,t)=>{Z(e,t,!1)},q=(e,t)=>{const o=Array.from(e.children);for(let e=0;e<o.length;e++){const n=o[e];if(n instanceof HTMLElement&&H(n,t))return n}},G=(e,t,o)=>{o===`${parseInt(`${o}`)}`&&(o=parseInt(o)),o||0===parseInt(`${o}`)?e.style.setProperty(t,"number"==typeof o?`${o}px`:o):e.style.removeProperty(t)},Y=(e,t="flex")=>{e&&(e.style.display=t)},K=e=>{e&&(e.style.display="none")},X=(e,t="block")=>{e&&new MutationObserver((()=>{Q(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},J=(e,t,o,n)=>{const r=e.querySelector(t);r&&r.style.setProperty(o,n)},Q=(e,t,o="flex")=>{t?Y(e,o):K(e)},ee=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>!!(e.scrollHeight>e.clientHeight),oe=e=>{const t=window.getComputedStyle(e),o=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return o>0||n>0},ne=(e,t=!1)=>{const o=R();o&&ee(o)&&(t&&(o.style.transition="none",o.style.width="100%"),setTimeout((()=>{o.style.transition=`width ${e/1e3}s linear`,o.style.width="0%"}),10))},re=`\n <div aria-labelledby="${s.title}" aria-describedby="${s["html-container"]}" class="${s.popup}" tabindex="-1">\n   <button type="button" class="${s.close}"></button>\n   <ul class="${s["progress-steps"]}"></ul>\n   <div class="${s.icon}"></div>\n   <img class="${s.image}" />\n   <h2 class="${s.title}" id="${s.title}"></h2>\n   <div class="${s["html-container"]}" id="${s["html-container"]}"></div>\n   <input class="${s.input}" id="${s.input}" />\n   <input type="file" class="${s.file}" />\n   <div class="${s.range}">\n     <input type="range" />\n     <output></output>\n   </div>\n   <select class="${s.select}" id="${s.select}"></select>\n   <div class="${s.radio}"></div>\n   <label class="${s.checkbox}">\n     <input type="checkbox" id="${s.checkbox}" />\n     <span class="${s.label}"></span>\n   </label>\n   <textarea class="${s.textarea}" id="${s.textarea}"></textarea>\n   <div class="${s["validation-message"]}" id="${s["validation-message"]}"></div>\n   <div class="${s.actions}">\n     <div class="${s.loader}"></div>\n     <button type="button" class="${s.confirm}"></button>\n     <button type="button" class="${s.deny}"></button>\n     <button type="button" class="${s.cancel}"></button>\n   </div>\n   <div class="${s.footer}"></div>\n   <div class="${s["timer-progress-bar-container"]}">\n     <div class="${s["timer-progress-bar"]}"></div>\n   </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ie=()=>{n.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=v();return!!e&&(e.remove(),W([document.documentElement,document.body],[s["no-backdrop"],s["toast-shown"],s["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void u("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=s.container,t&&$(o,s["no-transition"]),F(o,re),o.dataset.swal2Theme=e.theme;const n="string"==typeof(r=e.target)?document.querySelector(r):r;var r;n.appendChild(o),e.topLayer&&(o.setAttribute("popover",""),o.showPopover()),(e=>{const t=w();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&$(v(),s.rtl)})(n),(()=>{const e=w(),t=q(e,s.input),o=q(e,s.file),n=e.querySelector(`.${s.range} input`),r=e.querySelector(`.${s.range} output`),i=q(e,s.select),a=e.querySelector(`.${s.checkbox} input`),l=q(e,s.textarea);t.oninput=ie,o.onchange=ie,i.onchange=ie,a.onchange=ie,l.oninput=ie,n.oninput=()=>{ie(),r.value=n.value},n.onchange=()=>{ie(),r.value=n.value}})()},ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&F(t,e)},le=(e,t)=>{e.jquery?ce(t,e):F(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let o=0;o in t;o++)e.appendChild(t[o].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},de=(e,t)=>{const o=D(),n=P();o&&n&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Y(o):K(o),j(o,t,"actions"),function(e,t,o){const n=O(),r=M(),i=A();n&&r&&i&&(he(n,"confirm",o),he(r,"deny",o),he(i,"cancel",o),function(e,t,o,n){n.buttonsStyling?($([e,t,o],s.styled),n.confirmButtonColor&&e.style.setProperty("--swal2-confirm-button-background-color",n.confirmButtonColor),n.denyButtonColor&&t.style.setProperty("--swal2-deny-button-background-color",n.denyButtonColor),n.cancelButtonColor&&o.style.setProperty("--swal2-cancel-button-background-color",n.cancelButtonColor),ue(e),ue(t),ue(o)):W([e,t,o],s.styled)}(n,r,i,o),o.reverseButtons&&(o.toast?(e.insertBefore(i,n),e.insertBefore(r,n)):(e.insertBefore(i,t),e.insertBefore(r,t),e.insertBefore(n,t))))}(o,n,t),F(n,t.loaderHtml||""),j(n,t,"loader"))};function ue(e){const t=window.getComputedStyle(e);if(t.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const o=t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");e.style.setProperty("--swal2-action-button-focus-box-shadow",t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${o}`))}function he(e,t,o){const n=c(t);Q(e,o[`show${n}Button`],"inline-block"),F(e,o[`${t}ButtonText`]||""),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]||""),e.className=s[t],j(e,o,`${t}Button`)}const me=(e,t)=>{const o=v();o&&(function(e,t){"string"==typeof t?e.style.background=t:t||$([document.documentElement,document.body],s["no-backdrop"])}(o,t.backdrop),function(e,t){t&&(t in s?$(e,s[t]):(d('The "position" parameter is not valid, defaulting to "center"'),$(e,s.center)))}(o,t.position),function(e,t){t&&$(e,s[`grow-${t}`])}(o,t.grow),j(o,t,"container"))};var pe={innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],fe=e=>{if(!e.input)return;if(!Se[e.input])return void u(`Unexpected type of input! Expected ${Object.keys(Se).join(" | ")}, got "${e.input}"`);const t=we(e.input);if(!t)return;const o=Se[e.input](t,e);Y(t),e.inputAutoFocus&&setTimeout((()=>{U(o)}))},be=(e,t)=>{const o=w();if(!o)return;const n=V(o,e);if(n){(e=>{for(let t=0;t<e.attributes.length;t++){const o=e.attributes[t].name;["id","type","value","style"].includes(o)||e.removeAttribute(o)}})(n);for(const e in t)n.setAttribute(e,t[e])}},ve=e=>{if(!e.input)return;const t=we(e.input);t&&j(t,e,"input")},ye=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},xe=(e,t,o)=>{if(o.inputLabel){const n=document.createElement("label"),r=s["input-label"];n.setAttribute("for",e.id),n.className=r,"object"==typeof o.customClass&&$(n,o.customClass.inputLabel),n.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",n)}},we=e=>{const t=w();if(t)return q(t,s[e]||s.input)},_e=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:b(t)||d(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Se={};Se.text=Se.email=Se.password=Se.number=Se.tel=Se.url=Se.search=Se.date=Se["datetime-local"]=Se.time=Se.week=Se.month=(e,t)=>(_e(e,t.inputValue),xe(e,e,t),ye(e,t),e.type=t.input,e),Se.file=(e,t)=>(xe(e,e,t),ye(e,t),e),Se.range=(e,t)=>{const o=e.querySelector("input"),n=e.querySelector("output");return _e(o,t.inputValue),o.type=t.input,_e(n,t.inputValue),xe(o,e,t),e},Se.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const o=document.createElement("option");F(o,t.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,e.appendChild(o)}return xe(e,e,t),e},Se.radio=e=>(e.textContent="",e),Se.checkbox=(e,t)=>{const o=V(w(),"checkbox");o.value="1",o.checked=Boolean(t.inputValue);const n=e.querySelector("span");return F(n,t.inputPlaceholder||t.inputLabel),o},Se.textarea=(e,t)=>(_e(e,t.inputValue),ye(e,t),xe(e,e,t),setTimeout((()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(w()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const n=e.offsetWidth+(r=e,parseInt(window.getComputedStyle(r).marginLeft)+parseInt(window.getComputedStyle(r).marginRight));var r;n>o?w().style.width=`${n}px`:G(w(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e);const Ce=(e,t)=>{const o=C();o&&(X(o),j(o,t,"htmlContainer"),t.html?(ae(t.html,o),Y(o,"block")):t.text?(o.textContent=t.text,Y(o,"block")):K(o),((e,t)=>{const o=w();if(!o)return;const n=pe.innerParams.get(e),r=!n||t.input!==n.input;ge.forEach((e=>{const n=q(o,s[e]);n&&(be(e,t.inputAttributes),n.className=s[e],r&&K(n))})),t.input&&(r&&fe(t),ve(t))})(e,t))},ke=(e,t)=>{for(const[o,n]of Object.entries(a))t.icon!==o&&W(e,n);$(e,t.icon&&a[t.icon]),Oe(e,t),Ee(),j(e,t,"icon")},Ee=()=>{const e=w();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<o.length;e++)o[e].style.backgroundColor=t},Te=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let o=e.innerHTML,n="";t.iconHtml?n=Ae(t.iconHtml):"success"===t.icon?(n=(e=>`\n  ${e.animation?'<div class="swal2-success-circular-line-left"></div>':""}\n  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n  <div class="swal2-success-ring"></div>\n  ${e.animation?'<div class="swal2-success-fix"></div>':""}\n  ${e.animation?'<div class="swal2-success-circular-line-right"></div>':""}\n`)(t),o=o.replace(/ style=".*?"/g,"")):"error"===t.icon?n='\n  <span class="swal2-x-mark">\n    <span class="swal2-x-mark-line-left"></span>\n    <span class="swal2-x-mark-line-right"></span>\n  </span>\n':t.icon&&(n=Ae({question:"?",warning:"!",info:"i"}[t.icon])),o.trim()!==n.trim()&&F(e,n)},Oe=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])J(e,o,"background-color",t.iconColor);J(e,".swal2-success-ring","border-color",t.iconColor)}},Ae=e=>`<div class="${s["icon-content"]}">${e}</div>`;let Me=!1,Pe=0,De=0,Le=0,Re=0;const Ne=e=>{const t=w();if(e.target===t||_().contains(e.target)){Me=!0;const o=ze(e);Pe=o.clientX,De=o.clientY,Le=parseInt(t.style.insetInlineStart)||0,Re=parseInt(t.style.insetBlockStart)||0,$(t,"swal2-dragging")}},Ie=e=>{const t=w();if(Me){let{clientX:o,clientY:n}=ze(e);t.style.insetInlineStart=`${Le+(o-Pe)}px`,t.style.insetBlockStart=`${Re+(n-De)}px`}},Be=()=>{const e=w();Me=!1,W(e,"swal2-dragging")},ze=e=>{let t=0,o=0;return e.type.startsWith("mouse")?(t=e.clientX,o=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,o=e.touches[0].clientY),{clientX:t,clientY:o}},Fe=(e,t)=>{const o=v(),n=w();if(o&&n){if(t.toast){G(o,"width",t.width),n.style.width="100%";const e=P();e&&n.insertBefore(e,_())}else G(n,"width",t.width);G(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),K(T()),He(n,t),t.draggable&&!t.toast?($(n,s.draggable),(e=>{e.addEventListener("mousedown",Ne),document.body.addEventListener("mousemove",Ie),e.addEventListener("mouseup",Be),e.addEventListener("touchstart",Ne),document.body.addEventListener("touchmove",Ie),e.addEventListener("touchend",Be)})(n)):(W(n,s.draggable),(e=>{e.removeEventListener("mousedown",Ne),document.body.removeEventListener("mousemove",Ie),e.removeEventListener("mouseup",Be),e.removeEventListener("touchstart",Ne),document.body.removeEventListener("touchmove",Ie),e.removeEventListener("touchend",Be)})(n))}},He=(e,t)=>{const o=t.showClass||{};e.className=`${s.popup} ${ee(e)?o.popup:""}`,t.toast?($([document.documentElement,document.body],s["toast-shown"]),$(e,s.toast)):$(e,s.modal),j(e,t,"popup"),"string"==typeof t.customClass&&$(e,t.customClass),t.icon&&$(e,s[`icon-${t.icon}`])},je=e=>{const t=document.createElement("li");return $(t,s["progress-step"]),F(t,e),t},Ve=e=>{const t=document.createElement("li");return $(t,s["progress-step-line"]),e.progressStepsDistance&&G(t,"width",e.progressStepsDistance),t},Ue=(e,t)=>{Fe(0,t),me(0,t),((e,t)=>{const o=E();if(!o)return;const{progressSteps:n,currentProgressStep:r}=t;n&&0!==n.length&&void 0!==r?(Y(o),o.textContent="",r>=n.length&&d("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),n.forEach(((e,i)=>{const a=je(e);if(o.appendChild(a),i===r&&$(a,s["active-progress-step"]),i!==n.length-1){const e=Ve(t);o.appendChild(e)}}))):K(o)})(0,t),((e,t)=>{const o=pe.innerParams.get(e),n=_();if(n){if(o&&t.icon===o.icon)return Te(n,t),void ke(n,t);if(t.icon||t.iconHtml)return t.icon&&-1===Object.keys(a).indexOf(t.icon)?(u(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void K(n)):(Y(n),Te(n,t),ke(n,t),$(n,t.showClass&&t.showClass.icon),void window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Ee));K(n)}})(e,t),((e,t)=>{const o=k();o&&(t.imageUrl?(Y(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt||""),G(o,"width",t.imageWidth),G(o,"height",t.imageHeight),o.className=s.image,j(o,t,"image")):K(o))})(0,t),((e,t)=>{const o=S();o&&(X(o),Q(o,Boolean(t.title||t.titleText),"block"),t.title&&ae(t.title,o),t.titleText&&(o.innerText=t.titleText),j(o,t,"title"))})(0,t),((e,t)=>{const o=N();o&&(F(o,t.closeButtonHtml||""),j(o,t,"closeButton"),Q(o,t.showCloseButton),o.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Ce(e,t),de(0,t),((e,t)=>{const o=L();o&&(X(o),Q(o,Boolean(t.footer),"block"),t.footer&&ae(t.footer,o),j(o,t,"footer"))})(0,t);const o=w();"function"==typeof t.didRender&&o&&t.didRender(o),n.eventEmitter.emit("didRender",o)},Ze=()=>{var e;return null===(e=O())||void 0===e?void 0:e.click()},$e=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),We=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},qe=(e,t)=>{var o;const n=I();if(n.length)return-2===(e+=t)&&(e=n.length-1),e===n.length?e=0:-1===e&&(e=n.length-1),void n[e].focus();null===(o=w())||void 0===o||o.focus()},Ge=["ArrowRight","ArrowDown"],Ye=["ArrowLeft","ArrowUp"],Ke=(e,t,o)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Xe(t,e):"Tab"===t.key?Je(t):[...Ge,...Ye].includes(t.key)?Qe(t.key):"Escape"===t.key&&et(t,e,o)))},Xe=(e,t)=>{if(!p(t.allowEnterKey))return;const o=V(w(),t.input);if(e.target&&o&&e.target instanceof HTMLElement&&e.target.outerHTML===o.outerHTML){if(["textarea","file"].includes(t.input))return;Ze(),e.preventDefault()}},Je=e=>{const t=e.target,o=I();let n=-1;for(let e=0;e<o.length;e++)if(t===o[e]){n=e;break}e.shiftKey?qe(n,-1):qe(n,1),e.stopPropagation(),e.preventDefault()},Qe=e=>{const t=D(),o=O(),n=M(),r=A();if(!(t&&o&&n&&r))return;const i=[o,n,r];if(document.activeElement instanceof HTMLElement&&!i.includes(document.activeElement))return;const s=Ge.includes(e)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;if(a){for(let e=0;e<t.children.length;e++){if(a=a[s],!a)return;if(a instanceof HTMLButtonElement&&ee(a))break}a instanceof HTMLButtonElement&&a.focus()}},et=(e,t,o)=>{e.preventDefault(),p(t.allowEscapeKey)&&o($e.esc)};var tt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const ot=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},nt="undefined"!=typeof window&&!!window.GestureEvent,rt=()=>{const e=v();if(!e)return;let t;e.ontouchstart=e=>{t=it(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},it=e=>{const t=e.target,o=v(),n=C();return!(!o||!n||st(e)||at(e)||t!==o&&(te(o)||!(t instanceof HTMLElement)||((e,t)=>{let o=e;for(;o&&o!==t;){if(te(o))return!0;o=o.parentElement}return!1})(t,n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||te(n)&&n.contains(t)))},st=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,at=e=>e.touches&&e.touches.length>1;let lt=null;const ct=e=>{null===lt&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(lt=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${lt+(()=>{const e=document.createElement("div");e.className=s["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function dt(e,t,o,i){z()?vt(e,i):(r(o).then((()=>vt(e,i))),We(n)),nt?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),B()&&(null!==lt&&(document.body.style.paddingRight=`${lt}px`,lt=null),(()=>{if(H(document.body,s.iosfix)){const e=parseInt(document.body.style.top,10);W(document.body,s.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),ot()),W([document.documentElement,document.body],[s.shown,s["height-auto"],s["no-backdrop"],s["toast-shown"]])}function ut(e){e=gt(e);const t=tt.swalPromiseResolve.get(this),o=ht(this);this.isAwaitingPromise?e.isDismissed||(pt(this),t(e)):o&&t(e)}const ht=e=>{const t=w();if(!t)return!1;const o=pe.innerParams.get(e);if(!o||H(t,o.hideClass.popup))return!1;W(t,o.showClass.popup),$(t,o.hideClass.popup);const n=v();return W(n,o.showClass.backdrop),$(n,o.hideClass.backdrop),ft(e,t,o),!0};function mt(e){const t=tt.swalPromiseReject.get(this);pt(this),t&&t(e)}const pt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,pe.innerParams.get(e)||e._destroy())},gt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ft=(e,t,o)=>{var r;const i=v(),s=oe(t);"function"==typeof o.willClose&&o.willClose(t),null===(r=n.eventEmitter)||void 0===r||r.emit("willClose",t),s?bt(e,t,i,o.returnFocus,o.didClose):dt(e,i,o.returnFocus,o.didClose)},bt=(e,t,o,r,i)=>{n.swalCloseEventFinishedCallback=dt.bind(null,e,o,r,i);const s=function(e){var o;e.target===t&&(null===(o=n.swalCloseEventFinishedCallback)||void 0===o||o.call(n),delete n.swalCloseEventFinishedCallback,t.removeEventListener("animationend",s),t.removeEventListener("transitionend",s))};t.addEventListener("animationend",s),t.addEventListener("transitionend",s)},vt=(e,t)=>{setTimeout((()=>{var o;"function"==typeof t&&t.bind(e.params)(),null===(o=n.eventEmitter)||void 0===o||o.emit("didClose"),e._destroy&&e._destroy()}))},yt=e=>{let t=w();if(t||new Qo,t=w(),!t)return;const o=P();z()?K(_()):xt(t,e),Y(o),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},xt=(e,t)=>{const o=D(),n=P();o&&n&&(!t&&ee(O())&&(t=O()),Y(o),t&&(K(t),n.setAttribute("data-button-to-replace",t.className),o.insertBefore(n,t)),$([e,o],s.loading))},wt=e=>e.checked?1:0,_t=e=>e.checked?e.value:null,St=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,Ct=(e,t)=>{const o=w();if(!o)return;const n=e=>{"select"===t.input?function(e,t,o){const n=q(e,s.select);if(!n)return;const r=(e,t,n)=>{const r=document.createElement("option");r.value=n,F(r,t),r.selected=Tt(n,o.inputValue),e.appendChild(r)};t.forEach((e=>{const t=e[0],o=e[1];if(Array.isArray(o)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),o.forEach((t=>r(e,t[1],t[0])))}else r(n,o,t)})),n.focus()}(o,Et(e),t):"radio"===t.input&&function(e,t,o){const n=q(e,s.radio);if(!n)return;t.forEach((e=>{const t=e[0],r=e[1],i=document.createElement("input"),a=document.createElement("label");i.type="radio",i.name=s.radio,i.value=t,Tt(t,o.inputValue)&&(i.checked=!0);const l=document.createElement("span");F(l,r),l.className=s.label,a.appendChild(i),a.appendChild(l),n.appendChild(a)}));const r=n.querySelectorAll("input");r.length&&r[0].focus()}(o,Et(e),t)};g(t.inputOptions)||b(t.inputOptions)?(yt(O()),f(t.inputOptions).then((t=>{e.hideLoading(),n(t)}))):"object"==typeof t.inputOptions?n(t.inputOptions):u("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},kt=(e,t)=>{const o=e.getInput();o&&(K(o),f(t.inputValue).then((n=>{o.value="number"===t.input?`${parseFloat(n)||0}`:`${n}`,Y(o),o.focus(),e.hideLoading()})).catch((t=>{u(`Error in inputValue promise: ${t}`),o.value="",Y(o),o.focus(),e.hideLoading()})))},Et=e=>{const t=[];return e instanceof Map?e.forEach(((e,o)=>{let n=e;"object"==typeof n&&(n=Et(n)),t.push([o,n])})):Object.keys(e).forEach((o=>{let n=e[o];"object"==typeof n&&(n=Et(n)),t.push([o,n])})),t},Tt=(e,t)=>!!t&&t.toString()===e.toString(),Ot=(e,t)=>{const o=pe.innerParams.get(e);if(!o.input)return void u(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const n=e.getInput(),r=((e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return wt(o);case"radio":return _t(o);case"file":return St(o);default:return t.inputAutoTrim?o.value.trim():o.value}})(e,o);o.inputValidator?At(e,r,t):n&&!n.checkValidity()?(e.enableButtons(),e.showValidationMessage(o.validationMessage||n.validationMessage)):"deny"===t?Mt(e,r):Lt(e,r)},At=(e,t,o)=>{const n=pe.innerParams.get(e);e.disableInput(),Promise.resolve().then((()=>f(n.inputValidator(t,n.validationMessage)))).then((n=>{e.enableButtons(),e.enableInput(),n?e.showValidationMessage(n):"deny"===o?Mt(e,t):Lt(e,t)}))},Mt=(e,t)=>{const o=pe.innerParams.get(e||void 0);o.showLoaderOnDeny&&yt(M()),o.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then((()=>f(o.preDeny(t,o.validationMessage)))).then((o=>{!1===o?(e.hideLoading(),pt(e)):e.close({isDenied:!0,value:void 0===o?t:o})})).catch((t=>Dt(e||void 0,t)))):e.close({isDenied:!0,value:t})},Pt=(e,t)=>{e.close({isConfirmed:!0,value:t})},Dt=(e,t)=>{e.rejectPromise(t)},Lt=(e,t)=>{const o=pe.innerParams.get(e||void 0);o.showLoaderOnConfirm&&yt(),o.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then((()=>f(o.preConfirm(t,o.validationMessage)))).then((o=>{ee(T())||!1===o?(e.hideLoading(),pt(e)):Pt(e,void 0===o?t:o)})).catch((t=>Dt(e||void 0,t)))):Pt(e,t)};function Rt(){const e=pe.innerParams.get(this);if(!e)return;const t=pe.domCache.get(this);K(t.loader),z()?e.icon&&Y(_()):Nt(t),W([t.popup,t.actions],s.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const Nt=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?Y(t[0],"inline-block"):ee(O())||ee(M())||ee(A())||K(e.actions)};function It(){const e=pe.innerParams.get(this),t=pe.domCache.get(this);return t?V(t.popup,e.input):null}function Bt(e,t,o){const n=pe.domCache.get(e);t.forEach((e=>{n[e].disabled=o}))}function zt(e,t){const o=w();if(o&&e)if("radio"===e.type){const e=o.querySelectorAll(`[name="${s.radio}"]`);for(let o=0;o<e.length;o++)e[o].disabled=t}else e.disabled=t}function Ft(){Bt(this,["confirmButton","denyButton","cancelButton"],!1)}function Ht(){Bt(this,["confirmButton","denyButton","cancelButton"],!0)}function jt(){zt(this.getInput(),!1)}function Vt(){zt(this.getInput(),!0)}function Ut(e){const t=pe.domCache.get(this),o=pe.innerParams.get(this);F(t.validationMessage,e),t.validationMessage.className=s["validation-message"],o.customClass&&o.customClass.validationMessage&&$(t.validationMessage,o.customClass.validationMessage),Y(t.validationMessage);const n=this.getInput();n&&(n.setAttribute("aria-invalid","true"),n.setAttribute("aria-describedby",s["validation-message"]),U(n),$(n,s.inputerror))}function Zt(){const e=pe.domCache.get(this);e.validationMessage&&K(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),W(t,s.inputerror))}const $t={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},Wt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],qt={allowEnterKey:void 0},Gt=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Yt=e=>Object.prototype.hasOwnProperty.call($t,e),Kt=e=>-1!==Wt.indexOf(e),Xt=e=>qt[e],Jt=e=>{Yt(e)||d(`Unknown parameter "${e}"`)},Qt=e=>{Gt.includes(e)&&d(`The parameter "${e}" is incompatible with toasts`)},eo=e=>{const t=Xt(e);t&&m(e,t)},to=e=>{!1===e.backdrop&&e.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(e.theme)&&d(`Invalid theme "${e.theme}"`);for(const t in e)Jt(t),e.toast&&Qt(t),eo(t)};function oo(e){const t=v(),o=w(),n=pe.innerParams.get(this);if(!o||H(o,n.hideClass.popup))return void d("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const r=no(e),i=Object.assign({},n,r);to(i),t.dataset.swal2Theme=i.theme,Ue(this,i),pe.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const no=e=>{const t={};return Object.keys(e).forEach((o=>{Kt(o)?t[o]=e[o]:d(`Invalid parameter to update: ${o}`)})),t};function ro(){const e=pe.domCache.get(this),t=pe.innerParams.get(this);t?(e.popup&&n.swalCloseEventFinishedCallback&&(n.swalCloseEventFinishedCallback(),delete n.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),n.eventEmitter.emit("didDestroy"),io(this)):so(this)}const io=e=>{so(e),delete e.params,delete n.keydownHandler,delete n.keydownTarget,delete n.currentInstance},so=e=>{e.isAwaitingPromise?(ao(pe,e),e.isAwaitingPromise=!0):(ao(tt,e),ao(pe,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},ao=(e,t)=>{for(const o in e)e[o].delete(t)};var lo=Object.freeze({__proto__:null,_destroy:ro,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Ht,disableInput:Vt,disableLoading:Rt,enableButtons:Ft,enableInput:jt,getInput:It,handleAwaitingPromise:pt,hideLoading:Rt,rejectPromise:mt,resetValidationMessage:Zt,showValidationMessage:Ut,update:oo});const co=(e,t,o)=>{t.popup.onclick=()=>{e&&(uo(e)||e.timer||e.input)||o($e.close)}},uo=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let ho=!1;const mo=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(ho=!0)}}},po=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(ho=!0)}}},go=(e,t,o)=>{t.container.onclick=n=>{ho?ho=!1:n.target===t.container&&p(e.allowOutsideClick)&&o($e.backdrop)}},fo=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e),bo=()=>{if(n.timeout)return(()=>{const e=R();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const o=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${o}%`})(),n.timeout.stop()},vo=()=>{if(n.timeout){const e=n.timeout.start();return ne(e),e}};let yo=!1;const xo={},wo=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in xo){const o=t.getAttribute(e);if(o)return void xo[e].fire({template:o})}};n.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const o=this._getHandlersByEventName(e);o.includes(t)||o.push(t)}once(e,t){const o=(...n)=>{this.removeListener(e,o),t.apply(this,n)};this.on(e,o)}emit(e,...t){this._getHandlersByEventName(e).forEach((e=>{try{e.apply(this,t)}catch(e){console.error(e)}}))}removeListener(e,t){const o=this._getHandlersByEventName(e),n=o.indexOf(t);n>-1&&o.splice(n,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var _o=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||fo(e[0])?["title","html","icon"].forEach(((o,n)=>{const r=e[n];"string"==typeof r||fo(r)?t[o]=r:void 0!==r&&u(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof r}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(e="data-swal-template"){xo[e]=this,yo||(document.body.addEventListener("click",wo),yo=!0)},clickCancel:()=>{var e;return null===(e=A())||void 0===e?void 0:e.click()},clickConfirm:Ze,clickDeny:()=>{var e;return null===(e=M())||void 0===e?void 0:e.click()},enableLoading:yt,fire:function(...e){return new this(...e)},getActions:D,getCancelButton:A,getCloseButton:N,getConfirmButton:O,getContainer:v,getDenyButton:M,getFocusableElements:I,getFooter:L,getHtmlContainer:C,getIcon:_,getIconContent:()=>x(s["icon-content"]),getImage:k,getInputLabel:()=>x(s["input-label"]),getLoader:P,getPopup:w,getProgressSteps:E,getTimerLeft:()=>n.timeout&&n.timeout.getTimerLeft(),getTimerProgressBar:R,getTitle:S,getValidationMessage:T,increaseTimer:e=>{if(n.timeout){const t=n.timeout.increase(e);return ne(t,!0),t}},isDeprecatedParameter:Xt,isLoading:()=>{const e=w();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!n.timeout||!n.timeout.isRunning()),isUpdatableParameter:Kt,isValidParameter:Yt,isVisible:()=>ee(w()),mixin:function(e){return class extends(this){_main(t,o){return super._main(t,Object.assign({},e,o))}}},off:(e,t)=>{e?t?n.eventEmitter.removeListener(e,t):n.eventEmitter.removeAllListeners(e):n.eventEmitter.reset()},on:(e,t)=>{n.eventEmitter.on(e,t)},once:(e,t)=>{n.eventEmitter.once(e,t)},resumeTimer:vo,showLoading:yt,stopTimer:bo,toggleTimer:()=>{const e=n.timeout;return e&&(e.running?bo():vo())}});class So{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Co=["swal-title","swal-html","swal-footer"],ko=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{Lo(e,["name","value"]);const o=e.getAttribute("name"),n=e.getAttribute("value");o&&n&&(t[o]="boolean"==typeof $t[o]?"false"!==n:"object"==typeof $t[o]?JSON.parse(n):n)})),t},Eo=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const o=e.getAttribute("name"),n=e.getAttribute("value");o&&n&&(t[o]=new Function(`return ${n}`)())})),t},To=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{Lo(e,["type","color","aria-label"]);const o=e.getAttribute("type");o&&["confirm","cancel","deny"].includes(o)&&(t[`${o}ButtonText`]=e.innerHTML,t[`show${c(o)}Button`]=!0,e.hasAttribute("color")&&(t[`${o}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${o}ButtonAriaLabel`]=e.getAttribute("aria-label")))})),t},Oo=e=>{const t={},o=e.querySelector("swal-image");return o&&(Lo(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")||void 0),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")||void 0),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")||void 0),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt")||void 0)),t},Ao=e=>{const t={},o=e.querySelector("swal-icon");return o&&(Lo(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},Mo=e=>{const t={},o=e.querySelector("swal-input");o&&(Lo(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach((e=>{Lo(e,["value"]);const o=e.getAttribute("value");if(!o)return;const n=e.innerHTML;t.inputOptions[o]=n}))),t},Po=(e,t)=>{const o={};for(const n in t){const r=t[n],i=e.querySelector(r);i&&(Lo(i,[]),o[r.replace(/^swal-/,"")]=i.innerHTML.trim())}return o},Do=e=>{const t=Co.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const o=e.tagName.toLowerCase();t.includes(o)||d(`Unrecognized element <${o}>`)}))},Lo=(e,t)=>{Array.from(e.attributes).forEach((o=>{-1===t.indexOf(o.name)&&d([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])}))},Ro=e=>{const t=v(),o=w();"function"==typeof e.willOpen&&e.willOpen(o),n.eventEmitter.emit("willOpen",o);const r=window.getComputedStyle(document.body).overflowY;zo(t,o,e),setTimeout((()=>{Io(t,o)}),10),B()&&(Bo(t,e.scrollbarPadding,r),(()=>{const e=v();Array.from(document.body.children).forEach((t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))}))})()),z()||n.previousActiveElement||(n.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(o))),n.eventEmitter.emit("didOpen",o)},No=e=>{const t=w();if(e.target!==t)return;const o=v();t.removeEventListener("animationend",No),t.removeEventListener("transitionend",No),o.style.overflowY="auto",W(o,s["no-transition"])},Io=(e,t)=>{oe(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",No),t.addEventListener("transitionend",No)):e.style.overflowY="auto"},Bo=(e,t,o)=>{(()=>{if(nt&&!H(document.body,s.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",$(document.body,s.iosfix),rt()}})(),t&&"hidden"!==o&&ct(o),setTimeout((()=>{e.scrollTop=0}))},zo=(e,t,o)=>{$(e,o.showClass.backdrop),o.animation?(t.style.setProperty("opacity","0","important"),Y(t,"grid"),setTimeout((()=>{$(t,o.showClass.popup),t.style.removeProperty("opacity")}),10)):Y(t,"grid"),$([document.documentElement,document.body],s.shown),o.heightAuto&&o.backdrop&&!o.toast&&$([document.documentElement,document.body],s["height-auto"])};var Fo=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),Ho=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function jo(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Fo),"url"===e.input&&(e.inputValidator=Ho))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&d("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(d('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),se(e)}let Vo;var Uo=new WeakMap;class Zo{constructor(...t){if(o(this,Uo,void 0),"undefined"==typeof window)return;Vo=this;const n=Object.freeze(this.constructor.argsToParams(t));var r,i,s;this.params=n,this.isAwaitingPromise=!1,r=Uo,i=this,s=this._main(Vo.params),r.set(e(r,i),s)}_main(e,t={}){if(to(Object.assign({},t,e)),n.currentInstance){const e=tt.swalPromiseResolve.get(n.currentInstance),{isAwaitingPromise:t}=n.currentInstance;n.currentInstance._destroy(),t||e({isDismissed:!0}),B()&&ot()}n.currentInstance=Vo;const o=Wo(e,t);jo(o),Object.freeze(o),n.timeout&&(n.timeout.stop(),delete n.timeout),clearTimeout(n.restoreFocusTimeout);const r=qo(Vo);return Ue(Vo,o),pe.innerParams.set(Vo,o),$o(Vo,r,o)}then(e){return t(Uo,this).then(e)}finally(e){return t(Uo,this).finally(e)}}const $o=(e,t,o)=>new Promise(((r,i)=>{const s=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};tt.swalPromiseResolve.set(e,r),tt.swalPromiseReject.set(e,i),t.confirmButton.onclick=()=>{(e=>{const t=pe.innerParams.get(e);e.disableButtons(),t.input?Ot(e,"confirm"):Lt(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=pe.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?Ot(e,"deny"):Mt(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t($e.cancel)})(e,s)},t.closeButton.onclick=()=>{s($e.close)},((e,t,o)=>{e.toast?co(e,t,o):(mo(t),po(t),go(e,t,o))})(o,t,s),((e,t,o)=>{We(e),t.toast||(e.keydownHandler=e=>Ke(t,e,o),e.keydownTarget=t.keydownListenerCapture?window:w(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(n,o,s),((e,t)=>{"select"===t.input||"radio"===t.input?Ct(e,t):["text","email","number","tel","textarea"].some((e=>e===t.input))&&(g(t.inputValue)||b(t.inputValue))&&(yt(O()),kt(e,t))})(e,o),Ro(o),Go(n,o,s),Yo(t,o),setTimeout((()=>{t.container.scrollTop=0}))})),Wo=(e,t)=>{const o=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return Do(o),Object.assign(ko(o),Eo(o),To(o),Oo(o),Ao(o),Mo(o),Po(o,Co))})(e),n=Object.assign({},$t,t,o,e);return n.showClass=Object.assign({},$t.showClass,n.showClass),n.hideClass=Object.assign({},$t.hideClass,n.hideClass),!1===n.animation&&(n.showClass={backdrop:"swal2-noanimation"},n.hideClass={}),n},qo=e=>{const t={popup:w(),container:v(),actions:D(),confirmButton:O(),denyButton:M(),cancelButton:A(),loader:P(),closeButton:N(),validationMessage:T(),progressSteps:E()};return pe.domCache.set(e,t),t},Go=(e,t,o)=>{const n=R();K(n),t.timer&&(e.timeout=new So((()=>{o("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(Y(n),j(n,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&ne(t.timer)}))))},Yo=(e,t)=>{if(!t.toast)return p(t.allowEnterKey)?void(Ko(e)||Xo(e,t)||qe(-1,1)):(m("allowEnterKey"),void Jo())},Ko=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Xo=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton)||(e.confirmButton.focus(),0)),Jo=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};Zo.prototype.disableButtons=Ht,Zo.prototype.enableButtons=Ft,Zo.prototype.getInput=It,Zo.prototype.disableInput=Vt,Zo.prototype.enableInput=jt,Zo.prototype.hideLoading=Rt,Zo.prototype.disableLoading=Rt,Zo.prototype.showValidationMessage=Ut,Zo.prototype.resetValidationMessage=Zt,Zo.prototype.close=ut,Zo.prototype.closePopup=ut,Zo.prototype.closeModal=ut,Zo.prototype.closeToast=ut,Zo.prototype.rejectPromise=mt,Zo.prototype.update=oo,Zo.prototype._destroy=ro,Object.assign(Zo,_o),Object.keys(lo).forEach((e=>{Zo[e]=function(...t){return Vo&&Vo[e]?Vo[e](...t):null}})),Zo.DismissReason=$e,Zo.version="11.26.3";const Qo=Zo;return Qo.default=Qo,Qo}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2)},88785:()=>{tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2Zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1Z" fill-rule="nonzero"/></svg>',"accordion-toggle":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M4 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M4 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.3 7.3a1 1 0 0 1 1.4 0L16 9.6l2.3-2.3a1 1 0 1 1 1.4 1.4L16 12.4l-3.7-3.7a1 1 0 0 1 0-1.4ZM4.3 11.7a1 1 0 0 1 0-1.4L6.6 8 4.3 5.7a1 1 0 0 1 1.4-1.4L9.4 8l-3.7 3.7a1 1 0 0 1-1.4 0Z"/></svg>',accordion:'<svg width="24" height="24"><rect x="12" y="7" width="10" height="2" rx="1"/><rect x="12" y="11" width="10" height="2" rx="1"/><rect x="12" y="15" width="6" height="2" rx="1"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.3 7.3a1 1 0 0 1 1.4 0L6 9.6l2.3-2.3a1 1 0 0 1 1.4 1.4L6 12.4 2.3 8.7a1 1 0 0 1 0-1.4Z"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3Z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3Z"/></svg>',addtag:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 5a2 2 0 0 1 1.6.8L21 12l-4.4 6.2a2 2 0 0 1-1.6.8h-3v-2h3l3.5-5L15 7H5v3H3V7c0-1.1.9-2 2-2h10Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 12a1 1 0 0 0-1 1v2H3a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2H7v-2c0-.6-.4-1-1-1Z"/></svg>',"ai-prompt":'<svg width="24" height="24"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 6.7a1 1 0 0 0-1.4 0l-9.9 10a1 1 0 0 0 0 1.3l2.1 2.1c.4.4 1 .4 1.4 0l10-9.9c.3-.3.3-1 0-1.4l-2.2-2Zm1.4 2.8-2-2-3 2.7 2.2 2.2 2.8-2.9Z"/><path d="m18.5 7.3-.7-1.5-1.5-.8 1.5-.7.7-1.5.7 1.5 1.5.7-1.5.8-.7 1.5ZM18.5 16.5l-.7-1.6-1.5-.7 1.5-.7.7-1.6.7 1.6 1.5.7-1.5.7-.7 1.6ZM9.7 7.3 9 5.8 7.5 5 9 4.3l.7-1.5.7 1.5L12 5l-1.5.8-.7 1.5Z"/></g><defs><clipPath id="a"><path d="M0 0h24v24H0z"/></clipPath></defs></svg>',ai:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M5 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H5Zm6.8 11.5.5 1.2a68.3 68.3 0 0 0 .7 1.1l.4.1c.3 0 .5 0 .7-.3.2-.1.3-.3.3-.6l-.3-1-2.6-6.2a20.4 20.4 0 0 0-.5-1.3l-.5-.4-.7-.2c-.2 0-.5 0-.6.2-.2 0-.4.2-.5.4l-.3.6-.3.7L5.7 15l-.2.6-.1.4c0 .3 0 .5.3.7l.6.2c.3 0 .5 0 .7-.2l.4-1 .5-1.2h3.9ZM9.8 9l1.5 4h-3l1.5-4Zm5.6-.9v7.6c0 .4 0 .7.2 1l.7.2c.3 0 .6 0 .8-.3l.2-.9V8.1c0-.4 0-.7-.2-.9a1 1 0 0 0-.8-.3c-.2 0-.5.1-.7.3l-.2 1Z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5 13 7H5a1 1 0 1 1 0-2h9.2Zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h6.8Zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h4.4Zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2ZM7 17l-1.2 2H5a1 1 0 0 1 0-2h2Zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2Zm5.2-13.5 1.3.7-9.7 16.3-1.3-.7 9.7-16.3Z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="m5.6 13 12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8Z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="m18.5 13-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8Z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8Zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4Zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4Z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1Z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',brightness:'<svg width="24" height="24"><path d="M12.7 18.3a1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v1a1 1 0 0 0 .3.7 1 1 0 0 0 .7.3 1 1 0 0 0 .7-.3 1 1 0 0 0 .3-.7v-1a1 1 0 0 0-.3-.7ZM11.3 5.7a1 1 0 0 0 .7.3 1 1 0 0 0 .7-.3A1 1 0 0 0 13 5V4a1 1 0 0 0-.3-.7A1 1 0 0 0 12 3a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v1a1 1 0 0 0 .3.7Zm9.4 5.6a1 1 0 0 0-.7-.3h-1a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 .3.7 1 1 0 0 0 .7.3h1a1 1 0 0 0 .7-.3 1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7Zm-15 1.4A1 1 0 0 0 6 12a1 1 0 0 0-.3-.7A1 1 0 0 0 5 11H4a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 .3.7 1 1 0 0 0 .7.3h1a1 1 0 0 0 .7-.3Zm13 4.6-.7-.8a1 1 0 0 0-.8-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 .3.8l.7.7a1 1 0 0 0 .7.3 1 1 0 0 0 .8-.3 1 1 0 0 0 .3-.8 1 1 0 0 0-.3-.7ZM5.3 6.7l.7.8a1 1 0 0 0 .8.3 1 1 0 0 0 .7-.3 1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.8l-.7-.7A1 1 0 0 0 6 5a1 1 0 0 0-.8.3 1 1 0 0 0-.3.8 1 1 0 0 0 .3.6Zm12 1a1 1 0 0 0 .7-.2l.7-.7A1 1 0 0 0 19 6a1 1 0 0 0-.3-.8 1 1 0 0 0-.8-.3 1 1 0 0 0-.7.3l-.7.7a1 1 0 0 0-.3.8 1 1 0 0 0 .3.7 1 1 0 0 0 .7.2ZM6.7 16.4a1 1 0 0 0-.8.2l-.7.7a1 1 0 0 0-.3.7 1 1 0 0 0 .3.8 1 1 0 0 0 .8.3 1 1 0 0 0 .7-.3l.7-.7a1 1 0 0 0 .3-.8 1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3Z"/><path fill-rule="evenodd" d="M13.6 8.3A4 4 0 0 0 12 8a4 4 0 0 0-1.6.3A4 4 0 0 0 9 9.5a4 4 0 0 0-.6 1A4 4 0 0 0 8 12c0 .6.1 1 .3 1.6a4 4 0 0 0 2.1 2 4 4 0 0 0 1.6.4 4 4 0 0 0 1.6-.3 4 4 0 0 0 2-2.1A4 4 0 0 0 16 12a4 4 0 0 0-.3-1.6 4 4 0 0 0-2.1-2ZM14 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9.4-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6Z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8ZM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7Z" fill-rule="nonzero"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="m15.7 2 1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 0 1-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2ZM18 12l-4.5-4L9 12h9ZM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16Z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 0 1-2-2v-5h2zm8-7V4h6a2 2 0 0 1 2 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="m13 11-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="m18.4 8 1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 0 1-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8Zm1.6 7-3-3-3 3h6Z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 0 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1Zm4.8-6.8V10H7.7V5.8h-1v-1h2ZM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1Zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1ZM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2V18.7l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1Zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6Zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4Zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8Zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1Z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2ZM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11Z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8Z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3 4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1Z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 0 1 0-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 0 1 0-1.1L6 5 2.2 1.3Z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8 5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0Z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2 13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5Z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11Zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.8-2Zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2ZM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5Z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4Zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5Z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8Zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24" class="color-swatch-remove-color"><path stroke="#000" stroke-width="2" d="M21 3 3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2Z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/></svg>',contrast:'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 0 1 19.4 9c.4 1 .6 2 .6 3.1s-.2 2.1-.6 3.1a8 8 0 0 1-1.7 2.6 8 8 0 0 1-2.6 1.7 7.8 7.8 0 0 1-3.1.6 7.8 7.8 0 0 1-3.1-.6 8 8 0 0 1-2.6-1.7A8 8 0 0 1 4.6 15 7.8 7.8 0 0 1 4 12c0-1.1.2-2.1.6-3.1a8 8 0 0 1 1.7-2.6A8 8 0 0 1 9 4.6 7.8 7.8 0 0 1 12 4Zm-6 8a6 6 0 0 0 1.8 4.2 6 6 0 0 0 1.9 1.3 5.8 5.8 0 0 0 2.3.5V6c-.8 0-1.6.2-2.3.5a6 6 0 0 0-2 1.3 6 6 0 0 0-1.2 1.9A5.8 5.8 0 0 0 6 12Z"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3Zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7Zm0 12V9h-7v10h7Z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3ZM9 9v5l5-5H9Zm1 6h5v-5l-5 5Z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0 1 10.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 0 1 2 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 0 1 7 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7Zm12.3 5h-3v10h3v-10ZM8 13.8h-.3l-.4.2a2.8 2.8 0 0 0-.7.4v.1a2.8 2.8 0 0 0-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 0 0 .8-.3 2.4 2.4 0 0 0 .7-.7 2.5 2.5 0 0 0 .3-.8 1.5 1.5 0 0 0 0-.8 1 1 0 0 0-.2-.4 1 1 0 0 0-.5-.2H8Zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4ZM7 5.8h-.4a1 1 0 0 0-.5.3 1 1 0 0 0-.2.5v.7a2.5 2.5 0 0 0 .3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 0 0 0-.8 2.6 2.6 0 0 0-.3-.8A2.5 2.5 0 0 0 7.7 6l-.4-.1H7Z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l2 2V3h14ZM8.5 15.3h-.3a2.6 2.6 0 0 0-.8.4 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3L9 18V18l.4-.4.2-.4.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2h-.5Zm7 0H15a1 1 0 0 0-.4.3 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4a2.8 2.8 0 0 0 .5.7h.1a2.8 2.8 0 0 0 .8.6l.4.1h.7l.5-.2.2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3h-.3ZM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4Zm8.5-7.1h-11v2h11v-2Z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8Zm-8.5 2.2.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-1Zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4Zm5.4 4 .2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .8.5l.4.1h.7l.5-.2Z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5Zm0 4h2v2h-2V9ZM9 9h2v2H9V9Zm4 4h2v2h-2v-2Zm-4 0h2v2H9v-2Zm0 4h2v2H9v-2Zm4 0h2v2h-2v-2ZM9 5h2v2H9V5Z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7Zm-2 2h-3v12h3V8Zm-2-6v2H8v15H6V2h7Z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16Zm-2 2H8v3h12v-3Zm-1-6v2H4v5H2V7h17Z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10Zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2Z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1Z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="m19.8 8.8-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5Zm-2-.2 1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5Zm-1 1-2.5-2.4-6 6 2.5 2.5 6-6Zm-7 7.1-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5Z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9ZM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13Zm3-5.3 1.3 2 3-4.7 3.7 6H7l2-3.3Z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6Zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4Zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6Zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3Zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2Zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2Z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm4.8 2.6 5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4Z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13Z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3 18 7v1h-5V5H7v14h9a1 1 0 0 1 2 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5Z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3Z"/><path d="M16.4 9.2a1 1 0 0 1 1.4.2l2.4 3.6-2.4 3.6a1 1 0 0 1-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 0 1 .2-1.4Z"/></g></svg>',fill:'<svg width="24" height="26"><path d="m16.6 12-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2ZM5.2 13 10 8.2l4.8 4.8H5.2ZM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5Z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2Zm4-8h2V9h-2v2ZM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2Zm14-2v2h2a2 2 0 0 0-2-2Zm-7 16h2V3h-2v18Zm7-6h2v-2h-2v2Zm-4-8h2V5h-2v2Zm4 12a2 2 0 0 0 2-2h-2v2Z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5Zm8 4v2h2v-2h-2Zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2Zm2 14h-2v2a2 2 0 0 0 2-2ZM3 11v2h18v-2H3Zm6 7v2h2v-2H9Zm8-4v2h2v-2h-2ZM5 18c0 1.1.9 2 2 2v-2H5Z" fill-rule="nonzero"/></svg>',footnote:'<svg width="24" height="24"><path d="M19 13c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h14Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19 4v6h-1V5h-1.5V4h2.6Z"/><path d="M12 18c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h7ZM14 8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2h9Z"/></svg>',"format-code":'<svg width="24" height="24"><path d="m10 22 2-7H6l9-13h2l-2 8h7L12 22h-2ZM6 2h7l-1.4 2H6V2Zm4.2 4H4v2h4.8l1.4-2Zm-2.7 4H2v2h4l1.5-2Z"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3Z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-2h10Z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="m15.3 10-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3Zm0 4 3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2ZM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3ZM8.7 10 5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2Z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="m5 15.7 2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7ZM5 18V19h3l1.8-1.9-2-2L5 17.9Zm14-3-2.5-2.4-6.4 6.5H19v-4ZM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1Zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4ZM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1Zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1Z"/></svg>',gamma:'<svg height="24" width="24"><path d="M11.5 16.3a.7.7 0 1 0 1.4 0V14l2.7-6a.7.7 0 1 0-1.2-.6l-2.2 5-2.3-4.9C9.6 7 8.7 7 8 7.2v1.1c.8-.2.9 0 1.2 1l2.3 4.7z"/><path d="M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2h14v14H5z" fill-rule="evenodd"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1ZM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8Z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path class="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="m5 15.7 3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7ZM5 18V19h3l2.8-2.9-2-2L5 17.9Zm14-3-2.5-2.4-6.4 6.5H19v-4ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Zm-1 3v2h2V7h-2Zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4Z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18Z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1Z"/></g></svg>',invert:'<svg height="24" width="24"><path d="M5 4 3.6 5.4l3.9 4C6.6 10.7 6 12.3 6 14a6 6 0 0 0 10.3 4.2l1.9 1.8 1.4-1.4z" fill-rule="evenodd"/><path d="M13.4 8.4c.9 1 1.6 2.1 2 3.2l2.6 2.6V14c0-5-6-10-6-10s-1 .8-2.1 2l1.4 1.5.7-.7 1.4 1.6z"/></svg>',italic:'<svg width="24" height="24"><path d="m16.7 4.7-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8Z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 0 0 3.2-2.1l-.2-.2a6 6 0 0 0-1-.6Zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 0 1-2-2.8Zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7Zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3Zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 0 1-.3-2Zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1Zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6Zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3Zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1Zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3Zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1Zm3-1.4-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 0 0-1.3-3.5Zm-9 0 2 .2V5.5a9 9 0 0 0-2 2.2Zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 0 0-2-2.3Zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 0 1 1.9-2.5Zm4.4 0 .1.1a10 10 0 0 1 1.8 2.4l1.1-.7a7.5 7.5 0 0 0-3-1.8Z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zM7 3.6l3.7 3.7a1 1 0 0 1-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 0 1 1.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 0 1 1.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 0 1-1.3 0h-.1a1 1 0 0 1 0-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="m15 9-8 8H4v-3l8-8 3 3Zm1-1-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1ZM4 18h16v2H4v-2Z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2Z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg height="48" width="48"><path d="M8 14a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 24a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 34a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z" fill-rule="evenodd"/><path d="M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z" opacity=".2"/></svg>',"list-bull-default":'<svg height="48" width="48"><path d="M14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/><path d="M12 24a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z" fill-rule="evenodd"/><path d="M16 31h6v6h-6z"/><path d="M16 31h6v6h-6z"/><path d="M18 12h22v4H18zm4 10h18v4H22zm4 10h14v4H26z" opacity=".2"/></svg>',"list-bull-disc":'<svg height="48" width="48"><path d="M14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm0 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm0 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/><path d="M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z" opacity=".2"/></svg>',"list-bull-square":'<svg height="48" width="48"><path d="M8 21h6v6H8zm0 10h6v6H8zm0-20h6v6H8z"/><path d="M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z" opacity=".2"/></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8h-.1l-1.5 1v-1.1l1.6-1.1h1.2v6zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2Zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5Zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7Zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7Z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7Zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6ZM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7ZM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4Zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3ZM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6Zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7Zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4Zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3Zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7Zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8Zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4ZM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22Zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3ZM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7ZM37.1 34.6 34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2Zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1ZM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4Zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8Zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7Zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3ZM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22Zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2Zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1Zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33Zm0 10v-1.2h-1.3V26H33Zm0 10v-1.2h-1.3V36H33Z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15Zm0 10v-1.2h1.3V26H15Zm0 10v-1.2h1.3V36H15Z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="m39.3 17-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3Zm-1.6-4.7-.7 2.3h1.6l-.8-2.3ZM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7Zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7Zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1Zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26ZM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2Zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="m12.6 17-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3ZM11 12.3l-.7 2.3h1.6l-.8-2.3Zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7ZM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7ZM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1Zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26Zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2Zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7Z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3Zm0 10v-1.2H33V27h-1.3Zm0 10v-1.2H33V37h-1.3Z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15Zm0 10v-1.2h1.3V27H15Zm0 10v-1.2h1.3V37H15Z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3ZM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7Z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5ZM4.4 16.2 6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',"math-equation":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 4.8c.1-.5.5-.8 1-.8h10a1 1 0 1 1 0 2h-9.2L8.3 19.2a1 1 0 0 1-1.7.4l-3.4-4.2a1 1 0 0 1 1.6-1.2l2 2.5L9 4.8Zm9.7 5.5c.4.4.4 1 0 1.4L17 13.5l1.8 1.8a1 1 0 1 1-1.4 1.4L15.5 15l-1.8 1.8a1 1 0 0 1-1.4-1.4l1.8-1.8-1.8-1.8a1 1 0 0 1 1.4-1.4l1.8 1.8 1.8-1.8a1 1 0 0 1 1.4 0Z"/></svg>',mentions:'<svg height="24" width="24"><path d="M12 21a8.8 8.8 0 0 1-3.5-.7 9 9 0 0 1-2.9-2 9 9 0 0 1-1.9-2.8A8.8 8.8 0 0 1 3 12c0-1.3.2-2.4.7-3.5a9 9 0 0 1 4.8-4.8A8.8 8.8 0 0 1 12 3c1.3 0 2.4.2 3.5.7a9.1 9.1 0 0 1 4.8 4.8A8.7 8.7 0 0 1 21 12v1.4a3 3 0 0 1-.9 2.2 3 3 0 0 1-2.2.9c-.5 0-1-.1-1.5-.4a3.8 3.8 0 0 1-1.1-1 4.8 4.8 0 0 1-1.5 1 4.3 4.3 0 0 1-1.8.4c-1.2 0-2.3-.4-3.2-1.3-.9-.9-1.3-2-1.3-3.2s.4-2.3 1.3-3.2c.9-.9 2-1.3 3.2-1.3s2.3.4 3.2 1.3c.9.9 1.3 2 1.3 3.2v1.4c0 .4.1.7.4 1 .3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1V12c0-2-.7-3.8-2.1-5.2S14 4.7 12 4.7s-3.8.7-5.2 2.1S4.7 10 4.7 12s.7 3.8 2.1 5.2 3.2 2.1 5.2 2.1h4.5V21zm0-6.2c.8 0 1.4-.3 2-.8a2.7 2.7 0 0 0 .8-2c0-.8-.3-1.4-.8-2a2.7 2.7 0 0 0-2-.8c-.8 0-1.4.3-2 .8a2.7 2.7 0 0 0-.8 2c0 .8.3 1.4.8 2a2.7 2.7 0 0 0 2 .8z"/></svg>',minus:'<svg width="24" height="24"><path d="M19 11a1 1 0 0 1 .1 2H5a1 1 0 0 1-.1-2H19Z"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="m15 13 2-2v8H5V7h8l-2 2H7v8h8v-4Zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19Z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3Zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1Z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M15.5 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7ZM13 17v-2h-2v2h2Zm0-4V7h-2v6h2Z" fill-rule="evenodd" clip-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2Zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19Zm-1 8.8.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3Zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2ZM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6Zm-1 8.8.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3ZM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4 1 13l6.4 6.5 6.5-6.5-6.5-6.5ZM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7ZM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1Z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2Z" fill-rule="evenodd"/></svg>',"export-pdf":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H7v3H5V5c0-1.1.9-2 2-2Z"/><path d="M2.6 15.2v-1.9h1c.6 0 1-.2 1.4-.5.3-.3.5-.7.5-1.2s-.2-.9-.5-1.2a2 2 0 0 0-1.3-.4H1v5.2h1.6Zm.4-3h-.4v-1.1h.5l.6.1.2.5c0 .1 0 .3-.2.4l-.7.1Zm5.7 3 1-.1c.3 0 .5-.2.7-.4l.5-.8c.2-.3.2-.7.2-1.3v-1l-.5-.8c-.2-.3-.4-.5-.7-.6L8.7 10H6.3v5.2h2.4Zm-.4-1.1H8v-3h.4c.5 0 .8.2 1 .4l.2 1.1-.1 1-.3.3-.8.2Zm5.3 1.2V13h2v-1h-2v-1H16V10h-4v5.2h1.6Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"/></svg>',"export-word":'<svg width="24" height="24"><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V17h-2V9h-4V5H5c0-1.1.9-2 2-2ZM15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z"/></svg>',"import-word":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3h7.4L19 7.6V15h-2V9h-4V5H5c0-1.1.9-2 2-2Z"/><path d="M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.4 18.2a1 1 0 0 0 1.2 1.6l1.4-1V22a1 1 0 1 0 2 0v-3.1l1.4 1a1 1 0 0 0 1.2-1.7L15 15.8l-3.6 2.4Z"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2ZM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1ZM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1Z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm8 7v12h-6V8h6Zm-1.5 1.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm-2 7v12H4V8h6ZM8.5 9.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 11v5H8v-5h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 7v5H8V8h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2Z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5 8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1Z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 0 1 .1 2H13v6a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H11V5c0-.6.4-1 1-1Z"/></svg>',preferences:'<svg width="24" height="24"><path d="m20.1 13.5-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1ZM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5Zm-2.4-1 .7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 0 1-2.8-3.7 1 1 0 0 1 0-1Zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6Z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-3-3Zm-1 10H7v-4h10v4Zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5Zm.5-8H6v2h12V5Z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 1 1-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3Z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="m5 22.1-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5ZM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1Z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8ZM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1Z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1Zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4Zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9Zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7ZM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3Z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5Z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1Z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></g></svg>',"revision-history":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1Z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8Z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5Zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2Z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2Zm0 2v2h14v-2H5Zm10 0h2v2h-2v-2Zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6Z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2Zm0 8h2v-2H3v2Zm4 8h2v-2H7v2ZM3 9h2V7H3v2Zm10-6h-2v2h2V3Zm6 0v2h2a2 2 0 0 0-2-2ZM5 21v-2H3c0 1.1.9 2 2 2Zm-2-4h2v-2H3v2ZM9 3H7v2h2V3Zm2 18h2v-2h-2v2Zm8-8h2v-2h-2v2Zm0 8a2 2 0 0 0 2-2h-2v2Zm0-12h2V7h-2v2Zm0 8h2v-2h-2v2Zm-4 4h2v-2h-2v2Zm0-16h2V3h-2v2ZM7 17h10V7H7v10Zm2-8h6v6H9V9Z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3Z"/></svg>',send:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="m13.3 22 7-18.3-18.3 7L9 15l4.3 7ZM18 6.8l-.7-.7L9.4 14l.7.7L18 6.8Z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V8H5a1 1 0 1 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6ZM8 8h2V6H8v2Zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V13H5a1 1 0 0 1 0-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6ZM14 13h2v-2h-2v2Zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6ZM8 18h2v-2H8v2Z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path fill-rule="evenodd" d="m16 6 4 4-8 9-8-9 4-4h8Zm-4 10.2 5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2Z"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 0 1 0-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7ZM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7Z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6Zm0-3v2h2V5H6Zm13 0h-3v5h3v1h-3a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1Zm-5 1.5-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5ZM13 10V8h-2v2h2Zm0-3V5h-2v2h2Zm3 5 1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12Z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1Z"/><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="m10.4 10 4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10ZM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19Z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4 10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4Zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11Z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8Zm-2 2H5v5h6V6Z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 0 1 2 2v7h-8v-2h6V6h-6V4Z" opacity=".2"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3Z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8 0h-6v5h6v-5Zm-8-7H5v5h6V6Z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v7h-8v7H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8-7h-6v5h6V6Zm-8 0H5v5h6V6Z"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2Zm.3.5 1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5Z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6Zm-4.7 1.8 1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3Z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 6v12h14V6H5Z"/><path d="m14.4 8.6 1.1 1-2.4 2.4 2.4 2.4-1.1 1.1-2.4-2.4-2.4 2.4-1-1.1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 0 1-2 0V6h-8v12h8v-1a1 1 0 0 1 2 0v2c0 .5-.4 1-.9 1H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h15ZM9 13H5v5h4v-5Zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H17v2a1 1 0 0 1-2 .1V13h-2a1 1 0 0 1-.1-2H15V9c0-.6.4-1 1-1ZM9 6H5v5h4V6Z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 2 0v1h8V6H5v1a1 1 0 1 1-2 0V5c0-.6.4-1 1-1h15Zm0 9h-4v5h4v-5ZM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H9v2a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H7V9c0-.6.4-1 1-1Zm11-2h-4v5h4V6Z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 1 1 0 2H5v6h14V6h-1a1 1 0 0 1 0-2h2c.6 0 1 .4 1 1v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-.6.4-1 1-1h2Zm5 10H5v4h6v-4Zm8 0h-6v4h6v-4ZM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 .1V8H9a1 1 0 0 1 0-2h2V4c0-.6.4-1 1-1Z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 0 1 .1 2H13v2a1 1 0 0 1-2 .1V18H9a1 1 0 0 1-.1-2H11v-2c0-.6.4-1 1-1Zm6 7a1 1 0 0 1 0-2h1v-6H5v6h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V6c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v13c0 .5-.4 1-.9 1H18ZM11 6H5v4h6V6Zm8 0h-6v4h6V6Z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 9h-4v5h4v-5Zm-6 0H9v5h4v-5Zm0-7H9v5h4V6Zm6 0h-4v5h4V6Z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15.5V18h3v-2.5H5Zm14-5h-9V18h9v-7.5ZM19 6h-4v2.5h4V6ZM8 6H5v2.5h3V6Zm5 0h-3v2.5h3V6Zm-8 7.5h3v-3H5v3Z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6Zm0 12h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 11h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 6h8v3H6V6Zm11 0c.6 0 1 .4 1 1v1a1 1 0 1 1-2 0V7c0-.6.4-1 1-1Z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h12Zm0 12h-8v3h8v-3ZM7 16a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8v-3ZM7 11a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8V6ZM7 6a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0V7c0-.6-.4-1-1-1Z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-9h-6v3h6V6ZM5 9h6V6H5v3Z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM8 15.5H5V18h3v-2.5Zm11-5h-9V18h9v-7.5Zm-2.5 1 1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2Zm-8.5-1H5v3h3v-3ZM19 6h-4v2.5h4V6ZM8 6H5v2.5h3V6Zm5 0h-3v2.5h3V6Z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 11H5v3h6v-3Zm8 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 14v4h6v-4H5Zm14 0h-6v4h6v-4Zm0-6h-6v4h6V8ZM5 12h6V8H5v4Z"/></svg>',"template-add":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 12v4H5a2 2 0 0 0-2 2v3h9.3a6 6 0 0 1-.3-2H5v-1h7a6 6 0 0 1 .8-2H11v-5l-.8-.6a3 3 0 1 1 3.6 0l-.8.6v4.7a6 6 0 0 1 2-1.9V12a5 5 0 1 0-6 0Z"/><path d="M18 15c.5 0 1 .4 1 .9V18h2a1 1 0 0 1 .1 2H19v2a1 1 0 0 1-2 .1V20h-2a1 1 0 0 1-.1-2H17v-2c0-.6.4-1 1-1Z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14ZM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4Zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2Z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0Zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-4.1 3.7Z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path class="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4Zm2.6-7.6-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4Z"/></g></svg>',"text-size-decrease":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM14 12a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-6Z"/></svg>',"text-size-increase":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM17 9a1 1 0 0 0-1 1v2h-2a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2h-2v-2c0-.6-.4-1-1-1Z"/></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="m12.7 14.3-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8Zm4.3-3 2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 0 1 2 0Zm-2.2 4.4h2.4L16 12.5l-1.2 3.2Z" fill-rule="evenodd"/></svg>',typography:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M17 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H7a1 1 0 0 1 0-2h10Z"/><path d="m17.5 14 .8-1.7 1.7-.8-1.7-.8-.8-1.7-.8 1.7-1.7.8 1.7.8.8 1.7ZM7 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1 1-2Z"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1ZM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 0 1-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8Z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2ZM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1ZM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5Zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5Zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17Zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19Zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 1.5H19Z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2Z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2ZM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1Z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6Z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12ZM11 6.4 8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4Z" fill-rule="nonzero"/></svg>',"add-file":'<svg height="24" width="24"><path d="M2 7h2V4h3V2H4a2 2 0 0 0-2 2zm20 0h-2V4h-3V2h3a2 2 0 0 1 2 2zm0 2h-2v6h2zm0 8h-2v3h-3v2h3a2 2 0 0 0 2-2zM2 9h2v6H2zm0 8h2v3h3v2H4a2 2 0 0 1-2-2zm7 5v-2h6v2zm6-20v2H9V2zM6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M2 7h2V4h3V2H4a2 2 0 0 0-2 2zm20 0h-2V4h-3V2h3a2 2 0 0 1 2 2zm0 2h-2v6h2zm0 8h-2v3h-3v2h3a2 2 0 0 0 2-2zM2 9h2v6H2zm0 8h2v3h3v2H4a2 2 0 0 1-2-2zm7 5v-2h6v2zm6-20v2H9V2zM6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/><path d="M6 17h12l-4-5-3 3.8-2-2.6z"/></svg>',adjustments:'<svg width="24" height="24"><path d="M16 11a3 3 0 1 1 2.8-4H21v2h-2.2a3 3 0 0 1-2.8 2Zm0-2a1 1 0 1 1 0-2 1 1 0 0 1 0 2ZM3 9h8V7H3v2Zm5 10a3 3 0 1 0-2.8-4H3v2h2.2A3 3 0 0 0 8 19Zm0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm13 0h-8v-2h8v2Z"/></svg>',"alt-text":'<svg width="24" height="24"><path d="M3 20a2 2 0 0 1-1.4-.6A2 2 0 0 1 1 18V6c0-.6.2-1 .6-1.4A2 2 0 0 1 3 4h18c.6 0 1 .2 1.4.6.4.4.6.9.6 1.4v12c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H3Zm0-2h18V6H3v12Zm1.5-3H6v-1.5h1.5V15H9v-5a1 1 0 0 0-.3-.7A1 1 0 0 0 8 9H5.5a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v5ZM6 12v-1.5h1.5V12H6Z"/><path d="M11 15V9h1.3v4.5h2V15H11Zm5.8-4.5V15h1.4v-4.5h1.3V9h-4v1.5h1.3Z"/></svg>',"auto-image-enhancement":'<svg width="24" height="24"><path d="M7.7 10.6a5.8 5.8 0 0 0 5.7 5.7A5.8 5.8 0 0 0 7.7 22 5.8 5.8 0 0 0 2 16.3a5.8 5.8 0 0 0 5.7-5.7ZM15.5 2c.3 3 3.3 6 6.5 6.4-3.2.5-6.2 3.4-6.5 6.5-.3-3.4-3-6-6.4-6.5 3.3-.5 6.1-3 6.4-6.4Z"/></svg>',blur:'<svg width="24" height="24"><path d="M19.3 9.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7A1 1 0 0 0 20 9a1 1 0 0 0-.7.3Zm-16 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3A1 1 0 0 0 5 10a1 1 0 0 0-.3-.7A1 1 0 0 0 4 9a1 1 0 0 0-.7.3Zm16 6a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3Zm-16 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3A1 1 0 0 0 5 16a1 1 0 0 0-.3-.7A1 1 0 0 0 4 15a1 1 0 0 0-.7.3Zm5-11A1 1 0 0 0 8 5a1 1 0 0 0 1 1c.3 0 .5-.1.7-.3A1 1 0 0 0 10 5a1 1 0 0 0-.3-.7A1 1 0 0 0 9 4a1 1 0 0 0-.7.3Zm6 0a1 1 0 0 0-.3.7 1 1 0 0 0 1 1c.3 0 .5-.1.7-.3A1 1 0 0 0 16 5a1 1 0 0 0-.3-.7A1 1 0 0 0 15 4a1 1 0 0 0-.7.3Zm-6 16a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7A1 1 0 0 0 9 20a1 1 0 0 0-.7.3Zm6 0a1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3s.5-.1.7-.3a1 1 0 0 0 .3-.7 1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3ZM7.6 8.6A2 2 0 0 0 7 10c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 9 8a2 2 0 0 0-1.4.6Zm0 6A2 2 0 0 0 7 16c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 9 14a2 2 0 0 0-1.4.6Zm6-6A2 2 0 0 0 13 10c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 15 8a2 2 0 0 0-1.4.6Zm0 6A2 2 0 0 0 13 16c0 .6.2 1 .6 1.4.4.4.8.6 1.4.6s1-.2 1.4-.6c.4-.4.6-.8.6-1.4s-.2-1-.6-1.4A2 2 0 0 0 15 14a2 2 0 0 0-1.4.6Z"/></svg>',box:'<svg width="24" height="24"><path d="M3.8 7a1 1 0 0 0-.7.6l-.1 3V13.8a3.5 3.5 0 0 0 4 2.7c.8-.2 1.4-.5 2-1l.3-.3.3.2c.7.7 1.4 1 2.4 1.1 1.2 0 2.4-.6 3-1.6.9-1.2.8-2.8 0-4a3.7 3.7 0 0 0-2-1.2c-.4-.1-1.2-.1-1.6 0a3.4 3.4 0 0 0-1.7 1l-.3.2-.2-.1c-.4-.5-1.2-1-2-1.1-.6-.2-1.5 0-2 .2H5V9c0-1.3 0-1.3-.3-1.6a1 1 0 0 0-1-.3Zm12 2.6c-.3.2-.5.4-.6.8v.6l.9 1 .7 1v.1l-.8 1-.7 1a1 1 0 0 0 0 .7 1 1 0 0 0 1.3.6c.2 0 .3-.2 1-1l.5-.7.6.8.7.8c.4.3 1 .3 1.3 0l.2-.3a1 1 0 0 0 0-.8l-.8-1.2-.7-1a26 26 0 0 0 1.5-2 .8.8 0 0 0 .1-.4c0-.4-.1-.7-.5-.9H20c-.4 0-.5 0-1.2.8l-.7.8-.6-.7-.7-.9a1 1 0 0 0-1 0Zm-9 2 .4.1c.3.1.6.5.7.8l.1.6v.6c-.6 1-2 1.2-2.7.3-.3-.3-.3-.5-.3-1v-.5c.3-.5.7-.8 1.1-1a1.5 1.5 0 0 1 .7 0Zm5.7 0c.4 0 .8.4 1 .8l.2.6-.1.7c-.5.9-1.6 1.1-2.4.6a1.4 1.4 0 0 1-.6-1.1 1.4 1.4 0 0 1 .5-1.2 1.5 1.5 0 0 1 1.4-.4Z"/></svg>',camera:'<svg height="24" width="24"><g clip-rule="evenodd" fill-rule="evenodd"><path d="M10 5.4a1 1 0 0 1 .8-.4h4.4a1 1 0 0 1 .8.4l1.2 1.8h2.3A2.5 2.5 0 0 1 22 9.6v8a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 4 17.6v-8a2.5 2.5 0 0 1 2.5-2.4h2.3zM11.4 7l-1.2 1.7a1 1 0 0 1-.8.5h-3a.5.5 0 0 0-.4.4v8a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-8a.5.5 0 0 0-.5-.4h-2.9a1 1 0 0 1-.8-.5L14.6 7z"/><path d="M13 11.4a2 2 0 1 0 0 3.8 2 2 0 0 0 0-3.8zm-4 1.9a4 4 0 1 1 8 0 4 4 0 0 1-8 0z"/></g></svg>',caption:'<svg height="24" width="24"><path d="M6 16h8v-2H6zm10 0h2v-2h-2zM4 20a2 2 0 0 1-1.5-.6A2 2 0 0 1 2 18V6c0-.6.2-1 .6-1.4A2 2 0 0 1 4 4h16c.6 0 1 .2 1.4.6.4.4.6.9.6 1.4v12c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6zm0-2h16V6H4z"/></svg>',dropbox:'<svg height="24" width="24"><path clip-rule="evenodd" d="m6.4 9.3-3-2a1 1 0 0 1 0-1.6l4-2.5a1 1 0 0 1 1 0L12 5.5l3.6-2.3a1 1 0 0 1 1 0l4 2.5a1 1 0 0 1 0 1.7l-3 1.9 3 1.9a1 1 0 0 1 0 1.6l-2.9 1.9V16c0 .3-.1.6-.4.8l-4.5 3a1 1 0 0 1-1.2 0l-4.4-3a1 1 0 0 1-.5-.9v-1l-3.2-2.2a1 1 0 0 1 0-1.6zm3 0L12 7.5l2.6 1.8L12 11zM8.9 15v.4l3.3 2.3 3.4-2.3v-.2L12 13l-3.1 2zm-1-10-2 1.4 2 1.3 2-1.3zm8.2 0-2 1.4 2 1.3 2-1.3zm-2 6.9 2-1.3 2 1.3-2 1.3-2-1.3zm-8.3 0 2-1.3L10 12l-2 1.3-2-1.3z" fill-rule="evenodd"/></svg>',evernote:'<svg width="24" height="24"><path fill-rule="evenodd" d="m9.5 3-.3.1-2.6 2.6C3.8 8.5 4 8.2 4 8.7c0 1.3.3 3 .6 4.3.5 2 1.1 3.2 2 3.7l1.2.3c1 .2 1.5.2 2.2.2 1.3 0 1.7 0 2.2-.4.3-.2.3-.4.4-1a38.4 38.4 0 0 1 .3-.4l.3.1 1.8.1h1.6v-1.8H14l-.1-.2a6.8 6.8 0 0 1-.5-1c-.2-.4-.3-.6-.5-.7a.8.8 0 0 0-.5-.1.9.9 0 0 0-.8.5l-.4 1.6-.3 1.5H9.4l-2-.3a1 1 0 0 1-.1-.2A10.1 10.1 0 0 1 6 9.7v-.2h4l.5-.5V5H12c.4.2.7.7.8 1.1a1 1 0 0 0 .2.6c.2.2.3.2 1 .3 1.2 0 2 .2 2.5.6.4.2.8.7 1 1.2.3 1.2.5 4 .3 6.4 0 1.8-.4 3.4-.8 4h-.7a8 8 0 0 1-.8 0c-.2 0-.3-.3-.2-.5a.5.5 0 0 1 .4-.3h.9v-1.8H16c-.7 0-.9 0-1.2.2-.9.4-1.4 1.2-1.4 2.1l.1.4.1.2a1 1 0 0 1 .1.2c.3.7.8 1.2 1.4 1.3l1.2.1h1.2a2 2 0 0 0 1-.8 9 9 0 0 0 1.1-4.3c.2-3 0-6.3-.4-7.7A4.3 4.3 0 0 0 16 5.3a7 7 0 0 0-1.3-.2 7.2 7.2 0 0 1-.4 0 5.5 5.5 0 0 1 0-.3c-.2-.5-.6-1-1.2-1.4a3 3 0 0 0-.5-.2c-.4-.2-.5-.2-1.8-.2a26.5 26.5 0 0 0-1.3 0Zm-.8 4v.7H7.2l.7-.8.8-.7v.7Zm7 3.5c-.4 0-.7.5-.9 1v.7h.3c.7 0 1.1.2 1.5.6l.3.2.3-.6V11a1 1 0 0 0-.6-.4 2 2 0 0 0-.8 0Z" clip-rule="evenodd"/></svg>',exposure:'<svg width="24" height="24"><path d="M5 21a2 2 0 0 1-1.4-.6A2 2 0 0 1 3 19V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5 3h14c.6 0 1 .2 1.4.6.4.4.6.8.6 1.4v14c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H5Zm0-2h14V5L5 19Zm9.5-1v-2h-2v-1.5h2v-2H16v2h2V16h-2v2h-1.5ZM6 8.5h5V7H6v1.5Z"/></svg>',fb:'<svg width="24" height="24"><path fill-rule="evenodd" d="M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-11 6.7V14H8.1v-2.5h2v-1C10 8.2 11.5 7 12.8 7H16v2.5h-2.4c-.8 0-1 .7-1 1.3v.7h3.2l-1 2.5h-2v5a7 7 0 1 0-2.8-.2Z" clip-rule="evenodd"/></svg>',flickr:'<svg width="24" height="24"><path d="M8.2 15.3c1.7 0 3.1-1.4 3.1-3.1A3.2 3.2 0 0 0 8.1 9 3.2 3.2 0 0 0 5 12.2c0 1.7 1.4 3 3.2 3Zm7.6 0c1.7 0 3.2-1.4 3.2-3.1a3.2 3.2 0 0 0-6.3 0c0 1.7 1.4 3 3.1 3Z"/></svg>',folder:'<svg width="24" height="24"><path fill-rule="evenodd" d="M5.6 6a.6.6 0 0 0-.6.6v11.2a.6.6 0 0 0 .6.6h12.8a.6.6 0 0 0 .6-.6V9a.6.6 0 0 0-.6-.6h-7.2a1 1 0 0 1-.8-.4L9 6H5.6ZM3.8 4.8A2.6 2.6 0 0 1 5.6 4h4a1 1 0 0 1 .8.4l1.3 2h6.7A2.6 2.6 0 0 1 21 9v8.8a2.6 2.6 0 0 1-2.6 2.6H5.6A2.6 2.6 0 0 1 3 17.8V6.6c0-.7.3-1.4.8-1.8Z" clip-rule="evenodd"/></svg>',"google-drive":'<svg height="24" width="24"><path clip-rule="evenodd" d="M8.7 4.5a1 1 0 0 1 .9-.5h4.8a1 1 0 0 1 .9.5l5.6 9.7a1 1 0 0 1 0 1l-2.4 4.2a1 1 0 0 1-.9.5H6.4a1 1 0 0 1-.9-.5l-2.4-4.2a1 1 0 0 1 0-1zM10.2 6l-4.5 7.7h2.5L12.7 6h-2.5zm4.2 1 4.4 7.7-1.2 2.2-4.4-7.7zM12 11.2l-1.5 2.5h3zm2.6 4.5H5.7L7 17.9h8.9l-1.3-2.2z" fill-rule="evenodd"/></svg>',"google-photos":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12.4 3c-.8 0-1.4.7-1.4 1.4v3.2a5 5 0 0 0-8 4c0 .8.6 1.4 1.4 1.4h3.2a5 5 0 0 0-1 3 5 5 0 0 0 5 5c.8 0 1.4-.6 1.4-1.4v-3.2a5 5 0 0 0 8-4c0-.8-.7-1.4-1.4-1.4h-3.2a5 5 0 0 0-4-8Zm.6 8V5a3 3 0 0 1 2.4 3 3 3 0 0 1-2.4 3Zm-2 0H5a3 3 0 0 1 3-2.4 3 3 0 0 1 3 2.4Zm2 2a3 3 0 0 0 3 2.4 3 3 0 0 0 3-2.4h-6Zm-4.4 3a3 3 0 0 1 2.4-3v6a3 3 0 0 1-2.4-3Z" clip-rule="evenodd"/></svg>',grayscale:'<svg height="24" width="24"><path d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12.4 0H19v3.6zm-2.8 0h-2.2l8.6 8.6v-2.2zm-5 0H5l14 14v-2.6z" fill-rule="evenodd"/></svg>',huddle:'<svg height="24" width="24"><path d="M10.3 5.6V8h.8v-2l3.5 2 4.3-2.5L14.6 3l-4.3 2.6zM14.6 8v5.2l4.3-2.6V5.6L14.6 8zM6 13.3v2.5h.9v-2l3.4 2 4.3-2.5-4.3-2.6zm4.3 2.6V21l4.3-2.6v-5.1l-4.3 2.6z"/></svg>',"image-decorative":'<svg width="24" height="24"><path d="M12 10c.3 0 .5-.1.7-.3A1 1 0 0 0 13 9a1 1 0 0 0-.3-.7A1 1 0 0 0 12 8a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 1 1Zm0 6a3 3 0 0 1-1.8-.5A3 3 0 0 1 9.1 14a2 2 0 0 0-.2 0 3 3 0 0 1-2.5-1 3 3 0 0 1-.9-2.2A3 3 0 0 1 6.2 9a3.4 3.4 0 0 1-.5-1 3 3 0 0 1-.2-1 3 3 0 0 1 1-2.2A3 3 0 0 1 8.8 4H9a3 3 0 0 1 1.1-1.4A3 3 0 0 1 12 2a3 3 0 0 1 1.8.5c.5.4.9.9 1.1 1.5h.2a3 3 0 0 1 2.5.8 3 3 0 0 1 .9 2.3c0 .3 0 .7-.2 1a2.8 2.8 0 0 1-.5.9l.5 1 .2 1a3 3 0 0 1-1 2.2 3 3 0 0 1-2.4.9 1.8 1.8 0 0 0-.2 0 3 3 0 0 1-1.1 1.4 3 3 0 0 1-1.8.5Zm0 7a8.7 8.7 0 0 1 .7-3.5 9.2 9.2 0 0 1 2-2.8 9.2 9.2 0 0 1 2.8-2A8.6 8.6 0 0 1 21 14a8.6 8.6 0 0 1-.7 3.5 9.2 9.2 0 0 1-2 2.8 9.2 9.2 0 0 1-2.8 2 8.6 8.6 0 0 1-3.5.7Zm2.5-2.5a6.8 6.8 0 0 0 2.4-1.5 6.8 6.8 0 0 0 1.7-2.6c-1 .4-1.8 1-2.6 1.7a6.8 6.8 0 0 0-1.5 2.4ZM12 23a8.6 8.6 0 0 0-.7-3.5 9.2 9.2 0 0 0-2-2.9 9.2 9.2 0 0 0-2.8-1.9A8.6 8.6 0 0 0 3 14a8.7 8.7 0 0 0 .7 3.5 9.2 9.2 0 0 0 2 2.9 9.2 9.2 0 0 0 2.8 1.9 8.6 8.6 0 0 0 3.5.7Zm-2.5-2.5A6.8 6.8 0 0 1 7.2 19a6.8 6.8 0 0 1-1.6-2.6c.9.4 1.7 1 2.5 1.7a6.8 6.8 0 0 1 1.6 2.4Zm5.9-8.4c.3 0 .5-.1.8-.4.2-.2.3-.5.3-.8 0-.2 0-.4-.2-.6a1.3 1.3 0 0 0-.5-.4l-.8-.4a3 3 0 0 1-.2.5 3.8 3.8 0 0 1-.2.5 2.5 2.5 0 0 1-.3.4 4 4 0 0 1-.4.4l.8.6a.8.8 0 0 0 .3.1h.4ZM15 8.5l.8-.4.5-.4.2-.6a1.1 1.1 0 0 0-.3-.8 1 1 0 0 0-.8-.4 1.1 1.1 0 0 0-.7.2l-.8.6.4.4.3.4a3.9 3.9 0 0 1 .4 1Zm-4-2.3a2.7 2.7 0 0 1 1-.2 2.7 2.7 0 0 1 1 .2l.2-1.1c0-.3-.1-.6-.4-.8A1.2 1.2 0 0 0 12 4c-.3 0-.6.1-.8.3-.3.2-.4.5-.3.8v1.1Zm1 7.8c.3 0 .6-.1.8-.3.3-.2.4-.5.3-.8v-1.1a2.7 2.7 0 0 1-1.1.2 2.7 2.7 0 0 1-1-.2l-.2 1.1c0 .3.1.6.4.8.2.2.5.3.8.3ZM9 8.5a3 3 0 0 1 .4-1l.3-.4.4-.4-.8-.6A.9.9 0 0 0 9 6a1.2 1.2 0 0 0-.3 0c-.4 0-.6 0-.9.3a1.1 1.1 0 0 0-.3.8c0 .2 0 .4.2.6l.5.4.9.4Zm-.3 3.6H9l.3-.2.8-.6a5.5 5.5 0 0 1-.4-.4 2.1 2.1 0 0 1-.3-.4 3.8 3.8 0 0 1-.2-.5 3 3 0 0 1-.1-.5l-1 .4-.4.4a1.1 1.1 0 0 0-.2.6c0 .3.2.6.4.8.2.2.4.4.7.4Z"/></svg>',"image-enhancements":'<svg height="24" width="24"><path d="M5.3 21a2 2 0 0 1-1.5-.6 2 2 0 0 1-.6-1.4V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5.2 3H13v2H5.2v14h14v-8h2v8c0 .6-.1 1-.5 1.4a2 2 0 0 1-1.4.6z"/><path d="M11 9a4 4 0 0 0 4 4 4 4 0 0 0-4 4 4 4 0 0 0-4-4 4 4 0 0 0 4-4zm5.5-6c.2 2.1 2.2 4.1 4.5 4.5-2.3.4-4.3 2.4-4.5 4.5A5.2 5.2 0 0 0 12 7.5 5.2 5.2 0 0 0 16.5 3z"/></svg>',instagram:'<svg height="24" width="24"><path clip-rule="evenodd" d="M10.1 9a4 4 0 1 1 4.4 6.6A4 4 0 0 1 10.1 9zm2.2 1.3a2 2 0 1 0 0 4 2 2 0 0 0 0-4z" fill-rule="evenodd"/><path d="M16 9.3a1.3 1.3 0 1 0 0-2.6 1.3 1.3 0 0 0 0 2.6z"/><path clip-rule="evenodd" d="M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3zm3-1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z" fill-rule="evenodd"/></svg>',onedrive:'<svg height="24" width="24"><path d="M4 13.7h1zm16 .7h-1zm-11.7-4A4.4 4.4 0 0 1 12.1 8V6a6.4 6.4 0 0 0-5.6 3.4l1.8 1zM12.1 8c2 0 3.6 1.4 4 2.8l2-.5A6.3 6.3 0 0 0 12 6v2zm8.1 6.8-9.8-5.5-1 1.8 9.8 5.5 1-1.8zm-9.8-5.5A5 5 0 0 0 3 13.7h2A3 3 0 0 1 9.5 11l1-1.8zM3 13.7a5 5 0 0 0 1 2.8l1.5-1.1a3 3 0 0 1-.5-1.7zm15.8 1.6a2.3 2.3 0 0 1-2 1.4v2a4.3 4.3 0 0 0 3.9-2.6zm-2 1.4H8v2h8.7zm-8.8 0a3 3 0 0 1-2.5-1.3L4 16.5a5 5 0 0 0 4 2.2v-2zm12.7-.6c.2-.6.3-1.1.3-1.7h-2c0 .3 0 .6-.2.9zm.3-1.7c0-3-3.1-5.1-6-4l.8 1.9a2.3 2.3 0 0 1 3.2 2h2zm-6-4L4.4 15l.8 1.9 10.7-4.6-.7-1.8z"/></svg>',"photo-filter":'<svg height="24" width="24"><path d="M4.4 21c-.3 0-.6-.2-.9-.5-.3-.3-.4-.6-.5-.9L19.6 3c.3 0 .6.3.9.5l.5.9zM3 14.7v-2.8L11.9 3h2.8zM3 7V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5 3h2zm14 14 4-4v2c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6zm-7.7 0L21 9.3v2.8L12 21z"/></svg>',"revert-changes":'<svg height="24" width="24"><path d="m8.9 18.8.4 3.2H13v-2h-2v-2.6a4.6 4.6 0 0 1-1.6-.6 5.9 5.9 0 0 1-1.3-1l-2.5 1-1-1.7 2.2-1.6a4 4 0 0 1-.2-.7 5.9 5.9 0 0 1 0-.8v-.8l.2-.8-2.2-1.6 1-1.7 2.5 1a6 6 0 0 1 1.2-.9l1.4-.6.4-2.6h2l.3 2.6A5.6 5.6 0 0 1 16 8.2l2.5-1 1 1.6-2.2 1.7.2.7v.8a5 5 0 0 1 0 1h2a2.6 2.6 0 0 0 0-.5V11.3l2.6-2-2.8-4.7-3 1.3a8.2 8.2 0 0 0-.5-.4 3.8 3.8 0 0 0-.6-.3L14.8 2H9.3l-.4 3.2a5 5 0 0 0-1.2.7l-3-1.3L2 9.4l2.6 2V12.6l-2.6 2 2.7 4.7 3-1.3a8 8 0 0 0 1.2.7z"/><path d="m14.5 20.3 2.1-2-2.1-2.2 1.4-1.4 2.1 2.1 2.1-2 1.4 1.3-2 2.1 2 2.1-1.4 1.4-2.1-2-2.1 2zM12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></svg>',saturation:'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 20.5a6 6 0 1 1-5.9-10.2 6 6 0 1 1 11.8 0A6 6 0 1 1 12 20.5Zm-1.1-7.7a6 6 0 0 0-.2.3 4.3 4.3 0 0 1-2-1.3c.9.1 1.6.5 2.2 1Zm2.4.3a6 6 0 0 0-.2-.3 4.3 4.3 0 0 1 2.2-1 4.3 4.3 0 0 1-2 1.3ZM12.2 15a6.3 6.3 0 0 1-.4 0 4.3 4.3 0 0 0 .2 2.5 4.3 4.3 0 0 0 .2-2.5Zm.9 4.2a6 6 0 0 0 .8-4.5 6 6 0 0 0 3.4-2.8 4.3 4.3 0 0 1-1.3 8.4 4.3 4.3 0 0 1-2.9-1.1Zm-2.2 0a4.3 4.3 0 1 1-4.2-7.3 6 6 0 0 0 3.4 2.8 6 6 0 0 0 .8 4.5Zm-3-9.2a4.3 4.3 0 1 1 8.3 0 6 6 0 0 0-4.2 1.5A6 6 0 0 0 7.8 10Z"/></svg>',"transform-image":'<svg height="24" width="24"><path d="M3 21v-6h2V9H3V3h6v2h6V3h6v6h-2v6h2v6h-6v-2H9v2zm6-4h6v-2h2V9h-2V7H9v2H7v6h2zM5 7h2V5H5zm12 0h2V5h-2zm0 12h2v-2h-2zM5 19h2v-2H5z"/></svg>',vibrance:'<svg height="24" width="24"><path d="M12 20 22 4H2zm2.6-8 1.3-2H8l1.3 2h5.2zm-1.2 2h-2.8l1.4 2.2zm5-8L17 8H7L5.6 6h12.8z" fill-rule="evenodd"/></svg>',vk:'<svg width="24" height="24"><path fill-rule="evenodd" d="M14.8 17.4a2 2 0 0 1-1.3.7 8 8 0 0 1-7.7-3.6c-1.4-2-2.2-4.4-2.6-5.7L3 8.6A2 2 0 0 1 5 6h2.5c.4 0 .8.1 1.2.4A2 2 0 0 1 9.8 6h3.5a2 2 0 0 1 1.4.6 2 2 0 0 1 1.5-.6h2.4a2 2 0 0 1 2 2.5c-.5 1.5-1.2 2.6-1.8 3.6a12.5 12.5 0 0 1 2 3.2A2 2 0 0 1 19 18h-2.6a2 2 0 0 1-1.3-.5 6.9 6.9 0 0 1-.3-.2Zm.5-2.5-1.2-1a3 3 0 0 0-.8-.2v2.4h-1.7a5.6 5.6 0 0 1-.3 0c-3-.7-4.7-3.7-5.6-6.1A38.1 38.1 0 0 1 5 8.1V8h2.5a80.5 80.5 0 0 1 1.2 2.5c.6 1.2 1.2 2 2 2.1V9l-.9-1h3.5v4.1a5 5 0 0 0 .4-.3c.7-.7 1.2-1.4 1.6-2.2l.2-.3.7-1.3h2.4a8.5 8.5 0 0 1-.8 2l-1.3 2-.3.3a10.5 10.5 0 0 1 2.8 3.8h-2.6l-.8-.9a20.6 20.6 0 0 0-.3-.3Z" clip-rule="evenodd"/></svg>',warmth:'<svg height="24" width="24"><path d="M12 21.1c-1.4 0-2.6-.5-3.6-1.5s-1.5-2.1-1.5-3.5c0-.8.2-1.6.6-2.2A5 5 0 0 1 8.9 12v-6c0-.8.3-1.5 1-2.1a2.9 2.9 0 0 1 2-.9c.9 0 1.6.3 2.2.9.5.6.8 1.3.8 2.1v6a5 5 0 0 1 1.5 1.8A4.9 4.9 0 0 1 17 16c0 1.4-.5 2.6-1.4 3.5s-2.2 1.5-3.6 1.5zm-3-5h6c0-.5-.2-1-.4-1.4a3 3 0 0 0-.9-1l-.8-.6v-7a1 1 0 0 0-.3-.7A1 1 0 0 0 12 5a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v7l-.8.6a2.9 2.9 0 0 0-.9 1 3 3 0 0 0-.3 1.4z"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24Zm-8.7-5.3a11 11 0 0 0 17.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7ZM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13Z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 0 1 1.2 1.5l-.1.1-4.1 3-4-3a1 1 0 0 1 1-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8 4 2.9a1 1 0 0 1-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 0 1-1-1v-4l-2 1.3a1 1 0 0 1-1.2-.1l-.1-.1a1 1 0 0 1 .1-1.3l.1-.1 4.1-3z"/></g></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2Zm-4 0v2a2 2 0 0 1-2-2h2Zm8 0v2h-2v-2h2Zm8 0a2 2 0 0 1-2 2v-2h2Zm-4 0v2h-2v-2h2ZM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.2-5H15ZM5 15v2H3v-2h2Zm16 0v2h-2v-2h2ZM5 11v2H3v-2h2Zm16 0v2h-2v-2h2ZM5 7v2H3V7h2Zm16 0v2h-2V7h2ZM5 3v2H3c0-1.1.9-2 2-2Zm8 0v2h-2V3h2Zm6 0a2 2 0 0 1 2 2h-2V3ZM9 3v2H7V3h2Zm8 0v2h-2V3h2Z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6ZM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3Zm.7-3 .3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4Z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8Zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>'}})},6890:(e,t,o)=>{o(88785)},63557:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.ModelManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,n=(i=String).prototype,n.isPrototypeOf(o)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===i.name)?"string":t;var o,n;var r,i,s})(t)===e,o=e=>t=>typeof t===e,n=e=>t=>e===t,r=t("string"),i=t("object"),s=t("array"),a=n(null),l=o("boolean"),c=n(void 0),d=e=>!(e=>null==e)(e),u=o("function"),h=o("number"),m=()=>{},p=e=>()=>e,g=e=>e,f=(e,t)=>e===t;function b(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const v=e=>t=>!e(t),y=e=>e(),x=p(!1),w=p(!0);class _{constructor(e,t){this.tag=e,this.value=t}static some(e){return new _(!0,e)}static none(){return _.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?_.some(e(this.value)):_.none()}bind(e){return this.tag?e(this.value):_.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:_.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return d(e)?_.some(e):_.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}_.singletonNone=new _(!1);const S=Array.prototype.slice,C=Array.prototype.indexOf,k=Array.prototype.push,E=(e,t)=>{return o=e,n=t,C.call(o,n)>-1;var o,n},T=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return!0}return!1},O=(e,t)=>{const o=[];for(let n=0;n<e;n++)o.push(t(n));return o},A=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},M=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},P=(e,t)=>{const o=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];(t(i,r)?o:n).push(i)}return{pass:o,fail:n}},D=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},L=(e,t,o)=>(((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(e,((e,n)=>{o=t(o,e,n)})),o),R=(e,t,o)=>(M(e,((e,n)=>{o=t(o,e,n)})),o),N=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return _.some(r);if(o(r,n))break}return _.none()})(e,t,x),I=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return _.some(o)}return _.none()},B=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!s(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);k.apply(t,e[o])}return t},z=(e,t)=>B(A(e,t)),F=(e,t)=>{for(let o=0,n=e.length;o<n;++o){if(!0!==t(e[o],o))return!1}return!0},H=(e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o},j=(e,t)=>t>=0&&t<e.length?_.some(e[t]):_.none(),V=e=>j(e,0),U=e=>j(e,e.length-1),Z=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return _.none()},$=Object.keys,W=Object.hasOwnProperty,q=(e,t)=>{const o=$(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},G=(e,t)=>Y(e,((e,o)=>({k:o,v:t(e,o)}))),Y=(e,t)=>{const o={};return q(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o},K=(e,t)=>{const o={};return((e,t,o,n)=>{q(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(e=>(t,o)=>{e[o]=t})(o),m),o},X=(e,t)=>{const o=[];return q(e,((e,n)=>{o.push(t(e,n))})),o},J=e=>X(e,g),Q=(e,t)=>W.call(e,t),ee=e=>{if(!s(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return M(e,((n,r)=>{const i=$(n);if(1!==i.length)throw new Error("one and only one name per case");const a=i[0],l=n[a];if(void 0!==o[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!s(l))throw new Error("case arguments must be an array");t.push(a),o[a]=(...o)=>{const n=o.length;if(n!==l.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+l.length+" ("+l+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const n=$(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!F(t,(e=>E(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:a,params:o})}}}})),o},te=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},oe=e=>e.slice(0).sort(),ne=(e,t,o)=>{if(0===t.length)throw new Error("You must specify at least one required field.");return((e,t)=>{if(!s(t))throw new Error("The "+e+" fields must be an array. Was: "+t+".");M(t,(t=>{if(!r(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")}))})("required",t),(e=>{const t=oe(e);N(t,((e,o)=>o<t.length-1&&e===t[o+1])).each((e=>{throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}))})(t),n=>{const r=$(n);F(t,(e=>E(r,e)))||((e,t)=>{throw new Error("All required keys ("+oe(e).join(", ")+") were not specified. Specified keys were: "+oe(t).join(", ")+".")})(t,r),e(t,r);const i=D(t,(e=>!o.validate(n[e],e)));return i.length>0&&((e,t)=>{throw new Error("All values need to be of type: "+t+". Keys ("+oe(e).join(", ")+") were not.")})(i,o.label),n}},re=(e,t)=>{const o=D(t,(t=>!E(e,t)));o.length>0&&(e=>{throw new Error("Unsupported keys for object: "+oe(e).join(", "))})(o)},ie=e=>((e,t)=>ne(e,t,{validate:u,label:"function"}))(re,e),se=e=>{const t=t=>t(e),o=p(e),n=()=>r,r={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:w,isError:x,map:t=>le.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>_.some(e)};return r},ae=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:x,isError:w,map:t,mapError:t=>le.error(t(e)),bind:t,exists:x,forall:w,getOr:g,or:g,getOrThunk:y,orThunk:y,getOrDie:(n=String(e),()=>{throw new Error(n)}),each:m,toOptional:_.none};var n;return o},le={value:se,error:ae,fromOption:(e,t)=>e.fold((()=>ae(t)),se)},ce="undefined"!=typeof window?window:Function("return this;")(),de=e=>{const t=e.replace(/\./g,"-");return{resolve:e=>t+"-"+e}},ue=(e,t,o=f)=>e.exists((e=>o(e,t))),he=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},me=(e,t)=>e?_.some(t):_.none(),pe=(e,t)=>((e,t)=>{let o=null!=t?t:ce;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t),ge=()=>{const e=(e=>{const t=te(_.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(_.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(_.some(e))}}})(m);return{...e,on:t=>e.get().each(t)}},fe=(e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,be=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!c(n)||r+t.length<=n)},ve=(e,t)=>fe(e,t,0),ye=(e,t)=>fe(e,t,e.length-t.length),xe=(e=>t=>t.replace(e,""))(/^\s+|\s+$/g),we=e=>e.length>0,_e=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},Se=["tfoot","thead","tbody","colgroup"],Ce=(e,t,o)=>({element:e,rowspan:t,colspan:o}),ke=(e,t,o)=>({element:e,cells:t,section:o}),Ee=(e,t,o)=>({element:e,isNew:t,isLocked:o}),Te=(e,t,o,n)=>({element:e,cells:t,section:o,isNew:n}),Oe=(e,t,o)=>{const n=e.cells,r=n.slice(0,t),i=n.slice(t),s=r.concat(o).concat(i);return Pe(e,s)},Ae=(e,t,o)=>Oe(e,t,[o]),Me=(e,t,o)=>{e.cells[t]=o},Pe=(e,t)=>Te(e.element,t,e.section,e.isNew),De=(e,t)=>e.cells[t],Le=(e,t)=>De(e,t).element,Re=e=>e.cells.length,Ne=e=>{const t=P(e,(e=>"colgroup"===e.section));return{rows:t.fail,cols:t.pass}},Ie=(e,t,o)=>{const n=A(e.cells,o);return Te(t(e.element),n,e.section,!0)},Be=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},ze={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return Be(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return Be(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return Be(o)},fromDom:Be,fromPoint:(e,t,o)=>_.from(e.dom.elementFromPoint(t,o)).map(Be)},Fe=(e,t)=>{const o=e.document.createRange();return o.selectNode(t.dom),o},He=(e,t)=>{const o=e.document.createRange();return je(o,t),o},je=(e,t)=>e.selectNodeContents(t.dom),Ve=(e,t,o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},Ue=(e,t,o,n,r)=>{const i=e.document.createRange();return i.setStart(t.dom,o),i.setEnd(n.dom,r),i},Ze=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),$e=ee([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),We=(e,t,o)=>t(ze.fromDom(o.startContainer),o.startOffset,ze.fromDom(o.endContainer),o.endOffset),qe=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:p(e),rtl:_.none}),relative:(t,o)=>({ltr:_e((()=>Ve(e,t,o))),rtl:_e((()=>_.some(Ve(e,o,t))))}),exact:(t,o,n,r)=>({ltr:_e((()=>Ue(e,t,o,n,r))),rtl:_e((()=>_.some(Ue(e,n,r,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();if(o.collapsed)return t.rtl().filter((e=>!1===e.collapsed)).map((e=>$e.rtl(ze.fromDom(e.endContainer),e.endOffset,ze.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>We(0,$e.ltr,o)));return We(0,$e.ltr,o)})(0,o)},Ge=(e,t)=>qe(e,t).match({ltr:(t,o,n,r)=>{const i=e.document.createRange();return i.setStart(t.dom,o),i.setEnd(n.dom,r),i},rtl:(t,o,n,r)=>{const i=e.document.createRange();return i.setStart(n.dom,r),i.setEnd(t.dom,o),i}});$e.ltr,$e.rtl;const Ye=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},Ke=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,Xe=(e,t)=>{const o=void 0===t?document:t.dom;return Ke(o)?_.none():_.from(o.querySelector(e)).map(ze.fromDom)},Je=(e,t)=>e.dom===t.dom,Qe=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},et=Ye,tt=()=>ot(0,0),ot=(e,t)=>({major:e,minor:t}),nt={nu:ot,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?tt():((e,t)=>{const o=((e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n=e=>Number(t.replace(o,"$"+e));return ot(n(1),n(2))})(e,o)},unknown:tt},rt=(e,t)=>{const o=String(t).toLowerCase();return N(e,(e=>e.search(o)))},it=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,st=e=>t=>be(t,e),at=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>be(e,"edge/")&&be(e,"chrome")&&be(e,"safari")&&be(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,it],search:e=>be(e,"chrome")&&!be(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>be(e,"msie")||be(e,"trident")},{name:"Opera",versionRegexes:[it,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:st("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:st("firefox")},{name:"Safari",versionRegexes:[it,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(be(e,"safari")||be(e,"mobile/"))&&be(e,"applewebkit")}],lt=[{name:"Windows",search:st("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>be(e,"iphone")||be(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:st("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:st("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:st("linux"),versionRegexes:[]},{name:"Solaris",search:st("sunos"),versionRegexes:[]},{name:"FreeBSD",search:st("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:st("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ct={browsers:p(at),oses:p(lt)},dt="Edge",ut="Chromium",ht="Opera",mt="Firefox",pt="Safari",gt=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(dt),isChromium:n(ut),isIE:n("IE"),isOpera:n(ht),isFirefox:n(mt),isSafari:n(pt)}},ft={unknown:()=>gt({current:void 0,version:nt.unknown()}),nu:gt,edge:p(dt),chromium:p(ut),ie:p("IE"),opera:p(ht),firefox:p(mt),safari:p(pt)},bt="Windows",vt="Android",yt="Linux",xt="macOS",wt="Solaris",_t="FreeBSD",St="ChromeOS",Ct=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(bt),isiOS:n("iOS"),isAndroid:n(vt),isMacOS:n(xt),isLinux:n(yt),isSolaris:n(wt),isFreeBSD:n(_t),isChromeOS:n(St)}},kt={unknown:()=>Ct({current:void 0,version:nt.unknown()}),nu:Ct,windows:p(bt),ios:p("iOS"),android:p(vt),linux:p(yt),macos:p(xt),solaris:p(wt),freebsd:p(_t),chromeos:p(St)},Et=(e,t,o)=>{const n=ct.browsers(),r=ct.oses(),i=t.bind((e=>((e,t)=>Z(t.brands,(t=>{const o=t.brand.toLowerCase();return N(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:nt.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>rt(e,t).map((e=>{const o=nt.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(ft.unknown,ft.nu),s=((e,t)=>rt(e,t).map((e=>{const o=nt.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(kt.unknown,kt.nu),a=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),i=e.isiOS()&&!r,s=e.isiOS()||e.isAndroid(),a=s||n("(pointer:coarse)"),l=r||!i&&s&&n("(min-device-width:768px)"),c=i||s&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:p(r),isiPhone:p(i),isTablet:p(l),isPhone:p(c),isTouch:p(a),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:p(d),isDesktop:p(u)}})(s,i,e,o);return{browser:i,os:s,deviceType:a}},Tt=e=>window.matchMedia(e).matches;let Ot=_e((()=>Et(window.navigator.userAgent,_.from(window.navigator.userAgentData),Tt)));const At=()=>Ot(),Mt=(e,t)=>{const o=((e,t)=>pe(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o},Pt=Object.getPrototypeOf,Dt=e=>{const t=pe("ownerDocument.defaultView",e);return i(e)&&((e=>Mt("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Pt(e).constructor.name))},Lt=e=>e.dom.nodeName.toLowerCase(),Rt=e=>e.dom.nodeType,Nt=e=>t=>Rt(t)===e,It=e=>8===Rt(e)||"#comment"===Lt(e),Bt=e=>zt(e)&&Dt(e.dom),zt=Nt(1),Ft=Nt(3),Ht=Nt(9),jt=Nt(11),Vt=e=>t=>zt(t)&&Lt(t)===e,Ut=e=>ze.fromDom(e.dom.ownerDocument),Zt=e=>Ht(e)?e:Ut(e),$t=e=>_.from(e.dom.parentNode).map(ze.fromDom),Wt=e=>_.from(e.dom.parentElement).map(ze.fromDom),qt=(e,t)=>{const o=u(t)?t:x;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=ze.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r},Gt=e=>_.from(e.dom.previousSibling).map(ze.fromDom),Yt=e=>_.from(e.dom.nextSibling).map(ze.fromDom),Kt=e=>A(e.dom.childNodes,ze.fromDom),Xt=(e,t)=>{const o=e.dom.childNodes;return _.from(o[t]).map(ze.fromDom)},Jt=(e,t,o,n)=>{const r=((e,t,o,n)=>{const r=Ut(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(o.dom,n),r})(e,t,o,n),i=Je(e,o)&&t===n;return r.collapsed&&!i},Qt=e=>jt(e)&&d(e.dom.host),eo=e=>ze.fromDom(e.dom.getRootNode()),to=e=>ze.fromDom(e.dom.host),oo=e=>d(e.dom.shadowRoot),no=e=>{const t=ze.fromDom((e=>{if(d(e.target)){const t=ze.fromDom(e.target);if(zt(t)&&oo(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return V(t)}}return _.from(e.target)})(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=(i=n,s=o,(...e)=>i(s.apply(null,e)));var i,s;return((e,t,o,n,r,i,s)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:i,raw:s}))(t,e.clientX,e.clientY,o,n,r,e)},ro=(e,t,o,n,r)=>{const i=((e,t)=>o=>{e(o)&&t(no(o))})(o,n);return e.dom.addEventListener(t,i,r),{unbind:b(io,e,t,i,r)}},io=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},so=w,ao=(e,t,o)=>((e,t,o,n)=>ro(e,t,o,n,!1))(e,t,so,o),lo=no,co=(e,t)=>{$t(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},uo=(e,t)=>{Yt(e).fold((()=>{$t(e).each((e=>{mo(e,t)}))}),(e=>{co(e,t)}))},ho=(e,t)=>{const o=(e=>Xt(e,0))(e);o.fold((()=>{mo(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},mo=(e,t)=>{e.dom.appendChild(t.dom)},po=(e,t)=>{co(e,t),mo(t,e)},go=(e,t)=>{M(t,((o,n)=>{const r=0===n?e:t[n-1];uo(r,o)}))},fo=(e,t)=>{M(t,(t=>{mo(e,t)}))},bo=(e,t,o)=>{if(!(r(o)||l(o)||h(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},vo=(e,t,o)=>{bo(e.dom,t,o)},yo=(e,t)=>{const o=e.dom;q(t,((e,t)=>{bo(o,t,e)}))},xo=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},wo=(e,t)=>_.from(xo(e,t)),_o=(e,t)=>{e.dom.removeAttribute(t)},So=e=>R(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),Co=e=>{e.dom.textContent="",M(Kt(e),(e=>{ko(e)}))},ko=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Eo=e=>{const t=Kt(e);t.length>0&&go(e,t),ko(e)},To=(e,t)=>ze.fromDom(e.dom.cloneNode(t)),Oo=e=>To(e,!1),Ao=e=>To(e,!0),Mo=(e,t)=>{const o=ze.fromTag(t),n=So(e);return yo(o,n),o},Po=e=>void 0!==e.style&&u(e.style.getPropertyValue),Do=e=>{const t=Ft(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=eo(e);return Qt(t)?_.some(t):_.none()})(ze.fromDom(t)).fold((()=>o.body.contains(t)),(n=Do,r=to,e=>n(r(e))));var n,r},Lo=(e,t,o)=>{if(!r(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Po(e)&&e.style.setProperty(t,o)},Ro=(e,t,o)=>{const n=e.dom;Lo(n,t,o)},No=(e,t)=>{const o=e.dom;q(t,((e,t)=>{Lo(o,t,e)}))},Io=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||Do(e)?n:Bo(o,t)},Bo=(e,t)=>Po(e)?e.style.getPropertyValue(t):"",zo=(e,t)=>{const o=e.dom,n=Bo(o,t);return _.from(n).filter((e=>e.length>0))},Fo=(e,t)=>{((e,t)=>{Po(e)&&e.style.removeProperty(t)})(e.dom,t),ue(wo(e,"style").map(xe),"")&&_o(e,"style")},Ho=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=Io(o,e);return parseFloat(t)||0}return n},n=(e,t)=>R(t,((t,o)=>{const n=Io(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!h(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;Po(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}},jo=(e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?_.none():_.some(t)})(e).getOr(t),Vo=(e,t,o)=>jo(Io(e,t),o),Uo=(e,t)=>{const o=e.dom,n=o.getBoundingClientRect().width||o.offsetWidth;return"border-box"===t?n:((e,t,o,n)=>t-Vo(e,`padding-${o}`,0)-Vo(e,`padding-${n}`,0)-Vo(e,`border-${o}-width`,0)-Vo(e,`border-${n}-width`,0))(e,n,"left","right")},Zo=Ho("height",(e=>{const t=e.dom;return Do(e)?t.getBoundingClientRect().height:t.offsetHeight})),$o=e=>Zo.get(e),Wo=e=>Zo.getOuter(e),qo=e=>Vo(e,"height",e.dom.offsetHeight),Go=Ho("width",(e=>e.dom.offsetWidth));Ho("width",(e=>{const t=e.dom;return Do(e)?t.getBoundingClientRect().width:t.offsetWidth}));const Yo=e=>Go.get(e),Ko=e=>Go.getOuter(e),Xo=e=>Uo(e,"content-box"),Jo=e=>Vo(e,"width",e.dom.offsetWidth),Qo=(e,t)=>({left:e,top:t,translate:(o,n)=>Qo(e+o,t+n)}),en=Qo,tn=(e,t)=>void 0!==e?e:void 0!==t?t:0,on=e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return en(o.offsetLeft,o.offsetTop);const i=tn(null==n?void 0:n.pageYOffset,r.scrollTop),s=tn(null==n?void 0:n.pageXOffset,r.scrollLeft),a=tn(r.clientTop,o.clientTop),l=tn(r.clientLeft,o.clientLeft);return nn(e).translate(s-l,i-a)},nn=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?en(o.offsetLeft,o.offsetTop):Do(e)?(e=>{const t=e.getBoundingClientRect();return en(t.left,t.top)})(t):en(0,0)},rn=((e,t)=>{const o=t=>e(t)?_.from(t.dom.nodeValue):_.none();return{get:n=>{if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return o(n).getOr("")},getOption:o,set:(o,n)=>{if(!e(o))throw new Error("Can only set raw "+t+" value of a "+t+" node");o.dom.nodeValue=n}}})(Ft,"text"),sn=e=>rn.get(e),an=e=>rn.getOption(e),ln=(e,t)=>rn.set(e,t),cn=(e,t)=>o=>"rtl"===dn(o)?t:e,dn=e=>"rtl"===Io(e,"direction")?"rtl":"ltr",un=(e,t)=>{const o=xo(e,t);return void 0===o||""===o?[]:o.split(" ")};var hn=(e,t,o,n,r)=>e(o,n)?_.some(o):u(r)&&r(o)?_.none():t(o,n,r);const mn=(e,t,o)=>{let n=e.dom;const r=u(o)?o:x;for(;n.parentNode;){n=n.parentNode;const e=ze.fromDom(n);if(t(e))return _.some(e);if(r(e))break}return _.none()},pn=(e,t,o)=>hn(((e,t)=>t(e)),mn,e,t,o),gn=(e,t,o)=>mn(e,(e=>Ye(e,t)),o),fn=(e,t)=>((e,t)=>N(e.dom.childNodes,(e=>t(ze.fromDom(e)))).map(ze.fromDom))(e,(e=>Ye(e,t))),bn=(e,t)=>Xe(t,e),vn=(e,t,o)=>hn(((e,t)=>Ye(e,t)),gn,e,t,o),yn=e=>void 0!==e.dom.classList,xn=(e,t)=>((e,t,o)=>{const n=un(e,t).concat([o]);return vo(e,t,n.join(" ")),!0})(e,"class",t),wn=(e,t)=>{yn(e)?e.dom.classList.add(t):xn(e,t)},_n=(e,t)=>yn(e)&&e.dom.classList.contains(t),Sn=e=>vn(e,"[contenteditable]"),Cn=(e,t=!1)=>Do(e)?e.dom.isContentEditable:Sn(e).fold(p(t),(e=>"true"===kn(e))),kn=e=>e.dom.contentEditable,En=(e,t)=>{let o=[];return M(Kt(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(En(e,t))})),o},Tn=(e,t,o)=>((e,t,o)=>D(qt(e,o),t))(e,(e=>Ye(e,t)),o),On=(e,t)=>((e,t)=>D(Kt(e),t))(e,(e=>Ye(e,t))),An=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return Ke(o)?[]:A(o.querySelectorAll(e),ze.fromDom)})(t,e),Mn=(e,t)=>I(e,b(Je,t)),Pn=e=>"img"===Lt(e)?1:an(e).fold((()=>Kt(e).length),(e=>e.length)),Dn=["img","br"],Ln=e=>an(e).filter((e=>0!==e.trim().length||e.indexOf(" ")>-1)).isSome()||E(Dn,Lt(e))||(e=>Bt(e)&&"false"===xo(e,"contenteditable"))(e),Rn=e=>((e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const r=ze.fromDom(e.childNodes[n]);if(t(r))return _.some(r);const i=o(e.childNodes[n]);if(i.isSome())return i}return _.none()};return o(e.dom)})(e,Ln),Nn=e=>In(e,Ln),In=(e,t)=>{const o=e=>{const n=Kt(e);for(let e=n.length-1;e>=0;e--){const r=n[e];if(t(r))return _.some(r);const i=o(r);if(i.isSome())return i}return _.none()};return o(e)},Bn=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),zn=ee([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Fn=zn.before,Hn=zn.on,jn=zn.after,Vn={before:Fn,on:Hn,after:jn,cata:(e,t,o,n)=>e.fold(t,o,n),getStart:e=>e.fold(g,g,g)},Un=ee([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Zn=Un.domRange,$n=Un.relative,Wn=Un.exact,qn=Bn,Gn={domRange:Zn,relative:$n,exact:Wn,exactFromRange:e=>Un.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>ze.fromDom(e.startContainer),relative:(e,t)=>Vn.getStart(e),exact:(e,t,o,n)=>e}))(e);return o=t,ze.fromDom(Zt(o).dom.defaultView);var o},range:qn},Yn=(e,t,o)=>e.caretPositionFromPoint?((e,t,o)=>{var n;return _.from(null===(n=e.caretPositionFromPoint)||void 0===n?void 0:n.call(e,t,o)).bind((t=>{if(null===t.offsetNode)return _.none();const o=e.createRange();return o.setStart(t.offsetNode,t.offset),o.collapse(),_.some(o)}))})(e,t,o):e.caretRangeFromPoint?((e,t,o)=>{var n;return _.from(null===(n=e.caretRangeFromPoint)||void 0===n?void 0:n.call(e,t,o))})(e,t,o):_.none(),Kn=(e,t)=>{const o=Lt(e);return"input"===o?Vn.after(e):E(["br","img"],o)?0===t?Vn.before(e):Vn.after(e):Vn.on(e,t)},Xn=e=>_.from(e.getSelection()),Jn=(e,t)=>{Xn(e).each((e=>{e.removeAllRanges(),e.addRange(t)}))},Qn=(e,t,o,n,r)=>{const i=Ue(e,t,o,n,r);Jn(e,i)},er=(e,t)=>qe(e,t).match({ltr:(t,o,n,r)=>{Qn(e,t,o,n,r)},rtl:(t,o,n,r)=>{Xn(e).each((i=>{if(i.setBaseAndExtent)i.setBaseAndExtent(t.dom,o,n.dom,r);else if(i.extend)try{((e,t,o,n,r,i)=>{t.collapse(o.dom,n),t.extend(r.dom,i)})(0,i,t,o,n,r)}catch(i){Qn(e,n,r,t,o)}else Qn(e,n,r,t,o)}))}}),tr=(e,t,o,n,r)=>{const i=((e,t,o,n)=>{const r=Kn(e,t),i=Kn(o,n);return Gn.relative(r,i)})(t,o,n,r);er(e,i)},or=(e,t,o)=>{const n=((e,t)=>{const o=e.fold(Vn.before,Kn,Vn.after),n=t.fold(Vn.before,Kn,Vn.after);return Gn.relative(o,n)})(t,o);er(e,n)},nr=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),o=e.getRangeAt(e.rangeCount-1);return _.some(Bn(ze.fromDom(t.startContainer),t.startOffset,ze.fromDom(o.endContainer),o.endOffset))}return _.none()},rr=e=>{if(null===e.anchorNode||null===e.focusNode)return nr(e);{const t=ze.fromDom(e.anchorNode),o=ze.fromDom(e.focusNode);return Jt(t,e.anchorOffset,o,e.focusOffset)?_.some(Bn(t,e.anchorOffset,o,e.focusOffset)):nr(e)}},ir=(e,t,o=!0)=>{const n=(o?He:Fe)(e,t);Jn(e,n)},sr=e=>(e=>Xn(e).filter((e=>e.rangeCount>0)).bind(rr))(e).map((e=>Gn.exact(e.start,e.soffset,e.finish,e.foffset))),ar=(e,t)=>(e=>{const t=e.getClientRects(),o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?_.some(o).map(Ze):_.none()})(Ge(e,t)),lr=(e,t,o)=>((e,t,o)=>{const n=e.document;return Yn(n,t,o).map((e=>Bn(ze.fromDom(e.startContainer),e.startOffset,ze.fromDom(e.endContainer),e.endOffset)))})(e,t,o),cr={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},dr=(()=>{const e="[0-9]+",t="[eE]"+("[+-]?"+e),o=e=>`(?:${e})?`,n=["Infinity",e+"\\."+o(e)+o(t),"\\."+e+o(t),e+o(t)].join("|");return new RegExp(`^(${`[+-]?(?:${n})`})(.*)$`)})(),ur=(e,t)=>_.from(dr.exec(e)).bind((e=>{const o=Number(e[1]),n=e[2];return((e,t)=>T(t,(t=>T(cr[t],(t=>e===t)))))(n,t)?_.some({value:o,unit:n}):_.none()})),hr=e=>A(e,p(0)),mr=(e,t,o,n,r)=>r(e.slice(0,t)).concat(n).concat(r(e.slice(o))),pr=e=>(t,o,n,r)=>{if(e(n)){const e=Math.max(r,t[o]-Math.abs(n)),i=Math.abs(e-t[o]);return n>=0?i:-i}return n},gr=pr((e=>e<0)),fr=pr(w),br=()=>{const e=(e,t,o,n)=>{const r=(100+o)/100,i=Math.max(n,(e[t]+o)/r);return A(e,((e,o)=>(o===t?i:e/r)-e))},t=(t,o,n,r,i,s)=>s?e(t,o,r,i):((e,t,o,n,r)=>{const i=gr(e,t,n,r);return mr(e,t,o+1,[i,0],hr)})(t,o,n,r,i);return{resizeTable:(e,t)=>e(t),clampTableDelta:gr,calcLeftEdgeDeltas:t,calcMiddleDeltas:(e,o,n,r,i,s,a)=>t(e,n,r,i,s,a),calcRightEdgeDeltas:(t,o,n,r,i,s)=>{if(s)return e(t,n,r,i);{const e=gr(t,n,r,i);return hr(t.slice(0,n)).concat([e])}},calcRedestributedWidths:(e,t,o,n)=>{if(n){const n=(t+o)/t,r=A(e,(e=>e/n));return{delta:100*n-100,newSizes:r}}return{delta:o,newSizes:e}}}},vr=()=>{const e=(e,t,o,n,r)=>{const i=fr(e,n>=0?o:t,n,r);return mr(e,t,o+1,[i,-i],hr)};return{resizeTable:(e,t,o)=>{o&&e(t)},clampTableDelta:(e,t,o,n,r)=>{if(r){if(o>=0)return o;{const t=R(e,((e,t)=>e+t-n),0);return Math.max(-t,o)}}return gr(e,t,o,n)},calcLeftEdgeDeltas:e,calcMiddleDeltas:(t,o,n,r,i,s)=>e(t,n,r,i,s),calcRightEdgeDeltas:(e,t,o,n,r,i)=>{if(i)return hr(e);{const t=n/e.length;return A(e,p(t))}},calcRedestributedWidths:(e,t,o,n)=>({delta:0,newSizes:e})}},yr=(e,t,o=0)=>wo(e,t).map((e=>parseInt(e,10))).getOr(o),xr=(e,t)=>yr(e,t,1),wr=e=>Vt("col")(e)?yr(e,"span",1)>1:xr(e,"colspan")>1,_r=(e,t)=>parseInt(Io(e,t),10),Sr=p(10),Cr=p(10),kr=(e,t)=>Er(e,t,w),Er=(e,t,o)=>z(Kt(e),(e=>Ye(e,t)?o(e)?[e]:[]:Er(e,t,o))),Tr=(e,t)=>((e,t,o=x)=>o(t)?_.none():E(e,Lt(t))?_.some(t):gn(t,e.join(","),(e=>Ye(e,"table")||o(e))))(["td","th"],e,t),Or=e=>kr(e,"th,td"),Ar=e=>Ye(e,"colgroup")?On(e,"col"):z(Dr(e),(e=>On(e,"col"))),Mr=(e,t)=>vn(e,"table",t),Pr=e=>kr(e,"tr"),Dr=e=>Mr(e).fold(p([]),(e=>On(e,"colgroup"))),Lr=Vt("th"),Rr=e=>F(e,(e=>Lr(e.element))),Nr=(e,t)=>e&&t?"sectionCells":e?"section":"cells",Ir=e=>{const t="thead"===e.section,o=ue(Br(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:Nr(t,o)}:{type:"body"}},Br=e=>{const t=D(e,(e=>Lr(e.element)));return 0===t.length?_.some("td"):t.length===e.length?_.some("th"):_.none()},zr=(e,t)=>A(e,(e=>{if("colgroup"===Lt(e)){const t=A(Ar(e),(e=>{const t=yr(e,"span",1);return Ce(e,1,t)}));return ke(e,t,"colgroup")}{const o=A(Or(e),(e=>{const t=yr(e,"rowspan",1),o=yr(e,"colspan",1);return Ce(e,t,o)}));return ke(e,o,t(e))}})),Fr=e=>$t(e).map((e=>{const t=Lt(e);return(e=>E(Se,e))(t)?t:"tbody"})).getOr("tbody"),Hr=e=>{const t=Pr(e),o=[...Dr(e),...t];return zr(o,Fr)},jr="data-snooker-locked-cols",Vr=e=>wo(e,jr).bind((e=>_.from(e.match(/\d+/g)))).map((e=>H(e,w))),Ur=e=>{const t=R(Ne(e).rows,((e,t)=>(M(t.cells,((t,o)=>{t.isLocked&&(e[o]=!0)})),e)),{}),o=X(t,((e,t)=>parseInt(t,10)));return((e,t)=>{const o=S.call(e,0);return o.sort(t),o})(o)},Zr=(e,t)=>e+","+t,$r=(e,t)=>{const o=z(e.all,(e=>e.cells));return D(o,t)},Wr=e=>{const t={},o=[],n=V(e).map((e=>e.element)).bind(Mr).bind(Vr).getOr({});let r=0,i=0,s=0;const{pass:a,fail:l}=P(e,(e=>"colgroup"===e.section));M(l,(e=>{const a=[];M(e.cells,(e=>{let o=0;for(;void 0!==t[Zr(s,o)];)o++;const r=((e,t)=>Q(e,t)&&void 0!==e[t]&&null!==e[t])(n,o.toString()),l=((e,t,o,n,r,i)=>({element:e,rowspan:t,colspan:o,row:n,column:r,isLocked:i}))(e.element,e.rowspan,e.colspan,s,o,r);for(let n=0;n<e.colspan;n++)for(let r=0;r<e.rowspan;r++){const e=o+n,a=Zr(s+r,e);t[a]=l,i=Math.max(i,e+1)}a.push(l)})),r++,o.push(ke(e.element,a,e.section)),s++}));const{columns:c,colgroups:d}=U(a).map((e=>{const t=(e=>{const t={};let o=0;return M(e.cells,(e=>{const n=e.colspan;O(n,(r=>{const i=o+r;t[i]=((e,t,o)=>({element:e,colspan:t,column:o}))(e.element,n,i)})),o+=n})),t})(e),o=((e,t)=>({element:e,columns:t}))(e.element,J(t));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}}))),u=((e,t)=>({rows:e,columns:t}))(r,i);return{grid:u,access:t,all:o,columns:c,colgroups:d}},qr={fromTable:e=>{const t=Hr(e);return Wr(t)},generate:Wr,getAt:(e,t,o)=>_.from(e.access[Zr(t,o)]),findItem:(e,t,o)=>{const n=$r(e,(e=>o(t,e.element)));return n.length>0?_.some(n[0]):_.none()},filterItems:$r,justCells:e=>z(e.all,(e=>e.cells)),justColumns:e=>J(e.columns),hasColumns:e=>$(e.columns).length>0,getColumnAt:(e,t)=>_.from(e.columns[t])},Gr=(e,t,o)=>Ee(o(e.element,t),!0,e.isLocked),Yr=(e,t)=>e.section!==t?Te(e.element,e.cells,t,e.isNew):e,Kr=()=>({transformRow:Yr,transformCell:(e,t,o)=>{const n=o(e.element,t),r="td"!==Lt(n)?((e,t)=>{const o=Mo(e,t);uo(e,o);const n=Kt(e);return fo(o,n),ko(e),o})(n,"td"):n;return Ee(r,e.isNew,e.isLocked)}}),Xr=()=>({transformRow:Yr,transformCell:Gr}),Jr=()=>({transformRow:(e,t)=>Yr(e,"thead"===t?"tbody":t),transformCell:Gr}),Qr=(e,t)=>{const o=(e=>Z(e.all,(e=>{const t=Ir(e);return"header"===t.type?_.from(t.subType):_.none()})))(qr.fromTable(e)).getOr(t);switch(o){case"section":return Kr();case"sectionCells":return Xr();case"cells":return Jr()}},ei=Kr,ti=Xr,oi=Jr,ni=()=>({transformRow:g,transformCell:Gr}),ri=(e,t=w)=>{const o=e.grid,n=O(o.columns,g),r=O(o.rows,g);return A(n,(o=>ii((()=>z(r,(t=>qr.getAt(e,t,o).filter((e=>e.column===o)).toArray()))),(e=>1===e.colspan&&t(e.element)),(()=>qr.getAt(e,0,o)))))},ii=(e,t,o)=>{const n=e();return N(n,t).orThunk((()=>_.from(n[0]).orThunk(o))).map((e=>e.element))},si=e=>{const t=e.grid,o=O(t.rows,g),n=O(t.columns,g);return A(o,(t=>ii((()=>z(n,(o=>qr.getAt(e,t,o).filter((e=>e.row===t)).fold(p([]),(e=>[e]))))),(e=>1===e.rowspan),(()=>qr.getAt(e,t,0)))))},ai=(e,t)=>{if(t<0||t>=e.length-1)return _.none();const o=e[t].fold((()=>{const o=(e=>{const t=S.call(e,0);return t.reverse(),t})(e.slice(0,t));return Z(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>_.some({value:e,delta:0}))),n=e[t+1].fold((()=>{const o=e.slice(t+1);return Z(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>_.some({value:e,delta:1})));return o.bind((e=>n.map((t=>{const o=t.delta+e.delta;return Math.abs(t.value-e.value)/o}))))},li=(e,t)=>({row:e,y:t}),ci=(e,t)=>({col:e,x:t}),di=e=>on(e).left+Ko(e),ui=e=>on(e).left,hi=(e,t)=>ci(e,ui(t)),mi=(e,t)=>ci(e,di(t)),pi=e=>on(e).top,gi=(e,t)=>li(e,pi(t)),fi=(e,t)=>li(e,pi(t)+Wo(t)),bi=(e,t,o)=>{if(0===o.length)return[];const n=A(o.slice(1),((t,o)=>t.map((t=>e(o,t))))),r=o[o.length-1].map((e=>t(o.length-1,e)));return n.concat([r])},vi={delta:g,positions:e=>bi(gi,fi,e),edge:pi},yi=cn({delta:g,edge:ui,positions:e=>bi(hi,mi,e)},{delta:e=>-e,edge:di,positions:e=>bi(mi,hi,e)}),xi={delta:(e,t)=>yi(t).delta(e,t),positions:(e,t)=>yi(t).positions(e,t),edge:e=>yi(e).edge(e)},wi=/(\d+(\.\d+)?)%/,_i=/(\d+(\.\d+)?)px|em/,Si=Vt("col"),Ci=Vt("tr"),ki=(e,t,o)=>{const n=Wt(e).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return ze.fromDom(t)})(Ut(e))));return t(e)/o(n)*100},Ei=(e,t)=>{Ro(e,"width",t+"px")},Ti=(e,t)=>{Ro(e,"width",t+"%")},Oi=(e,t)=>{Ro(e,"height",t+"px")},Ai=(e,t,o,n)=>{const r=parseFloat(e);return ye(e,"%")&&"table"!==Lt(t)?((e,t,o,n)=>{const r=Mr(e).map((e=>{const n=o(e);return Math.floor(t/100*n)})).getOr(t);return n(e,r),r})(t,r,o,n):r},Mi=e=>{const t=(e=>qo(e)+"px")(e);return t?Ai(t,e,$o,Oi):$o(e)},Pi=(e,t)=>zo(e,t).orThunk((()=>wo(e,t).map((e=>e+"px")))),Di=e=>Pi(e,"width"),Li=e=>ki(e,Yo,Xo),Ri=e=>Si(e)?Yo(e):Jo(e),Ni=e=>Ci(e)?$o(e):((e,t,o)=>o(e)/xr(e,t))(e,"rowspan",Mi),Ii=(e,t,o)=>{Ro(e,"width",t+o)},Bi=e=>ki(e,Yo,Xo)+"%",zi=p(wi),Fi=Vt("col"),Hi=e=>Di(e).getOrThunk((()=>Ri(e)+"px")),ji=e=>{return(t=e,Pi(t,"height")).getOrThunk((()=>Ni(e)+"px"));var t},Vi=(e,t,o,n,r,i)=>e.filter(n).fold((()=>i(ai(o,t))),(e=>r(e))),Ui=(e,t,o,n)=>{const r=ri(e),i=qr.hasColumns(e)?(e=>A(qr.justColumns(e),(e=>_.from(e.element))))(e):r,s=[_.some(xi.edge(t))].concat(A(xi.positions(r,t),(e=>e.map((e=>e.x))))),a=v(wr);return A(i,((e,t)=>Vi(e,t,s,a,(e=>{if((e=>{const t=At().browser,o=t.isChromium()||t.isFirefox();return!Fi(e)||o})(e))return o(e);{const e=(i=r[t],l=g,null!=i?l(i):_.none());return Vi(e,t,s,a,(e=>n(_.some(Yo(e)))),n)}var i,l}),n)))},Zi=e=>e.map((e=>e+"px")).getOr(""),$i=(e,t,o)=>Ui(e,t,Ri,(e=>e.getOrThunk(o.minCellWidth))),Wi=(e,t,o,n)=>{const r=si(e),i=A(e.all,(e=>_.some(e.element))),s=[_.some(vi.edge(t))].concat(A(vi.positions(r,t),(e=>e.map((e=>e.y)))));return A(i,((e,t)=>Vi(e,t,s,w,o,n)))},qi=(e,t)=>()=>Do(e)?t(e):parseFloat(zo(e,"width").getOr("0")),Gi=e=>{const t=qi(e,Yo),o=p(0);return{width:t,pixelWidth:t,getWidths:(t,o)=>$i(t,e,o),getCellDelta:o,singleColumnWidth:p([0]),minCellWidth:o,setElementWidth:m,adjustTableWidth:m,isRelative:!0,label:"none"}},Yi=e=>{const t=qi(e,(e=>parseFloat(Bi(e)))),o=qi(e,Yo);return{width:t,pixelWidth:o,getWidths:(t,o)=>((e,t,o)=>Ui(e,t,Li,(e=>e.fold((()=>o.minCellWidth()),(e=>e/o.pixelWidth()*100)))))(t,e,o),getCellDelta:e=>e/o()*100,singleColumnWidth:(e,t)=>[100-e],minCellWidth:()=>Sr()/o()*100,setElementWidth:Ti,adjustTableWidth:o=>{const n=t();Ti(e,n+o/100*n)},isRelative:!0,label:"percent"}},Ki=e=>{const t=qi(e,Yo);return{width:t,pixelWidth:t,getWidths:(t,o)=>$i(t,e,o),getCellDelta:g,singleColumnWidth:(e,t)=>[Math.max(Sr(),e+t)-e],minCellWidth:Sr,setElementWidth:Ei,adjustTableWidth:o=>{const n=t()+o;Ei(e,n)},isRelative:!1,label:"pixel"}},Xi=e=>Di(e).fold((()=>Gi(e)),(t=>((e,t)=>null!==zi().exec(t)?Yi(e):Ki(e))(e,t))),Ji=Ki,Qi=Yi,es=(e,t,o,n)=>{o===n?_o(e,t):vo(e,t,o)},ts=(e,t,o)=>{U(On(e,t)).fold((()=>ho(e,o)),(e=>uo(e,o)))},os=(e,t)=>{const o=[],n=[],r=e=>A(e,(e=>{e.isNew&&o.push(e.element);const t=e.element;return Co(t),M(e.cells,(e=>{e.isNew&&n.push(e.element),es(e.element,"colspan",e.colspan,1),es(e.element,"rowspan",e.rowspan,1),mo(t,e.element)})),t})),i=e=>z(e,(e=>A(e.cells,(e=>(es(e.element,"span",e.colspan,1),e.element))))),s=(t,o)=>{const n=((e,t)=>{const o=fn(e,t).getOrThunk((()=>{const o=ze.fromTag(t,Ut(e).dom);return"thead"===t?ts(e,"caption,colgroup",o):"colgroup"===t?ts(e,"caption",o):mo(e,o),o}));return Co(o),o})(e,o),s=("colgroup"===o?i:r)(t);fo(n,s)},a=(t,o)=>{t.length>0?s(t,o):(t=>{fn(e,t).each(ko)})(o)},l=[],c=[],d=[],u=[];return M(t,(e=>{switch(e.section){case"thead":l.push(e);break;case"tbody":c.push(e);break;case"tfoot":d.push(e);break;case"colgroup":u.push(e)}})),a(u,"colgroup"),a(l,"thead"),a(c,"tbody"),a(d,"tfoot"),{newRows:o,newCells:n}},ns=(e,t)=>{if(0===e.length)return 0;const o=e[0];return I(e,(e=>!t(o.element,e.element))).getOr(e.length)},rs=(e,t,o,n)=>{const r=((e,t)=>e[t])(e,t),i="colgroup"===r.section,s=ns(r.cells.slice(o),n),a=i?1:ns(((e,t)=>A(e,(e=>De(e,t))))(e.slice(t),o),n);return{colspan:s,rowspan:a}},is=(e,t)=>{const o=A(e,(e=>A(e.cells,x)));return A(e,((n,r)=>{const i=z(n.cells,((n,i)=>{if(!1===o[r][i]){const d=rs(e,r,i,t);return((e,t,n,r)=>{for(let i=e;i<e+n;i++)for(let e=t;e<t+r;e++)o[i][e]=!0})(r,i,d.rowspan,d.colspan),[(s=n.element,a=d.rowspan,l=d.colspan,c=n.isNew,{element:s,rowspan:a,colspan:l,isNew:c})]}return[];var s,a,l,c}));return((e,t,o,n)=>({element:e,cells:t,section:o,isNew:n}))(n.element,i,n.section,n.isNew)}))},ss=(e,t,o)=>{const n=[];M(e.colgroups,(r=>{const i=[];for(let n=0;n<e.grid.columns;n++){const r=qr.getColumnAt(e,n).map((e=>Ee(e.element,o,!1))).getOrThunk((()=>Ee(t.colGap(),!0,!1)));i.push(r)}n.push(Te(r.element,i,"colgroup",o))}));for(let r=0;r<e.grid.rows;r++){const i=[];for(let n=0;n<e.grid.columns;n++){const s=qr.getAt(e,r,n).map((e=>Ee(e.element,o,e.isLocked))).getOrThunk((()=>Ee(t.gap(),!0,!1)));i.push(s)}const s=e.all[r],a=Te(s.element,i,s.section,o);n.push(a)}return n},as=e=>is(e,Je),ls=(e,t)=>Z(e.all,(e=>N(e.cells,(e=>Je(t,e.element))))),cs=(e,t,o)=>{const n=A(t.selection,(t=>Tr(t).bind((t=>ls(e,t))).filter(o))),r=he(n);return me(r.length>0,r)},ds=(e,t,o,n,r,i,s,a,l)=>{const c=qr.fromTable(i),d=_.from(null==l?void 0:l.section).getOrThunk(ni);return t(c,s).map((t=>{const o=((e,t)=>ss(e,t,!1))(c,a),n=e(o,t,Je,r(a),d),i=Ur(n.grid);return{info:t,grid:as(n.grid),cursor:n.cursor,lockedColumns:i}})).bind((e=>{const t=os(i,e.grid),r=_.from(null==l?void 0:l.sizing).getOrThunk((()=>Xi(i))),s=_.from(null==l?void 0:l.resize).getOrThunk(vr);return o(i,e.grid,e.info,{sizing:r,resize:s,section:d}),n(i),_o(i,jr),e.lockedColumns.length>0&&vo(i,jr,e.lockedColumns.join(",")),_.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})}))},us=(e,t)=>Tr(t.element).bind((o=>ls(e,o).map((e=>({...e,generators:t.generators,clipboard:t.clipboard}))))),hs=(e,t)=>cs(e,t,w).map((e=>({cells:e,generators:t.generators,clipboard:t.clipboard}))),ms=(e,t)=>cs(e,t,w),ps=(e,t)=>cs(e,t,(e=>!e.isLocked)),gs=(e,t)=>F(t,(t=>((e,t)=>ls(e,t).exists((e=>!e.isLocked)))(e,t))),fs=(e,t)=>((e,t)=>t.mergable)(0,t).filter((t=>gs(e,t.cells))),bs=(e,t)=>((e,t)=>t.unmergable)(0,t).filter((t=>gs(e,t))),vs={...ee([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},ys=(e,t,o,n,r)=>{const i=e.slice(0),s=((e,t)=>0===e.length?vs.none():1===e.length?vs.only(0):0===t?vs.left(0,1):t===e.length-1?vs.right(t-1,t):t>0&&t<e.length-1?vs.middle(t-1,t,t+1):vs.none())(e,t),a=p(A(i,p(0)));return s.fold(a,(e=>n.singleColumnWidth(i[e],o)),((e,t)=>r.calcLeftEdgeDeltas(i,e,t,o,n.minCellWidth(),n.isRelative)),((e,t,s)=>r.calcMiddleDeltas(i,e,t,s,o,n.minCellWidth(),n.isRelative)),((e,t)=>r.calcRightEdgeDeltas(i,e,t,o,n.minCellWidth(),n.isRelative)))},xs=(e,t)=>qr.hasColumns(e)?((e,t)=>{const o=qr.justColumns(e);return A(o,((e,o)=>({element:e.element,width:t[o],colspan:e.colspan})))})(e,t):((e,t)=>{const o=qr.justCells(e);return A(o,(e=>{const o=((e,t,o)=>{let n=0;for(let r=e;r<t;r++)n+=void 0!==o[r]?o[r]:0;return n})(e.column,e.column+e.colspan,t);return{element:e.element,width:o,colspan:e.colspan}}))})(e,t),ws=(e,t,o)=>{const n=xs(e,t);M(n,(e=>{o.setElementWidth(e.element,e.width)}))},_s=(e,t,o,n,r)=>{const i=qr.fromTable(e),s=r.getCellDelta(t),a=r.getWidths(i,r),l=o===i.grid.columns-1,c=n.clampTableDelta(a,o,s,r.minCellWidth(),l),d=ys(a,o,c,r,n),u=A(d,((e,t)=>e+a[t]));ws(i,u,r),n.resizeTable(r.adjustTableWidth,c,l)},Ss=(e,t,o)=>{const n=qr.fromTable(e),r=((e,t)=>Wi(e,t,Ni,(e=>e.getOrThunk(Cr))))(n,e),i=A(r,((e,n)=>o===n?Math.max(t+e,Cr()):e)),s=((e,t)=>A(e.all,((e,o)=>({element:e.element,height:t[o]}))))(n,i);M(s,(e=>{Oi(e.element,e.height)})),M(qr.justCells(n),(e=>{(e=>{Fo(e,"height")})(e.element)}));const a=L(i,((e,t)=>e+t),0);Oi(e,a)},Cs=(e,t)=>{if(!wr(e)){const o=(e=>Di(e).bind((e=>ur(e,["fixed","relative","empty"]))))(e);o.each((o=>{const n=o.value/2;Ii(e,n,o.unit),Ii(t,n,o.unit)}))}},ks=(e,t,o)=>{const n=yr(e,t,1);1===o||n<=1?_o(e,t):vo(e,t,Math.min(o,n))},Es=(e,t)=>o=>{const n=o.column+o.colspan-1,r=o.column;return n>=e&&r<t},Ts=(e,t)=>{const o=qr.fromTable(e);return ps(o,t).map((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,i=((e,t,o)=>{if(qr.hasColumns(e)){const n=D(qr.justColumns(e),Es(t,o)),r=A(n,(e=>{const n=Ao(e.element);return ks(n,"span",o-t),n})),i=ze.fromTag("colgroup");return fo(i,r),[i]}return[]})(o,n,r),s=((e,t,o)=>A(e.all,(e=>{const n=D(e.cells,Es(t,o)),r=A(n,(e=>{const n=Ao(e.element);return ks(n,"colspan",o-t),n})),i=ze.fromTag("tr");return fo(i,r),i})))(o,n,r);return[...i,...s]}))},Os=(e,t,o)=>{const n=qr.fromTable(e);return ms(n,t).bind((e=>{const t=ss(n,o,!1),r=Ne(t).rows.slice(e[0].row,e[e.length-1].row+e[e.length-1].rowspan),i=z(r,(e=>{const t=D(e.cells,(e=>!e.isLocked));return t.length>0?[{...e,cells:t}]:[]})),s=as(i);return me(s.length>0,s)})).map((e=>(e=>A(e,(e=>{const t=Oo(e.element);return M(e.cells,(e=>{const o=Ao(e.element);es(o,"colspan",e.colspan,1),es(o,"rowspan",e.rowspan,1),mo(t,o)})),t})))(e)))},As=(e,t,o)=>{const n=e[o].element,r=ze.fromTag("td");mo(r,ze.fromTag("br"));(t?mo:ho)(n,r)},Ms=(e,t)=>{const o=e=>Ye(e.element,t),n=Ao(e),r=Hr(n),i=Xi(e),s=qr.generate(r),a=((e,t)=>{const o=e.grid.columns;let n=e.grid.rows,r=o,i=0,s=0;const a=[],l=[];return q(e.access,(e=>{if(a.push(e),t(e)){l.push(e);const t=e.row,o=t+e.rowspan-1,a=e.column,c=a+e.colspan-1;t<n?n=t:o>i&&(i=o),a<r?r=a:c>s&&(s=c)}})),((e,t,o,n,r,i)=>({minRow:e,minCol:t,maxRow:o,maxCol:n,allCells:r,selectedCells:i}))(n,r,i,s,a,l)})(s,o),l="th:not("+t+"),td:not("+t+")",c=Er(n,"th,td",(e=>Ye(e,l)));M(c,ko),((e,t,o,n)=>{const r=D(e,(e=>"colgroup"!==e.section)),i=t.grid.columns,s=t.grid.rows;for(let e=0;e<s;e++){let s=!1;for(let a=0;a<i;a++)e<o.minRow||e>o.maxRow||a<o.minCol||a>o.maxCol||(qr.getAt(t,e,a).filter(n).isNone()?As(r,s,e):s=!0)}})(r,s,a,o);const d=((e,t,o,n)=>{if(0===n.minCol&&t.grid.columns===n.maxCol+1)return 0;const r=$i(t,e,o),i=R(r,((e,t)=>e+t),0),s=R(r.slice(n.minCol,n.maxCol+1),((e,t)=>e+t),0),a=s/i*o.pixelWidth()-o.pixelWidth();return o.getCellDelta(a)})(e,qr.fromTable(e),i,a);return((e,t,o,n)=>{q(o.columns,(e=>{(e.column<t.minCol||e.column>t.maxCol)&&ko(e.element)}));const r=D(kr(e,"tr"),(e=>0===e.dom.childElementCount));M(r,ko),t.minCol!==t.maxCol&&t.minRow!==t.maxRow||M(kr(e,"th,td"),(e=>{_o(e,"rowspan"),_o(e,"colspan")})),_o(e,jr),_o(e,"data-snooker-col-series"),Xi(e).adjustTableWidth(n)})(n,a,s,d),n},Ps=Vt("col"),Ds=Vt("colgroup"),Ls=e=>"tr"===Lt(e)||Ds(e),Rs=e=>({element:e,colspan:yr(e,"colspan",1),rowspan:yr(e,"rowspan",1)}),Ns=e=>wo(e,"scope").map((e=>e.substr(0,3))),Is=(e,t=Rs)=>{const o=o=>{if(Ls(o))return Ds((r={element:o}).element)?e.colgroup(r):e.row(r);{const r=o,i=(t=>Ps(t.element)?e.col(t):e.cell(t))(t(r));return n=_.some({item:r,replacement:i}),i}var r};let n=_.none();return{getOrInit:(e,t)=>n.fold((()=>o(e)),(n=>t(e,n.item)?n.replacement:o(e)))}},Bs=e=>t=>{const o=[],n=n=>{const r="td"===e?{scope:null}:{},i=t.replace(n,e,r);return o.push({item:n,sub:i}),i};return{replaceOrInit:(e,t)=>{if(Ls(e)||Ps(e))return e;{const r=e;return((e,t)=>N(o,(o=>t(o.item,e))))(r,t).fold((()=>n(r)),(o=>t(e,o.item)?o.sub:n(r)))}}}},zs=e=>({unmerge:t=>{const o=Ns(t);return o.each((e=>vo(t,"scope",e))),()=>{const n=e.cell({element:t,colspan:1,rowspan:1});return Fo(n,"width"),Fo(t,"width"),o.each((e=>vo(n,"scope",e))),n}},merge:e=>(Fo(e[0],"width"),(()=>{const t=he(A(e,Ns));if(0===t.length)return _.none();{const e=t[0],o=["row","col"];return T(t,(t=>t!==e&&E(o,t)))?_.none():_.from(e)}})().fold((()=>_o(e[0],"scope")),(t=>vo(e[0],"scope",t+"group"))),p(e[0]))}),Fs=(e,t,o)=>{const n=qr.fromTable(e);return ms(n,t).map((e=>{const t=ss(n,o,!1),{rows:r}=Ne(t),i=((e,t)=>{const o=e.slice(0,t[t.length-1].row+1),n=as(o);return z(n,(e=>{const o=e.cells.slice(0,t[t.length-1].column+1);return A(o,(e=>e.element))}))})(r,e),s=((e,t)=>{const o=e.slice(t[0].row+t[0].rowspan-1,e.length),n=as(o);return z(n,(e=>{const o=e.cells.slice(t[0].column+t[0].colspan-1,e.cells.length);return A(o,(e=>e.element))}))})(r,e);return{upOrLeftCells:i,downOrRightCells:s}}))},Hs=(e,t)=>({parent:p(e),view:p(e),dragContainer:p(e),origin:()=>on(e),isResizable:t}),js=ee([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),Vs=(e,t,o)=>{const n=o.substring(0,o.length-e.length),r=parseFloat(n);return n===r.toString()?t(r):js.invalid(o)},Us={...js,from:e=>ye(e,"%")?Vs("%",js.percent,e):ye(e,"px")?Vs("px",js.pixels,e):js.invalid(e)},Zs=(e,t,o)=>e.fold((()=>t),(e=>((e,t,o)=>{const n=o/t;return A(e,(e=>Us.from(e).fold((()=>e),(e=>e*n+"px"),(e=>e/100*o+"px"))))})(t,o,e)),(e=>((e,t)=>A(e,(e=>Us.from(e).fold((()=>e),(e=>e/t*100+"%"),(e=>e+"%")))))(t,o))),$s=(e,t,o)=>{const n=Us.from(o),r=F(e,(e=>"0px"===e))?((e,t)=>{const o=e.fold((()=>p("")),(e=>p(e/t+"px")),(()=>p(100/t+"%")));return O(t,o)})(n,e.length):Zs(n,e,t);return Gs(r)},Ws=(e,t)=>0===e.length?t:L(e,((e,t)=>Us.from(t).fold(p(0),g,g)+e),0),qs=(e,t)=>Us.from(e).fold(p(e),(e=>e+t+"px"),(e=>e+t+"%")),Gs=e=>{if(0===e.length)return e;const t=L(e,((e,t)=>{const o=Us.from(t).fold((()=>({value:t,remainder:0})),(e=>((e,t)=>{const o=Math.floor(e);return{value:o+t,remainder:e-o}})(e,"px")),(e=>({value:e+"%",remainder:0})));return{output:[o.value].concat(e.output),remainder:e.remainder+o.remainder}}),{output:[],remainder:0}),o=t.output;return o.slice(0,o.length-1).concat([qs(o[o.length-1],Math.round(t.remainder))])},Ys=Us.from,Ks=(e,t,o)=>{const n=qr.fromTable(e),r=n.all,i=qr.justCells(n),s=qr.justColumns(n);t.each((t=>{const o=Ys(t).fold(p("px"),p("px"),p("%"));const r=Yo(e),a=((e,t)=>Ui(e,t,Hi,Zi))(n,e),l=$s(a,r,t);qr.hasColumns(n)?((e,t,o)=>{M(t,((t,n)=>{const r=Ws([e[n]],Sr());Ro(t.element,"width",r+o)}))})(l,s,o):((e,t,o)=>{M(t,(t=>{const n=e.slice(t.column,t.colspan+t.column),r=Ws(n,Sr());Ro(t.element,"width",r+o)}))})(l,i,o),Ro(e,"width",t)})),o.each((t=>{const o=$o(e),s=((e,t)=>Wi(e,t,ji,Zi))(n,e);((e,t,o)=>{M(o,(e=>{Fo(e.element,"height")})),M(t,((t,o)=>{Ro(t.element,"height",e[o])}))})($s(s,o,t),r,i),Ro(e,"height",t)}))},Xs=e=>Di(e).exists((e=>wi.test(e))),Js=e=>Di(e).exists((e=>_i.test(e))),Qs=e=>Di(e).isNone();var ea=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],ta=()=>({up:p({selector:gn,closest:vn,predicate:mn,all:qt}),down:p({selector:An,predicate:En}),styles:p({get:Io,getRaw:zo,set:Ro,remove:Fo}),attrs:p({get:xo,set:vo,remove:_o,copyTo:(e,t)=>{const o=So(e);yo(t,o)}}),insert:p({before:co,after:uo,afterAll:go,append:mo,appendAll:fo,prepend:ho,wrap:po}),remove:p({unwrap:Eo,remove:ko}),create:p({nu:ze.fromTag,clone:e=>ze.fromDom(e.dom.cloneNode(!1)),text:ze.fromText}),query:p({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:Gt,nextSibling:Yt}),property:p({children:Kt,name:Lt,parent:$t,document:e=>Zt(e).dom,isText:Ft,isComment:It,isElement:zt,isSpecial:e=>{const t=Lt(e);return E(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>zt(e)?wo(e,"lang"):_.none(),getText:sn,setText:ln,isBoundary:e=>!!zt(e)&&("body"===Lt(e)||E(ea,Lt(e))),isEmptyTag:e=>!!zt(e)&&E(["br","img","hr","input"],Lt(e)),isNonEditable:e=>zt(e)&&"false"===xo(e,"contenteditable")}),eq:Je,is:et});const oa=(e,t)=>({item:e,mode:t}),na=(e,t,o,n=ra)=>e.property().parent(t).map((e=>oa(e,n))),ra=(e,t,o,n=ia)=>o.sibling(e,t).map((e=>oa(e,n))),ia=(e,t,o,n=ia)=>{const r=e.property().children(t);return o.first(r).map((e=>oa(e,n)))},sa=[{current:na,next:ra,fallback:_.none()},{current:ra,next:ia,fallback:_.some(na)},{current:ia,next:ia,fallback:_.some(ra)}],aa=(e,t,o,n,r=sa)=>N(r,(e=>e.current===o)).bind((o=>o.current(e,t,n,o.next).orThunk((()=>o.fallback.bind((o=>aa(e,t,o,n))))))),la=()=>({sibling:(e,t)=>e.query().prevSibling(t),first:e=>e.length>0?_.some(e[e.length-1]):_.none()}),ca=()=>({sibling:(e,t)=>e.query().nextSibling(t),first:e=>e.length>0?_.some(e[0]):_.none()}),da=(e,t,o,n,r,i)=>aa(e,t,n,r).bind((t=>i(t.item)?_.none():o(t.item)?_.some(t.item):da(e,t.item,o,t.mode,r,i))),ua=(e,t)=>({element:e,offset:t}),ha=(e,t,o)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?o(t).bind((t=>ha(e,t,o).orThunk((()=>_.some(t))))):_.none(),ma=(e,t)=>{if(e.property().isText(t))return e.property().getText(t).length;return e.property().children(t).length},pa=(e,t)=>{const o=ha(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o))return ua(o,ma(e,o));const n=e.property().children(o);return n.length>0?pa(e,n[n.length-1]):ua(o,ma(e,o))},ga=pa,fa=ta(),ba=e=>t=>0===e.property().children(t).length,va=(e,t,o,n)=>da(e,t,o,ra,la(),n),ya=(e,t,o,n)=>da(e,t,o,ra,ca(),n),xa=ta(),wa=(e,t)=>((e,t,o)=>va(e,t,ba(e),o))(xa,e,t),_a=(e,t)=>((e,t,o)=>ya(e,t,ba(e),o))(xa,e,t),Sa=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],Ca=(e,t,o,n)=>{const r=t(e,o);return L(n,((o,n)=>{const r=t(e,n);return ka(e,o,r)}),r)},ka=(e,t,o)=>t.bind((t=>o.filter(b(e.eq,t)))),Ea=(e,t,o)=>o.length>0?((e,t,o,n)=>n(e,t,o[0],o.slice(1)))(e,t,o,Ca):_.none(),Ta=(e,t,o,n=x)=>{const r=[t].concat(e.up().all(t)),i=[o].concat(e.up().all(o)),s=e=>I(e,n).fold((()=>e),(t=>e.slice(0,t+1))),a=s(r),l=s(i),c=N(a,(t=>T(l,((e,t)=>b(e.eq,t))(e,t))));return{firstpath:a,secondpath:l,shared:c}},Oa=ta(),Aa=(e,t)=>Ea(Oa,((t,o)=>e(o)),t),Ma=ta(),Pa=e=>((e,t)=>{const o=e.property().name(t);return E(Sa,o)})(Ma,e),Da=e=>((e,t)=>{const o=e.property().name(t);return E(["ol","ul"],o)})(Ma,e),La=e=>((e,t)=>E(["br","img","hr","input"],e.property().name(t)))(Ma,e),Ra=e=>{const t=Vt("br"),o=e=>Nn(e).bind((o=>{const n=Yt(o).map((e=>!!Pa(e)||!!La(e)&&"img"!==Lt(e))).getOr(!1);return $t(o).map((r=>!0===n||(e=>"li"===Lt(e)||mn(e,Da).isSome())(r)||t(o)||Pa(r)&&!Je(e,r)?[]:[ze.fromTag("br")]))})).getOr([]),n=(()=>{const n=z(e,(e=>{const n=Kt(e);return(e=>F(e,(e=>t(e)||Ft(e)&&0===sn(e).trim().length)))(n)?[]:n.concat(o(e))}));return 0===n.length?[ze.fromTag("br")]:n})();Co(e[0]),fo(e[0],n)},Na=e=>{_o(e,"width"),_o(e,"height")},Ia=e=>{const t=Bi(e);Ks(e,_.some(t),_.none()),Na(e)},Ba=e=>{const t=(e=>Yo(e)+"px")(e);Ks(e,_.some(t),_.none()),Na(e)},za=e=>{const t=(e=>$o(e)+"px")(e);Ks(e,_.none(),_.some(t)),Na(e)},Fa=e=>{Fo(e,"width");const t=Ar(e),o=t.length>0?t:Or(e);M(o,(e=>{Fo(e,"width"),Na(e)})),Na(e)},Ha={scope:["row","col"]},ja=e=>()=>{const t=ze.fromTag("td",e.dom);return mo(t,ze.fromTag("br",e.dom)),t},Va=e=>()=>ze.fromTag("col",e.dom),Ua=e=>()=>ze.fromTag("colgroup",e.dom),Za=e=>()=>ze.fromTag("tr",e.dom),$a=(e,t,o)=>{const n=((e,t)=>{const o=Mo(e,t),n=Kt(Ao(e));return fo(o,n),o})(e,t);return q(o,((e,t)=>{null===e?_o(n,t):vo(n,t,e)})),n},Wa=e=>e,qa=(e,t,o)=>{const n=(e,t)=>{((e,t)=>{const o=e.dom,n=t.dom;Po(o)&&Po(n)&&(n.style.cssText=o.style.cssText)})(e.element,t),Fo(t,"height"),1!==e.colspan&&Fo(t,"width")};return{col:o=>{const r=ze.fromTag(Lt(o.element),t.dom);return n(o,r),e(o.element,r),r},colgroup:Ua(t),row:Za(t),cell:r=>{const i=ze.fromTag(Lt(r.element),t.dom),s=o.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),a=s.length>0?((e,t,o)=>Rn(e).map((n=>{const r=o.join(","),i=Tn(n,r,(t=>Je(t,e)));return L(i,((e,t)=>{const o=Oo(t);return mo(e,o),o}),t)})).getOr(t))(r.element,i,s):i;return mo(a,ze.fromTag("br")),n(r,i),((e,t)=>{q(Ha,((o,n)=>wo(e,n).filter((e=>E(o,e))).each((e=>vo(t,n,e)))))})(r.element,i),e(r.element,i),i},replace:$a,colGap:Va(t),gap:ja(t)}},Ga=e=>({col:Va(e),colgroup:Ua(e),row:Za(e),cell:ja(e),replace:Wa,colGap:Va(e),gap:ja(e)}),Ya=e=>qr.fromTable(e).grid,Ka=(e,t,o,n)=>{const r=Ne(e).rows;let i=!0;for(let e=0;e<r.length;e++)for(let s=0;s<Re(r[0]);s++){const a=r[e],l=De(a,s),c=o(l.element,t);c&&!i?Me(a,s,Ee(n(),!0,l.isLocked)):c&&(i=!1)}return e},Xa=(e,t,o,n)=>{const r=Ne(e).rows;if(t>0&&t<r.length){const e=((e,t)=>R(e,((e,o)=>T(e,(e=>t(e.element,o.element)))?e:e.concat([o])),[]))(r[t-1].cells,o);M(e,(e=>{let i=_.none();for(let s=t;s<r.length;s++)for(let t=0;t<Re(r[0]);t++){const a=r[s],l=De(a,t);o(l.element,e.element)&&(i.isNone()&&(i=_.some(n())),i.each((e=>{Me(a,t,Ee(e,!0,l.isLocked))})))}}))}return e},Ja=(e,t)=>({rowDelta:0,colDelta:Re(e[0])-Re(t[0])}),Qa=(e,t)=>({rowDelta:e.length-t.length,colDelta:0}),el=(e,t,o,n)=>{const r="colgroup"===t.section?o.col:o.cell;return O(e,(e=>Ee(r(),!0,n(e))))},tl=(e,t,o,n)=>{const r=e[e.length-1];return e.concat(O(t,(()=>{const e="colgroup"===r.section?o.colgroup:o.row,t=Ie(r,e,g),i=el(t.cells.length,t,o,(e=>Q(n,e.toString())));return Pe(t,i)})))},ol=(e,t,o,n)=>A(e,(e=>{const r=el(t,e,o,x);return Oe(e,n,r)})),nl=(e,t,o)=>{const n=t.colDelta<0?ol:g,r=t.rowDelta<0?tl:g,i=Ur(e),s=Re(e[0]),a=T(i,(e=>e===s-1)),l=n(e,Math.abs(t.colDelta),o,a?s-1:s),c=Ur(l);return r(l,Math.abs(t.rowDelta),o,H(c,w))},rl=(e,t,o,n)=>{const r=b(n,De(e[t],o).element),i=e[t];return e.length>1&&Re(i)>1&&(o>0&&r(Le(i,o-1))||o<i.cells.length-1&&r(Le(i,o+1))||t>0&&r(Le(e[t-1],o))||t<e.length-1&&r(Le(e[t+1],o)))},il=(e,t,o)=>D(o,(o=>o>=e.column&&o<=Re(t[0])+e.column)),sl=(e,t,o,n,r)=>{const i=Ur(t),s=((e,t,o)=>{const n=Re(t[0]),r=Ne(t).cols.length+e.row,i=O(n-e.column,(t=>t+e.column)),s=N(i,(e=>F(o,(t=>t!==e)))).getOr(n-1);return{row:r,column:s}})(e,t,i),a=Ne(o).rows,l=il(s,a,i),c=((e,t,o)=>{if(e.row>=t.length||e.column>Re(t[0]))return le.error("invalid start address out of table bounds, row: "+e.row+", column: "+e.column);const n=t.slice(e.row),r=n[0].cells.slice(e.column),i=Re(o[0]),s=o.length;return le.value({rowDelta:n.length-s,colDelta:r.length-i})})(s,t,a);return c.map((e=>{const o={...e,colDelta:e.colDelta-l.length},i=nl(t,o,n),c=Ur(i),d=il(s,a,c);return((e,t,o,n,r,i)=>{const s=e.row,a=e.column,l=s+o.length,c=a+Re(o[0])+i.length,d=H(i,w);for(let e=s;e<l;e++){let i=0;for(let l=a;l<c;l++){if(d[l]){i++;continue}rl(t,e,l,r)&&Ka(t,Le(t[e],l),r,n.cell);const c=l-a-i,u=De(o[e-s],c),h=u.element,m=n.replace(h);Me(t[e],l,Ee(m,!0,u.isLocked))}}return t})(s,i,a,n,r,d)}))},al=(e,t,o,n,r)=>{((e,t,o,n)=>{t>0&&t<e[0].cells.length&&M(e,(e=>{const r=e.cells[t-1];let i=0;const s=n();for(;e.cells.length>t+i&&o(r.element,e.cells[t+i].element);)Me(e,t+i,Ee(s,!0,e.cells[t+i].isLocked)),i++}))})(t,e,r,n.cell);const i=Qa(o,t),s=nl(o,i,n),a=Qa(t,s),l=nl(t,a,n);return A(l,((t,o)=>Oe(t,e,s[o].cells)))},ll=(e,t,o,n,r)=>{Xa(t,e,r,n.cell);const i=Ur(t),s=Ja(t,o),a={...s,colDelta:s.colDelta-i.length},l=nl(t,a,n),{cols:c,rows:d}=Ne(l),u=Ur(l),h=Ja(o,t),m={...h,colDelta:h.colDelta+u.length},p=((e,t,o)=>A(e,(e=>R(o,((o,n)=>{const r=el(1,e,t,w)[0];return Ae(o,n,r)}),e))))(o,n,u),g=nl(p,m,n);return[...c,...d.slice(0,e),...g,...d.slice(e,d.length)]},cl=(e,t,o,n,r)=>{const{rows:i,cols:s}=Ne(e),a=i.slice(0,t),l=i.slice(t),c=((e,t,o,n)=>Ie(e,(e=>n(e,o)),t))(i[o],((e,o)=>t>0&&t<i.length&&n(Le(i[t-1],o),Le(i[t],o))?De(i[t],o):Ee(r(e.element,n),!0,e.isLocked)),n,r);return[...s,...a,c,...l]},dl=(e,t,o,n,r)=>A(e,(e=>{const i=t>0&&t<Re(e)&&n(Le(e,t-1),Le(e,t)),s=((e,t,o,n,r,i,s)=>{if("colgroup"!==o&&n)return De(e,t);{const t=De(e,r);return Ee(s(t.element,i),!0,!1)}})(e,t,e.section,i,o,n,r);return Ae(e,t,s)})),ul=(e,t,o,n)=>((e,t,o,n)=>void 0!==Le(e[t],o)&&t>0&&n(Le(e[t-1],o),Le(e[t],o)))(e,t,o,n)||((e,t,o)=>t>0&&o(Le(e,t-1),Le(e,t)))(e[t],o,n),hl=(e,t,o,n)=>{const r=e=>"row"===e?(e=>xr(e,"rowspan")>1)(t):wr(t),i=e=>r(e)?`${e}group`:e;if(e)return Lr(t)?i(o):null;if(n&&Lr(t)){return i("row"===o?"col":"row")}return null},ml=(e,t,o)=>Ee(o(e.element,t),!0,e.isLocked),pl=(e,t,o,n,r,i,s)=>A(e,((e,a)=>((e,t)=>{const o=e.cells,n=A(o,t);return Te(e.element,n,e.section,e.isNew)})(e,((e,l)=>{if((e=>T(t,(t=>o(e.element,t.element))))(e)){const t=s(e,a,l)?r(e,o,n):e;return i(t,a,l).each((e=>{var o,n;o=t.element,n={scope:_.from(e)},q(n,((e,t)=>{e.fold((()=>{_o(o,t)}),(e=>{bo(o.dom,t,e)}))}))})),t}return e})))),gl=(e,t,o)=>z(e,((n,r)=>ul(e,r,t,o)?[]:[De(n,t)])),fl=(e,t,o,n,r)=>{const i=Ne(e).rows,s=z(t,(e=>gl(i,e,n))),a=A(i,(e=>Rr(e.cells))),l=((e,t)=>F(t,g)&&Rr(e)?w:(e,o,n)=>!("th"===Lt(e.element)&&t[o]))(s,a),c=((e,t)=>(o,n)=>_.some(hl(e,o.element,"row",t[n])))(o,a);return pl(e,s,n,r,ml,c,l)},bl=(e,t,o,n,r,i,s)=>{const{cols:a,rows:l}=Ne(e),c=l[t[0]],d=z(t,(e=>((e,t,o)=>{const n=e[t];return z(n.cells,((n,r)=>ul(e,t,r,o)?[]:[n]))})(l,e,r))),u=A(c.cells,((e,t)=>Rr(gl(l,t,r)))),h=[...l];M(t,(e=>{h[e]=s.transformRow(l[e],o)}));const m=[...a,...h],p=((e,t)=>F(t,g)&&Rr(e.cells)?w:(e,o,n)=>!("th"===Lt(e.element)&&t[n]))(c,u),f=((e,t)=>(o,n,r)=>_.some(hl(e,o.element,"col",t[r])))(n,u);return pl(m,d,r,i,s.transformCell,f,p)},vl=(e,t,o,n)=>{const r=Ne(e).rows,i=A(t,(e=>De(r[e.row],e.column)));return pl(e,i,o,n,ml,_.none,w)},yl=e=>R(e,((e,t)=>T(e,(e=>e.column===t.column))?e:e.concat([t])),[]).sort(((e,t)=>e.column-t.column)),xl=e=>Cn(e,!0),wl=e=>{0===Or(e).length&&ko(e)},_l=(e,t)=>({grid:e,cursor:t}),Sl=(e,t,o)=>{var n,r;const i=Ne(e).rows;return _.from(null===(r=null===(n=i[t])||void 0===n?void 0:n.cells[o])||void 0===r?void 0:r.element).filter(xl).orThunk((()=>(e=>Z(e,(e=>Z(e.cells,(e=>{const t=e.element;return me(xl(t),t)})))))(i)))},Cl=(e,t,o)=>{const n=Sl(e,t,o);return _l(e,n)},kl=e=>R(e,((e,t)=>T(e,(e=>e.row===t.row))?e:e.concat([t])),[]).sort(((e,t)=>e.row-t.row)),El=(e,t,o,n)=>{const r=t[0].row,i=kl(t),s=L(i,((e,t)=>({grid:cl(e.grid,r,t.row+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return Cl(s,r,t[0].column)},Tl=(e,t,o,n)=>{const r=kl(t),i=r[r.length-1],s=i.row+i.rowspan,a=L(r,((e,t)=>cl(e,s,t.row,o,n.getOrInit)),e);return Cl(a,s,t[0].column)},Ol=(e,t,o,n)=>{const r=t.details,i=yl(r),s=i[0].column,a=L(i,((e,t)=>({grid:dl(e.grid,s,t.column+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return Cl(a,r[0].row,s)},Al=(e,t,o,n)=>{const r=t.details,i=r[r.length-1],s=i.column+i.colspan,a=yl(r),l=L(a,((e,t)=>dl(e,s,t.column,o,n.getOrInit)),e);return Cl(l,r[0].row,s)},Ml=(e,t,o,n)=>{const r=yl(t),i=A(r,(e=>e.column)),s=fl(e,i,!0,o,n.replaceOrInit);return Cl(s,t[0].row,t[0].column)},Pl=(e,t,o,n)=>{const r=vl(e,t,o,n.replaceOrInit);return Cl(r,t[0].row,t[0].column)},Dl=(e,t,o,n)=>{const r=yl(t),i=A(r,(e=>e.column)),s=fl(e,i,!1,o,n.replaceOrInit);return Cl(s,t[0].row,t[0].column)},Ll=(e,t,o,n)=>{const r=vl(e,t,o,n.replaceOrInit);return Cl(r,t[0].row,t[0].column)},Rl=(e,t)=>(o,n,r,i,s)=>{const a=kl(n),l=A(a,(e=>e.row)),c=bl(o,l,e,t,r,i.replaceOrInit,s);return Cl(c,n[0].row,n[0].column)},Nl=Rl("thead",!0),Il=Rl("tbody",!1),Bl=Rl("tfoot",!1),zl=(e,t,o,n)=>{const r=yl(t.details),i=((e,t)=>z(e,(e=>{const o=e.cells,n=L(t,((e,t)=>t>=0&&t<e.length?e.slice(0,t).concat(e.slice(t+1)):e),o);return n.length>0?[Te(e.element,n,e.section,e.isNew)]:[]})))(e,A(r,(e=>e.column))),s=i.length>0?i[0].cells.length-1:0;return Cl(i,r[0].row,Math.min(r[0].column,s))},Fl=(e,t,o,n)=>{const r=kl(t),i=((e,t,o)=>{const{rows:n,cols:r}=Ne(e);return[...r,...n.slice(0,t),...n.slice(o+1)]})(e,r[0].row,r[r.length-1].row),s=Math.max(Ne(i).rows.length-1,0);return Cl(i,Math.min(t[0].row,s),t[0].column)},Hl=(e,t,o,n)=>{const r=t.cells;Ra(r);const i=((e,t,o,n)=>{const r=Ne(e).rows;if(0===r.length)return e;for(let e=t.startRow;e<=t.finishRow;e++)for(let o=t.startCol;o<=t.finishCol;o++){const t=r[e],i=De(t,o).isLocked;Me(t,o,Ee(n(),!1,i))}return e})(e,t.bounds,0,n.merge(r));return _l(i,_.from(r[0]))},jl=(e,t,o,n)=>{const r=L(t,((e,t)=>Ka(e,t,o,n.unmerge(t))),e);return _l(r,_.from(t[0]))},Vl=(e,t,o,n)=>{const r=((e,t)=>{const o=qr.fromTable(e);return ss(o,t,!0)})(t.clipboard,t.generators),i=((e,t)=>({row:e,column:t}))(t.row,t.column);return sl(i,e,r,t.generators,o).fold((()=>_l(e,_.some(t.element))),(e=>Cl(e,t.row,t.column)))},Ul=(e,t,o)=>{const n=((e,t)=>zr(e,(()=>t)))(e,o.section),r=qr.generate(n);return ss(r,t,!0)},Zl=(e,t,o,n)=>{const r=Ne(e).rows,i=t.cells[0].column,s=r[t.cells[0].row],a=Ul(t.clipboard,t.generators,s),l=al(i,e,a,t.generators,o);return Cl(l,t.cells[0].row,t.cells[0].column)},$l=(e,t,o,n)=>{const r=Ne(e).rows,i=t.cells[t.cells.length-1].column+t.cells[t.cells.length-1].colspan,s=r[t.cells[0].row],a=Ul(t.clipboard,t.generators,s),l=al(i,e,a,t.generators,o);return Cl(l,t.cells[0].row,i)},Wl=(e,t,o,n)=>{const r=Ne(e).rows,i=t.cells[0].row,s=r[i],a=Ul(t.clipboard,t.generators,s),l=ll(i,e,a,t.generators,o);return Cl(l,t.cells[0].row,t.cells[0].column)},ql=(e,t,o,n)=>{const r=Ne(e).rows,i=t.cells[t.cells.length-1].row+t.cells[t.cells.length-1].rowspan,s=r[t.cells[0].row],a=Ul(t.clipboard,t.generators,s),l=ll(i,e,a,t.generators,o);return Cl(l,i,t.cells[0].column)},Gl=(e,t,o,n)=>((e,t,o,n)=>{const r=qr.generate(t),i=n.getWidths(r,n);ws(r,i,n)})(0,t,0,n.sizing),Yl=(e,t,o,n)=>((e,t,o,n,r)=>{const i=qr.generate(t),s=n.getWidths(i,n),a=n.pixelWidth(),{newSizes:l,delta:c}=r.calcRedestributedWidths(s,a,o.pixelDelta,n.isRelative);ws(i,l,n),n.adjustTableWidth(c)})(0,t,o,n.sizing,n.resize),Kl=(e,t)=>T(t,(e=>0===e.column&&e.isLocked)),Xl=(e,t)=>T(t,(t=>t.column+t.colspan>=e.grid.columns&&t.isLocked)),Jl=(e,t)=>{const o=ri(e),n=yl(t);return R(n,((e,t)=>e+o[t.column].map(Ko).getOr(0)),0)},Ql=e=>(t,o)=>ms(t,o).filter((o=>!(e?Kl:Xl)(t,o))).map((e=>({details:e,pixelDelta:Jl(t,e)}))),ec=(e,t)=>ps(e,t).map((t=>({details:t,pixelDelta:-Jl(e,t)}))),tc=e=>(t,o)=>hs(t,o).filter((o=>!(e?Kl:Xl)(t,o.cells))),oc=Bs("th"),nc=Bs("td"),rc=(e,t,o,n)=>ds(El,ms,m,m,Is,e,t,o,n),ic=(e,t,o,n)=>ds(Tl,ms,m,m,Is,e,t,o,n),sc=(e,t,o,n)=>ds(Ol,Ql(!0),Yl,m,Is,e,t,o,n),ac=(e,t,o,n)=>ds(Al,Ql(!1),Yl,m,Is,e,t,o,n),lc=(e,t,o,n)=>ds(zl,ec,Yl,wl,Is,e,t,o,n),cc=(e,t,o,n)=>ds(Fl,ms,m,wl,Is,e,t,o,n),dc=(e,t,o,n)=>ds(Ml,ps,m,m,oc,e,t,o,n),uc=(e,t,o,n)=>ds(Dl,ps,m,m,nc,e,t,o,n),hc=(e,t,o,n)=>ds(Nl,ms,m,m,oc,e,t,o,n),mc=(e,t,o,n)=>ds(Il,ms,m,m,nc,e,t,o,n),pc=(e,t,o,n)=>ds(Bl,ms,m,m,nc,e,t,o,n),gc=(e,t,o,n)=>ds(Pl,ps,m,m,oc,e,t,o,n),fc=(e,t,o,n)=>ds(Ll,ps,m,m,nc,e,t,o,n),bc=(e,t,o,n)=>ds(Hl,fs,Gl,m,zs,e,t,o,n),vc=(e,t,o,n)=>ds(jl,bs,Gl,m,zs,e,t,o,n),yc=(e,t,o,n)=>ds(Vl,us,Gl,m,Is,e,t,o,n),xc=(e,t,o,n)=>ds(Zl,tc(!0),m,m,Is,e,t,o,n),wc=(e,t,o,n)=>ds($l,tc(!1),m,m,Is,e,t,o,n),_c=(e,t,o,n)=>ds(Wl,hs,m,m,Is,e,t,o,n),Sc=(e,t,o,n)=>ds(ql,hs,m,m,Is,e,t,o,n),Cc=(e,t)=>{const o=qr.fromTable(e);return ms(o,t).bind((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,i=B(A(o.all,(e=>D(e.cells,(e=>e.column>=n&&e.column<r)))));return Br(i)})).getOr("")},kc=(e,t)=>{const o=qr.fromTable(e);return ms(o,t).bind(Br).getOr("")},Ec=(e,t)=>{const o=qr.fromTable(e);return ms(o,t).bind((e=>{const t=e[e.length-1],n=e[0].row,r=t.row+t.rowspan;return(e=>{const t=A(e,(e=>Ir(e).type)),o=E(t,"header"),n=E(t,"footer");if(o||n){const e=E(t,"body");return!o||e||n?o||e||!n?_.none():_.some("footer"):_.some("header")}return _.some("body")})(o.all.slice(n,r))})).getOr("")},Tc=(e,t)=>{const o=t.column,n=t.column+t.colspan-1,r=t.row,i=t.row+t.rowspan-1;return o<=e.finishCol&&n>=e.startCol&&r<=e.finishRow&&i>=e.startRow},Oc=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,Ac=(e,t,o)=>{const n=qr.findItem(e,t,Je),r=qr.findItem(e,o,Je);return n.bind((e=>r.map((t=>{return o=e,n=t,r=Math.min(o.row,n.row),i=Math.min(o.column,n.column),s=Math.max(o.row+o.rowspan-1,n.row+n.rowspan-1),a=Math.max(o.column+o.colspan-1,n.column+n.colspan-1),{startRow:r,startCol:i,finishRow:s,finishCol:a};var o,n,r,i,s,a}))))},Mc=(e,t,o)=>Ac(e,t,o).bind((t=>((e,t)=>{let o=!0;const n=b(Oc,t);for(let r=t.startRow;r<=t.finishRow;r++)for(let i=t.startCol;i<=t.finishCol;i++)o=o&&qr.getAt(e,r,i).exists(n);return o?_.some(t):_.none()})(e,t))),Pc=(e,t,o)=>Ac(e,t,o).map((t=>{const o=qr.filterItems(e,b(Tc,t));return A(o,(e=>e.element))})),Dc=(e,t)=>qr.findItem(e,t,((e,t)=>Qe(t,e))).map((e=>e.element)),Lc=(e,t,o)=>Mr(e).bind((n=>((e,t,o,n)=>qr.findItem(e,t,Je).bind((t=>{const r=o>0?t.row+t.rowspan-1:t.row,i=n>0?t.column+t.colspan-1:t.column;return qr.getAt(e,r+o,i+n).map((e=>e.element))})))(Ic(n),e,t,o))),Rc=(e,t,o)=>{const n=Ic(e);return Pc(n,t,o)},Nc=(e,t,o,n,r)=>{const i=Ic(e),s=Je(e,o)?_.some(t):Dc(i,t),a=Je(e,r)?_.some(n):Dc(i,n);return s.bind((e=>a.bind((t=>Pc(i,e,t)))))},Ic=qr.fromTable,Bc={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},zc=e=>{const t=ze.fromTag("colgroup");return O(e,(()=>mo(t,ze.fromTag("col")))),t},Fc=(e,t,o,n)=>O(e,(e=>((e,t,o,n)=>{const r=ze.fromTag("tr");for(let i=0;i<e;i++){const e=n<t||i<o?ze.fromTag("th"):ze.fromTag("td");i<o&&vo(e,"scope","row"),n<t&&vo(e,"scope","col"),mo(e,ze.fromTag("br")),mo(r,e)}return r})(t,o,n,e))),Hc=e=>{let t=[];return{bind:e=>{if(void 0===e)throw new Error("Event bind error: undefined handler");t.push(e)},unbind:e=>{t=D(t,(t=>t!==e))},trigger:(...o)=>{const n={};M(e,((e,t)=>{n[e]=o[t]})),M(t,(e=>{e(n)}))}}},jc=e=>({registry:G(e,(e=>({bind:e.bind,unbind:e.unbind}))),trigger:G(e,(e=>e.trigger))}),Vc=ie(["compare","extract","mutate","sink"]),Uc=ie(["element","start","stop","destroy"]),Zc=ie(["forceDrop","drop","move","delayDrop"]),$c=()=>{let e=_.none();const t=jc({move:Hc(["info"])});return{onEvent:(o,n)=>{n.extract(o).each((o=>{const r=((t,o)=>{const n=e.map((e=>t.compare(e,o)));return e=_.some(o),n})(n,o);r.each((e=>{t.trigger.move(e)}))}))},reset:()=>{e=_.none()},events:t.registry}},Wc=()=>{const e=(()=>{const e=jc({move:Hc(["info"])});return{onEvent:m,reset:m,events:e.registry}})(),t=$c();let o=e;return{on:()=>{o.reset(),o=t},off:()=>{o.reset(),o=e},isOn:()=>o===t,onEvent:(e,t)=>{o.onEvent(e,t)},events:t.events}},qc=(e,t,o)=>{let n=!1;const r=jc({start:Hc([]),stop:Hc([])}),i=Wc(),s=()=>{d.stop(),i.isOn()&&(i.off(),r.trigger.stop())},l=((e,t)=>{let o=null;const n=()=>{a(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...r)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,r)}),t)}}})(s,200);i.events.move.bind((o=>{t.mutate(e,o.info)}));const c=e=>(...t)=>{n&&e.apply(null,t)},d=t.sink(Zc({forceDrop:s,drop:c(s),move:c((e=>{l.cancel(),i.onEvent(e,t)})),delayDrop:c(l.throttle)}),o);return{element:d.element,go:e=>{d.start(e),i.on(),r.trigger.start()},on:()=>{n=!0},off:()=>{n=!1},isActive:()=>n,destroy:()=>{d.destroy()},events:r.registry}},Gc=de("ephox-dragster").resolve;var Yc=Vc({compare:(e,t)=>en(t.left-e.left,t.top-e.top),extract:e=>_.some(en(e.x,e.y)),sink:(e,t)=>{const o=(e=>{const t={layerClass:Gc("blocker"),...e},o=ze.fromTag("div");return vo(o,"role","presentation"),No(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),wn(o,Gc("blocker")),wn(o,t.layerClass),{element:p(o),destroy:()=>{ko(o)}}})(t),n=ao(o.element(),"mousedown",e.forceDrop),r=ao(o.element(),"mouseup",e.drop),i=ao(o.element(),"mousemove",e.move),s=ao(o.element(),"mouseout",e.delayDrop);return Uc({element:o.element,start:e=>{mo(e,o.element())},stop:()=>{ko(o.element())},destroy:()=>{o.destroy(),r.unbind(),i.unbind(),s.unbind(),n.unbind()}})},mutate:(e,t)=>{e.mutate(t.left,t.top)}});const Kc=de("ephox-snooker").resolve,Xc=()=>{const e=jc({drag:Hc(["xDelta","yDelta","target"])});let t=_.none();const o=(()=>{const e=jc({drag:Hc(["xDelta","yDelta"])});return{mutate:(t,o)=>{e.trigger.drag(t,o)},events:e.registry}})();o.events.drag.bind((o=>{t.each((t=>{e.trigger.drag(o.xDelta,o.yDelta,t)}))}));return{assign:e=>{t=_.some(e)},get:()=>t,mutate:o.mutate,events:e.registry}},Jc=Kc("resizer-bar"),Qc=Kc("resizer-rows"),ed=Kc("resizer-cols"),td=e=>{const t=An(e.parent(),"."+Jc);M(t,ko)},od=(e,t,o)=>{const n=e.origin();M(t,(t=>{t.each((t=>{const r=o(n,t);wn(r,Jc),mo(e.parent(),r)}))}))},nd=(e,t,o,n)=>{od(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const i=ze.fromTag("div");return No(i,{position:"absolute",left:t-n/2+"px",top:o+"px",height:r+"px",width:n+"px"}),yo(i,{"data-mce-bogus":"all","data-column":e,role:"presentation"}),i})(t.col,t.x-e.left,o.top-e.top,7,n);return wn(r,ed),r}))},rd=(e,t,o,n)=>{od(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const i=ze.fromTag("div");return No(i,{position:"absolute",left:t+"px",top:o-r/2+"px",height:r+"px",width:n+"px"}),yo(i,{"data-mce-bogus":"all","data-row":e,role:"presentation"}),i})(t.row,o.left-e.left,t.y-e.top,n,7);return wn(r,Qc),r}))},id=(e,t,o,n,r)=>{const i=on(o),s=t.isResizable,a=n.length>0?vi.positions(n,o):[],l=a.length>0?((e,t)=>z(e.all,((e,o)=>t(e.element)?[o]:[])))(e,s):[],c=D(a,((e,t)=>T(l,(e=>t===e))));rd(t,c,i,Ko(o));const d=r.length>0?xi.positions(r,o):[],u=d.length>0?((e,t)=>{const o=[];return O(e.grid.columns,(n=>{const r=qr.getColumnAt(e,n).map((e=>e.element));r.forall(t)&&o.push(n)})),D(o,(o=>{const n=qr.filterItems(e,(e=>e.column===o));return F(n,(e=>t(e.element)))}))})(e,s):[],h=D(d,((e,t)=>T(u,(e=>t===e))));nd(t,h,i,Wo(o))},sd=(e,t)=>{if(td(e),e.isResizable(t)){const o=qr.fromTable(t),n=si(o),r=ri(o);id(o,e,t,n,r)}},ad=(e,t)=>{const o=An(e.parent(),"."+Jc);M(o,t)},ld=e=>{ad(e,(e=>{Ro(e,"display","none")}))},cd=e=>{ad(e,(e=>{Ro(e,"display","block")}))},dd=Kc("resizer-bar-dragging"),ud=e=>{const t=Xc(),o=((e,t={})=>{var o;const n=null!==(o=t.mode)&&void 0!==o?o:Yc;return qc(e,n,t)})(t,{});let n=_.none();const r=(e,t)=>_.from(xo(e,t));t.events.drag.bind((e=>{r(e.target,"data-row").each((t=>{const o=_r(e.target,"top");Ro(e.target,"top",o+e.yDelta+"px")})),r(e.target,"data-column").each((t=>{const o=_r(e.target,"left");Ro(e.target,"left",o+e.xDelta+"px")}))}));const i=(e,t)=>_r(e,t)-yr(e,"data-initial-"+t,0);o.events.stop.bind((()=>{t.get().each((t=>{n.each((o=>{r(t,"data-row").each((e=>{const n=i(t,"top");_o(t,"data-initial-top"),d.trigger.adjustHeight(o,n,parseInt(e,10))})),r(t,"data-column").each((e=>{const n=i(t,"left");_o(t,"data-initial-left"),d.trigger.adjustWidth(o,n,parseInt(e,10))})),sd(e,o)}))}))}));const s=(n,r)=>{d.trigger.startAdjust(),t.assign(n),vo(n,"data-initial-"+r,_r(n,r)),wn(n,dd),Ro(n,"opacity","0.2"),o.go(e.dragContainer())},a=ao(e.parent(),"mousedown",(e=>{var t;t=e.target,_n(t,Qc)&&s(e.target,"top"),(e=>_n(e,ed))(e.target)&&s(e.target,"left")})),l=t=>Je(t,e.view()),c=ao(e.view(),"mouseover",(t=>{var r;(r=t.target,vn(r,"table",l).filter(Cn)).fold((()=>{Do(t.target)&&!(e=>_n(e,"ephox-snooker-resizer-bar")||_n(e,"ephox-dragster-blocker"))(t.target)&&td(e)}),(t=>{o.isActive()&&(n=_.some(t),sd(e,t))}))})),d=jc({adjustHeight:Hc(["table","delta","row"]),adjustWidth:Hc(["table","delta","column"]),startAdjust:Hc([])});return{destroy:()=>{a.unbind(),c.unbind(),o.destroy(),td(e)},refresh:t=>{sd(e,t)},on:o.on,off:o.off,hideBars:b(ld,e),showBars:b(cd,e),events:d.registry}},hd=(e,t,o)=>{const n=vi,r=xi,i=ud(e),s=jc({beforeResize:Hc(["table","type"]),afterResize:Hc(["table","type"]),startDrag:Hc([])});return i.events.adjustHeight.bind((e=>{const t=e.table;s.trigger.beforeResize(t,"row");const o=n.delta(e.delta,t);Ss(t,o,e.row),s.trigger.afterResize(t,"row")})),i.events.startAdjust.bind((e=>{s.trigger.startDrag()})),i.events.adjustWidth.bind((e=>{const n=e.table;s.trigger.beforeResize(n,"col");const i=r.delta(e.delta,n),a=o(n);_s(n,i,e.column,t,a),s.trigger.afterResize(n,"col")})),{on:i.on,off:i.off,refreshBars:i.refresh,hideBars:i.hideBars,showBars:i.showBars,destroy:i.destroy,events:s.registry}},md=e=>t=>t.options.get(e),pd="100%",gd=e=>{var t;const o=e.dom,n=null!==(t=o.getParent(e.selection.getStart(),o.isBlock))&&void 0!==t?t:e.getBody();return Xo(ze.fromDom(n))+"px"},fd=e=>_.from(e.options.get("table_clone_elements")),bd=md("table_header_type"),vd=md("table_column_resizing"),yd=e=>"preservetable"===vd(e),xd=e=>"resizetable"===vd(e),wd=md("table_sizing_mode"),_d=e=>"relative"===wd(e),Sd=e=>"fixed"===wd(e),Cd=e=>"responsive"===wd(e),kd=md("table_resize_bars"),Ed=md("table_style_by_css"),Td=md("table_merge_content_on_paste"),Od=e=>{const t=e.options,o=t.get("table_default_attributes");return t.isSet("table_default_attributes")?o:((e,t)=>Cd(e)||Ed(e)?t:Sd(e)?{...t,width:gd(e)}:{...t,width:pd})(e,o)},Ad=e=>{const t=e.options,o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:((e,t)=>Cd(e)||!Ed(e)?t:Sd(e)?{...t,width:gd(e)}:{...t,width:pd})(e,o)},Md=md("table_use_colgroups"),Pd=e=>ze.fromDom(e.getBody()),Dd=e=>t=>Je(t,Pd(e)),Ld=e=>{_o(e,"data-mce-style");const t=e=>_o(e,"data-mce-style");M(Or(e),t),M(Ar(e),t),M(Pr(e),t)},Rd=e=>ze.fromDom(e.selection.getStart()),Nd=e=>e.getBoundingClientRect().width,Id=e=>e.getBoundingClientRect().height,Bd=e=>(t,o)=>{const n=t.dom.getStyle(o,e)||t.dom.getAttrib(o,e);return _.from(n).filter(we)},zd=Bd("width"),Fd=Bd("height"),Hd=e=>pn(e,Vt("table")).exists(Cn),jd=e=>gn(e,"table"),Vd=(e,t,o)=>{const n=e=>t=>void 0!==o&&o(t)||Je(t,e);return Je(e,t)?_.some({boxes:_.some([e]),start:e,finish:t}):jd(e).bind((r=>jd(t).bind((i=>{if(Je(r,i))return _.some({boxes:Rc(r,e,t),start:e,finish:t});if(Qe(r,i)){const o=Tn(t,"td,th",n(r)),s=o.length>0?o[o.length-1]:t;return _.some({boxes:Nc(r,e,r,t,i),start:e,finish:s})}if(Qe(i,r)){const o=Tn(e,"td,th",n(i)),s=o.length>0?o[o.length-1]:e;return _.some({boxes:Nc(i,e,r,t,i),start:e,finish:s})}return((e,t,o)=>Ta(Oa,e,t,o))(e,t).shared.bind((s=>vn(s,"table",o).bind((o=>{const s=Tn(t,"td,th",n(o)),a=s.length>0?s[s.length-1]:t,l=Tn(e,"td,th",n(o)),c=l.length>0?l[l.length-1]:e;return _.some({boxes:Nc(o,e,r,t,i),start:c,finish:a})}))))}))))},Ud=(e,t)=>{const o=An(e,t);return o.length>0?_.some(o):_.none()},Zd=(e,t,o)=>bn(e,t).bind((t=>bn(e,o).bind((e=>Aa(jd,[t,e]).map((o=>({first:t,last:e,table:o}))))))),$d=(e,t,o,n,r)=>((e,t)=>N(e,(e=>Ye(e,t))))(e,r).bind((e=>Lc(e,t,o).bind((e=>((e,t)=>gn(e,"table").bind((o=>bn(o,t).bind((t=>Vd(t,e).bind((e=>e.boxes.map((t=>({boxes:t,start:e.start,finish:e.finish}))))))))))(e,n))))),Wd=(e,t)=>Ud(e,t),qd=(e,t,o)=>Zd(e,t,o).bind((t=>{const o=t=>Je(e,t),n="thead,tfoot,tbody,table",r=gn(t.first,n,o),i=gn(t.last,n,o);return r.bind((e=>i.bind((o=>Je(e,o)?((e,t,o)=>{const n=Ic(e);return Mc(n,t,o)})(t.table,t.first,t.last):_.none()))))})),Gd=g,Yd=e=>{const t=(e,t)=>wo(e,t).exists((e=>parseInt(e,10)>1));return e.length>0&&F(e,(e=>t(e,"rowspan")||t(e,"colspan")))?_.some(e):_.none()},Kd=(e,t,o)=>t.length<=1?_.none():qd(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t}))),Xd=(e,t)=>({selection:e,kill:t}),Jd=()=>({tag:"none"}),Qd=e=>({tag:"multiple",elements:e}),eu=e=>({tag:"single",element:e}),tu=(e,t,o,n)=>({start:Vn.on(e,t),finish:Vn.on(o,n)}),ou=(e,t)=>{const o=Ge(e,t);return Bn(ze.fromDom(o.startContainer),o.startOffset,ze.fromDom(o.endContainer),o.endOffset)},nu=tu,ru=(e,t,o,n,r)=>Je(o,n)?_.none():Vd(o,n,t).bind((t=>{const n=t.boxes.getOr([]);return n.length>1?(r(e,n,t.start,t.finish),_.some(Xd(_.some(nu(o,0,o,Pn(o))),!0))):_.none()})),iu=ee([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),su=e=>vn(e,"tr"),au={...iu,verify:(e,t,o,n,r,i,s)=>vn(n,"td,th",s).bind((o=>vn(t,"td,th",s).map((t=>Je(o,t)?Je(n,o)&&Pn(o)===r?i(t):iu.none("in same cell"):Aa(su,[o,t]).fold((()=>((e,t,o)=>{const n=e.getRect(t),r=e.getRect(o);return r.right>n.left&&r.left<n.right})(e,t,o)?iu.success():i(t)),(e=>i(t))))))).getOr(iu.none("default")),cata:(e,t,o,n,r)=>e.fold(t,o,n,r)},lu=Vt("br"),cu=(e,t,o)=>t(e,o).bind((e=>Ft(e)&&0===sn(e).trim().length?cu(e,t,o):_.some(e))),du=(e,t,o,n)=>((e,t)=>Xt(e,t).filter(lu).orThunk((()=>Xt(e,t-1).filter(lu))))(t,o).bind((t=>n.traverse(t).fold((()=>cu(t,n.gather,e).map(n.relative)),(e=>(e=>$t(e).bind((t=>{const o=Kt(t);return Mn(o,e).map((n=>((e,t,o,n)=>({parent:e,children:t,element:o,index:n}))(t,o,e,n)))})))(e).map((e=>Vn.on(e.parent,e.index))))))),uu=(e,t,o,n)=>{const r=lu(t)?((e,t,o)=>o.traverse(t).orThunk((()=>cu(t,o.gather,e))).map(o.relative))(e,t,n):du(e,t,o,n);return r.map((e=>({start:e,finish:e})))},hu=(e,t)=>({left:e.left,top:e.top+t,right:e.right,bottom:e.bottom+t}),mu=(e,t)=>({left:e.left,top:e.top-t,right:e.right,bottom:e.bottom-t}),pu=(e,t,o)=>({left:e.left+t,top:e.top+o,right:e.right+t,bottom:e.bottom+o}),gu=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom}),fu=(e,t)=>_.some(e.getRect(t)),bu=(e,t,o)=>zt(t)?fu(e,t).map(gu):Ft(t)?((e,t,o)=>o>=0&&o<Pn(t)?e.getRangedRect(t,o,t,o+1):o>0?e.getRangedRect(t,o-1,t,o):_.none())(e,t,o).map(gu):_.none(),vu=(e,t)=>zt(t)?fu(e,t).map(gu):Ft(t)?e.getRangedRect(t,0,t,Pn(t)).map(gu):_.none(),yu=ee([{none:[]},{retry:["caret"]}]),xu=(e,t,o)=>pn(t,Pa).fold(x,(t=>vu(e,t).exists((e=>((e,t)=>e.left<t.left||Math.abs(t.right-e.left)<1||e.left>t.right)(o,e))))),wu={point:e=>e.bottom,adjuster:(e,t,o,n,r)=>{const i=hu(r,5);return Math.abs(o.bottom-n.bottom)<1||o.top>r.bottom?yu.retry(i):o.top===r.bottom?yu.retry(hu(r,1)):xu(e,t,r)?yu.retry(pu(i,5,0)):yu.none()},move:hu,gather:_a},_u=(e,t,o,n,r)=>0===r?_.some(n):((e,t,o)=>e.elementFromPoint(t,o).filter((e=>"table"===Lt(e))).isSome())(e,n.left,t.point(n))?((e,t,o,n,r)=>_u(e,t,o,t.move(n,5),r))(e,t,o,n,r-1):e.situsFromPoint(n.left,t.point(n)).bind((i=>i.start.fold(_.none,(i=>vu(e,i).bind((s=>t.adjuster(e,i,s,o,n).fold(_.none,(n=>_u(e,t,o,n,r-1))))).orThunk((()=>_.some(n)))),_.none))),Su=(e,t,o)=>{const n=e.move(o,5),r=_u(t,e,o,n,100).getOr(n);return((e,t,o)=>e.point(t)>o.getInnerHeight()?_.some(e.point(t)-o.getInnerHeight()):e.point(t)<0?_.some(-e.point(t)):_.none())(e,r,t).fold((()=>t.situsFromPoint(r.left,e.point(r))),(o=>(t.scrollBy(0,o),t.situsFromPoint(r.left,e.point(r)-o))))},Cu={tryUp:b(Su,{point:e=>e.top,adjuster:(e,t,o,n,r)=>{const i=mu(r,5);return Math.abs(o.top-n.top)<1||o.bottom<r.top?yu.retry(i):o.bottom===r.top?yu.retry(mu(r,1)):xu(e,t,r)?yu.retry(pu(i,5,0)):yu.none()},move:mu,gather:wa}),tryDown:b(Su,wu),getJumpSize:p(5)},ku=(e,t,o)=>e.getSelection().bind((n=>uu(t,n.finish,n.foffset,o).fold((()=>_.some(ua(n.finish,n.foffset))),(r=>{const i=e.fromSitus(r);return(e=>au.cata(e,(e=>_.none()),(()=>_.none()),(e=>_.some(ua(e,0))),(e=>_.some(ua(e,Pn(e))))))(au.verify(e,n.finish,n.foffset,i.finish,i.foffset,o.failure,t))})))),Eu=(e,t,o,n,r,i)=>0===i?_.none():Au(e,t,o,n,r).bind((s=>{const a=e.fromSitus(s),l=au.verify(e,o,n,a.finish,a.foffset,r.failure,t);return au.cata(l,(()=>_.none()),(()=>_.some(s)),(s=>Je(o,s)&&0===n?Tu(e,o,n,mu,r):Eu(e,t,s,0,r,i-1)),(s=>Je(o,s)&&n===Pn(s)?Tu(e,o,n,hu,r):Eu(e,t,s,Pn(s),r,i-1)))})),Tu=(e,t,o,n,r)=>bu(e,t,o).bind((t=>Ou(e,r,n(t,Cu.getJumpSize())))),Ou=(e,t,o)=>{const n=At().browser;return n.isChromium()||n.isSafari()||n.isFirefox()?t.retry(e,o):_.none()},Au=(e,t,o,n,r)=>bu(e,o,n).bind((t=>Ou(e,r,t))),Mu=(e,t)=>{return mn(e,(e=>$t(e).exists((e=>Je(e,t)))),o).isSome();var o},Pu=(e,t,o,n,r)=>vn(n,"td,th",t).bind((n=>vn(n,"table",t).bind((i=>Mu(r,i)?((e,t,o)=>ku(e,t,o).bind((n=>Eu(e,t,n.element,n.offset,o,20).map(e.fromSitus))))(e,t,o).bind((e=>vn(e.finish,"td,th",t).map((t=>({start:n,finish:t,range:e}))))):_.none())))),Du=(e,t,o,n,r,i)=>i(n,t).orThunk((()=>Pu(e,t,o,n,r).map((e=>{const t=e.range;return Xd(_.some(nu(t.start,t.soffset,t.finish,t.foffset)),!0)})))),Lu=(e,t)=>vn(e,"tr",t).bind((e=>vn(e,"table",t).bind((o=>{const n=An(o,"tr");return Je(e,n[0])?((e,t,o)=>va(xa,e,t,o))(o,(e=>Nn(e).isSome()),t).map((e=>{const t=Pn(e);return Xd(_.some(nu(e,t,e,t)),!0)})):_.none()})))),Ru=(e,t)=>vn(e,"tr",t).bind((e=>vn(e,"table",t).bind((o=>{const n=An(o,"tr");return Je(e,n[n.length-1])?((e,t,o)=>ya(xa,e,t,o))(o,(e=>Rn(e).isSome()),t).map((e=>Xd(_.some(nu(e,0,e,0)),!0))):_.none()})))),Nu=(e,t,o,n,r,i,s)=>Pu(e,o,n,r,i).bind((e=>ru(t,o,e.start,e.finish,s))),Iu=(e,t)=>vn(e,"td,th",t),Bu=e=>Wt(e).exists(Cn),zu={traverse:Yt,gather:_a,relative:Vn.before,retry:Cu.tryDown,failure:au.failedDown},Fu={traverse:Gt,gather:wa,relative:Vn.before,retry:Cu.tryUp,failure:au.failedUp},Hu=e=>t=>t===e,ju=Hu(38),Vu=Hu(40),Uu=e=>e>=37&&e<=40,Zu={isBackward:Hu(37),isForward:Hu(39)},$u={isBackward:Hu(39),isForward:Hu(37)},Wu=e=>({elementFromPoint:(t,o)=>ze.fromPoint(ze.fromDom(e.document),t,o),getRect:e=>e.dom.getBoundingClientRect(),getRangedRect:(t,o,n,r)=>{const i=Gn.exact(t,o,n,r);return ar(e,i)},getSelection:()=>sr(e).map((t=>ou(e,t))),fromSitus:t=>{const o=Gn.relative(t.start,t.finish);return ou(e,o)},situsFromPoint:(t,o)=>lr(e,t,o).map((e=>tu(e.start,e.soffset,e.finish,e.foffset))),clearSelection:()=>{(e=>{Xn(e).each((e=>e.removeAllRanges()))})(e)},collapseSelection:(t=!1)=>{sr(e).each((o=>o.fold((e=>e.collapse(t)),((o,n)=>{const r=t?o:n;or(e,r,r)}),((o,n,r,i)=>{const s=t?o:r,a=t?n:i;tr(e,s,a,s,a)}))))},setSelection:t=>{tr(e,t.start,t.soffset,t.finish,t.foffset)},setRelativeSelection:(t,o)=>{or(e,t,o)},selectNode:t=>{ir(e,t,!1)},selectContents:t=>{ir(e,t)},getInnerHeight:()=>e.innerHeight,getScrollY:()=>(e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return en(o,n)})(ze.fromDom(e.document)).top,scrollBy:(t,o)=>{((e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollBy(e,t)})(t,o,ze.fromDom(e.document))}}),qu=(e,t)=>({rows:e,cols:t}),Gu=(e,t,o,n)=>{const r=((e,t,o,n)=>{const r=ge(),i=r.clear,s=i=>{r.on((r=>{n.clearBeforeUpdate(t),Iu(i.target,o).each((s=>{Vd(r,s,o).each((o=>{const r=o.boxes.getOr([]);if(1===r.length){const e=r[0],o="false"===kn(e),s=ue(Sn(i.target),e,Je);o&&s&&n.selectRange(t,r,e,e)}else r.length>1&&(n.selectRange(t,r,o.start,o.finish),e.selectContents(s))}))}))}))};return{clearstate:i,mousedown:e=>{n.clear(t),Iu(e.target,o).filter(Bu).each(r.set)},mouseover:e=>{s(e)},mouseup:e=>{s(e),i()}}})(Wu(e),t,o,n);return{clearstate:r.clearstate,mousedown:r.mousedown,mouseover:r.mouseover,mouseup:r.mouseup}},Yu=e=>pn(e,Bt).exists(Cn),Ku=(e,t)=>Yu(e)||Yu(t),Xu=(e,t,o,n)=>{const r=Wu(e),i=()=>(n.clear(t),_.none());return{keydown:(e,s,a,l,c,d)=>{const u=e.raw,h=u.which,m=!0===u.shiftKey,p=Ud(t,n.selectedSelector).fold((()=>(Uu(h)&&!m&&n.clearBeforeUpdate(t),Uu(h)&&m&&!Ku(s,l)?_.none:Vu(h)&&m?b(Nu,r,t,o,zu,l,s,n.selectRange):ju(h)&&m?b(Nu,r,t,o,Fu,l,s,n.selectRange):Vu(h)?b(Du,r,o,zu,l,s,Ru):ju(h)?b(Du,r,o,Fu,l,s,Lu):_.none)),(e=>{const o=o=>()=>{const i=Z(o,(o=>((e,t,o,n,r)=>$d(n,e,t,r.firstSelectedSelector,r.lastSelectedSelector).map((e=>(r.clearBeforeUpdate(o),r.selectRange(o,e.boxes,e.start,e.finish),e.boxes))))(o.rows,o.cols,t,e,n)));return i.fold((()=>Zd(t,n.firstSelectedSelector,n.lastSelectedSelector).map((e=>{const o=Vu(h)||d.isForward(h)?Vn.after:Vn.before;return r.setRelativeSelection(Vn.on(e.first,0),o(e.table)),n.clear(t),Xd(_.none(),!0)}))),(e=>_.some(Xd(_.none(),!0))))};return Uu(h)&&m&&!Ku(s,l)?_.none:Vu(h)&&m?o([qu(1,0)]):ju(h)&&m?o([qu(-1,0)]):d.isBackward(h)&&m?o([qu(0,-1),qu(-1,0)]):d.isForward(h)&&m?o([qu(0,1),qu(1,0)]):Uu(h)&&!m?i:_.none}));return p()},keyup:(e,r,i,s,a)=>Ud(t,n.selectedSelector).fold((()=>{const l=e.raw,c=l.which;return!0===l.shiftKey&&Uu(c)&&Ku(r,s)?((e,t,o,n,r,i,s)=>Je(o,r)&&n===i?_.none():vn(o,"td,th",t).bind((o=>vn(r,"td,th",t).bind((n=>ru(e,t,o,n,s))))))(t,o,r,i,s,a,n.selectRange):_.none()}),_.none)}},Ju=(e,t,o)=>{const n=t=>{_o(t,e.selected),_o(t,e.firstSelected),_o(t,e.lastSelected)},r=t=>{vo(t,e.selected,"1")},i=e=>{s(e),o()},s=t=>{const o=An(t,`${e.selectedSelector},${e.firstSelectedSelector},${e.lastSelectedSelector}`);M(o,n)};return{clearBeforeUpdate:s,clear:i,selectRange:(o,n,s,a)=>{i(o),M(n,r),vo(s,e.firstSelected,"1"),vo(a,e.lastSelected,"1"),t(n,s,a)},selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}},Qu="data-mce-selected",eh="data-mce-first-selected",th="data-mce-last-selected",oh="["+Qu+"]",nh={selected:Qu,selectedSelector:"td["+Qu+"],th["+Qu+"]",firstSelected:eh,firstSelectedSelector:"td["+eh+"],th["+eh+"]",lastSelected:th,lastSelectedSelector:"td["+th+"],th["+th+"]"},rh=(e,t,o)=>({element:o,mergable:Kd(t,e,nh),unmergable:Yd(e),selection:Gd(e)}),ih=e=>(t,o)=>{const n=Lt(t),r="col"===n||"colgroup"===n?Mr(i=t).bind((e=>Wd(e,nh.firstSelectedSelector))).fold(p(i),(e=>e[0])):t;var i;return vn(r,e,o)},sh=ih("th,td,caption"),ah=ih("th,td"),lh=e=>{return t=e.model.table.getSelectedCells(),A(t,ze.fromDom);var t},ch=(e,t)=>{const o=e.getDoc(),n=eo(ze.fromDom(e.getBody())),r=ze.fromTag("div",o);vo(r,"data-mce-bogus","all"),No(r,{position:"fixed",left:"-9999999px",top:"0",overflow:"hidden",opacity:"0"});const i=(e=>Qt(e)?e:ze.fromDom(Zt(e).dom.body))(n);fo(r,t),mo(i,r);const s=r.dom.innerText;return ko(r),s},dh=(e,t)=>{e.on("BeforeGetContent",(t=>{const o=o=>{t.preventDefault(),(e=>Mr(e[0]).map((e=>{const t=Ms(e,oh);return Ld(t),[t]})))(o).each((o=>{const n="text"===t.format?ch(e,o):((e,t)=>A(t,(t=>e.selection.serializer.serialize(t.dom,{}))).join(""))(e,o);t.content=n}))};if(!0===t.selection){const t=(e=>D(lh(e),(e=>Ye(e,nh.selectedSelector))))(e);t.length>=1&&o(t)}})),e.on("BeforeSetContent",(o=>{if(!0===o.selection&&!0===o.paste){const n=lh(e);V(n).each((n=>{Mr(n).each((r=>{const i=D(((e,t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,Kt(ze.fromDom(o))})(o.content),(e=>"meta"!==Lt(e))),s=Vt("table");if(Td(e)&&1===i.length&&s(i[0])){o.preventDefault();const s=ze.fromDom(e.getDoc()),a=Ga(s),l=((e,t,o)=>({element:e,clipboard:t,generators:o}))(n,i[0],a);t.pasteCells(r,l).each((()=>{e.focus()}))}}))}))}}))},uh=(e,t)=>e.dispatch("NewRow",{node:t}),hh=(e,t)=>e.dispatch("NewCell",{node:t}),mh=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})},ph={structure:!1,style:!0},gh={structure:!0,style:!1},fh={structure:!0,style:!0},bh=(e,t)=>_d(e)?Qi(t):Sd(e)?Ji(t):Xi(t),vh=(e,t,o)=>{const n=e=>"table"===Lt(Pd(e)),r=fd(e),i=xd(e)?m:Cs,s=t=>{switch(bd(e)){case"section":return ei();case"sectionCells":return ti();case"cells":return oi();default:return Qr(t,"section")}},a=(t,n)=>n.cursor.fold((()=>{const n=Or(t);return V(n).filter(Do).map((n=>{o.clearSelectedCells(t.dom);const r=e.dom.createRng();return r.selectNode(n.dom),e.selection.setRng(r),vo(n,"data-mce-selected","1"),r}))}),(n=>{const r=ga(fa,n);const i=e.dom.createRng();return i.setStart(r.element.dom,r.offset),i.setEnd(r.element.dom,r.offset),e.selection.setRng(i),o.clearSelectedCells(t.dom),_.some(i)})),l=(o,n,i,l)=>(c,d,u=!1)=>{Ld(c);const h=ze.fromDom(e.getDoc()),m=qa(i,h,r),p={sizing:bh(e,c),resize:xd(e)?br():vr(),section:s(c)};return n(c)?o(c,d,m,p).bind((o=>{t.refresh(c.dom),M(o.newRows,(t=>{uh(e,t.dom)})),M(o.newCells,(t=>{hh(e,t.dom)}));const n=a(c,o);return Do(c)&&(Ld(c),u||mh(e,c.dom,l)),n.map((e=>({rng:e,effect:l})))})):_.none()},c=l(cc,(t=>!n(e)||Ya(t).rows>1),m,gh),d=l(lc,(t=>!n(e)||Ya(t).columns>1),m,gh);return{deleteRow:c,deleteColumn:d,insertRowsBefore:l(rc,w,m,gh),insertRowsAfter:l(ic,w,m,gh),insertColumnsBefore:l(sc,w,i,gh),insertColumnsAfter:l(ac,w,i,gh),mergeCells:l(bc,w,m,gh),unmergeCells:l(vc,w,m,gh),pasteColsBefore:l(xc,w,m,gh),pasteColsAfter:l(wc,w,m,gh),pasteRowsBefore:l(_c,w,m,gh),pasteRowsAfter:l(Sc,w,m,gh),pasteCells:l(yc,w,m,fh),makeCellsHeader:l(gc,w,m,gh),unmakeCellsHeader:l(fc,w,m,gh),makeColumnsHeader:l(dc,w,m,gh),unmakeColumnsHeader:l(uc,w,m,gh),makeRowsHeader:l(hc,w,m,gh),makeRowsBody:l(mc,w,m,gh),makeRowsFooter:l(pc,w,m,gh),getTableRowType:Ec,getTableCellType:kc,getTableColType:Cc}},yh=(e,t)=>{e.selection.select(t.dom,!0),e.selection.collapse(!0)},xh=(e,t,o,n,i)=>{const s=Ad(e),a={styles:s,attributes:Od(e),colGroups:Md(e)};return e.undoManager.ignore((()=>{const r=((e,t,o,n,r,i=Bc)=>{const s=ze.fromTag("table"),a="cells"!==r;No(s,i.styles),yo(s,i.attributes),i.colGroups&&mo(s,zc(t));const l=Math.min(e,o);if(a&&o>0){const e=ze.fromTag("thead");mo(s,e);const i=Fc(o,t,"sectionCells"===r?l:0,n);fo(e,i)}const c=ze.fromTag("tbody");mo(s,c);const d=Fc(a?e-l:e,t,a?0:o,n);return fo(c,d),s})(o,t,i,n,bd(e),a);vo(r,"data-mce-id","__mce");const s=(e=>{const t=ze.fromTag("div"),o=ze.fromDom(e.dom.cloneNode(!0));return mo(t,o),(e=>e.dom.innerHTML)(t)})(r);e.insertContent(s),e.addVisual()})),bn(Pd(e),'table[data-mce-id="__mce"]').map((t=>(Sd(e)?Ba(t):Cd(e)?Fa(t):(_d(e)||(e=>r(e)&&-1!==e.indexOf("%"))(s.width))&&Ia(t),Ld(t),_o(t,"data-mce-id"),((e,t)=>{M(An(t,"tr"),(t=>{uh(e,t.dom),M(An(t,"th,td"),(t=>{hh(e,t.dom)}))}))})(e,t),((e,t)=>{bn(t,"td,th").each(b(yh,e))})(e,t),t.dom))).getOrNull()};var wh=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const _h="x-tinymce/dom-table-",Sh=_h+"rows",Ch=_h+"columns",kh=e=>{const t=wh.FakeClipboardItem(e);wh.write([t])},Eh=e=>{var t;const o=null!==(t=wh.read())&&void 0!==t?t:[];return Z(o,(t=>_.from(t.getType(e))))},Th=e=>{Eh(e).isSome()&&wh.clear()},Oh=e=>{e.fold(Mh,(e=>kh({[Sh]:e})))},Ah=()=>Eh(Sh),Mh=()=>Th(Sh),Ph=e=>{e.fold(Lh,(e=>kh({[Ch]:e})))},Dh=()=>Eh(Ch),Lh=()=>Th(Ch),Rh=e=>sh(Rd(e),Dd(e)).filter(Hd),Nh=(e,t)=>{const o=Dd(e),n=e=>Mr(e,o),s=t=>(e=>ah(Rd(e),Dd(e)).filter(Hd))(e).bind((e=>n(e).map((o=>t(o,e))))),a=t=>{e.focus()},l=(t,o=!1)=>s(((n,r)=>{const i=rh(lh(e),n,r);t(n,i,o).each(a)})),c=()=>s(((t,o)=>{const n=rh(lh(e),t,o),r=qa(m,ze.fromDom(e.getDoc()),_.none());return Os(t,n,r)})),d=()=>s(((t,o)=>{const n=rh(lh(e),t,o);return Ts(t,n)})),u=(t,o)=>o().each((o=>{const n=A(o,(e=>Ao(e)));s(((o,r)=>{const i=Ga(ze.fromDom(e.getDoc())),s=((e,t,o,n)=>({selection:Gd(e),clipboard:o,generators:n}))(lh(e),0,n,i);t(o,s).each(a)}))})),p=e=>(t,o)=>((e,t)=>Q(e,t)?_.from(e[t]):_.none())(o,"type").each((t=>{l(e(t),o.no_events)}));q({mceTableSplitCells:()=>l(t.unmergeCells),mceTableMergeCells:()=>l(t.mergeCells),mceTableInsertRowBefore:()=>l(t.insertRowsBefore),mceTableInsertRowAfter:()=>l(t.insertRowsAfter),mceTableInsertColBefore:()=>l(t.insertColumnsBefore),mceTableInsertColAfter:()=>l(t.insertColumnsAfter),mceTableDeleteCol:()=>l(t.deleteColumn),mceTableDeleteRow:()=>l(t.deleteRow),mceTableCutCol:()=>d().each((e=>{Ph(e),l(t.deleteColumn)})),mceTableCutRow:()=>c().each((e=>{Oh(e),l(t.deleteRow)})),mceTableCopyCol:()=>d().each((e=>Ph(e))),mceTableCopyRow:()=>c().each((e=>Oh(e))),mceTablePasteColBefore:()=>u(t.pasteColsBefore,Dh),mceTablePasteColAfter:()=>u(t.pasteColsAfter,Dh),mceTablePasteRowBefore:()=>u(t.pasteRowsBefore,Ah),mceTablePasteRowAfter:()=>u(t.pasteRowsAfter,Ah),mceTableDelete:()=>Rh(e).each((t=>{Mr(t,o).filter(v(o)).each((t=>{const o=ze.fromText("");if(uo(t,o),ko(t),e.dom.isEmpty(e.getBody()))e.setContent(""),e.selection.setCursorLocation();else{const t=e.dom.createRng();t.setStart(o.dom,0),t.setEnd(o.dom,0),e.selection.setRng(t),e.nodeChanged()}}))})),mceTableCellToggleClass:(t,o)=>{s((t=>{const n=lh(e),r=F(n,(t=>e.formatter.match("tablecellclass",{value:o},t.dom))),i=r?e.formatter.remove:e.formatter.apply;M(n,(e=>i("tablecellclass",{value:o},e.dom))),mh(e,t.dom,ph)}))},mceTableToggleClass:(t,o)=>{s((t=>{e.formatter.toggle("tableclass",{value:o},t.dom),mh(e,t.dom,ph)}))},mceTableToggleCaption:()=>{Rh(e).each((t=>{Mr(t,o).each((o=>{fn(o,"caption").fold((()=>{const t=ze.fromTag("caption");mo(t,ze.fromText("Caption")),((e,t,o)=>{Xt(e,o).fold((()=>{mo(e,t)}),(e=>{co(e,t)}))})(o,t,0),e.selection.setCursorLocation(t.dom,0)}),(n=>{Vt("caption")(t)&&Xe("td",o).each((t=>e.selection.setCursorLocation(t.dom,0))),ko(n)})),mh(e,o.dom,gh)}))}))},mceTableSizingMode:(t,n)=>(t=>Rh(e).each((n=>{Cd(e)||Sd(e)||_d(e)||Mr(n,o).each((o=>{"relative"!==t||Xs(o)?"fixed"!==t||Js(o)?"responsive"!==t||Qs(o)||Fa(o):Ba(o):Ia(o),Ld(o),mh(e,o.dom,gh)}))})))(n),mceTableCellType:p((e=>"th"===e?t.makeCellsHeader:t.unmakeCellsHeader)),mceTableColType:p((e=>"th"===e?t.makeColumnsHeader:t.unmakeColumnsHeader)),mceTableRowType:p((e=>{switch(e){case"header":return t.makeRowsHeader;case"footer":return t.makeRowsFooter;default:return t.makeRowsBody}}))},((t,o)=>e.addCommand(o,t))),e.addCommand("mceInsertTable",((t,o)=>{((e,t,o,n={})=>{const r=e=>h(e)&&e>0;if(r(t)&&r(o)){const r=n.headerRows||0,i=n.headerColumns||0;return xh(e,o,t,i,r)}console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table.")})(e,o.rows,o.columns,o.options)})),e.addCommand("mceTableApplyCellStyle",((t,o)=>{const s=e=>"tablecell"+e.toLowerCase().replace("-","");if(!i(o))return;const a=D(lh(e),Hd);if(0===a.length)return;const l=K(o,((t,o)=>e.formatter.has(s(o))&&r(t)));(e=>{for(const t in e)if(W.call(e,t))return!1;return!0})(l)||(q(l,((t,o)=>{const n=s(o);M(a,(o=>{""===t?e.formatter.remove(n,{value:null},o.dom,!0):e.formatter.apply(n,{value:t},o.dom)}))})),n(a[0]).each((t=>mh(e,t.dom,ph))))}))},Ih=e=>!_n(ze.fromDom(e.target),"ephox-snooker-resizer-bar"),Bh=(e,t)=>{const o=((e,t,o)=>({get:()=>Wd(e(),o).fold((()=>t().fold(Jd,eu)),Qd)}))((()=>ze.fromDom(e.getBody())),(()=>ah(Rd(e),Dd(e))),nh.selectedSelector),n=Ju(nh,((t,o,n)=>{Mr(o).each((r=>{const i=A(t,(e=>e.dom)),s=fd(e),a=qa(m,ze.fromDom(e.getDoc()),s),l=lh(e),c=Fs(r,{selection:l},a).map((e=>G(e,(e=>A(e,(e=>e.dom)))))).getOrUndefined();((e,t,o,n,r)=>{e.dispatch("TableSelectionChange",{cells:t,start:o,finish:n,otherCells:r})})(e,i,o.dom,n.dom,c)}))}),(()=>(e=>{e.dispatch("TableSelectionClear")})(e)));e.on("init",(o=>{const r=e.getWin(),i=Pd(e),s=Dd(e),a=Gu(r,i,s,n),l=Xu(r,i,s,n),c=((e,t,o,n)=>{const r=Wu(e);return(e,i)=>{n.clearBeforeUpdate(t),Vd(e,i,o).each((e=>{const o=e.boxes.getOr([]);n.selectRange(t,o,e.start,e.finish),r.selectContents(i),r.collapseSelection()}))}})(r,i,s,n);e.on("TableSelectorChange",(e=>c(e.start,e.finish)));const d=(t,o)=>{(e=>!0===e.raw.shiftKey)(t)&&(o.kill&&t.kill(),o.selection.each((t=>{const o=Gn.relative(t.start,t.finish),n=Ge(r,o);e.selection.setRng(n)})))},u=e=>0===e.button,h=(()=>{const e=te(ze.fromDom(i)),t=te(0);return{touchEnd:o=>{const n=ze.fromDom(o.target);if(Vt("td")(n)||Vt("th")(n)){const r=e.get(),i=t.get();Je(r,n)&&o.timeStamp-i<300&&(o.preventDefault(),c(n,n))}e.set(n),t.set(o.timeStamp)}}})();e.on("dragstart",(e=>{a.clearstate()})),e.on("mousedown",(e=>{u(e)&&Ih(e)&&a.mousedown(lo(e))})),e.on("mouseover",(e=>{var t;void 0!==(t=e).buttons&&0==(1&t.buttons)||!Ih(e)||a.mouseover(lo(e))})),e.on("mouseup",(e=>{u(e)&&Ih(e)&&a.mouseup(lo(e))})),e.on("touchend",h.touchEnd),e.on("keyup",(t=>{const o=lo(t);if(o.raw.shiftKey&&Uu(o.raw.which)){const t=e.selection.getRng(),n=ze.fromDom(t.startContainer),r=ze.fromDom(t.endContainer);l.keyup(o,n,t.startOffset,r,t.endOffset).each((e=>{d(o,e)}))}})),e.on("keydown",(o=>{const n=lo(o);t.hide();const r=e.selection.getRng(),i=ze.fromDom(r.startContainer),s=ze.fromDom(r.endContainer),a=cn(Zu,$u)(ze.fromDom(e.selection.getStart()));l.keydown(n,i,r.startOffset,s,r.endOffset,a).each((e=>{d(n,e)})),t.show()})),e.on("NodeChange",(()=>{const t=e.selection,o=ze.fromDom(t.getStart()),r=ze.fromDom(t.getEnd());Aa(Mr,[o,r]).fold((()=>n.clear(i)),m)}))})),e.on("PreInit",(()=>{e.serializer.addTempAttr(nh.firstSelected),e.serializer.addTempAttr(nh.lastSelected)}));return{getSelectedCells:()=>((e,t,o,n)=>{switch(e.tag){case"none":return t();case"single":return n(e.element);case"multiple":return o(e.elements)}})(o.get(),p([]),(e=>A(e,(e=>e.dom))),(e=>[e.dom])),clearSelectedCells:e=>n.clear(ze.fromDom(e))}},zh=e=>d(e)&&"TABLE"===e.nodeName,Fh="bar-",Hh=e=>"false"!==xo(e,"data-mce-resize"),jh=e=>{return ve(t=e,o="corner-")?((e,t)=>e.substring(t))(t,o.length):t;var t,o},Vh=e=>{const t=ge(),o=ge(),n=ge();let r,i,s,a;const l=t=>bh(e,t),c=()=>yd(e)?vr():br(),d=(t,o,n,d)=>{const u=jh(o),h=ye(u,"e"),m=ve(u,"n");if(""===i&&Ia(t),""===a&&za(t),n!==r&&""!==i){Ro(t,"width",i);const o=c(),s=l(t),a=yd(e)||h?(e=>Ya(e).columns)(t)-1:0;_s(t,n-r,a,o,s)}else if((e=>/^(\d+(\.\d+)?)%$/.test(e))(i)){const e=parseFloat(i.replace("%",""));Ro(t,"width",n*e/r+"%")}if((e=>/^(\d+(\.\d+)?)px$/.test(e))(i)&&(e=>{const t=qr.fromTable(e);qr.hasColumns(t)||M(Or(e),(e=>{const t=Io(e,"width");Ro(e,"width",t),_o(e,"width")}))})(t),d!==s&&""!==a){Ro(t,"height",a);const e=m?0:(e=>Ya(e).rows)(t)-1;Ss(t,d-s,e)}};e.on("init",(()=>{const r=((e,t)=>{const o=ze.fromDom(e.getBody());return Hs(o,t)})(e,Hh);if(n.set(r),(e=>{const t=e.options.get("object_resizing");return E(t.split(","),"table")})(e)&&kd(e)){const n=c(),i=hd(r,n,l);e.mode.isReadOnly()||i.on(),i.events.startDrag.bind((o=>{t.set(e.selection.getRng())})),i.events.beforeResize.bind((t=>{const o=t.table.dom;((e,t,o,n,r)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:n,origin:r})})(e,o,Nd(o),Id(o),Fh+t.type)})),i.events.afterResize.bind((o=>{const n=o.table,r=n.dom;Ld(n),t.on((t=>{e.selection.setRng(t),e.focus()})),((e,t,o,n,r)=>{e.dispatch("ObjectResized",{target:t,width:o,height:n,origin:r})})(e,r,Nd(r),Id(r),Fh+o.type),e.undoManager.add()})),o.set(i)}})),e.on("ObjectResizeStart",(t=>{const o=t.target;if(zh(o)&&!e.mode.isReadOnly()){const n=ze.fromDom(o);M(e.dom.select(".mce-clonedresizable"),(t=>{e.dom.addClass(t,"mce-"+vd(e)+"-columns")})),!Js(n)&&Sd(e)?Ba(n):!Xs(n)&&_d(e)&&Ia(n),Qs(n)&&ve(t.origin,Fh)&&Ia(n),r=t.width,i=Cd(e)?"":zd(e,o).getOr(""),s=t.height,a=Fd(e,o).getOr("")}})),e.on("ObjectResized",(t=>{const o=t.target;if(zh(o)){const n=ze.fromDom(o),r=t.origin;(e=>ve(e,"corner-"))(r)&&d(n,r,t.width,t.height),Ld(n),mh(e,n.dom,ph)}}));const u=()=>{o.on((e=>{e.on(),e.showBars()}))},h=()=>{o.on((e=>{e.off(),e.hideBars()}))};e.on("DisabledStateChange",(e=>{e.state?h():u()})),e.on("SwitchMode",(()=>{e.mode.isReadOnly()?h():u()})),e.on("dragstart dragend",(e=>{"dragstart"===e.type?h():u()})),e.on("remove",(()=>{o.on((e=>{e.destroy()}))}));return{refresh:e=>{o.on((t=>t.refreshBars(ze.fromDom(e))))},hide:()=>{o.on((e=>e.hideBars()))},show:()=>{o.on((e=>e.showBars()))}}},Uh=e=>{(e=>{const t=e.options.register;t("table_clone_elements",{processor:"string[]"}),t("table_use_colgroups",{processor:"boolean",default:!0}),t("table_header_type",{processor:e=>{const t=E(["section","cells","sectionCells","auto"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: section, cells, sectionCells or auto."}},default:"section"}),t("table_sizing_mode",{processor:"string",default:"auto"}),t("table_default_attributes",{processor:"object",default:{border:"1"}}),t("table_default_styles",{processor:"object",default:{"border-collapse":"collapse"}}),t("table_column_resizing",{processor:e=>{const t=E(["preservetable","resizetable"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be preservetable, or resizetable."}},default:"preservetable"}),t("table_resize_bars",{processor:"boolean",default:!0}),t("table_style_by_css",{processor:"boolean",default:!0}),t("table_merge_content_on_paste",{processor:"boolean",default:!0})})(e);const t=Vh(e),o=Bh(e,t),n=vh(e,t,o);return Nh(e,n),((e,t)=>{const o=Dd(e),n=t=>ah(Rd(e)).bind((n=>Mr(n,o).map((o=>{const r=rh(lh(e),o,n);return t(o,r)})))).getOr("");q({mceTableRowType:()=>n(t.getTableRowType),mceTableCellType:()=>n(t.getTableCellType),mceTableColType:()=>n(t.getTableColType)},((t,o)=>e.addQueryValueHandler(o,t)))})(e,n),dh(e,n),{getSelectedCells:o.getSelectedCells,clearSelectedCells:o.clearSelectedCells}},Zh=e=>({table:Uh(e)});e.add("dom",Zh)}()},88190:(e,t,o)=>{o(7440)},7440:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");e.add("code",(e=>((e=>{e.addCommand("mceCodeEditor",(()=>{(e=>{const t=(e=>e.getContent({source_view:!0}))(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:t},onSubmit:t=>{((e,t)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(t)})),e.selection.setCursorLocation(),e.nodeChanged()})(e,t.getData().code),t.close()}})})(e)}))})(e),(e=>{const t=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:t}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:t})})(e),{})))}()},72170:(e,t,o)=>{o(53302)},53302:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,o=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&o(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,r=e=>t=>typeof t===e,i=n("string"),s=n("object"),a=e=>((e,n)=>s(e)&&o(e,n,((e,o)=>t(e)===o)))(e,Object),l=n("array"),c=(d=null,e=>d===e);var d;const u=r("boolean"),h=e=>!(e=>null==e)(e),m=r("function"),p=r("number"),g=()=>{};class f{constructor(e,t){this.tag=e,this.value=t}static some(e){return new f(!0,e)}static none(){return f.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?f.some(e(this.value)):f.none()}bind(e){return this.tag?e(this.value):f.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:f.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return h(e)?f.some(e):f.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}f.singletonNone=new f(!1);Array.prototype.slice;const b=Array.prototype.push,v=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!l(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);b.apply(t,e[o])}return t},y=e=>((e,t)=>t>=0&&t<e.length?f.some(e[t]):f.none())(e,0);m(Array.from)&&Array.from;const x=Object.keys,w=Object.hasOwnProperty,_=(e,t,o,n)=>{((e,t)=>{const o=x(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))},S=(e,t)=>w.call(e,t),C=(k=(e,t)=>a(e)&&a(t)?C(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let o=0;o<e.length;o++){const n=e[o];for(const e in n)S(n,e)&&(t[e]=k(t[e],n[e]))}return t});var k;const E=e=>e.length>0,T=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},O={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return T(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return T(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return T(o)},fromDom:T,fromPoint:(e,t,o)=>f.from(e.dom.elementFromPoint(t,o)).map(T)},A=(e,t,o)=>{((e,t,o)=>{if(!(i(o)||u(o)||p(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)};var M=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),P=tinymce.util.Tools.resolve("tinymce.util.URI");const D=e=>t=>t.options.get(e),L=e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||i(e)||((e,t)=>{if(l(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1})(e,s)||m(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})},R=D("image_dimensions"),N=D("image_advtab"),I=D("image_uploadtab"),B=D("image_prepend_url"),z=D("image_class_list"),F=D("image_description"),H=D("image_title"),j=D("image_caption"),V=D("image_list"),U=D("a11y_advanced_options"),Z=D("automatic_uploads"),$=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),W=e=>(e&&(e=e.replace(/px$/,"")),e),q=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),G=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),Y=(e,t)=>{const o=e.options.get;return P.isDomSafe(t,"img",{allow_html_data_urls:o("allow_html_data_urls"),allow_script_urls:o("allow_script_urls"),allow_svg_data_urls:o("allow_svg_data_urls")})},K=M.DOM,X=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?W(e.style.marginLeft):"",J=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?W(e.style.marginTop):"",Q=e=>e.style.borderWidth?W(e.style.borderWidth):"",ee=(e,t)=>{var o;return e.hasAttribute(t)&&null!==(o=e.getAttribute(t))&&void 0!==o?o:""},te=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,oe=(e,t,o)=>{""===o||null===o?e.removeAttribute(t):e.setAttribute(t,o)},ne=e=>{te(e)?(e=>{const t=e.parentNode;h(t)&&(K.insertAfter(e,t),K.remove(t))})(e):(e=>{const t=K.create("figure",{class:"image"});K.insertAfter(t,e),t.appendChild(e),t.appendChild(K.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)},re=(e,t)=>{const o=e.getAttribute("style"),n=t(null!==o?o:"");n.length>0?(e.setAttribute("style",n),e.setAttribute("data-mce-style",n)):e.removeAttribute("style")},ie=(e,t)=>(e,o,n)=>{const r=e.style;r[o]?(r[o]=q(n),re(e,t)):oe(e,o,n)},se=(e,t)=>e.style[t]?W(e.style[t]):ee(e,t),ae=(e,t)=>{const o=q(t);e.style.marginLeft=o,e.style.marginRight=o},le=(e,t)=>{const o=q(t);e.style.marginTop=o,e.style.marginBottom=o},ce=(e,t)=>{const o=q(t);e.style.borderWidth=o},de=(e,t)=>{e.style.borderStyle=t},ue=e=>{var t;return null!==(t=e.style.borderStyle)&&void 0!==t?t:""},he=e=>h(e)&&"FIGURE"===e.nodeName,me=e=>0===K.getAttrib(e,"alt").length&&"presentation"===K.getAttrib(e,"role"),pe=e=>me(e)?"":ee(e,"alt"),ge=(e,t)=>{var o;const n=document.createElement("img");return oe(n,"style",t.style),(X(n)||""!==t.hspace)&&ae(n,t.hspace),(J(n)||""!==t.vspace)&&le(n,t.vspace),(Q(n)||""!==t.border)&&ce(n,t.border),(ue(n)||""!==t.borderStyle)&&de(n,t.borderStyle),e(null!==(o=n.getAttribute("style"))&&void 0!==o?o:"")},fe=(e,t)=>({src:ee(t,"src"),alt:pe(t),title:ee(t,"title"),width:se(t,"width"),height:se(t,"height"),class:ee(t,"class"),style:e(ee(t,"style")),caption:te(t),hspace:X(t),vspace:J(t),border:Q(t),borderStyle:ue(t),isDecorative:me(t)}),be=(e,t,o,n,r)=>{o[n]!==t[n]&&r(e,n,String(o[n]))},ve=(e,t,o)=>{if(o){K.setAttrib(e,"role","presentation");const t=O.fromDom(e);A(t,"alt","")}else{if(c(t)){const t=O.fromDom(e);n="alt",t.dom.removeAttribute(n)}else{const o=O.fromDom(e);A(o,"alt",t)}"presentation"===K.getAttrib(e,"role")&&K.setAttrib(e,"role","")}var n},ye=(e,t)=>(o,n,r)=>{e(o,r),re(o,t)},xe=(e,t,o)=>{const n=fe(e,o);be(o,n,t,"caption",((e,t,o)=>ne(e))),be(o,n,t,"src",oe),be(o,n,t,"title",oe),be(o,n,t,"width",ie(0,e)),be(o,n,t,"height",ie(0,e)),be(o,n,t,"class",oe),be(o,n,t,"style",ye(((e,t)=>oe(e,"style",t)),e)),be(o,n,t,"hspace",ye(ae,e)),be(o,n,t,"vspace",ye(le,e)),be(o,n,t,"border",ye(ce,e)),be(o,n,t,"borderStyle",ye(de,e)),((e,t,o)=>{o.alt===t.alt&&o.isDecorative===t.isDecorative||ve(e,o.alt,o.isDecorative)})(o,n,t)},we=(e,t)=>{const o=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),n=e.dom.styles.parse(e.dom.styles.serialize(o));return e.dom.styles.serialize(n)},_e=e=>{const t=e.selection.getNode(),o=e.dom.getParent(t,"figure.image");return o?e.dom.select("img",o)[0]:t&&("IMG"!==t.nodeName||G(t))?null:t},Se=(e,t)=>{var o;const n=e.dom,r=((e,t)=>{const o={};var n;return _(e,t,(n=o,(e,t)=>{n[t]=e}),g),o})(e.schema.getTextBlockElements(),((t,o)=>!e.schema.isValidChild(o,"figure"))),i=n.getParent(t.parentNode,(e=>{return t=r,o=e.nodeName,S(t,o)&&void 0!==t[o]&&null!==t[o];var t,o}),e.getBody());return i&&null!==(o=n.split(i,t))&&void 0!==o?o:t},Ce=(e,t)=>{const o=((e,t)=>{const o=document.createElement("img");if(xe(e,{...t,caption:!1},o),ve(o,t.alt,t.isDecorative),t.caption){const e=K.create("figure",{class:"image"});return e.appendChild(o),e.appendChild(K.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return o})((t=>we(e,t)),t);e.dom.setAttrib(o,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(o.outerHTML);const n=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(n,"data-mce-id",null),he(n)){const t=Se(e,n);e.selection.select(t)}else e.selection.select(n)},ke=(e,t)=>{const o=_e(e);if(o)if(xe((t=>we(e,t)),t,o),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,o),he(o.parentNode)){e.dom.setStyle(o,"float","");const t=o.parentNode;Se(e,t),e.selection.select(o.parentNode)}else e.selection.select(o),((e,t,o)=>{const n=()=>{o.onload=o.onerror=null,e.selection&&(e.selection.select(o),e.nodeChanged())};o.onload=()=>{t.width||t.height||!R(e)||e.dom.setAttribs(o,{width:String(o.clientWidth),height:String(o.clientHeight)}),n()},o.onerror=n})(e,t,o)},Ee=(e,t)=>{const o=_e(e);if(o){const n={...fe((t=>we(e,t)),o),...t},r=((e,t)=>{const o=t.src;return{...t,src:Y(e,o)?o:""}})(e,n);n.src?ke(e,r):((e,t)=>{if(t){const o=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(o),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,o)}else t.src&&Ce(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})};var Te=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),Oe=tinymce.util.Tools.resolve("tinymce.util.Tools");const Ae=e=>i(e.value)?e.value:"",Me=(e,t)=>{const o=[];return Oe.each(e,(e=>{const n=(e=>i(e.text)?e.text:i(e.title)?e.title:"")(e);if(void 0!==e.menu){const r=Me(e.menu,t);o.push({text:n,items:r})}else{const r=t(e);o.push({text:n,value:r})}})),o},Pe=(e=Ae)=>t=>t?f.from(t).map((t=>Me(t,e))):f.none(),De=(e,t)=>((e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return f.none()})(e,(e=>(e=>S(e,"items"))(e)?De(e.items,t):e.value===t?f.some(e):f.none())),Le=Pe,Re=e=>Pe(Ae)(e),Ne=(e,t)=>e.bind((e=>De(e,t))),Ie=e=>({title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}),Be=e=>{const t=Le((t=>e.convertURL(t.value||t.url||"","src"))),o=new Promise((o=>{((e,t)=>{const o=V(e);i(o)?fetch(o).then((e=>{e.ok&&e.json().then(t)})):m(o)?o(t):t(o)})(e,(e=>{o(t(e).map((e=>v([[{text:"None",value:""}],e]))))}))})),n=Re(z(e)),r=N(e),s=I(e),a=(e=>E(e.options.get("images_upload_url")))(e),l=(e=>h(e.options.get("images_upload_handler")))(e),c=(e=>{const t=_e(e);return t?fe((t=>we(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),d=F(e),u=H(e),p=R(e),g=j(e),b=U(e),y=Z(e),x=f.some(B(e)).filter((e=>i(e)&&e.length>0));return o.then((e=>({image:c,imageList:e,classList:n,hasAdvTab:r,hasUploadTab:s,hasUploadUrl:a,hasUploadHandler:l,hasDescription:d,hasImageTitle:u,hasDimensions:p,hasImageCaption:g,prependURL:x,hasAccessibilityOptions:b,automaticUploads:y})))},ze=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),o={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},n=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return v([[{name:"src",type:"urlinput",filetype:"image",label:"Source",picker_text:"Browse files"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[o]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(r=e.classList.isSome()&&e.hasImageCaption,r?{type:"grid",columns:2}:{type:"panel"}),items:v([n.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var r},Fe=e=>({title:"General",name:"general",items:ze(e)}),He=ze,je=e=>({title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}),Ve=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),Ue=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),Ze=(e,t)=>{const o=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?f.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?f.some(e+t):f.none())))(e,o.src.value).each((e=>{t.setData({src:{value:e,meta:o.src.meta}})}))},$e=(e,t)=>{const o=t.getData(),n=o.src.meta;if(void 0!==n){const r=C({},o);((e,t,o)=>{e.hasDescription&&i(o.alt)&&(t.alt=o.alt),e.hasAccessibilityOptions&&(t.isDecorative=o.isDecorative||t.isDecorative||!1),e.hasImageTitle&&i(o.title)&&(t.title=o.title),e.hasDimensions&&(i(o.width)&&(t.dimensions.width=o.width),i(o.height)&&(t.dimensions.height=o.height)),i(o.class)&&Ne(e.classList,o.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&u(o.caption)&&(t.caption=o.caption),e.hasAdvTab&&(i(o.style)&&(t.style=o.style),i(o.vspace)&&(t.vspace=o.vspace),i(o.border)&&(t.border=o.border),i(o.hspace)&&(t.hspace=o.hspace),i(o.borderstyle)&&(t.borderstyle=o.borderstyle))})(e,r,n),t.setData(r)}},We=(e,t,o,n)=>{Ze(t,n),$e(t,n),((e,t,o,n)=>{const r=n.getData(),i=r.src.value,s=r.src.meta||{};s.width||s.height||!t.hasDimensions||(E(i)?e.imageSize(i).then((e=>{o.open&&n.setData({dimensions:e})})).catch((e=>console.error(e))):n.setData({dimensions:{width:"",height:""}}))})(e,t,o,n),((e,t,o)=>{const n=o.getData(),r=Ne(e.imageList,n.src.value);t.prevImage=r,o.setData({images:r.map((e=>e.value)).getOr("")})})(t,o,n)},qe=(e,t,o,n)=>{const r=n.getData();n.block("Uploading image"),y(r.fileinput).fold((()=>{n.unblock()}),(r=>{const i=URL.createObjectURL(r),s=()=>{n.unblock(),URL.revokeObjectURL(i)},a=r=>{n.setData({src:{value:r,meta:{}}}),n.showTab("general"),We(e,t,o,n),n.focus("src")};var l;(l=r,new Promise(((e,t)=>{const o=new FileReader;o.onload=()=>{e(o.result)},o.onerror=()=>{var e;t(null===(e=o.error)||void 0===e?void 0:e.message)},o.readAsDataURL(l)}))).then((o=>{const l=e.createBlobCache(r,i,o);t.automaticUploads?e.uploadImage(l).then((e=>{a(e.url),s()})).catch((t=>{s(),e.alertErr(t,(()=>{n.focus("fileinput")}))})):(e.addToBlobCache(l),a(l.blobUri()),n.unblock())}))}))},Ge=(e,t,o)=>(n,r)=>{"src"===r.name?We(e,t,o,n):"images"===r.name?((e,t,o,n)=>{const r=n.getData(),i=Ne(t.imageList,r.images);i.each((e=>{const t=""===r.alt||o.prevImage.map((e=>e.text===r.alt)).getOr(!1);t?""===e.value?n.setData({src:e,alt:o.prevAlt}):n.setData({src:e,alt:e.text}):n.setData({src:e})})),o.prevImage=i,We(e,t,o,n)})(e,t,o,n):"alt"===r.name?o.prevAlt=n.getData().alt:"fileinput"===r.name?qe(e,t,o,n):"isDecorative"===r.name&&n.setEnabled("alt",!n.getData().isDecorative)},Ye=e=>()=>{e.open=!1},Ke=e=>{if(e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler){return{type:"tabpanel",tabs:v([[Fe(e)],e.hasAdvTab?[Ie(e)]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[je(e)]:[]])}}return{type:"panel",items:He(e)}},Xe=(e,t,o)=>n=>{const r=C(Ve(t.image),n.getData()),i={...r,style:ge(o.normalizeCss,Ue(r,!1))};e.execCommand("mceUpdateImage",!1,Ue(i,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),n.close()},Je=e=>t=>Y(e,t)?(e=>new Promise((t=>{const o=document.createElement("img"),n=e=>{o.parentNode&&o.parentNode.removeChild(o),t(e)};o.addEventListener("load",(()=>{const e={width:$(o.width,o.clientWidth),height:$(o.height,o.clientHeight)};n(Promise.resolve(e))})),o.addEventListener("error",(()=>{n(Promise.reject(`Failed to get image dimensions for: ${e}`))}));const r=o.style;r.visibility="hidden",r.position="fixed",r.bottom=r.left="0px",r.width=r.height="auto",document.body.appendChild(o),o.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Qe=e=>(t,o,n)=>{var r;return e.editorUpload.blobCache.create({blob:t,blobUri:o,name:null===(r=t.name)||void 0===r?void 0:r.replace(/\.[^\.]+$/,""),filename:t.name,base64:n.split(",")[1]})},et=e=>t=>{e.editorUpload.blobCache.add(t)},tt=e=>(t,o)=>{e.windowManager.alert(t,o)},ot=e=>t=>we(e,t),nt=e=>t=>e.dom.parseStyle(t),rt=e=>(t,o)=>e.dom.serializeStyle(t,o),it=e=>t=>Te(e).upload([t],!1).then((e=>{var t;return 0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(null===(t=e[0].error)||void 0===t?void 0:t.message):e[0]})),st=e=>{const t={imageSize:Je(e),addToBlobCache:et(e),createBlobCache:Qe(e),alertErr:tt(e),normalizeCss:ot(e),parseStyle:nt(e),serializeStyle:rt(e),uploadImage:it(e)};return{open:()=>{Be(e).then((o=>{const n=(e=>({prevImage:Ne(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(o);return{title:"Insert/Edit Image",size:"normal",body:Ke(o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ve(o.image),onSubmit:Xe(e,o,t),onChange:Ge(t,o,n),onClose:Ye(n)}})).then(e.windowManager.open)}}},at=e=>{const t=e.attr("class");return h(t)&&/\bimage\b/.test(t)},lt=e=>t=>{let o=t.length;const n=t=>{t.attr("contenteditable",e?"true":null)};for(;o--;){const r=t[o];at(r)&&(r.attr("contenteditable",e?"false":null),Oe.each(r.getAll("figcaption"),n))}},ct=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("image",(e=>{L(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",lt(!0)),e.serializer.addNodeFilter("figure",lt(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:st(e).open,onSetup:t=>{t.setActive(h(_e(e)));const o=e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind,n=ct(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:st(e).open,onSetup:ct(e)}),e.ui.registry.addContextMenu("image",{update:t=>e.selection.isEditable()&&(he(t)||"IMG"===t.nodeName&&!G(t))?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",st(e).open),e.addCommand("mceUpdateImage",((t,o)=>{e.undoManager.transact((()=>Ee(e,o)))}))})(e)}))}()},72682:(e,t,o)=>{o(27384)},27384:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,n=(i=String).prototype,n.isPrototypeOf(o)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===i.name)?"string":t;var o,n;var r,i,s})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),i=t("array"),s=(a=null,e=>a===e);var a;const l=o("boolean"),c=e=>!(e=>null==e)(e),d=o("function"),u=(e,t)=>{if(i(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1},h=()=>{},m=(e,t)=>e===t;class p{constructor(e,t){this.tag=e,this.value=t}static some(e){return new p(!0,e)}static none(){return p.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?p.some(e(this.value)):p.none()}bind(e){return this.tag?e(this.value):p.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:p.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?p.some(e):p.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}p.singletonNone=new p(!1);Array.prototype.slice;const g=Array.prototype.indexOf,f=Array.prototype.push,b=(e,t)=>((e,t)=>g.call(e,t))(e,t)>-1,v=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!i(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);f.apply(t,e[o])}return t},y=(e,t)=>v(((e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n})(e,t));d(Array.from)&&Array.from;const x=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return p.none()},w=Object.keys,_=Object.hasOwnProperty,S=(e,t,o,n)=>{((e,t)=>{const o=w(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))},C=(e,t)=>_.call(e,t),k=(e,t,o=m)=>e.exists((e=>o(e,t))),E=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},T=(e,t)=>e?p.some(t):p.none(),O=()=>{const e=(e=>{const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(p.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(p.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(p.some(e))}}})(h);return{...e,on:t=>e.get().each(t)}},A=(e,t)=>((e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t)(e,t,0),M=e=>t=>t.options.get(e),P=M("link_assume_external_targets"),D=M("link_context_toolbar"),L=M("link_list"),R=M("link_default_target"),N=M("link_default_protocol"),I=M("link_target_list"),B=M("link_rel_list"),z=M("link_class_list"),F=M("link_title"),H=M("allow_unsafe_link_target"),j=M("link_quicklink"),V=M("link_attributes_postprocess");var U=tinymce.util.Tools.resolve("tinymce.util.URI"),Z=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),$=tinymce.util.Tools.resolve("tinymce.util.Tools");const W=e=>c(e)&&"a"===e.nodeName.toLowerCase(),q=e=>W(e)&&!!K(e),G=(e,t)=>{if(e.collapsed)return[];{const o=e.cloneContents(),n=o.firstChild,r=new Z(n,o),i=[];let s=n;do{t(s)&&i.push(s)}while(s=r.next());return i}},Y=e=>/^\w+:/i.test(e),K=e=>{var t,o;return null!==(o=null!==(t=e.getAttribute("data-mce-href"))&&void 0!==t?t:e.getAttribute("href"))&&void 0!==o?o:""},X=(e,t)=>{const o=["noopener"],n=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===$.inArray(o,e))),i=t?(e=>(e=r(e)).length>0?e.concat(o):o)(n):r(n);return i.length>0?(e=>$.trim(e.sort().join(" ")))(i):""},J=(e,t)=>(t=t||te(e.selection.getRng())[0]||e.selection.getNode(),ie(t)?p.from(e.dom.select("a[href]",t)[0]):p.from(e.dom.getParent(t,"a[href]"))),Q=(e,t)=>J(e,t).isSome(),ee=(e,t)=>(e=>e.replace(/\uFEFF/g,""))(t.fold((()=>e.getContent({format:"text"})),(e=>e.innerText||e.textContent||""))),te=e=>G(e,q),oe=e=>$.grep(e,q),ne=e=>oe(e).length>0,re=e=>{const t=e.schema.getTextInlineElements(),o=e=>1===e.nodeType&&!W(e)&&!C(t,e.nodeName.toLowerCase());if(J(e).exists((e=>e.hasAttribute("data-mce-block"))))return!1;const n=e.selection.getRng();if(n.collapsed)return!0;return 0===G(n,o).length},ie=e=>c(e)&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),se=(e,t)=>{const o={...t};if(0===B(e).length&&!H(e)){const e=X(o.rel,"_blank"===o.target);o.rel=e||null}return p.from(o.target).isNone()&&!1===I(e)&&(o.target=R(e)),o.href=((e,t)=>"http"!==t&&"https"!==t||Y(e)?e:t+"://"+e)(o.href,P(e)),o},ae=(e,t,o)=>{const n=e.selection.getNode(),r=J(e,n),i=se(e,(e=>{return t=["title","rel","class","target"],o=(t,o)=>(e[o].each((e=>{t[o]=e.length>0?e:null})),t),n={href:e.href},((e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)})(t,((e,t)=>{n=o(n,e,t)})),n;var t,o,n})(o)),s=V(e);c(s)&&s(i),e.undoManager.transact((()=>{o.href===t.href&&t.attach(),r.fold((()=>{((e,t,o,n)=>{const r=e.dom;ie(t)?he(r,t,n):o.fold((()=>{e.execCommand("mceInsertLink",!1,n);const t=e.selection.getEnd(),o=r.createRng();o.setStartAfter(t),o.setEndAfter(t),e.selection.setRng(o)}),(t=>{e.insertContent(r.createHTML("a",n,r.encode(t)))}))})(e,n,o.text,i)}),(t=>{e.focus(),((e,t,o,n)=>{o.each((e=>{C(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,n);const r=e.dom.createRng();r.setStartAfter(t),r.setEndAfter(t),e.selection.setRng(r)})(e,t,o.text,i)}))}))},le=e=>{const{class:t,href:o,rel:n,target:r,text:i,title:a}=e;return((e,t)=>{const o={};var n;return S(e,t,(n=o,(e,t)=>{n[t]=e}),h),o})({class:t.getOrNull(),href:o,rel:n.getOrNull(),target:r.getOrNull(),text:i.getOrNull(),title:a.getOrNull()},((e,t)=>!1===s(e)))},ce=(e,t,o)=>{const n=((e,t)=>{const o=e.options.get,n={allow_html_data_urls:o("allow_html_data_urls"),allow_script_urls:o("allow_script_urls"),allow_svg_data_urls:o("allow_svg_data_urls")},r=t.href;return{...t,href:U.isDomSafe(r,"a",n)?r:""}})(e,o);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,le(n)):ae(e,t,n)},de=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();ie(t)?ue(e,t):(e=>{const t=e.dom,o=e.selection,n=o.getBookmark(),r=o.getRng().cloneRange(),i=t.getParent(r.startContainer,"a[href]",e.getBody()),s=t.getParent(r.endContainer,"a[href]",e.getBody());i&&r.setStartBefore(i),s&&r.setEndAfter(s),o.setRng(r),e.execCommand("unlink"),o.moveToBookmark(n)})(e),e.focus()}))})(e)},ue=(e,t)=>{var o;const n=e.dom.select("img",t)[0];if(n){const r=e.dom.getParents(n,"a[href]",t)[0];r&&(null===(o=r.parentNode)||void 0===o||o.insertBefore(n,r),e.dom.remove(r))}},he=(e,t,o)=>{var n;const r=e.select("img",t)[0];if(r){const t=e.create("a",o);null===(n=r.parentNode)||void 0===n||n.insertBefore(t,r),t.appendChild(r)}},me=e=>n(e.value)?e.value:"",pe=(e,t)=>{const o=[];return $.each(e,(e=>{const r=(e=>n(e.text)?e.text:n(e.title)?e.title:"")(e);if(void 0!==e.menu){const n=pe(e.menu,t);o.push({text:r,items:n})}else{const n=t(e);o.push({text:r,value:n})}})),o},ge=(e=me)=>t=>p.from(t).map((t=>pe(t,e))),fe={sanitize:e=>ge(me)(e),sanitizeWith:ge,createUi:(e,t)=>o=>({name:e,type:"listbox",label:t,items:o}),getValue:me},be=e=>{return C(t=e,o="items")&&void 0!==t[o]&&null!==t[o];var t,o},ve=(e,t)=>x(t,(t=>be(t)?ve(e,t.items):T(t.value===e,t))),ye=(e,t,o,n)=>{const r=n[t],i=e.length>0;return void 0!==r?ve(r,o).map((t=>({url:{value:t.value,meta:{text:i?e:t.text,attach:h}},text:i?e:t.text}))):p.none()},xe=(e,t)=>{const o={text:e.text,title:e.title},n=e=>{const t=(n=e.url,T(o.text.length<=0,p.from(null===(r=n.meta)||void 0===r?void 0:r.text).getOr(n.value)));var n,r;const i=(e=>{var t;return T(o.title.length<=0,p.from(null===(t=e.meta)||void 0===t?void 0:t.title).getOr(""))})(e.url);return t.isSome()||i.isSome()?p.some({...t.map((e=>({text:e}))).getOr({}),...i.map((e=>({title:e}))).getOr({})}):p.none()},r=(e,n)=>{const r=(i=t,s=n,"link"===s?i.link:"anchor"===s?i.anchor:p.none()).getOr([]);var i,s;return ye(o.text,n,r,e)};return{onChange:(e,t)=>{const i=t.name;return"url"===i?n(e()):b(["anchor","link"],i)?r(e(),i):"text"===i||"title"===i?(o[i]=e()[i],p.none()):p.none()}}};var we=tinymce.util.Tools.resolve("tinymce.util.Delay");const _e=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?p.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):p.none()},Se=(e,t)=>o=>{const n=o.href;return 1===e&&!Y(n)||0===e&&/^\s*www(\.|\d\.)/i.test(n)?p.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+n})}):p.none()},Ce=(e,t)=>x([_e,Se(P(e),N(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(o=>new Promise((n=>{((e,t,o)=>{const n=e.selection.getRng();we.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(n),o(t)}))}))})(e,o.message,(e=>{n(e?o.preprocess(t):t)}))})))),ke=e=>{const t=e.dom.select("a:not([href])"),o=y(t,(e=>{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]}));return o.length>0?p.some([{text:"None",value:""}].concat(o)):p.none()},Ee=e=>{const t=z(e);return t.length>0?fe.sanitize(t):p.none()},Te=e=>{try{return p.some(JSON.parse(e))}catch(e){return p.none()}},Oe=e=>{const t=t=>e.convertURL(t.value||t.url||"","href"),o=L(e);return new Promise((e=>{n(o)?fetch(o).then((e=>e.ok?e.text().then(Te):Promise.reject())).then(e,(()=>e(p.none()))):d(o)?o((t=>e(p.some(t)))):e(p.from(o))})).then((e=>e.bind(fe.sanitizeWith(t)).map((e=>{if(e.length>0){return[{text:"None",value:""}].concat(e)}return e}))))},Ae=(e,t)=>{const o=B(e);if(o.length>0){const n=k(t,"_blank"),r=e=>X(fe.getValue(e),n);return(!1===H(e)?fe.sanitizeWith(r):fe.sanitize)(o)}return p.none()},Me=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Pe=e=>{const t=I(e);return i(t)?fe.sanitize(t).orThunk((()=>p.some(Me))):!1===t?p.none():p.some(Me)},De=(e,t,o)=>{const n=e.getAttrib(t,o);return null!==n&&n.length>0?p.some(n):p.none()},Le=(e,t)=>Oe(e).then((o=>{const n=((e,t)=>{const o=e.dom,n=re(e)?p.some(ee(e.selection,t)):p.none(),r=t.bind((e=>p.from(o.getAttrib(e,"href")))),i=t.bind((e=>p.from(o.getAttrib(e,"target")))),s=t.bind((e=>De(o,e,"rel"))),a=t.bind((e=>De(o,e,"class")));return{url:r,text:n,title:t.bind((e=>De(o,e,"title"))),target:i,rel:s,linkClass:a}})(e,t);return{anchor:n,catalogs:{targets:Pe(e),rels:Ae(e,n.target),classes:Ee(e),anchor:ke(e),link:o},optNode:t,flags:{titleEnabled:F(e)}}})),Re=e=>{const t=(e=>{const t=J(e);return Le(e,t)})(e);t.then((t=>{const o=((e,t)=>o=>{const n=o.getData();if(!n.url.value)return de(e),void o.close();const r=e=>p.from(n[e]).filter((o=>!k(t.anchor[e],o))),i={href:n.url.value,text:r("text"),target:r("target"),rel:r("rel"),class:r("linkClass"),title:r("title")},s={href:n.url.value,attach:void 0!==n.url.meta&&n.url.meta.attach?n.url.meta.attach:h};Ce(e,i).then((t=>{ce(e,s,t)})),o.close()})(e,t);return((e,t,o)=>{const n=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],i=((e,t)=>{const o=e.anchor,n=o.url.getOr("");return{url:{value:n,meta:{original:{value:n}}},text:o.text.getOr(""),title:o.title.getOr(""),anchor:n,link:n,rel:o.rel.getOr(""),target:o.target.or(t).getOr(""),linkClass:o.linkClass.getOr("")}})(e,p.from(R(o))),s=e.catalogs,a=xe(i,s);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:v([[{name:"url",type:"urlinput",filetype:"file",label:"URL",picker_text:"Browse links"}],n,r,E([s.anchor.map(fe.createUi("anchor","Anchors")),s.rels.map(fe.createUi("rel","Rel")),s.targets.map(fe.createUi("target","Open link in...")),s.link.map(fe.createUi("link","Link list")),s.classes.map(fe.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:i,onChange:(e,{name:t})=>{a.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,o,e)})).then((t=>{e.windowManager.open(t)}))};var Ne=tinymce.util.Tools.resolve("tinymce.util.VK");const Ie=e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const o=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});document.dispatchEvent(o),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,o)},Be=(e,t)=>{if(t){const r=K(t);if(/^#/.test(r)){const t=e.dom.select(`${r},[name="${o=r,n="#",A(o,n)?((e,t)=>e.substring(t))(o,n.length):o}"]`);t.length&&e.selection.scrollIntoView(t[0],!0)}else Ie(t.href)}var o,n},ze=(e,t)=>{const o=oe(e.dom.getParents(t));return T(1===o.length,o[0])},Fe=e=>e.selection.isCollapsed()||(e=>{const t=e.selection.getRng(),o=t.startContainer;return q(o)&&t.startContainer===t.endContainer&&1===e.dom.select("img",o).length})(e)?ze(e,e.selection.getStart()):(e=>{const t=te(e.selection.getRng());return T(t.length>0,t[0]).or(ze(e,e.selection.getNode()))})(e),He=e=>()=>{e.execCommand("mceLink",!1,{dialog:!0})},je=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Ve=e=>t=>{const o=()=>{t.setActive(!e.mode.isReadOnly()&&Q(e,e.selection.getNode())),t.setEnabled(e.selection.isEditable())};return o(),je(e,o)},Ue=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return o(),je(e,o)},Ze=e=>t=>{const o=t=>{return ne(t)||(o=e.selection.getRng(),te(o).length>0);var o},n=e.dom.getParents(e.selection.getStart()),r=n=>{t.setEnabled(o(n)&&e.selection.isEditable())};return r(n),je(e,(e=>r(e.parents)))},$e=(e,t)=>{const o=t=>{const o=e.selection.getNode();return t.setEnabled(Q(e,o)&&e.selection.isEditable()),h};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Ve(e)},label:"Link",predicate:t=>D(e)&&Q(e,t),initValue:()=>J(e).fold((e=>()=>e)(""),K),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const o=e.selection.getNode();return t.setActive(Q(e,o)),Ve(e)(t)},onAction:t=>{const o=t.getValue(),n=(t=>{const o=J(e),n=re(e);if(o.isNone()&&n){const n=ee(e.selection,o);return T(0===n.length,t)}return p.none()})(o);ce(e,{href:o,attach:h},{href:o,text:n,title:p.none(),rel:p.none(),target:p.from(R(e)),class:p.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:o,onAction:t=>{de(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:o,onAction:e=>{t.gotoSelectedLink(),e.hide()}}]})},We=e=>{const t=(e=>{const t=O(),o=()=>t.get().or(Fe(e));return e.on("contextmenu",(o=>{ze(e,o.target).each(t.set)})),e.on("SelectionChange",(()=>{t.isSet()||Fe(e).each(t.set)})),e.on("click",(o=>{t.clear();const n=oe(e.dom.getParents(o.target));1===n.length&&Ne.metaKeyPressed(o)&&(o.preventDefault(),Be(e,n[0]))})),e.on("keydown",(n=>{t.clear(),!n.isDefaultPrevented()&&13===n.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(n)&&o().each((t=>{n.preventDefault(),Be(e,t)}))})),{gotoSelectedLink:()=>o().each((t=>Be(e,t)))}})(e);((e,t)=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onAction:He(e),onSetup:Ve(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:t.gotoSelectedLink,onSetup:Ze(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>de(e),onSetup:Ze(e)})})(e,t),((e,t)=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:t.gotoSelectedLink,onSetup:Ze(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:He(e),onSetup:Ue(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>de(e),onSetup:Ze(e)})})(e,t),(e=>{e.ui.registry.addContextMenu("link",{update:t=>e.dom.isEditable(t)?ne(e.dom.getParents(t,"a"))?"link unlink openlink":"link":""})})(e),$e(e,t)};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=n(e)||l(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>n(e)||d(e)||u(e,r)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>l(e)||u(e,r),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1}),t("link_attributes_postprocess",{processor:"function"})})(e),(e=>{e.addCommand("mceLink",((t,o)=>{!0!==(null==o?void 0:o.dialog)&&j(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Re(e)}))})(e),We(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(e)}))}()},1236:(e,t,o)=>{o(77585)},77585:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,n=(i=String).prototype,n.isPrototypeOf(o)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===i.name)?"string":t;var o,n;var r,i,s})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),i=t("array"),s=o("boolean"),a=e=>!(e=>null==e)(e),l=o("function"),c=o("number"),d=()=>{},u=e=>()=>e,h=(e,t)=>e===t;const m=e=>t=>!e(t),p=u(!1);class g{constructor(e,t){this.tag=e,this.value=t}static some(e){return new g(!0,e)}static none(){return g.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?g.some(e(this.value)):g.none()}bind(e){return this.tag?e(this.value):g.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:g.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return a(e)?g.some(e):g.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}g.singletonNone=new g(!1);const f=Array.prototype.slice,b=Array.prototype.indexOf,v=Array.prototype.push,y=(e,t)=>{return o=e,n=t,b.call(o,n)>-1;var o,n},x=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return!0}return!1},w=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},_=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},S=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},C=(e,t,o)=>(_(e,((e,n)=>{o=t(o,e,n)})),o),k=(e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return g.some(r);if(o(r,n))break}return g.none()},E=(e,t)=>k(e,t,p),T=(e,t)=>(e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!i(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);v.apply(t,e[o])}return t})(w(e,t)),O=e=>{const t=f.call(e,0);return t.reverse(),t},A=(e,t)=>t>=0&&t<e.length?g.some(e[t]):g.none(),M=e=>A(e,0),P=e=>A(e,e.length-1),D=(e,t)=>{const o=[],n=l(t)?e=>x(o,(o=>t(o,e))):e=>y(o,e);for(let t=0,r=e.length;t<r;t++){const r=e[t];n(r)||o.push(r)}return o},L=Object.keys,R=(e,t)=>{const o=L(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},N=(e,t)=>{const o={};var n;return((e,t,o,n)=>{R(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(n=o,(e,t)=>{n[t]=e}),d),o},I="undefined"!=typeof window?window:Function("return this;")(),B=(e,t,o=h)=>e.exists((e=>o(e,t))),z=(e,t,o)=>e.isSome()&&t.isSome()?g.some(o(e.getOrDie(),t.getOrDie())):g.none(),F=(e,t)=>((e,t)=>{let o=null!=t?t:I;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t),H=(j=/^\s+|\s+$/g,e=>e.replace(j,""));var j;const V=e=>"\ufeff"===e,U=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},Z={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return U(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return U(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return U(o)},fromDom:U,fromPoint:(e,t,o)=>g.from(e.dom.elementFromPoint(t,o)).map(U)},$=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},W=(e,t)=>e.dom===t.dom,q=$,G=(e,t)=>{const o=((e,t)=>F(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o},Y=Object.getPrototypeOf,K=e=>{const t=F("ownerDocument.defaultView",e);return r(e)&&((e=>G("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Y(e).constructor.name))},X=e=>e.dom.nodeName.toLowerCase(),J=e=>e.dom.nodeType,Q=e=>t=>J(t)===e,ee=e=>te(e)&&K(e.dom),te=Q(1),oe=Q(3),ne=Q(11),re=e=>t=>te(t)&&X(t)===e,ie=e=>g.from(e.dom.parentNode).map(Z.fromDom),se=e=>w(e.dom.childNodes,Z.fromDom),ae=(e,t)=>{const o=e.dom.childNodes;return g.from(o[t]).map(Z.fromDom)},le=e=>ae(e,0),ce=e=>ae(e,e.dom.childNodes.length-1),de=e=>{const t=(e=>Z.fromDom(e.dom.getRootNode()))(e);return ne(o=t)&&a(o.dom.host)?g.some(t):g.none();var o},ue=e=>Z.fromDom(e.dom.host),he=(e,t)=>{ie(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},me=(e,t)=>{const o=(e=>g.from(e.dom.nextSibling).map(Z.fromDom))(e);o.fold((()=>{ie(e).each((e=>{pe(e,t)}))}),(e=>{he(e,t)}))},pe=(e,t)=>{e.dom.appendChild(t.dom)},ge=(e,t)=>{_(t,(t=>{pe(e,t)}))},fe=(e,t)=>{const o=e.dom;R(t,((e,t)=>{((e,t,o)=>{if(!(n(o)||s(o)||c(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(o,t,e)}))},be=e=>C(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),ve=e=>{e.dom.textContent="",_(se(e),(e=>{ye(e)}))},ye=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},xe=e=>((e,t)=>Z.fromDom(e.dom.cloneNode(t)))(e,!0),we=(e,t)=>{const o=((e,t)=>{const o=Z.fromTag(t),n=be(e);return fe(o,n),o})(e,t);me(e,o);const n=se(e);return ge(o,n),ye(e),o},_e=e=>w(e,Z.fromDom),Se=e=>{const t=oe(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return de(Z.fromDom(t)).fold((()=>o.body.contains(t)),(n=Se,r=ue,e=>n(r(e))));var n,r},Ce=(e,t,o)=>{if(!n(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);(e=>void 0!==e.style&&l(e.style.getPropertyValue))(e)&&e.style.setProperty(t,o)},ke=(e,t,o)=>{const n=e.dom;Ce(n,t,o)},Ee=(e,t)=>{const o=(t||document).createDocumentFragment();return _(e,(e=>{o.appendChild(e.dom)})),Z.fromDom(o)};var Te=(e,t,o,n,r)=>e(o,n)?g.some(o):l(r)&&r(o)?g.none():t(o,n,r);const Oe=(e,t,o)=>{let n=e.dom;const r=l(o)?o:p;for(;n.parentNode;){n=n.parentNode;const e=Z.fromDom(n);if(t(e))return g.some(e);if(r(e))break}return g.none()},Ae=(e,t,o)=>Te(((e,t)=>t(e)),Oe,e,t,o),Me=(e,t,o)=>Oe(e,(e=>$(e,t)),o),Pe=e=>{return Te(((e,t)=>$(e,t)),Me,e,"[contenteditable]",t);var t},De=e=>e.dom.contentEditable,Le=(e,t)=>{return o=e,n=function(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}(W,t),Oe(o,n,r).isSome();var o,n,r};var Re=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Ne=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Ie=tinymce.util.Tools.resolve("tinymce.util.VK"),Be=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),ze=tinymce.util.Tools.resolve("tinymce.util.Tools");const Fe=e=>t=>a(t)&&t.nodeName.toLowerCase()===e,He=e=>t=>a(t)&&e.test(t.nodeName),je=e=>a(e)&&3===e.nodeType,Ve=e=>a(e)&&1===e.nodeType,Ue=He(/^(OL|UL|DL)$/),Ze=He(/^(OL|UL)$/),$e=Fe("ol"),We=He(/^(LI|DT|DD)$/),qe=He(/^(DT|DD)$/),Ge=He(/^(TH|TD)$/),Ye=Fe("br"),Ke=(e,t)=>a(t)&&t.nodeName in e.schema.getTextBlockElements(),Xe=(e,t)=>a(e)&&e.nodeName in t,Je=(e,t)=>a(t)&&t.nodeName in e.schema.getVoidElements(),Qe=(e,t,o)=>{const n=e.isEmpty(t);return!(o&&e.select("span[data-mce-type=bookmark]",t).length>0)&&n},et=(e,t)=>e.isChildOf(t,e.getRoot()),tt=e=>t=>t.options.get(e),ot=tt("lists_indent_on_tab"),nt=tt("forced_root_block"),rt=tt("forced_root_block_attrs"),it=(e,t,o={})=>{const n=e.dom,r=e.schema.getBlockElements(),i=n.createFragment(),s=nt(e),a=rt(e);let l,c,d=!1;for(c=n.create(s,{...a,...o.style?{style:o.style}:{}}),Xe(t.firstChild,r)||i.appendChild(c);l=t.firstChild;){const e=l.nodeName;d||"SPAN"===e&&"bookmark"===l.getAttribute("data-mce-type")||(d=!0),Xe(l,r)?(i.appendChild(l),c=null):(c||(c=n.create(s,a),i.appendChild(c)),c.appendChild(l))}return!d&&c&&c.appendChild(n.create("br",{"data-mce-bogus":"1"})),i},st=Be.DOM,at=(e,t,o)=>{const n=st.select('span[data-mce-type="bookmark"]',t),r=it(e,o),i=st.createRng();i.setStartAfter(o),i.setEndAfter(t);const s=i.extractContents();for(let t=s.firstChild;t;t=t.firstChild)if("LI"===t.nodeName&&e.dom.isEmpty(t)){st.remove(t);break}e.dom.isEmpty(s)||st.insertAfter(s,t),st.insertAfter(r,t);const a=o.parentElement;a&&Qe(e.dom,a)&&(e=>{const t=e.parentNode;t&&ze.each(n,(e=>{t.insertBefore(e,o.parentNode)})),st.remove(e)})(a),st.remove(o),Qe(e.dom,t)&&st.remove(t)},lt=re("dd"),ct=re("dt"),dt=(e,t)=>{var o;lt(t)?we(t,"dt"):ct(t)&&(o=t,g.from(o.dom.parentElement).map(Z.fromDom)).each((o=>at(e,o.dom,t.dom)))},ut=e=>{ct(e)&&we(e,"dd")},ht=(e,t)=>{if(je(e))return{container:e,offset:t};const o=Re.getNode(e,t);return je(o)?{container:o,offset:t>=e.childNodes.length?o.data.length:0}:o.previousSibling&&je(o.previousSibling)?{container:o.previousSibling,offset:o.previousSibling.data.length}:o.nextSibling&&je(o.nextSibling)?{container:o.nextSibling,offset:0}:{container:e,offset:t}},mt=e=>{const t=e.cloneRange(),o=ht(e.startContainer,e.startOffset);t.setStart(o.container,o.offset);const n=ht(e.endContainer,e.endOffset);return t.setEnd(n.container,n.offset),t},pt=["OL","UL","DL"],gt=pt.join(","),ft=(e,t)=>{const o=t||e.selection.getStart(!0);return e.dom.getParent(o,gt,xt(e,o))},bt=e=>{const t=ft(e),o=e.selection.getSelectedBlocks();return((e,t)=>a(e)&&1===t.length&&t[0]===e)(t,o)?(e=>S(e.querySelectorAll(gt),Ue))(t):S(o,(e=>Ue(e)&&t!==e))},vt=e=>{const t=e.selection.getSelectedBlocks();return S(((e,t)=>{const o=ze.map(t,(t=>e.dom.getParent(t,"li,dd,dt",xt(e,t))||t));return D(o)})(e,t),We)},yt=(e,t)=>{const o=e.dom.getParents(t,"TD,TH");return o.length>0?o[0]:e.getBody()},xt=(e,t)=>{const o=e.dom.getParents(t,e.dom.isBlock),n=E(o,(t=>{return(t=>t.nodeName.toLowerCase()!==nt(e))(t)&&(o=e.schema,!Ue(n=t)&&!We(n)&&x(pt,(e=>o.isValidChild(n.nodeName,e))));var o,n}));return n.getOr(e.getBody())},wt=(e,t)=>{const o=e.dom.getParents(t,"ol,ul",xt(e,t));return P(o)},_t=e=>{const t=(e=>{const t=wt(e,e.selection.getStart()),o=S(e.selection.getSelectedBlocks(),Ze);return t.toArray().concat(o)})(e),o=(e=>{const t=e.selection.getStart();return e.dom.getParents(t,"ol,ul",xt(e,t))})(e);return E(o,(e=>{return t=Z.fromDom(e),ie(t).exists((e=>We(e.dom)&&le(e).exists((e=>!Ue(e.dom)))&&ce(e).exists((e=>!Ue(e.dom)))));var t})).fold((()=>St(e,t)),(e=>[e]))},St=(e,t)=>{const o=w(t,(t=>wt(e,t).getOr(t)));return D(o)},Ct=e=>/\btox\-/.test(e.className),kt=(e,t)=>k(e,Ue,Ge).exists((e=>e.nodeName===t&&!Ct(e))),Et=(e,t)=>null!==t&&!e.dom.isEditable(t),Tt=(e,t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return Et(e,o)||!e.selection.isEditable()},Ot=(e,t)=>{const o=e.selection.getNode();return t({parents:e.dom.getParents(o),element:o}),e.on("NodeChange",t),()=>e.off("NodeChange",t)},At=(e,t,o)=>e.dispatch("ListMutation",{action:t,element:o}),Mt=e=>q(e,"OL,UL"),Pt=e=>le(e).exists(Mt),Dt=e=>"listAttributes"in e,Lt=e=>"isComment"in e,Rt=e=>e.depth>0,Nt=e=>e.isSelected,It=e=>{const t=se(e),o=ce(e).exists(Mt)?t.slice(0,-1):t;return w(o,xe)},Bt=(e,t)=>{pe(e.item,t.list)},zt=(e,t)=>{const o={list:Z.fromTag(t,e),item:Z.fromTag("li",e)};return pe(o.list,o.item),o},Ft=(e,t,o)=>{const n=t.slice(0,o.depth);return P(n).each((t=>{if(Dt(o)){const n=((e,t,o)=>{const n=Z.fromTag("li",e);return fe(n,t),ge(n,o),n})(e,o.itemAttributes,o.content);((e,t)=>{pe(e.list,t),e.item=t})(t,n),((e,t)=>{X(e.list)!==t.listType&&(e.list=we(e.list,t.listType)),fe(e.list,t.listAttributes)})(t,o)}else if((e=>"isFragment"in e)(o))ge(t.item,o.content);else{const e=Z.fromHtml(`\x3c!--${o.content}--\x3e`);pe(t.list,e)}})),n},Ht=(e,t,o)=>{const n=((e,t,o)=>{const n=[];for(let r=0;r<o;r++)n.push(zt(e,Dt(t)?t.listType:t.parentListType));return n})(e,o,o.depth-t.length);var r;return(e=>{for(let t=1;t<e.length;t++)Bt(e[t-1],e[t])})(n),((e,t)=>{for(let t=0;t<e.length-1;t++)ke(e[t].item,"list-style-type","none");P(e).each((e=>{Dt(t)&&(fe(e.list,t.listAttributes),fe(e.item,t.itemAttributes)),ge(e.item,t.content)}))})(n,o),r=n,z(P(t),M(r),Bt),t.concat(n)},jt=(e,t)=>{let o=g.none();const n=C(t,((t,n,r)=>Lt(n)?0===r?(o=g.some(n),t):Ft(e,t,n):n.depth>t.length?Ht(e,t,n):Ft(e,t,n)),[]);return o.each((e=>{const t=Z.fromHtml(`\x3c!--${e.content}--\x3e`);M(n).each((e=>{((e,t)=>{le(e).fold((()=>{pe(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))})(e.list,t)}))})),M(n).map((e=>e.list))},Vt=e=>(_(e,((t,o)=>{((e,t)=>{const o=e[t].depth,n=e=>e.depth===o&&!e.dirty,r=e=>e.depth<o;return k(O(e.slice(0,t)),n,r).orThunk((()=>k(e.slice(t+1),n,r)))})(e,o).fold((()=>{t.dirty&&Dt(t)&&(e=>{e.listAttributes=N(e.listAttributes,((e,t)=>"start"!==t))})(t)}),(e=>{return n=e,void(Dt(o=t)&&Dt(n)&&(o.listType=n.listType,o.listAttributes={...n.listAttributes}));var o,n}))})),e),Ut=(e,t,o,n)=>{var r,i;if(8===J(i=n)||"#comment"===X(i))return[{depth:e+1,content:null!==(r=n.dom.nodeValue)&&void 0!==r?r:"",dirty:!1,isSelected:!1,isComment:!0}];t.each((e=>{W(e.start,n)&&o.set(!0)}));const s=((e,t,o)=>ie(e).filter(te).map((n=>({depth:t,dirty:!1,isSelected:o,content:It(e),itemAttributes:be(e),listAttributes:be(n),listType:X(n),isInPreviousLi:!1}))))(n,e,o.get());t.each((e=>{W(e.end,n)&&o.set(!1)}));const a=ce(n).filter(Mt).map((n=>$t(e,t,o,n))).getOr([]);return s.toArray().concat(a)},Zt=(e,t,o,n)=>le(n).filter(Mt).fold((()=>Ut(e,t,o,n)),(r=>{const i=C(se(n),((n,i,s)=>{if(0===s)return n;if(q(i,"LI"))return n.concat(Ut(e,t,o,i));{const t={isFragment:!0,depth:e,content:[i],isSelected:!1,dirty:!1,parentListType:X(r)};return n.concat(t)}}),[]);return $t(e,t,o,r).concat(i)})),$t=(e,t,o,n)=>T(se(n),(n=>(Mt(n)?$t:Zt)(e+1,t,o,n))),Wt=(e,t)=>T(((e,t)=>{if(0===e.length)return[];{let o=t(e[0]);const n=[];let r=[];for(let i=0,s=e.length;i<s;i++){const s=e[i],a=t(s);a!==o&&(n.push(r),r=[]),o=a,r.push(s)}return 0!==r.length&&n.push(r),n}})(t,Rt),(t=>M(t).exists(Rt)?((e,t)=>{const o=Vt(t);return jt(e.contentDocument,o).toArray()})(e,t):((e,t)=>{const o=Vt(t);return w(o,(t=>{const o=Lt(t)?Ee([Z.fromHtml(`\x3c!--${t.content}--\x3e`)]):Ee(t.content),n=Dt(t)?t.itemAttributes:{};return Z.fromDom(it(e,o.dom,n))}))})(e,t))),qt=(e,t,o)=>{const n=((e,t)=>{const o=(e=>{let t=!1;return{get:()=>t,set:e=>{t=e}}})();return w(e,(e=>({sourceList:e,entries:$t(0,t,o,e)})))})(t,(e=>{const t=w(vt(e),Z.fromDom);return z(E(t,m(Pt)),E(O(t),m(Pt)),((e,t)=>({start:e,end:t})))})(e));_(n,(t=>{((e,t)=>{_(S(e,Nt),(e=>((e,t)=>{switch(e){case"Indent":t.depth++;break;case"Outdent":t.depth--;break;case"Flatten":t.depth=0}t.dirty=!0})(t,e)))})(t.entries,o);const n=Wt(e,t.entries);var r;_(n,(t=>{At(e,"Indent"===o?"IndentList":"OutdentList",t.dom)})),r=t.sourceList,_(n,(e=>{he(r,e)})),ye(t.sourceList)}))},Gt=(e,t)=>{const o=_e(_t(e)),n=_e((e=>S(vt(e),qe))(e));let r=!1;if(o.length||n.length){const i=e.selection.getBookmark();qt(e,o,t),((e,t,o)=>{_(o,"Indent"===t?ut:t=>dt(e,t))})(e,t,n),e.selection.moveToBookmark(i),e.selection.setRng(mt(e.selection.getRng())),e.nodeChanged(),r=!0}return r},Yt=(e,t)=>!(e=>{const t=ft(e);return Et(e,t)||!e.selection.isEditable()})(e)&&Gt(e,t),Kt=e=>Yt(e,"Indent"),Xt=e=>Yt(e,"Outdent"),Jt=e=>Yt(e,"Flatten");var Qt=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const eo=Be.DOM,to=e=>{const t={},o=o=>{let n=e[o?"startContainer":"endContainer"],r=e[o?"startOffset":"endOffset"];if(Ve(n)){const e=eo.create("span",{"data-mce-type":"bookmark"});n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),o?n.insertBefore(e,n.childNodes[r]):eo.insertAfter(e,n.childNodes[r])):n.appendChild(e),n=e,r=0}t[o?"startContainer":"endContainer"]=n,t[o?"startOffset":"endOffset"]=r};return o(!0),e.collapsed||o(),t},oo=e=>{const t=t=>{let o=e[t?"startContainer":"endContainer"],n=e[t?"startOffset":"endOffset"];if(o){if(Ve(o)&&o.parentNode){const e=o;n=(e=>{var t;let o=null===(t=e.parentNode)||void 0===t?void 0:t.firstChild,n=0;for(;o;){if(o===e)return n;Ve(o)&&"bookmark"===o.getAttribute("data-mce-type")||n++,o=o.nextSibling}return-1})(o),o=o.parentNode,eo.remove(e),!o.hasChildNodes()&&eo.isBlock(o)&&o.appendChild(eo.create("br"))}e[t?"startContainer":"endContainer"]=o,e[t?"startOffset":"endOffset"]=n}};t(!0),t();const o=eo.createRng();return o.setStart(e.startContainer,e.startOffset),e.endContainer&&o.setEnd(e.endContainer,e.endOffset),mt(o)},no=e=>{switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},ro=(e,t)=>{ze.each(t,((t,o)=>{e.setAttribute(o,t)}))},io=(e,t,o)=>{((e,t,o)=>{const n=o["list-style-type"]?o["list-style-type"]:null;e.setStyle(t,"list-style-type",n)})(e,t,o),((e,t,o)=>{ro(t,o["list-attributes"]),ze.each(e.select("li",t),(e=>{ro(e,o["list-item-attributes"])}))})(e,t,o)},so=(e,t)=>a(t)&&!Xe(t,e.schema.getBlockElements()),ao=(e,t,o,n)=>{let r=t[o?"startContainer":"endContainer"];const i=t[o?"startOffset":"endOffset"];Ve(r)&&(r=r.childNodes[Math.min(i,r.childNodes.length-1)]||r),!o&&Ye(r.nextSibling)&&(r=r.nextSibling);const s=(t,o)=>{var r;const i=new Ne(t,(t=>{for(;!e.dom.isBlock(t)&&t.parentNode&&n!==t;)t=t.parentNode;return t})(t)),s=o?"next":"prev";let a;for(;a=i[s]();)if(!Je(e,a)&&!V(a.textContent)&&0!==(null===(r=a.textContent)||void 0===r?void 0:r.length))return g.some(a);return g.none()};if(o&&je(r))if(V(r.textContent))r=s(r,!1).getOr(r);else for(null!==r.parentNode&&so(e,r.parentNode)&&(r=r.parentNode);null!==r.previousSibling&&(so(e,r.previousSibling)||je(r.previousSibling));)r=r.previousSibling;if(!o&&je(r))if(V(r.textContent))r=s(r,!0).getOr(r);else for(null!==r.parentNode&&so(e,r.parentNode)&&(r=r.parentNode);null!==r.nextSibling&&(so(e,r.nextSibling)||je(r.nextSibling));)r=r.nextSibling;for(;r.parentNode!==n;){const t=r.parentNode;if(Ke(e,r))return r;if(/^(TD|TH)$/.test(t.nodeName))return r;r=t}return r},lo=(e,t,o)=>{const n=e.selection.getRng();let r="LI";const i=xt(e,((e,t)=>{const o=e.selection.getStart(!0),n=ao(e,t,!0,e.getBody());return Le(Z.fromDom(n),Z.fromDom(t.commonAncestorContainer))?t.commonAncestorContainer:o})(e,n)),s=e.dom;if("false"===s.getContentEditable(e.selection.getNode()))return;"DL"===(t=t.toUpperCase())&&(r="DT");const a=to(n),l=S(((e,t,o)=>{const n=[],r=e.dom,i=ao(e,t,!0,o),s=ao(e,t,!1,o);let a;const l=[];for(let e=i;e&&(l.push(e),e!==s);e=e.nextSibling);return ze.each(l,(t=>{var i;if(Ke(e,t))return n.push(t),void(a=null);if(r.isBlock(t)||Ye(t))return Ye(t)&&r.remove(t),void(a=null);const s=t.nextSibling;Qt.isBookmarkNode(t)&&(Ue(s)||Ke(e,s)||!s&&t.parentNode===o)?a=null:(a||(a=r.create("p"),null===(i=t.parentNode)||void 0===i||i.insertBefore(a,t),n.push(a)),a.appendChild(t))})),n})(e,n,i),e.dom.isEditable);ze.each(l,(n=>{let i;const a=n.previousSibling,l=n.parentNode;We(l)||(a&&Ue(a)&&a.nodeName===t&&((e,t,o)=>{const n=e.getStyle(t,"list-style-type");let r=o?o["list-style-type"]:"";return r=null===r?"":r,n===r})(s,a,o)?(i=a,n=s.rename(n,r),a.appendChild(n)):(i=s.create(t),l.insertBefore(i,n),i.appendChild(n),n=s.rename(n,r)),((e,t,o)=>{ze.each(o,(o=>e.setStyle(t,o,"")))})(s,n,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),io(s,i,o),uo(e.dom,i))})),e.selection.setRng(oo(a))},co=(e,t,o)=>{return((e,t)=>Ue(e)&&e.nodeName===(null==t?void 0:t.nodeName))(t,o)&&((e,t,o)=>e.getStyle(t,"list-style-type",!0)===e.getStyle(o,"list-style-type",!0))(e,t,o)&&(n=o,t.className===n.className);var n},uo=(e,t)=>{let o,n=t.nextSibling;if(co(e,t,n)){const r=n;for(;o=r.firstChild;)t.appendChild(o);e.remove(r)}if(n=t.previousSibling,co(e,t,n)){const r=n;for(;o=r.lastChild;)t.insertBefore(o,t.firstChild);e.remove(r)}},ho=(e,t,o,n)=>{if(t.nodeName!==o){const r=e.dom.rename(t,o);io(e.dom,r,n),At(e,no(o),r)}else io(e.dom,t,n),At(e,no(o),t)},mo=(e,t,o,n)=>{if(t.classList.forEach(((e,o,n)=>{e.startsWith("tox-")&&(n.remove(e),0===n.length&&t.removeAttribute("class"))})),t.nodeName!==o){const r=e.dom.rename(t,o);io(e.dom,r,n),At(e,no(o),r)}else io(e.dom,t,n),At(e,no(o),t)},po=e=>"list-style-type"in e,go=(e,t,o)=>{const n=ft(e);if(Tt(e,n))return;const i=bt(e),s=r(o)?o:{};i.length>0?((e,t,o,n,r)=>{const i=Ue(t);if(!i||t.nodeName!==n||po(r)||Ct(t)){lo(e,n,r);const s=to(e.selection.getRng()),a=i?[t,...o]:o,l=i&&Ct(t)?mo:ho;ze.each(a,(t=>{l(e,t,n,r)})),e.selection.setRng(oo(s))}else Jt(e)})(e,n,i,t,s):((e,t,o,n)=>{if(t!==e.getBody())if(t)if(t.nodeName!==o||po(n)||Ct(t)){const r=to(e.selection.getRng());Ct(t)&&t.classList.forEach(((e,o,n)=>{e.startsWith("tox-")&&(n.remove(e),0===n.length&&t.removeAttribute("class"))})),io(e.dom,t,n);const i=e.dom.rename(t,o);uo(e.dom,i),e.selection.setRng(oo(r)),lo(e,o,n),At(e,no(o),i)}else Jt(e);else lo(e,o,n),At(e,no(o),t)})(e,n,t,s)},fo=Be.DOM,bo=(e,t)=>{const o=ze.grep(e.select("ol,ul",t));ze.each(o,(t=>{((e,t)=>{const o=t.parentElement;if(o&&"LI"===o.nodeName&&o.firstChild===t){const n=o.previousSibling;n&&"LI"===n.nodeName?(n.appendChild(t),Qe(e,o)&&fo.remove(o)):fo.setStyle(o,"listStyleType","none")}if(Ue(o)){const e=o.previousSibling;e&&"LI"===e.nodeName&&e.appendChild(t)}})(e,t)}))},vo=(e,t,o,n)=>{let r=t.startContainer;const i=t.startOffset;if(je(r)&&(o?i<r.data.length:i>0))return r;const s=e.schema.getNonEmptyElements();Ve(r)&&(r=Re.getNode(r,i));const a=new Ne(r,n);o&&((e,t)=>!!Ye(t)&&e.isBlock(t.nextSibling)&&!Ye(t.previousSibling))(e.dom,r)&&a.next();const l=o?a.next.bind(a):a.prev2.bind(a);for(;r=l();){if("LI"===r.nodeName&&!r.hasChildNodes())return r;if(s[r.nodeName])return r;if(je(r)&&r.data.length>0)return r}return null},yo=(e,t)=>{const o=t.childNodes;return 1===o.length&&!Ue(o[0])&&e.isBlock(o[0])},xo=e=>g.from(e).map(Z.fromDom).filter(ee).exists((e=>((e,t=!1)=>Se(e)?e.dom.isContentEditable:Pe(e).fold(u(t),(e=>"true"===De(e))))(e)&&!y(["details"],X(e)))),wo=(e,t,o)=>{let n;const r=yo(e,o)?o.firstChild:o;if(((e,t)=>{yo(e,t)&&xo(t.firstChild)&&e.remove(t.firstChild,!0)})(e,t),!Qe(e,t,!0))for(;n=t.firstChild;)r.appendChild(n)},_o=(e,t,o)=>{let n;const r=t.parentNode;if(!et(e,t)||!et(e,o))return;Ue(o.lastChild)&&(n=o.lastChild),r===o.lastChild&&Ye(r.previousSibling)&&e.remove(r.previousSibling);const i=o.lastChild;i&&Ye(i)&&t.hasChildNodes()&&e.remove(i),Qe(e,o,!0)&&ve(Z.fromDom(o)),wo(e,t,o),n&&o.appendChild(n);const s=((e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)})(Z.fromDom(o),Z.fromDom(t))?e.getParents(t,Ue,o):[];e.remove(t),_(s,(t=>{Qe(e,t)&&t!==e.getRoot()&&e.remove(t)}))},So=(e,t,o,n)=>{const r=e.dom;if(r.isEmpty(n))((e,t,o)=>{ve(Z.fromDom(o)),_o(e.dom,t,o),e.selection.setCursorLocation(o,0)})(e,o,n);else{const i=to(t);_o(r,o,n),e.selection.setRng(oo(i))}},Co=(e,t)=>{const o=e.dom,n=e.selection,r=n.getStart(),i=yt(e,r),s=o.getParent(n.getStart(),"LI",i);if(s){const r=s.parentElement;if(r===e.getBody()&&Qe(o,r))return!0;const a=mt(n.getRng()),l=o.getParent(vo(e,a,t,i),"LI",i),c=l&&(t?o.isChildOf(s,l):o.isChildOf(l,s));if(l&&l!==s&&!c)return e.undoManager.transact((()=>{var o,n;t?So(e,a,l,s):(null===(n=(o=s).parentNode)||void 0===n?void 0:n.firstChild)===o?Xt(e):((e,t,o,n)=>{const r=to(t);_o(e.dom,o,n);const i=oo(r);e.selection.setRng(i)})(e,a,s,l)})),!0;if(c&&!t&&l!==s){const t=a.commonAncestorContainer.parentElement;return!(!t||o.isChildOf(l,t))&&(e.undoManager.transact((()=>{const n=to(a);wo(o,t,l),t.remove();const r=oo(n);e.selection.setRng(r)})),!0)}if(!l&&!t&&0===a.startOffset&&0===a.endOffset)return e.undoManager.transact((()=>{Jt(e)})),!0}return!1},ko=(e,t)=>{const o=e.dom,n=e.selection.getStart(),r=yt(e,n),i=o.getParent(n,o.isBlock,r);if(i&&o.isEmpty(i,void 0,{checkRootAsContent:!0})){const n=mt(e.selection.getRng()),s=vo(e,n,t,r),a=o.getParent(s,"LI",r);if(s&&a){const l=e=>y(["td","th","caption"],X(e)),c=e=>e.dom===r;return!!((e,t,o=h)=>z(e,t,o).getOr(e.isNone()&&t.isNone()))(Ae(Z.fromDom(a),l,c),Ae(Z.fromDom(n.startContainer),l,c),W)&&(e.undoManager.transact((()=>{const n=a.parentNode;((e,t,o)=>{const n=e.getParent(t.parentNode,e.isBlock,o);e.remove(t),n&&e.isEmpty(n)&&e.remove(n)})(o,i,r),uo(o,n),e.selection.select(s,!0),e.selection.collapse(t)})),!0)}}return!1},Eo=e=>{const t=e.selection.getStart(),o=yt(e,t);return e.dom.getParent(t,"LI,DT,DD",o)||vt(e).length>0},To=(e,t)=>{const o=e.selection;return!Tt(e,o.getNode())&&(o.isCollapsed()?((e,t)=>Co(e,t)||ko(e,t))(e,t):(e=>!!Eo(e)&&(e.undoManager.transact((()=>{let t=!0;const o=()=>t=!1;e.on("input",o),e.execCommand("Delete"),e.off("input",o),t&&e.dispatch("input"),bo(e.dom,e.getBody())})),!0))(e))},Oo=e=>{const t=O(H(e).split("")),o=w(t,((e,t)=>{const o=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*o}));return C(o,((e,t)=>e+t),0)},Ao=e=>{if(--e<0)return"";{const t=e%26,o=Math.floor(e/26);return Ao(o)+String.fromCharCode("A".charCodeAt(0)+t)}},Mo=e=>{const t=parseInt(e.start,10);return B(e.listStyleType,"upper-alpha")?Ao(t):B(e.listStyleType,"lower-alpha")?Ao(t).toLowerCase():e.start},Po=e=>{const t=ft(e);$e(t)&&!Tt(e,t)&&e.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:Mo({start:e.dom.getAttrib(t,"start","1"),listStyleType:g.from(e.dom.getStyle(t,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{(e=>{switch((e=>/^[0-9]+$/.test(e)?2:/^[A-Z]+$/.test(e)?0:(e=>/^[a-z]+$/.test(e))(e)?1:e.length>0?4:3)(e)){case 2:return g.some({listStyleType:g.none(),start:e});case 0:return g.some({listStyleType:g.some("upper-alpha"),start:Oo(e).toString()});case 1:return g.some({listStyleType:g.some("lower-alpha"),start:Oo(e).toString()});case 3:return g.some({listStyleType:g.none(),start:""});case 4:return g.none()}})(t.getData().start).each((t=>{e.execCommand("mceListUpdate",!1,{attrs:{start:"1"===t.start?"":t.start},styles:{"list-style-type":t.listStyleType.getOr("")}})})),t.close()}})},Do=(e,t)=>()=>{const o=ft(e);return a(o)&&o.nodeName===t},Lo=e=>{e.addCommand("mceListProps",(()=>{Po(e)}))},Ro=e=>{e.on("BeforeExecCommand",(t=>{const o=t.command.toLowerCase();"indent"===o?Kt(e):"outdent"===o&&Xt(e)})),e.addCommand("InsertUnorderedList",((t,o)=>{go(e,"UL",o)})),e.addCommand("InsertOrderedList",((t,o)=>{go(e,"OL",o)})),e.addCommand("InsertDefinitionList",((t,o)=>{go(e,"DL",o)})),e.addCommand("RemoveList",(()=>{Jt(e)})),Lo(e),e.addCommand("mceListUpdate",((t,o)=>{r(o)&&((e,t)=>{const o=ft(e);null===o||Tt(e,o)||e.undoManager.transact((()=>{r(t.styles)&&e.dom.setStyles(o,t.styles),r(t.attrs)&&R(t.attrs,((t,n)=>e.dom.setAttrib(o,n,t)))}))})(e,o)})),e.addQueryStateHandler("InsertUnorderedList",Do(e,"UL")),e.addQueryStateHandler("InsertOrderedList",Do(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",Do(e,"DL"))};var No=tinymce.util.Tools.resolve("tinymce.html.Node");const Io=e=>3===e.type,Bo=e=>0===e.length,zo=e=>{const t=(t,o)=>{const n=No.create("li");_(t,(e=>n.append(e))),o?e.insert(n,o,!0):e.append(n)},o=C(e.children(),((e,o)=>Io(o)?[...e,o]:Bo(e)||Io(o)?e:(t(e,o),[])),[]);Bo(o)||t(o)},Fo=e=>{ot(e)&&(e=>{e.on("keydown",(t=>{t.keyCode!==Ie.TAB||Ie.metaKeyPressed(t)||e.undoManager.transact((()=>{(t.shiftKey?Xt(e):Kt(e))&&t.preventDefault()}))}))})(e),(e=>{e.on("ExecCommand",(t=>{const o=t.command.toLowerCase();"delete"!==o&&"forwarddelete"!==o||!Eo(e)||bo(e.dom,e.getBody())})),e.on("keydown",(t=>{t.keyCode===Ie.BACKSPACE?To(e,!1)&&t.preventDefault():t.keyCode===Ie.DELETE&&To(e,!0)&&t.preventDefault()}))})(e)},Ho=(e,t)=>o=>(o.setEnabled(e.selection.isEditable()),Ot(e,(n=>{o.setActive(kt(n.parents,t)),o.setEnabled(!Tt(e,n.element)&&e.selection.isEditable())}))),jo=(e,t)=>o=>Ot(e,(n=>o.setEnabled(kt(n.parents,t)&&!Tt(e,n.element))));e.add("lists",(e=>((e=>{(0,e.options.register)("lists_indent_on_tab",{processor:"boolean",default:!0})})(e),(e=>{e.on("PreInit",(()=>{const{parser:t}=e;t.addNodeFilter("ul,ol",(e=>_(e,zo)))}))})(e),e.hasPlugin("rtc",!0)?Lo(e):(Fo(e),Ro(e)),(e=>{const t=t=>()=>e.execCommand(t);e.hasPlugin("advlist")||(e.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:t("InsertOrderedList"),onSetup:Ho(e,"OL")}),e.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:Ho(e,"UL")}))})(e),(e=>{const t={text:"List properties...",icon:"ordered-list",onAction:()=>e.execCommand("mceListProps"),onSetup:jo(e,"OL")};e.ui.registry.addMenuItem("listprops",t),e.ui.registry.addContextMenu("lists",{update:t=>{const o=ft(e,t);return $e(o)?["listprops"]:[]}})})(e),(e=>({backspaceDelete:t=>{To(e,t)}}))(e))))}()},42540:(e,t,o)=>{o(33167)},33167:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,n=(i=String).prototype,n.isPrototypeOf(o)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===i.name)?"string":t;var o,n;var r,i,s})(t)===e,o=t("string"),n=t("object"),r=t("array"),i=e=>!(e=>null==e)(e),s=(a="function",e=>typeof e===a);var a;class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return i(e)?l.some(e):l.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);Array.prototype.slice;const c=Array.prototype.push,d=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},u=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!r(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);c.apply(t,e[o])}return t};s(Array.from)&&Array.from;const h=Object.keys,m=Object.hasOwnProperty,p=(e,t)=>g(e,t)?l.from(e[t]):l.none(),g=(e,t)=>m.call(e,t),f=e=>t=>t.options.get(e),b=f("audio_template_callback"),v=f("video_template_callback"),y=f("iframe_template_callback"),x=f("media_live_embeds"),w=f("media_filter_html"),_=f("media_url_resolver"),S=f("media_alt_source"),C=f("media_poster"),k=f("media_dimensions");var E=tinymce.util.Tools.resolve("tinymce.util.Tools"),T=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),O=tinymce.util.Tools.resolve("tinymce.html.DomParser");const A=T.DOM,M=e=>e.replace(/px$/,""),P=e=>{const t=e.attr("style"),o=t?A.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.attr("data-ephox-embed-iri"),altsource:"",poster:"",width:p(o,"max-width").map(M).getOr(""),height:p(o,"max-height").map(M).getOr("")}},D=(e,t)=>{let o={};for(let n=O({validate:!1,forced_root_block:!1},t).parse(e);n;n=n.walk())if(1===n.type){const e=n.name;if(n.attr("data-ephox-embed-iri")){o=P(n);break}o.source||"param"!==e||(o.source=n.attr("movie")),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(o.type||(o.type=e),o=E.extend(n.attributes.map,o)),"source"===e&&(o.source?o.altsource||(o.altsource=n.attr("src")):o.source=n.attr("src")),"img"!==e||o.poster||(o.poster=n.attr("src"))}return o.source=o.source||o.src||"",o.altsource=o.altsource||"",o.poster=o.poster||"",o},L=e=>{var t;const o=null!==(t=e.toLowerCase().split(".").pop())&&void 0!==t?t:"";return p({mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},o).getOr("")};var R=tinymce.util.Tools.resolve("tinymce.html.Node"),N=tinymce.util.Tools.resolve("tinymce.html.Serializer");const I=(e,t={})=>O({forced_root_block:!1,validate:!1,allow_conditional_comments:!0,...t},e),B=T.DOM,z=e=>/^[0-9.]+$/.test(e)?e+"px":e,F=(e,t)=>{const o=t.attr("style"),n=o?B.parseStyle(o):{};i(e.width)&&(n["max-width"]=z(e.width)),i(e.height)&&(n["max-height"]=z(e.height)),t.attr("style",B.serializeStyle(n))},H=["source","altsource"],j=(e,t,o,n)=>{let r=0,i=0;const s=I(n);s.addNodeFilter("source",(e=>r=e.length));const a=s.parse(e);for(let e=a;e;e=e.walk())if(1===e.type){const n=e.name;if(e.attr("data-ephox-embed-iri")){F(t,e);break}switch(n){case"video":case"object":case"embed":case"img":case"iframe":void 0!==t.height&&void 0!==t.width&&(e.attr("width",t.width),e.attr("height",t.height))}if(o)switch(n){case"video":e.attr("poster",t.poster),e.attr("src",null);for(let o=r;o<2;o++)if(t[H[o]]){const n=new R("source",1);n.attr("src",t[H[o]]),n.attr("type",t[H[o]+"mime"]||null),e.append(n)}break;case"iframe":e.attr("src",t.source);break;case"object":const o=e.getAll("img").length>0;if(t.poster&&!o){e.attr("src",t.poster);const o=new R("img",1);o.attr("src",t.poster),o.attr("width",t.width),o.attr("height",t.height),e.append(o)}break;case"source":if(i<2&&(e.attr("src",t[H[i]]),e.attr("type",t[H[i]+"mime"]||null),!t[H[i]])){e.remove();continue}i++;break;case"img":t.poster||e.remove()}}return N({},n).serialize(a)},V=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)\?h=(\w+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?h=$2&title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)\?h=(\w+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?h=$3&title=0&amp;byline=0",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],U=(e,t)=>{const o=(e=>{const t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&t.length>1?"www."===t[1]?"https://":t[1]:"https://"})(t),n=e.regex.exec(t);let r=o+e.url;if(i(n))for(let e=0;e<n.length;e++)r=r.replace("$"+e,(()=>n[e]?n[e]:""));return r.replace(/\?$/,"")},Z=e=>{const t=V.filter((t=>t.regex.test(e)));return t.length>0?E.extend({},t[0],{url:U(t[0],e)}):null},$=(e,t)=>{var o;const n=E.extend({},t);if(!n.source&&(E.extend(n,D(null!==(o=n.embed)&&void 0!==o?o:"",e.schema)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=e.convertURL(n.source,"source"),n.altsource=e.convertURL(n.altsource,"source"),n.sourcemime=L(n.source),n.altsourcemime=L(n.altsource),n.poster=e.convertURL(n.poster,"poster");const r=Z(n.source);if(r&&(n.source=r.url,n.type=r.type,n.allowfullscreen=r.allowFullscreen,n.width=n.width||String(r.w),n.height=n.height||String(r.h)),n.embed)return j(n.embed,n,!0,e.schema);{const t=b(e),o=v(e),r=y(e);return n.width=n.width||"300",n.height=n.height||"150",E.each(n,((t,o)=>{n[o]=e.dom.encode(""+t)})),"iframe"===n.type?((e,t)=>{if(t)return t(e);{const t=e.allowfullscreen?' allowFullscreen="1"':"";return'<iframe src="'+e.source+'" width="'+e.width+'" height="'+e.height+'"'+t+"></iframe>"}})(n,r):"application/x-shockwave-flash"===n.sourcemime?(e=>{let t='<object data="'+e.source+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">';return e.poster&&(t+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),t+="</object>",t})(n):-1!==n.sourcemime.indexOf("audio")?((e,t)=>t?t(e):'<audio controls="controls" src="'+e.source+'">'+(e.altsource?'\n<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</audio>")(n,t):((e,t)=>t?t(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source+'"'+(e.sourcemime?' type="'+e.sourcemime+'"':"")+" />\n"+(e.altsource?'<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</video>")(n,o)}},W=e=>e.hasAttribute("data-mce-object")||e.hasAttribute("data-ephox-embed-iri"),q={},G=e=>t=>$(e,t),Y=(e,t)=>{const o=_(e);return o?((e,t,o)=>new Promise(((n,r)=>{const i=o=>(o.html&&(q[e.source]=o),n({url:e.source,html:o.html?o.html:t(e)}));q[e.source]?i(q[e.source]):o({url:e.source}).then(i).catch(r)})))(t,G(e),o):((e,t)=>Promise.resolve({html:t(e),url:e.source}))(t,G(e))},K=(e,t)=>{const o={};return p(e,"dimensions").each((e=>{d(["width","height"],(n=>{p(t,n).orThunk((()=>p(e,n))).each((e=>o[n]=e))}))})),o},X=(e,t)=>{const o=t&&"dimensions"!==t?((e,t)=>p(t,e).bind((e=>p(e,"meta"))))(t,e).getOr({}):{},r=((e,t,o)=>r=>{const i=()=>p(e,r),s=()=>p(t,r),a=e=>p(e,"value").bind((e=>e.length>0?l.some(e):l.none()));return{[r]:(r===o?i().bind((e=>n(e)?a(e).orThunk(s):s().orThunk((()=>l.from(e))))):s().orThunk((()=>i().bind((e=>n(e)?a(e):l.from(e)))))).getOr("")}})(e,o,t);return{...r("source"),...r("altsource"),...r("poster"),...r("embed"),...K(e,o)}},J=e=>{const t={...e,source:{value:p(e,"source").getOr("")},altsource:{value:p(e,"altsource").getOr("")},poster:{value:p(e,"poster").getOr("")}};return d(["width","height"],(o=>{p(e,o).each((e=>{const n=t.dimensions||{};n[o]=e,t.dimensions=n}))})),t},Q=e=>t=>{const o=t&&t.msg?"Media embed handler error: "+t.msg:"Media embed handler threw unknown error.";e.notificationManager.open({type:"error",text:o})},ee=(e,t)=>n=>{if(o(n.url)&&n.url.trim().length>0){const o=n.html,r={...D(o,t.schema),source:n.url,embed:o};e.setData(J(r))}},te=(e,t)=>{const o=e.dom.select("*[data-mce-object]");e.insertContent(t),((e,t)=>{const o=e.dom.select("*[data-mce-object]");for(let e=0;e<t.length;e++)for(let n=o.length-1;n>=0;n--)t[e]===o[n]&&o.splice(n,1);e.selection.select(o[0])})(e,o),e.nodeChanged()},oe=(e,t)=>i(t)&&"ephox-embed-iri"===t&&i(Z(e)),ne=(e,t)=>((e,t)=>e.width!==t.width||e.height!==t.height)(e,t)&&oe(t.source,e.type),re=(e,t,o)=>{var n,r;t.embed=ne(e,t)&&k(o)?$(o,{...t,embed:""}):j(null!==(n=t.embed)&&void 0!==n?n:"",t,!1,o.schema),t.embed&&(e.source===t.source||(r=t.source,g(q,r)))?te(o,t.embed):Y(o,t).then((e=>{te(o,e.html)})).catch(Q(o))},ie=e=>{const t=(e=>{const t=e.selection.getNode(),o=W(t)?e.serializer.serialize(t,{selection:!0}):"",n=D(o,e.schema),r=(()=>{if(oe(n.source,n.type)){const o=e.dom.getRect(t);return{width:o.w.toString().replace(/px$/,""),height:o.h.toString().replace(/px$/,"")}}return{}})();return{embed:o,...n,...r}})(e),o=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(t),n=J(t),r=k(e)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],i={title:"General",name:"general",items:u([[{name:"source",type:"urlinput",filetype:"media",label:"Source",picker_text:"Browse files"}],r])},s={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},a=[];S(e)&&a.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),C(e)&&a.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});const l={title:"Advanced",name:"advanced",items:a},c=[i,s];a.length>0&&c.push(l);const d={type:"tabpanel",tabs:c},h=e.windowManager.open({title:"Insert/Edit Media",size:"normal",body:d,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{const n=X(t.getData());re(o.get(),n,e),t.close()},onChange:(t,n)=>{switch(n.name){case"source":((t,o)=>{const n=X(o.getData(),"source");t.source!==n.source&&(ee(h,e)({url:n.source,html:""}),Y(e,n).then(ee(h,e)).catch(Q(e)))})(o.get(),t);break;case"embed":(t=>{var o;const n=X(t.getData()),r=D(null!==(o=n.embed)&&void 0!==o?o:"",e.schema);t.setData(J(r))})(t);break;case"dimensions":case"altsource":case"poster":((t,o,n)=>{const r=X(t.getData(),o),i=ne(n,r)&&k(e)?{...r,embed:""}:r,s=$(e,i);t.setData(J({...i,embed:s}))})(t,n.name,o.get())}o.set(X(t.getData()))},initialData:n})};var se=tinymce.util.Tools.resolve("tinymce.Env");const ae=e=>{const t=e.name;return"iframe"===t||"video"===t||"audio"===t},le=(e,t,o,n=null)=>{const r=e.attr(o);return i(r)?r:g(t,o)?null:n},ce=(e,t,o)=>{const n="img"===t.name||"video"===e.name,r=n?"300":null,i="audio"===e.name?"30":"150",s=n?i:null;t.attr({width:le(e,o,"width",r),height:le(e,o,"height",s)})},de=(e,t)=>{const o=t.name,n=new R("img",1);return he(e,t,n),ce(t,n,{}),n.attr({style:t.attr("style"),src:se.transparentSrc,"data-mce-object":o,class:"mce-object mce-object-"+o}),n},ue=(e,t)=>{var o;const n=t.name,r=new R("span",1);r.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":n,class:"mce-preview-object mce-object-"+n}),he(e,t,r);const s=e.dom.parseStyle(null!==(o=t.attr("style"))&&void 0!==o?o:""),a=new R(n,1);if(ce(t,a,s),a.attr({src:t.attr("src"),style:t.attr("style"),class:t.attr("class")}),"iframe"===n)a.attr({allowfullscreen:t.attr("allowfullscreen"),frameborder:"0",sandbox:t.attr("sandbox"),referrerpolicy:t.attr("referrerpolicy")});else{d(["controls","crossorigin","currentTime","loop","muted","poster","preload"],(e=>{a.attr(e,t.attr(e))}));const o=r.attr("data-mce-html");i(o)&&((e,t,o,n)=>{const r=I(e.schema).parse(n,{context:t});for(;r.firstChild;)o.append(r.firstChild)})(e,n,a,unescape(o))}const l=new R("span",1);return l.attr("class","mce-shim"),r.append(a),r.append(l),r},he=(e,t,o)=>{var n;const r=null!==(n=t.attributes)&&void 0!==n?n:[];let i=r.length;for(;i--;){const t=r[i].name;let n=r[i].value;"width"===t||"height"===t||"style"===t||((e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t)(t,"data-mce-",0)||("data"!==t&&"src"!==t||(n=e.convertURL(n,t)),o.attr("data-mce-p-"+t,n))}const s=N({inner:!0},e.schema),a=new R("div",1);d(t.children(),(e=>a.append(e)));const l=s.serialize(a);l&&(o.attr("data-mce-html",escape(l)),o.empty())},me=e=>{const t=e.attr("class");return o(t)&&/\btiny-pageembed\b/.test(t)},pe=e=>{let t=e;for(;t=t.parent;)if(t.attr("data-ephox-embed-iri")||me(t))return!0;return!1},ge=(e,t,o)=>{const n=(0,e.options.get)("xss_sanitization"),r=w(e);return I(e.schema,{sanitize:n,validate:r}).parse(o,{context:t})},fe=e=>{e.on("PreInit",(()=>{const{schema:t,serializer:o,parser:n}=e,r=t.getBoolAttrs();d("webkitallowfullscreen mozallowfullscreen".split(" "),(e=>{r[e]={}})),((e,t)=>{const o=h(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})({embed:["wmode"]},((e,o)=>{const n=t.getElementRule(o);n&&d(e,(e=>{n.attributes[e]={},n.attributesOrder.push(e)}))})),n.addNodeFilter("iframe,video,audio,object,embed",(e=>t=>{let o,n=t.length;for(;n--;)o=t[n],o.parent&&(o.parent.attr("data-mce-object")||(ae(o)&&x(e)?pe(o)||o.replace(ue(e,o)):pe(o)||o.replace(de(e,o))))})(e)),o.addAttributeFilter("data-mce-object",((t,o)=>{var n;let r=t.length;for(;r--;){const i=t[r];if(!i.parent)continue;const s=i.attr(o),a=new R(s,1);if("audio"!==s){const e=i.attr("class");e&&-1!==e.indexOf("mce-preview-object")&&i.firstChild?a.attr({width:i.firstChild.attr("width"),height:i.firstChild.attr("height")}):a.attr({width:i.attr("width"),height:i.attr("height")})}a.attr({style:i.attr("style")});const l=null!==(n=i.attributes)&&void 0!==n?n:[];let c=l.length;for(;c--;){const e=l[c].name;0===e.indexOf("data-mce-p-")&&a.attr(e.substr(11),l[c].value)}const u=i.attr("data-mce-html");if(u){const t=ge(e,s,unescape(u));d(t.children(),(e=>a.append(e)))}i.replace(a)}}))})),e.on("SetContent",(()=>{const t=e.dom;d(t.select("span.mce-preview-object"),(e=>{0===t.select("span.mce-shim",e).length&&t.add(e,"span",{class:"mce-shim"})}))}))},be=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("media",(e=>((e=>{const t=e.options.register;t("audio_template_callback",{processor:"function"}),t("video_template_callback",{processor:"function"}),t("iframe_template_callback",{processor:"function"}),t("media_live_embeds",{processor:"boolean",default:!0}),t("media_filter_html",{processor:"boolean",default:!0}),t("media_url_resolver",{processor:"function"}),t("media_alt_source",{processor:"boolean",default:!0}),t("media_poster",{processor:"boolean",default:!0}),t("media_dimensions",{processor:"boolean",default:!0})})(e),(e=>{e.addCommand("mceMedia",(()=>{ie(e)}))})(e),(e=>{const t=()=>e.execCommand("mceMedia");e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:t,onSetup:t=>{const o=e.selection;t.setActive(W(o.getNode()));const n=o.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",t.setActive).unbind,r=be(e)(t);return()=>{n(),r()}}}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:t,onSetup:be(e)})})(e),(e=>{e.on("ResolveName",(e=>{let t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}))})(e),fe(e),(e=>{e.on("mousedown",(t=>{const o=e.dom.getParent(t.target,".mce-preview-object");o&&"2"===e.dom.getAttrib(o,"data-mce-selected")&&t.stopImmediatePropagation()})),e.on("click keyup touchend",(()=>{const t=e.selection.getNode();t&&e.dom.hasClass(t,"mce-preview-object")&&e.dom.getAttrib(t,"data-mce-selected")&&t.setAttribute("data-mce-selected","2")})),e.on("ObjectResized",(t=>{const o=t.target;if(o.getAttribute("data-mce-object")){let n=o.getAttribute("data-mce-html");n&&(n=unescape(n),o.setAttribute("data-mce-html",escape(j(n,{width:String(t.width),height:String(t.height)},!1,e.schema))))}}))})(e),(e=>({showDialog:()=>{ie(e)}}))(e))))}()},38619:(e,t,o)=>{o(42590)},42590:()=>{!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,n=(i=String).prototype,n.isPrototypeOf(o)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===i.name)?"string":t;var o,n;var r,i,s})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("array"),i=o("boolean"),s=(a=void 0,e=>a===e);var a;const l=e=>!(e=>null==e)(e),c=o("function"),d=o("number"),u=()=>{},h=e=>()=>e,m=e=>e,p=(e,t)=>e===t;function g(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const f=e=>{e()},b=h(!1),v=h(!0);class y{constructor(e,t){this.tag=e,this.value=t}static some(e){return new y(!0,e)}static none(){return y.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?y.some(e(this.value)):y.none()}bind(e){return this.tag?e(this.value):y.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:y.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return l(e)?y.some(e):y.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}y.singletonNone=new y(!1);Array.prototype.slice;const x=Array.prototype.indexOf,w=Array.prototype.push,_=(e,t)=>((e,t)=>x.call(e,t))(e,t)>-1,S=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return!0}return!1},C=(e,t)=>{const o=[];for(let n=0;n<e;n++)o.push(t(n));return o},k=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},E=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},T=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},O=(e,t,o)=>(E(e,((e,n)=>{o=t(o,e,n)})),o),A=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return y.some(r);if(o(r,n))break}return y.none()})(e,t,b),M=(e,t)=>(e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!r(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);w.apply(t,e[o])}return t})(k(e,t)),P=(e,t)=>{for(let o=0,n=e.length;o<n;++o){if(!0!==t(e[o],o))return!1}return!0},D=(e,t)=>t>=0&&t<e.length?y.some(e[t]):y.none();c(Array.from)&&Array.from;const L=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return y.none()},R=Object.keys,N=Object.hasOwnProperty,I=(e,t)=>{const o=R(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},B=(e,t)=>{const o={};var n;return((e,t,o,n)=>{I(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(n=o,(e,t)=>{n[t]=e}),u),o},z=e=>((e,t)=>{const o=[];return I(e,((e,n)=>{o.push(t(e,n))})),o})(e,m),F=e=>R(e).length,H=(e,t)=>j(e,t)?y.from(e[t]):y.none(),j=(e,t)=>N.call(e,t),V=(e,t)=>j(e,t)&&void 0!==e[t]&&null!==e[t],U=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Z=(e,t,o=p)=>e.exists((e=>o(e,t))),$=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},W=(e,t,o)=>e.isSome()&&t.isSome()?y.some(o(e.getOrDie(),t.getOrDie())):y.none(),q=()=>(e=>{const t=U(y.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(y.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(y.some(e))}}})((e=>e.unbind())),G=(e,t)=>((e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t)(e,t,0),Y=(K=/^\s+|\s+$/g,e=>e.replace(K,""));var K;const X=e=>e.length>0,J=(e,t=10)=>{const o=parseInt(e,t);return isNaN(o)?y.none():y.some(o)},Q=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},ee={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return Q(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return Q(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return Q(o)},fromDom:Q,fromPoint:(e,t,o)=>y.from(e.dom.elementFromPoint(t,o)).map(Q)},te=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},oe=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,ne=(e,t)=>e.dom===t.dom,re=te,ie=e=>e.dom.nodeName.toLowerCase(),se=e=>e.dom.nodeType,ae=e=>t=>se(t)===e,le=e=>8===se(e)||"#comment"===ie(e),ce=ae(1),de=ae(3),ue=ae(9),he=ae(11),me=e=>t=>ce(t)&&ie(t)===e,pe=e=>{return ue(e)?e:(t=e,ee.fromDom(t.dom.ownerDocument));var t},ge=e=>y.from(e.dom.parentNode).map(ee.fromDom),fe=(e,t)=>{const o=c(t)?t:b;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=ee.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r},be=e=>y.from(e.dom.previousSibling).map(ee.fromDom),ve=e=>y.from(e.dom.nextSibling).map(ee.fromDom),ye=e=>k(e.dom.childNodes,ee.fromDom),xe=e=>((e,t)=>{const o=e.dom.childNodes;return y.from(o[t]).map(ee.fromDom)})(e,0),we=e=>{const t=(e=>ee.fromDom(e.dom.getRootNode()))(e);return he(o=t)&&l(o.dom.host)?y.some(t):y.none();var o},_e=e=>ee.fromDom(e.dom.host),Se=(e,t)=>{ge(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Ce=(e,t)=>{ve(e).fold((()=>{ge(e).each((e=>{Ee(e,t)}))}),(e=>{Se(e,t)}))},ke=(e,t)=>{xe(e).fold((()=>{Ee(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},Ee=(e,t)=>{e.dom.appendChild(t.dom)},Te=(e,t)=>{Se(e,t),Ee(t,e)},Oe=(e,t)=>{E(t,((o,n)=>{const r=0===n?e:t[n-1];Ce(r,o)}))},Ae=(e,t)=>{E(t,(t=>{Ee(e,t)}))},Me=(e,t,o)=>{if(!(n(o)||i(o)||d(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},Pe=(e,t,o)=>{Me(e.dom,t,o)},De=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},Le=(e,t)=>y.from(De(e,t)),Re=(e,t)=>{e.dom.removeAttribute(t)},Ne=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Ie=e=>{const t=ye(e);t.length>0&&Oe(e,t),Ne(e)},Be=e=>k(e,ee.fromDom),ze=e=>void 0!==e.style&&c(e.style.getPropertyValue),Fe=e=>{const t=de(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return we(ee.fromDom(t)).fold((()=>o.body.contains(t)),(n=Fe,r=_e,e=>n(r(e))));var n,r},He=(e,t,o)=>{((e,t,o)=>{if(!n(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);ze(e)&&e.style.setProperty(t,o)})(e.dom,t,o)},je=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||Fe(e)?n:Ve(o,t)},Ve=(e,t)=>ze(e)?e.style.getPropertyValue(t):"",Ue=(e,t)=>{const o=e.dom,n=Ve(o,t);return y.from(n).filter((e=>e.length>0))},Ze=(e,t)=>{((e,t)=>{ze(e)&&e.style.removeProperty(t)})(e.dom,t),Z(Le(e,"style").map(Y),"")&&Re(e,"style")},$e=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=je(o,e);return parseFloat(t)||0}return n},n=(e,t)=>O(t,((t,o)=>{const n=je(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!d(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;ze(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}},We=(e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?y.none():y.some(t)})(e).getOr(t),qe=(e,t,o)=>We(je(e,t),o),Ge=(e,t)=>{const o=e.dom,n=o.getBoundingClientRect().width||o.offsetWidth;return"border-box"===t?n:((e,t,o,n)=>t-qe(e,`padding-${o}`,0)-qe(e,`padding-${n}`,0)-qe(e,`border-${o}-width`,0)-qe(e,`border-${n}-width`,0))(e,n,"left","right")};$e("width",(e=>e.dom.offsetWidth)),$e("width",(e=>{const t=e.dom;return Fe(e)?t.getBoundingClientRect().width:t.offsetWidth}));const Ye=e=>Ge(e,"content-box"),Ke=((e,t)=>{const o=t=>e(t)?y.from(t.dom.nodeValue):y.none();return{get:n=>{if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return o(n).getOr("")},getOption:o,set:(o,n)=>{if(!e(o))throw new Error("Can only set raw "+t+" value of a "+t+" node");o.dom.nodeValue=n}}})(de,"text"),Xe=e=>Ke.get(e),Je=(e,t)=>Ke.set(e,t);var Qe=(e,t,o,n,r)=>e(o,n)?y.some(o):c(r)&&r(o)?y.none():t(o,n,r);const et=(e,t,o)=>{let n=e.dom;const r=c(o)?o:b;for(;n.parentNode;){n=n.parentNode;const e=ee.fromDom(n);if(t(e))return y.some(e);if(r(e))break}return y.none()},tt=(e,t,o)=>et(e,(e=>te(e,t)),o),ot=(e,t)=>((e,t)=>A(e.dom.childNodes,(e=>t(ee.fromDom(e)))).map(ee.fromDom))(e,(e=>te(e,t))),nt=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return oe(o)?y.none():y.from(o.querySelector(e)).map(ee.fromDom)})(t,e),rt=(e,t,o)=>Qe(((e,t)=>te(e,t)),tt,e,t,o),it=(e,t=!1)=>{return Fe(e)?e.dom.isContentEditable:(o=e,rt(o,"[contenteditable]")).fold(h(t),(e=>"true"===st(e)));var o},st=e=>e.dom.contentEditable,at=(e,t)=>{let o=[];return E(ye(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(at(e,t))})),o},lt=(e,t)=>((e,t)=>T(ye(e),t))(e,(e=>te(e,t))),ct=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return oe(o)?[]:k(o.querySelectorAll(e),ee.fromDom)})(t,e),dt=e=>t=>ne(t,(e=>ee.fromDom(e.getBody()))(e)),ut=e=>/^\d+(\.\d+)?$/.test(e)?e+"px":e,ht=e=>ee.fromDom(e.selection.getStart()),mt=e=>{return(t=e,o=me("table"),Qe(((e,t)=>t(e)),et,t,o,n)).forall(it);var t,o,n},pt=["tfoot","thead","tbody","colgroup"],gt=(e,t,o)=>({element:e,rowspan:t,colspan:o}),ft=(e,t,o)=>({element:e,cells:t,section:o}),bt=(e,t,o=0)=>Le(e,t).map((e=>parseInt(e,10))).getOr(o),vt=(e,t)=>yt(e,t,v),yt=(e,t,o)=>M(ye(e),(e=>te(e,t)?o(e)?[e]:[]:yt(e,t,o))),xt=(e,t)=>((e,t,o=b)=>o(t)?y.none():_(e,ie(t))?y.some(t):tt(t,e.join(","),(e=>te(e,"table")||o(e))))(["td","th"],e,t),wt=(e,t)=>rt(e,"table",t),_t=e=>vt(e,"tr"),St=e=>wt(e).fold(h([]),(e=>lt(e,"colgroup"))),Ct=me("th"),kt=(e,t)=>e&&t?"sectionCells":e?"section":"cells",Et=e=>{const t=T(e,(e=>Ct(e.element)));return 0===t.length?y.some("td"):t.length===e.length?y.some("th"):y.none()},Tt=e=>{const t=k(e,(e=>(e=>{const t="thead"===e.section,o=Z(Et(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:kt(t,o)}:{type:"body"}})(e).type)),o=_(t,"header"),n=_(t,"footer");if(o||n){const e=_(t,"body");return!o||e||n?o||e||!n?y.none():y.some("footer"):y.some("header")}return y.some("body")},Ot=(e,t)=>k(e,(e=>{if("colgroup"===ie(e)){const t=k((e=>te(e,"colgroup")?lt(e,"col"):M(St(e),(e=>lt(e,"col"))))(e),(e=>{const t=bt(e,"span",1);return gt(e,1,t)}));return ft(e,t,"colgroup")}{const o=k((e=>vt(e,"th,td"))(e),(e=>{const t=bt(e,"rowspan",1),o=bt(e,"colspan",1);return gt(e,t,o)}));return ft(e,o,t(e))}})),At=e=>ge(e).map((e=>{const t=ie(e);return(e=>_(pt,e))(t)?t:"tbody"})).getOr("tbody"),Mt=e=>Le(e,"data-snooker-locked-cols").bind((e=>y.from(e.match(/\d+/g)))).map((e=>((e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o})(e,v))),Pt=(e,t)=>e+","+t,Dt=(e,t)=>{const o=M(e.all,(e=>e.cells));return T(o,t)},Lt=e=>{const t={},o=[];var n;const r=(n=e,D(n,0)).map((e=>e.element)).bind(wt).bind(Mt).getOr({});let i=0,s=0,a=0;const{pass:l,fail:c}=((e,t)=>{const o=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];(t(i,r)?o:n).push(i)}return{pass:o,fail:n}})(e,(e=>"colgroup"===e.section));E(c,(e=>{const n=[];E(e.cells,(e=>{let o=0;for(;void 0!==t[Pt(a,o)];)o++;const i=V(r,o.toString()),l=((e,t,o,n,r,i)=>({element:e,rowspan:t,colspan:o,row:n,column:r,isLocked:i}))(e.element,e.rowspan,e.colspan,a,o,i);for(let n=0;n<e.colspan;n++)for(let r=0;r<e.rowspan;r++){const e=o+n,i=Pt(a+r,e);t[i]=l,s=Math.max(s,e+1)}n.push(l)})),i++,o.push(ft(e.element,n,e.section)),a++}));const{columns:d,colgroups:u}=(e=>D(e,e.length-1))(l).map((e=>{const t=(e=>{const t={};let o=0;return E(e.cells,(e=>{const n=e.colspan;C(n,(r=>{const i=o+r;t[i]=((e,t,o)=>({element:e,colspan:t,column:o}))(e.element,n,i)})),o+=n})),t})(e),o=((e,t)=>({element:e,columns:t}))(e.element,z(t));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}}))),h=((e,t)=>({rows:e,columns:t}))(i,s);return{grid:h,access:t,all:o,columns:d,colgroups:u}},Rt=e=>{const t=(e=>{const t=_t(e),o=[...St(e),...t];return Ot(o,At)})(e);return Lt(t)},Nt=(e,t,o)=>y.from(e.access[Pt(t,o)]),It=(e,t,o)=>{const n=Dt(e,(e=>o(t,e.element)));return n.length>0?y.some(n[0]):y.none()},Bt=e=>M(e.all,(e=>e.cells)),zt=(e,t)=>y.from(e.columns[t]),Ft=(e,t)=>L(e.all,(e=>A(e.cells,(e=>ne(t,e.element))))),Ht=(e,t,o)=>{const n=k(t.selection,(t=>xt(t).bind((t=>Ft(e,t))).filter(o))),r=$(n);return i=r.length>0,s=r,i?y.some(s):y.none();var i,s},jt=(e,t)=>Ht(e,t,v),Vt=(e,t)=>P(t,(t=>((e,t)=>Ft(e,t).exists((e=>!e.isLocked)))(e,t))),Ut=(e,t)=>((e,t)=>t.mergable)(0,t).filter((t=>Vt(e,t.cells))),Zt=(e,t)=>((e,t)=>t.unmergable)(0,t).filter((t=>Vt(e,t))),$t=me("col"),Wt=me("colgroup"),qt=e=>"tr"===ie(e)||Wt(e),Gt=e=>t=>{const o=[],n=n=>{const r="td"===e?{scope:null}:{},i=t.replace(n,e,r);return o.push({item:n,sub:i}),i};return{replaceOrInit:(e,t)=>{if(qt(e)||$t(e))return e;{const r=e;return((e,t)=>A(o,(o=>t(o.item,e))))(r,t).fold((()=>n(r)),(o=>t(e,o.item)?o.sub:n(r)))}}}};var Yt=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];const Kt=(e,t,o,n)=>{const r=t(e,o);return i=(o,n)=>{const r=t(e,n);return Xt(e,o,r)},s=r,((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(n,((e,t)=>{s=i(s,e,t)})),s;var i,s},Xt=(e,t,o)=>t.bind((t=>o.filter(g(e.eq,t)))),Jt=(e,t,o)=>o.length>0?((e,t,o,n)=>n(e,t,o[0],o.slice(1)))(e,t,o,Kt):y.none(),Qt={up:h({selector:tt,closest:rt,predicate:et,all:fe}),down:h({selector:ct,predicate:at}),styles:h({get:je,getRaw:Ue,set:He,remove:Ze}),attrs:h({get:De,set:Pe,remove:Re,copyTo:(e,t)=>{((e,t)=>{const o=e.dom;I(t,((e,t)=>{Me(o,t,e)}))})(t,O(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}))}}),insert:h({before:Se,after:Ce,afterAll:Oe,append:Ee,appendAll:Ae,prepend:ke,wrap:Te}),remove:h({unwrap:Ie,remove:Ne}),create:h({nu:ee.fromTag,clone:e=>ee.fromDom(e.dom.cloneNode(!1)),text:ee.fromText}),query:h({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:be,nextSibling:ve}),property:h({children:ye,name:ie,parent:ge,document:e=>pe(e).dom,isText:de,isComment:le,isElement:ce,isSpecial:e=>{const t=ie(e);return _(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>ce(e)?Le(e,"lang"):y.none(),getText:Xe,setText:Je,isBoundary:e=>!!ce(e)&&("body"===ie(e)||_(Yt,ie(e))),isEmptyTag:e=>!!ce(e)&&_(["br","img","hr","input"],ie(e)),isNonEditable:e=>ce(e)&&"false"===De(e,"contenteditable")}),eq:ne,is:re};Gt("th"),Gt("td");const eo=(e,t)=>{const o=Rt(e);return jt(o,t).bind((e=>{const t=e[e.length-1],n=e[0].row,r=t.row+t.rowspan,i=o.all.slice(n,r);return Tt(i)})).getOr("")},to=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,oo=(e,t,o)=>{const n=It(e,t,ne),r=It(e,o,ne);return n.bind((e=>r.map((t=>{return o=e,n=t,r=Math.min(o.row,n.row),i=Math.min(o.column,n.column),s=Math.max(o.row+o.rowspan-1,n.row+n.rowspan-1),a=Math.max(o.column+o.colspan-1,n.column+n.colspan-1),{startRow:r,startCol:i,finishRow:s,finishCol:a};var o,n,r,i,s,a}))))},no=(e,t,o)=>oo(e,t,o).bind((t=>((e,t)=>{let o=!0;const n=g(to,t);for(let r=t.startRow;r<=t.finishRow;r++)for(let i=t.startCol;i<=t.finishCol;i++)o=o&&Nt(e,r,i).exists(n);return o?y.some(t):y.none()})(e,t))),ro=Rt;var io=tinymce.util.Tools.resolve("tinymce.util.Tools");const so=(e,t,o)=>{const n=e.select("td,th",t);let r;for(let t=0;t<n.length;t++){const i=e.getStyle(n[t],o);if(s(r)&&(r=i),r!==i)return""}return r},ao=(e,t,o)=>{io.each("left center right".split(" "),(n=>{n!==o&&e.formatter.remove("align"+n,{},t)})),o&&e.formatter.apply("align"+o,{},t)},lo=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})};var co=tinymce.util.Tools.resolve("tinymce.Env");const uo=C(5,(e=>{const t=`${e+1}px`;return{title:t,value:t}})),ho=k(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(e=>({title:e,value:e.toLowerCase()}))),mo="100%",po=e=>{var t;const o=e.dom,n=null!==(t=o.getParent(e.selection.getStart(),o.isBlock))&&void 0!==t?t:e.getBody();return Ye(ee.fromDom(n))+"px"},go=e=>t=>t.options.get(e),fo=go("table_sizing_mode"),bo=go("table_border_widths"),vo=go("table_border_styles"),yo=go("table_cell_advtab"),xo=go("table_row_advtab"),wo=go("table_advtab"),_o=go("table_appearance_options"),So=go("table_grid"),Co=go("table_style_by_css"),ko=go("table_cell_class_list"),Eo=go("table_row_class_list"),To=go("table_class_list"),Oo=go("table_toolbar"),Ao=go("table_background_color_map"),Mo=go("table_border_color_map"),Po=e=>"fixed"===fo(e),Do=e=>"responsive"===fo(e),Lo=e=>{const t=e.options,o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:((e,t)=>Do(e)||!Co(e)?t:Po(e)?{...t,width:po(e)}:{...t,width:mo})(e,o)},Ro=e=>{const t=e.options,o=t.get("table_default_attributes");return t.isSet("table_default_attributes")?o:((e,t)=>Do(e)||Co(e)?t:Po(e)?{...t,width:po(e)}:{...t,width:mo})(e,o)},No=e=>tt(e,"table"),Io=(e,t,o)=>nt(e,t).bind((t=>nt(e,o).bind((e=>{return(o=No,n=[t,e],Jt(Qt,((e,t)=>o(t)),n)).map((o=>({first:t,last:e,table:o})));var o,n})))),Bo=(e,t)=>((e,t)=>{const o=ct(e,t);return o.length>0?y.some(o):y.none()})(e,t),zo=(e,t,o)=>Io(e,t,o).bind((t=>{const o=t=>ne(e,t),n="thead,tfoot,tbody,table",r=tt(t.first,n,o),i=tt(t.last,n,o);return r.bind((e=>i.bind((o=>ne(e,o)?((e,t,o)=>{const n=ro(e);return no(n,t,o)})(t.table,t.first,t.last):y.none()))))})),Fo=m,Ho=e=>{const t=(e,t)=>Le(e,t).exists((e=>parseInt(e,10)>1));return e.length>0&&P(e,(e=>t(e,"rowspan")||t(e,"colspan")))?y.some(e):y.none()},jo=(e,t,o)=>t.length<=1?y.none():zo(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t}))),Vo="data-mce-selected",Uo="data-mce-first-selected",Zo="data-mce-last-selected",$o={selected:Vo,selectedSelector:"td["+Vo+"],th["+Vo+"]",firstSelected:Uo,firstSelectedSelector:"td["+Uo+"],th["+Uo+"]",lastSelected:Zo,lastSelectedSelector:"td["+Zo+"],th["+Zo+"]"},Wo=e=>(t,o)=>{const n=ie(t),r="col"===n||"colgroup"===n?wt(i=t).bind((e=>Bo(e,$o.firstSelectedSelector))).fold(h(i),(e=>e[0])):t;var i;return rt(r,e,o)},qo=Wo("th,td,caption"),Go=Wo("th,td"),Yo=e=>Be(e.model.table.getSelectedCells()),Ko=(e,t)=>{const o=Go(e),n=o.bind((e=>wt(e))).map((e=>_t(e)));return W(o,n,((e,o)=>T(o,(o=>S(Be(o.dom.cells),(o=>"1"===De(o,t)||ne(o,e))))))).getOr([])},Xo=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Jo=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Qo=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,en=e=>{return(t=e,o="#",G(t,o)?((e,t)=>e.substring(t))(t,o.length):t).toUpperCase();var t,o},tn=e=>(e=>Jo.test(e)||Qo.test(e))(e)?y.some({value:en(e)}):y.none(),on=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},nn=e=>(e=>({value:en(e)}))(on(e.red)+on(e.green)+on(e.blue)),rn=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,sn=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,an=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n}),ln=(e,t,o,n)=>{const r=parseInt(e,10),i=parseInt(t,10),s=parseInt(o,10),a=parseFloat(n);return an(r,i,s,a)},cn=e=>{const t=rn.exec(e);if(null!==t)return y.some(ln(t[1],t[2],t[3],"1"));const o=sn.exec(e);return null!==o?y.some(ln(o[1],o[2],o[3],o[4])):y.none()},dn=(e,t,o)=>n=>{const r=q(),i=!X(o);const s=()=>{const s=Yo(e),a=n=>e.formatter.match(t,{value:o},n.dom,i);i?(n.setActive(!S(s,a)),r.set(e.formatter.formatChanged(t,(e=>n.setActive(!e)),!0))):(n.setActive(P(s,a)),r.set(e.formatter.formatChanged(t,n.setActive,!1,{value:o})))};return e.initialized?s():e.on("init",s),r.clear},un=e=>V(e,"menu"),hn=e=>k(e,(e=>{const t=e.text||e.title||"";return un(e)?{text:t,items:hn(e.menu)}:{text:t,value:e.value}})),mn=e=>e.length?y.some(hn([{text:"Select...",value:"mce-no-match"},...e])):y.none(),pn=(e,t,o,n)=>k(t,(t=>{const r=t.text||t.title;return un(t)?{type:"nestedmenuitem",text:r,getSubmenuItems:()=>pn(e,t.menu,o,n)}:{text:r,type:"togglemenuitem",onAction:()=>n(t.value),onSetup:dn(e,o,t.value)}})),gn=(e,t)=>o=>{e.execCommand("mceTableApplyCellStyle",!1,{[t]:o})},fn=e=>M(e,(e=>un(e)?[{...e,menu:fn(e.menu)}]:X(e.value)?[e]:[])),bn=(e,t,o,n)=>r=>r(pn(e,t,o,n)),vn=(e,t,o)=>{const n=k(t,(e=>{return{text:e.title,value:"#"+(t=e.value,tn(t).orThunk((()=>cn(t).map(nn))).getOrThunk((()=>{const e=document.createElement("canvas");e.height=1,e.width=1;const o=e.getContext("2d");o.clearRect(0,0,e.width,e.height),o.fillStyle="#FFFFFF",o.fillStyle=t,o.fillRect(0,0,1,1);const n=o.getImageData(0,0,1,1).data,r=n[0],i=n[1],s=n[2],a=n[3];return nn(an(r,i,s,a))}))).value,type:"choiceitem"};var t}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:n.length>0?n:void 0,allowCustomColors:!1},onAction:t=>{const n="remove"===t.value?"":t.value;e.execCommand("mceTableApplyCellStyle",!1,{[o]:n})}}]},yn=e=>()=>{const t="header"===e.queryCommandValue("mceTableRowType")?"body":"header";e.execCommand("mceTableRowType",!1,{type:t})},xn=e=>()=>{const t="th"===e.queryCommandValue("mceTableColType")?"td":"th";e.execCommand("mceTableColType",!1,{type:t})},wn=[{name:"width",type:"input",label:"Width"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:Xo}],_n=e=>wn.concat((e=>mn(ko(e)).map((e=>({name:"class",type:"listbox",label:"Class",items:e}))))(e).toArray()),Sn=(e,t)=>{const o=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(hn(vo(e)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===t?[{name:"borderwidth",type:"input",label:"Border width"}].concat(o):o}},Cn=(e,t)=>{const o=e.dom;return{setAttrib:(e,n)=>{o.setAttrib(t,e,n)},setStyle:(e,n)=>{o.setStyle(t,e,n)},setFormat:(o,n)=>{""===n?e.formatter.remove(o,{value:null},t,!0):e.formatter.apply(o,{value:n},t)}}},kn=e=>{return G(e,"rgb")?cn(t=e).map(nn).map((e=>"#"+e.value)).getOr(t):e;var t},En=e=>{const t=ee.fromDom(e);return{borderwidth:Ue(t,"border-width").getOr(""),borderstyle:Ue(t,"border-style").getOr(""),bordercolor:Ue(t,"border-color").map(kn).getOr(""),backgroundcolor:Ue(t,"background-color").map(kn).getOr("")}},Tn=e=>{const t=e[0],o=e.slice(1);return E(o,(e=>{E(R(t),(o=>{I(e,((e,n)=>{const r=t[o];""!==r&&o===n&&r!==e&&(t[o]="class"===o?"mce-no-match":"")}))}))})),t},On=(e,t,o,n)=>A(e,(e=>!s(o.formatter.matchNode(n,t+e)))).getOr(""),An=g(On,["left","center","right"],"align"),Mn=g(On,["top","middle","bottom"],"valign"),Pn=e=>wt(ee.fromDom(e)).map((t=>{const o={selection:Be(e.cells)};return eo(t,o)})).getOr(""),Dn=(e,t)=>{const o=Rt(e),n=Bt(o),r=T(n,(e=>S(t,(t=>ne(e.element,t)))));return k(r,(e=>({element:e.element.dom,column:zt(o,e.column).map((e=>e.element.dom))})))},Ln=(e,t,o,n)=>{const r=1===t.length;E(t,(t=>{const i=t.element,s=r?v:n,a=Cn(e,i);((e,t,o,n)=>{n("scope")&&e.setAttrib("scope",o.scope),n("class")&&"mce-no-match"!==o.class&&e.setAttrib("class",o.class),n("width")&&t.setStyle("width",ut(o.width))})(a,t.column.map((t=>Cn(e,t))).getOr(a),o,s),yo(e)&&((e,t,o)=>{o("backgroundcolor")&&e.setFormat("tablecellbackgroundcolor",t.backgroundcolor),o("bordercolor")&&e.setFormat("tablecellbordercolor",t.bordercolor),o("borderstyle")&&e.setFormat("tablecellborderstyle",t.borderstyle),o("borderwidth")&&e.setFormat("tablecellborderwidth",ut(t.borderwidth))})(a,o,s),n("halign")&&ao(e,i,o.halign),n("valign")&&((e,t,o)=>{io.each("top middle bottom".split(" "),(n=>{n!==o&&e.formatter.remove("valign"+n,{},t)})),o&&e.formatter.apply("valign"+o,{},t)})(e,i,o.valign)}))},Rn=(e,t,o,n)=>{const r=n.getData();n.close(),e.undoManager.transact((()=>{((e,t,o,n)=>{const r=B(n,((e,t)=>o[t]!==e));F(r)>0&&t.length>=1&&wt(t[0]).each((o=>{const i=Dn(o,t),s=F(B(r,((e,t)=>"scope"!==t&&"celltype"!==t)))>0,a=j(r,"celltype");(s||j(r,"scope"))&&Ln(e,i,n,g(j,r)),a&&((e,t)=>{e.execCommand("mceTableCellType",!1,{type:t.celltype,no_events:!0})})(e,n),lo(e,o.dom,{structure:a,style:s})}))})(e,t,o,r),e.focus()}))},Nn=(e,t)=>{const o=wt(t[0]).map((o=>k(Dn(o,t),(t=>((e,t,o,n)=>{const r=e.dom,i=n.getOr(t);return{width:(a=i,l="width",r.getStyle(a,l)||r.getAttrib(a,l)),scope:r.getAttrib(t,"scope"),celltype:(s=t,s.nodeName.toLowerCase()),class:r.getAttrib(t,"class",""),halign:An(e,t),valign:Mn(e,t),...o?En(t):{}};var s,a,l})(e,t.element,yo(e),t.column)))));return Tn(o.getOrDie())},In=e=>{const t=Yo(e);if(0===t.length)return;const o=Nn(e,t),n={type:"tabpanel",tabs:[{title:"General",name:"general",items:_n(e)},Sn(e,"cell")]},r={type:"panel",items:[{type:"grid",columns:2,items:_n(e)}]};e.windowManager.open({title:"Cell Properties",size:"normal",body:yo(e)?n:r,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onSubmit:g(Rn,e,t,o)})},Bn=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],zn=e=>Bn.concat((e=>mn(Eo(e)).map((e=>({name:"class",type:"listbox",label:"Class",items:e}))))(e).toArray()),Fn=(e,t,o,n)=>{const r=1===t.length?v:n;E(t,(t=>{const i=lt(ee.fromDom(t),"td,th"),s=Cn(e,t);((e,t,o)=>{o("class")&&"mce-no-match"!==t.class&&e.setAttrib("class",t.class),o("height")&&e.setStyle("height",ut(t.height))})(s,o,r),xo(e)&&((e,t,o)=>{o("backgroundcolor")&&e.setStyle("background-color",t.backgroundcolor),o("bordercolor")&&e.setStyle("border-color",t.bordercolor),o("borderstyle")&&e.setStyle("border-style",t.borderstyle)})(s,o,r),n("height")&&E(i,(t=>{e.dom.setStyle(t.dom,"height",null)})),n("align")&&ao(e,t,o.align)}))},Hn=(e,t,o,n)=>{const r=n.getData();n.close(),e.undoManager.transact((()=>{((e,t,o,n)=>{const r=B(n,((e,t)=>o[t]!==e));if(F(r)>0){const o=j(r,"type"),i=!o||F(r)>1;i&&Fn(e,t,n,g(j,r)),o&&((e,t)=>{e.execCommand("mceTableRowType",!1,{type:t.type,no_events:!0})})(e,n),wt(ee.fromDom(t[0])).each((t=>lo(e,t.dom,{structure:o,style:i})))}})(e,t,o,r),e.focus()}))},jn=e=>{const t=Ko(ht(e),$o.selected);if(0===t.length)return;const o=k(t,(t=>((e,t,o)=>{const n=e.dom;return{height:n.getStyle(t,"height")||n.getAttrib(t,"height"),class:n.getAttrib(t,"class",""),type:Pn(t),align:An(e,t),...o?En(t):{}}})(e,t.dom,xo(e)))),n=Tn(o),r={type:"tabpanel",tabs:[{title:"General",name:"general",items:zn(e)},Sn(e,"row")]},i={type:"panel",items:[{type:"grid",columns:2,items:zn(e)}]};e.windowManager.open({title:"Row Properties",size:"normal",body:xo(e)?r:i,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:n,onSubmit:g(Hn,e,k(t,(e=>e.dom)),n)})},Vn=(e,t,o)=>{const n=o?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],r=_o(e)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],i=t.length>0?[{name:"class",type:"listbox",label:"Class",items:t}]:[];return n.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(r).concat([{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(i)},Un=(e,t,o,r)=>{if("TD"===t.tagName||"TH"===t.tagName)n(o)&&l(r)?e.setStyle(t,o,r):e.setStyles(t,o);else if(t.children)for(let n=0;n<t.children.length;n++)Un(e,t.children[n],o,r)},Zn=(e,t,o,n)=>{const r=e.dom,i={},a={},l=Co(e),c=wo(e),d=0===parseFloat(o.border);if(s(o.class)||"mce-no-match"===o.class||(i.class=o.class),a.height=ut(o.height),l?a.width=ut(o.width):r.getAttrib(t,"width")&&(i.width=(e=>e?e.replace(/px$/,""):"")(o.width)),l?(d?(i.border=0,a["border-width"]=""):(a["border-width"]=ut(o.border),i.border=1),a["border-spacing"]=ut(o.cellspacing)):(i.border=d?0:o.border,i.cellpadding=o.cellpadding,i.cellspacing=o.cellspacing),l&&t.children){const e={};if(d?e["border-width"]="":n.border&&(e["border-width"]=ut(o.border)),n.cellpadding&&(e.padding=ut(o.cellpadding)),c&&n.bordercolor&&(e["border-color"]=o.bordercolor),!(e=>{for(const t in e)if(N.call(e,t))return!1;return!0})(e))for(let o=0;o<t.children.length;o++)Un(r,t.children[o],e)}if(c){const e=o;a["background-color"]=e.backgroundcolor,a["border-color"]=e.bordercolor,a["border-style"]=e.borderstyle}r.setStyles(t,{...Lo(e),...a}),r.setAttribs(t,{...Ro(e),...i})},$n=(e,t,o,n)=>{const r=e.dom,i=n.getData(),s=B(i,((e,t)=>o[t]!==e));n.close(),e.undoManager.transact((()=>{if(!t){const o=J(i.cols).getOr(1),n=J(i.rows).getOr(1);e.execCommand("mceInsertTable",!1,{rows:n,columns:o}),t=Go(ht(e),dt(e)).bind((t=>wt(t,dt(e)))).map((e=>e.dom)).getOrDie()}if(F(s)>0){const o={border:j(s,"border"),bordercolor:j(s,"bordercolor"),cellpadding:j(s,"cellpadding")};Zn(e,t,i,o);const n=r.select("caption",t)[0];(n&&!i.caption||!n&&i.caption)&&e.execCommand("mceTableToggleCaption"),ao(e,t,i.align)}if(e.focus(),e.addVisual(),F(s)>0){const o=j(s,"caption"),n=!o||F(s)>1;lo(e,t,{structure:o,style:n})}}))},Wn=(e,t)=>{const o=e.dom;let n,r=((e,t)=>{const o=Lo(e),n=Ro(e),r=t?{borderstyle:H(o,"border-style").getOr(""),bordercolor:kn(H(o,"border-color").getOr("")),backgroundcolor:kn(H(o,"background-color").getOr(""))}:{};return{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:"",...o,...n,...r,...(()=>{const t=o["border-width"];return Co(e)&&t?{border:t}:H(n,"border").fold((()=>({})),(e=>({border:e})))})(),...{...H(o,"border-spacing").or(H(n,"cellspacing")).fold((()=>({})),(e=>({cellspacing:e}))),...H(o,"border-padding").or(H(n,"cellpadding")).fold((()=>({})),(e=>({cellpadding:e})))}}})(e,wo(e));t?(r.cols="1",r.rows="1",wo(e)&&(r.borderstyle="",r.bordercolor="",r.backgroundcolor="")):(n=o.getParent(e.selection.getStart(),"table",e.getBody()),n?r=((e,t,o)=>{const n=e.dom,r=Co(e)?n.getStyle(t,"border-spacing")||n.getAttrib(t,"cellspacing"):n.getAttrib(t,"cellspacing")||n.getStyle(t,"border-spacing"),i=Co(e)?so(n,t,"padding")||n.getAttrib(t,"cellpadding"):n.getAttrib(t,"cellpadding")||so(n,t,"padding");return{width:n.getStyle(t,"width")||n.getAttrib(t,"width"),height:n.getStyle(t,"height")||n.getAttrib(t,"height"),cellspacing:null!=r?r:"",cellpadding:null!=i?i:"",border:((t,o)=>{const n=Ue(ee.fromDom(o),"border-width");return Co(e)&&n.isSome()?n.getOr(""):t.getAttrib(o,"border")||so(e.dom,o,"border-width")||so(e.dom,o,"border")||""})(n,t),caption:!!n.select("caption",t)[0],class:n.getAttrib(t,"class",""),align:An(e,t),...o?En(t):{}}})(e,n,wo(e)):wo(e)&&(r.borderstyle="",r.bordercolor="",r.backgroundcolor=""));const i=mn(To(e));i.isSome()&&r.class&&(r.class=r.class.replace(/\s*mce\-item\-table\s*/g,""));const s={type:"grid",columns:2,items:Vn(e,i.getOr([]),t)},a=wo(e)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[s]},Sn(e,"table")]}:{type:"panel",items:[s]};e.windowManager.open({title:"Table Properties",size:"normal",body:a,onSubmit:g($n,e,n,r),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r})},qn=e=>{I({mceTableProps:g(Wn,e,!1),mceTableRowProps:g(jn,e),mceTableCellProps:g(In,e),mceInsertTableDialog:g(Wn,e,!0)},((t,o)=>e.addCommand(o,(()=>{return o=t,void(mt(ht(e))&&o());var o}))))},Gn=e=>{const t=U(y.none()),o=U([]);let n=y.none();const r=me("caption"),i=e=>n.forall((t=>!t[e])),s=()=>qo((e=>ee.fromDom(e.selection.getEnd()))(e),dt(e)),a=()=>qo(ht(e),dt(e)).bind((t=>{return o=W(wt(t),s().bind(wt),((o,n)=>ne(o,n)?r(t)?y.some((e=>({element:e,mergable:y.none(),unmergable:y.none(),selection:[e]}))(t)):y.some(((e,t,o)=>({element:o,mergable:jo(t,e,$o),unmergable:Ho(e),selection:Fo(e)}))(Yo(e),o,t)):y.none())),o.bind(m);var o})),l=e=>wt(e.element).map((t=>{const o=Rt(t),n=jt(o,e).getOr([]),r=O(n,((e,t)=>(t.isLocked&&(e.onAny=!0,0===t.column?e.onFirst=!0:t.column+t.colspan>=o.grid.columns&&(e.onLast=!0)),e)),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Ut(o,e).isSome(),unmergeable:Zt(o,e).isSome(),locked:r}})),c=()=>{t.set((e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)})(a)()),n=t.get().bind(l),E(o.get(),f)},d=e=>(e(),o.set(o.get().concat([e])),()=>{o.set(T(o.get(),(t=>t!==e)))}),u=(o,n)=>d((()=>t.get().fold((()=>{o.setEnabled(!1)}),(t=>{o.setEnabled(!n(t)&&e.selection.isEditable())})))),h=(o,n,r)=>d((()=>t.get().fold((()=>{o.setEnabled(!1),o.setActive(!1)}),(t=>{o.setEnabled(!n(t)&&e.selection.isEditable()),o.setActive(r(t))})))),p=e=>n.exists((t=>t.locked[e])),g=(t,o)=>n=>h(n,(e=>r(e.element)),(()=>e.queryCommandValue(t)===o)),v=g("mceTableRowType","header"),x=g("mceTableColType","th");return e.on("NodeChange ExecCommand TableSelectorChange",c),{onSetupTable:e=>u(e,(e=>!1)),onSetupCellOrRow:e=>u(e,(e=>r(e.element))),onSetupColumn:e=>t=>u(t,(t=>r(t.element)||p(e))),onSetupPasteable:e=>t=>u(t,(t=>r(t.element)||e().isNone())),onSetupPasteableColumn:(e,t)=>o=>u(o,(o=>r(o.element)||e().isNone()||p(t))),onSetupMergeable:e=>u(e,(e=>i("mergeable"))),onSetupUnmergeable:e=>u(e,(e=>i("unmergeable"))),resetTargets:c,onSetupTableWithCaption:t=>h(t,b,(t=>wt(t.element,dt(e)).exists((e=>ot(e,"caption").isSome())))),onSetupTableRowHeaders:v,onSetupTableColumnHeaders:x,targets:t.get}};var Yn=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const Kn="x-tinymce/dom-table-",Xn=Kn+"rows",Jn=Kn+"columns",Qn=e=>{var t;const o=null!==(t=Yn.read())&&void 0!==t?t:[];return L(o,(t=>y.from(t.getType(e))))},er=()=>Qn(Xn),tr=()=>Qn(Jn),or=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}},nr=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}},rr=e=>{const t=Gn(e);(e=>{const t=e.options.register;t("table_border_widths",{processor:"object[]",default:uo}),t("table_border_styles",{processor:"object[]",default:ho}),t("table_cell_advtab",{processor:"boolean",default:!0}),t("table_row_advtab",{processor:"boolean",default:!0}),t("table_advtab",{processor:"boolean",default:!0}),t("table_appearance_options",{processor:"boolean",default:!0}),t("table_grid",{processor:"boolean",default:!co.deviceType.isTouch()}),t("table_cell_class_list",{processor:"object[]",default:[]}),t("table_row_class_list",{processor:"object[]",default:[]}),t("table_class_list",{processor:"object[]",default:[]}),t("table_toolbar",{processor:"string",default:"tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"}),t("table_background_color_map",{processor:"object[]",default:[]}),t("table_border_color_map",{processor:"object[]",default:[]})})(e),qn(e),((e,t)=>{const o=t=>()=>e.execCommand(t),n=(t,n)=>!!e.queryCommandSupported(n.command)&&(e.ui.registry.addMenuItem(t,{...n,onAction:c(n.onAction)?n.onAction:o(n.command)}),!0),r=(t,n)=>{e.queryCommandSupported(n.command)&&e.ui.registry.addToggleMenuItem(t,{...n,onAction:c(n.onAction)?n.onAction:o(n.command)})},i=t=>{e.execCommand("mceInsertTable",!1,{rows:t.numRows,columns:t.numColumns})},s=[n("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",command:"mceTableInsertRowBefore",onSetup:t.onSetupCellOrRow}),n("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",command:"mceTableInsertRowAfter",onSetup:t.onSetupCellOrRow}),n("tabledeleterow",{text:"Delete row",icon:"table-delete-row",command:"mceTableDeleteRow",onSetup:t.onSetupCellOrRow}),n("tablerowprops",{text:"Row properties",icon:"table-row-properties",command:"mceTableRowProps",onSetup:t.onSetupCellOrRow}),n("tablecutrow",{text:"Cut row",icon:"cut-row",command:"mceTableCutRow",onSetup:t.onSetupCellOrRow}),n("tablecopyrow",{text:"Copy row",icon:"duplicate-row",command:"mceTableCopyRow",onSetup:t.onSetupCellOrRow}),n("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",command:"mceTablePasteRowBefore",onSetup:t.onSetupPasteable(er)}),n("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",command:"mceTablePasteRowAfter",onSetup:t.onSetupPasteable(er)})],a=[n("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",command:"mceTableInsertColBefore",onSetup:t.onSetupColumn("onFirst")}),n("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",command:"mceTableInsertColAfter",onSetup:t.onSetupColumn("onLast")}),n("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",command:"mceTableDeleteCol",onSetup:t.onSetupColumn("onAny")}),n("tablecutcolumn",{text:"Cut column",icon:"cut-column",command:"mceTableCutCol",onSetup:t.onSetupColumn("onAny")}),n("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",command:"mceTableCopyCol",onSetup:t.onSetupColumn("onAny")}),n("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",command:"mceTablePasteColBefore",onSetup:t.onSetupPasteableColumn(tr,"onFirst")}),n("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",command:"mceTablePasteColAfter",onSetup:t.onSetupPasteableColumn(tr,"onLast")})],l=[n("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",command:"mceTableCellProps",onSetup:t.onSetupCellOrRow}),n("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",command:"mceTableMergeCells",onSetup:t.onSetupMergeable}),n("tablesplitcells",{text:"Split cell",icon:"table-split-cells",command:"mceTableSplitCells",onSetup:t.onSetupUnmergeable})];So(e)?e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"inserttable",onAction:i}],onSetup:nr(e)}):e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTableDialog"),onSetup:nr(e)}),e.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:o("mceInsertTableDialog"),onSetup:nr(e)}),n("tableprops",{text:"Table properties",onSetup:t.onSetupTable,command:"mceTableProps"}),n("deletetable",{text:"Delete table",icon:"table-delete-table",onSetup:t.onSetupTable,command:"mceTableDelete"}),_(s,!0)&&e.ui.registry.addNestedMenuItem("row",{type:"nestedmenuitem",text:"Row",getSubmenuItems:h("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")}),_(a,!0)&&e.ui.registry.addNestedMenuItem("column",{type:"nestedmenuitem",text:"Column",getSubmenuItems:h("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")}),_(l,!0)&&e.ui.registry.addNestedMenuItem("cell",{type:"nestedmenuitem",text:"Cell",getSubmenuItems:h("tablecellprops tablemergecells tablesplitcells")}),e.ui.registry.addContextMenu("table",{update:()=>(t.resetTargets(),t.targets().fold(h(""),(e=>"caption"===ie(e.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable")))});const d=fn(To(e));0!==d.length&&e.queryCommandSupported("mceTableToggleClass")&&e.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:()=>pn(e,d,"tableclass",(t=>e.execCommand("mceTableToggleClass",!1,t))),onSetup:t.onSetupTable});const u=fn(ko(e));0!==u.length&&e.queryCommandSupported("mceTableCellToggleClass")&&e.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:()=>pn(e,u,"tablecellclass",(t=>e.execCommand("mceTableCellToggleClass",!1,t))),onSetup:t.onSetupCellOrRow}),e.queryCommandSupported("mceTableApplyCellStyle")&&(e.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:()=>pn(e,Xo,"tablecellverticalalign",gn(e,"vertical-align")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:()=>pn(e,bo(e),"tablecellborderwidth",gn(e,"border-width")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:()=>pn(e,vo(e),"tablecellborderstyle",gn(e,"border-style")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:()=>vn(e,Ao(e),"background-color"),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:()=>vn(e,Mo(e),"border-color"),onSetup:t.onSetupCellOrRow})),r("tablecaption",{icon:"table-caption",text:"Table caption",command:"mceTableToggleCaption",onSetup:t.onSetupTableWithCaption}),r("tablerowheader",{text:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:yn(e),onSetup:t.onSetupTableRowHeaders}),r("tablecolheader",{text:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:xn(e),onSetup:t.onSetupTableRowHeaders})})(e,t),((e,t)=>{e.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",onSetup:or(e),fetch:e=>e("inserttable | cell row column | advtablesort | tableprops deletetable")});const o=t=>()=>e.execCommand(t),n=(t,n)=>{e.queryCommandSupported(n.command)&&e.ui.registry.addButton(t,{...n,onAction:c(n.onAction)?n.onAction:o(n.command)})},r=(t,n)=>{e.queryCommandSupported(n.command)&&e.ui.registry.addToggleButton(t,{...n,onAction:c(n.onAction)?n.onAction:o(n.command)})};n("tableprops",{tooltip:"Table properties",command:"mceTableProps",icon:"table",onSetup:t.onSetupTable}),n("tabledelete",{tooltip:"Delete table",command:"mceTableDelete",icon:"table-delete-table",onSetup:t.onSetupTable}),n("tablecellprops",{tooltip:"Cell properties",command:"mceTableCellProps",icon:"table-cell-properties",onSetup:t.onSetupCellOrRow}),n("tablemergecells",{tooltip:"Merge cells",command:"mceTableMergeCells",icon:"table-merge-cells",onSetup:t.onSetupMergeable}),n("tablesplitcells",{tooltip:"Split cell",command:"mceTableSplitCells",icon:"table-split-cells",onSetup:t.onSetupUnmergeable}),n("tableinsertrowbefore",{tooltip:"Insert row before",command:"mceTableInsertRowBefore",icon:"table-insert-row-above",onSetup:t.onSetupCellOrRow}),n("tableinsertrowafter",{tooltip:"Insert row after",command:"mceTableInsertRowAfter",icon:"table-insert-row-after",onSetup:t.onSetupCellOrRow}),n("tabledeleterow",{tooltip:"Delete row",command:"mceTableDeleteRow",icon:"table-delete-row",onSetup:t.onSetupCellOrRow}),n("tablerowprops",{tooltip:"Row properties",command:"mceTableRowProps",icon:"table-row-properties",onSetup:t.onSetupCellOrRow}),n("tableinsertcolbefore",{tooltip:"Insert column before",command:"mceTableInsertColBefore",icon:"table-insert-column-before",onSetup:t.onSetupColumn("onFirst")}),n("tableinsertcolafter",{tooltip:"Insert column after",command:"mceTableInsertColAfter",icon:"table-insert-column-after",onSetup:t.onSetupColumn("onLast")}),n("tabledeletecol",{tooltip:"Delete column",command:"mceTableDeleteCol",icon:"table-delete-column",onSetup:t.onSetupColumn("onAny")}),n("tablecutrow",{tooltip:"Cut row",command:"mceTableCutRow",icon:"cut-row",onSetup:t.onSetupCellOrRow}),n("tablecopyrow",{tooltip:"Copy row",command:"mceTableCopyRow",icon:"duplicate-row",onSetup:t.onSetupCellOrRow}),n("tablepasterowbefore",{tooltip:"Paste row before",command:"mceTablePasteRowBefore",icon:"paste-row-before",onSetup:t.onSetupPasteable(er)}),n("tablepasterowafter",{tooltip:"Paste row after",command:"mceTablePasteRowAfter",icon:"paste-row-after",onSetup:t.onSetupPasteable(er)}),n("tablecutcol",{tooltip:"Cut column",command:"mceTableCutCol",icon:"cut-column",onSetup:t.onSetupColumn("onAny")}),n("tablecopycol",{tooltip:"Copy column",command:"mceTableCopyCol",icon:"duplicate-column",onSetup:t.onSetupColumn("onAny")}),n("tablepastecolbefore",{tooltip:"Paste column before",command:"mceTablePasteColBefore",icon:"paste-column-before",onSetup:t.onSetupPasteableColumn(tr,"onFirst")}),n("tablepastecolafter",{tooltip:"Paste column after",command:"mceTablePasteColAfter",icon:"paste-column-after",onSetup:t.onSetupPasteableColumn(tr,"onLast")}),n("tableinsertdialog",{tooltip:"Insert table",command:"mceInsertTableDialog",icon:"table",onSetup:or(e)});const i=fn(To(e));0!==i.length&&e.queryCommandSupported("mceTableToggleClass")&&e.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:bn(e,i,"tableclass",(t=>e.execCommand("mceTableToggleClass",!1,t))),onSetup:t.onSetupTable});const s=fn(ko(e));0!==s.length&&e.queryCommandSupported("mceTableCellToggleClass")&&e.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:bn(e,s,"tablecellclass",(t=>e.execCommand("mceTableCellToggleClass",!1,t))),onSetup:t.onSetupCellOrRow}),e.queryCommandSupported("mceTableApplyCellStyle")&&(e.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:bn(e,Xo,"tablecellverticalalign",gn(e,"vertical-align")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:bn(e,bo(e),"tablecellborderwidth",gn(e,"border-width")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:bn(e,vo(e),"tablecellborderstyle",gn(e,"border-style")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:t=>t(vn(e,Ao(e),"background-color")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:t=>t(vn(e,Mo(e),"border-color")),onSetup:t.onSetupCellOrRow})),r("tablecaption",{tooltip:"Table caption",icon:"table-caption",command:"mceTableToggleCaption",onSetup:t.onSetupTableWithCaption}),r("tablerowheader",{tooltip:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:yn(e),onSetup:t.onSetupTableRowHeaders}),r("tablecolheader",{tooltip:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:xn(e),onSetup:t.onSetupTableColumnHeaders})})(e,t),(e=>{const t=t=>e.dom.is(t,"table")&&e.getBody().contains(t)&&e.dom.isEditable(t.parentNode),o=Oo(e);o.length>0&&e.ui.registry.addContextToolbar("table",{predicate:t,items:o,scope:"node",position:"node"})})(e)};e.add("table",rr)}()},87002:()=>{tinymce.Resource.add("content/default/content.css",'body{font-family:-apple-system,BlinkMacSystemFont,\'Segoe UI\',Roboto,Oxygen,Ubuntu,Cantarell,\'Open Sans\',\'Helvetica Neue\',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}')},59084:()=>{tinymce.Resource.add("ui/oxide/skin.css",'.tox{box-shadow:none;box-sizing:content-box;color:#222f3e;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:2px solid #eee;border-radius:10px;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox.tox-tinymce-inline{border:none;box-shadow:none;overflow:initial}.tox.tox-tinymce-inline .tox-editor-container{overflow:initial}.tox.tox-tinymce-inline .tox-editor-header{background-color:#fff;border:2px solid #eee;border-radius:10px;box-shadow:none;overflow:hidden}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox[dir=rtl] .tox-icon--flip svg{transform:rotateY(180deg)}@keyframes tox-rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox #accessibility-issue__subheader{font-size:16px;color:#222f3e}.tox .accessbility-sr-only{position:absolute;clip:rect(1px,1px,1px,1px);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}.tox .accessibility-issue__description{align-items:stretch;border-radius:6px;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>div>div .tox-icon svg{display:block}.tox #accessibility-issue__contentID{margin-top:8px;margin-bottom:8px}.tox #accessibility-issue__contentID span:first-child{font-weight:700}.tox #accessibility-issue__document{padding-bottom:8px}.tox .accessibility-issue__repair{margin-top:8px}.tox .accessibility-issue__repair .tox-form__group .tox-form__group--error{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:#e6f0fd;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{font-size:14px;color:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon.accessibility-issue__icon svg{fill:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon{background-color:#006ce7;color:#fff}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:hover{background-color:#0060ce}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:active{background-color:#0054b4}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:#fffae6;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{font-size:14px;color:#7a6e25}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon.accessibility-issue__icon svg{fill:#7a6e25}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon{background-color:#ffe89d;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:hover{background-color:#f2d574;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:active{background-color:#e8c657;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:#fae6e6;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{font-size:14px;color:#c00}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon.accessibility-issue__icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon{background-color:#f2bfbf;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:hover{background-color:#e9a4a4;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:active{background-color:#ee9494;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{display:none}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#527530}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon.accessibility-issue__icon svg{fill:#527530}.tox .tox-dialog__body-content .accessibility-issue__header .tox-form__group h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:8px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:4px 8px 4px 4px}.tox .mce-codemirror{background:#fff;bottom:0;font-size:13px;left:0;position:absolute;right:0;top:0;z-index:1}.tox .mce-codemirror.tox-inline-codemirror{margin:8px;position:absolute}.tox .tox-advtemplate .tox-form__grid{flex:1}.tox .tox-advtemplate .tox-form__grid>div:first-child{display:flex;flex-direction:column;width:30%}.tox .tox-advtemplate .tox-form__grid>div:first-child>div:nth-child(2){flex-basis:0;flex-grow:1;overflow:auto}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-advtemplate .tox-form__grid>div:first-child{width:100%}}.tox .tox-advtemplate iframe{border-color:#eee;border-radius:10px;border-style:solid;border-width:1px;margin:0 10px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bottom-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#006ce7;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#006ce7;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:4px 16px;position:relative;text-align:center;-webkit-text-decoration:none;text-decoration:none;text-transform:none;white-space:nowrap}.tox .tox-button::before{border-radius:6px;bottom:-1px;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7;content:\'\';left:-1px;opacity:0;pointer-events:none;position:absolute;right:-1px;top:-1px}.tox .tox-button[disabled]{background-color:#006ce7;background-image:none;border-color:#006ce7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#0060ce;background-image:none;border-color:#0060ce;box-shadow:none;color:#fff}.tox .tox-button:focus:not(:disabled)::before{opacity:1}.tox .tox-button:hover:not(:disabled){background-color:#0060ce;background-image:none;border-color:#0060ce;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled{background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled[disabled]{background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button.tox-button--enabled:focus:not(:disabled){background-color:#00489b;background-image:none;border-color:#00489b;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled:hover:not(:disabled){background-color:#00489b;background-image:none;border-color:#00489b;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled:active:not(:disabled){background-color:#003c81;background-image:none;border-color:#003c81;box-shadow:none;color:#fff}.tox .tox-button--icon-and-text,.tox .tox-button.tox-button--icon-and-text,.tox .tox-button.tox-button--secondary.tox-button--icon-and-text{display:flex;padding:5px 4px}.tox .tox-button--icon-and-text .tox-icon svg,.tox .tox-button.tox-button--icon-and-text .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon-and-text .tox-icon svg{display:block;fill:currentColor}.tox .tox-button--secondary{background-color:#f0f0f0;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#f0f0f0;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;color:#222f3e;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;outline:0;padding:4px 16px;-webkit-text-decoration:none;text-decoration:none;text-transform:none}.tox .tox-button--secondary[disabled]{background-color:#f0f0f0;background-image:none;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:hover:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:active:not(:disabled){background-color:#d6d6d6;background-image:none;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled{background-color:#a8c8ed;background-image:none;border-color:#a8c8ed;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled[disabled]{background-color:#a8c8ed;background-image:none;border-color:#a8c8ed;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary.tox-button--enabled:focus:not(:disabled){background-color:#93bbe9;background-image:none;border-color:#93bbe9;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled:hover:not(:disabled){background-color:#93bbe9;background-image:none;border-color:#93bbe9;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled:active:not(:disabled){background-color:#7daee4;background-image:none;border-color:#7daee4;box-shadow:none;color:#222f3e}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox-context-form__group .tox-button--icon,.tox-context-form__group .tox-button.tox-button--icon{margin:6px 1px 5px 0;padding:0}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked[disabled]{background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:rgba(34,47,62,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:focus:not(:disabled){background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:active:not(:disabled){background-color:rgba(34,47,62,.18);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#222f3e}.tox .tox-checkbox{align-items:center;border-radius:6px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:6px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(34,47,62,0.3)}@media (forced-colors:active){.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:currentColor!important}}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#006ce7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#006ce7}.tox .tox-checkbox--disabled{color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(34,47,62,0.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(34,47,62,0.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(34,47,62,0.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:6px;box-shadow:inset 0 0 0 1px #006ce7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#e3e3e3;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#fcfcfc;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;border-radius:3px;color:#222f3e;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-image-selector-menu .tox-collection__item,.tox .tox-image-selector-menu .tox-collection__item-image-selector{flex-direction:column}.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-checkmark,.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-icon,.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-image,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-checkmark,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-icon,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-image{flex-grow:1}.tox .tox-image-selector-menu .tox-collection__item label,.tox .tox-image-selector-menu .tox-collection__item-image-selector label{width:48px;white-space:nowrap;overflow:hidden;font-size:12px;color:#222f3e;text-align:center;align-self:flex-end}.tox .tox-image-selector-menu .tox-collection__item-checkmark{height:24px;width:24px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tox .tox-image-selector-menu .tox-collection__item-checkmark svg path{fill:#006ce7;stroke:#006ce7}.tox .tox-image-selector-menu .tox-image-selector__row .tox-collection__item-image-selector.tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#fff}.tox .tox-image-selector-menu .tox-image-selector__row .tox-collection__item-image-selector.tox-collection__item--enabled:not(.tox-collection__item--state-disabled){z-index:2;background-color:#fff;opacity:.8;background-clip:content-box}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#fff;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#006ce7;color:#fff}@media (forced-colors:active){.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){border:solid 1px}}.tox .tox-collection--grid .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#a6ccf7;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#f0f0f0;color:#222f3e;position:relative;z-index:1}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 inset;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border:2px solid highlight}}.tox .tox-collection--toolbar .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#a6ccf7;color:#222f3e}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){border-radius:3px;outline:solid 1px}}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e;background-color:#fff;position:relative}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):hover{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border:2px solid highlight}}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):hover{border-radius:3px;outline:solid 1px}}.tox .tox-collection__item-image{border:1px solid #eee;border-radius:6px;display:flex;flex-direction:column;justify-content:center;margin-bottom:4px;position:relative}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;font-size:14px;font-style:normal;font-weight:400;line-height:24px;max-width:100%;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:currentColor;display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:\'\';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:currentColor}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg{fill:rgba(34,47,62,0.5)}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #e3e3e3;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:28px;margin:6px 1px 5px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid transparent}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid transparent}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}@media (forced-colors:active){.tox .tox-hue-slider,.tox .tox-rgb-form .tox-rgba-preview{background-color:currentColor!important;border:1px solid highlight!important;forced-color-adjust:none}}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-spectrum:focus,.tox .tox-sv-palette-spectrum:focus{outline:#08f solid}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{min-width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important;box-shadow:0 0 0 1px red}.tox .tox-rgb-container{position:relative}.tox .tox-rgb-form .tox-invalid-icon{align-content:center;align-items:center;display:none;height:100%;position:absolute;right:0;top:0}.tox .tox-rgb-form .tox-invalid-icon .tox-control-wrap__status-icon-invalid{margin:0}.tox .tox-rgb-warning-note{background-color:#f5cccc;border:1px solid #f0b3b3;border-radius:3px;color:#77181f;padding:3px}.tox input.tox-invalid+.tox-invalid-icon{display:flex}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:5px 0 6px 11px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px -4px}.tox .tox-swatches__row{display:flex}@media (forced-colors:active){.tox .tox-swatches__row{forced-color-adjust:none}}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#f0f0f0}.tox div.tox-swatch:not(.tox-swatch--remove) svg{display:none;fill:#222f3e;height:24px;margin:calc((30px - 24px)/ 2) calc((30px - 24px)/ 2);width:24px}.tox div.tox-swatch:not(.tox-swatch--remove) svg path{fill:#fff;paint-order:stroke;stroke:#222f3e;stroke-width:2px}.tox div.tox-swatch:not(.tox-swatch--remove).tox-collection__item--enabled svg{display:block}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-conversations{display:flex;flex-direction:column;position:relative;height:100%;min-width:300px;max-width:300px;width:300px}.tox .tox-conversations__header{align-items:center;display:flex;justify-content:space-between;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);padding:8px 12px;background:#fff;z-index:1}.tox .tox-conversations__title{font-size:20px;font-weight:400;padding:8px 0 8px 0;color:#222f3e;line-height:28px}.tox .tox-comment{background:#fff;border:1px solid #fff;border-radius:6px;padding:8px;padding-bottom:16px;position:relative}.tox .tox-comment:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-comment.tox-comment--selected{background-color:#fff2c9;border:1px solid #ffcf30;box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-comment.tox-comment--selected:focus{border:2px solid #006ce7;margin:-1px}.tox .tox-comment.tox-comment--selected:focus:not(:first-child){margin-top:7px}.tox .tox-comment.tox-comment--selected .tox-comment__single{margin-bottom:12px}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus{position:relative}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus::after{top:-9px;pointer-events:none;position:absolute;content:"";display:block;bottom:-9px;left:-9px;right:-9px;border-radius:6px;border:2px solid #006ce7}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus:last-of-type:has(textarea):after{bottom:calc((12px + 16px + 1px) * -1)}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:#222f3e;font-size:12px;line-height:18px}.tox .tox-comment__body{color:#222f3e;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial;transition:max-height .5s cubic-bezier(0, 1, 0, 1);white-space:pre-wrap}.tox .tox-comment__body.tox-comment__body--expanded{max-height:100em;transition:max-height 1s ease-in-out}.tox .tox-comment__body.tox-comment__body--pending{transition:max-height 0s}.tox .tox-comment__body p{margin:0}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%;font-size:16px}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__expander p:focus{font-weight:700}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-tbtn.tox-comment__mention-btn{display:flex;width:34px;height:34px;padding:5px;justify-content:center;align-items:center;margin:0;background-color:transparent}.tox .tox-comment-thread{background:#fff;position:relative;border-radius:6px;background-color:transparent}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto;padding:12px;scroll-behavior:smooth}.tox .tox-comment__scroll:has(textarea:focus){scroll-behavior:auto}.tox .tox-comment--disappearing{transition:opacity .5s ease}.tox .tox-comment[data-transitioning-destination=deleting]{opacity:0}.tox .tox-skeleton .tox-skeleton__line{height:16px;width:100%;background:linear-gradient(to right,rgba(240,240,240,.5) 8%,rgba(240,240,240,.7) 18%,rgba(240,240,240,.5) 33%);animation:wave 2s infinite ease-out}.tox .tox-skeleton .tox-skeleton__circle{height:36px;width:36px;margin-right:8px;border-radius:100%;background:linear-gradient(to right,rgba(240,240,240,.5) 8%,rgba(240,240,240,.7) 18%,rgba(240,240,240,.5) 33%);animation:wave 2s infinite ease-out}@keyframes wave{0%{background-position:-268px 0}100%{background-position:268px 0}}.tox .tox-ring-loader{width:10px;height:10px;border:1px solid #fff;border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:tox-rotation 1s linear infinite}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,0.7)}.tox .tox-user__avatar img{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-user__name{color:#222f3e;font-size:14px;font-style:normal;font-weight:700;line-height:18px;text-transform:none}.tox:not([dir=rtl]) .tox-user__avatar img,.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar img,.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#eee;border-radius:10px;border-style:solid;border-width:0;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;max-height:calc(100vh - 8px * 2);width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;padding:16px 16px}@media only screen and (min-width:768px){.tox .tox-dialog__body-nav{max-width:11em}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;flex-shrink:0;font-size:14px;line-height:1.3;margin-bottom:8px;max-width:13em;-webkit-text-decoration:none;text-decoration:none}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(0,108,231,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #144782;color:#144782}@media (forced-colors:active){.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid highlight;color:highlight}}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;max-height:min(650px,calc(100vh - 110px));overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#144782;cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#071729;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus-visible{border-radius:1px;outline:2px solid #144782;outline-offset:2px}.tox .tox-dialog__body-content a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content svg{fill:#222f3e}.tox .tox-dialog__body-content strong{font-weight:700}.tox .tox-dialog__body-content ul{list-style-type:disc}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{padding-inline-start:2.5rem}.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{margin-bottom:16px}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content dt,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{display:block;margin-inline-end:0;margin-inline-start:0}.tox .tox-dialog__body-content .tox-form__group h1{color:#222f3e;font-size:20px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:#222f3e;font-size:16px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--center{text-align:center}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--end{text-align:end}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--fullscreen{height:100%;max-width:100%}.tox .tox-dialog--fullscreen .tox-dialog__body-content{max-height:100%}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:none;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table thead th:first-child{padding-right:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #626262}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__table td:first-child{padding-right:8px}.tox .tox-dialog__iframe{min-height:200px}.tox .tox-dialog__iframe.tox-dialog__iframe--opaque{background:#fff}.tox .tox-navobj-bordered{position:relative}.tox .tox-navobj-bordered::before{border:1px solid #eee;border-radius:6px;content:\'\';inset:0;opacity:1;pointer-events:none;position:absolute;z-index:1}.tox .tox-navobj-bordered iframe{border-radius:6px}.tox .tox-navobj-bordered-focus.tox-navobj-bordered::before{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #eee;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-edit-area::before{border:2px solid #006ce7;border-radius:4px;content:\'\';inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .15s;z-index:1}@media (forced-colors:active){.tox .tox-edit-area::before{border:2px solid highlight}}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;height:100%;position:absolute;width:100%}.tox.tox-edit-focus .tox-edit-area::before{opacity:1}.tox.tox-inline-edit-area{border:1px dotted #eee}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{display:grid;grid-template-columns:1fr min-content;z-index:2}.tox:not(.tox-tinymce-inline) .tox-editor-header{background-color:#fff;border-bottom:none;box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 8px 8px -4px rgba(34,47,62,.07);padding:4px 0}.tox:not(.tox-tinymce-inline) .tox-editor-header:not(.tox-editor-dock-transition){transition:box-shadow .5s}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header{border-top:1px solid #e3e3e3;box-shadow:none}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on .tox-editor-header{background-color:#fff;box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15);padding:4px 0}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on.tox-tinymce--toolbar-bottom .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15)}.tox.tox:not(.tox-tinymce-inline) .tox-editor-header.tox-editor-header--empty{background:0 0;border:none;box-shadow:none;padding:0}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-custom-preview{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;flex:1;padding:8px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{box-sizing:border-box;max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(34 47 3.1%);border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}@media (forced-colors:active){.tox .tox-color-input span{border-color:currentColor;border-width:2px!important;forced-color-adjust:none}}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#006ce7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:6px;box-sizing:border-box;content:\'\';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}@media (forced-colors:active){.tox .tox-color-input span::before{border:none}}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column}.tox .tox-form__group--stretched .tox-textarea{flex:1}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-context-form__group .tox-button--icon.tox-lock-context-form-size-input{margin-left:8px;margin-right:8px}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textarea-wrap .tox-textarea:focus,.tox .tox-textfield,.tox .tox-toolbar-textfield{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled],.tox .tox-toolbar-textfield[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-custom-editor:focus-within,.tox .tox-focusable-wrapper:focus,.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea-wrap:focus-within,.tox .tox-textarea:focus,.tox .tox-textfield:focus,.tox .tox-toolbar-textfield:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-toolbar-textfield{max-width:250px;min-height:unset;height:28px;margin:5px 0 6px 0}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#006ce7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox .tox-textfield-size{width:80px}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-listbox__select-chevron svg{fill:#222f3e}@media (forced-colors:active){.tox .tox-listbox__select-chevron svg{fill:currentColor!important}}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:8px}.tox[dir=rtl] .tox-listboxfield svg{left:8px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-selectfield select option:checked{background-color:revert;color:revert}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea-wrap{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;display:flex;flex:1;overflow:hidden}.tox .tox-textarea{appearance:textarea;white-space:pre-wrap}.tox .tox-textarea-wrap .tox-textarea{border:none}.tox .tox-textarea-wrap .tox-textarea:focus{border:none}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-imagepreview{background-color:#666;height:380px;overflow:hidden;position:relative;width:100%}.tox .tox-imagepreview.tox-imagepreview__loaded{overflow:auto}.tox .tox-imagepreview__container{display:flex;left:100vw;position:absolute;top:100vw}.tox .tox-imagepreview__image{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools .tox-spacer{flex:1}.tox .tox-image-tools .tox-bar{align-items:center;display:flex;height:60px;justify-content:center}.tox .tox-image-tools .tox-imagepreview,.tox .tox-image-tools .tox-imagepreview+.tox-bar{margin-top:8px}.tox .tox-image-tools .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-image-tools .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-image-tools .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-image-tools .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-image-tools .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-image-tools .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-image-tools .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox .tox-image-selector-loading-spinner-wrapper{display:flex;justify-content:center;align-items:center}.tox .tox-image-selector-loading-spinner{position:absolute;width:min(24px,30%);aspect-ratio:1;border-radius:50%;border:3px solid #006ce7;border-bottom-color:transparent;animation:tox-rotation 1s linear infinite}.tox .tox-toolbar .tox-image-selector,.tox .tox-toolbar__overflow .tox-image-selector,.tox .tox-toolbar__primary .tox-image-selector{margin:5px 0 6px 11px}.tox .tox-image-selector-menu{border:0;border-radius:3px;margin:-4px -4px;padding:4px}.tox .tox-image-selector-menu .tox-collection--list .tox-collection__group{border:0;padding:0;margin:-4px -4px}.tox .tox-image-selector-menu .tox-collection__item{max-width:48px}.tox .tox-image-selector-menu .tox-collection__item-icon{border:1px solid #eee;border-radius:3px;margin-bottom:4px;width:100%}.tox .tox-image-selector-menu .tox-collection__item-icon svg path{stroke:#c00}.tox .tox-image-selector__row{display:flex}.tox .tox-image-selector--remove{align-items:center;display:flex;justify-content:center}.tox .tox-image-selector--remove svg path{stroke:#c00}.tox .tox-image-selector-image-wrapper{width:46px;height:46px;display:flex;align-items:center;justify-content:center}.tox .tox-image-selector-image-img{max-width:100%;max-height:100%}.tox .tox-image-selector__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-image-selector__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-image-selector__picker-btn:hover{background:#f0f0f0}.tox .tox-insert-table-picker{background-color:#fff;display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#eee;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px -4px}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:#006ce7;border-color:#eee}@media (forced-colors:active){.tox .tox-insert-table-picker .tox-insert-table-picker__selected{border-color:Highlight;filter:contrast(50%)}}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox-mentions__card-common{z-index:1200}.tox.tox-mentions__card{background:#fff;border:1px solid #eee;display:flex;padding:4px 8px}.tox.tox-mentions__card .tox-mentions__container{display:flex;flex-direction:column;align-self:center;margin:0 4px}.tox .tox-mentions__avatar{width:42px;height:42px;border-radius:50%;margin-right:4px}.tox .tox-mentions__username{font-size:14px;line-height:21px}.tox .tox-mentions__description{font-size:12px;line-height:21px;color:rgba(34,47,62,.7)}.tox .tox-collection__item--active .tox-mentions__description{color:inherit}.tox .tox-menu{background-color:#fff;border:1px solid transparent;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0 4px}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:8px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:8px}@media only screen and (min-width:768px){.tox .tox-menu .tox-collection__item-label{overflow-wrap:break-word;word-break:normal}.tox .tox-dialog__popups .tox-menu .tox-collection__item-label{word-break:break-all}}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;grid-column:1/-1;grid-row:1;padding:0 11px 0 12px}.tox .tox-promotion+.tox-menubar{grid-column:1}.tox .tox-promotion{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;grid-column:2;grid-row:1;padding-inline-end:8px;padding-inline-start:4px;padding-top:5px}.tox .tox-promotion-link{align-items:unsafe center;background-color:#e8f1f8;border-radius:5px;color:#086be6;cursor:pointer;display:flex;font-size:14px;height:26.6px;padding:4px 8px;white-space:nowrap}.tox .tox-promotion-link:hover{background-color:#b4d7ff}.tox .tox-promotion-link:focus{background-color:#d9edf7}.tox .tox-mbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:5px 1px 6px 0;outline:0;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#fff;border:0;box-shadow:none;color:#222f3e;position:relative;z-index:1}.tox .tox-mbtn:focus:not(:disabled)::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-mbtn:focus:not(:disabled)::after{border:2px solid highlight}}.tox .tox-mbtn--active,.tox .tox-mbtn:not(:disabled).tox-mbtn--active:focus{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:grid;font-size:14px;font-weight:400;grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-left:auto;margin-right:auto;margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in;width:max-content}.tox .tox-notification a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification:focus{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#222f3e}.tox .tox-notification--success p{color:#222f3e}.tox .tox-notification--success a{color:#517342}.tox .tox-notification--success a:focus,.tox .tox-notification--success a:hover{color:#24321d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success a:focus-visible{border-radius:1px;outline:2px solid #517342;outline-offset:2px}.tox .tox-notification--success a:active{color:#0d120a;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success svg{fill:#222f3e}.tox .tox-notification--error{background-color:#f5cccc;border-color:#f0b3b3;color:#222f3e}.tox .tox-notification--error p{color:#222f3e}.tox .tox-notification--error a{color:#77181f}.tox .tox-notification--error a:focus,.tox .tox-notification--error a:hover{color:#220709;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error a:focus-visible{border-radius:1px;outline:2px solid #77181f;outline-offset:2px}.tox .tox-notification--error a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error svg{fill:#222f3e}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fff5cc;border-color:#fff0b3;color:#222f3e}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#222f3e}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#7a6e25}.tox .tox-notification--warn a:focus,.tox .tox-notification--warn a:hover,.tox .tox-notification--warning a:focus,.tox .tox-notification--warning a:hover{color:#2c280d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn a:focus-visible,.tox .tox-notification--warning a:focus-visible{border-radius:1px;outline:2px solid #7a6e25;outline-offset:2px}.tox .tox-notification--warn a:active,.tox .tox-notification--warning a:active{color:#050502;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#222f3e}.tox .tox-notification--info{background-color:#d6e7fb;border-color:#c1dbf9;color:#222f3e}.tox .tox-notification--info p{color:#222f3e}.tox .tox-notification--info a{color:#2a64a6}.tox .tox-notification--info a:focus,.tox .tox-notification--info a:hover{color:#163355;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info a:focus-visible{border-radius:1px;outline:2px solid #2a64a6;outline-offset:2px}.tox .tox-notification--info a:active{color:#0b1a2c;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info svg{fill:#222f3e}.tox .tox-notification__body{align-self:center;color:#222f3e;font-size:14px;grid-column-end:3;grid-column-start:2;grid-row-end:2;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{align-self:center;grid-column-end:2;grid-column-start:1;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{align-self:start;grid-column-end:4;grid-column-start:3;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification .tox-progress-bar{grid-column-end:4;grid-column-start:1;grid-row-end:3;grid-row-start:2;justify-self:center}.tox .tox-notification-container-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-notification-container-dock-fadein{opacity:1;visibility:visible}.tox .tox-notification-container-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-notification-container-dock-transition.tox-notification-container-dock-fadein{transition-delay:0s}.tox .tox-onboarding-overlay{height:100%;background-color:#f0f0f0;position:absolute;top:0;left:0;right:0;z-index:1;overflow:auto;display:grid;justify-content:center;align-items:center}.tox .tox-onboarding-dialog{max-width:512px;background-color:#fff;display:flex;flex-direction:column;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);border-radius:12px;margin:8px}.tox .tox-onboarding-dialog .tox-onboarding-header{color:#222f3e;display:flex;justify-content:center;align-items:center;font-size:20px;margin:24px 0 8px}.tox .tox-onboarding-dialog .tox-onboarding-step{display:grid;grid-template-columns:min-content 1fr min-content;align-items:center;margin:0 24px}.tox .tox-onboarding-dialog .tox-onboarding-step:not(:last-child){border-bottom:1px solid #e3e3e3}.tox .tox-onboarding-dialog .tox-onboarding-step--number{width:24px;aspect-ratio:1;border-radius:50%;border:1px solid #00ad0e;display:flex;justify-content:center;align-items:center;font-size:12px;font-weight:700;color:#00ad0e}.tox .tox-onboarding-dialog .tox-onboarding-step--body{padding:24px 0 24px 16px}.tox .tox-onboarding-dialog .tox-onboarding-step--body-header{color:#222f3e;font-size:14px;font-weight:700;margin-bottom:4px}.tox .tox-onboarding-dialog .tox-onboarding-step--body-details{color:rgba(34,47,62,.7);font-size:14px}.tox .tox-onboarding-dialog .tox-onboarding-step--action{padding-left:24px}.tox .tox-onboarding-dialog .tox-onboarding-footer{background-color:#f0f0f0;display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.tox .tox-onboarding-dialog .tox-onboarding-footer p{display:flex;align-items:center;justify-content:center;gap:4px;font-size:14px;color:rgba(34,47,62,.7)}.tox .tox-onboarding-dialog svg{width:24px;fill:rgba(34,47,62,0.7)}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin{display:grid;align-items:center;grid-template-columns:min-content 1fr min-content;border-bottom:1px solid #e3e3e3;padding:24px 0;margin:0 16px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body{margin:0 16px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body .tox-promotion-dialog-plugin-header{color:#222f3e;font-size:14px;font-weight:700;margin-bottom:4px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body .tox-promotion-dialog-plugin-details{color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--icon{display:grid;place-content:center;width:56px;height:56px;line-height:24px;font-size:24px;border-radius:12px;background:linear-gradient(180deg,#fff 24%,#f0f0f0 100%);box-shadow:0 1px 1px 0 #222f3e12,0 3px 6px 0 #222f3e06;color:#006ce7}.tox .tox-promotion-dialog--subtitle{margin:16px;color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog--explore{text-align:center;margin:16px;color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog--explore a{color:#006ce7}.tox .tox-promotion-dialog--footer{background-color:#f0f0f0;color:rgba(34,47,62,.7);font-size:12px;text-align:center;padding:16px}.tox .tox-promotion-button{display:flex;align-items:center;height:26.6px;line-height:26.6px;font-size:14px;font-weight:700;background-color:#f1ebf9;color:#851aff;padding:8px 16px;cursor:pointer;white-space:nowrap;border-radius:5px}.tox .tox-promotion-button:focus{outline:1px solid #851AFF}.tox .tox-onboarding-dialog a,.tox .tox-promotion-dialog--footer a{color:rgba(34,47,62,.7);cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-onboarding-dialog a:focus,.tox .tox-onboarding-dialog a:hover,.tox .tox-promotion-dialog--footer a:focus,.tox .tox-promotion-dialog--footer a:hover{color:#071729;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-onboarding-dialog a:focus-visible,.tox .tox-promotion-dialog--footer a:focus-visible{border-radius:1px;outline:2px solid #144782;outline-offset:2px}.tox .tox-onboarding-dialog a:active,.tox .tox-promotion-dialog--footer a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar,.tox .tox-pop--resizing .tox-toolbar__group{flex-wrap:nowrap}.tox .tox-pop--transition{transition:.15s ease;transition-property:left,right,top,bottom}.tox .tox-pop--transition::after,.tox .tox-pop--transition::before{transition:all .15s,visibility 0s,opacity 75ms ease 75ms}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:\'\';display:block;height:0;opacity:1;position:absolute;width:0}@media (forced-colors:active){.tox .tox-pop::after,.tox .tox-pop::before{content:none}}.tox .tox-pop.tox-pop--inset::after,.tox .tox-pop.tox-pop--inset::before{opacity:0;transition:all 0s .15s,visibility 0s,opacity 75ms ease}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#eee transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #eee transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #eee transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #eee;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;min-height:0}.tox .tox-sidebar{background-color:#f0f0f0;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #eee;border-radius:6px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#006ce7;border:2px solid #0054b4;border-radius:6px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-form__controls-h-stack>.tox-slider:not(:first-of-type){margin-inline-start:8px}.tox .tox-form__controls-h-stack>.tox-form__group+.tox-slider{margin-inline-start:32px}.tox .tox-form__controls-h-stack>.tox-slider+.tox-form__group{margin-inline-start:32px}.tox .tox-toolbar-slider{align-items:center;display:inline-flex;height:16px}.tox .tox-toolbar-slider__input{appearance:none;background:#eee;border-radius:16px;width:130px;height:2px}.tox .tox-toolbar-slider__input::-webkit-slider-runnable-track{background-color:transparent;height:16px}.tox .tox-toolbar-slider__input::-moz-range-track{background-color:transparent;height:16px}.tox .tox-toolbar-slider__input::-webkit-slider-thumb{-webkit-appearance:none;background-color:#006ce7;border-radius:16px;border:none;height:16px;width:16px}.tox .tox-toolbar-slider__input::-moz-range-thumb{appearance:none;background-color:#006ce7;border-radius:16px;border:none;height:16px;width:16px}.tox .tox-toolbar-slider__input:focus-visible{outline:0}.tox .tox-toolbar-slider__input:focus::-webkit-slider-thumb{background-color:#0060ce;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7}.tox .tox-toolbar-slider__input:focus::-moz-range-thumb{background-color:#0060ce;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7}.tox .tox-toolbar-slider__input:hover::-webkit-slider-thumb{background-color:#0060ce}.tox .tox-toolbar-slider__input:hover::-moz-range-thumb{background-color:#0060ce}.tox .tox-toolbar-slider__input:active::-webkit-slider-thumb{background-color:#0054b4}.tox .tox-toolbar-slider__input:active::-moz-range-thumb{background-color:#0054b4}.tox .tox-toolbar-slider__input[disabled]::-webkit-slider-thumb{background-color:rgba(255,255,255,.5)}.tox .tox-toolbar-slider__input[disabled]::-moz-range-thumb{background-color:rgba(255,255,255,.5)}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:first-child{animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #e3e3e3;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:14px;font-weight:400;height:25px;overflow:hidden;padding:0 8px;position:relative;text-transform:none}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__right-container{display:flex;justify-content:flex-end;white-space:nowrap}.tox .tox-statusbar__help-text{text-align:center}.tox .tox-statusbar__text-container{align-items:flex-start;display:flex;flex:1 1 auto;height:16px;justify-content:space-between}@media only screen and (min-width:768px){.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__help-text,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__path,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__right-container{flex:0 0 calc(100% / 3)}}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-end{justify-content:flex-end}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-start{justify-content:flex-start}.tox .tox-statusbar__text-container.tox-statusbar__text-container--space-around{justify-content:space-around}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}@media only screen and (max-width:767px){.tox .tox-statusbar__text-container .tox-statusbar__help-text{display:none}.tox .tox-statusbar__text-container .tox-statusbar__help-text:only-child{display:block}}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);position:relative;-webkit-text-decoration:none;text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){color:#222f3e;cursor:pointer}.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border:2px solid highlight}}.tox .tox-statusbar__branding svg{fill:rgba(34,47,62,0.8);height:1em;margin-left:.3em;width:auto}@media (forced-colors:active){.tox .tox-statusbar__branding svg{fill:currentColor}}.tox .tox-statusbar__branding a{align-items:center;display:inline-flex}.tox .tox-statusbar__branding a:focus:not(:disabled):not([aria-disabled=true]) svg,.tox .tox-statusbar__branding a:hover:not(:disabled):not([aria-disabled=true]) svg{fill:#222f3e}.tox .tox-statusbar__resize-cursor-default{cursor:ns-resize}.tox .tox-statusbar__resize-cursor-both{cursor:nwse-resize}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;display:flex;flex:0 0 auto;justify-content:flex-end;margin-bottom:3px;margin-left:4px;margin-right:calc(3px - 8px);margin-top:3px;padding-bottom:0;padding-left:0;padding-right:0;position:relative}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,0.5)}.tox .tox-statusbar__resize-handle:focus svg,.tox .tox-statusbar__resize-handle:hover svg{fill:#222f3e}.tox .tox-statusbar__resize-handle:focus-visible{background-color:transparent;border-radius:1px 1px 5px 1px;box-shadow:0 0 0 2px transparent}.tox .tox-statusbar__resize-handle:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar__resize-handle:focus-visible::after{border:2px solid highlight}}.tox .tox-statusbar__resize-handle:only-child{margin-left:auto}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:2ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox[dir=rtl] .tox-statusbar__branding svg{margin-left:0;margin-right:.3em}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:6px 1px 5px 0;outline:0;padding:0;text-transform:none;width:34px}@media (forced-colors:active){.tox .tox-tbtn.tox-tbtn:hover,.tox .tox-tbtn:hover{outline:1px dashed currentColor}.tox .tox-tbtn.tox-tbtn--active,.tox .tox-tbtn.tox-tbtn--enabled,.tox .tox-tbtn.tox-tbtn--enabled:focus,.tox .tox-tbtn.tox-tbtn--enabled:hover,.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){outline:1px solid currentColor;position:relative}}.tox .tox-tbtn svg{display:block;fill:#222f3e}@media (forced-colors:active){.tox .tox-tbtn svg{fill:currentColor!important}.tox .tox-tbtn svg.tox-tbtn--enabled,.tox .tox-tbtn svg:focus:not(.tox-tbtn--disabled){fill:currentColor!important}.tox .tox-tbtn svg .tox-tbtn:disabled,.tox .tox-tbtn svg .tox-tbtn:disabled:hover,.tox .tox-tbtn svg.tox-tbtn--disabled,.tox .tox-tbtn svg.tox-tbtn--disabled:hover{filter:contrast(0%)}}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#fff;border:0;box-shadow:none;position:relative;z-index:1}.tox .tox-tbtn:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn:focus::after{border:2px solid highlight}}.tox .tox-tbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled .tox-tbtn--enabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--active,.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:focus,.tox .tox-tbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e;position:relative}.tox .tox-tbtn--active>*,.tox .tox-tbtn--enabled:focus>*,.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--active svg,.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:focus svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn--active.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:focus.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--enabled:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn--enabled:focus::after{border:2px solid highlight}}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#222f3e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:42px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:56px;width:68px}.tox .tox-tbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-label--context-toolbar{margin:6px 1px 5px 0;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-number-input{background:#f7f7f7;border-radius:3px;display:flex;margin:6px 1px 5px 0;position:relative;width:auto}.tox .tox-number-input:focus{background:#f7f7f7}.tox .tox-number-input:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper{display:flex;pointer-events:none;position:relative;text-align:center}.tox .tox-number-input .tox-input-wrapper:focus{background-color:#f7f7f7;z-index:1}.tox .tox-number-input .tox-input-wrapper:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border:2px solid highlight}}.tox .tox-number-input input{border-radius:3px;color:#222f3e;font-size:14px;margin:2px 0;pointer-events:all;position:relative;width:60px}.tox .tox-number-input input:hover{background:#f0f0f0;color:#222f3e}.tox .tox-number-input input:focus{background-color:#f7f7f7}.tox .tox-number-input input:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button{color:#222f3e;height:28px;position:relative;text-align:center;width:24px}@media (forced-colors:active){.tox .tox-number-input button:active,.tox .tox-number-input button:focus,.tox .tox-number-input button:hover{outline:1px solid currentColor!important}}.tox .tox-number-input button svg{display:block;fill:#222f3e;margin:0 auto;transform:scale(.67)}@media (forced-colors:active){.tox .tox-number-input button svg,.tox .tox-number-input button svg:active,.tox .tox-number-input button svg:hover{fill:currentColor!important}.tox .tox-number-input button svg:disabled{filter:contrast(0)}}.tox .tox-number-input button:focus{background:#f7f7f7;z-index:1}.tox .tox-number-input button:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input button:focus::after{border:2px solid highlight}}.tox .tox-number-input button:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:hover svg{fill:#222f3e}.tox .tox-number-input button:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:active svg{fill:#222f3e}.tox .tox-number-input button:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button:disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-number-input button.minus{border-radius:3px 0 0 3px}.tox .tox-number-input button.plus{border-radius:0 3px 3px 0}.tox .tox-number-input:focus:not(:active)>.tox-input-wrapper,.tox .tox-number-input:focus:not(:active)>button{background:#f7f7f7}.tox .tox-tbtn--select{margin:6px 1px 5px 0;padding:0 4px;width:auto}.tox .tox-tbtn--bordered,.tox .tox-tbtn--bordered:focus,.tox .tox-tbtn--bordered:hover{border:1px solid #eee}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;height:initial;margin:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-tbtn__select-chevron svg{fill:currentColor}}.tox .tox-tbtn--bespoke{background:#f7f7f7}.tox .tox-tbtn--bespoke:focus{background:#f7f7f7}.tox .tox-tbtn--bespoke+.tox-tbtn--bespoke{margin-inline-start:4px}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-tbtn--disabled .tox-tbtn__select-label,.tox .tox-tbtn--select:disabled .tox-tbtn__select-label{cursor:not-allowed}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:6px 1px 5px 0}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #f0f0f0 inset}.tox .tox-split-button:focus{background:#fff;box-shadow:none;color:#222f3e;position:relative;z-index:1}.tox .tox-split-button:focus::after{pointer-events:none;border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-split-button:focus::after{border:2px solid highlight}}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button>:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}.tox .tox-split-button>:nth-child(2){border-bottom-right-radius:3px;border-top-right-radius:3px}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-split-button__chevron svg{fill:currentColor}}.tox .tox-split-button .tox-tbtn{margin:0}.tox .tox-split-button:focus .tox-tbtn{background-color:transparent}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox.tox-platform-touch .tox-split-button .tox-tbtn--select{padding:0 0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:not(.tox-tbtn--select):first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button.tox-tbtn--disabled svg .tox-icon-highlight-bg-color__color,.tox .tox-split-button.tox-tbtn--disabled svg .tox-icon-text-color__color{opacity:.3}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background-attachment:local;background-color:#fff;background-image:repeating-linear-gradient(#e3e3e3 0 1px,transparent 1px 39px);background-position:center top 40px;background-repeat:no-repeat;background-size:calc(100% - 11px * 2) calc(100% - 41px);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0;transform:perspective(1px)}.tox .tox-toolbar-overlord>.tox-toolbar,.tox .tox-toolbar-overlord>.tox-toolbar__overflow,.tox .tox-toolbar-overlord>.tox-toolbar__primary{background-position:center top 0;background-size:calc(100% - 11px * 2) calc(100% - 0px)}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-anchorbar,.tox .tox-toolbar-overlord{grid-column:1/-1}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{border-top:1px solid transparent;margin-top:-1px;padding-bottom:1px;padding-top:1px}@media (forced-colors:active){.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{outline:1px solid currentColor}}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox .tox-toolbar-overlord .tox-toolbar:not(.tox-toolbar--scrolling):first-child,.tox .tox-toolbar-overlord .tox-toolbar__primary{background-position:center top 39px}.tox .tox-editor-header>.tox-toolbar--scrolling,.tox .tox-toolbar-overlord .tox-toolbar--scrolling:first-child{background-image:none}.tox .tox-focusable-wrapper{border:1px solid transparent;margin-right:2px;pointer-events:none}.tox .tox-focusable-wrapper .tox-textfield-size{pointer-events:all}.tox .tox-focusable-wrapper:focus{background-color:#f7f7f7;border-radius:6px;border-style:solid;border-width:1px}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;background-position:center top 43px;background-size:calc(100% - 8px * 2) calc(100% - 51px);border:none;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);overscroll-behavior:none;padding:4px 0}@media (forced-colors:active){.tox.tox-tinymce-aux .tox-toolbar__overflow{border:solid}}.tox-pop .tox-pop__dialog .tox-toolbar{background-position:center top 43px;background-size:calc(100% - 11px * 2) calc(100% - 51px);padding:4px 0}.tox-context-form__group{display:flex;align-items:center}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 11px 0 12px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid transparent}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid transparent}.tox .tox-tooltip{display:inline-block;max-width:15em;padding:8px;pointer-events:none;position:relative;width:max-content;z-index:1150}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:6px;box-shadow:none;color:#fff;font-size:12px;font-style:normal;font-weight:600;overflow-wrap:break-word;padding:4px 6px;text-transform:none}@media (forced-colors:active){.tox .tox-tooltip__body{outline:outset 1px}}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-tree{display:flex;flex-direction:column}.tox .tox-tree .tox-trbtn{align-items:center;background:0 0;border:0;border-radius:4px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;margin-bottom:4px;margin-top:4px;outline:0;overflow:hidden;padding:0;padding-left:8px;text-transform:none}.tox .tox-tree .tox-trbtn .tox-tree__label{cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tree .tox-trbtn svg{display:block;fill:#222f3e}.tox .tox-tree .tox-trbtn:focus{background:#f0f0f0;border:0;box-shadow:none}.tox .tox-tree .tox-trbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:active svg{fill:#222f3e}.tox .tox-tree .tox-trbtn--disabled,.tox .tox-tree .tox-trbtn--disabled:hover,.tox .tox-tree .tox-trbtn:disabled,.tox .tox-tree .tox-trbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tree .tox-trbtn--disabled svg,.tox .tox-tree .tox-trbtn--disabled:hover svg,.tox .tox-tree .tox-trbtn:disabled svg,.tox .tox-tree .tox-trbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tree .tox-trbtn--enabled,.tox .tox-tree .tox-trbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn--enabled:hover>*,.tox .tox-tree .tox-trbtn--enabled>*{transform:none}.tox .tox-tree .tox-trbtn--enabled svg,.tox .tox-tree .tox-trbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled){color:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active>*{transform:none}.tox .tox-tree .tox-trbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tree .tox-trbtn--labeled{padding:0 4px;width:unset}.tox .tox-tree .tox-trbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tree .tox-tree--directory{display:flex;flex-direction:column}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label{font-weight:700}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:focus .tox-mbtn svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-chevron{margin-right:6px}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--shrinking) .tox-chevron{transition:transform .5s ease-in-out}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--open) .tox-chevron{transform:rotate(90deg)}.tox .tox-tree .tox-tree--leaf__label{font-weight:400}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--leaf__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-icon-custom-state{flex-grow:1;display:flex;justify-content:flex-end}.tox .tox-tree .tox-tree--directory__children{overflow:hidden;padding-left:16px}.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--growing,.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--shrinking{transition:height .5s ease-in-out}.tox .tox-tree .tox-trbtn.tox-tree--leaf__label{display:flex;justify-content:space-between}.tox .tox-revisionhistory__pane{padding:0!important}.tox .tox-revisionhistory__container{display:flex;flex-direction:column;height:100%}.tox .tox-revisionhistory{background-color:#fff;border-top:1px solid #f0f0f0;display:flex;flex:1;height:100%;margin-top:8px;overflow-x:auto;overflow-y:hidden;position:relative;width:100%}.tox .tox-revisionhistory--align-right{margin-left:auto}.tox .tox-revisionhistory__iframe{flex:1}.tox .tox-revisionhistory__sidebar{display:flex;flex-direction:column;height:100%;min-width:248px;width:316px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__sidebar-title{background-color:#fff;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);color:#222f3e;font-size:20px;font-weight:400;line-height:28px;padding:12px;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions{background-color:#f0f0f0;display:flex;flex:1;flex-direction:column;gap:12px;overflow-y:auto;padding:10px 12px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus{height:100%;position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:\'\';left:0;position:absolute;right:0;top:0;border-radius:6px;bottom:1px;left:1px;right:1px;top:1px}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card{background-color:#fff;border:1px solid #f0f0f0;border-radius:6px;color:#222f3e;cursor:pointer;display:flex;flex-direction:column;font-size:14px;gap:12px;padding:12px;width:100%}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus{position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #006ce7;content:\'\';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #006ce7;box-shadow:0 0 0 2px #006ce7!important}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected{background-color:#fff5cc;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);position:relative}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #e3b82a;content:\'\';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #e3b82a}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-date{display:flex;gap:12px;justify-content:space-between}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-date-label{font-size:16px;line-height:24px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-label{font-size:12px;font-weight:600;line-height:24px;padding:0}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-author{align-items:center;display:flex;flex:1 0 0;gap:8px;height:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-author-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:700;line-height:18px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__avatar{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__norevision{color:rgba(34,47,62,.7);font-size:16px;line-height:24px;padding:5px 5.5px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-check-icon{color:#222f3e;height:24px}[data-mce-name=uploadcare-enhance-filter] .color-swatch-remove-color path{fill:#c00;stroke:#c00}.tox .tox-view-wrap,.tox .tox-view-wrap__slot-container{background-color:#fff;display:flex;flex:1;flex-direction:column;height:100%}.tox .tox-view{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-view__header{align-items:center;display:flex;font-size:16px;justify-content:space-between;padding:10px 10px 2px 10px;position:relative}.tox .tox-view__label{color:#222f3e;font-weight:700;line-height:24px;padding:4px 16px;text-align:center;white-space:nowrap}.tox .tox-view__label--normal{font-size:16px}.tox .tox-view__label--large{font-size:20px}.tox .tox-view--mobile.tox-view__header,.tox .tox-view--mobile.tox-view__toolbar{padding:8px}.tox .tox-view--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-view__toolbar{display:flex;flex-direction:row;gap:8px;justify-content:space-between;overflow-x:auto;padding:10px 10px 2px 10px}.tox .tox-view__toolbar__group{display:flex;flex-direction:row;gap:12px}.tox .tox-view__header-end,.tox .tox-view__header-start{display:flex}.tox .tox-view__pane{height:100%;padding:8px;position:relative;width:100%}.tox .tox-view__pane_panel{border:1px solid #eee;border-radius:6px}.tox:not([dir=rtl]) .tox-view__header .tox-view__header-end>*,.tox:not([dir=rtl]) .tox-view__header .tox-view__header-start>*{margin-left:8px}.tox[dir=rtl] .tox-view__header .tox-view__header-end>*,.tox[dir=rtl] .tox-view__header .tox-view__header-start>*{margin-right:8px}.tox .tox-well{border:1px solid #eee;border-radius:6px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #eee;border-radius:6px;display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1}')},51768:()=>{!function(){"use strict";const e=Object.getPrototypeOf,t=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},o=e=>o=>(e=>{const o=typeof e;return null===e?"null":"object"===o&&Array.isArray(e)?"array":"object"===o&&t(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":o})(o)===e,n=e=>t=>typeof t===e,r=e=>t=>e===t,i=o("string"),s=o("object"),a=o=>((o,n)=>s(o)&&t(o,n,((t,o)=>e(t)===o)))(o,Object),l=o("array"),c=r(null),d=n("boolean"),u=r(void 0),h=e=>null==e,m=e=>!h(e),p=n("function"),g=n("number"),f=(e,t)=>{if(l(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1},b=()=>{},v=e=>()=>e(),y=(e,t)=>(...o)=>e(t.apply(null,o)),x=e=>()=>e,w=e=>e,_=(e,t)=>e===t;function S(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const C=e=>t=>!e(t),k=e=>()=>{throw new Error(e)},E=e=>e(),T=x(!1),O=x(!0);class A{constructor(e,t){this.tag=e,this.value=t}static some(e){return new A(!0,e)}static none(){return A.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?A.some(e(this.value)):A.none()}bind(e){return this.tag?e(this.value):A.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:A.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return m(e)?A.some(e):A.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}A.singletonNone=new A(!1);const M=Array.prototype.slice,P=Array.prototype.indexOf,D=Array.prototype.push,L=(e,t)=>P.call(e,t),R=(e,t)=>L(e,t)>-1,N=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return!0}return!1},I=(e,t)=>{const o=[];for(let n=0;n<e;n++)o.push(t(n));return o},B=(e,t)=>{const o=[];for(let n=0;n<e.length;n+=t){const r=M.call(e,n,n+t);o.push(r)}return o},z=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},F=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},H=(e,t)=>{const o=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];(t(i,r)?o:n).push(i)}return{pass:o,fail:n}},j=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},V=(e,t,o)=>(((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(e,((e,n)=>{o=t(o,e,n)})),o),U=(e,t,o)=>(F(e,((e,n)=>{o=t(o,e,n)})),o),Z=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return A.some(r);if(o(r,n))break}return A.none()})(e,t,T),$=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return A.some(o)}return A.none()},W=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!l(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);D.apply(t,e[o])}return t},q=(e,t)=>W(z(e,t)),G=(e,t)=>{for(let o=0,n=e.length;o<n;++o){if(!0!==t(e[o],o))return!1}return!0},Y=e=>{const t=M.call(e,0);return t.reverse(),t},K=(e,t)=>j(e,(e=>!R(t,e))),X=(e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o},J=e=>[e],Q=(e,t)=>{const o=M.call(e,0);return o.sort(t),o},ee=(e,t)=>t>=0&&t<e.length?A.some(e[t]):A.none(),te=e=>ee(e,0),oe=e=>ee(e,e.length-1),ne=p(Array.from)?Array.from:e=>M.call(e),re=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return A.none()},ie=Object.keys,se=Object.hasOwnProperty,ae=(e,t)=>{const o=ie(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},le=(e,t)=>ce(e,((e,o)=>({k:o,v:t(e,o)}))),ce=(e,t)=>{const o={};return ae(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o},de=e=>(t,o)=>{e[o]=t},ue=(e,t,o,n)=>{ae(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))},he=(e,t)=>{const o={};return ue(e,t,de(o),b),o},me=(e,t)=>{const o=[];return ae(e,((e,n)=>{o.push(t(e,n))})),o},pe=(e,t)=>{const o=ie(e);for(let n=0,r=o.length;n<r;n++){const r=o[n],i=e[r];if(t(i,r,e))return A.some(i)}return A.none()},ge=e=>me(e,w),fe=(e,t)=>be(e,t)?A.from(e[t]):A.none(),be=(e,t)=>se.call(e,t),ve=(e,t)=>be(e,t)&&void 0!==e[t]&&null!==e[t],ye=e=>{if(!l(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return F(e,((n,r)=>{const i=ie(n);if(1!==i.length)throw new Error("one and only one name per case");const s=i[0],a=n[s];if(void 0!==o[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!l(a))throw new Error("case arguments must be an array");t.push(s),o[s]=(...o)=>{const n=o.length;if(n!==a.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+a.length+" ("+a+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const n=ie(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!G(t,(e=>R(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:s,params:o})}}}})),o},xe=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},we=e=>{let t=A.none(),o=[];const n=e=>{r()?s(e):o.push(e)},r=()=>t.isSome(),i=e=>{F(e,s)},s=e=>{t.each((t=>{setTimeout((()=>{e(t)}),0)}))};return e((e=>{r()||(t=A.some(e),i(o),o=[])})),{get:n,map:e=>we((t=>{n((o=>{t(e(o))}))})),isReady:r}},_e={nu:we,pure:e=>we((t=>{t(e)}))},Se=e=>{setTimeout((()=>{throw e}),0)},Ce=e=>{const t=t=>{e().then(t,Se)};return{map:t=>Ce((()=>e().then(t))),bind:t=>Ce((()=>e().then((e=>t(e).toPromise())))),anonBind:t=>Ce((()=>e().then((()=>t.toPromise())))),toLazy:()=>_e.nu(t),toCached:()=>{let t=null;return Ce((()=>(null===t&&(t=e()),t)))},toPromise:e,get:t}},ke=e=>Ce((()=>new Promise(e))),Ee=e=>Ce((()=>Promise.resolve(e))),Te=e=>{const t=t=>t(e),o=x(e),n=()=>r,r={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:O,isError:T,map:t=>Ae.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>A.some(e)};return r},Oe=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:T,isError:O,map:t,mapError:t=>Ae.error(t(e)),bind:t,exists:T,forall:O,getOr:w,or:w,getOrThunk:E,orThunk:E,getOrDie:k(String(e)),each:b,toOptional:A.none};return o},Ae={value:Te,error:Oe,fromOption:(e,t)=>e.fold((()=>Oe(t)),Te)},Me=e=>({...e,toCached:()=>Me(e.toCached()),bindFuture:t=>Me(e.bind((e=>e.fold((e=>Ee(Ae.error(e))),(e=>t(e)))))),bindResult:t=>Me(e.map((e=>e.bind(t)))),mapResult:t=>Me(e.map((e=>e.map(t)))),mapError:t=>Me(e.map((e=>e.mapError(t)))),foldResult:(t,o)=>e.map((e=>e.fold(t,o))),withTimeout:(t,o)=>Me(ke((n=>{let r=!1;const i=setTimeout((()=>{r=!0,n(Ae.error(o()))}),t);e.get((e=>{r||(clearTimeout(i),n(e))}))})))}),Pe=e=>Me(ke(e)),De=Pe,Le="undefined"!=typeof window?window:Function("return this;")(),Re=(e,t,o,n)=>{const r=e+t;return r>n?o:r<o?n:r},Ne=(e,t,o)=>Math.min(Math.max(e,t),o);let Ie=0;const Be=e=>{const t=(new Date).getTime(),o=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return Ie++,e+"_"+o+Ie+String(t)},ze=e=>(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const o={};for(let n=0;n<t.length;n++){const r=t[n];for(const t in r)be(r,t)&&(o[t]=e(o[t],r[t]))}return o},Fe=ze(((e,t)=>a(e)&&a(t)?Fe(e,t):t)),He=ze(((e,t)=>t)),je=(e,t,o=_)=>e.exists((e=>o(e,t))),Ve=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},Ue=(e,t,o)=>e.isSome()&&t.isSome()?A.some(o(e.getOrDie(),t.getOrDie())):A.none(),Ze=(e,t)=>null!=e?A.some(t(e)):A.none(),$e=(e,t)=>e?A.some(t):A.none(),We=(e,t)=>((e,t)=>{let o=null!=t?t:Le;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t);ye([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const qe=e=>{const t=xe(A.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(A.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(A.some(e))}}},Ge=()=>qe((e=>e.unbind())),Ye=()=>{const e=qe(b);return{...e,on:t=>e.get().each(t)}},Ke=(e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,Xe=(e,t)=>Qe(e,t)?((e,t)=>e.substring(t))(e,t.length):e,Je=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!u(n)||r+t.length<=n)},Qe=(e,t)=>Ke(e,t,0),et=(e,t)=>Ke(e,t,e.length-t.length),tt=(e=>t=>t.replace(e,""))(/^\s+|\s+$/g),ot=e=>e.length>0,nt=e=>!ot(e),rt=(e,t)=>{let o=null;const n=()=>{c(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...r)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,r)}),t)}}},it=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},st=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},at={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return st(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return st(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return st(o)},fromDom:st,fromPoint:(e,t,o)=>A.from(e.dom.elementFromPoint(t,o)).map(st)},lt=(e,t,o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},ct=(e,t,o,n,r)=>{const i=e.document.createRange();return i.setStart(t.dom,o),i.setEnd(n.dom,r),i},dt=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),ut=ye([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),ht=(e,t,o)=>t(at.fromDom(o.startContainer),o.startOffset,at.fromDom(o.endContainer),o.endOffset),mt=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:x(e),rtl:A.none}),relative:(t,o)=>({ltr:it((()=>lt(e,t,o))),rtl:it((()=>A.some(lt(e,o,t))))}),exact:(t,o,n,r)=>({ltr:it((()=>ct(e,t,o,n,r))),rtl:it((()=>A.some(ct(e,n,r,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();if(o.collapsed)return t.rtl().filter((e=>!1===e.collapsed)).map((e=>ut.rtl(at.fromDom(e.endContainer),e.endOffset,at.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>ht(0,ut.ltr,o)));return ht(0,ut.ltr,o)})(0,o)},pt=(e,t)=>mt(e,t).match({ltr:(t,o,n,r)=>{const i=e.document.createRange();return i.setStart(t.dom,o),i.setEnd(n.dom,r),i},rtl:(t,o,n,r)=>{const i=e.document.createRange();return i.setStart(n.dom,r),i.setEnd(t.dom,o),i}});ut.ltr,ut.rtl;const gt=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},ft=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,bt=(e,t)=>{const o=void 0===t?document:t.dom;return ft(o)?A.none():A.from(o.querySelector(e)).map(at.fromDom)},vt=(e,t)=>e.dom===t.dom,yt=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},xt=()=>wt(0,0),wt=(e,t)=>({major:e,minor:t}),_t={nu:wt,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?xt():((e,t)=>{const o=((e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n=e=>Number(t.replace(o,"$"+e));return wt(n(1),n(2))})(e,o)},unknown:xt},St=(e,t)=>{const o=String(t).toLowerCase();return Z(e,(e=>e.search(o)))},Ct=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,kt=e=>t=>Je(t,e),Et=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>Je(e,"edge/")&&Je(e,"chrome")&&Je(e,"safari")&&Je(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ct],search:e=>Je(e,"chrome")&&!Je(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>Je(e,"msie")||Je(e,"trident")},{name:"Opera",versionRegexes:[Ct,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:kt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:kt("firefox")},{name:"Safari",versionRegexes:[Ct,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Je(e,"safari")||Je(e,"mobile/"))&&Je(e,"applewebkit")}],Tt=[{name:"Windows",search:kt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>Je(e,"iphone")||Je(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:kt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:kt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:kt("linux"),versionRegexes:[]},{name:"Solaris",search:kt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:kt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:kt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ot={browsers:x(Et),oses:x(Tt)},At="Edge",Mt="Chromium",Pt="Opera",Dt="Firefox",Lt="Safari",Rt=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(At),isChromium:n(Mt),isIE:n("IE"),isOpera:n(Pt),isFirefox:n(Dt),isSafari:n(Lt)}},Nt={unknown:()=>Rt({current:void 0,version:_t.unknown()}),nu:Rt,edge:x(At),chromium:x(Mt),ie:x("IE"),opera:x(Pt),firefox:x(Dt),safari:x(Lt)},It="Windows",Bt="Android",zt="Linux",Ft="macOS",Ht="Solaris",jt="FreeBSD",Vt="ChromeOS",Ut=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(It),isiOS:n("iOS"),isAndroid:n(Bt),isMacOS:n(Ft),isLinux:n(zt),isSolaris:n(Ht),isFreeBSD:n(jt),isChromeOS:n(Vt)}},Zt={unknown:()=>Ut({current:void 0,version:_t.unknown()}),nu:Ut,windows:x(It),ios:x("iOS"),android:x(Bt),linux:x(zt),macos:x(Ft),solaris:x(Ht),freebsd:x(jt),chromeos:x(Vt)},$t=(e,t,o)=>{const n=Ot.browsers(),r=Ot.oses(),i=t.bind((e=>((e,t)=>re(t.brands,(t=>{const o=t.brand.toLowerCase();return Z(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:_t.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>St(e,t).map((e=>{const o=_t.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(Nt.unknown,Nt.nu),s=((e,t)=>St(e,t).map((e=>{const o=_t.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(Zt.unknown,Zt.nu),a=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),i=e.isiOS()&&!r,s=e.isiOS()||e.isAndroid(),a=s||n("(pointer:coarse)"),l=r||!i&&s&&n("(min-device-width:768px)"),c=i||s&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:x(r),isiPhone:x(i),isTablet:x(l),isPhone:x(c),isTouch:x(a),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:x(d),isDesktop:x(u)}})(s,i,e,o);return{browser:i,os:s,deviceType:a}},Wt=e=>window.matchMedia(e).matches;let qt=it((()=>$t(window.navigator.userAgent,A.from(window.navigator.userAgentData),Wt)));const Gt=()=>qt(),Yt=(e,t)=>{const o=((e,t)=>We(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o},Kt=Object.getPrototypeOf,Xt=e=>{const t=We("ownerDocument.defaultView",e);return s(e)&&((e=>Yt("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Kt(e).constructor.name))},Jt=e=>e.dom.nodeName.toLowerCase(),Qt=e=>t=>(e=>e.dom.nodeType)(t)===e,eo=e=>to(e)&&Xt(e.dom),to=Qt(1),oo=Qt(3),no=Qt(9),ro=Qt(11),io=e=>t=>to(t)&&Jt(t)===e,so=e=>at.fromDom(e.dom.ownerDocument),ao=e=>no(e)?e:so(e),lo=e=>at.fromDom(ao(e).dom.documentElement),co=e=>at.fromDom(ao(e).dom.defaultView),uo=e=>A.from(e.dom.parentNode).map(at.fromDom),ho=e=>A.from(e.dom.parentElement).map(at.fromDom),mo=e=>A.from(e.dom.offsetParent).map(at.fromDom),po=e=>z(e.dom.childNodes,at.fromDom),go=(e,t)=>{const o=e.dom.childNodes;return A.from(o[t]).map(at.fromDom)},fo=e=>go(e,0),bo=(e,t)=>({element:e,offset:t}),vo=(e,t)=>{const o=po(e);return o.length>0&&t<o.length?bo(o[t],0):bo(e,t)},yo=(e,t,o,n)=>{const r=((e,t,o,n)=>{const r=so(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(o.dom,n),r})(e,t,o,n),i=vt(e,o)&&t===n;return r.collapsed&&!i},xo=e=>ro(e)&&m(e.dom.host),wo=e=>at.fromDom(e.dom.getRootNode()),_o=e=>xo(e)?e:at.fromDom(ao(e).dom.body),So=e=>{const t=wo(e);return xo(t)?A.some(t):A.none()},Co=e=>at.fromDom(e.dom.host),ko=e=>m(e.dom.shadowRoot),Eo=e=>{const t=at.fromDom((e=>{if(m(e.target)){const t=at.fromDom(e.target);if(to(t)&&ko(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return te(t)}}return A.from(e.target)})(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=y(n,o);return((e,t,o,n,r,i,s)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:i,raw:s}))(t,e.clientX,e.clientY,o,n,r,e)},To=(e,t,o,n,r)=>{const i=((e,t)=>o=>{e(o)&&t(Eo(o))})(o,n);return e.dom.addEventListener(t,i,r),{unbind:S(Oo,e,t,i,r)}},Oo=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},Ao=O,Mo=(e,t,o)=>((e,t,o,n)=>To(e,t,o,n,!1))(e,t,Ao,o),Po=(e,t,o)=>((e,t,o,n)=>To(e,t,o,n,!0))(e,t,Ao,o),Do=Eo,Lo=()=>at.fromDom(document),Ro=(e,t=!1)=>e.dom.focus({preventScroll:t}),No=e=>e.dom.blur(),Io=e=>{const t=wo(e).dom;return e.dom===t.activeElement},Bo=(e=Lo())=>A.from(e.dom.activeElement).map(at.fromDom),zo=e=>Bo(wo(e)).filter((t=>e.dom.contains(t.dom))),Fo=(e,t)=>{uo(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Ho=(e,t)=>{const o=(e=>A.from(e.dom.nextSibling).map(at.fromDom))(e);o.fold((()=>{uo(e).each((e=>{Vo(e,t)}))}),(e=>{Fo(e,t)}))},jo=(e,t)=>{fo(e).fold((()=>{Vo(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},Vo=(e,t)=>{e.dom.appendChild(t.dom)},Uo=(e,t)=>{F(t,(t=>{Vo(e,t)}))},Zo=(e,t,o)=>{if(!(i(o)||d(o)||g(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},$o=(e,t,o)=>{Zo(e.dom,t,o)},Wo=(e,t)=>{const o=e.dom;ae(t,((e,t)=>{Zo(o,t,e)}))},qo=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},Go=(e,t)=>A.from(qo(e,t)),Yo=(e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute(t)},Ko=(e,t)=>{e.dom.removeAttribute(t)},Xo=e=>{e.dom.textContent="",F(po(e),(e=>{Jo(e)}))},Jo=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Qo=(e,t)=>at.fromDom(e.dom.cloneNode(t)),en=e=>e.dom.innerHTML,tn=(e,t)=>{const o=so(e).dom,n=at.fromDom(o.createDocumentFragment()),r=((e,t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,po(at.fromDom(o))})(t,o);Uo(n,r),Xo(e),Vo(e,n)},on=e=>{if(xo(e))return"#shadow-root";{const t=(e=>Qo(e,!1))(e);return(e=>{const t=at.fromTag("div"),o=at.fromDom(e.dom.cloneNode(!0));return Vo(t,o),en(t)})(t)}},nn=e=>new Promise(((t,o)=>{const n=()=>{i(),t(e)},r=[Mo(e,"load",n),Mo(e,"error",(()=>{i(),o("Unable to load data from image: "+e.dom.src)}))],i=()=>F(r,(e=>e.unbind()));e.dom.complete&&n()})),rn=e=>void 0!==e.style&&p(e.style.getPropertyValue),sn=e=>{const t=oo(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return So(at.fromDom(t)).fold((()=>o.body.contains(t)),(n=sn,r=Co,e=>n(r(e))));var n,r},an=()=>ln(at.fromDom(document)),ln=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return at.fromDom(t)},cn=(e,t,o)=>{if(!i(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);rn(e)&&e.style.setProperty(t,o)},dn=(e,t)=>{rn(e)&&e.style.removeProperty(t)},un=(e,t,o)=>{const n=e.dom;cn(n,t,o)},hn=(e,t)=>{const o=e.dom;ae(t,((e,t)=>{cn(o,t,e)}))},mn=(e,t)=>{const o=e.dom;ae(t,((e,t)=>{e.fold((()=>{dn(o,t)}),(e=>{cn(o,t,e)}))}))},pn=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||sn(e)?n:gn(o,t)},gn=(e,t)=>rn(e)?e.style.getPropertyValue(t):"",fn=(e,t)=>{const o=e.dom,n=gn(o,t);return A.from(n).filter((e=>e.length>0))},bn=e=>{const t={},o=e.dom;if(rn(o))for(let e=0;e<o.style.length;e++){const n=o.style.item(e);t[n]=o.style[n]}return t},vn=(e,t,o)=>{const n=at.fromTag(e);un(n,t,o);return fn(n,t).isSome()},yn=(e,t)=>{const o=e.dom;dn(o,t),je(Go(e,"style").map(tt),"")&&Ko(e,"style")},xn=e=>e.dom.offsetWidth,wn=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=pn(o,e);return parseFloat(t)||0}return n},n=(e,t)=>U(t,((t,o)=>{const n=pn(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!g(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;rn(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}},_n=wn("height",(e=>{const t=e.dom;return sn(e)?t.getBoundingClientRect().height:t.offsetHeight})),Sn=e=>_n.get(e),Cn=e=>_n.getOuter(e),kn=e=>!(e=>e.offsetWidth<=0&&e.offsetHeight<=0)(e.dom),En=wn("width",(e=>e.dom.offsetWidth)),Tn=wn("width",(e=>{const t=e.dom;return sn(e)?t.getBoundingClientRect().width:t.offsetWidth})),On=e=>En.get(e),An=e=>En.getOuter(e),Mn=e=>Tn.getOuter(e),Pn=(e,t)=>({left:e,top:t,translate:(o,n)=>Pn(e+o,t+n)}),Dn=Pn,Ln=(e,t)=>void 0!==e?e:void 0!==t?t:0,Rn=e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return Dn(o.offsetLeft,o.offsetTop);const i=Ln(null==n?void 0:n.pageYOffset,r.scrollTop),s=Ln(null==n?void 0:n.pageXOffset,r.scrollLeft),a=Ln(r.clientTop,o.clientTop),l=Ln(r.clientLeft,o.clientLeft);return Nn(e).translate(s-l,i-a)},Nn=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?Dn(o.offsetLeft,o.offsetTop):sn(e)?(e=>{const t=e.getBoundingClientRect();return Dn(t.left,t.top)})(t):Dn(0,0)},In=e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return Dn(o,n)},Bn=(e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollTo(e,t)},zn=((e,t)=>{const o=t=>e(t)?A.from(t.dom.nodeValue):A.none();return{get:n=>{if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return o(n).getOr("")},getOption:o,set:(o,n)=>{if(!e(o))throw new Error("Can only set raw "+t+" value of a "+t+" node");o.dom.nodeValue=n}}})(oo,"text"),Fn=(e,t)=>o=>"rtl"===Hn(o)?t:e,Hn=e=>"rtl"===pn(e,"direction")?"rtl":"ltr",jn=(e,t)=>{const o=qo(e,t);return void 0===o||""===o?[]:o.split(" ")};var Vn=(e,t,o,n,r)=>e(o,n)?A.some(o):p(r)&&r(o)?A.none():t(o,n,r);const Un=(e,t,o)=>{let n=e.dom;const r=p(o)?o:T;for(;n.parentNode;){n=n.parentNode;const e=at.fromDom(n);if(t(e))return A.some(e);if(r(e))break}return A.none()},Zn=(e,t,o)=>Vn(((e,t)=>t(e)),Un,e,t,o),$n=(e,t)=>Z(e.dom.childNodes,(e=>t(at.fromDom(e)))).map(at.fromDom),Wn=(e,t,o)=>Un(e,(e=>gt(e,t)),o),qn=(e,t)=>((e,t)=>{const o=e.dom;return o.parentNode?$n(at.fromDom(o.parentNode),(o=>!vt(e,o)&&t(o))):A.none()})(e,(e=>gt(e,t))),Gn=(e,t)=>$n(e,(e=>gt(e,t))),Yn=(e,t)=>bt(t,e),Kn=(e,t,o)=>Vn(((e,t)=>gt(e,t)),Wn,e,t,o),Xn=(e,t)=>{e.dom.checked=t},Jn=e=>e.dom.checked,Qn=e=>void 0!==e.dom.classList,er=e=>jn(e,"class"),tr=(e,t)=>((e,t,o)=>{const n=jn(e,t).concat([o]);return $o(e,t,n.join(" ")),!0})(e,"class",t),or=(e,t)=>((e,t,o)=>{const n=j(jn(e,t),(e=>e!==o));return n.length>0?$o(e,t,n.join(" ")):Ko(e,t),!1})(e,"class",t),nr=(e,t)=>{Qn(e)?e.dom.classList.add(t):tr(e,t)},rr=e=>{0===(Qn(e)?e.dom.classList:er(e)).length&&Ko(e,"class")},ir=(e,t)=>{if(Qn(e)){e.dom.classList.remove(t)}else or(e,t);rr(e)},sr=(e,t)=>{const o=Qn(e)?e.dom.classList.toggle(t):((e,t)=>R(er(e),t)?or(e,t):tr(e,t))(e,t);return rr(e),o},ar=(e,t)=>Qn(e)&&e.dom.classList.contains(t),lr=(e,t)=>{F(t,(t=>{nr(e,t)}))},cr=(e,t)=>{F(t,(t=>{ir(e,t)}))},dr=e=>Qn(e)?(e=>{const t=e.dom.classList,o=new Array(t.length);for(let e=0;e<t.length;e++){const n=t.item(e);null!==n&&(o[e]=n)}return o})(e):er(e),ur=e=>e.dom.value,hr=(e,t)=>{if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},mr=(e,t,o)=>j(((e,t)=>{const o=p(t)?t:T;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=at.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r})(e,o),t),pr=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return ft(o)?[]:z(o.querySelectorAll(e),at.fromDom)})(t,e),gr=(e,t,o)=>Zn(e,t,o).isSome(),fr=(e,t,o)=>Kn(e,t,o).isSome(),br=e=>p(e)?e:T,vr=(e,t,o)=>{let n=e.dom;const r=br(o);for(;n.parentNode;){n=n.parentNode;const e=at.fromDom(n),o=t(e);if(o.isSome())return o;if(r(e))break}return A.none()},yr=(e,t,o)=>{const n=t(e),r=br(o);return n.orThunk((()=>r(e)?A.none():vr(e,t,r)))},xr=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),wr=ye([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),_r=(wr.before,wr.on,wr.after,e=>e.fold(w,w,w)),Sr=ye([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Cr={domRange:Sr.domRange,relative:Sr.relative,exact:Sr.exact,exactFromRange:e=>Sr.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>at.fromDom(e.startContainer),relative:(e,t)=>_r(e),exact:(e,t,o,n)=>e}))(e);return co(t)},range:xr},kr=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),o=e.getRangeAt(e.rangeCount-1);return A.some(xr(at.fromDom(t.startContainer),t.startOffset,at.fromDom(o.endContainer),o.endOffset))}return A.none()},Er=e=>{if(null===e.anchorNode||null===e.focusNode)return kr(e);{const t=at.fromDom(e.anchorNode),o=at.fromDom(e.focusNode);return yo(t,e.anchorOffset,o,e.focusOffset)?A.some(xr(t,e.anchorOffset,o,e.focusOffset)):kr(e)}},Tr=e=>(e=>A.from(e.getSelection()))(e).filter((e=>e.rangeCount>0)).bind(Er),Or=(e,t)=>(e=>{const t=e.getClientRects(),o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?A.some(o).map(dt):A.none()})(pt(e,t)),Ar=(e,t)=>(e=>{const t=e.getBoundingClientRect();return t.width>0||t.height>0?A.some(t).map(dt):A.none()})(pt(e,t)),Mr={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},Pr=(()=>{const e="[0-9]+",t="[eE]"+("[+-]?"+e),o=e=>`(?:${e})?`,n=["Infinity",e+"\\."+o(e)+o(t),"\\."+e+o(t),e+o(t)].join("|");return new RegExp(`^(${`[+-]?(?:${n})`})(.*)$`)})(),Dr=(e,t)=>A.from(Pr.exec(e)).bind((e=>{const o=Number(e[1]),n=e[2];return((e,t)=>N(t,(t=>N(Mr[t],(t=>e===t)))))(n,t)?A.some({value:o,unit:n}):A.none()})),Lr=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Rr=e=>{const t=void 0===e?window:e,o=t.document,n=In(at.fromDom(o));return(e=>{const t=void 0===e?window:e;return Gt().browser.isFirefox()?A.none():A.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,o=e.clientWidth,r=e.clientHeight;return Lr(n.left,n.top,o,r)}),(e=>Lr(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))},Nr=(e,t)=>e.view(t).fold(x([]),(t=>{const o=e.owner(t),n=Nr(e,o);return[t].concat(n)}));var Ir=Object.freeze({__proto__:null,view:e=>{var t;return(e.dom===document?A.none():A.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(at.fromDom)},owner:e=>so(e)});const Br=e=>{const t=Lo(),o=In(t),n=((e,t)=>{const o=t.owner(e),n=Nr(t,o);return A.some(n)})(e,Ir);return n.fold(S(Rn,e),(t=>{const n=Nn(e),r=V(t,((e,t)=>{const o=Nn(t);return{left:e.left+o.left,top:e.top+o.top}}),{left:0,top:0});return Dn(r.left+n.left+o.left,r.top+n.top+o.top)}))},zr=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Fr=e=>{const t=Rn(e),o=An(e),n=Cn(e);return zr(t.left,t.top,o,n)},Hr=e=>{const t=Br(e),o=An(e),n=Cn(e);return zr(t.left,t.top,o,n)},jr=(e,t)=>{const o=Math.max(e.x,t.x),n=Math.max(e.y,t.y),r=Math.min(e.right,t.right),i=Math.min(e.bottom,t.bottom);return zr(o,n,r-o,i-n)},Vr=()=>Rr(window),Ur=(e,t)=>vt(e.element,t.event.target),Zr=e=>(je(fn(e,"position"),"fixed")?A.none():mo(e)).orThunk((()=>{const t=at.fromTag("span");return uo(e).bind((e=>{Vo(e,t);const o=mo(t);return Jo(t),o}))})),$r=e=>Zr(e).map(Rn).getOrThunk((()=>Dn(0,0)));var Wr;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(Wr||(Wr={}));const qr=(e,t,o)=>e.stype===Wr.Error?t(e.serror):o(e.svalue),Gr=e=>({stype:Wr.Value,svalue:e}),Yr=e=>({stype:Wr.Error,serror:e}),Kr=e=>e.fold(Yr,Gr),Xr=e=>qr(e,Ae.error,Ae.value),Jr=Gr,Qr=e=>{const t=[],o=[];return F(e,(e=>{qr(e,(e=>o.push(e)),(e=>t.push(e)))})),{values:t,errors:o}},ei=Yr,ti=(e,t)=>e.stype===Wr.Value?t(e.svalue):e,oi=(e,t)=>e.stype===Wr.Error?t(e.serror):e,ni=(e,t)=>e.stype===Wr.Value?{stype:Wr.Value,svalue:t(e.svalue)}:e,ri=(e,t)=>e.stype===Wr.Error?{stype:Wr.Error,serror:t(e.serror)}:e,ii=qr,si=e=>s(e)&&ie(e).length>100?" removed due to size":JSON.stringify(e,null,2),ai=(e,t)=>ei([{path:e,getErrorInfo:t}]),li=e=>({extract:(t,o)=>oi(e(o),(e=>((e,t)=>ai(e,x(t)))(t,e))),toString:x("val")}),ci=li(Jr),di=x(ci),ui=(e,t)=>li((o=>{const n=typeof o;return e(o)?Jr(o):ei(`Expected type: ${t} but got: ${n}`)})),hi=ui(g,"number"),mi=ui(i,"string"),pi=ui(d,"boolean"),gi=ui(p,"function"),fi=e=>{if(Object(e)!==e)return!0;switch({}.toString.call(e).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(e).every((t=>fi(e[t])));default:return!1}},bi=li((e=>fi(e)?Jr(e):ei("Expected value to be acceptable for sending via postMessage"))),vi=e=>({tag:"defaultedThunk",process:e}),yi=e=>vi(x(e)),xi=e=>({tag:"mergeWithThunk",process:e}),wi=(e,t,o,n)=>({tag:"field",key:e,newKey:t,presence:o,prop:n}),_i=(e,t,o)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return o(e.newKey,e.instantiator)}},Si=e=>y(ei,W)(e),Ci=e=>{const t=Qr(e);return t.errors.length>0?Si(t.errors):Jr(t.values)},ki=(e,t,o,n)=>fe(t,o).fold((()=>((e,t,o)=>ai(e,(()=>'Could not find valid *required* value for "'+t+'" in '+si(o))))(e,o,t)),n),Ei=(e,t,o,n)=>n(fe(e,t).getOrThunk((()=>o(e)))),Ti=(e,t,o,n,r)=>{const i=e=>r.extract(t.concat([n]),e),s=e=>e.fold((()=>Jr(A.none())),(e=>{const o=r.extract(t.concat([n]),e);return ni(o,A.some)}));switch(e.tag){case"required":return ki(t,o,n,i);case"defaultedThunk":return Ei(o,n,e.process,i);case"option":return((e,t,o)=>o(fe(e,t)))(o,n,s);case"defaultedOptionThunk":return((e,t,o,n)=>n(fe(e,t).map((t=>!0===t?o(e):t))))(o,n,e.process,s);case"mergeWithThunk":return Ei(o,n,x({}),(t=>{const n=Fe(e.process(o),t);return i(n)}))}},Oi=e=>({extract:(t,o)=>e().extract(t,o),toString:()=>e().toString()}),Ai=e=>ie(he(e,m)),Mi=e=>{const t=Pi(e),o=V(e,((e,t)=>_i(t,(t=>Fe(e,{[t]:!0})),x(e))),{});return{extract:(e,n)=>{const r=d(n)?[]:Ai(n),i=j(r,(e=>!ve(o,e)));return 0===i.length?t.extract(e,n):((e,t)=>ai(e,(()=>"There are unsupported fields: ["+t.join(", ")+"] specified")))(e,i)},toString:t.toString}},Pi=e=>({extract:(t,o)=>((e,t,o)=>{const n={},r=[];for(const i of o)_i(i,((o,i,s,a)=>{const l=Ti(s,e,t,o,a);ii(l,(e=>{r.push(...e)}),(e=>{n[i]=e}))}),((e,o)=>{n[e]=o(t)}));return r.length>0?ei(r):Jr(n)})(t,o,e),toString:()=>{const t=z(e,(e=>_i(e,((e,t,o,n)=>e+" -> "+n.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),Di=e=>({extract:(t,o)=>{const n=z(o,((o,n)=>e.extract(t.concat(["["+n+"]"]),o)));return Ci(n)},toString:()=>"array("+e.toString()+")"}),Li=(e,t)=>{const o=void 0!==t?t:w;return{extract:(t,n)=>{const r=[];for(const i of e){const e=i.extract(t,n);if(e.stype===Wr.Value)return{stype:Wr.Value,svalue:o(e.svalue)};r.push(e)}return Ci(r)},toString:()=>"oneOf("+z(e,(e=>e.toString())).join(", ")+")"}},Ri=(e,t)=>({extract:(o,n)=>{const r=ie(n),i=((t,o)=>Di(li(e)).extract(t,o))(o,r);return ti(i,(e=>{const r=z(e,(e=>wi(e,e,{tag:"required",process:{}},t)));return Pi(r).extract(o,n)}))},toString:()=>"setOf("+t.toString()+")"}),Ni=y(Di,Pi),Ii=(e,t,o,n)=>fe(o,n).fold((()=>((e,t,o)=>ai(e,(()=>'The chosen schema: "'+o+'" did not exist in branches: '+si(t))))(e,o,n)),(o=>o.extract(e.concat(["branch: "+n]),t))),Bi=(e,t)=>({extract:(o,n)=>fe(n,e).fold((()=>((e,t)=>ai(e,(()=>'Choice schema did not contain choice key: "'+t+'"')))(o,e)),(e=>Ii(o,n,t,e))),toString:()=>"chooseOn("+e+"). Possible values: "+ie(t)}),zi=e=>li((t=>e(t).fold(ei,Jr))),Fi=(e,t)=>Ri((t=>Kr(e(t))),t),Hi=(e,t,o)=>Xr(((e,t,o)=>{const n=t.extract([e],o);return ri(n,(e=>({input:o,errors:e})))})(e,t,o)),ji=e=>e.fold((e=>{throw new Error(Ui(e))}),w),Vi=(e,t,o)=>ji(Hi(e,t,o)),Ui=e=>"Errors: \n"+(e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:x("... (only showing first ten failures)")}]):e;return z(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))})(e.errors).join("\n")+"\n\nInput object: "+si(e.input),Zi=(e,t)=>Bi(e,le(t,Pi)),$i=(e,t)=>((e,t)=>{const o=it(t);return{extract:(e,t)=>o().extract(e,t),toString:()=>o().toString()}})(0,t),Wi=wi,qi=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),Gi=e=>zi((t=>R(e,t)?Ae.value(t):Ae.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`))),Yi=e=>Wi(e,e,{tag:"required",process:{}},di()),Ki=(e,t)=>Wi(e,e,{tag:"required",process:{}},t),Xi=e=>Ki(e,hi),Ji=e=>Ki(e,mi),Qi=(e,t)=>Wi(e,e,{tag:"required",process:{}},Gi(t)),es=e=>Ki(e,gi),ts=(e,t)=>Wi(e,e,{tag:"required",process:{}},Pi(t)),os=(e,t)=>Wi(e,e,{tag:"required",process:{}},Ni(t)),ns=(e,t)=>Wi(e,e,{tag:"required",process:{}},Di(t)),rs=e=>Wi(e,e,{tag:"option",process:{}},di()),is=(e,t)=>Wi(e,e,{tag:"option",process:{}},t),ss=e=>is(e,hi),as=e=>is(e,mi),ls=(e,t)=>is(e,Gi(t)),cs=e=>is(e,gi),ds=(e,t)=>is(e,Di(t)),us=(e,t)=>is(e,Pi(t)),hs=(e,t)=>Wi(e,e,yi(t),di()),ms=(e,t,o)=>Wi(e,e,yi(t),o),ps=(e,t)=>ms(e,t,hi),gs=(e,t)=>ms(e,t,mi),fs=(e,t,o)=>ms(e,t,Gi(o)),bs=(e,t)=>ms(e,t,pi),vs=(e,t)=>ms(e,t,gi),ys=(e,t,o)=>ms(e,t,Di(o)),xs=(e,t,o)=>ms(e,t,Pi(o)),ws=(e,t)=>((e,t)=>{const o={};return ae(e,((e,n)=>{R(t,n)||(o[n]=e)})),o})(e,t),_s=(e,t)=>((e,t)=>({[e]:t}))(e,t),Ss=e=>(e=>{const t={};return F(e,(e=>{t[e.key]=e.value})),t})(e),Cs=(e,t)=>{const o=(e=>{const t=[],o=[];return F(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{o.push(e)}))})),{errors:t,values:o}})(e);return o.errors.length>0?(n=o.errors,Ae.error(W(n))):((e,t)=>0===e.length?Ae.value(t):Ae.value(Fe(t,He.apply(void 0,e))))(o.values,t);var n},ks=x,Es=ks("touchstart"),Ts=ks("touchmove"),Os=ks("touchend"),As=ks("touchcancel"),Ms=ks("mousedown"),Ps=ks("mousemove"),Ds=ks("mouseout"),Ls=ks("mouseup"),Rs=ks("mouseover"),Ns=ks("focusin"),Is=ks("focusout"),Bs=ks("keydown"),zs=ks("keyup"),Fs=ks("input"),Hs=ks("change"),js=ks("click"),Vs=ks("transitioncancel"),Us=ks("transitionend"),Zs=ks("transitionstart"),$s=ks("selectstart"),Ws=e=>x("alloy."+e),qs={tap:Ws("tap")},Gs=Ws("focus"),Ys=Ws("blur.post"),Ks=Ws("paste.post"),Xs=Ws("receive"),Js=Ws("execute"),Qs=Ws("focus.item"),ea=qs.tap,ta=Ws("longpress"),oa=Ws("sandbox.close"),na=Ws("typeahead.cancel"),ra=Ws("system.init"),ia=Ws("system.touchmove"),sa=Ws("system.touchend"),aa=Ws("system.scroll"),la=Ws("system.resize"),ca=Ws("system.attached"),da=Ws("system.detached"),ua=Ws("system.dismissRequested"),ha=Ws("system.repositionRequested"),ma=Ws("focusmanager.shifted"),pa=Ws("slotcontainer.visibility"),ga=Ws("system.external.element.scroll"),fa=Ws("change.tab"),ba=Ws("dismiss.tab"),va=Ws("highlight"),ya=Ws("dehighlight"),xa=e=>on(e),wa="unknown";var _a;!function(e){e[e.STOP=0]="STOP",e[e.NORMAL=1]="NORMAL",e[e.LOGGING=2]="LOGGING"}(_a||(_a={}));const Sa=xe({}),Ca=(e,t,o)=>{switch(fe(Sa.get(),e).orThunk((()=>{const t=ie(Sa.get());return re(t,(t=>e.indexOf(t)>-1?A.some(Sa.get()[t]):A.none()))})).getOr(_a.NORMAL)){case _a.NORMAL:return o(Ta());case _a.LOGGING:{const n=((e,t)=>{const o=[],n=(new Date).getTime();return{logEventCut:(e,t,n)=>{o.push({outcome:"cut",target:t,purpose:n})},logEventStopped:(e,t,n)=>{o.push({outcome:"stopped",target:t,purpose:n})},logNoParent:(e,t,n)=>{o.push({outcome:"no-parent",target:t,purpose:n})},logEventNoHandlers:(e,t)=>{o.push({outcome:"no-handlers-left",target:t})},logEventResponse:(e,t,n)=>{o.push({outcome:"response",purpose:n,target:t})},write:()=>{const r=(new Date).getTime();R(["mousemove","mouseover","mouseout",ra()],e)||console.log(e,{event:e,time:r-n,target:t.dom,sequence:z(o,(e=>R(["cut","stopped","response"],e.outcome)?"{"+e.purpose+"} "+e.outcome+" at ("+xa(e.target)+")":e.outcome))})}}})(e,t),r=o(n);return n.write(),r}case _a.STOP:return!0}},ka=["alloy/data/Fields","alloy/debugging/Debugging"],Ea=(e,t,o)=>Ca(e,t,o),Ta=x({logEventCut:b,logEventStopped:b,logNoParent:b,logEventNoHandlers:b,logEventResponse:b,write:b}),Oa=x([Yi("menu"),Yi("selectedMenu")]),Aa=x([Yi("item"),Yi("selectedItem")]);x(Pi(Aa().concat(Oa())));const Ma=x(Pi(Aa())),Pa=ts("initSize",[Yi("numColumns"),Yi("numRows")]),Da=()=>ts("markers",[Yi("backgroundMenu")].concat(Oa()).concat(Aa())),La=e=>ts("markers",z(e,Yi)),Ra=(e,t,o)=>((()=>{const e=new Error;if(void 0!==e.stack){const t=e.stack.split("\n");return Z(t,(e=>e.indexOf("alloy")>0&&!N(ka,(t=>e.indexOf(t)>-1)))).getOr(wa)}})(),Wi(t,t,o,zi((e=>Ae.value(((...t)=>e.apply(void 0,t))))))),Na=e=>Ra(0,e,yi(b)),Ia=e=>Ra(0,e,yi(A.none)),Ba=e=>Ra(0,e,{tag:"required",process:{}}),za=e=>Ra(0,e,{tag:"required",process:{}}),Fa=(e,t)=>qi(e,x(t)),Ha=e=>qi(e,w),ja=x(Pa),Va=e=>z(e,(e=>et(e,"/*")?e.substring(0,e.length-2):e)),Ua=(e,t)=>{const o=e.toString(),n=o.indexOf(")")+1,r=o.indexOf("("),i=o.substring(r+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:t,parameters:Va(i)}),e},Za=(e,t)=>{let o=null;return{cancel:()=>{null!==o&&(clearTimeout(o),o=null)},schedule:(...n)=>{o=setTimeout((()=>{e.apply(null,n),o=null}),t)}}},$a=e=>{const t=e.raw;return void 0===t.touches||1!==t.touches.length?A.none():A.some(t.touches[0])},Wa=e=>{const t=Ye(),o=xe(!1),n=Za((t=>{e.triggerEvent(ta(),t),o.set(!0)}),400),r=Ss([{key:Es(),value:e=>($a(e).each((r=>{n.cancel();const i={x:r.clientX,y:r.clientY,target:e.target};n.schedule(e),o.set(!1),t.set(i)})),A.none())},{key:Ts(),value:e=>(n.cancel(),$a(e).each((e=>{t.on((o=>{((e,t)=>{const o=Math.abs(e.clientX-t.x),n=Math.abs(e.clientY-t.y);return o>5||n>5})(e,o)&&t.clear()}))})),A.none())},{key:Os(),value:r=>{n.cancel();return t.get().filter((e=>vt(e.target,r.target))).map((t=>o.get()?(r.prevent(),!1):e.triggerEvent(ea(),r)))}}]);return{fireIfReady:(e,t)=>fe(r,t).bind((t=>t(e)))}};var qa;!function(e){e.OnFocusMode="onFocus",e.OnEnterOrSpaceMode="onEnterOrSpace",e.OnApiMode="onApi"}(qa||(qa={}));const Ga="placeholder",Ya=ye([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Ka=e=>be(e,"uiType"),Xa=(e,t,o,n)=>Ka(o)&&o.uiType===Ga?((e,t,o,n)=>e.exists((e=>e!==o.owner))?Ya.single(!0,x(o)):fe(n,o.name).fold((()=>{throw new Error("Unknown placeholder component: "+o.name+"\nKnown: ["+ie(n)+"]\nNamespace: "+e.getOr("none")+"\nSpec: "+JSON.stringify(o,null,2))}),(e=>e.replace())))(e,0,o,n):Ya.single(!1,x(o)),Ja=(e,t,o,n)=>Xa(e,0,o,n).fold(((r,i)=>{const s=Ka(o)?i(t,o.config,o.validated):i(t),a=fe(s,"components").getOr([]),l=q(a,(o=>Ja(e,t,o,n)));return[{...s,components:l}]}),((e,n)=>{if(Ka(o)){const e=n(t,o.config,o.validated);return o.validated.preprocess.getOr(w)(e)}return n(t)})),Qa=(e,t,o,n)=>{const r=le(n,((e,t)=>((e,t)=>{let o=!1;return{name:x(e),required:()=>t.fold(((e,t)=>e),((e,t)=>e)),used:()=>o,replace:()=>{if(o)throw new Error("Trying to use the same placeholder more than once: "+e);return o=!0,t}}})(t,e))),i=((e,t,o,n)=>q(o,(o=>Ja(e,t,o,n))))(e,t,o,r);return ae(r,(o=>{if(!1===o.used()&&o.required())throw new Error("Placeholder: "+o.name()+" was not found in components list\nNamespace: "+e.getOr("none")+"\nComponents: "+JSON.stringify(t.components,null,2))})),i},el=Ya.single,tl=Ya.multiple,ol=x(Ga),nl=ye([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),rl=hs("factory",{sketch:w}),il=hs("schema",[]),sl=Yi("name"),al=Wi("pname","pname",vi((e=>"<alloy."+Be(e.name)+">")),di()),ll=qi("schema",(()=>[rs("preprocess")])),cl=hs("defaults",x({})),dl=hs("overrides",x({})),ul=Pi([rl,il,sl,al,cl,dl]),hl=Pi([rl,il,sl,cl,dl]),ml=Pi([rl,il,sl,al,cl,dl]),pl=Pi([rl,ll,sl,Yi("unit"),al,cl,dl]),gl=e=>e.fold(A.some,A.none,A.some,A.some),fl=e=>{const t=e=>e.name;return e.fold(t,t,t,t)},bl=(e,t)=>o=>{const n=Vi("Converting part type",t,o);return e(n)},vl=bl(nl.required,ul),yl=bl(nl.external,hl),xl=bl(nl.optional,ml),wl=bl(nl.group,pl),_l=x("entirety");var Sl=Object.freeze({__proto__:null,required:vl,external:yl,optional:xl,group:wl,asNamedPart:gl,name:fl,asCommon:e=>e.fold(w,w,w,w),original:_l});const Cl=(e,t,o,n)=>Fe(t.defaults(e,o,n),o,{uid:e.partUids[t.name]},t.overrides(e,o,n)),kl=(e,t)=>{const o={};return F(t,(t=>{gl(t).each((t=>{const n=El(e,t.pname);o[t.name]=o=>{const r=Vi("Part: "+t.name+" in "+e,Pi(t.schema),o);return{...n,config:o,validated:r}}}))})),o},El=(e,t)=>({uiType:ol(),owner:e,name:t}),Tl=(e,t,o)=>({uiType:ol(),owner:e,name:t,config:o,validated:{}}),Ol=e=>q(e,(e=>e.fold(A.none,A.some,A.none,A.none).map((e=>ts(e.name,e.schema.concat([Ha(_l())])))).toArray())),Al=e=>z(e,fl),Ml=(e,t,o)=>((e,t,o)=>{const n={},r={};return F(o,(e=>{e.fold((e=>{n[e.pname]=el(!0,((t,o,n)=>e.factory.sketch(Cl(t,e,o,n))))}),(e=>{const o=t.parts[e.name];r[e.name]=x(e.factory.sketch(Cl(t,e,o[_l()]),o))}),(e=>{n[e.pname]=el(!1,((t,o,n)=>e.factory.sketch(Cl(t,e,o,n))))}),(e=>{n[e.pname]=tl(!0,((t,o,n)=>{const r=t[e.name];return z(r,(o=>e.factory.sketch(Fe(e.defaults(t,o,n),o,e.overrides(t,o)))))}))}))})),{internals:x(n),externals:x(r)}})(0,t,o),Pl=(e,t,o)=>Qa(A.some(e),t,t.components,o),Dl=(e,t,o)=>{const n=t.partUids[o];return e.getSystem().getByUid(n).toOptional()},Ll=(e,t,o)=>Dl(e,t,o).getOrDie("Could not find part: "+o),Rl=(e,t,o)=>{const n={},r=t.partUids,i=e.getSystem();return F(o,(e=>{n[e]=x(i.getByUid(r[e]))})),n},Nl=(e,t)=>{const o=e.getSystem();return le(t.partUids,((e,t)=>x(o.getByUid(e))))},Il=e=>ie(e.partUids),Bl=(e,t,o)=>{const n={},r=t.partUids,i=e.getSystem();return F(o,(e=>{n[e]=x(i.getByUid(r[e]).getOrDie())})),n},zl=(e,t)=>{const o=Al(t);return Ss(z(o,(t=>({key:t,value:e+"-"+t}))))},Fl=e=>Wi("partUids","partUids",xi((t=>zl(t.uid,e))),di());var Hl=Object.freeze({__proto__:null,generate:kl,generateOne:Tl,schemas:Ol,names:Al,substitutes:Ml,components:Pl,defaultUids:zl,defaultUidsSchema:Fl,getAllParts:Nl,getAllPartNames:Il,getPart:Dl,getPartOrDie:Ll,getParts:Rl,getPartsOrDie:Bl});const jl=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Vl=(e,t,o,n=1)=>{const r=e*n,i=t*n,s=e=>fe(o,e).getOr([]),a=(e,t,o)=>{const n=K(jl,o);return{offset:Dn(e,t),classesOn:q(o,s),classesOff:q(n,s)}};return{southeast:()=>a(-e,t,["top","alignLeft"]),southwest:()=>a(e,t,["top","alignRight"]),south:()=>a(-e/2,t,["top","alignCentre"]),northeast:()=>a(-e,-t,["bottom","alignLeft"]),northwest:()=>a(e,-t,["bottom","alignRight"]),north:()=>a(-e/2,-t,["bottom","alignCentre"]),east:()=>a(e,-t/2,["valignCentre","left"]),west:()=>a(-e,-t/2,["valignCentre","right"]),insetNortheast:()=>a(r,i,["top","alignLeft","inset"]),insetNorthwest:()=>a(-r,i,["top","alignRight","inset"]),insetNorth:()=>a(-r/2,i,["top","alignCentre","inset"]),insetSoutheast:()=>a(r,-i,["bottom","alignLeft","inset"]),insetSouthwest:()=>a(-r,-i,["bottom","alignRight","inset"]),insetSouth:()=>a(-r/2,-i,["bottom","alignCentre","inset"]),insetEast:()=>a(-r,-i/2,["valignCentre","right","inset"]),insetWest:()=>a(r,-i/2,["valignCentre","left","inset"])}},Ul=()=>Vl(0,0,{}),Zl=(e,t,o,n,r,i,s,a=!1)=>({x:e,y:t,bubble:o,direction:n,placement:r,restriction:i,label:`${s}-${r}`,alwaysFit:a}),$l=ye([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Wl=$l.southeast,ql=$l.southwest,Gl=$l.northeast,Yl=$l.northwest,Kl=$l.south,Xl=$l.north,Jl=$l.east,Ql=$l.west,ec=(e,t)=>X(["left","right","top","bottom"],(o=>fe(t,o).map((t=>((e,t)=>{switch(t){case 1:return e.x;case 0:return e.x+e.width;case 2:return e.y;case 3:return e.y+e.height}})(e,t))))),tc="layout",oc=e=>e.x,nc=(e,t)=>e.x+e.width/2-t.width/2,rc=(e,t)=>e.x+e.width-t.width,ic=(e,t)=>e.y-t.height,sc=e=>e.y+e.height,ac=(e,t)=>e.y+e.height/2-t.height/2,lc=(e,t,o)=>Zl(oc(e),sc(e),o.southeast(),Wl(),"southeast",ec(e,{left:1,top:3}),tc),cc=(e,t,o)=>Zl(rc(e,t),sc(e),o.southwest(),ql(),"southwest",ec(e,{right:0,top:3}),tc),dc=(e,t,o)=>Zl(oc(e),ic(e,t),o.northeast(),Gl(),"northeast",ec(e,{left:1,bottom:2}),tc),uc=(e,t,o)=>Zl(rc(e,t),ic(e,t),o.northwest(),Yl(),"northwest",ec(e,{right:0,bottom:2}),tc),hc=(e,t,o)=>Zl(nc(e,t),ic(e,t),o.north(),Xl(),"north",ec(e,{bottom:2}),tc),mc=(e,t,o)=>Zl(nc(e,t),sc(e),o.south(),Kl(),"south",ec(e,{top:3}),tc),pc=(e,t,o)=>Zl((e=>e.x+e.width)(e),ac(e,t),o.east(),Jl(),"east",ec(e,{left:0}),tc),gc=(e,t,o)=>Zl(((e,t)=>e.x-t.width)(e,t),ac(e,t),o.west(),Ql(),"west",ec(e,{right:1}),tc),fc=()=>[lc,cc,dc,uc,mc,hc,pc,gc],bc=()=>[cc,lc,uc,dc,mc,hc,pc,gc],vc=()=>[dc,uc,lc,cc,hc,mc],yc=()=>[uc,dc,cc,lc,hc,mc],xc=()=>[lc,cc,dc,uc,mc,hc],wc=()=>[cc,lc,uc,dc,mc,hc],_c="data-alloy-placement",Sc=e=>Go(e,_c),Cc="layout-inset",kc=e=>e.x,Ec=(e,t)=>e.x+e.width/2-t.width/2,Tc=(e,t)=>e.x+e.width-t.width,Oc=e=>e.y,Ac=(e,t)=>e.y+e.height-t.height,Mc=(e,t)=>e.y+e.height/2-t.height/2,Pc=(e,t,o)=>Zl(Tc(e,t),Ac(e,t),o.insetSouthwest(),Yl(),"southwest",ec(e,{right:0,bottom:3}),Cc),Dc=(e,t,o)=>Zl(kc(e),Ac(e,t),o.insetSoutheast(),Gl(),"southeast",ec(e,{left:1,bottom:3}),Cc),Lc=(e,t,o)=>Zl(Tc(e,t),Oc(e),o.insetNorthwest(),ql(),"northwest",ec(e,{right:0,top:2}),Cc),Rc=(e,t,o)=>Zl(kc(e),Oc(e),o.insetNortheast(),Wl(),"northeast",ec(e,{left:1,top:2}),Cc),Nc=(e,t,o)=>Zl(Ec(e,t),Oc(e),o.insetNorth(),Kl(),"north",ec(e,{top:2}),Cc),Ic=(e,t,o)=>Zl(Ec(e,t),Ac(e,t),o.insetSouth(),Xl(),"south",ec(e,{bottom:3}),Cc),Bc=(e,t,o)=>Zl(Tc(e,t),Mc(e,t),o.insetEast(),Ql(),"east",ec(e,{right:0}),Cc),zc=(e,t,o)=>Zl(kc(e),Mc(e,t),o.insetWest(),Jl(),"west",ec(e,{left:1}),Cc),Fc=e=>{switch(e){case"north":return Nc;case"northeast":return Rc;case"northwest":return Lc;case"south":return Ic;case"southeast":return Dc;case"southwest":return Pc;case"east":return Bc;case"west":return zc}},Hc=(e,t,o,n,r)=>Sc(n).map(Fc).getOr(Nc)(e,t,o,n,r),jc=e=>{switch(e){case"north":return Ic;case"northeast":return Dc;case"northwest":return Pc;case"south":return Nc;case"southeast":return Rc;case"southwest":return Lc;case"east":return zc;case"west":return Bc}},Vc=(e,t,o,n,r)=>Sc(n).map(jc).getOr(Nc)(e,t,o,n,r),Uc=(e,t)=>{((e,t)=>{const o=_n.max(e,t,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);un(e,"max-height",o+"px")})(e,Math.floor(t))},Zc=x(((e,t)=>{Uc(e,t),hn(e,{"overflow-x":"hidden","overflow-y":"auto"})})),$c=x(((e,t)=>{Uc(e,t)})),Wc=x(((e,t)=>{((e,t)=>{const o=En.max(e,t,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);un(e,"max-width",o+"px")})(e,Math.floor(t))}));var qc;!function(e){e.TopToBottom="toptobottom",e.BottomToTop="bottomtotop"}(qc||(qc={}));const Gc="data-alloy-vertical-dir",Yc=e=>gr(e,(e=>to(e)&&qo(e,"data-alloy-vertical-dir")===qc.BottomToTop));var Kc;!function(e){e[e.HighlightMenuAndItem=0]="HighlightMenuAndItem",e[e.HighlightJustMenu=1]="HighlightJustMenu",e[e.HighlightNone=2]="HighlightNone"}(Kc||(Kc={}));const Xc={init:()=>Jc({readState:x("No State required")})},Jc=e=>e,Qc={can:O,abort:T,run:b},ed=e=>{if(!ve(e,"can")&&!ve(e,"abort")&&!ve(e,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!");return{...Qc,...e}},td=e=>{const t=((e,t)=>(...o)=>U(e,((e,n)=>e&&t(n).apply(void 0,o)),!0))(e,(e=>e.can)),o=((e,t)=>(...o)=>U(e,((e,n)=>e||t(n).apply(void 0,o)),!1))(e,(e=>e.abort));return{can:t,abort:o,run:(...t)=>{F(e,(e=>{e.run.apply(void 0,t)}))}}},od=(e,t)=>{sd(e,e.element,t,{})},nd=(e,t,o)=>{sd(e,e.element,t,o)},rd=e=>{od(e,Js())},id=(e,t,o)=>{sd(e,t,o,{})},sd=(e,t,o,n)=>{const r={target:t,...n};e.getSystem().triggerEvent(o,t,r)},ad=(e,t,o,n)=>{e.getSystem().triggerEvent(o,t,n.event)},ld=e=>Ss(e),cd=(e,t)=>({key:e,value:ed({abort:t})}),dd=e=>({key:e,value:ed({run:(e,t)=>{t.event.prevent()}})}),ud=(e,t)=>({key:e,value:ed({run:t})}),hd=(e,t,o)=>({key:e,value:ed({run:(e,n)=>{t.apply(void 0,[e,n].concat(o))}})}),md=e=>t=>({key:e,value:ed({run:(e,o)=>{Ur(e,o)&&t(e,o)}})}),pd=(e,t,o)=>((e,t)=>ud(e,((o,n)=>{o.getSystem().getByUid(t).each((t=>{ad(t,t.element,e,n)}))})))(e,t.partUids[o]),gd=(e,t)=>ud(e,((e,o)=>{const n=o.event,r=e.getSystem().getByDom(n.target).getOrThunk((()=>yr(n.target,(t=>e.getSystem().getByDom(t).toOptional()),T).getOr(e)));t(e,r,o)})),fd=e=>ud(e,((e,t)=>{t.cut()})),bd=e=>ud(e,((e,t)=>{t.stop()})),vd=(e,t)=>md(e)(t),yd=md(ca()),xd=md(da()),wd=md(ra()),_d=(e=>t=>ud(e,t))(Js()),Sd=e=>({classes:u(e.classes)?[]:e.classes,attributes:u(e.attributes)?{}:e.attributes,styles:u(e.styles)?{}:e.styles}),Cd=(e,t,o)=>wd(((n,r)=>{o(n,e,t)})),kd=(e,t,o)=>((e,t,o)=>{const n=o.toString(),r=n.indexOf(")")+1,i=n.indexOf("("),s=n.substring(i+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:t,parameters:Va(s.slice(0,1).concat(s.slice(3)))}),e})(((n,...r)=>{const i=[n].concat(r);return n.config({name:x(e)}).fold((()=>{throw new Error("We could not find any behaviour configuration for: "+e+". Using API: "+o)}),(e=>{const o=Array.prototype.slice.call(i,1);return t.apply(void 0,[n,e.config,e.state].concat(o))}))}),o,t),Ed=e=>({key:e,value:void 0}),Td=(e,t,o,n,r,i,s)=>{const a=e=>ve(e,o)?e[o]():A.none(),l=le(r,((e,t)=>kd(o,e,t))),c={...le(i,((e,t)=>Ua(e,t))),...l,revoke:S(Ed,o),config:t=>{const n=Vi(o+"-config",e,t);return{key:o,value:{config:n,me:c,configAsRaw:it((()=>Vi(o+"-config",e,t))),initialConfig:t,state:s}}},schema:x(t),exhibit:(e,t)=>Ue(a(e),fe(n,"exhibit"),((e,o)=>o(t,e.config,e.state))).getOrThunk((()=>Sd({}))),name:x(o),handlers:e=>a(e).map((e=>fe(n,"events").getOr((()=>({})))(e.config,e.state))).getOr({})};return c},Od=e=>Ss(e),Ad=Mi([Yi("fields"),Yi("name"),hs("active",{}),hs("apis",{}),hs("state",Xc),hs("extra",{})]),Md=e=>{const t=Vi("Creating behaviour: "+e.name,Ad,e);return((e,t,o,n,r,i)=>{const s=Mi(e),a=us(t,[(l="config",c=e,is(l,Mi(c)))]);var l,c;return Td(s,a,t,o,n,r,i)})(t.fields,t.name,t.active,t.apis,t.extra,t.state)},Pd=Mi([Yi("branchKey"),Yi("branches"),Yi("name"),hs("active",{}),hs("apis",{}),hs("state",Xc),hs("extra",{})]),Dd=e=>{const t=Vi("Creating behaviour: "+e.name,Pd,e);return((e,t,o,n,r,i)=>{const s=e,a=us(t,[is("config",e)]);return Td(s,a,t,o,n,r,i)})(Zi(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)},Ld=x(void 0),Rd=(e,t)=>{const o=((e,t)=>{const o=ld(t);return Md({fields:[Yi("enabled")],name:e,active:{events:x(o)}})})(e,t);return{key:e,value:{config:{},me:o,configAsRaw:x({}),initialConfig:{},state:Xc}}},Nd=(e,t)=>{t.ignore||(Ro(e.element),t.onFocus(e))};var Id=Object.freeze({__proto__:null,focus:Nd,blur:(e,t)=>{t.ignore||No(e.element)},isFocused:e=>Io(e.element)});var Bd=Object.freeze({__proto__:null,exhibit:(e,t)=>{const o=t.ignore?{}:{attributes:{tabindex:"-1"}};return Sd(o)},events:e=>ld([ud(Gs(),((t,o)=>{Nd(t,e),o.stop()}))].concat(e.stopMousedown?[ud(Ms(),((e,t)=>{t.event.prevent()}))]:[]))}),zd=[Na("onFocus"),hs("stopMousedown",!1),hs("ignore",!1)];const Fd=Md({fields:zd,name:"focusing",active:Bd,apis:Id}),Hd=[8],jd=[9],Vd=[13],Ud=[27],Zd=[32],$d=[37],Wd=[38],qd=[39],Gd=[40],Yd=(e,t,o)=>{const n=Y(e.slice(0,t)),r=Y(e.slice(t+1));return Z(n.concat(r),o)},Kd=(e,t,o)=>{const n=Y(e.slice(0,t));return Z(n,o)},Xd=(e,t,o)=>{const n=e.slice(0,t),r=e.slice(t+1);return Z(r.concat(n),o)},Jd=(e,t,o)=>{const n=e.slice(t+1);return Z(n,o)},Qd=e=>t=>{const o=t.raw;return R(e,o.which)},eu=e=>t=>G(e,(e=>e(t))),tu=e=>!0===e.raw.shiftKey,ou=e=>!0===e.raw.ctrlKey,nu=C(tu),ru=(e,t)=>({matches:e,classification:t}),iu=(e,t,o,n)=>{const r=pr(e.element,"."+t.highlightClass);F(r,(o=>{N(n,(e=>vt(e.element,o)))||(ir(o,t.highlightClass),e.getSystem().getByDom(o).each((o=>{t.onDehighlight(e,o),od(o,ya())})))}))},su=(e,t,o,n)=>{iu(e,t,0,[n]),au(e,t,o,n)||(nr(n.element,t.highlightClass),t.onHighlight(e,n),od(n,va()))},au=(e,t,o,n)=>ar(n.element,t.highlightClass),lu=(e,t,o,n)=>{const r=pr(e.element,"."+t.itemClass);return A.from(r[n]).fold((()=>Ae.error(new Error("No element found with index "+n))),e.getSystem().getByDom)},cu=(e,t,o)=>Yn(e.element,"."+t.itemClass).bind((t=>e.getSystem().getByDom(t).toOptional())),du=(e,t,o)=>{const n=pr(e.element,"."+t.itemClass);return(n.length>0?A.some(n[n.length-1]):A.none()).bind((t=>e.getSystem().getByDom(t).toOptional()))},uu=(e,t,o,n)=>{const r=pr(e.element,"."+t.itemClass),i=$(r,(e=>ar(e,t.highlightClass)));return i.bind((t=>{const o=Re(t,n,0,r.length-1);return e.getSystem().getByDom(r[o]).toOptional()}))},hu=(e,t,o)=>{const n=pr(e.element,"."+t.itemClass);return Ve(z(n,(t=>e.getSystem().getByDom(t).toOptional())))};var mu=Object.freeze({__proto__:null,dehighlightAll:(e,t,o)=>iu(e,t,0,[]),dehighlight:(e,t,o,n)=>{au(e,t,o,n)&&(ir(n.element,t.highlightClass),t.onDehighlight(e,n),od(n,ya()))},highlight:su,highlightFirst:(e,t,o)=>{cu(e,t).each((n=>{su(e,t,o,n)}))},highlightLast:(e,t,o)=>{du(e,t).each((n=>{su(e,t,o,n)}))},highlightAt:(e,t,o,n)=>{lu(e,t,o,n).fold((e=>{throw e}),(n=>{su(e,t,o,n)}))},highlightBy:(e,t,o,n)=>{const r=hu(e,t);Z(r,n).each((n=>{su(e,t,o,n)}))},isHighlighted:au,getHighlighted:(e,t,o)=>Yn(e.element,"."+t.highlightClass).bind((t=>e.getSystem().getByDom(t).toOptional())),getFirst:cu,getLast:du,getPrevious:(e,t,o)=>uu(e,t,0,-1),getNext:(e,t,o)=>uu(e,t,0,1),getCandidates:hu}),pu=[Yi("highlightClass"),Yi("itemClass"),Na("onHighlight"),Na("onDehighlight")];const gu=Md({fields:pu,name:"highlighting",apis:mu}),fu=(e,t,o)=>{t.exists((e=>o.exists((t=>vt(t,e)))))||nd(e,ma(),{prevFocus:t,newFocus:o})},bu=()=>{const e=e=>zo(e.element);return{get:e,set:(t,o)=>{const n=e(t);t.getSystem().triggerFocus(o,t.element);const r=e(t);fu(t,n,r)}}},vu=()=>{const e=e=>gu.getHighlighted(e).map((e=>e.element));return{get:e,set:(t,o)=>{const n=e(t);t.getSystem().getByDom(o).fold(b,(e=>{gu.highlight(t,e)}));const r=e(t);fu(t,n,r)}}},yu=(e,t,o,n,r)=>{const i=(e,t,o,n,r)=>((e,t)=>{const o=Z(e,(e=>e.matches(t)));return o.map((e=>e.classification))})(o(e,t,n,r),t.event).bind((o=>o(e,t,n,r))),s={schema:()=>e.concat([hs("focusManager",bu()),ms("focusInside","onFocus",zi((e=>R(["onFocus","onEnterOrSpace","onApi"],e)?Ae.value(e):Ae.error("Invalid value for focusInside")))),Fa("handler",s),Fa("state",t),Fa("sendFocusIn",r)]),processKey:i,toEvents:(e,t)=>{const s=e.focusInside!==qa.OnFocusMode?A.none():r(e).map((o=>ud(Gs(),((n,r)=>{o(n,e,t),r.stop()})))),a=[ud(Bs(),((n,s)=>{i(n,s,o,e,t).fold((()=>{((o,n)=>{const i=Qd(Zd.concat(Vd))(n.event);e.focusInside===qa.OnEnterOrSpaceMode&&i&&Ur(o,n)&&r(e).each((r=>{r(o,e,t),n.stop()}))})(n,s)}),(e=>{s.stop()}))})),ud(zs(),((o,r)=>{i(o,r,n,e,t).each((e=>{r.stop()}))}))];return ld(s.toArray().concat(a))}};return s},xu=e=>{const t=[rs("onEscape"),rs("onEnter"),hs("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),hs("firstTabstop",0),hs("useTabstopAt",O),rs("visibilitySelector")].concat([e]),o=(e,t)=>{const o=e.visibilitySelector.bind((e=>Kn(t,e))).getOr(t);return Sn(o)>0},n=(e,t)=>t.focusManager.get(e).bind((e=>Kn(e,t.selector))),r=(e,t,n)=>{((e,t)=>{const n=pr(e.element,t.selector),r=j(n,(e=>o(t,e)));return A.from(r[t.firstTabstop])})(e,t).each((o=>{t.focusManager.set(e,o)}))},i=(e,t,n,r,i)=>i(t,n,(e=>((e,t)=>o(e,t)&&e.useTabstopAt(t))(r,e))).fold((()=>r.cyclic?A.some(!0):A.none()),(t=>(r.focusManager.set(e,t),A.some(!0)))),s=(e,t,r,s)=>{const a=j(pr(e.element,r.selector),(e=>o(r,e)));return n(e,r).bind((t=>$(a,S(vt,t)).bind((t=>i(e,a,t,r,s)))))},a=(e,t,o)=>{const n=o.cyclic?Yd:Kd;return s(e,0,o,n)},l=(e,t,o)=>{const n=o.cyclic?Xd:Jd;return s(e,0,o,n)},c=e=>(e=>uo(e))(e).bind(fo).exists((t=>vt(t,e))),d=x([ru(eu([tu,Qd(jd)]),a),ru(Qd(jd),l),ru(eu([nu,Qd(Vd)]),((e,t,o)=>o.onEnter.bind((o=>o(e,t)))))]),u=x([ru(Qd(Ud),((e,t,o)=>o.onEscape.bind((o=>o(e,t))))),ru(Qd(jd),((e,t,o)=>n(e,o).filter((e=>!o.useTabstopAt(e))).bind((n=>(c(n)?a:l)(e,t,o)))))]);return yu(t,Xc.init,d,u,(()=>A.some(r)))};var wu=xu(qi("cyclic",T)),_u=xu(qi("cyclic",O));const Su=e=>io("input")(e)&&"radio"!==qo(e,"type")||io("textarea")(e),Cu=(e,t,o)=>Su(o)&&Qd(Zd)(t.event)?A.none():((e,t,o)=>(id(e,o,Js()),A.some(!0)))(e,0,o),ku=(e,t)=>A.some(!0),Eu=[hs("execute",Cu),hs("useSpace",!1),hs("useEnter",!0),hs("useControlEnter",!1),hs("useDown",!1)],Tu=(e,t,o)=>o.execute(e,t,e.element);var Ou=yu(Eu,Xc.init,((e,t,o,n)=>{const r=o.useSpace&&!Su(e.element)?Zd:[],i=o.useEnter?Vd:[],s=o.useDown?Gd:[],a=r.concat(i).concat(s);return[ru(Qd(a),Tu)].concat(o.useControlEnter?[ru(eu([ou,Qd(Vd)]),Tu)]:[])}),((e,t,o,n)=>o.useSpace&&!Su(e.element)?[ru(Qd(Zd),ku)]:[]),(()=>A.none()));const Au=()=>{const e=Ye();return Jc({readState:()=>e.get().map((e=>({numRows:String(e.numRows),numColumns:String(e.numColumns)}))).getOr({numRows:"?",numColumns:"?"}),setGridSize:(t,o)=>{e.set({numRows:t,numColumns:o})},getNumRows:()=>e.get().map((e=>e.numRows)),getNumColumns:()=>e.get().map((e=>e.numColumns))})};var Mu=Object.freeze({__proto__:null,flatgrid:Au,init:e=>e.state(e)});const Pu=e=>(t,o,n,r)=>{const i=e(t.element);return Nu(i,t,o,n,r)},Du=(e,t)=>{const o=Fn(e,t);return Pu(o)},Lu=(e,t)=>{const o=Fn(t,e);return Pu(o)},Ru=e=>(t,o,n,r)=>Nu(e,t,o,n,r),Nu=(e,t,o,n,r)=>n.focusManager.get(t).bind((o=>e(t.element,o,n,r))).map((e=>(n.focusManager.set(t,e),!0))),Iu=Ru,Bu=Ru,zu=Ru,Fu=(e,t,o)=>{const n=pr(e,o);return((e,t)=>$(e,t).map((t=>({index:t,candidates:e}))))(j(n,kn),(e=>vt(e,t)))},Hu=(e,t)=>$(e,(e=>vt(t,e))),ju=(e,t,o,n)=>n(Math.floor(t/o),t%o).bind((t=>{const n=t.row*o+t.column;return n>=0&&n<e.length?A.some(e[n]):A.none()})),Vu=(e,t,o,n,r)=>ju(e,t,n,((t,i)=>{const s=t===o-1?e.length-t*n:n,a=Re(i,r,0,s-1);return A.some({row:t,column:a})})),Uu=(e,t,o,n,r)=>ju(e,t,n,((t,i)=>{const s=Re(t,r,0,o-1),a=s===o-1?e.length-s*n:n,l=Ne(i,0,a-1);return A.some({row:s,column:l})})),Zu=[Yi("selector"),hs("execute",Cu),Ia("onEscape"),hs("captureTab",!1),ja()],$u=(e,t,o)=>{Yn(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))},Wu=e=>(t,o,n,r)=>Fu(t,o,n.selector).bind((t=>e(t.candidates,t.index,r.getNumRows().getOr(n.initSize.numRows),r.getNumColumns().getOr(n.initSize.numColumns)))),qu=(e,t,o)=>o.captureTab?A.some(!0):A.none(),Gu=Wu(((e,t,o,n)=>Vu(e,t,o,n,-1))),Yu=Wu(((e,t,o,n)=>Vu(e,t,o,n,1))),Ku=Wu(((e,t,o,n)=>Uu(e,t,o,n,-1))),Xu=Wu(((e,t,o,n)=>Uu(e,t,o,n,1))),Ju=x([ru(Qd($d),Du(Gu,Yu)),ru(Qd(qd),Lu(Gu,Yu)),ru(Qd(Wd),Iu(Ku)),ru(Qd(Gd),Bu(Xu)),ru(eu([tu,Qd(jd)]),qu),ru(eu([nu,Qd(jd)]),qu),ru(Qd(Zd.concat(Vd)),((e,t,o,n)=>((e,t)=>t.focusManager.get(e).bind((e=>Kn(e,t.selector))))(e,o).bind((n=>o.execute(e,t,n)))))]),Qu=x([ru(Qd(Ud),((e,t,o)=>o.onEscape(e,t))),ru(Qd(Zd),ku)]);var eh=yu(Zu,Au,Ju,Qu,(()=>A.some($u)));const th=(e,t,o,n,r)=>{const i=(e,t,o)=>r(e,t,n,0,o.length-1,o[t],(t=>{return n=o[t],"button"===Jt(n)&&"disabled"===qo(n,"disabled")?i(e,t,o):A.from(o[t]);var n}));return Fu(e,o,t).bind((e=>{const t=e.index,o=e.candidates;return i(t,t,o)}))},oh=(e,t,o,n)=>th(e,t,o,n,((e,t,o,n,r,i,s)=>{const a=Ne(t+o,n,r);return a===e?A.from(i):s(a)})),nh=(e,t,o,n)=>th(e,t,o,n,((e,t,o,n,r,i,s)=>{const a=Re(t,o,n,r);return a===e?A.none():s(a)})),rh=[Yi("selector"),hs("getInitial",A.none),hs("execute",Cu),Ia("onEscape"),hs("executeOnMove",!1),hs("allowVertical",!0),hs("allowHorizontal",!0),hs("cycles",!0)],ih=(e,t,o)=>((e,t)=>t.focusManager.get(e).bind((e=>Kn(e,t.selector))))(e,o).bind((n=>o.execute(e,t,n))),sh=(e,t,o)=>{t.getInitial(e).orThunk((()=>Yn(e.element,t.selector))).each((o=>{t.focusManager.set(e,o)}))},ah=(e,t,o)=>(o.cycles?nh:oh)(e,o.selector,t,-1),lh=(e,t,o)=>(o.cycles?nh:oh)(e,o.selector,t,1),ch=e=>(t,o,n,r)=>e(t,o,n,r).bind((()=>n.executeOnMove?ih(t,o,n):A.some(!0))),dh=x([ru(Qd(Zd),ku),ru(Qd(Ud),((e,t,o)=>o.onEscape(e,t)))]);var uh=yu(rh,Xc.init,((e,t,o,n)=>{const r=[...o.allowHorizontal?$d:[]].concat(o.allowVertical?Wd:[]),i=[...o.allowHorizontal?qd:[]].concat(o.allowVertical?Gd:[]);return[ru(Qd(r),ch(Du(ah,lh))),ru(Qd(i),ch(Lu(ah,lh))),ru(Qd(Vd),ih),ru(Qd(Zd),ih)]}),dh,(()=>A.some(sh)));const hh=(e,t,o)=>A.from(e[t]).bind((e=>A.from(e[o]).map((e=>({rowIndex:t,columnIndex:o,cell:e}))))),mh=(e,t,o,n)=>{const r=e[t].length,i=Re(o,n,0,r-1);return hh(e,t,i)},ph=(e,t,o,n)=>{const r=Re(o,n,0,e.length-1),i=e[r].length,s=Ne(t,0,i-1);return hh(e,r,s)},gh=(e,t,o,n)=>{const r=e[t].length,i=Ne(o+n,0,r-1);return hh(e,t,i)},fh=(e,t,o,n)=>{const r=Ne(o+n,0,e.length-1),i=e[r].length,s=Ne(t,0,i-1);return hh(e,r,s)},bh=[ts("selectors",[Yi("row"),Yi("cell")]),hs("cycles",!0),hs("previousSelector",A.none),hs("execute",Cu)],vh=(e,t,o)=>{t.previousSelector(e).orThunk((()=>{const o=t.selectors;return Yn(e.element,o.cell)})).each((o=>{t.focusManager.set(e,o)}))},yh=(e,t)=>(o,n,r)=>{const i=r.cycles?e:t;return Kn(n,r.selectors.row).bind((e=>{const t=pr(e,r.selectors.cell);return Hu(t,n).bind((t=>{const n=pr(o,r.selectors.row);return Hu(n,e).bind((e=>{const o=((e,t)=>z(e,(e=>pr(e,t.selectors.cell))))(n,r);return i(o,e,t).map((e=>e.cell))}))}))}))},xh=yh(((e,t,o)=>mh(e,t,o,-1)),((e,t,o)=>gh(e,t,o,-1))),wh=yh(((e,t,o)=>mh(e,t,o,1)),((e,t,o)=>gh(e,t,o,1))),_h=yh(((e,t,o)=>ph(e,o,t,-1)),((e,t,o)=>fh(e,o,t,-1))),Sh=yh(((e,t,o)=>ph(e,o,t,1)),((e,t,o)=>fh(e,o,t,1))),Ch=x([ru(Qd($d),Du(xh,wh)),ru(Qd(qd),Lu(xh,wh)),ru(Qd(Wd),Iu(_h)),ru(Qd(Gd),Bu(Sh)),ru(Qd(Zd.concat(Vd)),((e,t,o)=>zo(e.element).bind((n=>o.execute(e,t,n)))))]),kh=x([ru(Qd(Zd),ku)]);var Eh=yu(bh,Xc.init,Ch,kh,(()=>A.some(vh)));const Th=[Yi("selector"),hs("execute",Cu),hs("moveOnTab",!1)],Oh=(e,t,o)=>o.focusManager.get(e).bind((n=>o.execute(e,t,n))),Ah=(e,t,o)=>{Yn(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))},Mh=(e,t,o)=>nh(e,o.selector,t,-1),Ph=(e,t,o)=>nh(e,o.selector,t,1),Dh=x([ru(Qd(Wd),zu(Mh)),ru(Qd(Gd),zu(Ph)),ru(eu([tu,Qd(jd)]),((e,t,o,n)=>o.moveOnTab?zu(Mh)(e,t,o,n):A.none())),ru(eu([nu,Qd(jd)]),((e,t,o,n)=>o.moveOnTab?zu(Ph)(e,t,o,n):A.none())),ru(Qd(Vd),Oh),ru(Qd(Zd),Oh)]),Lh=x([ru(Qd(Zd),ku)]);var Rh=yu(Th,Xc.init,Dh,Lh,(()=>A.some(Ah)));const Nh=[Ia("onSpace"),Ia("onEnter"),Ia("onShiftEnter"),Ia("onLeft"),Ia("onRight"),Ia("onTab"),Ia("onShiftTab"),Ia("onUp"),Ia("onDown"),Ia("onEscape"),hs("stopSpaceKeyup",!1),rs("focusIn")];var Ih=yu(Nh,Xc.init,((e,t,o)=>[ru(Qd(Zd),o.onSpace),ru(eu([nu,Qd(Vd)]),o.onEnter),ru(eu([tu,Qd(Vd)]),o.onShiftEnter),ru(eu([tu,Qd(jd)]),o.onShiftTab),ru(eu([nu,Qd(jd)]),o.onTab),ru(Qd(Wd),o.onUp),ru(Qd(Gd),o.onDown),ru(Qd($d),o.onLeft),ru(Qd(qd),o.onRight),ru(Qd(Zd),o.onSpace)]),((e,t,o)=>[...o.stopSpaceKeyup?[ru(Qd(Zd),ku)]:[],ru(Qd(Ud),o.onEscape)]),(e=>e.focusIn));const Bh=wu.schema(),zh=_u.schema(),Fh=uh.schema(),Hh=eh.schema(),jh=Eh.schema(),Vh=Ou.schema(),Uh=Rh.schema(),Zh=Ih.schema();const $h=Dd({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Bh,cyclic:zh,flow:Fh,flatgrid:Hh,matrix:jh,execution:Vh,menu:Uh,special:Zh}),name:"keying",active:{events:(e,t)=>e.handler.toEvents(e,t)},apis:{focusIn:(e,t,o)=>{t.sendFocusIn(t).fold((()=>{e.getSystem().triggerFocus(e.element,e.element)}),(n=>{n(e,t,o)}))},setGridSize:(e,t,o,n,r)=>{(e=>ve(e,"setGridSize"))(o)?o.setGridSize(n,r):console.error("Layout does not support setGridSize")}},state:Mu}),Wh=Be("alloy-premade"),qh=e=>(Object.defineProperty(e.element.dom,Wh,{value:e.uid,writable:!0}),_s(Wh,e)),Gh=e=>fe(e,Wh),Yh=e=>((e,t)=>{const o=t.toString(),n=o.indexOf(")")+1,r=o.indexOf("("),i=o.substring(r+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:Va(i.slice(1))}),e})(((t,...o)=>e(t.getApis(),t,...o)),e),Kh=e=>e.getSystem().isConnected(),Xh=e=>{od(e,da());const t=e.components();F(t,Xh)},Jh=e=>{const t=e.components();F(t,Jh),od(e,ca())},Qh=(e,t)=>{e.getSystem().addToWorld(t),sn(e.element)&&Jh(t)},em=e=>{Xh(e),e.getSystem().removeFromWorld(e)},tm=(e,t)=>{Vo(e.element,t.element)},om=(e,t,o)=>{const n=e.components();(e=>{F(e.components(),(e=>Jo(e.element))),Xo(e.element),e.syncComponents()})(e);const r=o(t),i=K(n,r);F(i,(t=>{Xh(t),e.getSystem().removeFromWorld(t)})),F(r,(t=>{Kh(t)?tm(e,t):(e.getSystem().addToWorld(t),tm(e,t),sn(e.element)&&Jh(t))})),e.syncComponents()},nm=(e,t)=>{rm(e,t,Vo)},rm=(e,t,o)=>{e.getSystem().addToWorld(t),o(e.element,t.element),sn(e.element)&&Jh(t),e.syncComponents()},im=e=>{Xh(e),Jo(e.element),e.getSystem().removeFromWorld(e)},sm=e=>{const t=uo(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()));im(e),t.each((e=>{e.syncComponents()}))},am=e=>{const t=e.components();F(t,im),Xo(e.element),e.syncComponents()},lm=(e,t)=>{dm(e,t,Vo)},cm=(e,t)=>{dm(e,t,Ho)},dm=(e,t,o)=>{o(e,t.element);const n=po(t.element);F(n,(e=>{t.getByDom(e).each(Jh)}))},um=e=>{const t=po(e.element);F(t,(t=>{e.getByDom(t).each(Xh)})),Jo(e.element)},hm=(e,t,o)=>{o.fold((()=>Vo(e,t)),(e=>{vt(e,t)||(Fo(e,t),Jo(e))}))},mm=(e,t,o)=>{const n=z(t,o),r=po(e);return F(r.slice(n.length),Jo),n},pm=(e,t,o,n)=>{const r=go(e,t),i=n(o,r),s=((e,t,o)=>go(e,t).map((e=>{if(o.exists((t=>!vt(t,e)))){const t=o.map(Jt).getOr("span"),n=at.fromTag(t);return Fo(e,n),n}return e})))(e,t,r);return hm(e,i.element,s),i},gm=(e,t)=>{const o=wo(t),n=Bo(o).bind((e=>{const o=t=>vt(e,t);return o(t)?A.some(t):((e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const r=at.fromDom(e.childNodes[n]);if(t(r))return A.some(r);const i=o(e.childNodes[n]);if(i.isSome())return i}return A.none()};return o(e.dom)})(t,o)})),r=e(t);return n.each((e=>{Bo(o).filter((t=>vt(t,e))).fold((()=>{Ro(e)}),b)})),r},fm=(e,t)=>{gm((()=>{om(e,t,(()=>z(t,e.getSystem().build)))}),e.element)},bm=(e,t)=>{gm((()=>{((e,t,o)=>{const n=e.components(),r=q(t,(e=>Gh(e).toArray()));F(n,(e=>{R(r,e)||em(e)}));const i=o(t),s=K(n,i);F(s,(e=>{Kh(e)&&em(e)})),F(i,(t=>{Kh(t)||Qh(e,t)})),e.syncComponents()})(e,t,(()=>((e,t,o)=>mm(e,t,((t,n)=>pm(e,n,t,o))))(e.element,t,e.getSystem().buildOrPatch)))}),e.element)},vm=(e,t,o,n)=>{em(t);const r=pm(e.element,o,n,e.getSystem().buildOrPatch);Qh(e,r),e.syncComponents()},ym=(e,t,o)=>{const n=e.getSystem().build(o);rm(e,n,t)},xm=(e,t,o,n)=>{sm(t),ym(e,((e,t)=>((e,t,o)=>{go(e,o).fold((()=>{Vo(e,t)}),(e=>{Fo(e,t)}))})(e,t,o)),n)},wm=(e,t)=>e.components(),_m=(e,t,o,n,r)=>{const i=wm(e);return A.from(i[n]).map((o=>(r.fold((()=>sm(o)),(r=>{(t.reuseDom?vm:xm)(e,o,n,r)})),o)))};var Sm=Object.freeze({__proto__:null,append:(e,t,o,n)=>{ym(e,Vo,n)},prepend:(e,t,o,n)=>{ym(e,jo,n)},remove:(e,t,o,n)=>{const r=wm(e),i=Z(r,(e=>vt(n.element,e.element)));i.each(sm)},replaceAt:_m,replaceBy:(e,t,o,n,r)=>{const i=wm(e);return $(i,n).bind((o=>_m(e,t,0,o,r)))},set:(e,t,o,n)=>(t.reuseDom?bm:fm)(e,n),contents:wm});const Cm=Md({fields:[bs("reuseDom",!0)],name:"replacing",apis:Sm}),km=ld([((e,t)=>({key:e,value:ed({can:t})}))(Gs(),((e,t)=>{const o=t.event,n=o.originator,r=o.target;return!((e,t,o)=>vt(t,e.element)&&!vt(t,o))(e,n,r)||(console.warn(Gs()+" did not get interpreted by the desired target. \nOriginator: "+xa(n)+"\nTarget: "+xa(r)+"\nCheck the "+Gs()+" event handlers"),!1)}))]);var Em=Object.freeze({__proto__:null,events:km});const Tm=x("alloy-id-"),Om=x("data-alloy-id"),Am=Tm(),Mm=Om(),Pm=(e,t)=>{Object.defineProperty(e.dom,Mm,{value:t,writable:!0})},Dm=e=>{const t=to(e)?e.dom[Mm]:null;return A.from(t)},Lm=e=>Be(e),Rm=w,Nm=e=>{const t=t=>`The component must be in a context to execute: ${t}`+(e?"\n"+xa(e().element)+" is not in context.":""),o=e=>()=>{throw new Error(t(e))},n=e=>()=>{console.warn(t(e))};return{debugInfo:x("fake"),triggerEvent:n("triggerEvent"),triggerFocus:n("triggerFocus"),triggerEscape:n("triggerEscape"),broadcast:n("broadcast"),broadcastOn:n("broadcastOn"),broadcastEvent:n("broadcastEvent"),build:o("build"),buildOrPatch:o("buildOrPatch"),addToWorld:o("addToWorld"),removeFromWorld:o("removeFromWorld"),addToGui:o("addToGui"),removeFromGui:o("removeFromGui"),getByUid:o("getByUid"),getByDom:o("getByDom"),isConnected:T}},Im=Nm(),Bm=(e,t)=>{const o={};return ae(e,((e,n)=>{ae(e,((e,r)=>{const i=fe(o,r).getOr([]);o[r]=i.concat([t(n,e)])}))})),o},zm=e=>e.cHandler,Fm=(e,t)=>({name:e,handler:t}),Hm=(e,t)=>{const o={};return F(e,(e=>{o[e.name()]=e.handlers(t)})),o},jm=(e,t,o,n)=>{const r=((e,t,o)=>{const n={...o,...Hm(t,e)};return Bm(n,Fm)})(e,o,n);return Zm(r,t)},Vm=e=>{const t=(e=>p(e)?{can:O,abort:T,run:e}:e)(e);return(e,o,...n)=>{const r=[e,o].concat(n);t.abort.apply(void 0,r)?o.stop():t.can.apply(void 0,r)&&t.run.apply(void 0,r)}},Um=(e,t,o)=>{const n=t[o];return n?((e,t,o,n)=>{try{const r=Q(o,((o,r)=>{const i=o[t],s=r[t],a=n.indexOf(i),l=n.indexOf(s);if(-1===a)throw new Error("The ordering for "+e+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(n,null,2));if(-1===l)throw new Error("The ordering for "+e+" does not have an entry for "+s+".\nOrder specified: "+JSON.stringify(n,null,2));return a<l?-1:l<a?1:0}));return Ae.value(r)}catch(e){return Ae.error([e])}})("Event: "+o,"name",e,n).map((e=>{const t=z(e,(e=>e.handler));return td(t)})):((e,t)=>Ae.error(["The event ("+e+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(z(t,(e=>e.name)),null,2)]))(o,e)},Zm=(e,t)=>{const o=me(e,((e,o)=>(1===e.length?Ae.value(e[0].handler):Um(e,t,o)).map((n=>{const r=Vm(n),i=e.length>1?j(t[o],(t=>N(e,(e=>e.name===t)))).join(" > "):e[0].name;return _s(o,((e,t)=>({handler:e,purpose:t}))(r,i))}))));return Cs(o,{})},$m="alloy.base.behaviour",Wm=Pi([Wi("dom","dom",{tag:"required",process:{}},Pi([Yi("tag"),hs("styles",{}),hs("classes",[]),hs("attributes",{}),rs("value"),rs("innerHtml")])),Yi("components"),Yi("uid"),hs("events",{}),hs("apis",{}),Wi("eventOrder","eventOrder",(e=>xi(x(e)))({[Js()]:["disabling",$m,"toggling","typeaheadevents"],[Gs()]:[$m,"focusing","keying"],[ra()]:[$m,"disabling","toggling","representing","tooltipping"],[Fs()]:[$m,"representing","streaming","invalidating"],[da()]:[$m,"representing","item-events","toolbar-button-events","tooltipping"],[Ms()]:["focusing",$m,"item-type-events"],[Es()]:["focusing",$m,"item-type-events"],[Rs()]:["item-type-events","tooltipping"],[Xs()]:["receiving","reflecting","tooltipping"]}),di()),rs("domModification")]),qm=e=>e.events,Gm=(e,t)=>{const o=ie(e),n=ie(t),r=K(n,o),i=((e,t)=>{const o={},n={};return ue(e,t,de(o),de(n)),{t:o,f:n}})(e,((e,o)=>!be(t,o)||e!==t[o])).t;return{toRemove:r,toSet:i}},Ym=(e,t)=>{const{class:o,style:n,...r}=(e=>U(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}))(t),{toSet:i,toRemove:s}=Gm(e.attributes,r),a=bn(t),{toSet:l,toRemove:c}=Gm(e.styles,a),d=dr(t),u=K(d,e.classes),h=K(e.classes,d);return F(s,(e=>Ko(t,e))),Wo(t,i),lr(t,h),cr(t,u),F(c,(e=>yn(t,e))),hn(t,l),e.innerHtml.fold((()=>{const o=e.domChildren;((e,t)=>{mm(e,t,((t,o)=>{const n=go(e,o);return hm(e,t,n),t}))})(t,o)}),(e=>{tn(t,e)})),(()=>{const o=t,n=e.value.getOrUndefined();n!==ur(o)&&hr(o,null!=n?n:"")})(),t},Km=(e,t)=>{const o=t.filter((t=>Jt(t)===e.tag&&!(e=>e.innerHtml.isSome()&&e.domChildren.length>0)(e)&&!(e=>be(e.dom,Wh))(t))).bind((t=>((e,t)=>{try{const o=Ym(e,t);return A.some(o)}catch(e){return A.none()}})(e,t))).getOrThunk((()=>(e=>{const t=at.fromTag(e.tag);Wo(t,e.attributes),lr(t,e.classes),hn(t,e.styles),e.innerHtml.each((e=>tn(t,e)));const o=e.domChildren;return Uo(t,o),e.value.each((e=>{hr(t,e)})),t})(e)));return Pm(o,e.uid),o},Xm=(e,t)=>((e,t)=>{const o=z(t,(e=>us(e.name(),[Yi("config"),hs("state",Xc)]))),n=Hi("component.behaviours",Pi(o),e.behaviours).fold((t=>{throw new Error(Ui(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))}),w);return{list:t,data:le(n,(e=>{const t=e.map((e=>({config:e.config,state:e.state.init(e.config)})));return x(t)}))}})(e,t),Jm=e=>{const t=(e=>{const t=fe(e,"behaviours").getOr({});return q(ie(t),(e=>{const o=t[e];return m(o)?[o.me]:[]}))})(e);return Xm(e,t)},Qm=(e,t,o)=>{const n={...(r=e).dom,uid:r.uid,domChildren:z(r.components,(e=>e.element))};var r;const i=(e=>e.domModification.fold((()=>Sd({})),Sd))(e),s={"alloy.base.modification":i},a=t.length>0?((e,t,o,n)=>{const r={...t};F(o,(t=>{r[t.name()]=t.exhibit(e,n)}));const i=Bm(r,((e,t)=>({name:e,modification:t}))),s=e=>V(e,((e,t)=>({...t.modification,...e})),{}),a=V(i.classes,((e,t)=>t.modification.concat(e)),[]),l=s(i.attributes),c=s(i.styles);return Sd({classes:a,attributes:l,styles:c})})(o,s,t,n):i;return l=n,c=a,{...l,attributes:{...l.attributes,...c.attributes},styles:{...l.styles,...c.styles},classes:l.classes.concat(c.classes)};var l,c},ep=(e,t)=>{const o=()=>h,n=xe(Im),r=ji((e=>Hi("custom.definition",Wm,e))(e)),i=Jm(e),s=(e=>e.list)(i),a=(e=>e.data)(i),l=Qm(r,s,a),c=Km(l,t),d=((e,t,o)=>{const n={"alloy.base.behaviour":qm(e)};return jm(o,e.eventOrder,t,n).getOrDie()})(r,s,a),u=xe(r.components),h={uid:e.uid,getSystem:n.get,config:t=>{const o=a;return(p(o[t.name()])?o[t.name()]:()=>{throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:e=>p(a[e.name()]),spec:e,readState:e=>a[e]().map((e=>e.state.readState())).getOr("not enabled"),getApis:()=>r.apis,connect:e=>{n.set(e)},disconnect:()=>{n.set(Nm(o))},element:c,syncComponents:()=>{const e=po(c),t=q(e,(e=>n.get().getByDom(e).fold((()=>[]),J)));u.set(t)},components:u.get,events:d};return h},tp=(e,t)=>{const{events:o,...n}=Rm(e),r=((e,t)=>{const o=fe(e,"components").getOr([]);return t.fold((()=>z(o,sp)),(e=>z(o,((t,o)=>ip(t,go(e,o))))))})(n,t),i={...n,events:{...Em,...o},components:r};return Ae.value(ep(i,t))},op=e=>{const t=at.fromText(e);return np({element:t})},np=e=>{const t=Vi("external.component",Mi([Yi("element"),rs("uid")]),e),o=xe(Nm()),n=t.uid.getOrThunk((()=>Lm("external")));Pm(t.element,n);const r={uid:n,getSystem:o.get,config:A.none,hasConfigured:T,connect:e=>{o.set(e)},disconnect:()=>{o.set(Nm((()=>r)))},getApis:()=>({}),element:t.element,spec:e,readState:x("No state"),syncComponents:b,components:x([]),events:{}};return qh(r)},rp=Lm,ip=(e,t)=>Gh(e).getOrThunk((()=>{const o=(e=>be(e,"uid"))(e)?e:{uid:rp(""),...e};return tp(o,t).getOrDie()})),sp=e=>ip(e,A.none()),ap=qh;var lp=Object.freeze({__proto__:null,block:(e,t,o,n)=>{$o(e.element,"aria-busy",!0);const r=t.getRoot(e).getOr(e),i=Od([$h.config({mode:"special",onTab:()=>A.some(!0),onShiftTab:()=>A.some(!0)}),Fd.config({})]),s=n(r,i),a=r.getSystem().build(s);Cm.append(r,ap(a)),a.hasConfigured($h)&&t.focus&&$h.focusIn(a),o.isBlocked()||t.onBlock(e),o.blockWith((()=>Cm.remove(r,a)))},unblock:(e,t,o)=>{Ko(e.element,"aria-busy"),o.isBlocked()&&t.onUnblock(e),o.clear()},isBlocked:(e,t,o)=>o.isBlocked()}),cp=[vs("getRoot",A.none),bs("focus",!0),Na("onBlock"),Na("onUnblock")];const dp=Md({fields:cp,name:"blocking",apis:lp,state:Object.freeze({__proto__:null,init:()=>{const e=qe((e=>e.destroy()));return Jc({readState:e.isSet,blockWith:t=>{e.set({destroy:t})},clear:e.clear,isBlocked:e.isSet})}})});var up=Object.freeze({__proto__:null,getCurrent:(e,t,o)=>t.find(e)});const hp=[Yi("find")],mp=Md({fields:hp,name:"composing",apis:up});var pp=Object.freeze({__proto__:null,getCoupled:(e,t,o,n)=>o.getOrCreate(e,t,n),getExistingCoupled:(e,t,o,n)=>o.getExisting(e,t,n)}),gp=[Ki("others",Fi(Ae.value,di()))];var fp=Object.freeze({__proto__:null,init:()=>{const e={},t=(t,o)=>{if(0===ie(t.others).length)throw new Error("Cannot find any known coupled components");return fe(e,o)},o=x({});return Jc({readState:o,getExisting:(e,o,n)=>t(o,n).orThunk((()=>(fe(o.others,n).getOrDie("No information found for coupled component: "+n),A.none()))),getOrCreate:(o,n,r)=>t(n,r).getOrThunk((()=>{const t=fe(n.others,r).getOrDie("No information found for coupled component: "+r)(o),i=o.getSystem().build(t);return e[r]=i,i}))})}});const bp=Md({fields:gp,name:"coupling",apis:pp,state:fp}),vp=["input","button","textarea","select"],yp=(e,t,o)=>{(t.disabled()?kp:Ep)(e,t)},xp=(e,t)=>!0===t.useNative&&R(vp,Jt(e.element)),wp=e=>{$o(e.element,"disabled","disabled")},_p=e=>{Ko(e.element,"disabled")},Sp=e=>{$o(e.element,"aria-disabled","true")},Cp=e=>{$o(e.element,"aria-disabled","false")},kp=(e,t,o)=>{t.disableClass.each((t=>{nr(e.element,t)}));(xp(e,t)?wp:Sp)(e),t.onDisabled(e)},Ep=(e,t,o)=>{t.disableClass.each((t=>{ir(e.element,t)}));(xp(e,t)?_p:Cp)(e),t.onEnabled(e)},Tp=(e,t)=>xp(e,t)?(e=>Yo(e.element,"disabled"))(e):(e=>"true"===qo(e.element,"aria-disabled"))(e);var Op=Object.freeze({__proto__:null,enable:Ep,disable:kp,isDisabled:Tp,onLoad:yp,set:(e,t,o,n)=>{(n?kp:Ep)(e,t)}});var Ap=Object.freeze({__proto__:null,exhibit:(e,t)=>Sd({classes:t.disabled()?t.disableClass.toArray():[]}),events:(e,t)=>ld([cd(Js(),((t,o)=>Tp(t,e))),Cd(e,t,yp)])}),Mp=[vs("disabled",T),hs("useNative",!0),rs("disableClass"),Na("onDisabled"),Na("onEnabled")];const Pp=Md({fields:Mp,name:"disabling",active:Ap,apis:Op}),Dp=(e,t,o,n,r)=>{const i=e=>e+"px";return{position:e,left:t.map(i),top:o.map(i),right:n.map(i),bottom:r.map(i)}},Lp=(e,t)=>{mn(e,(e=>({...e,position:A.some(e.position)}))(t))},Rp=(e,t)=>{const o=e.element;nr(o,t.transitionClass),ir(o,t.fadeOutClass),nr(o,t.fadeInClass),t.onShow(e)},Np=(e,t)=>{const o=e.element;nr(o,t.transitionClass),ir(o,t.fadeInClass),nr(o,t.fadeOutClass),t.onHide(e)},Ip=(e,t)=>e.y>=t.y,Bp=(e,t)=>e.bottom<=t.bottom,zp=(e,t,o)=>({location:"top",leftX:t,topY:o.bounds.y-e.y}),Fp=(e,t,o)=>({location:"bottom",leftX:t,bottomY:e.bottom-o.bounds.bottom}),Hp=e=>e.box.x-e.win.x,jp=(e,t,o)=>o.getInitialPos().map((o=>{const n=((e,t)=>{const o=t.optScrollEnv.fold(x(e.bounds.y),(t=>t.scrollElmTop+(e.bounds.y-t.currentScrollTop)));return Dn(e.bounds.x,o)})(o,t);return{box:zr(n.left,n.top,On(e),Sn(e)),location:o.location}})),Vp=(e,t,o,n,r)=>{const i=((e,t)=>{const o=t.optScrollEnv.fold(x(e.y),(t=>e.y+t.currentScrollTop-t.scrollElmTop));return Dn(e.x,o)})(t,o),s=zr(i.left,i.top,t.width,t.height);n.setInitialPos({style:bn(e),position:pn(e,"position")||"static",bounds:s,location:r.location})},Up=(e,t,o)=>o.getInitialPos().bind((n=>{var r;switch(o.clearInitialPos(),n.position){case"static":return A.some({morph:"static"});case"absolute":const o=Zr(e).getOr(an()),i=Fr(o),s=null!==(r=o.dom.scrollTop)&&void 0!==r?r:0;return A.some({morph:"absolute",positionCss:Dp("absolute",fe(n.style,"left").map((e=>t.x-i.x)),fe(n.style,"top").map((e=>t.y-i.y+s)),fe(n.style,"right").map((e=>i.right-t.right)),fe(n.style,"bottom").map((e=>i.bottom-t.bottom)))});default:return A.none()}})),Zp=(e,t,o)=>jp(e,t,o).filter((({box:e})=>((e,t,o)=>G(e,(e=>{switch(e){case"bottom":return Bp(t,o.bounds);case"top":return Ip(t,o.bounds)}})))(o.getModes(),e,t))).bind((({box:t})=>Up(e,t,o))),$p=e=>{switch(e.location){case"top":return A.some({morph:"fixed",positionCss:Dp("fixed",A.some(e.leftX),A.some(e.topY),A.none(),A.none())});case"bottom":return A.some({morph:"fixed",positionCss:Dp("fixed",A.some(e.leftX),A.none(),A.none(),A.some(e.bottomY))});default:return A.none()}},Wp=(e,t,o)=>{const n=Fr(e),r=Vr(),i=((e,t,o)=>{const n=t.win,r=t.box,i=Hp(t);return re(e,(e=>{switch(e){case"bottom":return Bp(r,o.bounds)?A.none():A.some(Fp(n,i,o));case"top":return Ip(r,o.bounds)?A.none():A.some(zp(n,i,o));default:return A.none()}})).getOr({location:"no-dock"})})(o.getModes(),{win:r,box:n},t);return"top"===i.location||"bottom"===i.location?(Vp(e,n,t,o,i),$p(i)):A.none()},qp=(e,t,o)=>{const n=e.element;return je(fn(n,"position"),"fixed")?((e,t,o)=>Zp(e,t,o).orThunk((()=>t.optScrollEnv.bind((n=>jp(e,t,o))).bind((({box:e,location:o})=>{const n=Vr(),r=Hp({win:n,box:e}),i="top"===o?zp(n,r,t):Fp(n,r,t);return $p(i)})))))(n,t,o):Wp(n,t,o)},Gp=(e,t,o,n)=>{const r=Fr(e),i=Vr(),s=n(i,Hp({win:i,box:r}),t);return"bottom"===s.location||"top"===s.location?(((e,t,o,n,r)=>{n.getInitialPos().fold((()=>Vp(e,t,o,n,r)),(()=>b))})(e,r,t,o,s),$p(s)):A.none()},Yp=(e,t,o)=>{o.setDocked(!1),F(["left","right","top","bottom","position"],(t=>yn(e.element,t))),t.onUndocked(e)},Kp=(e,t,o,n)=>{const r="fixed"===n.position;o.setDocked(r),Lp(e.element,n);(r?t.onDocked:t.onUndocked)(e)},Xp=(e,t,o,n,r=!1)=>{t.contextual.each((t=>{t.lazyContext(e).each((i=>{const s=((e,t)=>e.y<t.bottom&&e.bottom>t.y)(i,n.bounds);if(s!==o.isVisible())if(o.setVisible(s),r&&!s)lr(e.element,[t.fadeOutClass]),t.onHide(e);else{(s?Rp:Np)(e,t)}}))}))},Jp=(e,t,o,n,r)=>{Xp(e,t,o,n,!0),Kp(e,t,o,r.positionCss)},Qp=(e,t,o)=>{const n=t.lazyViewport(e);Xp(e,t,o,n),qp(e,n,o).each((r=>{((e,t,o,n,r)=>{switch(r.morph){case"static":return Yp(e,t,o);case"absolute":return Kp(e,t,o,r.positionCss);case"fixed":Jp(e,t,o,n,r)}})(e,t,o,n,r)}))},eg=(e,t,o)=>{const n=e.element;o.setDocked(!1);const r=t.lazyViewport(e);((e,t,o)=>{const n=e.element;return jp(n,t,o).bind((({box:e})=>Up(n,e,o)))})(e,r,o).each((n=>{switch(n.morph){case"static":Yp(e,t,o);break;case"absolute":Kp(e,t,o,n.positionCss)}})),o.setVisible(!0),t.contextual.each((t=>{cr(n,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(e)})),tg(e,t,o)},tg=(e,t,o)=>{e.getSystem().isConnected()&&Qp(e,t,o)},og=(e,t,o)=>{o.isDocked()&&eg(e,t,o)},ng=e=>(t,o,n)=>{const r=o.lazyViewport(t);Gp(t.element,r,n,e).each((e=>{Jp(t,o,n,r,e)}))},rg=ng(zp),ig=ng(Fp);var sg=Object.freeze({__proto__:null,refresh:tg,reset:og,isDocked:(e,t,o)=>o.isDocked(),getModes:(e,t,o)=>o.getModes(),setModes:(e,t,o,n)=>o.setModes(n),forceDockToTop:rg,forceDockToBottom:ig});var ag=Object.freeze({__proto__:null,events:(e,t)=>ld([vd(Us(),((o,n)=>{e.contextual.each((e=>{if(ar(o.element,e.transitionClass)){cr(o.element,[e.transitionClass,e.fadeInClass]);(t.isVisible()?e.onShown:e.onHidden)(o)}n.stop()}))})),ud(aa(),((o,n)=>{tg(o,e,t)})),ud(ga(),((o,n)=>{tg(o,e,t)})),ud(la(),((o,n)=>{og(o,e,t)}))])}),lg=[us("contextual",[Ji("fadeInClass"),Ji("fadeOutClass"),Ji("transitionClass"),es("lazyContext"),Na("onShow"),Na("onShown"),Na("onHide"),Na("onHidden")]),vs("lazyViewport",(()=>({bounds:Vr(),optScrollEnv:A.none()}))),ys("modes",["top","bottom"],mi),Na("onDocked"),Na("onUndocked")];const cg=Md({fields:lg,name:"docking",active:ag,apis:sg,state:Object.freeze({__proto__:null,init:e=>{const t=xe(!1),o=xe(!0),n=Ye(),r=xe(e.modes);return Jc({isDocked:t.get,setDocked:t.set,getInitialPos:n.get,setInitialPos:n.set,clearInitialPos:n.clear,isVisible:o.get,setVisible:o.set,getModes:r.get,setModes:r.set,readState:()=>`docked:  ${t.get()}, visible: ${o.get()}, modes: ${r.get().join(",")}`})}})}),dg=ye([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),ug=e=>t=>t.translate(-e.left,-e.top),hg=e=>t=>t.translate(e.left,e.top),mg=e=>(t,o)=>U(e,((e,t)=>t(e)),Dn(t,o)),pg=(e,t,o)=>e.fold(mg([hg(o),ug(t)]),mg([ug(t)]),mg([])),gg=(e,t,o)=>e.fold(mg([hg(o)]),mg([]),mg([hg(t)])),fg=(e,t,o)=>e.fold(mg([]),mg([ug(o)]),mg([hg(t),ug(o)])),bg=(e,t,o)=>{const n=e.fold(((e,t)=>({position:A.some("absolute"),left:A.some(e+"px"),top:A.some(t+"px")})),((e,t)=>({position:A.some("absolute"),left:A.some(e-o.left+"px"),top:A.some(t-o.top+"px")})),((e,t)=>({position:A.some("fixed"),left:A.some(e+"px"),top:A.some(t+"px")})));return{right:A.none(),bottom:A.none(),...n}},vg=(e,t,o,n)=>{const r=(e,r)=>(i,s)=>{const a=e(t,o,n);return r(i.getOr(a.left),s.getOr(a.top))};return e.fold(r(fg,yg),r(gg,xg),r(pg,wg))},yg=dg.offset,xg=dg.absolute,wg=dg.fixed,_g=(e,t)=>{const o=qo(e,t);return u(o)?NaN:parseInt(o,10)},Sg=(e,t,o,n)=>((e,t)=>{const o=e.element,n=_g(o,t.leftAttr),r=_g(o,t.topAttr);return isNaN(n)||isNaN(r)?A.none():A.some(Dn(n,r))})(e,t).fold((()=>o),(e=>wg(e.left+n.left,e.top+n.top))),Cg=(e,t,o,n,r,i)=>{const s=Sg(e,t,o,n),a=t.mustSnap?Tg(e,t,s,r,i):Og(e,t,s,r,i),l=pg(s,r,i);return((e,t,o)=>{const n=e.element;$o(n,t.leftAttr,o.left+"px"),$o(n,t.topAttr,o.top+"px")})(e,t,l),a.fold((()=>({coord:wg(l.left,l.top),extra:A.none()})),(e=>({coord:e.output,extra:e.extra})))},kg=(e,t)=>{((e,t)=>{const o=e.element;Ko(o,t.leftAttr),Ko(o,t.topAttr)})(e,t)},Eg=(e,t,o,n)=>re(e,(e=>{const r=e.sensor,i=((e,t,o,n,r,i)=>{const s=gg(e,r,i),a=gg(t,r,i);return Math.abs(s.left-a.left)<=o&&Math.abs(s.top-a.top)<=n})(t,r,e.range.left,e.range.top,o,n);return i?A.some({output:vg(e.output,t,o,n),extra:e.extra}):A.none()})),Tg=(e,t,o,n,r)=>{const i=t.getSnapPoints(e);return Eg(i,o,n,r).orThunk((()=>{const e=U(i,((e,t)=>{const i=t.sensor,s=((e,t,o,n,r,i)=>{const s=gg(e,r,i),a=gg(t,r,i),l=Math.abs(s.left-a.left),c=Math.abs(s.top-a.top);return Dn(l,c)})(o,i,t.range.left,t.range.top,n,r);return e.deltas.fold((()=>({deltas:A.some(s),snap:A.some(t)})),(o=>(s.left+s.top)/2<=(o.left+o.top)/2?{deltas:A.some(s),snap:A.some(t)}:e))}),{deltas:A.none(),snap:A.none()});return e.snap.map((e=>({output:vg(e.output,o,n,r),extra:e.extra})))}))},Og=(e,t,o,n,r)=>{const i=t.getSnapPoints(e);return Eg(i,o,n,r)};var Ag=Object.freeze({__proto__:null,snapTo:(e,t,o,n)=>{const r=t.getTarget(e.element);if(t.repositionTarget){const t=so(e.element),o=In(t),i=$r(r),s=((e,t,o)=>({coord:vg(e.output,e.output,t,o),extra:e.extra}))(n,o,i),a=bg(s.coord,0,i);mn(r,a)}}});const Mg=(e,t)=>xs(e,{},z(t,(t=>{return o=t.name(),n="Cannot configure "+t.name()+" for "+e,Wi(o,o,{tag:"option",process:{}},li((e=>ei("The field: "+o+" is forbidden. "+n))));var o,n})).concat([qi("dump",w)])),Pg=e=>e.dump,Dg=(e,t)=>({...Od(t),...e.dump}),Lg=Mg,Rg=Dg,Ng=(e,t,o,n,r)=>{const i=((e,t)=>(e.length>0?[ts("parts",e)]:[]).concat([Yi("uid"),hs("dom",{}),hs("components",[]),Ha("originalSpec"),hs("debug.sketcher",{})]).concat(t))(n,r);return Vi(e+" [SpecSchema]",Mi(i.concat(t)),o)},Ig=(e,t,o,n,r)=>{const i=Bg(r),s=Ol(o),a=Fl(o),l=Ng(e,t,i,s,[a]),c=Ml(0,l,o);return n(l,Pl(e,l,c.internals()),i,c.externals())},Bg=e=>(e=>be(e,"uid"))(e)?e:{...e,uid:Lm("uid")},zg=Mi([Yi("name"),Yi("factory"),Yi("configFields"),hs("apis",{}),hs("extraApis",{})]),Fg=Mi([Yi("name"),Yi("factory"),Yi("configFields"),Yi("partFields"),hs("apis",{}),hs("extraApis",{})]),Hg=e=>{const t=Vi("Sketcher for "+e.name,zg,e),o=le(t.apis,Yh),n=le(t.extraApis,((e,t)=>Ua(e,t)));return{name:t.name,configFields:t.configFields,sketch:e=>((e,t,o,n)=>{const r=Bg(n);return o(Ng(e,t,r,[],[]),r)})(t.name,t.configFields,t.factory,e),...o,...n}},jg=e=>{const t=Vi("Sketcher for "+e.name,Fg,e),o=kl(t.name,t.partFields),n=le(t.apis,Yh),r=le(t.extraApis,((e,t)=>Ua(e,t)));return{name:t.name,partFields:t.partFields,configFields:t.configFields,sketch:e=>Ig(t.name,t.configFields,t.partFields,t.factory,e),parts:o,...n,...r}},Vg=Hg({name:"Container",factory:e=>{const{attributes:t,...o}=e.dom;return{uid:e.uid,dom:{tag:"div",attributes:{role:"presentation",...t},...o},components:e.components,behaviours:Pg(e.containerBehaviours),events:e.events,domModification:e.domModification,eventOrder:e.eventOrder}},configFields:[hs("components",[]),Mg("containerBehaviours",[]),hs("events",{}),hs("domModification",{}),hs("eventOrder",{})]}),Ug="data-initial-z-index",Zg=(e,t)=>{e.getSystem().addToGui(t),(e=>{uo(e.element).filter(to).each((t=>{fn(t,"z-index").each((e=>{$o(t,Ug,e)})),un(t,"z-index",pn(e.element,"z-index"))}))})(t)},$g=e=>{(e=>{uo(e.element).filter(to).each((e=>{Go(e,Ug).fold((()=>yn(e,"z-index")),(t=>un(e,"z-index",t))),Ko(e,Ug)}))})(e),e.getSystem().removeFromGui(e)},Wg=(e,t,o)=>e.getSystem().build(Vg.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:o}));var qg=us("snaps",[Yi("getSnapPoints"),Na("onSensor"),Yi("leftAttr"),Yi("topAttr"),hs("lazyViewport",Vr),hs("mustSnap",!1)]);const Gg=[hs("useFixed",T),Yi("blockerClass"),hs("getTarget",w),hs("onDrag",b),hs("repositionTarget",!0),hs("onDrop",b),vs("getBounds",Vr),qg],Yg=e=>((e,t,o,n)=>e.isSome()&&t.isSome()&&o.isSome()?A.some(n(e.getOrDie(),t.getOrDie(),o.getOrDie())):A.none())(fn(e,"left"),fn(e,"top"),fn(e,"position"),((e,t,o)=>("fixed"===o?wg:yg)(parseInt(e,10),parseInt(t,10)))).getOrThunk((()=>{const t=Rn(e);return xg(t.left,t.top)})),Kg=(e,t,o,n,r,i,s)=>((e,t,o,n,r)=>{const i=r.bounds,s=gg(t,o,n),a=Ne(s.left,i.x,i.x+i.width-r.width),l=Ne(s.top,i.y,i.y+i.height-r.height),c=xg(a,l);return t.fold((()=>{const e=fg(c,o,n);return yg(e.left,e.top)}),x(c),(()=>{const e=pg(c,o,n);return wg(e.left,e.top)}))})(0,t.fold((()=>{const e=(t=o,s=i.left,a=i.top,t.fold(((e,t)=>yg(e+s,t+a)),((e,t)=>xg(e+s,t+a)),((e,t)=>wg(e+s,t+a))));var t,s,a;const l=pg(e,n,r);return wg(l.left,l.top)}),(t=>{const s=Cg(e,t,o,i,n,r);return s.extra.each((o=>{t.onSensor(e,o)})),s.coord})),n,r,s),Xg=(e,t)=>({bounds:e.getBounds(),height:Cn(t.element),width:An(t.element)}),Jg=(e,t,o,n,r)=>{const i=o.update(n,r),s=o.getStartData().getOrThunk((()=>Xg(t,e)));i.each((o=>{((e,t,o,n)=>{const r=t.getTarget(e.element);if(t.repositionTarget){const i=so(e.element),s=In(i),a=$r(r),l=Yg(r),c=Kg(e,t.snaps,l,s,a,n,o),d=bg(c,0,a);mn(r,d)}t.onDrag(e,r,n)})(e,t,s,o)}))},Qg=(e,t,o,n)=>{t.each($g),o.snaps.each((t=>{kg(e,t)}));const r=o.getTarget(e.element);n.reset(),o.onDrop(e,r)},ef=e=>(t,o)=>{const n=e=>{o.setStartData(Xg(t,e))};return ld([ud(aa(),(e=>{o.getStartData().each((()=>n(e)))})),...e(t,o,n)])};var tf=Object.freeze({__proto__:null,getData:e=>A.from(Dn(e.x,e.y)),getDelta:(e,t)=>Dn(t.left-e.left,t.top-e.top)});const of=(e,t,o)=>[ud(Ms(),((n,r)=>{if(0!==r.event.raw.button)return;r.stop();const i=()=>Qg(n,A.some(l),e,t),s=Za(i,200),a={drop:i,delayDrop:s.schedule,forceDrop:i,move:o=>{s.cancel(),Jg(n,e,t,tf,o)}},l=Wg(n,e.blockerClass,(e=>ld([ud(Ms(),e.forceDrop),ud(Ls(),e.drop),ud(Ps(),((t,o)=>{e.move(o.event)})),ud(Ds(),e.delayDrop)]))(a));o(n),Zg(n,l)}))],nf=[...Gg,Fa("dragger",{handlers:ef(of)})];var rf=Object.freeze({__proto__:null,getData:e=>{const t=e.raw.touches;return 1===t.length?(e=>{const t=e[0];return A.some(Dn(t.clientX,t.clientY))})(t):A.none()},getDelta:(e,t)=>Dn(t.left-e.left,t.top-e.top)});const sf=(e,t,o)=>{const n=Ye(),r=o=>{Qg(o,n.get(),e,t),n.clear()};return[ud(Es(),((i,s)=>{s.stop();const a=()=>r(i),l={drop:a,delayDrop:b,forceDrop:a,move:o=>{Jg(i,e,t,rf,o)}},c=Wg(i,e.blockerClass,(e=>ld([ud(Es(),e.forceDrop),ud(Os(),e.drop),ud(As(),e.drop),ud(Ts(),((t,o)=>{e.move(o.event)}))]))(l));n.set(c);o(i),Zg(i,c)})),ud(Ts(),((o,n)=>{n.stop(),Jg(o,e,t,rf,n.event)})),ud(Os(),((e,t)=>{t.stop(),r(e)})),ud(As(),r)]},af=nf,lf=[...Gg,Fa("dragger",{handlers:ef(sf)})],cf=[...Gg,Fa("dragger",{handlers:ef(((e,t,o)=>[...of(e,t,o),...sf(e,t,o)]))})];var df=Object.freeze({__proto__:null,mouse:af,touch:lf,mouseOrTouch:cf});var uf=Object.freeze({__proto__:null,init:()=>{let e=A.none(),t=A.none();const o=x({});return Jc({readState:o,reset:()=>{e=A.none(),t=A.none()},update:(t,o)=>t.getData(o).bind((o=>((t,o)=>{const n=e.map((e=>t.getDelta(e,o)));return e=A.some(o),n})(t,o))),getStartData:()=>t,setStartData:e=>{t=A.some(e)}})}});const hf=Dd({branchKey:"mode",branches:df,name:"dragging",active:{events:(e,t)=>e.dragger.handlers(e,t)},extra:{snap:e=>({sensor:e.sensor,range:e.range,output:e.output,extra:A.from(e.extra)})},state:uf,apis:Ag}),mf=["input","textarea"],pf=e=>{const t=Jt(e);return R(mf,t)},gf=(e,t)=>{const o=t.getRoot(e).getOr(e.element);ir(o,t.invalidClass),t.notify.each((t=>{pf(e.element)&&$o(e.element,"aria-invalid",!1),t.getContainer(e).each((e=>{tn(e,t.validHtml)})),t.onValid(e)}))},ff=(e,t,o,n)=>{const r=t.getRoot(e).getOr(e.element);nr(r,t.invalidClass),t.notify.each((t=>{pf(e.element)&&$o(e.element,"aria-invalid",!0),t.getContainer(e).each((e=>{tn(e,n)})),t.onInvalid(e,n)}))},bf=(e,t,o)=>t.validator.fold((()=>Ee(Ae.value(!0))),(t=>t.validate(e))),vf=(e,t,o)=>(t.notify.each((t=>{t.onValidate(e)})),bf(e,t).map((o=>e.getSystem().isConnected()?o.fold((o=>(ff(e,t,0,o),Ae.error(o))),(o=>(gf(e,t),Ae.value(o)))):Ae.error("No longer in system"))));var yf=Object.freeze({__proto__:null,markValid:gf,markInvalid:ff,query:bf,run:vf,isInvalid:(e,t)=>{const o=t.getRoot(e).getOr(e.element);return ar(o,t.invalidClass)}});var xf=Object.freeze({__proto__:null,events:(e,t)=>e.validator.map((t=>ld([ud(t.onEvent,(t=>{vf(t,e).get(w)}))].concat(t.validateOnLoad?[yd((t=>{vf(t,e).get(b)}))]:[])))).getOr({})}),wf=[Yi("invalidClass"),hs("getRoot",A.none),us("notify",[hs("aria","alert"),hs("getContainer",A.none),hs("validHtml",""),Na("onValid"),Na("onInvalid"),Na("onValidate")]),us("validator",[Yi("validate"),hs("onEvent","input"),hs("validateOnLoad",!0)])];const _f=(e,t,o)=>{t.store.manager.onLoad(e,t,o)},Sf=(e,t,o)=>{t.store.manager.onUnload(e,t,o)};var Cf=Object.freeze({__proto__:null,onLoad:_f,onUnload:Sf,setValue:(e,t,o,n)=>{t.store.manager.setValue(e,t,o,n)},getValue:(e,t,o)=>t.store.manager.getValue(e,t,o),getState:(e,t,o)=>o});var kf=Object.freeze({__proto__:null,events:(e,t)=>{const o=e.resetOnDom?[yd(((o,n)=>{_f(o,e,t)})),xd(((o,n)=>{Sf(o,e,t)}))]:[Cd(e,t,_f)];return ld(o)}});const Ef=()=>{const e=xe(null);return Jc({set:e.set,get:e.get,isNotSet:()=>null===e.get(),clear:()=>{e.set(null)},readState:()=>({mode:"memory",value:e.get()})})},Tf=()=>{const e=xe({}),t=xe({});return Jc({readState:()=>({mode:"dataset",dataByValue:e.get(),dataByText:t.get()}),lookup:o=>fe(e.get(),o).orThunk((()=>fe(t.get(),o))),update:o=>{const n=e.get(),r=t.get(),i={},s={};F(o,(e=>{i[e.value]=e,fe(e,"meta").each((t=>{fe(t,"text").each((t=>{s[t]=e}))}))})),e.set({...n,...i}),t.set({...r,...s})},clear:()=>{e.set({}),t.set({})}})};var Of=Object.freeze({__proto__:null,memory:Ef,dataset:Tf,manual:()=>Jc({readState:b}),init:e=>e.store.manager.state(e)});const Af=(e,t,o,n)=>{const r=t.store;o.update([n]),r.setValue(e,n),t.onSetValue(e,n)};var Mf=[rs("initialValue"),Yi("getFallbackEntry"),Yi("getDataKey"),Yi("setValue"),Fa("manager",{setValue:Af,getValue:(e,t,o)=>{const n=t.store,r=n.getDataKey(e);return o.lookup(r).getOrThunk((()=>n.getFallbackEntry(r)))},onLoad:(e,t,o)=>{t.store.initialValue.each((n=>{Af(e,t,o,n)}))},onUnload:(e,t,o)=>{o.clear()},state:Tf})];var Pf=[Yi("getValue"),hs("setValue",b),rs("initialValue"),Fa("manager",{setValue:(e,t,o,n)=>{t.store.setValue(e,n),t.onSetValue(e,n)},getValue:(e,t,o)=>t.store.getValue(e),onLoad:(e,t,o)=>{t.store.initialValue.each((o=>{t.store.setValue(e,o)}))},onUnload:b,state:Xc.init})];var Df=[rs("initialValue"),Fa("manager",{setValue:(e,t,o,n)=>{o.set(n),t.onSetValue(e,n)},getValue:(e,t,o)=>o.get(),onLoad:(e,t,o)=>{t.store.initialValue.each((e=>{o.isNotSet()&&o.set(e)}))},onUnload:(e,t,o)=>{o.clear()},state:Ef})],Lf=[ms("store",{mode:"memory"},Zi("mode",{memory:Df,manual:Pf,dataset:Mf})),Na("onSetValue"),hs("resetOnDom",!1)];const Rf=Md({fields:Lf,name:"representing",active:kf,apis:Cf,extra:{setValueFrom:(e,t)=>{const o=Rf.getValue(t);Rf.setValue(e,o)}},state:Of}),Nf=Md({fields:wf,name:"invalidating",active:xf,apis:yf,extra:{validation:e=>t=>{const o=Rf.getValue(t);return Ee(e(o))}}});var If=Object.freeze({__proto__:null,exhibit:(e,t)=>Sd({classes:[],styles:t.useFixed()?{}:{position:"relative"}})});const Bf=ye([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),zf=(e,t,o,n,r,i)=>{const s=t.rect,a=s.x-o,l=s.y-n,c=r-(a+s.width),d=i-(l+s.height),u=A.some(a),h=A.some(l),m=A.some(c),p=A.some(d),g=A.none();return((e,t,o,n,r,i,s,a,l)=>e.fold(t,o,n,r,i,s,a,l))(t.direction,(()=>Dp(e,u,h,g,g)),(()=>Dp(e,g,h,m,g)),(()=>Dp(e,u,g,g,p)),(()=>Dp(e,g,g,m,p)),(()=>Dp(e,u,h,g,g)),(()=>Dp(e,u,g,g,p)),(()=>Dp(e,u,h,g,g)),(()=>Dp(e,g,h,m,g)))},Ff=(e,t)=>e.fold((()=>{const e=t.rect;return Dp("absolute",A.some(e.x),A.some(e.y),A.none(),A.none())}),((e,o,n,r)=>zf("absolute",t,e,o,n,r)),((e,o,n,r)=>zf("fixed",t,e,o,n,r))),Hf=(e,t)=>{const o=S(Br,t),n=e.fold(o,o,(()=>{const e=In();return Br(t).translate(-e.left,-e.top)})),r=An(t),i=Cn(t);return zr(n.left,n.top,r,i)},jf=(e,t)=>t.fold((()=>e.fold(Vr,Vr,zr)),(t=>e.fold(x(t),x(t),(()=>{const o=Vf(e,t.x,t.y);return zr(o.left,o.top,t.width,t.height)})))),Vf=(e,t,o)=>{const n=Dn(t,o);return e.fold(x(n),x(n),(()=>{const e=In();return n.translate(-e.left,-e.top)}))};Bf.none;const Uf=Bf.relative,Zf=Bf.fixed,$f=(e,t)=>((e,t)=>({anchorBox:e,origin:t}))(e,t),Wf=ye([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),qf=(e,t,o,n)=>{const r=e.bubble,i=r.offset,s=((e,t,o)=>{const n=(n,r)=>t[n].map((t=>{const i="top"===n||"bottom"===n,s=i?o.top:o.left,a=("left"===n||"top"===n?Math.max:Math.min)(t,r)+s;return i?Ne(a,e.y,e.bottom):Ne(a,e.x,e.right)})).getOr(r),r=n("left",e.x),i=n("top",e.y),s=n("right",e.right),a=n("bottom",e.bottom);return zr(r,i,s-r,a-i)})(n,e.restriction,i),a=e.x+i.left,l=e.y+i.top,c=zr(a,l,t,o),{originInBounds:d,sizeInBounds:u,visibleW:h,visibleH:m}=((e,t)=>{const{x:o,y:n,right:r,bottom:i}=t,{x:s,y:a,right:l,bottom:c,width:d,height:u}=e;return{originInBounds:s>=o&&s<=r&&a>=n&&a<=i,sizeInBounds:l<=r&&l>=o&&c<=i&&c>=n,visibleW:Math.min(d,s>=o?r-s:l-o),visibleH:Math.min(u,a>=n?i-a:c-n)}})(c,s),p=d&&u,g=p?c:((e,t)=>{const{x:o,y:n,right:r,bottom:i}=t,{x:s,y:a,width:l,height:c}=e,d=Math.max(o,r-l),u=Math.max(n,i-c),h=Ne(s,o,d),m=Ne(a,n,u),p=Math.min(h+l,r)-h,g=Math.min(m+c,i)-m;return zr(h,m,p,g)})(c,s),f=g.width>0&&g.height>0,{maxWidth:b,maxHeight:v}=((e,t,o)=>{const n=x(t.bottom-o.y),r=x(o.bottom-t.y),i=((e,t,o,n)=>e.fold(t,t,n,n,t,n,o,o))(e,r,r,n),s=x(t.right-o.x),a=x(o.right-t.x),l=((e,t,o,n)=>e.fold(t,n,t,n,o,o,t,n))(e,a,a,s);return{maxWidth:l,maxHeight:i}})(e.direction,g,n),y={rect:g,maxHeight:v,maxWidth:b,direction:e.direction,placement:e.placement,classes:{on:r.classesOn,off:r.classesOff},layout:e.label,testY:l};return p||e.alwaysFit?Wf.fit(y):Wf.nofit(y,h,m,f)},Gf=["top","bottom","right","left"],Yf="data-alloy-transition-timer",Kf=(e,t)=>((e,t)=>G(t,(t=>ar(e,t))))(e,t.classes),Xf=(e,t)=>{const o=e=>parseFloat(e).toFixed(3);return pe(t,((t,n)=>!((e,t,o=_)=>Ue(e,t,o).getOr(e.isNone()&&t.isNone()))(e[n].map(o),t.map(o)))).isSome()},Jf=(e,t)=>{const o=Ge(),n=Ge();let r;const s=t=>{var o;const n=null!==(o=t.raw.pseudoElement)&&void 0!==o?o:"";return vt(t.target,e)&&nt(n)&&R(Gf,t.raw.propertyName)},a=i=>{if(h(i)||s(i)){o.clear(),n.clear();const s=null==i?void 0:i.raw.type;(h(s)||s===Us())&&(clearTimeout(r),Ko(e,Yf),cr(e,t.classes))}},l=Mo(e,Zs(),(t=>{s(t)&&(l.unbind(),o.set(Mo(e,Us(),a)),n.set(Mo(e,Vs(),a)))})),c=(e=>{const t=t=>{const o=pn(e,t).split(/\s*,\s*/);return j(o,ot)},o=e=>{if(i(e)&&/^[\d.]+/.test(e)){const t=parseFloat(e);return et(e,"ms")?t:1e3*t}return 0},n=t("transition-delay"),r=t("transition-duration");return U(r,((e,t,r)=>{const i=o(n[r])+o(t);return Math.max(e,i)}),0)})(e);requestAnimationFrame((()=>{r=setTimeout(a,c+17),$o(e,Yf,r)}))},Qf=(e,t,o,n,r,i)=>{const s=((e,t,o)=>o.exists((o=>{const n=e.mode;return"all"===n||o[n]!==t[n]})))(n,r,i);if(s||Kf(e,n)){un(e,"position",o.position);const i=Hf(t,e),a=Ff(t,{...r,rect:i}),l=X(Gf,(e=>a[e]));Xf(o,l)&&(mn(e,l),s&&((e,t)=>{lr(e,t.classes),Go(e,Yf).each((t=>{clearTimeout(parseInt(t,10)),Ko(e,Yf)})),Jf(e,t)})(e,n),xn(e))}else cr(e,n.classes)},eb=(e,t,o,n)=>{yn(t,"max-height"),yn(t,"max-width");const r=(i=t,{width:Math.ceil(Mn(i)),height:Cn(i)});var i;return((e,t,o,n,r,i)=>{const s=n.width,a=n.height,l=(t,l,c,d,u)=>{const h=t(o,n,r,e,i),m=qf(h,s,a,i);return m.fold(x(m),((e,t,o,n)=>(u===n?o>d||t>c:!u&&n)?m:Wf.nofit(l,c,d,u)))},c=U(t,((e,t)=>{const o=S(l,t);return e.fold(x(e),o)}),Wf.nofit({rect:o,maxHeight:n.height,maxWidth:n.width,direction:Wl(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:o.y},-1,-1,!1));return c.fold(w,w)})(t,n.preference,e,r,o,n.bounds)},tb=(e,t)=>{((e,t)=>{$o(e,_c,t)})(e,t.placement)},ob=(e,t,o)=>void 0===e[t]?o:e[t],nb=(e,t,o,n)=>{const r=eb(e,t,o,n);return((e,t,o)=>{const n=Ff(o.origin,t);o.transition.each((r=>{Qf(e,o.origin,n,r,t,o.lastPlacement)})),Lp(e,n)})(t,r,n),tb(t,r),((e,t)=>{const o=t.classes;cr(e,o.off),lr(e,o.on)})(t,r),((e,t,o)=>{(0,o.maxHeightFunction)(e,t.maxHeight)})(t,r,n),((e,t,o)=>{(0,o.maxWidthFunction)(e,t.maxWidth)})(t,r,n),{layout:r.layout,placement:r.placement}},rb=w,ib=()=>us("layouts",[Yi("onLtr"),Yi("onRtl"),rs("onBottomLtr"),rs("onBottomRtl")]),sb=(e,t,o,n,r,i,s)=>{const a=s.map(Yc).getOr(!1),l=t.layouts.map((t=>t.onLtr(e))),c=t.layouts.map((t=>t.onRtl(e))),d=a?t.layouts.bind((t=>t.onBottomLtr.map((t=>t(e))))).or(l).getOr(r):l.getOr(o),u=a?t.layouts.bind((t=>t.onBottomRtl.map((t=>t(e))))).or(c).getOr(i):c.getOr(n);return Fn(d,u)(e)};var ab=[Yi("hotspot"),rs("bubble"),hs("overrides",{}),ib(),Fa("placement",((e,t,o)=>{const n=t.hotspot,r=Hf(o,n.element),i=sb(e.element,t,xc(),wc(),vc(),yc(),A.some(t.hotspot.element));return A.some(rb({anchorBox:r,bubble:t.bubble.getOr(Ul()),overrides:t.overrides,layouts:i}))}))];var lb=[Yi("x"),Yi("y"),hs("height",0),hs("width",0),hs("bubble",Ul()),hs("overrides",{}),ib(),Fa("placement",((e,t,o)=>{const n=Vf(o,t.x,t.y),r=zr(n.left,n.top,t.width,t.height),i=sb(e.element,t,fc(),bc(),fc(),bc(),A.none());return A.some(rb({anchorBox:r,bubble:t.bubble,overrides:t.overrides,layouts:i}))}))];const cb=ye([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),db=e=>e.fold(w,((e,t,o)=>e.translate(-t,-o))),ub=e=>e.fold(w,w),hb=e=>U(e,((e,t)=>e.translate(t.left,t.top)),Dn(0,0)),mb=e=>{const t=z(e,ub);return hb(t)},pb=cb.screen,gb=cb.absolute,fb=(e,t,o)=>{const n=so(e.element),r=In(n),i=((e,t,o)=>{const n=co(o.root).dom;return A.from(n.frameElement).map(at.fromDom).filter((t=>{const o=so(t),n=so(e.element);return vt(o,n)})).map(Rn)})(e,0,o).getOr(r);return gb(i,r.left,r.top)},bb=(e,t,o,n)=>{const r=pb(Dn(e,t));return A.some(((e,t,o)=>({point:e,width:t,height:o}))(r,o,n))},vb=(e,t,o,n,r)=>e.map((e=>{const i=[t,e.point],s=(a=()=>mb(i),l=()=>mb(i),c=()=>(e=>{const t=z(e,db);return hb(t)})(i),n.fold(a,l,c));var a,l,c;const d=((e,t,o,n)=>({x:e,y:t,width:o,height:n}))(s.left,s.top,e.width,e.height),u=o.showAbove?vc():xc(),h=o.showAbove?yc():wc(),m=sb(r,o,u,h,u,h,A.none());return rb({anchorBox:d,bubble:o.bubble.getOr(Ul()),overrides:o.overrides,layouts:m})}));var yb=[Yi("node"),Yi("root"),rs("bubble"),ib(),hs("overrides",{}),hs("showAbove",!1),Fa("placement",((e,t,o)=>{const n=fb(e,0,t);return t.node.filter(sn).bind((r=>{const i=r.dom.getBoundingClientRect(),s=bb(i.left,i.top,i.width,i.height),a=t.node.getOr(e.element);return vb(s,n,t,o,a)}))}))];const xb=(e,t)=>({element:e,offset:t}),wb=(e,t)=>{const o=po(e);if(0===o.length)return xb(e,t);if(t<o.length)return xb(o[t],0);{const e=o[o.length-1],t=oo(e)?(e=>zn.get(e))(e).length:po(e).length;return xb(e,t)}},_b=(e,t)=>oo(e)?xb(e,t):wb(e,t),Sb=e=>void 0!==e.foffset,Cb=(e,t)=>t.getSelection.getOrThunk((()=>()=>Tr(e)))().map((e=>{if(Sb(e)){const t=_b(e.start,e.soffset),o=_b(e.finish,e.foffset);return Cr.range(t.element,t.offset,o.element,o.offset)}return e}));var kb=[rs("getSelection"),Yi("root"),rs("bubble"),ib(),hs("overrides",{}),hs("showAbove",!1),Fa("placement",((e,t,o)=>{const n=co(t.root).dom,r=fb(e,0,t),i=Cb(n,t).bind((e=>{if(Sb(e)){const t=Ar(n,Cr.exactFromRange(e)).orThunk((()=>{const t=at.fromText("\ufeff");Fo(e.start,t);const o=Or(n,Cr.exact(t,0,t,1));return Jo(t),o}));return t.bind((e=>bb(e.left,e.top,e.width,e.height)))}{const t=le(e,(e=>e.dom.getBoundingClientRect())),o={left:Math.min(t.firstCell.left,t.lastCell.left),right:Math.max(t.firstCell.right,t.lastCell.right),top:Math.min(t.firstCell.top,t.lastCell.top),bottom:Math.max(t.firstCell.bottom,t.lastCell.bottom)};return bb(o.left,o.top,o.right-o.left,o.bottom-o.top)}})),s=Cb(n,t).bind((e=>Sb(e)?to(e.start)?A.some(e.start):ho(e.start):A.some(e.firstCell))).getOr(e.element);return vb(i,r,t,o,s)}))];const Eb="link-layout",Tb=e=>e.x+e.width,Ob=(e,t)=>e.x-t.width,Ab=(e,t)=>e.y-t.height+e.height,Mb=e=>e.y,Pb=(e,t,o)=>Zl(Tb(e),Mb(e),o.southeast(),Wl(),"southeast",ec(e,{left:0,top:2}),Eb),Db=(e,t,o)=>Zl(Ob(e,t),Mb(e),o.southwest(),ql(),"southwest",ec(e,{right:1,top:2}),Eb),Lb=(e,t,o)=>Zl(Tb(e),Ab(e,t),o.northeast(),Gl(),"northeast",ec(e,{left:0,bottom:3}),Eb),Rb=(e,t,o)=>Zl(Ob(e,t),Ab(e,t),o.northwest(),Yl(),"northwest",ec(e,{right:1,bottom:3}),Eb),Nb=()=>[Pb,Db,Lb,Rb],Ib=()=>[Db,Pb,Rb,Lb];var Bb=[Yi("item"),ib(),hs("overrides",{}),Fa("placement",((e,t,o)=>{const n=Hf(o,t.item.element),r=sb(e.element,t,Nb(),Ib(),Nb(),Ib(),A.none());return A.some(rb({anchorBox:n,bubble:Ul(),overrides:t.overrides,layouts:r}))}))],zb=Zi("type",{selection:kb,node:yb,hotspot:ab,submenu:Bb,makeshift:lb});const Fb=[ns("classes",mi),fs("mode","all",["all","layout","placement"])],Hb=[hs("useFixed",T),rs("getBounds")],jb=[Ki("anchor",zb),us("transition",Fb)],Vb=(e,t,o,n,r,i)=>((e,t,o,n,r,i,s,a)=>{const l=ob(s,"maxHeightFunction",Zc()),c=ob(s,"maxWidthFunction",b),d=e.anchorBox,u=e.origin,h={bounds:jf(u,i),origin:u,preference:n,maxHeightFunction:l,maxWidthFunction:c,lastPlacement:r,transition:a};return nb(d,t,o,h)})($f(t.anchorBox,e),n.element,t.bubble,t.layouts,r,o,t.overrides,i),Ub=(e,t,o,n,r,i)=>{const s=Vi("placement.info",Pi(jb),r),a=s.anchor,l=n.element,c=o.get(n.uid);gm((()=>{un(l,"position","fixed");const r=fn(l,"visibility");un(l,"visibility","hidden");const d=t.useFixed()?(()=>{const e=document.documentElement;return Zf(0,0,e.clientWidth,e.clientHeight)})():(e=>{const t=Rn(e.element),o=e.element.dom.getBoundingClientRect();return Uf(t.left,t.top,o.width,o.height)})(e);a.placement(e,a,d).each((e=>{const r=i.orThunk((()=>t.getBounds.map(E))),a=Vb(d,e,r,n,c,s.transition);o.set(n.uid,a)})),r.fold((()=>{yn(l,"visibility")}),(e=>{un(l,"visibility",e)})),fn(l,"left").isNone()&&fn(l,"top").isNone()&&fn(l,"right").isNone()&&fn(l,"bottom").isNone()&&je(fn(l,"position"),"fixed")&&yn(l,"position")}),l)};var Zb=Object.freeze({__proto__:null,position:(e,t,o,n,r)=>{const i=A.none();Ub(e,t,o,n,r,i)},positionWithinBounds:Ub,getMode:(e,t,o)=>t.useFixed()?"fixed":"absolute",reset:(e,t,o,n)=>{const r=n.element;F(["position","left","right","top","bottom"],(e=>yn(r,e))),(e=>{Ko(e,_c)})(r),o.clear(n.uid)}});const $b=Md({fields:Hb,name:"positioning",active:If,apis:Zb,state:Object.freeze({__proto__:null,init:()=>{let e={};return Jc({readState:()=>e,clear:t=>{m(t)?delete e[t]:e={}},set:(t,o)=>{e[t]=o},get:t=>fe(e,t)})}})});var Wb=Object.freeze({__proto__:null,events:e=>ld([ud(Xs(),((t,o)=>{const n=e.channels,r=ie(n),i=o,s=((e,t)=>t.universal?e:j(e,(e=>R(t.channels,e))))(r,i);F(s,(e=>{const o=n[e],r=o.schema,s=Vi("channel["+e+"] data\nReceiver: "+xa(t.element),r,i.data);o.onReceive(t,s)}))}))])}),qb=[Ki("channels",Fi(Ae.value,Mi([Ba("onReceive"),hs("schema",di())])))];const Gb=Md({fields:qb,name:"receiving",active:Wb});var Yb=Object.freeze({__proto__:null,events:(e,t)=>{const o=(o,n)=>{e.updateState.each((e=>{const r=e(o,n);t.set(r)})),e.renderComponents.each((r=>{const i=r(n,t.get());(e.reuseDom?bm:fm)(o,i)}))};return ld([ud(Xs(),((t,n)=>{const r=n;if(!r.universal){const n=e.channel;R(r.channels,n)&&o(t,r.data)}})),yd(((t,n)=>{e.initialData.each((e=>{o(t,e)}))}))])}});var Kb=Object.freeze({__proto__:null,getState:(e,t,o)=>o}),Xb=[Yi("channel"),rs("renderComponents"),rs("updateState"),rs("initialData"),bs("reuseDom",!0)];const Jb=Md({fields:Xb,name:"reflecting",active:Yb,apis:Kb,state:Object.freeze({__proto__:null,init:()=>{const e=xe(A.none());return{readState:()=>e.get().getOr("none"),get:e.get,set:e.set,clear:()=>e.set(A.none())}}})}),Qb=(e,t,o,n)=>{o.get().each((t=>{am(e)}));const r=t.getAttachPoint(e);nm(r,e);const i=e.getSystem().build(n);return nm(e,i),o.set(i),i},ev=(e,t,o,n)=>{const r=Qb(e,t,o,n);return t.onOpen(e,r),r},tv=(e,t,o)=>{o.get().each((n=>{am(e),sm(e),t.onClose(e,n),o.clear()}))},ov=(e,t,o)=>o.isOpen(),nv=(e,t,o)=>{const n=t.getAttachPoint(e);un(e.element,"position",$b.getMode(n)),((e,t,o,n)=>{fn(e.element,t).fold((()=>{Ko(e.element,o)}),(t=>{$o(e.element,o,t)})),un(e.element,t,n)})(e,"visibility",t.cloakVisibilityAttr,"hidden")},rv=(e,t,o)=>{(e=>N(["top","left","right","bottom"],(t=>fn(e,t).isSome())))(e.element)||yn(e.element,"position"),((e,t,o)=>{Go(e.element,o).fold((()=>yn(e.element,t)),(o=>un(e.element,t,o)))})(e,"visibility",t.cloakVisibilityAttr)};var iv=Object.freeze({__proto__:null,cloak:nv,decloak:rv,open:ev,openWhileCloaked:(e,t,o,n,r)=>{nv(e,t),ev(e,t,o,n),r(),rv(e,t)},close:tv,isOpen:ov,isPartOf:(e,t,o,n)=>ov(0,0,o)&&o.get().exists((o=>t.isPartOf(e,o,n))),getState:(e,t,o)=>o.get(),setContent:(e,t,o,n)=>o.get().map((()=>Qb(e,t,o,n)))});var sv=Object.freeze({__proto__:null,events:(e,t)=>ld([ud(oa(),((o,n)=>{tv(o,e,t)}))])}),av=[Na("onOpen"),Na("onClose"),Yi("isPartOf"),Yi("getAttachPoint"),hs("cloakVisibilityAttr","data-precloak-visibility")];var lv=Object.freeze({__proto__:null,init:()=>{const e=Ye(),t=x("not-implemented");return Jc({readState:t,isOpen:e.isSet,clear:e.clear,set:e.set,get:e.get})}});const cv=Md({fields:av,name:"sandboxing",active:sv,apis:iv,state:lv}),dv=(e,t)=>t.getAnimationRoot.fold((()=>e.element),(t=>t(e))),uv=e=>e.dimension.property,hv=(e,t)=>e.dimension.getDimension(t),mv=(e,t)=>{const o=dv(e,t);cr(o,[t.shrinkingClass,t.growingClass])},pv=(e,t)=>{ir(e.element,t.openClass),nr(e.element,t.closedClass),un(e.element,uv(t),"0px"),xn(e.element)},gv=(e,t)=>{ir(e.element,t.closedClass),nr(e.element,t.openClass),yn(e.element,uv(t))},fv=(e,t,o,n)=>{o.setCollapsed(),un(e.element,uv(t),hv(t,e.element)),mv(e,t),pv(e,t),t.onStartShrink(e),t.onShrunk(e)},bv=(e,t,o,n)=>{const r=n.getOrThunk((()=>hv(t,e.element)));o.setCollapsed(),un(e.element,uv(t),r),xn(e.element);const i=dv(e,t);ir(i,t.growingClass),nr(i,t.shrinkingClass),pv(e,t),t.onStartShrink(e)},vv=(e,t,o)=>{const n=hv(t,e.element);("0px"===n?fv:bv)(e,t,o,A.some(n))},yv=(e,t,o)=>{const n=dv(e,t),r=ar(n,t.shrinkingClass),i=hv(t,e.element);gv(e,t);const s=hv(t,e.element);(r?()=>{un(e.element,uv(t),i),xn(e.element)}:()=>{pv(e,t)})(),ir(n,t.shrinkingClass),nr(n,t.growingClass),gv(e,t),un(e.element,uv(t),s),o.setExpanded(),t.onStartGrow(e)},xv=(e,t,o)=>{const n=dv(e,t);return!0===ar(n,t.growingClass)},wv=(e,t,o)=>{const n=dv(e,t);return!0===ar(n,t.shrinkingClass)};var _v=Object.freeze({__proto__:null,refresh:(e,t,o)=>{if(o.isExpanded()){yn(e.element,uv(t));const o=hv(t,e.element);un(e.element,uv(t),o)}},grow:(e,t,o)=>{o.isExpanded()||yv(e,t,o)},shrink:(e,t,o)=>{o.isExpanded()&&vv(e,t,o)},immediateShrink:(e,t,o)=>{o.isExpanded()&&fv(e,t,o)},hasGrown:(e,t,o)=>o.isExpanded(),hasShrunk:(e,t,o)=>o.isCollapsed(),isGrowing:xv,isShrinking:wv,isTransitioning:(e,t,o)=>xv(e,t)||wv(e,t),toggleGrow:(e,t,o)=>{(o.isExpanded()?vv:yv)(e,t,o)},disableTransitions:mv,immediateGrow:(e,t,o)=>{o.isExpanded()||(gv(e,t),un(e.element,uv(t),hv(t,e.element)),mv(e,t),o.setExpanded(),t.onStartGrow(e),t.onGrown(e))}});var Sv=Object.freeze({__proto__:null,exhibit:(e,t,o)=>{const n=t.expanded;return Sd(n?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:_s(t.dimension.property,"0px")})},events:(e,t)=>ld([vd(Us(),((o,n)=>{if(n.event.raw.propertyName===e.dimension.property){mv(o,e),t.isExpanded()&&yn(o.element,e.dimension.property);(t.isExpanded()?e.onGrown:e.onShrunk)(o)}}))])}),Cv=[Yi("closedClass"),Yi("openClass"),Yi("shrinkingClass"),Yi("growingClass"),rs("getAnimationRoot"),Na("onShrunk"),Na("onStartShrink"),Na("onGrown"),Na("onStartGrow"),hs("expanded",!1),Ki("dimension",Zi("property",{width:[Fa("property","width"),Fa("getDimension",(e=>On(e)+"px"))],height:[Fa("property","height"),Fa("getDimension",(e=>Sn(e)+"px"))]}))];const kv=Md({fields:Cv,name:"sliding",active:Sv,apis:_v,state:Object.freeze({__proto__:null,init:e=>{const t=xe(e.expanded);return Jc({isExpanded:()=>!0===t.get(),isCollapsed:()=>!1===t.get(),setCollapsed:S(t.set,!1),setExpanded:S(t.set,!0),readState:()=>"expanded: "+t.get()})}})});var Ev=Object.freeze({__proto__:null,events:(e,t)=>{const o=e.stream.streams.setup(e,t);return ld([ud(e.event,o),xd((()=>t.cancel()))].concat(e.cancelEvent.map((e=>[ud(e,(()=>t.cancel()))])).getOr([])))}});const Tv=e=>{const t=xe(null);return Jc({readState:()=>({timer:null!==t.get()?"set":"unset"}),setTimer:e=>{t.set(e)},cancel:()=>{const e=t.get();null!==e&&e.cancel()}})};var Ov=Object.freeze({__proto__:null,throttle:Tv,init:e=>e.stream.streams.state(e)});var Av=[Ki("stream",Zi("mode",{throttle:[Yi("delay"),hs("stopEvent",!0),Fa("streams",{setup:(e,t)=>{const o=e.stream,n=rt(e.onStream,o.delay);return t.setTimer(n),(e,t)=>{n.throttle(e,t),o.stopEvent&&t.stop()}},state:Tv})]})),hs("event","input"),rs("cancelEvent"),Ba("onStream")];const Mv=Md({fields:Av,name:"streaming",active:Ev,state:Ov});var Pv=Object.freeze({__proto__:null,exhibit:(e,t)=>Sd({attributes:Ss([{key:t.tabAttr,value:"true"}])})}),Dv=[hs("tabAttr","data-alloy-tabstop")];const Lv=Md({fields:Dv,name:"tabstopping",active:Pv}),Rv=(e,t,o,n)=>{const r=o.get();o.set(n),((e,t,o)=>{t.toggleClass.each((t=>{o.get()?nr(e.element,t):ir(e.element,t)}))})(e,t,o),((e,t,o)=>{const n=t.aria;n.update(e,n,o.get())})(e,t,o),r!==n&&t.onToggled(e,n)},Nv=(e,t,o)=>{Rv(e,t,o,!o.get())},Iv=(e,t,o)=>{Rv(e,t,o,t.selected)};var Bv=Object.freeze({__proto__:null,onLoad:Iv,toggle:Nv,isOn:(e,t,o)=>o.get(),on:(e,t,o)=>{Rv(e,t,o,!0)},off:(e,t,o)=>{Rv(e,t,o,!1)},set:Rv});var zv=Object.freeze({__proto__:null,exhibit:()=>Sd({}),events:(e,t)=>{const o=(n=e,r=t,i=Nv,_d((e=>{i(e,n,r)})));var n,r,i;const s=Cd(e,t,Iv);return ld(W([e.toggleOnExecute?[o]:[],[s]]))}});const Fv=(e,t,o)=>{$o(e.element,"aria-expanded",o)};var Hv=[hs("selected",!1),rs("toggleClass"),hs("toggleOnExecute",!0),Na("onToggled"),ms("aria",{mode:"none"},Zi("mode",{pressed:[hs("syncWithExpanded",!1),Fa("update",((e,t,o)=>{$o(e.element,"aria-pressed",o),t.syncWithExpanded&&Fv(e,t,o)}))],checked:[Fa("update",((e,t,o)=>{$o(e.element,"aria-checked",o)}))],expanded:[Fa("update",Fv)],selected:[Fa("update",((e,t,o)=>{$o(e.element,"aria-selected",o)}))],none:[Fa("update",b)]}))];const jv=Md({fields:Hv,name:"toggling",active:zv,apis:Bv,state:(Vv=!1,{init:()=>{const e=xe(Vv);return{get:()=>e.get(),set:t=>e.set(t),clear:()=>e.set(Vv),readState:()=>e.get()}}})});var Vv;const Uv=Be("tooltip.exclusive"),Zv=Be("tooltip.show"),$v=Be("tooltip.hide"),Wv=Be("tooltip.immediateHide"),qv=Be("tooltip.immediateShow"),Gv=(e,t,o)=>{e.getSystem().broadcastOn([Uv],{})};var Yv=Object.freeze({__proto__:null,hideAllExclusive:Gv,immediateOpenClose:(e,t,o,n)=>od(e,n?qv:Wv),isEnabled:(e,t,o)=>o.isEnabled(),setComponents:(e,t,o,n)=>{o.getTooltip().each((e=>{e.getSystem().isConnected()&&Cm.set(e,n)}))},setEnabled:(e,t,o,n)=>o.setEnabled(n)});var Kv=Object.freeze({__proto__:null,events:(e,t)=>{const o=o=>{t.getTooltip().each((n=>{n.getSystem().isConnected()&&(sm(n),e.onHide(o,n),t.clearTooltip())})),t.clearTimer()},n=o=>{if(!t.isShowing()&&t.isEnabled()){Gv(o);const n=e.lazySink(o).getOrDie(),r=o.getSystem().build({dom:e.tooltipDom,components:e.tooltipComponents,events:ld("normal"===e.mode?[ud(Rs(),(e=>{od(o,Zv)})),ud(Ds(),(e=>{od(o,$v)}))]:[]),behaviours:Od([Cm.config({})])});t.setTooltip(r),nm(n,r),e.onShow(o,r),$b.position(n,r,{anchor:e.anchor(o)})}},r=o=>{t.getTooltip().each((t=>{const n=e.lazySink(o).getOrDie();$b.position(n,t,{anchor:e.anchor(o)})}))};return ld(W([[wd((t=>{e.onSetup(t)})),ud(Zv,(o=>{t.resetTimer((()=>{n(o)}),e.delayForShow())})),ud($v,(n=>{t.resetTimer((()=>{o(n)}),e.delayForHide())})),ud(qv,(e=>{t.resetTimer((()=>{n(e)}),0)})),ud(Wv,(e=>{t.resetTimer((()=>{o(e)}),0)})),ud(Xs(),((e,t)=>{const n=t;n.universal||R(n.channels,Uv)&&o(e)})),xd((e=>{o(e)}))],(()=>{switch(e.mode){case"normal":return[ud(Ns(),(e=>{od(e,qv)})),ud(Ys(),(e=>{od(e,Wv)})),ud(Rs(),(e=>{od(e,Zv)})),ud(Ds(),(e=>{od(e,$v)}))];case"follow-highlight":return[ud(va(),((e,t)=>{od(e,Zv)})),ud(ya(),(e=>{od(e,$v)}))];case"children-normal":return[ud(Ns(),((o,n)=>{zo(o.element).each((i=>{gt(n.event.target,"[data-mce-tooltip]")&&t.getTooltip().fold((()=>{od(o,qv)}),(n=>{t.isShowing()&&(e.onShow(o,n),r(o))}))}))})),ud(Ys(),(e=>{zo(e.element).fold((()=>{od(e,Wv)}),b)})),ud(Rs(),(o=>{Yn(o.element,"[data-mce-tooltip]:hover").each((n=>{t.getTooltip().fold((()=>{od(o,Zv)}),(n=>{t.isShowing()&&(e.onShow(o,n),r(o))}))}))})),ud(Ds(),(e=>{Yn(e.element,"[data-mce-tooltip]:hover").fold((()=>{od(e,$v)}),b)}))];default:return[ud(Ns(),((o,n)=>{zo(o.element).each((i=>{gt(n.event.target,"[data-mce-tooltip]")&&t.getTooltip().fold((()=>{od(o,qv)}),(n=>{t.isShowing()&&(e.onShow(o,n),r(o))}))}))})),ud(Ys(),(e=>{zo(e.element).fold((()=>{od(e,Wv)}),b)}))]}})()]))}}),Xv=[Yi("lazySink"),Yi("tooltipDom"),hs("exclusive",!0),hs("tooltipComponents",[]),vs("delayForShow",x(300)),vs("delayForHide",x(100)),vs("onSetup",b),fs("mode","normal",["normal","follow-highlight","children-keyboard-focus","children-normal"]),hs("anchor",(e=>({type:"hotspot",hotspot:e,layouts:{onLtr:x([mc,hc,lc,dc,cc,uc]),onRtl:x([mc,hc,lc,dc,cc,uc])},bubble:Vl(0,-2,{})}))),Na("onHide"),Na("onShow")];var Jv=Object.freeze({__proto__:null,init:()=>{const e=xe(!0),t=Ye(),o=Ye(),n=()=>{t.on(clearTimeout)},r=x("not-implemented");return Jc({getTooltip:o.get,isShowing:o.isSet,setTooltip:o.set,clearTooltip:o.clear,clearTimer:n,resetTimer:(e,o)=>{n(),t.set(setTimeout(e,o))},readState:r,isEnabled:()=>e.get(),setEnabled:t=>e.set(t)})}});const Qv=Md({fields:Xv,name:"tooltipping",active:Kv,state:Jv,apis:Yv});const ey=Md({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:()=>ld([cd($s(),O)]),exhibit:()=>Sd({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})})}),ty=e=>{const t=at.fromHtml(e),o=po(t),n=(e=>{const t=void 0!==e.dom.attributes?e.dom.attributes:[];return U(t,((e,t)=>"class"===t.name?e:{...e,[t.name]:t.value}),{})})(t),r=(e=>Array.prototype.slice.call(e.dom.classList,0))(t),i=0===o.length?{}:{innerHtml:en(t)};return{tag:Jt(t),classes:r,attributes:n,...i}},oy=e=>{const t=(e=>void 0!==e.uid)(e)&&ve(e,"uid")?e.uid:Lm("memento");return{get:e=>e.getSystem().getByUid(t).getOrDie(),getOpt:e=>e.getSystem().getByUid(t).toOptional(),asSpec:()=>({...e,uid:t})}},ny=Hl,ry=Sl,iy=x("dismiss.popups"),sy=x("reposition.popups"),ay=x("mouse.released"),ly=(e,t)=>{const o={stopBackspace:!0,...t},n=Wa(o),r=z(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(t=>Mo(e,t,(e=>{n.fireIfReady(e,t).each((t=>{t&&e.kill()}));o.triggerEvent(t,e)&&e.kill()})))),i=Ye(),s=Mo(e,"paste",(e=>{n.fireIfReady(e,"paste").each((t=>{t&&e.kill()}));o.triggerEvent("paste",e)&&e.kill(),i.set(setTimeout((()=>{o.triggerEvent(Ks(),e)}),0))})),a=Mo(e,"keydown",(e=>{o.triggerEvent("keydown",e)?e.kill():o.stopBackspace&&(e=>e.raw.which===Hd[0]&&!R(["input","textarea"],Jt(e.target))&&!fr(e.target,'[contenteditable="true"]'))(e)&&e.prevent()})),l=Mo(e,"focusin",(e=>{o.triggerEvent("focusin",e)&&e.kill()})),c=Ye(),d=Mo(e,"focusout",(e=>{o.triggerEvent("focusout",e)&&e.kill(),c.set(setTimeout((()=>{o.triggerEvent(Ys(),e)}),0))}));return{unbind:()=>{F(r,(e=>{e.unbind()})),a.unbind(),l.unbind(),d.unbind(),s.unbind(),i.on(clearTimeout),c.on(clearTimeout)}}},cy=(e,t)=>{const o=fe(e,"target").getOr(t);return xe(o)},dy=ye([{stopped:[]},{resume:["element"]},{complete:[]}]),uy=(e,t,o,n,r,i)=>{const s=e(t,n),a=((e,t)=>{const o=xe(!1),n=xe(!1);return{stop:()=>{o.set(!0)},cut:()=>{n.set(!0)},isStopped:o.get,isCut:n.get,event:e,setSource:t.set,getSource:t.get}})(o,r);return s.fold((()=>(i.logEventNoHandlers(t,n),dy.complete())),(e=>{const o=e.descHandler;return zm(o)(a),a.isStopped()?(i.logEventStopped(t,e.element,o.purpose),dy.stopped()):a.isCut()?(i.logEventCut(t,e.element,o.purpose),dy.complete()):uo(e.element).fold((()=>(i.logNoParent(t,e.element,o.purpose),dy.complete())),(n=>(i.logEventResponse(t,e.element,o.purpose),dy.resume(n))))}))},hy=(e,t,o,n,r,i)=>uy(e,t,o,n,r,i).fold(O,(n=>hy(e,t,o,n,r,i)),T),my=(e,t,o)=>{const n=(e=>{const t=xe(!1);return{stop:()=>{t.set(!0)},cut:b,isStopped:t.get,isCut:T,event:e,setSource:k("Cannot set source of a broadcasted event"),getSource:k("Cannot get source of a broadcasted event")}})(t);return F(e,(e=>{const t=e.descHandler;zm(t)(n)})),n.isStopped()},py=(e,t,o,n,r)=>{const i=cy(o,n);return hy(e,t,o,n,i,r)},gy=()=>{const e={};return{registerId:(t,o,n)=>{ae(n,((n,r)=>{const i=void 0!==e[r]?e[r]:{};i[o]=((e,t)=>{return o=S.apply(void 0,[e.handler].concat(t)),n=e.purpose,{cHandler:o,purpose:n};var o,n})(n,t),e[r]=i}))},unregisterId:t=>{ae(e,((e,o)=>{be(e,t)&&delete e[t]}))},filterByType:t=>fe(e,t).map((e=>me(e,((e,t)=>((e,t)=>({id:e,descHandler:t}))(t,e))))).getOr([]),find:(t,o,n)=>fe(e,o).bind((e=>yr(n,(t=>((e,t)=>Dm(t).bind((t=>fe(e,t))).map((e=>((e,t)=>({element:e,descHandler:t}))(t,e))))(e,t)),t)))}},fy=()=>{const e=gy(),t={},o=e=>{const t=e.element;return Dm(t).getOrThunk((()=>((e,t)=>{const o=Be(Am+e);return Pm(t,o),o})("uid-",e.element)))},n=o=>{Dm(o.element).each((o=>{delete t[o],e.unregisterId(o)}))};return{find:(t,o,n)=>e.find(t,o,n),filter:t=>e.filterByType(t),register:r=>{const i=o(r);ve(t,i)&&((e,o)=>{const r=t[o];if(r!==e)throw new Error('The tagId "'+o+'" is already used by: '+xa(r.element)+"\nCannot use it for: "+xa(e.element)+"\nThe conflicting element is"+(sn(r.element)?" ":" not ")+"already in the DOM");n(e)})(r,i);const s=[r];e.registerId(s,i,r.events),t[i]=r},unregister:n,getById:e=>fe(t,e)}},by=e=>{const t=t=>uo(e.element).fold(O,(e=>vt(t,e))),o=fy(),n=(e,n)=>o.find(t,e,n),r=ly(e.element,{triggerEvent:(e,t)=>Ea(e,t.target,(o=>((e,t,o,n)=>py(e,t,o,o.target,n))(n,e,t,o)))}),i={debugInfo:x("real"),triggerEvent:(e,t,o)=>{Ea(e,t,(r=>py(n,e,o,t,r)))},triggerFocus:(e,t)=>{Dm(e).fold((()=>{Ro(e)}),(o=>{Ea(Gs(),e,(o=>(((e,t,o,n,r)=>{const i=cy(o,n);uy(e,t,o,n,i,r)})(n,Gs(),{originator:t,kill:b,prevent:b,target:e},e,o),!1)))}))},triggerEscape:(e,t)=>{i.triggerEvent("keydown",e.element,t.event)},getByUid:e=>p(e),getByDom:e=>g(e),build:sp,buildOrPatch:ip,addToGui:e=>{l(e)},removeFromGui:e=>{c(e)},addToWorld:e=>{s(e)},removeFromWorld:e=>{a(e)},broadcast:e=>{u(e)},broadcastOn:(e,t)=>{h(e,t)},broadcastEvent:(e,t)=>{m(e,t)},isConnected:O},s=e=>{e.connect(i),oo(e.element)||(o.register(e),F(e.components(),s),i.triggerEvent(ra(),e.element,{target:e.element}))},a=e=>{oo(e.element)||(F(e.components(),a),o.unregister(e)),e.disconnect()},l=t=>{nm(e,t)},c=e=>{sm(e)},d=e=>{const t=o.filter(Xs());F(t,(t=>{const o=t.descHandler;zm(o)(e)}))},u=e=>{d({universal:!0,data:e})},h=(e,t)=>{d({universal:!1,channels:e,data:t})},m=(e,t)=>{const n=o.filter(e);return my(n,t)},p=e=>o.getById(e).fold((()=>Ae.error(new Error('Could not find component with uid: "'+e+'" in system.'))),Ae.value),g=e=>{const t=Dm(e).getOr("not found");return p(t)};return s(e),{root:e,element:e.element,destroy:()=>{r.unbind(),Jo(e.element)},add:l,remove:c,getByUid:p,getByDom:g,addToWorld:s,removeFromWorld:a,broadcast:u,broadcastOn:h,broadcastEvent:m}},vy=()=>{const e=(e,t)=>{t.stop(),rd(e)};return[ud(js(),e),ud(ea(),e),fd(Es()),fd(Ms())]},yy=e=>ld(W([e.map((e=>_d(((t,o)=>{e(t),o.stop()})))).toArray(),vy()])),xy=Hg({name:"Button",factory:e=>{const t=yy(e.action),o=e.dom.tag,n=t=>fe(e.dom,"attributes").bind((e=>fe(e,t)));return{uid:e.uid,dom:e.dom,components:e.components,events:t,behaviours:Rg(e.buttonBehaviours,[Fd.config({}),$h.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:(()=>{if("button"===o){return{type:n("type").getOr("button"),...n("role").map((e=>({role:e}))).getOr({})}}return{role:e.role.getOr(n("role").getOr("button"))}})()},eventOrder:e.eventOrder}},configFields:[hs("uid",void 0),Yi("dom"),hs("components",[]),Lg("buttonBehaviours",[Fd,$h]),rs("action"),rs("role"),hs("eventOrder",{})]}),wy=x([hs("shell",!1),Yi("makeItem"),hs("setupItem",b),Lg("listBehaviours",[Cm])]),_y=xl({name:"items",overrides:()=>({behaviours:Od([Cm.config({})])})}),Sy=x([_y]),Cy=jg({name:x("CustomList")(),configFields:wy(),partFields:Sy(),factory:(e,t,o,n)=>{const r=e.shell?{behaviours:[Cm.config({})],components:[]}:{behaviours:[],components:t},i=t=>e.shell?A.some(t):Dl(t,e,"items");return{uid:e.uid,dom:e.dom,components:r.components,behaviours:Dg(e.listBehaviours,r.behaviours),apis:{setItems:(t,o)=>{i(t).fold((()=>{throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(n=>{const r=Cm.contents(n),i=o.length,s=i-r.length,a=s>0?I(s,(()=>e.makeItem())):[],l=r.slice(i);F(l,(e=>Cm.remove(n,e))),F(a,(e=>Cm.append(n,e)));const c=Cm.contents(n);F(c,((n,r)=>{e.setupItem(t,n,o[r],r)}))}))}}}},apis:{setItems:(e,t,o)=>{e.setItems(t,o)}}}),ky="aria-controls",Ey=()=>{const e=Be(ky);return{id:e,link:t=>{$o(t,ky,e)},unlink:e=>{Ko(e,ky)}}},Ty=(e,t)=>(e=>Zn(e,(e=>{if(!to(e))return!1;const t=qo(e,"id");return void 0!==t&&t.indexOf(ky)>-1})).bind((e=>{const t=qo(e,"id"),o=wo(e);return Yn(o,`[${ky}="${t}"]`)})))(t).exists((t=>Oy(e,t))),Oy=(e,t)=>gr(t,(t=>vt(t,e.element)),T)||Ty(e,t),Ay="alloy.item-hover",My="alloy.item-focus",Py="alloy.item-toggled",Dy=e=>{(zo(e.element).isNone()||Fd.isFocused(e))&&(Fd.isFocused(e)||Fd.focus(e),nd(e,Ay,{item:e}))},Ly=e=>{nd(e,My,{item:e})},Ry=x(Ay),Ny=x(My),Iy=x(Py),By=e=>e.role.fold((()=>e.toggling.map((e=>e.exclusive?"menuitemradio":"menuitemcheckbox")).getOr("menuitem")),w),zy=(e,t)=>({aria:{mode:t?"selected":"checked"},...he(e,((e,t)=>"exclusive"!==t)),onToggled:(t,o)=>{p(e.onToggled)&&e.onToggled(t,o),((e,t)=>{nd(e,Py,{item:e,state:t})})(t,o)}});var Fy=[Yi("data"),Yi("components"),Yi("dom"),hs("hasSubmenu",!1),rs("toggling"),rs("role"),Lg("itemBehaviours",[jv,Fd,$h,Rf]),hs("ignoreFocus",!1),hs("domModification",{}),Fa("builder",(e=>({dom:e.dom,domModification:{...e.domModification,attributes:{role:By(e),...e.domModification.attributes,"aria-haspopup":e.hasSubmenu,...e.hasSubmenu?{"aria-expanded":!1}:{}}},behaviours:Rg(e.itemBehaviours,[e.toggling.fold(jv.revoke,(t=>jv.config(zy(t,e.role.exists((e=>"option"===e)))))),Fd.config({ignore:e.ignoreFocus,stopMousedown:e.ignoreFocus,onFocus:e=>{Ly(e)}}),$h.config({mode:"execution"}),Rf.config({store:{mode:"memory",initialValue:e.data}}),Rd("item-type-events",[...vy(),ud(Rs(),Dy),ud(Qs(),Fd.focus)])]),components:e.components,eventOrder:e.eventOrder}))),hs("eventOrder",{})];var Hy=[Yi("dom"),Yi("components"),Fa("builder",(e=>({dom:e.dom,components:e.components,events:ld([bd(Qs())])})))];const jy=x("item-widget"),Vy=x([vl({name:"widget",overrides:e=>({behaviours:Od([Rf.config({store:{mode:"manual",getValue:t=>e.data,setValue:b}})])})})]),Uy=[Yi("uid"),Yi("data"),Yi("components"),Yi("dom"),hs("autofocus",!1),hs("ignoreFocus",!1),Lg("widgetBehaviours",[Rf,Fd,$h]),hs("domModification",{}),Fl(Vy()),Fa("builder",(e=>{const t=Ml(jy(),e,Vy()),o=Pl(jy(),e,t.internals()),n=t=>Dl(t,e,"widget").map((e=>($h.focusIn(e),e))),r=(t,o)=>Su(o.event.target)?A.none():e.autofocus?(o.setSource(t.element),A.none()):A.none();return{dom:e.dom,components:o,domModification:e.domModification,events:ld([_d(((e,t)=>{n(e).each((e=>{t.stop()}))})),ud(Rs(),Dy),ud(Qs(),((t,o)=>{e.autofocus?n(t):Fd.focus(t)}))]),behaviours:Rg(e.widgetBehaviours,[Rf.config({store:{mode:"memory",initialValue:e.data}}),Fd.config({ignore:e.ignoreFocus,onFocus:e=>{Ly(e)}}),$h.config({mode:"special",focusIn:e.autofocus?e=>{n(e)}:Ld(),onLeft:r,onRight:r,onEscape:(t,o)=>Fd.isFocused(t)||e.autofocus?e.autofocus?(o.setSource(t.element),A.none()):A.none():(Fd.focus(t),A.some(!0))})])}}))];const Zy=Zi("type",{widget:Uy,item:Fy,separator:Hy}),$y=x([wl({factory:{sketch:e=>{const t=Vi("menu.spec item",Zy,e);return t.builder(t)}},name:"items",unit:"item",defaults:(e,t)=>be(t,"uid")?t:{...t,uid:Lm("item")},overrides:(e,t)=>({type:t.type,ignoreFocus:e.fakeFocus,domModification:{classes:[e.markers.item]}})})]),Wy=x([as("role"),Yi("value"),Yi("items"),Yi("dom"),Yi("components"),hs("eventOrder",{}),Mg("menuBehaviours",[gu,Rf,mp,$h]),ms("movement",{mode:"menu",moveOnTab:!0},Zi("mode",{grid:[ja(),Fa("config",((e,t)=>({mode:"flatgrid",selector:"."+e.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:e.focusManager})))],matrix:[Fa("config",((e,t)=>({mode:"matrix",selectors:{row:t.rowSelector,cell:"."+e.markers.item},previousSelector:t.previousSelector,focusManager:e.focusManager}))),Yi("rowSelector"),hs("previousSelector",A.none)],menu:[hs("moveOnTab",!0),Fa("config",((e,t)=>({mode:"menu",selector:"."+e.markers.item,moveOnTab:t.moveOnTab,focusManager:e.focusManager})))]})),Ki("markers",Ma()),hs("fakeFocus",!1),hs("focusManager",bu()),Na("onHighlight"),Na("onDehighlight"),hs("showMenuRole",!0)]),qy=x("alloy.menu-focus"),Gy=jg({name:"Menu",configFields:Wy(),partFields:$y(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,markers:e.markers,behaviours:Dg(e.menuBehaviours,[gu.config({highlightClass:e.markers.selectedItem,itemClass:e.markers.item,onHighlight:e.onHighlight,onDehighlight:e.onDehighlight}),Rf.config({store:{mode:"memory",initialValue:e.value}}),mp.config({find:A.some}),$h.config(e.movement.config(e,e.movement))]),events:ld([ud(Ny(),((e,t)=>{const o=t.event;e.getSystem().getByDom(o.target).each((o=>{gu.highlight(e,o),t.stop(),nd(e,qy(),{menu:e,item:o})}))})),ud(Ry(),((e,t)=>{const o=t.event.item;gu.highlight(e,o)})),ud(Iy(),((e,t)=>{const{item:o,state:n}=t.event;n&&"menuitemradio"===qo(o.element,"role")&&((e,t)=>{const o=pr(e.element,'[role="menuitemradio"][aria-checked="true"]');F(o,(o=>{vt(o,t.element)||e.getSystem().getByDom(o).each((e=>{jv.off(e)}))}))})(e,o)}))]),components:t,eventOrder:e.eventOrder,...e.showMenuRole?{domModification:{attributes:{role:e.role.getOr("menu")}}}:{}})}),Yy=(e,t,o,n)=>fe(o,n).bind((n=>fe(e,n).bind((n=>{const r=Yy(e,t,o,n);return A.some([n].concat(r))})))).getOr([]),Ky=(e,t)=>{const o={};ae(e,((e,t)=>{F(e,(e=>{o[e]=t}))}));const n=t,r=ce(t,((e,t)=>({k:e,v:t})));const i=le(r,((e,t)=>[t].concat(Yy(o,n,r,t))));return le(o,(e=>fe(i,e).getOr([e])))},Xy=e=>"prepared"===e.type?A.some(e.menu):A.none(),Jy={init:()=>{const e=xe({}),t=xe({}),o=xe({}),n=Ye(),r=xe({}),i=(t,o,n)=>s(t).bind((r=>(t=>pe(e.get(),((e,o)=>e===t)))(t).bind((e=>o(e).map((e=>({triggeredMenu:r,triggeringItem:e,triggeringPath:n}))))))),s=e=>a(e).bind(Xy),a=e=>fe(t.get(),e),l=t=>fe(e.get(),t);return{setMenuBuilt:(e,o)=>{t.set({...t.get(),[e]:{type:"prepared",menu:o}})},setContents:(i,s,a,l)=>{n.set(i),e.set(a),t.set(s),r.set(l);const c=Ky(l,a);o.set(c)},expand:t=>fe(e.get(),t).map((e=>{const n=fe(o.get(),t).getOr([]);return[e].concat(n)})),refresh:e=>fe(o.get(),e),collapse:e=>fe(o.get(),e).bind((e=>e.length>1?A.some(e.slice(1)):A.none())),lookupMenu:a,lookupItem:l,otherMenus:e=>{const t=r.get();return K(ie(t),e)},getPrimary:()=>n.get().bind(s),getMenus:()=>t.get(),clear:()=>{e.set({}),t.set({}),o.set({}),n.clear()},isClear:()=>n.get().isNone(),getTriggeringPath:(e,t)=>{const r=j(l(e).toArray(),(e=>s(e).isSome()));return fe(o.get(),e).bind((e=>{const o=Y(r.concat(e));return(e=>{const t=[];for(let o=0;o<e.length;o++){const n=e[o];if(!n.isSome())return A.none();t.push(n.getOrDie())}return A.some(t)})(q(o,((e,r)=>i(e,t,o.slice(0,r+1)).fold((()=>je(n.get(),e)?[]:[A.none()]),(e=>[A.some(e)])))))}))}}},extractPreparedMenu:Xy},Qy=Be("tiered-menu-item-highlight"),ex=Be("tiered-menu-item-dehighlight"),tx=x("collapse-item"),ox=Hg({name:"TieredMenu",configFields:[za("onExecute"),za("onEscape"),Ba("onOpenMenu"),Ba("onOpenSubmenu"),Na("onRepositionMenu"),Na("onCollapseMenu"),hs("highlightOnOpen",Kc.HighlightMenuAndItem),ts("data",[Yi("primary"),Yi("menus"),Yi("expansions")]),hs("fakeFocus",!1),Na("onHighlightItem"),Na("onDehighlightItem"),Na("onHover"),Da(),Yi("dom"),hs("navigateOnHover",!0),hs("stayInDom",!1),Mg("tmenuBehaviours",[$h,gu,mp,Cm]),hs("eventOrder",{})],apis:{collapseMenu:(e,t)=>{e.collapseMenu(t)},highlightPrimary:(e,t)=>{e.highlightPrimary(t)},repositionMenus:(e,t)=>{e.repositionMenus(t)}},factory:(e,t)=>{const o=Ye(),n=Jy.init(),r=t=>{const o=((t,o,n)=>le(n,((n,r)=>{const i=()=>Gy.sketch({...n,value:r,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:(e,t)=>{nd(e,Qy,{menuComp:e,itemComp:t})},onDehighlight:(e,t)=>{nd(e,ex,{menuComp:e,itemComp:t})},focusManager:e.fakeFocus?vu():bu()});return r===o?{type:"prepared",menu:t.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}})))(t,e.data.primary,e.data.menus),r=s();return n.setContents(e.data.primary,o,e.data.expansions,r),n.getPrimary()},i=e=>Rf.getValue(e).value,s=t=>le(e.data.menus,((e,t)=>q(e.items,(e=>"separator"===e.type?[]:[e.data.value])))),a=gu.highlight,l=(t,o)=>{a(t,o),gu.getHighlighted(o).orThunk((()=>gu.getFirst(o))).each((n=>{e.fakeFocus?gu.highlight(o,n):id(t,n.element,Qs())}))},c=(e,t)=>Ve(z(t,(t=>e.lookupMenu(t).bind((e=>"prepared"===e.type?A.some(e.menu):A.none()))))),d=(t,o,n)=>{const r=c(o,o.otherMenus(n));F(r,(o=>{cr(o.element,[e.markers.backgroundMenu]),e.stayInDom||Cm.remove(t,o)}))},u=(t,n)=>{const r=(t=>o.get().getOrThunk((()=>{const n={},r=pr(t.element,`.${e.markers.item}`),s=j(r,(e=>"true"===qo(e,"aria-haspopup")));return F(s,(e=>{t.getSystem().getByDom(e).each((e=>{const t=i(e);n[t]=e}))})),o.set(n),n})))(t);ae(r,((e,t)=>{const o=R(n,t);$o(e.element,"aria-expanded",o)}))},h=(t,o,n)=>A.from(n[0]).bind((r=>o.lookupMenu(r).bind((r=>{if("notbuilt"===r.type)return A.none();{const i=r.menu,s=c(o,n.slice(1));return F(s,(t=>{nr(t.element,e.markers.backgroundMenu)})),sn(i.element)||Cm.append(t,ap(i)),cr(i.element,[e.markers.backgroundMenu]),l(t,i),d(t,o,n),A.some(i)}}))));let m;!function(e){e[e.HighlightSubmenu=0]="HighlightSubmenu",e[e.HighlightParent=1]="HighlightParent"}(m||(m={}));const p=(t,o,r=m.HighlightSubmenu)=>{if(o.hasConfigured(Pp)&&Pp.isDisabled(o))return A.some(o);{const s=i(o);return n.expand(s).bind((i=>(u(t,i),A.from(i[0]).bind((s=>n.lookupMenu(s).bind((a=>{const l=((e,t,o)=>{if("notbuilt"===o.type){const r=e.getSystem().build(o.nbMenu());return n.setMenuBuilt(t,r),r}return o.menu})(t,s,a);return sn(l.element)||Cm.append(t,ap(l)),e.onOpenSubmenu(t,o,l,Y(i)),r===m.HighlightSubmenu?(gu.highlightFirst(l),h(t,n,i)):(gu.dehighlightAll(l),A.some(o))})))))))}},g=(t,o)=>{const r=i(o);return n.collapse(r).bind((r=>(u(t,r),h(t,n,r).map((n=>(e.onCollapseMenu(t,o,n),n))))))},f=t=>(o,n)=>Kn(n.getSource(),`.${e.markers.item}`).bind((e=>o.getSystem().getByDom(e).toOptional().bind((e=>t(o,e).map(O))))),v=ld([ud(qy(),((e,t)=>{const o=t.event.item;n.lookupItem(i(o)).each((()=>{const o=t.event.menu;gu.highlight(e,o);const r=i(t.event.item);n.refresh(r).each((t=>d(e,n,t)))}))})),_d(((t,o)=>{const n=o.event.target;t.getSystem().getByDom(n).each((o=>{0===i(o).indexOf("collapse-item")&&g(t,o),p(t,o,m.HighlightSubmenu).fold((()=>{e.onExecute(t,o)}),b)}))})),yd(((t,o)=>{r(t).each((o=>{Cm.append(t,ap(o)),e.onOpenMenu(t,o),e.highlightOnOpen===Kc.HighlightMenuAndItem?l(t,o):e.highlightOnOpen===Kc.HighlightJustMenu&&a(t,o)}))})),ud(Qy,((t,o)=>{e.onHighlightItem(t,o.event.menuComp,o.event.itemComp)})),ud(ex,((t,o)=>{e.onDehighlightItem(t,o.event.menuComp,o.event.itemComp)})),...e.navigateOnHover?[ud(Ry(),((t,o)=>{const r=o.event.item;((e,t)=>{const o=i(t);n.refresh(o).bind((t=>(u(e,t),h(e,n,t))))})(t,r),p(t,r,m.HighlightParent),e.onHover(t,r)}))]:[]]),y=e=>gu.getHighlighted(e).bind(gu.getHighlighted),x={collapseMenu:e=>{y(e).each((t=>{g(e,t)}))},highlightPrimary:e=>{n.getPrimary().each((t=>{l(e,t)}))},repositionMenus:t=>{const o=n.getPrimary().bind((e=>y(t).bind((e=>{const t=i(e),o=ge(n.getMenus()),r=Ve(z(o,Jy.extractPreparedMenu));return n.getTriggeringPath(t,(e=>((e,t,o)=>re(t,(e=>{if(!e.getSystem().isConnected())return A.none();const t=gu.getCandidates(e);return Z(t,(e=>i(e)===o))})))(0,r,e)))})).map((t=>({primary:e,triggeringPath:t})))));o.fold((()=>{(e=>A.from(e.components()[0]).filter((e=>"menu"===qo(e.element,"role"))))(t).each((o=>{e.onRepositionMenu(t,o,[])}))}),(({primary:o,triggeringPath:n})=>{e.onRepositionMenu(t,o,n)}))}};return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:Dg(e.tmenuBehaviours,[$h.config({mode:"special",onRight:f(((e,t)=>Su(t.element)?A.none():p(e,t,m.HighlightSubmenu))),onLeft:f(((e,t)=>Su(t.element)?A.none():g(e,t))),onEscape:f(((t,o)=>g(t,o).orThunk((()=>e.onEscape(t,o).map((()=>t)))))),focusIn:(e,t)=>{n.getPrimary().each((t=>{id(e,t.element,Qs())}))}}),gu.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),mp.config({find:e=>gu.getHighlighted(e)}),Cm.config({})]),eventOrder:e.eventOrder,apis:x,events:v}},extraApis:{tieredData:(e,t,o)=>({primary:e,menus:t,expansions:o}),singleData:(e,t)=>({primary:e,menus:_s(e,t),expansions:{}}),collapseItem:e=>({value:Be(tx()),meta:{text:e}})}}),nx=x("sink"),rx=x(xl({name:nx(),overrides:x({dom:{tag:"div"},behaviours:Od([$b.config({useFixed:O})]),events:ld([fd(Bs()),fd(Ms()),fd(js())])})})),ix=Mi([hs("isExtraPart",T),us("fireEventInstead",[hs("event",ua())])]),sx=e=>{const t=Vi("Dismissal",ix,e);return{[iy()]:{schema:Mi([Yi("target")]),onReceive:(e,o)=>{if(cv.isOpen(e)){cv.isPartOf(e,o.target)||t.isExtraPart(e,o.target)||t.fireEventInstead.fold((()=>cv.close(e)),(t=>od(e,t.event)))}}}}},ax=Mi([us("fireEventInstead",[hs("event",ha())]),es("doReposition")]),lx=e=>{const t=Vi("Reposition",ax,e);return{[sy()]:{onReceive:e=>{cv.isOpen(e)&&t.fireEventInstead.fold((()=>t.doReposition(e)),(t=>od(e,t.event)))}}}},cx=(e,t)=>{const o=e.getHotspot(t).getOr(t),n="hotspot",r=e.getAnchorOverrides();return e.layouts.fold((()=>({type:n,hotspot:o,overrides:r})),(e=>({type:n,hotspot:o,overrides:r,layouts:e})))},dx=(e,t,o,n,r,i,s)=>{const a=((e,t,o,n,r,i,s)=>{const a=((e,t,o)=>(0,e.fetch)(o).map(t))(e,t,n),l=px(n,e);return a.map((t=>t.bind((t=>{const a=t.menus[t.primary];return A.from(a).each((t=>{e.listRole.each((e=>{t.role=e}))})),A.from(ox.sketch({...i.menu(),uid:Lm(""),data:t,highlightOnOpen:s,onOpenMenu:(e,t)=>{const n=l().getOrDie();$b.position(n,t,{anchor:o}),cv.decloak(r)},onOpenSubmenu:(e,t,o)=>{const n=l().getOrDie();$b.position(n,o,{anchor:{type:"submenu",item:t}}),cv.decloak(r)},onRepositionMenu:(e,t,n)=>{const r=l().getOrDie();$b.position(r,t,{anchor:o}),F(n,(e=>{$b.position(r,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem}})}))},onEscape:()=>(Fd.focus(n),cv.close(r),A.some(!0))}))}))))})(e,t,cx(e,o),o,n,r,s);return a.map((e=>(e.fold((()=>{cv.isOpen(n)&&cv.close(n)}),(e=>{cv.cloak(n),cv.open(n,e),i(n)})),n)))},ux=(e,t,o,n,r,i,s)=>(cv.close(n),Ee(n)),hx=(e,t,o,n,r,i)=>{const s=bp.getCoupled(o,"sandbox");return(cv.isOpen(s)?ux:dx)(e,t,o,s,n,r,i)},mx=(e,t,o)=>{const n=mp.getCurrent(t).getOr(t),r=On(e.element);o?un(n.element,"min-width",r+"px"):((e,t)=>{En.set(e,t)})(n.element,r)},px=(e,t)=>e.getSystem().getByUid(t.uid+"-"+nx()).map((e=>()=>Ae.value(e))).getOrThunk((()=>t.lazySink.fold((()=>()=>Ae.error(new Error("No internal sink is specified, nor could an external sink be found"))),(t=>()=>t(e))))),gx=e=>{cv.getState(e).each((e=>{ox.repositionMenus(e)}))},fx=(e,t,o)=>{const n=Ey(),r=px(t,e);return{dom:{tag:"div",classes:e.sandboxClasses,attributes:{id:n.id}},behaviours:Rg(e.sandboxBehaviours,[Rf.config({store:{mode:"memory",initialValue:t}}),cv.config({onOpen:(r,i)=>{const s=cx(e,t);n.link(t.element),e.matchWidth&&mx(s.hotspot,i,e.useMinWidth),e.onOpen(s,r,i),void 0!==o&&void 0!==o.onOpen&&o.onOpen(r,i)},onClose:(e,i)=>{n.unlink(t.element),r().getOr(i).element.dom.dispatchEvent(new window.FocusEvent("focusout")),void 0!==o&&void 0!==o.onClose&&o.onClose(e,i)},isPartOf:(e,o,n)=>Oy(o,n)||Oy(t,n),getAttachPoint:()=>r().getOrDie()}),mp.config({find:e=>cv.getState(e).bind((e=>mp.getCurrent(e)))}),Gb.config({channels:{...sx({isExtraPart:T}),...lx({doReposition:gx})}})])}},bx=e=>{const t=bp.getCoupled(e,"sandbox");gx(t)},vx=()=>[hs("sandboxClasses",[]),Lg("sandboxBehaviours",[mp,Gb,cv,Rf])],yx=x([Yi("dom"),Yi("fetch"),Na("onOpen"),Ia("onExecute"),hs("getHotspot",A.some),hs("getAnchorOverrides",x({})),ib(),Mg("dropdownBehaviours",[jv,bp,$h,Fd]),Yi("toggleClass"),hs("eventOrder",{}),rs("lazySink"),hs("matchWidth",!1),hs("useMinWidth",!1),rs("role"),rs("listRole")].concat(vx())),xx=x([yl({schema:[Da(),hs("fakeFocus",!1)],name:"menu",defaults:e=>({onExecute:e.onExecute})}),rx()]),wx=jg({name:"Dropdown",configFields:yx(),partFields:xx(),factory:(e,t,o,n)=>{const r=e=>{cv.getState(e).each((e=>{ox.highlightPrimary(e)}))},i=(t,o,r)=>hx(e,w,t,n,o,r),s={expand:e=>{jv.isOn(e)||i(e,b,Kc.HighlightNone).get(b)},open:e=>{jv.isOn(e)||i(e,b,Kc.HighlightMenuAndItem).get(b)},refetch:t=>bp.getExistingCoupled(t,"sandbox").fold((()=>i(t,b,Kc.HighlightMenuAndItem).map(b)),(o=>dx(e,w,t,o,n,b,Kc.HighlightMenuAndItem).map(b))),isOpen:jv.isOn,close:e=>{jv.isOn(e)&&i(e,b,Kc.HighlightMenuAndItem).get(b)},repositionMenus:e=>{jv.isOn(e)&&bx(e)}},a=(e,t)=>(rd(e),A.some(!0));return{uid:e.uid,dom:e.dom,components:t,behaviours:Dg(e.dropdownBehaviours,[jv.config({toggleClass:e.toggleClass,aria:{mode:"expanded"}}),bp.config({others:{sandbox:t=>fx(e,t,{onOpen:()=>jv.on(t),onClose:()=>jv.off(t)})}}),$h.config({mode:"special",onSpace:a,onEnter:a,onDown:(e,t)=>{if(wx.isOpen(e)){const t=bp.getCoupled(e,"sandbox");r(t)}else wx.open(e);return A.some(!0)},onEscape:(e,t)=>wx.isOpen(e)?(wx.close(e),A.some(!0)):A.none()}),Fd.config({})]),events:yy(A.some((e=>{i(e,r,Kc.HighlightMenuAndItem).get(b)}))),eventOrder:{...e.eventOrder,[Js()]:["disabling","toggling","alloy.base.behaviour"]},apis:s,domModification:{attributes:{"aria-haspopup":e.listRole.getOr("true"),...e.role.fold((()=>({})),(e=>({role:e}))),..."button"===e.dom.tag?{type:(l="type",fe(e.dom,"attributes").bind((e=>fe(e,l)))).getOr("button")}:{}}}};var l},apis:{open:(e,t)=>e.open(t),refetch:(e,t)=>e.refetch(t),expand:(e,t)=>e.expand(t),close:(e,t)=>e.close(t),isOpen:(e,t)=>e.isOpen(t),repositionMenus:(e,t)=>e.repositionMenus(t)}}),_x="form",Sx=[Mg("formBehaviours",[Rf])],Cx=e=>"<alloy.field."+e+">",kx=(e,t)=>({uid:e.uid,dom:e.dom,components:t,behaviours:Dg(e.formBehaviours,[Rf.config({store:{mode:"manual",getValue:t=>{const o=Nl(t,e);return le(o,((e,t)=>e().bind((e=>((e,t)=>e.fold((()=>Ae.error(t)),Ae.value))(mp.getCurrent(e),new Error(`Cannot find a current component to extract the value from for form part '${t}': `+xa(e.element))))).map(Rf.getValue)))},setValue:(t,o)=>{ae(o,((o,n)=>{Dl(t,e,n).each((e=>{mp.getCurrent(e).each((e=>{Rf.setValue(e,o)}))}))}))}}})]),apis:{getField:(t,o)=>Dl(t,e,o).bind(mp.getCurrent)}}),Ex={getField:Yh(((e,t,o)=>e.getField(t,o))),sketch:e=>{const t=(()=>{const e=[];return{field:(t,o)=>(e.push(t),Tl(_x,Cx(t),o)),record:x(e)}})(),o=e(t),n=t.record(),r=z(n,(e=>vl({name:e,pname:Cx(e)})));return Ig(_x,Sx,r,kx,o)}},Tx=x([Yi("dom"),hs("shell",!0),Mg("toolbarBehaviours",[Cm])]),Ox=x([xl({name:"groups",overrides:()=>({behaviours:Od([Cm.config({})])})})]),Ax=jg({name:"Toolbar",configFields:Tx(),partFields:Ox(),factory:(e,t,o,n)=>{const r=t=>e.shell?A.some(t):Dl(t,e,"groups"),i=e.shell?{behaviours:[Cm.config({})],components:[]}:{behaviours:[],components:t};return{uid:e.uid,dom:e.dom,components:i.components,behaviours:Dg(e.toolbarBehaviours,i.behaviours),apis:{setGroups:(e,t)=>{r(e).fold((()=>{throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(e=>{Cm.set(e,t)}))},refresh:b},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)}}}),Mx=x([La(["toggledClass"]),Yi("lazySink"),es("fetch"),cs("getBounds"),us("fireDismissalEventInstead",[hs("event",ua())]),ib(),Na("onToggled")]),Px=x([yl({name:"button",overrides:e=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:Od([jv.config({toggleClass:e.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:e.onToggled})])})}),yl({factory:Ax,schema:Tx(),name:"toolbar",overrides:e=>({toolbarBehaviours:Od([$h.config({mode:"cyclic",onEscape:t=>(Dl(t,e,"button").each(Fd.focus),A.none())})])})})]),Dx=Ye(),Lx=(e,t)=>{const o=bp.getCoupled(e,"toolbarSandbox");cv.isOpen(o)?cv.close(o):cv.open(o,t.toolbar())},Rx=(e,t,o,n)=>{const r=o.getBounds.map((e=>e())),i=o.lazySink(e).getOrDie();$b.positionWithinBounds(i,t,{anchor:{type:"hotspot",hotspot:e,layouts:n,overrides:{maxWidthFunction:Wc()}}},r)},Nx=(e,t,o,n,r)=>{Ax.setGroups(t,r),Rx(e,t,o,n),jv.on(e)},Ix=jg({name:"FloatingToolbarButton",factory:(e,t,o,n)=>({...xy.sketch({...n.button(),action:e=>{Lx(e,n)},buttonBehaviours:Rg({dump:n.button().buttonBehaviours},[bp.config({others:{toolbarSandbox:t=>((e,t,o)=>{const n=Ey();return{dom:{tag:"div",attributes:{id:n.id}},behaviours:Od([$h.config({mode:"special",onEscape:e=>(cv.close(e),A.some(!0))}),cv.config({onOpen:(r,i)=>{const s=Dx.get().getOr(!1);o.fetch().get((r=>{Nx(e,i,o,t.layouts,r),n.link(e.element),s||$h.focusIn(i)}))},onClose:()=>{jv.off(e),Dx.get().getOr(!1)||Fd.focus(e),n.unlink(e.element)},isPartOf:(t,o,n)=>Oy(o,n)||Oy(e,n),getAttachPoint:()=>o.lazySink(e).getOrDie()}),Gb.config({channels:{...sx({isExtraPart:T,...o.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...lx({doReposition:()=>{cv.getState(bp.getCoupled(e,"toolbarSandbox")).each((n=>{Rx(e,n,o,t.layouts)}))}})}})])}})(t,o,e)}})])}),apis:{setGroups:(t,n)=>{cv.getState(bp.getCoupled(t,"toolbarSandbox")).each((r=>{Nx(t,r,e,o.layouts,n)}))},reposition:t=>{cv.getState(bp.getCoupled(t,"toolbarSandbox")).each((n=>{Rx(t,n,e,o.layouts)}))},toggle:e=>{Lx(e,n)},toggleWithoutFocusing:e=>{((e,t)=>{Dx.set(!0),Lx(e,t),Dx.clear()})(e,n)},getToolbar:e=>cv.getState(bp.getCoupled(e,"toolbarSandbox")),isOpen:e=>cv.isOpen(bp.getCoupled(e,"toolbarSandbox"))}}),configFields:Mx(),partFields:Px(),apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},reposition:(e,t)=>{e.reposition(t)},toggle:(e,t)=>{e.toggle(t)},toggleWithoutFocusing:(e,t)=>{e.toggleWithoutFocusing(t)},getToolbar:(e,t)=>e.getToolbar(t),isOpen:(e,t)=>e.isOpen(t)}}),Bx=x([hs("prefix","form-field"),Mg("fieldBehaviours",[mp,Rf])]),zx=x([xl({schema:[Yi("dom")],name:"label"}),xl({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[Yi("text")],name:"aria-descriptor"}),vl({factory:{sketch:e=>{const t=ws(e,["factory"]);return e.factory.sketch(t)}},schema:[Yi("factory")],name:"field"})]),Fx=jg({name:"FormField",configFields:Bx(),partFields:zx(),factory:(e,t,o,n)=>{const r=Dg(e.fieldBehaviours,[mp.config({find:t=>Dl(t,e,"field")}),Rf.config({store:{mode:"manual",getValue:e=>mp.getCurrent(e).bind(Rf.getValue),setValue:(e,t)=>{mp.getCurrent(e).each((e=>{Rf.setValue(e,t)}))}}})]),i=ld([yd(((t,o)=>{const n=Rl(t,e,["label","field","aria-descriptor"]);n.field().each((t=>{const o=Be(e.prefix);n.label().each((e=>{$o(e.element,"for",o),$o(t.element,"id",o)})),n["aria-descriptor"]().each((o=>{const n=Be(e.prefix);$o(o.element,"id",n),$o(t.element,"aria-describedby",n)}))}))}))]),s={getField:t=>Dl(t,e,"field"),getLabel:t=>Dl(t,e,"label")};return{uid:e.uid,dom:e.dom,components:t,behaviours:r,events:i,apis:s}},apis:{getField:(e,t)=>e.getField(t),getLabel:(e,t)=>e.getLabel(t)}}),Hx=x([hs("field1Name","field1"),hs("field2Name","field2"),Ba("onLockedChange"),La(["lockClass"]),hs("locked",!1),Lg("coupledFieldBehaviours",[mp,Rf]),vs("onInput",b)]),jx=(e,t)=>vl({factory:Fx,name:e,overrides:e=>({fieldBehaviours:Od([Rd("coupled-input-behaviour",[ud(Fs(),(o=>{((e,t,o)=>Dl(e,t,o).bind(mp.getCurrent))(o,e,t).each((t=>{Dl(o,e,"lock").each((n=>{jv.isOn(n)&&e.onLockedChange(o,t,n),e.onInput(o)}))}))}))])])})}),Vx=x([jx("field1","field2"),jx("field2","field1"),vl({factory:xy,schema:[Yi("dom")],name:"lock",overrides:e=>({buttonBehaviours:Od([jv.config({selected:e.locked,toggleClass:e.markers.lockClass,aria:{mode:"pressed"}})])})})]),Ux=jg({name:"FormCoupledInputs",configFields:Hx(),partFields:Vx(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:Rg(e.coupledFieldBehaviours,[mp.config({find:A.some}),Rf.config({store:{mode:"manual",getValue:t=>{const o=Bl(t,e,["field1","field2"]);return{[e.field1Name]:Rf.getValue(o.field1()),[e.field2Name]:Rf.getValue(o.field2())}},setValue:(t,o)=>{const n=Bl(t,e,["field1","field2"]);ve(o,e.field1Name)&&Rf.setValue(n.field1(),o[e.field1Name]),ve(o,e.field2Name)&&Rf.setValue(n.field2(),o[e.field2Name])}}})]),apis:{getField1:t=>Dl(t,e,"field1"),getField2:t=>Dl(t,e,"field2"),getLock:t=>Dl(t,e,"lock")}}),apis:{getField1:(e,t)=>e.getField1(t),getField2:(e,t)=>e.getField2(t),getLock:(e,t)=>e.getLock(t)}}),Zx=Hg({name:"HtmlSelect",configFields:[Yi("options"),Mg("selectBehaviours",[Fd,Rf]),hs("selectClasses",[]),hs("selectAttributes",{}),rs("data")],factory:(e,t)=>{const o=z(e.options,(e=>({dom:{tag:"option",value:e.value,innerHtml:e.text}}))),n=e.data.map((e=>_s("initialValue",e))).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:o,behaviours:Dg(e.selectBehaviours,[Fd.config({}),Rf.config({store:{mode:"manual",getValue:e=>ur(e.element),setValue:(t,o)=>{const n=te(e.options);Z(e.options,(e=>e.value===o)).isSome()?hr(t.element,o):-1===t.element.dom.selectedIndex&&""===o&&n.each((e=>hr(t.element,e.value)))},...n}})])}}}),$x=Hg({name:"InlineView",configFields:[Yi("lazySink"),Na("onShow"),Na("onHide"),cs("onEscape"),Mg("inlineBehaviours",[cv,Rf,Gb]),us("fireDismissalEventInstead",[hs("event",ua())]),us("fireRepositionEventInstead",[hs("event",ha())]),hs("getRelated",A.none),hs("isExtraPart",T),hs("eventOrder",A.none)],factory:(e,t)=>{const o=(t,o,n,r)=>{const i=e.lazySink(t).getOrDie();cv.openWhileCloaked(t,o,(()=>$b.positionWithinBounds(i,t,n,r()))),Rf.setValue(t,A.some({mode:"position",config:n,getBounds:r}))},n=(t,o,n,r)=>{const i=((e,t,o,n,r)=>{const i=()=>e.lazySink(t),s="horizontal"===n.type?{layouts:{onLtr:()=>xc(),onRtl:()=>wc()}}:{},a=e=>(e=>2===e.length)(e)?s:{};return ox.sketch({dom:{tag:"div"},data:n.data,markers:n.menu.markers,highlightOnOpen:n.menu.highlightOnOpen,fakeFocus:n.menu.fakeFocus,onEscape:()=>(cv.close(t),e.onEscape.map((e=>e(t))),A.some(!0)),onExecute:()=>A.some(!0),onOpenMenu:(e,t)=>{$b.positionWithinBounds(i().getOrDie(),t,o,r())},onOpenSubmenu:(e,t,o,n)=>{const r=i().getOrDie();$b.position(r,o,{anchor:{type:"submenu",item:t,...a(n)}})},onRepositionMenu:(e,t,n)=>{const s=i().getOrDie();$b.positionWithinBounds(s,t,o,r()),F(n,(e=>{const t=a(e.triggeringPath);$b.position(s,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem,...t}})}))}})})(e,t,o,n,r);cv.open(t,i),Rf.setValue(t,A.some({mode:"menu",menu:i}))},r=t=>{cv.isOpen(t)&&Rf.getValue(t).each((o=>{switch(o.mode){case"menu":cv.getState(t).each(ox.repositionMenus);break;case"position":const n=e.lazySink(t).getOrDie();$b.positionWithinBounds(n,t,o.config,o.getBounds())}}))},i={setContent:(e,t)=>{cv.setContent(e,t)},showAt:(e,t,n)=>{const r=A.none;o(e,t,n,r)},showWithinBounds:o,showMenuAt:(e,t,o)=>{n(e,t,o,A.none)},showMenuWithinBounds:n,hide:e=>{cv.isOpen(e)&&(Rf.setValue(e,A.none()),cv.close(e))},getContent:e=>cv.getState(e),reposition:r,isOpen:cv.isOpen};return{uid:e.uid,dom:e.dom,behaviours:Dg(e.inlineBehaviours,[cv.config({isPartOf:(t,o,n)=>Oy(o,n)||((t,o)=>e.getRelated(t).exists((e=>Oy(e,o))))(t,n),getAttachPoint:t=>e.lazySink(t).getOrDie(),onOpen:t=>{e.onShow(t)},onClose:t=>{e.onHide(t)}}),Rf.config({store:{mode:"memory",initialValue:A.none()}}),Gb.config({channels:{...sx({isExtraPart:t.isExtraPart,...e.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...lx({...e.fireRepositionEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({}),doReposition:r})}})]),eventOrder:e.eventOrder,apis:i}},apis:{showAt:(e,t,o,n)=>{e.showAt(t,o,n)},showWithinBounds:(e,t,o,n,r)=>{e.showWithinBounds(t,o,n,r)},showMenuAt:(e,t,o,n)=>{e.showMenuAt(t,o,n)},showMenuWithinBounds:(e,t,o,n,r)=>{e.showMenuWithinBounds(t,o,n,r)},hide:(e,t)=>{e.hide(t)},isOpen:(e,t)=>e.isOpen(t),getContent:(e,t)=>e.getContent(t),setContent:(e,t,o)=>{e.setContent(t,o)},reposition:(e,t)=>{e.reposition(t)}}}),Wx=x([gs("type","text"),rs("data"),hs("inputAttributes",{}),hs("inputStyles",{}),hs("tag","input"),hs("inputClasses",[]),Na("onSetValue"),vs("fromInputValue",w),vs("toInputValue",w),hs("styles",{}),hs("eventOrder",{}),Mg("inputBehaviours",[Rf,Fd]),hs("selectOnFocus",!0)]),qx=e=>Od([Fd.config({onFocus:e.selectOnFocus?t=>{const o=t.element,n=ur(o);"range"!==e.type&&o.dom.setSelectionRange(0,n.length)}:b})]),Gx=e=>({...qx(e),...Dg(e.inputBehaviours,[Rf.config({store:{mode:"manual",...e.data.map((e=>({initialValue:e}))).getOr({}),getValue:t=>e.fromInputValue(ur(t.element)),setValue:(t,o)=>{ur(t.element)!==o&&hr(t.element,e.toInputValue(o))}},onSetValue:e.onSetValue})])}),Yx=e=>({tag:e.tag,attributes:{type:e.type,...e.inputAttributes},styles:e.inputStyles,classes:e.inputClasses}),Kx=Hg({name:"Input",configFields:Wx(),factory:(e,t)=>({uid:e.uid,dom:Yx(e),components:[],behaviours:Gx(e),eventOrder:e.eventOrder})}),Xx=kl(jy(),Vy()),Jx=x([Yi("lazySink"),rs("dragBlockClass"),vs("getBounds",Vr),hs("useTabstopAt",O),hs("firstTabstop",0),hs("eventOrder",{}),Mg("modalBehaviours",[$h]),Ia("onExecute"),za("onEscape")]),Qx={sketch:w},ew=x([xl({name:"draghandle",overrides:(e,t)=>({behaviours:Od([hf.config({mode:"mouse",getTarget:e=>Wn(e,'[role="dialog"]').getOr(e),blockerClass:e.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(t,null,2)).message),getBounds:e.getDragBounds})])})}),vl({schema:[Yi("dom")],name:"title"}),vl({factory:Qx,schema:[Yi("dom")],name:"close"}),vl({factory:Qx,schema:[Yi("dom")],name:"body"}),xl({factory:Qx,schema:[Yi("dom")],name:"footer"}),yl({factory:{sketch:(e,t)=>({...e,dom:t.dom,components:t.components})},schema:[hs("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),hs("components",[])],name:"blocker"})]),tw=jg({name:"ModalDialog",configFields:Jx(),partFields:ew(),factory:(e,t,o,n)=>{const r=Ye(),i=Be("modal-events"),s={...e.eventOrder,[ca()]:[i].concat(e.eventOrder["alloy.system.attached"]||[])},a=Gt();return{uid:e.uid,dom:e.dom,components:t,apis:{show:t=>{r.set(t);const o=e.lazySink(t).getOrDie(),i=n.blocker(),s=o.getSystem().build({...i,components:i.components.concat([ap(t)]),behaviours:Od([Fd.config({}),Rd("dialog-blocker-events",[vd(Ns(),(()=>{dp.isBlocked(t)||$h.focusIn(t)}))])])});nm(o,s),$h.focusIn(t)},hide:e=>{r.clear(),uo(e.element).each((t=>{e.getSystem().getByDom(t).each((e=>{sm(e)}))}))},getBody:t=>Ll(t,e,"body"),getFooter:t=>Dl(t,e,"footer"),setIdle:e=>{dp.unblock(e)},setBusy:(e,t)=>{dp.block(e,t)}},eventOrder:s,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Dg(e.modalBehaviours,[Cm.config({}),$h.config({mode:"cyclic",onEnter:e.onExecute,onEscape:e.onEscape,useTabstopAt:e.useTabstopAt,firstTabstop:e.firstTabstop}),dp.config({getRoot:r.get}),Rd(i,[yd((t=>{const o=Ll(t,e,"title").element,n=(e=>e.dom.textContent)(o);a.os.isMacOS()&&m(n)?$o(t.element,"aria-label",n):((e,t)=>{const o=Go(e,"id").fold((()=>{const e=Be("dialog-label");return $o(t,"id",e),e}),w);$o(e,"aria-labelledby",o)})(t.element,o)}))])])}},apis:{show:(e,t)=>{e.show(t)},hide:(e,t)=>{e.hide(t)},getBody:(e,t)=>e.getBody(t),getFooter:(e,t)=>e.getFooter(t),setBusy:(e,t,o)=>{e.setBusy(t,o)},setIdle:(e,t)=>{e.setIdle(t)}}}),ow=xl({schema:[Yi("dom")],name:"label"}),nw=e=>xl({name:e+"-edge",overrides:t=>t.model.manager.edgeActions[e].fold((()=>({})),(e=>({events:ld([hd(Es(),((t,o,n)=>e(t,n)),[t]),hd(Ms(),((t,o,n)=>e(t,n)),[t]),hd(Ps(),((t,o,n)=>{n.mouseIsDown.get()&&e(t,n)}),[t])])})))}),rw=nw("top-left"),iw=nw("top"),sw=nw("top-right"),aw=nw("right"),lw=nw("bottom-right"),cw=nw("bottom"),dw=nw("bottom-left"),uw=nw("left"),hw=vl({name:"thumb",defaults:x({dom:{styles:{position:"absolute"}}}),overrides:e=>({events:ld([pd(Es(),e,"spectrum"),pd(Ts(),e,"spectrum"),pd(Os(),e,"spectrum"),pd(Ms(),e,"spectrum"),pd(Ps(),e,"spectrum"),pd(Ls(),e,"spectrum")])})}),mw=e=>tu(e.event),pw=vl({schema:[qi("mouseIsDown",(()=>xe(!1)))],name:"spectrum",overrides:e=>{const t=e.model.manager,o=(o,n)=>t.getValueFromEvent(n).map((n=>t.setValueFrom(o,e,n)));return{behaviours:Od([$h.config({mode:"special",onLeft:(o,n)=>t.onLeft(o,e,mw(n)),onRight:(o,n)=>t.onRight(o,e,mw(n)),onUp:(o,n)=>t.onUp(o,e,mw(n)),onDown:(o,n)=>t.onDown(o,e,mw(n))}),Lv.config({}),Fd.config({})]),events:ld([ud(Es(),o),ud(Ts(),o),ud(Ms(),o),ud(Ps(),((t,n)=>{e.mouseIsDown.get()&&o(t,n)}))])}}});var gw=[ow,uw,aw,iw,cw,rw,sw,dw,lw,hw,pw];const fw=x("slider.change.value"),bw=e=>{const t=e.event.raw;if((e=>-1!==e.type.indexOf("touch"))(t)){const e=t;return void 0!==e.touches&&1===e.touches.length?A.some(e.touches[0]).map((e=>Dn(e.clientX,e.clientY))):A.none()}{const e=t;return void 0!==e.clientX?A.some(e).map((e=>Dn(e.clientX,e.clientY))):A.none()}},vw=e=>e.model.minX,yw=e=>e.model.minY,xw=e=>e.model.minX-1,ww=e=>e.model.minY-1,_w=e=>e.model.maxX,Sw=e=>e.model.maxY,Cw=e=>e.model.maxX+1,kw=e=>e.model.maxY+1,Ew=(e,t,o)=>t(e)-o(e),Tw=e=>Ew(e,_w,vw),Ow=e=>Ew(e,Sw,yw),Aw=e=>Tw(e)/2,Mw=e=>Ow(e)/2,Pw=(e,t)=>t?e.stepSize*e.speedMultiplier:e.stepSize,Dw=e=>e.snapToGrid,Lw=e=>e.snapStart,Rw=e=>e.rounded,Nw=(e,t)=>void 0!==e[t+"-edge"],Iw=e=>Nw(e,"left"),Bw=e=>Nw(e,"right"),zw=e=>Nw(e,"top"),Fw=e=>Nw(e,"bottom"),Hw=e=>e.model.value.get(),jw=(e,t)=>({x:e,y:t}),Vw=(e,t)=>{nd(e,fw(),{value:t})},Uw=(e,t,o,n)=>e<t?e:e>o?o:e===t?t-1:Math.max(t,e-n),Zw=(e,t,o,n)=>e>o?e:e<t?t:e===o?o+1:Math.min(o,e+n),$w=(e,t,o)=>Math.max(t,Math.min(o,e)),Ww=e=>{const{min:t,max:o,range:n,value:r,step:i,snap:s,snapStart:a,rounded:l,hasMinEdge:c,hasMaxEdge:d,minBound:u,maxBound:h,screenRange:m}=e,p=c?t-1:t,g=d?o+1:o;if(r<u)return p;if(r>h)return g;{const e=((e,t,o)=>Math.min(o,Math.max(e,t))-t)(r,u,h),c=$w(e/m*n+t,p,g);return s&&c>=t&&c<=o?((e,t,o,n,r)=>r.fold((()=>{const r=e-t,i=Math.round(r/n)*n;return $w(t+i,t-1,o+1)}),(t=>{const r=(e-t)%n,i=Math.round(r/n),s=Math.floor((e-t)/n),a=Math.floor((o-t)/n),l=t+Math.min(a,s+i)*n;return Math.max(t,l)})))(c,t,o,i,a):l?Math.round(c):c}},qw=e=>{const{min:t,max:o,range:n,value:r,hasMinEdge:i,hasMaxEdge:s,maxBound:a,maxOffset:l,centerMinEdge:c,centerMaxEdge:d}=e;return r<t?i?0:c:r>o?s?a:d:(r-t)/n*l},Gw="top",Yw="right",Kw="bottom",Xw="left",Jw=e=>e.element.dom.getBoundingClientRect(),Qw=(e,t)=>e[t],e_=e=>{const t=Jw(e);return Qw(t,Xw)},t_=e=>{const t=Jw(e);return Qw(t,Yw)},o_=e=>{const t=Jw(e);return Qw(t,Gw)},n_=e=>{const t=Jw(e);return Qw(t,Kw)},r_=e=>{const t=Jw(e);return Qw(t,"width")},i_=e=>{const t=Jw(e);return Qw(t,"height")},s_=(e,t,o)=>(e+t)/2-o,a_=(e,t)=>{const o=Jw(e),n=Jw(t),r=Qw(o,Xw),i=Qw(o,Yw),s=Qw(n,Xw);return s_(r,i,s)},l_=(e,t)=>{const o=Jw(e),n=Jw(t),r=Qw(o,Gw),i=Qw(o,Kw),s=Qw(n,Gw);return s_(r,i,s)},c_=(e,t)=>{nd(e,fw(),{value:t})},d_=(e,t,o)=>{const n={min:vw(t),max:_w(t),range:Tw(t),value:o,step:Pw(t),snap:Dw(t),snapStart:Lw(t),rounded:Rw(t),hasMinEdge:Iw(t),hasMaxEdge:Bw(t),minBound:e_(e),maxBound:t_(e),screenRange:r_(e)};return Ww(n)},u_=e=>(t,o,n)=>((e,t,o,n)=>{const r=(e>0?Zw:Uw)(Hw(o),vw(o),_w(o),Pw(o,n));return c_(t,r),A.some(r)})(e,t,o,n).map(O),h_=(e,t,o,n,r,i)=>{const s=((e,t,o,n,r)=>{const i=r_(e),s=n.bind((t=>A.some(a_(t,e)))).getOr(0),a=r.bind((t=>A.some(a_(t,e)))).getOr(i),l={min:vw(t),max:_w(t),range:Tw(t),value:o,hasMinEdge:Iw(t),hasMaxEdge:Bw(t),minBound:e_(e),minOffset:0,maxBound:t_(e),maxOffset:i,centerMinEdge:s,centerMaxEdge:a};return qw(l)})(t,i,o,n,r);return e_(t)-e_(e)+s},m_=u_(-1),p_=u_(1),g_=A.none,f_=A.none,b_={"top-left":A.none(),top:A.none(),"top-right":A.none(),right:A.some(((e,t)=>{Vw(e,Cw(t))})),"bottom-right":A.none(),bottom:A.none(),"bottom-left":A.none(),left:A.some(((e,t)=>{Vw(e,xw(t))}))};var v_=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=d_(e,t,o);return c_(e,n),n},setToMin:(e,t)=>{const o=vw(t);c_(e,o)},setToMax:(e,t)=>{const o=_w(t);c_(e,o)},findValueOfOffset:d_,getValueFromEvent:e=>bw(e).map((e=>e.left)),findPositionOfValue:h_,setPositionFromValue:(e,t,o,n)=>{const r=Hw(o),i=h_(e,n.getSpectrum(e),r,n.getLeftEdge(e),n.getRightEdge(e),o),s=On(t.element)/2;un(t.element,"left",i-s+"px")},onLeft:m_,onRight:p_,onUp:g_,onDown:f_,edgeActions:b_});const y_=(e,t)=>{nd(e,fw(),{value:t})},x_=(e,t,o)=>{const n={min:yw(t),max:Sw(t),range:Ow(t),value:o,step:Pw(t),snap:Dw(t),snapStart:Lw(t),rounded:Rw(t),hasMinEdge:zw(t),hasMaxEdge:Fw(t),minBound:o_(e),maxBound:n_(e),screenRange:i_(e)};return Ww(n)},w_=e=>(t,o,n)=>((e,t,o,n)=>{const r=(e>0?Zw:Uw)(Hw(o),yw(o),Sw(o),Pw(o,n));return y_(t,r),A.some(r)})(e,t,o,n).map(O),__=(e,t,o,n,r,i)=>{const s=((e,t,o,n,r)=>{const i=i_(e),s=n.bind((t=>A.some(l_(t,e)))).getOr(0),a=r.bind((t=>A.some(l_(t,e)))).getOr(i),l={min:yw(t),max:Sw(t),range:Ow(t),value:o,hasMinEdge:zw(t),hasMaxEdge:Fw(t),minBound:o_(e),minOffset:0,maxBound:n_(e),maxOffset:i,centerMinEdge:s,centerMaxEdge:a};return qw(l)})(t,i,o,n,r);return o_(t)-o_(e)+s},S_=A.none,C_=A.none,k_=w_(-1),E_=w_(1),T_={"top-left":A.none(),top:A.some(((e,t)=>{Vw(e,ww(t))})),"top-right":A.none(),right:A.none(),"bottom-right":A.none(),bottom:A.some(((e,t)=>{Vw(e,kw(t))})),"bottom-left":A.none(),left:A.none()};var O_=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=x_(e,t,o);return y_(e,n),n},setToMin:(e,t)=>{const o=yw(t);y_(e,o)},setToMax:(e,t)=>{const o=Sw(t);y_(e,o)},findValueOfOffset:x_,getValueFromEvent:e=>bw(e).map((e=>e.top)),findPositionOfValue:__,setPositionFromValue:(e,t,o,n)=>{const r=Hw(o),i=__(e,n.getSpectrum(e),r,n.getTopEdge(e),n.getBottomEdge(e),o),s=Sn(t.element)/2;un(t.element,"top",i-s+"px")},onLeft:S_,onRight:C_,onUp:k_,onDown:E_,edgeActions:T_});const A_=(e,t)=>{nd(e,fw(),{value:t})},M_=(e,t)=>({x:e,y:t}),P_=(e,t)=>(o,n,r)=>((e,t,o,n,r)=>{const i=e>0?Zw:Uw,s=t?Hw(n).x:i(Hw(n).x,vw(n),_w(n),Pw(n,r)),a=t?i(Hw(n).y,yw(n),Sw(n),Pw(n,r)):Hw(n).y;return A_(o,M_(s,a)),A.some(s)})(e,t,o,n,r).map(O),D_=P_(-1,!1),L_=P_(1,!1),R_=P_(-1,!0),N_=P_(1,!0),I_={"top-left":A.some(((e,t)=>{Vw(e,jw(xw(t),ww(t)))})),top:A.some(((e,t)=>{Vw(e,jw(Aw(t),ww(t)))})),"top-right":A.some(((e,t)=>{Vw(e,jw(Cw(t),ww(t)))})),right:A.some(((e,t)=>{Vw(e,jw(Cw(t),Mw(t)))})),"bottom-right":A.some(((e,t)=>{Vw(e,jw(Cw(t),kw(t)))})),bottom:A.some(((e,t)=>{Vw(e,jw(Aw(t),kw(t)))})),"bottom-left":A.some(((e,t)=>{Vw(e,jw(xw(t),kw(t)))})),left:A.some(((e,t)=>{Vw(e,jw(xw(t),Mw(t)))}))};var B_=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=d_(e,t,o.left),r=x_(e,t,o.top),i=M_(n,r);return A_(e,i),i},setToMin:(e,t)=>{const o=vw(t),n=yw(t);A_(e,M_(o,n))},setToMax:(e,t)=>{const o=_w(t),n=Sw(t);A_(e,M_(o,n))},getValueFromEvent:e=>bw(e),setPositionFromValue:(e,t,o,n)=>{const r=Hw(o),i=h_(e,n.getSpectrum(e),r.x,n.getLeftEdge(e),n.getRightEdge(e),o),s=__(e,n.getSpectrum(e),r.y,n.getTopEdge(e),n.getBottomEdge(e),o),a=On(t.element)/2,l=Sn(t.element)/2;un(t.element,"left",i-a+"px"),un(t.element,"top",s-l+"px")},onLeft:D_,onRight:L_,onUp:R_,onDown:N_,edgeActions:I_});const z_=jg({name:"Slider",configFields:[hs("stepSize",1),hs("speedMultiplier",10),hs("onChange",b),hs("onChoose",b),hs("onInit",b),hs("onDragStart",b),hs("onDragEnd",b),hs("snapToGrid",!1),hs("rounded",!0),rs("snapStart"),Ki("model",Zi("mode",{x:[hs("minX",0),hs("maxX",100),qi("value",(e=>xe(e.mode.minX))),Yi("getInitialValue"),Fa("manager",v_)],y:[hs("minY",0),hs("maxY",100),qi("value",(e=>xe(e.mode.minY))),Yi("getInitialValue"),Fa("manager",O_)],xy:[hs("minX",0),hs("maxX",100),hs("minY",0),hs("maxY",100),qi("value",(e=>xe({x:e.mode.minX,y:e.mode.minY}))),Yi("getInitialValue"),Fa("manager",B_)]})),Mg("sliderBehaviours",[$h,Rf]),qi("mouseIsDown",(()=>xe(!1)))],partFields:gw,factory:(e,t,o,n)=>{const r=t=>Ll(t,e,"thumb"),i=t=>Ll(t,e,"spectrum"),s=t=>Dl(t,e,"left-edge"),a=t=>Dl(t,e,"right-edge"),l=t=>Dl(t,e,"top-edge"),c=t=>Dl(t,e,"bottom-edge"),d=e.model,u=d.manager,h=(t,o)=>{u.setPositionFromValue(t,o,e,{getLeftEdge:s,getRightEdge:a,getTopEdge:l,getBottomEdge:c,getSpectrum:i})},m=(e,t)=>{d.value.set(t);const o=r(e);h(e,o)},p=t=>{const o=e.mouseIsDown.get();e.mouseIsDown.set(!1),o&&Dl(t,e,"thumb").each((o=>{const n=d.value.get();e.onChoose(t,o,n)}))},g=(t,o)=>{o.stop(),e.mouseIsDown.set(!0),e.onDragStart(t,r(t))},f=(t,o)=>{o.stop(),e.onDragEnd(t,r(t)),p(t)},b=t=>{Dl(t,e,"spectrum").map($h.focusIn)};return{uid:e.uid,dom:e.dom,components:t,behaviours:Dg(e.sliderBehaviours,[$h.config({mode:"special",focusIn:b}),Rf.config({store:{mode:"manual",getValue:e=>d.value.get(),setValue:m}}),Gb.config({channels:{[ay()]:{onReceive:p}}})]),events:ld([ud(fw(),((t,o)=>{((t,o)=>{m(t,o);const n=r(t);e.onChange(t,n,o),A.some(!0)})(t,o.event.value)})),yd(((t,o)=>{const n=d.getInitialValue();d.value.set(n);const s=r(t);h(t,s);const a=i(t);e.onInit(t,s,a,d.value.get())})),ud(Es(),g),ud(Os(),f),ud(Ms(),((e,t)=>{b(e),g(e,t)})),ud(Ls(),f)]),apis:{resetToMin:t=>{u.setToMin(t,e)},resetToMax:t=>{u.setToMax(t,e)},setValue:m,refresh:h},domModification:{styles:{position:"relative"}}}},apis:{setValue:(e,t,o)=>{e.setValue(t,o)},resetToMin:(e,t)=>{e.resetToMin(t)},resetToMax:(e,t)=>{e.resetToMax(t)},refresh:(e,t)=>{e.refresh(t)}}}),F_="container",H_=[Mg("slotBehaviours",[])],j_=e=>"<alloy.field."+e+">",V_=(e,t)=>{const o=t=>Il(e),n=(t,o)=>(n,r)=>Dl(n,e,r).map((e=>t(e,r))).getOr(o),r=(e,t)=>"true"!==qo(e.element,"aria-hidden"),i=n(r,!1),s=n(((e,t)=>{if(r(e)){const o=e.element;un(o,"display","none"),$o(o,"aria-hidden","true"),nd(e,pa(),{name:t,visible:!1})}})),a=(e=>(t,o)=>{F(o,(o=>e(t,o)))})(s),l=n(((e,t)=>{if(!r(e)){const o=e.element;yn(o,"display"),Ko(o,"aria-hidden"),nd(e,pa(),{name:t,visible:!0})}})),c={getSlotNames:o,getSlot:(t,o)=>Dl(t,e,o),isShowing:i,hideSlot:s,hideAllSlots:e=>a(e,o()),showSlot:l};return{uid:e.uid,dom:e.dom,components:t,behaviours:Pg(e.slotBehaviours),apis:c}},U_=le({getSlotNames:(e,t)=>e.getSlotNames(t),getSlot:(e,t,o)=>e.getSlot(t,o),isShowing:(e,t,o)=>e.isShowing(t,o),hideSlot:(e,t,o)=>e.hideSlot(t,o),hideAllSlots:(e,t)=>e.hideAllSlots(t),showSlot:(e,t,o)=>e.showSlot(t,o)},(e=>Yh(e))),Z_={...U_,sketch:e=>{const t=(()=>{const e=[];return{slot:(t,o)=>(e.push(t),Tl(F_,j_(t),o)),record:x(e)}})(),o=e(t),n=t.record(),r=z(n,(e=>vl({name:e,pname:j_(e)})));return Ig(F_,H_,r,V_,o)}},$_=x([Yi("toggleClass"),Yi("fetch"),Ba("onExecute"),hs("getHotspot",A.some),hs("getAnchorOverrides",x({})),ib(),Ba("onItemExecute"),rs("lazySink"),Yi("dom"),Na("onOpen"),Mg("splitDropdownBehaviours",[bp,$h,Fd]),hs("matchWidth",!1),hs("useMinWidth",!1),hs("eventOrder",{}),rs("role"),rs("listRole")].concat(vx())),W_=vl({factory:xy,schema:[Yi("dom")],name:"arrow",defaults:()=>({buttonBehaviours:Od([Fd.revoke()])}),overrides:e=>({dom:{tag:"span",attributes:{role:"presentation"}},action:t=>{t.getSystem().getByUid(e.uid).each(rd)},buttonBehaviours:Od([jv.config({toggleOnExecute:!1,toggleClass:e.toggleClass})])})}),q_=vl({factory:xy,schema:[Yi("dom")],name:"button",defaults:()=>({buttonBehaviours:Od([Fd.revoke()])}),overrides:e=>({dom:{tag:"span",attributes:{role:"presentation"}},action:t=>{t.getSystem().getByUid(e.uid).each((o=>{e.onExecute(o,t)}))}})}),G_=x([W_,q_,xl({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[Yi("text")],name:"aria-descriptor"}),yl({schema:[Da()],name:"menu",defaults:e=>({onExecute:(t,o)=>{t.getSystem().getByUid(e.uid).each((n=>{e.onItemExecute(n,t,o)}))}})}),rx()]),Y_=jg({name:"SplitDropdown",configFields:$_(),partFields:G_(),factory:(e,t,o,n)=>{const r=e=>{mp.getCurrent(e).each((e=>{gu.highlightFirst(e),$h.focusIn(e)}))},i=t=>{hx(e,w,t,n,r,Kc.HighlightMenuAndItem).get(b)},s=t=>{const o=Ll(t,e,"button");return rd(o),A.some(!0)},a={...ld([yd(((t,o)=>{Dl(t,e,"aria-descriptor").each((e=>{const o=Be("aria");$o(e.element,"id",o),$o(t.element,"aria-describedby",o)}))}))]),...yy(A.some(i))},l={repositionMenus:e=>{jv.isOn(e)&&bx(e)}};return{uid:e.uid,dom:e.dom,components:t,apis:l,eventOrder:{...e.eventOrder,[Js()]:["disabling","toggling","alloy.base.behaviour"]},events:a,behaviours:Dg(e.splitDropdownBehaviours,[bp.config({others:{sandbox:t=>{const o=Ll(t,e,"arrow");return fx(e,t,{onOpen:()=>{jv.on(o),jv.on(t)},onClose:()=>{jv.off(o),jv.off(t)}})}}}),$h.config({mode:"special",onSpace:s,onEnter:s,onDown:e=>(i(e),A.some(!0))}),Fd.config({}),jv.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:e.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:(e,t)=>e.repositionMenus(t)}}),K_=(e,t,o)=>({within:e,extra:t,withinWidth:o}),X_=(e,t,o)=>{const n=((e,t)=>{const o=U(e,((e,o)=>t(o,e.len).fold(x(e),(t=>({len:t.finish,list:e.list.concat([t])})))),{len:0,list:[]});return o.list})(e,((e,t)=>{const n=o(e);return A.some({element:e,start:t,finish:t+n,width:n})})),r=j(n,(e=>e.finish<=t)),i=V(r,((e,t)=>e+t.width),0);return{within:r,extra:n.slice(r.length),withinWidth:i}},J_=e=>z(e,(e=>e.element)),Q_=(e,t,o,n)=>{const r=((e,t,o)=>{const n=X_(t,e,o);return 0===n.extra.length?A.some(n):A.none()})(e,t,o).getOrThunk((()=>X_(t,e-o(n),o))),i=r.within,s=r.extra,a=r.withinWidth;return 1===s.length&&s[0].width<=o(n)?((e,t,o)=>{const n=J_(e.concat(t));return K_(n,[],o)})(i,s,a):s.length>=1?((e,t,o,n)=>{const r=J_(e).concat([o]);return K_(r,J_(t),n)})(i,s,n,a):((e,t,o)=>K_(J_(e),[],o))(i,0,a)},eS=(e,t)=>{const o=z(t,(e=>ap(e)));Ax.setGroups(e,o)},tS=(e,t,o)=>{const n=t.builtGroups.get();if(0===n.length)return;const r=Ll(e,t,"primary"),i=bp.getCoupled(e,"overflowGroup");un(r.element,"visibility","hidden");const s=n.concat([i]),a=re(s,(e=>zo(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()))));o([]),eS(r,s);const l=On(r.element),c=Q_(l,t.builtGroups.get(),(e=>Math.ceil(e.element.dom.getBoundingClientRect().width)),i);0===c.extra.length?(Cm.remove(r,i),o([])):(eS(r,c.within),o(c.extra)),yn(r.element,"visibility"),xn(r.element),a.each(Fd.focus)},oS=x([Mg("splitToolbarBehaviours",[bp]),qi("builtGroups",(()=>xe([])))]),nS=x([La(["overflowToggledClass"]),cs("getOverflowBounds"),Yi("lazySink"),qi("overflowGroups",(()=>xe([]))),Na("onOpened"),Na("onClosed")].concat(oS())),rS=x([vl({factory:Ax,schema:Tx(),name:"primary"}),yl({schema:Tx(),name:"overflow"}),yl({name:"overflow-button"}),yl({name:"overflow-group"})]),iS=x([Yi("items"),La(["itemSelector"]),Mg("tgroupBehaviours",[$h])]),sS=x([wl({name:"items",unit:"item"})]),aS=jg({name:"ToolbarGroup",configFields:iS(),partFields:sS(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:Dg(e.tgroupBehaviours,[$h.config({mode:"flow",selector:e.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}})}),lS=e=>z(e,(e=>ap(e))),cS=(e,t,o)=>{tS(e,o,(n=>{o.overflowGroups.set(n),t.getOpt(e).each((e=>{Ix.setGroups(e,lS(n))}))}))},dS=jg({name:"SplitFloatingToolbar",configFields:nS(),partFields:rS(),factory:(e,t,o,n)=>{const r=oy(Ix.sketch({fetch:()=>ke((t=>{t(lS(e.overflowGroups.get()))})),layouts:{onLtr:()=>[cc,lc],onRtl:()=>[lc,cc],onBottomLtr:()=>[uc,dc],onBottomRtl:()=>[dc,uc]},getBounds:o.getOverflowBounds,lazySink:e.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:e.markers.overflowToggledClass},parts:{button:n["overflow-button"](),toolbar:n.overflow()},onToggled:(t,o)=>e[o?"onOpened":"onClosed"](t)}));return{uid:e.uid,dom:e.dom,components:t,behaviours:Dg(e.splitToolbarBehaviours,[bp.config({others:{overflowGroup:()=>aS.sketch({...n["overflow-group"](),items:[r.asSpec()]})}})]),apis:{setGroups:(t,o)=>{e.builtGroups.set(z(o,t.getSystem().build)),cS(t,r,e)},refresh:t=>cS(t,r,e),toggle:e=>{r.getOpt(e).each((e=>{Ix.toggle(e)}))},toggleWithoutFocusing:e=>{r.getOpt(e).each(Ix.toggleWithoutFocusing)},isOpen:e=>r.getOpt(e).map(Ix.isOpen).getOr(!1),reposition:e=>{r.getOpt(e).each((e=>{Ix.reposition(e)}))},getOverflow:e=>r.getOpt(e).bind(Ix.getToolbar)},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},refresh:(e,t)=>{e.refresh(t)},reposition:(e,t)=>{e.reposition(t)},toggle:(e,t)=>{e.toggle(t)},toggleWithoutFocusing:(e,t)=>{e.toggle(t)},isOpen:(e,t)=>e.isOpen(t),getOverflow:(e,t)=>e.getOverflow(t)}}),uS=x([La(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),Na("onOpened"),Na("onClosed")].concat(oS())),hS=x([vl({factory:Ax,schema:Tx(),name:"primary"}),vl({factory:Ax,schema:Tx(),name:"overflow",overrides:e=>({toolbarBehaviours:Od([kv.config({dimension:{property:"height"},closedClass:e.markers.closedClass,openClass:e.markers.openClass,shrinkingClass:e.markers.shrinkingClass,growingClass:e.markers.growingClass,onShrunk:t=>{Dl(t,e,"overflow-button").each((e=>{jv.off(e)})),e.onClosed(t)},onGrown:t=>{e.onOpened(t)},onStartGrow:t=>{Dl(t,e,"overflow-button").each(jv.on)}}),$h.config({mode:"acyclic",onEscape:t=>(Dl(t,e,"overflow-button").each(Fd.focus),A.some(!0))})])})}),yl({name:"overflow-button",overrides:e=>({buttonBehaviours:Od([jv.config({toggleClass:e.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])})}),yl({name:"overflow-group"})]),mS=(e,t,o)=>{Dl(e,t,"overflow-button").each((n=>{Dl(e,t,"overflow").each((r=>{if(pS(e,t),kv.hasShrunk(r)){const e=t.onOpened;t.onOpened=n=>{o||$h.focusIn(r),e(n),t.onOpened=e}}else{const e=t.onClosed;t.onClosed=r=>{o||Fd.focus(n),e(r),t.onClosed=e}}kv.toggleGrow(r)}))}))},pS=(e,t)=>{Dl(e,t,"overflow").each((o=>{tS(e,t,(e=>{const t=z(e,(e=>ap(e)));Ax.setGroups(o,t)})),Dl(e,t,"overflow-button").each((e=>{kv.hasGrown(o)&&jv.on(e)})),kv.refresh(o)}))},gS=jg({name:"SplitSlidingToolbar",configFields:uS(),partFields:hS(),factory:(e,t,o,n)=>{const r="alloy.toolbar.toggle";return{uid:e.uid,dom:e.dom,components:t,behaviours:Dg(e.splitToolbarBehaviours,[bp.config({others:{overflowGroup:e=>aS.sketch({...n["overflow-group"](),items:[xy.sketch({...n["overflow-button"](),action:t=>{od(e,r)}})]})}}),Rd("toolbar-toggle-events",[ud(r,(t=>{mS(t,e,!1)}))])]),apis:{setGroups:(t,o)=>{((t,o)=>{const n=z(o,t.getSystem().build);e.builtGroups.set(n)})(t,o),pS(t,e)},refresh:t=>pS(t,e),toggle:t=>{mS(t,e,!1)},toggleWithoutFocusing:t=>{mS(t,e,!0)},isOpen:t=>((e,t)=>Dl(e,t,"overflow").map(kv.hasGrown).getOr(!1))(t,e)},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},refresh:(e,t)=>{e.refresh(t)},toggle:(e,t)=>{e.toggle(t)},isOpen:(e,t)=>e.isOpen(t)}}),fS=Hg({name:"TabButton",configFields:[hs("uid",void 0),Yi("value"),Wi("dom","dom",xi((()=>({attributes:{role:"tab",id:Be("aria"),"aria-selected":"false"}}))),di()),rs("action"),hs("domModification",{}),Mg("tabButtonBehaviours",[Fd,$h,Rf]),Yi("view")],factory:(e,t)=>({uid:e.uid,dom:e.dom,components:e.components,events:yy(e.action),behaviours:Dg(e.tabButtonBehaviours,[Fd.config({}),$h.config({mode:"execution",useSpace:!0,useEnter:!0}),Rf.config({store:{mode:"memory",initialValue:e.value}})]),domModification:e.domModification})}),bS=x([Yi("tabs"),Yi("dom"),hs("clickToDismiss",!1),Mg("tabbarBehaviours",[gu,$h]),La(["tabClass","selectedClass"])]),vS=wl({factory:fS,name:"tabs",unit:"tab",overrides:e=>{const t=(e,t)=>{gu.dehighlight(e,t),nd(e,ba(),{tabbar:e,button:t})},o=(e,t)=>{gu.highlight(e,t),nd(e,fa(),{tabbar:e,button:t})};return{action:n=>{const r=n.getSystem().getByUid(e.uid).getOrDie(),i=gu.isHighlighted(r,n);(i&&e.clickToDismiss?t:i?b:o)(r,n)},domModification:{classes:[e.markers.tabClass]}}}}),yS=x([vS]),xS=jg({name:"Tabbar",configFields:bS(),partFields:yS(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Dg(e.tabbarBehaviours,[gu.config({highlightClass:e.markers.selectedClass,itemClass:e.markers.tabClass,onHighlight:(e,t)=>{$o(t.element,"aria-selected","true")},onDehighlight:(e,t)=>{$o(t.element,"aria-selected","false")}}),$h.config({mode:"flow",getInitial:e=>gu.getHighlighted(e).map((e=>e.element)),selector:"."+e.markers.tabClass,executeOnMove:!0})])})}),wS=Hg({name:"Tabview",configFields:[Mg("tabviewBehaviours",[Cm])],factory:(e,t)=>({uid:e.uid,dom:e.dom,behaviours:Dg(e.tabviewBehaviours,[Cm.config({})]),domModification:{attributes:{role:"tabpanel"}}})}),_S=x([hs("selectFirst",!0),Na("onChangeTab"),Na("onDismissTab"),hs("tabs",[]),Mg("tabSectionBehaviours",[])]),SS=vl({factory:xS,schema:[Yi("dom"),ts("markers",[Yi("tabClass"),Yi("selectedClass")])],name:"tabbar",defaults:e=>({tabs:e.tabs})}),CS=vl({factory:wS,name:"tabview"}),kS=x([SS,CS]),ES=jg({name:"TabSection",configFields:_S(),partFields:kS(),factory:(e,t,o,n)=>{const r=(t,o)=>{Dl(t,e,"tabbar").each((e=>{o(e).each(rd)}))};return{uid:e.uid,dom:e.dom,components:t,behaviours:Pg(e.tabSectionBehaviours),events:ld(W([e.selectFirst?[yd(((e,t)=>{r(e,gu.getFirst)}))]:[],[ud(fa(),((t,o)=>{(t=>{const o=Rf.getValue(t);Dl(t,e,"tabview").each((n=>{const r=Z(e.tabs,(e=>e.value===o));r.each((o=>{const r=o.view();Go(t.element,"id").each((e=>{$o(n.element,"aria-labelledby",e)})),Cm.set(n,r),e.onChangeTab(n,t,r)}))}))})(o.event.button)})),ud(ba(),((t,o)=>{const n=o.event.button;e.onDismissTab(t,n)}))]])),apis:{getViewItems:t=>Dl(t,e,"tabview").map((e=>Cm.contents(e))).getOr([]),showTab:(e,t)=>{r(e,(e=>{const o=gu.getCandidates(e);return Z(o,(e=>Rf.getValue(e)===t)).filter((t=>!gu.isHighlighted(e,t)))}))}}}},apis:{getViewItems:(e,t)=>e.getViewItems(t),showTab:(e,t,o)=>{e.showTab(t,o)}}}),TS=(e,t,o)=>{const n=Rf.getValue(o);Rf.setValue(t,n),AS(t)},OS=(e,t)=>{const o=e.element,n=ur(o),r=o.dom;"number"!==qo(o,"type")&&t(r,n)},AS=e=>{OS(e,((e,t)=>e.setSelectionRange(t.length,t.length)))},MS=(e,t,o)=>{if(e.selectsOver){const n=Rf.getValue(t),r=e.getDisplayText(n),i=Rf.getValue(o);return 0===e.getDisplayText(i).indexOf(r)?A.some((()=>{TS(0,t,o),((e,t)=>{OS(e,((e,o)=>e.setSelectionRange(t,o.length)))})(t,r.length)})):A.none()}return A.none()},PS=x("alloy.typeahead.itemexecute"),DS=x([rs("lazySink"),Yi("fetch"),hs("minChars",5),hs("responseTime",1e3),Na("onOpen"),hs("getHotspot",A.some),hs("getAnchorOverrides",x({})),hs("layouts",A.none()),hs("eventOrder",{}),xs("model",{},[hs("getDisplayText",(e=>void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.value)),hs("selectsOver",!0),hs("populateFromBrowse",!0)]),Na("onSetValue"),Ia("onExecute"),Na("onItemExecute"),hs("inputClasses",[]),hs("inputAttributes",{}),hs("inputStyles",{}),hs("matchWidth",!0),hs("useMinWidth",!1),hs("dismissOnBlur",!0),La(["openClass"]),rs("initialData"),rs("listRole"),Mg("typeaheadBehaviours",[Fd,Rf,Mv,$h,jv,bp]),qi("lazyTypeaheadComp",(()=>xe(A.none))),qi("previewing",(()=>xe(!0)))].concat(Wx()).concat(vx())),LS=x([yl({schema:[Da()],name:"menu",overrides:e=>({fakeFocus:!0,onHighlightItem:(t,o,n)=>{e.previewing.get()?e.lazyTypeaheadComp.get().each((t=>{MS(e.model,t,n).fold((()=>{e.model.selectsOver?(gu.dehighlight(o,n),e.previewing.set(!0)):e.previewing.set(!1)}),(t=>{t(),e.previewing.set(!1)}))})):e.lazyTypeaheadComp.get().each((t=>{e.model.populateFromBrowse&&TS(e.model,t,n),Go(n.element,"id").each((e=>$o(t.element,"aria-activedescendant",e)))}))},onExecute:(t,o)=>e.lazyTypeaheadComp.get().map((e=>(nd(e,PS(),{item:o}),!0))),onHover:(t,o)=>{e.previewing.set(!1),e.lazyTypeaheadComp.get().each((t=>{e.model.populateFromBrowse&&TS(e.model,t,o)}))}})})]),RS=jg({name:"Typeahead",configFields:DS(),partFields:LS(),factory:(e,t,o,n)=>{const r=(t,o,r)=>{e.previewing.set(!1);const i=bp.getCoupled(t,"sandbox");if(cv.isOpen(i))mp.getCurrent(i).each((e=>{gu.getHighlighted(e).fold((()=>{r(e)}),(()=>{ad(i,e.element,"keydown",o)}))}));else{const o=e=>{mp.getCurrent(e).each(r)};dx(e,s(t),t,i,n,o,Kc.HighlightMenuAndItem).get(b)}},i=qx(e),s=e=>t=>t.map((t=>{const o=ge(t.menus),n=q(o,(e=>j(e.items,(e=>"item"===e.type))));return Rf.getState(e).update(z(n,(e=>e.data))),t})),a=e=>mp.getCurrent(e),l="typeaheadevents",c=[Fd.config({}),Rf.config({onSetValue:e.onSetValue,store:{mode:"dataset",getDataKey:e=>ur(e.element),getFallbackEntry:e=>({value:e,meta:{}}),setValue:(t,o)=>{hr(t.element,e.model.getDisplayText(o))},...e.initialData.map((e=>_s("initialValue",e))).getOr({})}}),Mv.config({stream:{mode:"throttle",delay:e.responseTime,stopEvent:!1},onStream:(t,o)=>{const r=bp.getCoupled(t,"sandbox");if(Fd.isFocused(t)&&ur(t.element).length>=e.minChars){const o=a(r).bind((e=>gu.getHighlighted(e).map(Rf.getValue)));e.previewing.set(!0);const i=t=>{a(r).each((t=>{o.fold((()=>{e.model.selectsOver&&gu.highlightFirst(t)}),(e=>{gu.highlightBy(t,(t=>Rf.getValue(t).value===e.value)),gu.getHighlighted(t).orThunk((()=>(gu.highlightFirst(t),A.none())))}))}))};dx(e,s(t),t,r,n,i,Kc.HighlightJustMenu).get(b)}},cancelEvent:na()}),$h.config({mode:"special",onDown:(e,t)=>(r(e,t,gu.highlightFirst),A.some(!0)),onEscape:e=>{const t=bp.getCoupled(e,"sandbox");return cv.isOpen(t)?(cv.close(t),A.some(!0)):A.none()},onUp:(e,t)=>(r(e,t,gu.highlightLast),A.some(!0)),onEnter:t=>{const o=bp.getCoupled(t,"sandbox"),n=cv.isOpen(o);if(n&&!e.previewing.get())return a(o).bind((e=>gu.getHighlighted(e))).map((e=>(nd(t,PS(),{item:e}),!0)));{const r=Rf.getValue(t);return od(t,na()),e.onExecute(o,t,r),n&&cv.close(o),A.some(!0)}}}),jv.config({toggleClass:e.markers.openClass,aria:{mode:"expanded"}}),bp.config({others:{sandbox:t=>fx(e,t,{onOpen:()=>jv.on(t),onClose:()=>{e.lazyTypeaheadComp.get().each((e=>Ko(e.element,"aria-activedescendant"))),jv.off(t)}})}}),Rd(l,[yd((t=>{e.lazyTypeaheadComp.set(A.some(t))})),xd((t=>{e.lazyTypeaheadComp.set(A.none())})),_d((t=>{const o=b;hx(e,s(t),t,n,o,Kc.HighlightMenuAndItem).get(b)})),ud(PS(),((t,o)=>{const n=bp.getCoupled(t,"sandbox");TS(e.model,t,o.event.item),od(t,na()),e.onItemExecute(t,n,o.event.item,Rf.getValue(t)),cv.close(n),AS(t)}))].concat(e.dismissOnBlur?[ud(Ys(),(e=>{const t=bp.getCoupled(e,"sandbox");zo(t.element).isNone()&&cv.close(t)}))]:[]))],d={[da()]:[Rf.name(),Mv.name(),l],...e.eventOrder};return{uid:e.uid,dom:Yx(Fe(e,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...i,...Dg(e.typeaheadBehaviours,c)},eventOrder:d}}});var NS,IS,BS=tinymce.util.Tools.resolve("tinymce.ThemeManager"),zS=tinymce.util.Tools.resolve("tinymce.util.Delay"),FS=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),HS=tinymce.util.Tools.resolve("tinymce.EditorManager"),jS=tinymce.util.Tools.resolve("tinymce.Env");!function(e){e.default="wrap",e.floating="floating",e.sliding="sliding",e.scrolling="scrolling"}(NS||(NS={})),function(e){e.auto="auto",e.top="top",e.bottom="bottom"}(IS||(IS={}));const VS=e=>t=>t.options.get(e),US=e=>t=>A.from(e(t)),ZS=e=>{const t=jS.deviceType.isPhone(),o=jS.deviceType.isTablet()||t,n=e.options.register,r=e=>i(e)||!1===e,s=e=>i(e)||g(e);n("skin",{processor:e=>i(e)||!1===e,default:"oxide"}),n("skin_url",{processor:"string"}),n("height",{processor:s,default:Math.max(e.getElement().offsetHeight,400)}),n("width",{processor:s,default:FS.DOM.getStyle(e.getElement(),"width")}),n("min_height",{processor:"number",default:100}),n("min_width",{processor:"number"}),n("max_height",{processor:"number"}),n("max_width",{processor:"number"}),n("style_formats",{processor:"object[]"}),n("style_formats_merge",{processor:"boolean",default:!1}),n("style_formats_autohide",{processor:"boolean",default:!1}),n("line_height_formats",{processor:"string",default:"1 1.1 1.2 1.3 1.4 1.5 2"}),n("font_family_formats",{processor:"string",default:"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"}),n("font_size_formats",{processor:"string",default:"8pt 10pt 12pt 14pt 18pt 24pt 36pt"}),n("font_size_input_default_unit",{processor:"string",default:"pt"}),n("block_formats",{processor:"string",default:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre"}),n("content_langs",{processor:"object[]"}),n("removed_menuitems",{processor:"string",default:""}),n("menubar",{processor:e=>i(e)||d(e),default:!t}),n("menu",{processor:"object",default:{}}),n("toolbar",{processor:e=>d(e)||i(e)||l(e)?{value:e,valid:!0}:{valid:!1,message:"Must be a boolean, string or array."},default:!0}),I(9,(e=>{n("toolbar"+(e+1),{processor:"string"})})),n("toolbar_mode",{processor:"string",default:o?"scrolling":"floating"}),n("toolbar_groups",{processor:"object",default:{}}),n("toolbar_location",{processor:"string",default:IS.auto}),n("toolbar_persist",{processor:"boolean",default:!1}),n("toolbar_sticky",{processor:"boolean",default:e.inline}),n("toolbar_sticky_offset",{processor:"number",default:0}),n("fixed_toolbar_container",{processor:"string",default:""}),n("fixed_toolbar_container_target",{processor:"object"}),n("ui_mode",{processor:"string",default:"combined"}),n("file_picker_callback",{processor:"function"}),n("file_picker_validator_handler",{processor:"function"}),n("file_picker_types",{processor:"string"}),n("typeahead_urls",{processor:"boolean",default:!0}),n("anchor_top",{processor:r,default:"#top"}),n("anchor_bottom",{processor:r,default:"#bottom"}),n("draggable_modal",{processor:"boolean",default:!1}),n("statusbar",{processor:"boolean",default:!0}),n("elementpath",{processor:"boolean",default:!0}),n("branding",{processor:"boolean",default:!0}),n("promotion",{processor:"boolean",default:!0}),n("resize",{processor:e=>"both"===e||d(e),default:!jS.deviceType.isTouch()}),n("sidebar_show",{processor:"string"}),n("help_accessibility",{processor:"boolean",default:e.hasPlugin("help")}),n("default_font_stack",{processor:"string[]",default:[]})},$S=VS("readonly"),WS=VS("disabled"),qS=VS("height"),GS=VS("width"),YS=US(VS("min_width")),KS=US(VS("min_height")),XS=US(VS("max_width")),JS=US(VS("max_height")),QS=US(VS("style_formats")),eC=VS("style_formats_merge"),tC=VS("style_formats_autohide"),oC=VS("content_langs"),nC=VS("removed_menuitems"),rC=VS("toolbar_mode"),iC=VS("toolbar_groups"),sC=VS("toolbar_location"),aC=VS("fixed_toolbar_container"),lC=VS("fixed_toolbar_container_target"),cC=VS("toolbar_persist"),dC=VS("toolbar_sticky_offset"),uC=VS("menubar"),hC=VS("toolbar"),mC=VS("file_picker_callback"),pC=VS("file_picker_validator_handler"),gC=VS("font_size_input_default_unit"),fC=VS("file_picker_types"),bC=VS("typeahead_urls"),vC=VS("anchor_top"),yC=VS("anchor_bottom"),xC=VS("draggable_modal"),wC=VS("statusbar"),_C=VS("elementpath"),SC=VS("branding"),CC=VS("resize"),kC=VS("paste_as_text"),EC=VS("sidebar_show"),TC=VS("promotion"),OC=VS("help_accessibility"),AC=VS("default_font_stack"),MC=VS("skin"),PC=e=>!1===e.options.get("skin"),DC=e=>!1!==e.options.get("menubar"),LC=e=>{const t=e.options.get("skin_url");if(PC(e))return t;if(t)return e.documentBaseURI.toAbsolute(t);{const t=e.options.get("skin");return HS.baseURL+"/skins/ui/"+t}},RC=e=>e.options.get("line_height_formats").split(" "),NC=e=>{const t=hC(e),o=i(t),n=l(t)&&t.length>0;return!BC(e)&&(n||o||!0===t)},IC=e=>{const t=I(9,(t=>e.options.get("toolbar"+(t+1)))),o=j(t,i);return $e(o.length>0,o)},BC=e=>IC(e).fold((()=>{const t=hC(e);return f(t,i)&&t.length>0}),O),zC=e=>sC(e)===IS.bottom,FC=e=>{var t;if(!e.inline)return A.none();const o=null!==(t=aC(e))&&void 0!==t?t:"";if(o.length>0)return Yn(an(),o);const n=lC(e);return m(n)?A.some(at.fromDom(n)):A.none()},HC=e=>e.inline&&FC(e).isSome(),jC=e=>FC(e).getOrThunk((()=>_o(wo(at.fromDom(e.getElement()))))),VC=e=>e.inline&&!DC(e)&&!NC(e)&&!BC(e),UC=e=>(e.options.get("toolbar_sticky")||e.inline)&&!HC(e)&&!VC(e),ZC=e=>!HC(e)&&"split"===e.options.get("ui_mode"),$C=e=>{const t=e.options.get("menu");return le(t,(e=>({...e,items:e.items})))};var WC=Object.freeze({__proto__:null,get ToolbarMode(){return NS},get ToolbarLocation(){return IS},register:ZS,getSkinUrl:LC,getSkinUrlOption:e=>A.from(e.options.get("skin_url")),isReadOnly:$S,isDisabled:WS,getSkin:MC,isSkinDisabled:PC,getHeightOption:qS,getWidthOption:GS,getMinWidthOption:YS,getMinHeightOption:KS,getMaxWidthOption:XS,getMaxHeightOption:JS,getUserStyleFormats:QS,shouldMergeStyleFormats:eC,shouldAutoHideStyleFormats:tC,getLineHeightFormats:RC,getContentLanguages:oC,getRemovedMenuItems:nC,isMenubarEnabled:DC,isMultipleToolbars:BC,isToolbarEnabled:NC,isToolbarPersist:cC,getMultipleToolbarsOption:IC,getUiContainer:jC,useFixedContainer:HC,isSplitUiMode:ZC,getToolbarMode:rC,isDraggableModal:xC,isDistractionFree:VC,isStickyToolbar:UC,getStickyToolbarOffset:dC,getToolbarLocation:sC,isToolbarLocationBottom:zC,getToolbarGroups:iC,getMenus:$C,getMenubar:uC,getToolbar:hC,getFilePickerCallback:mC,getFilePickerTypes:fC,useTypeaheadUrls:bC,getAnchorTop:vC,getAnchorBottom:yC,getFilePickerValidatorHandler:pC,getFontSizeInputDefaultUnit:gC,useStatusBar:wC,useElementPath:_C,promotionEnabled:TC,useBranding:SC,getResize:CC,getPasteAsText:kC,getSidebarShow:EC,useHelpAccessibility:OC,getDefaultFontStack:AC});const qC=["visible","hidden","clip"],GC=e=>tt(e).length>0&&!R(qC,e),YC=e=>{if(eo(e)){const t=pn(e,"overflow-x"),o=pn(e,"overflow-y");return GC(t)||GC(o)}return!1},KC=e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen(),XC=(e,t)=>ZC(e)?((e,t)=>{const o=mr(t,YC),n=0===o.length?So(t).map(Co).map((e=>mr(e,YC))).getOr([]):o;return te(n).map((t=>({element:t,others:n.slice(1),isFullscreen:()=>KC(e)})))})(e,t):A.none(),JC=e=>{const t=[...z(e.others,Fr),Vr()];return e.isFullscreen()?Vr():((e,t)=>U(t,((e,t)=>jr(e,t)),e))(Fr(e.element),t)},{entries:QC,setPrototypeOf:ek,isFrozen:tk,getPrototypeOf:ok,getOwnPropertyDescriptor:nk}=Object;let{freeze:rk,seal:ik,create:sk}=Object,{apply:ak,construct:lk}="undefined"!=typeof Reflect&&Reflect;rk||(rk=function(e){return e}),ik||(ik=function(e){return e}),ak||(ak=function(e,t,o){return e.apply(t,o)}),lk||(lk=function(e,t){return new e(...t)});const ck=Ck(Array.prototype.forEach),dk=Ck(Array.prototype.lastIndexOf),uk=Ck(Array.prototype.pop),hk=Ck(Array.prototype.push),mk=Ck(Array.prototype.splice),pk=Ck(String.prototype.toLowerCase),gk=Ck(String.prototype.toString),fk=Ck(String.prototype.match),bk=Ck(String.prototype.replace),vk=Ck(String.prototype.indexOf),yk=Ck(String.prototype.trim),xk=Ck(Object.prototype.hasOwnProperty),wk=Ck(RegExp.prototype.test),_k=(Sk=TypeError,function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return lk(Sk,t)});var Sk;function Ck(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return ak(e,t,n)}}function kk(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pk;ek&&ek(e,null);let n=t.length;for(;n--;){let r=t[n];if("string"==typeof r){const e=o(r);e!==r&&(tk(t)||(t[n]=e),r=e)}e[r]=!0}return e}function Ek(e){for(let t=0;t<e.length;t++){xk(e,t)||(e[t]=null)}return e}function Tk(e){const t=sk(null);for(const[o,n]of QC(e)){xk(e,o)&&(Array.isArray(n)?t[o]=Ek(n):n&&"object"==typeof n&&n.constructor===Object?t[o]=Tk(n):t[o]=n)}return t}function Ok(e,t){for(;null!==e;){const o=nk(e,t);if(o){if(o.get)return Ck(o.get);if("function"==typeof o.value)return Ck(o.value)}e=ok(e)}return function(){return null}}const Ak=rk(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mk=rk(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Pk=rk(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Dk=rk(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Lk=rk(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Rk=rk(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nk=rk(["#text"]),Ik=rk(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Bk=rk(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),zk=rk(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Fk=rk(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Hk=ik(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jk=ik(/<%[\w\W]*|[\w\W]*%>/gm),Vk=ik(/\$\{[\w\W]*/gm),Uk=ik(/^data-[\-\w.\u00B7-\uFFFF]+$/),Zk=ik(/^aria-[\-\w]+$/),$k=ik(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wk=ik(/^(?:\w+script|data):/i),qk=ik(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gk=ik(/^html$/i),Yk=ik(/^[a-z][.\w]*(-[.\w]+)+$/i);var Kk=Object.freeze({__proto__:null,ARIA_ATTR:Zk,ATTR_WHITESPACE:qk,CUSTOM_ELEMENT:Yk,DATA_ATTR:Uk,DOCTYPE_NAME:Gk,ERB_EXPR:jk,IS_ALLOWED_URI:$k,IS_SCRIPT_OR_DATA:Wk,MUSTACHE_EXPR:Hk,TMPLIT_EXPR:Vk});const Xk=1,Jk=3,Qk=7,eE=8,tE=9,oE=function(){return"undefined"==typeof window?null:window};var nE=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oE();const o=t=>e(t);if(o.version="3.2.4",o.removed=[],!t||!t.document||t.document.nodeType!==tE||!t.Element)return o.isSupported=!1,o;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:p}=t,g=c.prototype,f=Ok(g,"cloneNode"),b=Ok(g,"remove"),v=Ok(g,"nextSibling"),y=Ok(g,"childNodes"),x=Ok(g,"parentNode");if("function"==typeof a){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let w,_="";const{implementation:S,createNodeIterator:C,createDocumentFragment:k,getElementsByTagName:E}=n,{importNode:T}=r;let O={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof QC&&"function"==typeof x&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:M,TMPLIT_EXPR:P,DATA_ATTR:D,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:I}=Kk;let{IS_ALLOWED_URI:B}=Kk,z=null;const F=kk({},[...Ak,...Mk,...Pk,...Lk,...Nk]);let H=null;const j=kk({},[...Ik,...Bk,...zk,...Fk]);let V=Object.seal(sk(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),U=null,Z=null,$=!0,W=!0,q=!1,G=!0,Y=!1,K=!0,X=!1,J=!1,Q=!1,ee=!1,te=!1,oe=!1,ne=!0,re=!1,ie=!0,se=!1,ae={},le=null;const ce=kk({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const ue=kk({},["audio","video","img","source","image","track"]);let he=null;const me=kk({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml";let be=fe,ve=!1,ye=null;const xe=kk({},[pe,ge,fe],gk);let we=kk({},["mi","mo","mn","ms","mtext"]),_e=kk({},["annotation-xml"]);const Se=kk({},["title","style","font","a","script"]);let Ce=null;const ke=["application/xhtml+xml","text/html"];let Ee=null,Te=null;const Oe=n.createElement("form"),Ae=function(e){return e instanceof RegExp||e instanceof Function},Me=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"==typeof e||(e={}),e=Tk(e),Ce=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===Ce?gk:pk,z=xk(e,"ALLOWED_TAGS")?kk({},e.ALLOWED_TAGS,Ee):F,H=xk(e,"ALLOWED_ATTR")?kk({},e.ALLOWED_ATTR,Ee):j,ye=xk(e,"ALLOWED_NAMESPACES")?kk({},e.ALLOWED_NAMESPACES,gk):xe,he=xk(e,"ADD_URI_SAFE_ATTR")?kk(Tk(me),e.ADD_URI_SAFE_ATTR,Ee):me,de=xk(e,"ADD_DATA_URI_TAGS")?kk(Tk(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=xk(e,"FORBID_CONTENTS")?kk({},e.FORBID_CONTENTS,Ee):ce,U=xk(e,"FORBID_TAGS")?kk({},e.FORBID_TAGS,Ee):{},Z=xk(e,"FORBID_ATTR")?kk({},e.FORBID_ATTR,Ee):{},ae=!!xk(e,"USE_PROFILES")&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||$k,be=e.NAMESPACE||fe,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,_e=e.HTML_INTEGRATION_POINTS||_e,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),ae&&(z=kk({},Nk),H=[],!0===ae.html&&(kk(z,Ak),kk(H,Ik)),!0===ae.svg&&(kk(z,Mk),kk(H,Bk),kk(H,Fk)),!0===ae.svgFilters&&(kk(z,Pk),kk(H,Bk),kk(H,Fk)),!0===ae.mathMl&&(kk(z,Lk),kk(H,zk),kk(H,Fk))),e.ADD_TAGS&&(z===F&&(z=Tk(z)),kk(z,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(H===j&&(H=Tk(H)),kk(H,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&kk(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=Tk(le)),kk(le,e.FORBID_CONTENTS,Ee)),ie&&(z["#text"]=!0),X&&kk(z,["html","head","body"]),z.table&&(kk(z,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let o=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(o=t.getAttribute(n));const r="dompurify"+(o?"#"+o:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,i)),null!==w&&"string"==typeof _&&(_=w.createHTML(""));rk&&rk(e),Te=e}},Pe=kk({},[...Mk,...Pk,...Dk]),De=kk({},[...Lk,...Rk]),Le=function(e){hk(o.removed,{element:e});try{x(e).removeChild(e)}catch(t){b(e)}},Re=function(e,t){try{hk(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){hk(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ne=function(e){let t=null,o=null;if(Q)e="<remove></remove>"+e;else{const t=fk(e,/^[\r\n\t ]+/);o=t&&t[0]}"application/xhtml+xml"===Ce&&be===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=w?w.createHTML(e):e;if(be===fe)try{t=(new m).parseFromString(r,Ce)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(be,"template",null);try{t.documentElement.innerHTML=ve?_:r}catch(e){}}const i=t.body||t.documentElement;return e&&o&&i.insertBefore(n.createTextNode(o),i.childNodes[0]||null),be===fe?E.call(t,X?"html":"body")[0]:X?t.documentElement:i},Ie=function(e){return C.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Be=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},ze=function(e){return"function"==typeof l&&e instanceof l};function Fe(e,t,n){ck(e,(e=>{e.call(o,t,n,Te)}))}const He=function(e){let t=null;if(Fe(O.beforeSanitizeElements,e,null),Be(e))return Le(e),!0;const n=Ee(e.nodeName);if(Fe(O.uponSanitizeElement,e,{tagName:n,allowedTags:z}),e.hasChildNodes()&&!ze(e.firstElementChild)&&wk(/<[/\w]/g,e.innerHTML)&&wk(/<[/\w]/g,e.textContent))return Le(e),!0;if(e.nodeType===Qk)return Le(e),!0;if(K&&e.nodeType===eE&&wk(/<[/\w]/g,e.data))return Le(e),!0;if(!z[n]||U[n]){if(!U[n]&&Ve(n)){if(V.tagNameCheck instanceof RegExp&&wk(V.tagNameCheck,n))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(n))return!1}if(ie&&!le[n]){const t=x(e)||e.parentNode,o=y(e)||e.childNodes;if(o&&t){for(let n=o.length-1;n>=0;--n){const r=f(o[n],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const o=pk(e.tagName),n=pk(t.tagName);return!!ye[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?"svg"===o:t.namespaceURI===pe?"svg"===o&&("annotation-xml"===n||we[n]):Boolean(Pe[o]):e.namespaceURI===pe?t.namespaceURI===fe?"math"===o:t.namespaceURI===ge?"math"===o&&_e[n]:Boolean(De[o]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!_e[n])&&!(t.namespaceURI===pe&&!we[n])&&!De[o]&&(Se[o]||!Pe[o]):!("application/xhtml+xml"!==Ce||!ye[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!wk(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Jk&&(t=e.textContent,ck([A,M,P],(e=>{t=bk(t,e," ")})),e.textContent!==t&&(hk(o.removed,{element:e.cloneNode()}),e.textContent=t)),Fe(O.afterSanitizeElements,e,null),!1):(Le(e),!0)},je=function(e,t,o){if(ne&&("id"===t||"name"===t)&&(o in n||o in Oe))return!1;if(W&&!Z[t]&&wk(D,t));else if($&&wk(L,t));else if(!H[t]||Z[t]){if(!(Ve(e)&&(V.tagNameCheck instanceof RegExp&&wk(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&wk(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&wk(V.tagNameCheck,o)||V.tagNameCheck instanceof Function&&V.tagNameCheck(o))))return!1}else if(he[t]);else if(wk(B,bk(o,N,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==vk(o,"data:")||!de[e]){if(q&&!wk(R,bk(o,N,"")));else if(o)return!1}else;return!0},Ve=function(e){return"annotation-xml"!==e&&fk(e,I)},Ue=function(e){Fe(O.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Be(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:s,namespaceURI:a,value:l}=i,c=Ee(s);let d="value"===s?l:yk(l);const u=d;if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Fe(O.uponSanitizeAttribute,e,n),d=n.attrValue,!re||"id"!==c&&"name"!==c||(Re(s,e),d="user-content-"+d),K&&wk(/((--!?|])>)|<\/(style|title)/i,d)){Re(s,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Re(s,e);continue}if(!G&&wk(/\/>/i,d)){Re(s,e);continue}Y&&ck([A,M,P],(e=>{d=bk(d,e," ")}));const h=Ee(e.nodeName);if(je(h,c,d)){if(w&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(a);else switch(p.getAttributeType(h,c)){case"TrustedHTML":d=w.createHTML(d);break;case"TrustedScriptURL":d=w.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),Be(e)?Le(e):uk(o.removed)}catch(e){}}else Re(s,e)}Fe(O.afterSanitizeAttributes,e,null)},Ze=function e(t){let o=null;const n=Ie(t);for(Fe(O.beforeSanitizeShadowDOM,t,null);o=n.nextNode();)Fe(O.uponSanitizeShadowNode,o,null),He(o),Ue(o),o.content instanceof s&&e(o.content);Fe(O.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,a=null,c=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ze(e)){if("function"!=typeof e.toString)throw _k("toString is not a function");if("string"!=typeof(e=e.toString()))throw _k("dirty is not a string, aborting")}if(!o.isSupported)return e;if(J||Me(t),o.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=Ee(e.nodeName);if(!z[t]||U[t])throw _k("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=Ne("\x3c!----\x3e"),i=n.ownerDocument.importNode(e,!0),i.nodeType===Xk&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return w&&oe?w.createHTML(e):e;if(n=Ne(e),!n)return ee?null:oe?_:""}n&&Q&&Le(n.firstChild);const d=Ie(se?e:n);for(;a=d.nextNode();)He(a),Ue(a),a.content instanceof s&&Ze(a.content);if(se)return e;if(ee){if(te)for(c=k.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(H.shadowroot||H.shadowrootmode)&&(c=T.call(r,c,!0)),c}let u=X?n.outerHTML:n.innerHTML;return X&&z["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&wk(Gk,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),Y&&ck([A,M,P],(e=>{u=bk(u,e," ")})),w&&oe?w.createHTML(u):u},o.setConfig=function(){Me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},o.clearConfig=function(){Te=null,J=!1},o.isValidAttribute=function(e,t,o){Te||Me({});const n=Ee(e),r=Ee(t);return je(n,r,o)},o.addHook=function(e,t){"function"==typeof t&&hk(O[e],t)},o.removeHook=function(e,t){if(void 0!==t){const o=dk(O[e],t);return-1===o?void 0:mk(O[e],o,1)[0]}return uk(O[e])},o.removeHooks=function(e){O[e]=[]},o.removeAllHooks=function(){O={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();const rE=e=>nE().sanitize(e);var iE=tinymce.util.Tools.resolve("tinymce.util.I18n");const sE={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-disc":!0,"list-bull-default":!0,"list-bull-square":!0},aE="temporary-placeholder",lE=e=>()=>fe(e,aE).getOr("!not found!"),cE=(e,t)=>{const o=e.toLowerCase();if(iE.isRtl()){const e=((e,t)=>et(e,t)?e:((e,t)=>e+t)(e,t))(o,"-rtl");return be(t,e)?e:o}return o},dE=(e,t)=>fe(t,cE(e,t)),uE=(e,t)=>{const o=t();return dE(e,o).getOrThunk(lE(o))},hE=()=>Rd("add-focusable",[yd((e=>{Gn(e.element,"svg").each((e=>$o(e,"focusable","false")))}))]),mE=(e,t,o,n)=>{var r,i;const s=(e=>!!iE.isRtl()&&be(sE,e))(t)?["tox-icon--flip"]:[],a=fe(o,cE(t,o)).or(n).getOrThunk(lE(o));return{dom:{tag:e.tag,attributes:null!==(r=e.attributes)&&void 0!==r?r:{},classes:e.classes.concat(s),innerHtml:a},behaviours:Od([...null!==(i=e.behaviours)&&void 0!==i?i:[],hE()])}},pE=(e,t,o,n=A.none())=>mE(t,e,o(),n),gE={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},fE=Hg({name:"Notification",factory:e=>{const t=Be("notification-text"),o=oy({dom:ty(`<p id=${t}>${rE(e.backstageProvider.translate(e.text))}</p>`),behaviours:Od([Cm.config({})])}),n=e=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${e}%`}}}),r=e=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${e}%`}}),i=oy({dom:{tag:"div",classes:e.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(0)]},r(0)],behaviours:Od([Cm.config({})])}),s={updateProgress:(e,t)=>{e.getSystem().isConnected()&&i.getOpt(e).each((e=>{Cm.set(e,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[n(t)]},r(t)])}))},updateText:(e,t)=>{if(e.getSystem().isConnected()){const n=o.get(e);Cm.set(n,[op(t)])}}},a=W([e.icon.toArray(),[e.level],A.from(gE[e.level]).toArray()]),l=oy(xy.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":e.backstageProvider.translate("Close")}},components:[pE("close",{tag:"span",classes:["tox-icon"]},e.iconProvider)],buttonBehaviours:Od([Lv.config({}),Qv.config({...e.backstageProvider.tooltips.getConfig({tooltipText:e.backstageProvider.translate("Close")})})]),action:t=>{e.onAction(t)}})),c=((e,t,o)=>{const n=o(),r=Z(e,(e=>be(n,cE(e,n))));return mE(t,r.getOr(aE),n,A.none())})(a,{tag:"div",classes:["tox-notification__icon"]},e.iconProvider),d=[c,{dom:{tag:"div",classes:["tox-notification__body"]},components:[o.asSpec()],behaviours:Od([Cm.config({})])}];return{uid:e.uid,dom:{tag:"div",attributes:{role:"alert","aria-labelledby":t},classes:["tox-notification","tox-notification--in",`tox-notification--${e.level}`]},behaviours:Od([Lv.config({}),Fd.config({}),$h.config({mode:"special",onEscape:t=>(e.onAction(t),A.some(!0))})]),components:d.concat(e.progress?[i.asSpec()]:[]).concat([l.asSpec()]),apis:s}},configFields:[fs("level","info",["success","error","warning","warn","info"]),Yi("progress"),rs("icon"),Yi("onAction"),Yi("text"),Yi("iconProvider"),Yi("backstageProvider")],apis:{updateProgress:(e,t,o)=>{e.updateProgress(t,o)},updateText:(e,t,o)=>{e.updateText(t,o)}}});var bE=(e,t,o,n)=>{const r=t.backstage.shared,i=()=>at.fromDom(""===e.queryCommandValue("ToggleView")?e.getContentAreaContainer():e.getContainer()),s=()=>{const e=Fr(i());return A.some(e)},a=e=>{s().each((t=>{F(e,(e=>{yn(e.element,"width"),On(e.element)>t.width&&un(e.element,"width",t.width+"px")}))}))};return{open:(t,l,c)=>{const d=()=>{const t=(t,o)=>{$x.hide(t),n.clear(),o&&e.focus()},o=(e,t)=>{t&&$h.focusIn(e)};n.on((e=>{l();const n=c();(e=>{Cm.remove(e,u),h()})(e),((e,n)=>{0===po(e.element).length?t(e,n):o(e,n)})(e,n)}))},u=sp(fE.sketch({text:t.text,level:R(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:t.icon,onAction:d,iconProvider:r.providers.icons,backstageProvider:r.providers}));if(n.isSet()){const e=ap(u);n.on((t=>{Cm.append(t,e),$x.reposition(t),u.hasConfigured(cg)&&cg.refresh(t),a(t.components())}))}else{const t=sp($x.sketch({dom:{tag:"div",classes:["tox-notifications-container"],attributes:{"aria-label":"Notifications",role:"region"}},lazySink:r.getSink,fireDismissalEventInstead:{},...r.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Od([$h.config({mode:"cyclic",selector:".tox-notification, .tox-notification a, .tox-notification button"}),Cm.config({}),...UC(e)&&r.header.isPositionedAtTop()?[]:[cg.config({contextual:{lazyContext:()=>A.some(Fr(i())),fadeInClass:"tox-notification-container-dock-fadein",fadeOutClass:"tox-notification-container-dock-fadeout",transitionClass:"tox-notification-container-dock-transition"},modes:["top"],lazyViewport:t=>XC(e,t.element).map((e=>({bounds:JC(e),optScrollEnv:A.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Rn(e.element).top})}))).getOrThunk((()=>({bounds:Vr(),optScrollEnv:A.none()})))})]])})),a=ap(u),l={maxHeightFunction:$c()},c={...r.anchors.banner(),overrides:l};n.set(t),o.add(t),$x.showWithinBounds(t,a,{anchor:c},s)}g(t.timeout)&&t.timeout>0&&zS.setEditorTimeout(e,(()=>{d()}),t.timeout);const h=()=>{n.on((e=>{$x.reposition(e),e.hasConfigured(cg)&&cg.refresh(e),a(e.components())}))};return{close:d,reposition:h,text:e=>{fE.updateText(u,e)},settings:t,getEl:()=>u.element.dom,progressBar:{value:e=>{fE.updateProgress(u,e)}}}},close:e=>{e.close()},getArgs:e=>e.settings}};const vE=(e,t)=>{const o=(e,t)=>{nd(e,Bs(),{raw:t})},n=()=>e.getMenu().bind(gu.getHighlighted);t.on("keydown",(t=>{const r=t.which;e.isActive()&&(e.isMenuOpen()?13===r?(n().each(rd),t.preventDefault()):40===r?(n().fold((()=>{e.getMenu().each(gu.highlightFirst)}),(e=>{o(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==r&&38!==r&&39!==r||n().each((e=>{o(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==r&&38!==r&&40!==r||e.cancelIfNecessary())})),t.on("NodeChange",(()=>{!e.isActive()||e.isProcessingAction()||t.queryCommandState("mceAutoCompleterInRange")||e.cancelIfNecessary()}))};var yE;!function(e){e[e.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",e[e.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(yE||(yE={}));var xE=yE;const wE="tox-menu-nav__js",_E="tox-collection__item",SE="tox-swatch",CE={normal:wE,color:SE},kE="tox-collection__item--enabled",EE="tox-collection__item-icon",TE="tox-collection__item-label",OE="tox-collection__item-caret",AE="tox-collection__item--active",ME="tox-collection__item-container",PE="tox-collection__item-container--row",DE=e=>fe(CE,e).getOr(wE),LE=e=>"color"===e?"tox-swatches":"tox-menu",RE=e=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:LE(e),tieredMenu:"tox-tiered-menu"}),NE=e=>{const t=RE(e);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:DE(e)}},IE=(e,t,o)=>{const n=RE(o);return{tag:"div",classes:W([[n.menu,`tox-menu-${t}-column`],e?[n.hasIcons]:[]])}},BE=[Gy.parts.items({})],zE=(e,t,o)=>{const n=RE(o);return{dom:{tag:"div",classes:W([[n.tieredMenu]])},markers:NE(o)}},FE=Be("refetch-trigger-event"),HE=Be("redirect-menu-item-interaction"),jE="tox-menu__searcher",VE=e=>Yn(e.element,`.${jE}`).bind((t=>e.getSystem().getByDom(t).toOptional())),UE=VE,ZE=e=>({fetchPattern:Rf.getValue(e),selectionStart:e.element.dom.selectionStart,selectionEnd:e.element.dom.selectionEnd}),$E=e=>{const t=(e,t)=>(t.cut(),A.none()),o=(e,t)=>{const o={interactionEvent:t.event,eventType:t.event.raw.type};return nd(e,HE,o),A.some(!0)},n="searcher-events";return{dom:{tag:"div",classes:[_E]},components:[Kx.sketch({inputClasses:[jE,"tox-textfield"],inputAttributes:{...e.placeholder.map((t=>({placeholder:e.i18n(t)}))).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:Od([Rd(n,[ud(Fs(),(e=>{od(e,FE)})),ud(Bs(),((e,t)=>{"Escape"===t.event.raw.key&&t.stop()}))]),$h.config({mode:"special",onLeft:t,onRight:t,onSpace:t,onEnter:o,onEscape:o,onUp:o,onDown:o})]),eventOrder:{keydown:[n,$h.name()]}})]}},WE="tox-collection--results__js",qE=e=>{var t;return e.dom?{...e,dom:{...e.dom,attributes:{...null!==(t=e.dom.attributes)&&void 0!==t?t:{},id:Be("aria-item-search-result-id"),"aria-selected":"false"}}}:e},GE=(e,t)=>o=>{const n=B(o,t);return z(n,(t=>({dom:e,components:t})))},YE=(e,t)=>{const o=[];let n=[];return F(e,((e,r)=>{t(e,r)?(n.length>0&&o.push(n),n=[],(be(e.dom,"innerHtml")||e.components&&e.components.length>0)&&n.push(e)):n.push(e)})),n.length>0&&o.push(n),z(o,(e=>({dom:{tag:"div",classes:["tox-collection__group"]},components:e})))},KE=(e,t,o)=>Gy.parts.items({preprocess:n=>{const r=z(n,o);return"auto"!==e&&e>1?GE({tag:"div",classes:["tox-collection__group"]},e)(r):YE(r,((e,o)=>"separator"===t[o].type))}}),XE=(e,t,o=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[KE(e,t,w)]}),JE=e=>N(e,(e=>"icon"in e&&void 0!==e.icon)),QE=e=>(console.error(Ui(e)),console.log(e),A.none()),eT=(e,t,o,n,r)=>{const i=(s=o,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Gy.parts.items({preprocess:e=>YE(e,((e,t)=>"separator"===s[t].type))})]});var s;return{value:e,dom:i.dom,components:i.components,items:o}},tT=(e,t,o,n,r)=>{const i=()=>"searchable"!==r.menuType?XE(n,o):"search-with-field"===r.searchMode.searchMode?((e,t,o)=>{const n=Be("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[$E({i18n:iE.translate,placeholder:o.placeholder}),{dom:{tag:"div",classes:[...1===e?["tox-collection--list"]:["tox-collection--grid"],WE],attributes:{id:n}},components:[KE(e,t,qE)]}]}})(n,o,r.searchMode):((e,t,o=!0)=>{const n=Be("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",WE].concat(1===e?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:n}},components:[KE(e,t,qE)]}})(n,o);if("color"===r.menuType){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Gy.parts.items({preprocess:"auto"!==e?GE({tag:"div",classes:["tox-swatches__row"]},e):w})]}]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}if("imageselector"===r.menuType&&"auto"!==n){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-image-selector-menu"]},components:[{dom:{tag:"div",classes:["tox-image-selector"]},components:[Gy.parts.items({preprocess:"auto"!==e?GE({tag:"div",classes:["tox-image-selector__row"]},e):w})]}]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===r.menuType&&"auto"===n){const t=XE(n,o);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===r.menuType||"searchable"===r.menuType){const t=i();return{value:e,dom:t.dom,components:t.components,items:o}}if("listpreview"===r.menuType&&"auto"!==n){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Gy.parts.items({preprocess:GE({tag:"div",classes:["tox-collection__group"]},e)})]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}return{value:e,dom:IE(t,n,r.menuType),components:BE,items:o}},oT=Ji("type"),nT=Ji("name"),rT=Ji("label"),iT=Ji("text"),sT=Ji("title"),aT=Ji("icon"),lT=Ji("url"),cT=Ji("value"),dT=es("fetch"),uT=es("getSubmenuItems"),hT=es("onAction"),mT=es("onItemAction"),pT=vs("onSetup",(()=>b)),gT=as("name"),fT=as("text"),bT=as("role"),vT=as("icon"),yT=as("tooltip"),xT=as("label"),wT=as("shortcut"),_T=cs("select"),ST=bs("active",!1),CT=bs("borderless",!1),kT=bs("enabled",!0),ET=bs("primary",!1),TT=e=>hs("columns",e),OT=hs("meta",{}),AT=vs("onAction",b),MT=e=>gs("type",e),PT=e=>Wi("name","name",vi((()=>Be(`${e}-name`))),mi),DT=[oT,iT,Qi("level",["info","warn","error","success"]),aT,hs("url","")],LT=Pi(DT),RT=[oT,iT,kT,PT("button"),vT,CT,ls("buttonType",["primary","secondary","toolbar"]),ET,gs("context","mode:design")],NT=Pi(RT),IT=[oT,nT],BT=IT.concat([xT]),zT=IT.concat([rT,kT,gs("context","mode:design")]),FT=Pi(zT),HT=pi,jT=BT.concat([TT("auto"),gs("context","mode:design")]),VT=Pi(jT),UT=Ni([cT,iT,aT]),ZT=BT.concat([gs("storageKey","default"),gs("context","mode:design")]),$T=Pi(ZT),WT=mi,qT=Pi(BT),GT=mi,YT=IT.concat([gs("tag","textarea"),Ji("scriptId"),Ji("scriptUrl"),cs("onFocus"),((e,t)=>ms(e,t,bi))("settings",void 0)]),KT=IT.concat([gs("tag","textarea"),es("init")]),XT=zi((e=>Hi("customeditor.old",Mi(KT),e).orThunk((()=>Hi("customeditor.new",Mi(YT),e))))),JT=mi,QT=[kT,fT,bT,wT,(eO="menuitem",Wi("value","value",vi((()=>Be(`${eO}-value`))),di())),OT,gs("context","mode:design")];var eO;const tO=Pi([oT,nT].concat(QT)),oO=pi,nO=[PT("button"),vT,fs("align","end",["start","end"]),ET,kT,ls("buttonType",["primary","secondary"]),gs("context","mode:design")],rO=[...nO,iT],iO=[Qi("type",["submit","cancel","custom"]),...rO],sO=[Qi("type",["menu"]),fT,yT,vT,ns("items",tO),...nO],aO=[...nO,Qi("type",["togglebutton"]),yT,vT,fT,bs("active",!1)],lO=Zi("type",{submit:iO,cancel:iO,custom:iO,menu:sO,togglebutton:aO}),cO=BT.concat([gs("context","mode:design")]),dO=Pi(cO),uO=Di(ci),hO=e=>[oT,Xi("columns"),e],mO=[oT,Ji("html"),fs("presets","presentation",["presentation","document"]),vs("onInit",b),bs("stretched",!1)],pO=Pi(mO),gO=BT.concat([bs("border",!1),bs("sandboxed",!0),bs("streamContent",!1),bs("transparent",!0)]),fO=Pi(gO),bO=mi,vO=Pi(IT.concat([as("height")])),yO=Pi([Ji("url"),ss("zoom"),ss("cachedWidth"),ss("cachedHeight")]),xO=BT.concat([as("inputMode"),as("placeholder"),bs("maximized",!1),kT,gs("context","mode:design")]),wO=Pi(xO),_O=mi,SO=e=>[oT,rT,e,fs("align","start",["start","center","end"]),as("for")],CO=[iT,cT],kO=[iT,ns("items",$i(0,(()=>EO)))],EO=Li([Pi(CO),Pi(kO)]),TO=BT.concat([ns("items",EO),kT,gs("context","mode:design")]),OO=Pi(TO),AO=mi,MO=BT.concat([os("items",[iT,cT]),ps("size",1),kT,gs("context","mode:design")]),PO=Pi(MO),DO=mi,LO=BT.concat([bs("constrain",!0),kT,gs("context","mode:design")]),RO=Pi(LO),NO=Pi([Ji("width"),Ji("height")]),IO=IT.concat([rT,ps("min",0),ps("max",0)]),BO=Pi(IO),zO=hi,FO=[oT,ns("header",mi),ns("cells",Di(mi))],HO=Pi(FO),jO=BT.concat([as("placeholder"),bs("maximized",!1),kT,gs("context","mode:design")]),VO=Pi(jO),UO=mi,ZO=[gs("buttonType","default"),as("text"),as("tooltip"),as("icon"),ms("search",!1,Li([pi,Pi([as("placeholder")])],(e=>d(e)?e?A.some({placeholder:A.none()}):A.none():A.some(e)))),es("fetch"),vs("onSetup",(()=>b)),gs("context","mode:design")],$O=Pi([oT,...ZO]),WO=e=>Hi("menubutton",$O,e),qO=[Qi("type",["directory","leaf"]),sT,Ji("id"),is("menu",$O),as("customStateIcon"),as("customStateIconTooltip")],GO=Pi(qO),YO=qO.concat([ns("children",$i(0,(()=>Bi("type",{directory:KO,leaf:GO}))))]),KO=Pi(YO),XO=Bi("type",{directory:KO,leaf:GO}),JO=[oT,ns("items",XO),cs("onLeafAction"),cs("onToggleExpand"),ys("defaultExpandedIds",[],mi),as("defaultSelectedId")],QO=Pi(JO),eA=BT.concat([fs("filetype","file",["image","media","file"]),kT,as("picker_text"),gs("context","mode:design")]),tA=Pi(eA),oA=Pi([cT,OT]),nA=e=>Wi("items","items",{tag:"required",process:{}},Di(zi((t=>Hi(`Checking item of ${e}`,rA,t).fold((e=>Ae.error(Ui(e))),(e=>Ae.value(e))))))),rA=Oi((()=>{return Bi("type",{alertbanner:LT,bar:Pi((e=nA("bar"),[oT,e])),button:NT,checkbox:FT,colorinput:$T,colorpicker:qT,dropzone:dO,grid:Pi(hO(nA("grid"))),iframe:fO,input:wO,listbox:OO,selectbox:PO,sizeinput:RO,slider:BO,textarea:VO,urlinput:tA,customeditor:XT,htmlpanel:pO,imagepreview:vO,collection:VT,label:Pi(SO(nA("label"))),table:HO,tree:QO,panel:sA});var e})),iA=[oT,hs("classes",[]),ns("items",rA)],sA=Pi(iA),aA=[PT("tab"),sT,ns("items",rA)],lA=[oT,os("tabs",aA)],cA=Pi(lA),dA=rO,uA=lO,hA=Pi([Ji("title"),Ki("body",Bi("type",{panel:sA,tabpanel:cA})),gs("size","normal"),ys("buttons",[],uA),hs("initialData",{}),vs("onAction",b),vs("onChange",b),vs("onSubmit",b),vs("onClose",b),vs("onCancel",b),vs("onTabChange",b)]),mA=Pi([Qi("type",["cancel","custom"]),...dA]),pA=Pi([Ji("title"),Ji("url"),ss("height"),ss("width"),ds("buttons",mA),vs("onAction",b),vs("onCancel",b),vs("onClose",b),vs("onMessage",b)]),gA=e=>s(e)?[e].concat(q(ge(e),gA)):l(e)?q(e,gA):[],fA=e=>i(e.type)&&i(e.name),bA={checkbox:HT,colorinput:WT,colorpicker:GT,dropzone:uO,input:_O,iframe:bO,imagepreview:yO,selectbox:DO,sizeinput:NO,slider:zO,listbox:AO,size:NO,textarea:UO,urlinput:oA,customeditor:JT,collection:UT,togglemenuitem:oO},vA=e=>{const t=(e=>j(gA(e),fA))(e),o=q(t,(e=>(e=>A.from(bA[e.type]))(e).fold((()=>[]),(t=>[Ki(e.name,t)]))));return Pi(o)},yA=e=>{var t;return{internalDialog:ji(Hi("dialog",hA,e)),dataValidator:vA(e),initialData:null!==(t=e.initialData)&&void 0!==t?t:{}}},xA={open:(e,t)=>{const o=yA(t);return e(o.internalDialog,o.initialData,o.dataValidator)},openUrl:(e,t)=>e(ji(Hi("dialog",pA,t))),redial:e=>yA(e)},wA=Pi([oT,fT]),_A=Pi([MT("autocompleteitem"),ST,kT,OT,cT,fT,vT]);Pi([oT,Ji("trigger"),ps("minChars",1),TT(1),ps("maxResults",10),cs("matches"),dT,hT,ys("highlightOn",[],mi)]);const SA=[kT,yT,vT,fT,pT,gs("context","mode:design")],CA=Pi([oT,hT,wT].concat(SA)),kA=e=>Hi("toolbarbutton",CA,e),EA=[ST].concat(SA),TA=Pi(EA.concat([oT,hT,wT])),OA=e=>Hi("ToggleButton",TA,e),AA=[vs("predicate",T),fs("scope","node",["node","editor"]),fs("position","selection",["node","selection","line"])],MA=SA.concat([MT("contextformbutton"),gs("align","end"),ET,hT,qi("original",w)]),PA=EA.concat([MT("contextformbutton"),gs("align","end"),ET,hT,qi("original",w)]),DA=SA.concat([MT("contextformbutton")]),LA=EA.concat([MT("contextformtogglebutton")]),RA=[xT,ns("commands",Zi("type",{contextformbutton:MA,contextformtogglebutton:PA})),is("launch",Zi("type",{contextformbutton:DA,contextformtogglebutton:LA})),vs("onInput",b),vs("onSetup",b)],NA=[...AA,...RA,Qi("type",["contextform"]),vs("initValue",x("")),as("placeholder")],IA=[...AA,...RA,Qi("type",["contextsliderform"]),vs("initValue",x(0)),vs("min",x(0)),vs("max",x(100))],BA=[...AA,...RA,Qi("type",["contextsizeinputform"]),vs("initValue",x({width:"",height:""}))],zA=Zi("type",{contextform:NA,contextsliderform:IA,contextsizeinputform:BA}),FA=SA.concat([MT("contexttoolbarbutton")]),HA=Pi([MT("contexttoolbar"),us("launch",FA),Ki("items",Li([mi,Ni([as("name"),as("label"),ns("items",mi)])]))].concat(AA)),jA=e=>({name:e.name.getOrUndefined(),label:e.label.getOrUndefined(),items:e.items}),VA=[oT,Ji("src"),as("alt"),ys("classes",[],mi)],UA=Pi(VA),ZA=[oT,iT,gT,ys("classes",["tox-collection__item-label"],mi)],$A=Pi(ZA),WA=Oi((()=>Bi("type",{cardimage:UA,cardtext:$A,cardcontainer:qA}))),qA=Pi([oT,gs("direction","horizontal"),gs("align","left"),gs("valign","middle"),ns("items",WA)]),GA=Pi([oT,xT,ns("items",WA),pT,AT].concat(QT)),YA=Pi([oT,ST,vT,xT].concat(QT)),KA=[oT,Ji("fancytype"),AT],XA=[hs("initData",{})].concat(KA),JA=[cs("select"),xs("initData",{},[bs("allowCustomColors",!0),gs("storageKey","default"),ds("colors",di())])].concat(KA),QA=[cs("select"),ts("initData",[Xi("columns"),ys("items",[],di())])].concat(KA),eM=Zi("fancytype",{inserttable:XA,colorswatch:JA,imageselect:QA}),tM=Pi([oT,ST,lT,xT,yT].concat(QT)),oM=Pi([oT,ST,aT,rT,yT,cT].concat(QT)),nM=Pi([oT,pT,AT,vT].concat(QT)),rM=Pi([oT,uT,pT,vT].concat(QT)),iM=Pi([oT,vT,ST,pT,hT].concat(QT)),sM=Pi([vT,yT,vs("onShow",b),vs("onHide",b),pT]),aM=Pi([oT,Ki("items",Li([Ni([nT,ns("items",mi)]),mi]))].concat(SA)),lM=Pi([oT,yT,vT,fT,_T,dT,pT,fs("presets","normal",["normal","color","listpreview"]),TT(1),hT,mT,gs("context","mode:design")]),cM=[fT,vT,as("tooltip"),fs("buttonType","secondary",["primary","secondary"]),bs("borderless",!1),es("onAction"),gs("context","mode:design")],dM={button:[...cM,iT,Qi("type",["button"])],togglebutton:[...cM,bs("active",!1),Qi("type",["togglebutton"])]},uM=[Qi("type",["group"]),ys("buttons",[],Zi("type",dM))],hM=Zi("type",{...dM,group:uM}),mM=Pi([ys("buttons",[],hM),es("onShow"),es("onHide")]),pM=(e,t,o)=>{const n=pr(e.element,"."+o);if(n.length>0){const e=$(n,(e=>{const o=e.dom.getBoundingClientRect().top,r=n[0].dom.getBoundingClientRect().top;return Math.abs(o-r)>t})).getOr(n.length);return A.some({numColumns:e,numRows:Math.ceil(n.length/e)})}return A.none()},gM=(e,t)=>Od([Rd(e,t)]),fM=e=>gM(Be("unnamed-events"),e),bM=e=>Pp.config({disabled:e,disableClass:"tox-collection__item--state-disabled"}),vM=e=>Pp.config({disabled:e}),yM=e=>Pp.config({disabled:e,disableClass:"tox-tbtn--disabled"}),xM=e=>Pp.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:!1}),wM=(e,t)=>{const o=e.getApi(t);return e=>{e(o)}},_M=(e,t)=>yd((o=>{p(e.onBeforeSetup)&&e.onBeforeSetup(o);wM(e,o)((o=>{const n=e.onSetup(o);p(n)&&t.set(n)}))})),SM=(e,t)=>xd((o=>wM(e,o)(t.get()))),CM=(e,t,o)=>xd((n=>(o.set(Rf.getValue(n)),wM(e,n)(t.get())))),kM="silver.uistate",EM="setDisabled",TM="init",OM=["switchmode",TM],AM=(e,t)=>{const o=e.mainUi.outerContainer,n=[e.mainUi.mothership,...e.uiMotherships];t===EM&&F(n,(e=>{e.broadcastOn([iy()],{target:o.element})})),F(n,(e=>{e.broadcastOn([kM],t)}))},MM=(e,t)=>{e.on("init SwitchMode",(e=>{AM(t,e.type)})),e.on("DisabledStateChange",(o=>{if(!o.isDefaultPrevented()){const n=o.state?EM:TM;AM(t,n),o.state||e.nodeChanged()}})),e.on("NodeChange",(o=>{const n=e.ui.isEnabled()?o.type:EM;AM(t,n)})),$S(e)&&e.mode.set("readonly")},PM=e=>Gb.config({channels:{[kM]:{onReceive:(t,o)=>{if(o===EM||"setEnabled"===o)return void Pp.set(t,o===EM);const{contextType:n,shouldDisable:r}=e();("mode"!==n||R(OM,o))&&Pp.set(t,r)}}}}),DM=(e,t)=>_d(((o,n)=>{wM(e,o)(e.onAction),e.triggersSubmenu||t!==xE.CLOSE_ON_EXECUTE||(o.getSystem().isConnected()&&od(o,oa()),n.stop())})),LM={[Js()]:["disabling","alloy.base.behaviour","toggling","item-events"]},RM=Ve,NM=(e,t,o,n)=>{const r=xe(b);return{type:"item",dom:t.dom,components:RM(t.optComponents),data:e.data,eventOrder:LM,hasSubmenu:e.triggersSubmenu,itemBehaviours:Od([Rd("item-events",[DM(e,o),_M(e,r),SM(e,r)]),bM((()=>!e.enabled||n.checkUiComponentContext(e.context).shouldDisable)),PM((()=>n.checkUiComponentContext(e.context))),Cm.config({})].concat(e.itemBehaviours))}},IM=e=>({value:e.value,meta:{text:e.text.getOr(""),...e.meta}}),BM=(e,t)=>{var o,n;const r=at.fromTag("div");nr(r,"tox-image-selector-loading-spinner");return{dom:{tag:e.tag,attributes:null!==(o=e.attributes)&&void 0!==o?o:{},classes:e.classes},components:[{dom:{tag:"div",classes:["tox-image-selector-image-wrapper"]},components:[{dom:{tag:"img",attributes:{src:t},classes:["tox-image-selector-image-img"]}}]},...e.checkMark.toArray()],behaviours:Od([...null!==(n=e.behaviours)&&void 0!==n?n:[],Rd("render-image-events",[yd((e=>{var t;t=e.element,nr(t,"tox-image-selector-loading-spinner-wrapper"),Vo(t,r),Yn(e.element,"img").each((t=>{nn(t).catch((e=>{console.error(e)})).finally((()=>{(e=>{ir(e,"tox-image-selector-loading-spinner-wrapper"),Jo(r)})(e.element)}))}))}))])])}},zM=e=>{const t=jS.os.isMacOS()||jS.os.isiOS(),o=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},n=e.split("+"),r=z(n,(e=>{const t=e.toLowerCase().trim();return be(o,t)?o[t]:e}));return t?r.join(""):r.join("+")},FM=(e,t,o=[EE])=>pE(e,{tag:"div",classes:o},t),HM=e=>({dom:{tag:"div",classes:[TE]},components:[op(iE.translate(e))]}),jM=(e,t)=>({dom:{tag:"div",classes:t,innerHtml:e}}),VM=(e,t)=>({dom:{tag:"div",classes:[TE]},components:[{dom:{tag:e.tag,styles:e.styles},components:[op(iE.translate(t))]}]}),UM=e=>({dom:{tag:"div",classes:["tox-collection__item-accessory"]},components:[op(zM(e))]}),ZM=e=>FM("checkmark",e,["tox-collection__item-checkmark"]),$M=(e,t,o)=>{const n=e.value,r=e.iconContent.map((e=>((e,t,o)=>{const n=t();return dE(e,n).or(o).getOrThunk(lE(n))})(e,t.icons,o))),i=e.ariaLabel.map((e=>({"aria-label":t.translate(e),"data-mce-name":e}))).getOr({});return{dom:(()=>{const e=SE,t=r.getOr(""),o={tag:"div",attributes:i,classes:[e]};return"custom"===n?{...o,tag:"button",classes:[...o.classes,"tox-swatches__picker-btn"],innerHtml:t}:"remove"===n?{...o,classes:[...o.classes,"tox-swatch--remove"],innerHtml:t}:m(n)?{...o,attributes:{...o.attributes,"data-mce-color":n},styles:{"background-color":n},innerHtml:t}:o})(),optComponents:[]}},WM=(e,t)=>{const o=e.map((e=>({attributes:{id:Be("menu-item"),"aria-label":iE.translate(e)}}))).getOr({});return{tag:"div",classes:[wE,_E].concat(t),...o}},qM=e=>({dom:{tag:"label"},components:[op(e)]}),GM=(e,t,o,n=A.none())=>"color"===e.presets?$M(e,t,n):"img"===e.presets?(e=>{var t,o;return{dom:WM(e.ariaLabel,["tox-collection__item-image-selector"]),optComponents:[A.some((t=e.iconContent.getOrDie(),o={tag:"div",classes:["tox-collection__item-image"],checkMark:e.checkMark},BM(o,t))),e.labelContent.map(qM)]}})(e):((e,t,o,n)=>{const r={tag:"div",classes:[EE]},i=o?e.iconContent.map((e=>pE(e,r,t.icons,n))).orThunk((()=>A.some({dom:r}))):A.none(),s=e.checkMark,a=A.from(e.meta).fold((()=>HM),(e=>be(e,"style")?S(VM,e.style):HM)),l=e.htmlContent.fold((()=>e.textContent.map(a)),(e=>A.some(jM(e,[TE]))));return{dom:WM(e.ariaLabel,[]),optComponents:[i,l,e.shortcutContent.map(UM),s,e.caret,e.labelContent.map(qM)]}})(e,t,o,n),YM=(e,t,o)=>fe(e,"tooltipWorker").map((e=>[Qv.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:e=>({type:"submenu",item:e,overrides:{maxHeightFunction:$c}}),mode:"follow-highlight",onShow:(t,o)=>{e((e=>{Qv.setComponents(t,[np({element:at.fromDom(e)})])}))}})])).getOrThunk((()=>o.map((e=>[Qv.config({...t.providers.tooltips.getConfig({tooltipText:e}),mode:"follow-highlight"})])).getOr([]))),KM=(e,t)=>{const o=(e=>FS.DOM.encode(e))(iE.translate(e));if(t.length>0){const e=new RegExp((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t),"gi");return o.replace(e,(e=>`<span class="tox-autocompleter-highlight">${e}</span>`))}return o},XM=(e,t)=>z(e,(e=>{switch(e.type){case"cardcontainer":return((e,t)=>{const o="vertical"===e.direction?"tox-collection__item-container--column":PE,n="left"===e.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[ME,o,n,(()=>{switch(e.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}})()]},components:t}})(e,XM(e.items,t));case"cardimage":return((e,t,o)=>({dom:{tag:"img",classes:t,attributes:{src:e,alt:o.getOr("")}}}))(e.src,e.classes,e.alt);case"cardtext":const o=e.name.exists((e=>R(t.cardText.highlightOn,e))),n=o?A.from(t.cardText.matchText).getOr(""):"";return jM(KM(e.text,n),e.classes)}})),JM=(e,t,o,n,r,i,s,a=!0)=>{const l=GM({presets:o,textContent:t?e.text:A.none(),htmlContent:A.none(),labelContent:e.label,ariaLabel:e.text,iconContent:e.icon,shortcutContent:t?e.shortcut:A.none(),checkMark:t?A.some(ZM(s.icons)):A.none(),caret:A.none(),value:e.value},s,a),c=e.text.filter(x(!t)).map((e=>Qv.config(s.tooltips.getConfig({tooltipText:s.translate(e)}))));return Fe(NM({context:e.context,data:IM(e),enabled:e.enabled,getApi:e=>({setActive:t=>{jv.set(e,t)},isActive:()=>jv.isOn(e),isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t)}),onAction:t=>n(e.value),onSetup:e=>(e.setActive(r),b),triggersSubmenu:!1,itemBehaviours:[...c.toArray()]},l,i,s),{toggling:{toggleClass:kE,toggleOnExecute:!1,selected:e.active,exclusive:!0}})},QM=e=>({value:nP(e)}),eP=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,tP=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,oP=e=>eP.test(e)||tP.test(e),nP=e=>Xe(e,"#").toUpperCase(),rP=e=>{const t=(e=>{const t=e.value.replace(eP,((e,t,o,n)=>t+t+o+o+n+n));return{value:t}})(e),o=tP.exec(t.value);return null===o?["FFFFFF","FF","FF","FF"]:o},iP=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},sP=e=>{const t=iP(e.red)+iP(e.green)+iP(e.blue);return QM(t)},aP=(e,t,o)=>({hue:e,saturation:t,value:o}),lP=e=>{let t=0,o=0,n=0;const r=e.red/255,i=e.green/255,s=e.blue/255,a=Math.min(r,Math.min(i,s)),l=Math.max(r,Math.max(i,s));if(a===l)return n=a,aP(0,0,100*n);return t=r===a?3:s===a?1:5,t=60*(t-(r===a?i-s:s===a?r-i:s-r)/(l-a)),o=(l-a)/l,n=l,aP(Math.round(t),Math.round(100*o),Math.round(100*n))},cP=Math.min,dP=Math.max,uP=Math.round,hP=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,mP=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,pP=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n}),gP=e=>{const t=parseInt(e,10);return t.toString()===e&&t>=0&&t<=255},fP=e=>{let t,o,n;const r=(e.hue||0)%360;let i=e.saturation/100,s=e.value/100;if(i=dP(0,cP(i,1)),s=dP(0,cP(s,1)),0===i)return t=o=n=uP(255*s),pP(t,o,n,1);const a=r/60,l=s*i,c=l*(1-Math.abs(a%2-1)),d=s-l;switch(Math.floor(a)){case 0:t=l,o=c,n=0;break;case 1:t=c,o=l,n=0;break;case 2:t=0,o=l,n=c;break;case 3:t=0,o=c,n=l;break;case 4:t=c,o=0,n=l;break;case 5:t=l,o=0,n=c;break;default:t=o=n=0}return t=uP(255*(t+d)),o=uP(255*(o+d)),n=uP(255*(n+d)),pP(t,o,n,1)},bP=e=>{const t=rP(e),o=parseInt(t[1],16),n=parseInt(t[2],16),r=parseInt(t[3],16);return pP(o,n,r,1)},vP=(e,t,o,n)=>{const r=parseInt(e,10),i=parseInt(t,10),s=parseInt(o,10),a=parseFloat(n);return pP(r,i,s,a)},yP=e=>{const t=hP.exec(e);if(null!==t)return A.some(vP(t[1],t[2],t[3],"1"));const o=mP.exec(e);return null!==o?A.some(vP(o[1],o[2],o[3],o[4])):A.none()},xP=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,wP=pP(255,0,0,1),_P=e=>sP(fP(e)),SP=e=>{return(t=e,oP(t)?A.some({value:nP(t)}):A.none()).orThunk((()=>yP(e).map(sP))).getOrThunk((()=>{const t=document.createElement("canvas");t.height=1,t.width=1;const o=t.getContext("2d");o.clearRect(0,0,t.width,t.height),o.fillStyle="#FFFFFF",o.fillStyle=e,o.fillRect(0,0,1,1);const n=o.getImageData(0,0,1,1).data,r=n[0],i=n[1],s=n[2],a=n[3];return sP(pP(r,i,s,a))}));var t},CP=(e,t)=>{e.dispatch("ResizeContent",t)},kP=(e,t)=>{e.dispatch("TextColorChange",t)},EP=(e,t)=>e.dispatch("ResolveName",{name:t.nodeName.toLowerCase(),target:t}),TP=e=>{e.dispatch("ContextToolbarClose")},OP=(e,t)=>()=>{e(),t()},AP=(e,t=O)=>PP(e,"NodeChange",(o=>{o.setEnabled(e.selection.isEditable()&&t())})),MP=(e,t)=>o=>{const n=AP(e)(o),r=((e,t)=>o=>{const n=Ge(),r=()=>{o.setActive(e.formatter.match(t));const r=e.formatter.formatChanged(t,o.setActive);n.set(r)};return e.initialized?r():e.once("init",r),()=>{e.off("init",r),n.clear()}})(e,t)(o);return()=>{n(),r()}},PP=(e,t,o)=>n=>{const r=()=>o(n),i=()=>{o(n),e.on(t,r)};return e.initialized?i():e.once("init",i),()=>{e.off("init",i),e.off(t,r)}},DP=e=>t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("mceToggleFormat",!1,t.format)}))},LP=(e,t)=>()=>e.execCommand(t);var RP=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const NP={},IP=(e,t=10)=>{const o=RP.getItem(e),n=i(o)?JSON.parse(o):[],r=t-(s=n).length<0?s.slice(0,t):s;var s;const a=e=>{r.splice(e,1)};return{add:o=>{((e,t)=>{const o=L(e,t);return-1===o?A.none():A.some(o)})(r,o).each(a),r.unshift(o),r.length>t&&r.pop(),RP.setItem(e,JSON.stringify(r))},state:()=>r.slice(0)}},BP=e=>fe(NP,e).getOrThunk((()=>{const t=`tinymce-custom-colors-${e}`,o=RP.getItem(t);if(h(o)){const e=RP.getItem("tinymce-custom-colors");RP.setItem(t,m(e)?e:"[]")}const n=IP(t,10);return NP[e]=n,n})),zP=(e,t)=>{BP(e).add(t)},FP="forecolor",HP="hilitecolor",jP=e=>{const t=[];for(let o=0;o<e.length;o+=2)t.push({text:e[o+1],value:e[o],icon:"checkmark",type:"choiceitem"});return t},VP=e=>t=>t.options.get(e),UP="#000000",ZP=(e,t)=>t===FP&&e.options.isSet("color_map_foreground")?VP("color_map_foreground")(e):t===HP&&e.options.isSet("color_map_background")?VP("color_map_background")(e):e.options.isSet("color_map_raw")?VP("color_map_raw")(e):VP("color_map")(e),$P=(e,t="default")=>Math.max(5,Math.ceil(Math.sqrt(ZP(e,t).length))),WP=(e,t)=>{const o=VP("color_cols")(e),n=$P(e,t);return o===$P(e)?n:o},qP=(e,t="default")=>Math.round(t===FP?VP("color_cols_foreground")(e):t===HP?VP("color_cols_background")(e):VP("color_cols")(e)),GP=VP("custom_colors"),YP=VP("color_default_foreground"),KP=VP("color_default_background"),XP=e=>yr(e,(e=>{if(to(e)){const t=pn(e,"background-color");return $e((e=>yP(e).exists((e=>0!==e.alpha)))(t),t)}return A.none()})).getOr("rgba(0, 0, 0, 0)"),JP=(e,t)=>{const o=at.fromDom(e.selection.getStart()),n="hilitecolor"===t?XP(o):pn(o,"color");return yP(n).map((e=>"#"+sP(e).value))},QP=e=>{const t="choiceitem",o={type:t,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return e?[o,{type:t,text:"Custom color",icon:"color-picker",value:"custom"}]:[o]},eD=(e,t,o,n)=>{if("custom"===o){cD(e)((o=>{o.each((o=>{zP(t,o),e.execCommand("mceApplyTextcolor",t,o),n(o)}))}),JP(e,t).getOr(UP))}else"remove"===o?(n(""),e.execCommand("mceRemoveTextcolor",t)):(n(o),e.execCommand("mceApplyTextcolor",t,o))},tD=(e,t,o)=>e.concat((e=>z(BP(e).state(),(e=>({type:"choiceitem",text:e,icon:"checkmark",value:e}))))(t).concat(QP(o))),oD=(e,t,o)=>n=>{n(tD(e,t,o))},nD=(e,t,o)=>{const n="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";e.setIconFill(n,o)},rD=(e,t)=>{e.setTooltip(t)},iD=(e,t)=>o=>{const n=JP(e,t);return je(n,o.toUpperCase())},sD=(e,t,o)=>{if(nt(o))return"forecolor"===t?"Text color":"Background color";const n="forecolor"===t?"Text color {0}":"Background color {0}",r=tD(ZP(e,t),t,!1),i=Z(r,(e=>e.value===o)).getOr({text:""}).text;return e.translate([n,e.translate(i)])},aD=(e,t,o,n)=>{e.ui.registry.addSplitButton(t,{tooltip:sD(e,o,n.get()),presets:"color",icon:"forecolor"===t?"text-color":"highlight-bg-color",select:iD(e,o),columns:qP(e,o),fetch:oD(ZP(e,o),o,GP(e)),onAction:t=>{eD(e,o,n.get(),b)},onItemAction:(r,i)=>{eD(e,o,i,(o=>{n.set(o),kP(e,{name:t,color:o})}))},onSetup:r=>{nD(r,t,n.get());const i=n=>{n.name===t&&(nD(r,n.name,n.color),rD(r,sD(e,o,n.color)))};return e.on("TextColorChange",i),OP(AP(e)(r),(()=>{e.off("TextColorChange",i)}))}})},lD=(e,t,o,n,r)=>{e.ui.registry.addNestedMenuItem(t,{text:n,icon:"forecolor"===t?"text-color":"highlight-bg-color",onSetup:n=>(rD(n,sD(e,o,r.get())),nD(n,t,r.get()),AP(e)(n)),getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",select:iD(e,o),initData:{storageKey:o},onAction:n=>{eD(e,o,n.value,(o=>{r.set(o),kP(e,{name:t,color:o})}))}}]})},cD=e=>(t,o)=>{let n=!1;const r={colorpicker:o};e.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onAction:(e,t)=>{"hex-valid"===t.name&&(n=t.value)},onSubmit:o=>{const r=o.getData().colorpicker;n?(t(A.from(r)),o.close()):e.windowManager.alert(e.translate(["Invalid hex color code: {0}",r]))},onClose:b,onCancel:()=>{t(A.none())}})},dD=(e,t,o,n,r,i,s,a)=>{const l=JE(t),c=uD(t,o,n,"color"!==r?"normal":"color",i,s,a);return tT(e,l,c,n,{menuType:r})},uD=(e,t,o,n,r,i,s)=>Ve(z(e,(a=>{return"choiceitem"===a.type?(l=a,Hi("choicemenuitem",YA,l)).fold(QE,(a=>A.some(JM(a,1===o,n,t,i(a.value),r,s,JE(e))))):"imageitem"===a.type?(e=>Hi("imagemenuitem",tM,e))(a).fold(QE,(e=>A.some(((e,t,o,n,r)=>{const i=GM({presets:"img",textContent:A.none(),htmlContent:A.none(),ariaLabel:e.tooltip,iconContent:A.some(e.url),labelContent:e.label,shortcutContent:A.none(),checkMark:A.some(ZM(r.icons)),caret:A.none(),value:e.value},r,!0),s=e.tooltip.map((e=>Qv.config(r.tooltips.getConfig({tooltipText:r.translate(e)}))));return Fe(NM({context:e.context,data:IM(e),enabled:e.enabled,getApi:e=>({setActive:t=>{jv.set(e,t)},isActive:()=>jv.isOn(e),isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t)}),onAction:o=>{t(e.value),o.setActive(!0)},onSetup:e=>(e.setActive(o),b),triggersSubmenu:!1,itemBehaviours:[...s.toArray()]},i,n,r),{toggling:{toggleClass:kE,toggleOnExecute:!1,selected:e.active,exclusive:!0}})})(e,t,i(e.value),r,s)))):"resetimage"===a.type?(e=>Hi("resetimageitem",oM,e))(a).fold(QE,(a=>A.some(JM({...a,type:"choiceitem",text:a.tooltip,icon:A.some(a.icon),label:A.some(a.label)},1===o,n,t,i(a.value),r,s,JE(e))))):A.none();var l}))),hD=(e,t)=>{const o=NE(t);if(1===e)return{mode:"menu",moveOnTab:!0};if("auto"===e)return{mode:"grid",selector:"."+o.item,initSize:{numColumns:1,numRows:1}};return{mode:"matrix",rowSelector:"."+{color:"tox-swatches__row",imageselector:"tox-image-selector__row",listpreview:"tox-collection__group",normal:"tox-collection__group"}[t],previousSelector:e=>"color"===t?Yn(e.element,"[aria-checked=true]"):A.none()}},mD=(e,t)=>{const o=e.initData.allowCustomColors&&t.colorinput.hasCustomColors();return e.initData.colors.fold((()=>tD(t.colorinput.getColors(e.initData.storageKey),e.initData.storageKey,o)),(e=>e.concat(QP(o))))},pD=Be("cell-over"),gD=Be("cell-execute"),fD=(e,t,o)=>{const n=o=>nd(o,gD,{row:e,col:t}),r=(e,t)=>{t.stop(),n(e)};return sp({dom:{tag:"div",attributes:{role:"button","aria-label":o}},behaviours:Od([Rd("insert-table-picker-cell",[ud(Rs(),Fd.focus),ud(Js(),n),ud(js(),r),ud(ea(),r)]),jv.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Fd.config({onFocus:o=>nd(o,pD,{row:e,col:t})})])})},bD=e=>q(e,(e=>z(e,ap))),vD=(e,t)=>op(`${t}x${e}`),yD={inserttable:(e,t)=>{const o=(e=>(t,o)=>e.shared.providers.translate(["{0} columns, {1} rows",o,t]))(t),n=((e,t,o)=>{const n=[];for(let r=0;r<t;r++){const t=[];for(let n=0;n<o;n++){const o=e(r+1,n+1);t.push(fD(r,n,o))}n.push(t)}return n})(o,10,10),r=vD(0,0),i=oy({dom:{tag:"span",classes:["tox-insert-table-picker__label"]},components:[r],behaviours:Od([Cm.config({})])});return{type:"widget",data:{value:Be("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Xx.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:bD(n).concat(i.asSpec()),behaviours:Od([Rd("insert-table-picker",[yd((e=>{Cm.set(i.get(e),[r])})),gd(pD,((e,t,o)=>{const{row:r,col:s}=o.event;((e,t,o,n,r)=>{for(let i=0;i<n;i++)for(let n=0;n<r;n++)jv.set(e[i][n],i<=t&&n<=o)})(n,r,s,10,10),Cm.set(i.get(e),[vD(r+1,s+1)])})),gd(gD,((t,o,n)=>{const{row:r,col:i}=n.event;od(t,oa()),e.onAction({numRows:r+1,numColumns:i+1})}))]),$h.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:(e,t)=>{const o=mD(e,t),n=t.colorinput.getColorCols(e.initData.storageKey),r="color",i=dD(Be("menu-value"),o,(t=>{e.onAction({value:t})}),n,r,xE.CLOSE_ON_EXECUTE,e.select.getOr(T),t.shared.providers),s={...i,markers:NE(r),movement:hD(n,r),showMenuRole:!1};return{type:"widget",data:{value:Be("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Xx.widget(Gy.sketch(s))]}},imageselect:(e,t)=>{const o="imageselector",n=e.initData.columns,r=dD(Be("menu-value"),e.initData.items,(t=>{e.onAction({value:t})}),n,o,xE.CLOSE_ON_EXECUTE,e.select.getOr(T),t.shared.providers),i={...r,markers:NE(o),movement:hD(n,o),showMenuRole:!1};return{type:"widget",data:{value:Be("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem","tox-collection--toolbar"]},autofocus:!0,components:[Xx.widget(Gy.sketch(i))]}}},xD=(e,t,o,n,r,i,s,a=!0)=>{const l=GM({presets:n,textContent:A.none(),htmlContent:o?e.text.map((e=>KM(e,t))):A.none(),ariaLabel:e.text,labelContent:A.none(),iconContent:e.icon,shortcutContent:A.none(),checkMark:A.none(),caret:A.none(),value:e.value},s.providers,a,e.icon),c=e.text.filter((e=>!o&&""!==e));return NM({context:"mode:design",data:IM(e),enabled:e.enabled,getApi:x({}),onAction:t=>r(e.value,e.meta),onSetup:x(b),triggersSubmenu:!1,itemBehaviours:YM(e,s,c)},l,i,s.providers)},wD=e=>({type:"separator",dom:{tag:"div",classes:[_E,"tox-collection__group-heading"]},components:e.text.map(op).toArray()}),_D=(e,t,o,n=!0)=>{const r=GM({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:A.none(),labelContent:A.none(),ariaLabel:e.text,caret:A.none(),checkMark:A.none(),shortcutContent:e.shortcut},o,n);return NM({context:e.context,data:IM(e),getApi:e=>({isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t)}),enabled:e.enabled,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,t,o)},SD=(e,t,o,n=!0,r=!1)=>{const i=r?(s=o.icons,FM("chevron-down",s,[OE])):(e=>FM("chevron-right",e,[OE]))(o.icons);var s;const a=GM({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:A.none(),ariaLabel:e.text,labelContent:A.none(),caret:A.some(i),checkMark:A.none(),shortcutContent:e.shortcut},o,n);return NM({context:e.context,data:IM(e),getApi:e=>({isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t),setIconFill:(t,o)=>{Yn(e.element,`svg path[class="${t}"], rect[class="${t}"]`).each((e=>{$o(e,"fill",o)}))},setTooltip:t=>{const n=o.translate(t);$o(e.element,"aria-label",n)}}),enabled:e.enabled,onAction:b,onSetup:e.onSetup,triggersSubmenu:!0,itemBehaviours:[]},a,t,o)},CD=(e,t,o,n=!0)=>{const r=GM({iconContent:e.icon,textContent:e.text,htmlContent:A.none(),labelContent:A.none(),ariaLabel:e.text,checkMark:A.some(ZM(o.icons)),caret:A.none(),shortcutContent:e.shortcut,presets:"normal",meta:e.meta},o,n);return Fe(NM({context:e.context,data:IM(e),enabled:e.enabled,getApi:e=>({setActive:t=>{jv.set(e,t)},isActive:()=>jv.isOn(e),isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t)}),onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,t,o),{toggling:{toggleClass:kE,toggleOnExecute:!1,selected:e.active},role:e.role.getOrUndefined()})},kD=(e,t)=>fe(yD,e.fancytype).map((o=>o(e,t))),ED=(e,t,o,n)=>{const r={dom:WM(e.label,[]),optComponents:[A.some({dom:{tag:"div",classes:[ME,PE]},components:XM(e.items,n)})]};return NM({context:"mode:design",data:IM({text:A.none(),...e}),enabled:e.enabled,getApi:e=>({isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>{Pp.set(e,!t),F(pr(e.element,"*"),(o=>{e.getSystem().getByDom(o).each((e=>{e.hasConfigured(Pp)&&Pp.set(e,!t)}))}))}}),onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:A.from(n.itemBehaviours).getOr([])},r,t,o.providers)},TD=e=>{const t=Rf.getValue(e),o=VE(e).map(ZE);wx.refetch(t).get((()=>{const e=bp.getCoupled(t,"sandbox");o.each((t=>VE(e).each((e=>((e,t)=>{Rf.setValue(e,t.fetchPattern),e.element.dom.selectionStart=t.selectionStart,e.element.dom.selectionEnd=t.selectionEnd})(e,t)))))}))},OD=e=>cv.getState(e).bind(gu.getHighlighted).bind(gu.getHighlighted),AD=(e,t,o)=>{UE(e).each((e=>{((e,t)=>{Go(t.element,"id").each((t=>$o(e.element,"aria-activedescendant",t)))})(e,o);var n;(ar((n=t).element,WE)?A.some(n.element):Yn(n.element,"."+WE)).each((t=>{Go(t,"id").each((t=>$o(e.element,"aria-controls",t)))}))})),$o(o.element,"aria-selected","true")},MD=(e,t,o)=>{$o(o.element,"aria-selected","false")},PD=e=>bp.getExistingCoupled(e,"sandbox").bind(VE).map(ZE).map((e=>e.fetchPattern)).getOr("");var DD;!function(e){e[e.ContentFocus=0]="ContentFocus",e[e.UiFocus=1]="UiFocus"}(DD||(DD={}));const LD=(e,t,o,n,r)=>{const i=o.shared.providers,s=e=>r?{...e,shortcut:A.none(),icon:e.text.isSome()?A.none():e.icon}:e;switch(e.type){case"menuitem":return(a=e,Hi("menuitem",nM,a)).fold(QE,(e=>A.some(_D(s(e),t,i,n))));case"nestedmenuitem":return(e=>Hi("nestedmenuitem",rM,e))(e).fold(QE,(e=>A.some(SD(s(e),t,i,n,r))));case"togglemenuitem":return(e=>Hi("togglemenuitem",iM,e))(e).fold(QE,(e=>A.some(CD(s(e),t,i,n))));case"separator":return(e=>Hi("separatormenuitem",wA,e))(e).fold(QE,(e=>A.some(wD(e))));case"fancymenuitem":return(e=>Hi("fancymenuitem",eM,e))(e).fold(QE,(e=>kD(e,o)));default:return console.error("Unknown item in general menu",e),A.none()}var a},RD=(e,t,o,n,r,i,s)=>{const a=1===n,l=!a||JE(e);return Ve(z(e,(e=>{switch(e.type){case"separator":return(n=e,Hi("Autocompleter.Separator",wA,n)).fold(QE,(e=>A.some(wD(e))));case"cardmenuitem":return(e=>Hi("cardmenuitem",GA,e))(e).fold(QE,(e=>A.some(ED({...e,onAction:t=>{e.onAction(t),o(e.value,e.meta)}},r,i,{itemBehaviours:YM(e.meta,i,A.none()),cardText:{matchText:t,highlightOn:s}}))));default:return(e=>Hi("Autocompleter.Item",_A,e))(e).fold(QE,(e=>A.some(xD(e,t,a,"normal",o,r,i,l))))}var n})))},ND=(e,t,o,n,r,i)=>{const s=JE(t),a=Ve(z(t,(e=>{const t=e=>LD(e,o,n,(e=>r?!be(e,"text"):s)(e),r);return"nestedmenuitem"===e.type&&e.getSubmenuItems().length<=0?t({...e,enabled:!1}):t(e)}))),l=(e=>"no-search"===e.searchMode?{menuType:"normal"}:{menuType:"searchable",searchMode:e})(i);return(r?eT:tT)(e,s,a,1,l)},ID=e=>ox.singleData(e.value,e),BD=e=>xr(at.fromDom(e.startContainer),e.startOffset,at.fromDom(e.endContainer),e.endOffset),zD=(e,t)=>{const o=Be("autocompleter"),n=xe(!1),r=xe(!1),i=Ye(),s=sp($x.sketch({dom:{tag:"div",classes:["tox-autocompleter"],attributes:{id:o}},components:[],fireDismissalEventInstead:{},inlineBehaviours:Od([Rd("dismissAutocompleter",[ud(ua(),(()=>u())),ud(va(),((t,o)=>{Go(o.event.target,"id").each((t=>$o(at.fromDom(e.getBody()),"aria-activedescendant",t)))}))])]),lazySink:t.getSink})),a=()=>$x.isOpen(s),l=r.get,c=()=>{if(a()){$x.hide(s),e.dom.remove(o,!1);const t=at.fromDom(e.getBody());Go(t,"aria-owns").filter((e=>e===o)).each((()=>{Ko(t,"aria-owns"),Ko(t,"aria-activedescendant")}))}},d=()=>$x.getContent(s).bind((e=>ee(e.components(),0))),u=()=>e.execCommand("mceAutocompleterClose"),h=(t,o)=>{const n=re(t,(e=>A.from(e.columns))).getOr(1);$x.showMenuAt(s,{anchor:{type:"selection",getSelection:()=>i.get().map(BD),root:at.fromDom(e.getBody())}},((e,t,o,n)=>{const r=hD(t,n),i=NE(n);return{data:ID({...e,movement:r,menuBehaviours:fM("auto"!==t?[]:[yd(((e,t)=>{pM(e,4,i.item).each((({numColumns:t,numRows:o})=>{$h.setGridSize(e,o,t)}))}))])}),menu:{markers:NE(n),fakeFocus:o===DD.ContentFocus}}})(tT("autocompleter-value",!0,o,n,{menuType:"normal"}),n,DD.ContentFocus,"normal")),d().each(gu.highlightFirst)},m=r=>{const s=(o=>{const r=re(o,(e=>A.from(e.columns))).getOr(1);return q(o,(o=>{const s=o.items;return RD(s,o.matchText,((t,r)=>{const s={hide:()=>u(),reload:t=>{c(),e.execCommand("mceAutocompleterReload",!1,{fetchOptions:t})}};e.execCommand("mceAutocompleterRefreshActiveRange"),i.get().each((e=>{n.set(!0),o.onAction(s,e,t,r),n.set(!1)}))}),r,xE.BUBBLE_TO_SANDBOX,t,o.highlightOn)}))})(r);s.length>0?(h(r,s),$o(at.fromDom(e.getBody()),"aria-owns",o),e.inline||p()):c()},p=()=>{e.dom.get(o)&&e.dom.remove(o,!1);const t=e.getDoc().documentElement,n=e.selection.getNode(),r=(e=>Qo(e,!0))(s.element);hn(r,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",top:`${n.offsetTop}px`,left:`${n.offsetLeft}px`}),e.dom.add(t,r.dom),Yn(r,'[role="menu"]').each((e=>{yn(e,"position"),yn(e,"max-height")}))};e.on("AutocompleterStart",(({lookupData:e})=>{r.set(!0),n.set(!1),m(e)})),e.on("AutocompleterUpdate",(({lookupData:e})=>m(e))),e.on("AutocompleterUpdateActiveRange",(({range:e})=>i.set(e))),e.on("AutocompleterEnd",(()=>{c(),r.set(!1),n.set(!1),i.clear()}));const g={cancelIfNecessary:u,isMenuOpen:a,isActive:l,isProcessingAction:n.get,getMenu:d};vE(g,e)};var FD=tinymce.util.Tools.resolve("tinymce.html.Entities");const HD=(e,t,o,n)=>{const r=jD(e,t,o,n);return Fx.sketch(r)},jD=(e,t,o,n)=>({dom:VD(o),components:e.toArray().concat([t]),fieldBehaviours:Od(n)}),VD=e=>({tag:"div",classes:["tox-form__group"].concat(e)}),UD=(e,t)=>Fx.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[op(t.translate(e))]}),ZD=Be("form-component-change"),$D=Be("form-component-input"),WD=Be("form-close"),qD=Be("form-cancel"),GD=Be("form-action"),YD=Be("form-submit"),KD=Be("form-block"),XD=Be("form-unblock"),JD=Be("form-tabchange"),QD=Be("form-resize"),eL=(e,t,o)=>{const n=e.label.map((e=>UD(e,t))),r=t.icons(),i=e=>(t,o)=>{Kn(o.event.target,"[data-collection-item-value]").each((n=>{e(t,o,n,qo(n,"data-collection-item-value"))}))},s=(o,n)=>{const i=t.checkUiComponentContext("mode:design").shouldDisable||t.isDisabled()?" tox-collection__item--state-disabled":"",s=z(n,(t=>{const o=iE.translate(t.text),n=1===e.columns?`<div class="tox-collection__item-label">${o}</div>`:"",s=`<div class="tox-collection__item-icon">${(e=>{var t;return null!==(t=r[e])&&void 0!==t?t:e})(t.icon)}</div>`,a={_:" "," - ":" ","-":" "},l=o.replace(/\_| \- |\-/g,(e=>a[e]));return`<div data-mce-tooltip="${l}" class="tox-collection__item${i}" tabindex="-1" data-collection-item-value="${FD.encodeAllRaw(t.value)}" aria-label="${l}">${s}${n}</div>`})),a="auto"!==e.columns&&e.columns>1?B(s,e.columns):[s],l=z(a,(e=>`<div class="tox-collection__group">${e.join("")}</div>`));tn(o.element,l.join(""))},a=i(((o,n,r,i)=>{n.stop(),t.checkUiComponentContext("mode:design").shouldDisable||t.isDisabled()||nd(o,GD,{name:e.name,value:i})})),l=[ud(Rs(),i(((e,t,o)=>{Ro(o,!0)}))),ud(js(),a),ud(ea(),a),ud(Ns(),i(((e,t,o)=>{Yn(e.element,"."+AE).each((e=>{ir(e,AE)})),nr(o,AE)}))),ud(Is(),i((e=>{Yn(e.element,"."+AE).each((e=>{ir(e,AE),No(e)}))}))),_d(i(((t,o,n,r)=>{nd(t,GD,{name:e.name,value:r})})))],c=(e,t)=>z(pr(e.element,".tox-collection__item"),t),d=Fx.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==e.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:w},behaviours:Od([Pp.config({disabled:()=>t.checkUiComponentContext(e.context).shouldDisable,onDisabled:e=>{c(e,(e=>{nr(e,"tox-collection__item--state-disabled"),$o(e,"aria-disabled",!0)}))},onEnabled:e=>{c(e,(e=>{ir(e,"tox-collection__item--state-disabled"),Ko(e,"aria-disabled")}))}}),PM((()=>t.checkUiComponentContext(e.context))),Cm.config({}),Qv.config({...t.tooltips.getConfig({tooltipText:"",onShow:e=>{Yn(e.element,"."+AE+"[data-mce-tooltip]").each((o=>{Go(o,"data-mce-tooltip").each((o=>{Qv.setComponents(e,t.tooltips.getComponents({tooltipText:o}))}))}))}}),mode:"children-keyboard-focus",anchor:e=>({type:"node",node:Yn(e.element,"."+AE).orThunk((()=>bt(".tox-collection__item"))),root:e.element,layouts:{onLtr:x([mc,hc,lc,dc,cc,uc]),onRtl:x([mc,hc,lc,dc,cc,uc])},bubble:Vl(0,-2,{})})}),Rf.config({store:{mode:"memory",initialValue:o.getOr([])},onSetValue:(t,o)=>{s(t,o),"auto"===e.columns&&pM(t,5,"tox-collection__item").each((({numRows:e,numColumns:o})=>{$h.setGridSize(t,e,o)})),od(t,QD)}}),Lv.config({}),$h.config((u=e.columns,h="normal",1===u?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===u?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===h?".tox-swatches__row":".tox-collection__group",cell:"color"===h?`.${SE}`:`.${_E}`}})),Rd("collection-events",l)]),eventOrder:{[Js()]:["disabling","alloy.base.behaviour","collection-events"],[Ns()]:["collection-events","tooltipping"]}});var u,h;return HD(n,d,["tox-form__group--collection"],[])},tL=Be("color-input-change"),oL=Be("color-swatch-change"),nL=Be("color-picker-cancel"),rL=(e,t,o,n)=>{const r=Fx.parts.field({factory:Kx,inputClasses:["tox-textfield"],data:n,onSetValue:e=>Nf.run(e).get(b),inputBehaviours:Od([Pp.config({disabled:()=>t.providers.isDisabled()||t.providers.checkUiComponentContext(e.context).shouldDisable}),PM((()=>t.providers.checkUiComponentContext(e.context))),Lv.config({}),Nf.config({invalidClass:"tox-textbox-field-invalid",getRoot:e=>ho(e.element),notify:{onValid:e=>{const t=Rf.getValue(e);nd(e,tL,{color:t})}},validator:{validateOnLoad:!1,validate:e=>{const t=Rf.getValue(e);if(0===t.length)return Ee(Ae.value(!0));{const e=at.fromTag("span");un(e,"background-color",t);const o=fn(e,"background-color").fold((()=>Ae.error("blah")),(e=>Ae.value(t)));return Ee(o)}}}})]),selectOnFocus:!1}),i=e.label.map((e=>UD(e,t.providers))),s=(e,t)=>{nd(e,oL,{value:t})},a=oy(((e,t)=>wx.sketch({dom:e.dom,components:e.components,toggleClass:"mce-active",dropdownBehaviours:Od([vM((()=>t.providers.isDisabled()||t.providers.checkUiComponentContext(e.context).shouldDisable)),PM((()=>t.providers.checkUiComponentContext(e.context))),ey.config({}),Lv.config({})]),layouts:e.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:t.getSink,fetch:o=>ke((t=>e.fetch(t))).map((n=>A.from(ID(Fe(dD(Be("menu-value"),n,(t=>{e.onItemAction(o,t)}),e.columns,e.presets,xE.CLOSE_ON_EXECUTE,T,t.providers),{movement:hD(e.columns,e.presets)}))))),parts:{menu:zE(0,0,e.presets)}}))({dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:{onRtl:()=>[cc,lc,mc],onLtr:()=>[lc,cc,mc]},components:[],fetch:oD(o.getColors(e.storageKey),e.storageKey,o.hasCustomColors()),columns:o.getColorCols(e.storageKey),presets:"color",onItemAction:(t,n)=>{a.getOpt(t).each((t=>{"custom"===n?o.colorPicker((o=>{o.fold((()=>od(t,nL)),(o=>{s(t,o),zP(e.storageKey,o)}))}),"#ffffff"):s(t,"remove"===n?"":n)}))},context:e.context},t));return Fx.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:i.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,a.asSpec()]}]),fieldBehaviours:Od([Rd("form-field-events",[ud(tL,((t,o)=>{a.getOpt(t).each((e=>{un(e.element,"background-color",o.event.color)})),nd(t,ZD,{name:e.name})})),ud(oL,((e,t)=>{Fx.getField(e).each((o=>{Rf.setValue(o,t.event.value),mp.getCurrent(e).each(Fd.focus)}))})),ud(nL,((e,t)=>{Fx.getField(e).each((t=>{mp.getCurrent(e).each(Fd.focus)}))}))])])})},iL=()=>mp.config({find:A.some}),sL=e=>mp.config({find:e.getOpt}),aL=e=>mp.config({find:t=>go(t.element,e).bind((e=>t.getSystem().getByDom(e).toOptional()))}),lL=Pi([hs("preprocess",w),hs("postprocess",w)]),cL=(e,t)=>{const o=Vi("RepresentingConfigs.memento processors",lL,t);return Rf.config({store:{mode:"manual",getValue:t=>{const n=e.get(t),r=Rf.getValue(n);return o.postprocess(r)},setValue:(t,n)=>{const r=o.preprocess(n),i=e.get(t);Rf.setValue(i,r)}}})},dL=(e,t,o)=>Rf.config({store:{mode:"manual",...e.map((e=>({initialValue:e}))).getOr({}),getValue:t,setValue:o}}),uL=(e,t,o)=>dL(e,(e=>t(e.element)),((e,t)=>o(e.element,t))),hL=e=>Rf.config({store:{mode:"memory",initialValue:e}}),mL=Be("rgb-hex-update"),pL=Be("slider-update"),gL=Be("palette-update"),fL=Be("valid-input"),bL=Be("invalid-input"),vL=Be("validating-input"),yL="colorcustom.rgb.",xL={isEnabled:O,setEnabled:b,immediatelyShow:b,immediatelyHide:b},wL=(e,t,o,n,r,i)=>{const s=(e,t)=>{const o=t.get();e!==o.isEnabled()&&(o.setEnabled(e),e?o.immediatelyShow():o.immediatelyHide())},a=(o,n,r)=>Nf.config({invalidClass:t("invalid"),notify:{onValidate:e=>{nd(e,vL,{type:o})},onValid:e=>{s(!1,r),nd(e,fL,{type:o,value:Rf.getValue(e)})},onInvalid:e=>{s(!0,r),nd(e,bL,{type:o,value:Rf.getValue(e)})}},validator:{validate:t=>{const o=Rf.getValue(t),r=n(o)?Ae.value(!0):Ae.error(e("aria.input.invalid"));return Ee(r)},validateOnLoad:!1}}),l=(o,n,s,l,c)=>{const d=xe(xL),u=e(yL+"range"),h=Fx.parts.label({dom:{tag:"label"},components:[op(s)]}),m=Fx.parts.field({data:c,factory:Kx,inputAttributes:{type:"text","aria-label":l,..."hex"===n?{"aria-live":"polite"}:{}},inputClasses:[t("textfield")],inputBehaviours:Od([a(n,o,d),Lv.config({}),Qv.config({...r({tooltipText:"",onSetup:e=>{d.set({isEnabled:()=>Qv.isEnabled(e),setEnabled:t=>Qv.setEnabled(e,t),immediatelyShow:()=>Qv.immediateOpenClose(e,!0),immediatelyHide:()=>Qv.immediateOpenClose(e,!1)}),Qv.setEnabled(e,!1)},onShow:(o,r)=>{Qv.setComponents(o,[{dom:{tag:"p",classes:[t("rgb-warning-note")]},components:[op(e("hex"===n?"colorcustom.rgb.invalidHex":"colorcustom.rgb.invalid"))]}])}})})]),onSetValue:e=>{if(Nf.isInvalid(e)){Nf.run(e).get(b)}}}),p=Be("aria-invalid"),g=oy(i("invalid",A.some(p),"warning")),f=[h,m,oy({dom:{tag:"div",classes:[t("invalid-icon")]},components:[g.asSpec()]}).asSpec()],v="hex"!==n?[Fx.parts["aria-descriptor"]({text:u})]:[],y=f.concat(v);return{dom:{tag:"div",attributes:{role:"presentation"},classes:[t("rgb-container")]},components:y}},c=(e,t)=>{const o=t.red,n=t.green,r=t.blue;Rf.setValue(e,{red:o,green:n,blue:r})},d=oy({dom:{tag:"div",classes:[t("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),u=(e,t)=>{d.getOpt(e).each((e=>{un(e.element,"background-color","#"+t.value)}))},h=Hg({factory:()=>{const r={red:xe(A.some(255)),green:xe(A.some(255)),blue:xe(A.some(255)),hex:xe(A.some("ffffff"))},i=e=>r[e].get(),s=(e,t)=>{r[e].set(t)},a=e=>{const t=e.red,o=e.green,n=e.blue;s("red",A.some(t)),s("green",A.some(o)),s("blue",A.some(n))},h=(e,t)=>{const o=t.event;"hex"!==o.type?s(o.type,A.none()):n(e)},m=(e,t,o)=>{const n=parseInt(o,10);s(t,A.some(n)),i("red").bind((e=>i("green").bind((t=>i("blue").map((o=>pP(e,t,o,1))))))).each((t=>{const o=((e,t)=>{const o=sP(t);return Ex.getField(e,"hex").each((t=>{Fd.isFocused(t)||Rf.setValue(e,{hex:o.value})})),o})(e,t);nd(e,mL,{hex:o}),u(e,o)}))},p=(e,t)=>{const n=t.event;(e=>"hex"===e.type)(n)?((e,t)=>{o(e);const n=QM(t);s("hex",A.some(n.value));const r=bP(n);c(e,r),a(r),nd(e,mL,{hex:n}),u(e,n)})(e,n.value):m(e,n.type,n.value)},g=t=>({label:e(yL+t+".label"),description:e(yL+t+".description")}),f=g("red"),b=g("green"),v=g("blue"),y=g("hex");return Fe(Ex.sketch((o=>({dom:{tag:"form",classes:[t("rgb-form")],attributes:{"aria-label":e("aria.color.picker")}},components:[o.field("red",Fx.sketch(l(gP,"red",f.label,f.description,255))),o.field("green",Fx.sketch(l(gP,"green",b.label,b.description,255))),o.field("blue",Fx.sketch(l(gP,"blue",v.label,v.description,255))),o.field("hex",Fx.sketch(l(oP,"hex",y.label,y.description,"ffffff"))),d.asSpec()],formBehaviours:Od([Nf.config({invalidClass:t("form-invalid")}),Rd("rgb-form-events",[ud(fL,p),ud(bL,h),ud(vL,h)])])}))),{apis:{updateHex:(e,t)=>{Rf.setValue(e,{hex:t.value}),((e,t)=>{const o=bP(t);c(e,o),a(o)})(e,t),u(e,t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:(e,t,o)=>{e.updateHex(t,o)}},extraApis:{}});return h},_L=(e,t)=>{const o=z_.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[t("sv-palette-spectrum")]}}),n=z_.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette-thumb")],innerHtml:`<div class=${t("sv-palette-inner-thumb")} role="presentation"></div>`}}),r=(e,t)=>{const{width:o,height:n}=e,r=e.getContext("2d");if(null===r)return;r.fillStyle=t,r.fillRect(0,0,o,n);const i=r.createLinearGradient(0,0,o,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,o,n);const s=r.createLinearGradient(0,0,0,n);s.addColorStop(0,"rgba(0,0,0,0)"),s.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=s,r.fillRect(0,0,o,n)},i=Hg({factory:i=>{const s=x({x:0,y:0}),a=Od([mp.config({find:A.some}),Fd.config({})]);return z_.sketch({dom:{tag:"div",attributes:{role:"slider","aria-valuetext":e(["Saturation {0}%, Brightness {1}%",0,0])},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:s},rounded:!1,components:[o,n],onChange:(t,o,n)=>{g(n)||$o(t.element,"aria-valuetext",e(["Saturation {0}%, Brightness {1}%",Math.floor(n.x),Math.floor(100-n.y)])),nd(t,gL,{value:n})},onInit:(e,t,o,n)=>{r(o.element.dom,xP(wP))},sliderBehaviours:a})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(e,t,o)=>{((e,t)=>{const o=e.components()[0].element.dom,n=aP(t,100,100),i=fP(n);r(o,xP(i))})(t,o)},setThumb:(t,o,n)=>{((t,o)=>{const n=lP(bP(o));z_.setValue(t,{x:n.saturation,y:100-n.value}),$o(t.element,"aria-valuetext",e(["Saturation {0}%, Brightness {1}%",n.saturation,n.value]))})(o,n)}},extraApis:{}});return i},SL=(e,t,o,n)=>{const r=Hg({name:"ColourPicker",configFields:[Yi("dom"),hs("onValidHex",b),hs("onInvalidHex",b)],factory:r=>{const i=wL(e,t,r.onValidHex,r.onInvalidHex,o,n),s=_L(e,t),a={paletteRgba:xe(wP),paletteHue:xe(0)},l=oy(((e,t)=>{const o=z_.parts.spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),n=z_.parts.thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return z_.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"slider","aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":120}},rounded:!1,model:{mode:"y",getInitialValue:x(0)},components:[o,n],sliderBehaviours:Od([Fd.config({})]),onChange:(e,t,o)=>{$o(e.element,"aria-valuenow",Math.floor(360-3.6*o)),nd(e,pL,{value:o})}})})(0,t)),c=oy(s.sketch({})),d=oy(i.sketch({})),u=(e,t,o)=>{c.getOpt(e).each((e=>{s.setHue(e,o)}))},h=(e,t)=>{d.getOpt(e).each((e=>{i.updateHex(e,t)}))},m=(e,t,o)=>{l.getOpt(e).each((e=>{z_.setValue(e,(e=>100-e/360*100)(o))}))},p=(e,t)=>{c.getOpt(e).each((e=>{s.setThumb(e,t)}))},g=(e,t,o,n)=>{((e,t)=>{const o=bP(e);a.paletteRgba.set(o),a.paletteHue.set(t)})(t,o),F(n,(n=>{n(e,t,o)}))};return{uid:r.uid,dom:r.dom,components:[c.asSpec(),l.asSpec(),d.asSpec()],behaviours:Od([Rd("colour-picker-events",[ud(mL,(()=>{const e=[u,m,p];return(t,o)=>{const n=o.event.hex,r=(e=>lP(bP(e)))(n);g(t,n,r.hue,e)}})()),ud(gL,(()=>{const e=[h];return(t,o)=>{const n=o.event.value,r=a.paletteHue.get(),i=aP(r,n.x,100-n.y),s=_P(i);g(t,s,r,e)}})()),ud(pL,(()=>{const e=[u,h];return(t,o)=>{const n=(e=>(100-e)/100*360)(o.event.value),r=a.paletteRgba.get(),i=lP(r),s=aP(n,i.saturation,i.value),l=_P(s);g(t,l,n,e)}})())]),mp.config({find:e=>d.getOpt(e)}),$h.config({mode:"acyclic"})])}}});return r},CL={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red channel","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green channel","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue channel","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.rgb.invalid":"Numbers only, 0 to 255","colorcustom.rgb.invalidHex":"Hexadecimal only, 000000 to FFFFFF","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},kL=(e,t,o)=>{const n=e=>"tox-"+e,r=SL((e=>t=>i(t)?e.translate(CL[t]):e.translate(t))(t),n,t.tooltips.getConfig,((e,o,n=e,r=e)=>pE(n,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+e],attributes:{title:t.translate(r),"aria-live":"polite",...o.fold((()=>({})),(e=>({id:e})))}},t.icons))),s=oy(r.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex:e=>{nd(e,GD,{name:"hex-valid",value:!0})},onInvalidHex:e=>{nd(e,GD,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[s.asSpec()],behaviours:Od([dL(o,(e=>{const t=s.get(e);return mp.getCurrent(t).bind((e=>Rf.getValue(e).hex)).map((e=>"#"+Xe(e,"#"))).getOr("")}),((e,t)=>{const o=A.from(/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(t)).bind((e=>ee(e,1))),n=s.get(e);mp.getCurrent(n).fold((()=>{console.log("Can not find form")}),(e=>{Rf.setValue(e,{hex:o.getOr("")}),Ex.getField(e,"hex").each((e=>{od(e,Fs())}))}))})),iL()])}};var EL=tinymce.util.Tools.resolve("tinymce.Resource");const TL=e=>be(e,"init");var OL=tinymce.util.Tools.resolve("tinymce.util.Tools");const AL=Be("browse.files.event"),ML=(e,t,o)=>{const n=(e,t)=>{t.stop()},r=e=>(t,o)=>{F(e,(e=>{e(t,o)}))},i=(o,n)=>{n&&(Rf.setValue(o,((e,t)=>{const o=OL.explode(t.getOption("images_file_types"));return j(ne(e),(e=>N(o,(t=>et(e.name.toLowerCase(),`.${t.toLowerCase()}`)))))})(n,t)),nd(o,ZD,{name:e.name}))},s=oy({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:Od([Rd("input-file-events",[fd(js()),fd(ea())])])}),a=e.label.map((e=>UD(e,t))),l=Fx.parts.field({factory:xy,dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[op(t.translate("Browse for an image")),s.asSpec()],action:e=>{s.get(e).element.dom.click()},buttonBehaviours:Od([iL(),hL(o.getOr([])),Lv.config({}),vM((()=>t.checkUiComponentContext(e.context).shouldDisable)),PM((()=>t.checkUiComponentContext(e.context)))])}),c={dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:Od([Pp.config({disabled:()=>t.checkUiComponentContext(e.context).shouldDisable}),PM((()=>t.checkUiComponentContext(e.context))),jv.config({toggleClass:"dragenter",toggleOnExecute:!1}),Rd("dropzone-events",[ud("dragenter",r([n,jv.toggle])),ud("dragleave",r([n,jv.toggle])),ud("dragover",n),ud("drop",r([n,(e,t)=>{var o;if(!Pp.isDisabled(e)){const n=t.event.raw;nd(e,AL,{files:null===(o=n.dataTransfer)||void 0===o?void 0:o.files})}}])),ud(Hs(),((e,t)=>{const o=t.event.raw.target;nd(e,AL,{files:o.files})}))])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[op(t.translate("Drop an image here"))]},l]}]};return HD(a,c,["tox-form__group--stretched"],[Rd("handle-files",[ud(AL,((e,t)=>{Fx.getField(e).each((e=>{i(e,t.event.files)}))}))])])},PL=Be("alloy-fake-before-tabstop"),DL=Be("alloy-fake-after-tabstop"),LL=e=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:e},behaviours:Od([Fd.config({ignore:!0}),Lv.config({})])}),RL=(e,t)=>({dom:{tag:"div",classes:["tox-navobj",...e.getOr([])]},components:[LL([PL]),t,LL([DL])],behaviours:Od([aL(1)])}),NL=(e,t)=>{nd(e,Bs(),{raw:{which:9,shiftKey:t}})},IL=(e,t)=>{const o=t.element;ar(o,PL)?NL(e,!0):ar(o,DL)&&NL(e,!1)},BL=e=>fr(e,["."+PL,"."+DL].join(","),T),zL=Be("update-dialog"),FL=Be("update-title"),HL=Be("update-body"),jL=Be("update-footer"),VL=Be("body-send-message"),UL=Be("dialog-focus-shifted"),ZL=Gt().browser,$L=ZL.isSafari(),WL=ZL.isFirefox(),qL=$L||WL,GL=ZL.isChromium(),YL=({scrollTop:e,scrollHeight:t,clientHeight:o})=>Math.ceil(e)+o>=t,KL=(e,t)=>e.scrollTo(0,"bottom"===t?99999999:t),XL=(e,t,o)=>{const n=e.dom;A.from(n.contentDocument).fold(o,(e=>{let o=0;const r=((e,t)=>{const o=e.body;return A.from(!/^<!DOCTYPE (html|HTML)/.test(t)&&(!GL&&!$L||m(o)&&(0!==o.scrollTop||Math.abs(o.scrollHeight-o.clientHeight)>1))?o:e.documentElement)})(e,t).map((e=>(o=e.scrollTop,e))).forall(YL),i=()=>{const e=n.contentWindow;m(e)&&(r?KL(e,"bottom"):!r&&qL&&0!==o&&KL(e,o))};$L&&n.addEventListener("load",i,{once:!0}),e.open(),e.write(t),e.close(),$L||i()}))},JL=$e(qL,$L?500:200).map((e=>((e,t)=>{let o=null,n=null;return{cancel:()=>{c(o)||(clearTimeout(o),o=null,n=null)},throttle:(...r)=>{n=r,c(o)&&(o=setTimeout((()=>{const t=n;o=null,n=null,e.apply(null,t)}),t))}}})(XL,e))),QL=(e,t,o)=>{const n="tox-dialog__iframe",r=e.transparent?[]:[`${n}--opaque`],i=e.border?["tox-navobj-bordered"]:[],s={...e.label.map((e=>({title:e}))).getOr({}),...o.map((e=>({srcdoc:e}))).getOr({}),...e.sandboxed?{sandbox:"allow-scripts allow-same-origin"}:{}},a=((e,t)=>{const o=xe(e.getOr(""));return{getValue:e=>o.get(),setValue:(e,n)=>{if(o.get()!==n){const o=e.element,r=()=>$o(o,"srcdoc",n);t?JL.fold(x(XL),(e=>e.throttle))(o,n,r):r()}o.set(n)}}})(o,e.streamContent),l=e.label.map((e=>UD(e,t))),c=Fx.parts.field({factory:{sketch:e=>RL(A.from(i),{uid:e.uid,dom:{tag:"iframe",attributes:s,classes:[n,...r]},behaviours:Od([Lv.config({}),Fd.config({}),dL(o,a.getValue,a.setValue),Gb.config({channels:{[UL]:{onReceive:(e,t)=>{t.newFocus.each((t=>{ho(e.element).each((o=>{(vt(e.element,t)?nr:ir)(o,"tox-navobj-bordered-focus")}))}))}}}})])})}});return HD(l,c,["tox-form__group--stretched"],[])},eR=(e,t)=>{const o=xe(t.getOr({url:""})),n=oy({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:t.map((e=>({src:e.url}))).getOr({})}}),r=oy({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[n.asSpec()]}),i={};e.height.each((e=>i.height=e));const s=t.map((e=>({url:e.url,zoom:A.from(e.zoom),cachedWidth:A.from(e.cachedWidth),cachedHeight:A.from(e.cachedHeight)})));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:i,attributes:{role:"presentation"}},components:[r.asSpec()],behaviours:Od([iL(),dL(s,(()=>o.get()),((e,t)=>{const i={url:t.url};t.zoom.each((e=>i.zoom=e)),t.cachedWidth.each((e=>i.cachedWidth=e)),t.cachedHeight.each((e=>i.cachedHeight=e)),o.set(i);const s=()=>{const{cachedWidth:t,cachedHeight:o,zoom:n}=i;if(!u(t)&&!u(o)){if(u(n)){const n=((e,t,o)=>{const n=On(e),r=Sn(e);return Math.min(n/t,r/o,1)})(e.element,t,o);i.zoom=n}const s=((e,t,o,n,r)=>{const i=o*r,s=n*r,a=Math.max(0,e/2-i/2),l=Math.max(0,t/2-s/2);return{left:a.toString()+"px",top:l.toString()+"px",width:i.toString()+"px",height:s.toString()+"px"}})(On(e.element),Sn(e.element),t,o,i.zoom);r.getOpt(e).each((e=>{hn(e.element,s)}))}};n.getOpt(e).each((o=>{const n=o.element;t.url!==qo(n,"src")&&($o(n,"src",t.url),ir(e.element,"tox-imagepreview__loaded")),s(),nn(n).then((t=>{e.getSystem().isConnected()&&(nr(e.element,"tox-imagepreview__loaded"),i.cachedWidth=t.dom.naturalWidth,i.cachedHeight=t.dom.naturalHeight,s())}))}))}))])}},tR=Be("toolbar.button.execute"),oR=Be("common-button-display-events"),nR={[Js()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events","tooltipping"],[ca()]:["toolbar-button-events",oR],[da()]:["toolbar-button-events","dropdown-events","tooltipping"],[Ms()]:["focusing","alloy.base.behaviour",oR]},rR=e=>un(e.element,"width",pn(e.element,"width")),iR=(e,t,o)=>pE(e,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:o},t),sR=(e,t)=>iR(e,t,[]),aR=(e,t)=>iR(e,t,[Cm.config({})]),lR=(e,t,o)=>({dom:{tag:"span",classes:[`${t}__select-label`]},components:[op(o.translate(e))],behaviours:Od([Cm.config({})])}),cR=Be("update-menu-text"),dR=Be("update-menu-icon"),uR=Be("update-tooltip-text"),hR=(e,t,o,n)=>{const r=xe(b),i=xe(e.tooltip),s=e.text.map((e=>oy(lR(e,t,o.providers)))),a=e.icon.map((e=>oy(aR(e,o.providers.icons)))),l=(e,t)=>{const o=Rf.getValue(e);return Fd.focus(o),nd(o,"keydown",{raw:t.event.raw}),wx.close(o),A.some(!0)},c=e.role.fold((()=>({})),(e=>({role:e}))),d=A.from(e.listRole).map((e=>({listRole:e}))).getOr({}),u=e.ariaLabel.fold((()=>({})),(e=>({"aria-label":o.providers.translate(e)}))),h=pE("chevron-down",{tag:"div",classes:[`${t}__select-chevron`]},o.providers.icons),p=Be("common-button-display-events"),g="dropdown-events",f=oy(wx.sketch({...e.uid?{uid:e.uid}:{},...c,...d,dom:{tag:"button",classes:[t,`${t}--select`].concat(z(e.classes,(e=>`${t}--${e}`))),attributes:{...u,...m(n)?{"data-mce-name":n}:{}}},components:RM([a.map((e=>e.asSpec())),s.map((e=>e.asSpec())),A.some(h)]),matchWidth:!0,useMinWidth:!0,onOpen:(t,o,n)=>{e.searchable&&(e=>{UE(e).each((e=>Fd.focus(e)))})(n)},dropdownBehaviours:Od([...e.dropdownBehaviours,vM((()=>e.disabled||o.providers.checkUiComponentContext(e.context).shouldDisable)),PM((()=>o.providers.checkUiComponentContext(e.context))),ey.config({}),Cm.config({}),...e.tooltip.map((t=>Qv.config(o.providers.tooltips.getConfig({tooltipText:o.providers.translate(t),onShow:t=>{if(Ue(i.get(),e.tooltip,((e,t)=>t!==e)).getOr(!1)){const e=o.providers.translate(i.get().getOr(""));Qv.setComponents(t,o.providers.tooltips.getComponents({tooltipText:e}))}}})))).toArray(),Rd(g,[_M(e,r),SM(e,r)]),Rd(p,[yd(((t,o)=>{"listbox"!==e.listRole&&rR(t)}))]),Rd("update-dropdown-width-variable",[ud(la(),((e,t)=>wx.close(e)))]),Rd("menubutton-update-display-text",[ud(cR,((e,t)=>{s.bind((t=>t.getOpt(e))).each((e=>{Cm.set(e,[op(o.providers.translate(t.event.text))])}))})),ud(dR,((e,t)=>{a.bind((t=>t.getOpt(e))).each((e=>{Cm.set(e,[aR(t.event.icon,o.providers.icons)])}))})),ud(uR,((e,t)=>{const n=o.providers.translate(t.event.text);$o(e.element,"aria-label",n),i.set(A.some(t.event.text))}))])]),eventOrder:Fe(nR,{[Ms()]:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[ca()]:["toolbar-button-events",Qv.name(),g,p]}),sandboxBehaviours:Od([$h.config({mode:"special",onLeft:l,onRight:l}),Rd("dropdown-sandbox-events",[ud(FE,((e,t)=>{TD(e),t.stop()})),ud(HE,((e,t)=>{((e,t)=>{OD(e).each((o=>{((e,t,o,n)=>{const r={...n,target:t};e.getSystem().triggerEvent(o,t,r)})(e,o.element,t.event.eventType,t.event.interactionEvent)}))})(e,t),t.stop()}))])]),lazySink:o.getSink,toggleClass:`${t}--active`,parts:{menu:{...zE(0,e.columns,e.presets),fakeFocus:e.searchable,..."listbox"===e.listRole?{}:{onHighlightItem:AD,onCollapseMenu:(e,t,o)=>{gu.getHighlighted(o).each((t=>{AD(e,o,t)}))},onDehighlightItem:MD}}},getAnchorOverrides:()=>({maxHeightFunction:(e,t)=>{Zc()(e,t-10)}}),fetch:t=>ke(S(e.fetch,t))}));return f.asSpec()},mR=e=>"separator"===e.type,pR={type:"separator"},gR=(e,t)=>{const o=U(e,((e,o)=>(e=>i(e))(o)?""===o?e:"|"===o?e.length>0&&!mR(e[e.length-1])?e.concat([pR]):e:be(t,o.toLowerCase())?e.concat([t[o.toLowerCase()]]):e:e.concat([o])),[]);return o.length>0&&mR(o[o.length-1])&&o.pop(),o},fR=(e,t)=>{const o=gR(i(e)?e.split(" "):e,t);return V(o,((e,o)=>{if((e=>be(e,"getSubmenuItems"))(o)){const n=(e=>{const t=fe(e,"value").getOrThunk((()=>Be("generated-menu-item")));return Fe({value:t},e)})(o),r=((e,t)=>{const o=e.getSubmenuItems(),n=fR(o,t);return{item:e,menus:Fe(n.menus,{[e.value]:n.items}),expansions:Fe(n.expansions,{[e.value]:e.value})}})(n,t);return{menus:Fe(e.menus,r.menus),items:[r.item,...e.items],expansions:Fe(e.expansions,r.expansions)}}return{...e,items:[o,...e.items]}}),{menus:{},expansions:{},items:[]})},bR=(e,t,o,n)=>{const r=Be("primary-menu"),i=fR(e,o.shared.providers.menuItems());if(0===i.items.length)return A.none();const s=(e=>e.search.fold((()=>({searchMode:"no-search"})),(e=>({searchMode:"search-with-field",placeholder:e.placeholder}))))(n),a=ND(r,i.items,t,o,n.isHorizontalMenu,s),l=(e=>e.search.fold((()=>({searchMode:"no-search"})),(e=>({searchMode:"search-with-results"}))))(n),c=le(i.menus,((e,n)=>ND(n,e,t,o,!1,l))),d=Fe(c,_s(r,a));return A.from(ox.tieredData(r,d,i.expansions))},vR=e=>!be(e,"items"),yR="data-value",xR=(e,t,o,n,r)=>z(o,(o=>vR(o)?{type:"togglemenuitem",...r?{}:{role:"option"},text:o.text,value:o.value,active:o.value===n,onAction:()=>{Rf.setValue(e,o.value),nd(e,ZD,{name:t}),Fd.focus(e)}}:{type:"nestedmenuitem",text:o.text,getSubmenuItems:()=>xR(e,t,o.items,n,r)})),wR=(e,t)=>re(e,(e=>vR(e)?$e(e.value===t,e):wR(e.items,t))),_R=e=>{const t={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4};let o=e.value.toFixed((n=e.unit)in t?t[n]:1);var n;return-1!==o.indexOf(".")&&(o=o.replace(/\.?0*$/,"")),o+e.unit},SR=e=>{const t=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(e);if(null!==t){const e=parseFloat(t[1]),o=t[2];return Ae.value({value:e,unit:o})}return Ae.error(e)},CR=(e,t)=>{const o={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},n=e=>be(o,e);return e.unit===t?A.some(e.value):n(e.unit)&&n(t)?o[e.unit]===o[t]?A.some(e.value):A.some(e.value/o[e.unit]*o[t]):A.none()},kR=e=>A.none(),ER=(e,t)=>{const o=SR(e).toOptional(),n=SR(t).toOptional();return Ue(o,n,((e,t)=>CR(e,t.unit).map((e=>t.value/e)).map((e=>{return o=e,n=t.unit,e=>CR(e,n).map((e=>({value:e*o,unit:n})));var o,n})).getOr(kR))).getOr(kR)},TR=(e,t)=>{const o=e.label.map((e=>UD(e,t))),n=[Pp.config({disabled:()=>e.disabled||t.checkUiComponentContext(e.context).shouldDisable}),PM((()=>t.checkUiComponentContext(e.context))),$h.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute:e=>(od(e,YD),A.some(!0))}),Rd("textfield-change",[ud(Fs(),((t,o)=>{nd(t,ZD,{name:e.name})})),ud(Ks(),((t,o)=>{nd(t,ZD,{name:e.name})}))]),Lv.config({})],r=e.validation.map((e=>Nf.config({getRoot:e=>ho(e.element),invalidClass:"tox-invalid",validator:{validate:t=>{const o=Rf.getValue(t),n=e.validator(o);return Ee(!0===n?Ae.value(o):Ae.error(n))},validateOnLoad:e.validateOnLoad}}))).toArray(),i={...e.placeholder.fold(x({}),(e=>({placeholder:t.translate(e)}))),...e.inputMode.fold(x({}),(e=>({inputmode:e}))),"data-mce-name":e.name},s=Fx.parts.field({tag:!0===e.multiline?"textarea":"input",...e.data.map((e=>({data:e}))).getOr({}),inputAttributes:i,inputClasses:[e.classname],inputBehaviours:Od(W([n,r])),selectOnFocus:!1,factory:Kx}),a=e.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[s]}:s,l=(e.flex?["tox-form__group--stretched"]:[]).concat(e.maximized?["tox-form-group--maximize"]:[]),c=[Pp.config({disabled:()=>e.disabled||t.checkUiComponentContext(e.context).shouldDisable,onDisabled:e=>{Fx.getField(e).each(Pp.disable)},onEnabled:e=>{Fx.getField(e).each(Pp.enable)}}),PM((()=>t.checkUiComponentContext(e.context)))];return HD(o,a,l,c)},OR=e=>({isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t),setActive:t=>{const o=e.element;t?(nr(o,"tox-tbtn--enabled"),$o(o,"aria-pressed",!0)):(ir(o,"tox-tbtn--enabled"),Ko(o,"aria-pressed"))},isActive:()=>ar(e.element,"tox-tbtn--enabled"),setTooltip:t=>{nd(e,uR,{text:t})},setText:t=>{nd(e,cR,{text:t})},setIcon:t=>nd(e,dR,{icon:t})}),AR=(e,t,o,n,r=!0,i)=>{const s="bordered"===e.buttonType?["bordered"]:[];return hR({text:e.text,icon:e.icon,tooltip:e.tooltip,ariaLabel:e.tooltip,searchable:e.search.isSome(),role:n,fetch:(t,n)=>{const r={pattern:e.search.isSome()?PD(t):""};e.fetch((t=>{n(bR(t,xE.CLOSE_ON_EXECUTE,o,{isHorizontalMenu:!1,search:e.search}))}),r,OR(t))},onSetup:e.onSetup,getApi:e=>OR(e),columns:1,presets:"normal",classes:s,dropdownBehaviours:[...r?[Lv.config({})]:[]],context:e.context},t,o.shared,i)},MR=(e,t,o)=>{const n=e=>n=>{const r=!n.isActive();n.setActive(r),e.storage.set(r),o.shared.getSink().each((o=>{t().getOpt(o).each((t=>{Ro(t.element),nd(t,GD,{name:e.name,value:e.storage.get()})}))}))},r=e=>t=>{t.setActive(e.storage.get())};return t=>{t(z(e,(e=>{const t=e.text.fold((()=>({})),(e=>({text:e})));return{type:e.type,active:!1,...t,context:e.context,onAction:n(e),onSetup:r(e)}})))}},PR=e=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{"aria-label":e}},components:[op(e)]}),DR=(e,t,o)=>{e.customStateIcon.each((n=>t.push(NR(n,o.shared.providers.icons,e.customStateIconTooltip.fold((()=>[]),(e=>[Qv.config(o.shared.providers.tooltips.getConfig({tooltipText:e}))])),["tox-icon-custom-state"]))))},LR=Be("leaf-label-event-id"),RR=({leaf:e,onLeafAction:t,visible:o,treeId:n,selectedId:r,backstage:i})=>{const s=e.menu.map((e=>AR(e,"tox-mbtn",i,A.none(),o))),a=[PR(e.title)];return DR(e,a,i),s.each((e=>a.push(e))),xy.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(o?["tox-tree--leaf__label--visible"]:[])},components:a,role:"treeitem",action:o=>{t(e.id),o.getSystem().broadcastOn([`update-active-item-${n}`],{value:e.id})},eventOrder:{[Bs()]:[LR,"keying"]},buttonBehaviours:Od([...o?[Lv.config({})]:[],jv.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),Gb.config({channels:{[`update-active-item-${n}`]:{onReceive:(t,o)=>{(o.value===e.id?jv.on:jv.off)(t)}}}}),Rd(LR,[yd(((t,o)=>{r.each((o=>{(o===e.id?jv.on:jv.off)(t)}))})),ud(Bs(),((e,t)=>{const o="ArrowLeft"===t.event.raw.code,n="ArrowRight"===t.event.raw.code;o?(Wn(e.element,".tox-tree--directory").each((t=>{e.getSystem().getByDom(t).each((e=>{Gn(t,".tox-tree--directory__label").each((t=>{e.getSystem().getByDom(t).each(Fd.focus)}))}))})),t.stop()):n&&t.stop()}))])])})},NR=(e,t,o,n,r)=>pE(e,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"].concat(n||[]),behaviours:o,attributes:r},t),IR=Be("directory-label-event-id"),BR=({directory:e,visible:t,noChildren:o,backstage:n})=>{const r=e.menu.map((e=>AR(e,"tox-mbtn",n,A.none()))),i=[{dom:{tag:"div",classes:["tox-chevron"]},components:[(s="chevron-right",a=n.shared.providers.icons,NR(s,a,[]))]},PR(e.title)];var s,a;DR(e,i,n),r.each((e=>{i.push(e)}));const l=t=>{Wn(t.element,".tox-tree--directory").each((o=>{t.getSystem().getByDom(o).each((o=>{const n=!jv.isOn(o);jv.toggle(o),nd(t,"expand-tree-node",{expanded:n,node:e.id})}))}))};return xy.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(t?["tox-tree--directory__label--visible"]:[])},components:i,action:l,eventOrder:{[Bs()]:[IR,"keying"]},buttonBehaviours:Od([...t?[Lv.config({})]:[],Rd(IR,[ud(Bs(),((e,t)=>{const n="ArrowRight"===t.event.raw.code,r="ArrowLeft"===t.event.raw.code;n&&o&&t.stop(),(n||r)&&Wn(e.element,".tox-tree--directory").each((o=>{e.getSystem().getByDom(o).each((o=>{!jv.isOn(o)&&n||jv.isOn(o)&&r?(l(e),t.stop()):r&&!jv.isOn(o)&&(Wn(o.element,".tox-tree--directory").each((e=>{Gn(e,".tox-tree--directory__label").each((e=>{o.getSystem().getByDom(e).each(Fd.focus)}))})),t.stop())}))}))}))])])})},zR=({children:e,onLeafAction:t,visible:o,treeId:n,expandedIds:r,selectedId:i,backstage:s})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:e.map((e=>"leaf"===e.type?RR({leaf:e,selectedId:i,onLeafAction:t,visible:o,treeId:n,backstage:s}):HR({directory:e,expandedIds:r,selectedId:i,onLeafAction:t,labelTabstopping:o,treeId:n,backstage:s}))),behaviours:Od([kv.config({dimension:{property:"height"},closedClass:"tox-tree--directory__children--closed",openClass:"tox-tree--directory__children--open",growingClass:"tox-tree--directory__children--growing",shrinkingClass:"tox-tree--directory__children--shrinking",expanded:o}),Cm.config({})])}),FR=Be("directory-event-id"),HR=({directory:e,onLeafAction:t,labelTabstopping:o,treeId:n,backstage:r,expandedIds:i,selectedId:s})=>{const{children:a}=e,l=xe(i),c=i.includes(e.id);return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[BR({directory:e,visible:o,noChildren:0===e.children.length,backstage:r}),zR({children:a,expandedIds:i,selectedId:s,onLeafAction:t,visible:c,treeId:n,backstage:r})],behaviours:Od([Rd(FR,[yd(((e,t)=>{jv.set(e,c)})),ud("expand-tree-node",((e,t)=>{const{expanded:o,node:n}=t.event;l.set(o?[...l.get(),n]:l.get().filter((e=>e!==n)))}))]),jv.config({...e.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(e,o)=>{const i=e.components()[1],c=(d=o,a.map((e=>"leaf"===e.type?RR({leaf:e,selectedId:s,onLeafAction:t,visible:d,treeId:n,backstage:r}):HR({directory:e,expandedIds:l.get(),selectedId:s,onLeafAction:t,labelTabstopping:d,treeId:n,backstage:r}))));var d;o?kv.grow(i):kv.shrink(i),Cm.set(i,c)}})])}},jR=Be("tree-event-id"),VR=(e,t,o=[],n,r,i,s)=>{const a=t.fold((()=>({})),(e=>({action:e}))),l={buttonBehaviours:Od([bM((()=>!e.enabled||s.checkUiComponentContext(e.context).shouldDisable)),PM((()=>s.checkUiComponentContext(e.context))),Lv.config({}),...i.map((e=>Qv.config(s.tooltips.getConfig({tooltipText:s.translate(e)})))).toArray(),Rd("button press",[dd("click")])].concat(o)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...a},c=Fe(l,{dom:n});return Fe(c,{components:r})},UR=(e,t,o,n=[],r)=>{const i={tag:"button",classes:["tox-tbtn"],attributes:{...e.tooltip.map((e=>({"aria-label":o.translate(e)}))).getOr({}),"data-mce-name":r}},s=e.icon.map((e=>sR(e,o.icons))),a=RM([s]);return VR(e,t,n,i,a,e.tooltip,o)},ZR=e=>{switch(e){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];default:return["tox-button","tox-button--secondary"]}},$R=(e,t,o,n=[],r=[])=>{const i=o.translate(e.text),s=e.icon.map((e=>sR(e,o.icons))),a=[s.getOrThunk((()=>op(i)))],l=e.buttonType.getOr(e.primary||e.borderless?"primary":"secondary"),c={tag:"button",classes:[...ZR(l),...s.isSome()?["tox-button--icon"]:[],...e.borderless?["tox-button--naked"]:[],...r],attributes:{"aria-label":i,"data-mce-name":e.text}},d=e.icon.map(x(i));return VR(e,t,n,c,a,d,o)},WR=(e,t,o,n=[],r=[])=>{const i=$R(e,A.some(t),o,n,r);return xy.sketch(i)},qR=(e,t)=>o=>{"custom"===t?nd(o,GD,{name:e,value:{}}):"submit"===t?od(o,YD):"cancel"===t?od(o,qD):console.error("Unknown button type: ",t)},GR=(e,t,o)=>{if(((e,t)=>"menu"===t)(0,t)){const t=()=>i,n=e,r={...e,buttonType:"default",type:"menubutton",search:A.none(),onSetup:t=>(t.setEnabled(e.enabled),b),fetch:MR(n.items,t,o)},i=oy(AR(r,"tox-tbtn",o,A.none(),!0,e.text.or(e.tooltip).getOrUndefined()));return i.asSpec()}if(((e,t)=>"custom"===t||"cancel"===t||"submit"===t)(0,t)){const n=qR(e.name,t),r={...e,context:"cancel"===t?"any":e.context,borderless:!1};return WR(r,n,o.shared.providers,[])}if(((e,t)=>"togglebutton"===t)(0,t))return((e,t,o)=>{var n,r;const i=e.icon.map((e=>aR(e,t.icons))).map(oy),s=e.buttonType.getOr(e.primary?"primary":"secondary"),a={...e,name:null!==(n=e.name)&&void 0!==n?n:"",primary:"primary"===s,tooltip:e.tooltip,enabled:null!==(r=e.enabled)&&void 0!==r&&r,borderless:!1},l=a.tooltip.or(e.text).map((e=>({"aria-label":t.translate(e)}))).getOr({}),c=ZR(null!=s?s:"secondary"),d=e.icon.isSome()&&e.text.isSome(),u={tag:"button",classes:[...c.concat(e.icon.isSome()?["tox-button--icon"]:[]),...e.active?["tox-button--enabled"]:[],...d?["tox-button--icon-and-text"]:[]],attributes:{...l,...m(o)?{"data-mce-name":o}:{}}},h=t.translate(e.text.getOr("")),p=op(h),g=[...RM([i.map((e=>e.asSpec()))]),...e.text.isSome()?[p]:[]],f=VR(a,A.some((o=>{nd(o,GD,{name:e.name,value:{setIcon:e=>{i.map((n=>n.getOpt(o).each((o=>{Cm.set(o,[aR(e,t.icons)])}))))}}})})),[],u,g,e.tooltip,t);return xy.sketch(f)})(e,o.shared.providers,e.text.or(e.tooltip).getOrUndefined());throw console.error("Unknown footer button type: ",t),new Error("Unknown footer button type")},YR=(e,t)=>{const o=qR(e.name,"custom");return n=A.none(),r=Fx.parts.field({factory:xy,...$R(e,A.some(o),t,[hL(""),iL()])}),HD(n,r,[],[]);var n,r},KR={type:"separator"},XR=e=>({type:"menuitem",value:e.url,text:e.title,meta:{attach:e.attach},onAction:b}),JR=(e,t)=>({type:"menuitem",value:t,text:e,meta:{attach:void 0},onAction:b}),QR=(e,t)=>(e=>z(e,XR))(((e,t)=>j(t,(t=>t.type===e)))(e,t)),eN=e=>QR("header",e.targets),tN=e=>QR("anchor",e.targets),oN=e=>A.from(e.anchorTop).map((e=>JR("<top>",e))).toArray(),nN=e=>A.from(e.anchorBottom).map((e=>JR("<bottom>",e))).toArray(),rN=(e,t)=>{const o=e.toLowerCase();return j(t,(e=>{var t;const n=void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.text,r=null!==(t=e.value)&&void 0!==t?t:"";return Je(n.toLowerCase(),o)||Je(r.toLowerCase(),o)}))},iN=(e,t,o)=>{var n,r;const i=Rf.getValue(t),s=null!==(r=null===(n=null==i?void 0:i.meta)||void 0===n?void 0:n.text)&&void 0!==r?r:i.value;return o.getLinkInformation().fold((()=>[]),(t=>{const n=rN(s,(e=>z(e,(e=>JR(e,e))))(o.getHistory(e)));return"file"===e?(r=[n,rN(s,eN(t)),rN(s,W([oN(t),tN(t),nN(t)]))],U(r,((e,t)=>0===e.length||0===t.length?e.concat(t):e.concat(KR,t)),[])):n;var r}))},sN=Be("aria-invalid"),aN=e=>(t,o,n,r,i)=>fe(o,"name").fold((()=>e(o,r,A.none(),i)),(s=>t.field(s,e(o,r,fe(n,s),i)))),lN={bar:aN(((e,t)=>((e,t)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:z(e.items,t.interpreter)}))(e,t.shared))),collection:aN(((e,t,o)=>eL(e,t.shared.providers,o))),alertbanner:aN(((e,t)=>((e,t)=>{const o=uE(e.icon,t.icons);return Vg.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in",`tox-notification--${e.level}`]},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:e.url?void 0:o},components:e.url?[xy.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:o,attributes:{title:t.translate(e.iconTooltip)}},action:t=>nd(t,GD,{name:"alert-banner",value:e.url}),buttonBehaviours:Od([hE()])})]:void 0},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:t.translate(e.text)}}]})})(e,t.shared.providers))),input:aN(((e,t,o)=>((e,t,o)=>TR({name:e.name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:!e.enabled,classname:"tox-textfield",validation:A.none(),maximized:e.maximized,data:o,context:e.context},t))(e,t.shared.providers,o))),textarea:aN(((e,t,o)=>((e,t,o)=>TR({name:e.name,multiline:!0,label:e.label,inputMode:A.none(),placeholder:e.placeholder,flex:!0,disabled:!e.enabled,classname:"tox-textarea",validation:A.none(),maximized:e.maximized,data:o,context:e.context},t))(e,t.shared.providers,o))),label:aN(((e,t,o,n)=>((e,t,o)=>{const n="tox-label",r="center"===e.align?[`${n}--center`]:[],i="end"===e.align?[`${n}--end`]:[],s=oy({dom:{tag:"label",classes:[n,...r,...i]},components:[op(t.providers.translate(e.label))]}),a=z(e.items,t.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[s.asSpec(),...a],behaviours:Od([iL(),Cm.config({}),(l=A.none(),uL(l,en,tn)),$h.config({mode:"acyclic"}),Rd("label",[yd((t=>{e.for.each((e=>{o(e).each((e=>{s.getOpt(t).each((t=>{var o;const n=null!==(o=qo(e.element,"id"))&&void 0!==o?o:Be("form-field");$o(e.element,"id",n),$o(t.element,"for",n)}))}))}))}))])])};var l})(e,t.shared,n))),iframe:(e=>(t,o,n,r,i)=>{const s=Fe(o,{source:"dynamic"});return aN(e)(t,s,n,r,i)})(((e,t,o)=>QL(e,t.shared.providers,o))),button:aN(((e,t)=>YR(e,t.shared.providers))),checkbox:aN(((e,t,o)=>((e,t,o)=>{const n=e=>(e.element.dom.click(),A.some(!0)),r=Fx.parts.field({factory:{sketch:w},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:Od([iL(),Pp.config({disabled:()=>!e.enabled||t.checkUiComponentContext(e.context).shouldDisable,onDisabled:e=>{ho(e.element).each((e=>nr(e,"tox-checkbox--disabled")))},onEnabled:e=>{ho(e.element).each((e=>ir(e,"tox-checkbox--disabled")))}}),Lv.config({}),Fd.config({}),uL(o,Jn,Xn),$h.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),Rd("checkbox-events",[ud(Hs(),((t,o)=>{nd(t,ZD,{name:e.name})}))])])}),i=Fx.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[op(t.translate(e.label))],behaviours:Od([ey.config({})])}),s=e=>pE("checked"===e?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+e]},t.icons),a=oy({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[s("checked"),s("unchecked")]});return Fx.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[r,a.asSpec(),i],fieldBehaviours:Od([Pp.config({disabled:()=>!e.enabled||t.checkUiComponentContext(e.context).shouldDisable}),PM((()=>t.checkUiComponentContext(e.context)))])})})(e,t.shared.providers,o))),colorinput:aN(((e,t,o)=>rL(e,t.shared,t.colorinput,o))),colorpicker:aN(((e,t,o)=>kL(0,t.shared.providers,o))),dropzone:aN(((e,t,o)=>ML(e,t.shared.providers,o))),grid:aN(((e,t)=>((e,t)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${e.columns}col`]},components:z(e.items,t.interpreter)}))(e,t.shared))),listbox:aN(((e,t,o)=>((e,t,o)=>{const n=N(e.items,(e=>!vR(e))),r=t.shared.providers,i=o.bind((t=>wR(e.items,t))).orThunk((()=>te(e.items).filter(vR))),s=e.label.map((e=>UD(e,r))),a=Fx.parts.field({dom:{},factory:{sketch:o=>hR({context:e.context,uid:o.uid,text:i.map((e=>e.text)),icon:A.none(),tooltip:A.none(),role:$e(!n,"combobox"),...n?{}:{listRole:"listbox"},ariaLabel:e.label,fetch:(o,r)=>{const i=xR(o,e.name,e.items,Rf.getValue(o),n);r(bR(i,xE.CLOSE_ON_EXECUTE,t,{isHorizontalMenu:!1,search:A.none()}))},onSetup:x(b),getApi:x({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[Lv.config({}),dL(i.map((e=>e.value)),(e=>qo(e.element,yR)),((t,o)=>{wR(e.items,o).each((e=>{$o(t.element,yR,e.value),nd(t,cR,{text:e.text})}))}))]},"tox-listbox",t.shared)}}),l={dom:{tag:"div",classes:["tox-listboxfield"]},components:[a]};return Fx.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:W([s.toArray(),[l]]),fieldBehaviours:Od([Pp.config({disabled:()=>!e.enabled||r.checkUiComponentContext(e.context).shouldDisable,onDisabled:e=>{Fx.getField(e).each(Pp.disable)},onEnabled:e=>{Fx.getField(e).each(Pp.enable)}})])})})(e,t,o))),selectbox:aN(((e,t,o)=>((e,t,o)=>{const n=z(e.items,(e=>({text:t.translate(e.text),value:e.value}))),r=e.label.map((e=>UD(e,t))),i=Fx.parts.field({dom:{},...o.map((e=>({data:e}))).getOr({}),selectAttributes:{size:e.size},options:n,factory:Zx,selectBehaviours:Od([Pp.config({disabled:()=>!e.enabled||t.checkUiComponentContext(e.context).shouldDisable}),Lv.config({}),Rd("selectbox-change",[ud(Hs(),((t,o)=>{nd(t,ZD,{name:e.name})}))])])}),s=e.size>1?A.none():A.some(pE("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},t.icons)),a={dom:{tag:"div",classes:["tox-selectfield"]},components:W([[i],s.toArray()])};return Fx.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:W([r.toArray(),[a]]),fieldBehaviours:Od([Pp.config({disabled:()=>!e.enabled||t.checkUiComponentContext(e.context).shouldDisable,onDisabled:e=>{Fx.getField(e).each(Pp.disable)},onEnabled:e=>{Fx.getField(e).each(Pp.enable)}}),PM((()=>t.checkUiComponentContext(e.context)))])})})(e,t.shared.providers,o))),sizeinput:aN(((e,t)=>((e,t)=>{let o=kR;const n=Be("ratio-event"),r=e=>pE(e,{tag:"span",classes:["tox-icon","tox-lock-icon__"+e]},t.icons),i=()=>!e.enabled||t.checkUiComponentContext(e.context).shouldDisable,s=PM((()=>t.checkUiComponentContext(e.context))),a=e.label.getOr("Constrain proportions"),l=t.translate(a),c=Ux.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":l,"data-mce-name":a}},components:[r("lock"),r("unlock")],buttonBehaviours:Od([Pp.config({disabled:i}),s,Lv.config({}),Qv.config(t.tooltips.getConfig({tooltipText:l}))])}),d=e=>({dom:{tag:"div",classes:["tox-form__group"]},components:e}),u=t=>Fx.parts.field({factory:Kx,inputClasses:["tox-textfield"],inputBehaviours:Od([Pp.config({disabled:i}),s,Lv.config({}),Rd("size-input-events",[ud(Ns(),((e,o)=>{nd(e,n,{isField1:t})})),ud(Hs(),((t,o)=>{nd(t,ZD,{name:e.name})}))])]),selectOnFocus:!1}),h=e=>({dom:{tag:"label",classes:["tox-label"]},components:[op(t.translate(e))]}),m=Ux.parts.field1(d([Fx.parts.label(h("Width")),u(!0)])),p=Ux.parts.field2(d([Fx.parts.label(h("Height")),u(!1)]));return Ux.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[m,p,d([h(" "),c])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(e,t,n)=>{SR(Rf.getValue(e)).each((e=>{o(e).each((e=>{Rf.setValue(t,_R(e))}))}))},coupledFieldBehaviours:Od([Pp.config({disabled:i,onDisabled:e=>{Ux.getField1(e).bind(Fx.getField).each(Pp.disable),Ux.getField2(e).bind(Fx.getField).each(Pp.disable),Ux.getLock(e).each(Pp.disable)},onEnabled:e=>{Ux.getField1(e).bind(Fx.getField).each(Pp.enable),Ux.getField2(e).bind(Fx.getField).each(Pp.enable),Ux.getLock(e).each(Pp.enable)}}),PM((()=>t.checkUiComponentContext("mode:design"))),Rd("size-input-events2",[ud(n,((e,t)=>{const n=t.event.isField1,r=n?Ux.getField1(e):Ux.getField2(e),i=n?Ux.getField2(e):Ux.getField1(e),s=r.map(Rf.getValue).getOr(""),a=i.map(Rf.getValue).getOr("");o=ER(s,a)}))])])})})(e,t.shared.providers))),slider:aN(((e,t,o)=>((e,t,o)=>{const n=z_.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[op(t.translate(e.label))]}),r=z_.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),i=z_.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return z_.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:e.min,maxX:e.max,getInitialValue:x(o.getOrThunk((()=>(Math.abs(e.max)-Math.abs(e.min))/2)))},components:[n,r,i],sliderBehaviours:Od([iL(),Fd.config({})]),onChoose:(t,o,n)=>{nd(t,ZD,{name:e.name,value:n})},onChange:(t,o,n)=>{nd(t,ZD,{name:e.name,value:n})}})})(e,t.shared.providers,o))),urlinput:aN(((e,t,o)=>((e,t,o,n)=>{const r=t.shared.providers,i=t=>{const n=Rf.getValue(t);o.addToHistory(n.value,e.filetype)},s={...n.map((e=>({initialData:e}))).getOr({}),dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":sN,type:"url"},minChars:0,responseTime:0,fetch:n=>{const r=iN(e.filetype,n,o),i=bR(r,xE.BUBBLE_TO_SANDBOX,t,{isHorizontalMenu:!1,search:A.none()});return Ee(i)},getHotspot:e=>m.getOpt(e),onSetValue:(e,t)=>{e.hasConfigured(Nf)&&Nf.run(e).get(b)},typeaheadBehaviours:Od([...o.getValidationHandler().map((t=>Nf.config({getRoot:e=>ho(e.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(e,t)=>{c.getOpt(e).each((e=>{$o(e.element,"title",r.translate(t))}))}},validator:{validate:o=>{const n=Rf.getValue(o);return De((o=>{t({type:e.filetype,url:n.value},(e=>{if("invalid"===e.status){const t=Ae.error(e.message);o(t)}else{const t=Ae.value(e.message);o(t)}}))}))},validateOnLoad:!1}}))).toArray(),Pp.config({disabled:()=>!e.enabled||r.checkUiComponentContext(e.context).shouldDisable}),Lv.config({}),Rd("urlinput-events",[ud(Fs(),(t=>{const o=ur(t.element),n=o.trim();n!==o&&hr(t.element,n),"file"===e.filetype&&nd(t,ZD,{name:e.name})})),ud(Hs(),(t=>{nd(t,ZD,{name:e.name}),i(t)})),ud(Ks(),(t=>{nd(t,ZD,{name:e.name}),i(t)}))])]),eventOrder:{[Fs()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText:e=>e.value,selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:t.shared.getSink,parts:{menu:zE(0,0,"normal")},onExecute:(e,t,o)=>{nd(t,YD,{})},onItemExecute:(t,o,n,r)=>{i(t),nd(t,ZD,{name:e.name})}},a=Fx.parts.field({...s,factory:RS}),l=e.label.map((e=>UD(e,r))),c=oy(((e,t,o=e,n=e)=>pE(o,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+e],attributes:{title:r.translate(n),"aria-live":"polite",...t.fold((()=>({})),(e=>({id:e})))}},r.icons))("invalid",A.some(sN),"warning")),d=oy({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[c.asSpec()]}),u=o.getUrlPicker(e.filetype),h=Be("browser.url.event"),m=oy({dom:{tag:"div",classes:["tox-control-wrap"]},components:[a,d.asSpec()],behaviours:Od([Pp.config({disabled:()=>!e.enabled||r.checkUiComponentContext(e.context).shouldDisable})])}),p=oy(WR({context:e.context,name:e.name,icon:A.some("browse"),text:e.picker_text.or(e.label).getOr(""),enabled:e.enabled,primary:!1,buttonType:A.none(),borderless:!0},(e=>od(e,h)),r,[],["tox-browse-url"]));return Fx.sketch({dom:VD([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:W([[m.asSpec()],u.map((()=>p.asSpec())).toArray()])}]),fieldBehaviours:Od([Pp.config({disabled:()=>!e.enabled||r.checkUiComponentContext(e.context).shouldDisable,onDisabled:e=>{Fx.getField(e).each(Pp.disable),p.getOpt(e).each(Pp.disable)},onEnabled:e=>{Fx.getField(e).each(Pp.enable),p.getOpt(e).each(Pp.enable)}}),PM((()=>r.checkUiComponentContext(e.context))),Rd("url-input-events",[ud(h,(t=>{mp.getCurrent(t).each((o=>{const n=Rf.getValue(o),r={fieldname:e.name,...n};u.each((n=>{n(r).get((n=>{Rf.setValue(o,n),nd(t,ZD,{name:e.name})}))}))}))}))])])})})(e,t,t.urlinput,o))),customeditor:aN((e=>{const t=Ye(),o=oy({dom:{tag:e.tag}}),n=Ye(),r=!TL(e)&&e.onFocus.isSome()?[Fd.config({onFocus:t=>{e.onFocus.each((e=>{e(t.element.dom)}))}}),Lv.config({})]:[];return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:Od([Rd("custom-editor-events",[yd((r=>{o.getOpt(r).each((o=>{(TL(e)?e.init(o.element.dom):EL.load(e.scriptId,e.scriptUrl).then((t=>t(o.element.dom,e.settings)))).then((e=>{n.on((t=>{e.setValue(t)})),n.clear(),t.set(e)}))}))}))]),dL(A.none(),(()=>t.get().fold((()=>n.get().getOr("")),(e=>e.getValue()))),((e,o)=>{t.get().fold((()=>n.set(o)),(e=>e.setValue(o)))})),iL()].concat(r)),components:[o.asSpec()]}})),htmlpanel:aN(((e,t)=>((e,t)=>{const o=["tox-form__group",...e.stretched?["tox-form__group--stretched"]:[]],n=Rd("htmlpanel",[yd((t=>{e.onInit(t.element.dom)}))]);return"presentation"===e.presets?Vg.sketch({dom:{tag:"div",classes:o,innerHtml:e.html},containerBehaviours:Od([Qv.config({...t.tooltips.getConfig({tooltipText:"",onShow:e=>{Yn(e.element,"[data-mce-tooltip]:hover").orThunk((()=>zo(e.element))).each((o=>{Go(o,"data-mce-tooltip").each((o=>{Qv.setComponents(e,t.tooltips.getComponents({tooltipText:o}))}))}))}}),mode:"children-normal",anchor:e=>({type:"node",node:Yn(e.element,"[data-mce-tooltip]:hover").orThunk((()=>zo(e.element).filter((e=>Go(e,"data-mce-tooltip").isSome())))),root:e.element,layouts:{onLtr:x([mc,hc,lc,dc,cc,uc]),onRtl:x([mc,hc,lc,dc,cc,uc])},bubble:Vl(0,-2,{})})}),n])}):Vg.sketch({dom:{tag:"div",classes:o,innerHtml:e.html,attributes:{role:"document"}},containerBehaviours:Od([Lv.config({}),Fd.config({}),n])})})(e,t.shared.providers))),imagepreview:aN(((e,t,o)=>eR(e,o))),table:aN(((e,t)=>((e,t)=>{const o=e=>({dom:{tag:"th",innerHtml:t.translate(e)}}),n=e=>({dom:{tag:"td",innerHtml:t.translate(e)}}),r=e=>({dom:{tag:"tr"},components:z(e,n)});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(s=e.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:z(s,o)}]}),(i=e.cells,{dom:{tag:"tbody"},components:z(i,r)})],behaviours:Od([Lv.config({}),Fd.config({})])};var i,s})(e,t.shared.providers))),tree:aN(((e,t)=>((e,t)=>{const o=e.onLeafAction.getOr(b),n=e.onToggleExpand.getOr(b),r=e.defaultExpandedIds,i=xe(r),s=xe(e.defaultSelectedId),a=Be("tree-id"),l=(n,r)=>e.items.map((e=>"leaf"===e.type?RR({leaf:e,selectedId:n,onLeafAction:o,visible:!0,treeId:a,backstage:t}):HR({directory:e,selectedId:n,onLeafAction:o,expandedIds:r,labelTabstopping:!0,treeId:a,backstage:t})));return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:l(s.get(),i.get()),behaviours:Od([$h.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1}),Rd(jR,[ud("expand-tree-node",((e,t)=>{const{expanded:o,node:r}=t.event;i.set(o?[...i.get(),r]:i.get().filter((e=>e!==r))),n(i.get(),{expanded:o,node:r})}))]),Gb.config({channels:{[`update-active-item-${a}`]:{onReceive:(e,t)=>{s.set(A.some(t.value)),Cm.set(e,l(A.some(t.value),i.get()))}}}}),Cm.config({})])}})(e,t))),panel:aN(((e,t)=>((e,t)=>({dom:{tag:"div",classes:e.classes},components:z(e.items,t.shared.interpreter)}))(e,t)))},cN={field:(e,t)=>t,record:x([])},dN=(e,t,o,n,r)=>{const i=Fe(n,{shared:{interpreter:t=>uN(e,t,o,i,r)}});return uN(e,t,o,i,r)},uN=(e,t,o,n,r)=>fe(lN,t.type).fold((()=>(console.error(`Unknown factory type "${t.type}", defaulting to container: `,t),t)),(i=>i(e,t,o,n,r))),hN=(e,t,o,n)=>uN(cN,e,t,o,n),mN={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},pN=(e,t,o)=>{const n={maxHeightFunction:$c()};return()=>o()?{type:"node",root:_o(wo(e())),node:A.from(e()),bubble:Vl(12,12,mN),layouts:{onRtl:()=>[Rc],onLtr:()=>[Lc]},overrides:n}:{type:"hotspot",hotspot:t(),bubble:Vl(-12,12,mN),layouts:{onRtl:()=>[lc,cc,mc],onLtr:()=>[cc,lc,mc]},overrides:n}},gN=(e,t,o,n)=>{const r={maxHeightFunction:$c()};return()=>n()?{type:"node",root:_o(wo(t())),node:A.from(t()),bubble:Vl(12,12,mN),layouts:{onRtl:()=>[Nc],onLtr:()=>[Nc]},overrides:r}:e?{type:"node",root:_o(wo(t())),node:A.from(t()),bubble:Vl(0,-Cn(t()),mN),layouts:{onRtl:()=>[hc],onLtr:()=>[hc]},overrides:r}:{type:"hotspot",hotspot:o(),bubble:Vl(0,0,mN),layouts:{onRtl:()=>[hc],onLtr:()=>[hc]},overrides:r}},fN=(e,t,o)=>()=>o()?{type:"node",root:_o(wo(e())),node:A.from(e()),layouts:{onRtl:()=>[Nc],onLtr:()=>[Nc]}}:{type:"hotspot",hotspot:t(),layouts:{onRtl:()=>[mc],onLtr:()=>[mc]}},bN=(e,t)=>()=>({type:"selection",root:t(),getSelection:()=>{const t=e.selection.getRng(),o=e.model.table.getSelectedCells();if(o.length>1){const e=o[0],t=o[o.length-1],n={firstCell:at.fromDom(e),lastCell:at.fromDom(t)};return A.some(n)}return A.some(Cr.range(at.fromDom(t.startContainer),t.startOffset,at.fromDom(t.endContainer),t.endOffset))}}),vN=e=>t=>({type:"node",root:e(),node:t}),yN=(e,t,o,n)=>{const r=HC(e),i=()=>at.fromDom(e.getBody()),s=()=>at.fromDom(e.getContentAreaContainer()),a=()=>r||!n();return{inlineDialog:pN(s,t,a),inlineBottomDialog:gN(e.inline,s,o,a),banner:fN(s,t,a),cursor:bN(e,i),node:vN(i)}},xN=e=>(t,o)=>{cD(e)(t,o)},wN=e=>()=>GP(e),_N=e=>t=>ZP(e,t),SN=e=>t=>qP(e,t),CN=e=>()=>xC(e),kN=e=>ve(e,"items"),EN=e=>ve(e,"format"),TN=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],ON=e=>U(e,((e,t)=>{if(be(t,"items")){const o=ON(t.items);return{customFormats:e.customFormats.concat(o.customFormats),formats:e.formats.concat([{title:t.title,items:o.formats}])}}if((e=>be(e,"inline"))(t)||(e=>be(e,"block"))(t)||(e=>be(e,"selector"))(t)){const o=`custom-${i(t.name)?t.name:t.title.toLowerCase()}`;return{customFormats:e.customFormats.concat([{name:o,format:t}]),formats:e.formats.concat([{title:t.title,format:o,icon:t.icon}])}}return{...e,formats:e.formats.concat(t)}}),{customFormats:[],formats:[]}),AN=e=>QS(e).map((t=>{const o=((e,t)=>{const o=ON(t),n=t=>{F(t,(t=>{e.formatter.has(t.name)||e.formatter.register(t.name,t.format)}))};return e.formatter?n(o.customFormats):e.on("init",(()=>{n(o.customFormats)})),o.formats})(e,t);return eC(e)?TN.concat(o):o})).getOr(TN),MN=(e,t,o)=>({...e,type:"formatter",isSelected:t(e.format),getStylePreview:o(e.format)}),PN=(e,t,o,n)=>{const r=t=>z(t,(t=>kN(t)?(e=>{const t=r(e.items);return{...e,type:"submenu",getStyleItems:x(t)}})(t):EN(t)?(e=>MN(e,o,n))(t):(e=>{const t=ie(e);return 1===t.length&&R(t,"title")})(t)?{...t,type:"separator"}:(t=>{const r=i(t.name)?t.name:Be(t.title),s=`custom-${r}`,a={...t,type:"formatter",format:s,isSelected:o(s),getStylePreview:n(s)};return e.formatter.register(r,a),a})(t)));return r(t)},DN=e=>{let t=0;const o=e=>[{dom:{tag:"div",classes:["tox-tooltip__body"]},components:[op(e.tooltipText)]}];return{getConfig:n=>({delayForShow:()=>t>0?60:300,delayForHide:x(300),exclusive:!0,lazySink:e,tooltipDom:{tag:"div",classes:["tox-tooltip","tox-tooltip--up"]},tooltipComponents:o(n),onShow:(e,o)=>{t++,n.onShow&&n.onShow(e,o)},onHide:(e,o)=>{t--,n.onHide&&n.onHide(e,o)},onSetup:n.onSetup}),getComponents:o}},LN=OL.trim,RN=e=>t=>{if((e=>m(e)&&1===e.nodeType)(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},NN=RN("true"),IN=RN("false"),BN=(e,t,o,n,r)=>({type:e,title:t,url:o,level:n,attach:r}),zN=e=>e.innerText||e.textContent,FN=e=>(e=>e&&"A"===e.nodeName&&void 0!==(e.id||e.name))(e)&&jN(e),HN=e=>e&&/^(H[1-6])$/.test(e.nodeName),jN=e=>(e=>{let t=e;for(;t=t.parentNode;){const e=t.contentEditable;if(e&&"inherit"!==e)return NN(t)}return!1})(e)&&!IN(e),VN=e=>HN(e)&&jN(e),UN=e=>{var t;const o=(e=>e.id?e.id:Be("h"))(e);return BN("header",null!==(t=zN(e))&&void 0!==t?t:"","#"+o,(e=>HN(e)?parseInt(e.nodeName.substr(1),10):0)(e),(()=>{e.id=o}))},ZN=e=>{const t=e.id||e.name,o=zN(e);return BN("anchor",o||"#"+t,"#"+t,0,b)},$N=e=>{const t=(o="h1,h2,h3,h4,h5,h6,a:not([href])",n=e,z(pr(at.fromDom(n),o),(e=>e.dom)));var o,n;return t},WN=e=>LN(e.title).length>0,qN=e=>{const t=$N(e);return j((e=>z(j(e,VN),UN))(t).concat((e=>z(j(e,FN),ZN))(t)),WN)},GN="tinymce-url-history",YN=e=>i(e)&&/^https?/.test(e),KN=e=>s(e)&&pe(e,(e=>{return!(l(t=e)&&t.length<=5&&G(t,YN));var t})).isNone(),XN=()=>{const e=RP.getItem(GN);if(null===e)return{};let t;try{t=JSON.parse(e)}catch(e){if(e instanceof SyntaxError)return console.log("Local storage "+GN+" was not valid JSON",e),{};throw e}return KN(t)?t:(console.log("Local storage "+GN+" was not valid format",t),{})},JN=e=>{const t=XN();return fe(t,e).getOr([])},QN=(e,t)=>{if(!YN(e))return;const o=XN(),n=fe(o,t).getOr([]),r=j(n,(t=>t!==e));o[t]=[e].concat(r).slice(0,5),(e=>{if(!KN(e))throw new Error("Bad format for history:\n"+JSON.stringify(e));RP.setItem(GN,JSON.stringify(e))})(o)},eI=e=>!!e,tI=e=>le(OL.makeMap(e,/[, ]/),eI),oI=e=>A.from(mC(e)),nI=(e,t)=>{const o=(e=>{const t=A.from(fC(e)).filter(eI).map(tI);return oI(e).fold(T,(e=>t.fold(O,(e=>ie(e).length>0&&e))))})(e);return d(o)?o?oI(e):A.none():o[t]?oI(e):A.none()},rI=e=>A.from(e).filter(i).getOrUndefined(),iI=e=>({getHistory:JN,addToHistory:QN,getLinkInformation:()=>(e=>bC(e)?A.some({targets:qN(e.getBody()),anchorTop:rI(vC(e)),anchorBottom:rI(yC(e))}):A.none())(e),getValidationHandler:()=>(e=>A.from(pC(e)))(e),getUrlPicker:t=>((e,t)=>nI(e,t).map((o=>n=>ke((r=>{const a={filetype:t,fieldname:n.fieldname,...A.from(n.meta).getOr({})};o.call(e,((e,t)=>{if(!i(e))throw new Error("Expected value to be string");if(void 0!==t&&!s(t))throw new Error("Expected meta to be a object");r({value:e,meta:t})}),n.value,a)})))))(e,t)}),sI=(e,t,o,n)=>{const r=xe(!1),i=(e=>{const t=xe(zC(e)?"bottom":"top");return{isPositionedAtTop:()=>"top"===t.get(),getDockingMode:t.get,setDockingMode:t.set}})(t),s={icons:()=>t.ui.registry.getAll().icons,menuItems:()=>t.ui.registry.getAll().menuItems,translate:iE.translate,isDisabled:()=>!t.ui.isEnabled(),getOption:t.options.get,tooltips:DN(e.dialog),checkUiComponentContext:e=>{if(WS(t))return{contextType:"disabled",shouldDisable:!0};const[o,n=""]=e.split(":"),r=t.ui.registry.getAll().contexts;return{contextType:o,shouldDisable:!fe(r,o).fold((()=>fe(r,"mode").map((e=>e("design"))).getOr(!1)),(e=>"!"===n.charAt(0)?!e(n.slice(1)):e(n)))}}},a=iI(t),l=(e=>{const t=t=>()=>e.formatter.match(t),o=t=>()=>{const o=e.formatter.get(t);return void 0!==o?A.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):A.none()},n=xe([]),r=xe([]),i=xe(!1);return e.on("PreInit",(r=>{const i=AN(e),s=PN(e,i,t,o);n.set(s)})),e.on("addStyleModifications",(n=>{const s=PN(e,n.items,t,o);r.set(s),i.set(n.replace)})),{getData:()=>{const e=i.get()?[]:n.get(),t=r.get();return e.concat(t)}}})(t),c=(e=>({colorPicker:xN(e),hasCustomColors:wN(e),getColors:_N(e),getColorCols:SN(e)}))(t),d=(e=>({isDraggableModal:CN(e)}))(t),u={shared:{providers:s,anchors:yN(t,o,n,i.isPositionedAtTop),header:i},urlinput:a,styles:l,colorinput:c,dialog:d,isContextMenuOpen:()=>r.get(),setContextMenuState:e=>r.set(e)},h=e=>A.none(),m={...u,shared:{...u.shared,interpreter:e=>hN(e,{},m,h),getSink:e.popup}},p={...u,shared:{...u.shared,interpreter:e=>hN(e,{},p,h),getSink:e.dialog}};return{popup:m,dialog:p}},aI=b,lI=T,cI=x([]);var dI=Object.freeze({__proto__:null,setup:aI,isDocked:lI,getBehaviours:cI});const uI=x(Be("toolbar-height-change")),hI={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},mI="tox-tinymce--toolbar-sticky-on",pI="tox-tinymce--toolbar-sticky-off",gI=(e,t)=>R(cg.getModes(e),t),fI=e=>{const t=e.element;ho(t).each((o=>{const n="padding-"+cg.getModes(e)[0];if(cg.isDocked(e)){const e=On(o);un(t,"width",e+"px"),un(o,n,(e=>Cn(e)+(parseInt(pn(e,"margin-top"),10)||0)+(parseInt(pn(e,"margin-bottom"),10)||0))(t)+"px")}else yn(t,"width"),yn(o,n)}))},bI=(e,t)=>{t?(ir(e,hI.fadeOutClass),lr(e,[hI.transitionClass,hI.fadeInClass])):(ir(e,hI.fadeInClass),lr(e,[hI.fadeOutClass,hI.transitionClass]))},vI=(e,t)=>{const o=at.fromDom(e.getContainer());t?(nr(o,mI),ir(o,pI)):(nr(o,pI),ir(o,mI))},yI=(e,t)=>{const o=Ye(),n=t.getSink,r=e=>{n().each((t=>e(t.element)))},i=t=>{e.inline||fI(t),vI(e,cg.isDocked(t)),t.getSystem().broadcastOn([sy()],{}),n().each((e=>e.getSystem().broadcastOn([sy()],{})))},s=e.inline?[]:[Gb.config({channels:{[uI()]:{onReceive:fI}}})];return[Fd.config({}),cg.config({contextual:{lazyContext:t=>{const o=Cn(t.element),n=e.inline?e.getContentAreaContainer():e.getContainer();return A.from(n).map((n=>{const r=Fr(at.fromDom(n));return XC(e,t.element).fold((()=>{const e=r.height-o,n=r.y+(gI(t,"top")?0:o);return zr(r.x,n,r.width,e)}),(e=>{const n=jr(r,JC(e)),i=gI(t,"top")?n.y:n.y+o;return zr(n.x,i,n.width,n.height-o)}))}))},onShow:()=>{r((e=>bI(e,!0)))},onShown:e=>{r((e=>cr(e,[hI.transitionClass,hI.fadeInClass]))),o.get().each((t=>{((e,t)=>{const o=so(t);Bo(o).filter((e=>!vt(t,e))).filter((t=>vt(t,at.fromDom(o.dom.body))||yt(e,t))).each((()=>Ro(t)))})(e.element,t),o.clear()}))},onHide:e=>{((e,t)=>zo(e).orThunk((()=>t().toOptional().bind((e=>zo(e.element))))))(e.element,n).fold(o.clear,o.set),r((e=>bI(e,!1)))},onHidden:()=>{r((e=>cr(e,[hI.transitionClass])))},...hI},lazyViewport:t=>XC(e,t.element).fold((()=>{const o=Vr(),n=dC(e),r=o.y+(gI(t,"top")&&!KC(e)?n:0),i=o.height-(gI(t,"bottom")?n:0);return{bounds:zr(o.x,r,o.width,i),optScrollEnv:A.none()}}),(e=>({bounds:JC(e),optScrollEnv:A.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Rn(e.element).top})}))),modes:[t.header.getDockingMode()],onDocked:i,onUndocked:i}),...s]};var xI=Object.freeze({__proto__:null,setup:(e,t,o)=>{e.inline||(t.header.isPositionedAtTop()||e.on("ResizeEditor",(()=>{o().each(cg.reset)})),e.on("ResizeWindow ResizeEditor",(()=>{o().each(fI)})),e.on("SkinLoaded",(()=>{o().each((e=>{cg.isDocked(e)?cg.reset(e):cg.refresh(e)}))})),e.on("FullscreenStateChanged",(()=>{o().each(cg.reset)}))),e.on("AfterScrollIntoView",(e=>{o().each((t=>{cg.refresh(t);const o=t.element;kn(o)&&((e,t)=>{const o=so(t),n=co(t).dom.innerHeight,r=In(o),i=at.fromDom(e.elm),s=Hr(i),a=Sn(i),l=s.y,c=l+a,d=Rn(t),u=Sn(t),h=d.top,m=h+u,p=Math.abs(h-r.top)<2,g=Math.abs(m-(r.top+n))<2;if(p&&l<m)Bn(r.left,l-u,o);else if(g&&c>h){const e=l-n+a+u;Bn(r.left,e,o)}})(e,o)}))})),e.on("PostRender",(()=>{vI(e,!1)}))},isDocked:e=>e().map(cg.isDocked).getOr(!1),getBehaviours:yI});var wI=Hg({factory:(e,t)=>{const o={focus:$h.focusIn,setMenus:(e,o)=>{const n=z(o,(e=>{const o={type:"menubutton",text:e.text,fetch:t=>{t(e.getItems())},context:"any"},n=WO(o).mapError((e=>Ui(e))).getOrDie();return AR(n,"tox-mbtn",t.backstage,A.some("menuitem"))}));Cm.set(e,n)}};return{uid:e.uid,dom:e.dom,components:[],behaviours:Od([Cm.config({}),Rd("menubar-events",[yd((t=>{e.onSetup(t)})),ud(Rs(),((e,t)=>{Yn(e.element,".tox-mbtn--active").each((o=>{Kn(t.event.target,".tox-mbtn").each((t=>{vt(o,t)||e.getSystem().getByDom(o).each((o=>{e.getSystem().getByDom(t).each((e=>{wx.expand(e),wx.close(o),Fd.focus(e)}))}))}))}))})),ud(ma(),((e,t)=>{t.event.prevFocus.bind((t=>e.getSystem().getByDom(t).toOptional())).each((o=>{t.event.newFocus.bind((t=>e.getSystem().getByDom(t).toOptional())).each((e=>{wx.isOpen(o)&&(wx.expand(e),wx.close(o))}))}))}))]),$h.config({mode:"flow",selector:".tox-mbtn",onEscape:t=>(e.onEscape(t),A.some(!0))}),Lv.config({})]),apis:o,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[Yi("dom"),Yi("uid"),Yi("onEscape"),Yi("backstage"),hs("onSetup",b)],apis:{focus:(e,t)=>{e.focus(t)},setMenus:(e,t,o)=>{e.setMenus(t,o)}}});const _I=e=>({element:()=>e.element.dom}),SI=(e,t)=>{const o=z(ie(t),(e=>{const o=t[e],n=ji((e=>Hi("sidebar",sM,e))(o));return{name:e,getApi:_I,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}));return z(o,(t=>{const n=xe(b);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:fM([_M(t,n),SM(t,n),ud(pa(),((e,t)=>{const n=t.event,r=Z(o,(e=>e.name===n.name));r.each((t=>{(n.visible?t.onShow:t.onHide)(t.getApi(e))}))}))])})}))},CI=e=>Z_.sketch((t=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:SI(t,e),slotBehaviours:fM([yd((e=>Z_.hideAllSlots(e)))])}))),kI=(e,t)=>{$o(e,"role",t)},EI=e=>mp.getCurrent(e).bind((e=>{if(kv.isGrowing(e)||kv.hasGrown(e)){return mp.getCurrent(e).bind((e=>Z(Z_.getSlotNames(e),(t=>Z_.isShowing(e,t)))))}return A.none()})),TI=Be("FixSizeEvent"),OI=Be("AutoSizeEvent"),AI=e=>mp.getCurrent(e).each((e=>Ro(e.element,!0))),MI=(e,t,o,n)=>{const r=t.element;if(((e,t)=>{const o="tabindex",n=`data-mce-${o}`;A.from(e.iframeElement).map(at.fromDom).each((e=>{t?(Go(e,o).each((t=>$o(e,n,t))),$o(e,o,-1)):(Ko(e,o),Go(e,n).each((t=>{$o(e,o,t),Ko(e,n)})))}))})(e,o),o)dp.block(t,(e=>(t,o)=>({dom:{tag:"div",attributes:{"aria-label":e.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:ty('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}))(n)),yn(r,"display"),Ko(r,"aria-hidden"),e.hasFocus()&&AI(t);else{const o=mp.getCurrent(t).exists((e=>Io(e.element)));dp.unblock(t),un(r,"display","none"),$o(r,"aria-hidden","true"),o&&e.focus()}},PI=(e,t,o)=>{const n=xe(!1),r=Ye(),i=o=>{n.get()&&!(e=>{if((e=>"focusin"===e.type)(e))return(e.composed?te(e.composedPath()):A.from(e.target)).map(at.fromDom).filter(to).exists((e=>ar(e,"mce-pastebin")));return!1})(o)&&(o.preventDefault(),AI(t()),e.editorManager.setActive(e))};e.inline||e.on("PreInit",(()=>{e.dom.bind(e.getWin(),"focusin",i),e.on("BeforeExecCommand",(e=>{"mcefocus"===e.command.toLowerCase()&&!0!==e.value&&i(e)}))}));const s=r=>{r!==n.get()&&(n.set(r),MI(e,t(),r,o.providers),((e,t)=>{e.dispatch("AfterProgressState",{state:t})})(e,r))};e.on("ProgressState",(t=>{if(r.on(clearTimeout),g(t.time)){const o=zS.setEditorTimeout(e,(()=>s(t.state)),t.time);r.set(o)}else s(t.state),r.clear()}))},DI=e=>{const t=e.label.isNone()?e.title.fold((()=>({})),(e=>({attributes:{"aria-label":e}}))):e.label.fold((()=>({})),(e=>({attributes:{"aria-label":e}})));return{dom:{tag:"div",classes:["tox-toolbar__group"].concat(e.label.isSome()?["tox-toolbar__group_with_label"]:[]),...t},components:[...e.label.map((e=>({dom:{tag:"span",classes:["tox-label","tox-label--context-toolbar"]},components:[op(e)]}))).toArray(),aS.parts.items({})],items:e.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-item:not([disabled]), .tox-number-input:not([disabled])"},tgroupBehaviours:Od([Lv.config({}),Fd.config({ignore:!0})])}},LI=e=>aS.sketch(DI(e)),RI=(e,t)=>{const o=yd((t=>{const o=z(e.initGroups,LI);Ax.setGroups(t,o)}));return Od([xM((()=>e.providers.checkUiComponentContext("any").shouldDisable)),PM((()=>e.providers.checkUiComponentContext("any"))),$h.config({mode:t,onEscape:e.onEscape,visibilitySelector:".tox-toolbar__overflow",selector:".tox-toolbar__group"}),Rd("toolbar-events",[o])])},NI=e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return{uid:e.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":DI({title:A.none(),label:A.none(),items:[]}),"overflow-button":UR({context:"any",name:"more",icon:A.some("more-drawer"),enabled:!0,tooltip:A.some("Reveal or hide additional toolbar items"),primary:!1,buttonType:A.none(),borderless:!1},A.none(),e.providers,[],"overflow-button")},splitToolbarBehaviours:RI(e,t)}},II=e=>{const t=NI(e),o=dS.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return dS.sketch({...t,lazySink:e.getSink,getOverflowBounds:()=>{const t=e.moreDrawerData.lazyHeader().element,o=Hr(t),n=lo(t),r=Hr(n),i=Math.max(n.dom.scrollHeight,r.height);return zr(o.x+4,r.y,o.width-8,i)},parts:{...t.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:e.attributes}}},components:[o],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened:t=>e.onToggled(t,!0),onClosed:t=>e.onToggled(t,!1)})},BI=e=>{const t=gS.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),o=gS.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),n=NI(e);return gS.sketch({...n,components:[t,o],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:t=>{t.getSystem().broadcastOn([uI()],{type:"opened"}),e.onToggled(t,!0)},onClosed:t=>{t.getSystem().broadcastOn([uI()],{type:"closed"}),e.onToggled(t,!1)}})},zI=e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return Ax.sketch({uid:e.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(e.type===NS.scrolling?["tox-toolbar--scrolling"]:[])},components:[Ax.parts.groups({})],toolbarBehaviours:RI(e,t)})},FI=(e,t)=>((e,t)=>{var o,n;const r="togglebutton"===e.type,i=e.icon.map((e=>aR(e,t.icons))).map(oy),s=o=>{const n=e=>{i.map((n=>n.getOpt(o).each((o=>{Cm.set(o,[aR(e,t.icons)])}))))},s=e=>{const t=o.element;e?(nr(t,"tox-button--enabled"),$o(t,"aria-pressed",!0)):(ir(t,"tox-button--enabled"),Ko(t,"aria-pressed"))},a=()=>ar(o.element,"tox-button--enabled"),l=()=>Ro(o.element);return r?e.onAction({setIcon:n,setActive:s,isActive:a,focus:l}):"button"===e.type?e.onAction({setIcon:n}):void 0},a={...e,name:r?e.text.getOr(e.icon.getOr("")):null!==(o=e.text)&&void 0!==o?o:e.icon.getOr(""),primary:"primary"===e.buttonType,buttonType:A.from(e.buttonType),tooltip:e.tooltip,icon:e.icon,enabled:!0,borderless:e.borderless},l=ZR(null!==(n=e.buttonType)&&void 0!==n?n:"secondary"),c=r?e.text.map(t.translate):A.some(t.translate(e.text)),d=c.map(op),u=a.tooltip.or(c).map((e=>({"aria-label":t.translate(e)}))).getOr({}),h=i.map((e=>e.asSpec())),m=RM([h,d]),p=e.icon.isSome()&&d.isSome(),g={tag:"button",classes:l.concat(...e.icon.isSome()&&!p?["tox-button--icon"]:[]).concat(...p?["tox-button--icon-and-text"]:[]).concat(...e.borderless?["tox-button--naked"]:[]).concat(..."togglebutton"===e.type&&e.active?["tox-button--enabled"]:[]),attributes:u},f=VR(a,A.some(s),[],g,m,e.tooltip,t);return xy.sketch(f)})(e,t),HI=Gt().deviceType,jI=HI.isPhone(),VI=HI.isTablet();var UI=jg({name:"silver.View",configFields:[Yi("viewConfig")],partFields:[xl({factory:{sketch:e=>{let t=!1;const o=z(e.buttons,(o=>"group"===o.type?(t=!0,((e,t)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:z(e.buttons,(e=>FI(e,t)))}))(o,e.providers)):FI(o,e.providers)));return{uid:e.uid,dom:{tag:"div",classes:[t?"tox-view__toolbar":"tox-view__header",...jI||VI?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:Od([Fd.config({}),$h.config({mode:"flow",selector:"button, .tox-button",focusInside:qa.OnEnterOrSpaceMode})]),components:t?o:[Vg.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),Vg.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:o})]}}},schema:[Yi("buttons"),Yi("providers")],name:"header"}),xl({factory:{sketch:e=>({uid:e.uid,behaviours:Od([Fd.config({}),Lv.config({})]),dom:{tag:"div",classes:["tox-view__pane"]}})},schema:[],name:"pane"})],factory:(e,t,o,n)=>{const r={getPane:t=>ny.getPart(t,e,"pane"),getOnShow:t=>e.viewConfig.onShow,getOnHide:t=>e.viewConfig.onHide};return{uid:e.uid,dom:e.dom,components:t,behaviours:Od([Fd.config({}),$h.config({mode:"cyclic",focusInside:qa.OnEnterOrSpaceMode})]),apis:r}},apis:{getPane:(e,t)=>e.getPane(t),getOnShow:(e,t)=>e.getOnShow(t),getOnHide:(e,t)=>e.getOnHide(t)}});const ZI=(e,t,o)=>me(t,((t,n)=>{const r=ji(Hi("view",mM,t));return e.slot(n,UI.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:r,components:[...r.buttons.length>0?[UI.parts.header({buttons:r.buttons,providers:o})]:[],UI.parts.pane({})]}))})),$I=(e,t)=>Z_.sketch((o=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:ZI(o,e,t),slotBehaviours:fM([yd((e=>Z_.hideAllSlots(e)))])}))),WI=e=>Z(Z_.getSlotNames(e),(t=>Z_.isShowing(e,t))),qI=(e,t,o)=>{Z_.getSlot(e,t).each((e=>{UI.getPane(e).each((t=>{var n;o(e)((n=t.element.dom,{getContainer:x(n)}))}))}))};var GI=Hg({factory:(e,t)=>{const o={setViews:(e,o)=>{Cm.set(e,[$I(o,t.backstage.shared.providers)])},whichView:e=>mp.getCurrent(e).bind(WI),toggleView:(e,t,o,n)=>mp.getCurrent(e).exists((r=>{const i=WI(r),s=i.exists((e=>n===e)),a=Z_.getSlot(r,n).isSome();return a&&(Z_.hideAllSlots(r),s?((e=>{const t=e.element;un(t,"display","none"),$o(t,"aria-hidden","true")})(e),t()):(o(),(e=>{const t=e.element;yn(t,"display"),Ko(t,"aria-hidden")})(e),Z_.showSlot(r,n),((e,t)=>{qI(e,t,UI.getOnShow)})(r,n)),i.each((e=>((e,t)=>qI(e,t,UI.getOnHide))(r,e)))),a}))};return{uid:e.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:Od([Cm.config({}),mp.config({find:e=>{const t=Cm.contents(e);return te(t)}})]),apis:o}},name:"silver.ViewWrapper",configFields:[Yi("backstage")],apis:{setViews:(e,t,o)=>e.setViews(t,o),toggleView:(e,t,o,n,r)=>e.toggleView(t,o,n,r),whichView:(e,t)=>e.whichView(t)}});const YI=ry.optional({factory:wI,name:"menubar",schema:[Yi("backstage")]}),KI=ry.optional({factory:{sketch:e=>Cy.sketch({uid:e.uid,dom:e.dom,listBehaviours:Od([$h.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>zI({type:e.type,uid:Be("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:e.providers,onEscape:()=>(e.onEscape(),A.some(!0))}),setupItem:(e,t,o,n)=>{Ax.setGroups(t,o)},shell:!0})},name:"multiple-toolbar",schema:[Yi("dom"),Yi("onEscape")]}),XI=ry.optional({factory:{sketch:e=>{const t=(e=>e.type===NS.sliding?BI:e.type===NS.floating?II:zI)(e);return t({type:e.type,uid:e.uid,onEscape:()=>(e.onEscape(),A.some(!0)),onToggled:(t,o)=>e.onToolbarToggled(o),cyclicKeying:!1,initGroups:[],getSink:e.getSink,providers:e.providers,moreDrawerData:{lazyToolbar:e.lazyToolbar,lazyMoreButton:e.lazyMoreButton,lazyHeader:e.lazyHeader},attributes:e.attributes})}},name:"toolbar",schema:[Yi("dom"),Yi("onEscape"),Yi("getSink")]}),JI=ry.optional({factory:{sketch:e=>{const t=e.editor,o=e.sticky?yI:cI;return{uid:e.uid,dom:e.dom,components:e.components,behaviours:Od(o(t,e.sharedBackstage))}}},name:"header",schema:[Yi("dom")]}),QI=ry.optional({factory:{sketch:e=>{const t=e.promotionLink?[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/tinymce-upgrade-to-cloud/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral",rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:"💝Get all features"}}]:[];return{uid:e.uid,dom:e.dom,components:t}}},name:"promotion",schema:[Yi("dom"),Yi("promotionLink")]}),eB=ry.optional({name:"socket",schema:[Yi("dom")]}),tB=ry.optional({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:Od([Lv.config({}),Fd.config({}),kv.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:e=>{mp.getCurrent(e).each(Z_.hideAllSlots),od(e,OI)},onGrown:e=>{od(e,OI)},onStartGrow:e=>{nd(e,TI,{width:fn(e.element,"width").getOr("")})},onStartShrink:e=>{nd(e,TI,{width:On(e.element)+"px"})}}),Cm.config({}),mp.config({find:e=>{const t=Cm.contents(e);return te(t)}})])}],behaviours:Od([aL(0),Rd("sidebar-sliding-events",[ud(TI,((e,t)=>{un(e.element,"width",t.event.width)})),ud(OI,((e,t)=>{yn(e.element,"width")}))])])})},name:"sidebar",schema:[Yi("dom")]}),oB=ry.optional({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:Od([Cm.config({}),dp.config({focus:!1}),mp.config({find:e=>te(e.components())})]),components:[]})},name:"throbber",schema:[Yi("dom")]}),nB=ry.optional({factory:GI,name:"viewWrapper",schema:[Yi("backstage")]}),rB=ry.optional({factory:{sketch:e=>({uid:e.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:e.components})},name:"editorContainer",schema:[]});var iB=jg({name:"OuterContainer",factory:(e,t,o)=>{let n=!1;const r=e=>{qn(e,".tox-statusbar").each((e=>{"none"===pn(e,"display")&&"true"===qo(e,"aria-hidden")?(yn(e,"display"),Ko(e,"aria-hidden")):(un(e,"display","none"),$o(e,"aria-hidden","true"))}))},s={getSocket:t=>ny.getPart(t,e,"socket"),setSidebar:(t,o,n)=>{ny.getPart(t,e,"sidebar").each((e=>((e,t,o)=>{mp.getCurrent(e).each((n=>{Cm.set(n,[CI(t)]);const r=null==o?void 0:o.toLowerCase();i(r)&&be(t,r)&&mp.getCurrent(n).each((t=>{Z_.showSlot(t,r),kv.immediateGrow(n),yn(n.element,"width"),kI(e.element,"region")}))}))})(e,o,n)))},toggleSidebar:(t,o)=>{ny.getPart(t,e,"sidebar").each((e=>((e,t)=>{mp.getCurrent(e).each((o=>{mp.getCurrent(o).each((n=>{kv.hasGrown(o)?Z_.isShowing(n,t)?(kv.shrink(o),kI(e.element,"presentation")):(Z_.hideAllSlots(n),Z_.showSlot(n,t),kI(e.element,"region")):(Z_.hideAllSlots(n),Z_.showSlot(n,t),kv.grow(o),kI(e.element,"region"))}))}))})(e,o)))},whichSidebar:t=>ny.getPart(t,e,"sidebar").bind(EI).getOrNull(),getHeader:t=>ny.getPart(t,e,"header"),getToolbar:t=>ny.getPart(t,e,"toolbar"),setToolbar:(t,o)=>{ny.getPart(t,e,"toolbar").each((e=>{const t=z(o,LI);e.getApis().setGroups(e,t)}))},setToolbars:(t,o)=>{ny.getPart(t,e,"multiple-toolbar").each((e=>{const t=z(o,(e=>z(e,LI)));Cy.setItems(e,t)}))},refreshToolbar:t=>{ny.getPart(t,e,"toolbar").each((e=>e.getApis().refresh(e)))},toggleToolbarDrawer:t=>{ny.getPart(t,e,"toolbar").each((e=>{Ze(e.getApis().toggle,(t=>t(e)))}))},toggleToolbarDrawerWithoutFocusing:t=>{ny.getPart(t,e,"toolbar").each((e=>{Ze(e.getApis().toggleWithoutFocusing,(t=>t(e)))}))},isToolbarDrawerToggled:t=>ny.getPart(t,e,"toolbar").bind((e=>A.from(e.getApis().isOpen).map((t=>t(e))))).getOr(!1),getThrobber:t=>ny.getPart(t,e,"throbber"),focusToolbar:t=>{ny.getPart(t,e,"toolbar").orThunk((()=>ny.getPart(t,e,"multiple-toolbar"))).each((e=>{$h.focusIn(e)}))},setMenubar:(t,o)=>{ny.getPart(t,e,"menubar").each((e=>{wI.setMenus(e,o)}))},focusMenubar:t=>{ny.getPart(t,e,"menubar").each((e=>{wI.focus(e)}))},setViews:(t,o)=>{ny.getPart(t,e,"viewWrapper").each((e=>{GI.setViews(e,o)}))},toggleView:(t,o)=>ny.getPart(t,e,"viewWrapper").exists((e=>GI.toggleView(e,(()=>s.showMainView(t)),(()=>s.hideMainView(t)),o))),whichView:t=>ny.getPart(t,e,"viewWrapper").bind(GI.whichView).getOrNull(),hideMainView:t=>{n=s.isToolbarDrawerToggled(t),n&&s.toggleToolbarDrawer(t),ny.getPart(t,e,"editorContainer").each((e=>{const t=e.element;r(t),un(t,"display","none"),$o(t,"aria-hidden","true")}))},showMainView:t=>{n&&s.toggleToolbarDrawer(t),ny.getPart(t,e,"editorContainer").each((e=>{const t=e.element;r(t),yn(t,"display"),Ko(t,"aria-hidden")}))}};return{uid:e.uid,dom:e.dom,components:t,apis:s,behaviours:e.behaviours}},configFields:[Yi("dom"),Yi("behaviours")],partFields:[JI,YI,XI,KI,eB,tB,QI,oB,nB,rB],apis:{getSocket:(e,t)=>e.getSocket(t),setSidebar:(e,t,o,n)=>{e.setSidebar(t,o,n)},toggleSidebar:(e,t,o)=>{e.toggleSidebar(t,o)},whichSidebar:(e,t)=>e.whichSidebar(t),getHeader:(e,t)=>e.getHeader(t),getToolbar:(e,t)=>e.getToolbar(t),setToolbar:(e,t,o)=>{e.setToolbar(t,o)},setToolbars:(e,t,o)=>{e.setToolbars(t,o)},refreshToolbar:(e,t)=>e.refreshToolbar(t),toggleToolbarDrawer:(e,t)=>{e.toggleToolbarDrawer(t)},toggleToolbarDrawerWithoutFocusing:(e,t)=>{e.toggleToolbarDrawerWithoutFocusing(t)},isToolbarDrawerToggled:(e,t)=>e.isToolbarDrawerToggled(t),getThrobber:(e,t)=>e.getThrobber(t),setMenubar:(e,t,o)=>{e.setMenubar(t,o)},focusMenubar:(e,t)=>{e.focusMenubar(t)},focusToolbar:(e,t)=>{e.focusToolbar(t)},setViews:(e,t,o)=>{e.setViews(t,o)},toggleView:(e,t,o)=>e.toggleView(t,o),whichView:(e,t)=>e.whichView(t)}});const sB={file:{title:"File",items:"newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},aB=e=>e.split(" "),lB=(e,t)=>{const o={...sB,...t.menus},n=ie(t.menus).length>0,r=void 0===t.menubar||!0===t.menubar?aB("file edit view insert format tools table help"):aB(!1===t.menubar?"":t.menubar),s=j(r,(e=>{const o=be(sB,e);return n?o||fe(t.menus,e).exists((e=>be(e,"items"))):o})),a=z(s,(n=>{const r=o[n];return((e,t,o)=>{const n=nC(o).split(/[ ,]/);return{text:e.title,getItems:()=>q(e.items,(e=>{const o=e.toLowerCase();return 0===o.trim().length||N(n,(e=>e===o))?[]:"separator"===o||"|"===o?[{type:"separator"}]:t.menuItems[o]?[t.menuItems[o]]:[]}))}})({title:r.title,items:aB(r.items)},t,e)}));return j(a,(e=>e.getItems().length>0&&N(e.getItems(),(e=>i(e)||"separator"!==e.type))))},cB=(e,t,o)=>(e.on("remove",(()=>o.unload(t))),o.load(t)),dB=(e,t,o,n)=>(e.on("remove",(()=>n.unloadRawCss(t))),n.loadRawCss(t,o)),uB=e=>A.from(tinymce.Resource.get(e)).filter(i),hB=(e,t,o="")=>{const n=(e=>{const t=MC(e);return t?A.from(t):A.none()})(e).map((e=>((e,t)=>"ui/"+e+"/"+t)(e,`${t}.css`))),r=n.bind(uB);return Ue(n,r,((e,t)=>({_kind:"load-raw",key:e,css:t}))).getOrThunk((()=>{const n=e.editorManager.suffix;return{_kind:"load-stylesheet",url:o+`/${t}${n}.css`}}))},mB=(e,t)=>{const o=e.ui.styleSheetLoader,n=hB(e,"skin",t);switch(n._kind){case"load-raw":const{key:t,css:r}=n;return dB(e,t,r,o),Promise.resolve();case"load-stylesheet":const{url:i}=n;return cB(e,i,o);default:return Promise.resolve()}},pB=(e,t)=>{if(!(e=>So(e).isSome())(at.fromDom(e.getElement())))return Promise.resolve();{const o=FS.DOM.styleSheetLoader,n=hB(e,"skin.shadowdom",t);switch(n._kind){case"load-raw":const{key:t,css:r}=n;return dB(e,t,r,o),Promise.resolve();case"load-stylesheet":const{url:i}=n;return cB(e,i,o);default:return Promise.resolve()}}},gB=async(e,t)=>{const o=LC(t);if(await((e,t,o)=>{const n=hB(e,t?"content.inline":"content",o);switch(n._kind){case"load-raw":const{key:r,css:i}=n;return t?dB(e,r,i,e.ui.styleSheetLoader):e.on("PostRender",(()=>{dB(e,r,i,e.dom.styleSheetLoader)})),Promise.resolve();case"load-stylesheet":const{url:s}=n;return o&&e.contentCSS.push(s),Promise.resolve();default:return Promise.resolve()}})(t,e,o),!PC(t)&&i(o))return Promise.all([mB(t,o),pB(t,o)]).then()},fB=(e,t)=>gB(e,t).then((e=>{const t=()=>{e._skinLoaded=!0,(e=>{e.dispatch("SkinLoaded")})(e)};return()=>{e.initialized?t():e.on("init",t)}})(t),((e,t)=>()=>((e,t)=>{e.dispatch("SkinLoadError",t)})(e,{message:t}))(t,"Skin could not be loaded")),bB=S(fB,!1),vB=S(fB,!0),yB=e=>({isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t),setText:t=>nd(e,cR,{text:t}),setIcon:t=>nd(e,dR,{icon:t})}),xB=e=>({setActive:t=>{jv.set(e,t)},isActive:()=>jv.isOn(e),isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t),setText:t=>nd(e,cR,{text:t}),setIcon:t=>nd(e,dR,{icon:t})}),wB=(e,t)=>e.map((e=>({"aria-label":t.translate(e)}))).getOr({}),_B=Be("focus-button"),SB=(e,t,o,n,r,i,s)=>{const a=t.map((e=>oy(lR(e,"tox-tbtn",r)))),l=e.map((e=>oy(aR(e,r.icons))));return{dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]),attributes:{...wB(o,r),...m(s)?{"data-mce-name":s}:{}}},components:RM([l.map((e=>e.asSpec())),a.map((e=>e.asSpec()))]),eventOrder:{[Ms()]:["focusing","alloy.base.behaviour",oR],[ca()]:[oR,"toolbar-group-button-events"],[da()]:[oR,"toolbar-group-button-events","tooltipping"]},buttonBehaviours:Od([xM((()=>r.checkUiComponentContext(i).shouldDisable)),PM((()=>r.checkUiComponentContext(i))),Rd(oR,[yd(((e,t)=>rR(e))),ud(cR,((e,t)=>{a.bind((t=>t.getOpt(e))).each((e=>{Cm.set(e,[op(r.translate(t.event.text))])}))})),ud(dR,((e,t)=>{l.bind((t=>t.getOpt(e))).each((e=>{Cm.set(e,[aR(t.event.icon,r.icons)])}))})),ud(Ms(),((e,t)=>{t.event.prevent(),od(e,_B)}))])].concat(n.getOr([])))}},CB=(e,t,o,n)=>{var r;const i=xe(b),s=SB(e.icon,e.text,e.tooltip,A.none(),o,e.context,n);return xy.sketch({dom:s.dom,components:s.components,eventOrder:nR,buttonBehaviours:{...Od([Rd("toolbar-button-events",[(a={onAction:e.onAction,getApi:t.getApi},_d(((e,t)=>{wM(a,e)((t=>{nd(e,tR,{buttonApi:t}),a.onAction(t)}))}))),_M(t,i),SM(t,i)]),...e.tooltip.map((t=>Qv.config(o.tooltips.getConfig({tooltipText:o.translate(t)+e.shortcut.map((e=>` (${zM(e)})`)).getOr("")})))).toArray(),xM((()=>!e.enabled||o.checkUiComponentContext(e.context).shouldDisable)),PM((()=>o.checkUiComponentContext(e.context)))].concat(t.toolbarButtonBehaviours)),[oR]:null===(r=s.buttonBehaviours)||void 0===r?void 0:r[oR]}});var a},kB=(e,t,o,n)=>CB(e,{toolbarButtonBehaviours:o.length>0?[Rd("toolbarButtonWith",o)]:[],getApi:yB,onSetup:e.onSetup},t,n),EB=(e,t,o,n)=>CB(e,{toolbarButtonBehaviours:[Cm.config({}),jv.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(o.length>0?[Rd("toolbarToggleButtonWith",o)]:[]),getApi:xB,onSetup:e.onSetup},t,n),TB=(e,t,o)=>n=>ke((e=>t.fetch(e))).map((r=>A.from(ID(Fe(dD(Be("menu-value"),r,(o=>{t.onItemAction(e(n),o)}),t.columns,t.presets,xE.CLOSE_ON_EXECUTE,t.select.getOr(T),o),{movement:hD(t.columns,t.presets),menuBehaviours:fM("auto"!==t.columns?[]:[yd(((e,o)=>{pM(e,4,DE(t.presets)).each((({numRows:t,numColumns:o})=>{$h.setGridSize(e,t,o)}))}))])}))))),OB=e=>{$x.getContent(e).each((e=>{Yn(e.element,".tox-toolbar-slider__input,.tox-toolbar-textfield").fold((()=>$h.focusIn(e)),Ro)}))},AB=Be("forward-slide"),MB=Be("backward-slide"),PB=Be("change-slide-event"),DB="tox-pop--resizing",LB=(e,t,o)=>nt(o)?e.translate(t):e.translate([t,e.translate(o)]),RB=(e,t)=>{const o=(o,r,i,s)=>{const a=e.shared.providers.translate(o.title);if("separator"===o.type)return A.some({type:"separator",text:a});if("submenu"===o.type){const e=q(o.getStyleItems(),(e=>n(e,r,s)));return 0===r&&e.length<=0?A.none():A.some({type:"nestedmenuitem",text:a,enabled:e.length>0,getSubmenuItems:()=>q(o.getStyleItems(),(e=>n(e,r,s)))})}return A.some({type:"togglemenuitem",text:a,icon:o.icon,active:o.isSelected(s),enabled:!i,onAction:t.onAction(o),...o.getStylePreview().fold((()=>({})),(e=>({meta:{style:e}})))})},n=(e,n,r)=>{const i="formatter"===e.type&&t.isInvalid(e);return 0===n?i?[]:o(e,n,!1,r).toArray():o(e,n,i,r).toArray()},r=e=>{const o=t.getCurrentValue(),r=t.shouldHide?0:1;return q(e,(e=>n(e,r,o)))};return{validateItems:r,getFetch:(e,t)=>(o,n)=>{const i=t(),s=r(i);n(bR(s,xE.CLOSE_ON_EXECUTE,e,{isHorizontalMenu:!1,search:A.none()}))}}},NB=(e,t)=>{const o=t.dataset,n="basic"===o.type?()=>z(o.data,(e=>MN(e,t.isSelectedFor,t.getPreviewFor))):o.getData;return{items:RB(e,t),getStyleItems:n}},IB=(e,t,o,n,r,i)=>{const{items:s,getStyleItems:a}=NB(t,o),l=xe(o.tooltip);return hR({context:"mode:design",text:o.icon.isSome()?A.none():o.text,icon:o.icon,ariaLabel:A.some(o.tooltip),tooltip:A.none(),role:A.none(),fetch:s.getFetch(t,a),onSetup:t=>{const i=o=>t.setTooltip(LB(e,n(o.value),o.value));return e.on(r,i),OP(PP(e,"NodeChange",(t=>{const n=t.getComponent();o.updateText(n),Pp.set(t.getComponent(),!e.selection.isEditable()||0===a().length)}))(t),(()=>e.off(r,i)))},getApi:e=>({getComponent:x(e),setTooltip:o=>{const n=t.shared.providers.translate(o);$o(e.element,"aria-label",n),l.set(o)}}),columns:1,presets:"normal",classes:o.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[Qv.config({...t.shared.providers.tooltips.getConfig({tooltipText:t.shared.providers.translate(o.tooltip),onShow:e=>{if(o.tooltip!==l.get()){const o=t.shared.providers.translate(l.get());Qv.setComponents(e,t.shared.providers.tooltips.getComponents({tooltipText:o}))}}})})]},"tox-tbtn",t.shared,i)};var BB;!function(e){e[e.SemiColon=0]="SemiColon",e[e.Space=1]="Space"}(BB||(BB={}));const zB=(e,t,o)=>{const n=(e=>z(e,(e=>{let t=e,o=e;const n=e.split("=");return n.length>1&&(t=n[0],o=n[1]),{title:t,format:o}})))(((e,t)=>t===BB.SemiColon?e.replace(/;$/,"").split(";"):e.split(" "))(e.options.get(t),o));return{type:"basic",data:n}},FB=x("Alignment {0}"),HB="left",jB=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],VB=e=>{const t={type:"basic",data:jB};return{tooltip:LB(e,FB(),HB),text:A.none(),icon:A.some("align-left"),isSelectedFor:t=>()=>e.formatter.match(t),getCurrentValue:A.none,getPreviewFor:e=>A.none,onAction:t=>()=>Z(jB,(e=>e.format===t.format)).each((t=>e.execCommand(t.command))),updateText:t=>{const o=Z(jB,(t=>e.formatter.match(t.format))),n=o.fold(x(HB),(e=>e.title.toLowerCase()));nd(t,dR,{icon:`align-${n}`}),((e,t)=>{e.dispatch("AlignTextUpdate",t)})(e,{value:n})},dataset:t,shouldHide:!1,isInvalid:t=>!e.formatter.canApply(t.format)}},UB=(e,t)=>{const o=t(),n=z(o,(e=>e.format));return A.from(e.formatter.closest(n)).bind((e=>Z(o,(t=>t.format===e))))},ZB=x("Block {0}"),$B="Paragraph",WB=e=>{const t=zB(e,"block_formats",BB.SemiColon);return{tooltip:LB(e,ZB(),$B),text:A.some($B),icon:A.none(),isSelectedFor:t=>()=>e.formatter.match(t),getCurrentValue:A.none,getPreviewFor:t=>()=>{const o=e.formatter.get(t);return o?A.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):A.none()},onAction:DP(e),updateText:o=>{const n=UB(e,(()=>t.data)).fold(x($B),(e=>e.title));nd(o,cR,{text:n}),((e,t)=>{e.dispatch("BlocksTextUpdate",t)})(e,{value:n})},dataset:t,shouldHide:!1,isInvalid:t=>!e.formatter.canApply(t.format)}},qB=x("Font {0}"),GB="System Font",YB=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],KB=e=>{const t=e.split(/\s*,\s*/);return z(t,(e=>e.replace(/^['"]+|['"]+$/g,"")))},XB=(e,t)=>t.length>0&&G(t,(t=>e.indexOf(t.toLowerCase())>-1)),JB=e=>{const t=()=>{const t=e=>e?KB(e)[0]:"",n=e.queryCommandValue("FontName"),r=o.data,i=n?n.toLowerCase():"",s=AC(e),a=Z(r,(e=>{const o=e.format;return o.toLowerCase()===i||t(o).toLowerCase()===t(i).toLowerCase()})).orThunk((()=>$e(((e,t)=>{if(0===e.indexOf("-apple-system")||t.length>0){const o=KB(e.toLowerCase());return XB(o,YB)||XB(o,t)}return!1})(i,s),{title:GB,format:i})));return{matchOpt:a,font:n}},o=zB(e,"font_family_formats",BB.SemiColon);return{tooltip:LB(e,qB(),GB),text:A.some(GB),icon:A.none(),isSelectedFor:e=>t=>t.exists((t=>t.format===e)),getCurrentValue:()=>{const{matchOpt:e}=t();return e},getPreviewFor:e=>()=>A.some({tag:"div",styles:-1===e.indexOf("dings")?{"font-family":e}:{}}),onAction:t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("FontName",!1,t.format)}))},updateText:o=>{const{matchOpt:n,font:r}=t(),i=n.fold(x(r),(e=>e.title));nd(o,cR,{text:i}),((e,t)=>{e.dispatch("FontFamilyTextUpdate",t)})(e,{value:i})},dataset:o,shouldHide:!1,isInvalid:T}};var QB=tinymce.util.Tools.resolve("tinymce.util.VK");const ez=(e,t,o,n)=>{let r=A.none();const i=PP(e,"NodeChange SwitchMode DisabledStateChange",(t=>{const n=t.getComponent();r=A.some(n),o.updateInputValue(n),Pp.set(n,!e.selection.isEditable()||WS(e))})),s=e=>({getComponent:x(e)}),a=xe(b),l=Be("custom-number-input-events"),c=(e,t,n)=>{const i=r.map((e=>Rf.getValue(e))).getOr("");const s=o.getNewValue(i,e),a=i.length-`${s}`.length,l=r.map((e=>e.element.dom.selectionStart-a)),c=r.map((e=>e.element.dom.selectionEnd-a));o.onAction(s,n),r.each((e=>{Rf.setValue(e,s),t&&(l.each((t=>e.element.dom.selectionStart=t)),c.each((t=>e.element.dom.selectionEnd=t)))}))},d=(e,t)=>c(((e,t)=>e-t),e,t),u=(e,t)=>c(((e,t)=>e+t),e,t),h=e=>ho(e.element).fold(A.none,(e=>(Ro(e),A.some(!0)))),p=e=>Io(e.element)?(fo(e.element).each((e=>Ro(e))),A.some(!0)):A.none(),g=(o,n,r,i)=>{const a=xe(b),l=t.shared.providers.translate(r),c=Be("altExecuting"),d=PP(e,"NodeChange SwitchMode DisabledStateChange",(t=>{Pp.set(t.getComponent(),!e.selection.isEditable()||WS(e))})),u=e=>{Pp.isDisabled(e)||o(!0)};return xy.sketch({dom:{tag:"button",attributes:{"aria-label":l,"data-mce-name":n},classes:i.concat(n)},components:[sR(n,t.shared.providers.icons)],buttonBehaviours:Od([Pp.config({}),Qv.config(t.shared.providers.tooltips.getConfig({tooltipText:l})),Rd(c,[_M({onSetup:d,getApi:s},a),SM({getApi:s},a),ud(Bs(),((e,t)=>{t.event.raw.keyCode!==QB.SPACEBAR&&t.event.raw.keyCode!==QB.ENTER||Pp.isDisabled(e)||o(!1)})),ud(js(),u),ud(Os(),u)])]),eventOrder:{[Bs()]:[c,"keying"],[js()]:[c,"alloy.base.behaviour"],[Os()]:[c,"alloy.base.behaviour"],[ca()]:["alloy.base.behaviour",c,"tooltipping"],[da()]:[c,"tooltipping"]}})},f=oy(g((e=>d(!1,e)),"minus","Decrease font size",[])),v=oy(g((e=>u(!1,e)),"plus","Increase font size",[])),y=oy({dom:{tag:"div",classes:["tox-input-wrapper"]},components:[Kx.sketch({inputBehaviours:Od([Pp.config({}),Rd(l,[_M({onSetup:i,getApi:s},a),SM({getApi:s},a)]),Rd("input-update-display-text",[ud(cR,((e,t)=>{Rf.setValue(e,t.event.text)})),ud(Is(),(e=>{o.onAction(Rf.getValue(e))})),ud(Hs(),(e=>{o.onAction(Rf.getValue(e))}))]),$h.config({mode:"special",onEnter:e=>(c(w,!0,!0),A.some(!0)),onEscape:h,onUp:e=>(u(!0,!1),A.some(!0)),onDown:e=>(d(!0,!1),A.some(!0)),onLeft:(e,t)=>(t.cut(),A.none()),onRight:(e,t)=>(t.cut(),A.none())})])})],behaviours:Od([Fd.config({}),$h.config({mode:"special",onEnter:p,onSpace:p,onEscape:h}),Rd("input-wrapper-events",[ud(Rs(),(e=>{F([f,v],(t=>{const o=at.fromDom(t.get(e).element.dom);Io(o)&&No(o)}))}))])])});return{dom:{tag:"div",classes:["tox-number-input"],attributes:{...m(n)?{"data-mce-name":n}:{}}},components:[f.asSpec(),y.asSpec(),v.asSpec()],behaviours:Od([Fd.config({}),$h.config({mode:"flow",focusInside:qa.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:e=>Io(e.element)?A.none():(Ro(e.element),A.some(!0))})])}},tz=x("Font size {0}"),oz="12pt",nz={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},rz={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},iz=(e,t)=>/[0-9.]+px$/.test(e)?((e,t)=>{const o=Math.pow(10,t);return Math.round(e*o)/o})(72*parseInt(e,10)/96,t||0)+"pt":fe(rz,e).getOr(e),sz=e=>fe(nz,e).getOr(""),az=e=>{const t=()=>{let t=A.none();const o=n.data,r=e.queryCommandValue("FontSize");if(r)for(let e=3;t.isNone()&&e>=0;e--){const n=iz(r,e),i=sz(n);t=Z(o,(e=>e.format===r||e.format===n||e.format===i))}return{matchOpt:t,size:r}},o=x(A.none),n=zB(e,"font_size_formats",BB.Space);return{tooltip:LB(e,tz(),oz),text:A.some(oz),icon:A.none(),isSelectedFor:e=>t=>t.exists((t=>t.format===e)),getPreviewFor:o,getCurrentValue:()=>{const{matchOpt:e}=t();return e},onAction:t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("FontSize",!1,t.format)}))},updateText:o=>{const{matchOpt:n,size:r}=t(),i=n.fold(x(r),(e=>e.title));nd(o,cR,{text:i}),((e,t)=>{e.dispatch("FontSizeTextUpdate",t)})(e,{value:i})},dataset:n,shouldHide:!1,isInvalid:T}},lz=e=>nt(e)?"Formats":"Format {0}",cz=(e,t)=>{const o="Formats";return{tooltip:LB(e,lz(""),""),text:A.some(o),icon:A.none(),isSelectedFor:t=>()=>e.formatter.match(t),getCurrentValue:A.none,getPreviewFor:t=>()=>{const o=e.formatter.get(t);return void 0!==o?A.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):A.none()},onAction:DP(e),updateText:t=>{const n=e=>kN(e)?q(e.items,n):EN(e)?[{title:e.title,format:e.format}]:[],r=q(AN(e),n),i=UB(e,x(r)).fold(x({title:o,tooltipLabel:""}),(e=>({title:e.title,tooltipLabel:e.title})));nd(t,cR,{text:i.title}),((e,t)=>{e.dispatch("StylesTextUpdate",t)})(e,{value:i.tooltipLabel})},shouldHide:tC(e),isInvalid:t=>!e.formatter.canApply(t.format),dataset:t}},dz=[{name:"history",items:["undo","redo"]},{name:"ai",items:["aidialog","aishortcuts"]},{name:"styles",items:["styles"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],uz=(e,t)=>(o,n,r,i)=>{const s=e(o).mapError((e=>Ui(e))).getOrDie();return t(s,n,r,i)},hz={button:uz(kA,((e,t,o,n)=>((e,t,o)=>kB(e,t,[],o))(e,t.shared.providers,n))),togglebutton:uz(OA,((e,t,o,n)=>((e,t,o)=>EB(e,t,[],o))(e,t.shared.providers,n))),menubutton:uz(WO,((e,t,o,n)=>AR(e,"tox-tbtn",t,A.none(),!1,n))),splitbutton:uz((e=>Hi("SplitButton",lM,e)),((e,t,o,n)=>((e,t,o)=>{const n=xe(e.tooltip.getOr("")),r=e=>({isEnabled:()=>!Pp.isDisabled(e),setEnabled:t=>Pp.set(e,!t),setIconFill:(t,o)=>{Yn(e.element,`svg path[class="${t}"], rect[class="${t}"]`).each((e=>{$o(e,"fill",o)}))},setActive:t=>{$o(e.element,"aria-pressed",t),Yn(e.element,"span").each((o=>{e.getSystem().getByDom(o).each((e=>jv.set(e,t)))}))},isActive:()=>Yn(e.element,"span").exists((t=>e.getSystem().getByDom(t).exists(jv.isOn))),setText:t=>Yn(e.element,"span").each((o=>e.getSystem().getByDom(o).each((e=>nd(e,cR,{text:t}))))),setIcon:t=>Yn(e.element,"span").each((o=>e.getSystem().getByDom(o).each((e=>nd(e,dR,{icon:t}))))),setTooltip:o=>{const r=t.providers.translate(o);$o(e.element,"aria-label",r),n.set(o)}}),i=xe(b),s={getApi:r,onSetup:e.onSetup};return Y_.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":!1,...wB(e.tooltip,t.providers),...m(o)?{"data-mce-name":o}:{}}},onExecute:t=>{const o=r(t);o.isEnabled()&&e.onAction(o)},onItemExecute:(e,t,o)=>{},splitDropdownBehaviours:Od([Rd("split-dropdown-events",[yd(((e,t)=>rR(e))),ud(_B,Fd.focus),_M(s,i),SM(s,i)]),yM((()=>t.providers.isDisabled()||t.providers.checkUiComponentContext(e.context).shouldDisable)),PM((()=>t.providers.checkUiComponentContext(e.context))),ey.config({}),...e.tooltip.map((e=>Qv.config({...t.providers.tooltips.getConfig({tooltipText:t.providers.translate(e),onShow:o=>{if(n.get()!==e){const e=t.providers.translate(n.get());Qv.setComponents(o,t.providers.tooltips.getComponents({tooltipText:e}))}}})}))).toArray()]),eventOrder:{[ca()]:["alloy.base.behaviour","split-dropdown-events","tooltipping"],[da()]:["split-dropdown-events","tooltipping"]},toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:TB(r,e,t.providers),parts:{menu:zE(0,e.columns,e.presets)},components:[Y_.parts.button(SB(e.icon,e.text,A.none(),A.some([jv.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1}),xM(T),PM(x({contextType:"any",shouldDisable:!1}))]),t.providers,e.context)),Y_.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:uE("chevron-down",t.providers.icons)},buttonBehaviours:Od([yM(T),PM(x({contextType:"any",shouldDisable:!1}))])}),Y_.parts["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})})(e,t.shared,n))),grouptoolbarbutton:uz((e=>Hi("GroupToolbarButton",aM,e)),((e,t,o,n)=>{const r=o.ui.registry.getAll().buttons,i=e=>fz(o,{buttons:r,toolbar:e,allowToolbarGroups:!1},t,A.none()),s={[Gc]:t.shared.header.isPositionedAtTop()?qc.TopToBottom:qc.BottomToTop};if(rC(o)===NS.floating)return((e,t,o,n,r)=>{const i=t.shared,s=xe(b),a={toolbarButtonBehaviours:[],getApi:yB,onSetup:e.onSetup},l=[Rd("toolbar-group-button-events",[_M(a,s),SM(a,s)]),...e.tooltip.map((e=>Qv.config(t.shared.providers.tooltips.getConfig({tooltipText:t.shared.providers.translate(e)})))).toArray()];return Ix.sketch({lazySink:i.getSink,fetch:()=>ke((t=>{t(z(o(e.items),LI))})),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:SB(e.icon,e.text,e.tooltip,A.some(l),i.providers,e.context,r),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:n}}}})})(e,t,i,s,n);throw new Error("Toolbar groups are only supported when using floating toolbar mode")}))},mz={styles:(e,t)=>{const o={type:"advanced",...t.styles};return IB(e,t,cz(e,o),lz,"StylesTextUpdate","styles")},fontsize:(e,t)=>IB(e,t,az(e),tz,"FontSizeTextUpdate","fontsize"),fontsizeinput:(e,t)=>ez(e,t,(e=>{const t=()=>e.queryCommandValue("FontSize");return{updateInputValue:e=>nd(e,cR,{text:t()}),onAction:(t,o)=>e.execCommand("FontSize",!1,t,{skip_focus:!o}),getNewValue:(o,n)=>{Dr(o,["unsupportedLength","empty"]);const r=t(),i=Dr(o,["unsupportedLength","empty"]).or(Dr(r,["unsupportedLength","empty"])),s=i.map((e=>e.value)).getOr(16),a=gC(e),l=i.map((e=>e.unit)).filter((e=>""!==e)).getOr(a),c=n(s,(e=>{var t;return null!==(t={em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[e])&&void 0!==t?t:{step:1}})(l).step),d=`${(e=>e>=0)(c)?c:s}${l}`;return d!==r&&((e,t)=>{e.dispatch("FontSizeInputTextUpdate",t)})(e,{value:d}),d}}})(e),"fontsizeinput"),fontfamily:(e,t)=>IB(e,t,JB(e),qB,"FontFamilyTextUpdate","fontfamily"),blocks:(e,t)=>IB(e,t,WB(e),ZB,"BlocksTextUpdate","blocks"),align:(e,t)=>IB(e,t,VB(e),FB,"AlignTextUpdate","align"),navigateback:(e,t)=>{const o=ji(kA({type:"button",icon:"chevron-left",tooltip:"Back",onAction:b}));return kB(o,t.shared.providers,[ud(tR,(e=>{od(e,MB)}))])}},pz=e=>{const t=e.toolbar,o=e.buttons;return!1===t?[]:void 0===t||!0===t?(e=>{const t=z(dz,(t=>{const o=j(t.items,(t=>be(e,t)||be(mz,t)));return{name:t.name,items:o}}));return j(t,(e=>e.items.length>0))})(o):i(t)?(e=>{const t=e.split("|");return z(t,(e=>({items:e.trim().split(" ")})))})(t):(e=>f(e,(e=>(be(e,"name")||be(e,"label"))&&be(e,"items"))))(t)?t:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},gz=(e,t,o,n,r,i)=>fe(t,o.toLowerCase()).orThunk((()=>i.bind((e=>re(e,(e=>fe(t,e+o.toLowerCase()))))))).fold((()=>fe(mz,o.toLowerCase()).map((t=>t(e,r)))),(t=>"grouptoolbarbutton"!==t.type||n?((e,t,o,n)=>fe(hz,e.type).fold((()=>(console.error("skipping button defined by",e),A.none())),(r=>A.some(r(e,t,o,n)))))(t,r,e,o.toLowerCase()):(console.warn(`Ignoring the '${o}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`),A.none()))),fz=(e,t,o,n)=>{const r=pz(t),i=z(r,(r=>{const i=q(r.items,(r=>0===r.trim().length?[]:gz(e,t.buttons,r,t.allowToolbarGroups,o,n).toArray()));return{title:A.from(e.translate(r.name)),label:$e(void 0!==r.label,e.translate(r.label)),items:i}}));return j(i,(e=>e.items.length>0))},bz=(e,t,o,n)=>{const r=t.mainUi.outerContainer,s=o.toolbar,a=o.buttons;if(f(s,i)){const t=s.map((t=>{const r={toolbar:t,buttons:a,allowToolbarGroups:o.allowToolbarGroups};return fz(e,r,n,A.none())}));iB.setToolbars(r,t)}else iB.setToolbar(r,fz(e,o,n,A.none()))},vz=Gt(),yz=vz.os.isiOS()&&vz.os.version.major<=12;var xz=Object.freeze({__proto__:null,render:(e,t,o,n,r)=>{const{mainUi:i,uiMotherships:s}=t,a=xe(0),l=i.outerContainer;bB(e);const d=at.fromDom(r.targetNode),u=_o(wo(d));cm(d,i.mothership),((e,t,o)=>{ZC(e)&&cm(o.mainUi.mothership.element,o.popupUi.mothership),lm(t,o.dialogUi.mothership)})(e,u,t),e.on("PostRender",(()=>{iB.setSidebar(l,o.sidebar,EC(e))})),e.on("SkinLoaded",(()=>{bz(e,t,o,n),a.set(e.getWin().innerWidth),iB.setMenubar(l,lB(e,o)),iB.setViews(l,o.views),((e,t)=>{const{uiMotherships:o}=t,n=e.dom;let r=e.getWin();const i=e.getDoc().documentElement,s=xe(Dn(r.innerWidth,r.innerHeight)),a=xe(Dn(i.offsetWidth,i.offsetHeight)),l=()=>{const t=s.get();t.left===r.innerWidth&&t.top===r.innerHeight||(s.set(Dn(r.innerWidth,r.innerHeight)),CP(e))},c=()=>{const t=e.getDoc().documentElement,o=a.get();o.left===t.offsetWidth&&o.top===t.offsetHeight||(a.set(Dn(t.offsetWidth,t.offsetHeight)),CP(e))},d=t=>{((e,t)=>{e.dispatch("ScrollContent",t)})(e,t)};n.bind(r,"resize",l),n.bind(r,"scroll",d);const u=Po(at.fromDom(e.getBody()),"load",c);e.on("hide",(()=>{F(o,(e=>{un(e.element,"display","none")}))})),e.on("show",(()=>{F(o,(e=>{yn(e.element,"display")}))})),e.on("NodeChange",c),e.on("remove",(()=>{u.unbind(),n.unbind(r,"resize",l),n.unbind(r,"scroll",d),r=null}))})(e,t)}));const h=iB.getSocket(l).getOrDie("Could not find expected socket element");if(yz){hn(h.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const t=((e,t)=>{let o=null;return{cancel:()=>{c(o)||(clearTimeout(o),o=null)},throttle:(...n)=>{c(o)&&(o=setTimeout((()=>{o=null,e.apply(null,n)}),t))}}})((()=>{e.dispatch("ScrollContent")}),20),o=Mo(h.element,"scroll",t.throttle);e.on("remove",o.unbind)}MM(e,t),e.addCommand("ToggleSidebar",((t,o)=>{iB.toggleSidebar(l,o),(e=>{e.dispatch("ToggleSidebar")})(e)})),e.addQueryValueHandler("ToggleSidebar",(()=>{var e;return null!==(e=iB.whichSidebar(l))&&void 0!==e?e:""})),e.addCommand("ToggleView",((t,o)=>{if(iB.toggleView(l,o)){const t=l.element;i.mothership.broadcastOn([iy()],{target:t}),F(s,(e=>{e.broadcastOn([iy()],{target:t})})),c(iB.whichView(l))&&(e.focus(),e.nodeChanged(),iB.refreshToolbar(l)),(e=>{e.dispatch("ToggleView")})(e)}})),e.addQueryValueHandler("ToggleView",(()=>{var e;return null!==(e=iB.whichView(l))&&void 0!==e?e:""}));const m=rC(e);m!==NS.sliding&&m!==NS.floating||e.on("ResizeWindow ResizeEditor ResizeContent",(()=>{const o=e.getWin().innerWidth;o!==a.get()&&(iB.refreshToolbar(t.mainUi.outerContainer),a.set(o))}));const p={setEnabled:e=>{AM(t,e?"setEnabled":"setDisabled")},isEnabled:()=>!Pp.isDisabled(l)};return{iframeContainer:h.element.dom,editorContainer:l.element.dom,api:p}}});const wz=e=>g(e)?e+"px":e,_z=(e,t,o)=>{const n=t.filter((t=>e<t)),r=o.filter((t=>e>t));return n.or(r).getOr(e)},Sz=e=>{const t=((e,t)=>{if("number"==typeof t)return A.from(t);const o=/^([0-9.]+)(pt|em|px)$/.exec(t.trim());if(o){const t=o[2],n=Number.parseFloat(o[1]);if(Number.isNaN(n)||n<0)return A.none();if("em"===t)return A.from(n*Number.parseFloat(window.getComputedStyle(e.dom).fontSize));if("pt"===t)return A.from(.75*n);if("px"===t)return A.from(n)}return A.none()})(at.fromDom(e.targetElm),qS(e)),o=KS(e),n=JS(e);return t.map((e=>_z(e,o,n)))},Cz=e=>{const t=GS(e),o=YS(e),n=XS(e);return(r=t,/^[0-9\.]+(|px)$/i.test(""+r)?A.some(parseInt(""+r,10)):A.none()).map((e=>_z(e,o,n)));var r},{ToolbarLocation:kz,ToolbarMode:Ez}=WC,Tz=(e,t,o,n,r)=>{const{mainUi:i,uiMotherships:s}=o,a=FS.DOM,l=HC(e),c=UC(e),d=XS(e).or(Cz(e)),u=n.shared.header,h=u.isPositionedAtTop,m=rC(e),p=m===Ez.sliding||m===Ez.floating,g=xe(!1),f=()=>g.get()&&!e.removed,b=e=>p?e.fold(x(0),(e=>e.components().length>1?Sn(e.components()[1].element):0)):0,v=(e,t)=>ZC(e)?Zr(t):A.none(),y=()=>{F(s,(e=>{e.broadcastOn([sy()],{})}))},w=o=>{if(!f())return;l||r.on((e=>{const o=d.getOrThunk((()=>Rr().width-Nn(t).left-10));un(e.element,"max-width",o+"px")}));const n=In(),s=!l&&(()=>{if(!l&&(Rn(i.outerContainer.element).left+An(i.outerContainer.element)>=window.innerWidth-40||fn(i.outerContainer.element,"width").isSome()))return un(i.outerContainer.element,"position","absolute"),un(i.outerContainer.element,"left","0px"),yn(i.outerContainer.element,"width"),!0;return!1})();if(p&&iB.refreshToolbar(i.outerContainer),!l){const o=In(),a=$e(n.left!==o.left,n);((o,n)=>{r.on((r=>{const s=iB.getToolbar(i.outerContainer),a=b(s),l=Fr(t),c=v(e,i.outerContainer.element),d=c.fold((()=>l.x),(e=>{const t=Fr(e);return vt(e,an())?l.x:l.x-t.x})),u=$e(o,Math.ceil(i.outerContainer.element.dom.getBoundingClientRect().width)).filter((e=>e>150)).map((e=>{const t=n.getOr(In()),o=window.innerWidth-(d-t.left),r=Math.max(Math.min(e,o),150);return o<e&&un(i.outerContainer.element,"width",r+"px"),{width:r+"px"}})).getOr({width:"max-content"}),m={position:"absolute",left:Math.round(d)+"px",top:c.fold((()=>h()?Math.max(l.y-Sn(r.element)+a,0):l.bottom),(e=>{var t;const o=Fr(e),n=null!==(t=e.dom.scrollTop)&&void 0!==t?t:0,i=vt(e,an())?Math.max(l.y-Sn(r.element)+a,0):l.y-o.y+n-Sn(r.element)+a;return h()?i:l.bottom}))+"px"};hn(i.outerContainer.element,{...m,...u})}))})(s,a),a.each((e=>{Bn(e.left,o.top)}))}c&&r.on(o),y()},_=()=>!(l||!c||!f())&&r.get().exists((o=>{const n=u.getDockingMode(),s=(o=>{switch(sC(e)){case kz.auto:const e=iB.getToolbar(i.outerContainer),n=b(e),r=Sn(o.element)-n,s=Fr(t);if(s.y>r)return"top";{const e=lo(t),o=Math.max(e.dom.scrollHeight,Sn(e));return s.bottom<o-r||Vr().bottom<s.bottom-r?"bottom":"top"}case kz.bottom:return"bottom";case kz.top:default:return"top"}})(o);return s!==n&&(a=s,r.on((e=>{cg.setModes(e,[a]),u.setDockingMode(a);const t=h()?qc.TopToBottom:qc.BottomToTop;$o(e.element,Gc,t)})),!0);var a}));return{isVisible:f,isPositionedAtTop:h,show:()=>{g.set(!0),un(i.outerContainer.element,"display","flex"),a.addClass(e.getBody(),"mce-edit-focus"),F(s,(e=>{yn(e.element,"display")})),_(),ZC(e)?w((e=>cg.isDocked(e)?cg.reset(e):cg.refresh(e))):w(cg.refresh)},hide:()=>{g.set(!1),un(i.outerContainer.element,"display","none"),a.removeClass(e.getBody(),"mce-edit-focus"),F(s,(e=>{un(e.element,"display","none")}))},update:w,updateMode:()=>{_()&&w(cg.reset)},repositionPopups:y}},Oz=(e,t)=>{const o=Fr(e);return{pos:t?o.y:o.bottom,bounds:o}};var Az=Object.freeze({__proto__:null,render:(e,t,o,n,r)=>{const{mainUi:i}=t,s=Ye(),a=at.fromDom(r.targetNode),l=Tz(e,a,t,n,s),c=cC(e);vB(e);const d=()=>{if(s.isSet())return void l.show();s.set(iB.getHeader(i.outerContainer).getOrDie());const r=jC(e);ZC(e)?(cm(a,i.mothership),cm(a,t.popupUi.mothership)):lm(r,i.mothership),lm(r,t.dialogUi.mothership);const d=()=>{bz(e,t,o,n),iB.setMenubar(i.outerContainer,lB(e,o)),l.show(),((e,t,o,n)=>{const r=xe(Oz(t,o.isPositionedAtTop())),i=n=>{const{pos:i,bounds:s}=Oz(t,o.isPositionedAtTop()),{pos:a,bounds:l}=r.get(),c=s.height!==l.height||s.width!==l.width;r.set({pos:i,bounds:s}),c&&CP(e,n),o.isVisible()&&(a!==i?o.update(cg.reset):c&&(o.updateMode(),o.repositionPopups()))};n||(e.on("activate",o.show),e.on("deactivate",o.hide)),e.on("SkinLoaded ResizeWindow",(()=>o.update(cg.reset))),e.on("NodeChange keydown",(e=>{requestAnimationFrame((()=>i(e)))}));let s=0;const a=rt((()=>o.update(cg.refresh)),33);e.on("ScrollWindow",(()=>{const e=In().left;e!==s&&(s=e,a.throttle()),o.updateMode()})),ZC(e)&&e.on("ElementScroll",(e=>{o.update(cg.refresh)}));const l=Ge();l.set(Po(at.fromDom(e.getBody()),"load",(e=>i(e.raw)))),e.on("remove",(()=>{l.clear()}))})(e,a,l,c),e.nodeChanged()};c?e.once("SkinLoaded",d):d()};e.on("show",d),e.on("hide",l.hide),c||(e.on("focus",d),e.on("blur",l.hide)),e.on("init",(()=>{(e.hasFocus()||c)&&d()})),MM(e,t);const u={show:d,hide:l.hide,setEnabled:e=>{AM(t,e?"setEnabled":"setDisabled")},isEnabled:()=>!Pp.isDisabled(i.outerContainer)};return{editorContainer:i.outerContainer.element.dom,api:u}}});const Mz="contexttoolbar-hide",Pz=(e,t,o)=>({setInputEnabled:t=>{!t&&o&&Ro(o),Pp.set(e,!t)},isInputEnabled:()=>!Pp.isDisabled(e),hide:()=>{od(e,oa())},back:()=>{od(e,MB)},getValue:()=>t.get().getOrThunk((()=>Rf.getValue(e))),setValue:o=>{e.getSystem().isConnected()?Rf.setValue(e,o):t.set(o)}}),Dz=(e,t,o)=>ud(tR,((n,r)=>{const i=e.get(n),s=Pz(i,o,n.element);t.onAction(s,r.event.buttonApi)})),Lz=(e,t,o,n)=>(e=>"contextformtogglebutton"===e.type)(t)?((e,t,o,n)=>{const{primary:r,...i}=t.original,s=ji(OA({...i,type:"togglebutton",onAction:b}));return EB(s,o,[Dz(e,t,n)])})(e,t,o,n):((e,t,o,n)=>{const{primary:r,...i}=t.original,s=ji(kA({...i,type:"button",onAction:b}));return kB(s,o,[Dz(e,t,n)])})(e,t,o,n),Rz=(e,t,o,n)=>{const r=z(t,(t=>oy(Lz(e,t,o,n))));return{asSpecs:()=>z(r,(e=>e.asSpec())),findPrimary:e=>re(t,((t,o)=>t.primary?A.from(r[o]).bind((t=>t.getOpt(e))).filter(C(Pp.isDisabled)):A.none()))}},Nz=(e,t,o,n)=>{const{width:r,height:i}=e.initValue();let s=kR;const a=Be("ratio-event"),l=e=>Pz(e,n),c=e=>pE(e,{tag:"span",classes:["tox-icon","tox-lock-icon__"+e]},t.icons),d=()=>!1,u=e.label.getOr("Constrain proportions"),h=t.translate(u),m=Ux.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-lock-context-form-size-input","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":h,"data-mce-name":u}},components:[c("lock"),c("unlock")],buttonBehaviours:Od([Pp.config({disabled:d}),Lv.config({}),Qv.config(t.tooltips.getConfig({tooltipText:h}))])}),p=e=>({dom:{tag:"div",classes:["tox-context-form__group"]},components:e}),g=e=>Wn(e.element,"div.tox-focusable-wrapper").fold(A.none,(e=>(Ro(e),A.some(!0)))),f=e=>Fx.parts.field({factory:Kx,inputClasses:["tox-textfield","tox-toolbar-textfield","tox-textfield-size"],data:e?r:i,inputBehaviours:Od([Pp.config({disabled:d}),Lv.config({}),Rd("size-input-toolbar-events",[ud(Ns(),((t,o)=>{nd(t,a,{isField1:e})}))]),$h.config({mode:"special",onEnter:o,onEscape:g})]),selectOnFocus:!1}),v=e=>({dom:{tag:"label",classes:["tox-label"]},components:[op(t.translate(e))]}),y=e=>({dom:{tag:"div",classes:["tox-focusable-wrapper","tox-toolbar-nav-item"]},components:[e],behaviours:Od([Lv.config({}),Fd.config({}),$h.config({mode:"special",onEnter:e=>Yn(e.element,"input").fold(A.none,(e=>(Ro(e),A.some(!0))))})])}),x=y(Ux.parts.field1(p([Fx.parts.label(v("Width:")),f(!0)]))),w=y(Ux.parts.field2(p([Fx.parts.label(v("Height:")),f(!1)]))),_=xe(b),S=[_M({onBeforeSetup:e=>Yn(e.element,"input").each(Ro),onSetup:e.onSetup,getApi:l},_),CM({getApi:l},_,n)];return Ux.sketch({dom:{tag:"div",classes:["tox-context-form__group"]},components:[x,p([m]),w],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(e,t,o)=>{SR(Rf.getValue(e)).each((e=>{s(e).each((e=>{Rf.setValue(t,_R(e))}))}))},onInput:e=>od(e,$D),coupledFieldBehaviours:Od([Fd.config({}),$h.config({mode:"flow",focusInside:qa.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-focusable-wrapper"}),Pp.config({disabled:d,onDisabled:e=>{Ux.getField1(e).bind(Fx.getField).each(Pp.disable),Ux.getField2(e).bind(Fx.getField).each(Pp.disable),Ux.getLock(e).each(Pp.disable)},onEnabled:e=>{Ux.getField1(e).bind(Fx.getField).each(Pp.enable),Ux.getField2(e).bind(Fx.getField).each(Pp.enable),Ux.getLock(e).each(Pp.enable)}}),PM((()=>t.checkUiComponentContext("mode:design"))),Rd("size-input-toolbar-events2",[ud(a,((e,t)=>{const o=t.event.isField1,n=o?Ux.getField1(e):Ux.getField2(e),r=o?Ux.getField2(e):Ux.getField1(e),i=n.map(Rf.getValue).getOr(""),a=r.map(Rf.getValue).getOr("");s=ER(i,a)})),ud($D,(t=>e.onInput(l(t)))),...S])])})},Iz=(e,t,o)=>Fx.sketch({dom:{tag:"div",classes:["tox-context-form__group"]},components:[...e.toArray(),t],fieldBehaviours:Od([Pp.config({disabled:()=>o.checkUiComponentContext("mode:design").shouldDisable,onDisabled:e=>{(e=>{zo(e.element).each((e=>{Wn(e,'[tabindex="-1"]').each((e=>{Ro(e)}))}))})(e),Fx.getField(e).each(Pp.disable)},onEnabled:e=>{Fx.getField(e).each(Pp.enable)}})])}),Bz=(e,t,o,n)=>{const r=xe(b),i=e=>Pz(e,n),s=e.label.map((e=>Fx.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[op(t.translate(e))]}))),a=Fx.parts.field({factory:Kx,type:"range",inputClasses:["tox-toolbar-slider__input","tox-toolbar-nav-item"],inputAttributes:{min:String(e.min()),max:String(e.max())},data:e.initValue().toString(),fromInputValue:t=>(e=>{const t=parseFloat(e);return isNaN(t)?A.none():A.some(t)})(t).getOr(e.min()),toInputValue:e=>String(e),inputBehaviours:Od([Pp.config({disabled:()=>t.checkUiComponentContext("mode:design").shouldDisable}),PM((()=>t.checkUiComponentContext("mode:design"))),$h.config({mode:"special",onEnter:o,onLeft:(e,t)=>(t.cut(),A.none()),onRight:(e,t)=>(t.cut(),A.none())}),Rd("slider-events",[_M({onSetup:e.onSetup,getApi:i,onBeforeSetup:$h.focusIn},r),CM({getApi:i},r,n),ud(Fs(),(t=>{e.onInput(i(t))}))])])});return Iz(s,a,t)},zz=(e,t,o,n)=>{const r=xe(b),i=e=>Pz(e,n),s=e.label.map((e=>Fx.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[op(t.translate(e))]}))),a={...e.placeholder.map((e=>({placeholder:t.translate(e)}))).getOr({})},l=Fx.parts.field({factory:Kx,inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-item"],inputAttributes:a,data:e.initValue(),selectOnFocus:!0,inputBehaviours:Od([Pp.config({disabled:()=>t.checkUiComponentContext("mode:design").shouldDisable}),PM((()=>t.checkUiComponentContext("mode:design"))),$h.config({mode:"special",onEnter:o,onLeft:(e,t)=>(t.cut(),A.none()),onRight:(e,t)=>(t.cut(),A.none())}),Rd("input-events",[_M({onSetup:e.onSetup,getApi:e=>Wn(e.element,".tox-toolbar").bind((e=>Yn(e,"button:enabled"))).fold((()=>Pz(e,n)),(t=>Pz(e,n,t))),onBeforeSetup:$h.focusIn},r),CM({getApi:i},r,n),ud(Fs(),(t=>{e.onInput(i(t))}))])])});return Iz(s,l,t)},Fz=(e,t,o)=>{const n=Ye(),r=oy(e(o,(e=>s.findPrimary(e).orThunk((()=>a.findPrimary(e))).map((e=>(rd(e),!0)))),n)),i=H(t.commands,(e=>"start"===e.align)),s=Rz(r,i.pass,o,n),a=Rz(r,i.fail,o,n);return j([{title:A.none(),label:A.none(),items:s.asSpecs()},{title:A.none(),label:A.none(),items:[r.asSpec()]},{title:A.none(),label:A.none(),items:a.asSpecs()}],(e=>e.items.length>0))},Hz=(e,t)=>{switch(e.type){case"contextform":return Fz(S(zz,e),e,t);case"contextsliderform":return Fz(S(Bz,e),e,t);case"contextsizeinputform":return Fz(S(Nz,e),e,t)}},jz=Hz,Vz=(e,t,o)=>t.bottom-e.y>=o&&e.bottom-t.y>=o,Uz=e=>{const t=(e=>{const t=e.getBoundingClientRect();if(t.height<=0&&t.width<=0){const o=vo(at.fromDom(e.startContainer),e.startOffset).element;return(oo(o)?uo(o):A.some(o)).filter(to).map((e=>e.dom.getBoundingClientRect())).getOr(t)}return t})(e.selection.getRng());if(e.inline){const e=In();return zr(e.left+t.left,e.top+t.top,t.width,t.height)}{const o=Hr(at.fromDom(e.getBody()));return zr(o.x+t.left,o.y+t.top,t.width,t.height)}},Zz=(e,t,o,n=0)=>{const r=Rr(window),i=Fr(at.fromDom(e.getContentAreaContainer())),s=DC(e)||NC(e)||BC(e),{x:a,width:l}=((e,t,o)=>{const n=Math.max(e.x+o,t.x);return{x:n,width:Math.min(e.right-o,t.right)-n}})(i,r,n);if(e.inline&&!s)return zr(a,r.y,l,r.height);{const s=t.header.isPositionedAtTop(),{y:c,bottom:d}=((e,t,o,n,r,i)=>{const s=at.fromDom(e.getContainer()),a=Yn(s,".tox-editor-header").getOr(s),l=Fr(a),c=l.y>=t.bottom,d=n&&!c;if(e.inline&&d)return{y:Math.max(l.bottom+i,o.y),bottom:o.bottom};if(e.inline&&!d)return{y:o.y,bottom:Math.min(l.y-i,o.bottom)};const u="line"===r?Fr(s):t;return d?{y:Math.max(l.bottom+i,o.y),bottom:Math.min(u.bottom-i,o.bottom)}:{y:Math.max(u.y+i,o.y),bottom:Math.min(l.y-i,o.bottom)}})(e,i,r,s,o,n);return zr(a,c,l,d-c)}},$z={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},Wz={maxHeightFunction:$c(),maxWidthFunction:Wc()},qz=e=>"node"===e,Gz=(e,t,o,n,r)=>{const i=Uz(e),s=n.lastElement().exists((e=>vt(o,e)));if(((e,t)=>{const o=e.selection.getRng(),n=vo(at.fromDom(o.startContainer),o.startOffset);return o.startContainer===o.endContainer&&o.startOffset===o.endOffset-1&&vt(n.element,t)})(e,o))return s?Hc:Nc;if(s)return((e,t,o)=>{const n=fn(e,"position");un(e,"position",t);const r=o(e);return n.each((t=>un(e,"position",t))),r})(t,n.getMode(),(()=>Vz(i,Fr(t),-20)&&!n.isReposition()?Vc:Hc));return("fixed"===n.getMode()?r.y+In().top:r.y)+(Sn(t)+12)<=i.y?Nc:Ic},Yz=(e,t,o,n)=>{const r=t=>(n,r,i,s,a)=>({...Gz(e,s,t,o,a)({...n,y:a.y,height:a.height},r,i,s,a),alwaysFit:!0}),i=e=>qz(n)?[r(e)]:[];return t?{onLtr:e=>[mc,lc,cc,dc,uc,hc].concat(i(e)),onRtl:e=>[mc,cc,lc,uc,dc,hc].concat(i(e))}:{onLtr:e=>[hc,mc,dc,lc,uc,cc].concat(i(e)),onRtl:e=>[hc,mc,uc,cc,dc,lc].concat(i(e))}},Kz=(e,t)=>{const o=j(t,(t=>t.predicate(e.dom))),{pass:n,fail:r}=H(o,(e=>"contexttoolbar"===e.type));return{contextToolbars:n,contextForms:r}},Xz=(e,t,o)=>{const n=Kz(e,t);if(n.contextForms.length>0)return A.some({elem:e,toolbars:[n.contextForms[0]]});{const t=Kz(e,o);if(t.contextForms.length>0)return A.some({elem:e,toolbars:[t.contextForms[0]]});if(n.contextToolbars.length>0||t.contextToolbars.length>0){const o=(e=>{if(e.length<=1)return e;{const t=t=>N(e,(e=>e.position===t)),o=t=>j(e,(e=>e.position===t)),n=t("selection"),r=t("node");if(n||r){if(r&&n){const e=o("node"),t=z(o("selection"),(e=>({...e,position:"node"})));return e.concat(t)}return o(n?"selection":"node")}return o("line")}})(n.contextToolbars.concat(t.contextToolbars));return A.some({elem:e,toolbars:o})}return A.none()}},Jz=(e,t,o)=>e(t)?A.none():vr(t,(e=>{if(to(e)){const{contextToolbars:t,contextForms:n}=Kz(e,o.inNodeScope),r=n.length>0?n:(e=>{if(e.length<=1)return e;{const t=t=>Z(e,(e=>e.position===t)),o=t("selection").orThunk((()=>t("node"))).orThunk((()=>t("line"))).map((e=>e.position));return o.fold((()=>[]),(t=>j(e,(e=>e.position===t))))}})(t);return r.length>0?A.some({elem:e,toolbars:r}):A.none()}return A.none()}),e),Qz=(e,t)=>{const o={},n=[],r=[],i={},s={},a=(e,a)=>{const l=ji(Hi("ContextForm",zA,a));o[e]=l,l.launch.map((o=>{i["form:"+e]={...a.launch,type:"contextformtogglebutton"===o.type?"togglebutton":"button",onAction:()=>{t(l)}}})),"editor"===l.scope?r.push(l):n.push(l),s[e]=l},l=(e,o)=>{var a;(a=o,Hi("ContextToolbar",HA,a)).each((a=>{a.launch.isSome()&&(i["toolbar:"+e]={...o.launch,type:"button",onAction:()=>{t(a)}}),"editor"===o.scope?r.push(a):n.push(a),s[e]=a}))},c=ie(e);return F(c,(t=>{const o=e[t];"contextform"===o.type||"contextsliderform"===o.type||"contextsizeinputform"===o.type?a(t,o):"contexttoolbar"===o.type&&l(t,o)})),{forms:o,inNodeScope:n,inEditorScope:r,lookupTable:s,formNavigators:i}},eF="tox-pop--transition",tF=(e,t,o,n)=>{const r=n.backstage,s=r.shared,a=Gt().deviceType.isTouch,l=Ye(),c=Ye(),d=Ye(),u=(e=>{const t=xe([]),o=$x.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:e=>{t.set([]),$x.getContent(e).each((e=>{yn(e.element,"visibility")})),ir(e.element,DB),yn(e.element,"width")},onHide:()=>{t.set([]),e.onHide()},inlineBehaviours:Od([Rd("context-toolbar-events",[vd(Us(),((e,t)=>{"width"===t.event.raw.propertyName&&(ir(e.element,DB),yn(e.element,"width"))})),ud(PB,((e,t)=>{const o=e.element;yn(o,"width");const n=On(o),r=zo(e.element).isSome();yn(o,"left"),yn(o,"right"),yn(o,"max-width"),$x.setContent(e,t.event.contents),nr(o,DB);const i=On(o);un(o,"transition","none"),$x.reposition(e),yn(o,"transition"),un(o,"width",n+"px"),t.event.focus.fold((()=>{r&&OB(e)}),(t=>{Bo(wo(e.element)).fold((()=>Ro(t)),(e=>{vt(e,t)||Ro(t)}))})),setTimeout((()=>{un(e.element,"width",i+"px")}),0)})),ud(AB,((e,o)=>{$x.getContent(e).each((o=>{t.set(t.get().concat([{bar:o,focus:Bo(wo(e.element))}]))})),nd(e,PB,{contents:o.event.forwardContents,focus:A.none()})})),ud(MB,((o,n)=>{e.onBack(),oe(t.get()).each((e=>{t.set(t.get().slice(0,t.get().length-1)),nd(o,PB,{contents:ap(e.bar),focus:e.focus})}))}))]),$h.config({mode:"special",onEscape:o=>oe(t.get()).fold((()=>e.onEscape()),(e=>(od(o,MB),A.some(!0))))})]),lazySink:()=>Ae.value(e.sink)});return{sketch:o,inSubtoolbar:()=>t.get().length>0}})({sink:o,onEscape:()=>(e.focus(),TP(e),A.some(!0)),onHide:()=>{TP(e)},onBack:()=>{(e=>{e.dispatch("ContextFormSlideBack")})(e)}}),h=sp(u.sketch),m=()=>{const t=d.get().getOr("node"),o=qz(t)?1:0;return Zz(e,s,t,o)},p=()=>!(e.removed||a()&&r.isContextMenuOpen()),g=()=>{if(p()){const t=m(),o=je(d.get(),"node")?((e,t)=>t.filter((e=>sn(e)&&eo(e))).map(Hr).getOrThunk((()=>Uz(e))))(e,l.get()):Uz(e);return t.height<=0||!Vz(o,t,.01)}return!0},f=()=>{l.clear(),c.clear(),d.clear(),$x.hide(h)},v=()=>{if($x.isOpen(h)){const e=h.element;yn(e,"display"),g()?un(e,"display","none"):(c.set(0),$x.reposition(h))}},y=t=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:Od([$h.config({mode:"acyclic"}),Rd("pop-dialog-wrap-events",[yd((t=>{e.shortcuts.add("ctrl+F9","focus statusbar",(()=>$h.focusIn(t)))})),xd((t=>{e.shortcuts.remove("ctrl+F9")}))])])}),x=e=>{const t=_([e]);nd(h,AB,{forwardContents:y(t)})},w=it((()=>Qz(t,x))),_=t=>{const{buttons:o}=e.ui.registry.getAll(),r={...o,...w().formNavigators},a=rC(e)===NS.scrolling?NS.scrolling:NS.default,l=W(z(t,(t=>{return"contexttoolbar"===t.type?((t,o)=>fz(e,{buttons:t,toolbar:o.items,allowToolbarGroups:!1},n.backstage,A.some(["form:","toolbar:"])))(r,(o=t,{...o,launch:o.launch.getOrUndefined(),items:i(o.items)?o.items:z(o.items,jA)})):((e,t)=>jz(e,t))(t,s.providers);var o})));return zI({type:a,uid:Be("context-toolbar"),initGroups:l,onEscape:A.none,cyclicKeying:!0,providers:s.providers})},S=(t,n)=>{const r="node"===t?s.anchors.node(n):s.anchors.cursor(),i=((e,t,o,n)=>"line"===t?{bubble:Vl(12,0,$z),layouts:{onLtr:()=>[pc],onRtl:()=>[gc]},overrides:Wz}:{bubble:Vl(0,12,$z,1/12),layouts:Yz(e,o,n,t),overrides:Wz})(e,t,a(),{lastElement:l.get,isReposition:()=>je(c.get(),0),getMode:()=>$b.getMode(o)});return Fe(r,i)},C=(e,t)=>{if(E.cancel(),!p())return;const n=_(e),r=e[0].position,i=S(r,t);d.set(r),c.set(1);const s=h.element;yn(s,"display"),(e=>je(Ue(e,l.get(),vt),!0))(t)||(ir(s,eF),$b.reset(o,h)),$x.showWithinBounds(h,y(n),{anchor:i,transition:{classes:[eF],mode:"placement"}},(()=>A.some(m()))),t.fold(l.clear,l.set),g()&&un(s,"display","none")};let k=!1;const E=rt((()=>{if(e.hasFocus()&&!e.removed&&!k)if(ar(h.element,eF))E.throttle();else{((e,t)=>{const o=at.fromDom(t.getBody()),n=e=>vt(e,o),r=at.fromDom(t.selection.getNode());return(e=>!n(e)&&!yt(o,e))(r)?A.none():Xz(r,e.inNodeScope,e.inEditorScope).orThunk((()=>Jz(n,r,e)))})(w(),e).fold(f,(e=>{C(e.toolbars,A.some(e.elem))}))}}),17);e.on("init",(()=>{e.on("remove",f),e.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",v),e.on("click focus SetContent",E.throttle),e.on("keyup",(e=>{var t;((t=e.keyCode)!==QB.ENTER&&t!==QB.SPACEBAR||!u.inSubtoolbar())&&E.throttle()})),e.on(Mz,f),e.on("contexttoolbar-show",(t=>{const o=w();fe(o.lookupTable,t.toolbarKey).each((o=>{C([o],$e(t.target!==e,t.target)),OB(h)}))})),e.on("focusout",(t=>{zS.setEditorTimeout(e,(()=>{zo(o.element).isNone()&&zo(h.element).isNone()&&!e.hasFocus()&&f()}),0)})),e.on("SwitchMode",(()=>{e.mode.isReadOnly()&&f()})),e.on("DisabledStateChange",(e=>{e.state&&f()})),e.on("ExecCommand",(({command:e})=>{"toggleview"===e.toLowerCase()&&f()})),e.on("AfterProgressState",(t=>{t.state?f():e.hasFocus()&&E.throttle()})),e.on("dragstart",(()=>{k=!0})),e.on("dragend drop",(()=>{k=!1})),e.on("NodeChange",(e=>{u.inSubtoolbar()?(un(h.element,"transition","none"),v(),yn(h.element,"transition")):zo(h.element).fold(E.throttle,b)}))}))},oF=(e,t)=>{const o=()=>{const o=t.getOptions(e),n=t.getCurrent(e).map(t.hash),r=Ye();return z(o,(o=>({type:"togglemenuitem",text:t.display(o),onSetup:i=>{const s=e=>{e&&(r.on((e=>e.setActive(!1))),r.set(i)),i.setActive(e)};s(je(n,t.hash(o)));const a=t.watcher(e,o,s);return()=>{r.clear(),a()}},onAction:()=>t.setCurrent(e,o)})))};e.ui.registry.addMenuButton(t.name,{tooltip:t.text,icon:t.icon,fetch:e=>e(o()),onSetup:t.onToolbarSetup}),e.ui.registry.addNestedMenuItem(t.name,{type:"nestedmenuitem",text:t.text,getSubmenuItems:o,onSetup:t.onMenuSetup})},nF=e=>({name:"lineheight",text:"Line height",icon:"line-height",getOptions:RC,hash:e=>((e,t)=>Dr(e,t).map((({value:e,unit:t})=>e+t)))(e,["fixed","relative","empty"]).getOr(e),display:w,watcher:(e,t,o)=>e.formatter.formatChanged("lineheight",o,!1,{value:t}).unbind,getCurrent:e=>A.from(e.queryCommandValue("LineHeight")),setCurrent:(e,t)=>e.execCommand("LineHeight",!1,t),onToolbarSetup:AP(e),onMenuSetup:AP(e)}),rF=e=>{oF(e,nF(e)),(e=>A.from(oC(e)).map((t=>({name:"language",text:"Language",icon:"language",getOptions:x(t),hash:e=>u(e.customCode)?e.code:`${e.code}/${e.customCode}`,display:e=>e.title,watcher:(e,t,o)=>{var n;return e.formatter.formatChanged("lang",o,!1,{value:t.code,customValue:null!==(n=t.customCode)&&void 0!==n?n:null}).unbind},getCurrent:e=>{const t=at.fromDom(e.selection.getNode());return yr(t,(e=>A.some(e).filter(to).bind((e=>Go(e,"lang").map((t=>({code:t,customCode:Go(e,"data-mce-lang").getOrUndefined(),title:""})))))))},setCurrent:(e,t)=>e.execCommand("Lang",!1,t),onToolbarSetup:t=>{const o=Ge();return t.setActive(e.formatter.match("lang",{},void 0,!0)),o.set(e.formatter.formatChanged("lang",t.setActive,!0)),OP(o.clear,AP(e)(t))},onMenuSetup:AP(e)}))))(e).each((t=>oF(e,t)))},iF=(e,t)=>{((e,t)=>{const o=NB(t,VB(e));e.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),onSetup:AP(e),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o=NB(t,JB(e));e.ui.registry.addNestedMenuItem("fontfamily",{text:t.shared.providers.translate("Fonts"),onSetup:AP(e),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o={type:"advanced",...t.styles},n=NB(t,cz(e,o));e.ui.registry.addNestedMenuItem("styles",{text:"Formats",onSetup:AP(e,(()=>n.getStyleItems().length>0)),getSubmenuItems:()=>n.items.validateItems(n.getStyleItems())})})(e,t),((e,t)=>{const o=NB(t,WB(e));e.ui.registry.addNestedMenuItem("blocks",{text:"Blocks",onSetup:AP(e),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e,t)=>{const o=NB(t,az(e));e.ui.registry.addNestedMenuItem("fontsize",{text:"Font sizes",onSetup:AP(e),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t)},sF=e=>PP(e,"NodeChange",(t=>{t.setEnabled(e.queryCommandState("outdent")&&e.selection.isEditable())})),aF=e=>{(e=>{e.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:sF(e),onAction:LP(e,"outdent")}),e.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onSetup:AP(e),onAction:LP(e,"indent")})})(e)},lF=(e,t)=>o=>{o.setActive(t.get());const n=e=>{t.set(e.state),o.setActive(e.state)};return e.on("PastePlainTextToggle",n),OP((()=>e.off("PastePlainTextToggle",n)),AP(e)(o))},cF=(e,t)=>()=>{e.execCommand("mceToggleFormat",!1,t)},dF=e=>{(e=>{OL.each([{name:"bold",text:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],((t,o)=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:MP(e,t.name),onAction:cF(e,t.name),shortcut:t.shortcut})}));for(let t=1;t<=6;t++){const o="h"+t,n=`Access+${t}`;e.ui.registry.addToggleButton(o,{text:o.toUpperCase(),tooltip:"Heading "+t,onSetup:MP(e,o),onAction:cF(e,o),shortcut:n})}})(e),(e=>{OL.each([{name:"copy",text:"Copy",action:"Copy",icon:"copy",context:"any"},{name:"help",text:"Help",action:"mceHelp",icon:"help",shortcut:"Alt+0",context:"any"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A",context:"any"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"print",text:"Print",action:"mcePrint",icon:"print",shortcut:"Meta+P",context:"any"}],(t=>{e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:LP(e,t.action),shortcut:t.shortcut,context:t.context})})),OL.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(t=>{e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:AP(e),onAction:LP(e,t.action)})}))})(e),(e=>{OL.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:LP(e,t.action),onSetup:MP(e,t.name)})}))})(e)},uF=e=>{dF(e),(e=>{OL.each([{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C",context:"any"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A",context:"any"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P",context:"any"}],(t=>{e.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:LP(e,t.action),context:t.context})})),OL.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(t=>{e.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onSetup:AP(e),onAction:LP(e,t.action)})})),e.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onSetup:AP(e),onAction:cF(e,"code")})})(e)},hF=(e,t)=>PP(e,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(o=>{o.setEnabled(!e.mode.isReadOnly()&&e.undoManager[t]())})),mF=e=>{(e=>{e.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:hF(e,"hasUndo"),onAction:LP(e,"undo")}),e.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:hF(e,"hasRedo"),onAction:LP(e,"redo")})})(e),(e=>{e.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:hF(e,"hasUndo"),onAction:LP(e,"undo"),shortcut:"Meta+Z"}),e.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:hF(e,"hasRedo"),onAction:LP(e,"redo"),shortcut:"Meta+Y"})})(e)},pF=e=>PP(e,"VisualAid",(t=>{t.setActive(e.hasVisual)})),gF=e=>{(e=>{e.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:LP(e,"mceToggleVisualAid"),context:"any"})})(e),(e=>{e.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:pF(e),onAction:LP(e,"mceToggleVisualAid"),context:"any"})})(e)},fF=(e,t)=>{(e=>{F([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:LP(e,t.cmd),onSetup:MP(e,t.name)})})),e.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onSetup:AP(e),onAction:LP(e,"JustifyNone")})})(e),uF(e),iF(e,t),mF(e),(e=>{(e=>{e.addCommand("mceApplyTextcolor",((t,o)=>{((e,t,o)=>{e.undoManager.transact((()=>{e.focus(),e.formatter.apply(t,{value:o}),e.nodeChanged()}))})(e,t,o)})),e.addCommand("mceRemoveTextcolor",(t=>{((e,t)=>{e.undoManager.transact((()=>{e.focus(),e.formatter.remove(t,{value:null},void 0,!0),e.nodeChanged()}))})(e,t)}))})(e);const t=YP(e),o=KP(e),n=xe(t),r=xe(o);aD(e,"forecolor","forecolor",n),aD(e,"backcolor","hilitecolor",r),lD(e,"forecolor","forecolor","Text color",n),lD(e,"backcolor","hilitecolor","Background color",r)})(e),gF(e),aF(e),rF(e),(e=>{const t=xe(kC(e)),o=()=>e.execCommand("mceTogglePlainTextPaste");e.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:o,onSetup:lF(e,t)}),e.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:o,onSetup:lF(e,t)})})(e),(e=>{e.ui.registry.addContext("editable",(()=>e.selection.isEditable())),e.ui.registry.addContext("mode",(t=>e.mode.get()===t)),e.ui.registry.addContext("any",O),e.ui.registry.addContext("formatting",(t=>e.formatter.canApply(t))),e.ui.registry.addContext("insert",(t=>e.schema.isValidChild(e.selection.getNode().tagName,t)))})(e)},bF=e=>i(e)?e.split(/[ ,]/):e,vF=e=>t=>t.options.get(e),yF=vF("contextmenu_never_use_native"),xF=vF("contextmenu_avoid_overlap"),wF=e=>{const t=e.ui.registry.getAll().contextMenus,o=e.options.get("contextmenu");return e.options.isSet("contextmenu")?o:j(o,(e=>be(t,e)))},_F=(e,t)=>({type:"makeshift",x:e,y:t}),SF=e=>"longpress"===e.type||0===e.type.indexOf("touch"),CF=(e,t)=>{const o=FS.DOM.getPos(e);return((e,t,o)=>_F(e.x+t,e.y+o))(t,o.x,o.y)},kF=(e,t)=>"contextmenu"===t.type||"longpress"===t.type?e.inline?(e=>{if(SF(e)){const t=e.touches[0];return _F(t.pageX,t.pageY)}return _F(e.pageX,e.pageY)})(t):CF(e.getContentAreaContainer(),(e=>{if(SF(e)){const t=e.touches[0];return _F(t.clientX,t.clientY)}return _F(e.clientX,e.clientY)})(t)):EF(e),EF=e=>({type:"selection",root:at.fromDom(e.selection.getNode())}),TF=(e,t,o)=>{switch(o){case"node":return(e=>({type:"node",node:A.some(at.fromDom(e.selection.getNode())),root:at.fromDom(e.getBody())}))(e);case"point":return kF(e,t);case"selection":return EF(e)}},OF=(e,t,o,n,r,i)=>{const s=o(),a=TF(e,t,i);bR(s,xE.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!1,search:A.none()}).map((e=>{t.preventDefault(),$x.showMenuAt(r,{anchor:a},{menu:{markers:NE("normal")},data:e})}))},AF={onLtr:()=>[mc,lc,cc,dc,uc,hc,Nc,Ic,Rc,Dc,Lc,Pc],onRtl:()=>[mc,cc,lc,uc,dc,hc,Nc,Ic,Lc,Pc,Rc,Dc]},MF={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},PF=(e,t,o,n,r,i,s)=>{const a=((e,t,o)=>{const n=TF(e,t,o);return{bubble:Vl(0,"point"===o?12:0,MF),layouts:AF,overrides:{maxWidthFunction:Wc(),maxHeightFunction:$c()},...n}})(e,t,i);bR(o,xE.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!0,search:A.none()}).map((o=>{t.preventDefault();const l=s?Kc.HighlightMenuAndItem:Kc.HighlightNone;$x.showMenuWithinBounds(r,{anchor:a},{menu:{markers:NE("normal"),highlightOnOpen:l},data:o,type:"horizontal"},(()=>A.some(Zz(e,n.shared,"node"===i?"node":"selection")))),e.dispatch(Mz)}))},DF=(e,t,o,n,r,i)=>{const s=Gt(),a=s.os.isiOS(),l=s.os.isMacOS(),c=s.os.isAndroid(),d=s.deviceType.isTouch(),u=()=>{const s=o();PF(e,t,s,n,r,i,!(c||a||l&&d))};if((l||a)&&"node"!==i){const o=()=>{(e=>{const t=e.selection.getRng(),o=()=>{zS.setEditorTimeout(e,(()=>{e.selection.setRng(t)}),10),i()};e.once("touchend",o);const n=e=>{e.preventDefault(),e.stopImmediatePropagation()};e.on("mousedown",n,!0);const r=()=>i();e.once("longpresscancel",r);const i=()=>{e.off("touchend",o),e.off("longpresscancel",r),e.off("mousedown",n)}})(e),u()};((e,t)=>{const o=e.selection;if(o.isCollapsed()||t.touches.length<1)return!1;{const n=t.touches[0],r=o.getRng();return Or(e.getWin(),Cr.domRange(r)).exists((e=>e.left<=n.clientX&&e.right>=n.clientX&&e.top<=n.clientY&&e.bottom>=n.clientY))}})(e,t)?o():(e.once("selectionchange",o),e.once("touchend",(()=>e.off("selectionchange",o))))}else u()},LF=e=>i(e)?"|"===e:"separator"===e.type,RF={type:"separator"},NF=e=>{const t=e=>({text:e.text,icon:e.icon,enabled:e.enabled,shortcut:e.shortcut});if(i(e))return e;switch(e.type){case"separator":return RF;case"submenu":return{type:"nestedmenuitem",...t(e),getSubmenuItems:()=>{const t=e.getSubmenuItems();return i(t)?t:z(t,NF)}};default:const o=e;return{type:"menuitem",...t(o),onAction:v(o.onAction)}}},IF=(e,t)=>{if(0===t.length)return e;const o=oe(e).filter((e=>!LF(e))),n=o.fold((()=>[]),(e=>[RF]));return e.concat(n).concat(t).concat([RF])},BF=(e,t)=>!(e=>"longpress"===e.type||be(e,"touches"))(t)&&(2!==t.button||t.target===e.getBody()&&""===t.pointerType),zF=(e,t)=>BF(e,t)?e.selection.getStart(!0):t.target,FF=(e,t,o)=>{const n=Gt().deviceType.isTouch,r=sp($x.sketch({dom:{tag:"div"},lazySink:t,onEscape:()=>e.focus(),onShow:()=>o.setContextMenuState(!0),onHide:()=>o.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:Od([Rd("dismissContextMenu",[ud(ua(),((t,o)=>{cv.close(t),e.focus()}))])])})),s=()=>$x.hide(r),a=t=>{if(yF(e)&&t.preventDefault(),((e,t)=>t.ctrlKey&&!yF(e))(e,t)||(e=>0===wF(e).length)(e))return;const s=((e,t)=>{const o=xF(e),n=BF(e,t)?"selection":"point";if(ot(o)){const r=zF(e,t);return fr(at.fromDom(r),o)?"node":n}return n})(e,t);(n()?DF:OF)(e,t,(()=>{const o=zF(e,t),n=e.ui.registry.getAll(),r=wF(e);return((e,t,o)=>{const n=U(t,((t,n)=>fe(e,n.toLowerCase()).map((e=>{const n=e.update(o);if(i(n)&&ot(tt(n)))return IF(t,n.split(" "));if(l(n)&&n.length>0){const e=z(n,NF);return IF(t,e)}return t})).getOrThunk((()=>t.concat([n])))),[]);return n.length>0&&LF(n[n.length-1])&&n.pop(),n})(n.contextMenus,r,o)}),o,r,s)};e.on("init",(()=>{const t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(n()?"":" ResizeWindow");e.on(t,s),e.on("longpress contextmenu",a)}))},HF=(e,t,o,n,r,i)=>e.fold((()=>hf.snap({sensor:xg(o-20,n-20),range:Dn(r,i),output:xg(A.some(o),A.some(n)),extra:{td:t}})),(e=>{const r=o-20,i=n-20,s=e.element.dom.getBoundingClientRect();return hf.snap({sensor:xg(r,i),range:Dn(40,40),output:xg(A.some(o-s.width/2),A.some(n-s.height/2)),extra:{td:t}})})),jF=(e,t,o)=>({getSnapPoints:e,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(e,n)=>{const r=n.td;((e,t)=>e.exists((e=>vt(e,t))))(t.get(),r)||(t.set(r),o(r))},mustSnap:!0}),VF=e=>oy(xy.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:Od([hf.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:e}),ey.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),UF=(e,t)=>{const o=xe([]),n=xe([]),r=xe(!1),i=Ye(),s=Ye(),a=e=>{const o=Hr(e);return HF(u.getOpt(t),e,o.x,o.y,o.width,o.height)},l=e=>{const o=Hr(e);return HF(h.getOpt(t),e,o.right,o.bottom,o.width,o.height)},c=jF((()=>z(o.get(),(e=>a(e)))),i,(t=>{s.get().each((o=>{e.dispatch("TableSelectorChange",{start:t,finish:o})}))})),d=jF((()=>z(n.get(),(e=>l(e)))),s,(t=>{i.get().each((o=>{e.dispatch("TableSelectorChange",{start:o,finish:t})}))})),u=VF(c),h=VF(d),m=sp(u.asSpec()),p=sp(h.asSpec()),g=(t,o,n,r)=>{const i=n(o);hf.snapTo(t,i);((t,o,n,r)=>{const i=o.dom.getBoundingClientRect();yn(t.element,"display");const s=co(at.fromDom(e.getBody())).dom.innerHeight,a=n(i),l=r(i,s);(a||l)&&un(t.element,"display","none")})(t,o,(e=>e[r]<0),((e,t)=>e[r]>t))},f=e=>g(m,e,a,"top"),b=e=>g(p,e,l,"bottom");if(Gt().deviceType.isTouch()){const a=e=>z(e,at.fromDom);e.on("TableSelectionChange",(e=>{r.get()||(nm(t,m),nm(t,p),r.set(!0));const l=at.fromDom(e.start),c=at.fromDom(e.finish);i.set(l),s.set(c),A.from(e.otherCells).each((e=>{o.set(a(e.upOrLeftCells)),n.set(a(e.downOrRightCells)),f(l),b(c)}))})),e.on("ResizeEditor ResizeWindow ScrollContent",(()=>{i.get().each(f),s.get().each(b)})),e.on("TableSelectionClear",(()=>{r.get()&&(sm(m),sm(p),r.set(!1)),i.clear(),s.clear()}))}};const ZF=(e,t,o)=>{var n;const r=null!==(n=t.delimiter)&&void 0!==n?n:"›",i=(t,n,r)=>xy.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":r}},components:[op(t)],action:t=>{e.focus(),e.selection.select(n),e.nodeChanged()},buttonBehaviours:Od([Qv.config({...o.tooltips.getConfig({tooltipText:o.translate(["Select the {0} element",n.nodeName.toLowerCase()]),onShow:(e,t)=>{((e,t)=>{const o=A.from(qo(e,"id")).getOrThunk((()=>{const e=Be("aria");return $o(t,"id",e),e}));$o(e,"aria-describedby",o)})(e.element,t.element)},onHide:e=>{var t;t=e.element,Ko(t,"aria-describedby")}})}),vM(o.isDisabled),PM((()=>o.checkUiComponentContext("any")))])});return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Od([$h.config({mode:"flow",selector:"div[role=button]"}),Pp.config({disabled:o.isDisabled}),PM((()=>o.checkUiComponentContext("any"))),Lv.config({}),Cm.config({}),Rd("elementPathEvents",[yd(((t,o)=>{e.shortcuts.add("alt+F11","focus statusbar elementpath",(()=>$h.focusIn(t))),e.on("NodeChange",(o=>{const n=(t=>{const o=[];let n=t.length;for(;n-- >0;){const i=t[n];if(1===i.nodeType&&"BR"!==(r=i).nodeName&&!r.getAttribute("data-mce-bogus")&&"bookmark"!==r.getAttribute("data-mce-type")){const t=EP(e,i);if(t.isDefaultPrevented()||o.push({name:t.name,element:i}),t.isPropagationStopped())break}}var r;return o})(o.parents),s=n.length>0?U(n,((e,t,o)=>{const n=i(t.name,t.element,o);return 0===o?e.concat([n]):e.concat([{dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[op(` ${r} `)]},n])}),[]):[];Cm.set(t,s)}))}))])]),components:[]}};var $F;!function(e){e[e.None=0]="None",e[e.Both=1]="Both",e[e.Vertical=2]="Vertical"}($F||($F={}));const WF=(e,t,o)=>{const n=at.fromDom(e.getContainer()),r=((e,t,o,n,r)=>{const i={height:_z(n+t.top,KS(e),JS(e))};return o===$F.Both&&(i.width=_z(r+t.left,YS(e),XS(e))),i})(e,t,o,Sn(n),On(n));ae(r,((e,t)=>{g(e)&&un(n,t,wz(e))})),(e=>{e.dispatch("ResizeEditor")})(e)},qF=(e,t,o,n)=>{const r=Dn(20*o,20*n);return WF(e,r,t),A.some(!0)},GF=(e,t)=>{const o=(e=>{const t=CC(e);return!1===t?$F.None:"both"===t?$F.Both:$F.Vertical})(e);if(o===$F.None)return A.none();const n=o===$F.Both?"Press the arrow keys to resize the editor.":"Press the Up and Down arrow keys to resize the editor.",r=o===$F.Both?"tox-statusbar__resize-cursor-both":"tox-statusbar__resize-cursor-default";return A.some(pE("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle",r],attributes:{"aria-label":t.translate(n),"data-mce-name":"resize-handle"},behaviours:[hf.config({mode:"mouse",repositionTarget:!1,onDrag:(t,n,r)=>WF(e,r,o),blockerClass:"tox-blocker"}),$h.config({mode:"special",onLeft:()=>qF(e,o,-1,0),onRight:()=>qF(e,o,1,0),onUp:()=>qF(e,o,0,-1),onDown:()=>qF(e,o,0,1)}),Lv.config({}),Fd.config({}),Qv.config(t.tooltips.getConfig({tooltipText:t.translate("Resize")}))]},t.icons))},YF=(e,t)=>{const o=()=>{const o=[];return e.hasPlugin("wordcount")&&o.push(((e,t)=>{const o=(e,o,n)=>Cm.set(e,[op(t.translate(["{0} "+n,o[n]]))]);return xy.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Od([vM(t.isDisabled),PM((()=>t.checkUiComponentContext("any"))),Lv.config({}),Cm.config({}),Rf.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Rd("wordcount-events",[_d((e=>{const t=Rf.getValue(e),n="words"===t.mode?"characters":"words";Rf.setValue(e,{mode:n,count:t.count}),o(e,t.count,n)})),yd((t=>{e.on("wordCountUpdate",(e=>{const{mode:n}=Rf.getValue(t);Rf.setValue(t,{mode:n,count:e.wordCount}),o(t,e.wordCount,n)}))}))])]),eventOrder:{[Js()]:["disabling","alloy.base.behaviour","wordcount-events"]}})})(e,t)),SC(e)&&o.push({dom:{tag:"span",classes:["tox-statusbar__branding"]},components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v7",rel:"noopener",target:"_blank","aria-label":e.translate(["Build with {0}","TinyMCE"])},innerHtml:e.translate(["Build with {0}",'<svg height="16" viewBox="0 0 80 16" width="80" xmlns="http://www.w3.org/2000/svg"><g opacity=".8"><path d="m80 3.537v-2.202h-7.976v11.585h7.976v-2.25h-5.474v-2.621h4.812v-2.069h-4.812v-2.443zm-10.647 6.929c-.493.217-1.13.337-1.864.337s-1.276-.156-1.805-.47a3.732 3.732 0 0 1 -1.3-1.298c-.324-.554-.48-1.191-.48-1.877s.156-1.335.48-1.877a3.635 3.635 0 0 1 1.3-1.299 3.466 3.466 0 0 1 1.805-.481c.65 0 .914.06 1.263.18.36.12.698.277.986.47.289.192.578.384.842.6l.12.085v-2.586l-.023-.024c-.385-.35-.855-.614-1.384-.818-.53-.205-1.155-.313-1.877-.313-.721 0-1.6.144-2.333.445a5.773 5.773 0 0 0 -1.937 1.251 5.929 5.929 0 0 0 -1.324 1.9c-.324.735-.48 1.565-.48 2.455s.156 1.72.48 2.454c.325.734.758 1.383 1.324 1.913.553.53 1.215.938 1.937 1.25a6.286 6.286 0 0 0 2.333.434c.819 0 1.384-.108 1.961-.313.59-.216 1.083-.505 1.468-.866l.024-.024v-2.49l-.12.096c-.41.337-.878.626-1.396.866zm-14.869-4.15-4.8-5.04-.024-.025h-.902v11.67h2.502v-6.847l2.827 3.08.385.409.397-.41 2.791-3.067v6.845h2.502v-11.679h-.902l-4.788 5.052z"/><path clip-rule="evenodd" d="m15.543 5.137c0-3.032-2.466-5.113-4.957-5.137-.36 0-.745.024-1.094.096-.157.024-3.85.758-3.85.758-3.032.602-4.62 2.466-4.704 4.788-.024.89-.024 4.27-.024 4.27.036 3.165 2.406 5.138 5.017 5.126.337 0 1.119-.109 1.287-.145.144-.024.385-.084.746-.144.661-.12 1.684-.325 3.067-.602 2.37-.409 4.103-2.009 4.44-4.33.156-1.023.084-4.692.084-4.692zm-3.213 3.308-2.346.457v2.31l-5.859 1.143v-5.75l2.346-.458v3.441l3.513-.686v-3.44l-3.513.685v-2.297l5.859-1.143v5.75zm20.09-3.296-.083-1.023h-2.13v8.794h2.346v-4.884c0-1.107.95-1.985 2.057-1.997 1.095 0 1.901.89 1.901 1.997v4.884h2.346v-5.245c-.012-2.105-1.588-3.777-3.67-3.765a3.764 3.764 0 0 0 -2.778 1.25l.012-.011zm-6.014-4.102 2.346-.458v2.298l-2.346.457z" fill-rule="evenodd"/><path d="m28.752 4.126h-2.346v8.794h2.346z"/><path clip-rule="evenodd" d="m43.777 15.483 4.043-11.357h-2.418l-1.54 4.355-.445 1.324-.36-1.324-1.54-4.355h-2.418l3.151 8.794-1.083 3.08zm-21.028-5.51c0 .722.541 1.034.878 1.034s.638-.048.95-.144l.518 1.708c-.217.145-.879.518-2.13.518a2.565 2.565 0 0 1 -2.562-2.587c-.024-1.082-.024-2.49 0-4.21h-1.54v-2.142h1.54v-1.912l2.346-.458v2.37h2.201v2.142h-2.2v3.693-.012z" fill-rule="evenodd"/></g></svg>\n'.trim()])},behaviours:Od([Fd.config({})])}]}),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:o}},n=()=>{const n=[],r=OC(e),i=_C(e),s=SC(e)||e.hasPlugin("wordcount"),a=()=>{const e="tox-statusbar__text-container--flex-start",t="tox-statusbar__text-container--flex-end";if(r){const o="tox-statusbar__text-container-3-cols";return s||i?s&&!i?[o,t]:[o,e]:[o,"tox-statusbar__text-container--space-around"]}return[s&&!i?t:e]};return i&&n.push(ZF(e,{},t)),r&&n.push((()=>{const e=zM("Alt+0");return{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[op(iE.translate(["Press {0} for help",e]))]}})()),s&&n.push(o()),n.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container",...a()]},components:n}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const o=n(),r=GF(e,t);return o.concat(r.toArray())})()}},KF=(e,t)=>t.get().getOrDie(`UI for ${e} has not been rendered`),XF=(e,t)=>{const o=e.inline,n=o?Az:xz,r=UC(e)?xI:dI,i=(()=>{const e=Ye(),t=Ye(),o=Ye();return{dialogUi:e,popupUi:t,mainUi:o,getUiMotherships:()=>{const o=e.get().map((e=>e.mothership)),n=t.get().map((e=>e.mothership));return o.fold((()=>n.toArray()),(e=>n.fold((()=>[e]),(t=>vt(e.element,t.element)?[e]:[e,t]))))},lazyGetInOuterOrDie:(e,t)=>()=>o.get().bind((e=>t(e.outerContainer))).getOrDie(`Could not find ${e} element in OuterContainer`)}})(),s=Ye(),a=Ye(),l=Ye(),c=Gt().deviceType.isTouch()?["tox-platform-touch"]:[],d=zC(e),u=rC(e),h=oy({dom:{tag:"div",classes:["tox-anchorbar"]}}),m=oy({dom:{tag:"div",classes:["tox-bottom-anchorbar"]}}),p=()=>i.mainUi.get().map((e=>e.outerContainer)).bind(iB.getHeader),g=i.lazyGetInOuterOrDie("anchor bar",h.getOpt),f=i.lazyGetInOuterOrDie("bottom anchor bar",m.getOpt),b=i.lazyGetInOuterOrDie("toolbar",iB.getToolbar),v=i.lazyGetInOuterOrDie("throbber",iB.getThrobber),y=sI({popup:()=>Ae.fromOption(i.popupUi.get().map((e=>e.sink)),"(popup) UI has not been rendered"),dialog:()=>Ae.fromOption(i.dialogUi.get().map((e=>e.sink)),"UI has not been rendered")},e,g,f),x=e=>iB.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]},promotionLink:e}),w=()=>{const t=(()=>{const t={attributes:{[Gc]:d?qc.BottomToTop:qc.TopToBottom}},o=iB.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:y.popup,onEscape:()=>{e.focus()}}),n=iB.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:y.popup.shared.getSink,providers:y.popup.shared.providers,onEscape:()=>{e.focus()},onToolbarToggled:t=>{((e,t)=>{e.dispatch("ToggleToolbarDrawer",{state:t})})(e,t)},type:u,lazyToolbar:b,lazyHeader:()=>p().getOrDie("Could not find header element"),...t}),r=iB.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:y.popup.shared.providers,onEscape:()=>{e.focus()},type:u}),i=BC(e),s=NC(e),a=DC(e),l=TC(e),c=x(l),m=i||s||a,g=[c,o];return iB.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(m?[]:["tox-editor-header--empty"]),...t},components:W([a?g:[],i?[r]:s?[n]:[],HC(e)?[]:[h.asSpec()]]),sticky:UC(e),editor:e,sharedBackstage:y.popup.shared})})(),n={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[iB.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),iB.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}})]},r=iB.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:y.popup}),i=iB.parts.viewWrapper({backstage:y.popup}),a=wC(e)&&!o?A.some(YF(e,y.popup.shared.providers)):A.none(),l=W([d?[]:[t],o?[]:[n],d?[t]:[]]),g=iB.parts.editorContainer({components:W([l,o?[]:[m.asSpec()]])}),f=VC(e),v={role:"application",...iE.isRtl()?{dir:"rtl"}:{},...f?{"aria-hidden":"true"}:{}},w=sp(iB.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(o?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(c),styles:{visibility:"hidden",...f?{opacity:"0",border:"0"}:{}},attributes:v},components:[g,...o?[]:[i,...a.toArray()],r],behaviours:Od([PM((()=>y.popup.shared.providers.checkUiComponentContext("any"))),Pp.config({disableClass:"tox-tinymce--disabled"}),$h.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])})),_=by(w);return s.set(_),{mothership:_,outerContainer:w}},_=t=>{const o=wz((e=>Sz(e).getOr(qS(e)))(e)),n=wz((e=>Cz(e).getOr(GS(e)))(e));return e.inline||(vn("div","width",n)&&un(t.element,"width",n),vn("div","height",o)?un(t.element,"height",o):un(t.element,"height","400px")),o},S=t=>{const{mainUi:o,popupUi:i,uiMotherships:s}=t;le(iC(e),((t,o)=>{e.ui.registry.addGroupToolbarButton(o,t)}));const{buttons:a,menuItems:l,contextToolbars:c,sidebars:d,views:h}=e.ui.registry.getAll(),m=IC(e),g={menuItems:l,menus:$C(e),menubar:uC(e),toolbar:m.getOrThunk((()=>hC(e))),allowToolbarGroups:u===NS.floating,buttons:a,sidebar:d,views:h};var f;f=o.outerContainer,e.addShortcut("alt+F9","focus menubar",(()=>{iB.focusMenubar(f)})),e.addShortcut("alt+F10","focus toolbar",(()=>{iB.focusToolbar(f)})),e.addCommand("ToggleToolbarDrawer",((e,t)=>{(null==t?void 0:t.skipFocus)?iB.toggleToolbarDrawerWithoutFocusing(f):iB.toggleToolbarDrawer(f)})),e.addQueryStateHandler("ToggleToolbarDrawer",(()=>iB.isToolbarDrawerToggled(f))),((e,t,o)=>{const n=(e,n)=>{F([t,...o],(t=>{t.broadcastEvent(e,n)}))},r=(e,n)=>{F([t,...o],(t=>{t.broadcastOn([e],n)}))},i=e=>r(iy(),{target:e.target}),s=Lo(),a=Mo(s,"touchstart",i),l=Mo(s,"touchmove",(e=>n(ia(),e))),c=Mo(s,"touchend",(e=>n(sa(),e))),d=Mo(s,"mousedown",i),u=Mo(s,"mouseup",(e=>{0===e.raw.button&&r(ay(),{target:e.target})})),h=e=>r(iy(),{target:at.fromDom(e.target)}),m=e=>{0===e.button&&r(ay(),{target:at.fromDom(e.target)})},p=()=>{F(e.editorManager.get(),(t=>{e!==t&&t.dispatch("DismissPopups",{relatedTarget:e})}))},g=e=>n(aa(),Do(e)),f=e=>{r(sy(),{}),n(la(),Do(e))},b=wo(at.fromDom(e.getElement())),v=Po(b,"scroll",(o=>{requestAnimationFrame((()=>{if(null!=e.getContainer()){const r=XC(e,t.element).map((e=>[e.element,...e.others])).getOr([]);N(r,(e=>vt(e,o.target)))&&(e.dispatch("ElementScroll",{target:o.target.dom}),n(ga(),o))}}))})),y=()=>r(sy(),{}),x=t=>{t.state&&r(iy(),{target:at.fromDom(e.getContainer())})},w=e=>{r(iy(),{target:at.fromDom(e.relatedTarget.getContainer())})},_=t=>e.dispatch("focusin",t),S=t=>e.dispatch("focusout",t);e.on("PostRender",(()=>{e.on("click",h),e.on("tap",h),e.on("mouseup",m),e.on("mousedown",p),e.on("ScrollWindow",g),e.on("ResizeWindow",f),e.on("ResizeEditor",y),e.on("AfterProgressState",x),e.on("DismissPopups",w),F([t,...o],(e=>{e.element.dom.addEventListener("focusin",_),e.element.dom.addEventListener("focusout",S)}))})),e.on("remove",(()=>{e.off("click",h),e.off("tap",h),e.off("mouseup",m),e.off("mousedown",p),e.off("ScrollWindow",g),e.off("ResizeWindow",f),e.off("ResizeEditor",y),e.off("AfterProgressState",x),e.off("DismissPopups",w),F([t,...o],(e=>{e.element.dom.removeEventListener("focusin",_),e.element.dom.removeEventListener("focusout",S)})),d.unbind(),a.unbind(),l.unbind(),c.unbind(),u.unbind(),v.unbind()})),e.on("detach",(()=>{F([t,...o],um),F([t,...o],(e=>e.destroy()))}))})(e,o.mothership,s),r.setup(e,y.popup.shared,p),fF(e,y.popup),FF(e,y.popup.shared.getSink,y.popup),(e=>{const{sidebars:t}=e.ui.registry.getAll();F(ie(t),(o=>{const n=t[o],r=()=>je(A.from(e.queryCommandValue("ToggleSidebar")),o);e.ui.registry.addToggleButton(o,{icon:n.icon,tooltip:n.tooltip,onAction:t=>{e.execCommand("ToggleSidebar",!1,o),t.setActive(r())},onSetup:t=>{t.setActive(r());const o=()=>t.setActive(r());return e.on("ToggleSidebar",o),()=>{e.off("ToggleSidebar",o)}},context:"any"})}))})(e),PI(e,v,y.popup.shared),tF(e,c,i.sink,{backstage:y.popup}),UF(e,i.sink);const b={targetNode:e.getElement(),height:_(o.outerContainer)};return n.render(e,t,g,y.popup,b)};return{popups:{backstage:y.popup,getMothership:()=>KF("popups",l)},dialogs:{backstage:y.dialog,getMothership:()=>KF("dialogs",a)},renderUI:()=>{const o=w(),n=(()=>{const t=jC(e),o=vt(an(),t)&&"grid"===pn(t,"display"),n={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c),attributes:{...iE.isRtl()?{dir:"rtl"}:{}}},behaviours:Od([$b.config({useFixed:()=>r.isDocked(p)})])},i={dom:{styles:{width:document.body.clientWidth+"px"}},events:ld([ud(la(),(e=>{un(e.element,"width",document.body.clientWidth+"px")}))])},s=sp(Fe(n,o?i:{})),l=by(s);return a.set(l),{sink:s,mothership:l}})(),s=ZC(e)?(()=>{const e={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(c),attributes:{...iE.isRtl()?{dir:"rtl"}:{}}},behaviours:Od([$b.config({useFixed:()=>r.isDocked(p),getBounds:()=>t.getPopupSinkBounds()})])},o=sp(e),n=by(o);return l.set(n),{sink:o,mothership:n}})():(e=>(l.set(e.mothership),e))(n);i.dialogUi.set(n),i.popupUi.set(s),i.mainUi.set(o);const d={popupUi:s,dialogUi:n,mainUi:o,uiMotherships:i.getUiMotherships()};return S(d)}}},JF=e=>{const t=[],o={};return ae(e,((e,n)=>{e.fold((()=>{t.push(n)}),(e=>{o[n]=e}))})),t.length>0?Ae.error(t):Ae.value(o)},QF=(e,t,o,n)=>{const r=oy(Ex.sketch((r=>({dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:z(e.items,(e=>dN(r,e,t,o,n)))}))));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[r.asSpec()]}],behaviours:Od([$h.config({mode:"acyclic",useTabstopAt:C(BL)}),sL(r),cL(r,{postprocess:e=>JF(e).fold((e=>(console.error(e),{})),w)}),Rd("dialog-body-panel",[ud(Ns(),((e,t)=>{e.getSystem().broadcastOn([UL],{newFocus:A.some(t.event.target)})}))])])}},eH=(e,t)=>{un(e,"height",t+"px"),un(e,"flex-basis",t+"px")},tH=(e,t,o)=>{Wn(e,'[role="dialog"]').each((e=>{Yn(e,'[role="tablist"]').each((n=>{o.get().map((o=>(un(t,"height","0"),un(t,"flex-basis","0"),Math.min(o,((e,t,o)=>{const n=lo(e).dom,r=Wn(e,".tox-dialog-wrap").getOr(e);let i;i="fixed"===pn(r,"position")?Math.max(n.clientHeight,window.innerHeight):Math.max(n.offsetHeight,n.scrollHeight);const s=Sn(t),a=t.dom.offsetLeft>=o.dom.offsetLeft+On(o)?Math.max(Sn(o),s):s,l=parseInt(pn(e,"margin-top"),10)||0,c=parseInt(pn(e,"margin-bottom"),10)||0;return i-(Sn(e)+l+c-a)})(e,t,n))))).each((e=>{eH(t,e)}))}))}))},oH=e=>Yn(e,'[role="tabpanel"]'),nH=e=>{const t=Ye(),o=[yd((o=>{const n=o.element;oH(n).each((r=>{un(r,"visibility","hidden"),o.getSystem().getByDom(r).toOptional().each((o=>{const n=((e,t,o)=>z(e,((n,r)=>{Cm.set(o,e[r].view());const i=t.dom.getBoundingClientRect();return Cm.set(o,[]),i.height})))(e,r,o),i=(e=>te(Q(e,((e,t)=>e>t?-1:e<t?1:0))))(n);i.fold(t.clear,t.set)})),tH(n,r,t),yn(r,"visibility"),((e,t)=>{te(e).each((e=>ES.showTab(t,e.value)))})(e,o),requestAnimationFrame((()=>{tH(n,r,t)}))}))})),ud(la(),(e=>{const o=e.element;oH(o).each((e=>{tH(o,e,t)}))})),ud(QD,((e,o)=>{const n=e.element;oH(n).each((e=>{const o=Bo(wo(e));un(e,"visibility","hidden");const r=fn(e,"height").map((e=>parseInt(e,10)));yn(e,"height"),yn(e,"flex-basis");const i=e.dom.getBoundingClientRect().height;r.forall((e=>i>e))?(t.set(i),tH(n,e,t)):r.each((t=>{eH(e,t)})),yn(e,"visibility"),o.each(Ro)}))}))];return{extraEvents:o,selectFirst:!1}},rH="send-data-to-section",iH="send-data-to-view",sH=(e,t,o,n)=>{const r=xe({}),i=e=>{const t=Rf.getValue(e),o=JF(t).getOr({}),n=r.get(),i=Fe(n,o);r.set(i)},s=e=>{const t=r.get();Rf.setValue(e,t)},a=xe(null),l=z(e.tabs,(e=>({value:e.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[op(o.shared.providers.translate(e.title))],view:()=>[Ex.sketch((r=>({dom:{tag:"div",classes:["tox-form"]},components:z(e.items,(e=>dN(r,e,t,o,n))),formBehaviours:Od([$h.config({mode:"acyclic",useTabstopAt:C(BL)}),Rd("TabView.form.events",[yd(s),xd(i)]),Gb.config({channels:Ss([{key:rH,value:{onReceive:i}},{key:iH,value:{onReceive:s}}])})])})))]}))),c=nH(l);return ES.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(e,t,o)=>{const n=Rf.getValue(t);nd(e,JD,{name:n,oldName:a.get()}),a.set(n)},tabs:l,components:[ES.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[xS.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:Od([Lv.config({})])}),ES.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:c.selectFirst,tabSectionBehaviours:Od([Rd("tabpanel",c.extraEvents),$h.config({mode:"acyclic"}),mp.config({find:e=>te(ES.getViewItems(e))}),dL(A.none(),(e=>(e.getSystem().broadcastOn([rH],{}),r.get())),((e,t)=>{r.set(t),e.getSystem().broadcastOn([iH],{})}))])})},aH=(e,t,o,n,r,i)=>({dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...o.map((e=>({id:e}))).getOr({}),...r?{"aria-live":"polite"}:{}}},components:[],behaviours:Od([aL(0),Jb.config({channel:`${HL}-${t}`,updateState:(e,t)=>A.some({isTabPanel:()=>"tabpanel"===t.body.type}),renderComponents:e=>{const t=e.body;return"tabpanel"===t.type?[sH(t,e.initialData,n,i)]:[QF(t,e.initialData,n,i)]},initialData:e})])}),lH=jS.deviceType.isTouch(),cH=(e,t)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[e,t]}),dH=(e,t)=>tw.parts.close(xy.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:e,buttonBehaviours:Od([Lv.config({})])})),uH=()=>tw.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),hH=(e,t)=>tw.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:ty(`<p>${rE(t.translate(e))}</p>`)}]}]}),mH=e=>tw.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e}),pH=(e,t)=>[Vg.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),Vg.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})],gH=e=>{const t="tox-dialog",o=t+"-wrap",n=o+"__backdrop",r=t+"__disable-scroll";return tw.sketch({lazySink:e.lazySink,onEscape:t=>(e.onEscape(t),A.some(!0)),useTabstopAt:e=>!BL(e),firstTabstop:e.firstTabstop,dom:{tag:"div",classes:[t].concat(e.extraClasses),styles:{position:"relative",...e.extraStyles}},components:[e.header,e.body,...e.footer.toArray()],parts:{blocker:{dom:ty(`<div class="${o}"></div>`),components:[{dom:{tag:"div",classes:lH?[n,n+"--opaque"]:[n]}}]}},dragBlockClass:o,modalBehaviours:Od([Fd.config({}),Rd("dialog-events",e.dialogEvents.concat([vd(Ns(),((e,t)=>{dp.isBlocked(e)||$h.focusIn(e)})),ud(ma(),((e,t)=>{e.getSystem().broadcastOn([UL],{newFocus:t.event.newFocus})}))])),Rd("scroll-lock",[yd((()=>{nr(an(),r)})),xd((()=>{ir(an(),r)}))]),...e.extraBehaviours]),eventOrder:{[Js()]:["dialog-events"],[ca()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[da()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...e.eventOrder}})},fH=e=>xy.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close"),"data-mce-name":"close"}},buttonBehaviours:Od([Lv.config({}),Qv.config(e.tooltips.getConfig({tooltipText:e.translate("Close")}))]),components:[pE("close",{tag:"span",classes:["tox-icon"]},e.icons)],action:e=>{od(e,qD)}}),bH=(e,t,o,n)=>({dom:{tag:"h1",classes:["tox-dialog__title"],attributes:{...o.map((e=>({id:e}))).getOr({})}},components:[],behaviours:Od([Jb.config({channel:`${FL}-${t}`,initialData:e,renderComponents:e=>[op(n.translate(e.title))]})])}),vH=()=>({dom:ty('<div class="tox-dialog__draghandle"></div>')}),yH=(e,t,o)=>((e,t,o)=>{const n=tw.parts.title(bH(e,t,A.none(),o)),r=tw.parts.draghandle(vH()),i=tw.parts.close(fH(o)),s=[n].concat(e.draggable?[r]:[]).concat([i]);return Vg.sketch({dom:ty('<div class="tox-dialog__header"></div>'),components:s})})({title:o.shared.providers.translate(e),draggable:o.dialog.isDraggableModal()},t,o.shared.providers),xH=(e,t,o,n)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":o.translate(e)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${n.getOr(0)}px`,position:"absolute"}},behaviours:t,components:[{dom:ty('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),wH=(e,t,o)=>({onClose:()=>o.closeWindow(),onBlock:o=>{const n=Yn(e().element,".tox-dialog__header").map((e=>Sn(e)));tw.setBusy(e(),((e,r)=>xH(o.message,r,t,n)))},onUnblock:()=>{tw.setIdle(e())}}),_H="tox-dialog--fullscreen",SH="tox-dialog--width-lg",CH="tox-dialog--width-md",kH=e=>{switch(e){case"large":return A.some(SH);case"medium":return A.some(CH);default:return A.none()}},EH=(e,t)=>{const o=at.fromDom(t.element.dom);ar(o,_H)||(cr(o,[SH,CH]),kH(e).each((e=>nr(o,e))))},TH=(e,t)=>{const o=at.fromDom(e.element.dom),n=dr(o),r=Z(n,(e=>e===SH||e===CH)).or(kH(t));((e,t)=>{F(t,(t=>{sr(e,t)}))})(o,[_H,...r.toArray()])},OH=(e,t,o)=>sp(gH({...e,firstTabstop:1,lazySink:o.shared.getSink,extraBehaviours:[hL({}),...e.extraBehaviours],onEscape:e=>{od(e,qD)},dialogEvents:t,eventOrder:{[Xs()]:[Jb.name(),Gb.name()],[ca()]:["scroll-lock",Jb.name(),"messages","dialog-events","alloy.base.behaviour"],[da()]:["alloy.base.behaviour","dialog-events","messages",Jb.name(),"scroll-lock"]}})),AH=(e,t={})=>z(e,(e=>"menu"===e.type?(e=>{const o=z(e.items,(e=>{const o=fe(t,e.name).getOr(xe(!1));return{...e,storage:o}}));return{...e,items:o}})(e):e)),MH=e=>U(e,((e,t)=>{if("menu"===t.type){return U(t.items,((e,t)=>(e[t.name]=t.storage,e)),e)}return e}),{}),PH=(e,t)=>[gd(Ns(),IL),e(WD,((e,o,n,r)=>{Io(r.element)&&Bo(wo(r.element)).each(No),t.onClose(),o.onClose()})),e(qD,((e,t,o,n)=>{t.onCancel(e),od(n,WD)})),ud(XD,((e,o)=>t.onUnblock())),ud(KD,((e,o)=>t.onBlock(o.event)))],DH=(e,t,o)=>{const n=(t,o)=>ud(t,((t,n)=>{r(t,((r,i)=>{o(e(),r,n.event,t)}))})),r=(e,t)=>{Jb.getState(e).get().each((o=>{t(o.internalDialog,e)}))};return[...PH(n,t),n(YD,((e,t)=>t.onSubmit(e))),n(ZD,((e,t,o)=>{t.onChange(e,{name:o.name})})),n(GD,((e,t,n,r)=>{const i=()=>r.getSystem().isConnected()?$h.focusIn(r):void 0,s=e=>Yo(e,"disabled")||Go(e,"aria-disabled").exists((e=>"true"===e)),a=wo(r.element),l=Bo(a);t.onAction(e,{name:n.name,value:n.value}),Bo(a).fold(i,(e=>{s(e)||l.exists((t=>yt(e,t)&&s(t)))?i():o().toOptional().filter((t=>!yt(t.element,e))).each(i)}))})),n(JD,((e,t,o)=>{t.onTabChange(e,{newTabName:o.name,oldTabName:o.oldName})})),xd((t=>{const o=e();Rf.setValue(t,o.getData())}))]},LH=(e,t)=>{const o=t.map((e=>e.footerButtons)).getOr([]),n=H(o,(e=>"start"===e.align)),r=(e,t)=>Vg.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${e}`]},components:z(t,(e=>e.memento.asSpec()))});return[r("start",n.pass),r("end",n.fail)]},RH=(e,t,o)=>({dom:ty('<div class="tox-dialog__footer"></div>'),components:[],behaviours:Od([Jb.config({channel:`${jL}-${t}`,initialData:e,updateState:(e,t)=>{const n=z(t.buttons,(e=>{const t=oy(((e,t)=>GR(e,e.type,t))(e,o));return{name:e.name,align:e.align,memento:t}}));return A.some({lookupByName:t=>((e,t,o)=>Z(t,(e=>e.name===o)).bind((t=>t.memento.getOpt(e))))(e,n,t),footerButtons:n})},renderComponents:LH})])}),NH=(e,t,o)=>tw.parts.footer(RH(e,t,o)),IH=(e,t)=>{if(e.getRoot().getSystem().isConnected()){const o=mp.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper());return Ex.getField(o,t).orThunk((()=>{const o=e.getFooter().bind((e=>Jb.getState(e).get()));return o.bind((e=>e.lookupByName(t)))}))}return A.none()},BH=(e,t,o)=>{const n=t=>{const o=e.getRoot();o.getSystem().isConnected()&&t(o)},r={getData:()=>{const t=e.getRoot(),n=t.getSystem().isConnected()?e.getFormWrapper():t;return{...Rf.getValue(n),...le(o,(e=>e.get()))}},setData:t=>{n((n=>{const i=r.getData(),s=Fe(i,t),a=((e,t)=>{const o=e.getRoot();return Jb.getState(o).get().map((e=>ji(Hi("data",e.dataValidator,t)))).getOr(t)})(e,s),l=e.getFormWrapper();Rf.setValue(l,a),ae(o,((e,t)=>{be(s,t)&&e.set(s[t])}))}))},setEnabled:(t,o)=>{IH(e,t).each(o?Pp.enable:Pp.disable)},focus:t=>{IH(e,t).each(Fd.focus)},block:e=>{if(!i(e))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n((t=>{nd(t,KD,{message:e})}))},unblock:()=>{n((e=>{od(e,XD)}))},showTab:t=>{n((o=>{const n=e.getBody();Jb.getState(n).get().exists((e=>e.isTabPanel()))&&mp.getCurrent(n).each((e=>{ES.showTab(e,t)}))}))},redial:i=>{n((n=>{const s=e.getId(),a=t(i),l=AH(a.internalDialog.buttons,o);n.getSystem().broadcastOn([`${zL}-${s}`],a),n.getSystem().broadcastOn([`${FL}-${s}`],a.internalDialog),n.getSystem().broadcastOn([`${HL}-${s}`],a.internalDialog),n.getSystem().broadcastOn([`${jL}-${s}`],{...a.internalDialog,buttons:l}),r.setData(a.initialData)}))},close:()=>{n((e=>{od(e,WD)}))},toggleFullscreen:e.toggleFullscreen};return r},zH=(e,t,o)=>{const n=Be("dialog"),r=e.internalDialog,i=yH(r.title,n,o),s=xe(r.size),a=kH(s.get()).toArray(),l=((e,t,o,n)=>{const r=aH(e,t,A.none(),o,!1,n);return tw.parts.body(r)})({body:r.body,initialData:r.initialData},n,o,(e=>IH(g,e))),c=AH(r.buttons),d=MH(c),u=$e(0!==c.length,NH({buttons:c},n,o)),h=DH((()=>f),wH((()=>p),o.shared.providers,t),o.shared.getSink),m={id:n,header:i,body:l,footer:u,extraClasses:a,extraBehaviours:[Jb.config({channel:`${zL}-${n}`,updateState:(e,t)=>(s.set(t.internalDialog.size),EH(t.internalDialog.size,e),A.some(t)),initialData:e})],extraStyles:{}},p=OH(m,h,o),g={getId:x(n),getRoot:x(p),getBody:()=>tw.getBody(p),getFooter:()=>tw.getFooter(p),getFormWrapper:()=>{const e=tw.getBody(p);return mp.getCurrent(e).getOr(e)},toggleFullscreen:()=>{TH(p,s.get())}},f=BH(g,t.redial,d);return{dialog:p,instanceApi:f}},FH=(e,t,o,n=!1,r)=>{const i=Be("dialog"),s=Be("dialog-label"),a=Be("dialog-content"),l=e.internalDialog,c=xe(l.size),d=kH(c.get()).toArray(),u=oy(((e,t,o,n)=>Vg.sketch({dom:ty('<div class="tox-dialog__header"></div>'),components:[bH(e,t,A.some(o),n),vH(),fH(n)],containerBehaviours:Od([hf.config({mode:"mouse",blockerClass:"blocker",getTarget:e=>Kn(e,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"},onDrag:(e,t)=>{e.getSystem().broadcastOn([sy()],{target:t})}})])}))({title:l.title,draggable:!0},i,s,o.shared.providers)),h=oy(((e,t,o,n,r,i)=>aH(e,t,A.some(o),n,r,i))({body:l.body,initialData:l.initialData},i,a,o,n,(e=>IH(y,e)))),m=AH(l.buttons),p=MH(m),g=$e(0!==m.length,oy(((e,t,o)=>RH(e,t,o))({buttons:m},i,o))),f=DH((()=>w),{onBlock:e=>{dp.block(v,((t,n)=>{const r=u.getOpt(v).map((e=>Sn(e.element)));return xH(e.message,n,o.shared.providers,r)}))},onUnblock:()=>{dp.unblock(v)},onClose:()=>t.closeWindow()},o.shared.getSink),b=Gt().os,v=sp({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline",...d],attributes:{role:"dialog",...b.isMacOS()?{"aria-label":l.title}:{"aria-labelledby":s}}},eventOrder:{[Xs()]:[Jb.name(),Gb.name()],[Js()]:["execute-on-form"],[ca()]:["reflecting","execute-on-form"]},behaviours:Od([$h.config({mode:"cyclic",onEscape:e=>(od(e,WD),A.some(!0)),useTabstopAt:e=>!BL(e)&&("button"!==Jt(e)||"disabled"!==qo(e,"disabled")),firstTabstop:1}),Jb.config({channel:`${zL}-${i}`,updateState:(e,t)=>(c.set(t.internalDialog.size),EH(t.internalDialog.size,e),r(),A.some(t)),initialData:e}),Fd.config({}),Rd("execute-on-form",f.concat([vd(Ns(),((e,t)=>{$h.focusIn(e)})),ud(ma(),((e,t)=>{e.getSystem().broadcastOn([UL],{newFocus:t.event.newFocus})}))])),dp.config({getRoot:()=>A.some(v)}),Cm.config({}),hL({})]),components:[u.asSpec(),h.asSpec(),...g.map((e=>e.asSpec())).toArray()]}),y={getId:x(i),getRoot:x(v),getFooter:()=>g.map((e=>e.get(v))),getBody:()=>h.get(v),getFormWrapper:()=>{const e=h.get(v);return mp.getCurrent(e).getOr(e)},toggleFullscreen:()=>{TH(v,c.get())}},w=BH(y,t.redial,p);return{dialog:v,instanceApi:w}};var HH=tinymce.util.Tools.resolve("tinymce.util.URI");const jH=["insertContent","setContent","execCommand","close","block","unblock"],VH=e=>s(e)&&-1!==jH.indexOf(e.mceAction),UH=(e,t,o,n)=>{const r=Be("dialog"),a=yH(e.title,r,n),l=(e=>{const t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[RL(A.none(),{dom:{tag:"iframe",attributes:{src:e.url}},behaviours:Od([Lv.config({}),Fd.config({})])})]}],behaviours:Od([$h.config({mode:"acyclic",useTabstopAt:C(BL)})])};return tw.parts.body(t)})(e),c=e.buttons.bind((e=>0===e.length?A.none():A.some(NH({buttons:e},r,n)))),u=((e,t)=>{const o=(t,o)=>ud(t,((t,r)=>{n(t,((n,i)=>{o(e(),n,r.event,t)}))})),n=(e,t)=>{Jb.getState(e).get().each((o=>{t(o,e)}))};return[...PH(o,t),o(GD,((e,t,o)=>{t.onAction(e,{name:o.name})}))]})((()=>x),wH((()=>y),n.shared.providers,t)),h={...e.height.fold((()=>({})),(e=>({height:e+"px","max-height":e+"px"}))),...e.width.fold((()=>({})),(e=>({width:e+"px","max-width":e+"px"})))},p=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[],g=new HH(e.url,{base_uri:new HH(window.location.href)}),f=`${g.protocol}://${g.host}${g.port?":"+g.port:""}`,b=Ge(),v=[Jb.config({channel:`${zL}-${r}`,updateState:(e,t)=>A.some(t),initialData:e}),Rd("messages",[yd((()=>{const t=Mo(at.fromDom(window),"message",(t=>{if(g.isSameOrigin(new HH(t.raw.origin))){const n=t.raw.data;VH(n)?((e,t,o)=>{switch(o.mceAction){case"insertContent":e.insertContent(o.content);break;case"setContent":e.setContent(o.content);break;case"execCommand":const n=!!d(o.ui)&&o.ui;e.execCommand(o.cmd,n,o.value);break;case"close":t.close();break;case"block":t.block(o.message);break;case"unblock":t.unblock()}})(o,x,n):(e=>!VH(e)&&s(e)&&be(e,"mceAction"))(n)&&e.onMessage(x,n)}}));b.set(t)})),xd(b.clear)]),Gb.config({channels:{[VL]:{onReceive:(e,t)=>{Yn(e.element,"iframe").each((e=>{const o=e.dom.contentWindow;m(o)&&o.postMessage(t,f)}))}}}})],y=OH({id:r,header:a,body:l,footer:c,extraClasses:p,extraBehaviours:v,extraStyles:h},u,n),x=(e=>{const t=t=>{e.getSystem().isConnected()&&t(e)};return{block:e=>{if(!i(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t((t=>{nd(t,KD,{message:e})}))},unblock:()=>{t((e=>{od(e,XD)}))},close:()=>{t((e=>{od(e,WD)}))},sendMessage:e=>{t((t=>{t.getSystem().broadcastOn([VL],e)}))}}})(y);return{dialog:y,instanceApi:x}},ZH=(e,t)=>ji(Hi("data",t,e)),$H=e=>fr(e,".tox-alert-dialog")||fr(e,".tox-confirm-dialog"),WH=(e,t,o,n)=>t&&o?[]:[cg.config({contextual:{lazyContext:()=>A.some(Fr(at.fromDom(e.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition",onHide:n},modes:["top"],lazyViewport:t=>XC(e,t.element).map((e=>({bounds:JC(e),optScrollEnv:A.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Rn(e.element).top})}))).getOrThunk((()=>({bounds:Vr(),optScrollEnv:A.none()})))})],qH=e=>{const t=e.editor,o=UC(t),n=(e=>{const t=e.shared;return{open:(o,n)=>{const r=()=>{tw.hide(l),n()},i=oy(GR({context:"any",name:"close-alert",text:"OK",primary:!0,buttonType:A.some("primary"),align:"end",enabled:!0,icon:A.none()},"cancel",e)),s=uH(),a=dH(r,t.providers),l=sp(gH({lazySink:()=>t.getSink(),header:cH(s,a),body:hH(o,t.providers),footer:A.some(mH(pH([],[i.asSpec()]))),onEscape:r,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[ud(qD,r)],eventOrder:{}}));tw.show(l);const c=i.get(l);Fd.focus(c)}}})(e.backstages.dialog),r=(e=>{const t=e.shared;return{open:(o,n)=>{const r=e=>{tw.hide(c),n(e)},i=oy(GR({context:"any",name:"yes",text:"Yes",primary:!0,buttonType:A.some("primary"),align:"end",enabled:!0,icon:A.none()},"submit",e)),s=GR({context:"any",name:"no",text:"No",primary:!1,buttonType:A.some("secondary"),align:"end",enabled:!0,icon:A.none()},"cancel",e),a=uH(),l=dH((()=>r(!1)),t.providers),c=sp(gH({lazySink:()=>t.getSink(),header:cH(a,l),body:hH(o,t.providers),footer:A.some(mH(pH([],[s,i.asSpec()]))),onEscape:()=>r(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[ud(qD,(()=>r(!1))),ud(YD,(()=>r(!0)))],eventOrder:{}}));tw.show(c);const d=i.get(c);Fd.focus(d)}}})(e.backstages.dialog),i=(o,n)=>xA.openUrl((o=>{const r=UH(o,{closeWindow:()=>{tw.hide(r.dialog),n(r.instanceApi)}},t,e.backstages.dialog);return tw.show(r.dialog),r.instanceApi}),o),s=(t,o)=>xA.open(((t,n,r)=>{const i=n,s=zH({dataValidator:r,initialData:i,internalDialog:t},{redial:xA.redial,closeWindow:()=>{tw.hide(s.dialog),o(s.instanceApi)}},e.backstages.dialog);return tw.show(s.dialog),s.instanceApi.setData(i),s.instanceApi}),t),a=(n,r,i,s)=>xA.open(((n,a,l)=>{const c=ZH(a,l),d=Ye(),u=e.backstages.popup.shared.header.isPositionedAtTop(),h=()=>d.on((e=>{$x.reposition(e),o&&u||cg.refresh(e)})),m=FH({dataValidator:l,initialData:c,internalDialog:n},{redial:xA.redial,closeWindow:()=>{d.on($x.hide),t.off("ResizeEditor",h),t.off("ScrollWindow",p),d.clear(),i(m.instanceApi)}},e.backstages.popup,s.ariaAttrs,h),p=()=>m.dialog.getSystem().broadcastOn([sy()],{target:m.dialog.element}),g=sp($x.sketch({lazySink:e.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:s.persistent?{event:"doNotDismissYet"}:{},...u?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Od([Rd("window-manager-inline-events",[ud(ua(),((e,t)=>{od(m.dialog,qD)}))]),...WH(t,o,u,(()=>m.dialog.getSystem().broadcastOn([iy()],{target:m.dialog.element})))]),isExtraPart:(e,t)=>$H(t)}));d.set(g);return $x.showWithinBounds(g,ap(m.dialog),{anchor:r},(()=>{const e=t.inline?an():at.fromDom(t.getContainer()),o=Fr(e);return A.some(o)})),o&&u||(cg.refresh(g),t.on("ResizeEditor",h)),t.on("ScrollWindow",p),m.instanceApi.setData(c),$h.focusIn(m.dialog),m.instanceApi}),n),l=(o,n,r,i)=>xA.open(((o,s,a)=>{const l=ZH(s,a),c=Ye(),d=e.backstages.popup.shared.header.isPositionedAtTop(),u=()=>c.on((e=>{$x.reposition(e),cg.refresh(e)})),h=FH({dataValidator:a,initialData:l,internalDialog:o},{redial:xA.redial,closeWindow:()=>{c.on($x.hide),t.off("ResizeEditor ScrollWindow ElementScroll",u),c.clear(),r(h.instanceApi)}},e.backstages.popup,i.ariaAttrs,u),m=sp($x.sketch({lazySink:e.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:i.persistent?{event:"doNotDismissYet"}:{},...d?{}:{fireRepositionEventInstead:{}},inlineBehaviours:Od([Rd("window-manager-inline-events",[ud(ua(),((e,t)=>{od(h.dialog,qD)}))]),cg.config({contextual:{lazyContext:()=>A.some(Fr(at.fromDom(t.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:e=>XC(t,e.element).map((e=>({bounds:JC(e),optScrollEnv:A.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Rn(e.element).top})}))).getOrThunk((()=>({bounds:Vr(),optScrollEnv:A.none()})))})]),isExtraPart:(e,t)=>$H(t)}));c.set(m);return $x.showWithinBounds(m,ap(h.dialog),{anchor:n},(()=>e.backstages.popup.shared.getSink().toOptional().bind((e=>{const o=XC(t,e.element).map((e=>JC(e))).getOr(Vr()),n=Fr(at.fromDom(t.getContentAreaContainer())),r=jr(n,o);return A.some(zr(r.x,r.y,r.width,r.height-15))})))),cg.refresh(m),t.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",u),h.instanceApi.setData(l),$h.focusIn(h.dialog),h.instanceApi}),o);return{open:(t,o,n)=>{if(!u(o)){if("toolbar"===o.inline)return a(t,e.backstages.popup.shared.anchors.inlineDialog(),n,o);if("bottom"===o.inline)return l(t,e.backstages.popup.shared.anchors.inlineBottomDialog(),n,o);if("cursor"===o.inline)return a(t,e.backstages.popup.shared.anchors.cursor(),n,o)}return s(t,n)},openUrl:(e,t)=>i(e,t),alert:(e,t)=>{n.open(e,t)},close:e=>{e.close()},confirm:(e,t)=>{r.open(e,t)}}},GH=e=>{ZS(e),(e=>{const t=e.options.register,o=e=>{return f(e,i)?{value:(t=e,jP(t.map(((e,t)=>t%2==0?"#"+SP(e).value:e)))),valid:!0}:{valid:!1,message:"Must be an array of strings."};var t},n=e=>g(e)&&e>0?{value:e,valid:!0}:{valid:!1,message:"Must be a positive number."};t("color_map",{processor:o,default:["#BFEDD2","Light Green","#FBEEB8","Light Yellow","#F8CAC6","Light Red","#ECCAFA","Light Purple","#C2E0F4","Light Blue","#2DC26B","Green","#F1C40F","Yellow","#E03E2D","Red","#B96AD9","Purple","#3598DB","Blue","#169179","Dark Turquoise","#E67E23","Orange","#BA372A","Dark Red","#843FA1","Dark Purple","#236FA1","Dark Blue","#ECF0F1","Light Gray","#CED4D9","Medium Gray","#95A5A6","Gray","#7E8C8D","Dark Gray","#34495E","Navy Blue","#000000","Black","#ffffff","White"]}),t("color_map_raw",{processor:e=>f(e,i)?{value:jP(e),valid:!0}:{valid:!1,message:"Must be an array of strings."}}),t("color_map_background",{processor:o}),t("color_map_foreground",{processor:o}),t("color_cols",{processor:n,default:$P(e)}),t("color_cols_foreground",{processor:n,default:WP(e,FP)}),t("color_cols_background",{processor:n,default:WP(e,HP)}),t("custom_colors",{processor:"boolean",default:!0}),t("color_default_foreground",{processor:"string",default:UP}),t("color_default_background",{processor:"string",default:UP})})(e),(e=>{const t=e.options.register;t("contextmenu_avoid_overlap",{processor:"string",default:""}),t("contextmenu_never_use_native",{processor:"boolean",default:!1}),t("contextmenu",{processor:e=>!1===e?{value:[],valid:!0}:i(e)||f(e,i)?{value:bF(e),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})})(e)};BS.add("silver",(e=>{GH(e);let t=()=>Vr();const{dialogs:o,popups:n,renderUI:r}=XF(e,{getPopupSinkBounds:()=>t()});zD(e,n.backstage.shared);const i=qH({editor:e,backstages:{popup:n.backstage,dialog:o.backstage}}),s=Ye();return{renderUI:()=>{const o=r();return XC(e,n.getMothership().element).each((e=>{t=()=>JC(e)})),o},getWindowManagerImpl:x(i),getNotificationManagerImpl:()=>bE(e,{backstage:n.backstage},n.getMothership(),s),getPromotionElement:()=>Yn(at.fromDom(e.getContainer()),".tox-promotion").map((e=>e.dom)).getOrNull()}}))}()},47575:e=>{!function(){"use strict";var t=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},o=function(e){return{eq:e}},n=o((function(e,t){return e===t})),r=function(e){return o((function(t,o){if(t.length!==o.length)return!1;for(var n=t.length,r=0;r<n;r++)if(!e.eq(t[r],o[r]))return!1;return!0}))},i=function(e,t){return function(e,t){return o((function(o,n){return e.eq(t(o),t(n))}))}(r(e),(function(e){return function(e,t){return Array.prototype.slice.call(e).sort(t)}(e,t)}))},s=function(e){return o((function(t,o){var r=Object.keys(t),s=Object.keys(o);if(!i(n).eq(r,s))return!1;for(var a=r.length,l=0;l<a;l++){var c=r[l];if(!e.eq(t[c],o[c]))return!1}return!0}))},a=o((function(e,o){if(e===o)return!0;var n=t(e);return n===t(o)&&(function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)}(n)?e===o:"array"===n?r(a).eq(e,o):"object"===n&&s(a).eq(e,o))}));const l=Object.getPrototypeOf,c=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},d=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&c(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,u=e=>t=>typeof t===e,h=e=>t=>e===t,m=(e,t)=>g(e)&&c(e,t,((e,t)=>l(e)===t)),p=d("string"),g=d("object"),f=e=>m(e,Object),b=d("array"),v=h(null),y=u("boolean"),x=h(void 0),w=e=>null==e,_=e=>!w(e),S=u("function"),C=u("number"),k=(e,t)=>{if(b(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1},E=()=>{},T=(e,t)=>(...o)=>e(t.apply(null,o)),O=(e,t)=>o=>e(t(o)),A=e=>()=>e,M=e=>e,P=(e,t)=>e===t;function D(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const L=e=>t=>!e(t),R=e=>()=>{throw new Error(e)},N=e=>e(),I=e=>{e()},B=A(!1),z=A(!0);class F{constructor(e,t){this.tag=e,this.value=t}static some(e){return new F(!0,e)}static none(){return F.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?F.some(e(this.value)):F.none()}bind(e){return this.tag?e(this.value):F.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:F.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return _(e)?F.some(e):F.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}F.singletonNone=new F(!1);const H=Array.prototype.slice,j=Array.prototype.indexOf,V=Array.prototype.push,U=(e,t)=>j.call(e,t),Z=(e,t)=>U(e,t)>-1,$=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return!0}return!1},W=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},q=(e,t)=>{for(let o=0,n=e.length;o<n;o++){t(e[o],o)}},G=(e,t)=>{for(let o=e.length-1;o>=0;o--){t(e[o],o)}},Y=(e,t)=>{const o=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];(t(i,r)?o:n).push(i)}return{pass:o,fail:n}},K=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},X=(e,t,o)=>(G(e,((e,n)=>{o=t(o,e,n)})),o),J=(e,t,o)=>(q(e,((e,n)=>{o=t(o,e,n)})),o),Q=(e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return F.some(r);if(o(r,n))break}return F.none()},ee=(e,t)=>Q(e,t,B),te=(e,t)=>{for(let o=0,n=e.length;o<n;o++){if(t(e[o],o))return F.some(o)}return F.none()},oe=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!b(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);V.apply(t,e[o])}return t},ne=(e,t)=>oe(W(e,t)),re=(e,t)=>{for(let o=0,n=e.length;o<n;++o){if(!0!==t(e[o],o))return!1}return!0},ie=e=>{const t=H.call(e,0);return t.reverse(),t},se=(e,t)=>K(e,(e=>!Z(t,e))),ae=(e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o},le=(e,t)=>{const o=H.call(e,0);return o.sort(t),o},ce=(e,t)=>t>=0&&t<e.length?F.some(e[t]):F.none(),de=e=>ce(e,0),ue=e=>ce(e,e.length-1),he=S(Array.from)?Array.from:e=>H.call(e),me=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return F.none()},pe=(e,t)=>{const o=[],n=S(t)?e=>$(o,(o=>t(o,e))):e=>Z(o,e);for(let t=0,r=e.length;t<r;t++){const r=e[t];n(r)||o.push(r)}return o},ge=Object.keys,fe=Object.hasOwnProperty,be=(e,t)=>{const o=ge(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},ve=(e,t)=>ye(e,((e,o)=>({k:o,v:t(e,o)}))),ye=(e,t)=>{const o={};return be(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o},xe=e=>(t,o)=>{e[o]=t},we=(e,t,o,n)=>{be(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))},_e=(e,t)=>{const o={};return we(e,t,xe(o),E),o},Se=(e,t)=>{const o=[];return be(e,((e,n)=>{o.push(t(e,n))})),o},Ce=e=>Se(e,M),ke=(e,t)=>Ee(e,t)?F.from(e[t]):F.none(),Ee=(e,t)=>fe.call(e,t),Te=(e,t)=>Ee(e,t)&&void 0!==e[t]&&null!==e[t],Oe=e=>{if(!b(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return q(e,((n,r)=>{const i=ge(n);if(1!==i.length)throw new Error("one and only one name per case");const s=i[0],a=n[s];if(void 0!==o[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!b(a))throw new Error("case arguments must be an array");t.push(s),o[s]=(...o)=>{const n=o.length;if(n!==a.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+a.length+" ("+a+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const n=ge(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!re(t,(e=>Z(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:s,params:o})}}}})),o},Ae=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Me=e=>{const t=t=>t(e),o=A(e),n=()=>r,r={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:z,isError:B,map:t=>De.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>F.some(e)};return r},Pe=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:B,isError:z,map:t,mapError:t=>De.error(t(e)),bind:t,exists:B,forall:z,getOr:M,or:M,getOrThunk:N,orThunk:N,getOrDie:R(String(e)),each:E,toOptional:F.none};return o},De={value:Me,error:Pe,fromOption:(e,t)=>e.fold((()=>Pe(t)),Me)},Le="undefined"!=typeof window?window:Function("return this;")(),Re=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let Ne=0;const Ie=e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Re());return Ne++,e+"_"+o+Ne+String(t)},Be=e=>(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const o={};for(let n=0;n<t.length;n++){const r=t[n];for(const t in r)Ee(r,t)&&(o[t]=e(o[t],r[t]))}return o},ze=Be(((e,t)=>f(e)&&f(t)?ze(e,t):t)),Fe=Be(((e,t)=>t)),He=(e,t,o=P)=>e.exists((e=>o(e,t))),je=(e,t,o=P)=>Ve(e,t,o).getOr(e.isNone()&&t.isNone()),Ve=(e,t,o)=>e.isSome()&&t.isSome()?F.some(o(e.getOrDie(),t.getOrDie())):F.none(),Ue=(e,t)=>e?F.some(t):F.none(),Ze=(e,t)=>((e,t)=>{let o=null!=t?t:Le;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t);Oe([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const $e=e=>{const t=Ae(F.none()),o=()=>t.get().each((e=>clearInterval(e)));return{clear:()=>{o(),t.set(F.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:n=>{o(),t.set(F.some(setInterval(n,e)))}}},We=()=>{const e=(e=>{const t=Ae(F.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(F.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(F.some(e))}}})(E);return{...e,on:t=>e.get().each(t)}},qe=(e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,Ge=(e,t)=>Ke(e,t)?((e,t)=>e.substring(t))(e,t.length):e,Ye=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!x(n)||r+t.length<=n)},Ke=(e,t)=>qe(e,t,0),Xe=(e,t)=>qe(e,t,e.length-t.length),Je=e=>t=>t.replace(e,""),Qe=Je(/^\s+|\s+$/g),et=Je(/^\s+/g),tt=Je(/\s+$/g),ot=e=>e.length>0,nt=e=>!ot(e),rt=(e,t=10)=>{const o=parseInt(e,t);return isNaN(o)?F.none():F.some(o)},it=(e,t)=>{let o=null;return{cancel:()=>{v(o)||(clearTimeout(o),o=null)},throttle:(...n)=>{v(o)&&(o=setTimeout((()=>{o=null,e.apply(null,n)}),t))}}},st=(e,t)=>{let o=null;const n=()=>{v(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...r)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,r)}),t)}}},at=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},lt="\ufeff",ct=" ",dt=e=>e===lt,ut=e=>{const t={};return q(e,(e=>{t[e]={}})),ge(t)},ht=e=>void 0!==e.length,mt=Array.isArray,pt=(e,t,o)=>{if(!e)return!1;if(o=o||e,ht(e)){for(let n=0,r=e.length;n<r;n++)if(!1===t.call(o,e[n],n,e))return!1}else for(const n in e)if(Ee(e,n)&&!1===t.call(o,e[n],n,e))return!1;return!0},gt=(e,t)=>{const o=[];return pt(e,((n,r)=>{o.push(t(n,r,e))})),o},ft=(e,t)=>{const o=[];return pt(e,((n,r)=>{t&&!t(n,r,e)||o.push(n)})),o},bt=(e,t,o,n)=>{let r=x(o)?e[0]:o;for(let o=0;o<e.length;o++)r=t.call(n,r,e[o],o);return r},vt=(e,t,o)=>{for(let n=0,r=e.length;n<r;n++)if(t.call(o,e[n],n,e))return n;return-1},yt=e=>e[e.length-1],xt=()=>wt(0,0),wt=(e,t)=>({major:e,minor:t}),_t={nu:wt,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?xt():((e,t)=>{const o=((e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n=e=>Number(t.replace(o,"$"+e));return wt(n(1),n(2))})(e,o)},unknown:xt},St=(e,t)=>{const o=String(t).toLowerCase();return ee(e,(e=>e.search(o)))},Ct=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,kt=e=>t=>Ye(t,e),Et=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>Ye(e,"edge/")&&Ye(e,"chrome")&&Ye(e,"safari")&&Ye(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ct],search:e=>Ye(e,"chrome")&&!Ye(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>Ye(e,"msie")||Ye(e,"trident")},{name:"Opera",versionRegexes:[Ct,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:kt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:kt("firefox")},{name:"Safari",versionRegexes:[Ct,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Ye(e,"safari")||Ye(e,"mobile/"))&&Ye(e,"applewebkit")}],Tt=[{name:"Windows",search:kt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>Ye(e,"iphone")||Ye(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:kt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:kt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:kt("linux"),versionRegexes:[]},{name:"Solaris",search:kt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:kt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:kt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ot={browsers:A(Et),oses:A(Tt)},At="Edge",Mt="Chromium",Pt="Opera",Dt="Firefox",Lt="Safari",Rt=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(At),isChromium:n(Mt),isIE:n("IE"),isOpera:n(Pt),isFirefox:n(Dt),isSafari:n(Lt)}},Nt={unknown:()=>Rt({current:void 0,version:_t.unknown()}),nu:Rt,edge:A(At),chromium:A(Mt),ie:A("IE"),opera:A(Pt),firefox:A(Dt),safari:A(Lt)},It="Windows",Bt="Android",zt="Linux",Ft="macOS",Ht="Solaris",jt="FreeBSD",Vt="ChromeOS",Ut=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(It),isiOS:n("iOS"),isAndroid:n(Bt),isMacOS:n(Ft),isLinux:n(zt),isSolaris:n(Ht),isFreeBSD:n(jt),isChromeOS:n(Vt)}},Zt={unknown:()=>Ut({current:void 0,version:_t.unknown()}),nu:Ut,windows:A(It),ios:A("iOS"),android:A(Bt),linux:A(zt),macos:A(Ft),solaris:A(Ht),freebsd:A(jt),chromeos:A(Vt)},$t=(e,t,o)=>{const n=Ot.browsers(),r=Ot.oses(),i=t.bind((e=>((e,t)=>me(t.brands,(t=>{const o=t.brand.toLowerCase();return ee(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:_t.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>St(e,t).map((e=>{const o=_t.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(Nt.unknown,Nt.nu),s=((e,t)=>St(e,t).map((e=>{const o=_t.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(Zt.unknown,Zt.nu),a=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),i=e.isiOS()&&!r,s=e.isiOS()||e.isAndroid(),a=s||n("(pointer:coarse)"),l=r||!i&&s&&n("(min-device-width:768px)"),c=i||s&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:A(r),isiPhone:A(i),isTablet:A(l),isPhone:A(c),isTouch:A(a),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:A(d),isDesktop:A(u)}})(s,i,e,o);return{browser:i,os:s,deviceType:a}},Wt=e=>window.matchMedia(e).matches;let qt=at((()=>$t(window.navigator.userAgent,F.from(window.navigator.userAgentData),Wt)));const Gt=()=>qt(),Yt=(e,t)=>{const o=((e,t)=>Ze(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o},Kt=Object.getPrototypeOf,Xt=e=>{const t=Ze("ownerDocument.defaultView",e);return g(e)&&((e=>Yt("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Kt(e).constructor.name))},Jt=window.navigator.userAgent,Qt=Gt(),eo=Qt.browser,to=Qt.os,oo=Qt.deviceType,no=-1!==Jt.indexOf("Windows Phone"),ro={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:eo.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!eo.isIE(),windowsPhone:no,browser:{current:eo.current,version:eo.version,isChromium:eo.isChromium,isEdge:eo.isEdge,isFirefox:eo.isFirefox,isIE:eo.isIE,isOpera:eo.isOpera,isSafari:eo.isSafari},os:{current:to.current,version:to.version,isAndroid:to.isAndroid,isChromeOS:to.isChromeOS,isFreeBSD:to.isFreeBSD,isiOS:to.isiOS,isLinux:to.isLinux,isMacOS:to.isMacOS,isSolaris:to.isSolaris,isWindows:to.isWindows},deviceType:{isDesktop:oo.isDesktop,isiPad:oo.isiPad,isiPhone:oo.isiPhone,isPhone:oo.isPhone,isTablet:oo.isTablet,isTouch:oo.isTouch,isWebView:oo.isWebView}},io=/^\s*|\s*$/g,so=e=>w(e)?"":(""+e).replace(io,""),ao=function(e,t,o,n){n=n||this,e&&(o&&(e=e[o]),pt(e,((e,r)=>!1!==t.call(n,e,r,o)&&(ao(e,t,o,n),!0))))},lo={trim:so,isArray:mt,is:(e,t)=>t?!("array"!==t||!mt(e))||typeof e===t:void 0!==e,toArray:e=>{if(mt(e))return e;{const t=[];for(let o=0,n=e.length;o<n;o++)t[o]=e[o];return t}},makeMap:(e,t,o={})=>{const n=p(e)?e.split(t||","):e||[];let r=n.length;for(;r--;)o[n[r]]={};return o},each:pt,map:gt,grep:ft,inArray:(e,t)=>{if(e)for(let o=0,n=e.length;o<n;o++)if(e[o]===t)return o;return-1},hasOwn:Ee,extend:(e,...t)=>{for(let o=0;o<t.length;o++){const n=t[o];for(const t in n)if(Ee(n,t)){const o=n[t];void 0!==o&&(e[t]=o)}}return e},walk:ao,resolve:(e,t=window)=>{const o=e.split(".");for(let e=0,n=o.length;e<n&&(t=t[o[e]]);e++);return t},explode:(e,t)=>b(e)?e:""===e?[]:gt(e.split(t||","),so),_addCacheSuffix:e=>{const t=ro.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},co=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},uo={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return co(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return co(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return co(o)},fromDom:co,fromPoint:(e,t,o)=>F.from(e.dom.elementFromPoint(t,o)).map(co)},ho=(e,t,o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},mo=(e,t,o,n,r)=>{const i=e.document.createRange();return i.setStart(t.dom,o),i.setEnd(n.dom,r),i},po=Oe([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),go=(e,t,o)=>t(uo.fromDom(o.startContainer),o.startOffset,uo.fromDom(o.endContainer),o.endOffset),fo=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:A(e),rtl:F.none}),relative:(t,o)=>({ltr:at((()=>ho(e,t,o))),rtl:at((()=>F.some(ho(e,o,t))))}),exact:(t,o,n,r)=>({ltr:at((()=>mo(e,t,o,n,r))),rtl:at((()=>F.some(mo(e,n,r,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();if(o.collapsed)return t.rtl().filter((e=>!1===e.collapsed)).map((e=>po.rtl(uo.fromDom(e.endContainer),e.endOffset,uo.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>go(0,po.ltr,o)));return go(0,po.ltr,o)})(0,o)};po.ltr,po.rtl;const bo=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},vo=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,yo=(e,t)=>e.dom===t.dom,xo=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},wo=(e,t)=>{const o=[],n=e=>(o.push(e),t(e));let r=t(e);do{r=r.bind(n)}while(r.isSome());return o},_o=e=>e.dom.nodeName.toLowerCase(),So=e=>e.dom.nodeType,Co=e=>t=>So(t)===e,ko=e=>Eo(e)&&Xt(e.dom),Eo=Co(1),To=Co(3),Oo=Co(9),Ao=Co(11),Mo=e=>t=>Eo(t)&&_o(t)===e,Po=e=>uo.fromDom(e.dom.ownerDocument),Do=e=>Oo(e)?e:Po(e),Lo=e=>uo.fromDom(Do(e).dom.defaultView),Ro=e=>F.from(e.dom.parentNode).map(uo.fromDom),No=e=>F.from(e.dom.parentElement).map(uo.fromDom),Io=(e,t)=>{const o=S(t)?t:B;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=uo.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r},Bo=e=>F.from(e.dom.previousSibling).map(uo.fromDom),zo=e=>F.from(e.dom.nextSibling).map(uo.fromDom),Fo=e=>ie(wo(e,Bo)),Ho=e=>wo(e,zo),jo=e=>W(e.dom.childNodes,uo.fromDom),Vo=(e,t)=>{const o=e.dom.childNodes;return F.from(o[t]).map(uo.fromDom)},Uo=e=>Vo(e,0),Zo=e=>Vo(e,e.dom.childNodes.length-1),$o=e=>e.dom.childNodes.length,Wo=e=>Ao(e)&&_(e.dom.host),qo=e=>uo.fromDom(e.dom.getRootNode()),Go=e=>Wo(e)?e:(e=>{const t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return uo.fromDom(t)})(Do(e)),Yo=e=>uo.fromDom(e.dom.host),Ko=e=>{if(_(e.target)){const t=uo.fromDom(e.target);if(Eo(t)&&Xo(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return de(t)}}return F.from(e.target)},Xo=e=>_(e.dom.shadowRoot),Jo=(e,t)=>o=>{e(o)&&t((e=>{const t=uo.fromDom(Ko(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=T(n,o);return((e,t,o,n,r,i,s)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:i,raw:s}))(t,e.clientX,e.clientY,o,n,r,e)})(o))},Qo=(e,t,o,n)=>((e,t,o,n,r)=>{const i=Jo(o,n);return e.dom.addEventListener(t,i,r),{unbind:D(en,e,t,i,r)}})(e,t,o,n,!1),en=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},tn=z,on=()=>uo.fromDom(document),nn=(e,t=!1)=>e.dom.focus({preventScroll:t}),rn=e=>{const t=qo(e).dom;return e.dom===t.activeElement},sn=(e=on())=>F.from(e.dom.activeElement).map(uo.fromDom),an=(e,t)=>{Ro(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},ln=(e,t)=>{zo(e).fold((()=>{Ro(e).each((e=>{dn(e,t)}))}),(e=>{an(e,t)}))},cn=(e,t)=>{Uo(e).fold((()=>{dn(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},dn=(e,t)=>{e.dom.appendChild(t.dom)},un=(e,t)=>{an(e,t),dn(t,e)},hn=(e,t)=>{q(t,(t=>{dn(e,t)}))},mn=(e,t,o)=>{if(!(p(o)||y(o)||C(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},pn=(e,t,o)=>{mn(e.dom,t,o)},gn=(e,t)=>{const o=e.dom;be(t,((e,t)=>{mn(o,t,e)}))},fn=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},bn=(e,t)=>F.from(fn(e,t)),vn=(e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute(t)},yn=(e,t)=>{e.dom.removeAttribute(t)},xn=e=>J(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),wn=e=>{e.dom.textContent="",q(jo(e),(e=>{_n(e)}))},_n=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Sn=e=>{const t=jo(e);var o,n;t.length>0&&(o=e,q(n=t,((e,t)=>{const r=0===t?o:n[t-1];ln(r,e)}))),_n(e)},Cn=(e,t)=>uo.fromDom(e.dom.cloneNode(t)),kn=e=>Cn(e,!1),En=e=>Cn(e,!0),Tn=(e,t)=>{const o=((e,t)=>{const o=uo.fromTag(t),n=xn(e);return gn(o,n),o})(e,t);ln(e,o);const n=jo(e);return hn(o,n),_n(e),o},On=e=>W(e,uo.fromDom),An=e=>e.dom.innerHTML,Mn=(e,t)=>{const o=Po(e).dom,n=uo.fromDom(o.createDocumentFragment()),r=((e,t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,jo(uo.fromDom(o))})(t,o);hn(n,r),wn(e),dn(e,n)},Pn=e=>void 0!==e.style&&S(e.style.getPropertyValue),Dn=e=>{const t=To(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=qo(e);return Wo(t)?F.some(t):F.none()})(uo.fromDom(t)).fold((()=>o.body.contains(t)),O(Dn,Yo))},Ln=(e,t,o)=>{if(!p(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Pn(e)&&e.style.setProperty(t,o)},Rn=(e,t,o)=>{const n=e.dom;Ln(n,t,o)},Nn=(e,t)=>{const o=e.dom;be(t,((e,t)=>{Ln(o,t,e)}))},In=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||Dn(e)?n:Bn(o,t)},Bn=(e,t)=>Pn(e)?e.style.getPropertyValue(t):"",zn=(e,t)=>{const o=e.dom,n=Bn(o,t);return F.from(n).filter((e=>e.length>0))},Fn=e=>{const t={},o=e.dom;if(Pn(o))for(let e=0;e<o.style.length;e++){const n=o.style.item(e);t[n]=o.style[n]}return t},Hn=(e,t)=>{((e,t)=>{Pn(e)&&e.style.removeProperty(t)})(e.dom,t),He(bn(e,"style").map(Qe),"")&&yn(e,"style")},jn=((e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=In(o,e);return parseFloat(t)||0}return n},n=(e,t)=>J(t,((t,o)=>{const n=In(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!C(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;Pn(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}})("height",(e=>{const t=e.dom;return Dn(e)?t.getBoundingClientRect().height:t.offsetHeight})),Vn=(e,t)=>({left:e,top:t,translate:(o,n)=>Vn(e+o,t+n)}),Un=Vn,Zn=(e,t)=>void 0!==e?e:void 0!==t?t:0,$n=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?Un(o.offsetLeft,o.offsetTop):Dn(e)?(e=>{const t=e.getBoundingClientRect();return Un(t.left,t.top)})(t):Un(0,0)},Wn=e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return Un(o,n)},qn=(e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollTo(e,t)},Gn=(e,t)=>{Gt().browser.isSafari()&&S(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},Yn=(e,t)=>{const o=(t||document).createDocumentFragment();return q(e,(e=>{o.appendChild(e.dom)})),uo.fromDom(o)},Kn=((e,t)=>{const o=t=>e(t)?F.from(t.dom.nodeValue):F.none();return{get:n=>{if(!e(n))throw new Error("Can only get "+t+" value of a "+t+" node");return o(n).getOr("")},getOption:o,set:(o,n)=>{if(!e(o))throw new Error("Can only set raw "+t+" value of a "+t+" node");o.dom.nodeValue=n}}})(To,"text"),Xn=e=>Kn.get(e),Jn=(e,t)=>Kn.set(e,t),Qn=(e,t)=>{const o=fn(e,t);return void 0===o||""===o?[]:o.split(" ")};var er=(e,t,o,n,r)=>e(o,n)?F.some(o):S(r)&&r(o)?F.none():t(o,n,r);const tr=(e,t,o)=>{let n=e.dom;const r=S(o)?o:B;for(;n.parentNode;){n=n.parentNode;const e=uo.fromDom(n);if(t(e))return F.some(e);if(r(e))break}return F.none()},or=(e,t,o)=>er(((e,t)=>t(e)),tr,e,t,o),nr=(e,t)=>ee(e.dom.childNodes,(e=>t(uo.fromDom(e)))).map(uo.fromDom),rr=(e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const r=uo.fromDom(e.childNodes[n]);if(t(r))return F.some(r);const i=o(e.childNodes[n]);if(i.isSome())return i}return F.none()};return o(e.dom)},ir=(e,t,o)=>tr(e,(e=>bo(e,t)),o),sr=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return vo(o)?F.none():F.from(o.querySelector(e)).map(uo.fromDom)})(t,e),ar=(e,t,o)=>er(((e,t)=>bo(e,t)),ir,e,t,o),lr=e=>void 0!==e.dom.classList,cr=e=>Qn(e,"class"),dr=(e,t)=>((e,t,o)=>{const n=Qn(e,t).concat([o]);return pn(e,t,n.join(" ")),!0})(e,"class",t),ur=(e,t)=>((e,t,o)=>{const n=K(Qn(e,t),(e=>e!==o));return n.length>0?pn(e,t,n.join(" ")):yn(e,t),!1})(e,"class",t),hr=(e,t)=>{lr(e)?e.dom.classList.add(t):dr(e,t)},mr=e=>{0===(lr(e)?e.dom.classList:cr(e)).length&&yn(e,"class")},pr=(e,t)=>{if(lr(e)){e.dom.classList.remove(t)}else ur(e,t);mr(e)},gr=(e,t)=>{const o=lr(e)?e.dom.classList.toggle(t):((e,t)=>Z(cr(e),t)?ur(e,t):dr(e,t))(e,t);return mr(e),o},fr=(e,t)=>lr(e)&&e.dom.classList.contains(t),br=(e,t=!1)=>{return Dn(e)?e.dom.isContentEditable:(o=e,ar(o,"[contenteditable]")).fold(A(t),(e=>"true"===vr(e)));var o},vr=e=>e.dom.contentEditable,yr=(e,t)=>{e.dom.contentEditable=t?"true":"false"},xr=(e,t)=>{let o=[];return q(jo(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(xr(e,t))})),o},wr=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return vo(o)?[]:W(o.querySelectorAll(e),uo.fromDom)})(t,e),_r=(e,t,o)=>tr(e,t,o).isSome(),Sr=(e,t)=>((e,t)=>{const o=e.dom;return o.parentNode?nr(uo.fromDom(o.parentNode),(o=>!yo(e,o)&&t(o))):F.none()})(e,t).isSome(),Cr=(e,t)=>rr(e,t).isSome(),kr=e=>S(e)?e:B,Er=(e,t,o)=>{const n=t(e),r=kr(o);return n.orThunk((()=>r(e)?F.none():((e,t,o)=>{let n=e.dom;const r=kr(o);for(;n.parentNode;){n=n.parentNode;const e=uo.fromDom(n),o=t(e);if(o.isSome())return o;if(r(e))break}return F.none()})(e,t,r)))},Tr=e=>{return(t=e,Kn.getOption(t)).filter((e=>0!==e.trim().length||e.indexOf(ct)>-1)).isSome();var t},Or=["img","br"],Ar=e=>Tr(e)||Z(Or,_o(e))||(e=>ko(e)&&"false"===fn(e,"contenteditable"))(e),Mr=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),Pr=Oe([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Dr={before:Pr.before,on:Pr.on,after:Pr.after,cata:(e,t,o,n)=>e.fold(t,o,n),getStart:e=>e.fold(M,M,M)},Lr=Oe([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Rr={domRange:Lr.domRange,relative:Lr.relative,exact:Lr.exact,exactFromRange:e=>Lr.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>uo.fromDom(e.startContainer),relative:(e,t)=>Dr.getStart(e),exact:(e,t,o,n)=>e}))(e);return Lo(t)},range:Mr},Nr=(e,t,o)=>e.caretPositionFromPoint?((e,t,o)=>{var n;return F.from(null===(n=e.caretPositionFromPoint)||void 0===n?void 0:n.call(e,t,o)).bind((t=>{if(null===t.offsetNode)return F.none();const o=e.createRange();return o.setStart(t.offsetNode,t.offset),o.collapse(),F.some(o)}))})(e,t,o):e.caretRangeFromPoint?((e,t,o)=>{var n;return F.from(null===(n=e.caretRangeFromPoint)||void 0===n?void 0:n.call(e,t,o))})(e,t,o):F.none(),Ir=(e,t)=>{const o=_o(e);return"input"===o?Dr.after(e):Z(["br","img"],o)?0===t?Dr.before(e):Dr.after(e):Dr.on(e,t)},Br=(e,t)=>{const o=e.fold(Dr.before,Ir,Dr.after),n=t.fold(Dr.before,Ir,Dr.after);return Rr.relative(o,n)},zr=(e,t,o,n)=>{const r=Ir(e,t),i=Ir(o,n);return Rr.relative(r,i)},Fr=e=>{const t=Rr.getWin(e).dom,o=(e,o,n,r)=>mo(t,e,o,n,r),n=(e=>e.match({domRange:e=>{const t=uo.fromDom(e.startContainer),o=uo.fromDom(e.endContainer);return zr(t,e.startOffset,o,e.endOffset)},relative:Br,exact:zr}))(e);return fo(t,n).match({ltr:o,rtl:o})},Hr=(e,t,o)=>((e,t,o)=>{const n=e.document;return Nr(n,t,o).map((e=>Mr(uo.fromDom(e.startContainer),e.startOffset,uo.fromDom(e.endContainer),e.endOffset)))})(e,t,o),jr=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Vr=e=>{const t=void 0===e?window:e,o=t.document,n=Wn(uo.fromDom(o));return(e=>{const t=void 0===e?window:e;return Gt().browser.isFirefox()?F.none():F.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,o=e.clientWidth,r=e.clientHeight;return jr(n.left,n.top,o,r)}),(e=>jr(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))};class Ur{constructor(e,t){this.node=e,this.rootNode=t,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(e){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node}prev(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node}prev2(e){return this.node=this.findPreviousNode(this.node,e),this.node}findSibling(e,t,o,n){if(e){if(!n&&e[t])return e[t];if(e!==this.rootNode){let t=e[o];if(t)return t;for(let n=e.parentNode;n&&n!==this.rootNode;n=n.parentNode)if(t=n[o],t)return t}}}findPreviousNode(e,t){if(e){const o=e.previousSibling;if(this.rootNode&&o===this.rootNode)return;if(o){if(!t)for(let e=o.lastChild;e;e=e.lastChild)if(!e.lastChild)return e;return o}const n=e.parentNode;if(n&&n!==this.rootNode)return n}}}const Zr=/^[ \t\r\n]*$/,$r=e=>Zr.test(e),Wr=e=>"\n"===e||"\r"===e,qr=(e,t=4,o=!0,n=!0)=>{const r=((e,t)=>t<=0?"":new Array(t+1).join(e))(" ",t),i=e.replace(/\t/g,r),s=J(i,((e,t)=>(e=>-1!==" \f\t\v".indexOf(e))(t)||t===ct?e.pcIsSpace||""===e.str&&o||e.str.length===i.length-1&&n||((e,t)=>t<e.length&&t>=0&&Wr(e[t]))(i,e.str.length+1)?{pcIsSpace:!1,str:e.str+ct}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:Wr(t),str:e.str+t}),{pcIsSpace:!1,str:""});return s.str},Gr=e=>t=>!!t&&t.nodeType===e,Yr=e=>!!e&&!Object.getPrototypeOf(e),Kr=Gr(1),Xr=e=>Kr(e)&&ko(uo.fromDom(e)),Jr=e=>{const t=e.toLowerCase();return e=>_(e)&&e.nodeName.toLowerCase()===t},Qr=e=>{const t=e.map((e=>e.toLowerCase()));return e=>{if(e&&e.nodeName){const o=e.nodeName.toLowerCase();return Z(t,o)}return!1}},ei=(e,t)=>{const o=t.toLowerCase().split(" ");return t=>{if(Kr(t)){const n=t.ownerDocument.defaultView;if(n)for(let r=0;r<o.length;r++){const i=n.getComputedStyle(t,null);if((i?i.getPropertyValue(e):null)===o[r])return!0}}return!1}},ti=e=>Kr(e)&&e.hasAttribute("data-mce-bogus"),oi=e=>Kr(e)&&"TABLE"===e.tagName,ni=e=>t=>{if(Xr(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},ri=Qr(["textarea","input"]),ii=Gr(3),si=Gr(4),ai=Gr(7),li=Gr(8),ci=Gr(9),di=Gr(11),ui=Jr("br"),hi=Jr("img"),mi=Jr("a"),pi=ni("true"),gi=ni("false"),fi=e=>Xr(e)&&e.isContentEditable&&_(e.parentElement)&&!e.parentElement.isContentEditable,bi=Qr(["td","th"]),vi=Qr(["td","th","caption"]),yi=Qr(["video","audio","object","embed"]),xi=Jr("li"),wi=Jr("details"),_i=Jr("summary"),Si={skipBogus:!0,includeZwsp:!1,checkRootAsContent:!1},Ci=(ki="data-mce-bookmark",e=>Kr(e)&&e.hasAttribute(ki));var ki;const Ei=(e,t,o)=>$r(e.data)&&!((e,t,o)=>{const n=uo.fromDom(t),r=uo.fromDom(e),i=o.getWhitespaceElements();return _r(r,(e=>Ee(i,_o(e))),D(yo,n))})(e,t,o),Ti=(e,t,o,n)=>ii(e)&&!Ei(e,t,o)&&(!n.includeZwsp||!(e=>{for(const t of e)if(!dt(t))return!1;return!0})(e.data)),Oi=(e,t,o,n)=>S(n.isContent)&&n.isContent(t)||((e,t)=>Kr(e)&&Ee(t.getNonEmptyElements(),e.nodeName))(t,e)||Ci(t)||(e=>Kr(e)&&"A"===e.nodeName&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")))(t)||Ti(t,o,e,n)||gi(t)||pi(t)&&(e=>No(uo.fromDom(e)).exists((e=>!br(e))))(t),Ai=(e,t,o)=>{const n={...Si,...o};if(n.checkRootAsContent&&Oi(e,t,t,n))return!1;let r=t.firstChild,i=0;if(!r)return!0;const s=new Ur(r,t);do{if(n.skipBogus&&Kr(r)){const e=r.getAttribute("data-mce-bogus");if(e){r=s.next("all"===e);continue}}if(li(r))r=s.next(!0);else if(ui(r))i++,r=s.next();else{if(Oi(e,r,t,n))return!1;r=s.next()}}while(r);return i<=1},Mi=(e,t,o)=>Ai(e,t.dom,{checkRootAsContent:!0,...o}),Pi=(e,t,o)=>Oi(e,t,t,{includeZwsp:Si.includeZwsp,...o}),Di=e=>{const t=e.toLowerCase();return"svg"===t?"svg":"math"===t?"math":"html"},Li=e=>"html"!==Di(e),Ri=e=>Li(e.nodeName),Ni=e=>Di(e.nodeName),Ii=["svg","math"],Bi="data-mce-block",zi=e=>W((e=>K(ge(e),(e=>!/[A-Z]/.test(e))))(e),(e=>{const t=CSS.escape(e);return`${t}:`+W(Ii,(e=>`not(${e} ${t})`)).join(":")})).join(","),Fi=(e,t)=>_(t.querySelector(e))?(t.setAttribute(Bi,"true"),"inline-boundary"===t.getAttribute("data-mce-selected")&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(Bi),!1),Hi=(e,t)=>{const o=zi(e.getTransparentElements()),n=zi(e.getBlockElements());return K(t.querySelectorAll(o),(e=>Fi(n,e)))},ji=(e,t,o)=>{var n;const r=o?"lastChild":"firstChild";for(let o=t[r];o;o=o[r])if(Ai(e,o,{checkRootAsContent:!0}))return void(null===(n=o.parentNode)||void 0===n||n.removeChild(o))},Vi=(e,t,o)=>{const n=e.getBlockElements(),r=uo.fromDom(t),i=e=>_o(e)in n,s=e=>yo(e,r);q(On(o),(t=>{tr(t,i,s).each((o=>{const n=((e,t)=>K(jo(e),t))(t,(t=>i(t)&&!e.isValidChild(_o(o),_o(t))));if(n.length>0){const t=No(o);q(n,(t=>{tr(t,i,s).each((o=>{((e,t,o)=>{const n=document.createRange(),r=t.parentNode;if(r){n.setStartBefore(t),n.setEndBefore(o);const i=n.extractContents();ji(e,i,!0),n.setStartAfter(o),n.setEndAfter(t);const s=n.extractContents();ji(e,s,!1),Ai(e,i,{checkRootAsContent:!0})||r.insertBefore(i,t),Ai(e,o,{checkRootAsContent:!0})||r.insertBefore(o,t),Ai(e,s,{checkRootAsContent:!0})||r.insertBefore(s,t),r.removeChild(t)}})(e,o.dom,t.dom)}))})),t.each((t=>Hi(e,t.dom)))}}))}))},Ui=(e,t)=>{const o=Hi(e,t);Vi(e,t,o),((e,t,o)=>{q([...o,...Gi(e,t)?[t]:[]],(t=>q(wr(uo.fromDom(t),t.nodeName.toLowerCase()),(t=>{Yi(e,t.dom)&&Sn(t)}))))})(e,t,o)},Zi=(e,t)=>{if(qi(e,t)){const o=zi(e.getBlockElements());Fi(o,t)}},$i=e=>e.hasAttribute(Bi),Wi=(e,t)=>Ee(e.getTransparentElements(),t),qi=(e,t)=>Kr(t)&&Wi(e,t.nodeName),Gi=(e,t)=>qi(e,t)&&$i(t),Yi=(e,t)=>qi(e,t)&&!$i(t),Ki=(e,t)=>1===t.type&&Wi(e,t.name)&&p(t.attr(Bi)),Xi=Gt().browser,Ji=e=>ee(e,Eo),Qi=(e,t)=>e.children&&Z(e.children,t),es=(e,t,o)=>{let n=0,r=0;const i=e.ownerDocument;if(o=o||e,t){if(o===e&&t.getBoundingClientRect&&"static"===In(uo.fromDom(e),"position")){const o=t.getBoundingClientRect();return n=o.left+(i.documentElement.scrollLeft||e.scrollLeft)-i.documentElement.clientLeft,r=o.top+(i.documentElement.scrollTop||e.scrollTop)-i.documentElement.clientTop,{x:n,y:r}}let s=t;for(;s&&s!==o&&s.nodeType&&!Qi(s,o);){const e=s;n+=e.offsetLeft||0,r+=e.offsetTop||0,s=e.offsetParent}for(s=t.parentNode;s&&s!==o&&s.nodeType&&!Qi(s,o);)n-=s.scrollLeft||0,r-=s.scrollTop||0,s=s.parentNode;r+=(e=>Xi.isFirefox()&&"table"===_o(e)?Ji(jo(e)).filter((e=>"caption"===_o(e))).bind((e=>Ji(Ho(e)).map((t=>{const o=t.dom.offsetTop,n=e.dom.offsetTop,r=e.dom.offsetHeight;return o<=n?-r:0})))).getOr(0):0)(uo.fromDom(t))}return{x:n,y:r}},ts=(e,t={})=>{let o=0;const n={},r=uo.fromDom(e),i=Do(r),s=e=>{dn(Go(r),e)},a=e=>{const t=Go(r);sr(t,"#"+e).each(_n)},l=e=>ke(n,e).getOrThunk((()=>({id:"mce-u"+o++,passed:[],failed:[],count:0}))),c=e=>new Promise(((o,r)=>{let a;const c=lo._addCacheSuffix(e),d=l(c);n[c]=d,d.count++;const u=(e,t)=>{q(e,I),d.status=t,d.passed=[],d.failed=[],a&&(a.onload=null,a.onerror=null,a=null)},h=()=>u(d.passed,2),m=()=>u(d.failed,3);if(o&&d.passed.push(o),r&&d.failed.push(r),1===d.status)return;if(2===d.status)return void h();if(3===d.status)return void m();d.status=1;const p=uo.fromTag("link",i.dom);gn(p,{rel:"stylesheet",type:"text/css",id:d.id}),t.contentCssCors&&pn(p,"crossOrigin","anonymous"),t.referrerPolicy&&pn(p,"referrerpolicy",t.referrerPolicy),a=p.dom,a.onload=h,a.onerror=m,s(p),pn(p,"href",c)})),d=e=>{const t=lo._addCacheSuffix(e);ke(n,t).each((e=>{0===--e.count&&(delete n[t],a(e.id))}))};return{load:c,loadRawCss:(e,t)=>{const o=l(e);n[e]=o,o.count++;const r=uo.fromTag("style",i.dom);gn(r,{rel:"stylesheet",type:"text/css",id:o.id,"data-mce-key":e}),r.dom.innerHTML=t,s(r)},loadAll:e=>Promise.allSettled(W(e,(e=>c(e).then(A(e))))).then((e=>{const t=Y(e,(e=>"fulfilled"===e.status));return t.fail.length>0?Promise.reject(W(t.fail,(e=>e.reason))):W(t.pass,(e=>e.value))})),unload:d,unloadRawCss:e=>{ke(n,e).each((t=>{0===--t.count&&(delete n[e],a(t.id))}))},unloadAll:e=>{q(e,(e=>{d(e)}))},_setReferrerPolicy:e=>{t.referrerPolicy=e},_setContentCssCors:e=>{t.contentCssCors=e}}},os=(()=>{const e=new WeakMap;return{forElement:(t,o)=>{const n=qo(t).dom;return F.from(e.get(n)).getOrThunk((()=>{const t=ts(n,o);return e.set(n,t),t}))}}})(),ns=(e,t)=>_(e)&&(Pi(t,e)||t.isInline(e.nodeName.toLowerCase())),rs=e=>(e=>"span"===e.nodeName.toLowerCase())(e)&&"bookmark"===e.getAttribute("data-mce-type"),is=(e,t,o)=>ii(e)&&e.data.length>0&&((e,t,o)=>{const n=new Ur(e,t).prev(!1),r=new Ur(e,t).next(!1),i=x(n)||ns(n,o),s=x(r)||ns(r,o);return i&&s})(e,t,o),ss=(e,t,o,n)=>{var r;const i=n||t;if(Kr(t)&&rs(t))return t;const s=t.childNodes;for(let t=s.length-1;t>=0;t--)ss(e,s[t],o,i);if(Kr(t)){const e=t.childNodes;1===e.length&&rs(e[0])&&(null===(r=t.parentNode)||void 0===r||r.insertBefore(e[0],t))}return(e=>di(e)||ci(e))(t)||Pi(o,t)||(e=>!!Kr(e)&&e.childNodes.length>0)(t)||is(t,i,o)||e.remove(t),t},as=lo.makeMap,ls=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,cs=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ds=/[<>&\"\']/g,us=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,hs={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},ms={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},ps={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},gs=(e,t)=>{const o={};if(e){const n=e.split(",");t=t||10;for(let e=0;e<n.length;e+=2){const r=String.fromCharCode(parseInt(n[e],t));if(!ms[r]){const t="&"+n[e+1]+";";o[r]=t,o[t]=r}}return o}},fs=gs("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),bs=(e,t)=>e.replace(t?ls:cs,(e=>ms[e]||e)),vs=(e,t)=>e.replace(t?ls:cs,(e=>e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":ms[e]||"&#"+e.charCodeAt(0)+";")),ys=(e,t,o)=>{const n=o||fs;return e.replace(t?ls:cs,(e=>ms[e]||n[e]||e))},xs={encodeRaw:bs,encodeAllRaw:e=>(""+e).replace(ds,(e=>ms[e]||e)),encodeNumeric:vs,encodeNamed:ys,getEncodeFunc:(e,t)=>{const o=gs(t)||fs,n=(e,t)=>e.replace(t?ls:cs,(e=>void 0!==ms[e]?ms[e]:void 0!==o[e]?o[e]:e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";")),r=(e,t)=>ys(e,t,o),i=as(e.replace(/\+/g,","));return i.named&&i.numeric?n:i.named?t?r:ys:i.numeric?vs:bs},decode:e=>e.replace(us,((e,t)=>t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):hs[t]||String.fromCharCode(t):ps[e]||fs[e]||(e=>{const t=uo.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e})(e)))},ws=(e,t)=>(e=lo.trim(e))?e.split(t||" "):[],_s=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),Ss=e=>{const t=e=>b(e)?W(e,t):(e=>g(e)&&e.source&&"[object RegExp]"===Object.prototype.toString.call(e))(e)?new RegExp(e.source,e.flags):g(e)?ve(e,t):e;return t(e)},Cs=e=>Object.freeze(["id","accesskey","class","dir","lang","style","tabindex","title","role",..."html4"!==e?["contenteditable","contextmenu","draggable","dropzone","hidden","spellcheck","translate","itemprop","itemscope","itemtype"]:[],..."html5-strict"!==e?["xml:lang"]:[]]),ks=e=>{let t,o;if(t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==e){t+=" article aside details dialog figure main header footer hgroup section nav "+"a ins del canvas map",o+=" audio canvas command data datalist mark meter output picture progress time wbr video ruby bdi keygen svg"}if("html5-strict"!==e){o=[o,"acronym applet basefont big font strike tt"].join(" ");t=[t,"center dir isindex noframes"].join(" ")}const n=[t,o].join(" ");return{blockContent:t,phrasingContent:o,flowContent:n}},Es=e=>{const{blockContent:t,phrasingContent:o,flowContent:n}=ks(e),r=e=>Object.freeze(e.split(" "));return Object.freeze({blockContent:r(t),phrasingContent:r(o),flowContent:r(n)})},Ts={html4:at((()=>Es("html4"))),html5:at((()=>Es("html5"))),"html5-strict":at((()=>Es("html5-strict")))},Os=(e,t)=>{const{blockContent:o,phrasingContent:n,flowContent:r}=Ts[e]();return"blocks"===t?F.some(o):"phrasing"===t?F.some(n):"flow"===t?F.some(r):F.none()},As=e=>F.from(/^(@?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)$/.exec(e)).map((e=>({preset:"@"===e[1],name:e[2]}))),Ms=(e,t)=>{const o=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return ne(ws(t,","),(t=>{const n=o.exec(t);if(n){const t=n[1],o=n[2],r=n[3],i=n[4],s=n[5],a={attributes:{},attributesOrder:[]};if(e.each((e=>((e,t)=>{be(e.attributes,((e,o)=>{t.attributes[o]=e})),t.attributesOrder.push(...e.attributesOrder)})(e,a))),"#"===t?a.paddEmpty=!0:"-"===t&&(a.removeEmpty=!0),"!"===i&&(a.removeEmptyAttrs=!0),s&&((e,t)=>{const o=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,n=/[*?+]/,{attributes:r,attributesOrder:i}=t;q(ws(e,"|"),(e=>{const s=o.exec(e);if(s){const e={},o=s[1],a=s[2].replace(/[\\:]:/g,":"),l=s[3],c=s[4];if("!"===o&&(t.attributesRequired=t.attributesRequired||[],t.attributesRequired.push(a),e.required=!0),"-"===o)return delete r[a],void i.splice(lo.inArray(i,a),1);if(l&&("="===l?(t.attributesDefault=t.attributesDefault||[],t.attributesDefault.push({name:a,value:c}),e.defaultValue=c):"~"===l?(t.attributesForced=t.attributesForced||[],t.attributesForced.push({name:a,value:c}),e.forcedValue=c):"<"===l&&(e.validValues=lo.makeMap(c,"?"))),n.test(a)){const o=e;t.attributePatterns=t.attributePatterns||[],o.pattern=_s(a),t.attributePatterns.push(o)}else r[a]||i.push(a),r[a]=e}}))})(s,a),r&&(a.outputName=o),"@"===o){if(!e.isNone())return[];e=F.some(a)}return[r?{name:o,element:a,aliasName:r}:{name:o,element:a}]}return[]}))},Ps={},Ds=lo.makeMap,Ls=lo.each,Rs=lo.extend,Ns=lo.explode,Is=(e,t={})=>{const o=Ds(e," ",Ds(e.toUpperCase()," "));return Rs(o,t)},Bs=e=>Is("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),zs=(e,t)=>{if(e){const o={};return p(e)&&(e={"*":e}),Ls(e,((e,n)=>{o[n]=o[n.toUpperCase()]="map"===t?Ds(e,/[, ]/):Ns(e,/[, ]/)})),o}},Fs=(e={})=>{var t;const o={},n={};let r=[];const i={},s={},a=(t,o,n)=>{const r=e[t];if(r)return Ds(r,/[, ]/,Ds(r.toUpperCase(),/[, ]/));{let e=Ps[t];return e||(e=Is(o,n),Ps[t]=e),e}},l=null!==(t=e.schema)&&void 0!==t?t:"html5",c=(e=>{const t=Cs(e),{phrasingContent:o,flowContent:n}=ks(e),r={},i=(e,t,o)=>{r[e]={attributes:ae(t,A({})),attributesOrder:t,children:ae(o,A({}))}},s=(e,o="",n="")=>{const r=ws(n),s=ws(e);let a=s.length;const l=[...t,...ws(o)];for(;a--;)i(s[a],l.slice(),r)},a=(e,t)=>{const o=ws(e),n=ws(t);let i=o.length;for(;i--;){const e=r[o[i]];for(let t=0,o=n.length;t<o;t++)e.attributes[n[t]]={},e.attributesOrder.push(n[t])}};"html5-strict"!==e&&(q(ws("acronym applet basefont big font strike tt"),(e=>{s(e,"",o)})),q(ws("center dir isindex noframes"),(e=>{s(e,"",n)})));return s("html","manifest","head body"),s("head","","base command link meta noscript script style title"),s("title hr noscript br"),s("base","href target"),s("link","href rel media hreflang type sizes hreflang"),s("meta","name http-equiv content charset"),s("style","media type scoped"),s("script","src async defer type charset"),s("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",n),s("dd div","",n),s("address dt caption","","html4"===e?o:n),s("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",o),s("blockquote","cite",n),s("ol","reversed start type","li"),s("ul","","li"),s("li","value",n),s("dl","","dt dd"),s("a","href target rel media hreflang type","html4"===e?o:n),s("q","cite",o),s("ins del","cite datetime",n),s("img","src sizes srcset alt usemap ismap width height"),s("iframe","src name width height",n),s("embed","src type width height"),s("object","data type typemustmatch name usemap form width height",[n,"param"].join(" ")),s("param","name value"),s("map","name",[n,"area"].join(" ")),s("area","alt coords shape href target rel media hreflang type"),s("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),s("colgroup","span","col"),s("col","span"),s("tbody thead tfoot","","tr"),s("tr","","td th"),s("td","colspan rowspan headers",n),s("th","colspan rowspan headers scope abbr",n),s("form","accept-charset action autocomplete enctype method name novalidate target",n),s("fieldset","disabled form name",[n,"legend"].join(" ")),s("label","form for",o),s("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),s("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?n:o),s("select","disabled form multiple name required size","option optgroup"),s("optgroup","disabled label","option"),s("option","disabled label selected value"),s("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),s("menu","type label",[n,"li"].join(" ")),s("noscript","",n),"html4"!==e&&(s("wbr"),s("ruby","",[o,"rt rp"].join(" ")),s("figcaption","",n),s("mark rt rp bdi","",o),s("summary","",[o,"h1 h2 h3 h4 h5 h6"].join(" ")),s("canvas","width height",n),s("data","value",o),s("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[n,"track source"].join(" ")),s("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[n,"track source"].join(" ")),s("picture","","img source"),s("source","src srcset type media sizes"),s("track","kind src srclang label default"),s("datalist","",[o,"option"].join(" ")),s("article section nav aside main header footer","",n),s("hgroup","","h1 h2 h3 h4 h5 h6"),s("figure","",[n,"figcaption"].join(" ")),s("time","datetime",o),s("dialog","open",n),s("command","type label icon disabled checked radiogroup command"),s("output","for form name",o),s("progress","value max",o),s("meter","value min max low high optimum",o),s("details","open",[n,"summary"].join(" ")),s("keygen","autofocus challenge disabled form keytype name"),i("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),"html5-strict"!==e&&(a("script","language xml:space"),a("style","xml:space"),a("object","declare classid code codebase codetype archive standby align border hspace vspace"),a("embed","align name hspace vspace"),a("param","valuetype type"),a("a","charset name rev shape coords"),a("br","clear"),a("applet","codebase archive code object alt name width height align hspace vspace"),a("img","name longdesc align border hspace vspace"),a("iframe","longdesc frameborder marginwidth marginheight scrolling align"),a("font basefont","size color face"),a("input","usemap align"),a("select"),a("textarea"),a("h1 h2 h3 h4 h5 h6 div p legend caption","align"),a("ul","type compact"),a("li","type"),a("ol dl menu dir","compact"),a("pre","width xml:space"),a("hr","align noshade size width"),a("isindex","prompt"),a("table","summary width frame rules cellspacing cellpadding align bgcolor"),a("col","width align char charoff valign"),a("colgroup","width align char charoff valign"),a("thead","align char charoff valign"),a("tr","align char charoff valign bgcolor"),a("th","axis align char charoff valign nowrap bgcolor width height"),a("form","accept"),a("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),a("tfoot","align char charoff valign"),a("tbody","align char charoff valign"),a("area","nohref"),a("body","background bgcolor text link vlink alink")),"html4"!==e&&(a("input button select textarea","autofocus"),a("input textarea","placeholder"),a("a","download"),a("link script img","crossorigin"),a("img","loading"),a("iframe","sandbox seamless allow allowfullscreen loading referrerpolicy")),"html4"!==e&&q([r.video,r.audio],(e=>{delete e.children.audio,delete e.children.video})),q(ws("a form meter progress dfn"),(e=>{r[e]&&delete r[e].children[e]})),delete r.caption.children.table,delete r.script,r})(l);!1===e.verify_html&&(e.valid_elements="*[*]");const d=zs(e.valid_styles),u=zs(e.invalid_styles,"map"),h=zs(e.valid_classes,"map"),m=a("whitespace_elements","pre script noscript style textarea video audio iframe object code"),f=a("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),v=a("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),x=a("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),w="td th iframe video audio object script code",_=a("non_empty_elements",w+" pre svg textarea summary",v),S=a("move_caret_before_on_enter_elements",w+" table",v),C="h1 h2 h3 h4 h5 h6",k=a("text_block_elements",C+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),E=a("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary html body multicol listing",k),T=a("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),O=a("transparent_elements","a ins del canvas map"),M=a("wrap_block_elements","pre "+C);Ls("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),(e=>{s[e]=new RegExp("</"+e+"[^>]*>","gi")}));const P=e=>{const t=F.from(o["@"]),n=/[*?+]/;q(Ms(t,null!=e?e:""),(({name:e,element:t,aliasName:i})=>{if(i&&(o[i]=t),n.test(e)){const o=t;o.pattern=_s(e),r.push(o)}else o[e]=t}))},D=e=>{r=[],q(ge(o),(e=>{delete o[e]})),P(e)},L=(e,t)=>{var r,s;delete Ps.text_block_elements,delete Ps.block_elements;const a=!!t.extends&&!oe(t.extends),c=t.extends;if(n[e]=c?n[c]:{},i[e]=null!=c?c:e,_[e.toUpperCase()]={},_[e]={},a||(E[e.toUpperCase()]={},E[e]={}),c&&!o[e]&&o[c]){const t=Ss(o[c]);delete t.removeEmptyAttrs,delete t.removeEmpty,o[e]=t}else o[e]={attributesOrder:[],attributes:{}};if(b(t.attributes)){const n=e=>{i.attributesOrder.push(e),i.attributes[e]={}},i=null!==(r=o[e])&&void 0!==r?r:{};delete i.attributesDefault,delete i.attributesForced,delete i.attributePatterns,delete i.attributesRequired,i.attributesOrder=[],i.attributes={},q(t.attributes,(e=>{const t=Cs(l);As(e).each((({preset:e,name:o})=>{e?"global"===o&&q(t,n):n(o)}))})),o[e]=i}if(y(t.padEmpty)){const n=null!==(s=o[e])&&void 0!==s?s:{};n.paddEmpty=t.padEmpty,o[e]=n}if(b(t.children)){const o={},r=e=>{o[e]={}},i=e=>{Os(l,e).each((e=>{q(e,r)}))};q(t.children,(e=>{As(e).each((({preset:e,name:t})=>{e?i(t):r(t)}))})),n[e]=o}c&&be(n,((t,o)=>{t[c]&&(n[o]=t=Rs({},n[o]),t[e]=t[c])}))},R=e=>{q((e=>{const t=/^(~)?(.+)$/;return ne(ws(e,","),(e=>{const o=t.exec(e);return o?[{cloneName:"~"===o[1]?"span":"div",name:o[2]}]:[]}))})(null!=e?e:""),(({name:e,cloneName:t})=>{L(e,{extends:t})}))},N=e=>{g(e)?be(e,((e,t)=>L(t,e))):p(e)&&R(e)},I=e=>{q((e=>{const t=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;return ne(ws(e,","),(e=>{const o=t.exec(e);if(o){const e=o[1],t=e?(e=>"-"===e?"remove":"add")(e):"replace";return[{operation:t,name:o[2],validChildren:ne(ws(o[3],"|"),(e=>As(e).toArray()))}]}return[]}))})(null!=e?e:""),(({operation:e,name:t,validChildren:o})=>{const r="replace"===e?{"#comment":{}}:n[t],i=t=>{"remove"===e?delete r[t]:r[t]={}};q(o,(({preset:e,name:t})=>{e?(e=>{Os(l,e).each((e=>{q(e,i)}))})(t):i(t)})),n[t]=r}))},B=e=>{const t=o[e];if(t)return t;let n=r.length;for(;n--;){const t=r[n];if(t.pattern.test(e))return t}},z=A(d),H=A(u),j=A(h),V=A(x),U=A(E),Z=A(k),$=A(T),W=A(Object.seal(v)),G=A(f),Y=A(_),K=A(S),X=A(m),J=A(O),Q=A(M),ee=A(Object.seal(s)),te=(e,t)=>{const o=B(e);if(o){if(!t)return!0;{if(o.attributes[t])return!0;const e=o.attributePatterns;if(e){let o=e.length;for(;o--;)if(e[o].pattern.test(t))return!0}}}return!1},oe=e=>Ee(U(),e),re=e=>!Ke(e,"#")&&te(e)&&!oe(e),ie=A(i);return e.valid_elements?(D(e.valid_elements),Ls(c,((e,t)=>{n[t]=e.children}))):(Ls(c,((e,t)=>{o[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},n[t]=e.children})),Ls(ws("strong/b em/i"),(e=>{const t=ws(e,"/");o[t[1]].outputName=t[0]})),Ls(T,((t,n)=>{o[n]&&(e.padd_empty_block_inline_children&&(o[n].paddInEmptyBlock=!0),o[n].removeEmpty=!0)})),Ls(ws("ol ul blockquote a table tbody"),(e=>{o[e]&&(o[e].removeEmpty=!0)})),Ls(ws("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),(e=>{o[e]&&(o[e].paddEmpty=!0)})),Ls(ws("span"),(e=>{o[e].removeEmptyAttrs=!0}))),delete o.svg,N(e.custom_elements),I(e.valid_children),P(e.extended_valid_elements),I("+ol[ul|ol],+ul[ul|ol]"),Ls({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},((e,t)=>{o[t]&&(o[t].parentsRequired=ws(e))})),e.invalid_elements&&Ls(Ns(e.invalid_elements),(e=>{o[e]&&delete o[e]})),B("span")||P("span[!data-mce-type|*]"),{type:l,children:n,elements:o,getValidStyles:z,getValidClasses:j,getBlockElements:U,getInvalidStyles:H,getVoidElements:W,getTextBlockElements:Z,getTextInlineElements:$,getBoolAttrs:V,getElementRule:B,getSelfClosingElements:G,getNonEmptyElements:Y,getMoveCaretBeforeOnEnterElements:K,getWhitespaceElements:X,getTransparentElements:J,getSpecialElements:ee,isValidChild:(e,t)=>{const o=n[e.toLowerCase()];return!(!o||!o[t.toLowerCase()])},isValid:te,isBlock:oe,isInline:re,isWrapper:e=>Ee(Q(),e)||re(e),getCustomElements:ie,addValidElements:P,setValidElements:D,addCustomElements:N,addValidChildren:I}},Hs=e=>Ge(e,"#").toUpperCase(),js=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Vs=e=>(e=>({value:Hs(e)}))(js(e.red)+js(e.green)+js(e.blue)),Us=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,Zs=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,$s=(e,t,o,n)=>((e,t,o,n)=>({red:e,green:t,blue:o,alpha:n}))(parseInt(e,10),parseInt(t,10),parseInt(o,10),parseFloat(n)),Ws=e=>{const t=Us.exec(e);if(null!==t)return F.some($s(t[1],t[2],t[3],"1"));const o=Zs.exec(e);return null!==o?F.some($s(o[1],o[2],o[3],o[4])):F.none()},qs=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,Gs=e=>Ws(e).map(Vs).map((e=>"#"+e.value)).getOr(e),Ys=(e={},t)=>{const o=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,n=/\s*([^:]+):\s*([^;]+);?/g,r=/\s+$/,i={};let s,a;const l=lt;t&&(s=t.getValidStyles(),a=t.getInvalidStyles());const c="\\\" \\' \\; \\: ; : \ufeff".split(" ");for(let e=0;e<c.length;e++)i[c[e]]=l+e,i[l+e]=c[e];const d={parse:t=>{const s={};let a=!1;const c=e.url_converter,u=e.url_converter_scope||d,h=(e,t,o)=>{const n=s[e+"-top"+t];if(!n)return;const r=s[e+"-right"+t];if(!r)return;const i=s[e+"-bottom"+t];if(!i)return;const a=s[e+"-left"+t];if(!a)return;const l=[n,r,i,a];let c=l.length-1;for(;c--&&l[c]===l[c+1];);c>-1&&o||(s[e+t]=-1===c?l[0]:l.join(" "),delete s[e+"-top"+t],delete s[e+"-right"+t],delete s[e+"-bottom"+t],delete s[e+"-left"+t])},m=e=>{const t=s[e];if(!t)return;const o=t.indexOf(",")>-1?[t]:t.split(" ");let n=o.length;for(;n--;)if(o[n]!==o[0])return!1;return s[e]=o[0],!0},p=e=>(a=!0,i[e]),g=(e,t)=>(a&&(e=e.replace(/\uFEFF[0-9]/g,(e=>i[e]))),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e),f=e=>String.fromCharCode(parseInt(e.slice(1),16)),b=e=>e.replace(/\\[0-9a-f]+/gi,f),v=(t,o,n,r,i,s)=>{if(i=i||s)return"'"+(i=g(i)).replace(/\'/g,"\\'")+"'";if(o=g(o||n||r||""),!e.allow_script_urls){const t=o.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(t))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(t))return""}return c&&(o=c.call(u,o,"style")),"url('"+o.replace(/\'/g,"\\'")+"')"};if(t){let i;for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,p).replace(/\"[^\"]+\"|\'[^\']+\'/g,(e=>e.replace(/[;:]/g,p)));i=n.exec(t);){n.lastIndex=i.index+i[0].length;let t=i[1].replace(r,"").toLowerCase(),c=i[2].replace(r,"");if(t&&c){if(t=b(t),c=b(c),-1!==t.indexOf(l)||-1!==t.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===t||/expression\s*\(|\/\*|\*\//.test(c)))continue;"font-weight"===t&&"700"===c?c="bold":"color"!==t&&"background-color"!==t||(c=c.toLowerCase()),"rgb"==(S=c,Us.test(S)?"rgb":Zs.test(S)?"rgba":"other")&&Ws(c).each((e=>{c=Gs(qs(e)).toLowerCase()})),c=c.replace(o,v),s[t]=a?g(c,!0):c}}h("border","",!0),h("border","-width"),h("border","-color"),h("border","-style"),h("padding",""),h("margin",""),y="border",w="border-style",_="border-color",m(x="border-width")&&m(w)&&m(_)&&(s[y]=s[x]+" "+s[w]+" "+s[_],delete s[x],delete s[w],delete s[_]),"medium none"===s.border&&delete s.border,"none"===s["border-image"]&&delete s["border-image"]}var y,x,w,_,S;return s},serialize:(e,t)=>{let o="";const n=(t,n)=>{const r=n[t];if(r)for(let t=0,n=r.length;t<n;t++){const n=r[t],i=e[n];i&&(o+=(o.length>0?" ":"")+n+": "+i+";")}};return t&&s?(n("*",s),n(t,s)):be(e,((e,n)=>{e&&((e,t)=>{if(!a||!t)return!0;let o=a["*"];return!(o&&o[e]||(o=a[t],o&&o[e]))})(n,t)&&(o+=(o.length>0?" ":"")+n+": "+e+";")})),o}};return d},Ks={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Xs=e=>w(e.preventDefault)||(e=>e instanceof Event||S(e.initEvent))(e),Js=(e,t)=>{const o=null!=t?t:{};for(const t in e)Ee(Ks,t)||(o[t]=e[t]);return _(e.composedPath)&&(o.composedPath=()=>e.composedPath()),_(e.getModifierState)&&(o.getModifierState=t=>e.getModifierState(t)),_(e.getTargetRanges)&&(o.getTargetRanges=()=>e.getTargetRanges()),o},Qs=(e,t,o,n)=>{var r;const i=Js(t,n);return i.type=e,w(i.target)&&(i.target=null!==(r=i.srcElement)&&void 0!==r?r:o),Xs(t)&&(i.preventDefault=()=>{i.defaultPrevented=!0,i.isDefaultPrevented=z,S(t.preventDefault)&&t.preventDefault()},i.stopPropagation=()=>{i.cancelBubble=!0,i.isPropagationStopped=z,S(t.stopPropagation)&&t.stopPropagation()},i.stopImmediatePropagation=()=>{i.isImmediatePropagationStopped=z,i.stopPropagation()},(e=>e.isDefaultPrevented===z||e.isDefaultPrevented===B)(i)||(i.isDefaultPrevented=!0===i.defaultPrevented?z:B,i.isPropagationStopped=!0===i.cancelBubble?z:B,i.isImmediatePropagationStopped=B)),i},ea=/^(?:mouse|contextmenu)|click/,ta=(e,t,o,n)=>{e.addEventListener(t,o,n||!1)},oa=(e,t,o,n)=>{e.removeEventListener(t,o,n||!1)},na=(e,t)=>{const o=Qs(e.type,e,document,t);if((e=>_(e)&&ea.test(e.type))(e)&&x(e.pageX)&&!x(e.clientX)){const t=o.target.ownerDocument||document,n=t.documentElement,r=t.body,i=o;i.pageX=e.clientX+(n&&n.scrollLeft||r&&r.scrollLeft||0)-(n&&n.clientLeft||r&&r.clientLeft||0),i.pageY=e.clientY+(n&&n.scrollTop||r&&r.scrollTop||0)-(n&&n.clientTop||r&&r.clientTop||0)}return o},ra=(e,t,o)=>{const n=e.document,r={type:"ready"};if(o.domLoaded)return void t(r);const i=()=>{oa(e,"DOMContentLoaded",i),oa(e,"load",i),o.domLoaded||(o.domLoaded=!0,t(r)),e=null};"complete"===n.readyState||"interactive"===n.readyState&&n.body?i():ta(e,"DOMContentLoaded",i),o.domLoaded||ta(e,"load",i)};class ia{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(e,t,o,n){const r=this;let i;const s=window,a=e=>{r.executeHandlers(na(e||s.event),l)};if(!e||ii(e)||li(e))return o;let l;e[r.expando]?l=e[r.expando]:(l=r.count++,e[r.expando]=l,r.events[l]={}),n=n||e;const c=t.split(" ");let d=c.length;for(;d--;){let t=c[d],u=a,h=!1,m=!1;"DOMContentLoaded"===t&&(t="ready"),r.domLoaded&&"ready"===t&&"complete"===e.readyState?o.call(n,na({type:t})):(r.hasFocusIn||"focusin"!==t&&"focusout"!==t||(h=!0,m="focusin"===t?"focus":"blur",u=e=>{const t=na(e||s.event);t.type="focus"===t.type?"focusin":"focusout",r.executeHandlers(t,l)}),i=r.events[l][t],i?"ready"===t&&r.domLoaded?o(na({type:t})):i.push({func:o,scope:n}):(r.events[l][t]=i=[{func:o,scope:n}],i.fakeName=m,i.capture=h,i.nativeHandler=u,"ready"===t?ra(e,u,r):ta(e,m||t,u,h)))}return e=i=null,o}unbind(e,t,o){if(!e||ii(e)||li(e))return this;const n=e[this.expando];if(n){let r=this.events[n];if(t){const n=t.split(" ");let i=n.length;for(;i--;){const t=n[i],s=r[t];if(s){if(o){let e=s.length;for(;e--;)if(s[e].func===o){const o=s.nativeHandler,n=s.fakeName,i=s.capture,a=s.slice(0,e).concat(s.slice(e+1));a.nativeHandler=o,a.fakeName=n,a.capture=i,r[t]=a}}o&&0!==s.length||(delete r[t],oa(e,s.fakeName||t,s.nativeHandler,s.capture))}}}else be(r,((t,o)=>{oa(e,t.fakeName||o,t.nativeHandler,t.capture)})),r={};for(const e in r)if(Ee(r,e))return this;delete this.events[n];try{delete e[this.expando]}catch(t){e[this.expando]=null}}return this}fire(e,t,o){return this.dispatch(e,t,o)}dispatch(e,t,o){if(!e||ii(e)||li(e))return this;const n=na({type:t,target:e},o);do{const t=e[this.expando];t&&this.executeHandlers(n,t),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!n.isPropagationStopped());return this}clean(e){if(!e||ii(e)||li(e))return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName){this.unbind(e);const t=e.getElementsByTagName("*");let o=t.length;for(;o--;)(e=t[o])[this.expando]&&this.unbind(e)}return this}destroy(){this.events={}}cancel(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}executeHandlers(e,t){const o=this.events[t],n=o&&o[e.type];if(n)for(let t=0,o=n.length;t<o;t++){const o=n[t];if(o&&!1===o.func.call(o.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}}}ia.Event=new ia;const sa=lo.each,aa=lo.grep,la="data-mce-style",ca=lo.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," "),da=(e,t,o)=>{w(o)||""===o?yn(e,t):pn(e,t,o)},ua=e=>e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),ha=(e,t)=>{let o=0;if(e)for(let n=e.nodeType,r=e.previousSibling;r;r=r.previousSibling){const e=r.nodeType;(!t||!ii(r)||e!==n&&r.data.length)&&(o++,n=e)}return o},ma=(e,t)=>{const o=fn(t,"style"),n=e.serialize(e.parse(o),_o(t));da(t,la,n)},pa=(e,t,o)=>{const n=ua(t);w(o)||""===o?Hn(e,n):Rn(e,n,((e,t)=>C(e)?Ee(ca,t)?e+"":e+"px":e)(o,n))},ga=(e,t={})=>{const o={},n=window,r={};let i=0;const s=os.forElement(uo.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),a=[],l=t.schema?t.schema:Fs({}),c=Ys({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),d=t.ownEvents?new ia:ia.Event,u=l.getBlockElements(),h=t=>t&&e&&p(t)?e.getElementById(t):t,m=e=>{const t=h(e);return _(t)?uo.fromDom(t):null},g=(e,t,o="")=>{let n;const r=m(e);if(_(r)&&Eo(r)){const e=G[t];n=e&&e.get?e.get(r.dom,t):fn(r,t)}return _(n)?n:o},v=e=>{const t=h(e);return w(t)?[]:t.attributes},y=(e,o,n)=>{D(e,(e=>{if(Kr(e)){const r=uo.fromDom(e),i=""===n?null:n,s=fn(r,o),a=G[o];a&&a.set?a.set(r.dom,i,o):da(r,o,i),s!==i&&t.onSetAttrib&&t.onSetAttrib({attrElm:r.dom,attrName:o,attrValue:i})}}))},x=()=>t.root_element||e.body,C=(t,o)=>es(e.body,h(t),o),k=(e,t,o)=>{const n=h(e);var r;if(!w(n)&&(Xr(n)||Kr(r=n)&&"http://www.w3.org/2000/svg"===r.namespaceURI))return o?In(uo.fromDom(n),ua(t)):("float"===(t=t.replace(/-(\D)/g,((e,t)=>t.toUpperCase())))&&(t="cssFloat"),n.style?n.style[t]:void 0)},T=e=>{const t=h(e);if(!t)return{w:0,h:0};let o=k(t,"width"),n=k(t,"height");return o&&-1!==o.indexOf("px")||(o="0"),n&&-1!==n.indexOf("px")||(n="0"),{w:parseInt(o,10)||t.offsetWidth||t.clientWidth,h:parseInt(n,10)||t.offsetHeight||t.clientHeight}},O=(e,t)=>{if(!e)return!1;const o=b(e)?e:[e];return $(o,(e=>bo(uo.fromDom(e),t)))},M=(e,t,o,n)=>{const r=[];let i=h(e);n=void 0===n;const s=o||("BODY"!==x().nodeName?x().parentNode:null);if(p(t))if("*"===t)t=Kr;else{const e=t;t=t=>O(t,e)}for(;i&&!(i===s||w(i.nodeType)||ci(i)||di(i));){if(!t||t(i)){if(!n)return[i];r.push(i)}i=i.parentNode}return n?r:null},P=(e,t,o)=>{let n=t;if(e){p(t)&&(n=e=>O(e,t));for(let t=e[o];t;t=t[o])if(S(n)&&n(t))return t}return null},D=function(e,t,o){const n=null!=o?o:this;if(b(e)){const o=[];return sa(e,((e,r)=>{const i=h(e);i&&o.push(t.call(n,i,r))})),o}{const o=h(e);return!!o&&t.call(n,o)}},L=(e,t)=>{D(e,(e=>{be(t,((t,o)=>{y(e,o,t)}))}))},R=(e,t)=>{D(e,(e=>{const o=uo.fromDom(e);Mn(o,t)}))},N=(t,o,n,r,i)=>D(t,(t=>{const s=p(o)?e.createElement(o):o;return _(n)&&L(s,n),r&&(!p(r)&&r.nodeType?s.appendChild(r):p(r)&&R(s,r)),i?s:t.appendChild(s)})),I=(t,o,n)=>N(e.createElement(t),t,o,n,!0),B=xs.encodeAllRaw,z=(e,t)=>D(e,(e=>{const o=uo.fromDom(e);return t&&q(jo(o),(e=>{To(e)&&0===e.dom.length?_n(e):an(o,e)})),_n(o),o.dom})),F=(e,t,o)=>{D(e,(e=>{if(Kr(e)){const n=uo.fromDom(e),r=t.split(" ");q(r,(e=>{if(_(o)){(o?hr:pr)(n,e)}else gr(n,e)}))}}))},H=(e,t,o)=>D(t,(n=>{var r;const i=b(t)?e.cloneNode(!0):e;return o&&sa(aa(n.childNodes),(e=>{i.appendChild(e)})),null===(r=n.parentNode)||void 0===r||r.replaceChild(i,n),n})),j=()=>e.createRange(),V=(o,r,i,s)=>{if(b(o)){let e=o.length;const t=[];for(;e--;)t[e]=V(o[e],r,i,s);return t}return!t.collect||o!==e&&o!==n||a.push([o,r,i,s]),d.bind(o,r,i,s||W)},U=(t,o,r)=>{if(b(t)){let e=t.length;const n=[];for(;e--;)n[e]=U(t[e],o,r);return n}if(a.length>0&&(t===e||t===n)){let e=a.length;for(;e--;){const[n,i,s]=a[e];t!==n||o&&o!==i||r&&r!==s||d.unbind(n,i,s)}}return d.unbind(t,o,r)},Z=e=>{if(e&&Xr(e)){const t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},W={doc:e,settings:t,win:n,files:r,stdMode:!0,boxModel:!0,styleSheetLoader:s,boundEvents:a,styles:c,schema:l,events:d,isBlock:e=>p(e)?Ee(u,e):Kr(e)&&(Ee(u,e.nodeName)||Gi(l,e)),root:null,clone:(e,t)=>e.cloneNode(t),getRoot:x,getViewPort:e=>{const t=Vr(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect:e=>{const t=h(e),o=C(t),n=T(t);return{x:o.x,y:o.y,w:n.w,h:n.h}},getSize:T,getParent:(e,t,o)=>{const n=M(e,t,o,!1);return n&&n.length>0?n[0]:null},getParents:M,get:h,getNext:(e,t)=>P(e,t,"nextSibling"),getPrev:(e,t)=>P(e,t,"previousSibling"),select:(o,n)=>{var r,i;const s=null!==(i=null!==(r=h(n))&&void 0!==r?r:t.root_element)&&void 0!==i?i:e;return S(s.querySelectorAll)?he(s.querySelectorAll(o)):[]},is:O,add:N,create:I,createHTML:(e,t,o="")=>{let n="<"+e;for(const e in t)Te(t,e)&&(n+=" "+e+'="'+B(t[e])+'"');return nt(o)&&Ee(l.getVoidElements(),e)?n+" />":n+">"+o+"</"+e+">"},createFragment:t=>{const o=e.createElement("div"),n=e.createDocumentFragment();let r;for(n.appendChild(o),t&&(o.innerHTML=t);r=o.firstChild;)n.appendChild(r);return n.removeChild(o),n},remove:z,setStyle:(e,o,n)=>{D(e,(e=>{const r=uo.fromDom(e);pa(r,o,n),t.update_styles&&ma(c,r)}))},getStyle:k,setStyles:(e,o)=>{D(e,(e=>{const n=uo.fromDom(e);be(o,((e,t)=>{pa(n,t,e)})),t.update_styles&&ma(c,n)}))},removeAllAttribs:e=>D(e,(e=>{const t=e.attributes;for(let o=t.length-1;o>=0;o--)e.removeAttributeNode(t.item(o))})),setAttrib:y,setAttribs:L,getAttrib:g,getPos:C,parseStyle:e=>c.parse(e),serializeStyle:(e,t)=>c.serialize(e,t),addStyle:t=>{if(W!==ga.DOM&&e===document){if(o[t])return;o[t]=!0}let n=e.getElementById("mceDefaultStyles");if(!n){n=e.createElement("style"),n.id="mceDefaultStyles",n.type="text/css";const t=e.head;t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}n.styleSheet?n.styleSheet.cssText+=t:n.appendChild(e.createTextNode(t))},loadCSS:e=>{e||(e=""),q(e.split(","),(e=>{r[e]=!0,s.load(e).catch(E)}))},addClass:(e,t)=>{F(e,t,!0)},removeClass:(e,t)=>{F(e,t,!1)},hasClass:(e,t)=>{const o=m(e),n=t.split(" ");return _(o)&&re(n,(e=>fr(o,e)))},toggleClass:F,show:e=>{D(e,(e=>Hn(uo.fromDom(e),"display")))},hide:e=>{D(e,(e=>Rn(uo.fromDom(e),"display","none")))},isHidden:e=>{const t=m(e);return _(t)&&He(zn(t,"display"),"none")},uniqueId:e=>(e||"mce_")+i++,setHTML:R,getOuterHTML:e=>{const t=m(e);return _(t)?Kr(t.dom)?t.dom.outerHTML:(e=>{const t=uo.fromTag("div"),o=uo.fromDom(e.dom.cloneNode(!0));return dn(t,o),An(t)})(t):""},setOuterHTML:(e,t)=>{D(e,(e=>{Kr(e)&&(e.outerHTML=t)}))},decode:xs.decode,encode:B,insertAfter:(e,t)=>{const o=h(t);return D(e,(e=>{const t=null==o?void 0:o.parentNode,n=null==o?void 0:o.nextSibling;return t&&(n?t.insertBefore(e,n):t.appendChild(e)),e}))},replace:H,rename:(e,t)=>{if(e.nodeName!==t.toUpperCase()){const o=I(t);return sa(v(e),(t=>{y(o,t.nodeName,g(e,t.nodeName))})),H(o,e,!0),o}return e},findCommonAncestor:(e,t)=>{let o=e;for(;o;){let e=t;for(;e&&o!==e;)e=e.parentNode;if(o===e)break;o=o.parentNode}return!o&&e.ownerDocument?e.ownerDocument.documentElement:o},run:D,getAttribs:v,isEmpty:(e,t,o)=>{if(f(t)){const n=e=>{const o=e.nodeName.toLowerCase();return Boolean(t[o])};return Ai(l,e,{...o,isContent:n})}return Ai(l,e,o)},createRng:j,nodeIndex:ha,split:(e,t,o)=>{let n,r,i=j();if(e&&t&&e.parentNode&&t.parentNode){const s=e.parentNode;return i.setStart(s,ha(e)),i.setEnd(t.parentNode,ha(t)),n=i.extractContents(),i=j(),i.setStart(t.parentNode,ha(t)+1),i.setEnd(s,ha(e)+1),r=i.extractContents(),s.insertBefore(ss(W,n,l),e),o?s.insertBefore(o,e):s.insertBefore(t,e),s.insertBefore(ss(W,r,l),e),z(e),o||t}},bind:V,unbind:U,fire:(e,t,o)=>d.dispatch(e,t,o),dispatch:(e,t,o)=>d.dispatch(e,t,o),getContentEditable:Z,getContentEditableParent:e=>{const t=x();let o=null;for(let n=e;n&&n!==t&&(o=Z(n),null===o);n=n.parentNode);return o},isEditable:e=>{if(_(e)){const t=Kr(e)?e:e.parentElement;return _(t)&&Xr(t)&&br(uo.fromDom(t))}return!1},destroy:()=>{if(a.length>0){let e=a.length;for(;e--;){const[t,o,n]=a[e];d.unbind(t,o,n)}}be(r,((e,t)=>{s.unload(t),delete r[t]}))},isChildOf:(e,t)=>e===t||t.contains(e),dumpRng:e=>"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},G=((e,t,o)=>{const n=t.keep_values,r={set:(e,n,r)=>{const i=uo.fromDom(e);S(t.url_converter)&&_(n)&&(n=t.url_converter.call(t.url_converter_scope||o(),String(n),r,e)),da(i,"data-mce-"+r,n),da(i,r,n)},get:(e,t)=>{const o=uo.fromDom(e);return fn(o,"data-mce-"+t)||fn(o,t)}},i={style:{set:(t,o)=>{const r=uo.fromDom(t);n&&da(r,la,o),yn(r,"style"),p(o)&&Nn(r,e.parse(o))},get:t=>{const o=uo.fromDom(t),n=fn(o,la)||fn(o,"style");return e.serialize(e.parse(n),_o(o))}}};return n&&(i.href=i.src=r),i})(c,t,A(W));return W};ga.DOM=ga(document),ga.nodeIndex=ha;const fa=ga.DOM;class ba{constructor(e={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=e}_setReferrerPolicy(e){this.settings.referrerPolicy=e}loadScript(e){return new Promise(((t,o)=>{const n=fa;let r;const i=()=>{n.remove(s),r&&(r.onerror=r.onload=r=null)},s=n.uniqueId();r=document.createElement("script"),r.id=s,r.type="text/javascript",r.src=lo._addCacheSuffix(e),this.settings.referrerPolicy&&n.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=()=>{i(),t()},r.onerror=()=>{i(),o("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(r)}))}isDone(e){return 2===this.states[e]}markDone(e){this.states[e]=2}add(e){const t=this;t.queue.push(e);return void 0===t.states[e]&&(t.states[e]=0),new Promise(((o,n)=>{t.scriptLoadedCallbacks[e]||(t.scriptLoadedCallbacks[e]=[]),t.scriptLoadedCallbacks[e].push({resolve:o,reject:n})}))}load(e){return this.add(e)}remove(e){delete this.states[e],delete this.scriptLoadedCallbacks[e]}loadQueue(){const e=this.queue;return this.queue=[],this.loadScripts(e)}loadScripts(e){const t=this,o=(e,o)=>{ke(t.scriptLoadedCallbacks,o).each((t=>{q(t,(t=>t[e](o)))})),delete t.scriptLoadedCallbacks[o]},n=e=>{const t=K(e,(e=>"rejected"===e.status));return t.length>0?Promise.reject(ne(t,(({reason:e})=>b(e)?e:[e]))):Promise.resolve()},r=e=>Promise.allSettled(W(e,(e=>2===t.states[e]?(o("resolve",e),Promise.resolve()):3===t.states[e]?(o("reject",e),Promise.reject(e)):(t.states[e]=1,t.loadScript(e).then((()=>{t.states[e]=2,o("resolve",e);const i=t.queue;return i.length>0?(t.queue=[],r(i).then(n)):Promise.resolve()}),(()=>(t.states[e]=3,o("reject",e),Promise.reject(e)))))))),i=e=>(t.loading=!0,r(e).then((e=>{t.loading=!1;const o=t.queueLoadedCallbacks.shift();return F.from(o).each(I),n(e)}))),s=ut(e);return t.loading?new Promise(((e,o)=>{t.queueLoadedCallbacks.push((()=>{i(s).then(e,o)}))})):i(s)}}ba.ScriptLoader=new ba;const va={},ya=Ae("en"),xa=()=>ke(va,ya.get()),wa={getData:()=>ve(va,(e=>({...e}))),setCode:e=>{e&&ya.set(e)},getCode:()=>ya.get(),add:(e,t)=>{let o=va[e];o||(va[e]=o={});const n=W(ge(t),(e=>e.toLowerCase()));be(t,((e,r)=>{const i=r.toLowerCase();i!==r&&((e,t)=>{const o=e.indexOf(t);return-1!==o&&e.indexOf(t,o+1)>o})(n,i)?(Ee(t,i)||(o[i]=e),o[r]=e):o[i]=e}))},translate:e=>{const t=xa().getOr({}),o=e=>S(e)?Object.prototype.toString.call(e):n(e)?"":""+e,n=e=>""===e||null==e,r=e=>{const n=o(e);return Ee(t,n)?o(t[n]):ke(t,n.toLowerCase()).map(o).getOr(n)},i=e=>e.replace(/{context:\w+}$/,"");if(n(e))return"";if(g(s=e)&&Ee(s,"raw"))return o(e.raw);var s;if((e=>b(e)&&e.length>1)(e)){const t=e.slice(1);return i(r(e[0]).replace(/\{([0-9]+)\}/g,((e,n)=>Ee(t,n)?o(t[n]):e)))}return i(r(e))},isRtl:()=>xa().bind((e=>ke(e,"_dir"))).exists((e=>"rtl"===e)),hasCode:e=>Ee(va,e)},_a=()=>{const e=[],t={},o={},n=[],r=(e,t)=>{const o=K(n,(o=>o.name===e&&o.state===t));q(o,(e=>e.resolve()))},i=e=>Ee(t,e),s=(e,o)=>{const n=wa.getCode();!n||o&&-1===(","+(o||"")+",").indexOf(","+n+",")||ba.ScriptLoader.add(t[e]+"/langs/"+n+".js")},a=(e,t="added")=>"added"===t&&(e=>Ee(o,e))(e)||"loaded"===t&&i(e)?Promise.resolve():new Promise((o=>{n.push({name:e,state:t,resolve:o})}));return{items:e,urls:t,lookup:o,get:e=>{if(o[e])return o[e].instance},requireLangPack:(e,t)=>{!1!==_a.languageLoad&&(i(e)?s(e,t):a(e,"loaded").then((()=>s(e,t))))},add:(t,n)=>(e.push(n),o[t]={instance:n},r(t,"added"),n),remove:e=>{delete t[e],delete o[e]},createUrl:(e,t)=>p(t)?p(e)?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}:t,load:(e,n)=>{if(t[e])return Promise.resolve();let i=p(n)?n:n.prefix+n.resource+n.suffix;0!==i.indexOf("/")&&-1===i.indexOf("://")&&(i=_a.baseURL+"/"+i),t[e]=i.substring(0,i.lastIndexOf("/"));const s=()=>(r(e,"loaded"),Promise.resolve());return o[e]?s():ba.ScriptLoader.add(i).then(s)},waitFor:a}};_a.languageLoad=!0,_a.baseURL="",_a.PluginManager=_a(),_a.ThemeManager=_a(),_a.ModelManager=_a();const Sa=A("mce-annotation"),Ca=A("data-mce-annotation"),ka=A("data-mce-annotation-uid"),Ea=A("data-mce-annotation-active"),Ta=A("data-mce-annotation-classes"),Oa=A("data-mce-annotation-attrs"),Aa=e=>t=>yo(t,e),Ma=(e,t)=>{const o=e.selection.getRng(),n=uo.fromDom(o.startContainer),r=uo.fromDom(e.getBody()),i=t.fold((()=>"."+Sa()),(e=>`[${Ca()}="${e}"]`)),s=Vo(n,o.startOffset).getOr(n);return ar(s,i,Aa(r)).bind((t=>bn(t,`${ka()}`).bind((o=>bn(t,`${Ca()}`).map((t=>{const n=Da(e,o);return{uid:o,name:t,elements:n}}))))))},Pa=(e,t)=>vn(e,"data-mce-bogus")||((e,t,o)=>ir(e,t,o).isSome())(e,'[data-mce-bogus="all"]',Aa(t)),Da=(e,t)=>{const o=uo.fromDom(e.getBody()),n=wr(o,`[${ka()}="${t}"]`);return K(n,(e=>!Pa(e,o)))},La=(e,t)=>{const o=uo.fromDom(e.getBody()),n=wr(o,`[${Ca()}="${t}"]`),r={};return q(n,(e=>{if(!Pa(e,o)){const t=fn(e,ka()),o=ke(r,t).getOr([]);r[t]=o.concat([e])}})),r},Ra=(e,t)=>{const o=Ae({}),n=()=>({listeners:[],previous:We()}),r=(e,t)=>{i(e,(e=>(t(e),e)))},i=(e,t)=>{const r=o.get(),i=t(ke(r,e).getOrThunk(n));r[e]=i,o.set(r)},s=(t,o)=>{q(Da(e,t),(e=>{o?pn(e,Ea(),"true"):yn(e,Ea())}))},a=st((()=>{const o=le(t.getNames());q(o,(t=>{i(t,(o=>{const n=o.previous.get();return Ma(e,F.some(t)).fold((()=>{n.each((e=>{(e=>{r(e,(t=>{q(t.listeners,(t=>t(!1,e)))}))})(t),o.previous.clear(),s(e,!1)}))}),(({uid:e,name:t,elements:i})=>{He(n,e)||(n.each((e=>s(e,!1))),((e,t,o)=>{r(e,(n=>{q(n.listeners,(n=>n(!0,e,{uid:t,nodes:W(o,(e=>e.dom))})))}))})(t,e,i),o.previous.set(e),s(e,!0))})),{previous:o.previous,listeners:o.listeners}}))}))}),30);e.on("remove",(()=>{a.cancel()})),e.on("NodeChange",(()=>{a.throttle()}));return{addListener:(e,t)=>{i(e,(e=>({previous:e.previous,listeners:e.listeners.concat([t])})))}}},Na=(e,t,o=B)=>{const n=new Ur(e,t),r=e=>{let t;do{t=n[e]()}while(t&&!ii(t)&&!o(t));return F.from(t).filter(ii)};return{current:()=>F.from(n.current()).filter(ii),next:()=>r("next"),prev:()=>r("prev"),prev2:()=>r("prev2")}},Ia=(e,t)=>{const o=t||(t=>e.isBlock(t)||ui(t)||gi(t)),n=(e,t,o,r)=>{if(ii(e)){const o=r(e,t,e.data);if(-1!==o)return F.some({container:e,offset:o})}return o().bind((e=>n(e.container,e.offset,o,r)))};return{backwards:(t,r,i,s)=>{const a=Na(t,null!=s?s:e.getRoot(),o);return n(t,r,(()=>a.prev().map((e=>({container:e,offset:e.length})))),i).getOrNull()},forwards:(t,r,i,s)=>{const a=Na(t,null!=s?s:e.getRoot(),o);return n(t,r,(()=>a.next().map((e=>({container:e,offset:0})))),i).getOrNull()}}},Ba=e=>{let t;return o=>(t=t||ae(e,z),Ee(t,_o(o)))},za=e=>Eo(e)&&"br"===_o(e),Fa=Ba(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),Ha=Ba(["ul","ol","dl"]),ja=Ba(["li","dd","dt"]),Va=Ba(["thead","tbody","tfoot"]),Ua=Ba(["td","th"]),Za=Ba(["pre","script","textarea","style"]),$a=e=>{const t=wr(e,"br"),o=K((e=>{const t=[];let o=e.dom;for(;o;)t.push(uo.fromDom(o)),o=o.lastChild;return t})(e).slice(-1),za);t.length===o.length&&q(o,_n)},Wa=()=>{const e=uo.fromTag("br");return pn(e,"data-mce-bogus","1"),e},qa=e=>{wn(e),dn(e,Wa())},Ga=lt,Ya=dt,Ka=e=>e.replace(/\uFEFF/g,""),Xa=Kr,Ja=ii,Qa=e=>(Ja(e)&&(e=e.parentNode),Xa(e)&&e.hasAttribute("data-mce-caret")),el=e=>Ja(e)&&Ya(e.data),tl=e=>Qa(e)||el(e),ol=e=>e.firstChild!==e.lastChild||!ui(e.firstChild),nl=e=>{const t=e.container();return!!ii(t)&&(t.data.charAt(e.offset())===Ga||e.isAtStart()&&el(t.previousSibling))},rl=e=>{const t=e.container();return!!ii(t)&&(t.data.charAt(e.offset()-1)===Ga||e.isAtEnd()&&el(t.nextSibling))},il=e=>Ja(e)&&e.data[0]===Ga,sl=e=>Ja(e)&&e.data[e.data.length-1]===Ga,al=e=>e&&e.hasAttribute("data-mce-caret")?((e=>{var t;const o=e.getElementsByTagName("br"),n=o[o.length-1];ti(n)&&(null===(t=n.parentNode)||void 0===t||t.removeChild(n))})(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,ll=e=>Qa(e.startContainer),cl=Math.round,dl=e=>e?{left:cl(e.left),top:cl(e.top),bottom:cl(e.bottom),right:cl(e.right),width:cl(e.width),height:cl(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},ul=(e,t)=>(e=dl(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),hl=(e,t,o)=>e>=0&&e<=Math.min(t.height,o.height)/2,ml=(e,t)=>{const o=Math.min(t.height/2,e.height/2);return e.bottom-o<t.top||!(e.top>t.bottom)&&hl(t.top-e.bottom,e,t)},pl=(e,t)=>e.top>t.bottom||!(e.bottom<t.top)&&hl(t.bottom-e.top,e,t),gl=(e,t,o)=>{const n=Math.max(Math.min(t,e.left+e.width),e.left),r=Math.max(Math.min(o,e.top+e.height),e.top);return Math.sqrt((t-n)*(t-n)+(o-r)*(o-r))},fl=e=>{const t=e.startContainer,o=e.startOffset;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===o+1?t.childNodes[o]:null},bl=(e,t)=>{if(Kr(e)&&e.hasChildNodes()){const o=e.childNodes,n=((e,t,o)=>Math.min(Math.max(e,t),o))(t,0,o.length-1);return o[n]}return e},vl=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯ﾞ-ﾟ]"),yl=e=>p(e)&&e.charCodeAt(0)>=768&&vl.test(e),xl=pi,wl=gi,_l=ui,Sl=ii,Cl=Qr(["script","style","textarea"]),kl=Qr(["img","input","textarea","hr","iframe","video","audio","object","embed"]),El=Qr(["table"]),Tl=tl,Ol=e=>!Tl(e)&&(Sl(e)?!Cl(e.parentNode):kl(e)||_l(e)||El(e)||Al(e)),Al=e=>!(e=>Kr(e)&&"true"===e.getAttribute("unselectable"))(e)&&wl(e),Ml=(e,t)=>Ol(e)&&((e,t)=>{for(let o=e.parentNode;o&&o!==t;o=o.parentNode){if(Al(o))return!1;if(xl(o))return!0}return!0})(e,t),Pl=Kr,Dl=Ol,Ll=ei("display","block table"),Rl=ei("float","left right"),Nl=((...e)=>t=>{for(let o=0;o<e.length;o++)if(!e[o](t))return!1;return!0})(Pl,Dl,L(Rl)),Il=L(ei("white-space","pre pre-line pre-wrap")),Bl=ii,zl=ui,Fl=ga.nodeIndex,Hl=(e,t)=>t<0&&Kr(e)&&e.hasChildNodes()?void 0:bl(e,t),jl=e=>e?e.createRange():ga.DOM.createRng(),Vl=e=>p(e)&&/[\r\n\t ]/.test(e),Ul=e=>!!e.setStart&&!!e.setEnd,Zl=e=>{const t=e.startContainer,o=e.startOffset;if(Vl(e.toString())&&Il(t.parentNode)&&ii(t)){const e=t.data;if(Vl(e[o-1])||Vl(e[o+1]))return!0}return!1},$l=e=>0===e.left&&0===e.right&&0===e.top&&0===e.bottom,Wl=e=>{var t;let o;const n=e.getClientRects();return o=n.length>0?dl(n[0]):dl(e.getBoundingClientRect()),!Ul(e)&&zl(e)&&$l(o)?(e=>{const t=e.ownerDocument,o=jl(t),n=t.createTextNode(ct),r=e.parentNode;r.insertBefore(n,e),o.setStart(n,0),o.setEnd(n,1);const i=dl(o.getBoundingClientRect());return r.removeChild(n),i})(e):$l(o)&&Ul(e)&&null!==(t=(e=>{const t=e.startContainer,o=e.endContainer,n=e.startOffset,r=e.endOffset;if(t===o&&ii(o)&&0===n&&1===r){const t=e.cloneRange();return t.setEndAfter(o),Wl(t)}return null})(e))&&void 0!==t?t:o},ql=(e,t)=>{const o=ul(e,t);return o.width=1,o.right=o.left+1,o},Gl=e=>{const t=[],o=e=>{var o,n;0!==e.height&&(t.length>0&&(o=e,n=t[t.length-1],o.left===n.left&&o.top===n.top&&o.bottom===n.bottom&&o.right===n.right)||t.push(e))},n=(e,t)=>{const n=jl(e.ownerDocument);if(t<e.data.length){if(yl(e.data[t]))return;if(yl(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Zl(n)))return void o(ql(Wl(n),!1))}t>0&&(n.setStart(e,t-1),n.setEnd(e,t),Zl(n)||o(ql(Wl(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Zl(n)||o(ql(Wl(n),!0)))},r=e.container(),i=e.offset();if(Bl(r))return n(r,i),t;if(Pl(r))if(e.isAtEnd()){const e=Hl(r,i);Bl(e)&&n(e,e.data.length),Nl(e)&&!zl(e)&&o(ql(Wl(e),!1))}else{const s=Hl(r,i);if(Bl(s)&&n(s,0),Nl(s)&&e.isAtEnd())return o(ql(Wl(s),!1)),t;const a=Hl(e.container(),e.offset()-1);Nl(a)&&!zl(a)&&(Ll(a)||Ll(s)||!Nl(s))&&o(ql(Wl(a),!1)),Nl(s)&&o(ql(Wl(s),!0))}return t},Yl=(e,t,o)=>{const n=()=>(o||(o=Gl(Yl(e,t))),o);return{container:A(e),offset:A(t),toRange:()=>{const o=jl(e.ownerDocument);return o.setStart(e,t),o.setEnd(e,t),o},getClientRects:n,isVisible:()=>n().length>0,isAtStart:()=>(Bl(e),0===t),isAtEnd:()=>Bl(e)?t>=e.data.length:t>=e.childNodes.length,isEqual:o=>o&&e===o.container()&&t===o.offset(),getNode:o=>Hl(e,o?t-1:t)}};Yl.fromRangeStart=e=>Yl(e.startContainer,e.startOffset),Yl.fromRangeEnd=e=>Yl(e.endContainer,e.endOffset),Yl.after=e=>Yl(e.parentNode,Fl(e)+1),Yl.before=e=>Yl(e.parentNode,Fl(e)),Yl.isAbove=(e,t)=>Ve(de(t.getClientRects()),ue(e.getClientRects()),ml).getOr(!1),Yl.isBelow=(e,t)=>Ve(ue(t.getClientRects()),de(e.getClientRects()),pl).getOr(!1),Yl.isAtStart=e=>!!e&&e.isAtStart(),Yl.isAtEnd=e=>!!e&&e.isAtEnd(),Yl.isTextPosition=e=>!!e&&ii(e.container()),Yl.isElementPosition=e=>!Yl.isTextPosition(e);const Kl=(e,t)=>{ii(t)&&0===t.data.length&&e.remove(t)},Xl=(e,t,o)=>{di(o)?((e,t,o)=>{const n=F.from(o.firstChild),r=F.from(o.lastChild);t.insertNode(o),n.each((t=>Kl(e,t.previousSibling))),r.each((t=>Kl(e,t.nextSibling)))})(e,t,o):((e,t,o)=>{t.insertNode(o),Kl(e,o.previousSibling),Kl(e,o.nextSibling)})(e,t,o)},Jl=ii,Ql=ti,ec=ga.nodeIndex,tc=e=>{const t=e.parentNode;return Ql(t)?tc(t):t},oc=e=>e?bt(e.childNodes,((e,t)=>(Ql(t)&&"BR"!==t.nodeName?e=e.concat(oc(t)):e.push(t),e)),[]):[],nc=e=>t=>e===t,rc=e=>(Jl(e)?"text()":e.nodeName.toLowerCase())+"["+(e=>{let t,o;t=oc(tc(e)),o=vt(t,nc(e),e),t=t.slice(0,o+1);const n=bt(t,((e,o,n)=>(Jl(o)&&Jl(t[n-1])&&e++,e)),0);return t=ft(t,Qr([e.nodeName])),o=vt(t,nc(e),e),o-n})(e)+"]",ic=(e,t)=>{let o,n=[],r=t.container(),i=t.offset();if(Jl(r))o=((e,t)=>{let o=e;for(;(o=o.previousSibling)&&Jl(o);)t+=o.data.length;return t})(r,i);else{const e=r.childNodes;i>=e.length?(o="after",i=e.length-1):o="before",r=e[i]}n.push(rc(r));let s=((e,t,o)=>{const n=[];for(let r=t.parentNode;r&&r!==e&&(!o||!o(r));r=r.parentNode)n.push(r);return n})(e,r);return s=ft(s,L(ti)),n=n.concat(gt(s,(e=>rc(e)))),n.reverse().join("/")+","+o},sc=(e,t)=>{if(!t)return null;const o=t.split(","),n=o[0].split("/"),r=o.length>1?o[1]:"before",i=bt(n,((e,t)=>{const o=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return o?("text()"===o[1]&&(o[1]="#text"),((e,t,o)=>{let n=oc(e);return n=ft(n,((e,t)=>!Jl(e)||!Jl(n[t-1]))),n=ft(n,Qr([t])),n[o]})(e,o[1],parseInt(o[2],10))):null}),e);if(!i)return null;if(!Jl(i)&&i.parentNode){let e;return e="after"===r?ec(i)+1:ec(i),Yl(i.parentNode,e)}return((e,t)=>{let o=e,n=0;for(;Jl(o);){const r=o.data.length;if(t>=n&&t<=n+r){e=o,t-=n;break}if(!Jl(o.nextSibling)){e=o,t=r;break}n+=r,o=o.nextSibling}return Jl(e)&&t>e.data.length&&(t=e.data.length),Yl(e,t)})(i,parseInt(r,10))},ac=gi,lc=(e,t,o,n,r)=>{const i=r?n.startContainer:n.endContainer;let s=r?n.startOffset:n.endOffset;const a=[],l=e.getRoot();if(ii(i))a.push(o?((e,t,o)=>{let n=e(t.data.slice(0,o)).length;for(let o=t.previousSibling;o&&ii(o);o=o.previousSibling)n+=e(o.data).length;return n})(t,i,s):s);else{let t=0;const n=i.childNodes;s>=n.length&&n.length&&(t=1,s=Math.max(0,n.length-1)),a.push(e.nodeIndex(n[s],o)+t)}for(let t=i;t&&t!==l;t=t.parentNode)a.push(e.nodeIndex(t,o));return a},cc=(e,t,o)=>{let n=0;return lo.each(e.select(t),(e=>"all"===e.getAttribute("data-mce-bogus")?void 0:e!==o&&void n++)),n},dc=(e,t)=>{let o=t?e.startContainer:e.endContainer,n=t?e.startOffset:e.endOffset;if(Kr(o)&&"TR"===o.nodeName){const r=o.childNodes;o=r[Math.min(t?n:n-1,r.length-1)],o&&(n=t?0:o.childNodes.length,t?e.setStart(o,n):e.setEnd(o,n))}},uc=e=>(dc(e,!0),dc(e,!1),e),hc=(e,t)=>{if(Kr(e)&&(e=bl(e,t),ac(e)))return e;if(tl(e)){ii(e)&&Qa(e)&&(e=e.parentNode);let t=e.previousSibling;if(ac(t))return t;if(t=e.nextSibling,ac(t))return t}},mc=(e,t,o)=>{const n=o.getNode(),r=o.getRng();if("IMG"===n.nodeName||ac(n)){const e=n.nodeName;return{name:e,index:cc(o.dom,e,n)}}const i=(e=>hc(e.startContainer,e.startOffset)||hc(e.endContainer,e.endOffset))(r);if(i){const e=i.tagName;return{name:e,index:cc(o.dom,e,i)}}return((e,t,o,n)=>{const r=t.dom,i=lc(r,e,o,n,!0),s=t.isForward(),a=ll(n)?{isFakeCaret:!0}:{};return t.isCollapsed()?{start:i,forward:s,...a}:{start:i,end:lc(r,e,o,n,!1),forward:s,...a}})(e,o,t,r)},pc=(e,t,o)=>{const n={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return o?e.create("span",n,"&#xFEFF;"):e.create("span",n)},gc=(e,t)=>{const o=e.dom;let n=e.getRng();const r=o.uniqueId(),i=e.isCollapsed(),s=e.getNode(),a=s.nodeName,l=e.isForward();if("IMG"===a)return{name:a,index:cc(o,a,s)};const c=uc(n.cloneRange());if(!i){c.collapse(!1);const e=pc(o,r+"_end",t);Xl(o,c,e)}n=uc(n),n.collapse(!0);const d=pc(o,r+"_start",t);return Xl(o,n,d),e.moveToBookmark({id:r,keep:!0,forward:l}),{id:r,forward:l}},fc=(e,t,o=!1)=>2===t?mc(Ka,o,e):3===t?(e=>{const t=e.getRng();return{start:ic(e.dom.getRoot(),Yl.fromRangeStart(t)),end:ic(e.dom.getRoot(),Yl.fromRangeEnd(t)),forward:e.isForward()}})(e):t?(e=>({rng:e.getRng(),forward:e.isForward()}))(e):gc(e,!1),bc=D(mc,M,!0),vc=e=>"inline-command"===e.type||"inline-format"===e.type,yc=e=>"block-command"===e.type||"block-format"===e.type,xc=e=>{var t;const o=t=>De.error({message:t,pattern:e}),n=(t,n,r)=>{if(void 0!==e.format){let r;if(b(e.format)){if(!re(e.format,p))return o(t+" pattern has non-string items in the `format` array");r=e.format}else{if(!p(e.format))return o(t+" pattern has non-string `format` parameter");r=[e.format]}return De.value(n(r))}return void 0!==e.cmd?p(e.cmd)?De.value(r(e.cmd,e.value)):o(t+" pattern has non-string `cmd` parameter"):o(t+" pattern is missing both `format` and `cmd` parameters")};if(!g(e))return o("Raw pattern is not an object");if(!p(e.start))return o("Raw pattern is missing `start` parameter");if(void 0!==e.end){if(!p(e.end))return o("Inline pattern has non-string `end` parameter");if(0===e.start.length&&0===e.end.length)return o("Inline pattern has empty `start` and `end` parameters");let t=e.start,r=e.end;return 0===r.length&&(r=t,t=""),n("Inline",(e=>({type:"inline-format",start:t,end:r,format:e})),((e,o)=>({type:"inline-command",start:t,end:r,cmd:e,value:o})))}if(void 0!==e.replacement)return p(e.replacement)?0===e.start.length?o("Replacement pattern has empty `start` parameter"):De.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):o("Replacement pattern has non-string `replacement` parameter");{const r=null!==(t=e.trigger)&&void 0!==t?t:"space";return 0===e.start.length?o("Block pattern has empty `start` parameter"):n("Block",(t=>({type:"block-format",start:e.start,format:t[0],trigger:r})),((t,o)=>({type:"block-command",start:e.start,cmd:t,value:o,trigger:r})))}},wc=e=>K(e,yc),_c=e=>K(e,vc),Sc=(e,t)=>({...e,blockPatterns:K(e.blockPatterns,(e=>((e,t)=>("block-command"===e.type||"block-format"===e.type)&&e.trigger===t)(e,t)))}),Cc=e=>{const t=(e=>{const t=[],o=[];return q(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{o.push(e)}))})),{errors:t,values:o}})(W(e,xc));return q(t.errors,(e=>console.error(e.message,e.pattern))),t.values},kc=(e,t,o)=>{e.dispatch(t,o)},Ec=(e,t,o,n)=>{e.dispatch("FormatApply",{format:t,node:o,vars:n})},Tc=(e,t,o,n)=>{e.dispatch("FormatRemove",{format:t,node:o,vars:n})},Oc=(e,t)=>e.dispatch("SetContent",t),Ac=(e,t)=>e.dispatch("GetContent",t),Mc=(e,t)=>{e.dispatch("AutocompleterUpdateActiveRange",t)},Pc=(e,t)=>e.dispatch("PastePlainTextToggle",{state:t}),Dc=Gt().deviceType,Lc=Dc.isTouch(),Rc=ga.DOM,Nc=e=>m(e,RegExp),Ic=e=>t=>t.options.get(e),Bc=e=>p(e)||g(e),zc=(e,t="")=>o=>{const n=p(o);if(n){if(-1!==o.indexOf("=")){const r=(e=>{const t=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return J(t,((e,t)=>{const o=t.split("="),n=o[0],r=o.length>1?o[1]:n;return e[Qe(n)]=Qe(r),e}),{})})(o);return{value:ke(r,e.id).getOr(t),valid:n}}return{value:o,valid:n}}return{valid:!1,message:"Must be a string."}},Fc=Ic("iframe_attrs"),Hc=Ic("doctype"),jc=Ic("document_base_url"),Vc=Ic("body_id"),Uc=Ic("body_class"),Zc=Ic("content_security_policy"),$c=Ic("br_in_pre"),Wc=Ic("forced_root_block"),qc=Ic("forced_root_block_attrs"),Gc=Ic("newline_behavior"),Yc=Ic("br_newline_selector"),Kc=Ic("no_newline_selector"),Xc=Ic("keep_styles"),Jc=Ic("end_container_on_empty_block"),Qc=Ic("automatic_uploads"),ed=Ic("images_reuse_filename"),td=Ic("images_replace_blob_uris"),od=Ic("icons"),nd=Ic("icons_url"),rd=Ic("images_upload_url"),id=Ic("images_upload_base_path"),sd=Ic("images_upload_credentials"),ad=Ic("images_upload_handler"),ld=Ic("content_css_cors"),cd=Ic("referrer_policy"),dd=Ic("language"),ud=Ic("language_url"),hd=Ic("indent_use_margin"),md=Ic("indentation"),pd=Ic("content_css"),gd=Ic("content_style"),fd=Ic("font_css"),bd=Ic("directionality"),vd=Ic("inline_boundaries_selector"),yd=Ic("object_resizing"),xd=Ic("resize_img_proportional"),wd=Ic("placeholder"),_d=Ic("event_root"),Sd=Ic("service_message"),Cd=Ic("theme"),kd=Ic("theme_url"),Ed=Ic("model"),Td=Ic("model_url"),Od=Ic("inline_boundaries"),Ad=Ic("formats"),Md=Ic("preview_styles"),Pd=Ic("format_empty_lines"),Dd=Ic("format_noneditable_selector"),Ld=Ic("custom_ui_selector"),Rd=Ic("inline"),Nd=Ic("hidden_input"),Id=Ic("submit_patch"),Bd=Ic("add_form_submit_trigger"),zd=Ic("add_unload_trigger"),Fd=Ic("custom_undo_redo_levels"),Hd=Ic("disable_nodechange"),jd=Ic("readonly"),Vd=Ic("editable_root"),Ud=Ic("content_css_cors"),Zd=Ic("plugins"),$d=Ic("external_plugins"),Wd=Ic("block_unsupported_drop"),qd=Ic("visual"),Gd=Ic("visual_table_class"),Yd=Ic("visual_anchor_class"),Kd=Ic("iframe_aria_text"),Xd=Ic("setup"),Jd=Ic("init_instance_callback"),Qd=Ic("urlconverter_callback"),eu=Ic("auto_focus"),tu=Ic("browser_spellcheck"),ou=Ic("protect"),nu=Ic("paste_block_drop"),ru=Ic("paste_data_images"),iu=Ic("paste_preprocess"),su=Ic("paste_postprocess"),au=Ic("newdocument_content"),lu=Ic("paste_webkit_styles"),cu=Ic("paste_remove_styles_if_webkit"),du=Ic("paste_merge_formats"),uu=Ic("smart_paste"),hu=Ic("paste_as_text"),mu=Ic("paste_tab_spaces"),pu=Ic("allow_html_data_urls"),gu=Ic("text_patterns"),fu=Ic("text_patterns_lookup"),bu=Ic("noneditable_class"),vu=Ic("editable_class"),yu=Ic("noneditable_regexp"),xu=Ic("preserve_cdata"),wu=Ic("highlight_on_focus"),_u=Ic("xss_sanitization"),Su=Ic("init_content_sync"),Cu=e=>lo.explode(e.options.get("images_file_types")),ku=Ic("table_tab_navigation"),Eu=Ic("details_initial_state"),Tu=Ic("details_serialized_state"),Ou=Ic("sandbox_iframes"),Au=e=>e.options.get("sandbox_iframes_exclusions"),Mu=Ic("convert_unsafe_embeds"),Pu=Ic("license_key"),Du=Ic("api_key"),Lu=Ic("disabled"),Ru=Kr,Nu=ii,Iu=e=>{const t=e.parentNode;t&&t.removeChild(e)},Bu=e=>{const t=Ka(e);return{count:e.length-t.length,text:t}},zu=e=>{let t;for(;-1!==(t=e.data.lastIndexOf(Ga));)e.deleteData(t,1)},Fu=(e,t)=>(Uu(e),t),Hu=(e,t)=>{const o=t.container(),n=((e,t)=>{const o=U(e,t);return-1===o?F.none():F.some(o)})(he(o.childNodes),e).map((e=>e<t.offset()?Yl(o,t.offset()-1):t)).getOr(t);return Uu(e),n},ju=(e,t)=>Nu(e)&&t.container()===e?((e,t)=>{const o=Bu(e.data.substr(0,t.offset())),n=Bu(e.data.substr(t.offset()));return(o.text+n.text).length>0?(zu(e),Yl(e,t.offset()-o.count)):t})(e,t):Fu(e,t),Vu=(e,t)=>Yl.isTextPosition(t)?ju(e,t):((e,t)=>t.container()===e.parentNode?Hu(e,t):Fu(e,t))(e,t),Uu=e=>{Ru(e)&&tl(e)&&(ol(e)?e.removeAttribute("data-mce-caret"):Iu(e)),Nu(e)&&(zu(e),0===e.data.length&&Iu(e))},Zu=gi,$u=yi,Wu=bi,qu=(e,t,o)=>{const n=ul(t.getBoundingClientRect(),o);let r,i;if("BODY"===e.tagName){const t=e.ownerDocument.documentElement;r=e.scrollLeft||t.scrollLeft,i=e.scrollTop||t.scrollTop}else{const t=e.getBoundingClientRect();r=e.scrollLeft-t.left,i=e.scrollTop-t.top}n.left+=r,n.right+=r,n.top+=i,n.bottom+=i,n.width=1;let s=t.offsetWidth-t.clientWidth;return s>0&&(o&&(s*=-1),n.left+=s,n.right+=s),n},Gu=(e,t,o,n)=>{const r=We();let i,s;const a=Wc(e),l=e.dom,c=()=>{(e=>{var t,o;const n=wr(uo.fromDom(e),"*[contentEditable=false],video,audio,embed,object");for(let e=0;e<n.length;e++){const r=n[e].dom;let i=r.previousSibling;if(sl(i)){const e=i.data;1===e.length?null===(t=i.parentNode)||void 0===t||t.removeChild(i):i.deleteData(e.length-1,1)}i=r.nextSibling,il(i)&&(1===i.data.length?null===(o=i.parentNode)||void 0===o||o.removeChild(i):i.deleteData(0,1))}})(t),s&&(Uu(s),s=null),r.on((e=>{l.remove(e.caret),r.clear()})),i&&(clearInterval(i),i=void 0)},d=()=>{i=window.setInterval((()=>{r.on((e=>{n()?l.toggleClass(e.caret,"mce-visual-caret-hidden"):l.addClass(e.caret,"mce-visual-caret-hidden")}))}),500)};return{isShowing:r.isSet,show:(e,n)=>{let i;if(c(),Wu(n))return null;if(!o(n))return s=((e,t)=>{var o;const n=(null!==(o=e.ownerDocument)&&void 0!==o?o:document).createTextNode(Ga),r=e.parentNode;if(t){const t=e.previousSibling;if(Ja(t)){if(tl(t))return t;if(sl(t))return t.splitText(t.data.length-1)}null==r||r.insertBefore(n,e)}else{const t=e.nextSibling;if(Ja(t)){if(tl(t))return t;if(il(t))return t.splitText(1),t}e.nextSibling?null==r||r.insertBefore(n,e.nextSibling):null==r||r.appendChild(n)}return n})(n,e),i=n.ownerDocument.createRange(),Ku(s.nextSibling)?(i.setStart(s,0),i.setEnd(s,0)):(i.setStart(s,1),i.setEnd(s,1)),i;{const o=((e,t,o)=>{var n;const r=(null!==(n=t.ownerDocument)&&void 0!==n?n:document).createElement(e);r.setAttribute("data-mce-caret",o?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(Wa().dom);const i=t.parentNode;return o?null==i||i.insertBefore(r,t):t.nextSibling?null==i||i.insertBefore(r,t.nextSibling):null==i||i.appendChild(r),r})(a,n,e),c=qu(t,n,e);l.setStyle(o,"top",c.top),l.setStyle(o,"caret-color","transparent"),s=o;const u=l.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});l.setStyles(u,{...c}),l.add(t,u),r.set({caret:u,element:n,before:e}),e&&l.addClass(u,"mce-visual-caret-before"),d(),i=n.ownerDocument.createRange(),i.setStart(o,0),i.setEnd(o,0)}return i},hide:c,getCss:()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}",reposition:()=>{r.on((e=>{const o=qu(t,e.element,e.before);l.setStyles(e.caret,{...o})}))},destroy:()=>clearInterval(i)}},Yu=()=>ro.browser.isFirefox(),Ku=e=>Zu(e)||$u(e),Xu=e=>(Ku(e)||oi(e)&&Yu())&&No(uo.fromDom(e)).exists(br),Ju=pi,Qu=gi,eh=yi,th=ei("display","block table table-cell table-row table-caption list-item"),oh=tl,nh=Qa,rh=Kr,ih=ii,sh=Ol,ah=e=>1===e,lh=e=>-1===e,ch=(e,t)=>{let o;for(;o=e(t);)if(!nh(o))return o;return null},dh=(e,t,o,n,r)=>{const i=new Ur(e,n),s=Qu(e)||nh(e);let a;if(lh(t)){if(s&&(a=ch(i.prev.bind(i),!0),o(a)))return a;for(;a=ch(i.prev.bind(i),r);)if(o(a))return a}if(ah(t)){if(s&&(a=ch(i.next.bind(i),!0),o(a)))return a;for(;a=ch(i.next.bind(i),r);)if(o(a))return a}return null},uh=(e,t)=>{for(;e&&e!==t;){if(th(e))return e;e=e.parentNode}return null},hh=(e,t,o)=>uh(e.container(),o)===uh(t.container(),o),mh=(e,t)=>{if(!t)return F.none();const o=t.container(),n=t.offset();return rh(o)?F.from(o.childNodes[n+e]):F.none()},ph=(e,t)=>{var o;const n=(null!==(o=t.ownerDocument)&&void 0!==o?o:document).createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},gh=(e,t,o)=>uh(t,e)===uh(o,e),fh=(e,t,o)=>{const n=e?"previousSibling":"nextSibling";let r=o;for(;r&&r!==t;){let e=r[n];if(e&&oh(e)&&(e=e[n]),Qu(e)||eh(e)){if(gh(t,e,r))return e;break}if(sh(e))break;r=r.parentNode}return null},bh=D(ph,!0),vh=D(ph,!1),yh=(e,t,o)=>{let n;const r=D(fh,!0,t),i=D(fh,!1,t),s=o.startContainer,a=o.startOffset;if(Qa(s)){const e=ih(s)?s.parentNode:s,t=e.getAttribute("data-mce-caret");if("before"===t&&(n=e.nextSibling,Xu(n)))return bh(n);if("after"===t&&(n=e.previousSibling,Xu(n)))return vh(n)}if(!o.collapsed)return o;if(ii(s)){if(oh(s)){if(1===e){if(n=i(s),n)return bh(n);if(n=r(s),n)return vh(n)}if(-1===e){if(n=r(s),n)return vh(n);if(n=i(s),n)return bh(n)}return o}if(sl(s)&&a>=s.data.length-1)return 1===e&&(n=i(s),n)?bh(n):o;if(il(s)&&a<=1)return-1===e&&(n=r(s),n)?vh(n):o;if(a===s.data.length)return n=i(s),n?bh(n):o;if(0===a)return n=r(s),n?vh(n):o}return o},xh=(e,t)=>mh(e?0:-1,t).filter(Qu),wh=(e,t,o)=>{const n=yh(e,t,o);return-1===e?Yl.fromRangeStart(n):Yl.fromRangeEnd(n)},_h=e=>F.from(e.getNode()).map(uo.fromDom),Sh=(e,t)=>{let o=t;for(;o=e(o);)if(o.isVisible())return o;return o},Ch=(e,t)=>{const o=hh(e,t);return!(o||!ui(e.getNode()))||o},kh=gi,Eh=ii,Th=Kr,Oh=ui,Ah=Ol,Mh=e=>kl(e)||(e=>!!Al(e)&&!J(he(e.getElementsByTagName("*")),((e,t)=>e||xl(t)),!1))(e),Ph=Ml,Dh=(e,t)=>e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null,Lh=(e,t)=>{if(ah(e)){if(Ah(t.previousSibling)&&!Eh(t.previousSibling))return Yl.before(t);if(Eh(t))return Yl(t,0)}if(lh(e)){if(Ah(t.nextSibling)&&!Eh(t.nextSibling))return Yl.after(t);if(Eh(t))return Yl(t,t.data.length)}return lh(e)?Oh(t)?Yl.before(t):Yl.after(t):Yl.before(t)},Rh=(e,t,o)=>{let n,r,i,s;if(!Th(o)||!t)return null;if(t.isEqual(Yl.after(o))&&o.lastChild){if(s=Yl.after(o.lastChild),lh(e)&&Ah(o.lastChild)&&Th(o.lastChild))return Oh(o.lastChild)?Yl.before(o.lastChild):s}else s=t;const a=s.container();let l=s.offset();if(Eh(a)){if(lh(e)&&l>0)return Yl(a,--l);if(ah(e)&&l<a.length)return Yl(a,++l);n=a}else{if(lh(e)&&l>0&&(r=Dh(a,l-1),Ah(r)))return!Mh(r)&&(i=dh(r,e,Ph,r),i)?Eh(i)?Yl(i,i.data.length):Yl.after(i):Eh(r)?Yl(r,r.data.length):Yl.before(r);if(ah(e)&&l<a.childNodes.length&&(r=Dh(a,l),Ah(r)))return Oh(r)?((e,t)=>{const o=t.nextSibling;return o&&Ah(o)?Eh(o)?Yl(o,0):Yl.before(o):Rh(1,Yl.after(t),e)})(o,r):!Mh(r)&&(i=dh(r,e,Ph,r),i)?Eh(i)?Yl(i,0):Yl.before(i):Eh(r)?Yl(r,0):Yl.after(r);n=r||s.getNode()}if(n&&(ah(e)&&s.isAtEnd()||lh(e)&&s.isAtStart())&&(n=dh(n,e,z,o,!0),Ph(n,o)))return Lh(e,n);r=n?dh(n,e,Ph,o):n;const c=yt(K(((e,t)=>{const o=[];let n=e;for(;n&&n!==t;)o.push(n),n=n.parentNode;return o})(a,o),kh));return!c||r&&c.contains(r)?r?Lh(e,r):null:(s=ah(e)?Yl.after(c):Yl.before(c),s)},Nh=e=>({next:t=>Rh(1,t,e),prev:t=>Rh(-1,t,e)}),Ih=e=>Yl.isTextPosition(e)?0===e.offset():Ol(e.getNode()),Bh=e=>{if(Yl.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}return Ol(e.getNode(!0))},zh=(e,t)=>!Yl.isTextPosition(e)&&!Yl.isTextPosition(t)&&e.getNode()===t.getNode(!0),Fh=(e,t,o)=>{return e?!zh(t,o)&&(n=t,!(!Yl.isTextPosition(n)&&ui(n.getNode())))&&Bh(t)&&Ih(o):!zh(o,t)&&Ih(t)&&Bh(o);var n},Hh=(e,t,o)=>{const n=Nh(t);return F.from(e?n.next(o):n.prev(o))},jh=(e,t,o)=>Hh(e,t,o).bind((n=>hh(o,n,t)&&Fh(e,o,n)?Hh(e,t,n):F.some(n))),Vh=(e,t,o,n)=>jh(e,t,o).bind((o=>n(o)?Vh(e,t,o,n):F.some(o))),Uh=(e,t)=>{const o=e?t.firstChild:t.lastChild;return ii(o)?F.some(Yl(o,e?0:o.data.length)):o?Ol(o)?F.some(e?Yl.before(o):ui(n=o)?Yl.before(n):Yl.after(n)):((e,t,o)=>{const n=e?Yl.before(o):Yl.after(o);return Hh(e,t,n)})(e,t,o):F.none();var n},Zh=D(Hh,!0),$h=D(Hh,!1),Wh=D(Uh,!0),qh=D(Uh,!1),Gh="_mce_caret",Yh=e=>Kr(e)&&e.id===Gh,Kh=(e,t)=>{let o=t;for(;o&&o!==e;){if(Yh(o))return o;o=o.parentNode}return null},Xh=e=>Ee(e,"name"),Jh=e=>lo.isArray(e.start),Qh=e=>!(!Xh(e)&&y(e.forward))||e.forward,em=(e,t)=>(Kr(t)&&e.isBlock(t)&&!t.innerHTML&&(t.innerHTML='<br data-mce-bogus="1" />'),t),tm=(e,t)=>qh(e).fold(B,(e=>(t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0))),om=(e,t,o)=>!(!(e=>!e.hasChildNodes())(t)||!Kh(e,t))&&(((e,t)=>{var o;const n=(null!==(o=e.ownerDocument)&&void 0!==o?o:document).createTextNode(Ga);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)})(t,o),!0),nm=(e,t,o,n)=>{const r=o[t?"start":"end"],i=e.getRoot();if(r){let e=i,o=r[0];for(let t=r.length-1;e&&t>=1;t--){const o=e.childNodes;if(om(i,e,n))return!0;if(r[t]>o.length-1)return!!om(i,e,n)||tm(e,n);e=o[r[t]]}ii(e)&&(o=Math.min(r[0],e.data.length)),Kr(e)&&(o=Math.min(r[0],e.childNodes.length)),t?n.setStart(e,o):n.setEnd(e,o)}return!0},rm=e=>ii(e)&&e.data.length>0,im=(e,t,o)=>{const n=e.get(o.id+"_"+t),r=null==n?void 0:n.parentNode,i=o.keep;if(n&&r){let s,a;if("start"===t?i?n.hasChildNodes()?(s=n.firstChild,a=1):rm(n.nextSibling)?(s=n.nextSibling,a=0):rm(n.previousSibling)?(s=n.previousSibling,a=n.previousSibling.data.length):(s=r,a=e.nodeIndex(n)+1):(s=r,a=e.nodeIndex(n)):i?n.hasChildNodes()?(s=n.firstChild,a=1):rm(n.previousSibling)?(s=n.previousSibling,a=n.previousSibling.data.length):(s=r,a=e.nodeIndex(n)):(s=r,a=e.nodeIndex(n)),!i){const r=n.previousSibling,i=n.nextSibling;let l;for(lo.each(lo.grep(n.childNodes),(e=>{ii(e)&&(e.data=e.data.replace(/\uFEFF/g,""))}));l=e.get(o.id+"_"+t);)e.remove(l,!0);if(ii(i)&&ii(r)&&!ro.browser.isOpera()){const t=r.data.length;r.appendData(i.data),e.remove(i),s=r,a=t}}return F.some(Yl(s,a))}return F.none()},sm=(e,t)=>{const o=e.dom;if(t){if(Jh(t))return((e,t)=>{const o=e.createRng();return nm(e,!0,t,o)&&nm(e,!1,t,o)?F.some({range:o,forward:Qh(t)}):F.none()})(o,t);if((e=>p(e.start))(t))return((e,t)=>{const o=F.from(sc(e.getRoot(),t.start)),n=F.from(sc(e.getRoot(),t.end));return Ve(o,n,((o,n)=>{const r=e.createRng();return r.setStart(o.container(),o.offset()),r.setEnd(n.container(),n.offset()),{range:r,forward:Qh(t)}}))})(o,t);if((e=>Ee(e,"id"))(t))return((e,t)=>{const o=im(e,"start",t),n=im(e,"end",t);return Ve(o,n.or(o),((o,n)=>{const r=e.createRng();return r.setStart(em(e,o.container()),o.offset()),r.setEnd(em(e,n.container()),n.offset()),{range:r,forward:Qh(t)}}))})(o,t);if(Xh(t))return((e,t)=>F.from(e.select(t.name)[t.index]).map((t=>{const o=e.createRng();return o.selectNode(t),{range:o,forward:!0}})))(o,t);if((e=>Ee(e,"rng"))(t))return F.some({range:t.rng,forward:Qh(t)})}return F.none()},am=(e,t,o)=>fc(e,t,o),lm=(e,t)=>{sm(e,t).each((({range:t,forward:o})=>{e.setRng(t,o)}))},cm=e=>Kr(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type"),dm=(um=ct,e=>um===e);var um;const hm=e=>""!==e&&-1!==" \f\n\r\t\v".indexOf(e),mm=e=>!hm(e)&&!dm(e)&&!dt(e),pm=e=>{const t=[];if(e)for(let o=0;o<e.rangeCount;o++)t.push(e.getRangeAt(o));return t},gm=e=>K((e=>ne(e,(e=>{const t=fl(e);return t?[uo.fromDom(t)]:[]})))(e),Ua),fm=(e,t)=>{const o=wr(t,"td[data-mce-selected],th[data-mce-selected]");return o.length>0?o:gm(e)},bm=e=>fm(pm(e.selection.getSel()),uo.fromDom(e.getBody())),vm=(e,t)=>ir(e,"table",t),ym=e=>Uo(e).fold(A([e]),(t=>[e].concat(ym(t)))),xm=e=>Zo(e).fold(A([e]),(t=>"br"===_o(t)?Bo(t).map((t=>[e].concat(xm(t)))).getOr([]):[e].concat(xm(t)))),wm=(e,t)=>Ve((e=>{const t=e.startContainer,o=e.startOffset;return ii(t)?0===o?F.some(uo.fromDom(t)):F.none():F.from(t.childNodes[o]).map(uo.fromDom)})(t),(e=>{const t=e.endContainer,o=e.endOffset;return ii(t)?o===t.data.length?F.some(uo.fromDom(t)):F.none():F.from(t.childNodes[o-1]).map(uo.fromDom)})(t),((t,o)=>{const n=ee(ym(e),D(yo,t)),r=ee(xm(e),D(yo,o));return n.isSome()&&r.isSome()})).getOr(!1),_m=(e,t,o,n)=>{const r=o,i=new Ur(o,r),s=_e(e.schema.getMoveCaretBeforeOnEnterElements(),((e,t)=>!Z(["td","th","table"],t.toLowerCase())));let a=o;do{if(ii(a)&&0!==lo.trim(a.data).length)return void(n?t.setStart(a,0):t.setEnd(a,a.data.length));if(s[a.nodeName])return void(n?t.setStartBefore(a):"BR"===a.nodeName?t.setEndBefore(a):t.setEndAfter(a))}while(a=n?i.next():i.prev());"BODY"===r.nodeName&&(n?t.setStart(r,0):t.setEnd(r,r.childNodes.length))},Sm=e=>{const t=e.selection.getSel();return _(t)&&t.rangeCount>0},Cm=(e,t)=>{const o=bm(e);o.length>0?q(o,(o=>{const n=o.dom,r=e.dom.createRng();r.setStartBefore(n),r.setEndAfter(n),t(r,!0)})):t(e.selection.getRng(),!1)},km=(e,t,o)=>{const n=gc(e,t);o(n),e.moveToBookmark(n)},Em=e=>C(null==e?void 0:e.nodeType),Tm=e=>Kr(e)&&!cm(e)&&!Yh(e)&&!ti(e),Om=(e,t,o)=>{const{selection:n,dom:r}=e,i=n.getNode(),s=gi(i);km(n,!0,(()=>{t()}));s&&gi(i)&&r.isChildOf(i,e.getBody())?e.selection.select(i):o(n.getStart())&&Am(r,n)},Am=(e,t)=>{var o,n;const r=t.getRng(),{startContainer:i,startOffset:s}=r;if(!((e,t)=>{if(Tm(t)&&!/^(TD|TH)$/.test(t.nodeName)){const o=e.getAttrib(t,"data-mce-selected"),n=parseInt(o,10);return!isNaN(n)&&n>0}return!1})(e,t.getNode())&&Kr(i)){const a=i.childNodes,l=e.getRoot();let c;if(s<a.length){const t=a[s];c=new Ur(t,null!==(o=e.getParent(t,e.isBlock))&&void 0!==o?o:l)}else{const t=a[a.length-1];c=new Ur(t,null!==(n=e.getParent(t,e.isBlock))&&void 0!==n?n:l),c.next(!0)}for(let o=c.current();o;o=c.next()){if("false"===e.getContentEditable(o))return;if(ii(o)&&!Lm(o))return r.setStart(o,0),void t.setRng(r)}}},Mm=(e,t,o)=>{if(e){const n=t?"nextSibling":"previousSibling";for(e=o?e:e[n];e;e=e[n])if(Kr(e)||!Lm(e))return e}},Pm=(e,t)=>!!e.getTextBlockElements()[t.nodeName.toLowerCase()]||Gi(e,t),Dm=(e,t,o)=>e.schema.isValidChild(t,o),Lm=(e,t=!1)=>{if(_(e)&&ii(e)){const o=t?e.data.replace(/ /g," "):e.data;return $r(o)}return!1},Rm=(e,t)=>{const o=e.dom;return Tm(t)&&"false"===o.getContentEditable(t)&&((e,t)=>{const o="[data-mce-cef-wrappable]",n=Dd(e),r=nt(n)?o:`${o},${n}`;return bo(uo.fromDom(t),r)})(e,t)&&0===o.select('[contenteditable="true"]',t).length},Nm=(e,t)=>S(e)?e(t):(_(t)&&(e=e.replace(/%(\w+)/g,((e,o)=>t[o]||e))),e),Im=(e,t)=>(t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()),Bm=(e,t)=>{if(w(e))return null;{let o=String(e);return"color"!==t&&"backgroundColor"!==t||(o=Gs(o)),"fontWeight"===t&&700===e&&(o="bold"),"fontFamily"===t&&(o=o.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),o}},zm=(e,t,o)=>{const n=e.getStyle(t,o);return Bm(n,o)},Fm=(e,t)=>{let o;return e.getParent(t,(t=>!!Kr(t)&&(o=e.getStyle(t,"text-decoration"),!!o&&"none"!==o))),o},Hm=(e,t,o)=>e.getParents(t,o,e.getRoot()),jm=(e,t,o)=>{const n=e.formatter.get(t);return _(n)&&$(n,o)},Vm=(e,t,o)=>{const n=["inline","block","selector","attributes","styles","classes"],r=e=>_e(e,((e,t)=>$(n,(e=>e===t))));return jm(e,t,(t=>{const n=r(t);return jm(e,o,(e=>{const t=r(e);return((e,t,o=a)=>s(o).eq(e,t))(n,t)}))}))},Um=e=>Te(e,"block"),Zm=e=>Te(e,"selector"),$m=e=>Te(e,"inline"),Wm=e=>Zm(e)&&!1!==e.expand&&!$m(e),qm=e=>(e=>{const t=[];let o=e;for(;o;){if(ii(o)&&o.data!==Ga||o.childNodes.length>1)return[];Kr(o)&&t.push(o),o=o.firstChild}return t})(e).length>0,Gm=e=>Yh(e.dom)&&qm(e.dom),Ym=cm,Km=Hm,Xm=Lm,Jm=Pm,Qm=(e,t)=>{let o=t;for(;o;){if(Kr(o)&&e.getContentEditable(o))return"false"===e.getContentEditable(o)?o:t;o=o.parentNode}return t},ep=(e,t,o,n)=>{const r=t.data;if(e){for(let e=o;e>0;e--)if(n(r.charAt(e-1)))return e}else for(let e=o;e<r.length;e++)if(n(r.charAt(e)))return e;return-1},tp=(e,t,o)=>ep(e,t,o,(e=>dm(e)||hm(e))),op=(e,t,o)=>ep(e,t,o,mm),np=(e,t,o,n,r,i)=>{let s;const a=e.getParent(o,(t=>fi(t)||e.isBlock(t))),l=_(a)?a:t,c=(t,o,n)=>{const i=Ia(e),a=r?i.backwards:i.forwards;return F.from(a(t,o,((e,t)=>Ym(e.parentNode)?-1:(s=e,n(r,e,t))),l))};return c(o,n,tp).bind((e=>i?c(e.container,e.offset+(r?-1:0),op):F.some(e))).orThunk((()=>s?F.some({container:s,offset:r?0:s.length}):F.none()))},rp=(e,t,o,n,r)=>{const i=n[r];ii(n)&&nt(n.data)&&i&&(n=i);const s=Km(e,n);for(let n=0;n<s.length;n++)for(let r=0;r<t.length;r++){const i=t[r];if((!_(i.collapsed)||i.collapsed===o.collapsed)&&(Zm(i)&&e.is(s[n],i.selector)))return s[n]}return n},ip=(e,t,o,n)=>{var r;let i=o;const s=e.getRoot(),a=t[0];if(Um(a)&&(i=a.wrapper?null:e.getParent(o,a.block,s)),!i){const t=null!==(r=e.getParent(o,"LI,TD,TH,SUMMARY"))&&void 0!==r?r:s;i=e.getParent(ii(o)?o.parentNode:o,(t=>t!==s&&Jm(e.schema,t)),t)}if(i&&Um(a)&&a.wrapper&&(i=Km(e,i,"ul,ol").reverse()[0]||i),!i)for(i=o;i&&i[n]&&!e.isBlock(i[n])&&(i=i[n],!Im(i,"br")););return i||o},sp=(e,t,o,n)=>{const r=o.parentNode;return!_(o[n])&&(!(r!==t&&!w(r)&&!e.isBlock(r))||sp(e,t,r,n))},ap=(e,t,o,n,r,i)=>{let s=o;const a=r?"previousSibling":"nextSibling",l=e.getRoot();if(ii(o)&&!Xm(o)&&(r?n>0:n<o.data.length))return o;for(;s;){if(fi(s))return o;if(!t[0].block_expand&&e.isBlock(s))return i?s:o;for(let t=s[a];t;t=t[a]){const o=ii(t)&&!sp(e,l,t,a);if(!Ym(t)&&(!ui(c=t)||!c.getAttribute("data-mce-bogus")||c.nextSibling)&&!Xm(t,o))return s}if(s===l||s.parentNode===l){o=s;break}s=s.parentNode}var c;return o},lp=e=>Ym(e.parentNode)||Ym(e),cp=(e,t,o,n={})=>{const{includeTrailingSpace:r=!1,expandToBlock:i=!0}=n,s=e.getParent(t.commonAncestorContainer,(e=>fi(e))),a=_(s)?s:e.getRoot();let{startContainer:l,startOffset:c,endContainer:d,endOffset:u}=t;const h=o[0];if(Kr(l)&&l.hasChildNodes()&&(l=bl(l,c),ii(l)&&(c=0)),Kr(d)&&d.hasChildNodes()&&(d=bl(d,t.collapsed?u:u-1),ii(d)&&(u=d.data.length)),l=Qm(e,l),d=Qm(e,d),lp(l)&&(l=Ym(l)?l:l.parentNode,l=t.collapsed?l.previousSibling||l:l.nextSibling||l,ii(l)&&(c=t.collapsed?l.length:0)),lp(d)&&(d=Ym(d)?d:d.parentNode,d=t.collapsed?d.nextSibling||d:d.previousSibling||d,ii(d)&&(u=t.collapsed?0:d.length)),t.collapsed){np(e,a,l,c,!0,r).each((({container:e,offset:t})=>{l=e,c=t}));np(e,a,d,u,!1,r).each((({container:e,offset:t})=>{d=e,u=t}))}return($m(h)||h.block_expand)&&($m(h)&&ii(l)&&0!==c||(l=ap(e,o,l,c,!0,i)),$m(h)&&ii(d)&&u!==d.data.length||(d=ap(e,o,d,u,!1,i))),Wm(h)&&(l=rp(e,o,t,l,"previousSibling"),d=rp(e,o,t,d,"nextSibling")),(Um(h)||Zm(h))&&(l=ip(e,o,l,"previousSibling"),d=ip(e,o,d,"nextSibling"),Um(h)&&(e.isBlock(l)||(l=ap(e,o,l,c,!0,i),ii(l)&&(c=0)),e.isBlock(d)||(d=ap(e,o,d,u,!1,i),ii(d)&&(u=d.data.length)))),Kr(l)&&l.parentNode&&(c=e.nodeIndex(l),l=l.parentNode),Kr(d)&&d.parentNode&&(u=e.nodeIndex(d)+1,d=d.parentNode),{startContainer:l,startOffset:c,endContainer:d,endOffset:u}},dp=(e,t,o)=>{var n;const r=t.startOffset,i=bl(t.startContainer,r),s=t.endOffset,a=bl(t.endContainer,s-1),l=e=>{const t=e[0];ii(t)&&t===i&&r>=t.data.length&&e.splice(0,1);const o=e[e.length-1];return 0===s&&e.length>0&&o===a&&ii(o)&&e.splice(e.length-1,1),e},c=(e,t,o)=>{const n=[];for(;e&&e!==o;e=e[t])n.push(e);return n},d=(t,o)=>e.getParent(t,(e=>e.parentNode===o),o),u=(e,t,n)=>{const r=n?"nextSibling":"previousSibling";for(let i=e,s=i.parentNode;i&&i!==t;i=s){s=i.parentNode;const t=c(i===e?i:i[r],r);t.length&&(n||t.reverse(),o(l(t)))}};if(i===a)return o(l([i]));const h=null!==(n=e.findCommonAncestor(i,a))&&void 0!==n?n:e.getRoot();if(e.isChildOf(i,a))return u(i,h,!0);if(e.isChildOf(a,i))return u(a,h);const m=d(i,h)||i,p=d(a,h)||a;u(i,m,!0);const g=c(m===i?m:m.nextSibling,"nextSibling",p===a?p.nextSibling:p);g.length&&o(l(g)),u(a,p)},up=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]","div.mce-footnotes"],hp=(e,t,o,n)=>No(t).fold((()=>"skipping"),(r=>"br"===n||(e=>To(e)&&Xn(e)===Ga)(t)?"valid":(e=>Eo(e)&&fr(e,Sa()))(t)?"existing":Yh(t.dom)?"caret":$(up,(e=>bo(t,e)))?"valid-block":Dm(e,o,n)&&Dm(e,_o(r),o)?"valid":"invalid-child")),mp=(e,t,o,n,r,i)=>{const{uid:s=t,...a}=o;hr(e,Sa()),pn(e,`${ka()}`,s),pn(e,`${Ca()}`,n);const{attributes:l={},classes:c=[]}=r(s,a);if(gn(e,l),((e,t)=>{q(t,(t=>{hr(e,t)}))})(e,c),i){c.length>0&&pn(e,`${Ta()}`,c.join(","));const t=ge(l);t.length>0&&pn(e,`${Oa()}`,t.join(","))}},pp=e=>{pr(e,Sa()),yn(e,`${ka()}`),yn(e,`${Ca()}`),yn(e,`${Ea()}`);const t=bn(e,`${Oa()}`).map((e=>e.split(","))).getOr([]),o=bn(e,`${Ta()}`).map((e=>e.split(","))).getOr([]);var n;q(t,(t=>yn(e,t))),n=e,q(o,(e=>{pr(n,e)})),yn(e,`${Ta()}`),yn(e,`${Oa()}`)},gp=(e,t,o,n,r)=>{const i=uo.fromTag("span",e);return mp(i,t,o,n,r,!1),i},fp=(e,t,o,n,r,i)=>{const s=[],a=gp(e.getDoc(),o,i,n,r),l=We(),c=()=>{l.clear()},d=e=>{q(e,u)},u=t=>{switch(hp(e,t,"span",_o(t))){case"invalid-child":{c();const e=jo(t);d(e),c();break}case"valid-block":c(),mp(t,o,i,n,r,!0);break;case"valid":{const e=l.get().getOrThunk((()=>{const e=kn(a);return s.push(e),l.set(e),e}));un(t,e);break}}};return dp(e.dom,t,(e=>{c(),(e=>{const t=W(e,uo.fromDom);d(t)})(e)})),s},bp=(e,t,o,n)=>{e.undoManager.transact((()=>{const r=e.selection,i=r.getRng(),s=bm(e).length>0,a=Ie("mce-annotation");if(i.collapsed&&!s&&((e,t)=>{const o=cp(e.dom,t,[{inline:"span"}]);t.setStart(o.startContainer,o.startOffset),t.setEnd(o.endContainer,o.endOffset),e.selection.setRng(t)})(e,i),r.getRng().collapsed&&!s){const i=gp(e.getDoc(),a,n,t,o.decorate);Mn(i,ct),r.getRng().insertNode(i.dom),r.select(i.dom)}else km(r,!1,(()=>{Cm(e,(r=>{fp(e,r,a,t,o.decorate,n)}))}))}))},vp=e=>{const t=(()=>{const e={};return{register:(t,o)=>{e[t]={name:t,settings:o}},lookup:t=>ke(e,t).map((e=>e.settings)),getNames:()=>ge(e)}})();((e,t)=>{const o=Ca(),n=e=>F.from(e.attr(o)).bind(t.lookup),r=e=>{var t,o;e.attr(ka(),null),e.attr(Ca(),null),e.attr(Ea(),null);const n=F.from(e.attr(Oa())).map((e=>e.split(","))).getOr([]),r=F.from(e.attr(Ta())).map((e=>e.split(","))).getOr([]);q(n,(t=>e.attr(t,null)));const i=null!==(o=null===(t=e.attr("class"))||void 0===t?void 0:t.split(" "))&&void 0!==o?o:[],s=se(i,[Sa()].concat(r));e.attr("class",s.length>0?s.join(" "):null),e.attr(Ta(),null),e.attr(Oa(),null)};e.serializer.addTempAttr(Ea()),e.serializer.addAttributeFilter(o,(e=>{for(const t of e)n(t).each((e=>{!1===e.persistent&&("span"===t.name?t.unwrap():r(t))}))}))})(e,t);const o=Ra(e,t),n=Mo("span"),r=e=>{q(e,(e=>{n(e)?Sn(e):pp(e)}))};return{register:(e,o)=>{t.register(e,o)},annotate:(o,n)=>{t.lookup(o).each((t=>{bp(e,o,t,n)}))},annotationChanged:(e,t)=>{o.addListener(e,t)},remove:t=>{Ma(e,F.some(t)).each((({elements:t})=>{const o=e.selection.getBookmark();r(t),e.selection.moveToBookmark(o)}))},removeAll:t=>{const o=e.selection.getBookmark();be(La(e,t),((e,t)=>{r(e)})),e.selection.moveToBookmark(o)},getAll:t=>{const o=La(e,t);return ve(o,(e=>W(e,(e=>e.dom))))}}},yp=e=>({getBookmark:D(am,e),moveToBookmark:D(lm,e)});yp.isBookmarkNode=cm;const xp=(e,t,o)=>!o.collapsed&&$(o.getClientRects(),(o=>((e,t,o)=>t>=e.left&&t<=e.right&&o>=e.top&&o<=e.bottom)(o,e,t))),wp=(e,t)=>{const o=To(t)?Xn(t).length:jo(t).length+1;return e>o?o:e<0?0:e},_p=e=>Rr.range(e.start,wp(e.soffset,e.start),e.finish,wp(e.foffset,e.finish)),Sp=(e,t)=>!Yr(t.dom)&&(xo(e,t)||yo(e,t)),Cp=e=>t=>Sp(e,t.start)&&Sp(e,t.finish),kp=e=>Rr.range(uo.fromDom(e.startContainer),e.startOffset,uo.fromDom(e.endContainer),e.endOffset),Ep=e=>(e=>{const t=e.getSelection();return(t&&0!==t.rangeCount?F.from(t.getRangeAt(0)):F.none()).map(kp)})(Lo(e).dom).filter(Cp(e)),Tp=e=>{const t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),F.some(t)}catch(e){return F.none()}},Op=e=>{const t=(e=>e.inline||ro.browser.isFirefox())(e)?Ep(uo.fromDom(e.getBody())):F.none();e.bookmark=t.isSome()?t:e.bookmark},Ap=e=>(e.bookmark?e.bookmark:F.none()).bind((t=>((e,t)=>F.from(t).filter(Cp(e)).map(_p))(uo.fromDom(e.getBody()),t))).bind(Tp),Mp={isEditorUIElement:e=>{const t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},Pp={setEditorTimeout:(e,t,o)=>((e,t)=>(C(t)||(t=0),window.setTimeout(e,t)))((()=>{e.removed||t()}),o),setEditorInterval:(e,t,o)=>{const n=((e,t)=>(C(t)||(t=0),window.setInterval(e,t)))((()=>{e.removed?window.clearInterval(n):t()}),o);return n}},Dp=(e,t)=>e.view(t).fold(A([]),(t=>{const o=e.owner(t),n=Dp(e,o);return[t].concat(n)}));var Lp=Object.freeze({__proto__:null,view:e=>{var t;return(e.dom===document?F.none():F.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(uo.fromDom)},owner:e=>Do(e)});const Rp=e=>{const t=on(),o=Wn(t),n=((e,t)=>{const o=t.owner(e);return Dp(t,o)})(e,Lp),r=$n(e),i=X(n,((e,t)=>{const o=$n(t);return{left:e.left+o.left,top:e.top+o.top}}),{left:0,top:0});return Un(i.left+r.left+o.left,i.top+r.top+o.top)},Np=e=>{const t=it((()=>{Op(e)}),0);e.on("init",(()=>{e.inline&&((e,t)=>{const o=()=>{t.throttle()};ga.DOM.bind(document,"mouseup",o),e.on("remove",(()=>{ga.DOM.unbind(document,"mouseup",o)}))})(e,t),((e,t)=>{((e,t)=>{e.on("mouseup touchend",(e=>{t.throttle()}))})(e,t),e.on("keyup NodeChange AfterSetSelectionRange",(t=>{(e=>"nodechange"===e.type&&e.selectionChange)(t)||Op(e)}))})(e,t)})),e.on("remove",(()=>{t.cancel()}))};let Ip;const Bp=ga.DOM,zp=e=>{const t=e.classList;return void 0!==t&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"))},Fp=(e,t)=>{const o=Ld(e),n=Bp.getParent(t,(t=>(e=>Kr(e)&&Mp.isEditorUIElement(e))(t)||!!o&&e.dom.is(t,o)));return null!==n},Hp=e=>{try{const t=qo(uo.fromDom(e.getElement()));return sn(t).fold((()=>document.body),(e=>e.dom))}catch(e){return document.body}},jp=(e,t)=>{const o=t.editor;Np(o);const n=(e,t)=>{if(wu(e)&&!0!==e.inline){t(uo.fromDom(e.getContainer()),"tox-edit-focus")}};o.on("focusin",(()=>{const t=e.focusedEditor;if(zp(Hp(o))&&n(o,hr),t!==o){t&&t.dispatch("blur",{focusedEditor:o}),e.setActive(o),e.focusedEditor=o,o.dispatch("focus",{blurredEditor:t}),o.focus(!0);const n=Gt().browser;!0!==o.inline&&(n.isSafari()||n.isChromium())&&(e=>{if(!e.iframeElement)return;const t=uo.fromDom(e.iframeElement),o=Rp(t),n=Vr(window);(o.top<n.y||o.top>n.bottom-25)&&t.dom.scrollIntoView({block:"center"})})(o)}})),o.on("focusout",(()=>{Pp.setEditorTimeout(o,(()=>{const t=e.focusedEditor;zp(Hp(o))&&t===o||n(o,pr),Fp(o,Hp(o))||t!==o||(o.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)}))})),Ip||(Ip=t=>{const o=e.activeEditor;o&&Ko(t).each((t=>{const n=t;n.ownerDocument===document&&(n===document.body||Fp(o,n)||e.focusedEditor!==o||(o.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null))}))},Bp.bind(document,"focusin",Ip))},Vp=(e,t)=>{e.focusedEditor===t.editor&&(e.focusedEditor=null),!e.activeEditor&&Ip&&(Bp.unbind(document,"focusin",Ip),Ip=null)},Up=(e,t)=>(e=>e.collapsed?F.from(bl(e.startContainer,e.startOffset)).map(uo.fromDom):F.none())(t).bind((t=>Va(t)?F.some(t):xo(e,t)?F.none():F.some(e))),Zp=(e,t)=>{Up(uo.fromDom(e.getBody()),t).bind((e=>Wh(e.dom))).fold((()=>{e.selection.normalize()}),(t=>e.selection.setRng(t.toRange())))},$p=e=>{if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},Wp=e=>{return rn(e)||(t=e,sn(qo(t)).filter((e=>t.dom.contains(e.dom)))).isSome();var t},qp=e=>e.inline?(e=>{const t=e.getBody();return t&&Wp(uo.fromDom(t))})(e):(e=>_(e.iframeElement)&&rn(uo.fromDom(e.iframeElement)))(e),Gp=e=>qp(e)||(e=>{const t=qo(uo.fromDom(e.getElement()));return sn(t).filter((t=>!zp(t.dom)&&Fp(e,t.dom))).isSome()})(e),Yp=e=>e.editorManager.setActive(e),Kp=(e,t)=>{e.removed||(t?Yp(e):(e=>{const t=e.selection,o=e.getBody();let n=t.getRng();e.quirks.refreshContentEditable();const r=e=>{Ap(e).each((t=>{e.selection.setRng(t),n=t}))};!qp(e)&&e.hasEditableRoot()&&r(e);const i=((e,t)=>e.dom.getParent(t,(t=>"true"===e.dom.getContentEditable(t))))(e,t.getNode());if(i&&e.dom.isChildOf(i,o))return((e,t)=>null!==e.dom.getParent(t,(t=>"false"===e.dom.getContentEditable(t))))(e,i)||$p(o),$p(i),e.hasEditableRoot()||r(e),Zp(e,n),void Yp(e);e.inline||(ro.browser.isOpera()||$p(o),e.getWin().focus()),(ro.browser.isFirefox()||e.inline)&&($p(o),Zp(e,n)),Yp(e)})(e))},Xp={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:e=>e.shiftKey||e.ctrlKey||e.altKey||Xp.metaKeyPressed(e),metaKeyPressed:e=>ro.os.isMacOS()||ro.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey},Jp="data-mce-selected",Qp=Math.abs,eg=Math.round,tg={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},og=(e,t)=>{const o=t.dom,n=t.getDoc(),r=document,i=t.getBody();let s,a,l,c,d,u,h,m,p,g,f,b,v,y,x;const w=e=>_(e)&&(hi(e)||o.is(e,"figure.image")),S=e=>yi(e)||o.hasClass(e,"mce-preview-object"),C=e=>{const o=e.target;((e,t)=>{if((e=>"longpress"===e.type||0===e.type.indexOf("touch"))(e)){const o=e.touches[0];return w(e.target)&&!xp(o.clientX,o.clientY,t)}return w(e.target)&&!xp(e.clientX,e.clientY,t)})(e,t.selection.getRng())&&!e.isDefaultPrevented()&&t.selection.select(o)},k=e=>o.hasClass(e,"mce-preview-object")&&_(e.firstElementChild)?[e,e.firstElementChild]:o.is(e,"figure.image")?[e.querySelector("img")]:[e],E=e=>{const n=yd(t);return!(!n||t.mode.isReadOnly())&&("false"!==e.getAttribute("data-mce-resize")&&(e!==t.getBody()&&(o.hasClass(e,"mce-preview-object")&&_(e.firstElementChild)?bo(uo.fromDom(e.firstElementChild),n):bo(uo.fromDom(e),n))))},T=(e,n,r)=>{if(_(r)){const i=k(e);q(i,(e=>{e.style[n]||!t.schema.isValid(e.nodeName.toLowerCase(),n)?o.setStyle(e,n,r):o.setAttrib(e,n,""+r)}))}},O=(e,t,o)=>{T(e,"width",t),T(e,"height",o)},A=e=>{let n,r,d,_,C;n=e.screenX-u,r=e.screenY-h,b=n*c[2]+m,v=r*c[3]+p,b=b<5?5:b,v=v<5?5:v,d=(w(s)||S(s))&&!1!==xd(t)?!Xp.modifierPressed(e):Xp.modifierPressed(e),d&&(Qp(n)>Qp(r)?(v=eg(b*g),b=eg(v/g)):(b=eg(v/g),v=eg(b*g))),O(a,b,v),_=c.startPos.x+n,C=c.startPos.y+r,_=_>0?_:0,C=C>0?C:0,o.setStyles(l,{left:_,top:C,display:"block"}),l.innerHTML=b+" &times; "+v,n=i.scrollWidth-y,r=i.scrollHeight-x,n+r!==0&&o.setStyles(l,{left:_-n,top:C-r}),f||(((e,t,o,n,r)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:n,origin:r})})(t,s,m,p,"corner-"+c.name),f=!0)},M=()=>{const e=f;f=!1,e&&(T(s,"width",b),T(s,"height",v)),o.unbind(n,"mousemove",A),o.unbind(n,"mouseup",M),r!==n&&(o.unbind(r,"mousemove",A),o.unbind(r,"mouseup",M)),o.remove(a),o.remove(l),o.remove(d),P(s),e&&(((e,t,o,n,r)=>{e.dispatch("ObjectResized",{target:t,width:o,height:n,origin:r})})(t,s,b,v,"corner-"+c.name),o.setAttrib(s,"style",o.getAttrib(s,"style"))),t.nodeChanged()},P=e=>{I();const f=o.getPos(e,i),w=f.x,_=f.y,C=e.getBoundingClientRect(),T=C.width||C.right-C.left,P=C.height||C.bottom-C.top;s!==e&&(L(),s=e,b=v=0);const D=t.dispatch("ObjectSelected",{target:e});E(e)&&!D.isDefaultPrevented()?be(tg,((e,t)=>{const f=f=>{const b=k(s)[0];u=f.screenX,h=f.screenY,m=b.clientWidth,p=b.clientHeight,g=p/m,c=e,c.name=t,c.startPos={x:T*e[0]+w,y:P*e[1]+_},y=i.scrollWidth,x=i.scrollHeight,d=o.add(i,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),o.setStyles(d,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),a=((e,t)=>{if(S(t))return e.create("img",{src:ro.transparentSrc});if(oi(t)){const o=Ke(c.name,"n")?de:ue,n=t.cloneNode(!0);return o(e.select("tr",n)).each((t=>{const o=e.select("td,th",t);e.setStyle(t,"height",null),q(o,(t=>e.setStyle(t,"height",null)))})),n}return t.cloneNode(!0)})(o,s),o.addClass(a,"mce-clonedresizable"),o.setAttrib(a,"data-mce-bogus","all"),a.contentEditable="false",o.setStyles(a,{left:w,top:_,margin:0}),O(a,T,P),a.removeAttribute(Jp),i.appendChild(a),o.bind(n,"mousemove",A),o.bind(n,"mouseup",M),r!==n&&(o.bind(r,"mousemove",A),o.bind(r,"mouseup",M)),l=o.add(i,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},m+" &times; "+p)};let b=o.get("mceResizeHandle"+t);b&&o.remove(b),b=o.add(i,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),o.bind(b,"mousedown",(e=>{e.stopImmediatePropagation(),e.preventDefault(),f(e)})),e.elm=b,o.setStyles(b,{left:T*e[0]+w-b.offsetWidth/2,top:P*e[1]+_-b.offsetHeight/2})})):L(!1)},D=it(P,0),L=(e=!0)=>{D.cancel(),I(),s&&e&&s.removeAttribute(Jp),be(tg,((e,t)=>{const n=o.get("mceResizeHandle"+t);n&&(o.unbind(n),o.remove(n))}))},R=(e,t)=>o.isChildOf(e,t),N=n=>{if(f||t.removed||t.composing)return;const r="mousedown"===n.type?n.target:e.getNode(),s=ar(uo.fromDom(r),"table,img,figure.image,hr,video,span.mce-preview-object,details").map((e=>e.dom)).filter((e=>o.isEditable(e.parentElement)||"IMG"===e.nodeName&&o.isEditable(e))).getOrUndefined(),a=_(s)?o.getAttrib(s,Jp,"1"):"1";if(q(o.select(`img[${Jp}],hr[${Jp}]`),(e=>{e.removeAttribute(Jp)})),_(s)&&R(s,i)&&Gp(t)){B();const t=e.getStart(!0);if(R(t,s)&&R(e.getEnd(!0),s))return o.setAttrib(s,Jp,a),void D.throttle(s)}L()},I=()=>{be(tg,(e=>{e.elm&&(o.unbind(e.elm),delete e.elm)}))},B=()=>{try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(e){}};t.on("init",(()=>{B(),t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",N),t.on("keyup compositionend",(e=>{s&&"TABLE"===s.nodeName&&N(e)})),t.on("hide blur",L),t.on("contextmenu longpress",C,!0)})),t.on("remove",I);return{isResizable:E,showResizeRect:P,hideResizeRect:L,updateResizeRect:N,destroy:()=>{D.cancel(),s=a=d=null}}},ng=(e,t,o)=>{const n=Lo(uo.fromDom(o));return Hr(n.dom,e,t).map((e=>{const t=o.createRange();return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),t})).getOrUndefined()},rg=(e,t)=>_(e)&&_(t)&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset,ig=(e,t,o)=>null!==((e,t,o)=>{let n=e;for(;n&&n!==t;){if(o(n))return n;n=n.parentNode}return null})(e,t,o),sg=(e,t,o)=>ig(e,t,(e=>e.nodeName===o)),ag=(e,t)=>tl(e)&&!ig(e,t,Yh),lg=(e,t,o)=>{const n=t.parentNode;if(n){const r=new Ur(t,e.getParent(n,e.isBlock)||e.getRoot());let i;for(;i=r[o?"prev":"next"]();)if(ui(i))return!0}return!1},cg=(e,t,o,n,r)=>{const i=e.getRoot(),s=e.schema.getNonEmptyElements(),a=r.parentNode;let l,c;if(!a)return F.none();const d=e.getParent(a,e.isBlock)||i;if(n&&ui(r)&&t&&e.isEmpty(d))return F.some(Yl(a,e.nodeIndex(r)));const u=new Ur(r,d);for(;c=u[n?"prev":"next"]();){if("false"===e.getContentEditableParent(c)||ag(c,i))return F.none();if(ii(c)&&c.data.length>0)return sg(c,i,"A")?F.none():F.some(Yl(c,n?c.data.length:0));if(e.isBlock(c)||s[c.nodeName.toLowerCase()])return F.none();l=c}return li(l)?F.none():o&&l?F.some(Yl(l,0)):F.none()},dg=(e,t,o,n)=>{const r=e.getRoot();let i,s=!1,a=o?n.startContainer:n.endContainer,l=o?n.startOffset:n.endOffset;const c=Kr(a)&&l===a.childNodes.length,d=e.schema.getNonEmptyElements();let u=o;if(tl(a))return F.none();if(Kr(a)&&l>a.childNodes.length-1&&(u=!1),ci(a)&&(a=r,l=0),a===r){if(u&&(i=a.childNodes[l>0?l-1:0],i)){if(tl(i))return F.none();if(d[i.nodeName]||oi(i))return F.none()}if(a.hasChildNodes()){if(l=Math.min(!u&&l>0?l-1:l,a.childNodes.length-1),a=a.childNodes[l],l=ii(a)&&c?a.data.length:0,!t&&a===r.lastChild&&oi(a))return F.none();if(((e,t)=>{let o=t;for(;o&&o!==e;){if(gi(o))return!0;o=o.parentNode}return!1})(r,a)||tl(a))return F.none();if(wi(a))return F.none();if(a.hasChildNodes()&&!oi(a)){i=a;const t=new Ur(a,r);do{if(gi(i)||tl(i)){s=!1;break}if(ii(i)&&i.data.length>0){l=u?0:i.data.length,a=i,s=!0;break}if(d[i.nodeName.toLowerCase()]&&!vi(i)){l=e.nodeIndex(i),a=i.parentNode,u||l++,s=!0;break}}while(i=u?t.next():t.prev())}}}return t&&(ii(a)&&0===l&&cg(e,c,t,!0,a).each((e=>{a=e.container(),l=e.offset(),s=!0})),Kr(a)&&(i=a.childNodes[l],i||(i=a.childNodes[l-1]),!i||!ui(i)||((e,t)=>{var o;return(null===(o=e.previousSibling)||void 0===o?void 0:o.nodeName)===t})(i,"A")||lg(e,i,!1)||lg(e,i,!0)||cg(e,c,t,!0,i).each((e=>{a=e.container(),l=e.offset(),s=!0})))),u&&!t&&ii(a)&&l===a.data.length&&cg(e,c,t,!1,a).each((e=>{a=e.container(),l=e.offset(),s=!0})),s&&a?F.some(Yl(a,l)):F.none()},ug=(e,t)=>{const o=t.collapsed,n=t.cloneRange(),r=Yl.fromRangeStart(t);return dg(e,o,!0,n).each((e=>{o&&Yl.isAbove(r,e)||n.setStart(e.container(),e.offset())})),o||dg(e,o,!1,n).each((e=>{n.setEnd(e.container(),e.offset())})),o&&n.collapse(!0),rg(t,n)?F.none():F.some(n)},hg=(e,t)=>e.splitText(t),mg=e=>{let t=e.startContainer,o=e.startOffset,n=e.endContainer,r=e.endOffset;if(t===n&&ii(t)){if(o>0&&o<t.data.length)if(n=hg(t,o),t=n.previousSibling,r>o){r-=o;const e=hg(n,r).previousSibling;t=n=e,r=e.data.length,o=0}else r=0}else if(ii(t)&&o>0&&o<t.data.length&&(t=hg(t,o),o=0),ii(n)&&r>0&&r<n.data.length){const e=hg(n,r).previousSibling;n=e,r=e.data.length}return{startContainer:t,startOffset:o,endContainer:n,endOffset:r}},pg=e=>({walk:(t,o)=>dp(e,t,o),split:mg,expand:(t,o={type:"word"})=>{if("word"===o.type){const o=cp(e,t,[{inline:"span"}],{includeTrailingSpace:!1,expandToBlock:!1}),n=e.createRng();return n.setStart(o.startContainer,o.startOffset),n.setEnd(o.endContainer,o.endOffset),n}return t},normalize:t=>ug(e,t).fold(B,(e=>(t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0)))});pg.compareRanges=rg,pg.getCaretRangeFromPoint=ng,pg.getSelectedNode=fl,pg.getNode=bl;const gg=e=>"textarea"===_o(e),fg=(e,t)=>{const o=(e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return Un(o.offsetLeft,o.offsetTop);const i=Zn(null==n?void 0:n.pageYOffset,r.scrollTop),s=Zn(null==n?void 0:n.pageXOffset,r.scrollLeft),a=Zn(r.clientTop,o.clientTop),l=Zn(r.clientLeft,o.clientLeft);return $n(e).translate(s-l,i-a)})(e),n=(e=>jn.get(e))(e);return{element:e,bottom:o.top+n,height:n,pos:o,cleanup:t}},bg=(e,t)=>{const o=((e,t)=>{const o=jo(e);if(0===o.length||gg(e))return{element:e,offset:t};if(t<o.length&&!gg(o[t]))return{element:o[t],offset:0};{const n=o[o.length-1];return gg(n)?{element:e,offset:t}:"img"===_o(n)?{element:n,offset:1}:To(n)?{element:n,offset:Xn(n).length}:{element:n,offset:jo(n).length}}})(e,t),n=uo.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>');return an(o.element,n),fg(n,(()=>_n(n)))},vg=(e,t,o,n)=>{_g(e,((r,i)=>xg(e,t,o,n)),o)},yg=(e,t,o,n,r)=>{const i={elm:n.element.dom,alignToTop:r};if(((e,t)=>e.dispatch("ScrollIntoView",t).isDefaultPrevented())(e,i))return;o(e,t,Wn(t).top,n,r),((e,t)=>{e.dispatch("AfterScrollIntoView",t)})(e,i)},xg=(e,t,o,n)=>{const r=uo.fromDom(e.getBody()),i=uo.fromDom(e.getDoc());(e=>{e.dom.offsetWidth})(r);const s=bg(uo.fromDom(o.startContainer),o.startOffset);yg(e,i,t,s,n),s.cleanup()},wg=(e,t,o,n)=>{const r=uo.fromDom(e.getDoc());yg(e,r,o,(e=>fg(uo.fromDom(e),E))(t),n)},_g=(e,t,o)=>{const n=o.startContainer,r=o.startOffset,i=o.endContainer,s=o.endOffset;t(uo.fromDom(n),uo.fromDom(i));const a=e.dom.createRng();a.setStart(n,r),a.setEnd(i,s),e.selection.setRng(o)},Sg=(e,t,o,n,r)=>{const i=t.pos;if(n)qn(i.left,Math.max(0,i.top-30),r);else{const n=i.top-o+t.height+30;qn(-e.getBody().getBoundingClientRect().left,n,r)}},Cg=(e,t,o,n,r,i)=>{const s=n+o,a=r.pos.top,l=r.bottom,c=l-a>=n;if(a<o)Sg(e,r,n,!1!==i,t);else if(a>s){Sg(e,r,n,c?!1!==i:!0===i,t)}else l>s&&!c&&Sg(e,r,n,!0===i,t)},kg=(e,t,o,n,r)=>{const i=Lo(t).dom.innerHeight;Cg(e,t,o,i,n,r)},Eg=(e,t,o,n,r)=>{const i=Lo(t).dom.innerHeight;Cg(e,t,o,i,n,r);const s=Rp(n.element),a=Vr(window);s.top<a.y?Gn(n.element,!1!==r):s.top>a.bottom&&Gn(n.element,!0===r)},Tg=(e,t,o)=>vg(e,kg,t,o),Og=(e,t,o)=>wg(e,t,kg,o),Ag=(e,t,o)=>vg(e,Eg,t,o),Mg=(e,t,o)=>wg(e,t,Eg,o),Pg=(e,t,o)=>{(e.inline?Tg:Ag)(e,t,o)},Dg=(e,t)=>t.collapsed?e.isEditable(t.startContainer):e.isEditable(t.startContainer)&&e.isEditable(t.endContainer),Lg=(e,t,o,n,r)=>{const i=o?t.startContainer:t.endContainer,s=o?t.startOffset:t.endOffset;return F.from(i).map(uo.fromDom).map((e=>n&&t.collapsed?e:Vo(e,r(e,s)).getOr(e))).bind((e=>Eo(e)?F.some(e):Ro(e).filter(Eo))).map((e=>e.dom)).getOr(e)},Rg=(e,t,o=!1)=>Lg(e,t,!0,o,((e,t)=>Math.min($o(e),t))),Ng=(e,t,o=!1)=>Lg(e,t,!1,o,((e,t)=>t>0?t-1:t)),Ig=(e,t)=>{const o=e;for(;e&&ii(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||o},Bg=(e,t)=>W(t,(t=>{const o=e.dispatch("GetSelectionRange",{range:t});return o.range!==t?o.range:t})),zg={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Fg=(e,t,o)=>{const n=o?"lastChild":"firstChild",r=o?"prev":"next";if(e[n])return e[n];if(e!==t){let o=e[r];if(o)return o;for(let n=e.parent;n&&n!==t;n=n.parent)if(o=n[r],o)return o}},Hg=e=>{var t;const o=null!==(t=e.value)&&void 0!==t?t:"";if(!$r(o))return!1;const n=e.parent;return!n||"span"===n.name&&!n.attr("style")||!/^[ ]+$/.test(o)},jg=e=>{const t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t};class Vg{static create(e,t){const o=new Vg(e,zg[e]||1);return t&&be(t,((e,t)=>{o.attr(t,e)})),o}constructor(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}replace(e){const t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t}attr(e,t){const o=this;if(!p(e))return _(e)&&be(e,((e,t)=>{o.attr(t,e)})),o;const n=o.attributes;if(n){if(void 0!==t){if(null===t){if(e in n.map){delete n.map[e];let t=n.length;for(;t--;)if(n[t].name===e)return n.splice(t,1),o}return o}if(e in n.map){let o=n.length;for(;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,o}return n.map[e]}}clone(){const e=this,t=new Vg(e.name,e.type),o=e.attributes;if(o){const e=[];e.map={};for(let t=0,n=o.length;t<n;t++){const n=o[t];"id"!==n.name&&(e[e.length]={name:n.name,value:n.value},e.map[n.name]=n.value)}t.attributes=e}return t.value=e.value,t}wrap(e){const t=this;return t.parent&&(t.parent.insert(e,t),e.append(t)),t}unwrap(){const e=this;for(let t=e.firstChild;t;){const o=t.next;e.insert(t,e,!0),t=o}e.remove()}remove(){const e=this,t=e.parent,o=e.next,n=e.prev;return t&&(t.firstChild===e?(t.firstChild=o,o&&(o.prev=null)):n&&(n.next=o),t.lastChild===e?(t.lastChild=n,n&&(n.next=null)):o&&(o.prev=n),e.parent=e.next=e.prev=null),e}append(e){const t=this;e.parent&&e.remove();const o=t.lastChild;return o?(o.next=e,e.prev=o,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e}insert(e,t,o){e.parent&&e.remove();const n=t.parent||this;return o?(t===n.firstChild?n.firstChild=e:t.prev&&(t.prev.next=e),e.prev=t.prev,e.next=t,t.prev=e):(t===n.lastChild?n.lastChild=e:t.next&&(t.next.prev=e),e.next=t.next,e.prev=t,t.next=e),e.parent=n,e}getAll(e){const t=this,o=[];for(let n=t.firstChild;n;n=Fg(n,t))n.name===e&&o.push(n);return o}children(){const e=[];for(let t=this.firstChild;t;t=t.next)e.push(t);return e}empty(){const e=this;if(e.firstChild){const t=[];for(let o=e.firstChild;o;o=Fg(o,e))t.push(o);let o=t.length;for(;o--;){const e=t[o];e.parent=e.firstChild=e.lastChild=e.next=e.prev=null}}return e.firstChild=e.lastChild=null,e}isEmpty(e,t={},o){var n;const r=this;let i=r.firstChild;if(jg(r))return!1;if(i)do{if(1===i.type){if(i.attr("data-mce-bogus"))continue;if(e[i.name])return!1;if(jg(i))return!1}if(8===i.type)return!1;if(3===i.type&&!Hg(i))return!1;if(3===i.type&&i.parent&&t[i.parent.name]&&$r(null!==(n=i.value)&&void 0!==n?n:""))return!1;if(o&&o(i))return!1}while(i=Fg(i,r));return!0}walk(e){return Fg(this,null,e)}}const Ug=lo.makeMap("NOSCRIPT STYLE SCRIPT XMP IFRAME NOEMBED NOFRAMES PLAINTEXT"," "),Zg=e=>p(e.nodeValue)&&e.nodeValue.includes(Ga),$g=e=>(0===e.length?"":`${W(e,(e=>`[${e}]`)).join(",")},`)+'[data-mce-bogus="all"]',Wg=e=>document.createTreeWalker(e,NodeFilter.SHOW_COMMENT,(e=>Zg(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP)),qg=e=>document.createTreeWalker(e,NodeFilter.SHOW_TEXT,(e=>{if(Zg(e)){const t=e.parentNode;return t&&Ee(Ug,t.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_SKIP})),Gg=e=>null!==Wg(e).nextNode(),Yg=e=>null!==qg(e).nextNode(),Kg=(e,t)=>null!==t.querySelector($g(e)),Xg=(e,t)=>{q(((e,t)=>t.querySelectorAll($g(e)))(e,t),(t=>{const o=uo.fromDom(t);"all"===fn(o,"data-mce-bogus")?_n(o):q(e,(e=>{vn(o,e)&&yn(o,e)}))}))},Jg=e=>{let t=e.nextNode();for(;null!==t;)t.nodeValue=null,t=e.nextNode()},Qg=T(Jg,Wg),ef=T(Jg,qg),tf=(e,t)=>{const o=[{condition:D(Kg,t),action:D(Xg,t)},{condition:Gg,action:Qg},{condition:Yg,action:ef}];let n=e,r=!1;return q(o,(({condition:t,action:o})=>{t(n)&&(r||(n=e.cloneNode(!0),r=!0),o(n))})),n},of=e=>{const t=wr(e,"[data-mce-bogus]");q(t,(e=>{"all"===fn(e,"data-mce-bogus")?_n(e):za(e)?(an(e,uo.fromText(lt)),_n(e)):Sn(e)}))},nf=e=>{const t=wr(e,"input");q(t,(e=>{yn(e,"name")}))},rf=(e,t)=>{const o=e.getDoc(),n=qo(uo.fromDom(e.getBody())),r=uo.fromTag("div",o);pn(r,"data-mce-bogus","all"),Nn(r,{position:"fixed",left:"-9999999px",top:"0"}),Mn(r,t.innerHTML),of(r),nf(r);const i=(e=>Wo(e)?e:uo.fromDom(Do(e).dom.body))(n);dn(i,r);const s=Ka(r.dom.innerText);return _n(r),s},sf=(e,t,o)=>{let n;n="raw"===t.format?lo.trim(Ka(tf(o,e.serializer.getTempAttrs()).innerHTML)):"text"===t.format?rf(e,o):"tree"===t.format?e.serializer.serialize(o,t):((e,t)=>{const o=Wc(e),n=new RegExp(`^(<${o}[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/${o}>[\r\n]*|<br \\/>[\r\n]*)$`);return t.replace(n,"")})(e,e.serializer.serialize(o,t));return"text"!==t.format&&!Za(uo.fromDom(o))&&p(n)?lo.trim(n):n},af=lo.makeMap,lf=e=>{const t=[],o=(e=e||{}).indent,n=af(e.indent_before||""),r=af(e.indent_after||""),i=xs.getEncodeFunc(e.entity_encoding||"raw",e.entities),s="xhtml"!==e.element_format;return{start:(e,a,l)=>{if(o&&n[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}if(t.push("<",e),a)for(let e=0,o=a.length;e<o;e++){const o=a[e];t.push(" ",o.name,'="',i(o.value,!0),'"')}if(t[t.length]=!l||s?">":" />",l&&o&&r[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}},end:e=>{let n;t.push("</",e,">"),o&&r[e]&&t.length>0&&(n=t[t.length-1],n.length>0&&"\n"!==n&&t.push("\n"))},text:(e,o)=>{e.length>0&&(t[t.length]=o?e:i(e))},cdata:e=>{t.push("<![CDATA[",e,"]]>")},comment:e=>{t.push("\x3c!--",e,"--\x3e")},pi:(e,n)=>{n?t.push("<?",e," ",i(n),"?>"):t.push("<?",e,"?>"),o&&t.push("\n")},doctype:e=>{t.push("<!DOCTYPE",e,">",o?"\n":"")},reset:()=>{t.length=0},getContent:()=>t.join("").replace(/\n$/,"")}},cf=(e={},t=Fs())=>{const o=lf(e);e.validate=!("validate"in e)||e.validate;return{serialize:n=>{const r=e.validate,i={3:e=>{var t;o.text(null!==(t=e.value)&&void 0!==t?t:"",e.raw)},8:e=>{var t;o.comment(null!==(t=e.value)&&void 0!==t?t:"")},7:e=>{o.pi(e.name,e.value)},10:e=>{var t;o.doctype(null!==(t=e.value)&&void 0!==t?t:"")},4:e=>{var t;o.cdata(null!==(t=e.value)&&void 0!==t?t:"")},11:e=>{let t=e;if(t=t.firstChild)do{s(t)}while(t=t.next)}};o.reset();const s=e=>{var n;const a=i[e.type];if(a)a(e);else{const i=e.name,a=i in t.getVoidElements();let l=e.attributes;if(r&&l&&l.length>1){const o=[];o.map={};const n=t.getElementRule(e.name);if(n){for(let e=0,t=n.attributesOrder.length;e<t;e++){const t=n.attributesOrder[e];if(t in l.map){const e=l.map[t];o.map[t]=e,o.push({name:t,value:e})}}for(let e=0,t=l.length;e<t;e++){const t=l[e].name;if(!(t in o.map)){const e=l.map[t];o.map[t]=e,o.push({name:t,value:e})}}l=o}}if(o.start(i,l,a),Li(i))p(e.value)&&o.text(e.value,!0),o.end(i);else if(!a){let t=e.firstChild;if(t){"pre"!==i&&"textarea"!==i||3!==t.type||"\n"!==(null===(n=t.value)||void 0===n?void 0:n[0])||o.text("\n",!0);do{s(t)}while(t=t.next)}o.end(i)}}};return 1!==n.type||e.inner?3===n.type?i[3](n):i[11](n):s(n),o.getContent()}}},df=new Set;q(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],(e=>{df.add(e)}));const uf=new Set;q(["background-color"],(e=>{uf.add(e)}));const hf=["font","text-decoration","text-emphasis"],mf=(e,t)=>ge(((e,t)=>e.parseStyle(e.getAttrib(t,"style")))(e,t)),pf=(e,t)=>$(mf(e,t),(e=>(e=>df.has(e))(e))),gf=(e,t)=>pf(e,t)&&$(mf(e,t),(e=>(e=>uf.has(e))(e))),ff=(e,t,o)=>{const n=mf(e,t),r=mf(e,o),i=n=>{var r,i;const s=null!==(r=e.getStyle(t,n))&&void 0!==r?r:"",a=null!==(i=e.getStyle(o,n))&&void 0!==i?i:"";return ot(s)&&ot(a)&&s!==a};return $(n,(e=>{const t=t=>$(t,(t=>t===e));if(!t(r)&&t(hf)){const e=K(r,(e=>$(hf,(t=>Ke(e,t)))));return $(e,i)}return i(e)}))},bf=(e,t,o)=>F.from(o.container()).filter(ii).exists((n=>{const r=e?0:-1;return t(n.data.charAt(o.offset()+r))})),vf=D(bf,!0,hm),yf=D(bf,!1,hm),xf=e=>{const t=e.container();return ii(t)&&(0===t.data.length||Ya(t.data)&&yp.isBookmarkNode(t.parentNode))},wf=(e,t)=>o=>mh(e?0:-1,o).filter(t).isSome(),_f=e=>hi(e)&&"block"===In(uo.fromDom(e),"display"),Sf=e=>gi(e)&&!(e=>Kr(e)&&"all"===e.getAttribute("data-mce-bogus"))(e),Cf=wf(!0,_f),kf=wf(!1,_f),Ef=wf(!0,yi),Tf=wf(!1,yi),Of=wf(!0,oi),Af=wf(!1,oi),Mf=wf(!0,Sf),Pf=wf(!1,Sf),Df=(e,t)=>((e,t,o)=>xo(t,e)?Io(e,(e=>o(e)||yo(e,t))).slice(0,-1):[])(e,t,B),Lf=(e,t)=>[e].concat(Df(e,t)),Rf=(e,t,o)=>Vh(e,t,o,xf),Nf=(e,t,o)=>ee(Lf(uo.fromDom(t.container()),e),(e=>t=>e.isBlock(_o(t)))(o)),If=(e,t,o,n)=>Rf(e,t.dom,o).forall((e=>Nf(t,o,n).fold((()=>!hh(e,o,t.dom)),(n=>!hh(e,o,t.dom)&&xo(n,uo.fromDom(e.container())))))),Bf=(e,t,o,n)=>Nf(t,o,n).fold((()=>Rf(e,t.dom,o).forall((e=>!hh(e,o,t.dom)))),(t=>Rf(e,t.dom,o).isNone())),zf=D(Bf,!1),Ff=D(Bf,!0),Hf=D(If,!1),jf=D(If,!0),Vf=e=>_h(e).exists(za),Uf=(e,t,o,n)=>{const r=K(Lf(uo.fromDom(o.container()),t),(e=>n.isBlock(_o(e)))),i=de(r).getOr(t);return Hh(e,i.dom,o).filter(Vf)},Zf=(e,t,o)=>_h(t).exists(za)||Uf(!0,e,t,o).isSome(),$f=(e,t,o)=>(e=>F.from(e.getNode(!0)).map(uo.fromDom))(t).exists(za)||Uf(!1,e,t,o).isSome(),Wf=D(Uf,!1),qf=D(Uf,!0),Gf=e=>Yl.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd(),Yf=(e,t,o)=>{const n=K(Lf(uo.fromDom(t.container()),e),(e=>o.isBlock(_o(e))));return de(n).getOr(e)},Kf=(e,t,o)=>Gf(t)?yf(t):yf(t)||$h(Yf(e,t,o).dom,t).exists(yf),Xf=(e,t,o)=>Gf(t)?vf(t):vf(t)||Zh(Yf(e,t,o).dom,t).exists(vf),Jf=e=>_h(e).bind((e=>or(e,Eo))).exists((e=>(e=>Z(["pre","pre-wrap"],e))(In(e,"white-space")))),Qf=(e,t,o)=>((e,t)=>$h(e.dom,t).isNone())(e,t)||((e,t)=>Zh(e.dom,t).isNone())(e,t)||zf(e,t,o)||Ff(e,t,o)||$f(e,t,o)||Zf(e,t,o),eb=(e,t)=>o=>{return n=new Ur(o,e)[t](),_(n)&&gi(n)&&th(n);var n},tb=(e,t,o)=>!Jf(t)&&(Qf(e,t,o)||Kf(e,t,o)||Xf(e,t,o)),ob=(e,t,o)=>!Jf(t)&&(zf(e,t,o)||Hf(e,t,o)||$f(e,t,o)||Kf(e,t,o)||((e,t)=>{const o=$h(e.dom,t).getOr(t),n=eb(e.dom,"prev");return t.isAtStart()&&(n(t.container())||n(o.container()))})(e,t)),nb=(e,t,o)=>!Jf(t)&&(Ff(e,t,o)||jf(e,t,o)||Zf(e,t,o)||Xf(e,t,o)||((e,t)=>{const o=Zh(e.dom,t).getOr(t),n=eb(e.dom,"next");return t.isAtEnd()&&(n(t.container())||n(o.container()))})(e,t)),rb=(e,t,o)=>ob(e,t,o)||nb(e,(e=>{const t=e.container(),o=e.offset();return ii(t)&&o<t.data.length?Yl(t,o+1):e})(t),o),ib=(e,t)=>dm(e.charAt(t)),sb=(e,t)=>hm(e.charAt(t)),ab=(e,t,o,n)=>{const r=t.data,i=Yl(t,0);return o||!ib(r,0)||rb(e,i,n)?!!(o&&sb(r,0)&&ob(e,i,n))&&(t.data=ct+r.slice(1),!0):(t.data=" "+r.slice(1),!0)},lb=e=>{const t=e.data,o=(e=>{const t=e.split("");return W(t,((e,o)=>dm(e)&&o>0&&o<t.length-1&&mm(t[o-1])&&mm(t[o+1])?" ":e)).join("")})(t);return o!==t&&(e.data=o,!0)},cb=(e,t,o,n)=>{const r=t.data,i=Yl(t,r.length-1);return o||!ib(r,r.length-1)||rb(e,i,n)?!!(o&&sb(r,r.length-1)&&nb(e,i,n))&&(t.data=r.slice(0,-1)+ct,!0):(t.data=r.slice(0,-1)+" ",!0)},db=(e,t,o)=>{const n=t.container();if(!ii(n))return F.none();if((e=>{const t=e.container();return ii(t)&&Ye(t.data,ct)})(t)){const r=ab(e,n,!1,o)||lb(n)||cb(e,n,!1,o);return Ue(r,t)}if(rb(e,t,o)){const r=ab(e,n,!0,o)||cb(e,n,!0,o);return Ue(r,t)}return F.none()},ub=(e,t,o,n)=>{if(0===o)return;const r=uo.fromDom(e),i=tr(r,(e=>n.isBlock(_o(e)))).getOr(r),s=e.data.slice(t,t+o),a=t+o>=e.data.length&&nb(i,Yl(e,e.data.length),n),l=0===t&&ob(i,Yl(e,0),n);e.replaceData(t,o,qr(s,4,l,a))},hb=(e,t,o)=>{const n=e.data.slice(t),r=n.length-et(n).length;ub(e,t,r,o)},mb=(e,t,o)=>{const n=e.data.slice(0,t),r=n.length-tt(n).length;ub(e,t-r,r,o)},pb=(e,t,o,n,r=!0)=>{const i=tt(e.data).length,s=r?e:t,a=r?t:e;return r?s.appendData(a.data):s.insertData(0,a.data),_n(uo.fromDom(a)),n&&hb(s,i,o),s},gb=(e,t)=>((e,t)=>{const o=e.container(),n=e.offset();return!Yl.isTextPosition(e)&&o===t.parentNode&&n>Yl.before(t).offset()})(t,e)?Yl(t.container(),t.offset()-1):t,fb=e=>{return Ol(e.previousSibling)?F.some((t=e.previousSibling,ii(t)?Yl(t,t.data.length):Yl.after(t))):e.previousSibling?qh(e.previousSibling):F.none();var t},bb=e=>{return Ol(e.nextSibling)?F.some((t=e.nextSibling,ii(t)?Yl(t,0):Yl.before(t))):e.nextSibling?Wh(e.nextSibling):F.none();var t},vb=(e,t)=>fb(t).orThunk((()=>bb(t))).orThunk((()=>((e,t)=>F.from(t.previousSibling?t.previousSibling:t.parentNode).bind((t=>$h(e,Yl.before(t)))).orThunk((()=>Zh(e,Yl.after(t)))))(e,t))),yb=(e,t)=>bb(t).orThunk((()=>fb(t))).orThunk((()=>((e,t)=>Zh(e,Yl.after(t)).orThunk((()=>$h(e,Yl.before(t)))))(e,t))),xb=(e,t,o)=>((e,t,o)=>e?yb(t,o):vb(t,o))(e,t,o).map(D(gb,o)),wb=(e,t,o)=>{o.fold((()=>{e.focus()}),(o=>{e.selection.setRng(o.toRange(),t)}))},_b=(e,t)=>t&&Ee(e.schema.getBlockElements(),_o(t)),Sb=(e,t,o,n)=>{const r=Bo(e).filter(To),i=zo(e).filter(To);return _n(e),(s=r,a=i,l=t,c=(e,t,r)=>{const i=e.dom,s=t.dom,a=i.data.length;return pb(i,s,o,n),r.container()===s?Yl(i,a):r},s.isSome()&&a.isSome()&&l.isSome()?F.some(c(s.getOrDie(),a.getOrDie(),l.getOrDie())):F.none()).orThunk((()=>(n&&(r.each((e=>mb(e.dom,e.dom.length,o))),i.each((e=>hb(e.dom,0,o)))),t)));var s,a,l,c},Cb=(e,t,o,n=!0,r=!1)=>{const i=xb(t,e.getBody(),o.dom),s=tr(o,D(_b,e),(a=e.getBody(),e=>e.dom===a));var a;const l=Sb(o,i,e.schema,((e,t)=>Ee(e.schema.getTextInlineElements(),_o(t)))(e,o));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):s.bind((t=>((e,t,o)=>{if(Mi(e,t)){const e=uo.fromHtml('<br data-mce-bogus="1">');return o?q(jo(t),(e=>{Gm(e)||_n(e)})):wn(t),dn(t,e),F.some(Yl.before(e.dom))}return F.none()})(e.schema,t,r))).fold((()=>{n&&wb(e,t,l)}),(o=>{n&&wb(e,t,F.some(o))}))},kb=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Eb=(e,t)=>bo(uo.fromDom(t),vd(e))&&!Gi(e.schema,t)&&e.dom.isEditable(t),Tb=e=>{var t;return"rtl"===ga.DOM.getStyle(e,"direction",!0)||(e=>kb.test(e))(null!==(t=e.textContent)&&void 0!==t?t:"")},Ob=(e,t,o)=>{const n=((e,t,o)=>K(ga.DOM.getParents(o.container(),"*",t),e))(e,t,o);return F.from(n[n.length-1])},Ab=(e,t)=>{const o=t.container(),n=t.offset();return e?el(o)?ii(o.nextSibling)?Yl(o.nextSibling,0):Yl.after(o):nl(t)?Yl(o,n+1):t:el(o)?ii(o.previousSibling)?Yl(o.previousSibling,o.previousSibling.data.length):Yl.before(o):rl(t)?Yl(o,n-1):t},Mb=D(Ab,!0),Pb=D(Ab,!1),Db=(e,t)=>{const o=e=>e.stopImmediatePropagation();e.on("beforeinput input",o,!0),e.getDoc().execCommand(t),e.off("beforeinput input",o)},Lb=e=>Db(e,"Delete"),Rb=e=>Db(e,"ForwardDelete"),Nb=e=>Fa(e)||ja(e),Ib=(e,t)=>xo(e,t)?or(t,Nb,(e=>t=>He(Ro(t),e,yo))(e)):F.none(),Bb=(e,t=!0)=>{e.dom.isEmpty(e.getBody())&&e.setContent("",{no_selection:!t})},zb=(e,t,o)=>Ve(Wh(o),qh(o),((n,r)=>{const i=Ab(!0,n),s=Ab(!1,r),a=Ab(!1,t);return e?Zh(o,a).exists((e=>e.isEqual(s)&&t.isEqual(i))):$h(o,a).exists((e=>e.isEqual(i)&&t.isEqual(s)))})).getOr(!0),Fb=e=>{var t;return(8===So(t=e)||"#comment"===_o(t)?Bo(e):Zo(e)).bind(Fb).orThunk((()=>F.some(e)))},Hb=(e,t,o,n=!0)=>{var r;t.deleteContents();const i=Fb(o).getOr(o),s=uo.fromDom(null!==(r=e.dom.getParent(i.dom,e.dom.isBlock))&&void 0!==r?r:o.dom);if(s.dom===e.getBody()?Bb(e,n):Mi(e.schema,s,{checkRootAsContent:!1})&&(qa(s),n&&e.selection.setCursorLocation(s.dom,0)),!yo(o,s)){const t=He(Ro(s),o)?[]:Ro(a=s).map(jo).map((e=>K(e,(e=>!yo(a,e))))).getOr([]);q(t.concat(jo(o)),(t=>{yo(t,s)||xo(t,s)||!Mi(e.schema,t)||_n(t)}))}var a},jb=e=>wr(e,"td,th"),Vb=(e,t)=>vm(uo.fromDom(e),t),Ub=e=>(e=>Ve(e.startTable,e.endTable,((t,o)=>{const n=Cr(t,(e=>yo(e,o))),r=Cr(o,(e=>yo(e,t)));return n||r?{...e,startTable:n?F.none():e.startTable,endTable:r?F.none():e.endTable,isSameTable:!1,isMultiTable:!1}:e})).getOr(e))(e),Zb=(e,t)=>({start:e,end:t}),$b=Oe([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),Wb=(e,t)=>ar(uo.fromDom(e),"td,th",t),qb=e=>!yo(e.start,e.end),Gb=(e,t)=>vm(e.start,t).bind((o=>vm(e.end,t).bind((e=>Ue(yo(o,e),o))))),Yb=e=>t=>Gb(t,e).map((e=>((e,t,o)=>({rng:e,table:t,cells:o}))(t,e,jb(e)))),Kb=(e,t,o,n)=>{if(o.collapsed||!e.forall(qb))return F.none();if(t.isSameTable){const t=e.bind(Yb(n));return F.some({start:t,end:t})}{const e=Wb(o.startContainer,n),t=Wb(o.endContainer,n),r=e.bind((e=>t=>vm(t,e).bind((e=>ue(jb(e)).map((e=>Zb(t,e))))))(n)).bind(Yb(n)),i=t.bind((e=>t=>vm(t,e).bind((e=>de(jb(e)).map((e=>Zb(e,t))))))(n)).bind(Yb(n));return F.some({start:r,end:i})}},Xb=(e,t)=>te(e,(e=>yo(e,t))),Jb=e=>Ve(Xb(e.cells,e.rng.start),Xb(e.cells,e.rng.end),((t,o)=>e.cells.slice(t,o+1))),Qb=(e,t,o)=>e.exists((e=>((e,t)=>!qb(e)&&Gb(e,t).exists((e=>{const t=e.dom.rows;return 1===t.length&&1===t[0].cells.length})))(e,o)&&wm(e.start,t))),ev=(e,t)=>{const{startTable:o,endTable:n}=t,r=e.cloneRange();return o.each((e=>r.setStartAfter(e.dom))),n.each((e=>r.setEndBefore(e.dom))),r},tv=(e,t)=>{const o=(e=>t=>yo(e,t))(e),n=((e,t)=>{const o=Wb(e.startContainer,t),n=Wb(e.endContainer,t);return Ve(o,n,Zb)})(t,o),r=((e,t)=>{const o=Vb(e.startContainer,t),n=Vb(e.endContainer,t),r=o.isSome(),i=n.isSome(),s=Ve(o,n,yo).getOr(!1);return Ub({startTable:o,endTable:n,isStartInTable:r,isEndInTable:i,isSameTable:s,isMultiTable:!s&&r&&i})})(t,o);return Qb(n,t,o)?n.map((e=>$b.singleCellTable(t,e.start))):r.isMultiTable?((e,t,o,n)=>Kb(e,t,o,n).bind((({start:e,end:n})=>{const r=e.bind(Jb).getOr([]),i=n.bind(Jb).getOr([]);if(r.length>0&&i.length>0){const e=ev(o,t);return F.some($b.multiTable(r,i,e))}return F.none()})))(n,r,t,o):((e,t,o,n)=>Kb(e,t,o,n).bind((({start:e,end:t})=>e.or(t))).bind((e=>{const{isSameTable:n}=t,r=Jb(e).getOr([]);if(n&&e.cells.length===r.length)return F.some($b.fullTable(e.table));if(r.length>0){if(n)return F.some($b.partialTable(r,F.none()));{const e=ev(o,t);return F.some($b.partialTable(r,F.some({...t,rng:e})))}}return F.none()})))(n,r,t,o)},ov=e=>q(e,(e=>{yn(e,"contenteditable"),qa(e)})),nv=(e,t,o,n)=>{const r=o.cloneRange();n?(r.setStart(o.startContainer,o.startOffset),r.setEndAfter(t.dom.lastChild)):(r.setStartBefore(t.dom.firstChild),r.setEnd(o.endContainer,o.endOffset)),av(e,r,t,!1).each((e=>e()))},rv=e=>{const t=bm(e),o=uo.fromDom(e.selection.getNode());bi(o.dom)&&Mi(e.schema,o)?e.selection.setCursorLocation(o.dom,0):e.selection.collapse(!0),t.length>1&&$(t,(e=>yo(e,o)))&&pn(o,"data-mce-selected","1")},iv=(e,t,o)=>F.some((()=>{const n=e.selection.getRng(),r=o.bind((({rng:o,isStartInTable:r})=>{const i=((e,t)=>F.from(e.dom.getParent(t,e.dom.isBlock)).map(uo.fromDom))(e,r?o.endContainer:o.startContainer);o.deleteContents(),((e,t,o)=>{o.each((o=>{t?_n(o):(qa(o),e.selection.setCursorLocation(o.dom,0))}))})(e,r,i.filter(D(Mi,e.schema)));const s=r?t[0]:t[t.length-1];return nv(e,s,n,r),Mi(e.schema,s)?F.none():F.some(r?t.slice(1):t.slice(0,-1))})).getOr(t);ov(r),rv(e)})),sv=(e,t,o,n)=>F.some((()=>{const r=e.selection.getRng(),i=t[0],s=o[o.length-1];nv(e,i,r,!0),nv(e,s,r,!1);const a=Mi(e.schema,i)?t:t.slice(1),l=Mi(e.schema,s)?o:o.slice(0,-1);ov(a.concat(l)),n.deleteContents(),rv(e)})),av=(e,t,o,n=!0)=>F.some((()=>{Hb(e,t,o,n)})),lv=(e,t)=>F.some((()=>Cb(e,!1,t))),cv=(e,t,o,n)=>uv(t,n).fold((()=>((e,t,o)=>tv(t,o).bind((t=>t.fold(D(av,e),D(lv,e),D(iv,e),D(sv,e)))))(e,t,o)),(t=>((e,t)=>hv(e,t))(e,t))),dv=(e,t)=>ee(Lf(t,e),Ua),uv=(e,t)=>ee(Lf(t,e),Mo("caption")),hv=(e,t)=>F.some((()=>{qa(t),e.selection.setCursorLocation(t.dom,0)})),mv=(e,t,o,n,r)=>jh(o,e.getBody(),r).fold((()=>F.some(E)),(i=>((e,t,o,n)=>Wh(e.dom).bind((r=>qh(e.dom).map((e=>t?o.isEqual(r)&&n.isEqual(e):o.isEqual(e)&&n.isEqual(r))))).getOr(!0))(n,o,r,i)?((e,t)=>hv(e,t))(e,n):((e,t,o)=>uv(e,uo.fromDom(o.getNode())).fold((()=>F.some(E)),(e=>Ue(!yo(e,t),E))))(t,n,i))),pv=(e,t,o,n)=>{const r=Yl.fromRangeStart(e.selection.getRng());return dv(o,n).bind((n=>Mi(e.schema,n,{checkRootAsContent:!1})?hv(e,n):((e,t,o,n,r)=>jh(o,e.getBody(),r).bind((e=>dv(t,uo.fromDom(e.getNode())).bind((e=>yo(e,n)?F.none():F.some(E))))))(e,o,t,n,r)))},gv=(e,t)=>e?Of(t):Af(t),fv=(e,t,o)=>{const n=uo.fromDom(e.getBody());return uv(n,o).fold((()=>pv(e,t,n,o).orThunk((()=>Ue(((e,t)=>{const o=Yl.fromRangeStart(e.selection.getRng());return gv(t,o)||Hh(t,e.getBody(),o).exists((e=>gv(t,e)))})(e,t),E)))),(o=>((e,t,o,n)=>{const r=Yl.fromRangeStart(e.selection.getRng());return Mi(e.schema,n)?hv(e,n):mv(e,o,t,n,r)})(e,t,n,o)))},bv=(e,t)=>{const o=uo.fromDom(e.selection.getStart(!0)),n=bm(e);return e.selection.isCollapsed()&&0===n.length?fv(e,t,o):((e,t,o)=>{const n=uo.fromDom(e.getBody()),r=e.selection.getRng();return 0!==o.length?iv(e,o,F.none()):cv(e,n,r,t)})(e,o,n)},vv=(e,t)=>{let o=t;for(;o&&o!==e;){if(pi(o)||gi(o))return o;o=o.parentNode}return null},yv=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],xv=lo.each,wv=e=>{const t=e.dom,o=new Set(e.serializer.getTempAttrs()),n=e=>$(yv,(t=>Ke(e,t)))||o.has(e);return{compare:(e,o)=>{if(e.nodeName!==o.nodeName||e.nodeType!==o.nodeType)return!1;const r=e=>{const o={};return xv(t.getAttribs(e),(r=>{const i=r.nodeName.toLowerCase();"style"===i||n(i)||(o[i]=t.getAttrib(e,i))})),o},i=(e,t)=>{for(const o in e)if(Ee(e,o)){const n=t[o];if(x(n))return!1;if(e[o]!==n)return!1;delete t[o]}for(const e in t)if(Ee(t,e))return!1;return!0};if(Kr(e)&&Kr(o)){if(!i(r(e),r(o)))return!1;if(!i(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(o,"style"))))return!1}return!cm(e)&&!cm(o)},isAttributeInternal:n}},_v=e=>["h1","h2","h3","h4","h5","h6"].includes(e.name),Sv=(e,t,o,n)=>{const r=o.name;for(let t=0,i=e.length;t<i;t++){const i=e[t];if(i.name===r){const e=n.nodes[r];e?e.nodes.push(o):n.nodes[r]={filter:i,nodes:[o]}}}if(o.attributes)for(let e=0,r=t.length;e<r;e++){const r=t[e],i=r.name;if(i in o.attributes.map){const e=n.attributes[i];e?e.nodes.push(o):n.attributes[i]={filter:r,nodes:[o]}}}},Cv=(e,t)=>{const o=(e,o)=>{be(e,(e=>{const n=he(e.nodes);q(e.filter.callbacks,(r=>{for(let t=n.length-1;t>=0;t--){const r=n[t];(o?void 0!==r.attr(e.filter.name):r.name===e.filter.name)&&!w(r.parent)||n.splice(t,1)}n.length>0&&r(n,e.filter.name,t)}))}))};o(e.nodes,!1),o(e.attributes,!0)},kv=(e,t,o,n={})=>{const r=((e,t,o)=>{const n={nodes:{},attributes:{}};return o.firstChild&&((e,t)=>{let o=e;for(;o=o.walk();)t(o)})(o,(o=>{Sv(e,t,o,n)})),n})(e,t,o);Cv(r,n)},Ev=(e,t,o,n)=>{if((e.pad_empty_with_br||t.insert)&&o(n)){const e=new Vg("br",1);t.insert&&e.attr("data-mce-bogus","1"),n.empty().append(e)}else n.empty().append(new Vg("#text",3)).value=ct},Tv=(e,t)=>{const o=null==e?void 0:e.firstChild;return _(o)&&o===e.lastChild&&o.name===t},Ov=(e,t,o,n)=>n.isEmpty(t,o,(t=>((e,t)=>{const o=e.getElementRule(t.name);return!0===(null==o?void 0:o.paddEmpty)})(e,t))),Av=e=>{let t;for(let o=e;o;o=o.parent){const e=o.attr("contenteditable");if("false"===e)break;"true"===e&&(t=o)}return F.from(t)},Mv=(e,t,o=e.parent)=>{if(t.getSpecialElements()[e.name])e.empty().remove();else{const n=e.children();for(const e of n)o&&!t.isValidChild(o.name,e.name)&&Mv(e,t,o);e.unwrap()}},Pv=(e,t,o,n=E)=>{const r=t.getTextBlockElements(),i=t.getNonEmptyElements(),s=t.getWhitespaceElements(),a=lo.makeMap("tr,td,th,tbody,thead,tfoot,table,summary"),l=new Set,c=e=>e!==o&&!a[e.name];for(let o=0;o<e.length;o++){const a=e[o];let d,u,h;if(!a.parent||l.has(a))continue;if(r[a.name]&&"li"===a.parent.name){let e=a.next;for(;e&&r[e.name];)e.name="li",l.add(e),a.parent.insert(e,a.parent),e=e.next;a.unwrap();continue}const m=[a];for(d=a.parent;d&&!t.isValidChild(d.name,a.name)&&c(d);d=d.parent)m.push(d);if(d&&m.length>1)if(Dv(t,a,d))Mv(a,t);else{m.reverse(),u=m[0].clone(),n(u);let e=u;for(let o=0;o<m.length-1;o++){t.isValidChild(e.name,m[o].name)&&o>0?(h=m[o].clone(),n(h),e.append(h)):h=e;for(let e=m[o].firstChild;e&&e!==m[o+1];){const t=e.next;h.append(e),e=t}e=h}Ov(t,i,s,u)?d.insert(a,m[0],!0):(d.insert(u,m[0],!0),d.insert(a,u)),d=m[0],(Ov(t,i,s,d)||Tv(d,"br"))&&d.empty().remove()}else if(a.parent){if("li"===a.name){let e=a.prev;if(e&&("ul"===e.name||"ol"===e.name)){e.append(a);continue}if(e=a.next,e&&("ul"===e.name||"ol"===e.name)&&e.firstChild){e.insert(a,e.firstChild,!0);continue}const t=new Vg("ul",1);n(t),a.wrap(t);continue}if(t.isValidChild(a.parent.name,"div")&&t.isValidChild("div",a.name)){const e=new Vg("div",1);n(e),a.wrap(e)}else Mv(a,t)}}},Dv=(e,t,o=t.parent)=>!!o&&(!(!e.children[t.name]||e.isValidChild(o.name,t.name))||(!("a"!==t.name||!((e,t)=>{let o=e;for(;o;){if(o.name===t)return!0;o=o.parent}return!1})(o,"a"))||!(!(e=>"summary"===e.name)(o)||!_v(t))&&!((null==o?void 0:o.firstChild)===t&&(null==o?void 0:o.lastChild)===t))),Lv=e=>{const t=Yl.fromRangeStart(e),o=Yl.fromRangeEnd(e),n=e.commonAncestorContainer;return Hh(!1,n,o).map((r=>!hh(t,o,n)&&hh(t,r,n)?((e,t,o,n)=>{const r=document.createRange();return r.setStart(e,t),r.setEnd(o,n),r})(t.container(),t.offset(),r.container(),r.offset()):e)).getOr(e)},Rv=e=>e.collapsed?e:Lv(e),Nv=(e,t)=>e.getBlockElements()[t.name]&&(e=>_(e.firstChild)&&e.firstChild===e.lastChild)(t)&&(e=>"br"===e.name||e.value===ct)(t.firstChild),Iv=(e,t)=>{let o=t.firstChild,n=t.lastChild;return o&&"meta"===o.name&&(o=o.next),n&&"mce_marker"===n.attr("id")&&(n=n.prev),((e,t)=>{const o=e.getNonEmptyElements();return _(t)&&(t.isEmpty(o)||Nv(e,t))})(e,n)&&(n=null==n?void 0:n.prev),!(!o||o!==n)&&("ul"===o.name||"ol"===o.name)},Bv=e=>_(null==e?void 0:e.firstChild)&&e.firstChild===e.lastChild&&(e=>e.data===ct||ui(e))(e.firstChild),zv=e=>{return e.length>0&&(!(t=e[e.length-1]).firstChild||Bv(t))?e.slice(0,-1):e;var t},Fv=(e,t)=>{const o=e.getParent(t,e.isBlock);return o&&"LI"===o.nodeName?o:null},Hv=(e,t)=>{const o=Yl.after(e),n=Nh(t).prev(o);return n?n.toRange():null},jv=(e,t,o)=>{const n=e.parentNode;return n&&lo.each(t,(t=>{n.insertBefore(t,e)})),((e,t)=>{const o=Yl.before(e),n=Nh(t).next(o);return n?n.toRange():null})(e,o)},Vv=(e,t,o,n)=>{const r=((e,t,o)=>{const n=t.serialize(o);return(e=>{var t,o;const n=e.firstChild,r=e.lastChild;return n&&"META"===n.nodeName&&(null===(t=n.parentNode)||void 0===t||t.removeChild(n)),r&&"mce_marker"===r.id&&(null===(o=r.parentNode)||void 0===o||o.removeChild(r)),e})(e.createFragment(n))})(t,e,n),i=Fv(t,o.startContainer),s=zv((a=r.firstChild,K(null!==(l=null==a?void 0:a.childNodes)&&void 0!==l?l:[],(e=>"LI"===e.nodeName))));var a,l;const c=t.getRoot(),d=e=>{const n=Yl.fromRangeStart(o),r=Nh(t.getRoot()),s=1===e?r.prev(n):r.next(n),a=null==s?void 0:s.getNode();return!a||Fv(t,a)!==i};return i?d(1)?jv(i,s,c):d(2)?((e,t,o,n)=>(n.insertAfter(t.reverse(),e),Hv(t[0],o)))(i,s,c,t):((e,t,o,n)=>{const r=((e,t)=>{const o=t.cloneRange(),n=t.cloneRange();return o.setStartBefore(e),n.setEndAfter(e),[o.cloneContents(),n.cloneContents()]})(e,n),i=e.parentNode;return i&&(i.insertBefore(r[0],e),lo.each(t,(t=>{i.insertBefore(t,e)})),i.insertBefore(r[1],e),i.removeChild(e)),Hv(t[t.length-1],o)})(i,s,c,o):null},Uv=["pre"],Zv=bi,$v=(e,t,o)=>{var n;"all"===o.getAttribute("data-mce-bogus")?null===(n=o.parentNode)||void 0===n||n.insertBefore(e.dom.createFragment(t),o):((e,t)=>{if(e.isBlock(t)&&e.isEditable(t)){const e=t.childNodes;return 1===e.length&&ui(e[0])||0===e.length}return!1})(e.dom,o)?e.dom.setHTML(o,t):e.selection.setContent(t,{no_events:!0})},Wv=(e,t,o)=>{F.from(e.getParent(t,"td,th")).map(uo.fromDom).each((e=>((e,t)=>{Zo(e).each((o=>{Bo(o).each((n=>{t.isBlock(_o(e))&&za(o)&&t.isBlock(_o(n))&&_n(o)}))}))})(e,o)))},qv=(e,t)=>{var o,n,r;let i;const s=e.dom,a=e.selection;if(!t)return;a.scrollIntoView(t);const l=vv(e.getBody(),t);if(l&&"false"===s.getContentEditable(l))return s.remove(t),void a.select(l);let c=s.createRng();const d=t.previousSibling;if(ii(d)){c.setStart(d,null!==(n=null===(o=d.nodeValue)||void 0===o?void 0:o.length)&&void 0!==n?n:0);const e=t.nextSibling;ii(e)&&(d.appendData(e.data),null===(r=e.parentNode)||void 0===r||r.removeChild(e))}else c.setStartBefore(t),c.setEndBefore(t);const u=s.getParent(t,s.isBlock);if(s.remove(t),u&&s.isEmpty(u)){const t=Zv(u);wn(uo.fromDom(u)),c.setStart(u,0),c.setEnd(u,0),t||(e=>!!e.getAttribute("data-mce-fragment"))(u)||!(i=(t=>{let o=Yl.fromRangeStart(t);return o=Nh(e.getBody()).next(o),null==o?void 0:o.toRange()})(c))?s.add(u,s.create("br",t?{}:{"data-mce-bogus":"1"})):(c=i,s.remove(u))}a.setRng(c)},Gv=e=>{const t=e.dom,o=Rv(e.selection.getRng());e.selection.setRng(o);const n=t.getParent(o.startContainer,Zv);((e,t,o)=>{if(_(o))return o===e.getParent(t.endContainer,Zv)&&wm(uo.fromDom(o),t);return!1})(t,o,n)?av(e,o,uo.fromDom(n)):Kv(o)||Yv(o)?o.deleteContents():e.getDoc().execCommand("Delete",!1)},Yv=e=>Xv(e,ii),Kv=e=>Xv(e,mi),Xv=(e,t)=>e.startContainer===e.endContainer&&e.endOffset-e.startOffset==1&&t(e.startContainer.childNodes[e.startOffset]),Jv=(e,t,o)=>{var n,r;const i=e.selection,s=e.dom,a=e.parser,l=o.merge,c=cf({validate:!0},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>';o.preserve_zwsp||(t=Ka(t)),-1===t.indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);let u=i.getRng();const h=u.startContainer,m=e.getBody();h===m&&i.isCollapsed()&&s.isBlock(m.firstChild)&&((e,t)=>_(t)&&!e.schema.getVoidElements()[t.nodeName])(e,m.firstChild)&&s.isEmpty(m.firstChild)&&(u=s.createRng(),u.setStart(m.firstChild,0),u.setEnd(m.firstChild,0),i.setRng(u)),i.isCollapsed()||Gv(e);const p=i.getNode(),g={context:p.nodeName.toLowerCase(),data:o.data,insert:!0},f=a.parse(t,g);if(!0===o.paste&&Iv(e.schema,f)&&((e,t)=>!!Fv(e,t))(s,p))return u=Vv(c,s,i.getRng(),f),u&&i.setRng(u),t;!0===o.paste&&((e,t,o,n)=>{var r;const i=t.firstChild,s=t.lastChild,a=i===("bookmark"===s.attr("data-mce-type")?s.prev:s),l=Z(Uv,i.name);if(a&&l){const t="false"!==i.attr("contenteditable"),s=(null===(r=e.getParent(o,e.isBlock))||void 0===r?void 0:r.nodeName.toLowerCase())===i.name,a=F.from(vv(n,o)).forall(pi);return t&&s&&a}return!1})(s,f,p,e.getBody())&&(null===(n=f.firstChild)||void 0===n||n.unwrap()),(e=>{let t=e;for(;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")})(f);let b=f.lastChild;if(b&&"mce_marker"===b.attr("id")){const t=b;for(b=b.prev;b&&"table"!==b.name;b=b.walk(!0))if(3===b.type||!s.isBlock(b.name)){b.parent&&e.schema.isValidChild(b.parent.name,"span")&&b.parent.insert(t,b,"br"===b.name);break}}if(e._selectionOverrides.showBlockCaretContainer(p),g.invalid||((e,t,o)=>{var n;return $(o.children(),_v)&&"SUMMARY"===(null===(n=e.getParent(t,e.isBlock))||void 0===n?void 0:n.nodeName)})(s,p,f)){e.selection.setContent(d);let o,n=i.getNode();const l=e.getBody();for(ci(n)?n=o=l:o=n;o&&o!==l;)n=o,o=o.parentNode;t=n===l?l.innerHTML:s.getOuterHTML(n);const u=a.parse(t),h=(e=>{for(let t=e;t;t=t.walk())if("mce_marker"===t.attr("id"))return F.some(t);return F.none()})(u),m=h.bind(Av).getOr(u);h.each((e=>e.replace(f)));const p=f.children(),g=null!==(r=f.parent)&&void 0!==r?r:u;f.unwrap();const b=K(p,(t=>Dv(e.schema,t,g)));Pv(b,e.schema,m),kv(a.getNodeFilters(),a.getAttributeFilters(),u),t=c.serialize(u),n===l?s.setHTML(l,t):s.setOuterHTML(n,t)}else t=c.serialize(f),$v(e,t,p);var v;return((e,t)=>{const o=e.schema.getTextInlineElements(),n=e.dom;if(t){const t=e.getBody(),r=wv(e),i="*[data-mce-fragment]",s=n.select(i);lo.each(s,(e=>{const s=e=>_(o[e.nodeName.toLowerCase()]),a=e=>1===e.childNodes.length;if(!pf(n,l=e)&&!gf(n,l)&&s(e)&&a(e)){const o=mf(n,e),l=(e,t)=>re(e,(e=>Z(t,e))),c=t=>a(e)&&n.is(t,i)&&s(t)&&(t.nodeName===e.nodeName&&l(o,mf(n,t))||c(t.children[0])),d=o=>_(o)&&o!==t&&(r.compare(e,o)||d(o.parentElement)),u=o=>_(o)&&o!==t&&n.is(o,i)&&(ff(n,e,o)||u(o.parentElement));(c(e.children[0])||d(e.parentElement)&&!u(e.parentElement))&&n.remove(e,!0)}var l}))}})(e,l),qv(e,s.get("mce_marker")),v=e.getBody(),lo.each(v.getElementsByTagName("*"),(e=>{e.removeAttribute("data-mce-fragment")})),Wv(s,i.getStart(),e.schema),((e,t,o)=>{const n=Io(uo.fromDom(o),(e=>yo(e,uo.fromDom(t))));ce(n,n.length-2).filter(Eo).fold((()=>Ui(e,t)),(t=>Ui(e,t.dom)))})(e.schema,e.getBody(),i.getStart()),t},Qv=e=>e instanceof Vg,ey=(e,t,o)=>{e.dom.setHTML(e.getBody(),t),!0!==o&&(e=>{qp(e)&&Wh(e.getBody()).each((t=>{const o=t.getNode(),n=oi(o)?Wh(o).getOr(t):t;e.selection.setRng(n.toRange())}))})(e)},ty=(e,t,o)=>F.from(e.getBody()).map((n=>Qv(t)?((e,t,o,n)=>{kv(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),o);const r=cf({validate:!1},e.schema).serialize(o),i=Ka(Za(uo.fromDom(t))?r:lo.trim(r));return ey(e,i,n.no_selection),{content:o,html:i}})(e,n,t,o):((e,t,o,n)=>{if(0===(o=Ka(o)).length||/^\s+$/.test(o)){const r='<br data-mce-bogus="1">';"TABLE"===t.nodeName?o="<tr><td>"+r+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(o="<li>"+r+"</li>");const i=Wc(e);return e.schema.isValidChild(t.nodeName.toLowerCase(),i.toLowerCase())?(o=r,o=e.dom.createHTML(i,qc(e),o)):o||(o=r),ey(e,o,n.no_selection),{content:o,html:o}}{"raw"!==n.format&&(o=cf({validate:!1},e.schema).serialize(e.parser.parse(o,{isRootContent:!0,insert:!0})));const r=Za(uo.fromDom(t))?o:lo.trim(o);return ey(e,r,n.no_selection),{content:r,html:r}}})(e,n,t,o))).getOr({content:t,html:Qv(o.content)?"":o.content}),oy=Im,ny=(e,t,o)=>{const n=e.formatter.get(o);if(n)for(let o=0;o<n.length;o++){const r=n[o];if(Zm(r)&&!1===r.inherit&&e.dom.is(t,r.selector))return!0}return!1},ry=(e,t,o,n,r)=>{const i=e.dom.getRoot();if(t===i)return!1;const s=e.dom.getParent(t,(t=>!!ny(e,t,o)||(t.parentNode===i||!!ay(e,t,o,n,!0))));return!!ay(e,s,o,n,r)},iy=(e,t,o)=>!(!$m(o)||!oy(t,o.inline))||(!(!Um(o)||!oy(t,o.block))||!!Zm(o)&&(Kr(t)&&e.is(t,o.selector))),sy=(e,t,o,n,r,i)=>{const s=o[n],a="attributes"===n;if(S(o.onmatch))return o.onmatch(t,o,n);if(s)if(ht(s)){for(let o=0;o<s.length;o++)if(a?e.getAttrib(t,s[o]):zm(e,t,s[o]))return!0}else for(const n in s)if(Ee(s,n)){const l=a?e.getAttrib(t,n):zm(e,t,n),c=Nm(s[n],i),d=w(l)||nt(l);if(d&&w(c))continue;if(r&&d&&!o.exact)return!1;if((!r||o.exact)&&!oy(l,Bm(c,n)))return!1}return!0},ay=(e,t,o,n,r)=>{const i=e.formatter.get(o),s=e.dom;if(i&&Kr(t))for(let o=0;o<i.length;o++){const a=i[o];if(iy(e.dom,t,a)&&sy(s,t,a,"attributes",r,n)&&sy(s,t,a,"styles",r,n)){const o=a.classes;if(o)for(let r=0;r<o.length;r++)if(!e.dom.hasClass(t,Nm(o[r],n)))return;return a}}},ly=(e,t,o,n,r)=>{if(n)return ry(e,n,t,o,r);if(n=e.selection.getNode(),ry(e,n,t,o,r))return!0;const i=e.selection.getStart();return!(i===n||!ry(e,i,t,o,r))},cy=(e,t)=>{const o=t=>yo(t,uo.fromDom(e.getBody()));return F.from(e.selection.getStart(!0)).bind((n=>Er(uo.fromDom(n),(o=>me(t,(t=>((t,o)=>ay(e,t.dom,o)?F.some(o):F.none())(o,t)))),o))).getOrNull()},dy=(e,t,o)=>J(o,((o,n)=>{const r=((e,t)=>jm(e,t,(e=>{const t=e=>S(e)||e.length>1&&"%"===e.charAt(0);return $(["styles","attributes"],(o=>ke(e,o).exists((e=>{const o=b(e)?e:Ce(e);return $(o,t)}))))})))(e,n);return e.formatter.matchNode(t,n,{},r)?o.concat([n]):o}),[]),uy=Ga,hy=e=>{if(e){const t=new Ur(e,e);for(let e=t.current();e;e=t.next())if(ii(e))return e}return null},my=e=>{const t=uo.fromTag("span");return gn(t,{id:Gh,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&dn(t,uo.fromText(uy)),t},py=(e,t,o)=>{const n=e.dom,r=e.selection;if(qm(t))Cb(e,!1,uo.fromDom(t),o,!0);else{const e=r.getRng(),o=n.getParent(t,n.isBlock),i=e.startContainer,s=e.startOffset,a=e.endContainer,l=e.endOffset,c=(e=>{const t=hy(e);return t&&t.data.charAt(0)===uy&&t.deleteData(0,1),t})(t);n.remove(t,!0),i===c&&s>0&&e.setStart(c,s-1),a===c&&l>0&&e.setEnd(c,l-1),o&&n.isEmpty(o)&&qa(uo.fromDom(o)),r.setRng(e)}},gy=(e,t,o)=>{const n=e.dom,r=e.selection;if(t)py(e,t,o);else if(!(t=Kh(e.getBody(),r.getStart())))for(;t=n.get(Gh);)py(e,t,o)},fy=(e,t)=>(e.appendChild(t),t),by=(e,t)=>{var o;const n=X(e,((e,t)=>fy(e,t.cloneNode(!1))),t),r=null!==(o=n.ownerDocument)&&void 0!==o?o:document;return fy(n,r.createTextNode(uy))},vy=e=>Jn(e,Xn(e).replace(new RegExp(`${ct}$`)," ")),yy=(e,t)=>{const o=()=>{null===t||e.dom.isEmpty(t)||Bo(uo.fromDom(t)).each((e=>{To(e)?vy(e):rr(e,(e=>To(e))).each((e=>{To(e)&&vy(e)}))}))};e.once("input",(t=>{t.data&&!hm(t.data)&&(t.isComposing?e.once("compositionend",(()=>{o()})):o())}))},xy=(e,t,o,n)=>{const r=e.dom,i=e.selection;let s=!1;const a=e.formatter.get(t);if(!a)return;const l=i.getRng(),c=l.startContainer,d=l.startOffset;let u=c;ii(c)&&(d!==c.data.length&&(s=!0),u=u.parentNode);const h=[];let m;for(;u;){if(ay(e,u,t,o,n)){m=u;break}u.nextSibling&&(s=!0),h.push(u),u=u.parentNode}if(m)if(s){const s=i.getBookmark();l.collapse(!0);let c=cp(r,l,a,{includeTrailingSpace:!0});c=mg(c),e.formatter.remove(t,o,c,n),i.moveToBookmark(s)}else{const s=Kh(e.getBody(),m),a=_(s)?r.getParents(m.parentNode,z,s):[],l=my(!1).dom;((e,t,o)=>{var n,r;const i=e.dom,s=i.getParent(o,D(Pm,e.schema));s&&i.isEmpty(s)?null===(n=o.parentNode)||void 0===n||n.replaceChild(t,o):($a(uo.fromDom(o)),i.isEmpty(o)?null===(r=o.parentNode)||void 0===r||r.replaceChild(t,o):i.insertAfter(t,o))})(e,l,null!=s?s:m);const c=((e,t,o,n,r,i)=>{const s=e.formatter,a=e.dom,l=K(ge(s.get()),(e=>e!==n&&!Ye(e,"removeformat"))),c=dy(e,o,l);if(K(c,(t=>!Vm(e,t,n))).length>0){const e=o.cloneNode(!1);return a.add(t,e),s.remove(n,r,e,i),a.remove(e),F.some(e)}return F.none()})(e,l,m,t,o,n),d=by([...h,...c.toArray(),...a],l);s&&py(e,s,_(s)),i.setCursorLocation(d,1),yy(e,l),r.isEmpty(m)&&r.remove(m)}},wy=e=>{e.on("mouseup keydown",(t=>{var o;((e,t,o)=>{const n=e.selection,r=e.getBody();gy(e,null,o),8!==t&&46!==t||!n.isCollapsed()||n.getStart().innerHTML!==uy||gy(e,Kh(r,n.getStart()),!0),37!==t&&39!==t||gy(e,Kh(r,n.getStart()),!0)})(e,t.keyCode,(o=e.selection.getRng().endContainer,ii(o)&&Xe(o.data,ct)))}))},_y=e=>{const t=my(!1),o=by(e,t.dom);return{caretContainer:t,caretPosition:Yl(o,0)}},Sy=(e,t)=>{const{caretContainer:o,caretPosition:n}=_y(t);return an(uo.fromDom(e),o),_n(uo.fromDom(e)),n},Cy=(e,t)=>{if(Yh(t.dom))return!1;const o=e.schema.getTextInlineElements();return Ee(o,_o(t))&&!Yh(t.dom)&&!ti(t.dom)},ky={},Ey=Qr(["pre"]);((e,t)=>{ky[e]||(ky[e]=[]),ky[e].push(t)})("pre",(e=>{const t=e.selection.getRng();if(!t.collapsed){const t=e.selection.getSelectedBlocks(),o=K(K(t,Ey),(e=>t=>{const o=t.previousSibling;return Ey(o)&&Z(e,o)})(t));q(o,(e=>{((e,t)=>{const o=uo.fromDom(t),n=Do(o).dom;_n(o),hn(uo.fromDom(e),[uo.fromTag("br",n),uo.fromTag("br",n),...jo(o)])})(e.previousSibling,e)}))}}));const Ty=["fontWeight","fontStyle","color","fontSize","fontFamily"],Oy=e=>ee(e,(e=>$m(e)&&"span"===e.inline&&(e=>g(e.styles)&&$(ge(e.styles),(e=>Z(Ty,e))))(e))),Ay=(e,t)=>{const o=e.get(t);return b(o)?Oy(o):F.none()},My=(e,t)=>$h(t,Yl.fromRangeStart(e)).isNone(),Py=(e,t)=>!1===Zh(t,Yl.fromRangeEnd(e)).exists((e=>!ui(e.getNode())||Zh(t,e).isSome())),Dy=e=>t=>xi(t)&&e.isEditable(t),Ly=e=>K((e=>{const t=e.getSelectedBlocks(),o=e.getRng();if(e.isCollapsed())return[];if(1===t.length)return My(o,t[0])&&Py(o,t[0])?t:[];{const e=de(t).filter((e=>My(o,e))).toArray(),n=ue(t).filter((e=>Py(o,e))).toArray(),r=t.slice(1,-1);return e.concat(r).concat(n)}})(e),Dy(e.dom)),Ry=e=>K(e.getSelectedBlocks(),Dy(e.dom)),Ny=lo.each,Iy=e=>Kr(e)&&!cm(e)&&!Yh(e)&&!ti(e),By=(e,t)=>{for(let o=e;o;o=o[t]){if(ii(o)&&ot(o.data))return e;if(Kr(o)&&!cm(o))return o}return e},zy=(e,t,o)=>{const n=wv(e),r=Xr(t)&&e.dom.isEditable(t),i=Xr(o)&&e.dom.isEditable(o);if(r&&i){const r=By(t,"previousSibling"),i=By(o,"nextSibling");if(n.compare(r,i)){for(let e=r.nextSibling;e&&e!==i;){const t=e;e=e.nextSibling,r.appendChild(t)}return e.dom.remove(i),lo.each(lo.grep(i.childNodes),(e=>{r.appendChild(e)})),r}}return o},Fy=(e,t,o,n)=>{var r;if(n&&!1!==t.merge_siblings){const t=null!==(r=zy(e,Mm(n),n))&&void 0!==r?r:n;zy(e,t,Mm(t,!0))}},Hy=(e,t,o)=>{Ny(e.childNodes,(e=>{Iy(e)&&(t(e)&&o(e),e.hasChildNodes()&&Hy(e,t,o))}))},jy=(e,t)=>o=>!(!o||!zm(e,o,t)),Vy=(e,t,o)=>n=>{e.setStyle(n,t,o),""===n.getAttribute("style")&&n.removeAttribute("style"),((e,t)=>{"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)})(e,n)},Uy=Oe([{keep:[]},{rename:["name"]},{removed:[]}]),Zy=/^(src|href|style)$/,$y=lo.each,Wy=Im,qy=(e,t,o)=>e.isChildOf(t,o)&&t!==o&&!e.isBlock(o),Gy=(e,t,o)=>{let n=t[o?"startContainer":"endContainer"],r=t[o?"startOffset":"endOffset"];if(Kr(n)){const e=n.childNodes.length-1;!o&&r&&r--,n=n.childNodes[r>e?e:r]}return ii(n)&&o&&r>=n.data.length&&(n=new Ur(n,e.getBody()).next()||n),ii(n)&&!o&&0===r&&(n=new Ur(n,e.getBody()).prev()||n),n},Yy=(e,t)=>{const o=t?"firstChild":"lastChild",n=e[o];return(e=>/^(TR|TH|TD)$/.test(e.nodeName))(e)&&n?"TR"===e.nodeName&&n[o]||n:e},Ky=(e,t,o,n)=>{var r;const i=e.create(o,n);return null===(r=t.parentNode)||void 0===r||r.insertBefore(i,t),i.appendChild(t),i},Xy=(e,t,o,n,r)=>{const i=uo.fromDom(t),s=uo.fromDom(e.create(n,r)),a=o?Ho(i):Fo(i);return hn(s,a),o?(an(i,s),cn(s,i)):(ln(i,s),dn(s,i)),s.dom},Jy=(e,t,o)=>{const n=t.parentNode;let r;const i=e.dom,s=Wc(e);Um(o)&&n===i.getRoot()&&(o.list_block&&Wy(t,o.list_block)||q(he(t.childNodes),(t=>{Dm(e,s,t.nodeName.toLowerCase())?r?r.appendChild(t):(r=Ky(i,t,s),i.setAttribs(r,qc(e))):r=null}))),(e=>Zm(e)&&$m(e)&&He(ke(e,"mixed"),!0))(o)&&!Wy(o.inline,t)||i.remove(t,!0)},Qy=(e,t,o)=>C(e)?{name:t,value:null}:{name:e,value:Nm(t,o)},ex=(e,t)=>{""===e.getAttrib(t,"style")&&(t.removeAttribute("style"),t.removeAttribute("data-mce-style"))},tx=(e,t,o,n,r)=>{let i=!1;$y(o.styles,((s,a)=>{const{name:l,value:c}=Qy(a,s,n),d=Bm(c,l);(o.remove_similar||v(c)||!Kr(r)||Wy(zm(e,r,l),d))&&e.setStyle(t,l,""),i=!0})),i&&ex(e,t)},ox=(e,t,o,n,r)=>{const i=e.dom,s=wv(e),a=e.schema;if($m(t)&&Wi(a,t.inline)&&Gi(a,n)&&n.parentElement===e.getBody())return Jy(e,n,t),Uy.removed();if(!t.ceFalseOverride&&n&&"false"===i.getContentEditableParent(n))return Uy.keep();if(n&&!iy(i,n,t)&&!((e,t)=>t.links&&"A"===e.nodeName)(n,t))return Uy.keep();const l=n,c=t.preserve_attributes;if($m(t)&&"all"===t.remove&&b(c)){const e=K(i.getAttribs(l),(e=>Z(c,e.name.toLowerCase())));if(i.removeAllAttribs(l),q(e,(e=>i.setAttrib(l,e.name,e.value))),e.length>0)return Uy.rename("span")}if("all"!==t.remove){tx(i,l,t,o,r),$y(t.attributes,((e,n)=>{const{name:s,value:a}=Qy(n,e,o);if(t.remove_similar||v(a)||!Kr(r)||Wy(i.getAttrib(r,s),a)){if("class"===s){const e=i.getAttrib(l,s);if(e){let t="";if(q(e.split(/\s+/),(e=>{/mce\-\w+/.test(e)&&(t+=(t?" ":"")+e)})),t)return void i.setAttrib(l,s,t)}}if(Zy.test(s)&&l.removeAttribute("data-mce-"+s),"style"===s&&Qr(["li"])(l)&&"none"===i.getStyle(l,"list-style-type"))return l.removeAttribute(s),void i.setStyle(l,"list-style-type","none");"class"===s&&l.removeAttribute("className"),l.removeAttribute(s)}})),$y(t.classes,(e=>{e=Nm(e,o),Kr(r)&&!i.hasClass(r,e)||i.removeClass(l,e)}));const e=i.getAttribs(l);for(let t=0;t<e.length;t++){const o=e[t].nodeName;if(!s.isAttributeInternal(o))return Uy.keep()}}return"none"!==t.remove?(Jy(e,l,t),Uy.removed()):Uy.keep()},nx=(e,t,o,n)=>ox(e,t,o,n,n).fold(A(n),(t=>(e.dom.createFragment().appendChild(n),e.dom.rename(n,t))),A(null)),rx=(e,t,o,n,r)=>{const i=e.formatter.get(t),s=i[0],a=e.dom,l=e.selection,c=n=>{const a=((e,t,o,n,r)=>{let i;return t.parentNode&&q(Hm(e.dom,t.parentNode).reverse(),(t=>{if(!i&&Kr(t)&&"_start"!==t.id&&"_end"!==t.id){const s=ay(e,t,o,n,r);s&&!1!==s.split&&(i=t)}})),i})(e,n,t,o,r);return((e,t,o,n,r,i,s,a)=>{var l,c;let d,u;const h=e.dom;if(o){const m=o.parentNode;for(let o=n.parentNode;o&&o!==m;o=o.parentNode){let n=h.clone(o,!1);for(let o=0;o<t.length&&(n=nx(e,t[o],a,n),null!==n);o++);n&&(d&&n.appendChild(d),u||(u=n),d=n)}!i||s.mixed&&h.isBlock(o)||(n=null!==(l=h.split(o,n))&&void 0!==l?l:n),d&&u&&(null===(c=r.parentNode)||void 0===c||c.insertBefore(d,r),u.appendChild(r),$m(s)&&Fy(e,s,0,d))}return n})(e,i,a,n,n,!0,s,o)},d=t=>$(i,(n=>sx(e,n,o,t,t))),u=t=>{const o=he(t.childNodes),n=d(t)||$(i,(e=>iy(a,t,e))),r=t.parentNode;if(!n&&_(r)&&Wm(s)&&d(r),s.deep&&o.length)for(let e=0;e<o.length;e++)u(o[e]);q(["underline","line-through","overline"],(o=>{Kr(t)&&e.dom.getStyle(t,"text-decoration")===o&&t.parentNode&&Fm(a,t.parentNode)===o&&sx(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:o}},void 0,t)}))},h=e=>{const t=a.get(e?"_start":"_end");if(t){let o=t[e?"firstChild":"lastChild"];return(e=>cm(e)&&Kr(e)&&("_start"===e.id||"_end"===e.id))(o)&&(o=o[e?"firstChild":"lastChild"]),ii(o)&&0===o.data.length&&(o=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),a.remove(t,!0),o}return null},m=t=>{let o,n,r=cp(a,t,i,{includeTrailingSpace:t.collapsed});if(s.split){if(r=mg(r),o=Gy(e,r,!0),n=Gy(e,r),o!==n){if(o=Yy(o,!0),n=Yy(n,!1),qy(a,o,n)){const e=F.from(o.firstChild).getOr(o);return c(Xy(a,e,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void h(!0)}if(qy(a,n,o)){const e=F.from(n.lastChild).getOr(n);return c(Xy(a,e,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void h(!1)}o=Ky(a,o,"span",{id:"_start","data-mce-type":"bookmark"}),n=Ky(a,n,"span",{id:"_end","data-mce-type":"bookmark"});const e=a.createRng();e.setStartAfter(o),e.setEndBefore(n),dp(a,e,(e=>{q(e,(e=>{cm(e)||cm(e.parentNode)||c(e)}))})),c(o),c(n),o=h(!0),n=h()}else o=n=c(o);r.startContainer=o.parentNode?o.parentNode:o,r.startOffset=a.nodeIndex(o),r.endContainer=n.parentNode?n.parentNode:n,r.endOffset=a.nodeIndex(n)+1}dp(a,r,(e=>{q(e,u)}))};if(n){if(Em(n)){const e=a.createRng();e.setStartBefore(n),e.setEndAfter(n),m(e)}else m(n);Tc(e,t,n,o)}else l.isCollapsed()&&$m(s)&&!bm(e).length?xy(e,t,o,r):(Om(e,(()=>Cm(e,m)),(n=>$m(s)&&ly(e,t,o,n))),e.nodeChanged()),((e,t,o)=>{"removeformat"===t?q(Ry(e.selection),(t=>{q(Ty,(o=>e.dom.setStyle(t,o,""))),ex(e.dom,t)})):Ay(e.formatter,t).each((t=>{q(Ry(e.selection),(n=>tx(e.dom,n,t,o,null)))}))})(e,t,o),Tc(e,t,n,o)},ix=(e,t,o,n,r)=>{(n||e.selection.isEditable())&&rx(e,t,o,n,r)},sx=(e,t,o,n,r)=>ox(e,t,o,n,r).fold(B,(t=>(e.dom.rename(n,t),!0)),z),ax=lo.each,lx=(e,t,o,n)=>{ax(t,(t=>{$m(t)&&ax(e.dom.select(t.inline,n),(n=>{Iy(n)&&sx(e,t,o,n,t.exact?n:null)})),((e,t,o)=>{if(t.clear_child_styles){const n=t.links?"*:not(a)":"*";Ny(e.select(n,o),(o=>{Iy(o)&&e.isEditable(o)&&Ny(t.styles,((t,n)=>{e.setStyle(o,n,"")}))}))}})(e.dom,t,n)}))},cx=lo.each,dx=(e,t,o,n)=>{if(cx(o.styles,((o,r)=>{e.setStyle(t,r,Nm(o,n))})),o.styles){const o=e.getAttrib(t,"style");o&&e.setAttrib(t,"data-mce-style",o)}},ux=(e,t,o,n)=>{const r=e.formatter.get(t),i=r[0],s=!n&&e.selection.isCollapsed(),a=e.dom,l=e.selection,c=(e,t=i)=>{S(t.onformat)&&t.onformat(e,t,o,n),dx(a,e,t,o),cx(t.attributes,((t,n)=>{a.setAttrib(e,n,Nm(t,o))})),cx(t.classes,(t=>{const n=Nm(t,o);a.hasClass(e,n)||a.addClass(e,n)}))},d=(e,t)=>{let o=!1;return cx(e,(e=>!!Zm(e)&&("false"===a.getContentEditable(t)&&!e.ceFalseOverride||(!(!_(e.collapsed)||e.collapsed===s)||(!(a.is(t,e.selector)&&!Yh(t))||(c(t,e),o=!0,!1)))))),o},u=e=>{if(p(e)){const t=a.create(e);return c(t),t}return null},h=(n,s,a)=>{const l=[];let h=!0;const m=i.inline||i.block,p=u(m),g=n=>(e=>Um(e)&&!0===e.wrapper)(i)&&ay(e,n,t,o),f=(t,o,n)=>{const r=(e=>Um(e)&&!0!==e.wrapper)(i)&&Pm(e.schema,t)&&Dm(e,o,m);return n&&r};dp(n,s,(t=>{let o;const s=t=>{let u=!1,b=h,v=!1;const y=t.parentNode,x=y.nodeName.toLowerCase(),w=n.getContentEditable(t);_(w)&&(b=h,h="true"===w,u=!0,v=Rm(e,t));const S=h&&!u;if(ui(t)&&!((e,t,o,n)=>{if(Pd(e)&&$m(t)&&o.parentNode){const t=Bs(e.schema),r=Sr(uo.fromDom(o),(e=>Yh(e.dom)));return Te(t,n)&&Ai(e.schema,o.parentNode,{skipBogus:!1,includeZwsp:!0})&&!r}return!1})(e,i,t,x))return o=null,void(Um(i)&&n.remove(t));if(g(t))o=null;else{if(f(t,x,S)){const e=n.rename(t,m);return c(e),l.push(e),void(o=null)}if(Zm(i)){let e=d(r,t);if(!e&&_(y)&&Wm(i)&&(e=d(r,y)),!$m(i)||e)return void(o=null)}_(p)&&((t,o,r,s)=>{const l=t.nodeName.toLowerCase(),c=Dm(e,m,l)&&Dm(e,o,m),d=!a&&ii(t)&&Ya(t.data),u=Yh(t),h=!$m(i)||!n.isBlock(t);return(r||s)&&c&&!d&&!u&&h})(t,x,S,v)?(o||(o=n.clone(p,!1),y.insertBefore(o,t),l.push(o)),v&&u&&(h=b),o.appendChild(t)):(o=null,q(he(t.childNodes),s),u&&(h=b),o=null)}};q(t,s)})),!0===i.links&&q(l,(e=>{const t=e=>{"A"===e.nodeName&&c(e,i),q(he(e.childNodes),t)};t(e)})),q(l,(s=>{const a=(e=>{let t=0;return q(e.childNodes,(e=>{(e=>_(e)&&ii(e)&&0===e.length)(e)||cm(e)||t++})),t})(s);!(l.length>1)&&n.isBlock(s)||0!==a?($m(i)||Um(i)&&i.wrapper)&&(i.exact||1!==a||(s=(e=>{const t=ee(e.childNodes,Tm).filter((e=>"false"!==n.getContentEditable(e)&&iy(n,e,i)));return t.map((t=>{const o=n.clone(t,!1);return c(o),n.replace(o,e,!0),n.remove(t,!0),o})).getOr(e)})(s)),lx(e,r,o,s),((e,t,o,n,r)=>{const i=r.parentNode;ay(e,i,o,n)&&sx(e,t,n,r)||t.merge_with_parents&&i&&e.dom.getParent(i,(i=>!!ay(e,i,o,n)&&(sx(e,t,n,r),!0)))})(e,i,t,o,s),((e,t,o,n)=>{if(t.styles&&t.styles.backgroundColor){const r=jy(e,"fontSize");Hy(n,(t=>r(t)&&e.isEditable(t)),Vy(e,"backgroundColor",Nm(t.styles.backgroundColor,o)))}})(n,i,o,s),((e,t,o,n)=>{const r=t=>{if(Xr(t)&&Kr(t.parentNode)&&e.isEditable(t)){const o=Fm(e,t.parentNode);e.getStyle(t,"color")&&o?e.setStyle(t,"text-decoration",o):e.getStyle(t,"text-decoration")===o&&e.setStyle(t,"text-decoration",null)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(lo.walk(n,r,"childNodes"),r(n))})(n,i,0,s),((e,t,o,n)=>{if($m(t)&&("sub"===t.inline||"sup"===t.inline)){const o=jy(e,"fontSize");Hy(n,(t=>o(t)&&e.isEditable(t)),Vy(e,"fontSize",""));const r=K(e.select("sup"===t.inline?"sub":"sup",n),e.isEditable);e.remove(r,!0)}})(n,i,0,s),Fy(e,i,0,s)):n.remove(s,!0)}))},m=Em(n)?n:l.getNode();if("false"===a.getContentEditable(m)&&!Rm(e,m))return d(r,n=m),void Ec(e,t,n,o);if(i){if(n)if(Em(n)){if(!d(r,n)){const e=a.createRng();e.setStartBefore(n),e.setEndAfter(n),h(a,cp(a,e,r),!0)}}else h(a,n,!0);else s&&$m(i)&&!bm(e).length?((e,t,o)=>{let n;const r=e.selection,i=e.formatter.get(t);if(!i)return;const s=r.getRng();let a=s.startOffset;const l=s.startContainer.nodeValue;n=Kh(e.getBody(),r.getStart());const c=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(l&&a>0&&a<l.length&&c.test(l.charAt(a))&&c.test(l.charAt(a-1))){const n=r.getBookmark();s.collapse(!0);let a=cp(e.dom,s,i);a=mg(a),e.formatter.apply(t,o,a),r.moveToBookmark(n)}else{let i=n?hy(n):null;n&&(null==i?void 0:i.data)===uy||(d=e.getDoc(),u=my(!0).dom,n=d.importNode(u,!0),i=n.firstChild,s.insertNode(n),a=1,yy(e,n)),e.formatter.apply(t,o,n),r.setCursorLocation(i,a)}var d,u})(e,t,o):(l.setRng(Rv(l.getRng())),Om(e,(()=>{Cm(e,((e,t)=>{const o=t?e:cp(a,e,r);h(a,o,!1)}))}),z),e.nodeChanged()),Ay(e.formatter,t).each((t=>{q(Ly(e.selection),(e=>dx(a,e,t,o)))}));((e,t)=>{Ee(ky,e)&&q(ky[e],(e=>{e(t)}))})(t,e)}Ec(e,t,n,o)},hx=(e,t,o,n)=>{(n||e.selection.isEditable())&&ux(e,t,o,n)},mx=e=>Ee(e,"vars"),px=e=>e.selection.getStart(),gx=(e,t,o,n,r)=>Q(t,(t=>{const i=e.formatter.matchNode(t,o,null!=r?r:{},n);return!x(i)}),(t=>!!ny(e,t,o)||!n&&_(e.formatter.matchNode(t,o,r,!0)))),fx=(e,t)=>{const o=null!=t?t:px(e);return K(Hm(e.dom,o),(e=>Kr(e)&&!ti(e)))},bx=(e,t,o)=>{const n=fx(e,t);be(o,((o,r)=>{const i=o=>{const i=gx(e,n,r,o.similar,mx(o)?o.vars:void 0),s=i.isSome();if(o.state.get()!==s){o.state.set(s);const e=i.getOr(t);mx(o)?o.callback(s,{node:e,format:r,parents:n}):q(o.callbacks,(t=>t(s,{node:e,format:r,parents:n})))}};q([o.withSimilar,o.withoutSimilar],i),q(o.withVars,i)}))},vx=(e,t,o,n,r,i)=>(((e,t,o,n,r,i)=>{const s=t.get();q(o.split(","),(t=>{const o=ke(s,t).getOrThunk((()=>{const e={withSimilar:{state:Ae(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Ae(!1),similar:!1,callbacks:[]},withVars:[]};return s[t]=e,e})),a=()=>{const o=fx(e);return gx(e,o,t,r,i).isSome()};if(x(i)){const e=r?o.withSimilar:o.withoutSimilar;e.callbacks.push(n),1===e.callbacks.length&&e.state.set(a())}else o.withVars.push({state:Ae(a()),similar:r,vars:i,callback:n})})),t.set(s)})(e,t,o,n,r,i),{unbind:()=>((e,t,o)=>{const n=e.get();q(t.split(","),(e=>ke(n,e).each((t=>{n[e]={withSimilar:{...t.withSimilar,callbacks:K(t.withSimilar.callbacks,(e=>e!==o))},withoutSimilar:{...t.withoutSimilar,callbacks:K(t.withoutSimilar.callbacks,(e=>e!==o))},withVars:K(t.withVars,(e=>e.callback!==o))}})))),e.set(n)})(t,o,n)}),yx=lo.explode,xx=()=>{const e={};return{addFilter:(t,o)=>{q(yx(t),(t=>{Ee(e,t)||(e[t]={name:t,callbacks:[]}),e[t].callbacks.push(o)}))},getFilters:()=>Ce(e),removeFilter:(t,o)=>{q(yx(t),(t=>{if(Ee(e,t))if(_(o)){const n=e[t],r=K(n.callbacks,(e=>e!==o));r.length>0?n.callbacks=r:delete e[t]}else delete e[t]}))}}},wx=(e,t,o)=>{e.addNodeFilter("font",(e=>{q(e,(e=>{const n=t.parse(e.attr("style")),r=e.attr("color"),i=e.attr("face"),s=e.attr("size");r&&(n.color=r),i&&(n["font-family"]=i),s&&rt(s).each((e=>{n["font-size"]=o[e-1]})),e.name="span",e.attr("style",t.serialize(n)),((e,t)=>{q(t,(t=>{e.attr(t,null)}))})(e,["color","face","size"])}))}))},_x=(e,t,o)=>{var n;const r=Ys();t.convert_fonts_to_spans&&wx(e,r,lo.explode(null!==(n=t.font_size_legacy_values)&&void 0!==n?n:"")),((e,t,o)=>{e.addNodeFilter("strike",(e=>{const n="html4"!==t.type;q(e,(e=>{if(n)e.name="s";else{const t=o.parse(e.attr("style"));t["text-decoration"]="line-through",e.name="span",e.attr("style",o.serialize(t))}}))}))})(e,o,r)},Sx=e=>{const[t,...o]=e.split(","),n=o.join(","),r=/data:([^/]+\/[^;]+)(;.+)?/.exec(t);if(r){const e=";base64"===r[2],t=(e=>{try{return decodeURIComponent(e)}catch(t){return e}})(n),o=e?(e=>{const t=/([a-z0-9+\/=\s]+)/i.exec(e);return t?t[1]:""})(t):t;return F.some({type:r[1],data:o,base64Encoded:e})}return F.none()},Cx=(e,t,o=!0)=>{let n=t;if(o)try{n=atob(t)}catch(e){return F.none()}const r=new Uint8Array(n.length);for(let e=0;e<r.length;e++)r[e]=n.charCodeAt(e);return F.some(new Blob([r],{type:e}))},kx=e=>{return Ke(e,"blob:")?(e=>fetch(e).then((e=>e.ok?e.blob():Promise.reject())).catch((()=>Promise.reject({message:`Cannot convert ${e} to Blob. Resource might not exist or is inaccessible.`,uriType:"blob"}))))(e):Ke(e,"data:")?(t=e,new Promise(((e,o)=>{Sx(t).bind((({type:e,data:t,base64Encoded:o})=>Cx(e,t,o))).fold((()=>o("Invalid data URI")),e)}))):Promise.reject("Unknown URI format");var t},Ex=e=>new Promise(((t,o)=>{const n=new FileReader;n.onloadend=()=>{t(n.result)},n.onerror=()=>{var e;o(null===(e=n.error)||void 0===e?void 0:e.message)},n.readAsDataURL(e)}));let Tx=0;const Ox=(e,t,o)=>Sx(e).bind((({data:e,type:n,base64Encoded:r})=>{if(t&&!r)return F.none();{const t=r?e:btoa(e);return o(t,n)}})),Ax=(e,t,o)=>{const n=e.create((r||"blobid")+Tx++,t,o);var r;return e.add(n),n},Mx=(e,t,o=!1)=>Ox(t,o,((t,o)=>F.from(e.getByData(t,o)).orThunk((()=>Cx(o,t).map((o=>Ax(e,o,t))))))),Px=/^(?:(?:(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)([A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*))(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+)?)?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+)?)?)$/,Dx=e=>F.from(e.match(Px)).bind((e=>ce(e,1))).map((e=>Ke(e,"www.")?e.substring(4):e)),Lx=(e,t)=>{F.from(e.attr("src")).bind(Dx).forall((e=>!Z(t,e)))&&e.attr("sandbox","")},Rx=(e,t)=>Ke(e,`${t}/`),Nx=({type:e,src:t,width:o,height:n}={},r,i)=>{const s=(e=>x(e)?"iframe":Rx(e,"image")?"img":Rx(e,"video")?"video":Rx(e,"audio")?"audio":"iframe")(e),a=new Vg(s,1);return a.attr("audio"===s?{src:t}:{src:t,width:o,height:n}),"audio"!==s&&"video"!==s||a.attr("controls",""),"iframe"===s&&r&&Lx(a,i),a},Ix=(e,t)=>{const{blob_cache:o}=t;if(o){const t=e=>{const t=e.attr("src");(e=>e.attr("src")===ro.transparentSrc||_(e.attr("data-mce-placeholder")))(e)||(e=>_(e.attr("data-mce-bogus")))(e)||w(t)||Mx(o,t,!0).each((t=>{e.attr("src",t.blobUri())}))};e.addAttributeFilter("src",(e=>q(e,t)))}},{entries:Bx,setPrototypeOf:zx,isFrozen:Fx,getPrototypeOf:Hx,getOwnPropertyDescriptor:jx}=Object;let{freeze:Vx,seal:Ux,create:Zx}=Object,{apply:$x,construct:Wx}="undefined"!=typeof Reflect&&Reflect;Vx||(Vx=function(e){return e}),Ux||(Ux=function(e){return e}),$x||($x=function(e,t,o){return e.apply(t,o)}),Wx||(Wx=function(e,t){return new e(...t)});const qx=lw(Array.prototype.forEach),Gx=lw(Array.prototype.lastIndexOf),Yx=lw(Array.prototype.pop),Kx=lw(Array.prototype.push),Xx=lw(Array.prototype.splice),Jx=lw(String.prototype.toLowerCase),Qx=lw(String.prototype.toString),ew=lw(String.prototype.match),tw=lw(String.prototype.replace),ow=lw(String.prototype.indexOf),nw=lw(String.prototype.trim),rw=lw(Object.prototype.hasOwnProperty),iw=lw(RegExp.prototype.test),sw=(aw=TypeError,function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return Wx(aw,t)});var aw;function lw(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return $x(e,t,n)}}function cw(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Jx;zx&&zx(e,null);let n=t.length;for(;n--;){let r=t[n];if("string"==typeof r){const e=o(r);e!==r&&(Fx(t)||(t[n]=e),r=e)}e[r]=!0}return e}function dw(e){for(let t=0;t<e.length;t++){rw(e,t)||(e[t]=null)}return e}function uw(e){const t=Zx(null);for(const[o,n]of Bx(e)){rw(e,o)&&(Array.isArray(n)?t[o]=dw(n):n&&"object"==typeof n&&n.constructor===Object?t[o]=uw(n):t[o]=n)}return t}function hw(e,t){for(;null!==e;){const o=jx(e,t);if(o){if(o.get)return lw(o.get);if("function"==typeof o.value)return lw(o.value)}e=Hx(e)}return function(){return null}}const mw=Vx(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),pw=Vx(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),gw=Vx(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fw=Vx(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),bw=Vx(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vw=Vx(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),yw=Vx(["#text"]),xw=Vx(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ww=Vx(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),_w=Vx(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Sw=Vx(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cw=Ux(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kw=Ux(/<%[\w\W]*|[\w\W]*%>/gm),Ew=Ux(/\$\{[\w\W]*/gm),Tw=Ux(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ow=Ux(/^aria-[\-\w]+$/),Aw=Ux(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mw=Ux(/^(?:\w+script|data):/i),Pw=Ux(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dw=Ux(/^html$/i),Lw=Ux(/^[a-z][.\w]*(-[.\w]+)+$/i);var Rw=Object.freeze({__proto__:null,ARIA_ATTR:Ow,ATTR_WHITESPACE:Pw,CUSTOM_ELEMENT:Lw,DATA_ATTR:Tw,DOCTYPE_NAME:Dw,ERB_EXPR:kw,IS_ALLOWED_URI:Aw,IS_SCRIPT_OR_DATA:Mw,MUSTACHE_EXPR:Cw,TMPLIT_EXPR:Ew});const Nw=1,Iw=3,Bw=7,zw=8,Fw=9,Hw=function(){return"undefined"==typeof window?null:window};var jw=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hw();const o=t=>e(t);if(o.version="3.2.4",o.removed=[],!t||!t.document||t.document.nodeType!==Fw||!t.Element)return o.isSupported=!1,o;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:d,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:p}=t,g=c.prototype,f=hw(g,"cloneNode"),b=hw(g,"remove"),v=hw(g,"nextSibling"),y=hw(g,"childNodes"),x=hw(g,"parentNode");if("function"==typeof a){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let w,_="";const{implementation:S,createNodeIterator:C,createDocumentFragment:k,getElementsByTagName:E}=n,{importNode:T}=r;let O={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof Bx&&"function"==typeof x&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:A,ERB_EXPR:M,TMPLIT_EXPR:P,DATA_ATTR:D,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:I}=Rw;let{IS_ALLOWED_URI:B}=Rw,z=null;const F=cw({},[...mw,...pw,...gw,...bw,...yw]);let H=null;const j=cw({},[...xw,...ww,..._w,...Sw]);let V=Object.seal(Zx(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),U=null,Z=null,$=!0,W=!0,q=!1,G=!0,Y=!1,K=!0,X=!1,J=!1,Q=!1,ee=!1,te=!1,oe=!1,ne=!0,re=!1,ie=!0,se=!1,ae={},le=null;const ce=cw({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const ue=cw({},["audio","video","img","source","image","track"]);let he=null;const me=cw({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml";let be=fe,ve=!1,ye=null;const xe=cw({},[pe,ge,fe],Qx);let we=cw({},["mi","mo","mn","ms","mtext"]),_e=cw({},["annotation-xml"]);const Se=cw({},["title","style","font","a","script"]);let Ce=null;const ke=["application/xhtml+xml","text/html"];let Ee=null,Te=null;const Oe=n.createElement("form"),Ae=function(e){return e instanceof RegExp||e instanceof Function},Me=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"==typeof e||(e={}),e=uw(e),Ce=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ee="application/xhtml+xml"===Ce?Qx:Jx,z=rw(e,"ALLOWED_TAGS")?cw({},e.ALLOWED_TAGS,Ee):F,H=rw(e,"ALLOWED_ATTR")?cw({},e.ALLOWED_ATTR,Ee):j,ye=rw(e,"ALLOWED_NAMESPACES")?cw({},e.ALLOWED_NAMESPACES,Qx):xe,he=rw(e,"ADD_URI_SAFE_ATTR")?cw(uw(me),e.ADD_URI_SAFE_ATTR,Ee):me,de=rw(e,"ADD_DATA_URI_TAGS")?cw(uw(ue),e.ADD_DATA_URI_TAGS,Ee):ue,le=rw(e,"FORBID_CONTENTS")?cw({},e.FORBID_CONTENTS,Ee):ce,U=rw(e,"FORBID_TAGS")?cw({},e.FORBID_TAGS,Ee):{},Z=rw(e,"FORBID_ATTR")?cw({},e.FORBID_ATTR,Ee):{},ae=!!rw(e,"USE_PROFILES")&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||Aw,be=e.NAMESPACE||fe,we=e.MATHML_TEXT_INTEGRATION_POINTS||we,_e=e.HTML_INTEGRATION_POINTS||_e,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),ae&&(z=cw({},yw),H=[],!0===ae.html&&(cw(z,mw),cw(H,xw)),!0===ae.svg&&(cw(z,pw),cw(H,ww),cw(H,Sw)),!0===ae.svgFilters&&(cw(z,gw),cw(H,ww),cw(H,Sw)),!0===ae.mathMl&&(cw(z,bw),cw(H,_w),cw(H,Sw))),e.ADD_TAGS&&(z===F&&(z=uw(z)),cw(z,e.ADD_TAGS,Ee)),e.ADD_ATTR&&(H===j&&(H=uw(H)),cw(H,e.ADD_ATTR,Ee)),e.ADD_URI_SAFE_ATTR&&cw(he,e.ADD_URI_SAFE_ATTR,Ee),e.FORBID_CONTENTS&&(le===ce&&(le=uw(le)),cw(le,e.FORBID_CONTENTS,Ee)),ie&&(z["#text"]=!0),X&&cw(z,["html","head","body"]),z.table&&(cw(z,["tbody"]),delete U.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw sw('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw sw('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,_=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let o=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(o=t.getAttribute(n));const r="dompurify"+(o?"#"+o:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,i)),null!==w&&"string"==typeof _&&(_=w.createHTML(""));Vx&&Vx(e),Te=e}},Pe=cw({},[...pw,...gw,...fw]),De=cw({},[...bw,...vw]),Le=function(e){Kx(o.removed,{element:e});try{x(e).removeChild(e)}catch(t){b(e)}},Re=function(e,t){try{Kx(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Kx(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ne=function(e){let t=null,o=null;if(Q)e="<remove></remove>"+e;else{const t=ew(e,/^[\r\n\t ]+/);o=t&&t[0]}"application/xhtml+xml"===Ce&&be===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=w?w.createHTML(e):e;if(be===fe)try{t=(new m).parseFromString(r,Ce)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(be,"template",null);try{t.documentElement.innerHTML=ve?_:r}catch(e){}}const i=t.body||t.documentElement;return e&&o&&i.insertBefore(n.createTextNode(o),i.childNodes[0]||null),be===fe?E.call(t,X?"html":"body")[0]:X?t.documentElement:i},Ie=function(e){return C.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Be=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},ze=function(e){return"function"==typeof l&&e instanceof l};function Fe(e,t,n){qx(e,(e=>{e.call(o,t,n,Te)}))}const He=function(e){let t=null;if(Fe(O.beforeSanitizeElements,e,null),Be(e))return Le(e),!0;const n=Ee(e.nodeName);if(Fe(O.uponSanitizeElement,e,{tagName:n,allowedTags:z}),e.hasChildNodes()&&!ze(e.firstElementChild)&&iw(/<[/\w]/g,e.innerHTML)&&iw(/<[/\w]/g,e.textContent))return Le(e),!0;if(e.nodeType===Bw)return Le(e),!0;if(K&&e.nodeType===zw&&iw(/<[/\w]/g,e.data))return Le(e),!0;if(!z[n]||U[n]){if(!U[n]&&Ve(n)){if(V.tagNameCheck instanceof RegExp&&iw(V.tagNameCheck,n))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(n))return!1}if(ie&&!le[n]){const t=x(e)||e.parentNode,o=y(e)||e.childNodes;if(o&&t){for(let n=o.length-1;n>=0;--n){const r=f(o[n],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,v(e))}}}return Le(e),!0}return e instanceof c&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const o=Jx(e.tagName),n=Jx(t.tagName);return!!ye[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?"svg"===o:t.namespaceURI===pe?"svg"===o&&("annotation-xml"===n||we[n]):Boolean(Pe[o]):e.namespaceURI===pe?t.namespaceURI===fe?"math"===o:t.namespaceURI===ge?"math"===o&&_e[n]:Boolean(De[o]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!_e[n])&&!(t.namespaceURI===pe&&!we[n])&&!De[o]&&(Se[o]||!Pe[o]):!("application/xhtml+xml"!==Ce||!ye[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!iw(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Iw&&(t=e.textContent,qx([A,M,P],(e=>{t=tw(t,e," ")})),e.textContent!==t&&(Kx(o.removed,{element:e.cloneNode()}),e.textContent=t)),Fe(O.afterSanitizeElements,e,null),!1):(Le(e),!0)},je=function(e,t,o){if(ne&&("id"===t||"name"===t)&&(o in n||o in Oe))return!1;if(W&&!Z[t]&&iw(D,t));else if($&&iw(L,t));else if(!H[t]||Z[t]){if(!(Ve(e)&&(V.tagNameCheck instanceof RegExp&&iw(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&iw(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&iw(V.tagNameCheck,o)||V.tagNameCheck instanceof Function&&V.tagNameCheck(o))))return!1}else if(he[t]);else if(iw(B,tw(o,N,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ow(o,"data:")||!de[e]){if(q&&!iw(R,tw(o,N,"")));else if(o)return!1}else;return!0},Ve=function(e){return"annotation-xml"!==e&&ew(e,I)},Ue=function(e){Fe(O.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Be(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:s,namespaceURI:a,value:l}=i,c=Ee(s);let d="value"===s?l:nw(l);const u=d;if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Fe(O.uponSanitizeAttribute,e,n),d=n.attrValue,!re||"id"!==c&&"name"!==c||(Re(s,e),d="user-content-"+d),K&&iw(/((--!?|])>)|<\/(style|title)/i,d)){Re(s,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Re(s,e);continue}if(!G&&iw(/\/>/i,d)){Re(s,e);continue}Y&&qx([A,M,P],(e=>{d=tw(d,e," ")}));const h=Ee(e.nodeName);if(je(h,c,d)){if(w&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(a);else switch(p.getAttributeType(h,c)){case"TrustedHTML":d=w.createHTML(d);break;case"TrustedScriptURL":d=w.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),Be(e)?Le(e):Yx(o.removed)}catch(e){}}else Re(s,e)}Fe(O.afterSanitizeAttributes,e,null)},Ze=function e(t){let o=null;const n=Ie(t);for(Fe(O.beforeSanitizeShadowDOM,t,null);o=n.nextNode();)Fe(O.uponSanitizeShadowNode,o,null),He(o),Ue(o),o.content instanceof s&&e(o.content);Fe(O.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,i=null,a=null,c=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ze(e)){if("function"!=typeof e.toString)throw sw("toString is not a function");if("string"!=typeof(e=e.toString()))throw sw("dirty is not a string, aborting")}if(!o.isSupported)return e;if(J||Me(t),o.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=Ee(e.nodeName);if(!z[t]||U[t])throw sw("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=Ne("\x3c!----\x3e"),i=n.ownerDocument.importNode(e,!0),i.nodeType===Nw&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return w&&oe?w.createHTML(e):e;if(n=Ne(e),!n)return ee?null:oe?_:""}n&&Q&&Le(n.firstChild);const d=Ie(se?e:n);for(;a=d.nextNode();)He(a),Ue(a),a.content instanceof s&&Ze(a.content);if(se)return e;if(ee){if(te)for(c=k.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(H.shadowroot||H.shadowrootmode)&&(c=T.call(r,c,!0)),c}let u=X?n.outerHTML:n.innerHTML;return X&&z["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&iw(Dw,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),Y&&qx([A,M,P],(e=>{u=tw(u,e," ")})),w&&oe?w.createHTML(u):u},o.setConfig=function(){Me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},o.clearConfig=function(){Te=null,J=!1},o.isValidAttribute=function(e,t,o){Te||Me({});const n=Ee(e),r=Ee(t);return je(n,r,o)},o.addHook=function(e,t){"function"==typeof t&&Kx(O[e],t)},o.removeHook=function(e,t){if(void 0!==t){const o=Gx(O[e],t);return-1===o?void 0:Xx(O[e],o,1)[0]}return Yx(O[e])},o.removeHooks=function(e){O[e]=[]},o.removeAllHooks=function(){O={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();const Vw=lo.each,Uw=lo.trim,Zw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],$w={ftp:21,http:80,https:443,mailto:25},Ww=["img","video"],qw=(e,t,o)=>{const n=(e=>{try{return decodeURIComponent(e)}catch(t){return unescape(e)}})(t).replace(/\s/g,"");return!e.allow_script_urls&&(!!/((java|vb)script|mhtml):/i.test(n)||!e.allow_html_data_urls&&(/^data:image\//i.test(n)?((e,t)=>_(e)?!e:!_(t)||!Z(Ww,t))(e.allow_svg_data_urls,o)&&/^data:image\/svg\+xml/i.test(n):/^data:/i.test(n)))};class Gw{static parseDataUri(e){let t;const o=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(o[0]);return n&&(t=n[1]),{type:t,data:o[1]}}static isDomSafe(e,t,o={}){if(o.allow_script_urls)return!0;{const n=xs.decode(e).replace(/[\s\u0000-\u001F]+/g,"");return!qw(o,n,t)}}static getDocumentBaseUrl(e){var t;let o;return o=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?null!==(t=e.href)&&void 0!==t?t:"":e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(o)&&(o=o.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(o)||(o+="/")),o}constructor(e,t={}){this.path="",this.directory="",e=Uw(e),this.settings=t;const o=t.base_uri,n=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(n.source=e);const r=0===e.indexOf("//");if(0!==e.indexOf("/")||r||(e=(o&&o.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){const t=o?o.path:new Gw(document.location.href).directory;if(""===(null==o?void 0:o.protocol))e="//mce_host"+n.toAbsPath(t,e);else{const r=/([^#?]*)([#?]?.*)/.exec(e);r&&(e=(o&&o.protocol||"http")+"://mce_host"+n.toAbsPath(t,r[1])+r[2])}}e=e.replace(/@@/g,"(mce_at)");const i=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);i&&Vw(Zw,((e,t)=>{let o=i[t];o&&(o=o.replace(/\(mce_at\)/g,"@@")),n[e]=o})),o&&(n.protocol||(n.protocol=o.protocol),n.userInfo||(n.userInfo=o.userInfo),n.port||"mce_host"!==n.host||(n.port=o.port),n.host&&"mce_host"!==n.host||(n.host=o.host),n.source=""),r&&(n.protocol="")}setPath(e){const t=/^(.*?)\/?(\w+)?$/.exec(e);t&&(this.path=t[0],this.directory=t[1],this.file=t[2]),this.source="",this.getURI()}toRelative(e){if("./"===e)return e;const t=new Gw(e,{base_uri:this});if("mce_host"!==t.host&&this.host!==t.host&&t.host||this.port!==t.port||this.protocol!==t.protocol&&""!==t.protocol)return t.getURI();const o=this.getURI(),n=t.getURI();if(o===n||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===n)return o;let r=this.toRelPath(this.path,t.path);return t.query&&(r+="?"+t.query),t.anchor&&(r+="#"+t.anchor),r}toAbsolute(e,t){const o=new Gw(e,{base_uri:this});return o.getURI(t&&this.isSameOrigin(o))}isSameOrigin(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;const t=this.protocol?$w[this.protocol]:null;if(t&&(this.port||t)==(e.port||t))return!0}return!1}toRelPath(e,t){let o,n,r=0,i="";const s=e.substring(0,e.lastIndexOf("/")).split("/"),a=t.split("/");if(s.length>=a.length)for(o=0,n=s.length;o<n;o++)if(o>=a.length||s[o]!==a[o]){r=o+1;break}if(s.length<a.length)for(o=0,n=a.length;o<n;o++)if(o>=s.length||s[o]!==a[o]){r=o+1;break}if(1===r)return t;for(o=0,n=s.length-(r-1);o<n;o++)i+="../";for(o=r-1,n=a.length;o<n;o++)i+=o!==r-1?"/"+a[o]:a[o];return i}toAbsPath(e,t){let o=0;const n=/\/$/.test(t)?"/":"",r=e.split("/"),i=t.split("/"),s=[];Vw(r,(e=>{e&&s.push(e)}));const a=[];for(let e=i.length-1;e>=0;e--)0!==i[e].length&&"."!==i[e]&&(".."!==i[e]?o>0?o--:a.push(i[e]):o++);const l=s.length-o;let c;return c=l<=0?ie(a).join("/"):s.slice(0,l).join("/")+"/"+ie(a).join("/"),0!==c.indexOf("/")&&(c="/"+c),n&&c.lastIndexOf("/")!==c.length-1&&(c+=n),c}getURI(e=!1){let t;return this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source}}const Yw=lo.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),Kw="data-mce-type";let Xw=0;const Jw=(e,t,o,n,r)=>{var i,s,a,l;const c=t.validate,d=o.getSpecialElements();8===e.nodeType&&!t.allow_conditional_comments&&/^\[if/i.test(null!==(i=e.nodeValue)&&void 0!==i?i:"")&&(e.nodeValue=" "+e.nodeValue);const u=null!==(s=null==r?void 0:r.tagName)&&void 0!==s?s:e.nodeName.toLowerCase();if("html"!==n&&o.isValid(n))return void(_(r)&&(r.allowedTags[u]=!0));if(1!==e.nodeType||"body"===u)return;const h=uo.fromDom(e),m=vn(h,Kw),g=fn(h,"data-mce-bogus");if(!m&&p(g))return void("all"===g?_n(h):Sn(h));const f=o.getElementRule(u);if(!c||f){if(_(r)&&(r.allowedTags[u]=!0),c&&f&&!m){if(q(null!==(a=f.attributesForced)&&void 0!==a?a:[],(e=>{pn(h,e.name,"{$uid}"===e.value?"mce_"+Xw++:e.value)})),q(null!==(l=f.attributesDefault)&&void 0!==l?l:[],(e=>{vn(h,e.name)||pn(h,e.name,"{$uid}"===e.value?"mce_"+Xw++:e.value)})),f.attributesRequired&&!$(f.attributesRequired,(e=>vn(h,e))))return void Sn(h);if(f.removeEmptyAttrs&&(e=>{const t=e.dom.attributes;return null==t||0===t.length})(h))return void Sn(h);f.outputName&&f.outputName!==u&&Tn(h,f.outputName)}}else Ee(d,u)?_n(h):Sn(h)},Qw=(e,t,o,n,r,i)=>"html"!==o&&!Li(n)||!(r in Yw&&qw(e,i,n))&&(!e.validate||t.isValid(n,r)||Ke(r,"data-")||Ke(r,"aria-")),e_=(e,t)=>e.hasAttribute(Kw)&&("id"===t||"class"===t||"style"===t),t_=(e,t)=>e in t.getBoolAttrs(),o_=(e,t,o,n)=>{const{attributes:r}=e;for(let i=r.length-1;i>=0;i--){const s=r[i],a=s.name,l=s.value;Qw(t,o,n,e.tagName.toLowerCase(),a,l)||e_(e,a)?t_(a,o)&&e.setAttribute(a,a):e.removeAttribute(a)}},n_=(e,t,o)=>{const n=jw();return n.addHook("uponSanitizeElement",((n,r)=>{Jw(n,e,t,o.track(n),r)})),n.addHook("uponSanitizeAttribute",((n,r)=>{((e,t,o,n,r)=>{const i=e.tagName.toLowerCase(),{attrName:s,attrValue:a}=r;r.keepAttr=Qw(t,o,n,i,s,a),r.keepAttr?(r.allowedAttributes[s]=!0,t_(s,o)&&(r.attrValue=s),t.allow_svg_data_urls&&Ke(a,"data:image/svg+xml")&&(r.forceKeepAttr=!0)):e_(e,s)&&(r.forceKeepAttr=!0)})(n,e,t,o.current(),r)})),n},r_=(e,t)=>{const o=jw(),n=t.allow_mathml_annotation_encodings,r=b(n)&&n.length>0,i=(e,o)=>r&&"semantics"===o?F.some(!0):"annotation"===o?F.some(Kr(e)&&(e=>{const t=e.getAttribute("encoding");return r&&p(t)&&Z(n,t)})(e)):b(t.extended_mathml_elements)&&t.extended_mathml_elements.includes(o)?F.from(!0):F.none();o.addHook("uponSanitizeElement",((e,o)=>{var n;const r=null!==(n=o.tagName)&&void 0!==n?n:e.nodeName.toLowerCase();i(e,r).each((n=>{o.allowedTags[r]=n,!n&&t.sanitize&&Kr(e)&&e.remove()}))})),o.addHook("uponSanitizeAttribute",((e,o)=>{if(b(t.extended_mathml_attributes)){t.extended_mathml_attributes.includes(o.attrName)&&(o.forceKeepAttr=!0)}})),o.sanitize(e,{IN_PLACE:!0,USE_PROFILES:{mathMl:!0}})},i_=e=>t=>{const o=Ni(t);if("svg"===o)(e=>{const t=["type","href","role","arcrole","title","show","actuate","label","from","to"].map((e=>`xlink:${e}`)),o={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,svgFilters:!0},ALLOWED_ATTR:t};jw().sanitize(e,o)})(t);else{if("math"!==o)throw new Error("Not a namespace element");r_(t,e)}},s_=(e,t)=>{const o=(()=>{const e=We(),t=()=>e.get().map(Ni).getOr("html");return{track:o=>(Ri(o)?e.set(o):e.get().exists((e=>!e.contains(o)))&&e.clear(),t()),current:t,reset:()=>{e.clear()}}})();if(e.sanitize){const n=n_(e,t,o),r=(t,r)=>{n.sanitize(t,((e,t)=>{const o={IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[],SAFE_FOR_XML:!1};return o.PARSER_MEDIA_TYPE=t,e.allow_script_urls?o.ALLOWED_URI_REGEXP=/.*/:e.allow_html_data_urls&&(o.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),o})(e,r)),n.removed=[],o.reset()};return{sanitizeHtmlElement:r,sanitizeNamespaceElement:i_(e)}}return{sanitizeHtmlElement:(n,r)=>{const i=document.createNodeIterator(n,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let s;for(;s=i.nextNode();){const n=o.track(s);Jw(s,e,t,n),Kr(s)&&o_(s,e,t,n)}o.reset()},sanitizeNamespaceElement:E}},a_=lo.makeMap,l_=lo.extend,c_=(e,t,o,n)=>{const r=e.name,i=r in o&&"title"!==r&&"textarea"!==r&&"noscript"!==r,s=t.childNodes;for(let t=0,r=s.length;t<r;t++){const r=s[t],a=new Vg(r.nodeName.toLowerCase(),r.nodeType);if(Kr(r)){const e=r.attributes;for(let t=0,o=e.length;t<o;t++){const o=e[t];a.attr(o.name,o.value)}Li(a.name)&&(n(r),a.value=r.innerHTML)}else ii(r)?(a.value=r.data,i&&(a.raw=!0)):(li(r)||si(r)||ai(r))&&(a.value=r.data);Li(a.name)||c_(a,r,o,n),e.append(a)}},d_=(e,t,o,n)=>{const r=o.validate,i=t.getNonEmptyElements(),s=t.getWhitespaceElements(),a=l_(a_("script,style,head,html,body,title,meta,param"),t.getBlockElements()),l=Bs(t),c=/[ \t\r\n]+/g,d=/^[ \t\r\n]+/,u=/[ \t\r\n]+$/,h=e=>{let t=e.parent;for(;_(t);){if(t.name in s)return!0;t=t.parent}return!1},m=o=>o.name in a||Ki(t,o)||Li(o.name)&&o.parent===e,p=(t,o)=>{const r=o?t.prev:t.next;return!_(r)&&!w(t.parent)&&(m(t.parent)&&(t.parent!==e||!0===n.isRootContent))};return[e=>{var t;if(3===e.type&&!h(e)){let o=null!==(t=e.value)&&void 0!==t?t:"";o=o.replace(c," "),(((e,t)=>_(e)&&(t(e)||"br"===e.name))(e.prev,m)||p(e,!0))&&(o=o.replace(d,"")),0===o.length||" "===o&&e.prev&&8===e.prev.type&&e.next&&8===e.next.type?e.remove():e.value=o}},e=>{var a;if(1===e.type){const a=t.getElementRule(e.name);if(r&&a){const r=Ov(t,i,s,e);a.paddInEmptyBlock&&r&&(e=>{let o=e;for(;_(o);){if(o.name in l)return Ov(t,i,s,o);o=o.parent}return!1})(e)?Ev(o,n,m,e):a.removeEmpty&&r?m(e)?e.remove():e.unwrap():a.paddEmpty&&(r||(e=>{var t;return Tv(e,"#text")&&(null===(t=null==e?void 0:e.firstChild)||void 0===t?void 0:t.value)===ct})(e))&&Ev(o,n,m,e)}}else if(3===e.type&&!h(e)){let t=null!==(a=e.value)&&void 0!==a?a:"";(e.next&&m(e.next)||p(e,!1))&&(t=t.replace(u,"")),0===t.length?e.remove():e.value=t}}]},u_=(e={},t=Fs())=>{const o=xx(),n=xx(),r={validate:!0,root_name:"body",sanitize:!0,...e},i=new DOMParser,s=s_(r,t),a=o.addFilter,l=o.getFilters,c=o.removeFilter,d=n.addFilter,u=n.getFilters,h=n.removeFilter,m=(e,o)=>{const n=p(o.attr(Kw)),r=1===o.type&&!Ee(e,o.name)&&!Ki(t,o)&&!Li(o.name);return 3===o.type||r&&!n},g={schema:t,addAttributeFilter:d,getAttributeFilters:u,removeAttributeFilter:h,addNodeFilter:a,getNodeFilters:l,removeNodeFilter:c,parse:(e,o={})=>{var n;const a=r.validate,c=null!==(n=o.context)&&void 0!==n?n:r.root_name,d=((e,o,n="html")=>{const r="xhtml"===n?"application/xhtml+xml":"text/html",a=Ee(t.getSpecialElements(),o.toLowerCase()),l=a?`<${o}>${e}</${o}>`:e,c=i.parseFromString("xhtml"===n?`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>${l}</body></html>`:/^[\s]*<head/i.test(e)||/^[\s]*<html/i.test(e)||/^[\s]*<!DOCTYPE/i.test(e)?`<html>${l}</html>`:`<body>${l}</body>`,r).body;return s.sanitizeHtmlElement(c,r),a?c.firstChild:c})(e,c,o.format);Ui(t,d);const h=new Vg(c,11);c_(h,d,t.getSpecialElements(),s.sanitizeNamespaceElement),d.innerHTML="";const[p,g]=d_(h,t,r,o),f=[],b=a?e=>((e,o)=>{Dv(t,e)&&o.push(e)})(e,f):E,v={nodes:{},attributes:{}},y=e=>Sv(l(),u(),e,v);if(((e,t,o)=>{const n=[];for(let o=e,r=o;o;r=o,o=o.walk()){const i=o;q(t,(e=>e(i))),w(i.parent)&&i!==e?o=r:n.push(i)}for(let e=n.length-1;e>=0;e--){const t=n[e];q(o,(e=>e(t)))}})(h,[p,y],[g,b]),f.reverse(),a&&f.length>0)if(o.context){const{pass:e,fail:n}=Y(f,(e=>e.parent===h));Pv(n,t,h,y),o.invalid=e.length>0}else Pv(f,t,h,y);const x=((e,t)=>{var o;const n=null!==(o=t.forced_root_block)&&void 0!==o?o:e.forced_root_block;return!1===n?"":!0===n?"p":n})(r,o);return x&&("body"===h.name||o.isRootContent)&&((e,o)=>{const n=l_(a_("script,style,head,html,body,title,meta,param"),t.getBlockElements()),i=/^[ \t\r\n]+/,s=/[ \t\r\n]+$/;let a=e.firstChild,l=null;const c=e=>{var t,o;e&&(a=e.firstChild,a&&3===a.type&&(a.value=null===(t=a.value)||void 0===t?void 0:t.replace(i,"")),a=e.lastChild,a&&3===a.type&&(a.value=null===(o=a.value)||void 0===o?void 0:o.replace(s,"")))};if(t.isValidChild(e.name,o.toLowerCase())){for(;a;){const t=a.next;m(n,a)?(l||(l=new Vg(o,1),l.attr(r.forced_root_block_attrs),e.insert(l,a)),l.append(a)):(c(l),l=null),a=t}c(l)}})(h,x),o.invalid||Cv(v,o),h}};return((e,t)=>{var o,n;const r=e.schema;e.addAttributeFilter("href",(e=>{let o=e.length;const n=e=>{const t=e?lo.trim(e):"";return/\b(noopener)\b/g.test(t)?t:(e=>e.split(" ").filter((e=>e.length>0)).concat(["noopener"]).sort().join(" "))(t)};if(!t.allow_unsafe_link_target)for(;o--;){const t=e[o];"a"===t.name&&"_blank"===t.attr("target")&&t.attr("rel",n(t.attr("rel")))}})),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",(e=>{let t,o,n,r,i=e.length;for(;i--;)if(r=e[i],"a"===r.name&&r.firstChild&&!r.attr("href"))for(n=r.parent,t=r.lastChild;t&&n;)o=t.prev,n.insert(t,r),t=o})),t.fix_list_elements&&e.addNodeFilter("ul,ol",(e=>{let t,o,n=e.length;for(;n--;)if(t=e[n],o=t.parent,o&&("ul"===o.name||"ol"===o.name))if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{const e=new Vg("li",1);e.attr("style","list-style-type: none"),t.wrap(e)}}));const i=r.getValidClasses();t.validate&&i&&e.addAttributeFilter("class",(e=>{var t;let o=e.length;for(;o--;){const n=e[o],r=null!==(t=n.attr("class"))&&void 0!==t?t:"",s=lo.explode(r," ");let a="";for(let e=0;e<s.length;e++){const t=s[e];let o=!1,r=i["*"];r&&r[t]&&(o=!0),r=i[n.name],!o&&r&&r[t]&&(o=!0),o&&(a&&(a+=" "),a+=t)}a.length||(a=null),n.attr("class",a)}})),Ix(e,t);const s=null!==(o=t.sandbox_iframes)&&void 0!==o&&o,a=pe(null!==(n=t.sandbox_iframes_exclusions)&&void 0!==n?n:[]);t.convert_unsafe_embeds&&e.addNodeFilter("object,embed",(e=>q(e,(e=>{e.replace(Nx({type:e.attr("type"),src:"object"===e.name?e.attr("data"):e.attr("src"),width:e.attr("width"),height:e.attr("height")},s,a))})))),s&&e.addNodeFilter("iframe",(e=>q(e,(e=>Lx(e,a)))))})(g,r),((e,t,o)=>{t.inline_styles&&_x(e,t,o)})(g,r,t),g},h_=(e,t,o)=>{const n=(e=>Qv(e)?cf({validate:!1}).serialize(e):e)(e),r=t(n);if(r.isDefaultPrevented())return r;if(Qv(e)){if(r.content!==n){const t=u_({validate:!1,forced_root_block:!1,...o}).parse(r.content,{context:e.name});return{...r,content:t}}return{...r,content:e}}return r},m_=e=>({sanitize:_u(e),sandbox_iframes:Ou(e),sandbox_iframes_exclusions:Au(e)}),p_=(e,t)=>{if(t.no_events)return De.value(t);{const o=((e,t)=>e.dispatch("BeforeGetContent",t))(e,t);return o.isDefaultPrevented()?De.error(Ac(e,{content:"",...o}).content):De.value(o)}},g_=(e,t,o)=>{if(o.no_events)return t;{const n=h_(t,(t=>Ac(e,{...o,content:t})),m_(e));return n.content}},f_=(e,t)=>{if(t.no_events)return De.value(t);{const o=h_(t.content,(o=>((e,t)=>e.dispatch("BeforeSetContent",t))(e,{...t,content:o})),m_(e));return o.isDefaultPrevented()?(Oc(e,o),De.error(void 0)):De.value(o)}},b_=(e,t,o)=>{o.no_events||Oc(e,{...o,content:t})},v_=(e,t,o)=>({element:e,width:t,rows:o}),y_=(e,t)=>({element:e,cells:t}),x_=(e,t)=>({x:e,y:t}),w_=(e,t)=>bn(e,t).bind(rt).getOr(1),__=(e,t,o)=>{const n=e.rows;return!!(n[o]?n[o].cells:[])[t]},S_=e=>J(e,((e,t)=>t.cells.length>e?t.cells.length:e),0),C_=(e,t)=>{const o=e.rows;for(let e=0;e<o.length;e++){const n=o[e].cells;for(let o=0;o<n.length;o++)if(yo(n[o],t))return F.some(x_(o,e))}return F.none()},k_=(e,t,o,n,r)=>{const i=[],s=e.rows;for(let e=o;e<=r;e++){const o=s[e].cells,r=t<n?o.slice(t,n+1):o.slice(n,t+1);i.push(y_(s[e].element,r))}return i},E_=e=>{const t=v_(kn(e),0,[]);return q(wr(e,"tr"),((e,o)=>{q(wr(e,"td,th"),((n,r)=>{((e,t,o,n,r)=>{const i=w_(r,"rowspan"),s=w_(r,"colspan"),a=e.rows;for(let e=o;e<o+i;e++){a[e]||(a[e]=y_(En(n),[]));for(let n=t;n<t+s;n++)a[e].cells[n]=e===o&&n===t?r:kn(r)}})(t,((e,t,o)=>{for(;__(e,t,o);)t++;return t})(t,r,o),o,e,n)}))})),v_(t.element,S_(t.rows),t.rows)},T_=e=>((e,t)=>{const o=kn(e.element),n=uo.fromTag("tbody");return hn(n,t),dn(o,n),o})(e,(e=>W(e.rows,(e=>{const t=W(e.cells,(e=>{const t=En(e);return yn(t,"colspan"),yn(t,"rowspan"),t})),o=kn(e.element);return hn(o,t),o})))(e)),O_=(e,t,o)=>C_(e,t).bind((t=>C_(e,o).map((o=>((e,t,o)=>{const n=t.x,r=t.y,i=o.x,s=o.y,a=r<s?k_(e,n,r,i,s):k_(e,n,s,i,r);return v_(e.element,S_(a),a)})(e,t,o))))),A_=(e,t)=>ee(e,(e=>"li"===_o(e)&&wm(e,t))).fold(A([]),(t=>(e=>ee(e,(e=>"ul"===_o(e)||"ol"===_o(e))))(e).map((e=>{const t=uo.fromTag(_o(e)),o=_e(Fn(e),((e,t)=>Ke(t,"list-style")));return Nn(t,o),[uo.fromTag("li"),t]})).getOr([]))),M_=(e,t,o)=>{const n=uo.fromDom(t.commonAncestorContainer),r=Lf(n,e),i=K(r,(e=>o.isWrapper(_o(e)))),s=A_(r,t),a=i.concat(s.length?s:(e=>ja(e)?Ro(e).filter(Ha).fold(A([]),(t=>[e,t])):Ha(e)?[e]:[])(n));return W(a,kn)},P_=()=>Yn([]),D_=(e,t,o)=>((e,t)=>{const o=J(t,((e,t)=>(dn(t,e),t)),e);return t.length>0?Yn([o]):o})(uo.fromDom(t.cloneContents()),M_(e,t,o)),L_=(e,t)=>((e,t)=>ir(t,"table",D(yo,e)))(e,t[0]).bind((e=>{const o=t[0],n=t[t.length-1],r=E_(e);return O_(r,o,n).map((e=>Yn([T_(e)])))})).getOrThunk(P_),R_=(e,t,o)=>{const n=fm(t,e);return n.length>0?L_(e,n):((e,t,o)=>t.length>0&&t[0].collapsed?P_():D_(e,t[0],o))(e,t,o)},N_=(e,t)=>t>=0&&t<e.length&&hm(e.charAt(t)),I_=e=>Ka(e.innerText),B_=(e,t)=>{if("text"===t.format)return(e=>F.from(e.selection.getRng()).map((t=>{var o;const n=F.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),r=e.getBody(),i=(e=>e.map((e=>e.nodeName)).getOr("div").toLowerCase())(n),s=uo.fromDom(t.cloneContents());of(s),nf(s);const a=e.dom.add(r,i,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},s.dom),l=I_(a),c=Ka(null!==(o=a.textContent)&&void 0!==o?o:"");if(e.dom.remove(a),N_(c,0)||N_(c,c.length-1)){const e=n.getOr(r),t=I_(e),o=t.indexOf(l);return-1===o?l:(N_(t,o-1)?" ":"")+l+(N_(t,o+l.length)?" ":"")}return l})).getOr(""))(e);{const o=((e,t)=>{const o=e.selection.getRng(),n=e.dom.create("body"),r=e.selection.getSel(),i=Bg(e,pm(r)),s=t.contextual?R_(uo.fromDom(e.getBody()),i,e.schema).dom:o.cloneContents();return s&&n.appendChild(s),e.selection.serializer.serialize(n,t)})(e,t);return"tree"===t.format?o:e.selection.isCollapsed()?"":o}},z_=e=>Kr(e)?e.outerHTML:ii(e)?xs.encodeRaw(e.data,!1):li(e)?"\x3c!--"+e.data+"--\x3e":"",F_=(e,t,o)=>{const n=(e=>{let t;const o=document.createElement("div"),n=document.createDocumentFragment();for(e&&(o.innerHTML=e);t=o.firstChild;)n.appendChild(t);return n})(t);if(e.hasChildNodes()&&o<e.childNodes.length){const t=e.childNodes[o];e.insertBefore(n,t)}else e.appendChild(n)},H_=(e,t)=>(((e,t)=>{let o=0;q(e,(e=>{0===e[0]?o++:1===e[0]?(F_(t,e[1],o),o++):2===e[0]&&((e,t)=>{if(e.hasChildNodes()&&t<e.childNodes.length){const o=e.childNodes[t];e.removeChild(o)}})(t,o)}))})(((e,t)=>{const o=e.length+t.length+2,n=new Array(o),r=new Array(o),i=(o,n,r,s,l)=>{const c=a(o,n,r,s);if(null===c||c.start===n&&c.diag===n-s||c.end===o&&c.diag===o-r){let i=o,a=r;for(;i<n||a<s;)i<n&&a<s&&e[i]===t[a]?(l.push([0,e[i]]),++i,++a):n-o>s-r?(l.push([2,e[i]]),++i):(l.push([1,t[a]]),++a)}else{i(o,c.start,r,c.start-c.diag,l);for(let t=c.start;t<c.end;++t)l.push([0,e[t]]);i(c.end,n,c.end-c.diag,s,l)}},s=(o,n,r,i)=>{let s=o;for(;s-n<i&&s<r&&e[s]===t[s-n];)++s;return((e,t,o)=>({start:e,end:t,diag:o}))(o,s,n)},a=(o,i,a,l)=>{const c=i-o,d=l-a;if(0===c||0===d)return null;const u=c-d,h=d+c,m=(h%2==0?h:h+1)/2;let p,g,f,b,v;for(n[1+m]=o,r[1+m]=i+1,p=0;p<=m;++p){for(g=-p;g<=p;g+=2){for(f=g+m,g===-p||g!==p&&n[f-1]<n[f+1]?n[f]=n[f+1]:n[f]=n[f-1]+1,b=n[f],v=b-o+a-g;b<i&&v<l&&e[b]===t[v];)n[f]=++b,++v;if(u%2!=0&&u-p<=g&&g<=u+p&&r[f-u]<=n[f])return s(r[f-u],g+o-a,i,l)}for(g=u-p;g<=u+p;g+=2){for(f=g+m-u,g===u-p||g!==u+p&&r[f+1]<=r[f-1]?r[f]=r[f+1]-1:r[f]=r[f-1],b=r[f]-1,v=b-o+a-g;b>=o&&v>=a&&e[b]===t[v];)r[f]=b--,v--;if(u%2==0&&-p<=g&&g<=p&&r[f]<=n[f+u])return s(r[f],g+o-a,i,l)}}return null},l=[];return i(0,e.length,0,t.length,l),l})(W(he(t.childNodes),z_),e),t),t),j_=at((()=>document.implementation.createHTMLDocument("undo"))),V_=e=>{const t=e.serializer.getTempAttrs(),o=tf(e.getBody(),t);return(e=>null!==e.querySelector("iframe"))(o)?(n=((e,t)=>K(W(he(e.childNodes),t?T(Ka,z_):z_),(e=>e.length>0)))(o,!0),{type:"fragmented",fragments:n,content:"",bookmark:null,beforeBookmark:null}):{type:"complete",fragments:null,content:Ka(o.innerHTML),bookmark:null,beforeBookmark:null};var n},U_=(e,t,o)=>{const n=o?t.beforeBookmark:t.bookmark;"fragmented"===t.type?H_(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:!_(n)||!Jh(n)||!n.isFakeCaret}),n&&(e.selection.moveToBookmark(n),e.selection.scrollIntoView())},Z_=e=>"fragmented"===e.type?e.fragments.join(""):e.content,$_=e=>{const t=uo.fromTag("body",j_());return Mn(t,Z_(e)),q(wr(t,"*[data-mce-bogus]"),Sn),An(t)},W_=(e,t)=>!(!e||!t)&&(!!((e,t)=>Z_(e)===Z_(t))(e,t)||((e,t)=>$_(e)===$_(t))(e,t)),q_=e=>0===e.get(),G_=(e,t,o)=>{q_(o)&&(e.typing=t)},Y_=(e,t)=>{e.typing&&(G_(e,!1,t),e.add())},K_=e=>({init:{bindEvents:E},undoManager:{beforeChange:(t,o)=>((e,t,o)=>{q_(t)&&o.set(bc(e.selection))})(e,t,o),add:(t,o,n,r,i,s)=>((e,t,o,n,r,i,s)=>{const a=V_(e),l=lo.extend(i||{},a);if(!q_(n)||e.removed)return null;const c=t.data[o.get()];if(e.dispatch("BeforeAddUndo",{level:l,lastLevel:c,originalEvent:s}).isDefaultPrevented())return null;if(c&&W_(c,l))return null;t.data[o.get()]&&r.get().each((e=>{t.data[o.get()].beforeBookmark=e}));const d=Fd(e);if(d&&t.data.length>d){for(let e=0;e<t.data.length-1;e++)t.data[e]=t.data[e+1];t.data.length--,o.set(t.data.length)}l.bookmark=bc(e.selection),o.get()<t.data.length-1&&(t.data.length=o.get()+1),t.data.push(l),o.set(t.data.length-1);const u={level:l,lastLevel:c,originalEvent:s};return o.get()>0?(e.setDirty(!0),e.dispatch("AddUndo",u),e.dispatch("change",u)):e.dispatch("AddUndo",u),l})(e,t,o,n,r,i,s),undo:(t,o,n)=>((e,t,o,n)=>{let r;return t.typing&&(t.add(),t.typing=!1,G_(t,!1,o)),n.get()>0&&(n.set(n.get()-1),r=t.data[n.get()],U_(e,r,!0),e.setDirty(!0),e.dispatch("Undo",{level:r})),r})(e,t,o,n),redo:(t,o)=>((e,t,o)=>{let n;return t.get()<o.length-1&&(t.set(t.get()+1),n=o[t.get()],U_(e,n,!1),e.setDirty(!0),e.dispatch("Redo",{level:n})),n})(e,t,o),clear:(t,o)=>((e,t,o)=>{t.data=[],o.set(0),t.typing=!1,e.dispatch("ClearUndos")})(e,t,o),reset:e=>(e=>{e.clear(),e.add()})(e),hasUndo:(t,o)=>((e,t,o)=>o.get()>0||t.typing&&t.data[0]&&!W_(V_(e),t.data[0]))(e,t,o),hasRedo:(e,t)=>((e,t)=>t.get()<e.data.length-1&&!e.typing)(e,t),transact:(e,t,o)=>((e,t,o)=>(Y_(e,t),e.beforeChange(),e.ignore(o),e.add()))(e,t,o),ignore:(e,t)=>((e,t)=>{try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}})(e,t),extra:(t,o,n,r)=>((e,t,o,n,r)=>{if(t.transact(n)){const n=t.data[o.get()].bookmark,i=t.data[o.get()-1];U_(e,i,!0),t.transact(r)&&(t.data[o.get()-1].beforeBookmark=n)}})(e,t,o,n,r)},formatter:{match:(t,o,n,r)=>ly(e,t,o,n,r),matchAll:(t,o)=>((e,t,o)=>{const n=[],r={},i=e.selection.getStart();return e.dom.getParent(i,(i=>{for(let s=0;s<t.length;s++){const a=t[s];!r[a]&&ay(e,i,a,o)&&(r[a]=!0,n.push(a))}}),e.dom.getRoot()),n})(e,t,o),matchNode:(t,o,n,r)=>ay(e,t,o,n,r),canApply:t=>((e,t)=>{const o=e.formatter.get(t),n=e.dom;if(o&&e.selection.isEditable()){const t=e.selection.getStart(),r=Hm(n,t);for(let e=o.length-1;e>=0;e--){const t=o[e];if(!Zm(t))return!0;for(let e=r.length-1;e>=0;e--)if(n.is(r[e],t.selector))return!0}}return!1})(e,t),closest:t=>cy(e,t),apply:(t,o,n)=>hx(e,t,o,n),remove:(t,o,n,r)=>ix(e,t,o,n,r),toggle:(t,o,n)=>((e,t,o,n)=>{const r=e.formatter.get(t);r&&(!ly(e,t,o,n)||"toggle"in r[0]&&!r[0].toggle?hx(e,t,o,n):ix(e,t,o,n))})(e,t,o,n),formatChanged:(t,o,n,r,i)=>vx(e,t,o,n,r,i)},editor:{getContent:t=>((e,t)=>F.from(e.getBody()).fold(A("tree"===t.format?new Vg("body",11):""),(o=>sf(e,t,o))))(e,t),setContent:(t,o)=>ty(e,t,o),insertContent:(t,o)=>Jv(e,t,o),addVisual:t=>((e,t)=>{const o=e.dom,n=_(t)?t:e.getBody();q(o.select("table,a",n),(t=>{switch(t.nodeName){case"TABLE":const n=Gd(e),r=o.getAttrib(t,"border");r&&"0"!==r||!e.hasVisual?o.removeClass(t,n):o.addClass(t,n);break;case"A":if(!o.getAttrib(t,"href")){const n=o.getAttrib(t,"name")||t.id,r=Yd(e);n&&e.hasVisual?o.addClass(t,r):o.removeClass(t,r)}}})),e.dispatch("VisualAid",{element:t,hasVisual:e.hasVisual})})(e,t)},selection:{getContent:(t,o)=>((e,t,o={})=>{const n=((e,t)=>({...e,format:t,get:!0,selection:!0,getInner:!0}))(o,t);return p_(e,n).fold(M,(t=>{const o=B_(e,t);return g_(e,o,t)}))})(e,t,o)},autocompleter:{addDecoration:E,removeDecoration:E},raw:{getModel:()=>F.none()}}),X_=e=>Ee(e.plugins,"rtc"),J_=e=>{const t=e;return(e=>ke(e.plugins,"rtc").bind((e=>F.from(e.setup))))(e).fold((()=>(t.rtcInstance=K_(e),F.none())),(e=>(t.rtcInstance=(()=>{const e=A(null),t=A("");return{init:{bindEvents:E},undoManager:{beforeChange:E,add:e,undo:e,redo:e,clear:E,reset:E,hasUndo:B,hasRedo:B,transact:e,ignore:E,extra:E},formatter:{match:B,matchAll:A([]),matchNode:A(void 0),canApply:B,closest:t,apply:E,remove:E,toggle:E,formatChanged:A({unbind:E})},editor:{getContent:t,setContent:A({content:"",html:""}),insertContent:A(""),addVisual:E},selection:{getContent:t},autocompleter:{addDecoration:E,removeDecoration:E},raw:{getModel:A(F.none())}}})(),F.some((()=>e().then((e=>(t.rtcInstance=(e=>{const t=e=>g(e)?e:{},{init:o,undoManager:n,formatter:r,editor:i,selection:s,autocompleter:a,raw:l}=e;return{init:{bindEvents:o.bindEvents},undoManager:{beforeChange:n.beforeChange,add:n.add,undo:n.undo,redo:n.redo,clear:n.clear,reset:n.reset,hasUndo:n.hasUndo,hasRedo:n.hasRedo,transact:(e,t,o)=>n.transact(o),ignore:(e,t)=>n.ignore(t),extra:(e,t,o,r)=>n.extra(o,r)},formatter:{match:(e,o,n,i)=>r.match(e,t(o),i),matchAll:r.matchAll,matchNode:r.matchNode,canApply:e=>r.canApply(e),closest:e=>r.closest(e),apply:(e,o,n)=>r.apply(e,t(o)),remove:(e,o,n,i)=>r.remove(e,t(o)),toggle:(e,o,n)=>r.toggle(e,t(o)),formatChanged:(e,t,o,n,i)=>r.formatChanged(t,o,n,i)},editor:{getContent:e=>i.getContent(e),setContent:(e,t)=>({content:i.setContent(e,t),html:""}),insertContent:(e,t)=>(i.insertContent(e),""),addVisual:i.addVisual},selection:{getContent:(e,t)=>s.getContent(t)},autocompleter:{addDecoration:a.addDecoration,removeDecoration:a.removeDecoration},raw:{getModel:()=>F.some(l.getRawModel())}}})(e),e.rtc.isRemote))))))))},Q_=e=>e.rtcInstance?e.rtcInstance:K_(e),eS=e=>{const t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},tS=e=>eS(e).init.bindEvents(),oS=(e,t={})=>((e,t,o)=>eS(e).selection.getContent(t,o))(e,t.format?t.format:"html",t),nS=e=>0===e.dom.length?(_n(e),F.none()):F.some(e),rS=(e,t,o,n,r)=>{e.bind((e=>((n?mb:hb)(e.dom,n?e.dom.length:0,r),t.filter(To).map((t=>((e,t,o,n,r)=>{const i=e.dom,s=t.dom,a=n?i.length:s.length;n?(pb(i,s,r,!1,!n),o.setStart(s,a)):(pb(s,i,r,!1,!n),o.setEnd(s,a))})(e,t,o,n,r)))))).orThunk((()=>{const e=((e,t)=>e.filter((e=>yp.isBookmarkNode(e.dom))).bind(t?zo:Bo))(t,n).or(t).filter(To);return e.map((e=>((e,t,o)=>{Ro(e).each((n=>{const r=e.dom;t&&ob(n,Yl(r,0),o)?hb(r,0,o):!t&&nb(n,Yl(r,r.length),o)&&mb(r,r.length,o)}))})(e,n,r)))}))},iS=(e,t,o={})=>{const n=((e,t)=>({format:"html",...e,set:!0,selection:!0,content:t}))(o,t);f_(e,n).each((t=>{const o=((e,t)=>{if("raw"!==t.format){const o=e.selection.getRng(),n=e.dom.getParent(o.commonAncestorContainer,e.dom.isBlock),r=n?{context:n.nodeName.toLowerCase()}:{},i=e.parser.parse(t.content,{forced_root_block:!1,...r,...t});return cf({validate:!1},e.schema).serialize(i)}return t.content})(e,t),n=e.selection.getRng();((e,t,o)=>{const n=F.from(t.firstChild).map(uo.fromDom),r=F.from(t.lastChild).map(uo.fromDom);e.deleteContents(),e.insertNode(t);const i=n.bind(Bo).filter(To).bind(nS),s=r.bind(zo).filter(To).bind(nS);rS(i,n,e,!0,o),rS(s,r,e,!1,o),e.collapse(!1)})(n,n.createContextualFragment(o),e.schema),e.selection.setRng(n),Pg(e,n),b_(e,o,t)}))},sS=(e,t,o)=>{if(Ee(e,t)){const n=K(e[t],(e=>e!==o));0===n.length?delete e[t]:e[t]=n}};var aS=(e,t)=>{let o,n;const r=(t,o)=>ee(o,(o=>e.is(o,t))),i=t=>e.getParents(t,void 0,e.getRoot());return{selectorChangedWithUnbind:(e,s)=>(o||(o={},n={},t.on("NodeChange",(e=>{const t=e.element,s=i(t),a={};be(o,((e,t)=>{r(t,s).each((o=>{n[t]||(q(e,(e=>{e(!0,{node:o,selector:t,parents:s})})),n[t]=e),a[t]=e}))})),be(n,((e,o)=>{a[o]||(delete n[o],q(e,(e=>{e(!1,{node:t,selector:o,parents:s})})))}))}))),o[e]||(o[e]=[]),o[e].push(s),r(e,i(t.selection.getStart())).each((()=>{n[e]=o[e]})),{unbind:()=>{sS(o,e,s),sS(n,e,s)}})}};const lS=e=>!(!e||!e.ownerDocument)&&xo(uo.fromDom(e.ownerDocument),uo.fromDom(e)),cS=(e,t,o,n)=>{let r,i;const{selectorChangedWithUnbind:s}=aS(e,n),a=(e,t)=>iS(n,e,t),l=e=>{const t=d();t.collapse(!!e),u(t)},c=()=>t.getSelection?t.getSelection():t.document.selection,d=()=>{let o;const s=(e,t,o)=>{try{return t.compareBoundaryPoints(e,o)}catch(e){return-1}},a=t.document;if(_(n.bookmark)&&!qp(n)){const e=Ap(n);if(e.isSome())return e.map((e=>Bg(n,[e])[0])).getOr(a.createRange())}try{const e=c();e&&!Yr(e.anchorNode)&&(o=e.rangeCount>0?e.getRangeAt(0):a.createRange(),o=Bg(n,[o])[0])}catch(e){}if(o||(o=a.createRange()),ci(o.startContainer)&&o.collapsed){const t=e.getRoot();o.setStart(t,0),o.setEnd(t,0)}return r&&i&&(0===s(o.START_TO_START,o,r)&&0===s(o.END_TO_END,o,r)?o=i:(r=null,i=null)),o},u=(e,t)=>{if(!(e=>!!e&&lS(e.startContainer)&&lS(e.endContainer))(e))return;const o=c();if(e=n.dispatch("SetSelectionRange",{range:e,forward:t}).range,o){i=e;try{o.removeAllRanges(),o.addRange(e)}catch(e){}!1===t&&o.extend&&(o.collapse(e.endContainer,e.endOffset),o.extend(e.startContainer,e.startOffset)),r=o.rangeCount>0?o.getRangeAt(0):null}if(!e.collapsed&&e.startContainer===e.endContainer&&(null==o?void 0:o.setBaseAndExtent)&&e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()){const t=e.startContainer.childNodes[e.startOffset];t&&"IMG"===t.nodeName&&(o.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),o.anchorNode===e.startContainer&&o.focusNode===e.endContainer||o.setBaseAndExtent(t,0,t,1))}n.dispatch("AfterSetSelectionRange",{range:e,forward:t})},h=()=>{const t=c(),o=null==t?void 0:t.anchorNode,n=null==t?void 0:t.focusNode;if(!t||!o||!n||Yr(o)||Yr(n))return!0;const r=e.createRng(),i=e.createRng();try{r.setStart(o,t.anchorOffset),r.collapse(!0),i.setStart(n,t.focusOffset),i.collapse(!0)}catch(e){return!0}return r.compareBoundaryPoints(r.START_TO_START,i)<=0},m={dom:e,win:t,serializer:o,editor:n,expand:(t={type:"word"})=>u(pg(e).expand(d(),t)),collapse:l,setCursorLocation:(t,o)=>{const r=e.createRng();_(t)&&_(o)?(r.setStart(t,o),r.setEnd(t,o),u(r),l(!1)):(_m(e,r,n.getBody(),!0),u(r))},getContent:e=>oS(n,e),setContent:a,getBookmark:(e,t)=>p.getBookmark(e,t),moveToBookmark:e=>p.moveToBookmark(e),select:(t,o)=>(((e,t,o)=>F.from(t).bind((t=>F.from(t.parentNode).map((n=>{const r=e.nodeIndex(t),i=e.createRng();return i.setStart(n,r),i.setEnd(n,r+1),o&&(_m(e,i,t,!0),_m(e,i,t,!1)),i})))))(e,t,o).each(u),t),isCollapsed:()=>{const e=d(),t=c();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isEditable:()=>{if(n.mode.isReadOnly())return!1;const t=d(),o=n.getBody().querySelectorAll('[data-mce-selected="1"]');return o.length>0?re(o,(t=>e.isEditable(t.parentElement))):Dg(e,t)},isForward:h,setNode:t=>(a(e.getOuterHTML(t)),t),getNode:()=>((e,t)=>{if(!t)return e;let o=t.startContainer,n=t.endContainer;const r=t.startOffset,i=t.endOffset;let s=t.commonAncestorContainer;t.collapsed||(o===n&&i-r<2&&o.hasChildNodes()&&(s=o.childNodes[r]),ii(o)&&ii(n)&&(o=o.length===r?Ig(o.nextSibling,!0):o.parentNode,n=0===i?Ig(n.previousSibling,!1):n.parentNode,o&&o===n&&(s=o)));const a=ii(s)?s.parentNode:s;return Xr(a)?a:e})(n.getBody(),d()),getSel:c,setRng:u,getRng:d,getStart:e=>Rg(n.getBody(),d(),e),getEnd:e=>Ng(n.getBody(),d(),e),getSelectedBlocks:(t,o)=>((e,t,o,n)=>{const r=[],i=e.getRoot(),s=e.getParent(o||Rg(i,t,t.collapsed),e.isBlock),a=e.getParent(n||Ng(i,t,t.collapsed),e.isBlock);if(s&&s!==i&&r.push(s),s&&a&&s!==a){let t;const o=new Ur(s,i);for(;(t=o.next())&&t!==a;)e.isBlock(t)&&r.push(t)}return a&&s!==a&&a!==i&&r.push(a),r})(e,d(),t,o),normalize:()=>{const t=d(),o=c();if(!(pm(o).length>1)&&Sm(n)){const o=ug(e,t);return o.each((e=>{u(e,h())})),o.getOr(t)}return t},selectorChanged:(e,t)=>(s(e,t),m),selectorChangedWithUnbind:s,getScrollContainer:()=>{let t,o=e.getRoot();for(;o&&"BODY"!==o.nodeName;){if(o.scrollHeight>o.clientHeight){t=o;break}o=o.parentNode}return t},scrollIntoView:(e,t)=>{_(e)?((e,t,o)=>{(e.inline?Og:Mg)(e,t,o)})(n,e,t):Pg(n,d(),t)},placeCaretAt:(e,t)=>u(ng(e,t,n.getDoc())),getBoundingClientRect:()=>{const e=d();return e.collapsed?Yl.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:()=>{t=r=i=null,g.destroy()}},p=yp(m),g=og(m,n);return m.bookmarkManager=p,m.controlSelection=g,m},dS=(e,t,o)=>{e.addAttributeFilter("data-mce-tabindex",((e,t)=>{let o=e.length;for(;o--;){const n=e[o];n.attr("tabindex",n.attr("data-mce-tabindex")),n.attr(t,null)}})),e.addAttributeFilter("src,href,style",((e,n)=>{const r="data-mce-"+n,i=t.url_converter,s=t.url_converter_scope;let a=e.length;for(;a--;){const t=e[a];let l=t.attr(r);void 0!==l?(t.attr(n,l.length>0?l:null),t.attr(r,null)):(l=t.attr(n),"style"===n?l=o.serializeStyle(o.parseStyle(l),t.name):i&&(l=i.call(s,l,n,t.name)),t.attr(n,l.length>0?l:null))}})),e.addAttributeFilter("class",(e=>{let t=e.length;for(;t--;){const o=e[t];let n=o.attr("class");n&&(n=n.replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),o.attr("class",n.length>0?n:null))}})),e.addAttributeFilter("data-mce-type",((e,t,o)=>{let n=e.length;for(;n--;){const t=e[n];if("bookmark"===t.attr("data-mce-type")&&!o.cleanup){const e=F.from(t.firstChild).exists((e=>{var t;return!Ya(null!==(t=e.value)&&void 0!==t?t:"")}));e?t.unwrap():t.remove()}}})),e.addNodeFilter("script,style",((e,o)=>{var n;const r=e=>e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let i=e.length;for(;i--;){const s=e[i],a=s.firstChild,l=null!==(n=null==a?void 0:a.value)&&void 0!==n?n:"";if("script"===o){const e=s.attr("type");e&&s.attr("type","mce-no/type"===e?null:e.replace(/^mce\-/,"")),"xhtml"===t.element_format&&a&&l.length>0&&(a.value="// <![CDATA[\n"+r(l)+"\n// ]]>")}else"xhtml"===t.element_format&&a&&l.length>0&&(a.value="\x3c!--\n"+r(l)+"\n--\x3e")}})),e.addNodeFilter("#comment",(e=>{let n=e.length;for(;n--;){const r=e[n],i=r.value;t.preserve_cdata&&0===(null==i?void 0:i.indexOf("[CDATA["))?(r.name="#cdata",r.type=4,r.value=o.decode(i.replace(/^\[CDATA\[|\]\]$/g,""))):0===(null==i?void 0:i.indexOf("mce:protected "))&&(r.name="#text",r.type=3,r.raw=!0,r.value=unescape(i).substr(14))}})),e.addNodeFilter("xml:namespace,input",((e,t)=>{let o=e.length;for(;o--;){const n=e[o];7===n.type?n.remove():1===n.type&&("input"!==t||n.attr("type")||n.attr("type","text"))}})),e.addAttributeFilter("data-mce-type",(t=>{q(t,(t=>{"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())}))})),e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-block,data-mce-type,data-mce-resize,data-mce-placeholder",((e,t)=>{let o=e.length;for(;o--;)e[o].attr(t,null)})),t.remove_trailing_brs&&((e,t,o)=>{t.addNodeFilter("br",((t,n,r)=>{const i=lo.extend({},o.getBlockElements()),s=o.getNonEmptyElements(),a=o.getWhitespaceElements();i.body=1;const l=e=>e.name in i||Ki(o,e);for(let n=0,c=t.length;n<c;n++){let c=t[n],d=c.parent;if(d&&l(d)&&c===d.lastChild){let t=c.prev;for(;t;){const e=t.name;if("span"!==e||"bookmark"!==t.attr("data-mce-type")){"br"===e&&(c=null);break}t=t.prev}if(c&&(c.remove(),Ov(o,s,a,d))){const t=o.getElementRule(d.name);t&&(t.removeEmpty?d.remove():t.paddEmpty&&Ev(e,r,l,d))}}else{let e=c;for(;d&&d.firstChild===e&&d.lastChild===e&&(e=d,!i[d.name]);)d=d.parent;if(e===d){const e=new Vg("#text",3);e.value=ct,c.replace(e)}}}}))})(t,e,e.schema)},uS=(e,t,o)=>((e,t)=>_(e)&&e.hasEventListeners("PreProcess")&&!t.no_events)(e,o)?((e,t,o)=>{let n;const r=e.dom;let i=t.cloneNode(!0);const s=document.implementation;if(s.createHTMLDocument){const e=s.createHTMLDocument("");lo.each("BODY"===i.nodeName?i.childNodes:[i],(t=>{e.body.appendChild(e.importNode(t,!0))})),i="BODY"!==i.nodeName?e.body.firstChild:e.body,n=r.doc,r.doc=e}return((e,t)=>{e.dispatch("PreProcess",t)})(e,{...o,node:i}),n&&(r.doc=n),i})(e,t,o):t,hS=(e,t,o)=>{-1===lo.inArray(t,o)&&(e.addAttributeFilter(o,((e,t)=>{let o=e.length;for(;o--;)e[o].attr(t,null)})),t.push(o))},mS=(e,t,o,n,r)=>{const i=((e,t,o)=>cf(e,t).serialize(o))(t,o,n);return((e,t,o)=>{if(!t.no_events&&e){const n=((e,t)=>e.dispatch("PostProcess",t))(e,{...t,content:o});return n.content}return o})(e,r,i)},pS=(e,t)=>{const o=["data-mce-selected"],n={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...e},r=t&&t.dom?t.dom:ga.DOM,i=t&&t.schema?t.schema:Fs(n),s=u_(n,i);dS(s,n,r);return{schema:i,addNodeFilter:s.addNodeFilter,addAttributeFilter:s.addAttributeFilter,serialize:(e,o={})=>{const a={format:"html",...o},l=uS(t,e,a),c=((e,t,o)=>{const n=Ka(o.getInner?t.innerHTML:e.getOuterHTML(t));return o.selection||Za(uo.fromDom(t))?n:lo.trim(n)})(r,l,a),d=((e,t,o)=>{const n=o.selection?{forced_root_block:!1,...o}:o,r=e.parse(t,n);return(e=>{const t=e=>"br"===(null==e?void 0:e.name),o=e.lastChild;if(t(o)){const e=o.prev;t(e)&&(o.remove(),e.remove())}})(r),r})(s,c,a);return"tree"===a.format?d:mS(t,n,i,d,a)},addRules:i.addValidElements,setRules:i.setValidElements,addTempAttr:D(hS,s,o),getTempAttrs:A(o),getNodeFilters:s.getNodeFilters,getAttributeFilters:s.getAttributeFilters,removeNodeFilter:s.removeNodeFilter,removeAttributeFilter:s.removeAttributeFilter}},gS=(e,t)=>{const o=pS(e,t);return{schema:o.schema,addNodeFilter:o.addNodeFilter,addAttributeFilter:o.addAttributeFilter,serialize:o.serialize,addRules:o.addRules,setRules:o.setRules,addTempAttr:o.addTempAttr,getTempAttrs:o.getTempAttrs,getNodeFilters:o.getNodeFilters,getAttributeFilters:o.getAttributeFilters,removeNodeFilter:o.removeNodeFilter,removeAttributeFilter:o.removeAttributeFilter}},fS=(e,t={})=>{const o=((e,t)=>({...e,format:t,get:!0,getInner:!0}))(t,t.format?t.format:"html");return p_(e,o).fold(M,(t=>{const o=((e,t)=>Q_(e).editor.getContent(t))(e,t);return g_(e,o,t)}))},bS=(e,t,o={})=>{const n=((e,t)=>({format:"html",...e,set:!0,content:t}))(o,t);return f_(e,n).map((t=>{const o=((e,t,o)=>Q_(e).editor.setContent(t,o))(e,t.content,t);return b_(e,o.html,t),o.content})).getOr(t)},vS="autoresize_on_init,content_editable_state,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,tabfocus_elements,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_enable_default_filters,paste_filter_drop,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists,template_cdate_classes,template_mdate_classes,template_selected_content_classes,template_preview_replace_values,template_replace_values,templates,template_cdate_format,template_mdate_format".split(","),yS=[],xS="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,template,textcolor,rtc".split(","),wS=[{name:"export",replacedWith:"Export to PDF"}],_S=(e,t)=>{const o=K(t,(t=>Ee(e,t)));return le(o)},SS=e=>{const t=_S(e,vS),o=e.forced_root_block;return!1!==o&&""!==o||t.push("forced_root_block (false only)"),le(t)},CS=e=>_S(e,yS),kS=(e,t)=>{const o=lo.makeMap(e.plugins," "),n=K(t,(e=>Ee(o,e)));return le(n)},ES=e=>kS(e,xS),TS=e=>kS(e,wS.map((e=>e.name))),OS=e=>ee(wS,(t=>t.name===e)).fold((()=>e),(t=>t.replacedWith?`${e}, replaced by ${t.replacedWith}`:e)),AS=(e,t)=>{((e,t)=>{const o=SS(e),n=ES(t),r=n.length>0,i=o.length>0,s="mobile"===t.theme;if(r||i||s){const e="\n- ",t=s?`\n\nThemes:${e}mobile`:"",a=r?`\n\nPlugins:${e}${n.join(e)}`:"",l=i?`\n\nOptions:${e}${o.join(e)}`:"";console.warn("The following deprecated features are currently enabled and have been removed in TinyMCE 7.0. These features will no longer work and should be removed from the TinyMCE configuration. See https://www.tiny.cloud/docs/tinymce/7/migration-from-6x/ for more information."+t+a+l)}})(e,t),((e,t)=>{const o=CS(e),n=TS(t),r=n.length>0,i=o.length>0;if(r||i){const e="\n- ",t=r?`\n\nPlugins:${e}${n.map(OS).join(e)}`:"",s=i?`\n\nOptions:${e}${o.join(e)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+t+s)}})(e,t)},MS=ga.DOM,PS=e=>F.from(e).each((e=>e.destroy())),DS=e=>{if(!e.removed){const{_selectionOverrides:t,editorUpload:o}=e,n=e.getBody(),r=e.getElement();n&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&_(null==r?void 0:r.nextSibling)&&MS.remove(r.nextSibling),(e=>{e.dispatch("remove")})(e),e.editorManager.remove(e),!e.inline&&n&&(e=>{MS.setStyle(e.id,"display",e.orgDisplay)})(e),(e=>{e.dispatch("detach")})(e),MS.remove(e.getContainer()),PS(t),PS(o),e.destroy()}},LS=(e,t)=>{const{selection:o,dom:n}=e;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),PS(o),PS(n)),(e=>{const t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,delete t._mceOldSubmit),MS.unbind(t,"submit reset",e.formEventDelegate))})(e),(e=>{const t=e;t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null;const o=e.selection;if(o){const e=o.dom;t.selection=o.win=o.dom=e.doc=null}})(e),e.destroyed=!0):e.remove())},RS=(()=>{const e={};return{add:(t,o)=>{e[t]=o},get:t=>e[t]?e[t]:{icons:{}},has:t=>Ee(e,t)}})(),NS=_a.ModelManager,IS=(e,t)=>t.dom[e],BS=(e,t)=>parseInt(In(t,e),10),zS=D(IS,"clientWidth"),FS=D(IS,"clientHeight"),HS=D(BS,"margin-top"),jS=D(BS,"margin-left"),VS=(e,t,o)=>{const n=uo.fromDom(e.getBody()),r=e.inline?n:(i=n,uo.fromDom(Do(i).dom.documentElement));var i;const s=((e,t,o,n)=>{const r=(e=>e.dom.getBoundingClientRect())(t);return{x:o-(e?r.left+t.dom.clientLeft+jS(t):0),y:n-(e?r.top+t.dom.clientTop+HS(t):0)}})(e.inline,r,t,o);return((e,t,o)=>{const n=zS(e),r=FS(e);return t>=0&&o>=0&&t<=n&&o<=r})(r,s.x,s.y)},US=e=>{const t=e.inline?e.getBody():e.getContentAreaContainer();return(o=t,F.from(o).map(uo.fromDom)).map(Dn).getOr(!1);var o};const ZS=e=>{const t=[],o=()=>{const t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():(()=>{const e=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,getArgs:e}})()},n=()=>F.from(t[0]),r=()=>{n().each((e=>{e.reposition()}))},i=e=>{te(t,(t=>t===e)).each((e=>{t.splice(e,1)}))},s=(n,s=!0)=>e.removed||!US(e)?{}:(s&&e.dispatch("BeforeOpenNotification",{notification:n}),ee(t,(e=>{return t=o().getArgs(e),r=n,!(t.type!==r.type||t.text!==r.text||t.progressBar||t.timeout||r.progressBar||r.timeout);var t,r})).getOrThunk((()=>{e.editorManager.setActive(e);const s=o().open(n,(()=>{i(s)}),(()=>Gp(e)));return(e=>{t.push(e)})(s),r(),e.dispatch("OpenNotification",{notification:{...s}}),s}))),a=A(t);return(e=>{e.on("SkinLoaded",(()=>{const t=Sd(e);t&&s({text:t,type:"warning",timeout:0},!1),r()})),e.on("show ResizeEditor ResizeWindow NodeChange ToggleView FullscreenStateChanged",(()=>{requestAnimationFrame(r)})),e.on("remove",(()=>{q(t.slice(),(e=>{o().close(e)}))})),e.on("keydown",(e=>{var t;const o="f12"===(null===(t=e.key)||void 0===t?void 0:t.toLowerCase())||123===e.keyCode;e.altKey&&o&&(e.preventDefault(),n().map((e=>uo.fromDom(e.getEl()))).each((e=>nn(e))))}))})(e),{open:s,close:()=>{n().each((e=>{o().close(e),i(e),r()}))},getNotifications:a}},$S=_a.PluginManager,WS=_a.ThemeManager;const qS=e=>{let t=[];const o=()=>{const t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():(()=>{const e=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e}})()},n=(e,t)=>(...o)=>t?t.apply(e,o):void 0,r=o=>{t.push(o),(t=>{e.dispatch("OpenWindow",{dialog:t})})(o)},i=o=>{(t=>{e.dispatch("CloseWindow",{dialog:t})})(o),t=K(t,(e=>e!==o)),0===t.length&&e.focus()},s=t=>{e.editorManager.setActive(e),Op(e),e.ui.show();const o=t();return r(o),o};return e.on("remove",(()=>{q(t,(e=>{o().close(e)}))})),{open:(e,t)=>s((()=>o().open(e,t,i))),openUrl:e=>s((()=>o().openUrl(e,i))),alert:(e,t,r)=>{const i=o();i.alert(e,n(r||i,t))},confirm:(e,t,r)=>{const i=o();i.confirm(e,n(r||i,t))},close:()=>{F.from(t[t.length-1]).each((e=>{o().close(e),i(e)}))}}},GS=(e,t)=>{e.notificationManager.open({type:"error",text:t})},YS=(e,t)=>{e._skinLoaded?GS(e,t):e.on("SkinLoaded",(()=>{GS(e,t)}))},KS=(e,t,o)=>{kc(e,t,{message:o}),console.error(o)},XS=(e,t,o)=>o?`Failed to load ${e}: ${o} from url ${t}`:`Failed to load ${e} url: ${t}`,JS=(e,...t)=>{const o=window.console;o&&(o.error?o.error(e,...t):o.log(e,...t))},QS=(e,t,o)=>{try{e.getDoc().execCommand(t,!1,String(o))}catch(e){}},eC=(e,t,o)=>{fr(e,t)&&!o?pr(e,t):o&&hr(e,t)},tC=e=>{const t=uo.fromDom(e.getBody());eC(t,"mce-content-readonly",!0),e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),(e=>{F.from(e.selection.getNode()).each((e=>{e.removeAttribute("data-mce-selected")}))})(e)},oC=e=>{const t=uo.fromDom(e.getBody());eC(t,"mce-content-readonly",!1),e.hasEditableRoot()&&yr(t,!0),((e,t)=>{QS(e,"StyleWithCSS",t),QS(e,"enableInlineTableEditing",t),QS(e,"enableObjectResizing",t)})(e,!1),Gp(e)&&e.focus(),(e=>{e.selection.setRng(e.selection.getRng())})(e),e.nodeChanged()},nC=e=>Lu(e),rC="data-mce-contenteditable",iC=(e,t)=>{const o=uo.fromDom(e.getBody());t?(tC(e),yr(o,!1),q(wr(o,'*[contenteditable="true"]'),(e=>{pn(e,rC,"true"),yr(e,!1)}))):((e=>{q(wr(e,`*[${rC}="true"]`),(e=>{yn(e,rC),yr(e,!0)}))})(o),oC(e))},sC=e=>{e.parser.addAttributeFilter("contenteditable",(t=>{nC(e)&&q(t,(e=>{e.attr(rC,e.attr("contenteditable")),e.attr("contenteditable","false")}))})),e.serializer.addAttributeFilter(rC,(t=>{nC(e)&&q(t,(e=>{e.attr("contenteditable",e.attr(rC))}))})),e.serializer.addTempAttr(rC)},aC=["copy"],lC=(e,t)=>{if((e=>"click"===e.type)(t)&&!Xp.metaKeyPressed(t)){const o=uo.fromDom(t.target);((e,t)=>ar(t,"a",(t=>yo(t,uo.fromDom(e.getBody())))).bind((e=>bn(e,"href"))))(e,o).each((o=>{if(t.preventDefault(),/^#/.test(o)){const t=e.dom.select(`${o},[name="${Ge(o,"#")}"]`);t.length&&e.selection.scrollIntoView(t[0],!0)}else window.open(o,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}))}else(e=>Z(aC,e.type))(t)&&e.dispatch(t.type,t)},cC=e=>{(e=>{e.serializer?sC(e):e.on("PreInit",(()=>{sC(e)}))})(e),(e=>{e.on("ShowCaret ObjectSelected",(t=>{nC(e)&&t.preventDefault()})),e.on("DisabledStateChange",(t=>{t.isDefaultPrevented()||iC(e,t.state)}))})(e)},dC=e=>"content/"+e+"/content.css",uC=(e,t)=>{const o=e.editorManager.baseURL+"/skins/content",n=`content${e.editorManager.suffix}.css`;return W(t,(t=>(e=>tinymce.Resource.has(dC(e)))(t)?t:(e=>/^[a-z0-9\-]+$/i.test(e))(t)&&!e.inline?`${o}/${t}/${n}`:e.documentBaseURI.toAbsolute(t)))},hC=e=>{e.contentCSS=e.contentCSS.concat((e=>uC(e,pd(e)))(e),(e=>uC(e,fd(e)))(e))},mC=(e,t)=>{const o={};return{findAll:(n,r=z)=>{const i=K((e=>e?he(e.getElementsByTagName("img")):[])(n),(t=>{const o=t.src;return!t.hasAttribute("data-mce-bogus")&&(!t.hasAttribute("data-mce-placeholder")&&(!(!o||o===ro.transparentSrc)&&(Ke(o,"blob:")?!e.isUploaded(o)&&r(t):!!Ke(o,"data:")&&r(t))))})),s=W(i,(e=>{const n=e.src;if(Ee(o,n))return o[n].then((t=>p(t)?t:{image:e,blobInfo:t.blobInfo}));{const r=((e,t)=>{const o=()=>Promise.reject("Invalid data URI");if(Ke(t,"blob:")){const n=e.getByUri(t);return _(n)?Promise.resolve(n):kx(t).then((t=>Ex(t).then((n=>Ox(n,!1,(o=>F.some(Ax(e,t,o)))).getOrThunk(o)))))}return Ke(t,"data:")?Mx(e,t).fold(o,(e=>Promise.resolve(e))):Promise.reject("Unknown image data format")})(t,n).then((t=>(delete o[n],{image:e,blobInfo:t}))).catch((e=>(delete o[n],e)));return o[n]=r,r}}));return Promise.all(s)}}},pC=()=>{let e={};const t=(e,t)=>({status:e,resultUri:t}),o=t=>t in e;return{hasBlobUri:o,getResultUri:t=>{const o=e[t];return o?o.resultUri:null},isPending:t=>!!o(t)&&1===e[t].status,isUploaded:t=>!!o(t)&&2===e[t].status,markPending:o=>{e[o]=t(1,null)},markUploaded:(o,n)=>{e[o]=t(2,n)},removeFailed:t=>{delete e[t]},destroy:()=>{e={}}}};let gC=0;const fC=e=>e+gC+++(()=>{const e=()=>Math.round(4294967295*Re()).toString(36);return"s"+(new Date).getTime().toString(36)+e()+e()+e()})(),bC=(e,t)=>{const o={},n=(e,o)=>new Promise(((n,r)=>{const i=new XMLHttpRequest;i.open("POST",t.url),i.withCredentials=t.credentials,i.upload.onprogress=e=>{o(e.loaded/e.total*100)},i.onerror=()=>{r("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=()=>{if(i.status<200||i.status>=300)return void r("HTTP Error: "+i.status);const e=JSON.parse(i.responseText);var o,s;e&&p(e.location)?n((o=t.basePath,s=e.location,o?o.replace(/\/$/,"")+"/"+s.replace(/^\//,""):s)):r("Invalid JSON: "+i.responseText)};const s=new FormData;s.append("file",e.blob(),e.filename()),i.send(s)})),r=S(t.handler)?t.handler:n,i=(e,t)=>({url:t,blobInfo:e,status:!0}),s=(e,t)=>({url:"",blobInfo:e,status:!1,error:t}),a=(e,t)=>{lo.each(o[e],(e=>{e(t)})),delete o[e]},l=(t,n)=>(t=lo.grep(t,(t=>!e.isUploaded(t.blobUri()))),Promise.all(lo.map(t,(t=>e.isPending(t.blobUri())?(e=>{const t=e.blobUri();return new Promise((e=>{o[t]=o[t]||[],o[t].push(e)}))})(t):((t,o,n)=>(e.markPending(t.blobUri()),new Promise((r=>{let l,c;try{const d=()=>{l&&(l.close(),c=E)},u=o=>{d(),e.markUploaded(t.blobUri(),o),a(t.blobUri(),i(t,o)),r(i(t,o))},h=o=>{d(),e.removeFailed(t.blobUri()),a(t.blobUri(),s(t,o)),r(s(t,o))};c=e=>{e<0||e>100||F.from(l).orThunk((()=>F.from(n).map(N))).each((t=>{l=t,t.progressBar.value(e)}))},o(t,c).then(u,(e=>{h(p(e)?{message:e}:e)}))}catch(e){r(s(t,e))}}))))(t,r,n)))));return{upload:(e,o)=>t.url||r!==n?l(e,o):new Promise((e=>{e([])}))}},vC=e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),yC=(e,t)=>bC(t,{url:rd(e),basePath:id(e),credentials:sd(e),handler:ad(e)}),xC=e=>t=>{((e,t)=>e.dom.isEmpty(t.dom)&&_(e.schema.getTextBlockElements()[_o(t)]))(e,t)&&dn(t,uo.fromHtml('<br data-mce-bogus="1" />'))},wC=e=>{const t=(()=>{let e=[];const t=e=>{if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const t=e.id||fC("blobid"),o=e.name||t,n=e.blob;return{id:A(t),name:A(o),filename:A(e.filename||o+"."+(r=n.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[r.toLowerCase()]||"dat")),blob:A(n),base64:A(e.base64),blobUri:A(e.blobUri||URL.createObjectURL(n)),uri:A(e.uri)};var r},o=t=>ee(e,t).getOrUndefined(),n=e=>o((t=>t.id()===e));return{create:(e,o,n,r,i)=>{if(p(e))return t({id:e,name:r,filename:i,blob:o,base64:n});if(g(e))return t(e);throw new Error("Unknown input type")},add:t=>{n(t.id())||e.push(t)},get:n,getByUri:e=>o((t=>t.blobUri()===e)),getByData:(e,t)=>o((o=>o.base64()===e&&o.blob().type===t)),findFirst:o,removeByUri:t=>{e=K(e,(e=>e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1)))},destroy:()=>{q(e,(e=>{URL.revokeObjectURL(e.blobUri())})),e=[]}}})();let o,n;const r=pC(),i=[],s=t=>o=>e.selection?t(o):[],a=(e,t,o)=>{let n=0;do{n=e.indexOf(t,n),-1!==n&&(e=e.substring(0,n)+o+e.substr(n+t.length),n+=o.length-t.length+1)}while(-1!==n);return e},l=(e,t,o)=>{const n=`src="${o}"${o===ro.transparentSrc?' data-mce-placeholder="1"':""}`;return e=a(e,`src="${t}"`,n),e=a(e,'data-mce-src="'+t+'"','data-mce-src="'+o+'"')},c=(t,o)=>{q(e.undoManager.data,(e=>{"fragmented"===e.type?e.fragments=W(e.fragments,(e=>l(e,t,o))):e.content=l(e.content,t,o)}))},d=()=>(o||(o=yC(e,r)),m().then(s((n=>{const r=W(n,(e=>e.blobInfo));return o.upload(r,vC(e)).then(s((o=>{const r=[];let i=!1;const s=W(o,((o,s)=>{const{blobInfo:a,image:l}=n[s];let d=!1;return o.status&&td(e)?(o.url&&!Ye(l.src,o.url)&&(i=!0),t.removeByUri(l.src),X_(e)||((t,o)=>{const n=e.convertURL(o,"src");var r;c(t.src,o),gn(uo.fromDom(t),{src:ed(e)?(r=o,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):o,"data-mce-src":n})})(l,o.url)):o.error&&(o.error.remove&&(c(l.src,ro.transparentSrc),r.push(l),d=!0),((e,t)=>{YS(e,wa.translate(["Failed to upload image: {0}",t]))})(e,o.error.message)),{element:l,status:o.status,uploadUri:o.url,blobInfo:a,removed:d}}));return r.length>0&&!X_(e)?e.undoManager.transact((()=>{q(On(r),(o=>{const n=Ro(o);_n(o),n.each(xC(e)),t.removeByUri(o.dom.src)}))})):i&&e.undoManager.dispatchChange(),s})))})))),u=()=>Qc(e)?d():Promise.resolve([]),h=e=>re(i,(t=>t(e))),m=()=>(n||(n=mC(r,t)),n.findAll(e.getBody(),h).then(s((t=>{const o=K(t,(t=>p(t)?(YS(e,t),!1):"blob"!==t.uriType));return X_(e)||q(o,(e=>{c(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")})),o})))),f=o=>o.replace(/src="(blob:[^"]+)"/g,((o,n)=>{const i=r.getResultUri(n);if(i)return'src="'+i+'"';let s=t.getByUri(n);if(s||(s=J(e.editorManager.get(),((e,t)=>e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)),void 0)),s){return'src="data:'+s.blob().type+";base64,"+s.base64()+'"'}return o}));return e.on("SetContent",(()=>{Qc(e)?u():m()})),e.on("RawSaveContent",(e=>{e.content=f(e.content)})),e.on("GetContent",(e=>{e.source_view||"raw"===e.format||"tree"===e.format||(e.content=f(e.content))})),e.on("PostRender",(()=>{e.parser.addNodeFilter("img",(e=>{q(e,(e=>{const o=e.attr("src");if(!o||t.getByUri(o))return;const n=r.getResultUri(o);n&&e.attr("src",n)}))}))})),{blobCache:t,addFilter:e=>{i.push(e)},uploadImages:d,uploadImagesAuto:u,scanForImages:m,destroy:()=>{t.destroy(),r.destroy(),n=o=null}}},_C={remove_similar:!0,inherit:!1},SC={selector:"td,th",..._C},CC={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...SC},tablecellverticalalign:{styles:{"vertical-align":"%value"},...SC},tablecellbordercolor:{styles:{borderColor:"%value"},...SC},tablecellclass:{classes:["%value"],...SC},tableclass:{selector:"table",classes:["%value"],..._C},tablecellborderstyle:{styles:{borderStyle:"%value"},...SC},tablecellborderwidth:{styles:{borderWidth:"%value"},...SC}},kC=A(CC),EC=e=>{const t={},o=(e,n)=>{e&&(p(e)?(b(n)||(n=[n]),q(n,(e=>{x(e.deep)&&(e.deep=!Zm(e)),x(e.split)&&(e.split=!Zm(e)||$m(e)),x(e.remove)&&Zm(e)&&!$m(e)&&(e.remove="none"),Zm(e)&&$m(e)&&(e.mixed=!0,e.block_expand=!0),p(e.classes)&&(e.classes=e.classes.split(/\s+/))})),t[e]=n):be(e,((e,t)=>{o(t,e)})))};return o((e=>{const t=e.dom,o=e.schema.type,n={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"left"},inherit:!1,preview:!1},{selector:"img,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"},{selector:".mce-placeholder",styles:{float:"left"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:".mce-placeholder",styles:{display:"block",marginLeft:"auto",marginRight:"auto"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"},{selector:".mce-preview-object",ceFalseOverride:!0,styles:{display:"table",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{marginLeft:"auto",marginRight:"auto"},preview:!1}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"},{selector:".mce-placeholder",styles:{float:"right"},ceFalseOverride:!0},{selector:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"right"},preview:!1}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"justify"},inherit:!1,preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:(()=>{const e={inline:"span",styles:{textDecoration:"line-through"},exact:!0},t={inline:"strike",remove:"all",preserve_attributes:["class","style"]},n={inline:"s",remove:"all",preserve_attributes:["class","style"]};return"html4"!==o?[n,e,t]:[e,n,t]})(),forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},samp:{inline:"samp"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:(e,t,o)=>Kr(e)&&e.hasAttribute("href"),onformat:(e,o,n)=>{lo.each(n,((o,n)=>{t.setAttrib(e,n,o)}))}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":e=>{var t;return null!==(t=null==e?void 0:e.customValue)&&void 0!==t?t:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return lo.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd".split(/\s/),(e=>{n[e]={block:e,remove:"all"}})),n})(e)),o(kC()),o(Ad(e)),{get:e=>_(e)?t[e]:t,has:e=>Ee(t,e),register:o,unregister:e=>(e&&t[e]&&delete t[e],t)}},TC=lo.each,OC=ga.DOM,AC=e=>_(e)&&g(e),MC=(e,t)=>{const o=t&&t.schema||Fs({}),n=e=>{const t=p(e)?{name:e,classes:[],attrs:{}}:e,o=OC.create(t.name);return((e,t)=>{t.classes.length>0&&OC.addClass(e,t.classes.join(" ")),OC.setAttribs(e,t.attrs)})(o,t),o},r=(e,t,i)=>{let s;const a=t[0],l=AC(a)?a.name:void 0,c=((e,t)=>{const n=o.getElementRule(e.nodeName.toLowerCase()),r=null==n?void 0:n.parentsRequired;return!(!r||!r.length)&&(t&&Z(r,t)?t:r[0])})(e,l);if(c)l===c?(s=a,t=t.slice(1)):s=c;else if(a)s=a,t=t.slice(1);else if(!i)return e;const d=s?n(s):OC.create("div");d.appendChild(e),i&&lo.each(i,(t=>{const o=n(t);d.insertBefore(o,e)}));const u=AC(s)?s.siblings:void 0;return r(d,t,u)},i=OC.create("div");if(e.length>0){const t=e[0],o=n(t),s=AC(t)?t.siblings:void 0;i.appendChild(r(o,e.slice(1),s))}return i},PC=e=>{let t="div";const o={name:t,classes:[],attrs:{},selector:e=lo.trim(e)};return"*"!==e&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,((e,t,n,r,i)=>{switch(t){case"#":o.attrs.id=n;break;case".":o.classes.push(n);break;case":":-1!==lo.inArray("checked disabled enabled read-only required".split(" "),n)&&(o.attrs[n]=n)}if("["===r){const e=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);e&&(o.attrs[e[1]]=e[2])}return""}))),o.name=t||"div",o},DC=(e,t)=>{let o="",n=Md(e);if(""===n)return"";const r=e=>p(e)?e.replace(/%(\w+)/g,""):"",i=(t,o)=>OC.getStyle(null!=o?o:e.getBody(),t,!0);if(p(t)){const o=e.formatter.get(t);if(!o)return"";t=o[0]}if("preview"in t){const e=t.preview;if(!1===e)return"";n=e||n}let s,a=t.block||t.inline||"span";const l=(c=t.selector,p(c)?(c=(c=c.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),lo.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),(e=>{const t=lo.map(e.split(/(?:~\+|~|\+)/),PC),o=t.pop();return t.length&&(o.siblings=t),o})).reverse()):[]);var c;l.length>0?(l[0].name||(l[0].name=a),a=t.selector,s=MC(l,e)):s=MC([a],e);const d=OC.select(a,s)[0]||s.firstChild;TC(t.styles,((e,t)=>{const o=r(e);o&&OC.setStyle(d,t,o)})),TC(t.attributes,((e,t)=>{const o=r(e);o&&OC.setAttrib(d,t,o)})),TC(t.classes,(e=>{const t=r(e);OC.hasClass(d,t)||OC.addClass(d,t)})),e.dispatch("PreviewFormats"),OC.setStyles(s,{position:"absolute",left:-65535}),e.getBody().appendChild(s);const u=i("fontSize"),h=/px$/.test(u)?parseInt(u,10):0;return TC(n.split(" "),(e=>{let t=i(e,d);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=i(e),"#ffffff"===Gs(t).toLowerCase())||"color"===e&&"#000000"===Gs(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===h)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*h+"px"}"border"===e&&t&&(o+="padding:0 2px;"),o+=e+":"+t+";"}})),e.dispatch("AfterPreviewFormats"),OC.remove(s),o},LC=e=>{const t=EC(e),o=Ae({});return(e=>{e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(let t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])})(e),wy(e),X_(e)||((e,t)=>{e.set({}),t.on("NodeChange",(o=>{bx(t,o.element,e.get())})),t.on("FormatApply FormatRemove",(o=>{const n=F.from(o.node).map((e=>Em(e)?e:e.startContainer)).bind((e=>Kr(e)?F.some(e):F.from(e.parentElement))).getOrThunk((()=>px(t)));bx(t,n,e.get())}))})(o,e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:(t,o,n)=>{((e,t,o,n)=>{eS(e).formatter.apply(t,o,n)})(e,t,o,n)},remove:(t,o,n,r)=>{((e,t,o,n,r)=>{eS(e).formatter.remove(t,o,n,r)})(e,t,o,n,r)},toggle:(t,o,n)=>{((e,t,o,n)=>{eS(e).formatter.toggle(t,o,n)})(e,t,o,n)},match:(t,o,n,r)=>((e,t,o,n,r)=>eS(e).formatter.match(t,o,n,r))(e,t,o,n,r),closest:t=>((e,t)=>eS(e).formatter.closest(t))(e,t),matchAll:(t,o)=>((e,t,o)=>eS(e).formatter.matchAll(t,o))(e,t,o),matchNode:(t,o,n,r)=>((e,t,o,n,r)=>eS(e).formatter.matchNode(t,o,n,r))(e,t,o,n,r),canApply:t=>((e,t)=>eS(e).formatter.canApply(t))(e,t),formatChanged:(t,n,r,i)=>((e,t,o,n,r,i)=>eS(e).formatter.formatChanged(t,o,n,r,i))(e,o,t,n,r,i),getCssText:D(DC,e)}},RC=e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},NC=e=>{const t=We(),o=Ae(0),n=Ae(0),r={data:[],typing:!1,beforeChange:()=>{((e,t,o)=>{eS(e).undoManager.beforeChange(t,o)})(e,o,t)},add:(i,s)=>((e,t,o,n,r,i,s)=>eS(e).undoManager.add(t,o,n,r,i,s))(e,r,n,o,t,i,s),dispatchChange:()=>{e.setDirty(!0);const t=V_(e);t.bookmark=bc(e.selection),e.dispatch("change",{level:t,lastLevel:ce(r.data,n.get()).getOrUndefined()})},undo:()=>((e,t,o,n)=>eS(e).undoManager.undo(t,o,n))(e,r,o,n),redo:()=>((e,t,o)=>eS(e).undoManager.redo(t,o))(e,n,r.data),clear:()=>{((e,t,o)=>{eS(e).undoManager.clear(t,o)})(e,r,n)},reset:()=>{((e,t)=>{eS(e).undoManager.reset(t)})(e,r)},hasUndo:()=>((e,t,o)=>eS(e).undoManager.hasUndo(t,o))(e,r,n),hasRedo:()=>((e,t,o)=>eS(e).undoManager.hasRedo(t,o))(e,r,n),transact:t=>((e,t,o,n)=>eS(e).undoManager.transact(t,o,n))(e,r,o,t),ignore:t=>{((e,t,o)=>{eS(e).undoManager.ignore(t,o)})(e,o,t)},extra:(t,o)=>{((e,t,o,n,r)=>{eS(e).undoManager.extra(t,o,n,r)})(e,r,n,t,o)}};return X_(e)||((e,t,o)=>{const n=Ae(!1),r=e=>{G_(t,!1,o),t.add({},e)};e.on("init",(()=>{t.add()})),e.on("BeforeExecCommand",(e=>{const n=e.command;RC(n)||(Y_(t,o),t.beforeChange())})),e.on("ExecCommand",(e=>{const t=e.command;RC(t)||r(e)})),e.on("ObjectResizeStart cut",(()=>{t.beforeChange()})),e.on("SaveContent ObjectResized blur",r),e.on("dragend",r),e.on("keyup",(o=>{const i=o.keyCode;if(o.isDefaultPrevented())return;const s=ro.os.isMacOS()&&"Meta"===o.key;(i>=33&&i<=36||i>=37&&i<=40||45===i||o.ctrlKey||s)&&(r(),e.nodeChanged()),46!==i&&8!==i||e.nodeChanged(),n.get()&&t.typing&&!W_(V_(e),t.data[0])&&(e.isDirty()||e.setDirty(!0),e.dispatch("TypingUndo"),n.set(!1),e.nodeChanged())})),e.on("keydown",(e=>{const i=e.keyCode;if(e.isDefaultPrevented())return;if(i>=33&&i<=36||i>=37&&i<=40||45===i)return void(t.typing&&r(e));const s=e.ctrlKey&&!e.altKey||e.metaKey;if((i<16||i>20)&&224!==i&&91!==i&&!t.typing&&!s)return t.beforeChange(),G_(t,!0,o),t.add({},e),void n.set(!0);(ro.os.isMacOS()?e.metaKey:e.ctrlKey&&!e.altKey)&&t.beforeChange()})),e.on("mousedown",(e=>{t.typing&&r(e)})),e.on("input",(e=>{e.inputType&&((e=>"insertReplacementText"===e.inputType)(e)||(e=>"insertText"===e.inputType&&null===e.data)(e)||(e=>"insertFromPaste"===e.inputType||"insertFromDrop"===e.inputType)(e))&&r(e)})),e.on("AddUndo Undo Redo ClearUndos",(t=>{t.isDefaultPrevented()||e.nodeChanged()}))})(e,r,o),(e=>{e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")})(e),r},IC=[9,27,Xp.HOME,Xp.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Xp.DOWN,Xp.UP,Xp.LEFT,Xp.RIGHT].concat(ro.browser.isFirefox()?[224]:[]),BC="data-mce-placeholder",zC=e=>"keydown"===e.type||"keyup"===e.type,FC=e=>{const t=e.keyCode;return t===Xp.BACKSPACE||t===Xp.DELETE},HC=e=>{var t;const o=e.dom,n=Wc(e),r=null!==(t=wd(e))&&void 0!==t?t:"",i=(t,s)=>{if((e=>{if(zC(e)){const t=e.keyCode;return!FC(e)&&(Xp.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||Z(IC,t))}return!1})(t))return;const a=e.getBody(),l=!(e=>zC(e)&&!(FC(e)||"keyup"===e.type&&229===e.keyCode))(t)&&((e,t,o)=>{if(e.isEmpty(t,void 0,{skipBogus:!1,includeZwsp:!0})){const n=t.firstElementChild;return!n||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&o===n.nodeName.toLowerCase()}return!1})(o,a,n);(""!==o.getAttrib(a,BC)!==l||s)&&(o.setAttrib(a,BC,l?r:null),((e,t)=>{e.dispatch("PlaceholderToggle",{state:t})})(e,l),e.on(l?"keydown":"keyup",i),e.off(l?"keyup":"keydown",i))};ot(r)&&e.on("init",(t=>{i(t,!0),e.on("change SetContent ExecCommand",i),e.on("paste",(t=>Pp.setEditorTimeout(e,(()=>i(t)))))}))},jC=(e,t)=>({from:e,to:t}),VC=(e,t)=>{const o=uo.fromDom(e),n=uo.fromDom(t.container());return Ib(o,n).map((e=>((e,t)=>({block:e,position:t}))(e,t)))},UC=(e,t)=>or(t,(e=>Ua(e)||pi(e.dom)),(t=>yo(t,e))).filter(Eo).getOr(e),ZC=(e,t,o,n)=>{const r=VC(t,Yl.fromRangeStart(n)),i=r.bind((n=>Hh(o,t,n.position).bind((n=>VC(t,n).map((n=>((e,t,o,n)=>ui(n.position.getNode())&&!Mi(e,n.block)?Uh(!1,n.block.dom).bind((e=>e.isEqual(n.position)?Hh(o,t,e).bind((e=>VC(t,e))):F.some(n))).getOr(n):n)(e,t,o,n)))))));return Ve(r,i,jC).filter((e=>(e=>!yo(e.from.block,e.to.block))(e)&&((e,t)=>{const o=uo.fromDom(e);return yo(UC(o,t.from.block),UC(o,t.to.block))})(t,e)&&(e=>!1===gi(e.from.block.dom)&&!1===gi(e.to.block.dom))(e)&&(e=>{const t=e=>Fa(e)||$i(e.dom)||ja(e);return t(e.from.block)&&t(e.to.block)})(e)&&(e=>!(xo(e.to.block,e.from.block)||xo(e.from.block,e.to.block)))(e)))},$C=(e,t)=>{const o=((e,t)=>{const o=jo(e);return te(o,(e=>t.isBlock(_o(e)))).fold(A(o),(e=>o.slice(0,e)))})(e,t);return q(o,_n),o},WC=(e,t,o)=>{const n=Lf(o,t);return ee(n.reverse(),(t=>Mi(e,t))).each(_n)},qC=(e,t,o,n,r)=>{if(Mi(n,o))return qa(o),Wh(o.dom);((e,t)=>0===K(Fo(t),(t=>!Mi(e,t))).length)(n,r)&&Mi(n,t)&&an(r,uo.fromTag("br"));const i=$h(o.dom,Yl.before(r.dom));return q($C(t,n),(e=>{an(r,e)})),WC(n,e,t),i},GC=(e,t,o,n)=>{if(Mi(n,o)){if(Mi(n,t)){const e=e=>{const t=(e,o)=>Uo(e).fold((()=>o),(e=>((e,t)=>e.isInline(_o(t)))(n,e)?t(e,o.concat(kn(e))):o));return t(e,[])},r=X(e(o),((e,t)=>(un(e,t),t)),Wa());wn(t),dn(t,r)}return _n(o),Wh(t.dom)}const r=qh(o.dom);return q($C(t,n),(e=>{dn(o,e)})),WC(n,e,t),r},YC=(e,t)=>xo(t,e)?((e,t)=>{const o=Lf(t,e);return F.from(o[o.length-1])})(t,e):F.none(),KC=(e,t)=>{Uh(e,t.dom).bind((e=>F.from(e.getNode()))).map(uo.fromDom).filter(za).each(_n)},XC=(e,t,o,n)=>(KC(!0,t),KC(!1,o),YC(t,o).fold(D(GC,e,t,o,n),D(qC,e,t,o,n))),JC=(e,t,o,n,r)=>t?XC(e,n,o,r):XC(e,o,n,r),QC=(e,t)=>{const o=uo.fromDom(e.getBody()),n=((e,t,o,n)=>n.collapsed?ZC(e,t,o,n):F.none())(e.schema,o.dom,t,e.selection.getRng()).map((n=>()=>{JC(o,t,n.from.block,n.to.block,e.schema).each((t=>{e.selection.setRng(t.toRange())}))}));return n},ek=(e,t)=>{const o=uo.fromDom(t),n=D(yo,e);return tr(o,Ua,n).isSome()},tk=(e,t)=>{const o=$h(e.dom,Yl.fromRangeStart(t)).isNone(),n=Zh(e.dom,Yl.fromRangeEnd(t)).isNone();return!((e,t)=>ek(e,t.startContainer)||ek(e,t.endContainer))(e,t)&&o&&n},ok=e=>{const t=uo.fromDom(e.getBody()),o=e.selection.getRng();return tk(t,o)?(e=>F.some((()=>{e.setContent(""),e.selection.setCursorLocation()})))(e):((e,t,o)=>{const n=t.getRng();return Ve(Ib(e,uo.fromDom(n.startContainer)),Ib(e,uo.fromDom(n.endContainer)),((r,i)=>yo(r,i)?F.none():F.some((()=>{n.deleteContents(),JC(e,!0,r,i,o).each((e=>{t.setRng(e.toRange())}))})))).getOr(F.none())})(t,e.selection,e.schema)},nk=(e,t)=>e.selection.isCollapsed()?F.none():ok(e),rk=(e,t,o,n,r)=>F.from(t._selectionOverrides.showCaret(e,o,n,r)),ik=(e,t)=>e.dispatch("BeforeObjectSelected",{target:t}).isDefaultPrevented()?F.none():F.some((e=>{const t=e.ownerDocument.createRange();return t.selectNode(e),t})(t)),sk=(e,t,o)=>t.collapsed?((e,t,o)=>{const n=yh(1,e.getBody(),t),r=Yl.fromRangeStart(n),i=r.getNode();if(Ku(i))return rk(1,e,i,!r.isAtEnd(),!1);const s=r.getNode(!0);if(Ku(s))return rk(1,e,s,!1,!1);const a=vv(e.dom.getRoot(),r.getNode());return Ku(a)?rk(1,e,a,!1,o):F.none()})(e,t,o).getOr(t):t,ak=e=>Mf(e)||Ef(e),lk=e=>Pf(e)||Tf(e),ck=(e,t,o,n,r,i)=>{rk(n,e,i.getNode(!r),r,!0).each((o=>{if(t.collapsed){const e=t.cloneRange();r?e.setEnd(o.startContainer,o.startOffset):e.setStart(o.endContainer,o.endOffset),e.deleteContents()}else t.deleteContents();e.selection.setRng(o)})),((e,t)=>{ii(t)&&0===t.data.length&&e.remove(t)})(e.dom,o)},dk=(e,t)=>((e,t)=>{const o=e.selection.getRng();if(!ii(o.commonAncestorContainer))return F.none();const n=t?1:-1,r=Nh(e.getBody()),i=D(Sh,t?r.next:r.prev),s=t?ak:lk,a=wh(n,e.getBody(),o),l=i(a),c=l?Ab(t,l):l;if(!c||!Ch(a,c))return F.none();if(s(c))return F.some((()=>ck(e,o,a.getNode(),n,t,c)));const d=i(c);return d&&s(d)&&Ch(c,d)?F.some((()=>ck(e,o,a.getNode(),n,t,d))):F.none()})(e,t),uk=(e,t)=>{const o=e.getBody();return t?Wh(o).filter(Mf):qh(o).filter(Pf)},hk=e=>{const t=e.selection.getRng();return!t.collapsed&&(uk(e,!0).exists((e=>e.isEqual(Yl.fromRangeStart(t))))||uk(e,!1).exists((e=>e.isEqual(Yl.fromRangeEnd(t)))))},mk=Oe([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),pk=(e,t,o,n,r)=>{const i=r.getNode(!o);return Ib(uo.fromDom(t),uo.fromDom(n.getNode())).map((t=>Mi(e,t)?mk.remove(t.dom):mk.moveToElement(i))).orThunk((()=>F.some(mk.moveToElement(i))))},gk=(e,t,o,n)=>Hh(t,e,o).bind((r=>{return i=r.getNode(),_(i)&&(Ua(uo.fromDom(i))||ja(uo.fromDom(i)))||((e,t,o,n,r)=>{const i=t=>r.isInline(t.nodeName.toLowerCase())&&!hh(o,n,e);return xh(!t,o).fold((()=>xh(t,n).fold(B,i)),i)})(e,t,o,r,n)?F.none():t&&gi(r.getNode())||!t&&gi(r.getNode(!0))?pk(n,e,t,o,r):t&&Pf(o)||!t&&Mf(o)?F.some(mk.moveToPosition(r)):F.none();var i})),fk=(e,t,o,n)=>((e,t)=>{const o=t.getNode(!e),n=e?"after":"before";return Kr(o)&&o.getAttribute("data-mce-caret")===n})(t,o)?((e,t)=>w(t)?F.none():e&&gi(t.nextSibling)?F.some(mk.moveToElement(t.nextSibling)):!e&&gi(t.previousSibling)?F.some(mk.moveToElement(t.previousSibling)):F.none())(t,o.getNode(!t)).orThunk((()=>gk(e,t,o,n))):gk(e,t,o,n).bind((t=>((e,t,o)=>o.fold((e=>F.some(mk.remove(e))),(e=>F.some(mk.moveToElement(e))),(o=>hh(t,o,e)?F.none():F.some(mk.moveToPosition(o)))))(e,o,t))),bk=(e,t)=>F.from(vv(e.getBody(),t)),vk=(e,t)=>{const o=e.selection.getNode();return bk(e,o).filter(gi).fold((()=>((e,t,o,n)=>{const r=yh(t?1:-1,e,o),i=Yl.fromRangeStart(r),s=uo.fromDom(e);return!t&&Pf(i)?F.some(mk.remove(i.getNode(!0))):t&&Mf(i)?F.some(mk.remove(i.getNode())):!t&&Mf(i)&&$f(s,i,n)?Wf(s,i,n).map((e=>mk.remove(e.getNode()))):t&&Pf(i)&&Zf(s,i,n)?qf(s,i,n).map((e=>mk.remove(e.getNode()))):fk(e,t,i,n)})(e.getBody(),t,e.selection.getRng(),e.schema).map((o=>()=>o.fold(((e,t)=>o=>(e._selectionOverrides.hideFakeCaret(),Cb(e,t,uo.fromDom(o)),!0))(e,t),((e,t)=>o=>{const n=t?Yl.before(o):Yl.after(o);return e.selection.setRng(n.toRange()),!0})(e,t),(e=>t=>(e.selection.setRng(t.toRange()),!0))(e))))),(()=>F.some(E)))},yk=(e,t)=>{const o=e.selection.getNode();if(gi(o)&&!bi(o)){return bk(e,o.parentNode).filter(gi).fold((()=>F.some((()=>{var o;o=uo.fromDom(e.getBody()),q(wr(o,".mce-offscreen-selection"),_n),Cb(e,t,uo.fromDom(e.selection.getNode())),Bb(e)}))),(()=>F.some(E)))}return hk(e)?F.some((()=>{Hb(e,e.selection.getRng(),uo.fromDom(e.getBody()))})):F.none()},xk=e=>{const t=e.dom,o=e.selection,n=vv(e.getBody(),o.getNode());if(pi(n)&&t.isBlock(n)&&t.isEmpty(n)){const e=t.create("br",{"data-mce-bogus":"1"});t.setHTML(n,""),n.appendChild(e),o.setRng(Yl.before(e).toRange())}return!0},wk=(e,t)=>e.selection.isCollapsed()?vk(e,t):yk(e,t),_k=e=>e.hasOwnProperty("text"),Sk=e=>e.hasOwnProperty("marker"),Ck=(e,t)=>{const o=(e,o)=>{if(ii(e))return{text:e,offset:o};{const n=t(),r=e.childNodes;return o<r.length?(e.insertBefore(n,r[o]),{marker:n,before:!0}):(e.appendChild(n),{marker:n,before:!1})}},n=o(e.endContainer,e.endOffset);return{start:o(e.startContainer,e.startOffset),end:n}},kk=e=>{var t,o;const{start:n,end:r}=e,i=new window.Range;return _k(n)?i.setStart(n.text,n.offset):Sk(n)&&(n.before?i.setStartBefore(n.marker):i.setStartAfter(n.marker),null===(t=n.marker.parentNode)||void 0===t||t.removeChild(n.marker)),_k(r)?i.setEnd(r.text,r.offset):Sk(r)&&(r.before?i.setEndBefore(r.marker):i.setEndAfter(r.marker),null===(o=r.marker.parentNode)||void 0===o||o.removeChild(r.marker)),i},Ek=(e,t)=>{var o;const n=e.dom,r=n.getParent(e.selection.getStart(),n.isBlock),i=n.getParent(e.selection.getEnd(),n.isBlock),s=e.getBody();if("div"===(null===(o=null==r?void 0:r.nodeName)||void 0===o?void 0:o.toLowerCase())&&r&&i&&r===s.firstChild&&i===s.lastChild&&!n.isEmpty(s)){const o=r.cloneNode(!1),n=()=>{if(t?Rb(e):Lb(e),s.firstChild!==r){const t=Ck(e.selection.getRng(),(()=>document.createElement("span")));Array.from(s.childNodes).forEach((e=>o.appendChild(e))),s.appendChild(o),e.selection.setRng(kk(t))}};return F.some(n)}return F.none()},Tk=(e,t)=>e.selection.isCollapsed()?((e,t)=>{const o=Yl.fromRangeStart(e.selection.getRng());return Hh(t,e.getBody(),o).filter((e=>t?Cf(e):kf(e))).bind((e=>mh(t?0:-1,e))).map((t=>()=>e.selection.select(t)))})(e,t):F.none(),Ok=ii,Ak=e=>Ok(e)&&e.data[0]===Ga,Mk=e=>Ok(e)&&e.data[e.data.length-1]===Ga,Pk=e=>{var t;return(null!==(t=e.ownerDocument)&&void 0!==t?t:document).createTextNode(Ga)},Dk=(e,t)=>e?(e=>{var t;if(Ok(e.previousSibling))return Mk(e.previousSibling)||e.previousSibling.appendData(Ga),e.previousSibling;if(Ok(e))return Ak(e)||e.insertData(0,Ga),e;{const o=Pk(e);return null===(t=e.parentNode)||void 0===t||t.insertBefore(o,e),o}})(t):(e=>{var t,o;if(Ok(e.nextSibling))return Ak(e.nextSibling)||e.nextSibling.insertData(0,Ga),e.nextSibling;if(Ok(e))return Mk(e)||e.appendData(Ga),e;{const n=Pk(e);return e.nextSibling?null===(t=e.parentNode)||void 0===t||t.insertBefore(n,e.nextSibling):null===(o=e.parentNode)||void 0===o||o.appendChild(n),n}})(t),Lk=D(Dk,!0),Rk=D(Dk,!1),Nk=(e,t)=>ii(e.container())?Dk(t,e.container()):Dk(t,e.getNode()),Ik=(e,t)=>{const o=t.get();return o&&e.container()===o&&el(o)},Bk=(e,t)=>t.fold((t=>{Uu(e.get());const o=Lk(t);return e.set(o),F.some(Yl(o,o.length-1))}),(t=>Wh(t).map((t=>{if(Ik(t,e)){const t=e.get();return Yl(t,1)}{Uu(e.get());const o=Nk(t,!0);return e.set(o),Yl(o,1)}}))),(t=>qh(t).map((t=>{if(Ik(t,e)){const t=e.get();return Yl(t,t.length-1)}{Uu(e.get());const o=Nk(t,!1);return e.set(o),Yl(o,o.length-1)}}))),(t=>{Uu(e.get());const o=Rk(t);return e.set(o),F.some(Yl(o,1))})),zk=(e,t)=>{for(let o=0;o<e.length;o++){const n=e[o].apply(null,t);if(n.isSome())return n}return F.none()},Fk=Oe([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),Hk=(e,t)=>{const o=uh(t,e);return o||e},jk=(e,t,o)=>{const n=Mb(o),r=Hk(t,n.container());return Ob(e,r,n).fold((()=>Zh(r,n).bind(D(Ob,e,r)).map((e=>Fk.before(e)))),F.none)},Vk=(e,t)=>null===Kh(e,t),Uk=(e,t,o)=>Ob(e,t,o).filter(D(Vk,t)),Zk=(e,t,o)=>{const n=Pb(o);return Uk(e,t,n).bind((e=>$h(e,n).isNone()?F.some(Fk.start(e)):F.none()))},$k=(e,t,o)=>{const n=Mb(o);return Uk(e,t,n).bind((e=>Zh(e,n).isNone()?F.some(Fk.end(e)):F.none()))},Wk=(e,t,o)=>{const n=Pb(o),r=Hk(t,n.container());return Ob(e,r,n).fold((()=>$h(r,n).bind(D(Ob,e,r)).map((e=>Fk.after(e)))),F.none)},qk=e=>!Tb(Yk(e)),Gk=(e,t,o)=>zk([jk,Zk,$k,Wk],[e,t,o]).filter(qk),Yk=e=>e.fold(M,M,M,M),Kk=e=>e.fold(A("before"),A("start"),A("end"),A("after")),Xk=e=>e.fold(Fk.before,Fk.before,Fk.after,Fk.after),Jk=e=>e.fold(Fk.start,Fk.start,Fk.end,Fk.end),Qk=(e,t,o,n,r,i)=>Ve(Ob(t,o,n),Ob(t,o,r),((t,n)=>t!==n&&((e,t,o)=>{const n=uh(t,e),r=uh(o,e);return _(n)&&n===r})(o,t,n)?Fk.after(e?t:n):i)).getOr(i),eE=(e,t)=>e.fold(z,(e=>{return n=t,!(Kk(o=e)===Kk(n)&&Yk(o)===Yk(n));var o,n})),tE=(e,t)=>e?t.fold(T(F.some,Fk.start),F.none,T(F.some,Fk.after),F.none):t.fold(F.none,T(F.some,Fk.before),F.none,T(F.some,Fk.end)),oE=(e,t,o,n)=>{const r=Ab(e,n),i=Gk(t,o,r);return Gk(t,o,r).bind(D(tE,e)).orThunk((()=>((e,t,o,n,r)=>{const i=Ab(e,r);return Hh(e,o,i).map(D(Ab,e)).fold((()=>n.map(Xk)),(r=>Gk(t,o,r).map(D(Qk,e,t,o,i,r)).filter(D(eE,n)))).filter(qk)})(e,t,o,i,n)))},nE=(e,t,o)=>{const n=e?1:-1;return t.setRng(Yl(o.container(),o.offset()+n).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},rE=(e,t)=>{const o=t.selection.getRng(),n=e?Yl.fromRangeEnd(o):Yl.fromRangeStart(o);return!!(e=>S(e.selection.getSel().modify))(t)&&(e&&nl(n)?nE(!0,t.selection,n):!(e||!rl(n))&&nE(!1,t.selection,n))};var iE;!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(iE||(iE={}));const sE=(e,t)=>-1===e?ie(t):t,aE=(e,t,o)=>1===e?t.next(o):t.prev(o),lE=(e,t,o,n)=>ui(n.getNode(1===t))?iE.Br:!1===hh(o,n)?iE.Block:iE.Wrap,cE=(e,t,o,n)=>{const r=Nh(o);let i=n;const s=[];for(;i;){const o=aE(t,r,i);if(!o)break;if(ui(o.getNode(!1)))return 1===t?{positions:sE(t,s).concat([o]),breakType:iE.Br,breakAt:F.some(o)}:{positions:sE(t,s),breakType:iE.Br,breakAt:F.some(o)};if(o.isVisible()){if(e(i,o)){const e=lE(0,t,i,o);return{positions:sE(t,s),breakType:e,breakAt:F.some(o)}}s.push(o),i=o}else i=o}return{positions:sE(t,s),breakType:iE.Eol,breakAt:F.none()}},dE=(e,t,o,n)=>t(o,n).breakAt.map((n=>{const r=t(o,n).positions;return-1===e?r.concat(n):[n].concat(r)})).getOr([]),uE=(e,t)=>J(e,((e,o)=>e.fold((()=>F.some(o)),(n=>Ve(de(n.getClientRects()),de(o.getClientRects()),((e,r)=>{const i=Math.abs(t-e.left);return Math.abs(t-r.left)<=i?o:n})).or(e)))),F.none()),hE=(e,t)=>de(t.getClientRects()).bind((t=>uE(e,t.left))),mE=D(cE,Yl.isAbove,-1),pE=D(cE,Yl.isBelow,1),gE=D(dE,-1,mE),fE=D(dE,1,pE),bE=(e,t)=>mE(e,t).breakAt.isNone(),vE=(e,t)=>pE(e,t).breakAt.isNone(),yE=(e,t)=>hE(gE(e,t),t),xE=(e,t)=>hE(fE(e,t),t),wE=gi,_E=(e,t)=>Math.abs(e.left-t),SE=(e,t)=>Math.abs(e.right-t),CE=(e,t)=>bt(e,((e,o)=>{const n=Math.min(_E(e,t),SE(e,t)),r=Math.min(_E(o,t),SE(o,t));return r===n&&Te(o,"node")&&wE(o.node)||r<n?o:e})),kE=e=>{const t=t=>W(t,(t=>{const o=dl(t);return o.node=e,o}));if(Kr(e))return t(e.getClientRects());if(ii(e)){const o=e.ownerDocument.createRange();return o.setStart(e,0),o.setEnd(e,e.data.length),t(o.getClientRects())}return[]},EE=e=>ne(e,kE);var TE;!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(TE||(TE={}));const OE=(e,t,o,n,r,i)=>{let s=0;const a=[],l=n=>{let i=EE([n]);e===TE.Up&&(i=i.reverse());for(let e=0;e<i.length;e++){const n=i[e];if(!o(n,c)){if(a.length>0&&t(n,yt(a))&&s++,n.line=s,r(n))return!0;a.push(n)}}return!1},c=yt(i.getClientRects());if(!c)return a;const d=i.getNode();return d&&(l(d),((e,t,o,n)=>{let r=n;for(;r=dh(r,e,Ml,t);)if(o(r))return})(e,n,l,d)),a},AE=D(OE,TE.Up,ml,pl),ME=D(OE,TE.Down,pl,ml),PE=e=>yt(e.getClientRects()),DE=e=>t=>((e,t)=>t.line>e)(e,t),LE=e=>t=>((e,t)=>t.line===e)(e,t),RE=(e,t)=>{e.selection.setRng(t),Pg(e,e.selection.getRng())},NE=(e,t,o)=>F.some(sk(e,t,o)),IE=(e,t,o,n,r,i)=>{const s=1===t,a=Nh(e.getBody()),l=D(Sh,s?a.next:a.prev),c=s?n:r;if(!o.collapsed){const n=fl(o);if(i(n))return rk(t,e,n,-1===t,!1);if(hk(e)){const e=o.cloneRange();return e.collapse(-1===t),F.from(e)}}const d=wh(t,e.getBody(),o);if(c(d))return ik(e,d.getNode(!s));let u=l(d);const h=ll(o);if(!u)return h?F.some(o):F.none();if(u=Ab(s,u),c(u))return rk(t,e,u.getNode(!s),s,!1);const m=l(u);return m&&c(m)&&Ch(u,m)?rk(t,e,m.getNode(!s),s,!1):h?NE(e,u.toRange(),!1):F.none()},BE=(e,t,o,n,r,i)=>{const s=wh(t,e.getBody(),o),a=yt(s.getClientRects()),l=t===TE.Down,c=e.getBody();if(!a)return F.none();if(hk(e)){const e=l?Yl.fromRangeEnd(o):Yl.fromRangeStart(o);return(l?xE:yE)(c,e).orThunk((()=>F.from(e))).map((e=>e.toRange()))}const d=(l?ME:AE)(c,DE(1),s),u=K(d,LE(1)),h=a.left,m=CE(u,h);if(m&&i(m.node)){const o=Math.abs(h-m.left),n=Math.abs(h-m.right);return rk(t,e,m.node,o<n,!1)}let p;if(p=n(s)?s.getNode():r(s)?s.getNode(!0):fl(o),p){const o=((e,t,o,n)=>{const r=Nh(t);let i,s,a,l;const c=[];let d=0;e===TE.Down?(i=r.next,s=pl,a=ml,l=Yl.after(n)):(i=r.prev,s=ml,a=pl,l=Yl.before(n));const u=PE(l);do{if(!l.isVisible())continue;const e=PE(l);if(a(e,u))continue;c.length>0&&s(e,yt(c))&&d++;const t=dl(e);if(t.position=l,t.line=d,o(t))return c;c.push(t)}while(l=i(l));return c})(t,c,DE(1),p);let n=CE(K(o,LE(1)),h);if(n)return NE(e,n.position.toRange(),!1);if(n=yt(K(o,LE(0))),n)return NE(e,n.position.toRange(),!1)}return 0===u.length?zE(e,l).filter(l?r:n).map((t=>sk(e,t.toRange(),!1))):F.none()},zE=(e,t)=>{const o=e.selection.getRng(),n=t?Yl.fromRangeEnd(o):Yl.fromRangeStart(o),r=(i=n.container(),s=e.getBody(),tr(uo.fromDom(i),(e=>Ju(e.dom)),(e=>e.dom===s)).map((e=>e.dom)).getOr(s));var i,s;if(t){const e=pE(r,n);return ue(e.positions)}{const e=mE(r,n);return de(e.positions)}},FE=(e,t,o)=>zE(e,t).filter(o).exists((t=>(e.selection.setRng(t.toRange()),!0))),HE=(e,t)=>{const o=e.dom.createRng();o.setStart(t.container(),t.offset()),o.setEnd(t.container(),t.offset()),e.selection.setRng(o)},jE=(e,t)=>{e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},VE=(e,t,o)=>Bk(t,o).map((t=>(HE(e,t),o))),UE=(e,t,o)=>{const n=e.getBody(),r=((e,t,o)=>{const n=Yl.fromRangeStart(e);if(e.collapsed)return n;{const r=Yl.fromRangeEnd(e);return o?$h(t,r).getOr(r):Zh(t,n).getOr(n)}})(e.selection.getRng(),n,o),i=D(Eb,e);return oE(o,i,n,r).bind((o=>VE(e,t,o)))},ZE=(e,t)=>{const o=t.get();if(e.selection.isCollapsed()&&!e.composing&&o){const n=Yl.fromRangeStart(e.selection.getRng());Yl.isTextPosition(n)&&!(e=>nl(e)||rl(e))(n)&&(HE(e,Vu(o,n)),t.set(null))}},$E=(e,t,o)=>!!Od(e)&&UE(e,t,o).isSome(),WE=(e,t,o)=>!!Od(t)&&rE(e,t),qE=e=>{const t=Ae(null),o=D(Eb,e);return e.on("NodeChange",(n=>{Od(e)&&(((e,t,o)=>{const n=W(wr(uo.fromDom(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),(e=>e.dom)),r=K(n,e),i=K(o,e);q(se(r,i),D(jE,!1)),q(se(i,r),D(jE,!0))})(o,e.dom,n.parents),ZE(e,t),((e,t,o,n)=>{if(t.selection.isCollapsed()){const r=K(n,e);q(r,(n=>{const r=Yl.fromRangeStart(t.selection.getRng());Gk(e,t.getBody(),r).bind((e=>VE(t,o,e)))}))}})(o,e,t,n.parents))})),t},GE=D(WE,!0),YE=D(WE,!1),KE=(e,t,o)=>{if(Od(e)){const n=zE(e,t).getOrThunk((()=>{const o=e.selection.getRng();return t?Yl.fromRangeEnd(o):Yl.fromRangeStart(o)}));return Gk(D(Eb,e),e.getBody(),n).exists((t=>{const n=Xk(t);return Bk(o,n).exists((t=>(HE(e,t),!0)))}))}return!1},XE=(e,t)=>o=>Bk(t,o).map((t=>()=>HE(e,t))),JE=(e,t,o,n)=>{const r=e.getBody(),i=D(Eb,e);e.undoManager.ignore((()=>{e.selection.setRng(((e,t)=>{const o=document.createRange();return o.setStart(e.container(),e.offset()),o.setEnd(t.container(),t.offset()),o})(o,n)),Lb(e),Gk(i,r,Yl.fromRangeStart(e.selection.getRng())).map(Jk).bind(XE(e,t)).each(I)})),e.nodeChanged()},QE=(e,t,o,n)=>{const r=((e,t)=>{const o=uh(t,e);return o||e})(e.getBody(),n.container()),i=D(Eb,e),s=Gk(i,r,n);return s.bind((e=>o?e.fold(A(F.some(Jk(e))),F.none,A(F.some(Xk(e))),F.none):e.fold(F.none,A(F.some(Xk(e))),F.none,A(F.some(Jk(e)))))).map(XE(e,t)).getOrThunk((()=>{const a=jh(o,r,n),l=a.bind((e=>Gk(i,r,e)));return Ve(s,l,(()=>Ob(i,r,n).bind((t=>(e=>Ve(Wh(e),qh(e),((t,o)=>{const n=Ab(!0,t),r=Ab(!1,o);return Zh(e,n).forall((e=>e.isEqual(r)))})).getOr(!0))(t)?F.some((()=>{Cb(e,o,uo.fromDom(t))})):F.none())))).getOrThunk((()=>l.bind((()=>a.map((r=>()=>{o?JE(e,t,n,r):JE(e,t,r,n)}))))))}))},eT=(e,t,o)=>{if(e.selection.isCollapsed()&&Od(e)){const n=Yl.fromRangeStart(e.selection.getRng());return QE(e,t,o,n)}return F.none()},tT=(e,t)=>{const o=uo.fromDom(e.getBody()),n=uo.fromDom(e.selection.getStart()),r=Lf(n,o);return te(r,t).fold(A(r),(e=>r.slice(0,e)))},oT=e=>1===$o(e),nT=e=>tT(e,(t=>e.schema.isBlock(_o(t))||(e=>$o(e)>1)(t))),rT=(e,t)=>{const o=D(Cy,e);return ne(t,(e=>o(e)?[e.dom]:[]))},iT=e=>{const t=(e=>tT(e,(t=>e.schema.isBlock(_o(t)))))(e);return rT(e,t)},sT=(e,t)=>{const o=K(nT(e),oT);return ue(o).bind((n=>{const r=Yl.fromRangeStart(e.selection.getRng());return zb(t,r,n.dom)&&!Gm(n)?F.some((()=>((e,t,o,n)=>{const r=rT(t,n);if(0===r.length)Cb(t,e,o);else{const e=Sy(o.dom,r);t.selection.setRng(e.toRange())}})(t,e,n,o))):F.none()}))},aT=(e,t)=>{const o=e.selection.getStart(),n=((e,t)=>{const o=t.parentElement;return ui(t)&&!v(o)&&e.dom.isEmpty(o)})(e,o)||(r=o,Gm(uo.fromDom(r)))?Sy(o,t):((e,t)=>{const{caretContainer:o,caretPosition:n}=_y(t);return e.insertNode(o.dom),n})(e.selection.getRng(),t);var r;e.selection.setRng(n.toRange())},lT=e=>ii(e.startContainer),cT=e=>(e=>{const t=e.startContainer.parentNode,o=e.endContainer.parentNode;return!v(t)&&!v(o)&&t.isEqualNode(o)})(e)&&(e=>{const t=e.endContainer;return e.endOffset===(ii(t)?t.length:t.childNodes.length)})(e),dT=e=>{const t=e.selection.getRng();return(e=>0===e.startOffset&&lT(e))(t)&&((e,t)=>{const o=t.startContainer.parentElement;return!v(o)&&Cy(e,uo.fromDom(o))})(e,t)&&(e=>cT(e)||(e=>!e.endContainer.isEqualNode(e.commonAncestorContainer))(e))(t)},uT=e=>{if(dT(e)){const t=iT(e);return F.some((()=>{Lb(e),((e,t)=>{const o=se(t,iT(e));o.length>0&&aT(e,o)})(e,t)}))}return F.none()},hT=(e,t)=>e.selection.isCollapsed()?sT(e,t):uT(e),mT=e=>{return t=uo.fromDom(e.selection.getStart()),o=e.schema,_r(t,(e=>Yh(e.dom)),(e=>o.isBlock(_o(e))));var t,o},pT=e=>((e=>{const t=e.selection.getRng();return t.collapsed&&(lT(t)||e.dom.isEmpty(t.startContainer))&&!mT(e)})(e)&&aT(e,[]),!0),gT=(e,t,o)=>_(o)?F.some((()=>{e._selectionOverrides.hideFakeCaret(),Cb(e,t,uo.fromDom(o))})):F.none(),fT=(e,t)=>e.selection.isCollapsed()?((e,t)=>{const o=t?Ef:Tf,n=wh(t?1:-1,e.getBody(),e.selection.getRng());return o(n)?gT(e,t,n.getNode(!t)):F.from(Ab(t,n)).filter((e=>o(e)&&Ch(n,e))).bind((o=>gT(e,t,o.getNode(!t))))})(e,t):((e,t)=>{const o=e.selection.getNode();return yi(o)?gT(e,t,o):F.none()})(e,t),bT=e=>rt(null!=e?e:"").getOr(0),vT=(e,t)=>(e||"table"===_o(t)?"margin":"padding")+("rtl"===In(t,"direction")?"-right":"-left"),yT=e=>{const t=wT(e);return!e.mode.isReadOnly()&&(t.length>1||((e,t)=>re(t,(t=>{const o=vT(hd(e),t),n=zn(t,o).map(bT).getOr(0);return"false"!==e.dom.getContentEditable(t.dom)&&n>0})))(e,t))},xT=e=>Ha(e)||ja(e),wT=e=>K(On(e.selection.getSelectedBlocks()),(e=>!xT(e)&&!(e=>Ro(e).exists(xT))(e)&&or(e,(e=>pi(e.dom)||gi(e.dom))).exists((e=>pi(e.dom))))),_T=(e,t)=>{var o,n;if(e.mode.isReadOnly())return;const{dom:r}=e,i=md(e),s=null!==(n=null===(o=/[a-z%]+$/i.exec(i))||void 0===o?void 0:o[0])&&void 0!==n?n:"px",a=bT(i),l=hd(e);q(wT(e),(e=>{((e,t,o,n,r,i)=>{const s=vT(o,uo.fromDom(i)),a=bT(e.getStyle(i,s));if("outdent"===t){const t=Math.max(0,a-n);e.setStyle(i,s,t?t+r:"")}else{const t=a+n+r;e.setStyle(i,s,t)}})(r,t,l,a,s,e.dom)}))},ST=e=>_T(e,"outdent"),CT=e=>{if(e.selection.isCollapsed()&&yT(e)){const t=e.dom,o=e.selection.getRng(),n=Yl.fromRangeStart(o),r=t.getParent(o.startContainer,t.isBlock);if(null!==r&&zf(uo.fromDom(r),n,e.schema))return F.some((()=>ST(e)))}return F.none()},kT=(e,t,o)=>me([CT,wk,dk,(e,o)=>eT(e,t,o),QC,bv,Tk,fT,nk,hT,Ek],(t=>t(e,o))).filter((t=>e.selection.isEditable())),ET=(e,t)=>{e.addCommand("delete",(()=>{((e,t)=>{kT(e,t,!1).fold((()=>{e.selection.isEditable()&&(Lb(e),Bb(e))}),I)})(e,t)})),e.addCommand("forwardDelete",(()=>{((e,t)=>{kT(e,t,!0).fold((()=>{e.selection.isEditable()&&Rb(e)}),I)})(e,t)}))},TT=e=>void 0===e.touches||1!==e.touches.length?F.none():F.some(e.touches[0]),OT=e=>{const t=We(),o=Ae(!1),n=st((t=>{e.dispatch("longpress",{...t,type:"longpress"}),o.set(!0)}),400);e.on("touchstart",(e=>{TT(e).each((r=>{n.cancel();const i={x:r.clientX,y:r.clientY,target:e.target};n.throttle(e),o.set(!1),t.set(i)}))}),!0),e.on("touchmove",(r=>{n.cancel(),TT(r).each((n=>{t.on((r=>{((e,t)=>{const o=Math.abs(e.clientX-t.x),n=Math.abs(e.clientY-t.y);return o>5||n>5})(n,r)&&(t.clear(),o.set(!1),e.dispatch("longpresscancel"))}))}))}),!0),e.on("touchend touchcancel",(r=>{n.cancel(),"touchcancel"!==r.type&&t.get().filter((e=>e.target.isEqualNode(r.target))).each((()=>{o.get()?r.preventDefault():e.dispatch("tap",{...r,type:"tap"})}))}),!0)},AT=(e,t)=>Ee(e,t.nodeName),MT=(e,t)=>!!ii(t)||!!Kr(t)&&!(AT(e.getBlockElements(),t)||cm(t)||Gi(e,t)||Ri(t)),PT=(e,t)=>{if(ii(t)){if(0===t.data.length)return!0;if(/^\s+$/.test(t.data))return!t.nextSibling||AT(e,t.nextSibling)||Ri(t.nextSibling)}return!1},DT=e=>e.dom.create(Wc(e),qc(e)),LT=e=>{const t=e.dom,o=e.selection,n=e.schema,r=n.getBlockElements(),i=o.getStart(),s=e.getBody();let a,l,c=null;const d=Wc(e);if(!i||!Kr(i))return;const u=s.nodeName.toLowerCase();if(!n.isValidChild(u,d.toLowerCase())||((e,t,o)=>$(Df(uo.fromDom(o),uo.fromDom(t)),(t=>AT(e,t.dom))))(r,s,i))return;if(s.firstChild===s.lastChild&&ui(s.firstChild))return a=DT(e),a.appendChild(Wa().dom),s.replaceChild(a,s.firstChild),e.selection.setCursorLocation(a,0),void e.nodeChanged();let h=s.firstChild;for(;h;)if(Kr(h)&&Zi(n,h),MT(n,h)){if(PT(r,h)){l=h,h=h.nextSibling,t.remove(l);continue}if(!a){if(!c&&e.hasFocus()&&(c=Ck(e.selection.getRng(),(()=>document.createElement("span")))),!h.parentNode){h=null;break}a=DT(e),s.insertBefore(a,h)}l=h,h=h.nextSibling,a.appendChild(l)}else a=null,h=h.nextSibling;c&&(e.selection.setRng(kk(c)),e.nodeChanged())},RT=(e,t,o)=>{const n=uo.fromDom(DT(e)),r=Wa();dn(n,r),o(t,n);const i=document.createRange();return i.setStartBefore(r.dom),i.setEndBefore(r.dom),i},NT=e=>t=>-1!==(" "+t.attr("class")+" ").indexOf(e),IT=(e,t,o)=>function(n){const r=arguments,i=r[r.length-2],s=i>0?t.charAt(i-1):"";if('"'===s)return n;if(">"===s){const e=t.lastIndexOf("<",i);if(-1!==e){if(-1!==t.substring(e,i).indexOf('contenteditable="false"'))return n}}return'<span class="'+o+'" data-mce-content="'+e.dom.encode(r[0])+'">'+e.dom.encode("string"==typeof r[1]?r[1]:r[0])+"</span>"},BT=(e,t)=>re(e,(e=>{const o=t.match(e);return null!==o&&o[0].length===t.length})),zT=e=>{const t="contenteditable",o=" "+lo.trim(vu(e))+" ",n=" "+lo.trim(bu(e))+" ",r=NT(o),i=NT(n),s=yu(e);s.length>0&&e.on("BeforeSetContent",(t=>{((e,t,o)=>{let n=t.length,r=o.content;if("raw"!==o.format){for(;n--;)r=r.replace(t[n],IT(e,r,bu(e)));o.content=r}})(e,s,t)})),e.parser.addAttributeFilter("class",(e=>{let o=e.length;for(;o--;){const n=e[o];r(n)?n.attr(t,"true"):i(n)&&n.attr(t,"false")}})),e.serializer.addAttributeFilter(t,(e=>{let o=e.length;for(;o--;){const n=e[o];if(!r(n)&&!i(n))continue;const a=n.attr("data-mce-content");s.length>0&&a?BT(s,a)?(n.name="#text",n.type=3,n.raw=!0,n.value=a):n.remove():n.attr(t,null)}}))},FT=(e,t)=>{t.hasAttribute("data-mce-caret")&&(al(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},HT=(e,t)=>{const o=(e=>sr(uo.fromDom(e.getBody()),"*[data-mce-caret]").map((e=>e.dom)).getOrNull())(e);if(o)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void FT(e,o)):void(ol(o)&&(FT(e,o),e.undoManager.add()))},jT=gi,VT=(e,t,o)=>{const n=Nh(e.getBody()),r=D(Sh,1===t?n.next:n.prev);if(o.collapsed){const n=e.dom.getParent(o.startContainer,"PRE");if(!n)return;if(!r(Yl.fromRangeStart(o))){const o=uo.fromDom((e=>{const t=e.dom.create(Wc(e));return t.innerHTML='<br data-mce-bogus="1">',t})(e));1===t?ln(uo.fromDom(n),o):an(uo.fromDom(n),o),e.selection.select(o.dom,!0),e.selection.collapse()}}},UT=(e,t)=>{const o=t?1:-1,n=e.selection.getRng();return((e,t,o)=>IE(t,e,o,Mf,Pf,jT))(o,e,n).orThunk((()=>(VT(e,o,n),F.none())))},ZT=(e,t)=>{const o=t?1:-1,n=e.selection.getRng();return((e,t,o)=>BE(t,e,o,(e=>Mf(e)||Of(e)),(e=>Pf(e)||Af(e)),jT))(o,e,n).orThunk((()=>(VT(e,o,n),F.none())))},$T=(e,t)=>UT(e,((e,t)=>{const o=t?e.getEnd(!0):e.getStart(!0);return Tb(o)?!t:t})(e.selection,t)).exists((t=>(RE(e,t),!0))),WT=(e,t)=>ZT(e,t).exists((t=>(RE(e,t),!0))),qT=(e,t)=>FE(e,t,t?Pf:Mf),GT=(e,t)=>uk(e,!t).map((o=>{const n=o.toRange(),r=e.selection.getRng();return t?n.setStart(r.startContainer,r.startOffset):n.setEnd(r.endContainer,r.endOffset),n})).exists((t=>(RE(e,t),!0))),YT=e=>Z(["figcaption"],_o(e)),KT=(e,t)=>{const o=uo.fromDom(e.getBody()),n=Yl.fromRangeStart(e.selection.getRng());return((e,t,o)=>{const n=D(yo,t);return or(uo.fromDom(e.container()),(e=>o.isBlock(_o(e))),n).filter(YT)})(n,o,e.schema).exists((()=>{if(((e,t,o)=>t?vE(e.dom,o):bE(e.dom,o))(o,t,n)){const n=RT(e,o,t?dn:cn);return e.selection.setRng(n),!0}return!1}))},XT=(e,t)=>!!e.selection.isCollapsed()&&KT(e,t),JT=(e,t)=>t?F.from(e.dom.getParent(e.selection.getNode(),"details")).map((t=>((e,t)=>{const o=e.selection.getRng(),n=Yl.fromRangeStart(o);return!(e.getBody().lastChild!==t||!vE(t,n)||(e.execCommand("InsertNewBlockAfter"),0))})(e,t))).getOr(!1):F.from(e.dom.getParent(e.selection.getNode(),"summary")).bind((t=>F.from(e.dom.getParent(t,"details")).map((o=>((e,t,o)=>{const n=e.selection.getRng(),r=Yl.fromRangeStart(n);return!(e.getBody().firstChild!==t||!bE(o,r)||(e.execCommand("InsertNewBlockBefore"),0))})(e,o,t))))).getOr(!1),QT=(e,t)=>JT(e,t),eO={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},tO=(e,t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey,oO=(e,t)=>ne((e=>W(e,(e=>({...eO,...e}))))(e),(e=>tO(e,t)?[e]:[])),nO=(e,t)=>ne((e=>W(e,(e=>({...eO,...e}))))(e),(e=>tO(e,t)?[e]:[])),rO=(e,...t)=>()=>e.apply(null,t),iO=(e,t)=>ee(oO(e,t),(e=>e.action())),sO=(e,t)=>me(nO(e,t),(e=>e.action())),aO=(e,t)=>{const o=t?1:-1,n=e.selection.getRng();return IE(e,o,n,Ef,Tf,yi).exists((t=>(RE(e,t),!0)))},lO=(e,t)=>{const o=t?1:-1,n=e.selection.getRng();return BE(e,o,n,Ef,Tf,yi).exists((t=>(RE(e,t),!0)))},cO=(e,t)=>FE(e,t,t?Tf:Ef),dO=(e,t,o)=>ne(jo(e),(e=>bo(e,t)?o(e)?[e]:[]:dO(e,t,o))),uO=(e,t)=>((e,t,o=B)=>o(t)?F.none():Z(e,_o(t))?F.some(t):ir(t,e.join(","),(e=>bo(e,"table")||o(e))))(["td","th"],e,t),hO=e=>dO(e,"th,td",z),mO=(e,t)=>ar(e,"table",t),pO=Oe([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),gO={...pO,none:e=>pO.none(e)},fO=(e,t,o,n,r=z)=>{const i=1===n;if(!i&&o<=0)return gO.first(e[0]);if(i&&o>=e.length-1)return gO.last(e[e.length-1]);{const i=o+n,s=e[i];return r(s)?gO.middle(t,s):fO(e,t,i,n,r)}},bO=(e,t)=>mO(e,t).bind((t=>{const o=hO(t);return te(o,(t=>yo(e,t))).map((e=>({index:e,all:o})))})),vO=Ie("image"),yO=Ie("event"),xO=e=>t=>{t[yO]=e},wO=xO(0),_O=xO(2),SO=xO(1),CO=(kO=0,e=>{const t=e;return F.from(t[yO]).exists((e=>e===kO))});var kO;const EO=Ie("mode"),TO=e=>t=>{t[EO]=e},OO=(e,t)=>TO(t)(e),AO=TO(0),MO=TO(2),PO=TO(1),DO=e=>t=>{const o=t;return F.from(o[EO]).exists((t=>t===e))},LO=DO(0),RO=DO(1),NO=["none","copy","link","move"],IO=["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"],BO=()=>{const e=new window.DataTransfer;let t="move",o="all";const n={get dropEffect(){return t},set dropEffect(e){Z(NO,e)&&(t=e)},get effectAllowed(){return o},set effectAllowed(e){CO(n)&&Z(IO,e)&&(o=e)},get items(){return((e,t)=>({...t,get length(){return t.length},add:(o,n)=>{if(LO(e)){if(!p(o))return t.add(o);if(!x(n))return t.add(o,n)}return null},remove:o=>{LO(e)&&t.remove(o)},clear:()=>{LO(e)&&t.clear()}}))(n,e.items)},get files(){return RO(n)?Object.freeze({length:0,item:e=>null}):e.files},get types(){return e.types},setDragImage:(t,o,r)=>{var i;LO(n)&&(i={image:t,x:o,y:r},n[vO]=i,e.setDragImage(t,o,r))},getData:t=>RO(n)?"":e.getData(t),setData:(t,o)=>{LO(n)&&e.setData(t,o)},clearData:t=>{LO(n)&&e.clearData(t)}};return AO(n),n},zO=e=>{const t=BO(),o=(e=>{const t=e;return F.from(t[EO])})(e);return MO(e),wO(t),t.dropEffect=e.dropEffect,t.effectAllowed=e.effectAllowed,(e=>{const t=e;return F.from(t[vO])})(e).each((e=>t.setDragImage(e.image,e.x,e.y))),q(e.types,(o=>{"Files"!==o&&t.setData(o,e.getData(o))})),q(e.files,(e=>t.items.add(e))),(e=>{const t=e;return F.from(t[yO])})(e).each((e=>{((e,t)=>{xO(t)(e)})(t,e)})),o.each((o=>{OO(e,o),OO(t,o)})),t},FO=(e,t)=>e.setData("text/html",t),HO=(e,t,o,n,r)=>{const i=wr(uo.fromDom(o),"td,th,caption").map((e=>e.dom)),s=K(((e,t)=>ne(t,(t=>{const o=((e,t)=>({left:e.left-t,top:e.top-t,right:e.right+2*t,bottom:e.bottom+2*t,width:e.width+t,height:e.height+t}))(dl(t.getBoundingClientRect()),-1);return[{x:o.left,y:e(o),cell:t},{x:o.right,y:e(o),cell:t}]})))(e,i),(e=>t(e,r)));return((e,t,o)=>J(e,((e,n)=>e.fold((()=>F.some(n)),(e=>{const r=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-o)),i=Math.sqrt(Math.abs(n.x-t)+Math.abs(n.y-o));return F.some(i<r?n:e)}))),F.none()))(s,n,r).map((e=>e.cell))},jO=D(HO,(e=>e.bottom),((e,t)=>e.y<t)),VO=D(HO,(e=>e.top),((e,t)=>e.y>t)),UO=(e,t)=>de(t.getClientRects()).bind((t=>jO(e,t.left,t.top))).bind((e=>{return hE(qh(o=e).map((e=>mE(o,e).positions.concat(e))).getOr([]),t);var o})),ZO=(e,t)=>ue(t.getClientRects()).bind((t=>VO(e,t.left,t.top))).bind((e=>{return hE(Wh(o=e).map((e=>[e].concat(pE(o,e).positions))).getOr([]),t);var o})),$O=(e,t,o)=>{const n=e(t,o);return(e=>e.breakType===iE.Wrap&&0===e.positions.length)(n)||!ui(o.getNode())&&(e=>e.breakType===iE.Br&&1===e.positions.length)(n)?!((e,t,o)=>o.breakAt.exists((o=>e(t,o).breakAt.isSome())))(e,t,n):n.breakAt.isNone()},WO=D($O,mE),qO=D($O,pE),GO=(e,t,o,n)=>{const r=e.selection.getRng(),i=t?1:-1;return!(!Yu()||!((e,t,o)=>{const n=Yl.fromRangeStart(t);return Uh(!e,o).exists((e=>e.isEqual(n)))})(t,r,o))&&(rk(i,e,o,!t,!1).each((t=>{RE(e,t)})),!0)},YO=(e,t)=>{const o=t.getNode(e);return oi(o)?F.some(o):F.none()},KO=(e,t,o)=>{const n=YO(!!t,o),r=!1===t;n.fold((()=>RE(e,o.toRange())),(n=>Uh(r,e.getBody()).filter((e=>e.isEqual(o))).fold((()=>RE(e,o.toRange())),(o=>((e,t,o)=>{t.undoManager.transact((()=>{const n=e?ln:an,r=RT(t,uo.fromDom(o),n);RE(t,r)}))})(t,e,n)))))},XO=(e,t,o,n)=>{const r=e.selection.getRng(),i=Yl.fromRangeStart(r),s=e.getBody();if(!t&&WO(n,i)){const n=((e,t,o)=>UO(t,o).orThunk((()=>de(o.getClientRects()).bind((o=>uE(gE(e,Yl.before(t)),o.left))))).getOr(Yl.before(t)))(s,o,i);return KO(e,t,n),!0}if(t&&qO(n,i)){const n=((e,t,o)=>ZO(t,o).orThunk((()=>de(o.getClientRects()).bind((o=>uE(fE(e,Yl.after(t)),o.left))))).getOr(Yl.after(t)))(s,o,i);return KO(e,t,n),!0}return!1},JO=(e,t,o)=>F.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind((n=>F.from(e.dom.getParent(n,"table")).map((r=>o(e,t,r,n))))).getOr(!1),QO=(e,t)=>JO(e,t,GO),eA=(e,t)=>JO(e,t,XO),tA=(e,t,o)=>o.fold(F.none,F.none,((e,t)=>{return(o=t,rr(o,Ar)).map((e=>(e=>{const t=Rr.exact(e,0,e,0);return Fr(t)})(e)));var o}),(o=>e.mode.isReadOnly()||!oA(o)?F.none():(e.execCommand("mceTableInsertRowAfter"),nA(e,t,o)))),oA=e=>or(e,Mo("table")).exists(br),nA=(e,t,o)=>tA(e,t,((e,t,o)=>bO(e,o).fold((()=>gO.none(e)),(o=>fO(o.all,e,o.index,1,t))))(o,iA)),rA=(e,t,o)=>tA(e,t,((e,t,o)=>bO(e,o).fold((()=>gO.none()),(o=>fO(o.all,e,o.index,-1,t))))(o,iA)),iA=e=>br(e)||Cr(e,sA),sA=e=>ko(e)&&br(e),aA=(e,t)=>{const o=["table","li","dl"],n=uo.fromDom(e.getBody()),r=e=>{const t=_o(e);return yo(e,n)||Z(o,t)},i=e.selection.getRng(),s=uo.fromDom(t?i.endContainer:i.startContainer);return uO(s,r).map((o=>{mO(o,r).each((t=>{e.model.table.clearSelectedCells(t.dom)})),e.selection.collapse(!t);return(t?nA:rA)(e,r,o).each((t=>{e.selection.setRng(t)})),!0})).getOr(!1)},lA=(e,t)=>{e.on("keydown",(o=>{o.isDefaultPrevented()||((e,t,o)=>{const n=ro.os.isMacOS()||ro.os.isiOS();iO([{keyCode:Xp.RIGHT,action:rO($T,e,!0)},{keyCode:Xp.LEFT,action:rO($T,e,!1)},{keyCode:Xp.UP,action:rO(WT,e,!1)},{keyCode:Xp.DOWN,action:rO(WT,e,!0)},...n?[{keyCode:Xp.UP,action:rO(GT,e,!1),metaKey:!0,shiftKey:!0},{keyCode:Xp.DOWN,action:rO(GT,e,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:Xp.RIGHT,action:rO(QO,e,!0)},{keyCode:Xp.LEFT,action:rO(QO,e,!1)},{keyCode:Xp.UP,action:rO(eA,e,!1)},{keyCode:Xp.DOWN,action:rO(eA,e,!0)},{keyCode:Xp.UP,action:rO(eA,e,!1)},{keyCode:Xp.UP,action:rO(QT,e,!1)},{keyCode:Xp.DOWN,action:rO(QT,e,!0)},{keyCode:Xp.RIGHT,action:rO(aO,e,!0)},{keyCode:Xp.LEFT,action:rO(aO,e,!1)},{keyCode:Xp.UP,action:rO(lO,e,!1)},{keyCode:Xp.DOWN,action:rO(lO,e,!0)},{keyCode:Xp.RIGHT,action:rO($E,e,t,!0)},{keyCode:Xp.LEFT,action:rO($E,e,t,!1)},{keyCode:Xp.RIGHT,ctrlKey:!n,altKey:n,action:rO(GE,e,t)},{keyCode:Xp.LEFT,ctrlKey:!n,altKey:n,action:rO(YE,e,t)},{keyCode:Xp.UP,action:rO(XT,e,!1)},{keyCode:Xp.DOWN,action:rO(XT,e,!0)}],o).each((e=>{o.preventDefault()}))})(e,t,o)}))},cA=(e,t)=>({container:e,offset:t}),dA=ga.DOM,uA=e=>t=>e===t?-1:0,hA=(e,t,o)=>{if(ii(e)&&t>=0)return F.some(cA(e,t));{const n=Ia(dA);return F.from(n.backwards(e,t,uA(e),o)).map((e=>cA(e.container,e.container.data.length)))}},mA=(e,t,o)=>{if(!ii(e))return F.none();const n=e.data;if(t>=0&&t<=n.length)return F.some(cA(e,t));{const n=Ia(dA);return F.from(n.backwards(e,t,uA(e),o)).bind((e=>{const n=e.container.data;return mA(e.container,t+n.length,o)}))}},pA=(e,t,o)=>{if(!ii(e))return F.none();const n=e.data;if(t<=n.length)return F.some(cA(e,t));{const r=Ia(dA);return F.from(r.forwards(e,t,uA(e),o)).bind((e=>pA(e.container,t-n.length,o)))}},gA=(e,t,o,n,r)=>{const i=Ia(e,(e=>t=>e.isBlock(t)||Z(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===e.getContentEditable(t))(e));return F.from(i.backwards(t,o,n,r))},fA=e=>""!==e&&-1!=="  \ufeff\f\n\r\t\v".indexOf(e),bA=(e,t)=>e.substring(t.length),vA=(e,t,o,n=!1)=>{if(!(r=t).collapsed||!ii(r.startContainer))return F.none();var r;const i={text:"",offset:0},s=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return gA(e,t.startContainer,t.startOffset,((e,t,r)=>(i.text=r+i.text,i.offset+=t,((e,t,o,n=!1)=>{let r;const i=o.charAt(0);for(r=t-1;r>=0;r--){const s=e.charAt(r);if(!n&&fA(s))return F.none();if(i===s&&Ye(e,o,r,t))break}return F.some(r)})(i.text,i.offset,o,n).getOr(t))),s).bind((e=>{const n=t.cloneRange();if(n.setStart(e.container,e.offset),n.setEnd(t.endContainer,t.endOffset),n.collapsed)return F.none();const r=(e=>Ka(e.toString().replace(/\u00A0/g," ")))(n);return 0!==r.lastIndexOf(o)?F.none():F.some({text:bA(r,o),range:n,trigger:o})}))},yA=e=>{if((e=>3===e.nodeType)(e))return cA(e,e.data.length);{const t=e.childNodes;return t.length>0?yA(t[t.length-1]):cA(e,t.length)}},xA=(e,t)=>{const o=e.childNodes;return o.length>0&&t<o.length?xA(o[t],0):o.length>0&&(e=>1===e.nodeType)(e)&&o.length===t?yA(o[o.length-1]):cA(e,t)},wA=e=>t=>{const o=xA(t.startContainer,t.startOffset);return!((e,t)=>{var o;const n=null!==(o=e.getParent(t.container,e.isBlock))&&void 0!==o?o:e.getRoot();return gA(e,t.container,t.offset,((e,t)=>0===t?-1:t),n).filter((e=>{const t=e.container.data.charAt(e.offset-1);return!fA(t)})).isSome()})(e,o)},_A=(e,t)=>{const o=t(),n=e.selection.getRng();return((e,t,o)=>me(o.triggers,(o=>vA(e,t,o))))(e.dom,n,o).bind((o=>SA(e,t,o)))},SA=(e,t,o,n={})=>{var r;const i=t(),s=null!==(r=e.selection.getRng().startContainer.nodeValue)&&void 0!==r?r:"",a=K(i.lookupByTrigger(o.trigger),(t=>o.text.length>=t.minChars&&t.matches.getOrThunk((()=>wA(e.dom)))(o.range,s,o.text)));if(0===a.length)return F.none();const l=Promise.all(W(a,(e=>e.fetch(o.text,e.maxResults,n).then((t=>({matchText:o.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn}))))));return F.some({lookupData:l,context:o})};var CA;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(CA||(CA={}));const kA=(e,t,o)=>e.stype===CA.Error?t(e.serror):o(e.svalue),EA=e=>({stype:CA.Value,svalue:e}),TA=e=>({stype:CA.Error,serror:e}),OA=e=>kA(e,De.error,De.value),AA=EA,MA=e=>{const t=[],o=[];return q(e,(e=>{kA(e,(e=>o.push(e)),(e=>t.push(e)))})),{values:t,errors:o}},PA=TA,DA=(e,t)=>e.stype===CA.Error?t(e.serror):e,LA=(e,t)=>e.stype===CA.Value?{stype:CA.Value,svalue:t(e.svalue)}:e,RA=(e,t)=>e.stype===CA.Error?{stype:CA.Error,serror:t(e.serror)}:e,NA=kA,IA=e=>g(e)&&ge(e).length>100?" removed due to size":JSON.stringify(e,null,2),BA=(e,t)=>PA([{path:e,getErrorInfo:t}]),zA=e=>({extract:(t,o)=>DA(e(o),(e=>((e,t)=>BA(e,A(t)))(t,e))),toString:A("val")}),FA=zA(AA),HA=A(FA),jA=(e,t)=>zA((o=>{const n=typeof o;return e(o)?AA(o):PA(`Expected type: ${t} but got: ${n}`)})),VA=jA(C,"number"),UA=jA(p,"string"),ZA=jA(y,"boolean"),$A=jA(S,"function"),WA=e=>{if(Object(e)!==e)return!0;switch({}.toString.call(e).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(e).every((t=>WA(e[t])));default:return!1}};zA((e=>WA(e)?AA(e):PA("Expected value to be acceptable for sending via postMessage")));const qA=e=>({tag:"defaultedThunk",process:A(e)}),GA=(e,t,o)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return o(e.newKey,e.instantiator)}},YA=e=>T(PA,oe)(e),KA=e=>{const t=MA(e);return t.errors.length>0?YA(t.errors):AA(t.values)},XA=(e,t,o,n)=>ke(t,o).fold((()=>((e,t,o)=>BA(e,(()=>'Could not find valid *required* value for "'+t+'" in '+IA(o))))(e,o,t)),n),JA=(e,t,o,n)=>n(ke(e,t).getOrThunk((()=>o(e)))),QA=(e,t,o,n,r)=>{const i=e=>r.extract(t.concat([n]),e),s=e=>e.fold((()=>AA(F.none())),(e=>{const o=r.extract(t.concat([n]),e);return LA(o,F.some)}));switch(e.tag){case"required":return XA(t,o,n,i);case"defaultedThunk":return JA(o,n,e.process,i);case"option":return((e,t,o)=>o(ke(e,t)))(o,n,s);case"defaultedOptionThunk":return((e,t,o,n)=>n(ke(e,t).map((t=>!0===t?o(e):t))))(o,n,e.process,s);case"mergeWithThunk":return JA(o,n,A({}),(t=>{const n=ze(e.process(o),t);return i(n)}))}},eM=e=>({extract:(t,o)=>((e,t,o)=>{const n={},r=[];for(const i of o)GA(i,((o,i,s,a)=>{const l=QA(s,e,t,o,a);NA(l,(e=>{r.push(...e)}),(e=>{n[i]=e}))}),((e,o)=>{n[e]=o(t)}));return r.length>0?PA(r):AA(n)})(t,o,e),toString:()=>{const t=W(e,(e=>GA(e,((e,t,o,n)=>e+" -> "+n.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),tM=(e,t,o)=>OA(((e,t,o)=>{const n=t.extract([e],o);return RA(n,(e=>({input:o,errors:e})))})(e,t,o)),oM=e=>"Errors: \n"+(e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:A("... (only showing first ten failures)")}]):e;return W(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))})(e.errors).join("\n")+"\n\nInput object: "+IA(e.input),nM=(e,t,o,n)=>({tag:"field",key:e,newKey:t,presence:o,prop:n}),rM=(e,t)=>nM(e,e,{tag:"required",process:{}},t),iM=e=>rM(e,UA),sM=e=>rM(e,$A),aM=(e,t)=>nM(e,e,{tag:"option",process:{}},t),lM=e=>aM(e,UA),cM=e=>aM(e,$A),dM=(e,t)=>nM(e,e,qA(t),HA()),uM=(e,t,o)=>nM(e,e,qA(t),o),hM=(e,t)=>uM(e,t,VA),mM=(e,t)=>uM(e,t,ZA),pM=(e,t)=>uM(e,t,$A),gM=iM("type");iM("name"),iM("label"),iM("text"),iM("title"),iM("icon"),iM("url");const fM=iM("value"),bM=sM("fetch");sM("getSubmenuItems");const vM=sM("onAction");sM("onItemAction"),pM("onSetup",(()=>E)),lM("name");const yM=lM("text");lM("role");const xM=lM("icon");lM("url"),lM("tooltip"),lM("label"),lM("shortcut"),cM("select");const wM=mM("active",!1);mM("borderless",!1);const _M=mM("enabled",!0);mM("primary",!1);const SM=dM("meta",{});pM("onAction",E);eM([(e=>((e,t)=>uM(e,t,UA))("type",e))("autocompleteitem"),wM,_M,SM,fM,yM,xM]);const CM=eM([gM,iM("trigger"),hM("minChars",1),(kM=1,dM("columns",kM)),hM("maxResults",10),cM("matches"),bM,vM,((e,t,o)=>{return uM(e,t,(n=o,{extract:(e,t)=>{const o=W(t,((t,o)=>n.extract(e.concat(["["+o+"]"]),t)));return KA(o)},toString:()=>"array("+n.toString()+")"}));var n})("highlightOn",[],UA)]);var kM;const EM=e=>{const t=e.ui.registry.getAll().popups,o=ve(t,(e=>{return(t=e,tM("Autocompleter",CM,t)).fold((e=>{throw new Error(oM(e))}),M);var t})),n=ut(Se(o,(e=>e.trigger))),r=Ce(o);return{dataset:o,triggers:n,lookupByTrigger:e=>K(r,(t=>t.trigger===e))}},TM=e=>{const t=We(),o=Ae(!1),n=t.isSet,r=()=>{n()&&((e=>{e.dispatch("AutocompleterEnd")})(e),o.set(!1),t.clear())},i=at((()=>EM(e))),s=s=>{(o=>t.get().map((t=>vA(e.dom,e.selection.getRng(),t.trigger,!0).bind((t=>SA(e,i,t,o))))).getOrThunk((()=>_A(e,i))))(s).fold(r,(r=>{(e=>{n()||t.set({trigger:e.trigger,matchLength:e.text.length})})(r.context),r.lookupData.then((n=>{t.get().map((i=>{const s=r.context;i.trigger===s.trigger&&(t.set({...i,matchLength:s.text.length}),o.get()?(Mc(e,{range:s.range}),((e,t)=>{e.dispatch("AutocompleterUpdate",t)})(e,{lookupData:n})):(o.set(!0),Mc(e,{range:s.range}),((e,t)=>{e.dispatch("AutocompleterStart",t)})(e,{lookupData:n})))}))}))}))},a=()=>t.get().bind((({trigger:t})=>{const n=e.selection.getRng();return vA(e.dom,n,t,o.get()).filter((({range:e})=>((e,t)=>{const o=e.compareBoundaryPoints(window.Range.START_TO_START,t),n=e.compareBoundaryPoints(window.Range.END_TO_END,t);return o>=0&&n<=0})(n,e))).map((({range:e})=>e))}));e.addCommand("mceAutocompleterReload",((e,t)=>{const o=g(t)?t.fetchOptions:{};s(o)})),e.addCommand("mceAutocompleterClose",r),e.addCommand("mceAutocompleterRefreshActiveRange",(()=>{a().each((t=>{Mc(e,{range:t})}))})),e.editorCommands.addQueryStateHandler("mceAutoCompleterInRange",(()=>a().isSome())),((e,t)=>{const o=st(t.load,50);e.on("input",(t=>{("insertCompositionText"!==t.inputType||e.composing)&&o.throttle()})),e.on("keydown",(e=>{const n=e.which;8===n?o.throttle():27===n?(o.cancel(),t.cancelIfNecessary()):38!==n&&40!==n||o.cancel()}),!0),e.on("remove",o.cancel)})(e,{cancelIfNecessary:r,load:s})},OM=Gt().browser.isSafari(),AM=e=>qa(uo.fromDom(e)),MM=(e,t)=>{var o;return 0===e.startOffset&&e.endOffset===(null===(o=t.textContent)||void 0===o?void 0:o.length)},PM=(e,t)=>F.from(e.getParent(t.container(),"details")),DM=(e,t)=>PM(e,t).isSome(),LM=(e,t)=>t.startSummary.exists((t=>((e,t)=>Wh(t).exists((t=>t.isEqual(e))))(e,t))),RM=(e,t)=>t.startSummary.exists((t=>((e,t)=>qh(t).exists((o=>ui(o.getNode())&&$h(t,o).exists((t=>t.isEqual(e)))||o.isEqual(e))))(e,t))),NM=(e,t)=>{const o=t.getNode();x(o)||e.selection.setCursorLocation(o,t.offset())},IM=(e,t,o)=>{const n=e.dom.getParent(t.container(),"details");if(n&&!n.open){const t=e.dom.select("summary",n)[0];if(t){(o?Wh(t):qh(t)).each((t=>NM(e,t)))}}else NM(e,t)},BM=(e,t,o)=>{const{dom:n,selection:r}=e,i=e.getBody();if("character"===o){const o=Yl.fromRangeStart(r.getRng()),s=n.getParent(o.container(),n.isBlock),a=PM(n,o),l=s&&n.isEmpty(s),c=v(null==s?void 0:s.previousSibling),d=v(null==s?void 0:s.nextSibling);if(l){if(t?d:c){if(jh(!t,i,o).exists((e=>DM(n,e)&&!je(a,PM(n,e)))))return!0}}return jh(t,i,o).fold(B,(o=>{const r=PM(n,o);if(DM(n,o)&&!je(a,r)){if(t||IM(e,o,!1),s&&l){if(t&&c)return!0;if(!t&&d)return!0;IM(e,o,t),e.dom.remove(s)}return!0}return!1}))}return!1},zM=(e,t,o,n)=>{const r=e.selection.getRng(),i=Yl.fromRangeStart(r),s=e.getBody();return"selection"===n?((e,t)=>{const o=t.startSummary.exists((t=>t.contains(e.startContainer))),n=t.startSummary.exists((t=>t.contains(e.endContainer))),r=t.startDetails.forall((e=>t.endDetails.forall((t=>e!==t))));return(o||n)&&!(o&&n)||r})(r,t):o?RM(i,t)||((e,t,o)=>o.startDetails.exists((o=>Zh(e,t).forall((e=>!o.contains(e.container()))))))(s,i,t):LM(i,t)||((e,t)=>t.startDetails.exists((o=>$h(o,e).forall((o=>t.startSummary.exists((t=>!t.contains(e.container())&&t.contains(o.container()))))))))(i,t)},FM=(e,t,o)=>((e,t)=>{const o=F.from(e.getParent(t.startContainer,"details")),n=F.from(e.getParent(t.endContainer,"details"));if(o.isSome()||n.isSome()){const t=o.bind((t=>F.from(e.select("summary",t)[0])));return F.some({startSummary:t,startDetails:o,endDetails:n})}return F.none()})(e.dom,e.selection.getRng()).fold((()=>BM(e,t,o)),(n=>zM(e,n,t,o)||BM(e,t,o))),HM=(e,t,o)=>{const n=e.selection,r=n.getNode(),i=n.getRng(),s=Yl.fromRangeStart(i);return!!_i(r)&&("selection"===o&&MM(i,r)||zb(t,s,r)?AM(r):e.undoManager.transact((()=>{const i=n.getSel();let{anchorNode:s,anchorOffset:a,focusNode:l,focusOffset:c}=null!=i?i:{};const d=()=>{_(s)&&_(a)&&_(l)&&_(c)&&(null==i||i.setBaseAndExtent(s,a,l,c))},u=(e,t)=>{q(e.childNodes,(e=>{Em(e)&&t.appendChild(e)}))},h=e.dom.create("span",{"data-mce-bogus":"1"});u(r,h),r.appendChild(h),d(),"word"!==o&&"line"!==o||null==i||i.modify("extend",t?"right":"left",o),!n.isCollapsed()&&MM(n.getRng(),h)?AM(r):(e.execCommand(t?"ForwardDelete":"Delete"),s=null==i?void 0:i.anchorNode,a=null==i?void 0:i.anchorOffset,l=null==i?void 0:i.focusNode,c=null==i?void 0:i.focusOffset,u(h,r),d()),e.dom.remove(h)})),!0)},jM=(e,t,o)=>FM(e,t,o)||OM&&HM(e,t,o)?F.some(E):F.none(),VM=e=>(t,o,n={})=>{const r=t.getBody(),i={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:r,currentTarget:r,eventPhase:Event.AT_TARGET,originalTarget:r,explicitOriginalTarget:r,isTrusted:!1,srcElement:r,cancelable:!1,preventDefault:E,inputType:o},s=Js(new InputEvent(e));return t.dispatch(e,{...s,...i,...n})},UM=VM("input"),ZM=VM("beforeinput"),$M=Gt(),WM=$M.os,qM=WM.isMacOS()||WM.isiOS(),GM=$M.browser.isFirefox(),YM=(e,t)=>{let o=!1;e.on("keydown",(n=>{o=n.keyCode===Xp.BACKSPACE,n.isDefaultPrevented()||((e,t,o)=>{const n=o.keyCode===Xp.BACKSPACE?"deleteContentBackward":"deleteContentForward",r=e.selection.isCollapsed(),i=r?"character":"selection",s=e=>r?e?"word":"line":"selection";sO([{keyCode:Xp.BACKSPACE,action:rO(CT,e)},{keyCode:Xp.BACKSPACE,action:rO(wk,e,!1)},{keyCode:Xp.DELETE,action:rO(wk,e,!0)},{keyCode:Xp.BACKSPACE,action:rO(dk,e,!1)},{keyCode:Xp.DELETE,action:rO(dk,e,!0)},{keyCode:Xp.BACKSPACE,action:rO(eT,e,t,!1)},{keyCode:Xp.DELETE,action:rO(eT,e,t,!0)},{keyCode:Xp.BACKSPACE,action:rO(bv,e,!1)},{keyCode:Xp.DELETE,action:rO(bv,e,!0)},{keyCode:Xp.BACKSPACE,action:rO(jM,e,!1,i)},{keyCode:Xp.DELETE,action:rO(jM,e,!0,i)},...qM?[{keyCode:Xp.BACKSPACE,altKey:!0,action:rO(jM,e,!1,s(!0))},{keyCode:Xp.DELETE,altKey:!0,action:rO(jM,e,!0,s(!0))},{keyCode:Xp.BACKSPACE,metaKey:!0,action:rO(jM,e,!1,s(!1))}]:[{keyCode:Xp.BACKSPACE,ctrlKey:!0,action:rO(jM,e,!1,s(!0))},{keyCode:Xp.DELETE,ctrlKey:!0,action:rO(jM,e,!0,s(!0))}],{keyCode:Xp.BACKSPACE,action:rO(Tk,e,!1)},{keyCode:Xp.DELETE,action:rO(Tk,e,!0)},{keyCode:Xp.BACKSPACE,action:rO(fT,e,!1)},{keyCode:Xp.DELETE,action:rO(fT,e,!0)},{keyCode:Xp.BACKSPACE,action:rO(nk,e,!1)},{keyCode:Xp.DELETE,action:rO(nk,e,!0)},{keyCode:Xp.BACKSPACE,action:rO(QC,e,!1)},{keyCode:Xp.DELETE,action:rO(QC,e,!0)},{keyCode:Xp.BACKSPACE,action:rO(hT,e,!1)},{keyCode:Xp.DELETE,action:rO(hT,e,!0)},{keyCode:Xp.BACKSPACE,action:rO(Ek,e,!1)},{keyCode:Xp.DELETE,action:rO(Ek,e,!0)}],o).filter((t=>e.selection.isEditable())).each((t=>{o.preventDefault(),ZM(e,n).isDefaultPrevented()||(t(),UM(e,n))}))})(e,t,n)})),e.on("keyup",(t=>{t.isDefaultPrevented()||((e,t,o)=>{iO([{keyCode:Xp.BACKSPACE,action:rO(xk,e)},{keyCode:Xp.DELETE,action:rO(xk,e)},...qM?[{keyCode:Xp.BACKSPACE,altKey:!0,action:rO(pT,e)},{keyCode:Xp.DELETE,altKey:!0,action:rO(pT,e)},...o?[{keyCode:GM?224:91,action:rO(pT,e)}]:[]]:[{keyCode:Xp.BACKSPACE,ctrlKey:!0,action:rO(pT,e)},{keyCode:Xp.DELETE,ctrlKey:!0,action:rO(pT,e)}]],t)})(e,t,o),o=!1}))},KM=(e,t)=>{const o=e.dom,n=e.schema.getMoveCaretBeforeOnEnterElements();if(!t)return;if(/^(LI|DT|DD)$/.test(t.nodeName)){const e=(e=>{for(;e;){if(Kr(e)||ii(e)&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}return null})(t.firstChild);e&&/^(UL|OL|DL)$/.test(e.nodeName)&&t.insertBefore(o.doc.createTextNode(ct),t.firstChild)}const r=o.createRng();if(t.normalize(),t.hasChildNodes()){const e=new Ur(t,t);let o,i=t;for(;o=e.current();){if(ii(o)){r.setStart(o,0),r.setEnd(o,0);break}if(n[o.nodeName.toLowerCase()]){r.setStartBefore(o),r.setEndBefore(o);break}i=o,o=e.next()}o||(r.setStart(i,0),r.setEnd(i,0))}else ui(t)?t.nextSibling&&o.isBlock(t.nextSibling)?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));e.selection.setRng(r),Pg(e,r)},XM=(e,t)=>{const o=e.getRoot();let n,r=t;for(;r!==o&&r&&"false"!==e.getContentEditable(r);){if("true"===e.getContentEditable(r)){n=r;break}r=r.parentNode}return r!==o?n:o},JM=e=>F.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock)),QM=e=>{e.innerHTML='<br data-mce-bogus="1">'},eP=(e,t)=>{if(Wc(e).toLowerCase()===t.tagName.toLowerCase()){((e,t,o)=>{const n=e.dom;F.from(o.style).map(n.parseStyle).each((e=>{const o={...Fn(uo.fromDom(t)),...e};n.setStyles(t,o)}));const r=F.from(o.class).map((e=>e.split(/\s+/))),i=F.from(t.className).map((e=>K(e.split(/\s+/),(e=>""!==e))));Ve(r,i,((e,o)=>{const r=K(o,(t=>!Z(e,t))),i=[...e,...r];n.setAttrib(t,"class",i.join(" "))}));const s=["style","class"],a=_e(o,((e,t)=>!Z(s,t)));n.setAttribs(t,a)})(e,t,qc(e))}},tP=(e,t,o,n,r=!0,i,s)=>{const a=e.dom,l=e.schema,c=Wc(e),d=o?o.nodeName.toUpperCase():"";let u=t;const h=l.getTextInlineElements();let m;m=i||"TABLE"===d||"HR"===d?a.create(i||c,s||{}):o.cloneNode(!1);let p=m;if(r){do{if(h[u.nodeName]){if(Yh(u)||cm(u))continue;const e=u.cloneNode(!1);a.setAttrib(e,"id",""),m.hasChildNodes()?(e.appendChild(m.firstChild),m.appendChild(e)):(p=e,m.appendChild(e))}}while((u=u.parentNode)&&u!==n)}else a.setAttrib(m,"style",null),a.setAttrib(m,"class",null);return eP(e,m),QM(p),m},oP=(e,t,o)=>!t&&o.nodeName.toLowerCase()===Wc(e)&&e.dom.isEmpty(o)&&((e,t,o)=>{let n=t;for(;n&&n!==e&&v(n.nextSibling);){const e=n.parentElement;if(!e||!o(e))return wi(e);n=e}return!1})(e.getBody(),o,(t=>Ee(e.schema.getTextBlockElements(),t.nodeName.toLowerCase()))),nP=(e,t,o)=>{var n,r,i;const s=t(Wc(e)),a=((e,t)=>e.dom.getParent(t,wi))(e,o);a&&(e.dom.insertAfter(s,a),KM(e,s),(null!==(i=null===(r=null===(n=o.parentElement)||void 0===n?void 0:n.childNodes)||void 0===r?void 0:r.length)&&void 0!==i?i:0)>1&&e.dom.remove(o))},rP=(e,t)=>{const o=null==e?void 0:e.parentNode;return _(o)&&o.nodeName===t},iP=e=>_(e)&&/^(OL|UL|LI)$/.test(e.nodeName),sP=e=>_(e)&&/^(LI|DT|DD)$/.test(e.nodeName),aP=e=>{const t=e.parentNode;return sP(t)?t:e},lP=(e,t,o)=>{let n=e[o?"firstChild":"lastChild"];for(;n&&!Kr(n);)n=n[o?"nextSibling":"previousSibling"];return n===t},cP=e=>J(Se(Fn(uo.fromDom(e)),((e,t)=>`${t}: ${e};`)),((e,t)=>e+t),""),dP=(e,t,o,n,r)=>{const i=e.dom,s=e.selection.getRng(),a=o.parentNode;if(o===e.getBody()||!a)return;var l;iP(l=o)&&iP(l.parentNode)&&(r="LI");const c=sP(n)?cP(n):void 0;let d=sP(n)&&c?t(r,{style:cP(n)}):t(r);if(lP(o,n,!0)&&lP(o,n,!1))if(rP(o,"LI")){const e=aP(o);i.insertAfter(d,e),(e=>{var t;return(null===(t=e.parentNode)||void 0===t?void 0:t.firstChild)===e})(o)?i.remove(e):i.remove(o)}else i.replace(d,o);else if(lP(o,n,!0))rP(o,"LI")?(i.insertAfter(d,aP(o)),d.appendChild(i.doc.createTextNode(" ")),d.appendChild(o)):a.insertBefore(d,o),i.remove(n);else if(lP(o,n,!1))i.insertAfter(d,aP(o)),i.remove(n);else{o=aP(o);const e=s.cloneRange();e.setStartAfter(n),e.setEndAfter(o);const t=e.extractContents();if("LI"===r&&((e,t)=>e.firstChild&&e.firstChild.nodeName===t)(t,"LI")){const e=K(W(d.children,uo.fromDom),L(Mo("br")));d=t.firstChild,i.insertAfter(t,o),q(e,(e=>cn(uo.fromDom(d),e))),c&&d.setAttribute("style",c)}else i.insertAfter(t,o),i.insertAfter(d,o);i.remove(n)}KM(e,d)},uP=(e,t)=>t&&"A"===t.nodeName&&e.isEmpty(t),hP=(e,t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t,mP=(e,t)=>_(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.isEditable(t.parentNode)&&"false"!==e.getContentEditable(t),pP=(e,t,o)=>ii(t)?e?1===o&&t.data.charAt(o-1)===Ga?0:o:o===t.data.length-1&&t.data.charAt(o)===Ga?t.data.length:o:o,gP={insert:(e,t)=>{let o,n,r,i,s=!1;const a=e.dom,l=e.schema.getNonEmptyElements(),c=e.selection.getRng(),d=Wc(e),u=uo.fromDom(c.startContainer),h=Vo(u,c.startOffset),m=h.exists((e=>ko(e)&&!br(e))),g=c.collapsed&&m,f=(t,n)=>tP(e,o,C,S,Xc(e),t,n),b=e=>{const t=pP(e,o,n);if(ii(o)&&(e?t>0:t<o.data.length))return!1;if((o.parentNode===C||o===C)&&s&&!e)return!0;if(e&&Kr(o)&&o===C.firstChild)return!0;if(hP(o,"TABLE")||hP(o,"HR"))return((e,t)=>e.nodeName===t||e.nextSibling&&e.nextSibling.nodeName===t)(o,"BR")?!e:s&&!e||!s&&e;const r=new Ur(o,C);let i;for(ii(o)&&(e&&0===t?r.prev():e||t!==o.data.length||r.next());i=r.current();){if(Kr(i)){if(!i.getAttribute("data-mce-bogus")){const e=i.nodeName.toLowerCase();if(l[e]&&"br"!==e)return!1}}else if(ii(i)&&!$r(i.data))return!1;e?r.prev():r.next()}return!0},v=()=>{let t;return t=/^(H[1-6]|PRE|FIGURE)$/.test(r)&&"HGROUP"!==k?f(d):f(),((e,t)=>{const o=Jc(e);return!w(t)&&(p(o)?Z(lo.explode(o),t.nodeName.toLowerCase()):o)})(e,i)&&mP(a,i)&&a.isEmpty(C,void 0,{includeZwsp:!0})?t=a.split(i,C):a.insertAfter(t,C),KM(e,t),t};ug(a,c).each((e=>{c.setStart(e.startContainer,e.startOffset),c.setEnd(e.endContainer,e.endOffset)})),o=c.startContainer,n=c.startOffset;const y=!(!t||!t.shiftKey),x=!(!t||!t.ctrlKey);Kr(o)&&o.hasChildNodes()&&!g&&(s=n>o.childNodes.length-1,o=o.childNodes[Math.min(n,o.childNodes.length-1)]||o,n=s&&ii(o)?o.data.length:0);const S=XM(a,o);if(!S||((e,t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return null!==o&&"false"===e.dom.getContentEditableParent(o)})(e,o))return;y||(o=((e,t,o,n,r)=>{var i,s;const a=e.dom,l=null!==(i=XM(a,n))&&void 0!==i?i:a.getRoot();let c=a.getParent(n,a.isBlock);if(!c||!mP(a,c)){if(c=c||l,!c.hasChildNodes()){const n=a.create(t);return eP(e,n),c.appendChild(n),o.setStart(n,0),o.setEnd(n,0),n}let i,d=n;for(;d&&d.parentNode!==c;)d=d.parentNode;for(;d&&!a.isBlock(d);)i=d,d=d.previousSibling;const u=null===(s=null==i?void 0:i.parentElement)||void 0===s?void 0:s.nodeName;if(i&&u&&e.schema.isValidChild(u,t.toLowerCase())){const s=i.parentNode,l=a.create(t);for(eP(e,l),s.insertBefore(l,i),d=i;d&&!a.isBlock(d);){const e=d.nextSibling;l.appendChild(d),d=e}o.setStart(n,r),o.setEnd(n,r)}}return n})(e,d,c,o,n));let C=a.getParent(o,a.isBlock)||a.getRoot();i=_(null==C?void 0:C.parentNode)?a.getParent(C.parentNode,a.isBlock):null,r=C?C.nodeName.toUpperCase():"";const k=i?i.nodeName.toUpperCase():"";if("LI"===k&&!x){C=i,i=i.parentNode,r=k}if(Kr(i)&&oP(e,y,C))return nP(e,f,C);if(/^(LI|DT|DD)$/.test(r)&&Kr(i)&&a.isEmpty(C))return void dP(e,f,i,C,d);if(!(g||C!==e.getBody()&&mP(a,C)))return;const E=C.parentNode;let T;if(g)T=f(d),h.fold((()=>{dn(u,uo.fromDom(T))}),(e=>{an(e,uo.fromDom(T))})),e.selection.setCursorLocation(T,0);else if(Qa(C))T=al(C),a.isEmpty(C)&&QM(C),eP(e,T),KM(e,T);else if(b(!1))T=v();else if(b(!0)&&E){const t=Yl.fromRangeStart(c),o=Af(t),n=uo.fromDom(C),r=$f(n,t,e.schema)?Wf(n,t,e.schema).bind((e=>F.from(e.getNode()))):F.none();T=E.insertBefore(f(),C);const i=hP(C,"HR")||o?T:r.getOr(C);KM(e,i)}else{const t=(e=>{const t=e.cloneRange();return t.setStart(e.startContainer,pP(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,pP(!1,e.endContainer,e.endOffset)),t})(c).cloneRange();t.setEndAfter(C);const o=t.extractContents();(e=>{q(xr(uo.fromDom(e),To),(e=>{const t=e.dom;t.nodeValue=Ka(t.data)}))})(o),(e=>{let t=e;do{ii(t)&&(t.data=t.data.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)})(o),T=o.firstChild,a.insertAfter(o,C),((e,t,o)=>{var n;const r=[];if(!o)return;let i=o;for(;i=i.firstChild;){if(e.isBlock(i))return;Kr(i)&&!t[i.nodeName.toLowerCase()]&&r.push(i)}let s=r.length;for(;s--;)i=r[s],(!i.hasChildNodes()||i.firstChild===i.lastChild&&""===(null===(n=i.firstChild)||void 0===n?void 0:n.nodeValue)||uP(e,i))&&e.remove(i)})(a,l,T),((e,t)=>{t.normalize();const o=t.lastChild;(!o||Kr(o)&&/^(left|right)$/gi.test(e.getStyle(o,"float",!0)))&&e.add(t,"br")})(a,C),a.isEmpty(C)&&QM(C),T.normalize(),a.isEmpty(T)?(a.remove(T),v()):(eP(e,T),KM(e,T))}a.setAttrib(T,"id",""),e.dispatch("NewBlock",{newBlock:T})},fakeEventName:"insertParagraph"},fP=(e,t,o)=>{const n=e.dom.createRng();o?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),e.selection.setRng(n),Pg(e,n)},bP=(e,t)=>{const o=e.selection,n=e.dom,r=o.getRng();let i,s=!1;ug(n,r).each((e=>{r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset)}));let a=r.startOffset,l=r.startContainer;if(Kr(l)&&l.hasChildNodes()){const e=a>l.childNodes.length-1;l=l.childNodes[Math.min(a,l.childNodes.length-1)]||l,a=e&&ii(l)?l.data.length:0}let c=n.getParent(l,n.isBlock);const d=c&&c.parentNode?n.getParent(c.parentNode,n.isBlock):null,u=d?d.nodeName.toUpperCase():"",h=!(!t||!t.ctrlKey);"LI"!==u||h||(c=d),ii(l)&&a>=l.data.length&&(((e,t,o)=>{const n=new Ur(t,o);let r;const i=e.getNonEmptyElements();for(;r=n.next();)if(i[r.nodeName.toLowerCase()]||ii(r)&&r.length>0)return!0;return!1})(e.schema,l,c||n.getRoot())||(i=n.create("br"),r.insertNode(i),r.setStartAfter(i),r.setEndAfter(i),s=!0)),i=n.create("br"),Xl(n,r,i),fP(e,i,s),e.undoManager.add()},vP=(e,t)=>{const o=uo.fromTag("br");an(uo.fromDom(t),o),e.undoManager.add()},yP=(e,t)=>{xP(e.getBody(),t)||ln(uo.fromDom(t),uo.fromTag("br"));const o=uo.fromTag("br");ln(uo.fromDom(t),o),fP(e,o.dom,!1),e.undoManager.add()},xP=(e,t)=>{return o=Yl.after(t),!!ui(o.getNode())||Zh(e,Yl.after(t)).map((e=>ui(e.getNode()))).getOr(!1);var o},wP=e=>e&&"A"===e.nodeName&&"href"in e,_P=e=>e.fold(B,wP,wP,B),SP=(e,t)=>{t.fold(E,D(vP,e),D(yP,e),E)},CP={insert:(e,t)=>{const o=(e=>{const t=D(Eb,e),o=Yl.fromRangeStart(e.selection.getRng());return Gk(t,e.getBody(),o).filter(_P)})(e);o.isSome()?o.each(D(SP,e)):bP(e,t)},fakeEventName:"insertLineBreak"},kP=(e,t)=>JM(e).filter((e=>t.length>0&&bo(uo.fromDom(e),t))).isSome(),EP=Oe([{br:[]},{block:[]},{none:[]}]),TP=(e,t)=>(e=>kP(e,Kc(e)))(e),OP=e=>(t,o)=>(e=>JM(e).filter((e=>ja(uo.fromDom(e)))).isSome())(t)===e,AP=(e,t)=>(o,n)=>{const r=(e=>JM(e).fold(A(""),(e=>e.nodeName.toUpperCase())))(o)===e.toUpperCase();return r===t},MP=e=>{const t=XM(e.dom,e.selection.getStart());return w(t)},PP=e=>AP("pre",e),DP=e=>(t,o)=>$c(t)===e,LP=(e,t)=>(e=>kP(e,Yc(e)))(e),RP=(e,t)=>t,NP=e=>{const t=Wc(e),o=XM(e.dom,e.selection.getStart());return _(o)&&e.schema.isValidChild(o.nodeName,t)},IP=e=>{const t=e.selection.getRng(),o=uo.fromDom(t.startContainer),n=Vo(o,t.startOffset).map((e=>ko(e)&&!br(e)));return t.collapsed&&n.getOr(!0)},BP=(e,t)=>(o,n)=>J(e,((e,t)=>e&&t(o,n)),!0)?F.some(t):F.none(),zP=(e,t,o)=>{if(!t.mode.isReadOnly()){if(t.selection.isCollapsed()||(e=>{e.execCommand("delete")})(t),_(o)){if(ZM(t,e.fakeEventName).isDefaultPrevented())return}e.insert(t,o),_(o)&&UM(t,e.fakeEventName)}},FP=(e,t)=>{if(e.mode.isReadOnly())return;const o=()=>zP(CP,e,t),n=()=>zP(gP,e,t),r=((e,t)=>zk([BP([TP],EP.none()),BP([PP(!0),MP],EP.none()),BP([AP("summary",!0)],EP.br()),BP([PP(!0),DP(!1),RP],EP.br()),BP([PP(!0),DP(!1)],EP.block()),BP([PP(!0),DP(!0),RP],EP.block()),BP([PP(!0),DP(!0)],EP.br()),BP([OP(!0),RP],EP.br()),BP([OP(!0)],EP.block()),BP([LP],EP.br()),BP([RP],EP.br()),BP([NP],EP.block()),BP([IP],EP.block())],[e,!(!t||!t.shiftKey)]).getOr(EP.none()))(e,t);switch(Gc(e)){case"linebreak":r.fold(o,o,E);break;case"block":r.fold(n,n,E);break;case"invert":r.fold(n,o,E);break;default:r.fold(o,n,E)}},HP=Gt(),jP=HP.os.isiOS()&&HP.browser.isSafari(),VP=(e,t)=>{var o;t.isDefaultPrevented()||(t.preventDefault(),(o=e.undoManager).typing&&(o.typing=!1,o.add()),e.undoManager.transact((()=>{FP(e,t)})))},UP=e=>{let t=F.none();e.on("keydown",(o=>{o.keyCode===Xp.ENTER&&(jP&&(e=>{if(!e.collapsed)return!1;const t=e.startContainer;if(ii(t)){const o=/^[\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]$/,n=t.data.charAt(e.startOffset-1);return o.test(n)}return!1})(e.selection.getRng())?(e=>{t=F.some(e.selection.getBookmark()),e.undoManager.add()})(e):VP(e,o))})),e.on("keyup",(o=>{o.keyCode===Xp.ENTER&&t.each((()=>((e,o)=>{e.undoManager.undo(),t.fold(E,(t=>e.selection.moveToBookmark(t))),VP(e,o),t=F.none()})(e,o)))}))},ZP=(e,t)=>{e.on("keydown",(o=>{o.isDefaultPrevented()||((e,t,o)=>{const n=ro.os.isMacOS()||ro.os.isiOS();iO([{keyCode:Xp.END,action:rO(qT,e,!0)},{keyCode:Xp.HOME,action:rO(qT,e,!1)},...n?[]:[{keyCode:Xp.HOME,action:rO(GT,e,!1),ctrlKey:!0,shiftKey:!0},{keyCode:Xp.END,action:rO(GT,e,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:Xp.END,action:rO(cO,e,!0)},{keyCode:Xp.HOME,action:rO(cO,e,!1)},{keyCode:Xp.END,action:rO(KE,e,!0,t)},{keyCode:Xp.HOME,action:rO(KE,e,!1,t)}],o).each((e=>{o.preventDefault()}))})(e,t,o)}))},$P=e=>{e.on("input",(t=>{t.isComposing||(e=>{const t=uo.fromDom(e.getBody());e.selection.isCollapsed()&&db(t,Yl.fromRangeStart(e.selection.getRng()),e.schema).each((t=>{e.selection.setRng(t.toRange())}))})(e)}))},WP=Gt(),qP=e=>e.stopImmediatePropagation(),GP=e=>e.keyCode===Xp.PAGE_UP||e.keyCode===Xp.PAGE_DOWN,YP=(e,t,o)=>{o&&!e.get()?t.on("NodeChange",qP,!0):!o&&e.get()&&t.off("NodeChange",qP),e.set(o)},KP=(e,t)=>{if(WP.os.isMacOS())return;const o=Ae(!1);e.on("keydown",(t=>{GP(t)&&YP(o,e,!0)})),e.on("keyup",(n=>{n.isDefaultPrevented()||((e,t,o)=>{iO([{keyCode:Xp.PAGE_UP,action:rO(KE,e,!1,t)},{keyCode:Xp.PAGE_DOWN,action:rO(KE,e,!0,t)}],o)})(e,t,n),GP(n)&&o.get()&&(YP(o,e,!1),e.nodeChanged())}))},XP=(e,t)=>e===t||e.contains(t),JP=e=>{e.on("beforeinput",(t=>{e.selection.isEditable()&&!$(t.getTargetRanges(),(t=>!((e,t)=>!XP(e.getBody(),t.startContainer)||!XP(e.getBody(),t.endContainer)||Dg(e.dom,t))(e,t)))||t.preventDefault()}))},QP=(e,t)=>{const o=t.container(),n=t.offset();return ii(o)?(o.insertData(n,e),F.some(Yl(o,n+e.length))):_h(t).map((o=>{const n=uo.fromText(e);return t.isAtEnd()?ln(o,n):an(o,n),Yl(n.dom,e.length)}))},eD=D(QP,ct),tD=D(QP," "),oD=e=>t=>{e.selection.setRng(t.toRange()),e.nodeChanged()},nD=e=>{const t=Yl.fromRangeStart(e.selection.getRng()),o=uo.fromDom(e.getBody());if(e.selection.isCollapsed()){const n=D(Eb,e),r=Yl.fromRangeStart(e.selection.getRng());return Gk(n,e.getBody(),r).bind((e=>t=>t.fold((t=>$h(e.dom,Yl.before(t))),(e=>Wh(e)),(e=>qh(e)),(t=>Zh(e.dom,Yl.after(t)))))(o)).map((n=>()=>((e,t,o)=>n=>tb(e,n,o)?eD(t):tD(t))(o,t,e.schema)(n).each(oD(e))))}return F.none()},rD=e=>{return Ue(ro.browser.isFirefox()&&e.selection.isEditable()&&(t=e.dom,o=e.selection.getRng().startContainer,t.isEditable(t.getParent(o,"summary"))),(()=>{const t=uo.fromDom(e.getBody());e.selection.isCollapsed()||e.getDoc().execCommand("Delete");((e,t,o)=>tb(e,t,o)?eD(t):tD(t))(t,Yl.fromRangeStart(e.selection.getRng()),e.schema).each(oD(e))}));var t,o},iD=e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e,t)=>{sO([{keyCode:Xp.SPACEBAR,action:rO(nD,e)},{keyCode:Xp.SPACEBAR,action:rO(rD,e)}],t).each((o=>{t.preventDefault(),ZM(e,"insertText",{data:" "}).isDefaultPrevented()||(o(),UM(e,"insertText",{data:" "}))}))})(e,t)}))},sD=e=>ku(e)?[{keyCode:Xp.TAB,action:rO(aA,e,!0)},{keyCode:Xp.TAB,shiftKey:!0,action:rO(aA,e,!1)}]:[],aD=e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e,t)=>{iO([...sD(e)],t).each((e=>{t.preventDefault()}))})(e,t)}))},lD=e=>{if(e.addShortcut("Meta+P","","mcePrint"),TM(e),X_(e))return Ae(null);{const t=qE(e);return JP(e),(e=>{e.on("keyup compositionstart",D(HT,e))})(e),lA(e,t),YM(e,t),UP(e),iD(e),$P(e),aD(e),ZP(e,t),KP(e,t),t}};class cD{constructor(e){let t;this.lastPath=[],this.editor=e;const o=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",(o=>{const n=e.selection.getRng(),r={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset};"nodechange"!==o.type&&rg(r,t)||e.dispatch("SelectionChange"),t=r})),e.on("contextmenu",(()=>{Op(e),e.dispatch("SelectionChange")})),e.on("SelectionChange",(()=>{const t=e.selection.getStart(!0);t&&Sm(e)&&!o.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})})),e.on("mouseup",(t=>{!t.isDefaultPrevented()&&Sm(e)&&("IMG"===e.selection.getNode().nodeName?Pp.setEditorTimeout(e,(()=>{e.nodeChanged()})):e.nodeChanged())}))}nodeChanged(e={}){const t=this.editor,o=t.selection;let n;if(t.initialized&&o&&!Hd(t)&&!Lu(t)){const r=t.getBody();n=o.getStart(!0)||r,n.ownerDocument===t.getDoc()&&t.dom.isChildOf(n,r)||(n=r);const i=[];t.dom.getParent(n,(e=>e===r||(i.push(e),!1))),t.dispatch("NodeChange",{...e,element:n,parents:i})}}isSameElementPath(e){let t;const o=this.editor,n=ie(o.dom.getParents(e,z,o.getBody()));if(n.length===this.lastPath.length){for(t=n.length;t>=0&&n[t]===this.lastPath[t];t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1}}const dD="x-tinymce/html",uD=A(dD),hD="\x3c!-- "+dD+" --\x3e",mD=e=>hD+e,pD=e=>-1!==e.indexOf(hD),gD=(e,t,o)=>{const n=e.split(/\n\n/),r=((e,t)=>{let o="<"+e;const n=Se(t,((e,t)=>t+'="'+xs.encodeAllRaw(e)+'"'));return n.length&&(o+=" "+n.join(" ")),o+">"})(t,o),i="</"+t+">",s=W(n,(e=>e.split(/\n/).join("<br />")));return 1===s.length?s[0]:W(s,(e=>r+e+i)).join("")},fD="%MCEPASTEBIN%",bD=e=>e.dom.get("mcepastebin"),vD=e=>_(e)&&"mcepastebin"===e.id,yD=e=>e===fD,xD=e=>{const t=Ae(null);return{create:()=>((e,t)=>{const{dom:o,selection:n}=e,r=e.getBody();t.set(n.getRng());const i=o.add(e.getBody(),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},fD);ro.browser.isFirefox()&&o.setStyle(i,"left","rtl"===o.getStyle(r,"direction",!0)?65535:-65535),o.bind(i,"beforedeactivate focusin focusout",(e=>{e.stopPropagation()})),i.focus(),n.select(i,!0)})(e,t),remove:()=>((e,t)=>{const o=e.dom;if(bD(e)){let n;const r=t.get();for(;n=bD(e);)o.remove(n),o.unbind(n);r&&e.selection.setRng(r)}t.set(null)})(e,t),getEl:()=>bD(e),getHtml:()=>(e=>{const t=e.dom,o=(e,o)=>{e.appendChild(o),t.remove(o,!0)},[n,...r]=K(e.getBody().childNodes,vD);q(r,(e=>{o(n,e)}));const i=t.select("div[id=mcepastebin]",n);for(let e=i.length-1;e>=0;e--){const r=t.create("div");n.insertBefore(r,i[e]),o(r,i[e])}return n?n.innerHTML:""})(e),getLastRng:t.get}},wD=(e,t)=>(lo.each(t,(t=>{e=m(t,RegExp)?e.replace(t,""):e.replace(t[0],t[1])})),e),_D=e=>e=wD(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,(e,t,o)=>t||o?ct:" "],/<br class="Apple-interchange-newline">/g,/<br>$/i]),SD=(e,t)=>({content:e,cancelled:t}),CD=(e,t,o)=>{const n=((e,t,o)=>e.dispatch("PastePreProcess",{content:t,internal:o}))(e,t,o),r=((e,t)=>{const o=u_({sanitize:_u(e),sandbox_iframes:Ou(e),sandbox_iframes_exclusions:Au(e),convert_unsafe_embeds:Mu(e)},e.schema);o.addNodeFilter("meta",(e=>{lo.each(e,(e=>{e.remove()}))}));const n=o.parse(t,{forced_root_block:!1,isRootContent:!0});return cf({validate:!0},e.schema).serialize(n)})(e,n.content);return e.hasEventListeners("PastePostProcess")&&!n.isDefaultPrevented()?((e,t,o)=>{const n=e.dom.create("div",{style:"display:none"},t),r=((e,t,o)=>e.dispatch("PastePostProcess",{node:t,internal:o}))(e,n,o);return SD(r.node.innerHTML,r.isDefaultPrevented())})(e,r,o):SD(r,n.isDefaultPrevented())},kD=(e,t)=>(e.insertContent(t,{merge:du(e),paste:!0}),!0),ED=e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),TD=(e,t,o)=>!(e.selection.isCollapsed()||!ED(t))&&((e,t,o)=>(e.undoManager.extra((()=>{o(e,t)}),(()=>{e.execCommand("mceInsertLink",!1,t)})),!0))(e,t,o),OD=(e,t,o)=>!!((e,t)=>ED(t)&&$(Cu(e),(e=>Xe(t.toLowerCase(),`.${e.toLowerCase()}`))))(e,t)&&((e,t,o)=>(e.undoManager.extra((()=>{o(e,t)}),(()=>{e.insertContent('<img src="'+t+'">')})),!0))(e,t,o),AD=(e,t,o)=>{o||!uu(e)?kD(e,t):((e,t)=>{lo.each([TD,OD,kD],(o=>!o(e,t,kD)))})(e,t)},MD=(e=>{let t=0;return()=>e+t++})("mceclip"),PD=e=>{const t=BO();return FO(t,e),MO(t),t},DD=(e,t,o,n,r)=>{const i=((e,t,o)=>CD(e,t,o))(e,t,o);if(!i.cancelled){const t=i.content,o=()=>AD(e,t,n);if(r){ZM(e,"insertFromPaste",{dataTransfer:PD(t)}).isDefaultPrevented()||(o(),UM(e,"insertFromPaste"))}else o()}},LD=(e,t,o,n)=>{const r=o||pD(t);DD(e,(e=>e.replace(hD,""))(t),r,!1,n)},RD=(e,t,o)=>{const n=e.dom.encode(t).replace(/\r\n/g,"\n"),r=qr(n,mu(e)),i=gD(r,Wc(e),qc(e));DD(e,i,!1,!0,o)},ND=e=>{const t={};if(e&&e.types)for(let o=0;o<e.types.length;o++){const n=e.types[o];try{t[n]=e.getData(n)}catch(e){t[n]=""}}return t},ID=(e,t)=>t in e&&e[t].length>0,BD=e=>ID(e,"text/html")||ID(e,"text/plain"),zD=(e,t,o,n)=>{const r=MD(),i=ed(e)&&_(o.name),s=i?((e,t)=>{const o=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return _(o)?e.dom.encode(o[1]):void 0})(e,o.name):r,a=i?o.name:void 0,l=t.create(r,o,n,s,a);return t.add(l),l},FD=e=>{const t=Cu(e);return e=>Ke(e.type,"image/")&&$(t,(t=>(e=>{const t=e.toLowerCase(),o={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return lo.hasOwn(o,t)?"image/"+o[t]:"image/"+t})(t)===e.type))},HD=(e,t,o)=>{const n=(e=>"paste"===e.type)(t)?t.clipboardData:t.dataTransfer;if(ru(e)&&n){const i=((e,t)=>{const o=t.items?ne(he(t.items),(e=>"file"===e.kind?[e.getAsFile()]:[])):[],n=t.files?he(t.files):[];return K(o.length>0?o:n,FD(e))})(e,n);if(i.length>0)return t.preventDefault(),(r=i,Promise.all(W(r,(e=>Ex(e).then((t=>({file:e,uri:t}))))))).then((t=>{o&&e.selection.setRng(o),q(t,(t=>{((e,t)=>{Sx(t.uri).each((({data:o,type:n,base64Encoded:r})=>{const i=r?o:btoa(o),s=t.file,a=e.editorUpload.blobCache,l=a.getByData(i,n),c=null!=l?l:zD(e,a,s,i);LD(e,`<img src="${c.blobUri()}">`,!1,!0)}))})(e,t)}))})),!0}var r;return!1},jD=(e,t,o,n,r)=>{let i=_D(o);const s=ID(t,uD())||pD(o),a=!s&&(e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e))(i),l=ED(i);(yD(i)||!i.length||a&&!l)&&(n=!0),(n||l)&&(i=ID(t,"text/plain")&&a?t["text/plain"]:(e=>{const t=Fs(),o=u_({},t);let n="";const r=t.getVoidElements(),i=lo.makeMap("script noscript style textarea video audio iframe object"," "),s=t.getBlockElements(),a=e=>{const o=e.name,l=e;if("br"!==o){if("wbr"!==o)if(r[o]&&(n+=" "),i[o])n+=" ";else{if(3===e.type&&(n+=e.value),!(e.name in t.getVoidElements())){let t=e.firstChild;if(t)do{a(t)}while(t=t.next)}s[o]&&l.next&&(n+="\n","p"===o&&(n+="\n"))}}else n+="\n"};return e=wD(e,[/<!\[[^\]]+\]>/g]),a(o.parse(e)),n})(i)),yD(i)||(n?RD(e,i,r):LD(e,i,s,r))},VD=(e,t,o)=>{let n;e.on("keydown",(e=>{(e=>Xp.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode)(e)&&!e.isDefaultPrevented()&&(n=e.shiftKey&&86===e.keyCode)})),e.on("paste",(r=>{if(r.isDefaultPrevented()||(e=>{var t,o;return ro.os.isAndroid()&&0===(null===(o=null===(t=e.clipboardData)||void 0===t?void 0:t.items)||void 0===o?void 0:o.length)})(r))return;const i="text"===o.get()||n;n=!1;const s=ND(r.clipboardData);!BD(s)&&HD(e,r,t.getLastRng()||e.selection.getRng())||(ID(s,"text/html")?(r.preventDefault(),jD(e,s,s["text/html"],i,!0)):ID(s,"text/plain")&&ID(s,"text/uri-list")?(r.preventDefault(),jD(e,s,s["text/plain"],i,!0)):(t.create(),Pp.setEditorTimeout(e,(()=>{const o=t.getHtml();t.remove(),jD(e,s,o,i,!1)}),0)))}))},UD=(e,t,o)=>{VD(e,t,o),(e=>{const t=e=>Ke(e,"webkit-fake-url"),o=e=>Ke(e,"data:");e.parser.addNodeFilter("img",((n,r,i)=>{if(!ru(e)&&(e=>{var t;return!0===(null===(t=e.data)||void 0===t?void 0:t.paste)})(i))for(const r of n){const n=r.attr("src");p(n)&&!r.attr("data-mce-object")&&n!==ro.transparentSrc&&(t(n)||!pu(e)&&o(n))&&r.remove()}}))})(e)},ZD=(e,t)=>{e.addCommand("mceTogglePlainTextPaste",(()=>{((e,t)=>{"text"===t.get()?(t.set("html"),Pc(e,!1)):(t.set("text"),Pc(e,!0)),e.focus()})(e,t)})),e.addCommand("mceInsertClipboardContent",((t,o)=>{o.html&&LD(e,o.html,o.internal,!1),o.text&&RD(e,o.text,!1)}))},$D=(e,t,o,n)=>{((e,t,o)=>{if(!e)return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",o),e.setData(uD(),t),!0}catch(e){return!1}})(e.clipboardData,t.html,t.text)?(e.preventDefault(),n()):o(t.html,n)},WD=e=>(t,o)=>{const{dom:n,selection:r}=e,i=n.create("div",{contenteditable:"false","data-mce-bogus":"all"}),s=n.create("div",{contenteditable:"true"},t);n.setStyles(i,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),i.appendChild(s),n.add(e.getBody(),i);const a=r.getRng();s.focus();const l=n.createRng();l.selectNodeContents(s),r.setRng(l),Pp.setEditorTimeout(e,(()=>{r.setRng(a),n.remove(i),o()}),0)},qD=e=>({html:mD(e.selection.getContent({contextual:!0})),text:e.selection.getContent({format:"text"})}),GD=e=>!e.selection.isCollapsed()||(e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody()))(e),YD=e=>{e.on("cut",(e=>t=>{!t.isDefaultPrevented()&&GD(e)&&e.selection.isEditable()&&$D(t,qD(e),WD(e),(()=>{if(ro.browser.isChromium()||ro.browser.isFirefox()){const t=e.selection.getRng();Pp.setEditorTimeout(e,(()=>{e.selection.setRng(t),e.execCommand("Delete")}),0)}else e.execCommand("Delete")}))})(e)),e.on("copy",(e=>t=>{!t.isDefaultPrevented()&&GD(e)&&$D(t,qD(e),WD(e),E)})(e))},KD=(e,t)=>{var o,n;return pg.getCaretRangeFromPoint(null!==(o=t.clientX)&&void 0!==o?o:0,null!==(n=t.clientY)&&void 0!==n?n:0,e.getDoc())},XD=(e,t)=>{e.focus(),t&&e.selection.setRng(t)},JD=(e,t)=>{nu(e)&&e.on("dragend dragover draggesture dragdrop drop drag",(e=>{e.preventDefault(),e.stopPropagation()})),ru(e)||e.on("drop",(e=>{const t=e.dataTransfer;t&&(e=>$(e.files,(e=>/^image\//.test(e.type))))(t)&&e.preventDefault()})),e.on("drop",(o=>{if(o.isDefaultPrevented())return;const n=KD(e,o);if(w(n))return;const r=ND(o.dataTransfer),i=ID(r,uD());if((!BD(r)||(e=>{const t=e["text/plain"];return!!t&&0===t.indexOf("file://")})(r))&&HD(e,o,n))return;const s=r[uD()],a=s||r["text/html"]||r["text/plain"],l=((e,t,o,n)=>{const r=e.getParent(o,(e=>Gi(t,e)));if(!v(e.getParent(o,"summary")))return!0;if(r&&Ee(n,"text/html")){const e=(new DOMParser).parseFromString(n["text/html"],"text/html").body;return!v(e.querySelector(r.nodeName.toLowerCase()))}return!1})(e.dom,e.schema,n.startContainer,r),c=t.get();c&&!l||a&&(o.preventDefault(),Pp.setEditorTimeout(e,(()=>{e.undoManager.transact((()=>{(s||c&&l)&&e.execCommand("Delete"),XD(e,n);const t=_D(a);r["text/html"]?LD(e,t,i,!0):RD(e,t,!0)}))})))})),e.on("dragstart",(e=>{t.set(!0)})),e.on("dragover dragend",(o=>{ru(e)&&!t.get()&&(o.preventDefault(),XD(e,KD(e,o))),"dragend"===o.type&&t.set(!1)})),(e=>{e.on("input",(t=>{const o=e=>v(e.querySelector("summary"));if("deleteByDrag"===t.inputType){const t=K(e.dom.select("details"),o);q(t,(t=>{ui(t.firstChild)&&t.firstChild.remove();const o=e.dom.create("summary");o.appendChild(Wa().dom),t.prepend(o)}))}}))})(e)},QD=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,eL=e=>lo.trim(e).replace(QD,Gs).toLowerCase(),tL=(e,t,o)=>{const n=lu(e);if(o||"all"===n||!cu(e))return t;const r=n?n.split(/[, ]/):[];if(r&&"none"!==n){const o=e.dom,n=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,((e,t,i,s)=>{const a=o.parseStyle(o.decode(i)),l={};for(let e=0;e<r.length;e++){const t=a[r[e]];let i=t,s=o.getStyle(n,r[e],!0);/color/.test(r[e])&&(i=eL(i),s=eL(s)),s!==i&&(l[r[e]]=t)}const c=o.serializeStyle(l,"span");return c?t+' style="'+c+'"'+s:t+s}))}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,((e,t,o,n)=>t+' style="'+o+'"'+n)),t},oL=e=>{const t=Ae(!1),o=Ae(hu(e)?"text":"html"),n=xD(e);(e=>{(ro.browser.isChromium()||ro.browser.isSafari())&&((e,t)=>{e.on("PastePreProcess",(o=>{o.content=t(e,o.content,o.internal)}))})(e,tL)})(e),ZD(e,o),(e=>{const t=t=>o=>{t(e,o)},o=iu(e);S(o)&&e.on("PastePreProcess",t(o));const n=su(e);S(n)&&e.on("PastePostProcess",t(n))})(e),e.addQueryStateHandler("mceTogglePlainTextPaste",(()=>"text"===o.get())),e.on("PreInit",(()=>{YD(e),JD(e,t),UD(e,n,o)}))},nL=e=>{(e=>{e.on("click",(t=>{e.dom.getParent(t.target,"details")&&t.preventDefault()}))})(e),(e=>{e.parser.addNodeFilter("details",(t=>{const o=Eu(e);q(t,(e=>{"expanded"===o?e.attr("open","open"):"collapsed"===o&&e.attr("open",null)}))})),e.serializer.addNodeFilter("details",(t=>{const o=Tu(e);q(t,(e=>{"expanded"===o?e.attr("open","open"):"collapsed"===o&&e.attr("open",null)}))}))})(e)},rL=ui,iL=ii,sL=e=>gi(e.dom),aL=e=>t=>yo(uo.fromDom(e),t),lL=(e,t,o)=>or(uo.fromDom(e),(e=>(e=>pi(e.dom))(e)||o.isBlock(_o(e))),aL(t)).getOr(uo.fromDom(t)).dom,cL=(e,t)=>or(uo.fromDom(e),sL,aL(t)),dL=(e,t,o)=>{const n=new Ur(e,t),r=o?n.next.bind(n):n.prev.bind(n);let i=e;for(let t=o?e:r();t&&!rL(t);t=r())Ol(t)&&(i=t);return i},uL=e=>{const t=((e,t,o)=>{const n=Yl.fromRangeStart(e).getNode(),r=lL(n,t,o),i=dL(n,r,!1),s=dL(n,r,!0),a=document.createRange();return cL(i,r).fold((()=>{iL(i)?a.setStart(i,0):a.setStartBefore(i)}),(e=>a.setStartBefore(e.dom))),cL(s,r).fold((()=>{iL(s)?a.setEnd(s,s.data.length):a.setEndAfter(s)}),(e=>a.setEndAfter(e.dom))),a})(e.selection.getRng(),e.getBody(),e.schema);e.selection.setRng(Rv(t))};var hL;!function(e){e.Before="before",e.After="after"}(hL||(hL={}));const mL=(e,t)=>Math.abs(e.left-t),pL=(e,t)=>Math.abs(e.right-t),gL=(e,t)=>{const o=((e,t)=>Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top)))(e,t)/Math.min(e.height,t.height);return((e,t)=>e.top<t.bottom&&e.bottom>t.top)(e,t)&&o>.5},fL=(e,t)=>(e=>J(e,((e,t)=>e.fold((()=>F.some(t)),(e=>{const o=Math.min(t.left,e.left),n=Math.min(t.top,e.top),r=Math.max(t.right,e.right),i=Math.max(t.bottom,e.bottom);return F.some({top:n,right:r,bottom:i,left:o,width:r-o,height:i-n})}))),F.none()))(K(e,(e=>{return(o=t)>=(n=e).top&&o<=n.bottom;var o,n}))).fold((()=>[[],e]),(t=>{const{pass:o,fail:n}=Y(e,(e=>gL(e,t)));return[o,n]})),bL=(e,t,o)=>t>e.left&&t<e.right?0:Math.min(Math.abs(e.left-t),Math.abs(e.right-t)),vL=(e,t,o,n)=>{const r=e=>Ol(e.node)?F.some(e):Kr(e.node)?vL(he(e.node.childNodes),t,o,!1):F.none(),i=(e,i)=>{const s=le(e,((e,n)=>i(e,t,o)-i(n,t,o)));return me(s,r).map((e=>n&&!ii(e.node)&&s.length>1?((e,n,i)=>r(n).filter((n=>Math.abs(i(e,t,o)-i(n,t,o))<2&&ii(n.node))))(e,s[1],i).getOr(e):e))},[s,a]=fL(EE(e),o),{pass:l,fail:c}=Y(a,(e=>e.top<o));return i(s,bL).orThunk((()=>i(c,gl))).orThunk((()=>i(l,gl)))},yL=(e,t,o)=>{const n=uo.fromDom(e),r=Do(n),i=uo.fromPoint(r,t,o).filter((e=>xo(n,e))).getOr(n);return((e,t,o,n)=>{const r=(t,i)=>{const s=K(t.dom.childNodes,L((e=>Kr(e)&&e.classList.contains("mce-drag-container"))));return i.fold((()=>vL(s,o,n,!0)),(e=>{const t=K(s,(t=>t!==e.dom));return vL(t,o,n,!0)})).orThunk((()=>(yo(t,e)?F.none():No(t)).bind((e=>r(e,F.some(t))))))};return r(t,F.none())})(n,i,t,o)},xL=(e,t,o)=>yL(e,t,o).filter((e=>Xu(e.node))).map((e=>((e,t)=>({node:e.node,position:mL(e,t)<pL(e,t)?hL.Before:hL.After}))(e,t))),wL=e=>{var t,o;const n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.documentElement,s=r.defaultView;return{top:n.top+(null!==(t=null==s?void 0:s.scrollY)&&void 0!==t?t:0)-i.clientTop,left:n.left+(null!==(o=null==s?void 0:s.scrollX)&&void 0!==o?o:0)-i.clientLeft}},_L=(e,t)=>{return o=(e=>e.inline?wL(e.getBody()):{left:0,top:0})(e),n=(e=>{const t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}})(e),r=((e,t)=>{if(t.target.ownerDocument!==e.getDoc()){const o=wL(e.getContentAreaContainer()),n=(e=>{const t=e.getBody(),o=e.getDoc().documentElement,n={left:t.scrollLeft,top:t.scrollTop},r={left:t.scrollLeft||o.scrollLeft,top:t.scrollTop||o.scrollTop};return e.inline?n:r})(e);return{left:t.pageX-o.left+n.left,top:t.pageY-o.top+n.top}}return{left:t.pageX,top:t.pageY}})(e,t),{pageX:r.left-o.left+n.left,pageY:r.top-o.top+n.top};var o,n,r},SL=e=>({target:e,srcElement:e}),CL=(e,t,o,n)=>{const r=((e,t)=>{const o=zO(e);return"dragstart"===t?(wO(o),AO(o)):"drop"===t?(_O(o),MO(o)):(SO(o),PO(o)),o})(o,e);return x(n)?((e,t,o)=>{const n=R("Function not supported on simulated event.");return{bubbles:!0,cancelBubble:!1,cancelable:!0,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!0,returnValue:!1,timeStamp:0,type:e,composedPath:n,initEvent:n,preventDefault:E,stopImmediatePropagation:E,stopPropagation:E,AT_TARGET:window.Event.AT_TARGET,BUBBLING_PHASE:window.Event.BUBBLING_PHASE,CAPTURING_PHASE:window.Event.CAPTURING_PHASE,NONE:window.Event.NONE,altKey:!1,button:0,buttons:0,clientX:0,clientY:0,ctrlKey:!1,layerX:0,layerY:0,metaKey:!1,movementX:0,movementY:0,offsetX:0,offsetY:0,pageX:0,pageY:0,relatedTarget:null,screenX:0,screenY:0,shiftKey:!1,x:0,y:0,detail:0,view:null,which:0,initUIEvent:n,initMouseEvent:n,getModifierState:n,dataTransfer:o,...SL(t)}})(e,t,r):((e,t,o,n)=>({...t,dataTransfer:n,type:e,...SL(o)}))(e,n,t,r)},kL=gi,EL=((...e)=>t=>{for(let o=0;o<e.length;o++)if(e[o](t))return!0;return!1})(kL,pi),TL=(e,t,o,n)=>{const r=e.dom,i=t.cloneNode(!0);r.setStyles(i,{width:o,height:n}),r.setAttrib(i,"data-mce-selected",null);const s=r.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return r.setStyles(s,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:o,height:n}),r.setStyles(i,{margin:0,boxSizing:"border-box"}),s.appendChild(i),s},OL=(e,t)=>o=>()=>{const n="left"===e?o.scrollX:o.scrollY;o.scroll({[e]:n+t,behavior:"smooth"})},AL=OL("left",-32),ML=OL("left",32),PL=OL("top",-32),DL=OL("top",32),LL=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},RL=(e,t)=>o=>{if((e=>0===e.button)(o)){const n=ee(t.dom.getParents(o.target),EL).getOr(null);if(_(n)&&((e,t,o)=>kL(o)&&o!==t&&e.isEditable(o.parentElement))(t.dom,t.getBody(),n)){const r=t.dom.getPos(n),i=t.getBody(),s=t.getDoc().documentElement;e.set({element:n,dataTransfer:BO(),dragging:!1,screenX:o.screenX,screenY:o.screenY,maxX:(t.inline?i.scrollWidth:s.offsetWidth)-2,maxY:(t.inline?i.scrollHeight:s.offsetHeight)-2,relX:o.pageX-r.x,relY:o.pageY-r.y,width:n.offsetWidth,height:n.offsetHeight,ghost:TL(t,n,n.offsetWidth,n.offsetHeight),intervalId:$e(100)})}}},NL=(e,t,o,n,r)=>{"dragstart"===t&&FO(n,e.dom.getOuterHTML(o));const i=CL(t,o,n,r);return e.dispatch(t,i)},IL=(e,t)=>{const o=it(((e,o)=>((e,t,o)=>{e._selectionOverrides.hideFakeCaret(),xL(e.getBody(),t,o).fold((()=>e.selection.placeCaretAt(t,o)),(n=>{const r=e._selectionOverrides.showCaret(1,n.node,n.position===hL.Before,!1);r?e.selection.setRng(r):e.selection.placeCaretAt(t,o)}))})(t,e,o)),0);t.on("remove",o.cancel);const n=e;return r=>e.on((e=>{const i=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(!e.dragging&&i>10){const o=NL(t,"dragstart",e.element,e.dataTransfer,r);if(_(o.dataTransfer)&&(e.dataTransfer=o.dataTransfer),o.isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){const i=r.currentTarget===t.getDoc().documentElement,l=((e,t)=>({pageX:t.pageX-e.relX,pageY:t.pageY+5}))(e,_L(t,r));s=e.ghost,a=t.getBody(),s.parentNode!==a&&a.appendChild(s),((e,t,o,n,r,i,s,a,l,c,d,u)=>{let h=0,m=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+o>r&&(h=t.pageX+o-r),t.pageY+n>i&&(m=t.pageY+n-i),e.style.width=o-h+"px",e.style.height=n-m+"px";const p=l.clientHeight,g=l.clientWidth,f=s+l.getBoundingClientRect().top,b=a+l.getBoundingClientRect().left;d.on((e=>{e.intervalId.clear(),e.dragging&&u&&(s+8>=p?e.intervalId.set(DL(c)):s-8<=0?e.intervalId.set(PL(c)):a+8>=g?e.intervalId.set(ML(c)):a-8<=0?e.intervalId.set(AL(c)):f+16>=window.innerHeight?e.intervalId.set(DL(window)):f-16<=0?e.intervalId.set(PL(window)):b+16>=window.innerWidth?e.intervalId.set(ML(window)):b-16<=0&&e.intervalId.set(AL(window)))}))})(e.ghost,l,e.width,e.height,e.maxX,e.maxY,r.clientY,r.clientX,t.getContentAreaContainer(),t.getWin(),n,i),o.throttle(r.clientX,r.clientY)}var s,a}))},BL=(e,t)=>o=>{e.on((e=>{var n;if(e.intervalId.clear(),e.dragging){if(((e,t,o)=>!w(t)&&t!==o&&!e.dom.isChildOf(t,o)&&e.dom.isEditable(t))(t,(e=>{const t=e.getSel();if(_(t)){const e=t.getRangeAt(0).startContainer;return ii(e)?e.parentNode:e}return null})(t.selection),e.element)){const r=null!==(n=t.getDoc().elementFromPoint(o.clientX,o.clientY))&&void 0!==n?n:t.getBody();NL(t,"drop",r,e.dataTransfer,o).isDefaultPrevented()||t.undoManager.transact((()=>{((e,t)=>{const o=e.getParent(t.parentNode,e.isBlock);LL(t),o&&o!==e.getRoot()&&e.isEmpty(o)&&qa(uo.fromDom(o))})(t.dom,e.element),(e=>{const t=e.getData("text/html");return""===t?F.none():F.some(t)})(e.dataTransfer).each((e=>t.insertContent(e))),t._selectionOverrides.hideFakeCaret()}))}NL(t,"dragend",t.getBody(),e.dataTransfer,o)}})),FL(e)},zL=(e,t,o)=>{e.on((e=>{e.intervalId.clear(),e.dragging&&o.fold((()=>NL(t,"dragend",e.element,e.dataTransfer)),(o=>NL(t,"dragend",e.element,e.dataTransfer,o)))})),FL(e)},FL=e=>{e.on((e=>{e.intervalId.clear(),LL(e.ghost)})),e.clear()},HL=e=>{const t=We(),o=ga.DOM,n=document,r=RL(t,e),i=IL(t,e),s=BL(t,e),a=((e,t)=>o=>zL(e,t,F.some(o)))(t,e);e.on("mousedown",r),e.on("mousemove",i),e.on("mouseup",s),o.bind(n,"mousemove",i),o.bind(n,"mouseup",a),e.on("remove",(()=>{o.unbind(n,"mousemove",i),o.unbind(n,"mouseup",a)})),e.on("keydown",(o=>{o.keyCode===Xp.ESC&&zL(t,e,F.none())}))},jL=e=>{HL(e),Wd(e)&&(e=>{const t=t=>{if(!t.isDefaultPrevented()){const o=t.dataTransfer;o&&(Z(o.types,"Files")||o.files.length>0)&&(t.preventDefault(),"drop"===t.type&&YS(e,"Dropped file type is not supported"))}},o=o=>{Fp(e,o.target)&&t(o)},n=()=>{const n=ga.DOM,r=e.dom,i=document,s=e.inline?e.getBody():e.getDoc(),a=["drop","dragover"];q(a,(e=>{n.bind(i,e,o),r.bind(s,e,t)})),e.on("remove",(()=>{q(a,(e=>{n.unbind(i,e,o),r.unbind(s,e,t)}))}))};e.on("init",(()=>{Pp.setEditorTimeout(e,n,0)}))})(e)},VL=gi,UL=(e,t)=>vv(e.getBody(),t),ZL=e=>{const t=e.selection,o=e.dom,n=e.getBody(),r=Gu(e,n,o.isBlock,(()=>qp(e))),i="sel-"+o.uniqueId(),s="data-mce-selected";let a;const l=e=>e!==n&&(VL(e)||yi(e))&&o.isChildOf(e,n)&&o.isEditable(e.parentNode),c=(o,n,i,s=!0)=>e.dispatch("ShowCaret",{target:n,direction:o,before:i}).isDefaultPrevented()?null:(s&&t.scrollIntoView(n,-1===o),r.show(i,n)),d=()=>{e.on("click",(t=>{o.isEditable(t.target)||(t.preventDefault(),e.focus())})),e.on("blur NewBlock",f),e.on("ResizeWindow FullscreenStateChanged",r.reposition),e.on("tap",(t=>{const o=t.target,n=UL(e,o);VL(n)?(t.preventDefault(),ik(e,n).each(g)):l(o)&&ik(e,o).each(g)}),!0),e.on("mousedown",(r=>{const i=r.target;if(i!==n&&"HTML"!==i.nodeName&&!o.isChildOf(i,n))return;if(!VS(e,r.clientX,r.clientY))return;f(),b();const s=UL(e,i);VL(s)?(r.preventDefault(),ik(e,s).each(g)):xL(n,r.clientX,r.clientY).each((o=>{r.preventDefault();(e=>{e&&t.setRng(e)})(c(1,o.node,o.position===hL.Before,!1)),Xr(s)?s.focus():e.getBody().focus()}))})),e.on("keypress",(e=>{Xp.modifierPressed(e)||VL(t.getNode())&&e.preventDefault()})),e.on("GetSelectionRange",(e=>{let t=e.range;if(a){if(!a.parentNode)return void(a=null);t=t.cloneRange(),t.selectNode(a),e.range=t}})),e.on("focusin",(t=>{if(r.isShowing()&&e.getBody().contains(t.target)&&t.target!==e.getBody()&&!e.dom.isEditable(t.target.parentNode)){r.hide(),t.target.contains(e.selection.getNode())||(e.selection.select(t.target,!0),e.selection.collapse(!0));const o=g(e.selection.getRng(),!0);o&&e.selection.setRng(o)}})),e.on("SetSelectionRange",(e=>{e.range=m(e.range);const t=g(e.range,e.forward);t&&(e.range=t)}));e.on("AfterSetSelectionRange",(e=>{const t=e.range,n=t.startContainer.parentElement;var r;h(t)||Kr(r=n)&&"mcepastebin"===r.id||b(),(e=>_(e)&&o.hasClass(e,"mce-offscreen-selection"))(n)||f()})),jL(e),(e=>{const t=it((()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const t=e.selection.getRng();if(t.collapsed){const o=sk(e,t,!1);e.selection.setRng(o)}}}),0);e.on("focus",(()=>{t.throttle()})),e.on("blur",(()=>{t.cancel()}))})(e),(e=>{e.on("init",(()=>{e.on("focusin",(t=>{const o=t.target;if(yi(o)){const t=vv(e.getBody(),o),n=gi(t)?t:o;e.selection.getNode()!==n&&ik(e,n).each((t=>e.selection.setRng(t)))}}))}))})(e)},u=e=>tl(e)||il(e)||sl(e),h=e=>u(e.startContainer)||u(e.endContainer),m=t=>{const n=e.schema.getVoidElements(),r=o.createRng(),i=t.startContainer,s=t.startOffset,a=t.endContainer,l=t.endOffset;return Ee(n,i.nodeName.toLowerCase())?0===s?r.setStartBefore(i):r.setStartAfter(i):r.setStart(i,s),Ee(n,a.nodeName.toLowerCase())?0===l?r.setEndBefore(a):r.setEndAfter(a):r.setEnd(a,l),r},p=n=>{const r=n.cloneNode(!0),l=e.dispatch("ObjectSelected",{target:n,targetClone:r});if(l.isDefaultPrevented())return null;const c=((n,r)=>{const s=uo.fromDom(e.getBody()),a=e.getDoc(),l=sr(s,"#"+i).getOrThunk((()=>{const e=uo.fromHtml('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>',a);return pn(e,"id",i),dn(s,e),e})),c=o.createRng();wn(l),hn(l,[uo.fromText(ct,a),uo.fromDom(r),uo.fromText(ct,a)]),c.setStart(l.dom.firstChild,1),c.setEnd(l.dom.lastChild,0),Nn(l,{top:o.getPos(n,e.getBody()).y+"px"}),nn(l);const d=t.getSel();return d&&(d.removeAllRanges(),d.addRange(c)),c})(n,l.targetClone),d=uo.fromDom(n);return q(wr(uo.fromDom(e.getBody()),`*[${s}]`),(e=>{yo(d,e)||yn(e,s)})),o.getAttrib(n,s)||n.setAttribute(s,"1"),a=n,b(),c},g=(e,t)=>{if(!e)return null;if(e.collapsed){if(!h(e)){const r=t?1:-1,i=wh(r,n,e),s=i.getNode(!t);if(_(s)){if(Xu(s))return c(r,s,!!t&&!i.isAtEnd(),!1);if(el(s)&&gi(s.nextSibling)){const e=o.createRng();return e.setStart(s,0),e.setEnd(s,0),e}}const a=i.getNode(t);if(_(a)){if(Xu(a))return c(r,a,!t&&!i.isAtEnd(),!1);if(el(a)&&gi(a.previousSibling)){const e=o.createRng();return e.setStart(a,1),e.setEnd(a,1),e}}}return null}let r=e.startContainer,i=e.startOffset;const s=e.endOffset;if(ii(r)&&0===i&&VL(r.parentNode)&&(r=r.parentNode,i=o.nodeIndex(r),r=r.parentNode),!Kr(r))return null;if(s===i+1&&r===e.endContainer){const e=r.childNodes[i];if(l(e))return p(e)}return null},f=()=>{a&&a.removeAttribute(s),sr(uo.fromDom(e.getBody()),"#"+i).each(_n),a=null},b=()=>{r.hide()};return X_(e)||d(),{showCaret:c,showBlockCaretContainer:e=>{e.hasAttribute("data-mce-caret")&&(al(e),t.scrollIntoView(e))},hideFakeCaret:b,destroy:()=>{r.destroy(),a=null}}},$L=(e,t)=>{let o=t;for(let t=e.previousSibling;ii(t);t=t.previousSibling)o+=t.data.length;return o},WL=(e,t,o,n,r)=>{if(ii(o)&&(n<0||n>o.data.length))return[];const i=r&&ii(o)?[$L(o,n)]:[n];let s=o;for(;s!==t&&s.parentNode;)i.push(e.nodeIndex(s,r)),s=s.parentNode;return s===t?i.reverse():[]},qL=(e,t,o,n,r,i,s=!1)=>({start:WL(e,t,o,n,s),end:WL(e,t,r,i,s)}),GL=(e,t)=>{const o=t.slice(),n=o.pop();if(C(n)){return J(o,((e,t)=>e.bind((e=>F.from(e.childNodes[t])))),F.some(e)).bind((e=>ii(e)&&(n<0||n>e.data.length)?F.none():F.some({node:e,offset:n})))}return F.none()},YL=(e,t)=>GL(e,t.start).bind((({node:o,offset:n})=>GL(e,t.end).map((({node:e,offset:t})=>{const r=document.createRange();return r.setStart(o,n),r.setEnd(e,t),r})))),KL=(e,t,o)=>{if(t&&e.isEmpty(t)&&!o(t)){const n=t.parentNode;e.remove(t,ii(t.firstChild)&&$r(t.firstChild.data)),KL(e,n,o)}},XL=(e,t,o,n=!0)=>{const r=t.startContainer.parentNode,i=t.endContainer.parentNode;t.deleteContents(),n&&!o(t.startContainer)&&(ii(t.startContainer)&&0===t.startContainer.data.length&&e.remove(t.startContainer),ii(t.endContainer)&&0===t.endContainer.data.length&&e.remove(t.endContainer),KL(e,r,o),r!==i&&KL(e,i,o))},JL=(e,t)=>F.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),QL=(e,t,o)=>{const n=e.dynamicPatternsLookup({text:o,block:t});return{...e,blockPatterns:wc(n).concat(e.blockPatterns),inlinePatterns:_c(n).concat(e.inlinePatterns)}},eR=(e,t,o,n)=>{const r=e.createRng();return r.setStart(t,0),r.setEnd(o,n),r.toString()},tR=(e,t)=>e.create("span",{"data-mce-type":"bookmark",id:t}),oR=(e,t)=>{const o=e.createRng();return o.setStartAfter(t.start),o.setEndBefore(t.end),o},nR=(e,t,o)=>{const n=YL(e.getRoot(),o).getOrDie("Unable to resolve path range"),r=n.startContainer,i=n.endContainer,s=0===n.endOffset?i:i.splitText(n.endOffset),a=0===n.startOffset?r:r.splitText(n.startOffset),l=a.parentNode;return{prefix:t,end:s.parentNode.insertBefore(tR(e,t+"-end"),s),start:l.insertBefore(tR(e,t+"-start"),a)}},rR=(e,t,o)=>{KL(e,e.get(t.prefix+"-end"),o),KL(e,e.get(t.prefix+"-start"),o)},iR=e=>0===e.start.length,sR=(e,t,o,n)=>{const r=t.start;var i;return gA(e,n.container,n.offset,(i=r,(e,t)=>{const o=e.data.substring(0,t),n=o.lastIndexOf(i.charAt(i.length-1)),r=o.lastIndexOf(i);return-1!==r?r+i.length:-1!==n?n+1:-1}),o).bind((n=>{var i,s;const a=null!==(s=null===(i=o.textContent)||void 0===i?void 0:i.indexOf(r))&&void 0!==s?s:-1;if(-1!==a&&n.offset>=a+r.length){const t=e.createRng();return t.setStart(n.container,n.offset-r.length),t.setEnd(n.container,n.offset),F.some(t)}{const i=n.offset-r.length;return mA(n.container,i,o).map((t=>{const o=e.createRng();return o.setStart(t.container,t.offset),o.setEnd(n.container,n.offset),o})).filter((e=>e.toString()===r)).orThunk((()=>sR(e,t,o,cA(n.container,0))))}}))},aR=(e,t,o,n)=>{const r=e.dom,i=r.getRoot(),s=o.pattern,a=o.position.container,l=o.position.offset;return mA(a,l-o.pattern.end.length,t).bind((c=>{const d=qL(r,i,c.container,c.offset,a,l,n);if(iR(s))return F.some({matches:[{pattern:s,startRng:d,endRng:d}],position:c});{const a=lR(e,o.remainingPatterns,c.container,c.offset,t,n),l=a.getOr({matches:[],position:c}),u=l.position,h=((e,t,o,n,r,i=!1)=>{if(0===t.start.length&&!i){const t=e.createRng();return t.setStart(o,n),t.setEnd(o,n),F.some(t)}return hA(o,n,r).bind((o=>sR(e,t,r,o).bind((e=>{var t;if(i){if(e.endContainer===o.container&&e.endOffset===o.offset)return F.none();if(0===o.offset&&(null===(t=e.endContainer.textContent)||void 0===t?void 0:t.length)===e.endOffset)return F.none()}return F.some(e)}))))})(r,s,u.container,u.offset,t,a.isNone());return h.map((e=>{const t=((e,t,o,n=!1)=>qL(e,t,o.startContainer,o.startOffset,o.endContainer,o.endOffset,n))(r,i,e,n);return{matches:l.matches.concat([{pattern:s,startRng:t,endRng:d}]),position:cA(e.startContainer,e.startOffset)}}))}}))},lR=(e,t,o,n,r,i)=>{const s=e.dom;return hA(o,n,s.getRoot()).bind((a=>{const l=eR(s,r,o,n);for(let s=0;s<t.length;s++){const c=t[s];if(!Xe(l,c.end))continue;const d=t.slice();d.splice(s,1);const u=aR(e,r,{pattern:c,remainingPatterns:d,position:a},i);if(u.isNone()&&n>0)return lR(e,t,o,n-1,r,i);if(u.isSome())return u}return F.none()}))},cR=(e,t,o)=>{e.selection.setRng(o),"inline-format"===t.type?q(t.format,(t=>{e.formatter.apply(t)})):e.execCommand(t.cmd,!1,t.value)},dR=(e,t,o,n,r,i)=>{var s;return((e,t)=>{const o=re(e,(e=>$(t,(t=>e.pattern.start===t.pattern.start&&e.pattern.end===t.pattern.end))));return e.length===t.length?o?e:t:e.length>t.length?e:t})(lR(e,r.inlinePatterns,o,n,t,i).fold((()=>[]),(e=>e.matches)),lR(e,(s=r.inlinePatterns,le(s,((e,t)=>t.end.length-e.end.length))),o,n,t,i).fold((()=>[]),(e=>e.matches)))},uR=(e,t)=>{if(0===t.length)return;const o=e.dom,n=e.selection.getBookmark(),r=((e,t)=>{const o=Ie("mce_textpattern"),n=X(t,((t,n)=>{const r=nR(e,o+`_end${t.length}`,n.endRng);return t.concat([{...n,endMarker:r}])}),[]);return X(n,((t,r)=>{const i=n.length-t.length-1,s=iR(r.pattern)?r.endMarker:nR(e,o+`_start${i}`,r.startRng);return t.concat([{...r,startMarker:s}])}),[])})(o,t);q(r,(t=>{const n=o.getParent(t.startMarker.start,o.isBlock),r=e=>e===n;iR(t.pattern)?((e,t,o,n)=>{const r=oR(e.dom,o);XL(e.dom,r,n),cR(e,t,r)})(e,t.pattern,t.endMarker,r):((e,t,o,n,r)=>{const i=e.dom,s=oR(i,n),a=oR(i,o);XL(i,a,r),XL(i,s,r);const l={prefix:o.prefix,start:o.end,end:n.start},c=oR(i,l);cR(e,t,c)})(e,t.pattern,t.startMarker,t.endMarker,r),rR(o,t.endMarker,r),rR(o,t.startMarker,r)})),e.selection.moveToBookmark(n)},hR=(e,t,o)=>((e,t,o)=>{if(ii(e)&&t>=e.length)return F.some(cA(e,t));{const n=Ia(dA);return F.from(n.forwards(e,t,uA(e),o)).map((e=>cA(e.container,0)))}})(t,0,t).map((n=>{const r=n.container;return pA(r,o.start.length,t).each((o=>{const n=e.createRng();n.setStart(r,0),n.setEnd(o.container,o.offset),XL(e,n,(e=>e===t))})),r})),mR=e=>(t,o)=>{const n=t.dom,r=o.pattern,i=YL(n.getRoot(),o.range).getOrDie("Unable to resolve path range");return JL(t,i).each((o=>{"block-format"===r.type?((e,t)=>{const o=t.get(e);return b(o)&&de(o).exists((e=>Ee(e,"block")))})(r.format,t.formatter)&&t.undoManager.transact((()=>{e(t.dom,o,r),t.formatter.apply(r.format)})):"block-command"===r.type&&t.undoManager.transact((()=>{e(t.dom,o,r),t.execCommand(r.cmd,!1,r.value)}))})),!0},pR=e=>(t,o)=>{const n=(e=>le(e,((e,t)=>t.start.length-e.start.length)))(t),r=o.replace(ct," ");return ee(n,(t=>e(t,o,r)))},gR=(e,t)=>(o,n,r,i,s)=>{var a;void 0===s&&(s=null!==(a=n.textContent)&&void 0!==a?a:"");const l=o.dom,c=Wc(o);return l.is(n,c)?e(r.blockPatterns,s).map((e=>t&&lo.trim(s).length===e.start.length?[]:[{pattern:e,range:qL(l,l.getRoot(),n,0,n,0,i)}])).getOr([]):[]},fR=mR(((e,t,o)=>{hR(e,t,o).each((e=>{const t=uo.fromDom(e),o=Xn(t);/^\s[^\s]/.test(o)&&Jn(t,o.slice(1))}))})),bR=pR(((e,t,o)=>0===t.indexOf(e.start)||0===o.indexOf(e.start))),vR=gR(bR,!0),yR=mR(hR),xR=pR(((e,t,o)=>t===e.start||o===e.start)),wR=gR(xR,!1),_R=(e,t)=>((e,t)=>{const o=e.selection.getRng();return JL(e,o).map((n=>{var r;const i=Math.max(0,o.startOffset),s=QL(t,n,null!==(r=n.textContent)&&void 0!==r?r:"");return{inlineMatches:dR(e,n,o.startContainer,i,s,!0),blockMatches:vR(e,n,s,!0)}})).filter((({inlineMatches:e,blockMatches:t})=>t.length>0||e.length>0))})(e,t).fold(B,(({inlineMatches:t,blockMatches:o})=>(e.undoManager.add(),e.undoManager.extra((()=>{e.execCommand("mceInsertNewLine")}),(()=>{(e=>{e.insertContent(Ga,{preserve_zwsp:!0})})(e),uR(e,t),((e,t)=>{if(0===t.length)return;const o=e.selection.getBookmark();q(t,(t=>fR(e,t))),e.selection.moveToBookmark(o)})(e,o);const n=e.selection.getRng(),r=hA(n.startContainer,n.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),r.each((t=>{const o=t.container;o.data.charAt(t.offset-1)===lt&&(o.deleteData(t.offset-1,1),KL(e.dom,o.parentNode,(t=>t===e.dom.getRoot())))}))})),!0))),SR=(e,t)=>((e,t)=>{const o=e.selection.getRng();return JL(e,o).map((n=>{const r=Math.max(0,o.startOffset),i=eR(e.dom,n,o.startContainer,r),s=QL(t,n,i);return wR(e,n,s,!1,i)})).filter((e=>e.length>0))})(e,t).fold(B,(t=>(e.undoManager.transact((()=>{((e,t)=>{q(t,(t=>yR(e,t)))})(e,t)})),!0))),CR=(e,t,o)=>{for(let n=0;n<e.length;n++)if(o(e[n],t))return!0;return!1},kR=e=>{const t=[",",".",";",":","!","?"],o=[32],n=()=>{return t=gu(e).filter((t=>"inline-command"!==t.type&&"block-command"!==t.type||e.queryCommandSupported(t.cmd))),o=fu(e),{inlinePatterns:_c(t),blockPatterns:wc(t),dynamicPatternsLookup:o};var t,o},r=()=>(e=>e.options.isSet("text_patterns_lookup"))(e);e.on("keydown",(t=>{if(13===t.keyCode&&!Xp.modifierPressed(t)&&e.selection.isCollapsed()&&e.selection.isEditable()){const o=Sc(n(),"enter");(o.inlinePatterns.length>0||o.blockPatterns.length>0||r())&&_R(e,o)&&t.preventDefault()}}),!0),e.on("keydown",(t=>{if(32===t.keyCode&&e.selection.isCollapsed()&&e.selection.isEditable()){const o=Sc(n(),"space");(o.blockPatterns.length>0||r())&&SR(e,o)&&t.preventDefault()}}),!0);const i=()=>{if(e.selection.isCollapsed()&&e.selection.isEditable()){const t=Sc(n(),"space");(t.inlinePatterns.length>0||r())&&((e,t)=>{const o=e.selection.getRng();JL(e,o).map((n=>{const r=Math.max(0,o.startOffset-1),i=eR(e.dom,n,o.startContainer,r),s=QL(t,n,i),a=dR(e,n,o.startContainer,r,s,!1);a.length>0&&e.undoManager.transact((()=>{uR(e,a)}))}))})(e,t)}};e.on("keyup",(e=>{((e,t)=>CR(e,t,((e,t)=>e===t.keyCode&&!Xp.modifierPressed(t))))(o,e)&&i()})),e.on("keypress",(o=>{((e,t)=>CR(e,t,((e,t)=>e.charCodeAt(0)===t.charCode)))(t,o)&&Pp.setEditorTimeout(e,i)}))},ER=e=>{const t=lo.each,o=Xp.BACKSPACE,n=Xp.DELETE,r=e.dom,i=e.selection,s=e.parser,a=ro.browser,l=a.isFirefox(),c=a.isChromium()||a.isSafari(),d=ro.deviceType.isiPhone()||ro.deviceType.isiPad(),u=ro.os.isMacOS()||ro.os.isiOS(),h=(t,o)=>{try{e.getDoc().execCommand(t,!1,String(o))}catch(e){}},m=e=>e.isDefaultPrevented(),p=()=>{const t=e=>{const t=r.create("body"),o=e.cloneContents();return t.appendChild(o),i.serializer.serialize(t,{format:"html"})};e.on("keydown",(i=>{const s=i.keyCode;if(!m(i)&&(s===n||s===o)&&e.selection.isEditable()){const o=e.selection.isCollapsed(),n=e.getBody();if(o&&!Ai(e.schema,n))return;if(!o&&!(o=>{const n=t(o),i=r.createRng();return i.selectNode(e.getBody()),n===t(i)})(e.selection.getRng()))return;i.preventDefault(),e.setContent(""),n.firstChild&&r.isBlock(n.firstChild)?e.selection.setCursorLocation(n.firstChild,0):e.selection.setCursorLocation(n,0),e.nodeChanged()}}))},g=()=>{e.shortcuts.add("meta+a",null,"SelectAll")},f=()=>{e.inline||r.bind(e.getDoc(),"mousedown mouseup",(t=>{let o;if(t.target===e.getDoc().documentElement)if(o=i.getRng(),e.getBody().focus(),"mousedown"===t.type){if(tl(o.startContainer))return;i.placeCaretAt(t.clientX,t.clientY)}else i.setRng(o)}))},b=()=>{Range.prototype.getClientRects||e.on("mousedown",(t=>{if(!m(t)&&"HTML"===t.target.nodeName){const t=e.getBody();t.blur(),Pp.setEditorTimeout(e,(()=>{t.focus()}))}}))},v=()=>{const t=Yd(e);e.on("click",(o=>{const n=o.target;/^(IMG|HR)$/.test(n.nodeName)&&r.isEditable(n)&&(o.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&r.hasClass(n,t)&&0===n.childNodes.length&&r.isEditable(n.parentNode)&&(o.preventDefault(),i.select(n))}))},y=()=>{e.on("mousedown",(t=>{Ve(F.from(t.clientX),F.from(t.clientY),((o,n)=>{const r=e.getDoc().caretPositionFromPoint(o,n);if(r&&("IMG"===(i=r.offsetNode).nodeName&&e.dom.isEditable(i))){const o=r.offsetNode.getBoundingClientRect();t.preventDefault(),e.hasFocus()||e.focus(),e.selection.select(r.offsetNode),t.clientX<o.left||t.clientY<o.top?e.selection.collapse(!0):(t.clientX>o.right||t.clientY>o.bottom)&&e.selection.collapse(!1)}var i}))}))},x=()=>{e.on("keydown",(e=>{if(!m(e)&&e.keyCode===o&&i.isCollapsed()&&0===i.getRng().startOffset){const t=i.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}return!0}))},w=()=>{const t=()=>{h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),yd(e)||h("enableObjectResizing",!1)};jd(e)||e.on("BeforeExecCommand mousedown",t)},_=()=>{e.on("SetContent ExecCommand",(e=>{"setcontent"!==e.type&&"mceInsertLink"!==e.command||t(r.select("a:not([data-mce-block])"),(e=>{var t;let o=e.parentNode;const n=r.getRoot();if((null==o?void 0:o.lastChild)===e){for(;o&&!r.isBlock(o);){if((null===(t=o.parentNode)||void 0===t?void 0:t.lastChild)!==o||o===n)return;o=o.parentNode}r.add(o,"br",{"data-mce-bogus":1})}}))}))},S=()=>{e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},C=()=>{e.inline||e.on("keydown",(()=>{document.activeElement===document.body&&e.getWin().focus()}))},k=()=>{e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",(t=>{let o;"HTML"===t.target.nodeName&&(o=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(o),e.selection.normalize(),e.nodeChanged())})))},T=()=>{u&&e.on("keydown",(t=>{if(Xp.metaKeyPressed(t)&&!t.shiftKey&&(37===t.keyCode||39===t.keyCode)){t.preventDefault();e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary")}}))},O=()=>{e.on("click",(e=>{let t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)})),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},A=()=>{e.on("init",(()=>{e.dom.bind(e.getBody(),"submit",(e=>{e.preventDefault()}))}))},M=E,P=()=>{e.on("keydown",(t=>{if(m(t)||t.keyCode!==Xp.BACKSPACE)return;let o=i.getRng();const n=o.startContainer,s=o.startOffset,a=r.getRoot();let l=n;if(o.collapsed&&0===s){for(;l.parentNode&&l.parentNode.firstChild===l&&l.parentNode!==a;)l=l.parentNode;"BLOCKQUOTE"===l.nodeName&&(e.formatter.toggle("blockquote",void 0,l),o=r.createRng(),o.setStart(n,0),o.setEnd(n,0),i.setRng(o))}})),p(),ro.windowsPhone||e.on("keyup focusin mouseup",(t=>{Xp.modifierPressed(t)||(e=>{const t=e.getBody(),o=e.selection.getRng();return o.startContainer===o.endContainer&&o.startContainer===t&&0===o.startOffset&&o.endOffset===t.childNodes.length})(e)||i.normalize()}),!0),c&&(f(),v(),e.on("init",(()=>{h("DefaultParagraphSeparator",Wc(e))})),A(),x(),s.addNodeFilter("br",(e=>{let t=e.length;for(;t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})),d?(C(),k(),O()):g()),l&&(y(),e.on("keydown",(t=>{if(!m(t)&&t.keyCode===o){if(!e.getBody().getElementsByTagName("hr").length)return;if(i.isCollapsed()&&0===i.getRng().startOffset){const e=i.getNode(),o=e.previousSibling;if("HR"===e.nodeName)return r.remove(e),void t.preventDefault();o&&o.nodeName&&"hr"===o.nodeName.toLowerCase()&&(r.remove(o),t.preventDefault())}}})),b(),(()=>{const o=()=>{const o=r.getAttribs(i.getStart().cloneNode(!1));return()=>{const n=i.getStart();n!==e.getBody()&&(r.setAttrib(n,"style",null),t(o,(e=>{n.setAttributeNode(e.cloneNode(!0))})))}},n=()=>!i.isCollapsed()&&r.getParent(i.getStart(),r.isBlock)!==r.getParent(i.getEnd(),r.isBlock);e.on("keypress",(t=>{let r;return!(!(m(t)||8!==t.keyCode&&46!==t.keyCode)&&n()&&(r=o(),e.getDoc().execCommand("delete",!1),r(),t.preventDefault(),1))})),r.bind(e.getDoc(),"cut",(t=>{if(!m(t)&&n()){const t=o();Pp.setEditorTimeout(e,(()=>{t()}))}}))})(),w(),_(),S(),T(),x())};return X_(e)?(c&&(f(),v(),A(),g(),d&&(C(),k(),O())),l&&(b(),w(),S(),T())):P(),{refreshContentEditable:M,isHidden:()=>{if(!l||e.removed)return!1;const t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}},TR=ga.DOM,OR=e=>e.inline?e.getElement().nodeName.toLowerCase():void 0,AR=e=>_e(e,(e=>!1===x(e))),MR=e=>{const t=e.options.get,o=e.editorUpload.blobCache;return AR({allow_conditional_comments:t("allow_conditional_comments"),allow_html_data_urls:t("allow_html_data_urls"),allow_svg_data_urls:t("allow_svg_data_urls"),allow_html_in_named_anchor:t("allow_html_in_named_anchor"),allow_script_urls:t("allow_script_urls"),allow_mathml_annotation_encodings:t("allow_mathml_annotation_encodings"),allow_unsafe_link_target:t("allow_unsafe_link_target"),convert_unsafe_embeds:t("convert_unsafe_embeds"),convert_fonts_to_spans:t("convert_fonts_to_spans"),extended_mathml_attributes:t("extended_mathml_attributes"),extended_mathml_elements:t("extended_mathml_elements"),fix_list_elements:t("fix_list_elements"),font_size_legacy_values:t("font_size_legacy_values"),forced_root_block:t("forced_root_block"),forced_root_block_attrs:t("forced_root_block_attrs"),preserve_cdata:t("preserve_cdata"),inline_styles:t("inline_styles"),root_name:OR(e),sandbox_iframes:t("sandbox_iframes"),sandbox_iframes_exclusions:Au(e),sanitize:t("xss_sanitization"),validate:!0,blob_cache:o,document:e.getDoc()})},PR=e=>{const t=e.options.get;return AR({custom_elements:t("custom_elements"),extended_valid_elements:t("extended_valid_elements"),invalid_elements:t("invalid_elements"),invalid_styles:t("invalid_styles"),schema:t("schema"),valid_children:t("valid_children"),valid_classes:t("valid_classes"),valid_elements:t("valid_elements"),valid_styles:t("valid_styles"),verify_html:t("verify_html"),padd_empty_block_inline_children:t("format_empty_lines")})},DR=e=>{e.bindPendingEventDelegates(),e.initialized=!0,(e=>{e.dispatch("Init")})(e),e.focus(!0),(e=>{const t=e.dom.getRoot();e.inline||Sm(e)&&e.selection.getStart(!0)!==t||Wh(t).each((t=>{const o=t.getNode(),n=oi(o)?Wh(o).getOr(t):t;e.selection.setRng(n.toRange())}))})(e),e.nodeChanged({initial:!0});const t=Jd(e);S(t)&&t.call(e,e),(e=>{const t=eu(e);t&&Pp.setEditorTimeout(e,(()=>{let o;o=!0===t?e:e.editorManager.get(t),o&&!o.destroyed&&(o.focus(),o.selection.scrollIntoView())}),100)})(e),nC(e)&&iC(e,!0)},LR=e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader,RR=e=>{const t=LR(e),o=fd(e),n=e.contentCSS,r=()=>{t.unloadAll(n),e.inline||e.ui.styleSheetLoader.unloadAll(o)},i=()=>{e.removed?r():e.on("remove",r)};if(e.contentStyles.length>0){let t="";lo.each(e.contentStyles,(e=>{t+=e+"\r\n"})),e.dom.addStyle(t)}const s=Promise.all(((e,t,o)=>{const{pass:n,fail:r}=Y(t,(e=>tinymce.Resource.has(dC(e)))),i=n.map((t=>{const o=tinymce.Resource.get(dC(t));return p(o)?Promise.resolve(LR(e).loadRawCss(t,o)):Promise.resolve()})),s=[...i,LR(e).loadAll(r)];return e.inline?s:s.concat([e.ui.styleSheetLoader.loadAll(o)])})(e,n,o)).then(i).catch(i),a=gd(e);return a&&((e,t)=>{const o=uo.fromDom(e.getBody()),n=Go(qo(o)),r=uo.fromTag("style");pn(r,"type","text/css"),dn(r,uo.fromText(t)),dn(n,r),e.on("remove",(()=>{_n(r)}))})(e,a),s},NR=e=>{!0!==e.removed&&((e=>{X_(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})})(e),DR(e))},IR=e=>{const t=e.getElement();let o=e.getDoc();e.inline&&(TR.addClass(t,"mce-content-body"),e.contentDocument=o=document,e.contentWindow=window,e.bodyElement=t,e.contentAreaContainer=t);const n=e.getBody();n.disabled=!0,e.readonly=jd(e),e._editableRoot=Vd(e),!Lu(e)&&e.hasEditableRoot()&&(e.inline&&"static"===TR.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable="true"),n.disabled=!1,e.editorUpload=wC(e),e.schema=Fs(PR(e)),e.dom=ga(o,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,update_styles:!0,root_element:e.inline?e.getBody():null,collect:e.inline,schema:e.schema,contentCssCors:ld(e),referrerPolicy:cd(e),onSetAttrib:t=>{e.dispatch("SetAttrib",t)}}),e.parser=(e=>{const t=u_(MR(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",((t,o)=>{const n=e.dom,r="data-mce-"+o;let i=t.length;for(;i--;){const s=t[i];let a=s.attr(o);if(a&&!s.attr(r)){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===o?(a=n.serializeStyle(n.parseStyle(a),s.name),a.length||(a=null),s.attr(r,a),s.attr(o,a)):"tabindex"===o?(s.attr(r,a),s.attr(o,null)):s.attr(r,e.convertURL(a,o,s.name))}}})),t.addNodeFilter("script",(e=>{let t=e.length;for(;t--;){const o=e[t],n=o.attr("type")||"no/type";0!==n.indexOf("mce-")&&o.attr("type","mce-"+n)}})),xu(e)&&t.addNodeFilter("#cdata",(t=>{var o;let n=t.length;for(;n--;){const r=t[n];r.type=8,r.name="#comment",r.value="[CDATA["+e.dom.encode(null!==(o=r.value)&&void 0!==o?o:"")+"]]"}})),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(t=>{let o=t.length;const n=e.schema.getNonEmptyElements();for(;o--;){const e=t[o];e.isEmpty(n)&&0===e.getAll("br").length&&e.append(new Vg("br",1))}})),t})(e),e.serializer=gS((e=>{const t=e.options.get;return{...MR(e),...PR(e),...AR({remove_trailing_brs:t("remove_trailing_brs"),pad_empty_with_br:t("pad_empty_with_br"),url_converter:t("url_converter"),url_converter_scope:t("url_converter_scope"),element_format:t("element_format"),entities:t("entities"),entity_encoding:t("entity_encoding"),indent:t("indent"),indent_after:t("indent_after"),indent_before:t("indent_before")})}})(e),e),e.selection=cS(e.dom,e.getWin(),e.serializer,e),e.annotator=vp(e),e.formatter=LC(e),e.undoManager=NC(e),e._nodeChangeDispatcher=new cD(e),e._selectionOverrides=ZL(e),OT(e),nL(e),zT(e),X_(e)||((e=>{e.on("mousedown",(t=>{t.detail>=3&&(t.preventDefault(),uL(e))}))})(e),(e=>{kR(e)})(e));const r=lD(e);ET(e,r),(e=>{e.on("NodeChange",(()=>LT(e)))})(e),HC(e),oL(e);const i=J_(e);(e=>{const t=e.getDoc(),o=e.getBody();(e=>{e.dispatch("PreInit")})(e),tu(e)||(t.body.spellcheck=!1,TR.setAttrib(o,"spellcheck","false")),e.quirks=ER(e),(e=>{e.dispatch("PostRender")})(e);const n=bd(e);void 0!==n&&(o.dir=n);const r=ou(e);r&&e.on("BeforeSetContent",(e=>{lo.each(r,(t=>{e.content=e.content.replace(t,(e=>"\x3c!--mce:protected "+escape(e)+"--\x3e"))}))})),e.on("SetContent",(()=>{e.addVisual(e.getBody())})),e.on("compositionstart compositionend",(t=>{e.composing="compositionstart"===t.type}))})(e),(e=>{const t=Pu(e);var o;p(Du(e))||!x(t)&&"INVALID"!=((e=>"gpl"===e.toLowerCase())(o=t)||(e=>e.length>=64&&e.length<=255)(o)?"VALID":"INVALID")||console.warn("TinyMCE is running in evaluation mode. Provide a valid license key or add license_key: 'gpl' to the init config to agree to the open source license terms. Read more at https://www.tiny.cloud/license-key/")})(e),i.fold((()=>{const t=(e=>{let t=!1;const o=setTimeout((()=>{t||e.setProgressState(!0)}),500);return()=>{clearTimeout(o),t=!0,e.setProgressState(!1)}})(e);RR(e).then((()=>{NR(e),t()}))}),(t=>{e.setProgressState(!0),RR(e).then((()=>{t().then((t=>{e.setProgressState(!1),NR(e),tS(e)}),(t=>{e.notificationManager.open({type:"error",text:String(t)}),NR(e),tS(e)}))}))}))},BR=ga.DOM,zR=(e,t)=>{const o=ro.browser.isFirefox()?Kd(e):"Rich Text Area",n=e.translate(o),r=bn(uo.fromDom(e.getElement()),"tabindex").bind(rt),i=((e,t,o,n)=>{const r=uo.fromTag("iframe");return n.each((e=>pn(r,"tabindex",e))),gn(r,o),gn(r,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),hr(r,"tox-edit-area__iframe"),r})(e.id,n,Fc(e),r).dom;i.onload=()=>{i.onload=null,e.dispatch("load")},e.contentAreaContainer=t.iframeContainer,e.iframeElement=i,e.iframeHTML=(e=>{let t=Hc(e)+"<html><head>";jc(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const o=Vc(e),n=Uc(e),r=e.translate(Kd(e));return Zc(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+Zc(e)+'" />'),t+=`</head><body id="${o}" class="mce-content-body ${n}" data-id="${e.id}" aria-label="${r}"><br></body></html>`,t})(e),BR.add(t.iframeContainer,i)},FR=e=>{const t=e.iframeElement,o=()=>{e.contentDocument=t.contentDocument,IR(e)};if(Su(e)||ro.browser.isFirefox()){const t=e.getDoc();t.open(),t.write(e.iframeHTML),t.close(),o()}else{const n=((e,t,o)=>Qo(e,t,tn,o))(uo.fromDom(t),"load",(()=>{n.unbind(),o()}));t.srcdoc=e.iframeHTML}},HR=ga.DOM,jR=(e,t,o)=>{const n=$S.get(o),r=$S.urls[o]||e.documentBaseUrl.replace(/\/$/,"");if(o=lo.trim(o),n&&-1===lo.inArray(t,o)){if(e.plugins[o])return;try{const i=n(e,r)||{};e.plugins[o]=i,S(i.init)&&(i.init(e,r),t.push(o))}catch(t){((e,t,o)=>{const n=wa.translate(["Failed to initialize plugin: {0}",t]);kc(e,"PluginLoadError",{message:n}),JS(n,o),YS(e,n)})(e,o,t)}}},VR=(e,t)=>({editorContainer:e,iframeContainer:t,api:{}}),UR=e=>{const t=e.getElement();return e.inline?VR(null):(e=>{const t=HR.create("div");return HR.insertAfter(t,e),VR(t,t)})(t)},ZR=e=>{const t=e.getElement();return e.orgDisplay=t.style.display,p(Cd(e))?(e=>{const t=e.theme.renderUI;return t?t():UR(e)})(e):S(Cd(e))?(e=>{const t=e.getElement(),o=Cd(e)(e,t);return o.editorContainer.nodeType&&(o.editorContainer.id=o.editorContainer.id||e.id+"_parent"),o.iframeContainer&&o.iframeContainer.nodeType&&(o.iframeContainer.id=o.iframeContainer.id||e.id+"_iframecontainer"),o.height=o.iframeHeight?o.iframeHeight:t.offsetHeight,o})(e):UR(e)},$R=async e=>{e.dispatch("ScriptsLoaded"),(e=>{const t=lo.trim(od(e)),o=e.ui.registry.getAll().icons,n={...RS.get("default").icons,...RS.get(t).icons};be(n,((t,n)=>{Ee(o,n)||e.ui.registry.addIcon(n,t)}))})(e),(e=>{const t=Cd(e);if(p(t)){const o=WS.get(t);e.theme=o(e,WS.urls[t])||{},S(e.theme.init)&&e.theme.init(e,WS.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}else e.theme={}})(e),(e=>{const t=Ed(e),o=NS.get(t);e.model=o(e,NS.urls[t])})(e),(e=>{const t=[];q(Zd(e),(o=>{jR(e,t,(e=>e.replace(/^\-/,""))(o))}))})(e);const t=await ZR(e);((e,t)=>{const o={show:F.from(t.show).getOr(E),hide:F.from(t.hide).getOr(E),isEnabled:F.from(t.isEnabled).getOr(z),setEnabled:o=>{o&&("readonly"===e.mode.get()||nC(e))||F.from(t.setEnabled).each((e=>e(o)))}};e.ui={...e.ui,...o}})(e,F.from(t.api).getOr({})),e.editorContainer=t.editorContainer,hC(e),e.inline?IR(e):((e,t)=>{zR(e,t),t.editorContainer&&(t.editorContainer.style.display=e.orgDisplay,e.hidden=BR.isHidden(t.editorContainer)),e.getElement().style.display="none",BR.setAttrib(e.id,"aria-hidden","true"),e.getElement().style.visibility=e.orgVisibility,FR(e)})(e,{editorContainer:t.editorContainer,iframeContainer:t.iframeContainer})},WR=ga.DOM,qR=e=>"-"===e.charAt(0),GR=(e,t)=>{const o=dd(t),n=ud(t);if(!wa.hasCode(o)&&"en"!==o){const r=ot(n)?n:`${t.editorManager.baseURL}/langs/${o}.js`;e.add(r).catch((()=>{((e,t,o)=>{KS(e,"LanguageLoadError",XS("language",t,o))})(t,r,o)}))}},YR=(e,t)=>{const o=Cd(e);if(p(o)&&!qR(o)&&!Ee(WS.urls,o)){const n=kd(e),r=n?e.documentBaseURI.toAbsolute(n):`themes/${o}/theme${t}.js`;WS.load(o,r).catch((()=>{((e,t,o)=>{KS(e,"ThemeLoadError",XS("theme",t,o))})(e,r,o)}))}},KR=(e,t)=>{const o=Ed(e);if("plugin"!==o&&!Ee(NS.urls,o)){const n=Td(e),r=p(n)?e.documentBaseURI.toAbsolute(n):`models/${o}/model${t}.js`;NS.load(o,r).catch((()=>{((e,t,o)=>{KS(e,"ModelLoadError",XS("model",t,o))})(e,r,o)}))}},XR=(e,t,o)=>F.from(t).filter((e=>ot(e)&&!RS.has(e))).map((t=>({url:`${e.editorManager.baseURL}/icons/${t}/icons${o}.js`,name:F.some(t)}))),JR=(e,t,o)=>{const n=XR(t,"default",o),r=(e=>F.from(nd(e)).filter(ot).map((e=>({url:e,name:F.none()}))))(t).orThunk((()=>XR(t,od(t),"")));q((e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t})([n,r]),(o=>{e.add(o.url).catch((()=>{((e,t,o)=>{KS(e,"IconsLoadError",XS("icons",t,o))})(t,o.url,o.name.getOrUndefined())}))}))},QR=(e,t)=>{const o=(t,o)=>{$S.load(t,o).catch((()=>{((e,t,o)=>{KS(e,"PluginLoadError",XS("plugin",t,o))})(e,o,t)}))};be($d(e),((t,n)=>{o(n,t),e.options.set("plugins",Zd(e).concat(n))})),q(Zd(e),(e=>{!(e=lo.trim(e))||$S.urls[e]||qR(e)||o(e,`plugins/${e}/plugin${t}.js`)}))},eN=(e,t)=>{const o=ba.ScriptLoader,n=()=>{!e.removed&&(e=>{const t=Cd(e);return!p(t)||_(WS.get(t))})(e)&&(e=>{const t=Ed(e);return _(NS.get(t))})(e)&&$R(e)};YR(e,t),KR(e,t),GR(o,e),JR(o,e,t),QR(e,t),o.loadQueue().then(n,n)},tN=e=>{const t=e.id;wa.setCode(dd(e));const o=()=>{WR.unbind(window,"ready",o),e.render()};if(!ia.Event.domLoaded)return void WR.bind(window,"ready",o);if(!e.getElement())return;const n=uo.fromDom(e.getElement()),r=xn(n);e.on("remove",(()=>{G(n.dom.attributes,(e=>yn(n,e.name))),gn(n,r)})),e.ui.styleSheetLoader=((e,t)=>os.forElement(e,{contentCssCors:Ud(t),referrerPolicy:cd(t)}))(n,e),Rd(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");const i=e.getElement().form||WR.getParent(t,"form");i&&(e.formElement=i,Nd(e)&&!ri(e.getElement())&&(WR.insertAfter(WR.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=t=>{e.dispatch(t.type,t)},WR.bind(i,"submit reset",e.formEventDelegate),e.on("reset",(()=>{e.resetContent()})),!Id(e)||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=()=>(e.editorManager.triggerSave(),e.setDirty(!1),i._mceOldSubmit(i)))),e.windowManager=qS(e),e.notificationManager=ZS(e),(e=>"xml"===e.options.get("encoding"))(e)&&e.on("GetContent",(e=>{e.save&&(e.content=WR.encode(e.content))})),Bd(e)&&e.on("submit",(()=>{e.initialized&&e.save()})),zd(e)&&(e._beforeUnload=()=>{!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),eN(e,e.suffix)},oN=Gt().deviceType,nN=oN.isPhone(),rN=oN.isTablet(),iN=e=>{if(w(e))return[];{const t=b(e)?e:e.split(/[ ,]/),o=W(t,Qe);return K(o,ot)}},sN=(e,t)=>{const o=((e,t)=>{const o={},n={};return we(e,t,xe(o),xe(n)),{t:o,f:n}})(t,((t,o)=>Z(e,o)));return n=o.t,r=o.f,{sections:A(n),options:A(r)};var n,r},aN=(e,t)=>Ee(e.sections(),t),lN=(e,t)=>({...{table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:ke(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1},...t?{menubar:!1}:{}}),cN=(e,t)=>{var o;const n=null!==(o=t.external_plugins)&&void 0!==o?o:{};return e&&e.external_plugins?lo.extend({},e.external_plugins,n):n},dN=(e,t,o,n)=>{const r=iN(o.forced_plugins),i=iN(n.plugins),s=((e,t)=>aN(e,t)?e.sections()[t]:{})(t,"mobile"),a=((e,t,o,n)=>e&&aN(t,"mobile")?n:o)(e,t,i,s.plugins?iN(s.plugins):i),l=((e,t)=>[...iN(e),...iN(t)])(r,a);return lo.extend(n,{forced_plugins:r,plugins:l})},uN=(e,t,o,n,r)=>{var i;const s=e?{mobile:lN(null!==(i=r.mobile)&&void 0!==i?i:{},t)}:{},a=sN(["mobile"],ze(s,r)),l=lo.extend(o,n,a.options(),((e,t)=>e&&aN(t,"mobile"))(e,a)?((e,t,o={})=>{const n=e.sections(),r=ke(n,t).getOr({});return lo.extend({},o,r)})(a,"mobile"):{},{external_plugins:cN(n,a.options())});return dN(e,a,n,l)},hN=(e,t)=>((e,t)=>eS(e).editor.addVisual(t))(e,t),mN=e=>{const t=t=>()=>{q("left,center,right,justify".split(","),(o=>{t!==o&&e.formatter.remove("align"+o)})),"none"!==t&&((t,o)=>{e.formatter.toggle(t,o),e.nodeChanged()})("align"+t)};e.editorCommands.addCommands({JustifyLeft:t("left"),JustifyCenter:t("center"),JustifyRight:t("right"),JustifyFull:t("justify"),JustifyNone:t("none")})},pN=e=>{mN(e),(e=>{const t=t=>()=>{const o=e.selection,n=o.isCollapsed()?[e.dom.getParent(o.getNode(),e.dom.isBlock)]:o.getSelectedBlocks();return $(n,(o=>_(e.formatter.matchNode(o,t))))};e.editorCommands.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify")},"state")})(e)},gN=(e,t)=>{const o=e.selection,n=e.dom;return/^ | $/.test(t)?((e,t,o,n)=>{const r=uo.fromDom(e.getRoot());return o=ob(r,Yl.fromRangeStart(t),n)?o.replace(/^ /,"&nbsp;"):o.replace(/^&nbsp;/," "),nb(r,Yl.fromRangeEnd(t),n)?o.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):o.replace(/&nbsp;(<br( \/)?>)?$/," ")})(n,o.getRng(),t,e.schema):t},fN=(e,t)=>{if(e.selection.isEditable()){const{content:o,details:n}=(e=>{if("string"!=typeof e){const t=lo.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}})(t);f_(e,{...n,content:gN(e,o),format:"html",set:!1,selection:!0}).each((t=>{const o=((e,t,o)=>Q_(e).editor.insertContent(t,o))(e,t.content,n);b_(e,o,t),e.addVisual()}))}},bN={"font-size":"size","font-family":"face"},vN=Mo("font"),yN=(e,t,o)=>Er(uo.fromDom(o),(t=>(t=>zn(t,e).orThunk((()=>vN(t)?ke(bN,e).bind((e=>bn(t,e))):F.none())))(t)),(e=>yo(uo.fromDom(t),e))),xN=e=>(t,o)=>F.from(o).map(uo.fromDom).filter(Eo).bind((o=>yN(e,t,o.dom).or(((e,t)=>F.from(ga.DOM.getStyle(t,e,!0)))(e,o.dom)))).getOr(""),wN=xN("font-size"),_N=T((e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")),xN("font-family")),SN=e=>Wh(e.getBody()).bind((e=>{const t=e.container();return F.from(ii(t)?t.parentNode:t)})),CN=(e,t)=>(e=>F.from(e.selection.getRng()).bind((t=>{const o=e.getBody();return t.startContainer===o&&0===t.startOffset?F.none():F.from(e.selection.getStart(!0))})))(e).orThunk(D(SN,e)).map(uo.fromDom).filter(Eo).bind(t),kN=(e,t)=>CN(e,O(F.some,t)),EN=(e,t)=>{if(/^[0-9.]+$/.test(t)){const o=parseInt(t,10);if(o>=1&&o<=7){const n=(e=>lo.explode(e.options.get("font_size_style_values")))(e),r=(e=>lo.explode(e.options.get("font_size_classes")))(e);return r.length>0?r[o-1]||t:n[o-1]||t}return t}return t},TN=e=>{const t=e.split(/\s*,\s*/);return W(t,(e=>-1===e.indexOf(" ")||Ke(e,'"')||Ke(e,"'")?e:`'${e}'`)).join(",")},ON=e=>{const t=(t,o)=>{e.formatter.toggle(t,o),e.nodeChanged()};e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>{t(e)},"ForeColor,HiliteColor":(e,o,n)=>{t(e,{value:n})},BackColor:(e,o,n)=>{t("hilitecolor",{value:n})},FontName:(t,o,n)=>{((e,t)=>{const o=EN(e,t);e.formatter.toggle("fontname",{value:TN(o)}),e.nodeChanged()})(e,n)},FontSize:(t,o,n)=>{((e,t)=>{e.formatter.toggle("fontsize",{value:EN(e,t)}),e.nodeChanged()})(e,n)},LineHeight:(t,o,n)=>{((e,t)=>{e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()})(e,n)},Lang:(e,o,n)=>{var r;t(e,{value:n.code,customValue:null!==(r=n.customCode)&&void 0!==r?r:null})},RemoveFormat:t=>{e.formatter.remove(t)},mceBlockQuote:()=>{t("blockquote")},FormatBlock:(e,o,n)=>{t(p(n)?n:"p")},mceToggleFormat:(e,o,n)=>{t(n)}})},AN=e=>{const t=t=>e.formatter.match(t);e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>t(e),mceBlockQuote:()=>t("blockquote")},"state"),e.editorCommands.addQueryValueHandler("FontName",(()=>(e=>kN(e,(t=>_N(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("FontSize",(()=>(e=>kN(e,(t=>wN(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("LineHeight",(()=>(e=>kN(e,(t=>{const o=uo.fromDom(e.getBody()),n=Er(t,(e=>zn(e,"line-height")),D(yo,o));return n.getOrThunk((()=>{const e=parseFloat(In(t,"line-height")),o=parseFloat(In(t,"font-size"));return String(e/o)}))})).getOr(""))(e)))},MN=e=>{e.editorCommands.addCommands({Indent:()=>{(e=>{_T(e,"indent")})(e)},Outdent:()=>{ST(e)}}),e.editorCommands.addCommands({Outdent:()=>yT(e)},"state")},PN=(e,t)=>{if(e.mode.isReadOnly())return;const o=e.dom,n=e.selection.getRng(),r=t?e.selection.getStart():e.selection.getEnd(),i=t?n.startContainer:n.endContainer,s=XM(o,i);if(!s||!s.isContentEditable)return;const a=t?an:ln,l=Wc(e);((e,t,o,n)=>{const r=e.dom,i=e=>r.isBlock(e)&&e.parentElement===o,s=i(t)?t:r.getParent(n,i,o);return F.from(s).map(uo.fromDom)})(e,r,s,i).each((t=>{const o=tP(e,i,t.dom,s,!1,l);a(t,uo.fromDom(o)),e.selection.setCursorLocation(o,0),e.dispatch("NewBlock",{newBlock:o}),UM(e,"insertParagraph")}))},DN=e=>{e.editorCommands.addCommands({InsertNewBlockBefore:()=>{(e=>{PN(e,!0)})(e)},InsertNewBlockAfter:()=>{(e=>{PN(e,!1)})(e)}})},LN=e=>{pN(e),(e=>{e.editorCommands.addCommands({"Cut,Copy,Paste":t=>{const o=e.getDoc();let n;try{o.execCommand(t)}catch(e){n=!0}if("paste"!==t||o.queryCommandEnabled(t)||(n=!0),n||!o.queryCommandSupported(t)){let t=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");(ro.os.isMacOS()||ro.os.isiOS())&&(t=t.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:t,type:"error"})}}})})(e),(e=>{e.editorCommands.addCommands({mceAddUndoLevel:()=>{e.undoManager.add()},mceEndUndoLevel:()=>{e.undoManager.add()},Undo:()=>{e.undoManager.undo()},Redo:()=>{e.undoManager.redo()}})})(e),(e=>{e.editorCommands.addCommands({mceSelectNodeDepth:(t,o,n)=>{let r=0;e.dom.getParent(e.selection.getNode(),(t=>!Kr(t)||r++!==n||(e.selection.select(t),!1)),e.getBody())},mceSelectNode:(t,o,n)=>{e.selection.select(n)},selectAll:()=>{const t=e.dom.getParent(e.selection.getStart(),pi);if(t){const o=e.dom.createRng();o.selectNodeContents(t),e.selection.setRng(o)}}})})(e),(e=>{e.editorCommands.addCommands({mceCleanup:()=>{const t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},insertImage:(t,o,n)=>{fN(e,e.dom.createHTML("img",{src:n}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",!1,"<hr>")},insertText:(t,o,n)=>{fN(e,e.dom.encode(n))},insertHTML:(t,o,n)=>{fN(e,n)},mceInsertContent:(t,o,n)=>{fN(e,n)},mceSetContent:(t,o,n)=>{e.setContent(n)},mceReplaceContent:(t,o,n)=>{e.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceNewDocument:()=>{e.setContent(au(e))}})})(e),(e=>{const t=(t,o,n)=>{if(e.mode.isReadOnly())return;const r=p(n)?{href:n}:n,i=e.dom.getParent(e.selection.getNode(),"a");g(r)&&p(r.href)&&(r.href=r.href.replace(/ /g,"%20"),i&&r.href||e.formatter.remove("link"),r.href&&e.formatter.apply("link",r,i))};e.editorCommands.addCommands({unlink:()=>{if(e.selection.isEditable()){if(e.selection.isCollapsed()){const t=e.dom.getParent(e.selection.getStart(),"a");return void(t&&e.dom.remove(t,!0))}e.formatter.remove("link")}},mceInsertLink:t,createLink:t})})(e),MN(e),DN(e),(e=>{e.editorCommands.addCommands({insertParagraph:()=>{zP(gP,e)},mceInsertNewLine:(t,o,n)=>{FP(e,n)},InsertLineBreak:(t,o,n)=>{zP(CP,e)}})})(e),(e=>{ON(e),AN(e)})(e),(e=>{e.editorCommands.addCommands({mceRemoveNode:(t,o,n)=>{const r=null!=n?n:e.selection.getNode();if(r!==e.getBody()){const t=e.selection.getBookmark();e.dom.remove(r,!0),e.selection.moveToBookmark(t)}},mcePrint:()=>{e.getWin().print()},mceFocus:(t,o,n)=>{Kp(e,!0===n)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual,e.addVisual()}})})(e)},RN=["toggleview"],NN=e=>Z(RN,e.toLowerCase());class IN{constructor(e){this.commands={state:{},exec:{},value:{}},this.editor=e}execCommand(e,t=!1,o,n){const r=this.editor,i=e.toLowerCase(),s=null==n?void 0:n.skip_focus;if(r.removed)return!1;"mcefocus"!==i&&(/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(i)||s?(e=>{Ap(e).each((t=>e.selection.setRng(t)))})(r):r.focus());if(r.dispatch("BeforeExecCommand",{command:e,ui:t,value:o}).isDefaultPrevented())return!1;const a=this.commands.exec[i];return!!S(a)&&(a(i,t,o),r.dispatch("ExecCommand",{command:e,ui:t,value:o}),!0)}queryCommandState(e){if(!NN(e)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const t=e.toLowerCase(),o=this.commands.state[t];return!!S(o)&&o(t)}queryCommandValue(e){if(!NN(e)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const t=e.toLowerCase(),o=this.commands.value[t];return S(o)?o(t):""}addCommands(e,t="exec"){const o=this.commands;be(e,((e,n)=>{q(n.toLowerCase().split(","),(n=>{o[t][n]=e}))}))}addCommand(e,t,o){const n=e.toLowerCase();this.commands.exec[n]=(e,n,r)=>t.call(null!=o?o:this.editor,n,r)}queryCommandSupported(e){const t=e.toLowerCase();return!!this.commands.exec[t]}addQueryStateHandler(e,t,o){this.commands.state[e.toLowerCase()]=()=>t.call(null!=o?o:this.editor)}addQueryValueHandler(e,t,o){this.commands.value[e.toLowerCase()]=()=>t.call(null!=o?o:this.editor)}}const BN=lo.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," ");class zN{static isNative(e){return!!BN[e.toLowerCase()]}constructor(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||B}fire(e,t){return this.dispatch(e,t)}dispatch(e,t){const o=e.toLowerCase(),n=Qs(o,null!=t?t:{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(n);const r=this.bindings[o];if(r)for(let e=0,t=r.length;e<t;e++){const t=r[e];if(!t.removed){if(t.once&&this.off(o,t.func),n.isImmediatePropagationStopped())return n;if(!1===t.func.call(this.scope,n))return n.preventDefault(),n}}return n}on(e,t,o,n){if(!1===t&&(t=B),t){const r={func:t,removed:!1};n&&lo.extend(r,n);const i=e.toLowerCase().split(" ");let s=i.length;for(;s--;){const e=i[s];let t=this.bindings[e];t||(t=[],this.toggleEvent(e,!0)),t=o?[r,...t]:[...t,r],this.bindings[e]=t}}return this}off(e,t){if(e){const o=e.toLowerCase().split(" ");let n=o.length;for(;n--;){const r=o[n];let i=this.bindings[r];if(!r)return be(this.bindings,((e,t)=>{this.toggleEvent(t,!1),delete this.bindings[t]})),this;if(i){if(t){const e=Y(i,(e=>e.func===t));i=e.fail,this.bindings[r]=i,q(e.pass,(e=>{e.removed=!0}))}else i.length=0;i.length||(this.toggleEvent(e,!1),delete this.bindings[r])}}}else be(this.bindings,((e,t)=>{this.toggleEvent(t,!1)})),this.bindings={};return this}once(e,t,o){return this.on(e,t,o,{once:!0})}has(e){e=e.toLowerCase();const t=this.bindings[e];return!(!t||0===t.length)}}const FN=e=>(e._eventDispatcher||(e._eventDispatcher=new zN({scope:e,toggleEvent:(t,o)=>{zN.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,o)}})),e._eventDispatcher),HN={fire(e,t,o){return console.warn('The "fire" event api has been deprecated and will be removed in TinyMCE 9. Use "dispatch" instead.',(new Error).stack),this.dispatch(e,t,o)},dispatch(e,t,o){const n=this;if(n.removed&&"remove"!==e&&"detach"!==e)return Qs(e.toLowerCase(),null!=t?t:{},n);const r=FN(n).dispatch(e,t);if(!1!==o&&n.parent){let t=n.parent();for(;t&&!r.isPropagationStopped();)t.dispatch(e,r,!1),t=t.parent?t.parent():void 0}return r},on(e,t,o){return FN(this).on(e,t,o)},off(e,t){return FN(this).off(e,t)},once(e,t){return FN(this).once(e,t)},hasEventListeners(e){return FN(this).has(e)}},jN=ga.DOM;let VN;const UN=(e,t)=>{if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(t))return e.getDoc().documentElement;const o=_d(e);return o?(e.eventRoot||(e.eventRoot=jN.select(o)[0]),e.eventRoot):e.getBody()},ZN=(e,t,o)=>{(e=>!e.hidden&&!nC(e))(e)?e.dispatch(t,o):nC(e)&&lC(e,o)},$N=(e,t)=>{if(e.delegates||(e.delegates={}),e.delegates[t]||e.removed)return;const o=UN(e,t);if(_d(e)){if(VN||(VN={},e.editorManager.on("removeEditor",(()=>{e.editorManager.activeEditor||VN&&(be(VN,((t,o)=>{e.dom.unbind(UN(e,o))})),VN=null)}))),VN[t])return;const n=o=>{const n=o.target,r=e.editorManager.get();let i=r.length;for(;i--;){const e=r[i].getBody();(e===n||jN.isChildOf(n,e))&&ZN(r[i],t,o)}};VN[t]=n,jN.bind(o,t,n)}else{const n=o=>{ZN(e,t,o)};jN.bind(o,t,n),e.delegates[t]=n}},WN={...HN,bindPendingEventDelegates(){const e=this;lo.each(e._pendingNativeEvents,(t=>{$N(e,t)}))},toggleNativeEvent(e,t){const o=this;"focus"!==e&&"blur"!==e&&(o.removed||(t?o.initialized?$N(o,e):o._pendingNativeEvents?o._pendingNativeEvents.push(e):o._pendingNativeEvents=[e]:o.initialized&&o.delegates&&(o.dom.unbind(UN(o,e),e,o.delegates[e]),delete o.delegates[e])))},unbindAllNativeEvents(){const e=this,t=e.getBody(),o=e.dom;e.delegates&&(be(e.delegates,((t,o)=>{e.dom.unbind(UN(e,o),o,t)})),delete e.delegates),!e.inline&&t&&o&&(t.onload=null,o.unbind(e.getWin()),o.unbind(e.getDoc())),o&&(o.unbind(t),o.unbind(e.getContainer()))}},qN=e=>p(e)?{value:e.split(/[ ,]/),valid:!0}:k(e,p)?{value:e,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},GN=(e,t)=>e+(nt(t.message)?"":`. ${t.message}`),YN=e=>e.valid,KN=(e,t,o="")=>{const n=t(e);return y(n)?n?{value:e,valid:!0}:{valid:!1,message:o}:n},XN=(e,t,o=t)=>{const n={},r={},i=(e,t,o)=>{const n=KN(t,o);return YN(n)?(r[e]=n.value,!0):(console.warn(GN(`Invalid value passed for the ${e} option`,n)),!1)},s=e=>Ee(n,e);return{register:(e,o)=>{const s=(e=>p(e.processor))(o)?(e=>{const t=(()=>{switch(e){case"array":return b;case"boolean":return y;case"function":return S;case"number":return C;case"object":return g;case"string":return p;case"string[]":return qN;case"object[]":return e=>k(e,g);case"regexp":return e=>m(e,RegExp);default:return z}})();return o=>KN(o,t,`The value must be a ${e}.`)})(o.processor):o.processor,a=((e,t,o)=>{if(!x(t)){const n=KN(t,o);if(YN(n))return n.value;console.error(GN(`Invalid default value passed for the "${e}" option`,n))}})(e,o.default,s);n[e]={...o,default:a,processor:s};ke(r,e).orThunk((()=>ke(t,e))).each((t=>i(e,t,s)))},isRegistered:s,get:e=>ke(r,e).orThunk((()=>ke(n,e).map((e=>e.default)))).getOrUndefined(),set:(e,t)=>{if(s(e)){const o=n[e];return o.immutable?(console.error(`"${e}" is an immutable option and cannot be updated`),!1):i(e,t,o.processor)}return console.warn(`"${e}" is not a registered option. Ensure the option has been registered before setting a value.`),!1},unset:e=>{const t=s(e);return t&&delete r[e],t},isSet:e=>Ee(r,e),debug:()=>{try{console.log(JSON.parse(JSON.stringify(o,((e,t)=>y(t)||C(t)||p(t)||v(t)||b(t)||f(t)?t:Object.prototype.toString.call(t)))))}catch(e){console.error(e)}}}},JN=e=>e.readonly,QN=e=>{const t=t=>{JN(e)&&(e=>$(e,(e=>"characterData"===e.type||"childList"===e.type)))(t)&&(e=>{const t=e.undoManager.add();_(t)&&(e.undoManager.undo(),e.undoManager.reset())})(e)},o=new MutationObserver(t);e.on("beforeinput paste cut dragend dragover draggesture dragdrop drop drag",(t=>{JN(e)&&t.preventDefault()})),e.on("BeforeExecCommand",(t=>{"Undo"!==t.command&&"Redo"!==t.command||!JN(e)||t.preventDefault()})),e.on("compositionstart",(()=>{JN(e)&&o.observe(e.getBody(),{characterData:!0,childList:!0,subtree:!0})})),e.on("compositionend",(()=>{if(JN(e)){const e=o.takeRecords();t(e)}o.disconnect()}))},eI=["design","readonly"],tI=(e,t,o,n)=>{const r=o[t.get()],i=o[n];try{i.activate()}catch(e){return void console.error(`problem while activating editor mode ${n}:`,e)}r.deactivate(),r.editorReadOnly!==i.editorReadOnly&&((e,t)=>{const o=uo.fromDom(e.getBody());t?(e.readonly=!0,e.hasEditableRoot()&&((e,t)=>{e.dom.contentEditable=t?"true":"false"})(o,!0),tC(e)):(e.readonly=!1,oC(e))})(e,i.editorReadOnly),t.set(n),((e,t)=>{e.dispatch("SwitchMode",{mode:t})})(e,n)},oI=e=>{const t=Ae("design"),o=Ae({design:{activate:E,deactivate:E,editorReadOnly:!1},readonly:{activate:E,deactivate:E,editorReadOnly:!0}});return QN(e),cC(e),{isReadOnly:()=>JN(e),set:n=>((e,t,o,n)=>{if(!(n===o.get()||e.initialized&&nC(e))){if(!Ee(t,n))throw new Error(`Editor mode '${n}' is invalid`);e.initialized?tI(e,o,t,n):e.on("init",(()=>tI(e,o,t,n)))}})(e,o.get(),t,n),get:()=>t.get(),register:(e,t)=>{o.set(((e,t,o)=>{if(Z(eI,t))throw new Error(`Cannot override default mode ${t}`);return{...e,[t]:{...o,deactivate:()=>{try{o.deactivate()}catch(e){console.error(`problem while deactivating editor mode ${t}:`,e)}}}}})(o.get(),e,t))}}},nI=lo.each,rI=lo.explode,iI={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},sI=lo.makeMap("alt,ctrl,shift,meta,access"),aI=e=>{const t={},o=ro.os.isMacOS()||ro.os.isiOS();nI(rI(e.toLowerCase(),"+"),(e=>{(e=>e in sI)(e)?t[e]=!0:/^[0-9]{2,}$/.test(e)?t.keyCode=parseInt(e,10):(t.charCode=e.charCodeAt(0),t.keyCode=iI[e]||e.toUpperCase().charCodeAt(0))}));const n=[t.keyCode];let r;for(r in sI)t[r]?n.push(r):t[r]=!1;return t.id=n.join(","),t.access&&(t.alt=!0,o?t.ctrl=!0:t.shift=!0),t.meta&&(o?t.meta=!0:(t.ctrl=!0,t.meta=!1)),t};class lI{constructor(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;const t=this;e.on("keyup keypress keydown",(e=>{!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(nI(t.shortcuts,(o=>{t.matchShortcut(e,o)&&(t.pendingPatterns=o.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(o))})),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))}))}add(e,t,o,n){const r=this,i=r.normalizeCommandFunc(o);return nI(rI(lo.trim(e)),(e=>{const o=r.createShortcut(e,t,i,n);r.shortcuts[o.id]=o})),!0}remove(e){const t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)}normalizeCommandFunc(e){const t=this,o=e;return"string"==typeof o?()=>{t.editor.execCommand(o,!1,null)}:lo.isArray(o)?()=>{t.editor.execCommand(o[0],o[1],o[2])}:o}createShortcut(e,t,o,n){const r=lo.map(rI(e,">"),aI);return r[r.length-1]=lo.extend(r[r.length-1],{func:o,scope:n||this.editor}),lo.extend(r[0],{desc:this.editor.translate(t),subpatterns:r.slice(1)})}hasModifier(e){return e.altKey||e.ctrlKey||e.metaKey}isFunctionKey(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123}matchShortcut(e,t){return!!t&&(t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&(t.alt===e.altKey&&t.shift===e.shiftKey&&(!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0))))}executeShortcutAction(e){return e.func?e.func.call(e.scope):null}}const cI=()=>{const e=(()=>{const e={},t={},o={},n={},r={},i={},s={},a={},l={},c=(e,t)=>(o,n)=>{e[o.toLowerCase()]={...n,type:t}};return{addButton:c(e,"button"),addGroupToolbarButton:c(e,"grouptoolbarbutton"),addToggleButton:c(e,"togglebutton"),addMenuButton:c(e,"menubutton"),addSplitButton:c(e,"splitbutton"),addMenuItem:c(t,"menuitem"),addNestedMenuItem:c(t,"nestedmenuitem"),addToggleMenuItem:c(t,"togglemenuitem"),addAutocompleter:c(o,"autocompleter"),addContextMenu:c(r,"contextmenu"),addContextToolbar:c(i,"contexttoolbar"),addContextForm:((e,t)=>(o,n)=>{e[o.toLowerCase()]={type:t,...n}})(i,"contextform"),addSidebar:c(a,"sidebar"),addView:c(l,"views"),addIcon:(e,t)=>n[e.toLowerCase()]=t,addContext:(e,t)=>s[e.toLowerCase()]=t,getAll:()=>({buttons:e,menuItems:t,icons:n,popups:o,contextMenus:r,contextToolbars:i,sidebars:a,views:l,contexts:s})}})();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addGroupToolbarButton:e.addGroupToolbarButton,addToggleMenuItem:e.addToggleMenuItem,addView:e.addView,addContext:e.addContext,getAll:e.getAll}},dI=ga.DOM,uI=lo.extend,hI=lo.each;class mI{constructor(e,t,o){this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.composing=!1,this.destroyed=!1,this.hasHiddenInput=!1,this.iframeElement=null,this.initialized=!1,this.readonly=!1,this.removed=!1,this.startContent="",this._pendingNativeEvents=[],this._skinLoaded=!1,this._editableRoot=!0,this.editorManager=o,this.documentBaseUrl=o.documentBaseURL,uI(this,WN);const n=this;this.id=e,this.hidden=!1;const r=((e,t)=>{const o=Fe(t);return uN(nN||rN,nN,o,e,o)})(o.defaultOptions,t);this.options=XN(0,r,t),(e=>{const t=e.options.register;t("id",{processor:"string",default:e.id}),t("selector",{processor:"string"}),t("target",{processor:"object"}),t("suffix",{processor:"string"}),t("cache_suffix",{processor:"string"}),t("base_url",{processor:"string"}),t("referrer_policy",{processor:"string",default:""}),t("language_load",{processor:"boolean",default:!0}),t("inline",{processor:"boolean",default:!1}),t("iframe_attrs",{processor:"object",default:{}}),t("doctype",{processor:"string",default:"<!DOCTYPE html>"}),t("document_base_url",{processor:"string",default:e.documentBaseUrl}),t("body_id",{processor:zc(e,"tinymce"),default:"tinymce"}),t("body_class",{processor:zc(e),default:""}),t("content_security_policy",{processor:"string",default:""}),t("br_in_pre",{processor:"boolean",default:!0}),t("forced_root_block",{processor:e=>{const t=p(e)&&ot(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),t("forced_root_block_attrs",{processor:"object",default:{}}),t("newline_behavior",{processor:e=>{const t=Z(["block","linebreak","invert","default"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),t("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),t("no_newline_selector",{processor:"string",default:""}),t("keep_styles",{processor:"boolean",default:!0}),t("end_container_on_empty_block",{processor:e=>y(e)||p(e)?{valid:!0,value:e}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),t("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),t("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),t("font_size_classes",{processor:"string",default:""}),t("automatic_uploads",{processor:"boolean",default:!0}),t("images_reuse_filename",{processor:"boolean",default:!1}),t("images_replace_blob_uris",{processor:"boolean",default:!0}),t("icons",{processor:"string",default:""}),t("icons_url",{processor:"string",default:""}),t("images_upload_url",{processor:"string",default:""}),t("images_upload_base_path",{processor:"string",default:""}),t("images_upload_credentials",{processor:"boolean",default:!1}),t("images_upload_handler",{processor:"function"}),t("language",{processor:"string",default:"en"}),t("language_url",{processor:"string",default:""}),t("entity_encoding",{processor:"string",default:"named"}),t("indent",{processor:"boolean",default:!0}),t("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),t("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),t("indent_use_margin",{processor:"boolean",default:!1}),t("indentation",{processor:"string",default:"40px"}),t("content_css",{processor:e=>{const t=!1===e||p(e)||k(e,p);return t?p(e)?{value:W(e.split(","),Qe),valid:t}:b(e)?{value:e,valid:t}:!1===e?{value:[],valid:t}:{value:e,valid:t}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:Rd(e)?[]:["default"]}),t("content_style",{processor:"string"}),t("content_css_cors",{processor:"boolean",default:!1}),t("font_css",{processor:e=>{const t=p(e)||k(e,p);return t?{value:b(e)?e:W(e.split(","),Qe),valid:t}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),t("extended_mathml_attributes",{processor:"string[]"}),t("extended_mathml_elements",{processor:"string[]"}),t("inline_boundaries",{processor:"boolean",default:!0}),t("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),t("object_resizing",{processor:e=>{const t=y(e)||p(e);return t?!1===e||Dc.isiPhone()||Dc.isiPad()?{value:"",valid:t}:{value:!0===e?"table,img,figure.image,div,video,iframe":e,valid:t}:{valid:!1,message:"Must be boolean or a string"}},default:!Lc}),t("resize_img_proportional",{processor:"boolean",default:!0}),t("event_root",{processor:"string"}),t("service_message",{processor:"string"}),t("onboarding",{processor:"boolean",default:!0}),t("tiny_cloud_entry_url",{processor:"string"}),t("theme",{processor:e=>!1===e||p(e)||S(e),default:"silver"}),t("theme_url",{processor:"string"}),t("formats",{processor:"object"}),t("format_empty_lines",{processor:"boolean",default:!1}),t("format_noneditable_selector",{processor:"string",default:""}),t("preview_styles",{processor:e=>{const t=!1===e||p(e);return t?{value:!1===e?"":e,valid:t}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),t("custom_ui_selector",{processor:"string",default:""}),t("hidden_input",{processor:"boolean",default:!0}),t("submit_patch",{processor:"boolean",default:!0}),t("encoding",{processor:"string"}),t("add_form_submit_trigger",{processor:"boolean",default:!0}),t("add_unload_trigger",{processor:"boolean",default:!0}),t("custom_undo_redo_levels",{processor:"number",default:0}),t("disable_nodechange",{processor:"boolean",default:!1}),t("disabled",{processor:t=>y(t)?(e.initialized&&Lu(e)!==t&&Promise.resolve().then((()=>{((e,t)=>{e.dispatch("DisabledStateChange",{state:t})})(e,t)})),{valid:!0,value:t}):{valid:!1,message:"The value must be a boolean."},default:!1}),t("readonly",{processor:"boolean",default:!1}),t("editable_root",{processor:"boolean",default:!0}),t("plugins",{processor:"string[]",default:[]}),t("external_plugins",{processor:"object"}),t("forced_plugins",{processor:"string[]"}),t("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"}),t("model_url",{processor:"string"}),t("block_unsupported_drop",{processor:"boolean",default:!0}),t("visual",{processor:"boolean",default:!0}),t("visual_table_class",{processor:"string",default:"mce-item-table"}),t("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),t("iframe_aria_text",{processor:"string",default:"Rich Text Area".concat(e.hasPlugin("help")?". Press ALT-0 for help.":"")}),t("setup",{processor:"function"}),t("init_instance_callback",{processor:"function"}),t("url_converter",{processor:"function",default:e.convertURL}),t("url_converter_scope",{processor:"object",default:e}),t("urlconverter_callback",{processor:"function"}),t("allow_conditional_comments",{processor:"boolean",default:!1}),t("allow_html_data_urls",{processor:"boolean",default:!1}),t("allow_svg_data_urls",{processor:"boolean"}),t("allow_html_in_named_anchor",{processor:"boolean",default:!1}),t("allow_script_urls",{processor:"boolean",default:!1}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("allow_mathml_annotation_encodings",{processor:e=>{const t=k(e,p);return t?{value:e,valid:t}:{valid:!1,message:"Must be an array of strings."}},default:[]}),t("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),t("fix_list_elements",{processor:"boolean",default:!1}),t("preserve_cdata",{processor:"boolean",default:!1}),t("remove_trailing_brs",{processor:"boolean",default:!0}),t("pad_empty_with_br",{processor:"boolean",default:!1}),t("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),t("element_format",{processor:"string",default:"html"}),t("entities",{processor:"string"}),t("schema",{processor:"string",default:"html5"}),t("convert_urls",{processor:"boolean",default:!0}),t("relative_urls",{processor:"boolean",default:!0}),t("remove_script_host",{processor:"boolean",default:!0}),t("custom_elements",{processor:Bc}),t("extended_valid_elements",{processor:"string"}),t("invalid_elements",{processor:"string"}),t("invalid_styles",{processor:Bc}),t("valid_children",{processor:"string"}),t("valid_classes",{processor:Bc}),t("valid_elements",{processor:"string"}),t("valid_styles",{processor:Bc}),t("verify_html",{processor:"boolean",default:!0}),t("auto_focus",{processor:e=>p(e)||!0===e}),t("browser_spellcheck",{processor:"boolean",default:!1}),t("protect",{processor:"array"}),t("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),t("deprecation_warnings",{processor:"boolean",default:!0}),t("a11y_advanced_options",{processor:"boolean",default:!1}),t("api_key",{processor:"string"}),t("license_key",{processor:"string"}),t("paste_block_drop",{processor:"boolean",default:!1}),t("paste_data_images",{processor:"boolean",default:!0}),t("paste_preprocess",{processor:"function"}),t("paste_postprocess",{processor:"function"}),t("paste_webkit_styles",{processor:"string",default:"none"}),t("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),t("paste_merge_formats",{processor:"boolean",default:!0}),t("smart_paste",{processor:"boolean",default:!0}),t("paste_as_text",{processor:"boolean",default:!1}),t("paste_tab_spaces",{processor:"number",default:4}),t("text_patterns",{processor:e=>k(e,g)||!1===e?{value:Cc(!1===e?[]:e),valid:!0}:{valid:!1,message:"Must be an array of objects or false."},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1",trigger:"space"},{start:"##",format:"h2",trigger:"space"},{start:"###",format:"h3",trigger:"space"},{start:"####",format:"h4",trigger:"space"},{start:"#####",format:"h5",trigger:"space"},{start:"######",format:"h6",trigger:"space"},{start:"1.",cmd:"InsertOrderedList",trigger:"space"},{start:"*",cmd:"InsertUnorderedList",trigger:"space"},{start:"-",cmd:"InsertUnorderedList",trigger:"space"},{start:">",cmd:"mceBlockQuote",trigger:"space"},{start:"---",cmd:"InsertHorizontalRule",trigger:"space"}]}),t("text_patterns_lookup",{processor:e=>{return S(e)?{value:(t=e,e=>{const o=t(e);return Cc(o)}),valid:!0}:{valid:!1,message:"Must be a single function"};var t},default:e=>[]}),t("noneditable_class",{processor:"string",default:"mceNonEditable"}),t("editable_class",{processor:"string",default:"mceEditable"}),t("noneditable_regexp",{processor:e=>k(e,Nc)?{value:e,valid:!0}:Nc(e)?{value:[e],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),t("table_tab_navigation",{processor:"boolean",default:!0}),t("highlight_on_focus",{processor:"boolean",default:!0}),t("xss_sanitization",{processor:"boolean",default:!0}),t("details_initial_state",{processor:e=>{const t=Z(["inherited","collapsed","expanded"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("details_serialized_state",{processor:e=>{const t=Z(["inherited","collapsed","expanded"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("init_content_sync",{processor:"boolean",default:!1}),t("newdocument_content",{processor:"string",default:""}),t("sandbox_iframes",{processor:"boolean",default:!0}),t("sandbox_iframes_exclusions",{processor:"string[]",default:["youtube.com","youtu.be","vimeo.com","player.vimeo.com","dailymotion.com","embed.music.apple.com","open.spotify.com","giphy.com","dai.ly","codepen.io"]}),t("convert_unsafe_embeds",{processor:"boolean",default:!0}),e.on("ScriptsLoaded",(()=>{t("directionality",{processor:"string",default:wa.isRtl()?"rtl":void 0}),t("placeholder",{processor:"string",default:Rc.getAttrib(e.getElement(),"placeholder")})}))})(n);const i=this.options.get;i("deprecation_warnings")&&AS(t,r);const s=i("suffix");s&&(o.suffix=s),this.suffix=o.suffix;const a=i("base_url");a&&o._setBaseUrl(a),this.baseUri=o.baseURI;const l=cd(n);l&&(ba.ScriptLoader._setReferrerPolicy(l),ga.DOM.styleSheetLoader._setReferrerPolicy(l));const c=Ud(n);_(c)&&ga.DOM.styleSheetLoader._setContentCssCors(c),_a.languageLoad=i("language_load"),_a.baseURL=o.baseURL,this.setDirty(!1),this.documentBaseURI=new Gw(jc(n),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=Rd(n),this.hasVisual=qd(n),this.shortcuts=new lI(this),this.editorCommands=new IN(this),LN(this);const d=i("cache_suffix");d&&(ro.cacheSuffix=d.replace(/^[\?\&]+/,"")),this.ui={registry:cI(),styleSheetLoader:void 0,show:E,hide:E,setEnabled:E,isEnabled:z},this.mode=oI(n),o.dispatch("SetupEditor",{editor:this});const u=Xd(n);S(u)&&u.call(n,n)}render(){tN(this)}focus(e){this.execCommand("mceFocus",!1,e)}hasFocus(){return qp(this)}translate(e){return wa.translate(e)}getParam(e,t,o){const n=this.options;return n.isRegistered(e)||(_(o)?n.register(e,{processor:o,default:t}):n.register(e,{processor:z,default:t})),n.isSet(e)||x(t)?n.get(e):t}hasPlugin(e,t){return!!Z(Zd(this),e)&&(!t||void 0!==$S.get(e))}nodeChanged(e){this._nodeChangeDispatcher.nodeChanged(e)}addCommand(e,t,o){this.editorCommands.addCommand(e,t,o)}addQueryStateHandler(e,t,o){this.editorCommands.addQueryStateHandler(e,t,o)}addQueryValueHandler(e,t,o){this.editorCommands.addQueryValueHandler(e,t,o)}addShortcut(e,t,o,n){this.shortcuts.add(e,t,o,n)}execCommand(e,t,o,n){return this.editorCommands.execCommand(e,t,o,n)}queryCommandState(e){return this.editorCommands.queryCommandState(e)}queryCommandValue(e){return this.editorCommands.queryCommandValue(e)}queryCommandSupported(e){return this.editorCommands.queryCommandSupported(e)}show(){const e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable="true":(dI.show(e.getContainer()),dI.hide(e.id)),e.load(),e.dispatch("show"))}hide(){const e=this;e.hidden||(e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(dI.hide(e.getContainer()),dI.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(e,t){this.dispatch("ProgressState",{state:e,time:t})}load(e={}){const t=this,o=t.getElement();if(t.removed)return"";if(o){const n={...e,load:!0},r=ri(o)?o.value:o.innerHTML,i=t.setContent(r,n);return n.no_events||t.dispatch("LoadContent",{...n,element:o}),i}return""}save(e={}){const t=this;let o=t.getElement();if(!o||!t.initialized||t.removed)return"";const n={...e,save:!0,element:o};let r=t.getContent(n);const i={...n,content:r};if(i.no_events||t.dispatch("SaveContent",i),"raw"===i.format&&t.dispatch("RawSaveContent",i),r=i.content,ri(o))o.value=r;else{!e.is_removing&&t.inline||(o.innerHTML=r);const n=dI.getParent(t.id,"form");n&&hI(n.elements,(e=>e.name!==t.id||(e.value=r,!1)))}return i.element=n.element=o=null,!1!==i.set_dirty&&t.setDirty(!1),r}setContent(e,t){return bS(this,e,t)}getContent(e){return fS(this,e)}insertContent(e,t){t&&(e=uI({content:e},t)),this.execCommand("mceInsertContent",!1,e)}resetContent(e){void 0===e?bS(this,this.startContent,{format:"raw"}):bS(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(e){const t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.dispatch("dirty")}getContainer(){const e=this;return e.container||(e.container=e.editorContainer||dI.get(e.id+"_parent")),e.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=dI.get(this.id)),this.targetElm}getWin(){const e=this;if(!e.contentWindow){const t=e.iframeElement;t&&(e.contentWindow=t.contentWindow)}return e.contentWindow}getDoc(){const e=this;if(!e.contentDocument){const t=e.getWin();t&&(e.contentDocument=t.document)}return e.contentDocument}getBody(){var e,t;const o=this.getDoc();return null!==(t=null!==(e=this.bodyElement)&&void 0!==e?e:null==o?void 0:o.body)&&void 0!==t?t:null}convertURL(e,t,o){const n=this,r=n.options.get,i=Qd(n);if(S(i))return i.call(n,e,o,!0,t);if(!r("convert_urls")||"link"===o||g(o)&&"LINK"===o.nodeName||0===e.indexOf("file:")||0===e.length)return e;const s=new Gw(e);return"http"!==s.protocol&&"https"!==s.protocol&&""!==s.protocol?e:r("relative_urls")?n.documentBaseURI.toRelative(e):e=n.documentBaseURI.toAbsolute(e,r("remove_script_host"))}addVisual(e){hN(this,e)}setEditableRoot(e){((e,t)=>{e._editableRoot!==t&&(e._editableRoot=t,nC(e)||(e.getBody().contentEditable=String(e.hasEditableRoot()),e.nodeChanged()),((e,t)=>{e.dispatch("EditableRootStateChange",{state:t})})(e,t))})(this,e)}hasEditableRoot(){return this._editableRoot}remove(){DS(this)}destroy(e){LS(this,e)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const pI=ga.DOM,gI=lo.each;let fI,bI=!1,vI=[];const yI=e=>{const t=e.type;gI(SI.get(),(o=>{switch(t){case"scroll":o.dispatch("ScrollWindow",e);break;case"resize":o.dispatch("ResizeWindow",e)}}))},xI=e=>{if(e!==bI){const t=ga.DOM;e?(t.bind(window,"resize",yI),t.bind(window,"scroll",yI)):(t.unbind(window,"resize",yI),t.unbind(window,"scroll",yI)),bI=e}},wI=e=>{const t=vI;return vI=K(vI,(t=>e!==t)),SI.activeEditor===e&&(SI.activeEditor=vI.length>0?vI[0]:null),SI.focusedEditor===e&&(SI.focusedEditor=null),t.length!==vI.length},_I="CSS1Compat"!==document.compatMode,SI={...HN,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"7",minorVersion:"9.1",releaseDate:"2025-05-29",i18n:wa,activeEditor:null,focusedEditor:null,setup(){const e=this;let t="",o="",n=Gw.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"));const r=window.tinymce||window.tinyMCEPreInit;if(r)t=r.base||r.baseURL,o=r.suffix;else{const e=document.getElementsByTagName("script");for(let n=0;n<e.length;n++){const r=e[n].src||"";if(""===r)continue;const i=r.substring(r.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)){-1!==i.indexOf(".min")&&(o=".min"),t=r.substring(0,r.lastIndexOf("/"));break}}if(!t&&document.currentScript){const e=document.currentScript.src;-1!==e.indexOf(".min")&&(o=".min"),t=e.substring(0,e.lastIndexOf("/"))}}var i;e.baseURL=new Gw(n).toAbsolute(t),e.documentBaseURL=n,e.baseURI=new Gw(e.baseURL),e.suffix=o,(i=e).on("AddEditor",D(jp,i)),i.on("RemoveEditor",D(Vp,i))},overrideDefaults(e){const t=e.base_url;t&&this._setBaseUrl(t);const o=e.suffix;o&&(this.suffix=o),this.defaultOptions=e;const n=e.plugin_base_urls;void 0!==n&&be(n,((e,t)=>{_a.PluginManager.urls[t]=e}))},init(e){const t=this;let o;const n=lo.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," ");let r=e=>{o=e};const i=()=>{let o=0;const s=[];let a;pI.unbind(window,"ready",i),(o=>{const n=e[o];if(n)n.apply(t,[])})("onpageload"),a=pe((e=>ro.browser.isIE()||ro.browser.isEdge()?(JS("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tiny.cloud/docs/tinymce/7/support/#supportedwebbrowsers"),[]):_I?(JS("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):p(e.selector)?pI.select(e.selector):_(e.target)?[e.target]:[])(e)),lo.each(a,(e=>{var o;(o=t.get(e.id))&&o.initialized&&!(o.getContainer()||o.getBody()).parentNode&&(wI(o),o.unbindAllNativeEvents(),o.destroy(!0),o.removed=!0)})),a=lo.grep(a,(e=>!t.get(e.id))),0===a.length?r([]):gI(a,(i=>{((e,t)=>e.inline&&t.tagName.toLowerCase()in n)(e,i)?JS("Could not initialize inline editor on invalid inline target element",i):((e,n,i)=>{const l=new mI(e,n,t);s.push(l),l.on("init",(()=>{++o===a.length&&r(s)})),l.targetElm=l.targetElm||i,l.render()})((e=>{let t=e.id;return t||(t=ke(e,"name").filter((e=>!pI.get(e))).getOrThunk(pI.uniqueId),e.setAttribute("id",t)),t})(i),e,i)}))};return pI.bind(window,"ready",i),new Promise((e=>{o?e(o):r=t=>{e(t)}}))},get(e){return 0===arguments.length?vI.slice(0):p(e)?ee(vI,(t=>t.id===e)).getOr(null):C(e)&&vI[e]?vI[e]:null},add(e){const t=this,o=t.get(e.id);return o===e||(null===o&&vI.push(e),xI(!0),t.activeEditor=e,t.dispatch("AddEditor",{editor:e}),fI||(fI=e=>{const o=t.dispatch("BeforeUnload");if(o.returnValue)return e.preventDefault(),e.returnValue=o.returnValue,o.returnValue},window.addEventListener("beforeunload",fI))),e},createEditor(e,t){return this.add(new mI(e,t,this))},remove(e){const t=this;let o;if(e){if(!p(e))return o=e,v(t.get(o.id))?null:(wI(o)&&t.dispatch("RemoveEditor",{editor:o}),0===vI.length&&window.removeEventListener("beforeunload",fI),o.remove(),xI(vI.length>0),o);gI(pI.select(e),(e=>{o=t.get(e.id),o&&t.remove(o)}))}else for(let e=vI.length-1;e>=0;e--)t.remove(vI[e])},execCommand(e,t,o){var n;const r=this,i=g(o)?null!==(n=o.id)&&void 0!==n?n:o.index:o;switch(e){case"mceAddEditor":if(!r.get(i)){const e=o.options;new mI(i,e,r).render()}return!0;case"mceRemoveEditor":{const e=r.get(i);return e&&e.remove(),!0}case"mceToggleEditor":{const e=r.get(i);return e?(e.isHidden()?e.show():e.hide(),!0):(r.execCommand("mceAddEditor",!1,o),!0)}}return!!r.activeEditor&&r.activeEditor.execCommand(e,t,o)},triggerSave:()=>{gI(vI,(e=>{e.save()}))},addI18n:(e,t)=>{wa.add(e,t)},translate:e=>wa.translate(e),setActive(e){const t=this.activeEditor;this.activeEditor!==e&&(t&&t.dispatch("deactivate",{relatedTarget:e}),e.dispatch("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl(e){this.baseURL=new Gw(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new Gw(this.baseURL)}};SI.setup();const CI=(()=>{const e=We();return{FakeClipboardItem:e=>({items:e,types:ge(e),getType:t=>ke(e,t).getOrUndefined()}),write:t=>{e.set(t)},read:()=>e.get().getOrUndefined(),clear:e.clear}})(),kI=Math.min,EI=Math.max,TI=Math.round,OI=(e,t,o)=>{let n=t.x,r=t.y;const i=e.w,s=e.h,a=t.w,l=t.h,c=(o||"").split("");return"b"===c[0]&&(r+=l),"r"===c[1]&&(n+=a),"c"===c[0]&&(r+=TI(l/2)),"c"===c[1]&&(n+=TI(a/2)),"b"===c[3]&&(r-=s),"r"===c[4]&&(n-=i),"c"===c[3]&&(r-=TI(s/2)),"c"===c[4]&&(n-=TI(i/2)),AI(n,r,i,s)},AI=(e,t,o,n)=>({x:e,y:t,w:o,h:n}),MI={inflate:(e,t,o)=>AI(e.x-t,e.y-o,e.w+2*t,e.h+2*o),relativePosition:OI,findBestRelativePosition:(e,t,o,n)=>{for(let r=0;r<n.length;r++){const i=OI(e,t,n[r]);if(i.x>=o.x&&i.x+i.w<=o.w+o.x&&i.y>=o.y&&i.y+i.h<=o.h+o.y)return n[r]}return null},intersect:(e,t)=>{const o=EI(e.x,t.x),n=EI(e.y,t.y),r=kI(e.x+e.w,t.x+t.w),i=kI(e.y+e.h,t.y+t.h);return r-o<0||i-n<0?null:AI(o,n,r-o,i-n)},clamp:(e,t,o)=>{let n=e.x,r=e.y,i=e.x+e.w,s=e.y+e.h;const a=t.x+t.w,l=t.y+t.h,c=EI(0,t.x-n),d=EI(0,t.y-r),u=EI(0,i-a),h=EI(0,s-l);return n+=c,r+=d,o&&(i+=c,s+=d,n-=u,r-=h),i-=u,s-=h,AI(n,r,i-n,s-r)},create:AI,fromClientRect:e=>AI(e.left,e.top,e.width,e.height)},PI=(()=>{const e={},t={},o={};return{load:(o,n)=>{const r=`Script at URL "${n}" failed to load`,i=`Script at URL "${n}" did not call \`tinymce.Resource.add('${o}', data)\` within 1 second`;if(void 0!==e[o])return e[o];{const s=new Promise(((e,s)=>{const a=((e,t,o=1e3)=>{let n=!1,r=null;const i=e=>(...t)=>{n||(n=!0,null!==r&&(window.clearTimeout(r),r=null),e.apply(null,t))},s=i(e),a=i(t);return{start:(...e)=>{n||null!==r||(r=window.setTimeout((()=>a.apply(null,e)),o))},resolve:s,reject:a}})(e,s);t[o]=a.resolve,ba.ScriptLoader.loadScript(n).then((()=>a.start(i)),(()=>a.reject(r)))}));return e[o]=s,s}},add:(n,r)=>{void 0!==t[n]&&(t[n](r),delete t[n]),e[n]=Promise.resolve(r),o[n]=r},has:e=>e in o,get:e=>o[e],unload:t=>{delete e[t],delete o[t]}}})();let DI;try{const e="__storage_test__";DI=window.localStorage,DI.setItem(e,e),DI.removeItem(e)}catch(e){DI=(()=>{let e={},t=[];const o={getItem:t=>e[t]||null,setItem:(o,n)=>{t.push(o),e[o]=String(n)},key:e=>t[e],removeItem:o=>{t=t.filter((e=>e===o)),delete e[o]},clear:()=>{t=[],e={}},length:0};return Object.defineProperty(o,"length",{get:()=>t.length,configurable:!1,enumerable:!1}),o})()}const LI={geom:{Rect:MI},util:{Delay:Pp,Tools:lo,VK:Xp,URI:Gw,EventDispatcher:zN,Observable:HN,I18n:wa,LocalStorage:DI,ImageUploader:e=>{const t=pC(),o=yC(e,t);return{upload:(t,n=!0)=>o.upload(t,n?vC(e):void 0)}}},dom:{EventUtils:ia,TreeWalker:Ur,TextSeeker:Ia,DOMUtils:ga,ScriptLoader:ba,RangeUtils:pg,Serializer:gS,StyleSheetLoader:ts,ControlSelection:og,BookmarkManager:yp,Selection:cS,Event:ia.Event},html:{Styles:Ys,Entities:xs,Node:Vg,Schema:Fs,DomParser:u_,Writer:lf,Serializer:cf},Env:ro,AddOnManager:_a,Annotator:vp,Formatter:LC,UndoManager:NC,EditorCommands:IN,WindowManager:qS,NotificationManager:ZS,EditorObservable:WN,Shortcuts:lI,Editor:mI,FocusManager:Mp,EditorManager:SI,DOM:ga.DOM,ScriptLoader:ba.ScriptLoader,PluginManager:$S,ThemeManager:WS,ModelManager:NS,IconManager:RS,Resource:PI,FakeClipboard:CI,trim:lo.trim,isArray:lo.isArray,is:lo.is,toArray:lo.toArray,makeMap:lo.makeMap,each:lo.each,map:lo.map,grep:lo.grep,inArray:lo.inArray,extend:lo.extend,walk:lo.walk,resolve:lo.resolve,explode:lo.explode,_addCacheSuffix:lo._addCacheSuffix},RI=lo.extend(SI,LI);(e=>{window.tinymce=e,window.tinyMCE=e})(RI),(t=>{try{e.exports=t}catch(e){}})(RI)}()},10509:(e,t,o)=>{"use strict";var n=o(69985),r=o(23691),i=TypeError;e.exports=function(e){if(n(e))return e;throw new i(r(e)+" is not a function")}},52655:(e,t,o)=>{"use strict";var n=o(19429),r=o(23691),i=TypeError;e.exports=function(e){if(n(e))return e;throw new i(r(e)+" is not a constructor")}},23550:(e,t,o)=>{"use strict";var n=o(60598),r=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw new i("Can't set "+r(e)+" as a prototype")}},87370:(e,t,o)=>{"use strict";var n=o(44201),r=o(25391),i=o(72560).f,s=n("unscopables"),a=Array.prototype;void 0===a[s]&&i(a,s,{configurable:!0,value:r(null)}),e.exports=function(e){a[s][e]=!0}},71514:(e,t,o)=>{"use strict";var n=o(10730).charAt;e.exports=function(e,t,o){return t+(o?n(e,t).length:1)}},767:(e,t,o)=>{"use strict";var n=o(23622),r=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new r("Incorrect invocation")}},85027:(e,t,o)=>{"use strict";var n=o(48999),r=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw new i(r(e)+" is not an object")}},57612:(e,t,o)=>{"use strict";var n=o(2960).forEach,r=o(16834)("forEach");e.exports=r?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},21055:(e,t,o)=>{"use strict";var n=o(54071),r=o(22615),i=o(90690),s=o(71228),a=o(93292),l=o(19429),c=o(6310),d=o(76522),u=o(5185),h=o(91664),m=Array;e.exports=function(e){var t=i(e),o=l(this),p=arguments.length,g=p>1?arguments[1]:void 0,f=void 0!==g;f&&(g=n(g,p>2?arguments[2]:void 0));var b,v,y,x,w,_,S=h(t),C=0;if(!S||this===m&&a(S))for(b=c(t),v=o?new this(b):m(b);b>C;C++)_=f?g(t[C],C):t[C],d(v,C,_);else for(v=o?new this:[],w=(x=u(t,S)).next;!(y=r(w,x)).done;C++)_=f?s(x,g,[y.value,C],!0):y.value,d(v,C,_);return v.length=C,v}},84328:(e,t,o)=>{"use strict";var n=o(65290),r=o(27578),i=o(6310),s=function(e){return function(t,o,s){var a=n(t),l=i(a);if(0===l)return!e&&-1;var c,d=r(s,l);if(e&&o!=o){for(;l>d;)if((c=a[d++])!=c)return!0}else for(;l>d;d++)if((e||d in a)&&a[d]===o)return e||d||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},2960:(e,t,o)=>{"use strict";var n=o(54071),r=o(68844),i=o(94413),s=o(90690),a=o(6310),l=o(27120),c=r([].push),d=function(e){var t=1===e,o=2===e,r=3===e,d=4===e,u=6===e,h=7===e,m=5===e||u;return function(p,g,f,b){for(var v,y,x=s(p),w=i(x),_=a(w),S=n(g,f),C=0,k=b||l,E=t?k(p,_):o||h?k(p,0):void 0;_>C;C++)if((m||C in w)&&(y=S(v=w[C],C,x),e))if(t)E[C]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return C;case 2:c(E,v)}else switch(e){case 4:return!1;case 7:c(E,v)}return u?-1:r||d?d:E}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(7)}},29042:(e,t,o)=>{"use strict";var n=o(3689),r=o(44201),i=o(21352),s=r("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},16834:(e,t,o)=>{"use strict";var n=o(3689);e.exports=function(e,t){var o=[][e];return!!o&&n((function(){o.call(null,t||function(){return 1},1)}))}},5649:(e,t,o)=>{"use strict";var n=o(67697),r=o(92297),i=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(r(e)&&!s(e,"length").writable)throw new i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},96004:(e,t,o)=>{"use strict";var n=o(68844);e.exports=n([].slice)},25271:(e,t,o)=>{"use strict";var n=o(92297),r=o(19429),i=o(48999),s=o(44201)("species"),a=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(r(t)&&(t===a||n(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?a:t}},27120:(e,t,o)=>{"use strict";var n=o(25271);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},71228:(e,t,o)=>{"use strict";var n=o(85027),r=o(72125);e.exports=function(e,t,o,i){try{return i?t(n(o)[0],o[1]):t(o)}catch(t){r(e,"throw",t)}}},86431:(e,t,o)=>{"use strict";var n=o(44201)("iterator"),r=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){r=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!r)return!1}catch(e){return!1}var o=!1;try{var i={};i[n]=function(){return{next:function(){return{done:o=!0}}}},e(i)}catch(e){}return o}},6648:(e,t,o)=>{"use strict";var n=o(68844),r=n({}.toString),i=n("".slice);e.exports=function(e){return i(r(e),8,-1)}},50926:(e,t,o)=>{"use strict";var n=o(23043),r=o(69985),i=o(6648),s=o(44201)("toStringTag"),a=Object,l="Arguments"===i(function(){return arguments}());e.exports=n?i:function(e){var t,o,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?o:l?i(t):"Object"===(n=i(t))&&r(t.callee)?"Arguments":n}},8758:(e,t,o)=>{"use strict";var n=o(36812),r=o(19152),i=o(82474),s=o(72560);e.exports=function(e,t,o){for(var a=r(t),l=s.f,c=i.f,d=0;d<a.length;d++){var u=a[d];n(e,u)||o&&n(o,u)||l(e,u,c(t,u))}}},27413:(e,t,o)=>{"use strict";var n=o(44201)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(o){try{return t[n]=!1,"/./"[e](t)}catch(e){}}return!1}},81748:(e,t,o)=>{"use strict";var n=o(3689);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},27807:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},75773:(e,t,o)=>{"use strict";var n=o(67697),r=o(72560),i=o(75684);e.exports=n?function(e,t,o){return r.f(e,t,i(1,o))}:function(e,t,o){return e[t]=o,e}},75684:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},76522:(e,t,o)=>{"use strict";var n=o(67697),r=o(72560),i=o(75684);e.exports=function(e,t,o){n?r.f(e,t,i(0,o)):e[t]=o}},81797:(e,t,o)=>{"use strict";var n=o(85027),r=o(35899),i=TypeError;e.exports=function(e){if(n(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new i("Incorrect hint");return r(this,e)}},62148:(e,t,o)=>{"use strict";var n=o(98702),r=o(72560);e.exports=function(e,t,o){return o.get&&n(o.get,t,{getter:!0}),o.set&&n(o.set,t,{setter:!0}),r.f(e,t,o)}},11880:(e,t,o)=>{"use strict";var n=o(69985),r=o(72560),i=o(98702),s=o(95014);e.exports=function(e,t,o,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(n(o)&&i(o,c,a),a.global)l?e[t]=o:s(t,o);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=o:r.f(e,t,{value:o,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},95014:(e,t,o)=>{"use strict";var n=o(51087),r=Object.defineProperty;e.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(o){n[e]=t}return t}},67697:(e,t,o)=>{"use strict";var n=o(3689);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},36420:(e,t,o)=>{"use strict";var n=o(51087),r=o(48999),i=n.document,s=r(i)&&r(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},55565:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},66338:e=>{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},33265:(e,t,o)=>{"use strict";var n=o(36420)("span").classList,r=n&&n.constructor&&n.constructor.prototype;e.exports=r===Object.prototype?void 0:r},72739:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},17636:(e,t,o)=>{"use strict";var n=o(68017);e.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},41631:(e,t,o)=>{"use strict";var n=o(68017);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},30240:(e,t,o)=>{"use strict";var n=o(39791);e.exports="NODE"===n},9976:(e,t,o)=>{"use strict";var n=o(68017);e.exports=/web0s(?!.*chrome)/i.test(n)},68017:(e,t,o)=>{"use strict";var n=o(51087).navigator,r=n&&n.userAgent;e.exports=r?String(r):""},21352:(e,t,o)=>{"use strict";var n,r,i=o(51087),s=o(68017),a=i.process,l=i.Deno,c=a&&a.versions||l&&l.version,d=c&&c.v8;d&&(r=(n=d.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(r=+n[1]),e.exports=r},39791:(e,t,o)=>{"use strict";var n=o(51087),r=o(68017),i=o(6648),s=function(e){return r.slice(0,e.length)===e};e.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},56610:(e,t,o)=>{"use strict";var n=o(68844),r=Error,i=n("".replace),s=String(new r("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);e.exports=function(e,t){if(l&&"string"==typeof e&&!r.prepareStackTrace)for(;t--;)e=i(e,a,"");return e}},65411:(e,t,o)=>{"use strict";var n=o(75773),r=o(56610),i=o(49599),s=Error.captureStackTrace;e.exports=function(e,t,o,a){i&&(s?s(e,t):n(e,"stack",r(o,a)))}},49599:(e,t,o)=>{"use strict";var n=o(3689),r=o(75684);e.exports=!n((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)}))},20445:(e,t,o)=>{"use strict";var n=o(67697),r=o(3689),i=o(85027),s=o(13841),a=Error.prototype.toString,l=r((function(){if(n){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==a.call(e))return!0}return"2: 1"!==a.call({message:1,name:2})||"Error"!==a.call({})}));e.exports=l?function(){var e=i(this),t=s(e.name,"Error"),o=s(e.message);return t?o?t+": "+o:t:o}:a},79989:(e,t,o)=>{"use strict";var n=o(51087),r=o(82474).f,i=o(75773),s=o(11880),a=o(95014),l=o(8758),c=o(35266);e.exports=function(e,t){var o,d,u,h,m,p=e.target,g=e.global,f=e.stat;if(o=g?n:f?n[p]||a(p,{}):n[p]&&n[p].prototype)for(d in t){if(h=t[d],u=e.dontCallGetSet?(m=r(o,d))&&m.value:o[d],!c(g?d:p+(f?".":"#")+d,e.forced)&&void 0!==u){if(typeof h==typeof u)continue;l(h,u)}(e.sham||u&&u.sham)&&i(h,"sham",!0),s(o,d,h,e)}}},3689:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},65773:(e,t,o)=>{"use strict";o(64043);var n=o(22615),r=o(11880),i=o(56308),s=o(3689),a=o(44201),l=o(75773),c=a("species"),d=RegExp.prototype;e.exports=function(e,t,o,u){var h=a(e),m=!s((function(){var t={};return t[h]=function(){return 7},7!==""[e](t)})),p=m&&!s((function(){var t=!1,o=/a/;return"split"===e&&((o={}).constructor={},o.constructor[c]=function(){return o},o.flags="",o[h]=/./[h]),o.exec=function(){return t=!0,null},o[h](""),!t}));if(!m||!p||o){var g=/./[h],f=t(h,""[e],(function(e,t,o,r,s){var a=t.exec;return a===i||a===d.exec?m&&!s?{done:!0,value:n(g,t,o,r)}:{done:!0,value:n(e,o,t,r)}:{done:!1}}));r(String.prototype,e,f[0]),r(d,h,f[1])}u&&l(d[h],"sham",!0)}},61735:(e,t,o)=>{"use strict";var n=o(97215),r=Function.prototype,i=r.apply,s=r.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?s.bind(i):function(){return s.apply(i,arguments)})},54071:(e,t,o)=>{"use strict";var n=o(46576),r=o(10509),i=o(97215),s=n(n.bind);e.exports=function(e,t){return r(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},97215:(e,t,o)=>{"use strict";var n=o(3689);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},86761:(e,t,o)=>{"use strict";var n=o(68844),r=o(10509),i=o(48999),s=o(36812),a=o(96004),l=o(97215),c=Function,d=n([].concat),u=n([].join),h={};e.exports=l?c.bind:function(e){var t=r(this),o=t.prototype,n=a(arguments,1),l=function(){var o=d(n,a(arguments));return this instanceof l?function(e,t,o){if(!s(h,t)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";h[t]=c("C,a","return new C("+u(n,",")+")")}return h[t](e,o)}(t,o.length,o):t.apply(e,o)};return i(o)&&(l.prototype=o),l}},22615:(e,t,o)=>{"use strict";var n=o(97215),r=Function.prototype.call;e.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},41236:(e,t,o)=>{"use strict";var n=o(67697),r=o(36812),i=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=r(i,"name"),l=a&&"something"===function(){}.name,c=a&&(!n||n&&s(i,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},52743:(e,t,o)=>{"use strict";var n=o(68844),r=o(10509);e.exports=function(e,t,o){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},46576:(e,t,o)=>{"use strict";var n=o(6648),r=o(68844);e.exports=function(e){if("Function"===n(e))return r(e)}},68844:(e,t,o)=>{"use strict";var n=o(97215),r=Function.prototype,i=r.call,s=n&&r.bind.bind(i,i);e.exports=n?s:function(e){return function(){return i.apply(e,arguments)}}},76058:(e,t,o)=>{"use strict";var n=o(51087),r=o(69985);e.exports=function(e,t){return arguments.length<2?(o=n[e],r(o)?o:void 0):n[e]&&n[e][t];var o}},91664:(e,t,o)=>{"use strict";var n=o(50926),r=o(54849),i=o(981),s=o(9478),a=o(44201)("iterator");e.exports=function(e){if(!i(e))return r(e,a)||r(e,"@@iterator")||s[n(e)]}},5185:(e,t,o)=>{"use strict";var n=o(22615),r=o(10509),i=o(85027),s=o(23691),a=o(91664),l=TypeError;e.exports=function(e,t){var o=arguments.length<2?a(e):t;if(r(o))return i(n(o,e));throw new l(s(e)+" is not iterable")}},92643:(e,t,o)=>{"use strict";var n=o(68844),r=o(92297),i=o(69985),s=o(6648),a=o(34327),l=n([].push);e.exports=function(e){if(i(e))return e;if(r(e)){for(var t=e.length,o=[],n=0;n<t;n++){var c=e[n];"string"==typeof c?l(o,c):"number"!=typeof c&&"Number"!==s(c)&&"String"!==s(c)||l(o,a(c))}var d=o.length,u=!0;return function(e,t){if(u)return u=!1,t;if(r(this))return t;for(var n=0;n<d;n++)if(o[n]===e)return t}}}},54849:(e,t,o)=>{"use strict";var n=o(10509),r=o(981);e.exports=function(e,t){var o=e[t];return r(o)?void 0:n(o)}},27017:(e,t,o)=>{"use strict";var n=o(68844),r=o(90690),i=Math.floor,s=n("".charAt),a=n("".replace),l=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,d=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,o,n,u,h){var m=o+e.length,p=n.length,g=d;return void 0!==u&&(u=r(u),g=c),a(h,g,(function(r,a){var c;switch(s(a,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,o);case"'":return l(t,m);case"<":c=u[l(a,1,-1)];break;default:var d=+a;if(0===d)return r;if(d>p){var h=i(d/10);return 0===h?r:h<=p?void 0===n[h-1]?s(a,1):n[h-1]+s(a,1):r}c=n[d-1]}return void 0===c?"":c}))}},51087:function(e,t,o){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof o.g&&o.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},36812:(e,t,o)=>{"use strict";var n=o(68844),r=o(90690),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(r(e),t)}},57248:e=>{"use strict";e.exports={}},20920:e=>{"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},2688:(e,t,o)=>{"use strict";var n=o(76058);e.exports=n("document","documentElement")},68506:(e,t,o)=>{"use strict";var n=o(67697),r=o(3689),i=o(36420);e.exports=!n&&!r((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},94413:(e,t,o)=>{"use strict";var n=o(68844),r=o(3689),i=o(6648),s=Object,a=n("".split);e.exports=r((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?a(e,""):s(e)}:s},33457:(e,t,o)=>{"use strict";var n=o(69985),r=o(48999),i=o(49385);e.exports=function(e,t,o){var s,a;return i&&n(s=t.constructor)&&s!==o&&r(a=s.prototype)&&a!==o.prototype&&i(e,a),e}},6738:(e,t,o)=>{"use strict";var n=o(68844),r=o(69985),i=o(84091),s=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},62570:(e,t,o)=>{"use strict";var n=o(48999),r=o(75773);e.exports=function(e,t){n(t)&&"cause"in t&&r(e,"cause",t.cause)}},618:(e,t,o)=>{"use strict";var n,r,i,s=o(59834),a=o(51087),l=o(48999),c=o(75773),d=o(36812),u=o(84091),h=o(2713),m=o(57248),p="Object already initialized",g=a.TypeError,f=a.WeakMap;if(s||u.state){var b=u.state||(u.state=new f);b.get=b.get,b.has=b.has,b.set=b.set,n=function(e,t){if(b.has(e))throw new g(p);return t.facade=e,b.set(e,t),t},r=function(e){return b.get(e)||{}},i=function(e){return b.has(e)}}else{var v=h("state");m[v]=!0,n=function(e,t){if(d(e,v))throw new g(p);return t.facade=e,c(e,v,t),t},r=function(e){return d(e,v)?e[v]:{}},i=function(e){return d(e,v)}}e.exports={set:n,get:r,has:i,enforce:function(e){return i(e)?r(e):n(e,{})},getterFor:function(e){return function(t){var o;if(!l(t)||(o=r(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return o}}}},93292:(e,t,o)=>{"use strict";var n=o(44201),r=o(9478),i=n("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||s[i]===e)}},92297:(e,t,o)=>{"use strict";var n=o(6648);e.exports=Array.isArray||function(e){return"Array"===n(e)}},69985:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},19429:(e,t,o)=>{"use strict";var n=o(68844),r=o(3689),i=o(69985),s=o(50926),a=o(76058),l=o(6738),c=function(){},d=a("Reflect","construct"),u=/^\s*(?:class|function)\b/,h=n(u.exec),m=!u.test(c),p=function(e){if(!i(e))return!1;try{return d(c,[],e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return m||!!h(u,l(e))}catch(e){return!0}};g.sham=!0,e.exports=!d||r((function(){var e;return p(p.call)||!p(Object)||!p((function(){e=!0}))||e}))?g:p},35266:(e,t,o)=>{"use strict";var n=o(3689),r=o(69985),i=/#|\.prototype\./,s=function(e,t){var o=l[a(e)];return o===d||o!==c&&(r(t)?n(t):!!t)},a=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",d=s.POLYFILL="P";e.exports=s},981:e=>{"use strict";e.exports=function(e){return null==e}},48999:(e,t,o)=>{"use strict";var n=o(69985);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},60598:(e,t,o)=>{"use strict";var n=o(48999);e.exports=function(e){return n(e)||null===e}},53931:e=>{"use strict";e.exports=!1},91245:(e,t,o)=>{"use strict";var n=o(48999),r=o(6648),i=o(44201)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===r(e))}},30734:(e,t,o)=>{"use strict";var n=o(76058),r=o(69985),i=o(23622),s=o(39525),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&i(t.prototype,a(e))}},18734:(e,t,o)=>{"use strict";var n=o(54071),r=o(22615),i=o(85027),s=o(23691),a=o(93292),l=o(6310),c=o(23622),d=o(5185),u=o(91664),h=o(72125),m=TypeError,p=function(e,t){this.stopped=e,this.result=t},g=p.prototype;e.exports=function(e,t,o){var f,b,v,y,x,w,_,S=o&&o.that,C=!(!o||!o.AS_ENTRIES),k=!(!o||!o.IS_RECORD),E=!(!o||!o.IS_ITERATOR),T=!(!o||!o.INTERRUPTED),O=n(t,S),A=function(e){return f&&h(f,"normal"),new p(!0,e)},M=function(e){return C?(i(e),T?O(e[0],e[1],A):O(e[0],e[1])):T?O(e,A):O(e)};if(k)f=e.iterator;else if(E)f=e;else{if(!(b=u(e)))throw new m(s(e)+" is not iterable");if(a(b)){for(v=0,y=l(e);y>v;v++)if((x=M(e[v]))&&c(g,x))return x;return new p(!1)}f=d(e,b)}for(w=k?e.next:f.next;!(_=r(w,f)).done;){try{x=M(_.value)}catch(e){h(f,"throw",e)}if("object"==typeof x&&x&&c(g,x))return x}return new p(!1)}},72125:(e,t,o)=>{"use strict";var n=o(22615),r=o(85027),i=o(54849);e.exports=function(e,t,o){var s,a;r(e);try{if(!(s=i(e,"return"))){if("throw"===t)throw o;return o}s=n(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw o;if(a)throw s;return r(s),o}},30974:(e,t,o)=>{"use strict";var n=o(12013).IteratorPrototype,r=o(25391),i=o(75684),s=o(55997),a=o(9478),l=function(){return this};e.exports=function(e,t,o,c){var d=t+" Iterator";return e.prototype=r(n,{next:i(+!c,o)}),s(e,d,!1,!0),a[d]=l,e}},91934:(e,t,o)=>{"use strict";var n=o(79989),r=o(22615),i=o(53931),s=o(41236),a=o(69985),l=o(30974),c=o(61868),d=o(49385),u=o(55997),h=o(75773),m=o(11880),p=o(44201),g=o(9478),f=o(12013),b=s.PROPER,v=s.CONFIGURABLE,y=f.IteratorPrototype,x=f.BUGGY_SAFARI_ITERATORS,w=p("iterator"),_="keys",S="values",C="entries",k=function(){return this};e.exports=function(e,t,o,s,p,f,E){l(o,t,s);var T,O,A,M=function(e){if(e===p&&N)return N;if(!x&&e&&e in L)return L[e];switch(e){case _:case S:case C:return function(){return new o(this,e)}}return function(){return new o(this)}},P=t+" Iterator",D=!1,L=e.prototype,R=L[w]||L["@@iterator"]||p&&L[p],N=!x&&R||M(p),I="Array"===t&&L.entries||R;if(I&&(T=c(I.call(new e)))!==Object.prototype&&T.next&&(i||c(T)===y||(d?d(T,y):a(T[w])||m(T,w,k)),u(T,P,!0,!0),i&&(g[P]=k)),b&&p===S&&R&&R.name!==S&&(!i&&v?h(L,"name",S):(D=!0,N=function(){return r(R,this)})),p)if(O={values:M(S),keys:f?N:M(_),entries:M(C)},E)for(A in O)(x||D||!(A in L))&&m(L,A,O[A]);else n({target:t,proto:!0,forced:x||D},O);return i&&!E||L[w]===N||m(L,w,N,{name:p}),g[t]=N,O}},12013:(e,t,o)=>{"use strict";var n,r,i,s=o(3689),a=o(69985),l=o(48999),c=o(25391),d=o(61868),u=o(11880),h=o(44201),m=o(53931),p=h("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(r=d(d(i)))!==Object.prototype&&(n=r):g=!0),!l(n)||s((function(){var e={};return n[p].call(e)!==e}))?n={}:m&&(n=c(n)),a(n[p])||u(n,p,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},9478:e=>{"use strict";e.exports={}},6310:(e,t,o)=>{"use strict";var n=o(43126);e.exports=function(e){return n(e.length)}},98702:(e,t,o)=>{"use strict";var n=o(68844),r=o(3689),i=o(69985),s=o(36812),a=o(67697),l=o(41236).CONFIGURABLE,c=o(6738),d=o(618),u=d.enforce,h=d.get,m=String,p=Object.defineProperty,g=n("".slice),f=n("".replace),b=n([].join),v=a&&!r((function(){return 8!==p((function(){}),"length",{value:8}).length})),y=String(String).split("String"),x=e.exports=function(e,t,o){"Symbol("===g(m(t),0,7)&&(t="["+f(m(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!s(e,"name")||l&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),v&&o&&s(o,"arity")&&e.length!==o.arity&&p(e,"length",{value:o.arity});try{o&&s(o,"constructor")&&o.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=u(e);return s(n,"source")||(n.source=b(y,"string"==typeof t?t:"")),e};Function.prototype.toString=x((function(){return i(this)&&h(this).source||c(this)}),"toString")},58828:e=>{"use strict";var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var n=+e;return(n>0?o:t)(n)}},80231:(e,t,o)=>{"use strict";var n,r,i,s,a,l=o(51087),c=o(70517),d=o(54071),u=o(99886).set,h=o(34410),m=o(41631),p=o(17636),g=o(9976),f=o(30240),b=l.MutationObserver||l.WebKitMutationObserver,v=l.document,y=l.process,x=l.Promise,w=c("queueMicrotask");if(!w){var _=new h,S=function(){var e,t;for(f&&(e=y.domain)&&e.exit();t=_.get();)try{t()}catch(e){throw _.head&&n(),e}e&&e.enter()};m||f||g||!b||!v?!p&&x&&x.resolve?((s=x.resolve(void 0)).constructor=x,a=d(s.then,s),n=function(){a(S)}):f?n=function(){y.nextTick(S)}:(u=d(u,l),n=function(){u(S)}):(r=!0,i=v.createTextNode(""),new b(S).observe(i,{characterData:!0}),n=function(){i.data=r=!r}),w=function(e){_.head||n(),_.add(e)}}e.exports=w},48742:(e,t,o)=>{"use strict";var n=o(10509),r=TypeError,i=function(e){var t,o;this.promise=new e((function(e,n){if(void 0!==t||void 0!==o)throw new r("Bad Promise constructor");t=e,o=n})),this.resolve=n(t),this.reject=n(o)};e.exports.f=function(e){return new i(e)}},13841:(e,t,o)=>{"use strict";var n=o(34327);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},42124:(e,t,o)=>{"use strict";var n=o(91245),r=TypeError;e.exports=function(e){if(n(e))throw new r("The method doesn't accept regular expressions");return e}},67897:(e,t,o)=>{"use strict";var n=o(51087),r=o(3689),i=o(68844),s=o(34327),a=o(61435).trim,l=o(86350),c=n.parseInt,d=n.Symbol,u=d&&d.iterator,h=/^[+-]?0x/i,m=i(h.exec),p=8!==c(l+"08")||22!==c(l+"0x16")||u&&!r((function(){c(Object(u))}));e.exports=p?function(e,t){var o=a(s(e));return c(o,t>>>0||(m(h,o)?16:10))}:c},25391:(e,t,o)=>{"use strict";var n,r=o(85027),i=o(98920),s=o(72739),a=o(57248),l=o(2688),c=o(36420),d=o(2713),u="prototype",h="script",m=d("IE_PROTO"),p=function(){},g=function(e){return"<"+h+">"+e+"</"+h+">"},f=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,o;b="undefined"!=typeof document?document.domain&&n?f(n):(t=c("iframe"),o="java"+h+":",t.style.display="none",l.appendChild(t),t.src=String(o),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F):f(n);for(var r=s.length;r--;)delete b[u][s[r]];return b()};a[m]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(p[u]=r(e),o=new p,p[u]=null,o[m]=e):o=b(),void 0===t?o:i.f(o,t)}},98920:(e,t,o)=>{"use strict";var n=o(67697),r=o(15648),i=o(72560),s=o(85027),a=o(65290),l=o(20300);t.f=n&&!r?Object.defineProperties:function(e,t){s(e);for(var o,n=a(t),r=l(t),c=r.length,d=0;c>d;)i.f(e,o=r[d++],n[o]);return e}},72560:(e,t,o)=>{"use strict";var n=o(67697),r=o(68506),i=o(15648),s=o(85027),a=o(18360),l=TypeError,c=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u="enumerable",h="configurable",m="writable";t.f=n?i?function(e,t,o){if(s(e),t=a(t),s(o),"function"==typeof e&&"prototype"===t&&"value"in o&&m in o&&!o[m]){var n=d(e,t);n&&n[m]&&(e[t]=o.value,o={configurable:h in o?o[h]:n[h],enumerable:u in o?o[u]:n[u],writable:!1})}return c(e,t,o)}:c:function(e,t,o){if(s(e),t=a(t),s(o),r)try{return c(e,t,o)}catch(e){}if("get"in o||"set"in o)throw new l("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},82474:(e,t,o)=>{"use strict";var n=o(67697),r=o(22615),i=o(49556),s=o(75684),a=o(65290),l=o(18360),c=o(36812),d=o(68506),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(e,t){if(e=a(e),t=l(t),d)try{return u(e,t)}catch(e){}if(c(e,t))return s(!r(i.f,e,t),e[t])}},26062:(e,t,o)=>{"use strict";var n=o(6648),r=o(65290),i=o(72741).f,s=o(96004),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"Window"===n(e)?function(e){try{return i(e)}catch(e){return s(a)}}(e):i(r(e))}},72741:(e,t,o)=>{"use strict";var n=o(54948),r=o(72739).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},7518:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},61868:(e,t,o)=>{"use strict";var n=o(36812),r=o(69985),i=o(90690),s=o(2713),a=o(81748),l=s("IE_PROTO"),c=Object,d=c.prototype;e.exports=a?c.getPrototypeOf:function(e){var t=i(e);if(n(t,l))return t[l];var o=t.constructor;return r(o)&&t instanceof o?o.prototype:t instanceof c?d:null}},23622:(e,t,o)=>{"use strict";var n=o(68844);e.exports=n({}.isPrototypeOf)},54948:(e,t,o)=>{"use strict";var n=o(68844),r=o(36812),i=o(65290),s=o(84328).indexOf,a=o(57248),l=n([].push);e.exports=function(e,t){var o,n=i(e),c=0,d=[];for(o in n)!r(a,o)&&r(n,o)&&l(d,o);for(;t.length>c;)r(n,o=t[c++])&&(~s(d,o)||l(d,o));return d}},20300:(e,t,o)=>{"use strict";var n=o(54948),r=o(72739);e.exports=Object.keys||function(e){return n(e,r)}},49556:(e,t)=>{"use strict";var o={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!o.call({1:2},1);t.f=r?function(e){var t=n(this,e);return!!t&&t.enumerable}:o},49385:(e,t,o)=>{"use strict";var n=o(52743),r=o(48999),i=o(74684),s=o(23550);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,o={};try{(e=n(Object.prototype,"__proto__","set"))(o,[]),t=o instanceof Array}catch(e){}return function(o,n){return i(o),s(n),r(o)?(t?e(o,n):o.__proto__=n,o):o}}():void 0)},49419:(e,t,o)=>{"use strict";var n=o(67697),r=o(3689),i=o(68844),s=o(61868),a=o(20300),l=o(65290),c=i(o(49556).f),d=i([].push),u=n&&r((function(){var e=Object.create(null);return e[2]=2,!c(e,2)})),h=function(e){return function(t){for(var o,r=l(t),i=a(r),h=u&&null===s(r),m=i.length,p=0,g=[];m>p;)o=i[p++],n&&!(h?o in r:c(r,o))||d(g,e?[o,r[o]]:r[o]);return g}};e.exports={entries:h(!0),values:h(!1)}},65073:(e,t,o)=>{"use strict";var n=o(23043),r=o(50926);e.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},35899:(e,t,o)=>{"use strict";var n=o(22615),r=o(69985),i=o(48999),s=TypeError;e.exports=function(e,t){var o,a;if("string"===t&&r(o=e.toString)&&!i(a=n(o,e)))return a;if(r(o=e.valueOf)&&!i(a=n(o,e)))return a;if("string"!==t&&r(o=e.toString)&&!i(a=n(o,e)))return a;throw new s("Can't convert object to primitive value")}},19152:(e,t,o)=>{"use strict";var n=o(76058),r=o(68844),i=o(72741),s=o(7518),a=o(85027),l=r([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(a(e)),o=s.f;return o?l(t,o(e)):t}},50496:(e,t,o)=>{"use strict";var n=o(51087);e.exports=n},9302:e=>{"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},87073:(e,t,o)=>{"use strict";var n=o(51087),r=o(17919),i=o(69985),s=o(35266),a=o(6738),l=o(44201),c=o(39791),d=o(53931),u=o(21352),h=r&&r.prototype,m=l("species"),p=!1,g=i(n.PromiseRejectionEvent),f=s("Promise",(function(){var e=a(r),t=e!==String(r);if(!t&&66===u)return!0;if(d&&(!h.catch||!h.finally))return!0;if(!u||u<51||!/native code/.test(e)){var o=new r((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((o.constructor={})[m]=n,!(p=o.then((function(){}))instanceof n))return!0}return!(t||"BROWSER"!==c&&"DENO"!==c||g)}));e.exports={CONSTRUCTOR:f,REJECTION_EVENT:g,SUBCLASSING:p}},17919:(e,t,o)=>{"use strict";var n=o(51087);e.exports=n.Promise},72945:(e,t,o)=>{"use strict";var n=o(85027),r=o(48999),i=o(48742);e.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var o=i.f(e);return(0,o.resolve)(t),o.promise}},562:(e,t,o)=>{"use strict";var n=o(17919),r=o(86431),i=o(87073).CONSTRUCTOR;e.exports=i||!r((function(e){n.all(e).then(void 0,(function(){}))}))},38055:(e,t,o)=>{"use strict";var n=o(72560).f;e.exports=function(e,t,o){o in e||n(e,o,{configurable:!0,get:function(){return t[o]},set:function(e){t[o]=e}})}},34410:e=>{"use strict";var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},o=this.tail;o?o.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},66100:(e,t,o)=>{"use strict";var n=o(22615),r=o(85027),i=o(69985),s=o(6648),a=o(56308),l=TypeError;e.exports=function(e,t){var o=e.exec;if(i(o)){var c=n(o,e,t);return null!==c&&r(c),c}if("RegExp"===s(e))return n(a,e,t);throw new l("RegExp#exec called on incompatible receiver")}},56308:(e,t,o)=>{"use strict";var n,r,i=o(22615),s=o(68844),a=o(34327),l=o(69633),c=o(87901),d=o(83430),u=o(25391),h=o(618).get,m=o(62100),p=o(26738),g=d("native-string-replace",String.prototype.replace),f=RegExp.prototype.exec,b=f,v=s("".charAt),y=s("".indexOf),x=s("".replace),w=s("".slice),_=(r=/b*/g,i(f,n=/a/,"a"),i(f,r,"a"),0!==n.lastIndex||0!==r.lastIndex),S=c.BROKEN_CARET,C=void 0!==/()??/.exec("")[1];(_||C||S||m||p)&&(b=function(e){var t,o,n,r,s,c,d,m=this,p=h(m),k=a(e),E=p.raw;if(E)return E.lastIndex=m.lastIndex,t=i(b,E,k),m.lastIndex=E.lastIndex,t;var T=p.groups,O=S&&m.sticky,A=i(l,m),M=m.source,P=0,D=k;if(O&&(A=x(A,"y",""),-1===y(A,"g")&&(A+="g"),D=w(k,m.lastIndex),m.lastIndex>0&&(!m.multiline||m.multiline&&"\n"!==v(k,m.lastIndex-1))&&(M="(?: "+M+")",D=" "+D,P++),o=new RegExp("^(?:"+M+")",A)),C&&(o=new RegExp("^"+M+"$(?!\\s)",A)),_&&(n=m.lastIndex),r=i(f,O?o:m,D),O?r?(r.input=w(r.input,P),r[0]=w(r[0],P),r.index=m.lastIndex,m.lastIndex+=r[0].length):m.lastIndex=0:_&&r&&(m.lastIndex=m.global?r.index+r[0].length:n),C&&r&&r.length>1&&i(g,r[0],o,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(r[s]=void 0)})),r&&T)for(r.groups=c=u(null),s=0;s<T.length;s++)c[(d=T[s])[0]]=r[d[1]];return r}),e.exports=b},63835:(e,t,o)=>{"use strict";var n=o(51087),r=o(3689),i=n.RegExp,s=!r((function(){var e=!0;try{i(".","d")}catch(t){e=!1}var t={},o="",n=e?"dgimsy":"gimsy",r=function(e,n){Object.defineProperty(t,e,{get:function(){return o+=n,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(s.hasIndices="d"),s)r(a,s[a]);return Object.getOwnPropertyDescriptor(i.prototype,"flags").get.call(t)!==n||o!==n}));e.exports={correct:s}},69633:(e,t,o)=>{"use strict";var n=o(85027);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},63477:(e,t,o)=>{"use strict";var n=o(22615),r=o(36812),i=o(23622),s=o(63835),a=o(69633),l=RegExp.prototype;e.exports=s.correct?function(e){return e.flags}:function(e){return s.correct||!i(l,e)||r(e,"flags")?e.flags:n(a,e)}},87901:(e,t,o)=>{"use strict";var n=o(3689),r=o(51087).RegExp,i=n((function(){var e=r("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),s=i||n((function(){return!r("a","y").sticky})),a=i||n((function(){var e=r("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));e.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:i}},62100:(e,t,o)=>{"use strict";var n=o(3689),r=o(51087).RegExp;e.exports=n((function(){var e=r(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))},26738:(e,t,o)=>{"use strict";var n=o(3689),r=o(51087).RegExp;e.exports=n((function(){var e=r("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},74684:(e,t,o)=>{"use strict";var n=o(981),r=TypeError;e.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}},70517:(e,t,o)=>{"use strict";var n=o(51087),r=o(67697),i=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!r)return n[e];var t=i(n,e);return t&&t.value}},8552:(e,t,o)=>{"use strict";var n,r=o(51087),i=o(61735),s=o(69985),a=o(39791),l=o(68017),c=o(96004),d=o(21500),u=r.Function,h=/MSIE .\./.test(l)||"BUN"===a&&((n=r.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));e.exports=function(e,t){var o=t?2:1;return h?function(n,r){var a=d(arguments.length,1)>o,l=s(n)?n:u(n),h=a?c(arguments,o):[],m=a?function(){i(l,this,h)}:l;return t?e(m,r):e(m)}:e}},14241:(e,t,o)=>{"use strict";var n=o(76058),r=o(62148),i=o(44201),s=o(67697),a=i("species");e.exports=function(e){var t=n(e);s&&t&&!t[a]&&r(t,a,{configurable:!0,get:function(){return this}})}},55997:(e,t,o)=>{"use strict";var n=o(72560).f,r=o(36812),i=o(44201)("toStringTag");e.exports=function(e,t,o){e&&!o&&(e=e.prototype),e&&!r(e,i)&&n(e,i,{configurable:!0,value:t})}},2713:(e,t,o)=>{"use strict";var n=o(83430),r=o(14630),i=n("keys");e.exports=function(e){return i[e]||(i[e]=r(e))}},84091:(e,t,o)=>{"use strict";var n=o(53931),r=o(51087),i=o(95014),s="__core-js_shared__",a=e.exports=r[s]||i(s,{});(a.versions||(a.versions=[])).push({version:"3.46.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},83430:(e,t,o)=>{"use strict";var n=o(84091);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},76373:(e,t,o)=>{"use strict";var n=o(85027),r=o(52655),i=o(981),s=o(44201)("species");e.exports=function(e,t){var o,a=n(e).constructor;return void 0===a||i(o=n(a)[s])?t:r(o)}},10730:(e,t,o)=>{"use strict";var n=o(68844),r=o(68700),i=o(34327),s=o(74684),a=n("".charAt),l=n("".charCodeAt),c=n("".slice),d=function(e){return function(t,o){var n,d,u=i(s(t)),h=r(o),m=u.length;return h<0||h>=m?e?"":void 0:(n=l(u,h))<55296||n>56319||h+1===m||(d=l(u,h+1))<56320||d>57343?e?a(u,h):n:e?c(u,h,h+2):d-56320+(n-55296<<10)+65536}};e.exports={codeAt:d(!1),charAt:d(!0)}},61435:(e,t,o)=>{"use strict";var n=o(68844),r=o(74684),i=o(34327),s=o(86350),a=n("".replace),l=RegExp("^["+s+"]+"),c=RegExp("(^|[^"+s+"])["+s+"]+$"),d=function(e){return function(t){var o=i(r(t));return 1&e&&(o=a(o,l,"")),2&e&&(o=a(o,c,"$1")),o}};e.exports={start:d(1),end:d(2),trim:d(3)}},50146:(e,t,o)=>{"use strict";var n=o(21352),r=o(3689),i=o(51087).String;e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},13032:(e,t,o)=>{"use strict";var n=o(22615),r=o(76058),i=o(44201),s=o(11880);e.exports=function(){var e=r("Symbol"),t=e&&e.prototype,o=t&&t.valueOf,a=i("toPrimitive");t&&!t[a]&&s(t,a,(function(e){return n(o,this)}),{arity:1})}},46549:(e,t,o)=>{"use strict";var n=o(50146);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},99886:(e,t,o)=>{"use strict";var n,r,i,s,a=o(51087),l=o(61735),c=o(54071),d=o(69985),u=o(36812),h=o(3689),m=o(2688),p=o(96004),g=o(36420),f=o(21500),b=o(41631),v=o(30240),y=a.setImmediate,x=a.clearImmediate,w=a.process,_=a.Dispatch,S=a.Function,C=a.MessageChannel,k=a.String,E=0,T={},O="onreadystatechange";h((function(){n=a.location}));var A=function(e){if(u(T,e)){var t=T[e];delete T[e],t()}},M=function(e){return function(){A(e)}},P=function(e){A(e.data)},D=function(e){a.postMessage(k(e),n.protocol+"//"+n.host)};y&&x||(y=function(e){f(arguments.length,1);var t=d(e)?e:S(e),o=p(arguments,1);return T[++E]=function(){l(t,void 0,o)},r(E),E},x=function(e){delete T[e]},v?r=function(e){w.nextTick(M(e))}:_&&_.now?r=function(e){_.now(M(e))}:C&&!b?(s=(i=new C).port2,i.port1.onmessage=P,r=c(s.postMessage,s)):a.addEventListener&&d(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!h(D)?(r=D,a.addEventListener("message",P,!1)):r=O in g("script")?function(e){m.appendChild(g("script"))[O]=function(){m.removeChild(this),A(e)}}:function(e){setTimeout(M(e),0)}),e.exports={set:y,clear:x}},23648:(e,t,o)=>{"use strict";var n=o(68844);e.exports=n(1.1.valueOf)},27578:(e,t,o)=>{"use strict";var n=o(68700),r=Math.max,i=Math.min;e.exports=function(e,t){var o=n(e);return o<0?r(o+t,0):i(o,t)}},65290:(e,t,o)=>{"use strict";var n=o(94413),r=o(74684);e.exports=function(e){return n(r(e))}},68700:(e,t,o)=>{"use strict";var n=o(58828);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},43126:(e,t,o)=>{"use strict";var n=o(68700),r=Math.min;e.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}},90690:(e,t,o)=>{"use strict";var n=o(74684),r=Object;e.exports=function(e){return r(n(e))}},88732:(e,t,o)=>{"use strict";var n=o(22615),r=o(48999),i=o(30734),s=o(54849),a=o(35899),l=o(44201),c=TypeError,d=l("toPrimitive");e.exports=function(e,t){if(!r(e)||i(e))return e;var o,l=s(e,d);if(l){if(void 0===t&&(t="default"),o=n(l,e,t),!r(o)||i(o))return o;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},18360:(e,t,o)=>{"use strict";var n=o(88732),r=o(30734);e.exports=function(e){var t=n(e,"string");return r(t)?t:t+""}},23043:(e,t,o)=>{"use strict";var n={};n[o(44201)("toStringTag")]="z",e.exports="[object z]"===String(n)},34327:(e,t,o)=>{"use strict";var n=o(50926),r=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return r(e)}},23691:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},14630:(e,t,o)=>{"use strict";var n=o(68844),r=0,i=Math.random(),s=n(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++r+i,36)}},39525:(e,t,o)=>{"use strict";var n=o(50146);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},15648:(e,t,o)=>{"use strict";var n=o(67697),r=o(3689);e.exports=n&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},21500:e=>{"use strict";var t=TypeError;e.exports=function(e,o){if(e<o)throw new t("Not enough arguments");return e}},59834:(e,t,o)=>{"use strict";var n=o(51087),r=o(69985),i=n.WeakMap;e.exports=r(i)&&/native code/.test(String(i))},35405:(e,t,o)=>{"use strict";var n=o(50496),r=o(36812),i=o(96145),s=o(72560).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});r(t,e)||s(t,e,{value:i.f(e)})}},96145:(e,t,o)=>{"use strict";var n=o(44201);t.f=n},44201:(e,t,o)=>{"use strict";var n=o(51087),r=o(83430),i=o(36812),s=o(14630),a=o(50146),l=o(39525),c=n.Symbol,d=r("wks"),u=l?c.for||c:c&&c.withoutSetter||s;e.exports=function(e){return i(d,e)||(d[e]=a&&i(c,e)?c[e]:u("Symbol."+e)),d[e]}},86350:e=>{"use strict";e.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},51064:(e,t,o)=>{"use strict";var n=o(76058),r=o(36812),i=o(75773),s=o(23622),a=o(49385),l=o(8758),c=o(38055),d=o(33457),u=o(13841),h=o(62570),m=o(65411),p=o(67697),g=o(53931);e.exports=function(e,t,o,f){var b="stackTraceLimit",v=f?2:1,y=e.split("."),x=y[y.length-1],w=n.apply(null,y);if(w){var _=w.prototype;if(!g&&r(_,"cause")&&delete _.cause,!o)return w;var S=n("Error"),C=t((function(e,t){var o=u(f?t:e,void 0),n=f?new w(e):new w;return void 0!==o&&i(n,"message",o),m(n,C,n.stack,2),this&&s(_,this)&&d(n,this,C),arguments.length>v&&h(n,arguments[v]),n}));if(C.prototype=_,"Error"!==x?a?a(C,S):l(C,S,{name:!0}):p&&b in w&&(c(C,w,b),c(C,w,"prepareStackTrace")),l(C,w),!g)try{_.name!==x&&i(_,"name",x),_.constructor=C}catch(e){}return C}}},34338:(e,t,o)=>{"use strict";var n=o(79989),r=o(3689),i=o(92297),s=o(48999),a=o(90690),l=o(6310),c=o(55565),d=o(76522),u=o(27120),h=o(29042),m=o(44201),p=o(21352),g=m("isConcatSpreadable"),f=p>=51||!r((function(){var e=[];return e[g]=!1,e.concat()[0]!==e})),b=function(e){if(!s(e))return!1;var t=e[g];return void 0!==t?!!t:i(e)};n({target:"Array",proto:!0,arity:1,forced:!f||!h("concat")},{concat:function(e){var t,o,n,r,i,s=a(this),h=u(s,0),m=0;for(t=-1,n=arguments.length;t<n;t++)if(b(i=-1===t?s:arguments[t]))for(r=l(i),c(m+r),o=0;o<r;o++,m++)o in i&&d(h,m,i[o]);else c(m+1),d(h,m++,i);return h.length=m,h}})},38077:(e,t,o)=>{"use strict";var n=o(79989),r=o(2960).filter;n({target:"Array",proto:!0,forced:!o(29042)("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},49693:(e,t,o)=>{"use strict";var n=o(79989),r=o(57612);n({target:"Array",proto:!0,forced:[].forEach!==r},{forEach:r})},77049:(e,t,o)=>{"use strict";var n=o(79989),r=o(21055);n({target:"Array",stat:!0,forced:!o(86431)((function(e){Array.from(e)}))},{from:r})},76801:(e,t,o)=>{"use strict";var n=o(79989),r=o(84328).includes,i=o(3689),s=o(87370);n({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),s("includes")},97195:(e,t,o)=>{"use strict";var n=o(79989),r=o(46576),i=o(84328).indexOf,s=o(16834),a=r([].indexOf),l=!!a&&1/a([1],1,-0)<0;n({target:"Array",proto:!0,forced:l||!s("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return l?a(this,e,t)||0:i(this,e,t)}})},63975:(e,t,o)=>{"use strict";o(79989)({target:"Array",stat:!0},{isArray:o(92297)})},752:(e,t,o)=>{"use strict";var n=o(65290),r=o(87370),i=o(9478),s=o(618),a=o(72560).f,l=o(91934),c=o(27807),d=o(53931),u=o(67697),h="Array Iterator",m=s.set,p=s.getterFor(h);e.exports=l(Array,"Array",(function(e,t){m(this,{type:h,target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,o=e.index++;if(!t||o>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(o,!1);case"values":return c(t[o],!1)}return c([o,t[o]],!1)}),"values");var g=i.Arguments=i.Array;if(r("keys"),r("values"),r("entries"),!d&&u&&"values"!==g.name)try{a(g,"name",{value:"values"})}catch(e){}},50886:(e,t,o)=>{"use strict";var n=o(79989),r=o(2960).map;n({target:"Array",proto:!0,forced:!o(29042)("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},70560:(e,t,o)=>{"use strict";var n=o(79989),r=o(90690),i=o(6310),s=o(5649),a=o(55565);n({target:"Array",proto:!0,arity:1,forced:o(3689)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=r(this),o=i(t),n=arguments.length;a(o+n);for(var l=0;l<n;l++)t[o]=arguments[l],o++;return s(t,o),o}})},93374:(e,t,o)=>{"use strict";var n=o(79989),r=o(68844),i=o(92297),s=r([].reverse),a=[1,2];n({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),s(this)}})},89730:(e,t,o)=>{"use strict";var n=o(79989),r=o(92297),i=o(19429),s=o(48999),a=o(27578),l=o(6310),c=o(65290),d=o(76522),u=o(44201),h=o(29042),m=o(96004),p=h("slice"),g=u("species"),f=Array,b=Math.max;n({target:"Array",proto:!0,forced:!p},{slice:function(e,t){var o,n,u,h=c(this),p=l(h),v=a(e,p),y=a(void 0===t?p:t,p);if(r(h)&&(o=h.constructor,(i(o)&&(o===f||r(o.prototype))||s(o)&&null===(o=o[g]))&&(o=void 0),o===f||void 0===o))return m(h,v,y);for(n=new(void 0===o?f:o)(b(y-v,0)),u=0;v<y;v++,u++)v in h&&d(n,u,h[v]);return n.length=u,n}})},59903:(e,t,o)=>{"use strict";var n=o(36812),r=o(11880),i=o(81797),s=o(44201)("toPrimitive"),a=Date.prototype;n(a,s)||r(a,s,i)},30024:(e,t,o)=>{"use strict";var n=o(68844),r=o(11880),i=Date.prototype,s="Invalid Date",a="toString",l=n(i[a]),c=n(i.getTime);String(new Date(NaN))!==s&&r(i,a,(function(){var e=c(this);return e==e?l(this):s}))},21057:(e,t,o)=>{"use strict";var n=o(79989),r=o(51087),i=o(61735),s=o(51064),a="WebAssembly",l=r[a],c=7!==new Error("e",{cause:7}).cause,d=function(e,t){var o={};o[e]=s(e,t,c),n({global:!0,constructor:!0,arity:1,forced:c},o)},u=function(e,t){if(l&&l[e]){var o={};o[e]=s(a+"."+e,t,c),n({target:a,stat:!0,constructor:!0,arity:1,forced:c},o)}};d("Error",(function(e){return function(t){return i(e,this,arguments)}})),d("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),d("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),d("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),d("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),d("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),d("URIError",(function(e){return function(t){return i(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))},68932:(e,t,o)=>{"use strict";var n=o(11880),r=o(20445),i=Error.prototype;i.toString!==r&&n(i,"toString",r)},41517:(e,t,o)=>{"use strict";var n=o(79989),r=o(86761);n({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r})},34284:(e,t,o)=>{"use strict";var n=o(67697),r=o(41236).EXISTS,i=o(68844),s=o(62148),a=Function.prototype,l=i(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,d=i(c.exec);n&&!r&&s(a,"name",{configurable:!0,get:function(){try{return d(c,l(this))[1]}catch(e){return""}}})},48324:(e,t,o)=>{"use strict";var n=o(79989),r=o(76058),i=o(61735),s=o(22615),a=o(68844),l=o(3689),c=o(69985),d=o(30734),u=o(96004),h=o(92643),m=o(50146),p=String,g=r("JSON","stringify"),f=a(/./.exec),b=a("".charAt),v=a("".charCodeAt),y=a("".replace),x=a(1.1.toString),w=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,C=!m||l((function(){var e=r("Symbol")("stringify detection");return"[null]"!==g([e])||"{}"!==g({a:e})||"{}"!==g(Object(e))})),k=l((function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")})),E=function(e,t){var o=u(arguments),n=h(t);if(c(n)||void 0!==e&&!d(e))return o[1]=function(e,t){if(c(n)&&(t=s(n,this,p(e),t)),!d(t))return t},i(g,null,o)},T=function(e,t,o){var n=b(o,t-1),r=b(o,t+1);return f(_,e)&&!f(S,r)||f(S,e)&&!f(_,n)?"\\u"+x(v(e,0),16):e};g&&n({target:"JSON",stat:!0,arity:3,forced:C||k},{stringify:function(e,t,o){var n=u(arguments),r=i(C?E:g,null,n);return k&&"string"==typeof r?y(r,w,T):r}})},7629:(e,t,o)=>{"use strict";var n=o(51087);o(55997)(n.JSON,"JSON",!0)},77509:(e,t,o)=>{"use strict";o(55997)(Math,"Math",!0)},79288:(e,t,o)=>{"use strict";var n=o(79989),r=o(53931),i=o(67697),s=o(51087),a=o(50496),l=o(68844),c=o(35266),d=o(36812),u=o(33457),h=o(23622),m=o(30734),p=o(88732),g=o(3689),f=o(72741).f,b=o(82474).f,v=o(72560).f,y=o(23648),x=o(61435).trim,w="Number",_=s[w],S=a[w],C=_.prototype,k=s.TypeError,E=l("".slice),T=l("".charCodeAt),O=function(e){var t,o,n,r,i,s,a,l,c=p(e,"number");if(m(c))throw new k("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=x(c),43===(t=T(c,0))||45===t){if(88===(o=T(c,2))||120===o)return NaN}else if(48===t){switch(T(c,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+c}for(s=(i=E(c,2)).length,a=0;a<s;a++)if((l=T(i,a))<48||l>r)return NaN;return parseInt(i,n)}return+c},A=c(w,!_(" 0o1")||!_("0b1")||_("+0x1")),M=function(e){var t,o=arguments.length<1?0:_(function(e){var t=p(e,"number");return"bigint"==typeof t?t:O(t)}(e));return h(C,t=this)&&g((function(){y(t)}))?u(Object(o),this,M):o};M.prototype=C,A&&!r&&(C.constructor=M),n({global:!0,constructor:!0,wrap:!0,forced:A},{Number:M});var P=function(e,t){for(var o,n=i?f(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;n.length>r;r++)d(t,o=n[r])&&!d(e,o)&&v(e,o,b(t,o))};r&&S&&P(a[w],S),(A||r)&&P(a[w],_)},51013:(e,t,o)=>{"use strict";o(79989)({target:"Object",stat:!0,sham:!o(67697)},{create:o(25391)})},40739:(e,t,o)=>{"use strict";var n=o(79989),r=o(67697),i=o(72560).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!r},{defineProperty:i})},79434:(e,t,o)=>{"use strict";var n=o(79989),r=o(50146),i=o(3689),s=o(7518),a=o(90690);n({target:"Object",stat:!0,forced:!r||i((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(a(e)):[]}})},88052:(e,t,o)=>{"use strict";var n=o(79989),r=o(3689),i=o(90690),s=o(61868),a=o(81748);n({target:"Object",stat:!0,forced:r((function(){s(1)})),sham:!a},{getPrototypeOf:function(e){return s(i(e))}})},69358:(e,t,o)=>{"use strict";var n=o(79989),r=o(90690),i=o(20300);n({target:"Object",stat:!0,forced:o(3689)((function(){i(1)}))},{keys:function(e){return i(r(e))}})},19330:(e,t,o)=>{"use strict";var n=o(67697),r=o(62148),i=o(48999),s=o(60598),a=o(90690),l=o(74684),c=Object.getPrototypeOf,d=Object.setPrototypeOf,u=Object.prototype,h="__proto__";if(n&&c&&d&&!(h in u))try{r(u,h,{configurable:!0,get:function(){return c(a(this))},set:function(e){var t=l(this);s(e)&&i(t)&&d(t,e)}})}catch(e){}},5399:(e,t,o)=>{"use strict";o(79989)({target:"Object",stat:!0},{setPrototypeOf:o(49385)})},60228:(e,t,o)=>{"use strict";var n=o(23043),r=o(11880),i=o(65073);n||r(Object.prototype,"toString",i,{unsafe:!0})},86466:(e,t,o)=>{"use strict";var n=o(79989),r=o(49419).values;n({target:"Object",stat:!0},{values:function(e){return r(e)}})},32320:(e,t,o)=>{"use strict";var n=o(79989),r=o(67897);n({global:!0,forced:parseInt!==r},{parseInt:r})},81692:(e,t,o)=>{"use strict";var n=o(79989),r=o(22615),i=o(10509),s=o(48742),a=o(9302),l=o(18734);n({target:"Promise",stat:!0,forced:o(562)},{all:function(e){var t=this,o=s.f(t),n=o.resolve,c=o.reject,d=a((function(){var o=i(t.resolve),s=[],a=0,d=1;l(e,(function(e){var i=a++,l=!1;d++,r(o,t,e).then((function(e){l||(l=!0,s[i]=e,--d||n(s))}),c)})),--d||n(s)}));return d.error&&c(d.value),o.promise}})},75089:(e,t,o)=>{"use strict";var n=o(79989),r=o(53931),i=o(87073).CONSTRUCTOR,s=o(17919),a=o(76058),l=o(69985),c=o(11880),d=s&&s.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!r&&l(s)){var u=a("Promise").prototype.catch;d.catch!==u&&c(d,"catch",u,{unsafe:!0})}},56697:(e,t,o)=>{"use strict";var n,r,i,s,a=o(79989),l=o(53931),c=o(30240),d=o(51087),u=o(50496),h=o(22615),m=o(11880),p=o(49385),g=o(55997),f=o(14241),b=o(10509),v=o(69985),y=o(48999),x=o(767),w=o(76373),_=o(99886).set,S=o(80231),C=o(20920),k=o(9302),E=o(34410),T=o(618),O=o(17919),A=o(87073),M=o(48742),P="Promise",D=A.CONSTRUCTOR,L=A.REJECTION_EVENT,R=A.SUBCLASSING,N=T.getterFor(P),I=T.set,B=O&&O.prototype,z=O,F=B,H=d.TypeError,j=d.document,V=d.process,U=M.f,Z=U,$=!!(j&&j.createEvent&&d.dispatchEvent),W="unhandledrejection",q=function(e){var t;return!(!y(e)||!v(t=e.then))&&t},G=function(e,t){var o,n,r,i=t.value,s=1===t.state,a=s?e.ok:e.fail,l=e.resolve,c=e.reject,d=e.domain;try{a?(s||(2===t.rejection&&Q(t),t.rejection=1),!0===a?o=i:(d&&d.enter(),o=a(i),d&&(d.exit(),r=!0)),o===e.promise?c(new H("Promise-chain cycle")):(n=q(o))?h(n,o,l,c):l(o)):c(i)}catch(e){d&&!r&&d.exit(),c(e)}},Y=function(e,t){e.notified||(e.notified=!0,S((function(){for(var o,n=e.reactions;o=n.get();)G(o,e);e.notified=!1,t&&!e.rejection&&X(e)})))},K=function(e,t,o){var n,r;$?((n=j.createEvent("Event")).promise=t,n.reason=o,n.initEvent(e,!1,!0),d.dispatchEvent(n)):n={promise:t,reason:o},!L&&(r=d["on"+e])?r(n):e===W&&C("Unhandled promise rejection",o)},X=function(e){h(_,d,(function(){var t,o=e.facade,n=e.value;if(J(e)&&(t=k((function(){c?V.emit("unhandledRejection",n,o):K(W,o,n)})),e.rejection=c||J(e)?2:1,t.error))throw t.value}))},J=function(e){return 1!==e.rejection&&!e.parent},Q=function(e){h(_,d,(function(){var t=e.facade;c?V.emit("rejectionHandled",t):K("rejectionhandled",t,e.value)}))},ee=function(e,t,o){return function(n){e(t,n,o)}},te=function(e,t,o){e.done||(e.done=!0,o&&(e=o),e.value=t,e.state=2,Y(e,!0))},oe=function(e,t,o){if(!e.done){e.done=!0,o&&(e=o);try{if(e.facade===t)throw new H("Promise can't be resolved itself");var n=q(t);n?S((function(){var o={done:!1};try{h(n,t,ee(oe,o,e),ee(te,o,e))}catch(t){te(o,t,e)}})):(e.value=t,e.state=1,Y(e,!1))}catch(t){te({done:!1},t,e)}}};if(D&&(F=(z=function(e){x(this,F),b(e),h(n,this);var t=N(this);try{e(ee(oe,t),ee(te,t))}catch(e){te(t,e)}}).prototype,(n=function(e){I(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:null})}).prototype=m(F,"then",(function(e,t){var o=N(this),n=U(w(this,z));return o.parent=!0,n.ok=!v(e)||e,n.fail=v(t)&&t,n.domain=c?V.domain:void 0,0===o.state?o.reactions.add(n):S((function(){G(n,o)})),n.promise})),r=function(){var e=new n,t=N(e);this.promise=e,this.resolve=ee(oe,t),this.reject=ee(te,t)},M.f=U=function(e){return e===z||e===i?new r(e):Z(e)},!l&&v(O)&&B!==Object.prototype)){s=B.then,R||m(B,"then",(function(e,t){var o=this;return new z((function(e,t){h(s,o,e,t)})).then(e,t)}),{unsafe:!0});try{delete B.constructor}catch(e){}p&&p(B,F)}a({global:!0,constructor:!0,wrap:!0,forced:D},{Promise:z}),i=u.Promise,g(z,P,!1,!0),f(P)},73964:(e,t,o)=>{"use strict";o(56697),o(81692),o(75089),o(58829),o(42092),o(57905)},58829:(e,t,o)=>{"use strict";var n=o(79989),r=o(22615),i=o(10509),s=o(48742),a=o(9302),l=o(18734);n({target:"Promise",stat:!0,forced:o(562)},{race:function(e){var t=this,o=s.f(t),n=o.reject,c=a((function(){var s=i(t.resolve);l(e,(function(e){r(s,t,e).then(o.resolve,n)}))}));return c.error&&n(c.value),o.promise}})},42092:(e,t,o)=>{"use strict";var n=o(79989),r=o(48742);n({target:"Promise",stat:!0,forced:o(87073).CONSTRUCTOR},{reject:function(e){var t=r.f(this);return(0,t.reject)(e),t.promise}})},57905:(e,t,o)=>{"use strict";var n=o(79989),r=o(76058),i=o(53931),s=o(17919),a=o(87073).CONSTRUCTOR,l=o(72945),c=r("Promise"),d=i&&!a;n({target:"Promise",stat:!0,forced:i||a},{resolve:function(e){return l(d&&this===c?s:this,e)}})},30050:(e,t,o)=>{"use strict";var n=o(79989),r=o(76058),i=o(61735),s=o(86761),a=o(52655),l=o(85027),c=o(48999),d=o(25391),u=o(3689),h=r("Reflect","construct"),m=Object.prototype,p=[].push,g=u((function(){function e(){}return!(h((function(){}),[],e)instanceof e)})),f=!u((function(){h((function(){}))})),b=g||f;n({target:"Reflect",stat:!0,forced:b,sham:b},{construct:function(e,t){a(e),l(t);var o=arguments.length<3?e:a(arguments[2]);if(f&&!g)return h(e,t,o);if(e===o){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return i(p,n,t),new(i(s,e,n))}var r=o.prototype,u=d(c(r)?r:m),b=i(e,u,t);return c(b)?b:u}})},76034:(e,t,o)=>{"use strict";var n=o(79989),r=o(51087),i=o(55997);n({global:!0},{Reflect:{}}),i(r.Reflect,"Reflect",!0)},64043:(e,t,o)=>{"use strict";var n=o(79989),r=o(56308);n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},7409:(e,t,o)=>{"use strict";o(64043);var n,r,i=o(79989),s=o(22615),a=o(69985),l=o(85027),c=o(34327),d=(n=!1,(r=/[ac]/).exec=function(){return n=!0,/./.exec.apply(this,arguments)},!0===r.test("abc")&&n),u=/./.test;i({target:"RegExp",proto:!0,forced:!d},{test:function(e){var t=l(this),o=c(e),n=t.exec;if(!a(n))return s(u,t,o);var r=s(n,t,o);return null!==r&&(l(r),!0)}})},43843:(e,t,o)=>{"use strict";var n=o(79989),r=o(68844),i=o(42124),s=o(74684),a=o(34327),l=o(27413),c=r("".indexOf);n({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~c(a(s(this)),a(i(e)),arguments.length>1?arguments[1]:void 0)}})},21694:(e,t,o)=>{"use strict";var n=o(10730).charAt,r=o(34327),i=o(618),s=o(91934),a=o(27807),l="String Iterator",c=i.set,d=i.getterFor(l);s(String,"String",(function(e){c(this,{type:l,string:r(e),index:0})}),(function(){var e,t=d(this),o=t.string,r=t.index;return r>=o.length?a(void 0,!0):(e=n(o,r),t.index+=e.length,a(e,!1))}))},57267:(e,t,o)=>{"use strict";var n=o(61735),r=o(22615),i=o(68844),s=o(65773),a=o(3689),l=o(85027),c=o(69985),d=o(48999),u=o(68700),h=o(43126),m=o(34327),p=o(74684),g=o(71514),f=o(54849),b=o(27017),v=o(63477),y=o(66100),x=o(44201)("replace"),w=Math.max,_=Math.min,S=i([].concat),C=i([].push),k=i("".indexOf),E=i("".slice),T="$0"==="a".replace(/./,"$0"),O=!!/./[x]&&""===/./[x]("a","$0");s("replace",(function(e,t,o){var i=O?"$":"$0";return[function(e,o){var n=p(this),i=d(e)?f(e,x):void 0;return i?r(i,e,n,o):r(t,m(n),e,o)},function(e,r){var s=l(this),a=m(e);if("string"==typeof r&&-1===k(r,i)&&-1===k(r,"$<")){var d=o(t,s,a,r);if(d.done)return d.value}var p=c(r);p||(r=m(r));var f,x=m(v(s)),T=-1!==k(x,"g");T&&(f=-1!==k(x,"u"),s.lastIndex=0);for(var O,A=[];null!==(O=y(s,a))&&(C(A,O),T);){""===m(O[0])&&(s.lastIndex=g(a,h(s.lastIndex),f))}for(var M,P="",D=0,L=0;L<A.length;L++){for(var R,N=m((O=A[L])[0]),I=w(_(u(O.index),a.length),0),B=[],z=1;z<O.length;z++)C(B,void 0===(M=O[z])?M:String(M));var F=O.groups;if(p){var H=S([N],B,I,a);void 0!==F&&C(H,F),R=m(n(r,void 0,H))}else R=b(N,a,I,B,F,r);I>=D&&(P+=E(a,D,I)+R,D=I+N.length)}return P+E(a,D)}]}),!!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!T||O)},58373:(e,t,o)=>{"use strict";o(35405)("asyncIterator")},37855:(e,t,o)=>{"use strict";var n=o(79989),r=o(51087),i=o(22615),s=o(68844),a=o(53931),l=o(67697),c=o(50146),d=o(3689),u=o(36812),h=o(23622),m=o(85027),p=o(65290),g=o(18360),f=o(34327),b=o(75684),v=o(25391),y=o(20300),x=o(72741),w=o(26062),_=o(7518),S=o(82474),C=o(72560),k=o(98920),E=o(49556),T=o(11880),O=o(62148),A=o(83430),M=o(2713),P=o(57248),D=o(14630),L=o(44201),R=o(96145),N=o(35405),I=o(13032),B=o(55997),z=o(618),F=o(2960).forEach,H=M("hidden"),j="Symbol",V="prototype",U=z.set,Z=z.getterFor(j),$=Object[V],W=r.Symbol,q=W&&W[V],G=r.RangeError,Y=r.TypeError,K=r.QObject,X=S.f,J=C.f,Q=w.f,ee=E.f,te=s([].push),oe=A("symbols"),ne=A("op-symbols"),re=A("wks"),ie=!K||!K[V]||!K[V].findChild,se=function(e,t,o){var n=X($,t);n&&delete $[t],J(e,t,o),n&&e!==$&&J($,t,n)},ae=l&&d((function(){return 7!==v(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?se:J,le=function(e,t){var o=oe[e]=v(q);return U(o,{type:j,tag:e,description:t}),l||(o.description=t),o},ce=function(e,t,o){e===$&&ce(ne,t,o),m(e);var n=g(t);return m(o),u(oe,n)?(o.enumerable?(u(e,H)&&e[H][n]&&(e[H][n]=!1),o=v(o,{enumerable:b(0,!1)})):(u(e,H)||J(e,H,b(1,v(null))),e[H][n]=!0),ae(e,n,o)):J(e,n,o)},de=function(e,t){m(e);var o=p(t),n=y(o).concat(pe(o));return F(n,(function(t){l&&!i(ue,o,t)||ce(e,t,o[t])})),e},ue=function(e){var t=g(e),o=i(ee,this,t);return!(this===$&&u(oe,t)&&!u(ne,t))&&(!(o||!u(this,t)||!u(oe,t)||u(this,H)&&this[H][t])||o)},he=function(e,t){var o=p(e),n=g(t);if(o!==$||!u(oe,n)||u(ne,n)){var r=X(o,n);return!r||!u(oe,n)||u(o,H)&&o[H][n]||(r.enumerable=!0),r}},me=function(e){var t=Q(p(e)),o=[];return F(t,(function(e){u(oe,e)||u(P,e)||te(o,e)})),o},pe=function(e){var t=e===$,o=Q(t?ne:p(e)),n=[];return F(o,(function(e){!u(oe,e)||t&&!u($,e)||te(n,oe[e])})),n};c||(T(q=(W=function(){if(h(q,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?f(arguments[0]):void 0,t=D(e),o=function(e){var n=void 0===this?r:this;n===$&&i(o,ne,e),u(n,H)&&u(n[H],t)&&(n[H][t]=!1);var s=b(1,e);try{ae(n,t,s)}catch(e){if(!(e instanceof G))throw e;se(n,t,s)}};return l&&ie&&ae($,t,{configurable:!0,set:o}),le(t,e)})[V],"toString",(function(){return Z(this).tag})),T(W,"withoutSetter",(function(e){return le(D(e),e)})),E.f=ue,C.f=ce,k.f=de,S.f=he,x.f=w.f=me,_.f=pe,R.f=function(e){return le(L(e),e)},l&&(O(q,"description",{configurable:!0,get:function(){return Z(this).description}}),a||T($,"propertyIsEnumerable",ue,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),F(y(re),(function(e){N(e)})),n({target:j,stat:!0,forced:!c},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(e,t){return void 0===t?v(e):de(v(e),t)},defineProperty:ce,defineProperties:de,getOwnPropertyDescriptor:he}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:me}),I(),B(W,j),P[H]=!0},86544:(e,t,o)=>{"use strict";var n=o(79989),r=o(67697),i=o(51087),s=o(68844),a=o(36812),l=o(69985),c=o(23622),d=o(34327),u=o(62148),h=o(8758),m=i.Symbol,p=m&&m.prototype;if(r&&l(m)&&(!("description"in p)||void 0!==m().description)){var g={},f=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:d(arguments[0]),t=c(p,this)?new m(e):void 0===e?m():m(e);return""===e&&(g[t]=!0),t};h(f,m),f.prototype=p,p.constructor=f;var b="Symbol(description detection)"===String(m("description detection")),v=s(p.valueOf),y=s(p.toString),x=/^Symbol\((.*)\)[^)]+$/,w=s("".replace),_=s("".slice);u(p,"description",{configurable:!0,get:function(){var e=v(this);if(a(g,e))return"";var t=y(e),o=b?_(t,7,-1):w(t,x,"$1");return""===o?void 0:o}}),n({global:!0,constructor:!0,forced:!0},{Symbol:f})}},43975:(e,t,o)=>{"use strict";var n=o(79989),r=o(76058),i=o(36812),s=o(34327),a=o(83430),l=o(46549),c=a("string-to-symbol-registry"),d=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=s(e);if(i(c,t))return c[t];var o=r("Symbol")(t);return c[t]=o,d[o]=t,o}})},84254:(e,t,o)=>{"use strict";o(35405)("iterator")},59749:(e,t,o)=>{"use strict";o(37855),o(43975),o(81445),o(48324),o(79434)},81445:(e,t,o)=>{"use strict";var n=o(79989),r=o(36812),i=o(30734),s=o(23691),a=o(83430),l=o(46549),c=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!i(e))throw new TypeError(s(e)+" is not a symbol");if(r(c,e))return c[e]}})},69373:(e,t,o)=>{"use strict";var n=o(35405),r=o(13032);n("toPrimitive"),r()},66793:(e,t,o)=>{"use strict";var n=o(76058),r=o(35405),i=o(55997);r("toStringTag"),i(n("Symbol"),"Symbol")},47522:(e,t,o)=>{"use strict";var n=o(51087),r=o(66338),i=o(33265),s=o(57612),a=o(75773),l=function(e){if(e&&e.forEach!==s)try{a(e,"forEach",s)}catch(t){e.forEach=s}};for(var c in r)r[c]&&l(n[c]&&n[c].prototype);l(i)},76265:(e,t,o)=>{"use strict";var n=o(51087),r=o(66338),i=o(33265),s=o(752),a=o(75773),l=o(55997),c=o(44201)("iterator"),d=s.values,u=function(e,t){if(e){if(e[c]!==d)try{a(e,c,d)}catch(t){e[c]=d}if(l(e,t,!0),r[t])for(var o in s)if(e[o]!==s[o])try{a(e,o,s[o])}catch(t){e[o]=s[o]}}};for(var h in r)u(n[h]&&n[h].prototype,h);u(i,"DOMTokenList")},10209:(e,t,o)=>{"use strict";var n=o(79989),r=o(51087),i=o(8552)(r.setInterval,!0);n({global:!0,bind:!0,forced:r.setInterval!==i},{setInterval:i})},83509:(e,t,o)=>{"use strict";var n=o(79989),r=o(51087),i=o(8552)(r.setTimeout,!0);n({global:!0,bind:!0,forced:r.setTimeout!==i},{setTimeout:i})},96869:(e,t,o)=>{"use strict";o(10209),o(83509)},43896:(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var n=o(23106),r=o(65410);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},i.apply(this,arguments)}class s extends n.Z{constructor(e={}){super(),this.name="SwupDebugPlugin",this.requires={swup:">=4"},this.defaults={globalInstance:!1},this.options=void 0,this.originalSwupLog=void 0,this.originalSwupHookCall=void 0,this.originalSwupHookCallSync=void 0,this.callHook=(e,t,...o)=>(this.logHook(e,t),this.originalSwupHookCall(e,t,...o)),this.callHookSync=(e,t,...o)=>(this.logHook(e,t),this.originalSwupHookCallSync(e,t,...o)),this.options=i({},this.defaults,e)}mount(){this.setLogImplementation(),this.setGlobalInstance(),this.proxyHooksThroughConsole(),this.checkDocumentTitle(),this.checkContainers(),this.checkAnimationSelector()}unmount(){super.unmount(),this.restoreLogImplementation(),this.restoreHooksImplementation(),this.unsetGlobalInstance()}setLogImplementation(){this.originalSwupLog=this.swup.log,this.swup.log=this.log}restoreLogImplementation(){this.swup.log=this.originalSwupLog}proxyHooksThroughConsole(){this.originalSwupHookCall=this.swup.hooks.call.bind(this.swup.hooks),this.originalSwupHookCallSync=this.swup.hooks.callSync.bind(this.swup.hooks),this.swup.hooks.call=this.callHook.bind(this),this.swup.hooks.callSync=this.callHookSync.bind(this)}restoreHooksImplementation(){this.swup.hooks.call=this.originalSwupHookCall,this.swup.hooks.callSync=this.originalSwupHookCallSync}setGlobalInstance(){this.options.globalInstance&&(window.swup=this.swup)}unsetGlobalInstance(){this.options.globalInstance&&(window.swup=void 0)}checkDocumentTitle(){(0,r.IO)("title")||this.error("Document is missing a title tag. It is required on every page.")}checkContainers(){for(const e of this.swup.options.containers){const t=(0,r.Kt)(e);t.length||this.error(`Container \`${e}\` is missing on the page.`),t.length>1&&this.error(`Container \`${e}\` matches multiple elements.`),t.some((e=>!e.matches("body *")))&&this.error(`Container \`${e}\` is not supported. It must be a child of the body tag.`)}}checkAnimationSelector(){const{animationSelector:e}=this.swup.options;e&&(this.swup.options.containers.map((e=>(0,r.IO)(e))).filter((t=>null==t?void 0:t.matches(e))).length||this.warn(`No container matches the animation selector \`${e}\`.`))}logHook(e,t){console.groupCollapsed("%cswup:%c"+e,"color: #343434","color: #009ACD"),console.log(t),console.groupEnd()}log(e,t){if(t){console.groupCollapsed(e);for(let e in t)console.log(t[e]);console.groupEnd()}else console.log(e+"%c","color: #009ACD")}warn(e){console.warn(`[swup debug plugin] ${e}`)}error(e){console.error(`[swup debug plugin] ${e}`)}}},63406:(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});var n=o(15024);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r.apply(null,arguments)}class i extends n.Z{constructor(e={}){super(),this.name="SwupFadeTheme",this.defaults={mainElement:"#swup"},this.options=void 0,this.options=r({},this.defaults,e)}mount(){this.applyStyles("html{--swup-fade-theme-duration:0.4s}html.is-changing .swup-transition-main{opacity:1;transition:opacity var(--swup-fade-theme-duration)}html.is-animating .swup-transition-main{opacity:0}"),this.addClassName(this.options.mainElement,"main")}}},99827:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(23106),r=o(65410);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},i.apply(this,arguments)}function s(e,t,{stripEmptyParams:o=!1}={}){const n=a("method",e,t),i=a("enctype",e,t),s="multipart/form-data"===i,l=a("target",e,t,""),{origin:c,href:d}=r.Ye.fromUrl(a("action",e,t)),u=new FormData(e,t);let h,m;if("POST"===n&&(h=s?u:new URLSearchParams(u)),"GET"===n){const e=o?function(e){const t=new FormData;for(const[o,n]of Array.from(e.entries()))""!==n&&t.append(o,n);return t}(u):u;m=function(e,t){const[o,n]=[...e.split(/(?=#)/),""],r=o.split("?")[0],i=new URLSearchParams(t).toString();return i?`${r}?${i}${n}`:r+n}(d,e)}else m=d;const{url:p,hash:g}=r.Ye.fromUrl(m);return{origin:c,action:d,href:m,url:p,hash:g,method:n,target:l,data:u,body:h,encoding:i}}function a(e,t,o,n){var i,s;return function(e,t){switch(e){case"action":return null!=t?t:(0,r.bq)();case"method":return(t||"get").toUpperCase();case"enctype":return(t||"application/x-www-form-urlencoded").toLowerCase();default:return null!=t?t:null}}(e,null!=(i=null!=(s=null==o?void 0:o.getAttribute(`form${e}`))?s:t.getAttribute(e))?i:n)}class l extends n.Z{constructor(e={}){super(),this.name="SwupFormsPlugin",this.requires={swup:">=4"},this.defaults={formSelector:"form[data-swup-form]",inlineFormSelector:"form[data-swup-inline-form]",stripEmptyParams:!1},this.options=void 0,this.specialKeys=void 0,this.formSubmitDelegate=void 0,this.prepareInlineForms=e=>{const{el:t}=e.trigger;if(null==t||!t.matches(this.options.inlineFormSelector))return;if(!t.id)return void console.error("[@swup/forms-plugin] inline forms must have an id attribute:",t);const o=`#${t.id}`;e.containers=[o],e.animation.scope="containers",e.animation.selector=o,e.scroll.target=o;const n=e.a11y;"object"==typeof n&&(n.focus=o)},this.options=i({},this.defaults,e),this.specialKeys=function(e){let t={};function o(){t={}}function n({key:o}){e.includes(o)&&(t[o]=!0)}function r({key:o}){e.includes(o)&&(t[o]=!1)}function i(){o()}return{watch:function(){document.addEventListener("keydown",n),document.addEventListener("keyup",r),window.addEventListener("blur",i)},unwatch:function(){document.removeEventListener("keydown",n),document.removeEventListener("keyup",r),document.removeEventListener("blur",i),o()},get pressed(){return Object.values(t).filter(Boolean).length>0}}}(["Meta","Control","Shift"]),this.beforeFormSubmit=this.beforeFormSubmit.bind(this)}mount(){this.swup.hooks.create("form:submit"),this.swup.hooks.create("form:submit:newtab"),this.specialKeys.watch(),this.formSubmitDelegate=this.swup.delegateEvent(this.options.formSelector,"submit",this.beforeFormSubmit,{capture:!0}),this.on("visit:start",this.prepareInlineForms,{priority:1})}unmount(){var e;null==(e=this.formSubmitDelegate)||e.destroy(),this.specialKeys.unwatch()}beforeFormSubmit(e){const t=this.swup,{delegateTarget:o,submitter:n}=e,{href:r,url:i,hash:a,target:l}=s(o,n),c=this.specialKeys.pressed,d="_blank"===l,u=c||d,h=t.createVisit({to:i,hash:a,el:o,event:e});if(u||!t.shouldIgnoreVisit(r,{el:o,event:e}))if(d)t.hooks.callSync("form:submit:newtab",h,{el:o,event:e});else if(c){t.hooks.callSync("form:submit:newtab",h,{el:o,event:e});const n=function(e){const t=e.getAttribute("target")||"";return e.setAttribute("target","_blank"),()=>{t?e.setAttribute("target",t):e.removeAttribute("target")}}(o);o.addEventListener("submit",(()=>setTimeout(n)),{once:!0})}else t.hooks.callSync("form:submit",h,{el:o,event:e},(()=>{this.submitForm(e)}))}submitForm(e){const{delegateTarget:t,submitter:o}=e,{stripEmptyParams:n}=this.options,{href:r,method:i,body:a}=s(t,o,{stripEmptyParams:n});["GET","POST"].includes(i)?(e.preventDefault(),this.swup.navigate(r,{method:i,body:a,cache:{read:!1,write:!0}},{el:t,event:e})):console.warn(`Unsupported form method: ${i}`)}}},23106:(e,t,o)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},n.apply(this,arguments)}o.d(t,{Z:()=>i});const r=e=>String(e).split(".").map((e=>String(parseInt(e||"0",10)))).concat(["0","0"]).slice(0,3).join(".");class i{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach((e=>e())),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return"object"!=typeof this.requires||Object.entries(this.requires).forEach((([e,t])=>{if(!function(e,t,o){const n=function(e,t){var o;if("swup"===e)return null!=(o=t.version)?o:"";{var n;const o=t.findPlugin(e);return null!=(n=null==o?void 0:o.version)?n:""}}(e,o);return!!n&&((e,t)=>t.every((t=>{const[,o,n]=t.match(/^([\D]+)?(.*)$/)||[];var i,s;return((e,t)=>{const o={"":e=>0===e,">":e=>e>0,">=":e=>e>=0,"<":e=>e<0,"<=":e=>e<=0};return(o[t]||o[""])(e)})((s=n,i=r(i=e),s=r(s),i.localeCompare(s,void 0,{numeric:!0})),o||">=")})))(n,t)}(e,t=Array.isArray(t)?t:[t],this.swup)){const o=`${e} ${t.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${o}`)}})),!0}on(e,t,o={}){var n;t=!(n=t).name.startsWith("bound ")||n.hasOwnProperty("prototype")?t.bind(this):t;const r=this.swup.hooks.on(e,t,o);return this.handlersToUnregister.push(r),r}once(e,t,o={}){return this.on(e,t,n({},o,{once:!0}))}before(e,t,o={}){return this.on(e,t,n({},o,{before:!0}))}replace(e,t,o={}){return this.on(e,t,n({},o,{replace:!0}))}off(e,t){return this.swup.hooks.off(e,t)}}},17673:(e,t,o)=>{"use strict";o.d(t,{Z:()=>i});var n=o(15024);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r.apply(null,arguments)}class i extends n.Z{constructor(e={}){super(),this.name="SwupSlideTheme",this.defaults={mainElement:"#swup",reversed:!1},this.options=void 0,this.options=r({},this.defaults,e)}mount(){this.applyStyles("html{--swup-slide-theme-direction:1;--swup-slide-theme-translate:60px;--swup-slide-theme-duration-fade:0.3s;--swup-slide-theme-duration-slide:0.4s;--swup-slide-theme-translate-forward:calc(var(--swup-slide-theme-direction)*var(--swup-slide-theme-translate));--swup-slide-theme-translate-backward:calc(var(--swup-slide-theme-translate-forward)*-1)}html.swup-theme-reverse{--swup-slide-theme-direction:-1}html.is-changing .swup-transition-main{opacity:1;transform:translateZ(0);transition:opacity var(--swup-slide-theme-duration-fade),transform var(--swup-slide-theme-duration-slide)}html.is-animating .swup-transition-main{opacity:0;transform:translate3d(0,var(--swup-slide-theme-translate-backward),0)}html.is-animating.is-leaving .swup-transition-main{transform:translate3d(0,var(--swup-slide-theme-translate-forward),0)}"),this.addClassName(this.options.mainElement,"main"),this.options.reversed&&document.documentElement.classList.add("swup-theme-reverse")}unmount(){document.documentElement.classList.remove("swup-theme-reverse")}}},15024:(e,t,o)=>{"use strict";o.d(t,{Z:()=>r});var n=o(23106);class r extends n.Z{constructor(...e){super(...e),this._originalAnimationSelectorOption="",this._addedStyleElements=[],this._addedHTMLContent=[],this._classNameAddedToElements=[],this._addClassNameToElement=()=>{this._classNameAddedToElements.forEach((e=>{Array.from(document.querySelectorAll(e.selector)).forEach((t=>{t.classList.add(`swup-transition-${e.name}`)}))}))}}_beforeMount(){this._originalAnimationSelectorOption=String(this.swup.options.animationSelector),this.swup.options.animationSelector='[class*="swup-transition-"]',this.swup.hooks.on("content:replace",this._addClassNameToElement)}_afterUnmount(){this.swup.options.animationSelector=this._originalAnimationSelectorOption,this._addedStyleElements.forEach((e=>{e.outerHTML=""})),this._addedStyleElements=[],this._addedHTMLContent.forEach((e=>{e.outerHTML=""})),this._addedHTMLContent=[],this._classNameAddedToElements.forEach((e=>{Array.from(document.querySelectorAll(e.selector)).forEach((e=>{e.className.split(" ").forEach((t=>{new RegExp("^swup-transition-").test(t)&&e.classList.remove(t)}))}))})),this.swup.hooks.off("content:replace",this._addClassNameToElement)}applyStyles(e){const t=document.createElement("style");t.setAttribute("data-swup-theme",""),t.appendChild(document.createTextNode(e)),document.head.prepend(t),this._addedStyleElements.push(t)}applyHTML(e){const t=document.createElement("div");t.innerHTML=e,document.body.appendChild(t),this._addedHTMLContent.push(t)}addClassName(e,t){this._classNameAddedToElements.push({selector:e,name:t}),this._addClassNameToElement()}}},25512:(e,t,o)=>{"use strict";function n(){}o.d(t,{qi:()=>Rr,vn:()=>Go,ZL:()=>Jr,uw:()=>vi,kL:()=>Er,De:()=>ti,ST:()=>Xo,jn:()=>Ur,f$:()=>_i,tt:()=>Qo,od:()=>$r,Dx:()=>ni,u:()=>fi});const r=function(){let e=0;return function(){return e++}}();function i(e){return null==e}function s(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function a(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}const l=e=>("number"==typeof e||e instanceof Number)&&isFinite(+e);function c(e,t){return l(e)?e:t}function d(e,t){return void 0===e?t:e}const u=(e,t)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function h(e,t,o){if(e&&"function"==typeof e.call)return e.apply(o,t)}function m(e,t,o,n){let r,i,l;if(s(e))if(i=e.length,n)for(r=i-1;r>=0;r--)t.call(o,e[r],r);else for(r=0;r<i;r++)t.call(o,e[r],r);else if(a(e))for(l=Object.keys(e),i=l.length,r=0;r<i;r++)t.call(o,e[l[r]],l[r])}function p(e,t){let o,n,r,i;if(!e||!t||e.length!==t.length)return!1;for(o=0,n=e.length;o<n;++o)if(r=e[o],i=t[o],r.datasetIndex!==i.datasetIndex||r.index!==i.index)return!1;return!0}function g(e){if(s(e))return e.map(g);if(a(e)){const t=Object.create(null),o=Object.keys(e),n=o.length;let r=0;for(;r<n;++r)t[o[r]]=g(e[o[r]]);return t}return e}function f(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function b(e,t,o,n){if(!f(e))return;const r=t[e],i=o[e];a(r)&&a(i)?v(r,i,n):t[e]=g(i)}function v(e,t,o){const n=s(t)?t:[t],r=n.length;if(!a(e))return e;const i=(o=o||{}).merger||b;for(let s=0;s<r;++s){if(!a(t=n[s]))continue;const r=Object.keys(t);for(let n=0,s=r.length;n<s;++n)i(r[n],e,t,o)}return e}function y(e,t){return v(e,t,{merger:x})}function x(e,t,o){if(!f(e))return;const n=t[e],r=o[e];a(n)&&a(r)?y(n,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=g(r))}const w={"":e=>e,x:e=>e.x,y:e=>e.y};function _(e,t){const o=w[t]||(w[t]=function(e){const t=function(e){const t=e.split("."),o=[];let n="";for(const e of t)n+=e,n.endsWith("\\")?n=n.slice(0,-1)+".":(o.push(n),n="");return o}(e);return e=>{for(const o of t){if(""===o)break;e=e&&e[o]}return e}}(t));return o(e)}function S(e){return e.charAt(0).toUpperCase()+e.slice(1)}const C=e=>void 0!==e,k=e=>"function"==typeof e,E=(e,t)=>{if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0};const T=Math.PI,O=2*T,A=O+T,M=Number.POSITIVE_INFINITY,P=T/180,D=T/2,L=T/4,R=2*T/3,N=Math.log10,I=Math.sign;function B(e){const t=Math.round(e);e=F(e,t,e/1e3)?t:e;const o=Math.pow(10,Math.floor(N(e))),n=e/o;return(n<=1?1:n<=2?2:n<=5?5:10)*o}function z(e){return!isNaN(parseFloat(e))&&isFinite(e)}function F(e,t,o){return Math.abs(e-t)<o}function H(e,t,o){let n,r,i;for(n=0,r=e.length;n<r;n++)i=e[n][o],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function j(e){return e*(T/180)}function V(e){return e*(180/T)}function U(e){if(!l(e))return;let t=1,o=0;for(;Math.round(e*t)/t!==e;)t*=10,o++;return o}function Z(e,t){const o=t.x-e.x,n=t.y-e.y,r=Math.sqrt(o*o+n*n);let i=Math.atan2(n,o);return i<-.5*T&&(i+=O),{angle:i,distance:r}}function $(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function W(e,t){return(e-t+A)%O-T}function q(e){return(e%O+O)%O}function G(e,t,o,n){const r=q(e),i=q(t),s=q(o),a=q(i-r),l=q(s-r),c=q(r-i),d=q(r-s);return r===i||r===s||n&&i===s||a>l&&c<d}function Y(e,t,o){return Math.max(t,Math.min(o,e))}function K(e,t,o,n=1e-6){return e>=Math.min(t,o)-n&&e<=Math.max(t,o)+n}function X(e,t,o){o=o||(o=>e[o]<t);let n,r=e.length-1,i=0;for(;r-i>1;)n=i+r>>1,o(n)?i=n:r=n;return{lo:i,hi:r}}const J=(e,t,o,n)=>X(e,o,n?n=>e[n][t]<=o:n=>e[n][t]<o),Q=(e,t,o)=>X(e,o,(n=>e[n][t]>=o));const ee=["push","pop","shift","splice","unshift"];function te(e,t){const o=e._chartjs;if(!o)return;const n=o.listeners,r=n.indexOf(t);-1!==r&&n.splice(r,1),n.length>0||(ee.forEach((t=>{delete e[t]})),delete e._chartjs)}function oe(e){const t=new Set;let o,n;for(o=0,n=e.length;o<n;++o)t.add(e[o]);return t.size===n?e:Array.from(t)}const ne="undefined"==typeof window?function(e){return e()}:window.requestAnimationFrame;function re(e,t,o){const n=o||(e=>Array.prototype.slice.call(e));let r=!1,i=[];return function(...o){i=n(o),r||(r=!0,ne.call(window,(()=>{r=!1,e.apply(t,i)})))}}const ie=e=>"start"===e?"left":"end"===e?"right":"center",se=(e,t,o)=>"start"===e?t:"end"===e?o:(t+o)/2;function ae(e,t,o){const n=t.length;let r=0,i=n;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:d,minDefined:u,maxDefined:h}=s.getUserBounds();u&&(r=Y(Math.min(J(a,s.axis,c).lo,o?n:J(t,l,s.getPixelForValue(c)).lo),0,n-1)),i=h?Y(Math.max(J(a,s.axis,d,!0).hi+1,o?0:J(t,l,s.getPixelForValue(d),!0).hi+1),r,n)-r:n-r}return{start:r,count:i}}function le(e){const{xScale:t,yScale:o,_scaleRanges:n}=e,r={xmin:t.min,xmax:t.max,ymin:o.min,ymax:o.max};if(!n)return e._scaleRanges=r,!0;const i=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==o.min||n.ymax!==o.max;return Object.assign(n,r),i}const ce=e=>0===e||1===e,de=(e,t,o)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*O/o),ue=(e,t,o)=>Math.pow(2,-10*e)*Math.sin((e-t)*O/o)+1,he={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*D),easeOutSine:e=>Math.sin(e*D),easeInOutSine:e=>-.5*(Math.cos(T*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>ce(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ce(e)?e:de(e,.075,.3),easeOutElastic:e=>ce(e)?e:ue(e,.075,.3),easeInOutElastic(e){const t=.1125;return ce(e)?e:e<.5?.5*de(2*e,t,.45):.5+.5*ue(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-he.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,o=2.75;return e<1/o?t*e*e:e<2/o?t*(e-=1.5/o)*e+.75:e<2.5/o?t*(e-=2.25/o)*e+.9375:t*(e-=2.625/o)*e+.984375},easeInOutBounce:e=>e<.5?.5*he.easeInBounce(2*e):.5*he.easeOutBounce(2*e-1)+.5};function me(e){return e+.5|0}const pe=(e,t,o)=>Math.max(Math.min(e,o),t);function ge(e){return pe(me(2.55*e),0,255)}function fe(e){return pe(me(255*e),0,255)}function be(e){return pe(me(e/2.55)/100,0,1)}function ve(e){return pe(me(100*e),0,100)}const ye={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},xe=[..."0123456789ABCDEF"],we=e=>xe[15&e],_e=e=>xe[(240&e)>>4]+xe[15&e],Se=e=>(240&e)>>4==(15&e);function Ce(e){var t=(e=>Se(e.r)&&Se(e.g)&&Se(e.b)&&Se(e.a))(e)?we:_e;return e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0}const ke=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ee(e,t,o){const n=t*Math.min(o,1-o),r=(t,r=(t+e/30)%12)=>o-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Te(e,t,o){const n=(n,r=(n+e/60)%6)=>o-o*t*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Oe(e,t,o){const n=Ee(e,1,.5);let r;for(t+o>1&&(r=1/(t+o),t*=r,o*=r),r=0;r<3;r++)n[r]*=1-t-o,n[r]+=t;return n}function Ae(e){const t=e.r/255,o=e.g/255,n=e.b/255,r=Math.max(t,o,n),i=Math.min(t,o,n),s=(r+i)/2;let a,l,c;return r!==i&&(c=r-i,l=s>.5?c/(2-r-i):c/(r+i),a=function(e,t,o,n,r){return e===r?(t-o)/n+(t<o?6:0):t===r?(o-e)/n+2:(e-t)/n+4}(t,o,n,c,r),a=60*a+.5),[0|a,l||0,s]}function Me(e,t,o,n){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,o,n)).map(fe)}function Pe(e,t,o){return Me(Ee,e,t,o)}function De(e){return(e%360+360)%360}function Le(e){const t=ke.exec(e);let o,n=255;if(!t)return;t[5]!==o&&(n=t[6]?ge(+t[5]):fe(+t[5]));const r=De(+t[2]),i=+t[3]/100,s=+t[4]/100;return o="hwb"===t[1]?function(e,t,o){return Me(Oe,e,t,o)}(r,i,s):"hsv"===t[1]?function(e,t,o){return Me(Te,e,t,o)}(r,i,s):Pe(r,i,s),{r:o[0],g:o[1],b:o[2],a:n}}const Re={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ne={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Ie;function Be(e){Ie||(Ie=function(){const e={},t=Object.keys(Ne),o=Object.keys(Re);let n,r,i,s,a;for(n=0;n<t.length;n++){for(s=a=t[n],r=0;r<o.length;r++)i=o[r],a=a.replace(i,Re[i]);i=parseInt(Ne[s],16),e[a]=[i>>16&255,i>>8&255,255&i]}return e}(),Ie.transparent=[0,0,0,0]);const t=Ie[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}const ze=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Fe=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,He=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function je(e,t,o){if(e){let n=Ae(e);n[t]=Math.max(0,Math.min(n[t]+n[t]*o,0===t?360:1)),n=Pe(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function Ve(e,t){return e?Object.assign(t||{},e):e}function Ue(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=fe(e[3]))):(t=Ve(e,{r:0,g:0,b:0,a:1})).a=fe(t.a),t}function Ze(e){return"r"===e.charAt(0)?function(e){const t=ze.exec(e);let o,n,r,i=255;if(t){if(t[7]!==o){const e=+t[7];i=t[8]?ge(e):pe(255*e,0,255)}return o=+t[1],n=+t[3],r=+t[5],o=255&(t[2]?ge(o):pe(o,0,255)),n=255&(t[4]?ge(n):pe(n,0,255)),r=255&(t[6]?ge(r):pe(r,0,255)),{r:o,g:n,b:r,a:i}}}(e):Le(e)}class $e{constructor(e){if(e instanceof $e)return e;const t=typeof e;let o;var n,r,i;"object"===t?o=Ue(e):"string"===t&&(i=(n=e).length,"#"===n[0]&&(4===i||5===i?r={r:255&17*ye[n[1]],g:255&17*ye[n[2]],b:255&17*ye[n[3]],a:5===i?17*ye[n[4]]:255}:7!==i&&9!==i||(r={r:ye[n[1]]<<4|ye[n[2]],g:ye[n[3]]<<4|ye[n[4]],b:ye[n[5]]<<4|ye[n[6]],a:9===i?ye[n[7]]<<4|ye[n[8]]:255})),o=r||Be(e)||Ze(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=Ve(this._rgb);return e&&(e.a=be(e.a)),e}set rgb(e){this._rgb=Ue(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${be(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):void 0;var e}hexString(){return this._valid?Ce(this._rgb):void 0}hslString(){return this._valid?function(e){if(!e)return;const t=Ae(e),o=t[0],n=ve(t[1]),r=ve(t[2]);return e.a<255?`hsla(${o}, ${n}%, ${r}%, ${be(e.a)})`:`hsl(${o}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(e,t){if(e){const o=this.rgb,n=e.rgb;let r;const i=t===r?.5:t,s=2*i-1,a=o.a-n.a,l=((s*a==-1?s:(s+a)/(1+s*a))+1)/2;r=1-l,o.r=255&l*o.r+r*n.r+.5,o.g=255&l*o.g+r*n.g+.5,o.b=255&l*o.b+r*n.b+.5,o.a=i*o.a+(1-i)*n.a,this.rgb=o}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,o){const n=He(be(e.r)),r=He(be(e.g)),i=He(be(e.b));return{r:fe(Fe(n+o*(He(be(t.r))-n))),g:fe(Fe(r+o*(He(be(t.g))-r))),b:fe(Fe(i+o*(He(be(t.b))-i))),a:e.a+o*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new $e(this.rgb)}alpha(e){return this._rgb.a=fe(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=me(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return je(this._rgb,2,e),this}darken(e){return je(this._rgb,2,-e),this}saturate(e){return je(this._rgb,1,e),this}desaturate(e){return je(this._rgb,1,-e),this}rotate(e){return function(e,t){var o=Ae(e);o[0]=De(o[0]+t),o=Pe(o),e.r=o[0],e.g=o[1],e.b=o[2]}(this._rgb,e),this}}function We(e){return new $e(e)}function qe(e){if(e&&"object"==typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function Ge(e){return qe(e)?e:We(e)}function Ye(e){return qe(e)?e:We(e).saturate(.5).darken(.1).hexString()}const Ke=Object.create(null),Xe=Object.create(null);function Je(e,t){if(!t)return e;const o=t.split(".");for(let t=0,n=o.length;t<n;++t){const n=o[t];e=e[n]||(e[n]=Object.create(null))}return e}function Qe(e,t,o){return"string"==typeof t?v(Je(e,t),o):v(Je(e,""),t)}var et=new class{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>Ye(t.backgroundColor),this.hoverBorderColor=(e,t)=>Ye(t.borderColor),this.hoverColor=(e,t)=>Ye(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return Qe(this,e,t)}get(e){return Je(this,e)}describe(e,t){return Qe(Xe,e,t)}override(e,t){return Qe(Ke,e,t)}route(e,t,o,n){const r=Je(this,e),i=Je(this,o),s="_"+t;Object.defineProperties(r,{[s]:{value:r[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[s],t=i[n];return a(e)?Object.assign({},t,e):d(e,t)},set(e){this[s]=e}}})}}({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function tt(e,t,o,n,r){let i=t[r];return i||(i=t[r]=e.measureText(r).width,o.push(r)),i>n&&(n=i),n}function ot(e,t,o,n){let r=(n=n||{}).data=n.data||{},i=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(r=n.data={},i=n.garbageCollect=[],n.font=t),e.save(),e.font=t;let a=0;const l=o.length;let c,d,u,h,m;for(c=0;c<l;c++)if(h=o[c],null!=h&&!0!==s(h))a=tt(e,r,i,a,h);else if(s(h))for(d=0,u=h.length;d<u;d++)m=h[d],null==m||s(m)||(a=tt(e,r,i,a,m));e.restore();const p=i.length/2;if(p>o.length){for(c=0;c<p;c++)delete r[i[c]];i.splice(0,p)}return a}function nt(e,t,o){const n=e.currentDevicePixelRatio,r=0!==o?Math.max(o/2,.5):0;return Math.round((t-r)*n)/n+r}function rt(e,t){(t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function it(e,t,o,n){st(e,t,o,n,null)}function st(e,t,o,n,r){let i,s,a,l,c,d;const u=t.pointStyle,h=t.rotation,m=t.radius;let p=(h||0)*P;if(u&&"object"==typeof u&&(i=u.toString(),"[object HTMLImageElement]"===i||"[object HTMLCanvasElement]"===i))return e.save(),e.translate(o,n),e.rotate(p),e.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void e.restore();if(!(isNaN(m)||m<=0)){switch(e.beginPath(),u){default:r?e.ellipse(o,n,r/2,m,0,0,O):e.arc(o,n,m,0,O),e.closePath();break;case"triangle":e.moveTo(o+Math.sin(p)*m,n-Math.cos(p)*m),p+=R,e.lineTo(o+Math.sin(p)*m,n-Math.cos(p)*m),p+=R,e.lineTo(o+Math.sin(p)*m,n-Math.cos(p)*m),e.closePath();break;case"rectRounded":c=.516*m,l=m-c,s=Math.cos(p+L)*l,a=Math.sin(p+L)*l,e.arc(o-s,n-a,c,p-T,p-D),e.arc(o+a,n-s,c,p-D,p),e.arc(o+s,n+a,c,p,p+D),e.arc(o-a,n+s,c,p+D,p+T),e.closePath();break;case"rect":if(!h){l=Math.SQRT1_2*m,d=r?r/2:l,e.rect(o-d,n-l,2*d,2*l);break}p+=L;case"rectRot":s=Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(o-s,n-a),e.lineTo(o+a,n-s),e.lineTo(o+s,n+a),e.lineTo(o-a,n+s),e.closePath();break;case"crossRot":p+=L;case"cross":s=Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(o-s,n-a),e.lineTo(o+s,n+a),e.moveTo(o+a,n-s),e.lineTo(o-a,n+s);break;case"star":s=Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(o-s,n-a),e.lineTo(o+s,n+a),e.moveTo(o+a,n-s),e.lineTo(o-a,n+s),p+=L,s=Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(o-s,n-a),e.lineTo(o+s,n+a),e.moveTo(o+a,n-s),e.lineTo(o-a,n+s);break;case"line":s=r?r/2:Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(o-s,n-a),e.lineTo(o+s,n+a);break;case"dash":e.moveTo(o,n),e.lineTo(o+Math.cos(p)*m,n+Math.sin(p)*m)}e.fill(),t.borderWidth>0&&e.stroke()}}function at(e,t,o){return o=o||.5,!t||e&&e.x>t.left-o&&e.x<t.right+o&&e.y>t.top-o&&e.y<t.bottom+o}function lt(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function ct(e){e.restore()}function dt(e,t,o,n,r){if(!t)return e.lineTo(o.x,o.y);if("middle"===r){const n=(t.x+o.x)/2;e.lineTo(n,t.y),e.lineTo(n,o.y)}else"after"===r!=!!n?e.lineTo(t.x,o.y):e.lineTo(o.x,t.y);e.lineTo(o.x,o.y)}function ut(e,t,o,n){if(!t)return e.lineTo(o.x,o.y);e.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?o.cp2x:o.cp1x,n?o.cp2y:o.cp1y,o.x,o.y)}function ht(e,t,o,n,r,a={}){const l=s(t)?t:[t],c=a.strokeWidth>0&&""!==a.strokeColor;let d,u;for(e.save(),e.font=r.string,function(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]);i(t.rotation)||e.rotate(t.rotation);t.color&&(e.fillStyle=t.color);t.textAlign&&(e.textAlign=t.textAlign);t.textBaseline&&(e.textBaseline=t.textBaseline)}(e,a),d=0;d<l.length;++d)u=l[d],c&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),i(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(u,o,n,a.maxWidth)),e.fillText(u,o,n,a.maxWidth),mt(e,o,n,u,a),n+=r.lineHeight;e.restore()}function mt(e,t,o,n,r){if(r.strikethrough||r.underline){const i=e.measureText(n),s=t-i.actualBoundingBoxLeft,a=t+i.actualBoundingBoxRight,l=o-i.actualBoundingBoxAscent,c=o+i.actualBoundingBoxDescent,d=r.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=r.decorationWidth||2,e.moveTo(s,d),e.lineTo(a,d),e.stroke()}}function pt(e,t){const{x:o,y:n,w:r,h:i,radius:s}=t;e.arc(o+s.topLeft,n+s.topLeft,s.topLeft,-D,T,!0),e.lineTo(o,n+i-s.bottomLeft),e.arc(o+s.bottomLeft,n+i-s.bottomLeft,s.bottomLeft,T,D,!0),e.lineTo(o+r-s.bottomRight,n+i),e.arc(o+r-s.bottomRight,n+i-s.bottomRight,s.bottomRight,D,0,!0),e.lineTo(o+r,n+s.topRight),e.arc(o+r-s.topRight,n+s.topRight,s.topRight,0,-D,!0),e.lineTo(o+s.topLeft,n)}const gt=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),ft=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function bt(e,t){const o=(""+e).match(gt);if(!o||"normal"===o[1])return 1.2*t;switch(e=+o[2],o[3]){case"px":return e;case"%":e/=100}return t*e}const vt=e=>+e||0;function yt(e,t){const o={},n=a(t),r=n?Object.keys(t):t,i=a(e)?n?o=>d(e[o],e[t[o]]):t=>e[t]:()=>e;for(const e of r)o[e]=vt(i(e));return o}function xt(e){return yt(e,{top:"y",right:"x",bottom:"y",left:"x"})}function wt(e){return yt(e,["topLeft","topRight","bottomLeft","bottomRight"])}function _t(e){const t=xt(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function St(e,t){e=e||{},t=t||et.font;let o=d(e.size,t.size);"string"==typeof o&&(o=parseInt(o,10));let n=d(e.style,t.style);n&&!(""+n).match(ft)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:d(e.family,t.family),lineHeight:bt(d(e.lineHeight,t.lineHeight),o),size:o,style:n,weight:d(e.weight,t.weight),string:""};return r.string=function(e){return!e||i(e.size)||i(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(r),r}function Ct(e,t,o,n){let r,i,a,l=!0;for(r=0,i=e.length;r<i;++r)if(a=e[r],void 0!==a&&(void 0!==t&&"function"==typeof a&&(a=a(t),l=!1),void 0!==o&&s(a)&&(a=a[o%a.length],l=!1),void 0!==a))return n&&!l&&(n.cacheable=!1),a}function kt(e,t){return Object.assign(Object.create(e),t)}function Et(e,t=[""],o=e,n,r=(()=>e[0])){C(n)||(n=Bt("_fallback",e));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:r,override:r=>Et([r,...e],t,o,n)};return new Proxy(i,{deleteProperty:(t,o)=>(delete t[o],delete t._keys,delete e[0][o],!0),get:(o,n)=>Pt(o,n,(()=>function(e,t,o,n){let r;for(const i of t)if(r=Bt(At(i,e),o),C(r))return Mt(e,r)?Nt(o,n,e,r):r}(n,t,e,o))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>zt(e).includes(t),ownKeys:e=>zt(e),set(e,t,o){const n=e._storage||(e._storage=r());return e[t]=n[t]=o,delete e._keys,!0}})}function Tt(e,t,o,n){const r={_cacheable:!1,_proxy:e,_context:t,_subProxy:o,_stack:new Set,_descriptors:Ot(e,n),setContext:t=>Tt(e,t,o,n),override:r=>Tt(e.override(r),t,o,n)};return new Proxy(r,{deleteProperty:(t,o)=>(delete t[o],delete e[o],!0),get:(e,t,o)=>Pt(e,t,(()=>function(e,t,o){const{_proxy:n,_context:r,_subProxy:i,_descriptors:l}=e;let c=n[t];k(c)&&l.isScriptable(t)&&(c=function(e,t,o,n){const{_proxy:r,_context:i,_subProxy:s,_stack:a}=o;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e),t=t(i,s||n),a.delete(e),Mt(e,t)&&(t=Nt(r._scopes,r,e,t));return t}(t,c,e,o));s(c)&&c.length&&(c=function(e,t,o,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:l}=o;if(C(i.index)&&n(e))t=t[i.index%t.length];else if(a(t[0])){const o=t,n=r._scopes.filter((e=>e!==o));t=[];for(const a of o){const o=Nt(n,r,e,a);t.push(Tt(o,i,s&&s[e],l))}}return t}(t,c,e,l.isIndexable));Mt(t,c)&&(c=Tt(c,r,i&&i[t],l));return c}(e,t,o))),getOwnPropertyDescriptor:(t,o)=>t._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,o)=>Reflect.has(e,o),ownKeys:()=>Reflect.ownKeys(e),set:(t,o,n)=>(e[o]=n,delete t[o],!0)})}function Ot(e,t={scriptable:!0,indexable:!0}){const{_scriptable:o=t.scriptable,_indexable:n=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:o,indexable:n,isScriptable:k(o)?o:()=>o,isIndexable:k(n)?n:()=>n}}const At=(e,t)=>e?e+S(t):t,Mt=(e,t)=>a(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function Pt(e,t,o){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const n=o();return e[t]=n,n}function Dt(e,t,o){return k(e)?e(t,o):e}const Lt=(e,t)=>!0===e?t:"string"==typeof e?_(t,e):void 0;function Rt(e,t,o,n,r){for(const i of t){const t=Lt(o,i);if(t){e.add(t);const i=Dt(t._fallback,o,r);if(C(i)&&i!==o&&i!==n)return i}else if(!1===t&&C(n)&&o!==n)return null}return!1}function Nt(e,t,o,n){const r=t._rootScopes,i=Dt(t._fallback,o,n),l=[...e,...r],c=new Set;c.add(n);let d=It(c,l,o,i||o,n);return null!==d&&((!C(i)||i===o||(d=It(c,l,i,d,n),null!==d))&&Et(Array.from(c),[""],r,i,(()=>function(e,t,o){const n=e._getTarget();t in n||(n[t]={});const r=n[t];if(s(r)&&a(o))return o;return r}(t,o,n))))}function It(e,t,o,n,r){for(;o;)o=Rt(e,t,o,n,r);return o}function Bt(e,t){for(const o of t){if(!o)continue;const t=o[e];if(C(t))return t}}function zt(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const o of e)for(const e of Object.keys(o).filter((e=>!e.startsWith("_"))))t.add(e);return Array.from(t)}(e._scopes)),t}function Ft(e,t,o,n){const{iScale:r}=e,{key:i="r"}=this._parsing,s=new Array(n);let a,l,c,d;for(a=0,l=n;a<l;++a)c=a+o,d=t[c],s[a]={r:r.parse(_(d,i),c)};return s}const Ht=Number.EPSILON||1e-14,jt=(e,t)=>t<e.length&&!e[t].skip&&e[t],Vt=e=>"x"===e?"y":"x";function Ut(e,t,o,n){const r=e.skip?t:e,i=t,s=o.skip?t:o,a=$(i,r),l=$(s,i);let c=a/(a+l),d=l/(a+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const u=n*c,h=n*d;return{previous:{x:i.x-u*(s.x-r.x),y:i.y-u*(s.y-r.y)},next:{x:i.x+h*(s.x-r.x),y:i.y+h*(s.y-r.y)}}}function Zt(e,t="x"){const o=Vt(t),n=e.length,r=Array(n).fill(0),i=Array(n);let s,a,l,c=jt(e,0);for(s=0;s<n;++s)if(a=l,l=c,c=jt(e,s+1),l){if(c){const e=c[t]-l[t];r[s]=0!==e?(c[o]-l[o])/e:0}i[s]=a?c?I(r[s-1])!==I(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}!function(e,t,o){const n=e.length;let r,i,s,a,l,c=jt(e,0);for(let d=0;d<n-1;++d)l=c,c=jt(e,d+1),l&&c&&(F(t[d],0,Ht)?o[d]=o[d+1]=0:(r=o[d]/t[d],i=o[d+1]/t[d],a=Math.pow(r,2)+Math.pow(i,2),a<=9||(s=3/Math.sqrt(a),o[d]=r*s*t[d],o[d+1]=i*s*t[d])))}(e,r,i),function(e,t,o="x"){const n=Vt(o),r=e.length;let i,s,a,l=jt(e,0);for(let c=0;c<r;++c){if(s=a,a=l,l=jt(e,c+1),!a)continue;const r=a[o],d=a[n];s&&(i=(r-s[o])/3,a[`cp1${o}`]=r-i,a[`cp1${n}`]=d-i*t[c]),l&&(i=(l[o]-r)/3,a[`cp2${o}`]=r+i,a[`cp2${n}`]=d+i*t[c])}}(e,i,t)}function $t(e,t,o){return Math.max(Math.min(e,o),t)}function Wt(e,t,o,n,r){let i,s,a,l;if(t.spanGaps&&(e=e.filter((e=>!e.skip))),"monotone"===t.cubicInterpolationMode)Zt(e,r);else{let o=n?e[e.length-1]:e[0];for(i=0,s=e.length;i<s;++i)a=e[i],l=Ut(o,a,e[Math.min(i+1,s-(n?0:1))%s],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,o=a}t.capBezierPoints&&function(e,t){let o,n,r,i,s,a=at(e[0],t);for(o=0,n=e.length;o<n;++o)s=i,i=a,a=o<n-1&&at(e[o+1],t),i&&(r=e[o],s&&(r.cp1x=$t(r.cp1x,t.left,t.right),r.cp1y=$t(r.cp1y,t.top,t.bottom)),a&&(r.cp2x=$t(r.cp2x,t.left,t.right),r.cp2y=$t(r.cp2y,t.top,t.bottom)))}(e,o)}function qt(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Gt(e){let t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function Yt(e,t,o){let n;return"string"==typeof e?(n=parseInt(e,10),-1!==e.indexOf("%")&&(n=n/100*t.parentNode[o])):n=e,n}const Kt=e=>window.getComputedStyle(e,null);const Xt=["top","right","bottom","left"];function Jt(e,t,o){const n={};o=o?"-"+o:"";for(let r=0;r<4;r++){const i=Xt[r];n[i]=parseFloat(e[t+"-"+i+o])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Qt=(e,t,o)=>(e>0||t>0)&&(!o||!o.shadowRoot);function eo(e,t){if("native"in e)return e;const{canvas:o,currentDevicePixelRatio:n}=t,r=Kt(o),i="border-box"===r.boxSizing,s=Jt(r,"padding"),a=Jt(r,"border","width"),{x:l,y:c,box:d}=function(e,t){const o=e.touches,n=o&&o.length?o[0]:e,{offsetX:r,offsetY:i}=n;let s,a,l=!1;if(Qt(r,i,e.target))s=r,a=i;else{const e=t.getBoundingClientRect();s=n.clientX-e.left,a=n.clientY-e.top,l=!0}return{x:s,y:a,box:l}}(e,o),u=s.left+(d&&a.left),h=s.top+(d&&a.top);let{width:m,height:p}=t;return i&&(m-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/m*o.width/n),y:Math.round((c-h)/p*o.height/n)}}const to=e=>Math.round(10*e)/10;function oo(e,t,o,n){const r=Kt(e),i=Jt(r,"margin"),s=Yt(r.maxWidth,e,"clientWidth")||M,a=Yt(r.maxHeight,e,"clientHeight")||M,l=function(e,t,o){let n,r;if(void 0===t||void 0===o){const i=Gt(e);if(i){const e=i.getBoundingClientRect(),s=Kt(i),a=Jt(s,"border","width"),l=Jt(s,"padding");t=e.width-l.width-a.width,o=e.height-l.height-a.height,n=Yt(s.maxWidth,i,"clientWidth"),r=Yt(s.maxHeight,i,"clientHeight")}else t=e.clientWidth,o=e.clientHeight}return{width:t,height:o,maxWidth:n||M,maxHeight:r||M}}(e,t,o);let{width:c,height:d}=l;if("content-box"===r.boxSizing){const e=Jt(r,"border","width"),t=Jt(r,"padding");c-=t.width+e.width,d-=t.height+e.height}return c=Math.max(0,c-i.width),d=Math.max(0,n?Math.floor(c/n):d-i.height),c=to(Math.min(c,s,l.maxWidth)),d=to(Math.min(d,a,l.maxHeight)),c&&!d&&(d=to(c/2)),{width:c,height:d}}function no(e,t,o){const n=t||1,r=Math.floor(e.height*n),i=Math.floor(e.width*n);e.height=r/n,e.width=i/n;const s=e.canvas;return s.style&&(o||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==n||s.height!==r||s.width!==i)&&(e.currentDevicePixelRatio=n,s.height=r,s.width=i,e.ctx.setTransform(n,0,0,n,0,0),!0)}const ro=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function io(e,t){const o=function(e,t){return Kt(e).getPropertyValue(t)}(e,t),n=o&&o.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function so(e,t,o,n){return{x:e.x+o*(t.x-e.x),y:e.y+o*(t.y-e.y)}}function ao(e,t,o,n){return{x:e.x+o*(t.x-e.x),y:"middle"===n?o<.5?e.y:t.y:"after"===n?o<1?e.y:t.y:o>0?t.y:e.y}}function lo(e,t,o,n){const r={x:e.cp2x,y:e.cp2y},i={x:t.cp1x,y:t.cp1y},s=so(e,r,o),a=so(r,i,o),l=so(i,t,o),c=so(s,a,o),d=so(a,l,o);return so(c,d,o)}const co=new Map;function uo(e,t,o){return function(e,t){t=t||{};const o=e+JSON.stringify(t);let n=co.get(o);return n||(n=new Intl.NumberFormat(e,t),co.set(o,n)),n}(t,o).format(e)}function ho(e,t,o){return e?function(e,t){return{x:o=>e+e+t-o,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,o):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function mo(e,t){let o,n;"ltr"!==t&&"rtl"!==t||(o=e.canvas.style,n=[o.getPropertyValue("direction"),o.getPropertyPriority("direction")],o.setProperty("direction",t,"important"),e.prevTextDirection=n)}function po(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function go(e){return"angle"===e?{between:G,compare:W,normalize:q}:{between:K,compare:(e,t)=>e-t,normalize:e=>e}}function fo({start:e,end:t,count:o,loop:n,style:r}){return{start:e%o,end:t%o,loop:n&&(t-e+1)%o==0,style:r}}function bo(e,t,o){if(!o)return[e];const{property:n,start:r,end:i}=o,s=t.length,{compare:a,between:l,normalize:c}=go(n),{start:d,end:u,loop:h,style:m}=function(e,t,o){const{property:n,start:r,end:i}=o,{between:s,normalize:a}=go(n),l=t.length;let c,d,{start:u,end:h,loop:m}=e;if(m){for(u+=l,h+=l,c=0,d=l;c<d&&s(a(t[u%l][n]),r,i);++c)u--,h--;u%=l,h%=l}return h<u&&(h+=l),{start:u,end:h,loop:m,style:e.style}}(e,t,o),p=[];let g,f,b,v=!1,y=null;const x=()=>v||l(r,b,g)&&0!==a(r,b),w=()=>!v||0===a(i,g)||l(i,b,g);for(let e=d,o=d;e<=u;++e)f=t[e%s],f.skip||(g=c(f[n]),g!==b&&(v=l(g,r,i),null===y&&x()&&(y=0===a(g,r)?e:o),null!==y&&w()&&(p.push(fo({start:y,end:e,loop:h,count:s,style:m})),y=null),o=e,b=g));return null!==y&&p.push(fo({start:y,end:u,loop:h,count:s,style:m})),p}function vo(e,t){const o=[],n=e.segments;for(let r=0;r<n.length;r++){const i=bo(n[r],e.points,t);i.length&&o.push(...i)}return o}function yo(e,t,o,n){return n&&n.setContext&&o?function(e,t,o,n){const r=e._chart.getContext(),i=xo(e.options),{_datasetIndex:s,options:{spanGaps:a}}=e,l=o.length,c=[];let d=i,u=t[0].start,h=u;function m(e,t,n,r){const i=a?-1:1;if(e!==t){for(e+=l;o[e%l].skip;)e-=i;for(;o[t%l].skip;)t+=i;e%l!=t%l&&(c.push({start:e%l,end:t%l,loop:n,style:r}),d=r,u=t%l)}}for(const e of t){u=a?u:e.start;let t,i=o[u%l];for(h=u+1;h<=e.end;h++){const a=o[h%l];t=xo(n.setContext(kt(r,{type:"segment",p0:i,p1:a,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:s}))),wo(t,d)&&m(u,h-1,e.loop,d),i=a,d=t}u<h-1&&m(u,h-1,e.loop,d)}return c}(e,t,o,n):t}function xo(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function wo(e,t){return t&&JSON.stringify(e)!==JSON.stringify(t)}var _o=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,o,n){const r=t.listeners[n],i=t.duration;r.forEach((n=>n({chart:e,initial:t.initial,numSteps:i,currentStep:Math.min(o-t.start,i)})))}_refresh(){this._request||(this._running=!0,this._request=ne.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(e=Date.now()){let t=0;this._charts.forEach(((o,n)=>{if(!o.running||!o.items.length)return;const r=o.items;let i,s=r.length-1,a=!1;for(;s>=0;--s)i=r[s],i._active?(i._total>o.duration&&(o.duration=i._total),i.tick(e),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,o,e,"progress")),r.length||(o.running=!1,this._notify(n,o,e,"complete"),o.initial=!1),t+=r.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let o=t.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,o)),o}listen(e,t,o){this._getAnims(e).listeners[t].push(o)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const o=t.items;let n=o.length-1;for(;n>=0;--n)o[n].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}};const So="transparent",Co={boolean:(e,t,o)=>o>.5?t:e,color(e,t,o){const n=Ge(e||So),r=n.valid&&Ge(t||So);return r&&r.valid?r.mix(n,o).hexString():t},number:(e,t,o)=>e+(t-e)*o};class ko{constructor(e,t,o,n){const r=t[o];n=Ct([e.to,n,r,e.from]);const i=Ct([e.from,r,n]);this._active=!0,this._fn=e.fn||Co[e.type||typeof i],this._easing=he[e.easing]||he.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=o,this._from=i,this._to=n,this._promises=void 0}active(){return this._active}update(e,t,o){if(this._active){this._notify(!1);const n=this._target[this._prop],r=o-this._start,i=this._duration-r;this._start=o,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=Ct([e.to,t,n,e.from]),this._from=Ct([e.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,o=this._duration,n=this._prop,r=this._from,i=this._loop,s=this._to;let a;if(this._active=r!==s&&(i||t<o),!this._active)return this._target[n]=s,void this._notify(!0);t<0?this._target[n]=r:(a=t/o%2,a=i&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,o)=>{e.push({res:t,rej:o})}))}_notify(e){const t=e?"res":"rej",o=this._promises||[];for(let e=0;e<o.length;e++)o[e][t]()}}et.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Eo=Object.keys(et.animation);et.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),et.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),et.describe("animations",{_fallback:"animation"}),et.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}});class To{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!a(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach((o=>{const n=e[o];if(!a(n))return;const r={};for(const e of Eo)r[e]=n[e];(s(n.properties)&&n.properties||[o]).forEach((e=>{e!==o&&t.has(e)||t.set(e,r)}))}))}_animateOptions(e,t){const o=t.options,n=function(e,t){if(!t)return;let o=e.options;if(!o)return void(e.options=t);o.$shared&&(e.options=o=Object.assign({},o,{$shared:!1,$animations:{}}));return o}(e,o);if(!n)return[];const r=this._createAnimations(n,o);return o.$shared&&function(e,t){const o=[],n=Object.keys(t);for(let t=0;t<n.length;t++){const r=e[n[t]];r&&r.active()&&o.push(r.wait())}return Promise.all(o)}(e.options.$animations,o).then((()=>{e.options=o}),(()=>{})),r}_createAnimations(e,t){const o=this._properties,n=[],r=e.$animations||(e.$animations={}),i=Object.keys(t),s=Date.now();let a;for(a=i.length-1;a>=0;--a){const l=i[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(e,t));continue}const c=t[l];let d=r[l];const u=o.get(l);if(d){if(u&&d.active()){d.update(u,c,s);continue}d.cancel()}u&&u.duration?(r[l]=d=new ko(u,e,l,c),n.push(d)):e[l]=c}return n}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const o=this._createAnimations(e,t);return o.length?(_o.add(this._chart,o),!0):void 0}}function Oo(e,t){const o=e&&e.options||{},n=o.reverse,r=void 0===o.min?t:0,i=void 0===o.max?t:0;return{start:n?i:r,end:n?r:i}}function Ao(e,t){const o=[],n=e._getSortedDatasetMetas(t);let r,i;for(r=0,i=n.length;r<i;++r)o.push(n[r].index);return o}function Mo(e,t,o,n={}){const r=e.keys,i="single"===n.mode;let s,a,c,d;if(null!==t){for(s=0,a=r.length;s<a;++s){if(c=+r[s],c===o){if(n.all)continue;break}d=e.values[c],l(d)&&(i||0===t||I(t)===I(d))&&(t+=d)}return t}}function Po(e,t){const o=e&&e.options.stacked;return o||void 0===o&&void 0!==t.stack}function Do(e,t,o){const n=e[t]||(e[t]={});return n[o]||(n[o]={})}function Lo(e,t,o,n){for(const r of t.getMatchingVisibleMetas(n).reverse()){const t=e[r.index];if(o&&t>0||!o&&t<0)return r.index}return null}function Ro(e,t){const{chart:o,_cachedMeta:n}=e,r=o._stacks||(o._stacks={}),{iScale:i,vScale:s,index:a}=n,l=i.axis,c=s.axis,d=function(e,t,o){return`${e.id}.${t.id}.${o.stack||o.type}`}(i,s,n),u=t.length;let h;for(let e=0;e<u;++e){const o=t[e],{[l]:i,[c]:u}=o;h=(o._stacks||(o._stacks={}))[c]=Do(r,d,i),h[a]=u,h._top=Lo(h,s,!0,n.type),h._bottom=Lo(h,s,!1,n.type)}}function No(e,t){const o=e.scales;return Object.keys(o).filter((e=>o[e].axis===t)).shift()}function Io(e,t){const o=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[n]||void 0===t[n][o])return;delete t[n][o]}}}const Bo=e=>"reset"===e||"none"===e,zo=(e,t)=>t?e:Object.assign({},e);class Fo{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Po(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Io(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,o=this.getDataset(),n=(e,t,o,n)=>"x"===e?t:"r"===e?n:o,r=t.xAxisID=d(o.xAxisID,No(e,"x")),i=t.yAxisID=d(o.yAxisID,No(e,"y")),s=t.rAxisID=d(o.rAxisID,No(e,"r")),a=t.indexAxis,l=t.iAxisID=n(a,r,i,s),c=t.vAxisID=n(a,i,r,s);t.xScale=this.getScaleForId(r),t.yScale=this.getScaleForId(i),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&te(this._data,this),e._stacked&&Io(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),o=this._data;if(a(t))this._data=function(e){const t=Object.keys(e),o=new Array(t.length);let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],o[n]={x:i,y:e[i]};return o}(t);else if(o!==t){if(o){te(o,this);const e=this._cachedMeta;Io(e),e._parsed=[]}t&&Object.isExtensible(t)&&(r=this,(n=t)._chartjs?n._chartjs.listeners.push(r):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[r]}}),ee.forEach((e=>{const t="_onData"+S(e),o=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...e){const r=o.apply(this,e);return n._chartjs.listeners.forEach((o=>{"function"==typeof o[t]&&o[t](...e)})),r}})})))),this._syncList=[],this._data=t}var n,r}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,o=this.getDataset();let n=!1;this._dataCheck();const r=t._stacked;t._stacked=Po(t.vScale,t),t.stack!==o.stack&&(n=!0,Io(t),t.stack=o.stack),this._resyncElements(e),(n||r!==t._stacked)&&Ro(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:o,_data:n}=this,{iScale:r,_stacked:i}=o,l=r.axis;let c,d,u,h=0===e&&t===n.length||o._sorted,m=e>0&&o._parsed[e-1];if(!1===this._parsing)o._parsed=n,o._sorted=!0,u=n;else{u=s(n[e])?this.parseArrayData(o,n,e,t):a(n[e])?this.parseObjectData(o,n,e,t):this.parsePrimitiveData(o,n,e,t);const r=()=>null===d[l]||m&&d[l]<m[l];for(c=0;c<t;++c)o._parsed[c+e]=d=u[c],h&&(r()&&(h=!1),m=d);o._sorted=h}i&&Ro(this,u)}parsePrimitiveData(e,t,o,n){const{iScale:r,vScale:i}=e,s=r.axis,a=i.axis,l=r.getLabels(),c=r===i,d=new Array(n);let u,h,m;for(u=0,h=n;u<h;++u)m=u+o,d[u]={[s]:c||r.parse(l[m],m),[a]:i.parse(t[m],m)};return d}parseArrayData(e,t,o,n){const{xScale:r,yScale:i}=e,s=new Array(n);let a,l,c,d;for(a=0,l=n;a<l;++a)c=a+o,d=t[c],s[a]={x:r.parse(d[0],c),y:i.parse(d[1],c)};return s}parseObjectData(e,t,o,n){const{xScale:r,yScale:i}=e,{xAxisKey:s="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let c,d,u,h;for(c=0,d=n;c<d;++c)u=c+o,h=t[u],l[c]={x:r.parse(_(h,s),u),y:i.parse(_(h,a),u)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,o){const n=this.chart,r=this._cachedMeta,i=t[e.axis];return Mo({keys:Ao(n,!0),values:t._stacks[e.axis]},i,r.index,{mode:o})}updateRangeFromParsed(e,t,o,n){const r=o[t.axis];let i=null===r?NaN:r;const s=n&&o._stacks[t.axis];n&&s&&(n.values=s,i=Mo(n,r,this._cachedMeta.index)),e.min=Math.min(e.min,i),e.max=Math.max(e.max,i)}getMinMax(e,t){const o=this._cachedMeta,n=o._parsed,r=o._sorted&&e===o.iScale,i=n.length,s=this._getOtherScale(e),a=((e,t,o)=>e&&!t.hidden&&t._stacked&&{keys:Ao(o,!0),values:null})(t,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=function(e){const{min:t,max:o,minDefined:n,maxDefined:r}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:r?o:Number.POSITIVE_INFINITY}}(s);let h,m;function p(){m=n[h];const t=m[s.axis];return!l(m[e.axis])||d>t||u<t}for(h=0;h<i&&(p()||(this.updateRangeFromParsed(c,e,m,a),!r));++h);if(r)for(h=i-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(c,e,m,a);break}return c}getAllParsedValues(e){const t=this._cachedMeta._parsed,o=[];let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n][e.axis],l(i)&&o.push(i);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,o=t.iScale,n=t.vScale,r=this.getParsed(e);return{label:o?""+o.getLabelForValue(r[o.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=function(e){let t,o,n,r;return a(e)?(t=e.top,o=e.right,n=e.bottom,r=e.left):t=o=n=r=e,{top:t,right:o,bottom:n,left:r,disabled:!1===e}}(d(this.options.clip,function(e,t,o){if(!1===o)return!1;const n=Oo(e,o),r=Oo(t,o);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,o=this._cachedMeta,n=o.data||[],r=t.chartArea,i=[],s=this._drawStart||0,a=this._drawCount||n.length-s,l=this.options.drawActiveElementsOnTop;let c;for(o.dataset&&o.dataset.draw(e,r,s,a),c=s;c<s+a;++c){const t=n[c];t.hidden||(t.active&&l?i.push(t):t.draw(e,r))}for(c=0;c<i.length;++c)i[c].draw(e,r)}getStyle(e,t){const o=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,t,o){const n=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];r=t.$context||(t.$context=function(e,t,o){return kt(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:o,index:t,mode:"default",type:"data"})}(this.getContext(),e,t)),r.parsed=this.getParsed(e),r.raw=n.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=function(e,t){return kt(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!t,r.mode=o,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",o){const n="active"===t,r=this._cachedDataOpts,i=e+"-"+t,s=r[i],a=this.enableOptionSharing&&C(o);if(s)return zo(s,a);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),d=n?[`${e}Hover`,"hover",e,""]:[e,""],u=l.getOptionScopes(this.getDataset(),c),h=Object.keys(et.elements[e]),m=l.resolveNamedOptions(u,h,(()=>this.getContext(o,n)),d);return m.$shared&&(m.$shared=a,r[i]=Object.freeze(zo(m,a))),m}_resolveAnimations(e,t,o){const n=this.chart,r=this._cachedDataOpts,i=`animation-${t}`,s=r[i];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,t),i=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(i,this.getContext(e,o,t))}const l=new To(n,a&&a.animations);return a&&a._cacheable&&(r[i]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||Bo(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const o=this.resolveDataElementOptions(e,t),n=this._sharedOptions,r=this.getSharedOptions(o),i=this.includeOptions(t,r)||r!==n;return this.updateSharedOptions(r,t,o),{sharedOptions:r,includeOptions:i}}updateElement(e,t,o,n){Bo(n)?Object.assign(e,o):this._resolveAnimations(t,n).update(e,o)}updateSharedOptions(e,t,o){e&&!Bo(t)&&this._resolveAnimations(void 0,t).update(e,o)}_setStyle(e,t,o,n){e.active=n;const r=this.getStyle(t,n);this._resolveAnimations(t,o,n).update(e,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(e,t,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,t,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,o=this._cachedMeta.data;for(const[e,t,o]of this._syncList)this[e](t,o);this._syncList=[];const n=o.length,r=t.length,i=Math.min(r,n);i&&this.parse(0,i),r>n?this._insertElements(n,r-n,e):r<n&&this._removeElements(r,n-r)}_insertElements(e,t,o=!0){const n=this._cachedMeta,r=n.data,i=e+t;let s;const a=e=>{for(e.length+=t,s=e.length-1;s>=i;s--)e[s]=e[s-t]};for(a(r),s=e;s<i;++s)r[s]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(e,t),o&&this.updateElements(r,e,t,"reset")}updateElements(e,t,o,n){}_removeElements(e,t){const o=this._cachedMeta;if(this._parsing){const n=o._parsed.splice(e,t);o._stacked&&Io(o,n)}o.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,o,n]=e;this[t](o,n)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Ho(e){const t=e.iScale,o=function(e,t){if(!e._cache.$bar){const o=e.getMatchingVisibleMetas(t);let n=[];for(let t=0,r=o.length;t<r;t++)n=n.concat(o[t].controller.getAllParsedValues(e));e._cache.$bar=oe(n.sort(((e,t)=>e-t)))}return e._cache.$bar}(t,e.type);let n,r,i,s,a=t._length;const l=()=>{32767!==i&&-32768!==i&&(C(s)&&(a=Math.min(a,Math.abs(i-s)||a)),s=i)};for(n=0,r=o.length;n<r;++n)i=t.getPixelForValue(o[n]),l();for(s=void 0,n=0,r=t.ticks.length;n<r;++n)i=t.getPixelForTick(n),l();return a}function jo(e,t,o,n){return s(e)?function(e,t,o,n){const r=o.parse(e[0],n),i=o.parse(e[1],n),s=Math.min(r,i),a=Math.max(r,i);let l=s,c=a;Math.abs(s)>Math.abs(a)&&(l=a,c=s),t[o.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:i,min:s,max:a}}(e,t,o,n):t[o.axis]=o.parse(e,n),t}function Vo(e,t,o,n){const r=e.iScale,i=e.vScale,s=r.getLabels(),a=r===i,l=[];let c,d,u,h;for(c=o,d=o+n;c<d;++c)h=t[c],u={},u[r.axis]=a||r.parse(s[c],c),l.push(jo(h,u,i,c));return l}function Uo(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function Zo(e,t,o,n){let r=t.borderSkipped;const i={};if(!r)return void(e.borderSkipped=i);if(!0===r)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:a,reverse:l,top:c,bottom:d}=function(e){let t,o,n,r,i;return e.horizontal?(t=e.base>e.x,o="left",n="right"):(t=e.base<e.y,o="bottom",n="top"),t?(r="end",i="start"):(r="start",i="end"),{start:o,end:n,reverse:t,top:r,bottom:i}}(e);"middle"===r&&o&&(e.enableBorderRadius=!0,(o._top||0)===n?r=c:(o._bottom||0)===n?r=d:(i[$o(d,s,a,l)]=!0,r=c)),i[$o(r,s,a,l)]=!0,e.borderSkipped=i}function $o(e,t,o,n){var r,i,s;return n?(s=o,e=Wo(e=(r=e)===(i=t)?s:r===s?i:r,o,t)):e=Wo(e,t,o),e}function Wo(e,t,o){return"start"===e?t:"end"===e?o:e}function qo(e,{inflateAmount:t},o){e.inflateAmount="auto"===t?1===o?.33:0:t}Fo.defaults={},Fo.prototype.datasetElementType=null,Fo.prototype.dataElementType=null;class Go extends Fo{parsePrimitiveData(e,t,o,n){return Vo(e,t,o,n)}parseArrayData(e,t,o,n){return Vo(e,t,o,n)}parseObjectData(e,t,o,n){const{iScale:r,vScale:i}=e,{xAxisKey:s="x",yAxisKey:a="y"}=this._parsing,l="x"===r.axis?s:a,c="x"===i.axis?s:a,d=[];let u,h,m,p;for(u=o,h=o+n;u<h;++u)p=t[u],m={},m[r.axis]=r.parse(_(p,l),u),d.push(jo(_(p,c),m,i,u));return d}updateRangeFromParsed(e,t,o,n){super.updateRangeFromParsed(e,t,o,n);const r=o._custom;r&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:o,vScale:n}=t,r=this.getParsed(e),i=r._custom,s=Uo(i)?"["+i.start+", "+i.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+o.getLabelForValue(r[o.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,o,n){const r="reset"===n,{index:s,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(t,n);for(let m=t;m<t+o;m++){const t=this.getParsed(m),o=r||i(t[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(m),p=this._calculateBarIndexPixels(m,d),g=(t._stacks||{})[a.axis],f={horizontal:c,base:o.base,enableBorderRadius:!g||Uo(t._custom)||s===g._top||s===g._bottom,x:c?o.head:p.center,y:c?p.center:o.head,height:c?p.size:Math.abs(o.size),width:c?Math.abs(o.size):p.size};h&&(f.options=u||this.resolveDataElementOptions(m,e[m].active?"active":n));const b=f.options||e[m].options;Zo(f,b,g,s),qo(f,b,d.ratio),this.updateElement(e[m],m,f,n)}}_getStacks(e,t){const{iScale:o}=this._cachedMeta,n=o.getMatchingVisibleMetas(this._type).filter((e=>e.controller.options.grouped)),r=o.options.stacked,s=[],a=e=>{const o=e.controller.getParsed(t),n=o&&o[e.vScale.axis];if(i(n)||isNaN(n))return!0};for(const o of n)if((void 0===t||!a(o))&&((!1===r||-1===s.indexOf(o.stack)||void 0===r&&void 0===o.stack)&&s.push(o.stack),o.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,o){const n=this._getStacks(e,o),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r}_getRuler(){const e=this.options,t=this._cachedMeta,o=t.iScale,n=[];let r,i;for(r=0,i=t.data.length;r<i;++r)n.push(o.getPixelForValue(this.getParsed(r)[o.axis],r));const s=e.barThickness;return{min:s||Ho(t),pixels:n,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:o},options:{base:n,minBarLength:r}}=this,s=n||0,a=this.getParsed(e),l=a._custom,c=Uo(l);let d,u,h=a[t.axis],m=0,p=o?this.applyStack(t,a,o):h;p!==h&&(m=p-h,p=h),c&&(h=l.barStart,p=l.barEnd-l.barStart,0!==h&&I(h)!==I(l.barEnd)&&(m=0),m+=h);const g=i(n)||c?m:n;let f=t.getPixelForValue(g);if(d=this.chart.getDataVisibility(e)?t.getPixelForValue(m+p):f,u=d-f,Math.abs(u)<r){u=function(e,t,o){return 0!==e?I(e):(t.isHorizontal()?1:-1)*(t.min>=o?1:-1)}(u,t,s)*r,h===s&&(f-=u/2);const e=t.getPixelForDecimal(0),o=t.getPixelForDecimal(1),n=Math.min(e,o),i=Math.max(e,o);f=Math.max(Math.min(f,i),n),d=f+u}if(f===t.getPixelForValue(s)){const e=I(u)*t.getLineWidthForValue(s)/2;f+=e,u-=e}return{size:u,base:f,head:d,center:d+u/2}}_calculateBarIndexPixels(e,t){const o=t.scale,n=this.options,r=n.skipNull,s=d(n.maxBarThickness,1/0);let a,l;if(t.grouped){const o=r?this._getStackCount(e):t.stackCount,c="flex"===n.barThickness?function(e,t,o,n){const r=t.pixels,i=r[e];let s=e>0?r[e-1]:null,a=e<r.length-1?r[e+1]:null;const l=o.categoryPercentage;null===s&&(s=i-(null===a?t.end-t.start:a-i)),null===a&&(a=i+i-s);const c=i-(i-Math.min(s,a))/2*l;return{chunk:Math.abs(a-s)/2*l/n,ratio:o.barPercentage,start:c}}(e,t,n,o):function(e,t,o,n){const r=o.barThickness;let s,a;return i(r)?(s=t.min*o.categoryPercentage,a=o.barPercentage):(s=r*n,a=1),{chunk:s/n,ratio:a,start:t.pixels[e]-s/2}}(e,t,n,o),d=this._getStackIndex(this.index,this._cachedMeta.stack,r?e:void 0);a=c.start+c.chunk*d+c.chunk/2,l=Math.min(s,c.chunk*c.ratio)}else a=o.getPixelForValue(this.getParsed(e)[o.axis],e),l=Math.min(s,t.min*t.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const e=this._cachedMeta,t=e.vScale,o=e.data,n=o.length;let r=0;for(;r<n;++r)null!==this.getParsed(r)[t.axis]&&o[r].draw(this._ctx)}}Go.id="bar",Go.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Go.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Yo extends Fo{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,o,n){const r=super.parsePrimitiveData(e,t,o,n);for(let e=0;e<r.length;e++)r[e]._custom=this.resolveDataElementOptions(e+o).radius;return r}parseArrayData(e,t,o,n){const r=super.parseArrayData(e,t,o,n);for(let e=0;e<r.length;e++){const n=t[o+e];r[e]._custom=d(n[2],this.resolveDataElementOptions(e+o).radius)}return r}parseObjectData(e,t,o,n){const r=super.parseObjectData(e,t,o,n);for(let e=0;e<r.length;e++){const n=t[o+e];r[e]._custom=d(n&&n.r&&+n.r,this.resolveDataElementOptions(e+o).radius)}return r}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let o=e.length-1;o>=0;--o)t=Math.max(t,e[o].size(this.resolveDataElementOptions(o))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:o,yScale:n}=t,r=this.getParsed(e),i=o.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:t.label,value:"("+i+", "+s+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,o,n){const r="reset"===n,{iScale:i,vScale:s}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(t,n),c=i.axis,d=s.axis;for(let u=t;u<t+o;u++){const t=e[u],o=!r&&this.getParsed(u),h={},m=h[c]=r?i.getPixelForDecimal(.5):i.getPixelForValue(o[c]),p=h[d]=r?s.getBasePixel():s.getPixelForValue(o[d]);h.skip=isNaN(m)||isNaN(p),l&&(h.options=a||this.resolveDataElementOptions(u,t.active?"active":n),r&&(h.options.radius=0)),this.updateElement(t,u,h,n)}}resolveDataElementOptions(e,t){const o=this.getParsed(e);let n=super.resolveDataElementOptions(e,t);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const r=n.radius;return"active"!==t&&(n.radius=0),n.radius+=d(o&&o._custom,r),n}}Yo.id="bubble",Yo.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Yo.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class Ko extends Fo{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const o=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=o;else{let r,i,s=e=>+o[e];if(a(o[e])){const{key:e="value"}=this._parsing;s=t=>+_(o[t],e)}for(r=e,i=e+t;r<i;++r)n._parsed[r]=s(r)}}_getRotation(){return j(this.options.rotation-90)}_getCircumference(){return j(this.options.circumference)}_getRotationExtents(){let e=O,t=-O;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)){const n=this.chart.getDatasetMeta(o).controller,r=n._getRotation(),i=n._getCircumference();e=Math.min(e,r),t=Math.max(t,r+i)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:o}=t,n=this._cachedMeta,r=n.data,i=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,s=Math.max((Math.min(o.width,o.height)-i)/2,0),a=Math.min((l=this.options.cutout,c=s,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:l/c),1);var l,c;const d=this._getRingWeight(this.index),{circumference:h,rotation:m}=this._getRotationExtents(),{ratioX:p,ratioY:g,offsetX:f,offsetY:b}=function(e,t,o){let n=1,r=1,i=0,s=0;if(t<O){const a=e,l=a+t,c=Math.cos(a),d=Math.sin(a),u=Math.cos(l),h=Math.sin(l),m=(e,t,n)=>G(e,a,l,!0)?1:Math.max(t,t*o,n,n*o),p=(e,t,n)=>G(e,a,l,!0)?-1:Math.min(t,t*o,n,n*o),g=m(0,c,u),f=m(D,d,h),b=p(T,c,u),v=p(T+D,d,h);n=(g-b)/2,r=(f-v)/2,i=-(g+b)/2,s=-(f+v)/2}return{ratioX:n,ratioY:r,offsetX:i,offsetY:s}}(m,h,a),v=(o.width-i)/p,y=(o.height-i)/g,x=Math.max(Math.min(v,y)/2,0),w=u(this.options.radius,x),_=(w-Math.max(w*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=f*w,this.offsetY=b*w,n.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*d,0),this.updateElements(r,0,r.length,e)}_circumference(e,t){const o=this.options,n=this._cachedMeta,r=this._getCircumference();return t&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||null===n._parsed[e]||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*r/O)}updateElements(e,t,o,n){const r="reset"===n,i=this.chart,s=i.chartArea,a=i.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=r&&a.animateScale,u=d?0:this.innerRadius,h=d?0:this.outerRadius,{sharedOptions:m,includeOptions:p}=this._getSharedOptions(t,n);let g,f=this._getRotation();for(g=0;g<t;++g)f+=this._circumference(g,r);for(g=t;g<t+o;++g){const t=this._circumference(g,r),o=e[g],i={x:l+this.offsetX,y:c+this.offsetY,startAngle:f,endAngle:f+t,circumference:t,outerRadius:h,innerRadius:u};p&&(i.options=m||this.resolveDataElementOptions(g,o.active?"active":n)),f+=t,this.updateElement(o,g,i,n)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let o,n=0;for(o=0;o<t.length;o++){const r=e._parsed[o];null===r||isNaN(r)||!this.chart.getDataVisibility(o)||t[o].hidden||(n+=Math.abs(r))}return n}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?O*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,o=this.chart,n=o.data.labels||[],r=uo(t._parsed[e],o.options.locale);return{label:n[e]||"",value:r}}getMaxBorderWidth(e){let t=0;const o=this.chart;let n,r,i,s,a;if(!e)for(n=0,r=o.data.datasets.length;n<r;++n)if(o.isDatasetVisible(n)){i=o.getDatasetMeta(n),e=i.data,s=i.controller;break}if(!e)return 0;for(n=0,r=e.length;n<r;++n)a=s.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(t=Math.max(t,a.borderWidth||0,a.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let o=0,n=e.length;o<n;++o){const e=this.resolveDataElementOptions(o);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(t+=this._getRingWeight(o));return t}_getRingWeight(e){return Math.max(d(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Ko.id="doughnut",Ko.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},Ko.descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e},Ko.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:o}}=e.legend.options;return t.labels.map(((t,n)=>{const r=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(n),index:n}}))}return[]}},onClick(e,t,o){o.chart.toggleDataVisibility(t.index),o.chart.update()}},tooltip:{callbacks:{title:()=>"",label(e){let t=e.label;const o=": "+e.formattedValue;return s(t)?(t=t.slice(),t[0]+=o):t+=o,t}}}}};class Xo extends Fo{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:o,data:n=[],_dataset:r}=t,i=this.chart._animationsDisabled;let{start:s,count:a}=ae(t,n,i);this._drawStart=s,this._drawCount=a,le(t)&&(s=0,a=n.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!r._decimated,o.points=n;const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(o,void 0,{animated:!i,options:l},e),this.updateElements(n,s,a,e)}updateElements(e,t,o,n){const r="reset"===n,{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(t,n),h=s.axis,m=a.axis,{spanGaps:p,segment:g}=this.options,f=z(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=t>0&&this.getParsed(t-1);for(let p=t;p<t+o;++p){const t=e[p],o=this.getParsed(p),y=b?t:{},x=i(o[m]),w=y[h]=s.getPixelForValue(o[h],p),_=y[m]=r||x?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,o,l):o[m],p);y.skip=isNaN(w)||isNaN(_)||x,y.stop=p>0&&Math.abs(o[h]-v[h])>f,g&&(y.parsed=o,y.raw=c.data[p]),u&&(y.options=d||this.resolveDataElementOptions(p,t.active?"active":n)),b||this.updateElement(t,p,y,n),v=o}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,o=t.options&&t.options.borderWidth||0,n=e.data||[];if(!n.length)return o;const r=n[0].size(this.resolveDataElementOptions(0)),i=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(o,r,i)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Xo.id="line",Xo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Xo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Jo extends Fo{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,o=this.chart,n=o.data.labels||[],r=uo(t._parsed[e].r,o.options.locale);return{label:n[e]||"",value:r}}parseObjectData(e,t,o,n){return Ft.bind(this)(e,t,o,n)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach(((e,o)=>{const n=this.getParsed(o).r;!isNaN(n)&&this.chart.getDataVisibility(o)&&(n<t.min&&(t.min=n),n>t.max&&(t.max=n))})),t}_updateRadius(){const e=this.chart,t=e.chartArea,o=e.options,n=Math.min(t.right-t.left,t.bottom-t.top),r=Math.max(n/2,0),i=(r-Math.max(o.cutoutPercentage?r/100*o.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=r-i*this.index,this.innerRadius=this.outerRadius-i}updateElements(e,t,o,n){const r="reset"===n,i=this.chart,s=i.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,c=a.yCenter,d=a.getIndexAngle(0)-.5*T;let u,h=d;const m=360/this.countVisibleElements();for(u=0;u<t;++u)h+=this._computeAngle(u,n,m);for(u=t;u<t+o;u++){const t=e[u];let o=h,p=h+this._computeAngle(u,n,m),g=i.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;h=p,r&&(s.animateScale&&(g=0),s.animateRotate&&(o=p=d));const f={x:l,y:c,innerRadius:0,outerRadius:g,startAngle:o,endAngle:p,options:this.resolveDataElementOptions(u,t.active?"active":n)};this.updateElement(t,u,f,n)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach(((e,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&t++})),t}_computeAngle(e,t,o){return this.chart.getDataVisibility(e)?j(this.resolveDataElementOptions(e,t).angle||o):0}}Jo.id="polarArea",Jo.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Jo.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:o}}=e.legend.options;return t.labels.map(((t,n)=>{const r=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(n),index:n}}))}return[]}},onClick(e,t,o){o.chart.toggleDataVisibility(t.index),o.chart.update()}},tooltip:{callbacks:{title:()=>"",label:e=>e.chart.data.labels[e.dataIndex]+": "+e.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Qo extends Ko{}Qo.id="pie",Qo.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends Fo{getLabelAndValue(e){const t=this._cachedMeta.vScale,o=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(o[t.axis])}}parseObjectData(e,t,o,n){return Ft.bind(this)(e,t,o,n)}update(e){const t=this._cachedMeta,o=t.dataset,n=t.data||[],r=t.iScale.getLabels();if(o.points=n,"resize"!==e){const t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);const i={_loop:!0,_fullLoop:r.length===n.length,options:t};this.updateElement(o,void 0,i,e)}this.updateElements(n,0,n.length,e)}updateElements(e,t,o,n){const r=this._cachedMeta.rScale,i="reset"===n;for(let s=t;s<t+o;s++){const t=e[s],o=this.resolveDataElementOptions(s,t.active?"active":n),a=r.getPointPositionForValue(s,this.getParsed(s).r),l=i?r.xCenter:a.x,c=i?r.yCenter:a.y,d={x:l,y:c,angle:a.angle,skip:isNaN(l)||isNaN(c),options:o};this.updateElement(t,s,d,n)}}}en.id="radar",en.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},en.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class tn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:t,y:o}=this.getProps(["x","y"],e);return{x:t,y:o}}hasValue(){return z(this.x)&&z(this.y)}getProps(e,t){const o=this.$animations;if(!t||!o)return this;const n={};return e.forEach((e=>{n[e]=o[e]&&o[e].active()?o[e]._to:this[e]})),n}}tn.defaults={},tn.defaultRoutes=void 0;const on={values:e=>s(e)?e:""+e,numeric(e,t,o){if(0===e)return"0";const n=this.chart.options.locale;let r,i=e;if(o.length>1){const t=Math.max(Math.abs(o[0].value),Math.abs(o[o.length-1].value));(t<1e-4||t>1e15)&&(r="scientific"),i=function(e,t){let o=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(o)>=1&&e!==Math.floor(e)&&(o=e-Math.floor(e));return o}(e,o)}const s=N(Math.abs(i)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),uo(e,n,l)},logarithmic(e,t,o){if(0===e)return"0";const n=e/Math.pow(10,Math.floor(N(e)));return 1===n||2===n||5===n?on.numeric.call(this,e,t,o):""}};var nn={formatters:on};function rn(e,t){const o=e.options.ticks,n=o.maxTicksLimit||function(e){const t=e.options.offset,o=e._tickSize(),n=e._length/o+(t?0:1),r=e._maxLength/o;return Math.floor(Math.min(n,r))}(e),r=o.major.enabled?function(e){const t=[];let o,n;for(o=0,n=e.length;o<n;o++)e[o].major&&t.push(o);return t}(t):[],s=r.length,a=r[0],l=r[s-1],c=[];if(s>n)return function(e,t,o,n){let r,i=0,s=o[0];for(n=Math.ceil(n),r=0;r<e.length;r++)r===s&&(t.push(e[r]),i++,s=o[i*n])}(t,c,r,s/n),c;const d=function(e,t,o){const n=function(e){const t=e.length;let o,n;if(t<2)return!1;for(n=e[0],o=1;o<t;++o)if(e[o]-e[o-1]!==n)return!1;return n}(e),r=t.length/o;if(!n)return Math.max(r,1);const i=function(e){const t=[],o=Math.sqrt(e);let n;for(n=1;n<o;n++)e%n==0&&(t.push(n),t.push(e/n));return o===(0|o)&&t.push(o),t.sort(((e,t)=>e-t)).pop(),t}(n);for(let e=0,t=i.length-1;e<t;e++){const t=i[e];if(t>r)return t}return Math.max(r,1)}(r,t,n);if(s>0){let e,o;const n=s>1?Math.round((l-a)/(s-1)):null;for(sn(t,c,d,i(n)?0:a-n,a),e=0,o=s-1;e<o;e++)sn(t,c,d,r[e],r[e+1]);return sn(t,c,d,l,i(n)?t.length:l+n),c}return sn(t,c,d),c}function sn(e,t,o,n,r){const i=d(n,0),s=Math.min(d(r,e.length),e.length);let a,l,c,u=0;for(o=Math.ceil(o),r&&(a=r-n,o=a/Math.floor(a/o)),c=i;c<0;)u++,c=Math.round(i+u*o);for(l=Math.max(i,0);l<s;l++)l===c&&(t.push(e[l]),u++,c=Math.round(i+u*o))}et.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:nn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),et.route("scale.ticks","color","","color"),et.route("scale.grid","color","","borderColor"),et.route("scale.grid","borderColor","","borderColor"),et.route("scale.title","color","","color"),et.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e}),et.describe("scales",{_fallback:"scale"}),et.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e});const an=(e,t,o)=>"top"===t||"left"===t?e[t]+o:e[t]-o;function ln(e,t){const o=[],n=e.length/t,r=e.length;let i=0;for(;i<r;i+=n)o.push(e[Math.floor(i)]);return o}function cn(e,t,o){const n=e.ticks.length,r=Math.min(t,n-1),i=e._startPixel,s=e._endPixel,a=1e-6;let l,c=e.getPixelForTick(r);if(!(o&&(l=1===n?Math.max(c-i,s-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(r-1))/2,c+=r<t?l:-l,c<i-a||c>s+a)))return c}function dn(e){return e.drawTicks?e.tickLength:0}function un(e,t){if(!e.display)return 0;const o=St(e.font,t),n=_t(e.padding);return(s(e.text)?e.text.length:1)*o.lineHeight+n.height}function hn(e,t,o){let n=ie(e);return(o&&"right"!==t||!o&&"right"===t)&&(n=(e=>"left"===e?"right":"right"===e?"left":e)(n)),n}class mn extends tn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:o,_suggestedMax:n}=this;return e=c(e,Number.POSITIVE_INFINITY),t=c(t,Number.NEGATIVE_INFINITY),o=c(o,Number.POSITIVE_INFINITY),n=c(n,Number.NEGATIVE_INFINITY),{min:c(e,o),max:c(t,n),minDefined:l(e),maxDefined:l(t)}}getMinMax(e){let t,{min:o,max:n,minDefined:r,maxDefined:i}=this.getUserBounds();if(r&&i)return{min:o,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;a<l;++a)t=s[a].controller.getMinMax(this,e),r||(o=Math.min(o,t.min)),i||(n=Math.max(n,t.max));return o=i&&o>n?n:o,n=r&&o>n?o:n,{min:c(o,c(n,o)),max:c(n,c(o,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){h(this.options.beforeUpdate,[this])}update(e,t,o){const{beginAtZero:n,grace:r,ticks:i}=this.options,s=i.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,o){const{min:n,max:r}=e,i=u(t,(r-n)/2),s=(e,t)=>o&&0===e?0:e+t;return{min:s(n,-Math.abs(i)),max:s(r,i)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s<this.ticks.length;this._convertTicksToLabels(a?ln(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||"auto"===i.source)&&(this.ticks=rn(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,o=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,o=!o),this._startPixel=e,this._endPixel=t,this._reversePixels=o,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){h(this.options.afterUpdate,[this])}beforeSetDimensions(){h(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){h(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),h(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){h(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let o,n,r;for(o=0,n=e.length;o<n;o++)r=e[o],r.label=h(t.callback,[r.value,o,e],this)}afterTickToLabelConversion(){h(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){h(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,o=this.ticks.length,n=t.minRotation||0,r=t.maxRotation;let i,s,a,l=n;if(!this._isVisible()||!t.display||n>=r||o<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),d=c.widest.width,u=c.highest.height,h=Y(this.chart.width-d,0,this.maxWidth);i=e.offset?this.maxWidth/o:h/(o-1),d+6>i&&(i=h/(o-(e.offset?.5:1)),s=this.maxHeight-dn(e.grid)-t.padding-un(e.title,this.chart.options.font),a=Math.sqrt(d*d+u*u),l=V(Math.min(Math.asin(Y((c.highest.height+6)/i,-1,1)),Math.asin(Y(s/a,-1,1))-Math.asin(Y(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){h(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){h(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:o,title:n,grid:r}}=this,i=this._isVisible(),s=this.isHorizontal();if(i){const i=un(n,t.options.font);if(s?(e.width=this.maxWidth,e.height=dn(r)+i):(e.height=this.maxHeight,e.width=dn(r)+i),o.display&&this.ticks.length){const{first:t,last:n,widest:r,highest:i}=this._getLabelSizes(),a=2*o.padding,l=j(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(s){const t=o.mirror?0:d*r.width+c*i.height;e.height=Math.min(this.maxHeight,e.height+t+a)}else{const t=o.mirror?0:c*r.width+d*i.height;e.width=Math.min(this.maxWidth,e.width+t+a)}this._calculatePadding(t,n,d,c)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,o,n){const{ticks:{align:r,padding:i},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,u=0;a?l?(d=n*e.width,u=o*t.height):(d=o*e.height,u=n*t.width):"start"===r?u=t.width:"end"===r?d=e.width:"inner"!==r&&(d=e.width/2,u=t.width/2),this.paddingLeft=Math.max((d-s+i)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+i)*this.width/(this.width-c),0)}else{let o=t.height/2,n=e.height/2;"start"===r?(o=0,n=e.height):"end"===r&&(o=t.height,n=0),this.paddingTop=o+i,this.paddingBottom=n+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){h(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,o;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,o=e.length;t<o;t++)i(e[t].label)&&(e.splice(t,1),o--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let o=this.ticks;t<o.length&&(o=ln(o,t)),this._labelSizes=e=this._computeLabelSizes(o,o.length)}return e}_computeLabelSizes(e,t){const{ctx:o,_longestTextCache:n}=this,r=[],a=[];let l,c,d,u,h,p,g,f,b,v,y,x=0,w=0;for(l=0;l<t;++l){if(u=e[l].label,h=this._resolveTickFontOptions(l),o.font=p=h.string,g=n[p]=n[p]||{data:{},gc:[]},f=h.lineHeight,b=v=0,i(u)||s(u)){if(s(u))for(c=0,d=u.length;c<d;++c)y=u[c],i(y)||s(y)||(b=tt(o,g.data,g.gc,b,y),v+=f)}else b=tt(o,g.data,g.gc,b,u),v=f;r.push(b),a.push(v),x=Math.max(b,x),w=Math.max(v,w)}!function(e,t){m(e,(e=>{const o=e.gc,n=o.length/2;let r;if(n>t){for(r=0;r<n;++r)delete e.data[o[r]];o.splice(0,n)}}))}(n,t);const _=r.indexOf(x),S=a.indexOf(w),C=e=>({width:r[e]||0,height:a[e]||0});return{first:C(0),last:C(t-1),widest:C(_),highest:C(S),widths:r,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Y(this._alignToPixels?nt(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const o=t[e];return o.$context||(o.$context=function(e,t,o){return kt(e,{tick:o,index:t,type:"tick"})}(this.getContext(),e,o))}return this.$context||(this.$context=kt(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const e=this.options.ticks,t=j(this.labelRotation),o=Math.abs(Math.cos(t)),n=Math.abs(Math.sin(t)),r=this._getLabelSizes(),i=e.autoSkipPadding||0,s=r?r.widest.width+i:0,a=r?r.highest.height+i:0;return this.isHorizontal()?a*o>s*n?s/o:a/n:a*n<s*o?a/o:s/n}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,o=this.chart,n=this.options,{grid:r,position:i}=n,s=r.offset,l=this.isHorizontal(),c=this.ticks.length+(s?1:0),u=dn(r),h=[],m=r.setContext(this.getContext()),p=m.drawBorder?m.borderWidth:0,g=p/2,f=function(e){return nt(o,e,p)};let b,v,y,x,w,_,S,C,k,E,T,O;if("top"===i)b=f(this.bottom),_=this.bottom-u,C=b-g,E=f(e.top)+g,O=e.bottom;else if("bottom"===i)b=f(this.top),E=e.top,O=f(e.bottom)-g,_=b+g,C=this.top+u;else if("left"===i)b=f(this.right),w=this.right-u,S=b-g,k=f(e.left)+g,T=e.right;else if("right"===i)b=f(this.left),k=e.left,T=f(e.right)-g,w=b+g,S=this.left+u;else if("x"===t){if("center"===i)b=f((e.top+e.bottom)/2+.5);else if(a(i)){const e=Object.keys(i)[0],t=i[e];b=f(this.chart.scales[e].getPixelForValue(t))}E=e.top,O=e.bottom,_=b+g,C=_+u}else if("y"===t){if("center"===i)b=f((e.left+e.right)/2);else if(a(i)){const e=Object.keys(i)[0],t=i[e];b=f(this.chart.scales[e].getPixelForValue(t))}w=b-g,S=w-u,k=e.left,T=e.right}const A=d(n.ticks.maxTicksLimit,c),M=Math.max(1,Math.ceil(c/A));for(v=0;v<c;v+=M){const e=r.setContext(this.getContext(v)),t=e.lineWidth,n=e.color,i=e.borderDash||[],a=e.borderDashOffset,c=e.tickWidth,d=e.tickColor,u=e.tickBorderDash||[],m=e.tickBorderDashOffset;y=cn(this,v,s),void 0!==y&&(x=nt(o,y,t),l?w=S=k=T=x:_=C=E=O=x,h.push({tx1:w,ty1:_,tx2:S,ty2:C,x1:k,y1:E,x2:T,y2:O,width:t,color:n,borderDash:i,borderDashOffset:a,tickWidth:c,tickColor:d,tickBorderDash:u,tickBorderDashOffset:m}))}return this._ticksLength=c,this._borderValue=b,h}_computeLabelItems(e){const t=this.axis,o=this.options,{position:n,ticks:r}=o,i=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:u,mirror:h}=r,m=dn(o.grid),p=m+u,g=h?-u:p,f=-j(this.labelRotation),b=[];let v,y,x,w,_,S,C,k,E,T,O,A,M="middle";if("top"===n)S=this.bottom-g,C=this._getXAxisLabelAlignment();else if("bottom"===n)S=this.top+g,C=this._getXAxisLabelAlignment();else if("left"===n){const e=this._getYAxisLabelAlignment(m);C=e.textAlign,_=e.x}else if("right"===n){const e=this._getYAxisLabelAlignment(m);C=e.textAlign,_=e.x}else if("x"===t){if("center"===n)S=(e.top+e.bottom)/2+p;else if(a(n)){const e=Object.keys(n)[0],t=n[e];S=this.chart.scales[e].getPixelForValue(t)+p}C=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===n)_=(e.left+e.right)/2-p;else if(a(n)){const e=Object.keys(n)[0],t=n[e];_=this.chart.scales[e].getPixelForValue(t)}C=this._getYAxisLabelAlignment(m).textAlign}"y"===t&&("start"===c?M="top":"end"===c&&(M="bottom"));const P=this._getLabelSizes();for(v=0,y=l.length;v<y;++v){x=l[v],w=x.label;const e=r.setContext(this.getContext(v));k=this.getPixelForTick(v)+r.labelOffset,E=this._resolveTickFontOptions(v),T=E.lineHeight,O=s(w)?w.length:1;const t=O/2,o=e.color,a=e.textStrokeColor,c=e.textStrokeWidth;let u,m=C;if(i?(_=k,"inner"===C&&(m=v===y-1?this.options.reverse?"left":"right":0===v?this.options.reverse?"right":"left":"center"),A="top"===n?"near"===d||0!==f?-O*T+T/2:"center"===d?-P.highest.height/2-t*T+T:-P.highest.height+T/2:"near"===d||0!==f?T/2:"center"===d?P.highest.height/2-t*T:P.highest.height-O*T,h&&(A*=-1)):(S=k,A=(1-O)*T/2),e.showLabelBackdrop){const t=_t(e.backdropPadding),o=P.heights[v],n=P.widths[v];let r=S+A-t.top,i=_-t.left;switch(M){case"middle":r-=o/2;break;case"bottom":r-=o}switch(C){case"center":i-=n/2;break;case"right":i-=n}u={left:i,top:r,width:n+t.width,height:o+t.height,color:e.backdropColor}}b.push({rotation:f,label:w,font:E,color:o,strokeColor:a,strokeWidth:c,textOffset:A,textAlign:m,textBaseline:M,translation:[_,S],backdrop:u})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-j(this.labelRotation))return"top"===e?"left":"right";let o="center";return"start"===t.align?o="left":"end"===t.align?o="right":"inner"===t.align&&(o="inner"),o}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:o,mirror:n,padding:r}}=this.options,i=e+r,s=this._getLabelSizes().widest.width;let a,l;return"left"===t?n?(l=this.right+r,"near"===o?a="left":"center"===o?(a="center",l+=s/2):(a="right",l+=s)):(l=this.right-i,"near"===o?a="right":"center"===o?(a="center",l-=s/2):(a="left",l=this.left)):"right"===t?n?(l=this.left+r,"near"===o?a="right":"center"===o?(a="center",l-=s/2):(a="left",l-=s)):(l=this.left+i,"near"===o?a="left":"center"===o?(a="center",l+=s/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:o,top:n,width:r,height:i}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(o,n,r,i),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const o=this.ticks.findIndex((t=>t.value===e));if(o>=0){return t.setContext(this.getContext(o)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,o=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,i;const s=(e,t,n)=>{n.width&&n.color&&(o.save(),o.lineWidth=n.width,o.strokeStyle=n.color,o.setLineDash(n.borderDash||[]),o.lineDashOffset=n.borderDashOffset,o.beginPath(),o.moveTo(e.x,e.y),o.lineTo(t.x,t.y),o.stroke(),o.restore())};if(t.display)for(r=0,i=n.length;r<i;++r){const e=n[r];t.drawOnChartArea&&s({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&s({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{grid:o}}=this,n=o.setContext(this.getContext()),r=o.drawBorder?n.borderWidth:0;if(!r)return;const i=o.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let a,l,c,d;this.isHorizontal()?(a=nt(e,this.left,r)-r/2,l=nt(e,this.right,i)+i/2,c=d=s):(c=nt(e,this.top,r)-r/2,d=nt(e,this.bottom,i)+i/2,a=l=s),t.save(),t.lineWidth=n.borderWidth,t.strokeStyle=n.borderColor,t.beginPath(),t.moveTo(a,c),t.lineTo(l,d),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,o=this._computeLabelArea();o&&lt(t,o);const n=this._labelItems||(this._labelItems=this._computeLabelItems(e));let r,i;for(r=0,i=n.length;r<i;++r){const e=n[r],o=e.font,i=e.label;e.backdrop&&(t.fillStyle=e.backdrop.color,t.fillRect(e.backdrop.left,e.backdrop.top,e.backdrop.width,e.backdrop.height)),ht(t,i,0,e.textOffset,o,e)}o&&ct(t)}drawTitle(){const{ctx:e,options:{position:t,title:o,reverse:n}}=this;if(!o.display)return;const r=St(o.font),i=_t(o.padding),l=o.align;let c=r.lineHeight/2;"bottom"===t||"center"===t||a(t)?(c+=i.bottom,s(o.text)&&(c+=r.lineHeight*(o.text.length-1))):c+=i.top;const{titleX:d,titleY:u,maxWidth:h,rotation:m}=function(e,t,o,n){const{top:r,left:i,bottom:s,right:l,chart:c}=e,{chartArea:d,scales:u}=c;let h,m,p,g=0;const f=s-r,b=l-i;if(e.isHorizontal()){if(m=se(n,i,l),a(o)){const e=Object.keys(o)[0],n=o[e];p=u[e].getPixelForValue(n)+f-t}else p="center"===o?(d.bottom+d.top)/2+f-t:an(e,o,t);h=l-i}else{if(a(o)){const e=Object.keys(o)[0],n=o[e];m=u[e].getPixelForValue(n)-b+t}else m="center"===o?(d.left+d.right)/2-b+t:an(e,o,t);p=se(n,s,r),g="left"===o?-D:D}return{titleX:m,titleY:p,maxWidth:h,rotation:g}}(this,c,t,l);ht(e,o.text,0,0,r,{color:o.color,maxWidth:h,rotation:m,textAlign:hn(l,t,n),textBaseline:"middle",translation:[d,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,o=d(e.grid&&e.grid.z,-1);return this._isVisible()&&this.draw===mn.prototype.draw?[{z:o,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:o+1,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",n=[];let r,i;for(r=0,i=t.length;r<i;++r){const i=t[r];i[o]!==this.id||e&&i.type!==e||n.push(i)}return n}_resolveTickFontOptions(e){return St(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class pn{constructor(e,t,o){this.type=e,this.scope=t,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let o;(function(e){return"id"in e&&"defaults"in e})(t)&&(o=this.register(t));const n=this.items,r=e.id,i=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in n||(n[r]=e,function(e,t,o){const n=v(Object.create(null),[o?et.get(o):{},et.get(t),e.defaults]);et.set(t,n),e.defaultRoutes&&function(e,t){Object.keys(t).forEach((o=>{const n=o.split("."),r=n.pop(),i=[e].concat(n).join("."),s=t[o].split("."),a=s.pop(),l=s.join(".");et.route(i,r,l,a)}))}(t,e.defaultRoutes);e.descriptors&&et.describe(t,e.descriptors)}(e,i,o),this.override&&et.override(e.id,e.overrides)),i}get(e){return this.items[e]}unregister(e){const t=this.items,o=e.id,n=this.scope;o in t&&delete t[o],n&&o in et[n]&&(delete et[n][o],this.override&&delete Ke[o])}}var gn=new class{constructor(){this.controllers=new pn(Fo,"datasets",!0),this.elements=new pn(tn,"elements"),this.plugins=new pn(Object,"plugins"),this.scales=new pn(mn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,o){[...t].forEach((t=>{const n=o||this._getRegistryForType(t);o||n.isForType(t)||n===this.plugins&&t.id?this._exec(e,n,t):m(t,(t=>{const n=o||this._getRegistryForType(t);this._exec(e,n,t)}))}))}_exec(e,t,o){const n=S(e);h(o["before"+n],[],o),t[e](o),h(o["after"+n],[],o)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const o=this._typedRegistries[t];if(o.isForType(e))return o}return this.plugins}_get(e,t,o){const n=t.get(e);if(void 0===n)throw new Error('"'+e+'" is not a registered '+o+".");return n}};class fn extends Fo{update(e){const t=this._cachedMeta,{data:o=[]}=t,n=this.chart._animationsDisabled;let{start:r,count:i}=ae(t,o,n);if(this._drawStart=r,this._drawCount=i,le(t)&&(r=0,i=o.length),this.options.showLine){const{dataset:r,_dataset:i}=t;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!i._decimated,r.points=o;const s=this.resolveDatasetElementOptions(e);s.segment=this.options.segment,this.updateElement(r,void 0,{animated:!n,options:s},e)}this.updateElements(o,r,i,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=gn.getElement("line")),super.addElements()}updateElements(e,t,o,n){const r="reset"===n,{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,d=this.resolveDataElementOptions(t,n),u=this.getSharedOptions(d),h=this.includeOptions(n,u),m=s.axis,p=a.axis,{spanGaps:g,segment:f}=this.options,b=z(g)?g:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||r||"none"===n;let y=t>0&&this.getParsed(t-1);for(let d=t;d<t+o;++d){const t=e[d],o=this.getParsed(d),g=v?t:{},x=i(o[p]),w=g[m]=s.getPixelForValue(o[m],d),_=g[p]=r||x?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,o,l):o[p],d);g.skip=isNaN(w)||isNaN(_)||x,g.stop=d>0&&Math.abs(o[m]-y[m])>b,f&&(g.parsed=o,g.raw=c.data[d]),h&&(g.options=u||this.resolveDataElementOptions(d,t.active?"active":n)),v||this.updateElement(t,d,g,n),y=o}this.updateSharedOptions(u,n,d)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let o=t.length-1;o>=0;--o)e=Math.max(e,t[o].size(this.resolveDataElementOptions(o))/2);return e>0&&e}const o=e.dataset,n=o.options&&o.options.borderWidth||0;if(!t.length)return n;const r=t[0].size(this.resolveDataElementOptions(0)),i=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(n,r,i)/2}}fn.id="scatter",fn.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},fn.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:e=>"("+e.label+", "+e.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function bn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class vn{constructor(e){this.options=e||{}}init(e){}formats(){return bn()}parse(e,t){return bn()}format(e,t){return bn()}add(e,t,o){return bn()}diff(e,t,o){return bn()}startOf(e,t,o){return bn()}endOf(e,t){return bn()}}vn.override=function(e){Object.assign(vn.prototype,e)};var yn={_date:vn};function xn(e,t,o,n){const{controller:r,data:i,_sorted:s}=e,a=r._cachedMeta.iScale;if(a&&t===a.axis&&"r"!==t&&s&&i.length){const e=a._reversePixels?Q:J;if(!n)return e(i,t,o);if(r._sharedOptions){const n=i[0],r="function"==typeof n.getRange&&n.getRange(t);if(r){const n=e(i,t,o-r),s=e(i,t,o+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:i.length-1}}function wn(e,t,o,n,r){const i=e.getSortedVisibleDatasetMetas(),s=o[t];for(let e=0,o=i.length;e<o;++e){const{index:o,data:a}=i[e],{lo:l,hi:c}=xn(i[e],t,s,r);for(let e=l;e<=c;++e){const t=a[e];t.skip||n(t,o,e)}}}function _n(e,t,o,n,r){const i=[];if(!r&&!e.isPointInArea(t))return i;return wn(e,o,t,(function(o,s,a){(r||at(o,e.chartArea,0))&&o.inRange(t.x,t.y,n)&&i.push({element:o,datasetIndex:s,index:a})}),!0),i}function Sn(e,t,o,n,r,i){let s=[];const a=function(e){const t=-1!==e.indexOf("x"),o=-1!==e.indexOf("y");return function(e,n){const r=t?Math.abs(e.x-n.x):0,i=o?Math.abs(e.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(i,2))}}(o);let l=Number.POSITIVE_INFINITY;return wn(e,o,t,(function(o,c,d){const u=o.inRange(t.x,t.y,r);if(n&&!u)return;const h=o.getCenterPoint(r);if(!(!!i||e.isPointInArea(h))&&!u)return;const m=a(t,h);m<l?(s=[{element:o,datasetIndex:c,index:d}],l=m):m===l&&s.push({element:o,datasetIndex:c,index:d})})),s}function Cn(e,t,o,n,r,i){return i||e.isPointInArea(t)?"r"!==o||n?Sn(e,t,o,n,r,i):function(e,t,o,n){let r=[];return wn(e,o,t,(function(e,o,i){const{startAngle:s,endAngle:a}=e.getProps(["startAngle","endAngle"],n),{angle:l}=Z(e,{x:t.x,y:t.y});G(l,s,a)&&r.push({element:e,datasetIndex:o,index:i})})),r}(e,t,o,r):[]}function kn(e,t,o,n,r){const i=[],s="x"===o?"inXRange":"inYRange";let a=!1;return wn(e,o,t,((e,n,l)=>{e[s](t[o],r)&&(i.push({element:e,datasetIndex:n,index:l}),a=a||e.inRange(t.x,t.y,r))})),n&&!a?[]:i}var En={evaluateInteractionItems:wn,modes:{index(e,t,o,n){const r=eo(t,e),i=o.axis||"x",s=o.includeInvisible||!1,a=o.intersect?_n(e,r,i,n,s):Cn(e,r,i,!1,n,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=a[0].index,o=e.data[t];o&&!o.skip&&l.push({element:o,datasetIndex:e.index,index:t})})),l):[]},dataset(e,t,o,n){const r=eo(t,e),i=o.axis||"xy",s=o.includeInvisible||!1;let a=o.intersect?_n(e,r,i,n,s):Cn(e,r,i,!1,n,s);if(a.length>0){const t=a[0].datasetIndex,o=e.getDatasetMeta(t).data;a=[];for(let e=0;e<o.length;++e)a.push({element:o[e],datasetIndex:t,index:e})}return a},point:(e,t,o,n)=>_n(e,eo(t,e),o.axis||"xy",n,o.includeInvisible||!1),nearest(e,t,o,n){const r=eo(t,e),i=o.axis||"xy",s=o.includeInvisible||!1;return Cn(e,r,i,o.intersect,n,s)},x:(e,t,o,n)=>kn(e,eo(t,e),"x",o.intersect,n),y:(e,t,o,n)=>kn(e,eo(t,e),"y",o.intersect,n)}};const Tn=["left","top","right","bottom"];function On(e,t){return e.filter((e=>e.pos===t))}function An(e,t){return e.filter((e=>-1===Tn.indexOf(e.pos)&&e.box.axis===t))}function Mn(e,t){return e.sort(((e,o)=>{const n=t?o:e,r=t?e:o;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function Pn(e,t){const o=function(e){const t={};for(const o of e){const{stack:e,pos:n,stackWeight:r}=o;if(!e||!Tn.includes(n))continue;const i=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=r}return t}(e),{vBoxMaxWidth:n,hBoxMaxHeight:r}=t;let i,s,a;for(i=0,s=e.length;i<s;++i){a=e[i];const{fullSize:s}=a.box,l=o[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*n:s&&t.availableWidth,a.height=r):(a.width=n,a.height=c?c*r:s&&t.availableHeight)}return o}function Dn(e,t,o,n){return Math.max(e[o],t[o])+Math.max(e[n],t[n])}function Ln(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Rn(e,t,o,n){const{pos:r,box:i}=o,s=e.maxPadding;if(!a(r)){o.size&&(e[r]-=o.size);const t=n[o.stack]||{size:0,count:1};t.size=Math.max(t.size,o.horizontal?i.height:i.width),o.size=t.size/t.count,e[r]+=o.size}i.getPadding&&Ln(s,i.getPadding());const l=Math.max(0,t.outerWidth-Dn(s,e,"left","right")),c=Math.max(0,t.outerHeight-Dn(s,e,"top","bottom")),d=l!==e.w,u=c!==e.h;return e.w=l,e.h=c,o.horizontal?{same:d,other:u}:{same:u,other:d}}function Nn(e,t){const o=t.maxPadding;function n(e){const n={left:0,top:0,right:0,bottom:0};return e.forEach((e=>{n[e]=Math.max(t[e],o[e])})),n}return n(e?["left","right"]:["top","bottom"])}function In(e,t,o,n){const r=[];let i,s,a,l,c,d;for(i=0,s=e.length,c=0;i<s;++i){a=e[i],l=a.box,l.update(a.width||t.w,a.height||t.h,Nn(a.horizontal,t));const{same:s,other:u}=Rn(t,o,a,n);c|=s&&r.length,d=d||u,l.fullSize||r.push(a)}return c&&In(r,t,o,n)||d}function Bn(e,t,o,n,r){e.top=o,e.left=t,e.right=t+n,e.bottom=o+r,e.width=n,e.height=r}function zn(e,t,o,n){const r=o.padding;let{x:i,y:s}=t;for(const a of e){const e=a.box,l=n[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/l.weight||1;if(a.horizontal){const n=t.w*c,i=l.size||e.height;C(l.start)&&(s=l.start),e.fullSize?Bn(e,r.left,s,o.outerWidth-r.right-r.left,i):Bn(e,t.left+l.placed,s,n,i),l.start=s,l.placed+=n,s=e.bottom}else{const n=t.h*c,s=l.size||e.width;C(l.start)&&(i=l.start),e.fullSize?Bn(e,i,r.top,s,o.outerHeight-r.bottom-r.top):Bn(e,i,t.top+l.placed,s,n),l.start=i,l.placed+=n,i=e.right}}t.x=i,t.y=s}et.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Fn={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const o=e.boxes?e.boxes.indexOf(t):-1;-1!==o&&e.boxes.splice(o,1)},configure(e,t,o){t.fullSize=o.fullSize,t.position=o.position,t.weight=o.weight},update(e,t,o,n){if(!e)return;const r=_t(e.options.layout.padding),i=Math.max(t-r.width,0),s=Math.max(o-r.height,0),a=function(e){const t=function(e){const t=[];let o,n,r,i,s,a;for(o=0,n=(e||[]).length;o<n;++o)r=e[o],({position:i,options:{stack:s,stackWeight:a=1}}=r),t.push({index:o,box:r,pos:i,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&i+s,stackWeight:a});return t}(e),o=Mn(t.filter((e=>e.box.fullSize)),!0),n=Mn(On(t,"left"),!0),r=Mn(On(t,"right")),i=Mn(On(t,"top"),!0),s=Mn(On(t,"bottom")),a=An(t,"x"),l=An(t,"y");return{fullSize:o,leftAndTop:n.concat(i),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:On(t,"chartArea"),vertical:n.concat(r).concat(l),horizontal:i.concat(s).concat(a)}}(e.boxes),l=a.vertical,c=a.horizontal;m(e.boxes,(e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()}));const d=l.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,u=Object.freeze({outerWidth:t,outerHeight:o,padding:r,availableWidth:i,availableHeight:s,vBoxMaxWidth:i/2/d,hBoxMaxHeight:s/2}),h=Object.assign({},r);Ln(h,_t(n));const p=Object.assign({maxPadding:h,w:i,h:s,x:r.left,y:r.top},r),g=Pn(l.concat(c),u);In(a.fullSize,p,u,g),In(l,p,u,g),In(c,p,u,g)&&In(l,p,u,g),function(e){const t=e.maxPadding;function o(o){const n=Math.max(t[o]-e[o],0);return e[o]+=n,n}e.y+=o("top"),e.x+=o("left"),o("right"),o("bottom")}(p),zn(a.leftAndTop,p,u,g),p.x+=p.w,p.y+=p.h,zn(a.rightAndBottom,p,u,g),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},m(a.chartArea,(t=>{const o=t.box;Object.assign(o,e.chartArea),o.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class Hn{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,o){}removeEventListener(e,t,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,o,n){return t=Math.max(0,t||e.width),o=o||e.height,{width:t,height:Math.max(0,n?Math.floor(t/n):o)}}isAttached(e){return!0}updateConfig(e){}}class jn extends Hn{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Vn="$chartjs",Un={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zn=e=>null===e||""===e;const $n=!!ro&&{passive:!0};function Wn(e,t,o){e.canvas.removeEventListener(t,o,$n)}function qn(e,t){for(const o of e)if(o===t||o.contains(t))return!0}function Gn(e,t,o){const n=e.canvas,r=new MutationObserver((e=>{let t=!1;for(const o of e)t=t||qn(o.addedNodes,n),t=t&&!qn(o.removedNodes,n);t&&o()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Yn(e,t,o){const n=e.canvas,r=new MutationObserver((e=>{let t=!1;for(const o of e)t=t||qn(o.removedNodes,n),t=t&&!qn(o.addedNodes,n);t&&o()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Kn=new Map;let Xn=0;function Jn(){const e=window.devicePixelRatio;e!==Xn&&(Xn=e,Kn.forEach(((t,o)=>{o.currentDevicePixelRatio!==e&&t()})))}function Qn(e,t,o){const n=e.canvas,r=n&&Gt(n);if(!r)return;const i=re(((e,t)=>{const n=r.clientWidth;o(e,t),n<r.clientWidth&&o()}),window),s=new ResizeObserver((e=>{const t=e[0],o=t.contentRect.width,n=t.contentRect.height;0===o&&0===n||i(o,n)}));return s.observe(r),function(e,t){Kn.size||window.addEventListener("resize",Jn),Kn.set(e,t)}(e,i),s}function er(e,t,o){o&&o.disconnect(),"resize"===t&&function(e){Kn.delete(e),Kn.size||window.removeEventListener("resize",Jn)}(e)}function tr(e,t,o){const n=e.canvas,r=re((t=>{null!==e.ctx&&o(function(e,t){const o=Un[e.type]||e.type,{x:n,y:r}=eo(e,t);return{type:o,chart:t,native:e,x:void 0!==n?n:null,y:void 0!==r?r:null}}(t,e))}),e,(e=>{const t=e[0];return[t,t.offsetX,t.offsetY]}));return function(e,t,o){e.addEventListener(t,o,$n)}(n,t,r),r}class or extends Hn{acquireContext(e,t){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(function(e,t){const o=e.style,n=e.getAttribute("height"),r=e.getAttribute("width");if(e[Vn]={initial:{height:n,width:r,style:{display:o.display,height:o.height,width:o.width}}},o.display=o.display||"block",o.boxSizing=o.boxSizing||"border-box",Zn(r)){const t=io(e,"width");void 0!==t&&(e.width=t)}if(Zn(n))if(""===e.style.height)e.height=e.width/(t||2);else{const t=io(e,"height");void 0!==t&&(e.height=t)}}(e,t),o):null}releaseContext(e){const t=e.canvas;if(!t[Vn])return!1;const o=t[Vn].initial;["height","width"].forEach((e=>{const n=o[e];i(n)?t.removeAttribute(e):t.setAttribute(e,n)}));const n=o.style||{};return Object.keys(n).forEach((e=>{t.style[e]=n[e]})),t.width=t.width,delete t[Vn],!0}addEventListener(e,t,o){this.removeEventListener(e,t);const n=e.$proxies||(e.$proxies={}),r={attach:Gn,detach:Yn,resize:Qn}[t]||tr;n[t]=r(e,t,o)}removeEventListener(e,t){const o=e.$proxies||(e.$proxies={}),n=o[t];if(!n)return;({attach:er,detach:er,resize:er}[t]||Wn)(e,t,n),o[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,o,n){return oo(e,t,o,n)}isAttached(e){const t=Gt(e);return!(!t||!t.isConnected)}}class nr{constructor(){this._init=[]}notify(e,t,o,n){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const r=n?this._descriptors(e).filter(n):this._descriptors(e),i=this._notify(r,e,t,o);return"afterDestroy"===t&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall")),i}_notify(e,t,o,n){n=n||{};for(const r of e){const e=r.plugin;if(!1===h(e[o],[t,n,r.options],e)&&n.cancelable)return!1}return!0}invalidate(){i(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const o=e&&e.config,n=d(o.options&&o.options.plugins,{}),r=function(e){const t={},o=[],n=Object.keys(gn.plugins.items);for(let e=0;e<n.length;e++)o.push(gn.getPlugin(n[e]));const r=e.plugins||[];for(let e=0;e<r.length;e++){const n=r[e];-1===o.indexOf(n)&&(o.push(n),t[n.id]=!0)}return{plugins:o,localIds:t}}(o);return!1!==n||t?function(e,{plugins:t,localIds:o},n,r){const i=[],s=e.getContext();for(const a of t){const t=a.id,l=rr(n[t],r);null!==l&&i.push({plugin:a,options:ir(e.config,{plugin:a,local:o[t]},l,s)})}return i}(e,r,n,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],o=this._cache,n=(e,t)=>e.filter((e=>!t.some((t=>e.plugin.id===t.plugin.id))));this._notify(n(t,o),e,"stop"),this._notify(n(o,t),e,"start")}}function rr(e,t){return t||!1!==e?!0===e?{}:e:null}function ir(e,{plugin:t,local:o},n,r){const i=e.pluginScopeKeys(t),s=e.getOptionScopes(n,i);return o&&t.defaults&&s.push(t.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(e,t){const o=et.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||o.indexAxis||"x"}function ar(e,t){return"x"===e||"y"===e?e:t.axis||("top"===(o=t.position)||"bottom"===o?"x":"left"===o||"right"===o?"y":void 0)||e.charAt(0).toLowerCase();var o}function lr(e){const t=e.options||(e.options={});t.plugins=d(t.plugins,{}),t.scales=function(e,t){const o=Ke[e.type]||{scales:{}},n=t.scales||{},r=sr(e.type,t),i=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((e=>{const t=n[e];if(!a(t))return console.error(`Invalid scale configuration for scale: ${e}`);if(t._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const l=ar(e,t),c=function(e,t){return e===t?"_index_":"_value_"}(l,r),d=o.scales||{};i[l]=i[l]||e,s[e]=y(Object.create(null),[{axis:l},t,d[l],d[c]])})),e.data.datasets.forEach((o=>{const r=o.type||e.type,a=o.indexAxis||sr(r,t),l=(Ke[r]||{}).scales||{};Object.keys(l).forEach((e=>{const t=function(e,t){let o=e;return"_index_"===e?o=t:"_value_"===e&&(o="x"===t?"y":"x"),o}(e,a),r=o[t+"AxisID"]||i[t]||t;s[r]=s[r]||Object.create(null),y(s[r],[{axis:t},n[r],l[e]])}))})),Object.keys(s).forEach((e=>{const t=s[e];y(t,[et.scales[t.type],et.scale])})),s}(e,t)}function cr(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const dr=new Map,ur=new Set;function hr(e,t){let o=dr.get(e);return o||(o=t(),dr.set(e,o),ur.add(o)),o}const mr=(e,t,o)=>{const n=_(t,o);void 0!==n&&e.add(n)};class pr{constructor(e){this._config=function(e){return(e=e||{}).data=cr(e.data),lr(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=cr(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),lr(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return hr(e,(()=>[[`datasets.${e}`,""]]))}datasetAnimationScopeKeys(e,t){return hr(`${e}.transition.${t}`,(()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]]))}datasetElementScopeKeys(e,t){return hr(`${e}-${t}`,(()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]]))}pluginScopeKeys(e){const t=e.id;return hr(`${this.type}-plugin-${t}`,(()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]]))}_cachedScopes(e,t){const o=this._scopeCache;let n=o.get(e);return n&&!t||(n=new Map,o.set(e,n)),n}getOptionScopes(e,t,o){const{options:n,type:r}=this,i=this._cachedScopes(e,o),s=i.get(t);if(s)return s;const a=new Set;t.forEach((t=>{e&&(a.add(e),t.forEach((t=>mr(a,e,t)))),t.forEach((e=>mr(a,n,e))),t.forEach((e=>mr(a,Ke[r]||{},e))),t.forEach((e=>mr(a,et,e))),t.forEach((e=>mr(a,Xe,e)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(t)&&i.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,Ke[t]||{},et.datasets[t]||{},{type:t},et,Xe]}resolveNamedOptions(e,t,o,n=[""]){const r={$shared:!0},{resolver:i,subPrefixes:a}=gr(this._resolverCache,e,n);let l=i;if(function(e,t){const{isScriptable:o,isIndexable:n}=Ot(e);for(const r of t){const t=o(r),i=n(r),a=(i||t)&&e[r];if(t&&(k(a)||fr(a))||i&&s(a))return!0}return!1}(i,t)){r.$shared=!1;l=Tt(i,o=k(o)?o():o,this.createResolver(e,o,a))}for(const e of t)r[e]=l[e];return r}createResolver(e,t,o=[""],n){const{resolver:r}=gr(this._resolverCache,e,o);return a(t)?Tt(r,t,void 0,n):r}}function gr(e,t,o){let n=e.get(t);n||(n=new Map,e.set(t,n));const r=o.join();let i=n.get(r);if(!i){i={resolver:Et(t,o),subPrefixes:o.filter((e=>!e.toLowerCase().includes("hover")))},n.set(r,i)}return i}const fr=e=>a(e)&&Object.getOwnPropertyNames(e).reduce(((t,o)=>t||k(e[o])),!1);const br=["top","bottom","left","right","chartArea"];function vr(e,t){return"top"===e||"bottom"===e||-1===br.indexOf(e)&&"x"===t}function yr(e,t){return function(o,n){return o[e]===n[e]?o[t]-n[t]:o[e]-n[e]}}function xr(e){const t=e.chart,o=t.options.animation;t.notifyPlugins("afterRender"),h(o&&o.onComplete,[e],t)}function wr(e){const t=e.chart,o=t.options.animation;h(o&&o.onProgress,[e],t)}function _r(e){return qt()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Sr={},Cr=e=>{const t=_r(e);return Object.values(Sr).filter((e=>e.canvas===t)).pop()};function kr(e,t,o){const n=Object.keys(e);for(const r of n){const n=+r;if(n>=t){const i=e[r];delete e[r],(o>0||n>t)&&(e[n+o]=i)}}}class Er{constructor(e,t){const o=this.config=new pr(t),n=_r(e),i=Cr(n);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const s=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||function(e){return!qt()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?jn:or}(n)),this.platform.updateConfig(o);const a=this.platform.acquireContext(n,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,d=l&&l.width;this.id=r(),this.ctx=a,this.canvas=l,this.width=d,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){let o;return function(...n){return t?(clearTimeout(o),o=setTimeout(e,t,n)):e.apply(this,n),t}}((e=>this.update(e)),s.resizeDelay||0),this._dataChanges=[],Sr[this.id]=this,a&&l?(_o.listen(this,"complete",xr),_o.listen(this,"progress",wr),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:o,height:n,_aspectRatio:r}=this;return i(e)?t&&r?r:n?o/n:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():no(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return rt(this.canvas,this.ctx),this}stop(){return _o.stop(this),this}resize(e,t){_o.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const o=this.options,n=this.canvas,r=o.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(n,e,t,r),s=o.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,no(this,s,!0)&&(this.notifyPlugins("resize",{size:i}),h(o.onResize,[this,i],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){m(this.options.scales||{},((e,t)=>{e.id=t}))}buildOrUpdateScales(){const e=this.options,t=e.scales,o=this.scales,n=Object.keys(o).reduce(((e,t)=>(e[t]=!1,e)),{});let r=[];t&&(r=r.concat(Object.keys(t).map((e=>{const o=t[e],n=ar(e,o),r="r"===n,i="x"===n;return{options:o,dposition:r?"chartArea":i?"bottom":"left",dtype:r?"radialLinear":i?"category":"linear"}})))),m(r,(t=>{const r=t.options,i=r.id,s=ar(i,r),a=d(r.type,t.dtype);void 0!==r.position&&vr(r.position,s)===vr(t.dposition)||(r.position=t.dposition),n[i]=!0;let l=null;if(i in o&&o[i].type===a)l=o[i];else{l=new(gn.getScale(a))({id:i,type:a,ctx:this.ctx,chart:this}),o[l.id]=l}l.init(r,e)})),m(n,((e,t)=>{e||delete o[t]})),m(o,(e=>{Fn.configure(this,e,e.options),Fn.addBox(this,e)}))}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,o=e.length;if(e.sort(((e,t)=>e.index-t.index)),o>t){for(let e=t;e<o;++e)this._destroyDatasetMeta(e);e.splice(t,o-t)}this._sortedMetasets=e.slice(0).sort(yr("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach(((e,o)=>{0===t.filter((t=>t===e._dataset)).length&&this._destroyDatasetMeta(o)}))}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let o,n;for(this._removeUnreferencedMetasets(),o=0,n=t.length;o<n;o++){const n=t[o];let r=this.getDatasetMeta(o);const i=n.type||this.config.type;if(r.type&&r.type!==i&&(this._destroyDatasetMeta(o),r=this.getDatasetMeta(o)),r.type=i,r.indexAxis=n.indexAxis||sr(i,this.options),r.order=n.order||0,r.index=o,r.label=""+n.label,r.visible=this.isDatasetVisible(o),r.controller)r.controller.updateIndex(o),r.controller.linkScales();else{const t=gn.getController(i),{datasetElementType:n,dataElementType:s}=et.datasets[i];Object.assign(t.prototype,{dataElementType:gn.getElement(s),datasetElementType:n&&gn.getElement(n)}),r.controller=new t(this,o),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){m(this.data.datasets,((e,t)=>{this.getDatasetMeta(t).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const o=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let e=0,t=this.data.datasets.length;e<t;e++){const{controller:t}=this.getDatasetMeta(e),o=!n&&-1===r.indexOf(t);t.buildOrUpdateElements(o),i=Math.max(+t.getMaxOverflow(),i)}i=this._minPadding=o.layout.autoPadding?i:0,this._updateLayout(i),n||m(r,(e=>{e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(yr("z","_idx"));const{_active:s,_lastEvent:a}=this;a?this._eventHandler(a,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){m(this.scales,(e=>{Fn.removeBox(this,e)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),o=new Set(e.events);E(t,o)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:o,start:n,count:r}of t){kr(e,n,"_removeElements"===o?-r:r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,o=t=>new Set(e.filter((e=>e[0]===t)).map(((e,t)=>t+","+e.splice(1).join(",")))),n=o(0);for(let e=1;e<t;e++)if(!E(n,o(e)))return;return Array.from(n).map((e=>e.split(","))).map((e=>({method:e[1],start:+e[2],count:+e[3]})))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Fn.update(this,this.width,this.height,e);const t=this.chartArea,o=t.width<=0||t.height<=0;this._layers=[],m(this.boxes,(e=>{o&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))}),this),this._layers.forEach(((e,t)=>{e._idx=t})),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,o=this.data.datasets.length;t<o;++t)this._updateDataset(t,k(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const o=this.getDatasetMeta(e),n={meta:o,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(o.controller._update(t),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(_o.has(this)?this.attached&&!_o.running(this)&&_o.start(this):(this.draw(),xr({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resize(e,t),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,o=[];let n,r;for(n=0,r=t.length;n<r;++n){const r=t[n];e&&!r.visible||o.push(r)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,o=e._clip,n=!o.disabled,r=this.chartArea,i={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(n&&lt(t,{left:!1===o.left?0:r.left-o.left,right:!1===o.right?this.width:r.right+o.right,top:!1===o.top?0:r.top-o.top,bottom:!1===o.bottom?this.height:r.bottom+o.bottom}),e.controller.draw(),n&&ct(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return at(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,o,n){const r=En.modes[t];return"function"==typeof r?r(this,e,o,n):[]}getDatasetMeta(e){const t=this.data.datasets[e],o=this._metasets;let n=o.filter((e=>e&&e._dataset===t)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},o.push(n)),n}getContext(){return this.$context||(this.$context=kt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const o=this.getDatasetMeta(e);return"boolean"==typeof o.hidden?!o.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,o){const n=o?"show":"hide",r=this.getDatasetMeta(e),i=r.controller._resolveAnimations(void 0,n);C(t)?(r.data[t].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),i.update(r,{visible:o}),this.update((t=>t.datasetIndex===e?n:void 0)))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),_o.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),rt(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete Sr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,o=(o,n)=>{t.addEventListener(this,o,n),e[o]=n},n=(e,t,o)=>{e.offsetX=t,e.offsetY=o,this._eventHandler(e)};m(this.options.events,(e=>o(e,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,o=(o,n)=>{t.addEventListener(this,o,n),e[o]=n},n=(o,n)=>{e[o]&&(t.removeEventListener(this,o,n),delete e[o])},r=(e,t)=>{this.canvas&&this.resize(e,t)};let i;const s=()=>{n("attach",s),this.attached=!0,this.resize(),o("resize",r),o("detach",i)};i=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),o("attach",s)},t.isAttached(this.canvas)?s():i()}unbindEvents(){m(this._listeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._listeners={},m(this._responsiveListeners,((e,t)=>{this.platform.removeEventListener(this,t,e)})),this._responsiveListeners=void 0}updateHoverStyle(e,t,o){const n=o?"set":"remove";let r,i,s,a;for("dataset"===t&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=e.length;s<a;++s){i=e[s];const t=i&&this.getDatasetMeta(i.datasetIndex).controller;t&&t[n+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],o=e.map((({datasetIndex:e,index:t})=>{const o=this.getDatasetMeta(e);if(!o)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:o.data[t],index:t}}));!p(o,t)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,t))}notifyPlugins(e,t,o){return this._plugins.notify(this,e,t,o)}_updateHoverStyles(e,t,o){const n=this.options.hover,r=(e,t)=>e.filter((e=>!t.some((t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)))),i=r(t,e),s=o?e:r(e,t);i.length&&this.updateHoverStyle(i,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(e,t){const o={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},n=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",o,n))return;const r=this._handleEvent(e,t,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,n),(r||o.changed)&&this.render(),this}_handleEvent(e,t,o){const{_active:n=[],options:r}=this,i=t,s=this._getActiveElements(e,n,o,i),a=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),l=function(e,t,o,n){return o&&"mouseout"!==e.type?n?t:e:null}(e,this._lastEvent,o,a);o&&(this._lastEvent=null,h(r.onHover,[e,s,this],this),a&&h(r.onClick,[e,s,this],this));const c=!p(s,n);return(c||t)&&(this._active=s,this._updateHoverStyles(s,n,t)),this._lastEvent=l,c}_getActiveElements(e,t,o,n){if("mouseout"===e.type)return[];if(!o)return t;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,n)}}const Tr=()=>m(Er.instances,(e=>e._plugins.invalidate())),Or=!0;function Ar(e,t,o){const{startAngle:n,pixelMargin:r,x:i,y:s,outerRadius:a,innerRadius:l}=t;let c=r/a;e.beginPath(),e.arc(i,s,a,n-c,o+c),l>r?(c=r/l,e.arc(i,s,l,o+c,n-c,!0)):e.arc(i,s,r,o+D,n-D),e.closePath(),e.clip()}function Mr(e,t,o,n){const r=yt(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const i=(o-t)/2,s=Math.min(i,n*t/2),a=e=>{const t=(o-Math.min(i,e))*n/2;return Y(e,0,Math.min(i,t))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:Y(r.innerStart,0,s),innerEnd:Y(r.innerEnd,0,s)}}function Pr(e,t,o,n){return{x:o+e*Math.cos(t),y:n+e*Math.sin(t)}}function Dr(e,t,o,n,r,i){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=t,u=Math.max(t.outerRadius+n+o-c,0),h=d>0?d+n+o+c:0;let m=0;const p=r-l;if(n){const e=((d>0?d-n:0)+(u>0?u-n:0))/2;m=(p-(0!==e?p*e/(e+n):p))/2}const g=(p-Math.max(.001,p*u-o/T)/u)/2,f=l+g+m,b=r-g-m,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:w}=Mr(t,h,u,b-f),_=u-v,S=u-y,C=f+v/_,k=b-y/S,E=h+x,O=h+w,A=f+x/E,M=b-w/O;if(e.beginPath(),i){if(e.arc(s,a,u,C,k),y>0){const t=Pr(S,k,s,a);e.arc(t.x,t.y,y,k,b+D)}const t=Pr(O,b,s,a);if(e.lineTo(t.x,t.y),w>0){const t=Pr(O,M,s,a);e.arc(t.x,t.y,w,b+D,M+Math.PI)}if(e.arc(s,a,h,b-w/h,f+x/h,!0),x>0){const t=Pr(E,A,s,a);e.arc(t.x,t.y,x,A+Math.PI,f-D)}const o=Pr(_,f,s,a);if(e.lineTo(o.x,o.y),v>0){const t=Pr(_,C,s,a);e.arc(t.x,t.y,v,f-D,C)}}else{e.moveTo(s,a);const t=Math.cos(C)*u+s,o=Math.sin(C)*u+a;e.lineTo(t,o);const n=Math.cos(k)*u+s,r=Math.sin(k)*u+a;e.lineTo(n,r)}e.closePath()}function Lr(e,t,o,n,r,i){const{options:s}=t,{borderWidth:a,borderJoinStyle:l}=s,c="inner"===s.borderAlign;a&&(c?(e.lineWidth=2*a,e.lineJoin=l||"round"):(e.lineWidth=a,e.lineJoin=l||"bevel"),t.fullCircles&&function(e,t,o){const{x:n,y:r,startAngle:i,pixelMargin:s,fullCircles:a}=t,l=Math.max(t.outerRadius-s,0),c=t.innerRadius+s;let d;for(o&&Ar(e,t,i+O),e.beginPath(),e.arc(n,r,c,i+O,i,!0),d=0;d<a;++d)e.stroke();for(e.beginPath(),e.arc(n,r,l,i,i+O),d=0;d<a;++d)e.stroke()}(e,t,c),c&&Ar(e,t,r),Dr(e,t,o,n,r,i),e.stroke())}Object.defineProperties(Er,{defaults:{enumerable:Or,value:et},instances:{enumerable:Or,value:Sr},overrides:{enumerable:Or,value:Ke},registry:{enumerable:Or,value:gn},version:{enumerable:Or,value:"3.9.1"},getChart:{enumerable:Or,value:Cr},register:{enumerable:Or,value:(...e)=>{gn.add(...e),Tr()}},unregister:{enumerable:Or,value:(...e)=>{gn.remove(...e),Tr()}}});class Rr extends tn{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,o){const n=this.getProps(["x","y"],o),{angle:r,distance:i}=Z(n,{x:e,y:t}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),h=this.options.spacing/2,m=d(u,a-s)>=O||G(r,s,a),p=K(i,l+h,c+h);return m&&p}getCenterPoint(e){const{x:t,y:o,startAngle:n,endAngle:r,innerRadius:i,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:l}=this.options,c=(n+r)/2,d=(i+s+l+a)/2;return{x:t+Math.cos(c)*d,y:o+Math.sin(c)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:o}=this,n=(t.offset||0)/2,r=(t.spacing||0)/2,i=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=o>O?Math.floor(o/O):0,0===o||this.innerRadius<0||this.outerRadius<0)return;e.save();let s=0;if(n){s=n/2;const t=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(t)*s,Math.sin(t)*s),this.circumference>=T&&(s=n)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=function(e,t,o,n,r){const{fullCircles:i,startAngle:s,circumference:a}=t;let l=t.endAngle;if(i){Dr(e,t,o,n,s+O,r);for(let t=0;t<i;++t)e.fill();isNaN(a)||(l=s+a%O,a%O==0&&(l+=O))}return Dr(e,t,o,n,l,r),e.fill(),l}(e,this,s,r,i);Lr(e,this,s,r,a,i),e.restore()}}function Nr(e,t,o=t){e.lineCap=d(o.borderCapStyle,t.borderCapStyle),e.setLineDash(d(o.borderDash,t.borderDash)),e.lineDashOffset=d(o.borderDashOffset,t.borderDashOffset),e.lineJoin=d(o.borderJoinStyle,t.borderJoinStyle),e.lineWidth=d(o.borderWidth,t.borderWidth),e.strokeStyle=d(o.borderColor,t.borderColor)}function Ir(e,t,o){e.lineTo(o.x,o.y)}function Br(e,t,o={}){const n=e.length,{start:r=0,end:i=n-1}=o,{start:s,end:a}=t,l=Math.max(r,s),c=Math.min(i,a),d=r<s&&i<s||r>a&&i>a;return{count:n,start:l,loop:t.loop,ilen:c<l&&!d?n+c-l:c-l}}function zr(e,t,o,n){const{points:r,options:i}=t,{count:s,start:a,loop:l,ilen:c}=Br(r,o,n),d=function(e){return e.stepped?dt:e.tension||"monotone"===e.cubicInterpolationMode?ut:Ir}(i);let u,h,m,{move:p=!0,reverse:g}=n||{};for(u=0;u<=c;++u)h=r[(a+(g?c-u:u))%s],h.skip||(p?(e.moveTo(h.x,h.y),p=!1):d(e,m,h,g,i.stepped),m=h);return l&&(h=r[(a+(g?c:0))%s],d(e,m,h,g,i.stepped)),!!l}function Fr(e,t,o,n){const r=t.points,{count:i,start:s,ilen:a}=Br(r,o,n),{move:l=!0,reverse:c}=n||{};let d,u,h,m,p,g,f=0,b=0;const v=e=>(s+(c?a-e:e))%i,y=()=>{m!==p&&(e.lineTo(f,p),e.lineTo(f,m),e.lineTo(f,g))};for(l&&(u=r[v(0)],e.moveTo(u.x,u.y)),d=0;d<=a;++d){if(u=r[v(d)],u.skip)continue;const t=u.x,o=u.y,n=0|t;n===h?(o<m?m=o:o>p&&(p=o),f=(b*f+t)/++b):(y(),e.lineTo(t,o),h=n,b=0,m=p=o),g=o}y()}function Hr(e){const t=e.options,o=t.borderDash&&t.borderDash.length;return!(e._decimated||e._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||o)?Fr:zr}Rr.id="arc",Rr.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Rr.defaultRoutes={backgroundColor:"backgroundColor"};const jr="function"==typeof Path2D;function Vr(e,t,o,n){jr&&!t.options.segment?function(e,t,o,n){let r=t._path;r||(r=t._path=new Path2D,t.path(r,o,n)&&r.closePath()),Nr(e,t.options),e.stroke(r)}(e,t,o,n):function(e,t,o,n){const{segments:r,options:i}=t,s=Hr(t);for(const a of r)Nr(e,i,a.style),e.beginPath(),s(e,t,a,{start:o,end:o+n-1})&&e.closePath(),e.stroke()}(e,t,o,n)}class Ur extends tn{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const o=this.options;if((o.tension||"monotone"===o.cubicInterpolationMode)&&!o.stepped&&!this._pointsUpdated){const n=o.spanGaps?this._loop:this._fullLoop;Wt(this._points,o,e,n,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(e,t){const o=e.points,n=e.options.spanGaps,r=o.length;if(!r)return[];const i=!!e._loop,{start:s,end:a}=function(e,t,o,n){let r=0,i=t-1;if(o&&!n)for(;r<t&&!e[r].skip;)r++;for(;r<t&&e[r].skip;)r++;for(r%=t,o&&(i+=r);i>r&&e[i%t].skip;)i--;return i%=t,{start:r,end:i}}(o,r,i,n);return yo(e,!0===n?[{start:s,end:a,loop:i}]:function(e,t,o,n){const r=e.length,i=[];let s,a=t,l=e[t];for(s=t+1;s<=o;++s){const o=e[s%r];o.skip||o.stop?l.skip||(n=!1,i.push({start:t%r,end:(s-1)%r,loop:n}),t=a=o.stop?s:null):(a=s,l.skip&&(t=s)),l=o}return null!==a&&i.push({start:t%r,end:a%r,loop:n}),i}(o,s,a<s?a+r:a,!!e._fullLoop&&0===s&&a===r-1),o,t)}(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,o=e.length;return o&&t[e[o-1].end]}interpolate(e,t){const o=this.options,n=e[t],r=this.points,i=vo(this,{property:t,start:n,end:n});if(!i.length)return;const s=[],a=function(e){return e.stepped?ao:e.tension||"monotone"===e.cubicInterpolationMode?lo:so}(o);let l,c;for(l=0,c=i.length;l<c;++l){const{start:c,end:d}=i[l],u=r[c],h=r[d];if(u===h){s.push(u);continue}const m=a(u,h,Math.abs((n-u[t])/(h[t]-u[t])),o.stepped);m[t]=e[t],s.push(m)}return 1===s.length?s[0]:s}pathSegment(e,t,o){return Hr(this)(e,this,t,o)}path(e,t,o){const n=this.segments,r=Hr(this);let i=this._loop;t=t||0,o=o||this.points.length-t;for(const s of n)i&=r(e,this,s,{start:t,end:t+o-1});return!!i}draw(e,t,o,n){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(e.save(),Vr(e,this,o,n),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Zr(e,t,o,n){const r=e.options,{[o]:i}=e.getProps([o],n);return Math.abs(t-i)<r.radius+r.hitRadius}Ur.id="line",Ur.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Ur.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Ur.descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};class $r extends tn{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,o){const n=this.options,{x:r,y:i}=this.getProps(["x","y"],o);return Math.pow(e-r,2)+Math.pow(t-i,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(e,t){return Zr(this,e,"x",t)}inYRange(e,t){return Zr(this,e,"y",t)}getCenterPoint(e){const{x:t,y:o}=this.getProps(["x","y"],e);return{x:t,y:o}}size(e){let t=(e=e||this.options||{}).radius||0;t=Math.max(t,t&&e.hoverRadius||0);return 2*(t+(t&&e.borderWidth||0))}draw(e,t){const o=this.options;this.skip||o.radius<.1||!at(this,t,this.size(o)/2)||(e.strokeStyle=o.borderColor,e.lineWidth=o.borderWidth,e.fillStyle=o.backgroundColor,it(e,o,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function Wr(e,t){const{x:o,y:n,base:r,width:i,height:s}=e.getProps(["x","y","base","width","height"],t);let a,l,c,d,u;return e.horizontal?(u=s/2,a=Math.min(o,r),l=Math.max(o,r),c=n-u,d=n+u):(u=i/2,a=o-u,l=o+u,c=Math.min(n,r),d=Math.max(n,r)),{left:a,top:c,right:l,bottom:d}}function qr(e,t,o,n){return e?0:Y(t,o,n)}function Gr(e){const t=Wr(e),o=t.right-t.left,n=t.bottom-t.top,r=function(e,t,o){const n=e.options.borderWidth,r=e.borderSkipped,i=xt(n);return{t:qr(r.top,i.top,0,o),r:qr(r.right,i.right,0,t),b:qr(r.bottom,i.bottom,0,o),l:qr(r.left,i.left,0,t)}}(e,o/2,n/2),i=function(e,t,o){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,i=wt(r),s=Math.min(t,o),l=e.borderSkipped,c=n||a(r);return{topLeft:qr(!c||l.top||l.left,i.topLeft,0,s),topRight:qr(!c||l.top||l.right,i.topRight,0,s),bottomLeft:qr(!c||l.bottom||l.left,i.bottomLeft,0,s),bottomRight:qr(!c||l.bottom||l.right,i.bottomRight,0,s)}}(e,o/2,n/2);return{outer:{x:t.left,y:t.top,w:o,h:n,radius:i},inner:{x:t.left+r.l,y:t.top+r.t,w:o-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,i.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(r.b,r.r))}}}}function Yr(e,t,o,n){const r=null===t,i=null===o,s=e&&!(r&&i)&&Wr(e,n);return s&&(r||K(t,s.left,s.right))&&(i||K(o,s.top,s.bottom))}function Kr(e,t){e.rect(t.x,t.y,t.w,t.h)}function Xr(e,t,o={}){const n=e.x!==o.x?-t:0,r=e.y!==o.y?-t:0,i=(e.x+e.w!==o.x+o.w?t:0)-n,s=(e.y+e.h!==o.y+o.h?t:0)-r;return{x:e.x+n,y:e.y+r,w:e.w+i,h:e.h+s,radius:e.radius}}$r.id="point",$r.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},$r.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends tn{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:o,backgroundColor:n}}=this,{inner:r,outer:i}=Gr(this),s=(a=i.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?pt:Kr;var a;e.save(),i.w===r.w&&i.h===r.h||(e.beginPath(),s(e,Xr(i,t,r)),e.clip(),s(e,Xr(r,-t,i)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),s(e,Xr(r,t)),e.fillStyle=n,e.fill(),e.restore()}inRange(e,t,o){return Yr(this,e,t,o)}inXRange(e,t){return Yr(this,e,null,t)}inYRange(e,t){return Yr(this,null,e,t)}getCenterPoint(e){const{x:t,y:o,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(t+n)/2:t,y:r?o:(o+n)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const Qr=(e,t)=>{let{boxHeight:o=t,boxWidth:n=t}=e;return e.usePointStyle&&(o=Math.min(o,t),n=e.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:o,itemHeight:Math.max(t,o)}};class ei extends tn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,o){this.maxWidth=e,this.maxHeight=t,this._margins=o,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=h(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter((t=>e.filter(t,this.chart.data)))),e.sort&&(t=t.sort(((t,o)=>e.sort(t,o,this.chart.data)))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const o=e.labels,n=St(o.font),r=n.size,i=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=Qr(o,r);let l,c;t.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(i,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(i,r,s,a)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,o,n){const{ctx:r,maxWidth:i,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let d=e;r.textAlign="left",r.textBaseline="middle";let u=-1,h=-c;return this.legendItems.forEach(((e,m)=>{const p=o+t/2+r.measureText(e.text).width;(0===m||l[l.length-1]+p+2*s>i)&&(d+=c,l[l.length-(m>0?0:1)]=0,h+=c,u++),a[m]={left:0,top:h,row:u,width:p,height:n},l[l.length-1]+=p+s})),d}_fitCols(e,t,o,n){const{ctx:r,maxHeight:i,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=i-e;let d=s,u=0,h=0,m=0,p=0;return this.legendItems.forEach(((e,i)=>{const g=o+t/2+r.measureText(e.text).width;i>0&&h+n+2*s>c&&(d+=u+s,l.push({width:u,height:h}),m+=u+s,p++,u=h=0),a[i]={left:m,top:h,col:p,width:g,height:n},u=Math.max(u,g),h+=n+s})),d+=u,l.push({width:u,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:o,labels:{padding:n},rtl:r}}=this,i=ho(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=se(o,this.left+n,this.right-this.lineWidths[r]);for(const a of t)r!==a.row&&(r=a.row,s=se(o,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+e+n,a.left=i.leftForLtr(i.x(s),a.width),s+=a.width+n}else{let r=0,s=se(o,this.top+e+n,this.bottom-this.columnSizes[r].height);for(const a of t)a.col!==r&&(r=a.col,s=se(o,this.top+e+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=i.leftForLtr(i.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;lt(e,this),this._draw(),ct(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:o,ctx:n}=this,{align:r,labels:i}=e,s=et.color,a=ho(e.rtl,this.left,this.width),l=St(i.font),{color:c,padding:u}=i,h=l.size,m=h/2;let p;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:g,boxHeight:f,itemHeight:b}=Qr(i,h),v=this.isHorizontal(),y=this._computeTitleHeight();p=v?{x:se(r,this.left+u,this.right-o[0]),y:this.top+u+y,line:0}:{x:this.left+u,y:se(r,this.top+y+u,this.bottom-t[0].height),line:0},mo(this.ctx,e.textDirection);const x=b+u;this.legendItems.forEach(((w,_)=>{n.strokeStyle=w.fontColor||c,n.fillStyle=w.fontColor||c;const S=n.measureText(w.text).width,C=a.textAlign(w.textAlign||(w.textAlign=i.textAlign)),k=g+m+S;let E=p.x,T=p.y;a.setWidth(this.width),v?_>0&&E+k+u>this.right&&(T=p.y+=x,p.line++,E=p.x=se(r,this.left+u,this.right-o[p.line])):_>0&&T+x>this.bottom&&(E=p.x=E+t[p.line].width+u,p.line++,T=p.y=se(r,this.top+y+u,this.bottom-t[p.line].height));!function(e,t,o){if(isNaN(g)||g<=0||isNaN(f)||f<0)return;n.save();const r=d(o.lineWidth,1);if(n.fillStyle=d(o.fillStyle,s),n.lineCap=d(o.lineCap,"butt"),n.lineDashOffset=d(o.lineDashOffset,0),n.lineJoin=d(o.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=d(o.strokeStyle,s),n.setLineDash(d(o.lineDash,[])),i.usePointStyle){const s={radius:f*Math.SQRT2/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:r},l=a.xPlus(e,g/2);st(n,s,l,t+m,i.pointStyleWidth&&g)}else{const i=t+Math.max((h-f)/2,0),s=a.leftForLtr(e,g),l=wt(o.borderRadius);n.beginPath(),Object.values(l).some((e=>0!==e))?pt(n,{x:s,y:i,w:g,h:f,radius:l}):n.rect(s,i,g,f),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(E),T,w),E=((e,t,o,n)=>e===(n?"left":"right")?o:"center"===e?(t+o)/2:t)(C,E+g+m,v?E+k:this.right,e.rtl),function(e,t,o){ht(n,o.text,e,t+b/2,l,{strikethrough:o.hidden,textAlign:a.textAlign(o.textAlign)})}(a.x(E),T,w),v?p.x+=k+u:p.y+=x})),po(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,o=St(t.font),n=_t(t.padding);if(!t.display)return;const r=ho(e.rtl,this.left,this.width),i=this.ctx,s=t.position,a=o.size/2,l=n.top+a;let c,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,d=se(e.align,d,this.right-u);else{const t=this.columnSizes.reduce(((e,t)=>Math.max(e,t.height)),0);c=l+se(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const h=se(s,d,d+u);i.textAlign=r.textAlign(ie(s)),i.textBaseline="middle",i.strokeStyle=t.color,i.fillStyle=t.color,i.font=o.string,ht(i,t.text,h,c,o)}_computeTitleHeight(){const e=this.options.title,t=St(e.font),o=_t(e.padding);return e.display?t.lineHeight+o.height:0}_getLegendItemAt(e,t){let o,n,r;if(K(e,this.left,this.right)&&K(t,this.top,this.bottom))for(r=this.legendHitBoxes,o=0;o<r.length;++o)if(n=r[o],K(e,n.left,n.left+n.width)&&K(t,n.top,n.top+n.height))return this.legendItems[o];return null}handleEvent(e){const t=this.options;if(!function(e,t){if(("mousemove"===e||"mouseout"===e)&&(t.onHover||t.onLeave))return!0;if(t.onClick&&("click"===e||"mouseup"===e))return!0;return!1}(e.type,t))return;const o=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const i=this._hoveredItem,s=(r=o,null!==(n=i)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);i&&!s&&h(t.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!s&&h(t.onHover,[e,o,this],this)}else o&&h(t.onClick,[e,o,this],this);var n,r}}var ti={id:"legend",_element:ei,start(e,t,o){const n=e.legend=new ei({ctx:e.ctx,options:o,chart:e});Fn.configure(e,n,o),Fn.addBox(e,n)},stop(e){Fn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,o){const n=e.legend;Fn.configure(e,n,o),n.options=o},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,o){const n=t.datasetIndex,r=o.chart;r.isDatasetVisible(n)?(r.hide(n),t.hidden=!0):(r.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:o,pointStyle:n,textAlign:r,color:i}}=e.legend.options;return e._getSortedDatasetMetas().map((e=>{const s=e.controller.getStyle(o?0:void 0),a=_t(s.borderWidth);return{text:t[e.index].label,fillStyle:s.backgroundColor,fontColor:i,hidden:!e.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:e.index}}),this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class oi extends tn{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const o=this.options;if(this.left=0,this.top=0,!o.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const n=s(o.text)?o.text.length:1;this._padding=_t(o.padding);const r=n*St(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:o,bottom:n,right:r,options:i}=this,s=i.align;let a,l,c,d=0;return this.isHorizontal()?(l=se(s,o,r),c=t+e,a=r-o):("left"===i.position?(l=o+e,c=se(s,n,t),d=-.5*T):(l=r-e,c=se(s,t,n),d=.5*T),a=n-t),{titleX:l,titleY:c,maxWidth:a,rotation:d}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const o=St(t.font),n=o.lineHeight/2+this._padding.top,{titleX:r,titleY:i,maxWidth:s,rotation:a}=this._drawArgs(n);ht(e,t.text,0,0,o,{color:t.color,maxWidth:s,rotation:a,textAlign:ie(t.align),textBaseline:"middle",translation:[r,i]})}}var ni={id:"title",_element:oi,start(e,t,o){!function(e,t){const o=new oi({ctx:e.ctx,options:t,chart:e});Fn.configure(e,o,t),Fn.addBox(e,o),e.titleBlock=o}(e,o)},stop(e){const t=e.titleBlock;Fn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,o){const n=e.titleBlock;Fn.configure(e,n,o),n.options=o},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const ri={average(e){if(!e.length)return!1;let t,o,n=0,r=0,i=0;for(t=0,o=e.length;t<o;++t){const o=e[t].element;if(o&&o.hasValue()){const e=o.tooltipPosition();n+=e.x,r+=e.y,++i}}return{x:n/i,y:r/i}},nearest(e,t){if(!e.length)return!1;let o,n,r,i=t.x,s=t.y,a=Number.POSITIVE_INFINITY;for(o=0,n=e.length;o<n;++o){const n=e[o].element;if(n&&n.hasValue()){const e=$(t,n.getCenterPoint());e<a&&(a=e,r=n)}}if(r){const e=r.tooltipPosition();i=e.x,s=e.y}return{x:i,y:s}}};function ii(e,t){return t&&(s(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function si(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function ai(e,t){const{element:o,datasetIndex:n,index:r}=t,i=e.getDatasetMeta(n).controller,{label:s,value:a}=i.getLabelAndValue(r);return{chart:e,label:s,parsed:i.getParsed(r),raw:e.data.datasets[n].data[r],formattedValue:a,dataset:i.getDataset(),dataIndex:r,datasetIndex:n,element:o}}function li(e,t){const o=e.chart.ctx,{body:n,footer:r,title:i}=e,{boxWidth:s,boxHeight:a}=t,l=St(t.bodyFont),c=St(t.titleFont),d=St(t.footerFont),u=i.length,h=r.length,p=n.length,g=_t(t.padding);let f=g.height,b=0,v=n.reduce(((e,t)=>e+t.before.length+t.lines.length+t.after.length),0);if(v+=e.beforeBody.length+e.afterBody.length,u&&(f+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),v){f+=p*(t.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(v-p)*l.lineHeight+(v-1)*t.bodySpacing}h&&(f+=t.footerMarginTop+h*d.lineHeight+(h-1)*t.footerSpacing);let y=0;const x=function(e){b=Math.max(b,o.measureText(e).width+y)};return o.save(),o.font=c.string,m(e.title,x),o.font=l.string,m(e.beforeBody.concat(e.afterBody),x),y=t.displayColors?s+2+t.boxPadding:0,m(n,(e=>{m(e.before,x),m(e.lines,x),m(e.after,x)})),y=0,o.font=d.string,m(e.footer,x),o.restore(),b+=g.width,{width:b,height:f}}function ci(e,t,o,n){const{x:r,width:i}=o,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=i/2?c="left":r>=s-i/2&&(c="right"),function(e,t,o,n){const{x:r,width:i}=n,s=o.caretSize+o.caretPadding;return"left"===e&&r+i+s>t.width||"right"===e&&r-i-s<0||void 0}(c,e,t,o)&&(c="center"),c}function di(e,t,o){const n=o.yAlign||t.yAlign||function(e,t){const{y:o,height:n}=t;return o<n/2?"top":o>e.height-n/2?"bottom":"center"}(e,o);return{xAlign:o.xAlign||t.xAlign||ci(e,t,o,n),yAlign:n}}function ui(e,t,o,n){const{caretSize:r,caretPadding:i,cornerRadius:s}=e,{xAlign:a,yAlign:l}=o,c=r+i,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:m}=wt(s);let p=function(e,t){let{x:o,width:n}=e;return"right"===t?o-=n:"center"===t&&(o-=n/2),o}(t,a);const g=function(e,t,o){let{y:n,height:r}=e;return"top"===t?n+=o:n-="bottom"===t?r+o:r/2,n}(t,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(d,h)+r:"right"===a&&(p+=Math.max(u,m)+r),{x:Y(p,0,n.width-t.width),y:Y(g,0,n.height-t.height)}}function hi(e,t,o){const n=_t(o.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-n.right:e.x+n.left}function mi(e){return ii([],si(e))}function pi(e,t){const o=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return o?e.override(o):e}class gi extends tn{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,o=this.options.setContext(this.getContext()),n=o.enabled&&t.options.animation&&o.animations,r=new To(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this,o=this._tooltipItems,kt(e,{tooltip:t,tooltipItems:o,type:"tooltip"})));var e,t,o}getTitle(e,t){const{callbacks:o}=t,n=o.beforeTitle.apply(this,[e]),r=o.title.apply(this,[e]),i=o.afterTitle.apply(this,[e]);let s=[];return s=ii(s,si(n)),s=ii(s,si(r)),s=ii(s,si(i)),s}getBeforeBody(e,t){return mi(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:o}=t,n=[];return m(e,(e=>{const t={before:[],lines:[],after:[]},r=pi(o,e);ii(t.before,si(r.beforeLabel.call(this,e))),ii(t.lines,r.label.call(this,e)),ii(t.after,si(r.afterLabel.call(this,e))),n.push(t)})),n}getAfterBody(e,t){return mi(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:o}=t,n=o.beforeFooter.apply(this,[e]),r=o.footer.apply(this,[e]),i=o.afterFooter.apply(this,[e]);let s=[];return s=ii(s,si(n)),s=ii(s,si(r)),s=ii(s,si(i)),s}_createItems(e){const t=this._active,o=this.chart.data,n=[],r=[],i=[];let s,a,l=[];for(s=0,a=t.length;s<a;++s)l.push(ai(this.chart,t[s]));return e.filter&&(l=l.filter(((t,n,r)=>e.filter(t,n,r,o)))),e.itemSort&&(l=l.sort(((t,n)=>e.itemSort(t,n,o)))),m(l,(t=>{const o=pi(e.callbacks,t);n.push(o.labelColor.call(this,t)),r.push(o.labelPointStyle.call(this,t)),i.push(o.labelTextColor.call(this,t))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=i,this.dataPoints=l,l}update(e,t){const o=this.options.setContext(this.getContext()),n=this._active;let r,i=[];if(n.length){const e=ri[o.position].call(this,n,this._eventPosition);i=this._createItems(o),this.title=this.getTitle(i,o),this.beforeBody=this.getBeforeBody(i,o),this.body=this.getBody(i,o),this.afterBody=this.getAfterBody(i,o),this.footer=this.getFooter(i,o);const t=this._size=li(this,o),s=Object.assign({},e,t),a=di(this.chart,o,s),l=ui(o,s,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=i,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,o,n){const r=this.getCaretPosition(e,o,n);t.lineTo(r.x1,r.y1),t.lineTo(r.x2,r.y2),t.lineTo(r.x3,r.y3)}getCaretPosition(e,t,o){const{xAlign:n,yAlign:r}=this,{caretSize:i,cornerRadius:s}=o,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:d}=wt(s),{x:u,y:h}=e,{width:m,height:p}=t;let g,f,b,v,y,x;return"center"===r?(y=h+p/2,"left"===n?(g=u,f=g-i,v=y+i,x=y-i):(g=u+m,f=g+i,v=y-i,x=y+i),b=g):(f="left"===n?u+Math.max(a,c)+i:"right"===n?u+m-Math.max(l,d)-i:this.caretX,"top"===r?(v=h,y=v-i,g=f-i,b=f+i):(v=h+p,y=v+i,g=f+i,b=f-i),x=v),{x1:g,x2:f,x3:b,y1:v,y2:y,y3:x}}drawTitle(e,t,o){const n=this.title,r=n.length;let i,s,a;if(r){const l=ho(o.rtl,this.x,this.width);for(e.x=hi(this,o.titleAlign,o),t.textAlign=l.textAlign(o.titleAlign),t.textBaseline="middle",i=St(o.titleFont),s=o.titleSpacing,t.fillStyle=o.titleColor,t.font=i.string,a=0;a<r;++a)t.fillText(n[a],l.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+s,a+1===r&&(e.y+=o.titleMarginBottom-s)}}_drawColorBox(e,t,o,n,r){const i=this.labelColors[o],s=this.labelPointStyles[o],{boxHeight:l,boxWidth:c,boxPadding:d}=r,u=St(r.bodyFont),h=hi(this,"left",r),m=n.x(h),p=l<u.lineHeight?(u.lineHeight-l)/2:0,g=t.y+p;if(r.usePointStyle){const t={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},o=n.leftForLtr(m,c)+c/2,a=g+l/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,it(e,t,o,a),e.strokeStyle=i.borderColor,e.fillStyle=i.backgroundColor,it(e,t,o,a)}else{e.lineWidth=a(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,e.strokeStyle=i.borderColor,e.setLineDash(i.borderDash||[]),e.lineDashOffset=i.borderDashOffset||0;const t=n.leftForLtr(m,c-d),o=n.leftForLtr(n.xPlus(m,1),c-d-2),s=wt(i.borderRadius);Object.values(s).some((e=>0!==e))?(e.beginPath(),e.fillStyle=r.multiKeyBackground,pt(e,{x:t,y:g,w:c,h:l,radius:s}),e.fill(),e.stroke(),e.fillStyle=i.backgroundColor,e.beginPath(),pt(e,{x:o,y:g+1,w:c-2,h:l-2,radius:s}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(t,g,c,l),e.strokeRect(t,g,c,l),e.fillStyle=i.backgroundColor,e.fillRect(o,g+1,c-2,l-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,t,o){const{body:n}=this,{bodySpacing:r,bodyAlign:i,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=o,d=St(o.bodyFont);let u=d.lineHeight,h=0;const p=ho(o.rtl,this.x,this.width),g=function(o){t.fillText(o,p.x(e.x+h),e.y+u/2),e.y+=u+r},f=p.textAlign(i);let b,v,y,x,w,_,S;for(t.textAlign=i,t.textBaseline="middle",t.font=d.string,e.x=hi(this,f,o),t.fillStyle=o.bodyColor,m(this.beforeBody,g),h=s&&"right"!==f?"center"===i?l/2+c:l+2+c:0,x=0,_=n.length;x<_;++x){for(b=n[x],v=this.labelTextColors[x],t.fillStyle=v,m(b.before,g),y=b.lines,s&&y.length&&(this._drawColorBox(t,e,x,p,o),u=Math.max(d.lineHeight,a)),w=0,S=y.length;w<S;++w)g(y[w]),u=d.lineHeight;m(b.after,g)}h=0,u=d.lineHeight,m(this.afterBody,g),e.y-=r}drawFooter(e,t,o){const n=this.footer,r=n.length;let i,s;if(r){const a=ho(o.rtl,this.x,this.width);for(e.x=hi(this,o.footerAlign,o),e.y+=o.footerMarginTop,t.textAlign=a.textAlign(o.footerAlign),t.textBaseline="middle",i=St(o.footerFont),t.fillStyle=o.footerColor,t.font=i.string,s=0;s<r;++s)t.fillText(n[s],a.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+o.footerSpacing}}drawBackground(e,t,o,n){const{xAlign:r,yAlign:i}=this,{x:s,y:a}=e,{width:l,height:c}=o,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:m}=wt(n.cornerRadius);t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.beginPath(),t.moveTo(s+d,a),"top"===i&&this.drawCaret(e,t,o,n),t.lineTo(s+l-u,a),t.quadraticCurveTo(s+l,a,s+l,a+u),"center"===i&&"right"===r&&this.drawCaret(e,t,o,n),t.lineTo(s+l,a+c-m),t.quadraticCurveTo(s+l,a+c,s+l-m,a+c),"bottom"===i&&this.drawCaret(e,t,o,n),t.lineTo(s+h,a+c),t.quadraticCurveTo(s,a+c,s,a+c-h),"center"===i&&"left"===r&&this.drawCaret(e,t,o,n),t.lineTo(s,a+d),t.quadraticCurveTo(s,a,s+d,a),t.closePath(),t.fill(),n.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,o=this.$animations,n=o&&o.x,r=o&&o.y;if(n||r){const o=ri[e.position].call(this,this._active,this._eventPosition);if(!o)return;const i=this._size=li(this,e),s=Object.assign({},o,this._size),a=di(t,e,s),l=ui(e,s,a,t);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=i.width,this.height=i.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(t);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const i=_t(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(e.save(),e.globalAlpha=o,this.drawBackground(r,e,n,t),mo(e,t.textDirection),r.y+=i.top,this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),po(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const o=this._active,n=e.map((({datasetIndex:e,index:t})=>{const o=this.chart.getDatasetMeta(e);if(!o)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:o.data[t],index:t}})),r=!p(o,n),i=this._positionChanged(n,t);(r||i)&&(this._active=n,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,o=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,r=this._active||[],i=this._getActiveElements(e,r,t,o),s=this._positionChanged(i,e),a=t||!p(i,r)||s;return a&&(this._active=i,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,o,n){const r=this.options;if("mouseout"===e.type)return[];if(!n)return t;const i=this.chart.getElementsAtEventForMode(e,r.mode,r,o);return r.reverse&&i.reverse(),i}_positionChanged(e,t){const{caretX:o,caretY:n,options:r}=this,i=ri[r.position].call(this,e,t);return!1!==i&&(o!==i.x||n!==i.y)}}gi.positioners=ri;var fi={id:"tooltip",_element:gi,positioners:ri,afterInit(e,t,o){o&&(e.tooltip=new gi({chart:e,options:o}))},beforeUpdate(e,t,o){e.tooltip&&e.tooltip.initialize(o)},reset(e,t,o){e.tooltip&&e.tooltip.initialize(o)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const o={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",o))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",o)}},afterEvent(e,t){if(e.tooltip){const o=t.replay;e.tooltip.handleEvent(t.event,o,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:n,title(e){if(e.length>0){const t=e[0],o=t.chart.data.labels,n=o?o.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return o[t.dataIndex]}return""},afterTitle:n,beforeBody:n,beforeLabel:n,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const o=e.formattedValue;return i(o)||(t+=o),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:n,afterBody:n,beforeFooter:n,footer:n,afterFooter:n}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function bi(e,t,o,n){const r=e.indexOf(t);if(-1===r)return((e,t,o,n)=>("string"==typeof t?(o=e.push(t)-1,n.unshift({index:o,label:t})):isNaN(t)&&(o=null),o))(e,t,o,n);return r!==e.lastIndexOf(t)?o:r}class vi extends mn{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:o,label:n}of t)e[o]===n&&e.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(i(e))return null;const o=this.getLabels();return((e,t)=>null===e?null:Y(Math.round(e),0,t))(t=isFinite(t)&&o[t]===e?t:bi(o,e,d(t,e),this._addedLabels),o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:o,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(o=0),t||(n=this.getLabels().length-1)),this.min=o,this.max=n}buildTicks(){const e=this.min,t=this.max,o=this.options.offset,n=[];let r=this.getLabels();r=0===e&&t===r.length-1?r:r.slice(e,t+1),this._valueRange=Math.max(r.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let o=e;o<=t;o++)n.push({value:o});return n}getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function yi(e,t){const o=[],{bounds:n,step:r,min:s,max:a,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:h}=e,m=r||1,p=d-1,{min:g,max:f}=t,b=!i(s),v=!i(a),y=!i(c),x=(f-g)/(u+1);let w,_,S,C,k=B((f-g)/p/m)*m;if(k<1e-14&&!b&&!v)return[{value:g},{value:f}];C=Math.ceil(f/k)-Math.floor(g/k),C>p&&(k=B(C*k/p/m)*m),i(l)||(w=Math.pow(10,l),k=Math.ceil(k*w)/w),"ticks"===n?(_=Math.floor(g/k)*k,S=Math.ceil(f/k)*k):(_=g,S=f),b&&v&&r&&function(e,t){const o=Math.round(e);return o-t<=e&&o+t>=e}((a-s)/r,k/1e3)?(C=Math.round(Math.min((a-s)/k,d)),k=(a-s)/C,_=s,S=a):y?(_=b?s:_,S=v?a:S,C=c-1,k=(S-_)/C):(C=(S-_)/k,C=F(C,Math.round(C),k/1e3)?Math.round(C):Math.ceil(C));const E=Math.max(U(k),U(_));w=Math.pow(10,i(l)?E:l),_=Math.round(_*w)/w,S=Math.round(S*w)/w;let T=0;for(b&&(h&&_!==s?(o.push({value:s}),_<s&&T++,F(Math.round((_+T*k)*w)/w,s,xi(s,x,e))&&T++):_<s&&T++);T<C;++T)o.push({value:Math.round((_+T*k)*w)/w});return v&&h&&S!==a?o.length&&F(o[o.length-1].value,a,xi(a,x,e))?o[o.length-1].value=a:o.push({value:a}):v&&S!==a||o.push({value:S}),o}function xi(e,t,{horizontal:o,minRotation:n}){const r=j(n),i=(o?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+e).length;return Math.min(t/i,s)}vi.id="category",vi.defaults={ticks:{callback:vi.prototype.getLabelForValue}};class wi extends mn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return i(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:o}=this.getUserBounds();let{min:n,max:r}=this;const i=e=>n=t?n:e,s=e=>r=o?r:e;if(e){const e=I(n),t=I(r);e<0&&t<0?s(0):e>0&&t>0&&i(0)}if(n===r){let t=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(t=Math.abs(.05*r)),s(r+t),e||i(n-t)}this.min=n,this.max=r}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:o,stepSize:n}=e;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),o=o||11),o&&(t=Math.min(o,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const n=yi({maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&H(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const e=this.ticks;let t=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const n=(o-t)/Math.max(e.length-1,1)/2;t-=n,o+=n}this._startValue=t,this._endValue=o,this._valueRange=o-t}getLabelForValue(e){return uo(e,this.chart.options.locale,this.options.ticks.format)}}class _i extends wi{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=l(e)?e:0,this.max=l(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,o=j(this.options.ticks.minRotation),n=(e?Math.sin(o):Math.cos(o))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,r.lineHeight/n))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}function Si(e){return 1===e/Math.pow(10,Math.floor(N(e)))}_i.id="linear",_i.defaults={ticks:{callback:nn.formatters.numeric}};class Ci extends mn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const o=wi.prototype.parse.apply(this,[e,t]);if(0!==o)return l(o)&&o>0?o:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=l(e)?Math.max(0,e):null,this.max=l(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let o=this.min,n=this.max;const r=t=>o=e?o:t,i=e=>n=t?n:e,s=(e,t)=>Math.pow(10,Math.floor(N(e))+t);o===n&&(o<=0?(r(1),i(10)):(r(s(o,-1)),i(s(n,1)))),o<=0&&r(s(n,-1)),n<=0&&i(s(o,1)),this._zero&&this.min!==this._suggestedMin&&o===s(this.min,0)&&r(s(o,-1)),this.min=o,this.max=n}buildTicks(){const e=this.options,t=function(e,t){const o=Math.floor(N(t.max)),n=Math.ceil(t.max/Math.pow(10,o)),r=[];let i=c(e.min,Math.pow(10,Math.floor(N(t.min)))),s=Math.floor(N(i)),a=Math.floor(i/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:i,major:Si(i)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),i=Math.round(a*Math.pow(10,s)*l)/l}while(s<o||s===o&&a<n);const d=c(e.max,i);return r.push({value:d,major:Si(i)}),r}({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&H(t,this,"value"),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return void 0===e?"0":uo(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=N(e),this._valueRange=N(this.max)-N(e)}getPixelForValue(e){return void 0!==e&&0!==e||(e=this.min),null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(N(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function ki(e){const t=e.ticks;if(t.display&&e.display){const e=_t(t.backdropPadding);return d(t.font&&t.font.size,et.font.size)+e.height}return 0}function Ei(e,t,o,n,r){return e===n||e===r?{start:t-o/2,end:t+o/2}:e<n||e>r?{start:t-o,end:t}:{start:t,end:t+o}}function Ti(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},o=Object.assign({},t),n=[],r=[],i=e._pointLabels.length,a=e.options.pointLabels,l=a.centerPointLabels?T/i:0;for(let h=0;h<i;h++){const i=a.setContext(e.getPointLabelContext(h));r[h]=i.padding;const m=e.getPointPosition(h,e.drawingArea+r[h],l),p=St(i.font),g=(c=e.ctx,d=p,u=s(u=e._pointLabels[h])?u:[u],{w:ot(c,d.string,u),h:u.length*d.lineHeight});n[h]=g;const f=q(e.getIndexAngle(h)+l),b=Math.round(V(f));Oi(o,t,f,Ei(b,m.x,g.w,0,180),Ei(b,m.y,g.h,90,270))}var c,d,u;e.setCenterPoint(t.l-o.l,o.r-t.r,t.t-o.t,o.b-t.b),e._pointLabelItems=function(e,t,o){const n=[],r=e._pointLabels.length,i=e.options,s=ki(i)/2,a=e.drawingArea,l=i.pointLabels.centerPointLabels?T/r:0;for(let i=0;i<r;i++){const r=e.getPointPosition(i,a+s+o[i],l),c=Math.round(V(q(r.angle+D))),d=t[i],u=Pi(r.y,d.h,c),h=Ai(c),m=Mi(r.x,d.w,h);n.push({x:r.x,y:u,textAlign:h,left:m,top:u,right:m+d.w,bottom:u+d.h})}return n}(e,n,r)}function Oi(e,t,o,n,r){const i=Math.abs(Math.sin(o)),s=Math.abs(Math.cos(o));let a=0,l=0;n.start<t.l?(a=(t.l-n.start)/i,e.l=Math.min(e.l,t.l-a)):n.end>t.r&&(a=(n.end-t.r)/i,e.r=Math.max(e.r,t.r+a)),r.start<t.t?(l=(t.t-r.start)/s,e.t=Math.min(e.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function Ai(e){return 0===e||180===e?"center":e<180?"left":"right"}function Mi(e,t,o){return"right"===o?e-=t:"center"===o&&(e-=t/2),e}function Pi(e,t,o){return 90===o||270===o?e-=t/2:(o>270||o<90)&&(e-=t),e}function Di(e,t,o,n){const{ctx:r}=e;if(o)r.arc(e.xCenter,e.yCenter,t,0,O);else{let o=e.getPointPosition(0,t);r.moveTo(o.x,o.y);for(let i=1;i<n;i++)o=e.getPointPosition(i,t),r.lineTo(o.x,o.y)}}Ci.id="logarithmic",Ci.defaults={ticks:{callback:nn.formatters.logarithmic,major:{enabled:!0}}};class Li extends wi{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=_t(ki(this.options)/2),t=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(t,o)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=l(e)&&!isNaN(e)?e:0,this.max=l(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ki(this.options))}generateTickLabels(e){wi.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map(((e,t)=>{const o=h(this.options.pointLabels.callback,[e,t],this);return o||0===o?o:""})).filter(((e,t)=>this.chart.getDataVisibility(t)))}fit(){const e=this.options;e.display&&e.pointLabels.display?Ti(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,o,n){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((o-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,o,n))}getIndexAngle(e){return q(e*(O/(this._pointLabels.length||1))+j(this.options.startAngle||0))}getDistanceFromCenterForValue(e){if(i(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(i(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const o=t[e];return function(e,t,o){return kt(e,{label:o,index:t,type:"pointLabel"})}(this.getContext(),e,o)}}getPointPosition(e,t,o=0){const n=this.getIndexAngle(e)-D+o;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter,angle:n}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:o,right:n,bottom:r}=this._pointLabelItems[e];return{left:t,top:o,right:n,bottom:r}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),Di(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:o,grid:n}=t,r=this._pointLabels.length;let s,a,l;if(t.pointLabels.display&&function(e,t){const{ctx:o,options:{pointLabels:n}}=e;for(let r=t-1;r>=0;r--){const t=n.setContext(e.getPointLabelContext(r)),s=St(t.font),{x:a,y:l,textAlign:c,left:d,top:u,right:h,bottom:m}=e._pointLabelItems[r],{backdropColor:p}=t;if(!i(p)){const e=wt(t.borderRadius),n=_t(t.backdropPadding);o.fillStyle=p;const r=d-n.left,i=u-n.top,s=h-d+n.width,a=m-u+n.height;Object.values(e).some((e=>0!==e))?(o.beginPath(),pt(o,{x:r,y:i,w:s,h:a,radius:e}),o.fill()):o.fillRect(r,i,s,a)}ht(o,e._pointLabels[r],a,l+s.lineHeight/2,s,{color:t.color,textAlign:c,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((e,t)=>{if(0!==t){a=this.getDistanceFromCenterForValue(e.value);!function(e,t,o,n){const r=e.ctx,i=t.circular,{color:s,lineWidth:a}=t;!i&&!n||!s||!a||o<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(t.borderDash),r.lineDashOffset=t.borderDashOffset,r.beginPath(),Di(e,o,i,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(t-1)),a,r)}})),o.display){for(e.save(),s=r-1;s>=0;s--){const n=o.setContext(this.getPointLabelContext(s)),{color:r,lineWidth:i}=n;i&&r&&(e.lineWidth=i,e.strokeStyle=r,e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset,a=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(s,a),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,o=t.ticks;if(!o.display)return;const n=this.getIndexAngle(0);let r,i;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(n),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!t.reverse)return;const a=o.setContext(this.getContext(s)),l=St(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){e.font=l.string,i=e.measureText(n.label).width,e.fillStyle=a.backdropColor;const t=_t(a.backdropPadding);e.fillRect(-i/2-t.left,-r-l.size/2-t.top,i+t.width,l.size+t.height)}ht(e,n.label,0,-r,l,{color:a.color})})),e.restore()}drawTitle(){}}Li.id="radialLinear",Li.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:nn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:e=>e,padding:5,centerPointLabels:!1}},Li.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Li.descriptors={angleLines:{_fallback:"grid"}};const Ri={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ni=Object.keys(Ri);function Ii(e,t){return e-t}function Bi(e,t){if(i(t))return null;const o=e._adapter,{parser:n,round:r,isoWeekday:s}=e._parseOpts;let a=t;return"function"==typeof n&&(a=n(a)),l(a)||(a="string"==typeof n?o.parse(a,n):o.parse(a)),null===a?null:(r&&(a="week"!==r||!z(s)&&!0!==s?o.startOf(a,r):o.startOf(a,"isoWeek",s)),+a)}function zi(e,t,o,n){const r=Ni.length;for(let i=Ni.indexOf(e);i<r-1;++i){const e=Ri[Ni[i]],r=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((o-t)/(r*e.size))<=n)return Ni[i]}return Ni[r-1]}function Fi(e,t,o){if(o){if(o.length){const{lo:n,hi:r}=X(o,t);e[o[n]>=t?o[n]:o[r]]=!0}}else e[t]=!0}function Hi(e,t,o){const n=[],r={},i=t.length;let s,a;for(s=0;s<i;++s)a=t[s],r[a]=s,n.push({value:a,major:!1});return 0!==i&&o?function(e,t,o,n){const r=e._adapter,i=+r.startOf(t[0].value,n),s=t[t.length-1].value;let a,l;for(a=i;a<=s;a=+r.add(a,1,n))l=o[a],l>=0&&(t[l].major=!0);return t}(e,n,r,o):n}class ji extends mn{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t){const o=e.time||(e.time={}),n=this._adapter=new yn._date(e.adapters.date);n.init(t),y(o.displayFormats,n.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:Bi(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,o=e.time.unit||"day";let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds();function a(e){i||isNaN(e.min)||(n=Math.min(n,e.min)),s||isNaN(e.max)||(r=Math.max(r,e.max))}i&&s||(a(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||a(this.getMinMax(!1))),n=l(n)&&!isNaN(n)?n:+t.startOf(Date.now(),o),r=l(r)&&!isNaN(r)?r:+t.endOf(Date.now(),o)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],o=e[e.length-1]),{min:t,max:o}}buildTicks(){const e=this.options,t=e.time,o=e.ticks,n="labels"===o.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,i=function(e,t,o){let n=0,r=e.length;for(;n<r&&e[n]<t;)n++;for(;r>n&&e[r-1]>o;)r--;return n>0||r<e.length?e.slice(n,r):e}(n,r,this.max);return this._unit=t.unit||(o.autoSkip?zi(t.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(e,t,o,n,r){for(let i=Ni.length-1;i>=Ni.indexOf(o);i--){const o=Ni[i];if(Ri[o].common&&e._adapter.diff(r,n,o)>=t-1)return o}return Ni[o?Ni.indexOf(o):0]}(this,i.length,t.minUnit,this.min,this.max)),this._majorUnit=o.major.enabled&&"year"!==this._unit?function(e){for(let t=Ni.indexOf(e)+1,o=Ni.length;t<o;++t)if(Ri[Ni[t]].common)return Ni[t]}(this._unit):void 0,this.initOffsets(n),e.reverse&&i.reverse(),Hi(this,i,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((e=>+e.value)))}initOffsets(e){let t,o,n=0,r=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),n=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,o=this.getDecimalForValue(e[e.length-1]),r=1===e.length?o:(o-this.getDecimalForValue(e[e.length-2]))/2);const i=e.length<3?.5:.25;n=Y(n,0,i),r=Y(r,0,i),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,t=this.min,o=this.max,n=this.options,r=n.time,i=r.unit||zi(r.minUnit,t,o,this._getLabelCapacity(t)),s=d(r.stepSize,1),a="week"===i&&r.isoWeekday,l=z(a)||!0===a,c={};let u,h,m=t;if(l&&(m=+e.startOf(m,"isoWeek",a)),m=+e.startOf(m,l?"day":i),e.diff(o,t,i)>1e5*s)throw new Error(t+" and "+o+" are too far apart with stepSize of "+s+" "+i);const p="data"===n.ticks.source&&this.getDataTimestamps();for(u=m,h=0;u<o;u=+e.add(u,s,i),h++)Fi(c,u,p);return u!==o&&"ticks"!==n.bounds&&1!==h||Fi(c,u,p),Object.keys(c).sort(((e,t)=>e-t)).map((e=>+e))}getLabelForValue(e){const t=this._adapter,o=this.options.time;return o.tooltipFormat?t.format(e,o.tooltipFormat):t.format(e,o.displayFormats.datetime)}_tickFormatFunction(e,t,o,n){const r=this.options,i=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&i[s],c=a&&i[a],d=o[t],u=a&&c&&d&&d.major,m=this._adapter.format(e,n||(u?c:l)),p=r.ticks.callback;return p?h(p,[m,t,o],this):m}generateTickLabels(e){let t,o,n;for(t=0,o=e.length;t<o;++t)n=e[t],n.label=this._tickFormatFunction(n.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+o)*t.factor)}getValueForPixel(e){const t=this._offsets,o=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,o=this.ctx.measureText(e).width,n=j(this.isHorizontal()?t.maxRotation:t.minRotation),r=Math.cos(n),i=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:o*r+s*i,h:o*i+s*r}}_getLabelCapacity(e){const t=this.options.time,o=t.displayFormats,n=o[t.unit]||o.millisecond,r=this._tickFormatFunction(e,0,Hi(this,[e],this._majorUnit),n),i=this._getLabelSize(r),s=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return s>0?s:1}getDataTimestamps(){let e,t,o=this._cache.data||[];if(o.length)return o;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,t=n.length;e<t;++e)o=o.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(o)}getLabelTimestamps(){const e=this._cache.labels||[];let t,o;if(e.length)return e;const n=this.getLabels();for(t=0,o=n.length;t<o;++t)e.push(Bi(this,n[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return oe(e.sort(Ii))}}function Vi(e,t,o){let n,r,i,s,a=0,l=e.length-1;o?(t>=e[a].pos&&t<=e[l].pos&&({lo:a,hi:l}=J(e,"pos",t)),({pos:n,time:i}=e[a]),({pos:r,time:s}=e[l])):(t>=e[a].time&&t<=e[l].time&&({lo:a,hi:l}=J(e,"time",t)),({time:n,pos:i}=e[a]),({time:r,pos:s}=e[l]));const c=r-n;return c?i+(s-i)*(t-n)/c:i}ji.id="time",ji.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Ui extends ji{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Vi(t,this.min),this._tableRange=Vi(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:o}=this,n=[],r=[];let i,s,a,l,c;for(i=0,s=e.length;i<s;++i)l=e[i],l>=t&&l<=o&&n.push(l);if(n.length<2)return[{time:t,pos:0},{time:o,pos:1}];for(i=0,s=n.length;i<s;++i)c=n[i+1],a=n[i-1],l=n[i],Math.round((c+a)/2)!==l&&r.push({time:l,pos:i/(s-1)});return r}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),o=this.getLabelTimestamps();return e=t.length&&o.length?this.normalize(t.concat(o)):t.length?t:o,e=this._cache.all=e,e}getDecimalForValue(e){return(Vi(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,o=this.getDecimalForPixel(e)/t.factor-t.end;return Vi(this._table,o*this._tableRange+this._minPos,!0)}}Ui.id="timeseries",Ui.defaults=ji.defaults},20247:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=function e(){var t=[].slice.call(arguments),o=!1;"boolean"==typeof t[0]&&(o=t.shift());var n=t[0];if(r(n))throw new Error("extendee must be an object");for(var i=t.slice(1),s=i.length,a=0;a<s;a++){var l=i[a];for(var c in l)if(Object.prototype.hasOwnProperty.call(l,c)){var d=l[c];if(o&&(h=d,Array.isArray(h)||"[object Object]"=={}.toString.call(h))){var u=Array.isArray(d)?[]:{};n[c]=e(!0,Object.prototype.hasOwnProperty.call(n,c)&&!r(n[c])?n[c]:u,d)}else n[c]=d}}var h;return n};function r(e){return!e||"object"!=typeof e&&"function"!=typeof e}function i(e){return e&&e.__esModule?e.default:e}class s{on(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}emit(e,...t){this._callbacks=this._callbacks||{};let o=this._callbacks[e];if(o)for(let e of o)e.apply(this,t);return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+e,{args:t})),this}makeEvent(e,t){let o={bubbles:!0,cancelable:!0,detail:t};if("function"==typeof window.CustomEvent)return new CustomEvent(e,o);var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,o.bubbles,o.cancelable,o.detail),n}off(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;let o=this._callbacks[e];if(!o)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(let e=0;e<o.length;e++){if(o[e]===t){o.splice(e,1);break}}return this}}var a={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2097152,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,defaultHeaders:!0,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init(){},params(e,t,o){if(o)return{dzuuid:o.file.upload.uuid,dzchunkindex:o.index,dztotalfilesize:o.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:o.file.upload.totalChunkCount,dzchunkbyteoffset:o.index*this.options.chunkSize}},accept:(e,t)=>t(),chunksUploaded:function(e,t){t()},binaryBody:!1,fallback(){let e;this.element.className=`${this.element.className} dz-browser-not-supported`;for(let t of this.element.getElementsByTagName("div"))if(/(^| )dz-message($| )/.test(t.className)){e=t,t.className="dz-message";break}e||(e=l.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e));let t=e.getElementsByTagName("span")[0];return t&&(null!=t.textContent?t.textContent=this.options.dictFallbackMessage:null!=t.innerText&&(t.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(e,t,o,n){let r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},i=e.width/e.height;null==t&&null==o?(t=r.srcWidth,o=r.srcHeight):null==t?t=o*i:null==o&&(o=t/i);let s=(t=Math.min(t,r.srcWidth))/(o=Math.min(o,r.srcHeight));if(r.srcWidth>t||r.srcHeight>o)if("crop"===n)i>s?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*s):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/s);else{if("contain"!==n)throw new Error(`Unknown resizeMethod '${n}'`);i>s?o=t/i:t=o*i}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=o,r},transformFile(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:i('<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail=""></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size=""></span></div>\n    <div class="dz-filename"><span data-dz-name=""></span></div>\n  </div>\n  <div class="dz-progress">\n    <span class="dz-upload" data-dz-uploadprogress=""></span>\n  </div>\n  <div class="dz-error-message"><span data-dz-errormessage=""></span></div>\n  <div class="dz-success-mark">\n    <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">\n      <path d="M10.2071 29.7929L14.2929 25.7071C14.6834 25.3166 15.3166 25.3166 15.7071 25.7071L21.2929 31.2929C21.6834 31.6834 22.3166 31.6834 22.7071 31.2929L38.2929 15.7071C38.6834 15.3166 39.3166 15.3166 39.7071 15.7071L43.7929 19.7929C44.1834 20.1834 44.1834 20.8166 43.7929 21.2071L22.7071 42.2929C22.3166 42.6834 21.6834 42.6834 21.2929 42.2929L10.2071 31.2071C9.81658 30.8166 9.81658 30.1834 10.2071 29.7929Z"></path>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg">\n      <path d="M26.2929 20.2929L19.2071 13.2071C18.8166 12.8166 18.1834 12.8166 17.7929 13.2071L13.2071 17.7929C12.8166 18.1834 12.8166 18.8166 13.2071 19.2071L20.2929 26.2929C20.6834 26.6834 20.6834 27.3166 20.2929 27.7071L13.2071 34.7929C12.8166 35.1834 12.8166 35.8166 13.2071 36.2071L17.7929 40.7929C18.1834 41.1834 18.8166 41.1834 19.2071 40.7929L26.2929 33.7071C26.6834 33.3166 27.3166 33.3166 27.7071 33.7071L34.7929 40.7929C35.1834 41.1834 35.8166 41.1834 36.2071 40.7929L40.7929 36.2071C41.1834 35.8166 41.1834 35.1834 40.7929 34.7929L33.7071 27.7071C33.3166 27.3166 33.3166 26.6834 33.7071 26.2929L40.7929 19.2071C41.1834 18.8166 41.1834 18.1834 40.7929 17.7929L36.2071 13.2071C35.8166 12.8166 35.1834 12.8166 34.7929 13.2071L27.7071 20.2929C27.3166 20.6834 26.6834 20.6834 26.2929 20.2929Z"></path>\n    </svg>\n  </div>\n</div>\n'),drop(e){return this.element.classList.remove("dz-drag-hover")},dragstart(e){},dragend(e){return this.element.classList.remove("dz-drag-hover")},dragenter(e){return this.element.classList.add("dz-drag-hover")},dragover(e){return this.element.classList.add("dz-drag-hover")},dragleave(e){return this.element.classList.remove("dz-drag-hover")},paste(e){},reset(){return this.element.classList.remove("dz-started")},addedfile(e){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){for(var t of(e.previewElement=l.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),e.previewElement.querySelectorAll("[data-dz-name]")))t.textContent=e.name;for(t of e.previewElement.querySelectorAll("[data-dz-size]"))t.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=l.createElement(`<a class="dz-remove" href="javascript:undefined;" data-dz-remove>${this.options.dictRemoveFile}</a>`),e.previewElement.appendChild(e._removeLink));let o=t=>(t.preventDefault(),t.stopPropagation(),e.status===l.UPLOADING?l.confirm(this.options.dictCancelUploadConfirmation,(()=>this.removeFile(e))):this.options.dictRemoveFileConfirmation?l.confirm(this.options.dictRemoveFileConfirmation,(()=>this.removeFile(e))):this.removeFile(e));for(let t of e.previewElement.querySelectorAll("[data-dz-remove]"))t.addEventListener("click",o)}},removedfile(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(let o of e.previewElement.querySelectorAll("[data-dz-thumbnail]"))o.alt=e.name,o.src=t;return setTimeout((()=>e.previewElement.classList.add("dz-image-preview")),1)}},error(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"string"!=typeof t&&t.error&&(t=t.error);for(let o of e.previewElement.querySelectorAll("[data-dz-errormessage]"))o.textContent=t}},errormultiple(){},processing(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(e,t,o){if(e.previewElement)for(let o of e.previewElement.querySelectorAll("[data-dz-uploadprogress]"))"PROGRESS"===o.nodeName?o.value=t:o.style.width=`${t}%`},totaluploadprogress(){},sending(){},sendingmultiple(){},success(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple(){},canceled(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple(){},complete(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){}};class l extends s{static initClass(){this.prototype.Emitter=s,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}getAcceptedFiles(){return this.files.filter((e=>e.accepted)).map((e=>e))}getRejectedFiles(){return this.files.filter((e=>!e.accepted)).map((e=>e))}getFilesWithStatus(e){return this.files.filter((t=>t.status===e)).map((e=>e))}getQueuedFiles(){return this.getFilesWithStatus(l.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(l.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(l.ADDED)}getActiveFiles(){return this.files.filter((e=>e.status===l.UPLOADING||e.status===l.QUEUED)).map((e=>e))}init(){if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(l.createElement(`<div class="dz-default dz-message"><button class="dz-button" type="button">${this.options.dictDefaultMessage}</button></div>`)),this.clickableElements.length){let e=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),(null===this.options.maxFiles||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",null!==this.options.acceptedFiles&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),null!==this.options.capture&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",l.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",(()=>{let{files:t}=this.hiddenFileInput;if(t.length)for(let e of t)this.addFile(e);this.emit("addedfiles",t),e()}))};e()}this.URL=null!==window.URL?window.URL:window.webkitURL;for(let e of this.events)this.on(e,this.options[e]);this.on("uploadprogress",(()=>this.updateTotalUploadProgress())),this.on("removedfile",(()=>this.updateTotalUploadProgress())),this.on("canceled",(e=>this.emit("complete",e))),this.on("complete",(e=>{if(0===this.getAddedFiles().length&&0===this.getUploadingFiles().length&&0===this.getQueuedFiles().length)return setTimeout((()=>this.emit("queuecomplete")),0)}));let e=function(e){if(function(e){if(e.dataTransfer.types)for(var t=0;t<e.dataTransfer.types.length;t++)if("Files"===e.dataTransfer.types[t])return!0;return!1}(e))return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:e=>this.emit("dragstart",e),dragenter:t=>(e(t),this.emit("dragenter",t)),dragover:t=>{let o;try{o=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===o||"linkMove"===o?"move":"copy",e(t),this.emit("dragover",t)},dragleave:e=>this.emit("dragleave",e),drop:t=>(e(t),this.drop(t)),dragend:e=>this.emit("dragend",e)}}],this.clickableElements.forEach((e=>this.listeners.push({element:e,events:{click:t=>((e!==this.element||t.target===this.element||l.elementInside(t.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}}))),this.enable(),this.options.init.call(this)}destroy(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,l.instances.splice(l.instances.indexOf(this),1)}updateTotalUploadProgress(){let e,t=0,o=0;if(this.getActiveFiles().length){for(let e of this.getActiveFiles())t+=e.upload.bytesSent,o+=e.upload.total;e=100*t/o}else e=100;return this.emit("totaluploadprogress",e,o,t)}_getParamName(e){return"function"==typeof this.options.paramName?this.options.paramName(e):`${this.options.paramName}${this.options.uploadMultiple?`[${e}]`:""}`}_renameFile(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}getFallbackForm(){let e,t;if(e=this.getExistingFallback())return e;let o='<div class="dz-fallback">';this.options.dictFallbackText&&(o+=`<p>${this.options.dictFallbackText}</p>`),o+=`<input type="file" name="${this._getParamName(0)}" ${this.options.uploadMultiple?'multiple="multiple"':void 0} /><input type="submit" value="Upload!"></div>`;let n=l.createElement(o);return"FORM"!==this.element.tagName?(t=l.createElement(`<form action="${this.options.url}" enctype="multipart/form-data" method="${this.options.method}"></form>`),t.appendChild(n)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:n}getExistingFallback(){let e=function(e){for(let t of e)if(/(^| )fallback($| )/.test(t.className))return t};for(let o of["div","form"]){var t;if(t=e(this.element.getElementsByTagName(o)))return t}}setupEventListeners(){return this.listeners.map((e=>(()=>{let t=[];for(let o in e.events){let n=e.events[o];t.push(e.element.addEventListener(o,n,!1))}return t})()))}removeEventListeners(){return this.listeners.map((e=>(()=>{let t=[];for(let o in e.events){let n=e.events[o];t.push(e.element.removeEventListener(o,n,!1))}return t})()))}disable(){return this.clickableElements.forEach((e=>e.classList.remove("dz-clickable"))),this.removeEventListeners(),this.disabled=!0,this.files.map((e=>this.cancelUpload(e)))}enable(){return delete this.disabled,this.clickableElements.forEach((e=>e.classList.add("dz-clickable"))),this.setupEventListeners()}filesize(e){let t=0,o="b";if(e>0){let n=["tb","gb","mb","kb","b"];for(let r=0;r<n.length;r++){let i=n[r];if(e>=Math.pow(this.options.filesizeBase,4-r)/10){t=e/Math.pow(this.options.filesizeBase,4-r),o=i;break}}t=Math.round(10*t)/10}return`<strong>${t}</strong> ${this.options.dictFileSizeUnits[o]}`}_updateMaxFilesReachedClass(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}drop(e){if(!e.dataTransfer)return;this.emit("drop",e);let t=[];for(let o=0;o<e.dataTransfer.files.length;o++)t[o]=e.dataTransfer.files[o];if(t.length){let{items:o}=e.dataTransfer;o&&o.length&&null!=o[0].webkitGetAsEntry?this._addFilesFromItems(o):this.handleFiles(t)}this.emit("addedfiles",t)}paste(e){if(null==(t=null!=e?e.clipboardData:void 0,o=e=>e.items,null!=t?o(t):void 0))return;var t,o;this.emit("paste",e);let{items:n}=e.clipboardData;return n.length?this._addFilesFromItems(n):void 0}handleFiles(e){for(let t of e)this.addFile(t)}_addFilesFromItems(e){return(()=>{let t=[];for(let n of e){var o;null!=n.webkitGetAsEntry&&(o=n.webkitGetAsEntry())?o.isFile?t.push(this.addFile(n.getAsFile())):o.isDirectory?t.push(this._addFilesFromDirectory(o,o.name)):t.push(void 0):null!=n.getAsFile&&(null==n.kind||"file"===n.kind)?t.push(this.addFile(n.getAsFile())):t.push(void 0)}return t})()}_addFilesFromDirectory(e,t){let o=e.createReader(),n=e=>{return t=console,o="log",n=t=>t.log(e),null!=t&&"function"==typeof t[o]?n(t,o):void 0;var t,o,n};var r=()=>o.readEntries((e=>{if(e.length>0){for(let o of e)o.isFile?o.file((e=>{if(!this.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=`${t}/${e.name}`,this.addFile(e)})):o.isDirectory&&this._addFilesFromDirectory(o,`${t}/${o.name}`);r()}return null}),n);return r()}accept(e,t){this.options.maxFilesize&&e.size>1048576*this.options.maxFilesize?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):l.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}addFile(e){e.upload={uuid:l.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=l.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,(t=>{t?(e.accepted=!1,this._errorProcessing([e],t)):(e.accepted=!0,this.options.autoQueue&&this.enqueueFile(e)),this._updateMaxFilesReachedClass()}))}enqueueFiles(e){for(let t of e)this.enqueueFile(t);return null}enqueueFile(e){if(e.status!==l.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=l.QUEUED,this.options.autoProcessQueue)return setTimeout((()=>this.processQueue()),0)}_enqueueThumbnail(e){if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1048576*this.options.maxThumbnailFilesize)return this._thumbnailQueue.push(e),setTimeout((()=>this._processThumbnailQueue()),0)}_processThumbnailQueue(){if(this._processingThumbnail||0===this._thumbnailQueue.length)return;this._processingThumbnail=!0;let e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(t=>(this.emit("thumbnail",e,t),this._processingThumbnail=!1,this._processThumbnailQueue())))}removeFile(e){if(e.status===l.UPLOADING&&this.cancelUpload(e),this.files=c(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}removeAllFiles(e){null==e&&(e=!1);for(let t of this.files.slice())(t.status!==l.UPLOADING||e)&&this.removeFile(t);return null}resizeImage(e,t,o,n,r){return this.createThumbnail(e,t,o,n,!0,((t,o)=>{if(null==o)return r(e);{let{resizeMimeType:t}=this.options;null==t&&(t=e.type);let n=o.toDataURL(t,this.options.resizeQuality);return"image/jpeg"!==t&&"image/jpg"!==t||(n=h.restore(e.dataURL,n)),r(l.dataURItoBlob(n))}}))}createThumbnail(e,t,o,n,r,i){let s=new FileReader;s.onload=()=>{e.dataURL=s.result,"image/svg+xml"!==e.type?this.createThumbnailFromUrl(e,t,o,n,r,i):null!=i&&i(s.result)},s.readAsDataURL(e)}displayExistingFile(e,t,o,n,r=!0){if(this.emit("addedfile",e),this.emit("complete",e),r){let r=t=>{this.emit("thumbnail",e,t),o&&o()};e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,r,n)}else this.emit("thumbnail",e,t),o&&o()}createThumbnailFromUrl(e,t,o,n,r,i,s){let a=document.createElement("img");return s&&(a.crossOrigin=s),r="from-image"!=getComputedStyle(document.body).imageOrientation&&r,a.onload=()=>{let s=e=>e(1);return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(s=e=>EXIF.getData(a,(function(){return e(EXIF.getTag(this,"Orientation"))}))),s((r=>{e.width=a.width,e.height=a.height;let s=this.options.resize.call(this,e,t,o,n),l=document.createElement("canvas"),c=l.getContext("2d");switch(l.width=s.trgWidth,l.height=s.trgHeight,r>4&&(l.width=s.trgHeight,l.height=s.trgWidth),r){case 2:c.translate(l.width,0),c.scale(-1,1);break;case 3:c.translate(l.width,l.height),c.rotate(Math.PI);break;case 4:c.translate(0,l.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-l.width);break;case 7:c.rotate(.5*Math.PI),c.translate(l.height,-l.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-l.height,0)}u(c,a,null!=s.srcX?s.srcX:0,null!=s.srcY?s.srcY:0,s.srcWidth,s.srcHeight,null!=s.trgX?s.trgX:0,null!=s.trgY?s.trgY:0,s.trgWidth,s.trgHeight);let d=l.toDataURL("image/png");if(null!=i)return i(d,l)}))},null!=i&&(a.onerror=i),a.src=e.dataURL}processQueue(){let{parallelUploads:e}=this.options,t=this.getUploadingFiles().length,o=t;if(t>=e)return;let n=this.getQueuedFiles();if(n.length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,e-t));for(;o<e;){if(!n.length)return;this.processFile(n.shift()),o++}}}processFile(e){return this.processFiles([e])}processFiles(e){for(let t of e)t.processing=!0,t.status=l.UPLOADING,this.emit("processing",t);return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}_getFilesWithXhr(e){return this.files.filter((t=>t.xhr===e)).map((e=>e))}cancelUpload(e){if(e.status===l.UPLOADING){let t=this._getFilesWithXhr(e.xhr);for(let e of t)e.status=l.CANCELED;void 0!==e.xhr&&e.xhr.abort();for(let e of t)this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",t)}else e.status!==l.ADDED&&e.status!==l.QUEUED||(e.status=l.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(e,...t){return"function"==typeof e?e.apply(this,t):e}uploadFile(e){return this.uploadFiles([e])}uploadFiles(e){this._transformFiles(e,(t=>{if(this.options.chunking){let o=t[0];e[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||o.size>this.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(o.size/this.options.chunkSize)}if(e[0].upload.chunked){let o=e[0],n=t[0],r=0;o.upload.chunks=[];let i=()=>{let t=0;for(;void 0!==o.upload.chunks[t];)t++;if(t>=o.upload.totalChunkCount)return;r++;let i=t*this.options.chunkSize,s=Math.min(i+this.options.chunkSize,n.size),a={name:this._getParamName(0),data:n.webkitSlice?n.webkitSlice(i,s):n.slice(i,s),filename:o.upload.filename,chunkIndex:t};o.upload.chunks[t]={file:o,index:t,dataBlock:a,status:l.UPLOADING,progress:0,retries:0},this._uploadData(e,[a])};if(o.upload.finishedChunkUpload=(t,n)=>{let r=!0;t.status=l.SUCCESS,t.dataBlock=null,t.response=t.xhr.responseText,t.responseHeaders=t.xhr.getAllResponseHeaders(),t.xhr=null;for(let e=0;e<o.upload.totalChunkCount;e++){if(void 0===o.upload.chunks[e])return i();o.upload.chunks[e].status!==l.SUCCESS&&(r=!1)}r&&this.options.chunksUploaded(o,(()=>{this._finished(e,n,null)}))},this.options.parallelChunkUploads)for(let e=0;e<o.upload.totalChunkCount;e++)i();else i()}else{let o=[];for(let n=0;n<e.length;n++)o[n]={name:this._getParamName(n),data:t[n],filename:e[n].upload.filename};this._uploadData(e,o)}}))}_getChunk(e,t){for(let o=0;o<e.upload.totalChunkCount;o++)if(void 0!==e.upload.chunks[o]&&e.upload.chunks[o].xhr===t)return e.upload.chunks[o]}_uploadData(e,t){let o=new XMLHttpRequest;for(let t of e)t.xhr=o;e[0].upload.chunked&&(e[0].upload.chunks[t[0].chunkIndex].xhr=o);let r=this.resolveOption(this.options.method,e,t),i=this.resolveOption(this.options.url,e,t);o.open(r,i,!0),this.resolveOption(this.options.timeout,e)&&(o.timeout=this.resolveOption(this.options.timeout,e)),o.withCredentials=!!this.options.withCredentials,o.onload=t=>{this._finishedUploading(e,o,t)},o.ontimeout=()=>{this._handleUploadError(e,o,`Request timedout after ${this.options.timeout/1e3} seconds`)},o.onerror=()=>{this._handleUploadError(e,o)},(null!=o.upload?o.upload:o).onprogress=t=>this._updateFilesUploadProgress(e,o,t);let s=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};this.options.binaryBody&&(s["Content-Type"]=e[0].type),this.options.headers&&n(s,this.options.headers);for(let e in s){let t=s[e];t&&o.setRequestHeader(e,t)}if(this.options.binaryBody){for(let t of e)this.emit("sending",t,o);this.options.uploadMultiple&&this.emit("sendingmultiple",e,o),this.submitRequest(o,null,e)}else{let n=new FormData;if(this.options.params){let t=this.options.params;"function"==typeof t&&(t=t.call(this,e,o,e[0].upload.chunked?this._getChunk(e[0],o):null));for(let e in t){let o=t[e];if(Array.isArray(o))for(let t=0;t<o.length;t++)n.append(e,o[t]);else n.append(e,o)}}for(let t of e)this.emit("sending",t,o,n);this.options.uploadMultiple&&this.emit("sendingmultiple",e,o,n),this._addFormElementData(n);for(let e=0;e<t.length;e++){let o=t[e];n.append(o.name,o.data,o.filename)}this.submitRequest(o,n,e)}}_transformFiles(e,t){let o=[],n=0;for(let r=0;r<e.length;r++)this.options.transformFile.call(this,e[r],(i=>{o[r]=i,++n===e.length&&t(o)}))}_addFormElementData(e){if("FORM"===this.element.tagName)for(let t of this.element.querySelectorAll("input, textarea, select, button")){let o=t.getAttribute("name"),n=t.getAttribute("type");if(n&&(n=n.toLowerCase()),null!=o)if("SELECT"===t.tagName&&t.hasAttribute("multiple"))for(let n of t.options)n.selected&&e.append(o,n.value);else(!n||"checkbox"!==n&&"radio"!==n||t.checked)&&e.append(o,t.value)}}_updateFilesUploadProgress(e,t,o){if(e[0].upload.chunked){let n=e[0],r=this._getChunk(n,t);o?(r.progress=100*o.loaded/o.total,r.total=o.total,r.bytesSent=o.loaded):(r.progress=100,r.bytesSent=r.total),n.upload.progress=0,n.upload.total=0,n.upload.bytesSent=0;for(let e=0;e<n.upload.totalChunkCount;e++)n.upload.chunks[e]&&void 0!==n.upload.chunks[e].progress&&(n.upload.progress+=n.upload.chunks[e].progress,n.upload.total+=n.upload.chunks[e].total,n.upload.bytesSent+=n.upload.chunks[e].bytesSent);n.upload.progress=n.upload.progress/n.upload.totalChunkCount,this.emit("uploadprogress",n,n.upload.progress,n.upload.bytesSent)}else for(let t of e)t.upload.total&&t.upload.bytesSent&&t.upload.bytesSent==t.upload.total||(o?(t.upload.progress=100*o.loaded/o.total,t.upload.total=o.total,t.upload.bytesSent=o.loaded):(t.upload.progress=100,t.upload.bytesSent=t.upload.total),this.emit("uploadprogress",t,t.upload.progress,t.upload.bytesSent))}_finishedUploading(e,t,o){let n;if(e[0].status!==l.CANCELED&&4===t.readyState){if("arraybuffer"!==t.responseType&&"blob"!==t.responseType&&(n=t.responseText,t.getResponseHeader("content-type")&&~t.getResponseHeader("content-type").indexOf("application/json")))try{n=JSON.parse(n)}catch(e){o=e,n="Invalid JSON response from server."}this._updateFilesUploadProgress(e,t),200<=t.status&&t.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],t),n):this._finished(e,n,o):this._handleUploadError(e,t,n)}}_handleUploadError(e,t,o){if(e[0].status!==l.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){let o=this._getChunk(e[0],t);if(o.retries++<this.options.retryChunksLimit)return void this._uploadData(e,[o.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(e,o||this.options.dictResponseError.replace("{{statusCode}}",t.status),t)}}submitRequest(e,t,o){if(1==e.readyState)if(this.options.binaryBody)if(o[0].upload.chunked){const t=this._getChunk(o[0],e);e.send(t.dataBlock.data)}else e.send(o[0]);else e.send(t);else console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.")}_finished(e,t,o){for(let n of e)n.status=l.SUCCESS,this.emit("success",n,t,o),this.emit("complete",n);if(this.options.uploadMultiple&&(this.emit("successmultiple",e,t,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}_errorProcessing(e,t,o){for(let n of e)n.status=l.ERROR,this.emit("error",n,t,o),this.emit("complete",n);if(this.options.uploadMultiple&&(this.emit("errormultiple",e,t,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}static uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}constructor(e,t){let o,r;if(super(),this.element=e,this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");l.instances.push(this),this.element.dropzone=this;let i=null!=(r=l.optionsForElement(this.element))?r:{};if(this.options=n(!0,{},a,i,null!=t?t:{}),this.options.previewTemplate=this.options.previewTemplate.replace(/\n*/g,""),this.options.forceFallback||!l.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(this.options.uploadMultiple&&this.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");if(this.options.binaryBody&&this.options.uploadMultiple)throw new Error("You cannot set both: binaryBody and uploadMultiple.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),null!=this.options.renameFilename&&(this.options.renameFile=e=>this.options.renameFilename.call(this,e.name,e)),"string"==typeof this.options.method&&(this.options.method=this.options.method.toUpperCase()),(o=this.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=l.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=l.getElements(this.options.clickable,"clickable")),this.init()}}l.initClass(),l.options={},l.optionsForElement=function(e){return e.getAttribute("id")?l.options[d(e.getAttribute("id"))]:void 0},l.instances=[],l.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},l.discover=function(){let e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];let t=t=>(()=>{let o=[];for(let n of t)/(^| )dropzone($| )/.test(n.className)?o.push(e.push(n)):o.push(void 0);return o})();t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return(()=>{let t=[];for(let o of e)!1!==l.optionsForElement(o)?t.push(new l(o)):t.push(void 0);return t})()},l.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],l.isBrowserSupported=function(){let e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){void 0!==l.blacklistedBrowsers&&(l.blockedBrowsers=l.blacklistedBrowsers);for(let t of l.blockedBrowsers)if(t.test(navigator.userAgent)){e=!1;continue}}else e=!1;else e=!1;return e},l.dataURItoBlob=function(e){let t=atob(e.split(",")[1]),o=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),r=new Uint8Array(n);for(let e=0,o=t.length,n=0<=o;n?e<=o:e>=o;n?e++:e--)r[e]=t.charCodeAt(e);return new Blob([n],{type:o})};const c=(e,t)=>e.filter((e=>e!==t)).map((e=>e)),d=e=>e.replace(/[\-_](\w)/g,(e=>e.charAt(1).toUpperCase()));l.createElement=function(e){let t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},l.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},l.getElement=function(e,t){let o;if("string"==typeof e?o=document.querySelector(e):null!=e.nodeType&&(o=e),null==o)throw new Error(`Invalid \`${t}\` option provided. Please provide a CSS selector or a plain HTML element.`);return o},l.getElements=function(e,t){let o,n;if(e instanceof Array){n=[];try{for(o of e)n.push(this.getElement(o,t))}catch(e){n=null}}else if("string"==typeof e)for(o of(n=[],document.querySelectorAll(e)))n.push(o);else null!=e.nodeType&&(n=[e]);if(null==n||!n.length)throw new Error(`Invalid \`${t}\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);return n},l.confirm=function(e,t,o){return window.confirm(e)?t():null!=o?o():void 0},l.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");let o=e.type,n=o.replace(/\/.*$/,"");for(let r of t)if(r=r.trim(),"."===r.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(r.toLowerCase(),e.name.length-r.length))return!0}else if(/\/\*$/.test(r)){if(n===r.replace(/\/.*$/,""))return!0}else if(o===r)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each((function(){return new l(this,e)}))}),l.ADDED="added",l.QUEUED="queued",l.ACCEPTED=l.QUEUED,l.UPLOADING="uploading",l.PROCESSING=l.UPLOADING,l.CANCELED="canceled",l.ERROR="error",l.SUCCESS="success";var u=function(e,t,o,n,r,i,s,a,l,c){let d=function(e){e.naturalWidth;let t=e.naturalHeight,o=document.createElement("canvas");o.width=1,o.height=t;let n=o.getContext("2d");n.drawImage(e,0,0);let{data:r}=n.getImageData(1,0,1,t),i=0,s=t,a=t;for(;a>i;)0===r[4*(a-1)+3]?s=a:i=a,a=s+i>>1;let l=a/t;return 0===l?1:l}(t);return e.drawImage(t,o,n,r,i,s,a,l,c/d)};class h{static initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}static encode64(e){let t,o,n,r,i,s="",a="",l="",c=0;for(;t=e[c++],o=e[c++],a=e[c++],n=t>>2,r=(3&t)<<4|o>>4,i=(15&o)<<2|a>>6,l=63&a,isNaN(o)?i=l=64:isNaN(a)&&(l=64),s=s+this.KEY_STR.charAt(n)+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(l),t=o=a="",n=r=i=l="",c<e.length;);return s}static restore(e,t){if(!e.match("data:image/jpeg;base64,"))return t;let o=this.decode64(e.replace("data:image/jpeg;base64,","")),n=this.slice2Segments(o),r=this.exifManipulation(t,n);return`data:image/jpeg;base64,${this.encode64(r)}`}static exifManipulation(e,t){let o=this.getExifArray(t),n=this.insertExif(e,o);return new Uint8Array(n)}static getExifArray(e){let t,o=0;for(;o<e.length;){if(t=e[o],255===t[0]&225===t[1])return t;o++}return[]}static insertExif(e,t){let o=e.replace("data:image/jpeg;base64,",""),n=this.decode64(o),r=n.indexOf(255,3),i=n.slice(0,r),s=n.slice(r),a=i;return a=a.concat(t),a=a.concat(s),a}static slice2Segments(e){let t=0,o=[];for(;;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{let n=t+(256*e[t+2]+e[t+3])+2,r=e.slice(t,n);o.push(r),t=n}if(t>e.length)break}return o}static decode64(e){let t,o,n,r,i,s="",a="",l=0,c=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");n=this.KEY_STR.indexOf(e.charAt(l++)),r=this.KEY_STR.indexOf(e.charAt(l++)),i=this.KEY_STR.indexOf(e.charAt(l++)),a=this.KEY_STR.indexOf(e.charAt(l++)),t=n<<2|r>>4,o=(15&r)<<4|i>>2,s=(3&i)<<6|a,c.push(t),64!==i&&c.push(o),64!==a&&c.push(s),t=o=s="",n=r=i=a="",l<e.length;);return c}}h.initClass()},99276:(e,t,o)=>{"use strict";function n(e,t,o){const n=document.createElement(t);return e&&(n.className=e),o&&o.appendChild(n),n}function r(e,t,o){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof o?`${o}px`:o}o.d(t,{Z:()=>y});const i="idle",s="loading",a="loaded",l="error";function c(e,t,o=document){let n=[];if(e instanceof Element)n=[e];else if(e instanceof NodeList||Array.isArray(e))n=Array.from(e);else{const r="string"==typeof e?e:t;r&&(n=Array.from(o.querySelectorAll(r)))}return n}function d(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class u{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class h{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,t,o=100){var n,r,i;this._filters[e]||(this._filters[e]=[]),null===(n=this._filters[e])||void 0===n||n.push({fn:t,priority:o}),null===(r=this._filters[e])||void 0===r||r.sort(((e,t)=>e.priority-t.priority)),null===(i=this.pswp)||void 0===i||i.addFilter(e,t,o)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter((e=>e.fn!==t))),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(e,...t){var o;return null===(o=this._filters[e])||void 0===o||o.forEach((e=>{t[0]=e.fn.apply(this,t)})),t[0]}on(e,t){var o,n;this._listeners[e]||(this._listeners[e]=[]),null===(o=this._listeners[e])||void 0===o||o.push(t),null===(n=this.pswp)||void 0===n||n.on(e,t)}off(e,t){var o;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((e=>t!==e))),null===(o=this.pswp)||void 0===o||o.off(e,t)}dispatch(e,t){var o;if(this.pswp)return this.pswp.dispatch(e,t);const n=new u(e,t);return null===(o=this._listeners[e])||void 0===o||o.forEach((e=>{e.call(this,n)})),n}}class m{constructor(e,t){if(this.element=n("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(r(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(e,t,o){let n=`translate3d(${e}px,${t||0}px,0)`;return void 0!==o&&(n+=` scale3d(${o},${o},1)`),n}(0,0,e/250)):r(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&void 0!==e&&e.parentNode&&this.element.remove(),this.element=null}}class p{constructor(e,t,o){this.instance=t,this.data=e,this.index=o,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=i,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new m(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=n("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=n("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var t,o;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=null!==(t=this.data.src)&&void 0!==t?t:"",n.alt=null!==(o=this.data.alt)&&void 0!==o?o:"",this.state=s,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=a,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==a&&this.state!==l||this.removePlaceholder())}onError(){this.state=l,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===s,this)}isError(){return this.state===l}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(r(this.element,e,t),this.isImageContent()&&!this.isError()))){const o=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,o?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==l,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,t;let o=n("pswp__error-msg","div");o.innerText=null!==(e=null===(t=this.instance.options)||void 0===t?void 0:t.errorMsg)&&void 0!==e?e:"",o=this.instance.applyFilters("contentErrorElement",o,this),this.element=n("pswp__content pswp__error-msg-container","div"),this.element.appendChild(o),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===l)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||d())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!d()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==a&&this.state!==l||this.removePlaceholder()))}}function g(e,t,o,n,r){let i=0;if(t.paddingFn)i=t.paddingFn(o,n,r)[e];else if(t.padding)i=t.padding[e];else{const o="padding"+e[0].toUpperCase()+e.slice(1);t[o]&&(i=t[o])}return Number(i)||0}class f{constructor(e,t,o,n){this.pswp=n,this.options=e,this.itemData=t,this.index=o,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,o){const n={x:e,y:t};this.elementSize=n,this.panAreaSize=o;const r=o.x/n.x,i=o.y/n.y;this.fit=Math.min(1,r<i?r:i),this.fill=Math.min(1,r>i?r:i),this.vFill=Math.min(1,i),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const t=e+"ZoomLevel",o=this.options[t];if(o)return"function"==typeof o?o(this):"fill"===o?this.fill:"fit"===o?this.fit:Number(o)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function b(e,t,o){const n=t.createContentFromData(e,o);let r;const{options:i}=t;if(i){let s;r=new f(i,e,-1),s=t.pswp?t.pswp.viewportSize:function(e,t){if(e.getViewportSizeFn){const o=e.getViewportSizeFn(e,t);if(o)return o}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(i,t);const a=function(e,t,o,n){return{x:t.x-g("left",e,t,o,n)-g("right",e,t,o,n),y:t.y-g("top",e,t,o,n)-g("bottom",e,t,o,n)}}(i,s,e,o);r.update(n.width,n.height,a)}return n.lazyLoad(),r&&n.setDisplayedSize(Math.ceil(n.width*r.initial),Math.ceil(n.height*r.initial)),n}class v extends h{getNumItems(){var e;let t=0;const o=null===(e=this.options)||void 0===e?void 0:e.dataSource;o&&"length"in o?t=o.length:o&&"gallery"in o&&(o.items||(o.items=this._getGalleryDOMElements(o.gallery)),o.items&&(t=o.items.length));const n=this.dispatch("numItems",{dataSource:o,numItems:t});return this.applyFilters("numItems",n.numItems,o)}createContentFromData(e,t){return new p(e,this,t)}getItemData(e){var t;const o=null===(t=this.options)||void 0===t?void 0:t.dataSource;let n={};Array.isArray(o)?n=o[e]:o&&"gallery"in o&&(o.items||(o.items=this._getGalleryDOMElements(o.gallery)),n=o.items[e]);let r=n;r instanceof Element&&(r=this._domElementToItemData(r));const i=this.dispatch("itemData",{itemData:r||{},index:e});return this.applyFilters("itemData",i.itemData,e)}_getGalleryDOMElements(e){var t,o;return null!==(t=this.options)&&void 0!==t&&t.children||null!==(o=this.options)&&void 0!==o&&o.childSelector?c(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const t={element:e},o="A"===e.tagName?e:e.querySelector("a");if(o){t.src=o.dataset.pswpSrc||o.href,o.dataset.pswpSrcset&&(t.srcset=o.dataset.pswpSrcset),t.width=o.dataset.pswpWidth?parseInt(o.dataset.pswpWidth,10):0,t.height=o.dataset.pswpHeight?parseInt(o.dataset.pswpHeight,10):0,t.w=t.width,t.h=t.height,o.dataset.pswpType&&(t.type=o.dataset.pswpType);const r=e.querySelector("img");var n;if(r)t.msrc=r.currentSrc||r.src,t.alt=null!==(n=r.getAttribute("alt"))&&void 0!==n?n:"";(o.dataset.pswpCropped||o.dataset.cropped)&&(t.thumbCropped=!0)}return this.applyFilters("domItemData",t,e,o)}lazyLoadData(e,t){return b(e,this,t)}}class y extends v{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){c(this.options.gallery,this.options.gallerySelector).forEach((e=>{e.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(e){if(function(e){return"button"in e&&1===e.button||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}(e)||window.pswp)return;let t={x:e.clientX,y:e.clientY};t.x||t.y||(t=null);let o=this.getClickedIndex(e);o=this.applyFilters("clickedIndex",o,e,this);const n={gallery:e.currentTarget};o>=0&&(e.preventDefault(),this.loadAndOpen(o,n,t))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,o=c(this.options.children,this.options.childSelector,e.currentTarget).findIndex((e=>e===t||e.contains(t)));return-1!==o?o:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,o){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=c(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=o,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:o}=this;t&&(o.dataSource=t);const n=[],r=typeof o.pswpModule;if("function"==typeof(i=o.pswpModule)&&i.prototype&&i.prototype.goTo)n.push(Promise.resolve(o.pswpModule));else{if("string"===r)throw new Error("pswpModule as string is no longer supported");if("function"!==r)throw new Error("pswpModule is not valid");n.push(o.pswpModule())}var i;"function"==typeof o.openPromise&&n.push(o.openPromise()),!1!==o.preloadFirstSlide&&e>=0&&(this._preloadedContent=function(e,t){const o=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:o}).defaultPrevented)return b(o,t,e)}(e,this));const s=++this._uid;Promise.all(n).then((e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,s)}}))}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const o="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=o,window.pswp=o,Object.keys(this._listeners).forEach((e=>{var t;null===(t=this._listeners[e])||void 0===t||t.forEach((t=>{o.on(e,t)}))})),Object.keys(this._filters).forEach((e=>{var t;null===(t=this._filters[e])||void 0===t||t.forEach((t=>{o.addFilter(e,t.fn,t.priority)}))})),this._preloadedContent&&(o.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),o.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),o.init()}destroy(){var e;null===(e=this.pswp)||void 0===e||e.destroy(),this.shouldOpen=!1,this._listeners={},c(this.options.gallery,this.options.gallerySelector).forEach((e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)}))}}},4217:(e,t,o)=>{"use strict";o.d(t,{pt:()=>s,W_:()=>i});var n=o(13433),r=o(7185);function i(e){let{swiper:t,extendParams:o,on:n,emit:i}=e;o({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};const s=e=>(Array.isArray(e)?e:[e]).filter((e=>!!e));function a(e){let o;return e&&"string"==typeof e&&t.isElement&&(o=t.el.querySelector(e),o)?o:(e&&("string"==typeof e&&(o=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&o.length>1&&1===t.el.querySelectorAll(e).length&&(o=t.el.querySelector(e))),e&&!o?e:o)}function l(e,o){const n=t.params.navigation;(e=s(e)).forEach((e=>{e&&(e.classList[o?"add":"remove"](...n.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=o),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass))}))}function c(){const{nextEl:e,prevEl:o}=t.navigation;if(t.params.loop)return l(o,!1),void l(e,!1);l(o,t.isBeginning&&!t.params.rewind),l(e,t.isEnd&&!t.params.rewind)}function d(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function u(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function h(){const e=t.params.navigation;if(t.params.navigation=function(e,t,o,n){return e.params.createElements&&Object.keys(n).forEach((i=>{if(!o[i]&&!0===o.auto){let s=(0,r.e)(e.el,`.${n[i]}`)[0];s||(s=(0,r.c)("div",n[i]),s.className=n[i],e.el.append(s)),o[i]=s,t[i]=s}})),o}(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let o=a(e.nextEl),n=a(e.prevEl);Object.assign(t.navigation,{nextEl:o,prevEl:n}),o=s(o),n=s(n);const i=(o,n)=>{o&&o.addEventListener("click","next"===n?u:d),!t.enabled&&o&&o.classList.add(...e.lockClass.split(" "))};o.forEach((e=>i(e,"next"))),n.forEach((e=>i(e,"prev")))}function m(){let{nextEl:e,prevEl:o}=t.navigation;e=s(e),o=s(o);const n=(e,o)=>{e.removeEventListener("click","next"===o?u:d),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=>n(e,"next"))),o.forEach((e=>n(e,"prev")))}n("init",(()=>{!1===t.params.navigation.enabled?p():(h(),c())})),n("toEdge fromEdge lock unlock",(()=>{c()})),n("destroy",(()=>{m()})),n("enable disable",(()=>{let{nextEl:e,prevEl:o}=t.navigation;e=s(e),o=s(o),t.enabled?c():[...e,...o].filter((e=>!!e)).forEach((e=>e.classList.add(t.params.navigation.lockClass)))})),n("click",((e,o)=>{let{nextEl:n,prevEl:r}=t.navigation;n=s(n),r=s(r);const a=o.target;if(t.params.navigation.hideOnClick&&!r.includes(a)&&!n.includes(a)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===a||t.pagination.el.contains(a)))return;let e;n.length?e=n[0].classList.contains(t.params.navigation.hiddenClass):r.length&&(e=r[0].classList.contains(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),[...n,...r].filter((e=>!!e)).forEach((e=>e.classList.toggle(t.params.navigation.hiddenClass)))}}));const p=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),m()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),h(),c()},disable:p,update:c,init:h,destroy:m})}function s(e){let t,o,{swiper:r,extendParams:i,on:s,emit:a,params:l}=e;r.autoplay={running:!1,paused:!1,timeLeft:0},i({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let c,d,u,h,m,p,g,f=l&&l.autoplay?l.autoplay.delay:3e3,b=l&&l.autoplay?l.autoplay.delay:3e3,v=(new Date).getTime;function y(e){r&&!r.destroyed&&r.wrapperEl&&e.target===r.wrapperEl&&(r.wrapperEl.removeEventListener("transitionend",y),k())}const x=()=>{if(r.destroyed||!r.autoplay.running)return;r.autoplay.paused?d=!0:d&&(b=c,d=!1);const e=r.autoplay.paused?c:v+b-(new Date).getTime();r.autoplay.timeLeft=e,a("autoplayTimeLeft",e,e/f),o=requestAnimationFrame((()=>{x()}))},w=e=>{if(r.destroyed||!r.autoplay.running)return;cancelAnimationFrame(o),x();let n=void 0===e?r.params.autoplay.delay:e;f=r.params.autoplay.delay,b=r.params.autoplay.delay;const i=(()=>{let e;if(e=r.virtual&&r.params.virtual.enabled?r.slides.filter((e=>e.classList.contains("swiper-slide-active")))[0]:r.slides[r.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(i)&&i>0&&void 0===e&&(n=i,f=i,b=i),c=n;const s=r.params.speed,l=()=>{r&&!r.destroyed&&(r.params.autoplay.reverseDirection?!r.isBeginning||r.params.loop||r.params.rewind?(r.slidePrev(s,!0,!0),a("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(r.slides.length-1,s,!0,!0),a("autoplay")):!r.isEnd||r.params.loop||r.params.rewind?(r.slideNext(s,!0,!0),a("autoplay")):r.params.autoplay.stopOnLastSlide||(r.slideTo(0,s,!0,!0),a("autoplay")),r.params.cssMode&&(v=(new Date).getTime(),requestAnimationFrame((()=>{w()}))))};return n>0?(clearTimeout(t),t=setTimeout((()=>{l()}),n)):requestAnimationFrame((()=>{l()})),n},_=()=>{r.autoplay.running=!0,w(),a("autoplayStart")},S=()=>{r.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(o),a("autoplayStop")},C=(e,o)=>{if(r.destroyed||!r.autoplay.running)return;clearTimeout(t),e||(g=!0);const n=()=>{a("autoplayPause"),r.params.autoplay.waitForTransition?r.wrapperEl.addEventListener("transitionend",y):k()};if(r.autoplay.paused=!0,o)return p&&(c=r.params.autoplay.delay),p=!1,void n();const i=c||r.params.autoplay.delay;c=i-((new Date).getTime()-v),r.isEnd&&c<0&&!r.params.loop||(c<0&&(c=0),n())},k=()=>{r.isEnd&&c<0&&!r.params.loop||r.destroyed||!r.autoplay.running||(v=(new Date).getTime(),g?(g=!1,w(c)):w(),r.autoplay.paused=!1,a("autoplayResume"))},E=()=>{if(r.destroyed||!r.autoplay.running)return;const e=(0,n.g)();"hidden"===e.visibilityState&&(g=!0,C(!0)),"visible"===e.visibilityState&&k()},T=e=>{"mouse"===e.pointerType&&(g=!0,r.animating||r.autoplay.paused||C(!0))},O=e=>{"mouse"===e.pointerType&&r.autoplay.paused&&k()};s("init",(()=>{r.params.autoplay.enabled&&(r.params.autoplay.pauseOnMouseEnter&&(r.el.addEventListener("pointerenter",T),r.el.addEventListener("pointerleave",O)),(0,n.g)().addEventListener("visibilitychange",E),v=(new Date).getTime(),_())})),s("destroy",(()=>{r.el.removeEventListener("pointerenter",T),r.el.removeEventListener("pointerleave",O),(0,n.g)().removeEventListener("visibilitychange",E),r.autoplay.running&&S()})),s("beforeTransitionStart",((e,t,o)=>{!r.destroyed&&r.autoplay.running&&(o||!r.params.autoplay.disableOnInteraction?C(!0,!0):S())})),s("sliderFirstMove",(()=>{!r.destroyed&&r.autoplay.running&&(r.params.autoplay.disableOnInteraction?S():(u=!0,h=!1,g=!1,m=setTimeout((()=>{g=!0,h=!0,C(!0)}),200)))})),s("touchEnd",(()=>{if(!r.destroyed&&r.autoplay.running&&u){if(clearTimeout(m),clearTimeout(t),r.params.autoplay.disableOnInteraction)return h=!1,void(u=!1);h&&r.params.cssMode&&k(),h=!1,u=!1}})),s("slideChange",(()=>{!r.destroyed&&r.autoplay.running&&(p=!0)})),Object.assign(r.autoplay,{start:_,stop:S,pause:C,resume:k})}},13433:(e,t,o)=>{"use strict";function n(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function r(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((o=>{void 0===e[o]?e[o]=t[o]:n(t[o])&&n(e[o])&&Object.keys(t[o]).length>0&&r(e[o],t[o])}))}o.d(t,{a:()=>l,g:()=>s});const i={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function s(){const e="undefined"!=typeof document?document:{};return r(e,i),e}const a={document:i,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function l(){const e="undefined"!=typeof window?window:{};return r(e,a),e}},7185:(e,t,o)=>{"use strict";o.d(t,{a:()=>v,c:()=>m,d:()=>s,e:()=>h,f:()=>y,g:()=>b,h:()=>a,l:()=>f,m:()=>g,n:()=>i,o:()=>p,p:()=>u,q:()=>c,r:()=>r,s:()=>d});var n=o(13433);function r(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}function i(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function s(){return Date.now()}function a(e,t){void 0===t&&(t="x");const o=(0,n.a)();let r,i,s;const a=function(e){const t=(0,n.a)();let o;return t.getComputedStyle&&(o=t.getComputedStyle(e,null)),!o&&e.currentStyle&&(o=e.currentStyle),o||(o=e.style),o}(e);return o.WebKitCSSMatrix?(i=a.transform||a.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map((e=>e.replace(",","."))).join(", ")),s=new o.WebKitCSSMatrix("none"===i?"":i)):(s=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=s.toString().split(",")),"x"===t&&(i=o.WebKitCSSMatrix?s.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===t&&(i=o.WebKitCSSMatrix?s.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),i||0}function l(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function c(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&(o=r,!("undefined"!=typeof window&&void 0!==window.HTMLElement?o instanceof HTMLElement:o&&(1===o.nodeType||11===o.nodeType)))){const o=Object.keys(Object(r)).filter((e=>t.indexOf(e)<0));for(let t=0,n=o.length;t<n;t+=1){const n=o[t],i=Object.getOwnPropertyDescriptor(r,n);void 0!==i&&i.enumerable&&(l(e[n])&&l(r[n])?r[n].__swiper__?e[n]=r[n]:c(e[n],r[n]):!l(e[n])&&l(r[n])?(e[n]={},r[n].__swiper__?e[n]=r[n]:c(e[n],r[n])):e[n]=r[n])}}}var o;return e}function d(e,t,o){e.style.setProperty(t,o)}function u(e){let{swiper:t,targetPosition:o,side:r}=e;const i=(0,n.a)(),s=-t.translate;let a,l=null;const c=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const d=o>s?"next":"prev",u=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,h=()=>{a=(new Date).getTime(),null===l&&(l=a);const e=Math.max(Math.min((a-l)/c,1),0),n=.5-Math.cos(e*Math.PI)/2;let d=s+n*(o-s);if(u(d,o)&&(d=o),t.wrapperEl.scrollTo({[r]:d}),u(d,o))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:d})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(h)};h()}function h(e,t){return void 0===t&&(t=""),[...e.children].filter((e=>e.matches(t)))}function m(e,t){void 0===t&&(t=[]);const o=document.createElement(e);return o.classList.add(...Array.isArray(t)?t:[t]),o}function p(e,t){const o=[];for(;e.previousElementSibling;){const n=e.previousElementSibling;t?n.matches(t)&&o.push(n):o.push(n),e=n}return o}function g(e,t){const o=[];for(;e.nextElementSibling;){const n=e.nextElementSibling;t?n.matches(t)&&o.push(n):o.push(n),e=n}return o}function f(e,t){return(0,n.a)().getComputedStyle(e,null).getPropertyValue(t)}function b(e){let t,o=e;if(o){for(t=0;null!==(o=o.previousSibling);)1===o.nodeType&&(t+=1);return t}}function v(e,t){const o=[];let n=e.parentElement;for(;n;)t?n.matches(t)&&o.push(n):o.push(n),n=n.parentElement;return o}function y(e,t,o){const r=(0,n.a)();return o?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}},97652:(e,t,o)=>{"use strict";o.d(t,{Z:()=>N});var n=o(13433),r=o(7185);let i,s,a;function l(){return i||(i=function(){const e=(0,n.a)(),t=(0,n.g)();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),i}function c(e){return void 0===e&&(e={}),s||(s=function(e){let{userAgent:t}=void 0===e?{}:e;const o=l(),r=(0,n.a)(),i=r.navigator.platform,s=t||r.navigator.userAgent,a={ios:!1,android:!1},c=r.screen.width,d=r.screen.height,u=s.match(/(Android);?[\s\/]+([\d.]+)?/);let h=s.match(/(iPad).*OS\s([\d_]+)/);const m=s.match(/(iPod)(.*OS\s([\d_]+))?/),p=!h&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),g="Win32"===i;let f="MacIntel"===i;return!h&&f&&o.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${c}x${d}`)>=0&&(h=s.match(/(Version)\/([\d.]+)/),h||(h=[0,1,"13_0_0"]),f=!1),u&&!g&&(a.os="android",a.android=!0),(h||p||m)&&(a.os="ios",a.ios=!0),a}(e)),s}function d(){return a||(a=function(){const e=(0,n.a)();let t=!1;function o(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(o()){const o=String(e.navigator.userAgent);if(o.includes("Version/")){const[e,n]=o.split("Version/")[1].split(" ")[0].split(".").map((e=>Number(e)));t=e<16||16===e&&n<2}}return{isSafari:t||o(),needPerspectiveFix:t,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),a}var u={on(e,t,o){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof t)return n;const r=o?"unshift":"push";return e.split(" ").forEach((e=>{n.eventsListeners[e]||(n.eventsListeners[e]=[]),n.eventsListeners[e][r](t)})),n},once(e,t,o){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof t)return n;function r(){n.off(e,r),r.__emitterProxy&&delete r.__emitterProxy;for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];t.apply(n,i)}return r.__emitterProxy=t,n.on(e,r,o)},onAny(e,t){const o=this;if(!o.eventsListeners||o.destroyed)return o;if("function"!=typeof e)return o;const n=t?"unshift":"push";return o.eventsAnyListeners.indexOf(e)<0&&o.eventsAnyListeners[n](e),o},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const o=t.eventsAnyListeners.indexOf(e);return o>=0&&t.eventsAnyListeners.splice(o,1),t},off(e,t){const o=this;return!o.eventsListeners||o.destroyed?o:o.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?o.eventsListeners[e]=[]:o.eventsListeners[e]&&o.eventsListeners[e].forEach(((n,r)=>{(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&o.eventsListeners[e].splice(r,1)}))})),o):o},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,o,n;for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];"string"==typeof i[0]||Array.isArray(i[0])?(t=i[0],o=i.slice(1,i.length),n=e):(t=i[0].events,o=i[0].data,n=i[0].context||e),o.unshift(n);return(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(n,[t,...o])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(n,o)}))})),e}};const h=(e,t)=>{if(!e||e.destroyed||!e.params)return;const o=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(o){let t=o.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(o.shadowRoot?t=o.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame((()=>{o.shadowRoot&&(t=o.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())}))),t&&t.remove()}},m=(e,t)=>{if(!e.slides[t])return;const o=e.slides[t].querySelector('[loading="lazy"]');o&&o.removeAttribute("loading")},p=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const o=e.slides.length;if(!o||!t||t<0)return;t=Math.min(t,o);const n="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),r=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const o=r,i=[o-t];return i.push(...Array.from({length:t}).map(((e,t)=>o+n+t))),void e.slides.forEach(((t,o)=>{i.includes(t.column)&&m(e,o)}))}const i=r+n-1;if(e.params.rewind||e.params.loop)for(let n=r-t;n<=i+t;n+=1){const t=(n%o+o)%o;(t<r||t>i)&&m(e,t)}else for(let n=Math.max(r-t,0);n<=Math.min(i+t,o-1);n+=1)n!==r&&(n>i||n<r)&&m(e,n)};var g={updateSize:function(){const e=this;let t,o;const n=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:n.clientWidth,o=void 0!==e.params.height&&null!==e.params.height?e.params.height:n.clientHeight,0===t&&e.isHorizontal()||0===o&&e.isVertical()||(t=t-parseInt((0,r.l)(n,"padding-left")||0,10)-parseInt((0,r.l)(n,"padding-right")||0,10),o=o-parseInt((0,r.l)(n,"padding-top")||0,10)-parseInt((0,r.l)(n,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(o)&&(o=0),Object.assign(e,{width:t,height:o,size:e.isHorizontal()?t:o}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function o(e,o){return parseFloat(e.getPropertyValue(t(o))||0)}const n=e.params,{wrapperEl:i,slidesEl:s,size:a,rtlTranslate:l,wrongRTL:c}=e,d=e.virtual&&n.virtual.enabled,u=d?e.virtual.slides.length:e.slides.length,h=(0,r.e)(s,`.${e.params.slideClass}, swiper-slide`),m=d?e.virtual.slides.length:h.length;let p=[];const g=[],f=[];let b=n.slidesOffsetBefore;"function"==typeof b&&(b=n.slidesOffsetBefore.call(e));let v=n.slidesOffsetAfter;"function"==typeof v&&(v=n.slidesOffsetAfter.call(e));const y=e.snapGrid.length,x=e.slidesGrid.length;let w=n.spaceBetween,_=-b,S=0,C=0;if(void 0===a)return;"string"==typeof w&&w.indexOf("%")>=0?w=parseFloat(w.replace("%",""))/100*a:"string"==typeof w&&(w=parseFloat(w)),e.virtualSize=-w,h.forEach((e=>{l?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),n.centeredSlides&&n.cssMode&&((0,r.s)(i,"--swiper-centered-offset-before",""),(0,r.s)(i,"--swiper-centered-offset-after",""));const k=n.grid&&n.grid.rows>1&&e.grid;let E;k&&e.grid.initSlides(m);const T="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter((e=>void 0!==n.breakpoints[e].slidesPerView)).length>0;for(let i=0;i<m;i+=1){let s;if(E=0,h[i]&&(s=h[i]),k&&e.grid.updateSlide(i,s,m,t),!h[i]||"none"!==(0,r.l)(s,"display")){if("auto"===n.slidesPerView){T&&(h[i].style[t("width")]="");const a=getComputedStyle(s),l=s.style.transform,c=s.style.webkitTransform;if(l&&(s.style.transform="none"),c&&(s.style.webkitTransform="none"),n.roundLengths)E=e.isHorizontal()?(0,r.f)(s,"width",!0):(0,r.f)(s,"height",!0);else{const e=o(a,"width"),t=o(a,"padding-left"),n=o(a,"padding-right"),r=o(a,"margin-left"),i=o(a,"margin-right"),l=a.getPropertyValue("box-sizing");if(l&&"border-box"===l)E=e+r+i;else{const{clientWidth:o,offsetWidth:a}=s;E=e+t+n+r+i+(a-o)}}l&&(s.style.transform=l),c&&(s.style.webkitTransform=c),n.roundLengths&&(E=Math.floor(E))}else E=(a-(n.slidesPerView-1)*w)/n.slidesPerView,n.roundLengths&&(E=Math.floor(E)),h[i]&&(h[i].style[t("width")]=`${E}px`);h[i]&&(h[i].swiperSlideSize=E),f.push(E),n.centeredSlides?(_=_+E/2+S/2+w,0===S&&0!==i&&(_=_-a/2-w),0===i&&(_=_-a/2-w),Math.abs(_)<.001&&(_=0),n.roundLengths&&(_=Math.floor(_)),C%n.slidesPerGroup==0&&p.push(_),g.push(_)):(n.roundLengths&&(_=Math.floor(_)),(C-Math.min(e.params.slidesPerGroupSkip,C))%e.params.slidesPerGroup==0&&p.push(_),g.push(_),_=_+E+w),e.virtualSize+=E+w,S=E,C+=1}}if(e.virtualSize=Math.max(e.virtualSize,a)+v,l&&c&&("slide"===n.effect||"coverflow"===n.effect)&&(i.style.width=`${e.virtualSize+w}px`),n.setWrapperSize&&(i.style[t("width")]=`${e.virtualSize+w}px`),k&&e.grid.updateWrapperSize(E,p,t),!n.centeredSlides){const t=[];for(let o=0;o<p.length;o+=1){let r=p[o];n.roundLengths&&(r=Math.floor(r)),p[o]<=e.virtualSize-a&&t.push(r)}p=t,Math.floor(e.virtualSize-a)-Math.floor(p[p.length-1])>1&&p.push(e.virtualSize-a)}if(d&&n.loop){const t=f[0]+w;if(n.slidesPerGroup>1){const o=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),r=t*n.slidesPerGroup;for(let e=0;e<o;e+=1)p.push(p[p.length-1]+r)}for(let o=0;o<e.virtual.slidesBefore+e.virtual.slidesAfter;o+=1)1===n.slidesPerGroup&&p.push(p[p.length-1]+t),g.push(g[g.length-1]+t),e.virtualSize+=t}if(0===p.length&&(p=[0]),0!==w){const o=e.isHorizontal()&&l?"marginLeft":t("marginRight");h.filter(((e,t)=>!(n.cssMode&&!n.loop)||t!==h.length-1)).forEach((e=>{e.style[o]=`${w}px`}))}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;f.forEach((t=>{e+=t+(w||0)})),e-=w;const t=e-a;p=p.map((e=>e<=0?-b:e>t?t+v:e))}if(n.centerInsufficientSlides){let e=0;if(f.forEach((t=>{e+=t+(w||0)})),e-=w,e<a){const t=(a-e)/2;p.forEach(((e,o)=>{p[o]=e-t})),g.forEach(((e,o)=>{g[o]=e+t}))}}if(Object.assign(e,{slides:h,snapGrid:p,slidesGrid:g,slidesSizesGrid:f}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){(0,r.s)(i,"--swiper-centered-offset-before",-p[0]+"px"),(0,r.s)(i,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],o=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+o))}if(m!==u&&e.emit("slidesLengthChange"),p.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),g.length!==x&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),!(d||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,o=e.el.classList.contains(t);m<=n.maxBackfaceHiddenSlides?o||e.el.classList.add(t):o&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,o=[],n=t.virtual&&t.params.virtual.enabled;let r,i=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const s=e=>n?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=>{o.push(e)}));else for(r=0;r<Math.ceil(t.params.slidesPerView);r+=1){const e=t.activeIndex+r;if(e>t.slides.length&&!n)break;o.push(s(e))}else o.push(s(t.activeIndex));for(r=0;r<o.length;r+=1)if(void 0!==o[r]){const e=o[r].offsetHeight;i=e>i?e:i}(i||0===i)&&(t.wrapperEl.style.height=`${i}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,o=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let n=0;n<t.length;n+=1)t[n].swiperSlideOffset=(e.isHorizontal()?t[n].offsetLeft:t[n].offsetTop)-o-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,o=t.params,{slides:n,rtlTranslate:r,snapGrid:i}=t;if(0===n.length)return;void 0===n[0].swiperSlideOffset&&t.updateSlidesOffset();let s=-e;r&&(s=e),n.forEach((e=>{e.classList.remove(o.slideVisibleClass)})),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=o.spaceBetween;"string"==typeof a&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:"string"==typeof a&&(a=parseFloat(a));for(let e=0;e<n.length;e+=1){const l=n[e];let c=l.swiperSlideOffset;o.cssMode&&o.centeredSlides&&(c-=n[0].swiperSlideOffset);const d=(s+(o.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+a),u=(s-i[0]+(o.centeredSlides?t.minTranslate():0)-c)/(l.swiperSlideSize+a),h=-(s-c),m=h+t.slidesSizesGrid[e];(h>=0&&h<t.size-1||m>1&&m<=t.size||h<=0&&m>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e),n[e].classList.add(o.slideVisibleClass)),l.progress=r?-d:d,l.originalProgress=r?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const o=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*o||0}const o=t.params,n=t.maxTranslate()-t.minTranslate();let{progress:r,isBeginning:i,isEnd:s,progressLoop:a}=t;const l=i,c=s;if(0===n)r=0,i=!0,s=!0;else{r=(e-t.minTranslate())/n;const o=Math.abs(e-t.minTranslate())<1,a=Math.abs(e-t.maxTranslate())<1;i=o||r<=0,s=a||r>=1,o&&(r=0),a&&(r=1)}if(o.loop){const o=t.getSlideIndexByData(0),n=t.getSlideIndexByData(t.slides.length-1),r=t.slidesGrid[o],i=t.slidesGrid[n],s=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);a=l>=r?(l-r)/s:(l+s-i)/s,a>1&&(a-=1)}Object.assign(t,{progress:r,progressLoop:a,isBeginning:i,isEnd:s}),(o.watchSlidesProgress||o.centeredSlides&&o.autoHeight)&&t.updateSlidesProgress(e),i&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!i||c&&!s)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){const e=this,{slides:t,params:o,slidesEl:n,activeIndex:i}=e,s=e.virtual&&o.virtual.enabled,a=e=>(0,r.e)(n,`.${o.slideClass}${e}, swiper-slide${e}`)[0];let l;if(t.forEach((e=>{e.classList.remove(o.slideActiveClass,o.slideNextClass,o.slidePrevClass)})),s)if(o.loop){let t=i-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${t}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else l=t[i];if(l){l.classList.add(o.slideActiveClass);let e=(0,r.m)(l,`.${o.slideClass}, swiper-slide`)[0];o.loop&&!e&&(e=t[0]),e&&e.classList.add(o.slideNextClass);let n=(0,r.o)(l,`.${o.slideClass}, swiper-slide`)[0];o.loop&&0===!n&&(n=t[t.length-1]),n&&n.classList.add(o.slidePrevClass)}e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,o=t.rtlTranslate?t.translate:-t.translate,{snapGrid:n,params:r,activeIndex:i,realIndex:s,snapIndex:a}=t;let l,c=e;const d=e=>{let o=e-t.virtual.slidesBefore;return o<0&&(o=t.virtual.slides.length+o),o>=t.virtual.slides.length&&(o-=t.virtual.slides.length),o};if(void 0===c&&(c=function(e){const{slidesGrid:t,params:o}=e,n=e.rtlTranslate?e.translate:-e.translate;let r;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?n>=t[e]&&n<t[e+1]-(t[e+1]-t[e])/2?r=e:n>=t[e]&&n<t[e+1]&&(r=e+1):n>=t[e]&&(r=e);return o.normalizeSlideIndex&&(r<0||void 0===r)&&(r=0),r}(t)),n.indexOf(o)>=0)l=n.indexOf(o);else{const e=Math.min(r.slidesPerGroupSkip,c);l=e+Math.floor((c-e)/r.slidesPerGroup)}if(l>=n.length&&(l=n.length-1),c===i)return l!==a&&(t.snapIndex=l,t.emit("snapIndexChange")),void(t.params.loop&&t.virtual&&t.params.virtual.enabled&&(t.realIndex=d(c)));let u;u=t.virtual&&r.virtual.enabled&&r.loop?d(c):t.slides[c]?parseInt(t.slides[c].getAttribute("data-swiper-slide-index")||c,10):c,Object.assign(t,{previousSnapIndex:a,snapIndex:l,previousRealIndex:s,realIndex:u,previousIndex:i,activeIndex:c}),t.initialized&&p(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==u&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const o=this,n=o.params;let r=e.closest(`.${n.slideClass}, swiper-slide`);!r&&o.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach((e=>{!r&&e.matches&&e.matches(`.${n.slideClass}, swiper-slide`)&&(r=e)}));let i,s=!1;if(r)for(let e=0;e<o.slides.length;e+=1)if(o.slides[e]===r){s=!0,i=e;break}if(!r||!s)return o.clickedSlide=void 0,void(o.clickedIndex=void 0);o.clickedSlide=r,o.virtual&&o.params.virtual.enabled?o.clickedIndex=parseInt(r.getAttribute("data-swiper-slide-index"),10):o.clickedIndex=i,n.slideToClickedSlide&&void 0!==o.clickedIndex&&o.clickedIndex!==o.activeIndex&&o.slideToClickedSlide()}};var f={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:o,translate:n,wrapperEl:i}=this;if(t.virtualTranslate)return o?-n:n;if(t.cssMode)return n;let s=(0,r.h)(i,e);return s+=this.cssOverflowAdjustment(),o&&(s=-s),s||0},setTranslate:function(e,t){const o=this,{rtlTranslate:n,params:r,wrapperEl:i,progress:s}=o;let a,l=0,c=0;o.isHorizontal()?l=n?-e:e:c=e,r.roundLengths&&(l=Math.floor(l),c=Math.floor(c)),o.previousTranslate=o.translate,o.translate=o.isHorizontal()?l:c,r.cssMode?i[o.isHorizontal()?"scrollLeft":"scrollTop"]=o.isHorizontal()?-l:-c:r.virtualTranslate||(o.isHorizontal()?l-=o.cssOverflowAdjustment():c-=o.cssOverflowAdjustment(),i.style.transform=`translate3d(${l}px, ${c}px, 0px)`);const d=o.maxTranslate()-o.minTranslate();a=0===d?0:(e-o.minTranslate())/d,a!==s&&o.updateProgress(e),o.emit("setTranslate",o.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,o,n,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===o&&(o=!0),void 0===n&&(n=!0);const s=this,{params:a,wrapperEl:l}=s;if(s.animating&&a.preventInteractionOnTransition)return!1;const c=s.minTranslate(),d=s.maxTranslate();let u;if(u=n&&e>c?c:n&&e<d?d:e,s.updateProgress(u),a.cssMode){const e=s.isHorizontal();if(0===t)l[e?"scrollLeft":"scrollTop"]=-u;else{if(!s.support.smoothScroll)return(0,r.p)({swiper:s,targetPosition:-u,side:e?"left":"top"}),!0;l.scrollTo({[e?"left":"top"]:-u,behavior:"smooth"})}return!0}return 0===t?(s.setTransition(0),s.setTranslate(u),o&&(s.emit("beforeTransitionStart",t,i),s.emit("transitionEnd"))):(s.setTransition(t),s.setTranslate(u),o&&(s.emit("beforeTransitionStart",t,i),s.emit("transitionStart")),s.animating||(s.animating=!0,s.onTranslateToWrapperTransitionEnd||(s.onTranslateToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onTranslateToWrapperTransitionEnd),s.onTranslateToWrapperTransitionEnd=null,delete s.onTranslateToWrapperTransitionEnd,o&&s.emit("transitionEnd"))}),s.wrapperEl.addEventListener("transitionend",s.onTranslateToWrapperTransitionEnd))),!0}};function b(e){let{swiper:t,runCallbacks:o,direction:n,step:r}=e;const{activeIndex:i,previousIndex:s}=t;let a=n;if(a||(a=i>s?"next":i<s?"prev":"reset"),t.emit(`transition${r}`),o&&i!==s){if("reset"===a)return void t.emit(`slideResetTransition${r}`);t.emit(`slideChangeTransition${r}`),"next"===a?t.emit(`slideNextTransition${r}`):t.emit(`slidePrevTransition${r}`)}}var v={slideTo:function(e,t,o,n,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===o&&(o=!0),"string"==typeof e&&(e=parseInt(e,10));const s=this;let a=e;a<0&&(a=0);const{params:l,snapGrid:c,slidesGrid:d,previousIndex:u,activeIndex:h,rtlTranslate:m,wrapperEl:p,enabled:g}=s;if(s.animating&&l.preventInteractionOnTransition||!g&&!n&&!i)return!1;const f=Math.min(s.params.slidesPerGroupSkip,a);let b=f+Math.floor((a-f)/s.params.slidesPerGroup);b>=c.length&&(b=c.length-1);const v=-c[b];if(l.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),o=Math.floor(100*d[e]),n=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=o&&t<n-(n-o)/2?a=e:t>=o&&t<n&&(a=e+1):t>=o&&(a=e)}if(s.initialized&&a!==h){if(!s.allowSlideNext&&(m?v>s.translate&&v>s.minTranslate():v<s.translate&&v<s.minTranslate()))return!1;if(!s.allowSlidePrev&&v>s.translate&&v>s.maxTranslate()&&(h||0)!==a)return!1}let y;if(a!==(u||0)&&o&&s.emit("beforeSlideChangeStart"),s.updateProgress(v),y=a>h?"next":a<h?"prev":"reset",m&&-v===s.translate||!m&&v===s.translate)return s.updateActiveIndex(a),l.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==l.effect&&s.setTranslate(v),"reset"!==y&&(s.transitionStart(o,y),s.transitionEnd(o,y)),!1;if(l.cssMode){const e=s.isHorizontal(),o=m?v:-v;if(0===t){const t=s.virtual&&s.params.virtual.enabled;t&&(s.wrapperEl.style.scrollSnapType="none",s._immediateVirtual=!0),t&&!s._cssModeVirtualInitialSet&&s.params.initialSlide>0?(s._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=>{p[e?"scrollLeft":"scrollTop"]=o}))):p[e?"scrollLeft":"scrollTop"]=o,t&&requestAnimationFrame((()=>{s.wrapperEl.style.scrollSnapType="",s._immediateVirtual=!1}))}else{if(!s.support.smoothScroll)return(0,r.p)({swiper:s,targetPosition:o,side:e?"left":"top"}),!0;p.scrollTo({[e?"left":"top"]:o,behavior:"smooth"})}return!0}return s.setTransition(t),s.setTranslate(v),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,n),s.transitionStart(o,y),0===t?s.transitionEnd(o,y):s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(o,y))}),s.wrapperEl.addEventListener("transitionend",s.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,o,n){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===o&&(o=!0),"string"==typeof e){e=parseInt(e,10)}const r=this;let i=e;return r.params.loop&&(r.virtual&&r.params.virtual.enabled?i+=r.virtual.slidesBefore:i=r.getSlideIndexByData(i)),r.slideTo(i,t,o,n)},slideNext:function(e,t,o){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const n=this,{enabled:r,params:i,animating:s}=n;if(!r)return n;let a=i.slidesPerGroup;"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(a=Math.max(n.slidesPerViewDynamic("current",!0),1));const l=n.activeIndex<i.slidesPerGroupSkip?1:a,c=n.virtual&&i.virtual.enabled;if(i.loop){if(s&&!c&&i.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&i.cssMode)return requestAnimationFrame((()=>{n.slideTo(n.activeIndex+l,e,t,o)})),!0}return i.rewind&&n.isEnd?n.slideTo(0,e,t,o):n.slideTo(n.activeIndex+l,e,t,o)},slidePrev:function(e,t,o){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const n=this,{params:r,snapGrid:i,slidesGrid:s,rtlTranslate:a,enabled:l,animating:c}=n;if(!l)return n;const d=n.virtual&&r.virtual.enabled;if(r.loop){if(c&&!d&&r.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const h=u(a?n.translate:-n.translate),m=i.map((e=>u(e)));let p=i[m.indexOf(h)-1];if(void 0===p&&r.cssMode){let e;i.forEach(((t,o)=>{h>=t&&(e=o)})),void 0!==e&&(p=i[e>0?e-1:e])}let g=0;if(void 0!==p&&(g=s.indexOf(p),g<0&&(g=n.activeIndex-1),"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(g=g-n.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),r.rewind&&n.isBeginning){const r=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(r,e,t,o)}return r.loop&&0===n.activeIndex&&r.cssMode?(requestAnimationFrame((()=>{n.slideTo(g,e,t,o)})),!0):n.slideTo(g,e,t,o)},slideReset:function(e,t,o){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,o)},slideToClosest:function(e,t,o,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===n&&(n=.5);const r=this;let i=r.activeIndex;const s=Math.min(r.params.slidesPerGroupSkip,i),a=s+Math.floor((i-s)/r.params.slidesPerGroup),l=r.rtlTranslate?r.translate:-r.translate;if(l>=r.snapGrid[a]){const e=r.snapGrid[a];l-e>(r.snapGrid[a+1]-e)*n&&(i+=r.params.slidesPerGroup)}else{const e=r.snapGrid[a-1];l-e<=(r.snapGrid[a]-e)*n&&(i-=r.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,r.slidesGrid.length-1),r.slideTo(i,e,t,o)},slideToClickedSlide:function(){const e=this,{params:t,slidesEl:o}=e,n="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,s=e.clickedIndex;const a=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?s<e.loopedSlides-n/2||s>e.slides.length-e.loopedSlides+n/2?(e.loopFix(),s=e.getSlideIndex((0,r.e)(o,`${a}[data-swiper-slide-index="${i}"]`)[0]),(0,r.n)((()=>{e.slideTo(s)}))):e.slideTo(s):s>e.slides.length-n?(e.loopFix(),s=e.getSlideIndex((0,r.e)(o,`${a}[data-swiper-slide-index="${i}"]`)[0]),(0,r.n)((()=>{e.slideTo(s)}))):e.slideTo(s)}else e.slideTo(s)}};var y={loopCreate:function(e){const t=this,{params:o,slidesEl:n}=t;if(!o.loop||t.virtual&&t.params.virtual.enabled)return;(0,r.e)(n,`.${o.slideClass}, swiper-slide`).forEach(((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})),t.loopFix({slideRealIndex:e,direction:o.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:o=!0,direction:n,setTranslate:r,activeSlideIndex:i,byController:s,byMousewheel:a}=void 0===e?{}:e;const l=this;if(!l.params.loop)return;l.emit("beforeLoopFix");const{slides:c,allowSlidePrev:d,allowSlideNext:u,slidesEl:h,params:m}=l;if(l.allowSlidePrev=!0,l.allowSlideNext=!0,l.virtual&&m.virtual.enabled)return o&&(m.centeredSlides||0!==l.snapIndex?m.centeredSlides&&l.snapIndex<m.slidesPerView?l.slideTo(l.virtual.slides.length+l.snapIndex,0,!1,!0):l.snapIndex===l.snapGrid.length-1&&l.slideTo(l.virtual.slidesBefore,0,!1,!0):l.slideTo(l.virtual.slides.length,0,!1,!0)),l.allowSlidePrev=d,l.allowSlideNext=u,void l.emit("loopFix");const p="auto"===m.slidesPerView?l.slidesPerViewDynamic():Math.ceil(parseFloat(m.slidesPerView,10));let g=m.loopedSlides||p;g%m.slidesPerGroup!=0&&(g+=m.slidesPerGroup-g%m.slidesPerGroup),l.loopedSlides=g;const f=[],b=[];let v=l.activeIndex;void 0===i?i=l.getSlideIndex(l.slides.filter((e=>e.classList.contains(m.slideActiveClass)))[0]):v=i;const y="next"===n||!n,x="prev"===n||!n;let w=0,_=0;if(i<g){w=Math.max(g-i,m.slidesPerGroup);for(let e=0;e<g-i;e+=1){const t=e-Math.floor(e/c.length)*c.length;f.push(c.length-t-1)}}else if(i>l.slides.length-2*g){_=Math.max(i-(l.slides.length-2*g),m.slidesPerGroup);for(let e=0;e<_;e+=1){const t=e-Math.floor(e/c.length)*c.length;b.push(t)}}if(x&&f.forEach((e=>{l.slides[e].swiperLoopMoveDOM=!0,h.prepend(l.slides[e]),l.slides[e].swiperLoopMoveDOM=!1})),y&&b.forEach((e=>{l.slides[e].swiperLoopMoveDOM=!0,h.append(l.slides[e]),l.slides[e].swiperLoopMoveDOM=!1})),l.recalcSlides(),"auto"===m.slidesPerView&&l.updateSlides(),m.watchSlidesProgress&&l.updateSlidesOffset(),o)if(f.length>0&&x)if(void 0===t){const e=l.slidesGrid[v],t=l.slidesGrid[v+w]-e;a?l.setTranslate(l.translate-t):(l.slideTo(v+w,0,!1,!0),r&&(l.touches[l.isHorizontal()?"startX":"startY"]+=t,l.touchEventsData.currentTranslate=l.translate))}else r&&(l.slideToLoop(t,0,!1,!0),l.touchEventsData.currentTranslate=l.translate);else if(b.length>0&&y)if(void 0===t){const e=l.slidesGrid[v],t=l.slidesGrid[v-_]-e;a?l.setTranslate(l.translate-t):(l.slideTo(v-_,0,!1,!0),r&&(l.touches[l.isHorizontal()?"startX":"startY"]+=t,l.touchEventsData.currentTranslate=l.translate))}else l.slideToLoop(t,0,!1,!0);if(l.allowSlidePrev=d,l.allowSlideNext=u,l.controller&&l.controller.control&&!s){const e={slideRealIndex:t,direction:n,setTranslate:r,activeSlideIndex:i,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach((t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===m.slidesPerView&&o})})):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...e,slideTo:l.controller.control.params.slidesPerView===m.slidesPerView&&o})}l.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:o}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const n=[];e.slides.forEach((e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;n[t]=e})),e.slides.forEach((e=>{e.removeAttribute("data-swiper-slide-index")})),n.forEach((e=>{o.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function x(e){const t=this,o=(0,n.g)(),i=(0,n.a)(),s=t.touchEventsData;s.evCache.push(e);const{params:a,touches:l,enabled:c}=t;if(!c)return;if(!a.simulateTouch&&"mouse"===e.pointerType)return;if(t.animating&&a.preventInteractionOnTransition)return;!t.animating&&a.cssMode&&a.loop&&t.loopFix();let d=e;d.originalEvent&&(d=d.originalEvent);let u=d.target;if("wrapper"===a.touchEventsTarget&&!t.wrapperEl.contains(u))return;if("which"in d&&3===d.which)return;if("button"in d&&d.button>0)return;if(s.isTouched&&s.isMoved)return;const h=!!a.noSwipingClass&&""!==a.noSwipingClass,m=e.composedPath?e.composedPath():e.path;h&&d.target&&d.target.shadowRoot&&m&&(u=m[0]);const p=a.noSwipingSelector?a.noSwipingSelector:`.${a.noSwipingClass}`,g=!(!d.target||!d.target.shadowRoot);if(a.noSwiping&&(g?function(e,t){return void 0===t&&(t=this),function t(o){if(!o||o===(0,n.g)()||o===(0,n.a)())return null;o.assignedSlot&&(o=o.assignedSlot);const r=o.closest(e);return r||o.getRootNode?r||t(o.getRootNode().host):null}(t)}(p,u):u.closest(p)))return void(t.allowClick=!0);if(a.swipeHandler&&!u.closest(a.swipeHandler))return;l.currentX=d.pageX,l.currentY=d.pageY;const f=l.currentX,b=l.currentY,v=a.edgeSwipeDetection||a.iOSEdgeSwipeDetection,y=a.edgeSwipeThreshold||a.iOSEdgeSwipeThreshold;if(v&&(f<=y||f>=i.innerWidth-y)){if("prevent"!==v)return;e.preventDefault()}Object.assign(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=f,l.startY=b,s.touchStartTime=(0,r.d)(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,a.threshold>0&&(s.allowThresholdMove=!1);let x=!0;u.matches(s.focusableElements)&&(x=!1,"SELECT"===u.nodeName&&(s.isTouched=!1)),o.activeElement&&o.activeElement.matches(s.focusableElements)&&o.activeElement!==u&&o.activeElement.blur();const w=x&&t.allowTouchMove&&a.touchStartPreventDefault;!a.touchStartForcePreventDefault&&!w||u.isContentEditable||d.preventDefault(),a.freeMode&&a.freeMode.enabled&&t.freeMode&&t.animating&&!a.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",d)}function w(e){const t=(0,n.g)(),o=this,i=o.touchEventsData,{params:s,touches:a,rtlTranslate:l,enabled:c}=o;if(!c)return;if(!s.simulateTouch&&"mouse"===e.pointerType)return;let d=e;if(d.originalEvent&&(d=d.originalEvent),!i.isTouched)return void(i.startMoving&&i.isScrolling&&o.emit("touchMoveOpposite",d));const u=i.evCache.findIndex((e=>e.pointerId===d.pointerId));u>=0&&(i.evCache[u]=d);const h=i.evCache.length>1?i.evCache[0]:d,m=h.pageX,p=h.pageY;if(d.preventedByNestedSwiper)return a.startX=m,void(a.startY=p);if(!o.allowTouchMove)return d.target.matches(i.focusableElements)||(o.allowClick=!1),void(i.isTouched&&(Object.assign(a,{startX:m,startY:p,prevX:o.touches.currentX,prevY:o.touches.currentY,currentX:m,currentY:p}),i.touchStartTime=(0,r.d)()));if(s.touchReleaseOnEdges&&!s.loop)if(o.isVertical()){if(p<a.startY&&o.translate<=o.maxTranslate()||p>a.startY&&o.translate>=o.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(m<a.startX&&o.translate<=o.maxTranslate()||m>a.startX&&o.translate>=o.minTranslate())return;if(t.activeElement&&d.target===t.activeElement&&d.target.matches(i.focusableElements))return i.isMoved=!0,void(o.allowClick=!1);if(i.allowTouchCallbacks&&o.emit("touchMove",d),d.targetTouches&&d.targetTouches.length>1)return;a.currentX=m,a.currentY=p;const g=a.currentX-a.startX,f=a.currentY-a.startY;if(o.params.threshold&&Math.sqrt(g**2+f**2)<o.params.threshold)return;if(void 0===i.isScrolling){let e;o.isHorizontal()&&a.currentY===a.startY||o.isVertical()&&a.currentX===a.startX?i.isScrolling=!1:g*g+f*f>=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(g))/Math.PI,i.isScrolling=o.isHorizontal()?e>s.touchAngle:90-e>s.touchAngle)}if(i.isScrolling&&o.emit("touchMoveOpposite",d),void 0===i.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(i.startMoving=!0)),i.isScrolling||o.zoom&&o.params.zoom&&o.params.zoom.enabled&&i.evCache.length>1)return void(i.isTouched=!1);if(!i.startMoving)return;o.allowClick=!1,!s.cssMode&&d.cancelable&&d.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&d.stopPropagation();let b=o.isHorizontal()?g:f,v=o.isHorizontal()?a.currentX-a.previousX:a.currentY-a.previousY;s.oneWayMovement&&(b=Math.abs(b)*(l?1:-1),v=Math.abs(v)*(l?1:-1)),a.diff=b,b*=s.touchRatio,l&&(b=-b,v=-v);const y=o.touchesDirection;o.swipeDirection=b>0?"prev":"next",o.touchesDirection=v>0?"prev":"next";const x=o.params.loop&&!s.cssMode,w="next"===o.swipeDirection&&o.allowSlideNext||"prev"===o.swipeDirection&&o.allowSlidePrev;if(!i.isMoved){if(x&&w&&o.loopFix({direction:o.swipeDirection}),i.startTranslate=o.getTranslate(),o.setTransition(0),o.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});o.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!s.grabCursor||!0!==o.allowSlideNext&&!0!==o.allowSlidePrev||o.setGrabCursor(!0),o.emit("sliderFirstMove",d)}let _;i.isMoved&&y!==o.touchesDirection&&x&&w&&Math.abs(b)>=1&&(o.loopFix({direction:o.swipeDirection,setTranslate:!0}),_=!0),o.emit("sliderMove",d),i.isMoved=!0,i.currentTranslate=b+i.startTranslate;let S=!0,C=s.resistanceRatio;if(s.touchReleaseOnEdges&&(C=0),b>0?(x&&w&&!_&&i.currentTranslate>(s.centeredSlides?o.minTranslate()-o.size/2:o.minTranslate())&&o.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>o.minTranslate()&&(S=!1,s.resistance&&(i.currentTranslate=o.minTranslate()-1+(-o.minTranslate()+i.startTranslate+b)**C))):b<0&&(x&&w&&!_&&i.currentTranslate<(s.centeredSlides?o.maxTranslate()+o.size/2:o.maxTranslate())&&o.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:o.slides.length-("auto"===s.slidesPerView?o.slidesPerViewDynamic():Math.ceil(parseFloat(s.slidesPerView,10)))}),i.currentTranslate<o.maxTranslate()&&(S=!1,s.resistance&&(i.currentTranslate=o.maxTranslate()+1-(o.maxTranslate()-i.startTranslate-b)**C))),S&&(d.preventedByNestedSwiper=!0),!o.allowSlideNext&&"next"===o.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!o.allowSlidePrev&&"prev"===o.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),o.allowSlidePrev||o.allowSlideNext||(i.currentTranslate=i.startTranslate),s.threshold>0){if(!(Math.abs(b)>s.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,i.currentTranslate=i.startTranslate,void(a.diff=o.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}s.followFinger&&!s.cssMode&&((s.freeMode&&s.freeMode.enabled&&o.freeMode||s.watchSlidesProgress)&&(o.updateActiveIndex(),o.updateSlidesClasses()),s.freeMode&&s.freeMode.enabled&&o.freeMode&&o.freeMode.onTouchMove(),o.updateProgress(i.currentTranslate),o.setTranslate(i.currentTranslate))}function _(e){const t=this,o=t.touchEventsData,n=o.evCache.findIndex((t=>t.pointerId===e.pointerId));if(n>=0&&o.evCache.splice(n,1),["pointercancel","pointerout","pointerleave","contextmenu"].includes(e.type)){if(!(["pointercancel","contextmenu"].includes(e.type)&&(t.browser.isSafari||t.browser.isWebView)))return}const{params:i,touches:s,rtlTranslate:a,slidesGrid:l,enabled:c}=t;if(!c)return;if(!i.simulateTouch&&"mouse"===e.pointerType)return;let d=e;if(d.originalEvent&&(d=d.originalEvent),o.allowTouchCallbacks&&t.emit("touchEnd",d),o.allowTouchCallbacks=!1,!o.isTouched)return o.isMoved&&i.grabCursor&&t.setGrabCursor(!1),o.isMoved=!1,void(o.startMoving=!1);i.grabCursor&&o.isMoved&&o.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const u=(0,r.d)(),h=u-o.touchStartTime;if(t.allowClick){const e=d.path||d.composedPath&&d.composedPath();t.updateClickedSlide(e&&e[0]||d.target,e),t.emit("tap click",d),h<300&&u-o.lastClickTime<300&&t.emit("doubleTap doubleClick",d)}if(o.lastClickTime=(0,r.d)(),(0,r.n)((()=>{t.destroyed||(t.allowClick=!0)})),!o.isTouched||!o.isMoved||!t.swipeDirection||0===s.diff||o.currentTranslate===o.startTranslate)return o.isTouched=!1,o.isMoved=!1,void(o.startMoving=!1);let m;if(o.isTouched=!1,o.isMoved=!1,o.startMoving=!1,m=i.followFinger?a?t.translate:-t.translate:-o.currentTranslate,i.cssMode)return;if(i.freeMode&&i.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:m});let p=0,g=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<i.slidesPerGroupSkip?1:i.slidesPerGroup){const t=e<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==l[e+t]?m>=l[e]&&m<l[e+t]&&(p=e,g=l[e+t]-l[e]):m>=l[e]&&(p=e,g=l[l.length-1]-l[l.length-2])}let f=null,b=null;i.rewind&&(t.isBeginning?b=i.virtual&&i.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(f=0));const v=(m-l[p])/g,y=p<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(h>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(v>=i.longSwipesRatio?t.slideTo(i.rewind&&t.isEnd?f:p+y):t.slideTo(p)),"prev"===t.swipeDirection&&(v>1-i.longSwipesRatio?t.slideTo(p+y):null!==b&&v<0&&Math.abs(v)>i.longSwipesRatio?t.slideTo(b):t.slideTo(p))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(d.target===t.navigation.nextEl||d.target===t.navigation.prevEl)?d.target===t.navigation.nextEl?t.slideTo(p+y):t.slideTo(p):("next"===t.swipeDirection&&t.slideTo(null!==f?f:p+y),"prev"===t.swipeDirection&&t.slideTo(null!==b?b:p))}}function S(){const e=this,{params:t,el:o}=e;if(o&&0===o.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:r,snapGrid:i}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||a?e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()}),500)),e.allowSlidePrev=r,e.allowSlideNext=n,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function C(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function k(){const e=this,{wrapperEl:t,rtlTranslate:o,enabled:n}=e;if(!n)return;let r;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const i=e.maxTranslate()-e.minTranslate();r=0===i?0:(e.translate-e.minTranslate())/i,r!==e.progress&&e.updateProgress(o?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function E(e){const t=this;h(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}let T=!1;function O(){}const A=(e,t)=>{const o=(0,n.g)(),{params:r,el:i,wrapperEl:s,device:a}=e,l=!!r.nested,c="on"===t?"addEventListener":"removeEventListener",d=t;i[c]("pointerdown",e.onTouchStart,{passive:!1}),o[c]("pointermove",e.onTouchMove,{passive:!1,capture:l}),o[c]("pointerup",e.onTouchEnd,{passive:!0}),o[c]("pointercancel",e.onTouchEnd,{passive:!0}),o[c]("pointerout",e.onTouchEnd,{passive:!0}),o[c]("pointerleave",e.onTouchEnd,{passive:!0}),o[c]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[c]("click",e.onClick,!0),r.cssMode&&s[c]("scroll",e.onScroll),r.updateOnWindowResize?e[d](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",S,!0):e[d]("observerUpdate",S,!0),i[c]("load",e.onLoad,{capture:!0})};const M=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var P={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function D(e,t){return function(o){void 0===o&&(o={});const n=Object.keys(o)[0],i=o[n];"object"==typeof i&&null!==i?(!0===e[n]&&(e[n]={enabled:!0}),"navigation"===n&&e[n]&&e[n].enabled&&!e[n].prevEl&&!e[n].nextEl&&(e[n].auto=!0),["pagination","scrollbar"].indexOf(n)>=0&&e[n]&&e[n].enabled&&!e[n].el&&(e[n].auto=!0),n in e&&"enabled"in i?("object"!=typeof e[n]||"enabled"in e[n]||(e[n].enabled=!0),e[n]||(e[n]={enabled:!1}),(0,r.q)(t,o)):(0,r.q)(t,o)):(0,r.q)(t,o)}}const L={eventsEmitter:u,update:g,translate:f,transition:{setTransition:function(e,t){const o=this;o.params.cssMode||(o.wrapperEl.style.transitionDuration=`${e}ms`,o.wrapperEl.style.transitionDelay=0===e?"0ms":""),o.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const o=this,{params:n}=o;n.cssMode||(n.autoHeight&&o.updateAutoHeight(),b({swiper:o,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const o=this,{params:n}=o;o.animating=!1,n.cssMode||(o.setTransition(0),b({swiper:o,runCallbacks:e,direction:t,step:"End"}))}},slide:v,loop:y,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const o="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),o.style.cursor="move",o.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame((()=>{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame((()=>{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,t=(0,n.g)(),{params:o}=e;e.onTouchStart=x.bind(e),e.onTouchMove=w.bind(e),e.onTouchEnd=_.bind(e),o.cssMode&&(e.onScroll=k.bind(e)),e.onClick=C.bind(e),e.onLoad=E.bind(e),T||(t.addEventListener("touchstart",O),T=!0),A(e,"on")},detachEvents:function(){A(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:o,params:n,el:i}=e,s=n.breakpoints;if(!s||s&&0===Object.keys(s).length)return;const a=e.getBreakpoint(s,e.params.breakpointsBase,e.el);if(!a||e.currentBreakpoint===a)return;const l=(a in s?s[a]:void 0)||e.originalParams,c=M(e,n),d=M(e,l),u=n.enabled;c&&!d?(i.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&d&&(i.classList.add(`${n.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===n.grid.fill)&&i.classList.add(`${n.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((t=>{if(void 0===l[t])return;const o=n[t]&&n[t].enabled,r=l[t]&&l[t].enabled;o&&!r&&e[t].disable(),!o&&r&&e[t].enable()}));const h=l.direction&&l.direction!==n.direction,m=n.loop&&(l.slidesPerView!==n.slidesPerView||h),p=n.loop;h&&o&&e.changeDirection(),(0,r.q)(e.params,l);const g=e.params.enabled,f=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),u&&!g?e.disable():!u&&g&&e.enable(),e.currentBreakpoint=a,e.emit("_beforeBreakpoint",l),o&&(m?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!p&&f?(e.loopCreate(t),e.updateSlides()):p&&!f&&e.loopDestroy()),e.emit("breakpoint",l)},getBreakpoint:function(e,t,o){if(void 0===t&&(t="window"),!e||"container"===t&&!o)return;let r=!1;const i=(0,n.a)(),s="window"===t?i.innerHeight:o.clientHeight,a=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:s*t,point:e}}return{value:e,point:e}}));a.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<a.length;e+=1){const{point:n,value:s}=a[e];"window"===t?i.matchMedia(`(min-width: ${s}px)`).matches&&(r=n):s<=o.clientWidth&&(r=n)}return r||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:o}=e,{slidesOffsetBefore:n}=o;if(n){const t=e.slides.length-1,o=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*n;e.isLocked=e.size>o}else e.isLocked=1===e.snapGrid.length;!0===o.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===o.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:o,rtl:n,el:r,device:i}=e,s=function(e,t){const o=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((n=>{e[n]&&o.push(t+n)})):"string"==typeof e&&o.push(t+e)})),o}(["initialized",o.direction,{"free-mode":e.params.freeMode&&o.freeMode.enabled},{autoheight:o.autoHeight},{rtl:n},{grid:o.grid&&o.grid.rows>1},{"grid-column":o.grid&&o.grid.rows>1&&"column"===o.grid.fill},{android:i.android},{ios:i.ios},{"css-mode":o.cssMode},{centered:o.cssMode&&o.centeredSlides},{"watch-progress":o.watchSlidesProgress}],o.containerModifierClass);t.push(...s),r.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e.classList.remove(...t),this.emitContainerClasses()}}},R={};class N{constructor(){let e,t;for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?t=i[0]:[e,t]=i,t||(t={}),t=(0,r.q)({},t),e&&!t.el&&(t.el=e);const a=(0,n.g)();if(t.el&&"string"==typeof t.el&&a.querySelectorAll(t.el).length>1){const e=[];return a.querySelectorAll(t.el).forEach((o=>{const n=(0,r.q)({},t,{el:o});e.push(new N(n))})),e}const u=this;u.__swiper__=!0,u.support=l(),u.device=c({userAgent:t.userAgent}),u.browser=d(),u.eventsListeners={},u.eventsAnyListeners=[],u.modules=[...u.__modules__],t.modules&&Array.isArray(t.modules)&&u.modules.push(...t.modules);const h={};u.modules.forEach((e=>{e({params:t,swiper:u,extendParams:D(t,h),on:u.on.bind(u),once:u.once.bind(u),off:u.off.bind(u),emit:u.emit.bind(u)})}));const m=(0,r.q)({},P,h);return u.params=(0,r.q)({},m,R,t),u.originalParams=(0,r.q)({},u.params),u.passedParams=(0,r.q)({},t),u.params&&u.params.on&&Object.keys(u.params.on).forEach((e=>{u.on(e,u.params.on[e])})),u.params&&u.params.onAny&&u.onAny(u.params.onAny),Object.assign(u,{enabled:u.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===u.params.direction,isVertical:()=>"vertical"===u.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:u.params.allowSlideNext,allowSlidePrev:u.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:u.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:u.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),u.emit("_swiper"),u.params.init&&u.init(),u}getSlideIndex(e){const{slidesEl:t,params:o}=this,n=(0,r.e)(t,`.${o.slideClass}, swiper-slide`),i=(0,r.g)(n[0]);return(0,r.g)(e)-i}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=>1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=(0,r.e)(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const o=this;e=Math.min(Math.max(e,0),1);const n=o.minTranslate(),r=(o.maxTranslate()-n)*e+n;o.translateTo(r,void 0===t?0:t),o.updateActiveIndex(),o.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((o=>{const n=e.getSlideClasses(o);t.push({slideEl:o,classNames:n}),e.emit("_slideClass",o,n)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:o,slides:n,slidesGrid:r,slidesSizesGrid:i,size:s,activeIndex:a}=this;let l=1;if("number"==typeof o.slidesPerView)return o.slidesPerView;if(o.centeredSlides){let e,t=n[a]?n[a].swiperSlideSize:0;for(let o=a+1;o<n.length;o+=1)n[o]&&!e&&(t+=n[o].swiperSlideSize,l+=1,t>s&&(e=!0));for(let o=a-1;o>=0;o-=1)n[o]&&!e&&(t+=n[o].swiperSlideSize,l+=1,t>s&&(e=!0))}else if("current"===e)for(let e=a+1;e<n.length;e+=1){(t?r[e]+i[e]-r[a]<s:r[e]-r[a]<s)&&(l+=1)}else for(let e=a-1;e>=0;e-=1){r[a]-r[e]<s&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:o}=e;function n(){const t=e.rtlTranslate?-1*e.translate:e.translate,o=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(o),e.updateActiveIndex(),e.updateSlidesClasses()}let r;if(o.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=>{t.complete&&h(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),o.freeMode&&o.freeMode.enabled&&!o.cssMode)n(),o.autoHeight&&e.updateAutoHeight();else{if(("auto"===o.slidesPerView||o.slidesPerView>1)&&e.isEnd&&!o.centeredSlides){const t=e.virtual&&o.virtual.enabled?e.virtual.slides:e.slides;r=e.slideTo(t.length-1,0,!1,!0)}else r=e.slideTo(e.activeIndex,0,!1,!0);r||n()}o.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const o=this,n=o.params.direction;return e||(e="horizontal"===n?"vertical":"horizontal"),e===n||"horizontal"!==e&&"vertical"!==e||(o.el.classList.remove(`${o.params.containerModifierClass}${n}`),o.el.classList.add(`${o.params.containerModifierClass}${e}`),o.emitContainerClasses(),o.params.direction=e,o.slides.forEach((t=>{"vertical"===e?t.style.width="":t.style.height=""})),o.emit("changeDirection"),t&&o.update()),o}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let o=e||t.params.el;if("string"==typeof o&&(o=document.querySelector(o)),!o)return!1;o.swiper=t,o.parentNode&&o.parentNode.host&&"SWIPER-CONTAINER"===o.parentNode.host.nodeName&&(t.isElement=!0);const n=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=(()=>{if(o&&o.shadowRoot&&o.shadowRoot.querySelector){return o.shadowRoot.querySelector(n())}return(0,r.e)(o,n())[0]})();return!i&&t.params.createElements&&(i=(0,r.c)("div",t.params.wrapperClass),o.append(i),(0,r.e)(o,`.${t.params.slideClass}`).forEach((e=>{i.append(e)}))),Object.assign(t,{el:o,wrapperEl:i,slidesEl:t.isElement&&!o.parentNode.host.slideSlots?o.parentNode.host:i,hostEl:t.isElement?o.parentNode.host:o,mounted:!0,rtl:"rtl"===o.dir.toLowerCase()||"rtl"===(0,r.l)(o,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===o.dir.toLowerCase()||"rtl"===(0,r.l)(o,"direction")),wrongRTL:"-webkit-box"===(0,r.l)(i,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const o=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&o.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),o.forEach((e=>{e.complete?h(t,e):e.addEventListener("load",(e=>{h(t,e.target)}))})),p(t),t.initialized=!0,p(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const o=this,{params:n,el:i,wrapperEl:s,slides:a}=o;return void 0===o.params||o.destroyed||(o.emit("beforeDestroy"),o.initialized=!1,o.detachEvents(),n.loop&&o.loopDestroy(),t&&(o.removeClasses(),i.removeAttribute("style"),s.removeAttribute("style"),a&&a.length&&a.forEach((e=>{e.classList.remove(n.slideVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),o.emit("destroy"),Object.keys(o.eventsListeners).forEach((e=>{o.off(e)})),!1!==e&&(o.el.swiper=null,(0,r.r)(o)),o.destroyed=!0),null}static extendDefaults(e){(0,r.q)(R,e)}static get extendedDefaults(){return R}static get defaults(){return P}static installModule(e){N.prototype.__modules__||(N.prototype.__modules__=[]);const t=N.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>N.installModule(e))),N):(N.installModule(e),N)}}Object.keys(L).forEach((e=>{Object.keys(L[e]).forEach((t=>{N.prototype[t]=L[e][t]}))})),N.use([function(e){let{swiper:t,on:o,emit:r}=e;const i=(0,n.a)();let s=null,a=null;const l=()=>{t&&!t.destroyed&&t.initialized&&(r("beforeResize"),r("resize"))},c=()=>{t&&!t.destroyed&&t.initialized&&r("orientationchange")};o("init",(()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(s=new ResizeObserver((e=>{a=i.requestAnimationFrame((()=>{const{width:o,height:n}=t;let r=o,i=n;e.forEach((e=>{let{contentBoxSize:o,contentRect:n,target:s}=e;s&&s!==t.el||(r=n?n.width:(o[0]||o).inlineSize,i=n?n.height:(o[0]||o).blockSize)})),r===o&&i===n||l()}))})),s.observe(t.el)):(i.addEventListener("resize",l),i.addEventListener("orientationchange",c))})),o("destroy",(()=>{a&&i.cancelAnimationFrame(a),s&&s.unobserve&&t.el&&(s.unobserve(t.el),s=null),i.removeEventListener("resize",l),i.removeEventListener("orientationchange",c)}))},function(e){let{swiper:t,extendParams:o,on:i,emit:s}=e;const a=[],l=(0,n.a)(),c=function(e,o){void 0===o&&(o={});const n=new(l.MutationObserver||l.WebkitMutationObserver)((e=>{if(t.__preventObserver__)return;if(1===e.length)return void s("observerUpdate",e[0]);const o=function(){s("observerUpdate",e[0])};l.requestAnimationFrame?l.requestAnimationFrame(o):l.setTimeout(o,0)}));n.observe(e,{attributes:void 0===o.attributes||o.attributes,childList:void 0===o.childList||o.childList,characterData:void 0===o.characterData||o.characterData}),a.push(n)};o({observer:!1,observeParents:!1,observeSlideChildren:!1}),i("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=(0,r.a)(t.hostEl);for(let t=0;t<e.length;t+=1)c(e[t])}c(t.hostEl,{childList:t.params.observeSlideChildren}),c(t.wrapperEl,{attributes:!1})}})),i("destroy",(()=>{a.forEach((e=>{e.disconnect()})),a.splice(0,a.length)}))}])},65410:(e,t,o)=>{"use strict";o.d(t,{Ye:()=>h,ZP:()=>W,bq:()=>l,IO:()=>f,Kt:()=>b});const n=new WeakMap;function r(e,t,o,r){if(!e&&!n.has(t))return!1;const i=n.get(t)??new WeakMap;n.set(t,i);const s=i.get(o)??new Set;i.set(o,s);const a=s.has(r);return e?s.add(r):s.delete(r),a&&e}const i=function(e,t,o,n={}){const{signal:i,base:s=document}=n;if(i?.aborted)return;const{once:a,...l}=n,c=s instanceof Document?s.documentElement:s,d=Boolean("object"==typeof n?n.capture:n),u=n=>{const i=function(e,t){let o=e.target;if(o instanceof Text&&(o=o.parentElement),o instanceof Element&&e.currentTarget instanceof Node){const n=o.closest(t);if(n&&e.currentTarget.contains(n))return n}}(n,String(e));if(i){const e=Object.assign(n,{delegateTarget:i});o.call(c,e),a&&(c.removeEventListener(t,u,l),r(!1,c,o,h))}},h=JSON.stringify({selector:e,type:t,capture:d});r(!0,c,o,h)||c.addEventListener(t,u,l),i?.addEventListener("abort",(()=>{r(!1,c,o,h)}))};function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},s.apply(null,arguments)}const a=(e,t)=>String(e).toLowerCase().replace(/[\s/_.]+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+|-+$/g,"")||t||"",l=({hash:e}={})=>window.location.pathname+window.location.search+(e?window.location.hash:""),c=(e,t={})=>{const o=s({url:e=e||l({hash:!0}),random:Math.random(),source:"swup"},t);window.history.pushState(o,"",e)},d=(e=null,t={})=>{e=e||l({hash:!0});const o=s({},window.history.state||{},{url:e,random:Math.random(),source:"swup"},t);window.history.replaceState(o,"",e)},u=(e,t,o,n)=>{const r=new AbortController;return n=s({},n,{signal:r.signal}),i(e,t,o,n),{destroy:()=>r.abort()}};class h extends URL{constructor(e,t=document.baseURI){super(e.toString(),t),Object.setPrototypeOf(this,h.prototype)}get url(){return this.pathname+this.search}static fromElement(e){const t=e.getAttribute("href")||e.getAttribute("xlink:href")||"";return new h(t)}static fromUrl(e){return new h(e)}}class m extends Error{constructor(e,t){super(e),this.url=void 0,this.status=void 0,this.aborted=void 0,this.timedOut=void 0,this.name="FetchError",this.url=t.url,this.status=t.status,this.aborted=t.aborted||!1,this.timedOut=t.timedOut||!1}}async function p(e,t={}){var o;e=h.fromUrl(e).url;const{visit:n=this.visit}=t,r=s({},this.options.requestHeaders,t.headers),i=null!=(o=t.timeout)?o:this.options.timeout,a=new AbortController,{signal:l}=a;t=s({},t,{headers:r,signal:l});let c,d=!1,u=null;i&&i>0&&(u=setTimeout((()=>{d=!0,a.abort("timeout")}),i));try{c=await this.hooks.call("fetch:request",n,{url:e,options:t},((e,{url:t,options:o})=>fetch(t,o))),u&&clearTimeout(u)}catch(t){if(d)throw this.hooks.call("fetch:timeout",n,{url:e}),new m(`Request timed out: ${e}`,{url:e,timedOut:d});if("AbortError"===(null==t?void 0:t.name)||l.aborted)throw new m(`Request aborted: ${e}`,{url:e,aborted:!0});throw t}const{status:p,url:g}=c,f=await c.text();if(500===p)throw this.hooks.call("fetch:error",n,{status:p,response:c,url:g}),new m(`Server error: ${g}`,{status:p,url:g});if(!f)throw new m(`Empty response: ${g}`,{status:p,url:g});const{url:b}=h.fromUrl(g),v={url:b,html:f};return!n.cache.write||t.method&&"GET"!==t.method||e!==b||this.cache.set(v.url,v),v}class g{constructor(e){this.swup=void 0,this.pages=new Map,this.swup=e}get size(){return this.pages.size}get all(){const e=new Map;return this.pages.forEach(((t,o)=>{e.set(o,s({},t))})),e}has(e){return this.pages.has(this.resolve(e))}get(e){const t=this.pages.get(this.resolve(e));return t?s({},t):t}set(e,t){t=s({},t,{url:e=this.resolve(e)}),this.pages.set(e,t),this.swup.hooks.callSync("cache:set",void 0,{page:t})}update(e,t){e=this.resolve(e);const o=s({},this.get(e),t,{url:e});this.pages.set(e,o)}delete(e){this.pages.delete(this.resolve(e))}clear(){this.pages.clear(),this.swup.hooks.callSync("cache:clear",void 0,void 0)}prune(e){this.pages.forEach(((t,o)=>{e(o,t)&&this.delete(o)}))}resolve(e){const{url:t}=h.fromUrl(e);return this.swup.resolveUrl(t)}}const f=(e,t=document)=>t.querySelector(e),b=(e,t=document)=>Array.from(t.querySelectorAll(e)),v=()=>new Promise((e=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{e()}))}))}));function y(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}function x(e,t=[]){return new Promise(((o,n)=>{const r=e(...t);y(r)?r.then(o,n):o(r)}))}function w(e,t){const o=null==e?void 0:e.closest(`[${t}]`);return null!=o&&o.hasAttribute(t)?(null==o?void 0:o.getAttribute(t))||!0:void 0}class _{constructor(e){this.swup=void 0,this.swupClasses=["to-","is-changing","is-rendering","is-popstate","is-animating","is-leaving"],this.swup=e}get selectors(){const{scope:e}=this.swup.visit.animation;return"containers"===e?this.swup.visit.containers:"html"===e?["html"]:Array.isArray(e)?e:[]}get selector(){return this.selectors.join(",")}get targets(){return this.selector.trim()?b(this.selector):[]}add(...e){this.targets.forEach((t=>t.classList.add(...e)))}remove(...e){this.targets.forEach((t=>t.classList.remove(...e)))}clear(){this.targets.forEach((e=>{const t=e.className.split(" ").filter((e=>this.isSwupClass(e)));e.classList.remove(...t)}))}isSwupClass(e){return this.swupClasses.some((t=>e.startsWith(t)))}}class S{constructor(e,t){this.id=void 0,this.state=void 0,this.from=void 0,this.to=void 0,this.containers=void 0,this.animation=void 0,this.trigger=void 0,this.cache=void 0,this.history=void 0,this.scroll=void 0,this.meta=void 0;const{to:o,from:n,hash:r,el:i,event:s}=t;this.id=Math.random(),this.state=1,this.from={url:null!=n?n:e.location.url,hash:e.location.hash},this.to={url:o,hash:r},this.containers=e.options.containers,this.animation={animate:!0,wait:!1,name:void 0,native:e.options.native,scope:e.options.animationScope,selector:e.options.animationSelector},this.trigger={el:i,event:s},this.cache={read:e.options.cache,write:e.options.cache},this.history={action:"push",popstate:!1,direction:void 0},this.scroll={reset:!0,target:void 0},this.meta={}}advance(e){this.state<e&&(this.state=e)}abort(){this.state=8}get done(){return this.state>=7}}function C(e){return new S(this,e)}class k{constructor(e){this.swup=void 0,this.registry=new Map,this.hooks=["animation:out:start","animation:out:await","animation:out:end","animation:in:start","animation:in:await","animation:in:end","animation:skip","cache:clear","cache:set","content:replace","content:scroll","enable","disable","fetch:request","fetch:error","fetch:timeout","history:popstate","link:click","link:self","link:anchor","link:newtab","page:load","page:view","scroll:top","scroll:anchor","visit:start","visit:transition","visit:abort","visit:end"],this.swup=e,this.init()}init(){this.hooks.forEach((e=>this.create(e)))}create(e){this.registry.has(e)||this.registry.set(e,new Map)}exists(e){return this.registry.has(e)}get(e){const t=this.registry.get(e);if(t)return t;console.error(`Unknown hook '${e}'`)}clear(){this.registry.forEach((e=>e.clear()))}on(e,t,o={}){const n=this.get(e);if(!n)return console.warn(`Hook '${e}' not found.`),()=>{};const r=s({},o,{id:n.size+1,hook:e,handler:t});return n.set(t,r),()=>this.off(e,t)}before(e,t,o={}){return this.on(e,t,s({},o,{before:!0}))}replace(e,t,o={}){return this.on(e,t,s({},o,{replace:!0}))}once(e,t,o={}){return this.on(e,t,s({},o,{once:!0}))}off(e,t){const o=this.get(e);o&&t?o.delete(t)||console.warn(`Handler for hook '${e}' not found.`):o&&o.clear()}async call(e,t,o,n){const[r,i,s]=this.parseCallArgs(e,t,o,n),{before:a,handler:l,after:c}=this.getHandlers(e,s);await this.run(a,r,i);const[d]=await this.run(l,r,i,!0);return await this.run(c,r,i),this.dispatchDomEvent(e,r,i),d}callSync(e,t,o,n){const[r,i,s]=this.parseCallArgs(e,t,o,n),{before:a,handler:l,after:c}=this.getHandlers(e,s);this.runSync(a,r,i);const[d]=this.runSync(l,r,i,!0);return this.runSync(c,r,i),this.dispatchDomEvent(e,r,i),d}parseCallArgs(e,t,o,n){return t instanceof S||"object"!=typeof t&&"function"!=typeof o?[t,o,n]:[void 0,t,o]}async run(e,t=this.swup.visit,o,n=!1){const r=[];for(const{hook:i,handler:s,defaultHandler:a,once:l}of e)if(null==t||!t.done){l&&this.off(i,s);try{const e=await x(s,[t,o,a]);r.push(e)}catch(e){if(n)throw e;console.error(`Error in hook '${i}':`,e)}}return r}runSync(e,t=this.swup.visit,o,n=!1){const r=[];for(const{hook:i,handler:s,defaultHandler:a,once:l}of e)if(null==t||!t.done){l&&this.off(i,s);try{const e=s(t,o,a);r.push(e),y(e)&&console.warn(`Swup will not await Promises in handler for synchronous hook '${i}'.`)}catch(e){if(n)throw e;console.error(`Error in hook '${i}':`,e)}}return r}getHandlers(e,t){const o=this.get(e);if(!o)return{found:!1,before:[],handler:[],after:[],replaced:!1};const n=Array.from(o.values()),r=this.sortRegistrations,i=n.filter((({before:e,replace:t})=>e&&!t)).sort(r),s=n.filter((({replace:e})=>e)).filter((e=>!0)).sort(r),a=n.filter((({before:e,replace:t})=>!e&&!t)).sort(r),l=s.length>0;let c=[];if(t&&(c=[{id:0,hook:e,handler:t}],l)){const o=s.length-1,{handler:n,once:r}=s[o],i=e=>{const o=s[e-1];return o?(t,n)=>o.handler(t,n,i(e-1)):t};c=[{id:0,hook:e,once:r,handler:n,defaultHandler:i(o)}]}return{found:!0,before:i,handler:c,after:a,replaced:l}}sortRegistrations(e,t){var o,n;return(null!=(o=e.priority)?o:0)-(null!=(n=t.priority)?n:0)||e.id-t.id||0}dispatchDomEvent(e,t,o){if(null!=t&&t.done)return;const n={hook:e,args:o,visit:t||this.swup.visit};document.dispatchEvent(new CustomEvent("swup:any",{detail:n,bubbles:!0})),document.dispatchEvent(new CustomEvent(`swup:${e}`,{detail:n,bubbles:!0}))}parseName(e){const[t,...o]=e.split(".");return[t,o.reduce(((e,t)=>s({},e,{[t]:!0})),{})]}}const E=e=>{if(e&&"#"===e.charAt(0)&&(e=e.substring(1)),!e)return null;const t=decodeURIComponent(e);let o=document.getElementById(e)||document.getElementById(t)||f(`a[name='${CSS.escape(e)}']`)||f(`a[name='${CSS.escape(t)}']`);return o||"top"!==e||(o=document.body),o},T="transition",O="animation";async function A({selector:e,elements:t}){if(!1===e&&!t)return;let o=[];if(t)o=Array.from(t);else if(e&&(o=b(e,document.body),!o.length))return void console.warn(`[swup] No elements found matching animationSelector \`${e}\``);const n=o.map((e=>function(e){const{type:t,timeout:o,propCount:n}=function(e){const t=window.getComputedStyle(e),o=M(t,`${T}Delay`),n=M(t,`${T}Duration`),r=P(o,n),i=M(t,`${O}Delay`),s=M(t,`${O}Duration`),a=P(i,s),l=Math.max(r,a),c=l>0?r>a?T:O:null;return{type:c,timeout:l,propCount:c?c===T?n.length:s.length:0}}(e);return!(!t||!o)&&new Promise((r=>{const i=`${t}end`,s=performance.now();let a=0;const l=()=>{e.removeEventListener(i,c),r()},c=t=>{t.target===e&&((performance.now()-s)/1e3<t.elapsedTime||++a>=n&&l())};setTimeout((()=>{a<n&&l()}),o+1),e.addEventListener(i,c)}))}(e)));n.filter(Boolean).length>0?await Promise.all(n):e&&console.warn(`[swup] No CSS animation duration defined on elements matching \`${e}\``)}function M(e,t){return(e[t]||"").split(", ")}function P(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,o)=>D(t)+D(e[o]))))}function D(e){return 1e3*parseFloat(e)}function L(e,t={},o={}){if("string"!=typeof e)throw new Error("swup.navigate() requires a URL parameter");if(this.shouldIgnoreVisit(e,{el:o.el,event:o.event}))return void window.location.assign(e);const{url:n,hash:r}=h.fromUrl(e),i=this.createVisit(s({},o,{to:n,hash:r}));this.performNavigation(i,t)}async function R(e,t={}){if(this.navigating){if(this.visit.state>=6)return e.state=2,void(this.onVisitEnd=()=>this.performNavigation(e,t));await this.hooks.call("visit:abort",this.visit,void 0),delete this.visit.to.document,this.visit.state=8}this.navigating=!0,this.visit=e;const{el:o}=e.trigger;t.referrer=t.referrer||this.location.url,!1===t.animate&&(e.animation.animate=!1),e.animation.animate||this.classes.clear();const n=t.history||w(o,"data-swup-history");"string"==typeof n&&["push","replace"].includes(n)&&(e.history.action=n);const r=t.animation||w(o,"data-swup-animation");var i,s;"string"==typeof r&&(e.animation.name=r),e.meta=t.meta||{},"object"==typeof t.cache?(e.cache.read=null!=(i=t.cache.read)?i:e.cache.read,e.cache.write=null!=(s=t.cache.write)?s:e.cache.write):void 0!==t.cache&&(e.cache={read:!!t.cache,write:!!t.cache}),delete t.cache;try{await this.hooks.call("visit:start",e,void 0),e.state=3;const o=this.hooks.call("page:load",e,{options:t},(async(e,t)=>{let o;return e.cache.read&&(o=this.cache.get(e.to.url)),t.page=o||await this.fetchPage(e.to.url,t.options),t.cache=!!o,t.page}));o.then((({html:t})=>{e.advance(5),e.to.html=t,e.to.document=(new DOMParser).parseFromString(t,"text/html")}));const n=e.to.url+e.to.hash;if(e.history.popstate||("replace"===e.history.action||e.to.url===this.location.url?d(n):(this.currentHistoryIndex++,c(n,{index:this.currentHistoryIndex}))),this.location=h.fromUrl(n),e.history.popstate&&this.classes.add("is-popstate"),e.animation.name&&this.classes.add(`to-${a(e.animation.name)}`),e.animation.wait&&await o,e.done)return;if(await this.hooks.call("visit:transition",e,void 0,(async()=>{if(!e.animation.animate)return await this.hooks.call("animation:skip",void 0),void await this.renderPage(e,await o);e.advance(4),await this.animatePageOut(e),e.animation.native&&document.startViewTransition?await document.startViewTransition((async()=>await this.renderPage(e,await o))).finished:await this.renderPage(e,await o),await this.animatePageIn(e)})),e.done)return;await this.hooks.call("visit:end",e,void 0,(()=>this.classes.clear())),e.state=7,this.navigating=!1,this.onVisitEnd&&(this.onVisitEnd(),this.onVisitEnd=void 0)}catch(t){if(!t||null!=t&&t.aborted)return void(e.state=8);e.state=9,console.error(t),this.options.skipPopStateHandling=()=>(window.location.assign(e.to.url+e.to.hash),!0),window.history.back()}finally{delete e.to.document}}const N=async function(e){await this.hooks.call("animation:out:start",e,void 0,(()=>{this.classes.add("is-changing","is-animating","is-leaving")})),await this.hooks.call("animation:out:await",e,{skip:!1},((e,{skip:t})=>{if(!t)return this.awaitAnimations({selector:e.animation.selector})})),await this.hooks.call("animation:out:end",e,void 0)},I=function(e){var t;const o=e.to.document;if(!o)return!1;const n=(null==(t=o.querySelector("title"))?void 0:t.innerText)||"";document.title=n;const r=b('[data-swup-persist]:not([data-swup-persist=""])'),i=e.containers.map((e=>{const t=document.querySelector(e),n=o.querySelector(e);return t&&n?(t.replaceWith(n.cloneNode(!0)),!0):(t||console.warn(`[swup] Container missing in current document: ${e}`),n||console.warn(`[swup] Container missing in incoming document: ${e}`),!1)})).filter(Boolean);return r.forEach((e=>{const t=e.getAttribute("data-swup-persist"),o=f(`[data-swup-persist="${t}"]`);o&&o!==e&&o.replaceWith(e)})),i.length===e.containers.length},B=function(e){const t={behavior:"auto"},{target:o,reset:n}=e.scroll,r=null!=o?o:e.to.hash;let i=!1;return r&&(i=this.hooks.callSync("scroll:anchor",e,{hash:r,options:t},((e,{hash:t,options:o})=>{const n=this.getAnchorElement(t);return n&&n.scrollIntoView(o),!!n}))),n&&!i&&(i=this.hooks.callSync("scroll:top",e,{options:t},((e,{options:t})=>(window.scrollTo(s({top:0,left:0},t)),!0)))),i},z=async function(e){if(e.done)return;const t=this.hooks.call("animation:in:await",e,{skip:!1},((e,{skip:t})=>{if(!t)return this.awaitAnimations({selector:e.animation.selector})}));await v(),await this.hooks.call("animation:in:start",e,void 0,(()=>{this.classes.remove("is-animating")})),await t,await this.hooks.call("animation:in:end",e,void 0)},F=async function(e,t){if(e.done)return;e.advance(6);const{url:o}=t;this.isSameResolvedUrl(l(),o)||(d(o),this.location=h.fromUrl(o),e.to.url=this.location.url,e.to.hash=this.location.hash),await this.hooks.call("content:replace",e,{page:t},((e,{})=>{if(this.classes.remove("is-leaving"),e.animation.animate&&this.classes.add("is-rendering"),!this.replaceContent(e))throw new Error("[swup] Container mismatch, aborting");e.animation.animate&&(this.classes.add("is-changing","is-animating","is-rendering"),e.animation.name&&this.classes.add(`to-${a(e.animation.name)}`))})),await this.hooks.call("content:scroll",e,void 0,(()=>this.scrollToContent(e))),await this.hooks.call("page:view",e,{url:this.location.url,title:document.title})},H=function(e){var t;if(t=e,Boolean(null==t?void 0:t.isSwupPlugin)){if(e.swup=this,!e._checkRequirements||e._checkRequirements())return e._beforeMount&&e._beforeMount(),e.mount(),this.plugins.push(e),this.plugins}else console.error("Not a swup plugin instance",e)};function j(e){const t=this.findPlugin(e);if(t)return t.unmount(),t._afterUnmount&&t._afterUnmount(),this.plugins=this.plugins.filter((e=>e!==t)),this.plugins;console.error("No such plugin",t)}function V(e){return this.plugins.find((t=>t===e||t.name===e||t.name===`Swup${String(e)}`))}function U(e){if("function"!=typeof this.options.resolveUrl)return console.warn("[swup] options.resolveUrl expects a callback function."),e;const t=this.options.resolveUrl(e);return t&&"string"==typeof t?t.startsWith("//")||t.startsWith("http")?(console.warn("[swup] options.resolveUrl needs to return a relative url"),e):t:(console.warn("[swup] options.resolveUrl needs to return a url"),e)}function Z(e,t){return this.resolveUrl(e)===this.resolveUrl(t)}const $={animateHistoryBrowsing:!1,animationSelector:'[class*="transition-"]',animationScope:"html",cache:!0,containers:["#swup"],hooks:{},ignoreVisit:(e,{el:t}={})=>!(null==t||!t.closest("[data-no-swup]")),linkSelector:"a[href]",linkToSelf:"scroll",native:!1,plugins:[],resolveUrl:e=>e,requestHeaders:{"X-Requested-With":"swup",Accept:"text/html, application/xhtml+xml"},skipPopStateHandling:e=>{var t;return"swup"!==(null==(t=e.state)?void 0:t.source)},timeout:0};class W{get currentPageUrl(){return this.location.url}constructor(e={}){var t,o;this.version="4.8.2",this.options=void 0,this.defaults=$,this.plugins=[],this.visit=void 0,this.cache=void 0,this.hooks=void 0,this.classes=void 0,this.location=h.fromUrl(window.location.href),this.currentHistoryIndex=void 0,this.clickDelegate=void 0,this.navigating=!1,this.onVisitEnd=void 0,this.use=H,this.unuse=j,this.findPlugin=V,this.log=()=>{},this.navigate=L,this.performNavigation=R,this.createVisit=C,this.delegateEvent=u,this.fetchPage=p,this.awaitAnimations=A,this.renderPage=F,this.replaceContent=I,this.animatePageIn=z,this.animatePageOut=N,this.scrollToContent=B,this.getAnchorElement=E,this.getCurrentUrl=l,this.resolveUrl=U,this.isSameResolvedUrl=Z,this.options=s({},this.defaults,e),this.handleLinkClick=this.handleLinkClick.bind(this),this.handlePopState=this.handlePopState.bind(this),this.cache=new g(this),this.classes=new _(this),this.hooks=new k(this),this.visit=this.createVisit({to:""}),this.currentHistoryIndex=null!=(t=null==(o=window.history.state)?void 0:o.index)?t:1,this.enable()}async enable(){var e;const{linkSelector:t}=this.options;this.clickDelegate=this.delegateEvent(t,"click",this.handleLinkClick),window.addEventListener("popstate",this.handlePopState),this.options.animateHistoryBrowsing&&(window.history.scrollRestoration="manual"),this.options.native=this.options.native&&!!document.startViewTransition,this.options.plugins.forEach((e=>this.use(e)));for(const[e,t]of Object.entries(this.options.hooks)){const[o,n]=this.hooks.parseName(e);this.hooks.on(o,t,n)}"swup"!==(null==(e=window.history.state)?void 0:e.source)&&d(null,{index:this.currentHistoryIndex}),await v(),await this.hooks.call("enable",void 0,void 0,(()=>{const e=document.documentElement;e.classList.add("swup-enabled"),e.classList.toggle("swup-native",this.options.native)}))}async destroy(){this.clickDelegate.destroy(),window.removeEventListener("popstate",this.handlePopState),this.cache.clear(),this.options.plugins.forEach((e=>this.unuse(e))),await this.hooks.call("disable",void 0,void 0,(()=>{const e=document.documentElement;e.classList.remove("swup-enabled"),e.classList.remove("swup-native")})),this.hooks.clear()}shouldIgnoreVisit(e,{el:t,event:o}={}){const{origin:n,url:r,hash:i}=h.fromUrl(e);return n!==window.location.origin||!(!t||!this.triggerWillOpenNewWindow(t))||!!this.options.ignoreVisit(r+i,{el:t,event:o})}handleLinkClick(e){const t=e.delegateTarget,{href:o,url:n,hash:r}=h.fromElement(t);if(this.shouldIgnoreVisit(o,{el:t,event:e}))return;if(this.navigating&&n===this.visit.to.url)return void e.preventDefault();const i=this.createVisit({to:n,hash:r,el:t,event:e});e.metaKey||e.ctrlKey||e.shiftKey||e.altKey?this.hooks.callSync("link:newtab",i,{href:o}):0===e.button&&this.hooks.callSync("link:click",i,{el:t,event:e},(()=>{var t;const o=null!=(t=i.from.url)?t:"";e.preventDefault(),n&&n!==o?this.isSameResolvedUrl(n,o)||this.performNavigation(i):r?this.hooks.callSync("link:anchor",i,{hash:r},(()=>{d(n+r),this.scrollToContent(i)})):this.hooks.callSync("link:self",i,void 0,(()=>{"navigate"===this.options.linkToSelf?this.performNavigation(i):(d(n),this.scrollToContent(i))}))}))}handlePopState(e){var t,o,n,r;const i=null!=(t=null==(o=e.state)?void 0:o.url)?t:window.location.href;if(this.options.skipPopStateHandling(e))return;if(this.isSameResolvedUrl(l(),this.location.url))return;const{url:s,hash:a}=h.fromUrl(i),c=this.createVisit({to:s,hash:a,event:e});c.history.popstate=!0;const d=null!=(n=null==(r=e.state)?void 0:r.index)?n:0;d&&d!==this.currentHistoryIndex&&(c.history.direction=d-this.currentHistoryIndex>0?"forwards":"backwards",this.currentHistoryIndex=d),c.animation.animate=!1,c.scroll.reset=!1,c.scroll.target=!1,this.options.animateHistoryBrowsing&&(c.animation.animate=!0,c.scroll.reset=!0),this.hooks.callSync("history:popstate",c,{event:e},(()=>{this.performNavigation(c)}))}triggerWillOpenNewWindow(e){return!!e.matches('[download], [target="_blank"]')}}}}]);