@tryghost/comments-ui 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see comments-ui.min.js.LICENSE.txt */
2
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=38)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){"use strict";e.exports=n(30)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(14);var o=n(13);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(o.a)(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,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Object(r.a)(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(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return g})),n.d(t,"h",(function(){return y})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return l})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return c})),n.d(t,"m",(function(){return m})),n.d(t,"n",(function(){return v}));var r=Object.prototype.toString;function o(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(e,Error)}}function i(e,t){return r.call(e)==="[object ".concat(t,"]")}function a(e){return i(e,"ErrorEvent")}function s(e){return i(e,"DOMError")}function u(e){return i(e,"DOMException")}function c(e){return i(e,"String")}function l(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function f(e){return i(e,"Object")}function d(e){return"undefined"!==typeof Event&&g(e,Event)}function p(e){return"undefined"!==typeof Element&&g(e,Element)}function h(e){return i(e,"RegExp")}function v(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function m(e){return f(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e){return"number"===typeof e&&e!==e}function g(e,t){try{return e instanceof t}catch(n){return!1}}},,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(15),o={};function i(){return Object(r.b)()?e:"undefined"!==typeof window?window:"undefined"!==typeof self?self:o}function a(e,t,n){var r=n||i(),o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(21))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return f}));var r=n(0),o=n(25),i=n(7),a=n(12);function s(e,t,n){if(t in e){var r=e[t],o=n(r);if("function"===typeof o)try{c(o,r)}catch(i){}e[t]=o}}function u(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function c(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,u(e,"__sentry_original__",t)}function l(e){return e.__sentry_original__}function f(e){return Object.keys(e).map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))})).join("&")}function d(e){if(Object(i.d)(e))return Object(r.a)({message:e.message,name:e.name,stack:e.stack},h(e));if(Object(i.f)(e)){var t=Object(r.a)({type:e.type,target:p(e.target),currentTarget:p(e.currentTarget)},h(e));return"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function p(e){try{return Object(i.c)(e)?Object(o.b)(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function h(e){if("object"===typeof e&&null!==e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(a.d)(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:Object(a.d)(o,t)}return""}function m(e){return y(e,new Map)}function y(e,t){if(Object(i.i)(e)){if(void 0!==(s=t.get(e)))return s;var n={};t.set(e,n);for(var r=0,o=Object.keys(e);r<o.length;r++){var a=o[r];"undefined"!==typeof e[a]&&(n[a]=y(e[a],t))}return n}if(Array.isArray(e)){var s;if(void 0!==(s=t.get(e)))return s;n=[];return t.set(e,n),e.forEach((function(e){n.push(y(e,t))})),n}return e}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(31)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o}));var r=n(7);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof e||0===t||e.length<=t?e:"".concat(e.substr(0,t),"...")}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} ".concat(n)),i<r&&(n+=" {snip}"),n}function a(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r<e.length;r++){var o=e[r];try{n.push(String(o))}catch(i){n.push("[value cannot be serialized]")}}return n.join(t)}function s(e,t){return!!Object(r.l)(e)&&(Object(r.k)(t)?t.test(e):"string"===typeof t&&-1!==e.indexOf(t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(14);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var o=n(24);function i(){return!Object(o.a)()&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof e?e:0)}function a(e,t){return e.require(t)}}).call(this,n(37),n(20)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return s}));var r=n(0),o=n(3),i=n(6);function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.sort((function(e,t){return e[0]-t[0]})).map((function(e){return e[1]}));return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=[],a=Object(i.a)(e.split("\n").slice(n));try{for(a.s();!(t=a.n()).done;){var s,c=t.value,l=Object(i.a)(r);try{for(l.s();!(s=l.n()).done;){var f=s.value,d=f(c);if(d){o.push(d);break}}}catch(p){l.e(p)}finally{l.f()}}}catch(p){a.e(p)}finally{a.f()}return u(o)}}function s(e){return Array.isArray(e)?a.apply(void 0,Object(o.a)(e)):e}function u(e){if(!e.length)return[];var t=e,n=t[0].function||"",o=t[t.length-1].function||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==o.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return Object(r.a)(Object(r.a)({},e),{},{filename:e.filename||t[0].filename,function:e.function||"?"})})).reverse()}var c="<anonymous>";function l(e){try{return e&&"function"===typeof e&&e.name||c}catch(t){return c}}},,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(35),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),v=u(n),m=0;m<a.length;++m){var y=a[m];if(!i[y]&&(!r||!r[y])&&(!v||!v[y])&&(!s||!s[y])){var g=d(n,y);try{c(t,y,g)}catch(b){}}}}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(9),o=n(15),i={nowSeconds:function(){return Date.now()/1e3}};var a=Object(o.b)()?function(){try{return Object(o.a)(e,"perf_hooks").performance}catch(t){return}}():function(){var e=Object(r.a)().performance;if(e&&e.now)return{now:function(){return e.now()},timeOrigin:Date.now()-e.now()}}(),s=void 0===a?i:{nowSeconds:function(){return(a.timeOrigin+a.now())/1e3}},u=i.nowSeconds.bind(i),c=s.nowSeconds.bind(s);!function(){var e=Object(r.a)().performance;if(e&&e.now){var t=36e5,n=e.now(),o=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-o):t,a=i<t,s=e.timing&&e.timing.navigationStart,u="number"===typeof s?Math.abs(s+n-o):t;return a||u<t?i<=u?("timeOrigin",e.timeOrigin):("navigationStart",s):("dateNow",o)}"none"}()}).call(this,n(20)(e))},function(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));var r=n(9),o=n(7);function i(e,t){try{for(var n,r=e,o=[],i=0,s=0,u=" > ".length;r&&i++<5&&!("html"===(n=a(r,t))||i>1&&s+o.length*u+n.length>=80);)o.push(n),s+=n.length,r=r.parentNode;return o.reverse().join(" > ")}catch(c){return"<unknown>"}}function a(e,t){var n,r,i,a,s,u=e,c=[];if(!u||!u.tagName)return"";c.push(u.tagName.toLowerCase());var l=t&&t.length?t.filter((function(e){return u.getAttribute(e)})).map((function(e){return[e,u.getAttribute(e)]})):null;if(l&&l.length)l.forEach((function(e){c.push("[".concat(e[0],'="').concat(e[1],'"]'))}));else if(u.id&&c.push("#".concat(u.id)),(n=u.className)&&Object(o.l)(n))for(r=n.split(/\s+/),s=0;s<r.length;s++)c.push(".".concat(r[s]));var f=["type","name","title","alt"];for(s=0;s<f.length;s++)i=f[s],(a=u.getAttribute(i))&&c.push("[".concat(i,'="').concat(a,'"]'));return c.join("")}function s(){var e=Object(r.a)();try{return e.document.location.href}catch(t){return""}}},function(e,t,n){"use strict";function r(){var e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(var r=0;r<t.length;r++){if(t[r]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(var r=0;r<t.length;r++)if(t[r]===n){t.splice(r,1);break}}]}n.d(t,"a",(function(){return r}))},,,,function(e,t,n){"use strict";var r=n(19),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var b=g.prototype=new y;b.constructor=g,r(b,m.prototype),b.isPureReactComponent=!0;var k={current:null},w=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:k.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var D=/\/+/g;function S(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+S(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(D,"$&/")+"/"),C(a,t,n,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(D,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+S(s=e[c],c);u+=C(s,t,n,l,a)}else if(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=C(s=s.value,t,n,l=r+S(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function j(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function _(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var A={current:null};function N(){var e=A.current;if(null===e)throw Error(p(321));return e}var T={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:j,forEach:function(e,t,n){j(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return j(e,(function(){t++})),t},toArray:function(e){return j(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error(p(143));return e}},t.Component=m,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)w.call(t,l)&&!x.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:_}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return N().useCallback(e,t)},t.useContext=function(e,t){return N().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return N().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return N().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return N().useLayoutEffect(e,t)},t.useMemo=function(e,t){return N().useMemo(e,t)},t.useReducer=function(e,t,n){return N().useReducer(e,t,n)},t.useRef=function(e){return N().useRef(e)},t.useState=function(e){return N().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(2),o=n(19),i=n(32);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},v={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function k(e,t,n,r){var o=y.hasOwnProperty(t)?y[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(v,e)||!p.call(h,e)&&(d.test(e)?v[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,O=60106,E=60107,D=60108,S=60114,C=60109,j=60110,_=60112,A=60113,N=60120,T=60115,M=60116,F=60121,R=60128,P=60129,B=60130,L=60131;if("function"===typeof Symbol&&Symbol.for){var I=Symbol.for;x=I("react.element"),O=I("react.portal"),E=I("react.fragment"),D=I("react.strict_mode"),S=I("react.profiler"),C=I("react.provider"),j=I("react.context"),_=I("react.forward_ref"),A=I("react.suspense"),N=I("react.suspense_list"),T=I("react.memo"),M=I("react.lazy"),F=I("react.block"),I("react.scope"),R=I("react.opaque.id"),P=I("react.debug_trace_mode"),B=I("react.offscreen"),L=I("react.legacy_hidden")}var z,U="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function $(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var H=!1;function q(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$(e):""}function W(e){switch(e.tag){case 5:return $(e.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1);case 11:return e=q(e.type.render,!1);case 22:return e=q(e.type._render,!1);case 1:return e=q(e.type,!0);default:return""}}function Y(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case O:return"Portal";case S:return"Profiler";case D:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case j:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case _:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case T:return Y(e.type);case F:return Y(e._render);case M:t=e._payload,e=e._init;try{return Y(e(t))}catch(n){}}return null}function G(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function J(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&k(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+G(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ce(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,me,ye=(me=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ke=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(be).forEach((function(e){ke.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Oe=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ee(e,t){if(t){if(Oe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function De(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,je=null,_e=null;function Ae(e){if(e=ro(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),Ce(e.stateNode,e.type,t))}}function Ne(e){je?_e?_e.push(e):_e=[e]:je=e}function Te(){if(je){var e=je,t=_e;if(_e=je=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Me(e,t){return e(t)}function Fe(e,t,n,r,o){return e(t,n,r,o)}function Re(){}var Pe=Me,Be=!1,Le=!1;function Ie(){null===je&&null===_e||(Re(),Te())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ue=!1;if(f)try{var Ve={};Object.defineProperty(Ve,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",Ve,Ve),window.removeEventListener("test",Ve,Ve)}catch(me){Ue=!1}function $e(e,t,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var He=!1,qe=null,We=!1,Ye=null,Ge={onError:function(e){He=!0,qe=e}};function Ke(e,t,n,r,o,i,a,s,u){He=!1,qe=null,$e.apply(Ge,arguments)}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Je(e)!==e)throw Error(a(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xe(o),e;if(i===r)return Xe(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,ut=null,ct=null,lt=new Map,ft=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function mt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function yt(e){var t=no(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){gt(e)&&n.delete(t)}function kt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&gt(st)&&(st=null),null!==ut&&gt(ut)&&(ut=null),null!==ct&&gt(ct)&&(ct=null),lt.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,kt)))}function xt(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==ut&&wt(ut,e),null!==ct&&wt(ct,e),lt.forEach(t),ft.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)yt(n),null===n.blockedOn&&dt.shift()}function Ot(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Et={animationend:Ot("Animation","AnimationEnd"),animationiteration:Ot("Animation","AnimationIteration"),animationstart:Ot("Animation","AnimationStart"),transitionend:Ot("Transition","TransitionEnd")},Dt={},St={};function Ct(e){if(Dt[e])return Dt[e];if(!Et[e])return e;var t,n=Et[e];for(t in n)if(n.hasOwnProperty(t)&&t in St)return Dt[e]=n[t];return e}f&&(St=document.createElement("div").style,"AnimationEvent"in window||(delete Et.animationend.animation,delete Et.animationiteration.animation,delete Et.animationstart.animation),"TransitionEvent"in window||delete Et.transitionend.transition);var jt=Ct("animationend"),_t=Ct("animationiteration"),At=Ct("animationstart"),Nt=Ct("transitionend"),Tt=new Map,Mt=new Map,Ft=["abort","abort",jt,"animationEnd",_t,"animationIteration",At,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Nt,"transitionEnd","waiting","waiting"];function Rt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Mt.set(r,t),Tt.set(r,o),c(o,[r])}}(0,i.unstable_now)();var Pt=8;function Bt(e){if(0!==(1&e))return Pt=15,1;if(0!==(2&e))return Pt=14,2;if(0!==(4&e))return Pt=13,4;var t=24&e;return 0!==t?(Pt=12,t):0!==(32&e)?(Pt=11,32):0!==(t=192&e)?(Pt=10,t):0!==(256&e)?(Pt=9,256):0!==(t=3584&e)?(Pt=8,t):0!==(4096&e)?(Pt=7,4096):0!==(t=4186112&e)?(Pt=6,t):0!==(t=62914560&e)?(Pt=5,t):67108864&e?(Pt=4,67108864):0!==(134217728&e)?(Pt=3,134217728):0!==(t=805306368&e)?(Pt=2,t):0!==(1073741824&e)?(Pt=1,1073741824):(Pt=8,e)}function Lt(e,t){var n=e.pendingLanes;if(0===n)return Pt=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Pt=15;else if(0!==(i=134217727&n)){var u=i&~a;0!==u?(r=Bt(u),o=Pt):0!==(s&=i)&&(r=Bt(s),o=Pt)}else 0!==(i=n&~a)?(r=Bt(i),o=Pt):0!==s&&(r=Bt(s),o=Pt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Bt(t),o<=Pt)return t;Pt=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Ht(t)),r|=e[n],t&=~o;return r}function It(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?zt(10,t):e;case 10:return 0===(e=Ut(192&~t))?zt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ut(e){return e&-e}function Vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(qt(e)/Wt|0)|0},qt=Math.log,Wt=Math.LN2;var Yt=i.unstable_UserBlockingPriority,Gt=i.unstable_runWithPriority,Kt=!0;function Jt(e,t,n,r){Be||Re();var o=Xt,i=Be;Be=!0;try{Fe(o,e,t,n,r)}finally{(Be=i)||Ie()}}function Qt(e,t,n,r){Gt(Yt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var o;if(Kt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Zt(e,t,n,r);if(null===i)o&&vt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=mt(st,e,t,n,r,o),!0;case"dragenter":return ut=mt(ut,e,t,n,r,o),!0;case"mouseover":return ct=mt(ct,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return lt.set(i,mt(lt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ft.set(i,mt(ft.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;vt(e,r)}Rr(e,t,r,null,n)}}}function Zt(e,t,n,r){var o=Se(r);if(null!==(o=no(o))){var i=Je(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Qe(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Rr(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function un(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,ln,fn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=un(dn),hn=o({},dn,{view:0,detail:0}),vn=un(hn),mn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,ln=e.screenY-fn.screenY):ln=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),yn=un(mn),gn=un(o({},mn,{dataTransfer:0})),bn=un(o({},hn,{relatedTarget:0})),kn=un(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=un(wn),On=un(o({},dn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function jn(){return Cn}var _n=o({},hn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Dn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=un(_n),Nn=un(o({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=un(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Mn=un(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=o({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=un(Fn),Pn=[9,13,27,32],Bn=f&&"CompositionEvent"in window,Ln=null;f&&"documentMode"in document&&(Ln=document.documentMode);var In=f&&"TextEvent"in window&&!Ln,zn=f&&(!Bn||Ln&&8<Ln&&11>=Ln),Un=String.fromCharCode(32),Vn=!1;function $n(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Gn(e,t,n,r){Ne(r),0<(t=Br(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Jn=null;function Qn(e){_r(e,0)}function Xn(e){if(Q(oo(e)))return e}function Zn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){Kn&&(Kn.detachEvent("onpropertychange",ir),Jn=Kn=null)}function ir(e){if("value"===e.propertyName&&Xn(Jn)){var t=[];if(Gn(t,Jn,e,Se(e)),e=Qn,Be)e(t);else{Be=!0;try{Me(e,t)}finally{Be=!1,Ie()}}}}function ar(e,t,n){"focusin"===e?(or(),Jn=n,(Kn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Jn)}function ur(e,t){if("click"===e)return Xn(t)}function cr(e,t){if("input"===e||"change"===e)return Xn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function dr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!lr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gr=f&&"documentMode"in document&&11>=document.documentMode,br=null,kr=null,wr=null,xr=!1;function Or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==br||br!==X(r)||("selectionStart"in(r=br)&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Br(kr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Rt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Rt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Rt(Ft,2);for(var Er="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Dr=0;Dr<Er.length;Dr++)Mt.set(Er[Dr],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sr));function jr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,u,c){if(Ke.apply(this,arguments),He){if(!He)throw Error(a(198));var l=qe;He=!1,qe=null,We||(We=!0,Ye=l)}}(r,t,void 0,e),e.currentTarget=null}function _r(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==i&&o.isPropagationStopped())break e;jr(o,s,c),i=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,c=s.currentTarget,s=s.listener,u!==i&&o.isPropagationStopped())break e;jr(o,s,c),i=u}}}if(We)throw e=Ye,We=!1,Ye=null,e}function Ar(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Fr(t,e,2,!1),n.add(r))}var Nr="_reactListening"+Math.random().toString(36).slice(2);function Tr(e){e[Nr]||(e[Nr]=!0,s.forEach((function(t){Cr.has(t)||Mr(t,!1,e,null),Mr(t,!0,e,null)})))}function Mr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Cr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Fr(i,e,o,t),a.add(s))}function Fr(e,t,n,r){var o=Mt.get(t);switch(void 0===o?2:o){case 0:o=Jt;break;case 1:o=Qt;break;default:o=Xt}n=o.bind(null,t,n,e),o=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Rr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(u=a.tag)||6===u){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Le)return e(t,n);Le=!0;try{Pe(e,t,n)}finally{Le=!1,Ie()}}((function(){var r=i,o=Se(n),a=[];e:{var s=Tt.get(e);if(void 0!==s){var u=pn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":u=An;break;case"focusin":c="focus",u=bn;break;case"focusout":c="blur",u=bn;break;case"beforeblur":case"afterblur":u=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Tn;break;case jt:case _t:case At:u=kn;break;case Nt:u=Mn;break;case"scroll":u=vn;break;case"wheel":u=Rn;break;case"copy":case"cut":case"paste":u=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Nn}var l=0!==(4&t),f=!l&&"scroll"===e,d=l?null!==s?s+"Capture":null:s;l=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==d&&(null!=(v=ze(h,d))&&l.push(Pr(h,v,p)))),f)break;h=h.return}0<l.length&&(s=new u(s,c,null,n,o),a.push({event:s,listeners:l}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!no(c)&&!c[eo])&&(u||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?no(c):null)&&(c!==(f=Je(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=yn,v="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(l=Nn,v="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==u?s:oo(u),p=null==c?s:oo(c),(s=new l(v,h+"leave",u,n,o)).target=f,s.relatedTarget=p,v=null,no(o)===r&&((l=new l(d,h+"enter",c,n,o)).target=p,l.relatedTarget=f,v=l),f=v,u&&c)e:{for(d=c,h=0,p=l=u;p;p=Lr(p))h++;for(p=0,v=d;v;v=Lr(v))p++;for(;0<h-p;)l=Lr(l),h--;for(;0<p-h;)d=Lr(d),p--;for(;h--;){if(l===d||null!==d&&l===d.alternate)break e;l=Lr(l),d=Lr(d)}l=null}else l=null;null!==u&&Ir(a,s,u,l,!1),null!==c&&null!==f&&Ir(a,f,c,l,!0)}if("select"===(u=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var m=Zn;else if(Yn(s))if(er)m=cr;else{m=sr;var y=ar}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ur);switch(m&&(m=m(e,r))?Gn(a,m,n,o):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&oe(s,"number",s.value)),y=r?oo(r):window,e){case"focusin":(Yn(y)||"true"===y.contentEditable)&&(br=y,kr=r,wr=null);break;case"focusout":wr=kr=br=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,Or(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":Or(a,n,o)}var g;if(Bn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else qn?$n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zn&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(g=rn()):(tn="value"in(en=o)?en.value:en.textContent,qn=!0)),0<(y=Br(r,b)).length&&(b=new On(b,e,null,n,o),a.push({event:b,listeners:y}),g?b.data=g:null!==(g=Hn(n))&&(b.data=g))),(g=In?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Vn=!0,Un);case"textInput":return(e=t.data)===Un&&Vn?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Bn&&$n(e,t)?(e=rn(),nn=tn=en=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Br(r,"onBeforeInput")).length&&(o=new On("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=g))}_r(a,t)}))}function Pr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Br(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=ze(e,n))&&r.unshift(Pr(e,i,o)),null!=(i=ze(e,t))&&r.push(Pr(e,i,o))),e=e.return}return r}function Lr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ir(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(u=ze(n,i))&&a.unshift(Pr(n,u,s)):o||null!=(u=ze(n,i))&&a.push(Pr(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function zr(){}var Ur=null,Vr=null;function $r(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var qr="function"===typeof setTimeout?setTimeout:void 0,Wr="function"===typeof clearTimeout?clearTimeout:void 0;function Yr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Kr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Jr=0;var Qr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Qr,Zr="__reactProps$"+Qr,eo="__reactContainer$"+Qr,to="__reactEvents$"+Qr;function no(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Kr(e);null!==e;){if(n=e[Xr])return n;e=Kr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Xr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Zr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],uo=-1;function co(e){return{current:e}}function lo(e){0>uo||(e.current=so[uo],so[uo]=null,uo--)}function fo(e,t){uo++,so[uo]=e.current,e.current=t}var po={},ho=co(po),vo=co(!1),mo=po;function yo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function go(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bo(){lo(vo),lo(ho)}function ko(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(vo,n)}function wo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,Y(t)||"Unknown",i));return o({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,mo=ho.current,fo(ho,e),fo(vo,vo.current),!0}function Oo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=wo(e,t,mo),r.__reactInternalMemoizedMergedChildContext=e,lo(vo),lo(ho),fo(ho,e)):lo(vo),fo(vo,n)}var Eo=null,Do=null,So=i.unstable_runWithPriority,Co=i.unstable_scheduleCallback,jo=i.unstable_cancelCallback,_o=i.unstable_shouldYield,Ao=i.unstable_requestPaint,No=i.unstable_now,To=i.unstable_getCurrentPriorityLevel,Mo=i.unstable_ImmediatePriority,Fo=i.unstable_UserBlockingPriority,Ro=i.unstable_NormalPriority,Po=i.unstable_LowPriority,Bo=i.unstable_IdlePriority,Lo={},Io=void 0!==Ao?Ao:function(){},zo=null,Uo=null,Vo=!1,$o=No(),Ho=1e4>$o?No:function(){return No()-$o};function qo(){switch(To()){case Mo:return 99;case Fo:return 98;case Ro:return 97;case Po:return 96;case Bo:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Mo;case 98:return Fo;case 97:return Ro;case 96:return Po;case 95:return Bo;default:throw Error(a(332))}}function Yo(e,t){return e=Wo(e),So(e,t)}function Go(e,t,n){return e=Wo(e),Co(e,t,n)}function Ko(){if(null!==Uo){var e=Uo;Uo=null,jo(e)}Jo()}function Jo(){if(!Vo&&null!==zo){Vo=!0;var e=0;try{var t=zo;Yo(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zo=null}catch(n){throw null!==zo&&(zo=zo.slice(e+1)),Co(Mo,Ko),n}finally{Vo=!1}}}var Qo=w.ReactCurrentBatchConfig;function Xo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Zo=co(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Zo.current;lo(Zo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ba=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var ui=!1;function ci(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function li(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function di(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;ui=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,u=i.shared.pending;if(null!==u){i.shared.pending=null;var c=u,l=c.next;c.next=null,null===s?a=l:s.next=l,s=c;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==s&&(null===d?f.firstBaseUpdate=l:d.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,s=0,f=l=c=null;;){u=a.lane;var p=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(u=t,p=n,v.tag){case 1:if("function"===typeof(h=v.payload)){d=h.call(p,d,u);break e}d=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(u="function"===typeof(h=v.payload)?h.call(p,d,u):h)||void 0===u)break e;d=o({},d,u);break e;case 2:ui=!0}}null!==a.callback&&(e.flags|=32,null===(u=i.effects)?i.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=p,c=d):f=f.next=p,s|=u;if(null===(a=a.next)){if(null===(u=i.shared.pending))break;a=u.next,u.next=null,i.lastBaseUpdate=u,i.shared.pending=null}}null===f&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=f,Us|=s,e.lanes=s,e.memoizedState=d}}function vi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var mi=(new r.Component).refs;function yi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var gi={isMounted:function(e){return!!(e=e._reactInternals)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),o=pu(e),i=fi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hu(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),o=pu(e),i=fi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hu(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=pu(e),o=fi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),di(e,o),hu(e,r,n)}};function bi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(o,i))}function ki(e,t,n){var r=!1,o=po,i=t.contextType;return"object"===typeof i&&null!==i?i=si(i):(o=go(t)?mo:ho.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?yo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=gi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function wi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=mi,ci(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=si(i):(i=go(t)?mo:ho.current,o.context=yo(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(yi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&gi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var Oi=Array.isArray;function Ei(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===mi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Di(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Si(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Wu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ju(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Ei(e,t,n),r.return=e,r):((r=Yu(n.type,n.key,n.props,null,e.mode,r)).ref=Ei(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Gu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ju(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Yu(t.type,t.key,t.props,null,e.mode,n)).ref=Ei(e,null,t),n.return=e,n;case O:return(t=Qu(t,e.mode,n)).return=e,t}if(Oi(t)||V(t))return(t=Gu(t,e.mode,n,null)).return=e,t;Di(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===E?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case O:return n.key===o?l(e,t,n,r):null}if(Oi(n)||V(n))return null!==o?null:f(e,t,n,r,null);Di(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===E?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case O:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Oi(r)||V(r))return f(t,e=e.get(n)||null,r,o,null);Di(t,r)}return null}function v(o,a,s,u){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=p(o,f,s[v],u);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(o,f),a=i(y,a,v),null===l?c=y:l.sibling=y,l=y,f=m}if(v===s.length)return n(o,f),c;if(null===f){for(;v<s.length;v++)null!==(f=d(o,s[v],u))&&(a=i(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);v<s.length;v++)null!==(m=h(f,o,v,s[v],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=i(m,a,v),null===l?c=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(o,e)})),c}function m(o,s,u,c){var l=V(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,m=s=0,y=null,g=u.next();null!==v&&!g.done;m++,g=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=p(o,v,g.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=i(b,s,m),null===f?l=b:f.sibling=b,f=b,v=y}if(g.done)return n(o,v),l;if(null===v){for(;!g.done;m++,g=u.next())null!==(g=d(o,g.value,c))&&(s=i(g,s,m),null===f?l=g:f.sibling=g,f=g);return l}for(v=r(o,v);!g.done;m++,g=u.next())null!==(g=h(v,o,m,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=i(g,s,m),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(o,e)})),l}return function(e,r,i,u){var c="object"===typeof i&&null!==i&&i.type===E&&null===i.key;c&&(i=i.props.children);var l="object"===typeof i&&null!==i;if(l)switch(i.$$typeof){case x:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(i.type===E){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Ei(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===E?((r=Gu(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Yu(i.type,i.key,i.props,null,e.mode,u)).ref=Ei(e,r,i),u.return=e,e=u)}return s(e);case O:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qu(i,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Ju(i,e.mode,u)).return=e,e=r),s(e);if(Oi(i))return v(e,r,i,u);if(V(i))return m(e,r,i,u);if(l&&Di(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,Y(e.type)||"Component"))}return n(e,r)}}var Ci=Si(!0),ji=Si(!1),_i={},Ai=co(_i),Ni=co(_i),Ti=co(_i);function Mi(e){if(e===_i)throw Error(a(174));return e}function Fi(e,t){switch(fo(Ti,t),fo(Ni,e),fo(Ai,_i),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ai),fo(Ai,t)}function Ri(){lo(Ai),lo(Ni),lo(Ti)}function Pi(e){Mi(Ti.current);var t=Mi(Ai.current),n=he(t,e.type);t!==n&&(fo(Ni,e),fo(Ai,n))}function Bi(e){Ni.current===e&&(lo(Ai),lo(Ni))}var Li=co(0);function Ii(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zi=null,Ui=null,Vi=!1;function $i(e,t){var n=Hu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Hi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function qi(e){if(Vi){var t=Ui;if(t){var n=t;if(!Hi(e,t)){if(!(t=Gr(n.nextSibling))||!Hi(e,t))return e.flags=-1025&e.flags|2,Vi=!1,void(zi=e);$i(zi,n)}zi=e,Ui=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,Vi=!1,zi=e}}function Wi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zi=e}function Yi(e){if(e!==zi)return!1;if(!Vi)return Wi(e),Vi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Ui;t;)$i(e,t),t=Gr(t.nextSibling);if(Wi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ui=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ui=null}}else Ui=zi?Gr(e.stateNode.nextSibling):null;return!0}function Gi(){Ui=zi=null,Vi=!1}var Ki=[];function Ji(){for(var e=0;e<Ki.length;e++)Ki[e]._workInProgressVersionPrimary=null;Ki.length=0}var Qi=w.ReactCurrentDispatcher,Xi=w.ReactCurrentBatchConfig,Zi=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Zi=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qi.current=null===e||null===e.memoizedState?Ma:Fa,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Qi.current=Ra,e=n(r,o)}while(oa)}if(Qi.current=Ta,t=null!==ta&&null!==ta.next,Zi=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ca(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function la(e,t){return"function"===typeof t?t(e):t}function fa(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.lane;if((Zi&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,ea.lanes|=l,Us|=l}c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,lr(r,t.memoizedState)||(Ba=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);lr(i,t.memoizedState)||(Ba=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Zi&e)===e)&&(t._workInProgressVersionPrimary=r,Ki.push(t))),e)return n(t._source);throw Ki.push(t),Error(a(350))}function ha(e,t,n,r){var o=Ms;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),u=Qi.current,c=u.useState((function(){return pa(o,t,n)})),l=c[1],f=c[0];c=na;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,v=d.source;d=d.subscribe;var m=ea;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=l;var e=i(t._source);if(!lr(s,e)){e=n(t._source),lr(f,e)||(l(e),e=pu(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var u=31-Ht(a),c=1<<u;r[u]|=e,a&=~c}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pu(m);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),lr(h,n)&&lr(v,t)&&lr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:f}).dispatch=l=Na.bind(null,ea,e),c.queue=e,c.baseQueue=null,f=pa(o,t,n),c.memoizedState=c.baseState=f),f}function va(e,t,n){return ha(ca(),e,t,n)}function ma(e){var t=ua();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:e}).dispatch=Na.bind(null,ea,e),[t.memoizedState,e]}function ya(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ga(e){return e={current:e},ua().memoizedState=e}function ba(){return ca().memoizedState}function ka(e,t,n,r){var o=ua();ea.flags|=e,o.memoizedState=ya(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ya(t,n,i,r)}ea.flags|=e,o.memoizedState=ya(1|t,n,i,r)}function xa(e,t){return ka(516,4,e,t)}function Oa(e,t){return wa(516,4,e,t)}function Ea(e,t){return wa(4,2,e,t)}function Da(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Sa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,Da.bind(null,t,e),n)}function Ca(){}function ja(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _a(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Aa(e,t){var n=qo();Yo(98>n?98:n,(function(){e(!0)})),Yo(97<n?97:n,(function(){var n=Xi.transition;Xi.transition=1;try{e(!1),t()}finally{Xi.transition=n}}))}function Na(e,t,n){var r=du(),o=pu(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=a(s,n);if(i.eagerReducer=a,i.eagerState=u,lr(u,s))return}catch(c){}hu(e,o,r)}}var Ta={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Ma={readContext:si,useCallback:function(e,t){return ua().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ka(4,2,Da.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ka(4,2,e,t)},useMemo:function(e,t){var n=ua();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ua();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Na.bind(null,ea,e),[r.memoizedState,e]},useRef:ga,useState:ma,useDebugValue:Ca,useDeferredValue:function(e){var t=ma(e),n=t[0],r=t[1];return xa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=ma(!1),t=e[0];return ga(e=Aa.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ua();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Vi){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Jr++).toString(36))),Error(a(355))})),n=ma(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ya(5,(function(){n("r:"+(Jr++).toString(36))}),void 0,null)),t}return ma(t="r:"+(Jr++).toString(36)),t},unstable_isNewReconciler:!1},Fa={readContext:si,useCallback:ja,useContext:si,useEffect:Oa,useImperativeHandle:Sa,useLayoutEffect:Ea,useMemo:_a,useReducer:fa,useRef:ba,useState:function(){return fa(la)},useDebugValue:Ca,useDeferredValue:function(e){var t=fa(la),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=fa(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return fa(la)[0]},unstable_isNewReconciler:!1},Ra={readContext:si,useCallback:ja,useContext:si,useEffect:Oa,useImperativeHandle:Sa,useLayoutEffect:Ea,useMemo:_a,useReducer:da,useRef:ba,useState:function(){return da(la)},useDebugValue:Ca,useDeferredValue:function(e){var t=da(la),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=da(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return da(la)[0]},unstable_isNewReconciler:!1},Pa=w.ReactCurrentOwner,Ba=!1;function La(e,t,n,r){t.child=null===e?ji(t,null,n,r):Ci(t,e.child,n,r)}function Ia(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||Ba?(t.flags|=1,La(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function za(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||qu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Yu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Wu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,o,i){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Ba=!1,0===(i&o))return t.lanes=e.lanes,is(e,t,i);0!==(16384&e.flags)&&(Ba=!0)}return Ha(e,t,n,r,i)}function Va(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},xu(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},xu(t,e),null;t.memoizedState={baseLanes:0},xu(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,xu(t,r);return La(e,t,o,n),t.child}function $a(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ha(e,t,n,r,o){var i=go(n)?mo:ho.current;return i=yo(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||Ba?(t.flags|=1,La(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function qa(e,t,n,r,o){if(go(n)){var i=!0;xo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ki(t,n,r),xi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=si(c):c=yo(t,c=go(n)?mo:ho.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&wi(t,a,r,c),ui=!1;var d=t.memoizedState;a.state=d,hi(t,r,a,o),u=t.memoizedState,s!==r||d!==u||vo.current||ui?("function"===typeof l&&(yi(t,n,l,r),u=t.memoizedState),(s=ui||bi(t,n,s,r,d,u,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,li(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xo(t.type,s),a.props=c,f=t.pendingProps,d=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=si(u):u=yo(t,u=go(n)?mo:ho.current);var p=n.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||d!==u)&&wi(t,a,r,u),ui=!1,d=t.memoizedState,a.state=d,hi(t,r,a,o);var h=t.memoizedState;s!==f||d!==h||vo.current||ui?("function"===typeof p&&(yi(t,n,p,r),h=t.memoizedState),(c=ui||bi(t,n,c,r,d,h,u))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Wa(e,t,n,r,i,o)}function Wa(e,t,n,r,o,i){$a(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&Oo(t,n,!1),is(e,t,i);r=t.stateNode,Pa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ci(t,e.child,null,i),t.child=Ci(t,null,s,i)):La(e,t,s,i),t.memoizedState=r.state,o&&Oo(t,n,!0),t.child}function Ya(e){var t=e.stateNode;t.pendingContext?ko(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ko(0,t.context,!1),Fi(e,t.containerInfo)}var Ga,Ka,Ja,Qa={dehydrated:null,retryLane:0};function Xa(e,t,n){var r,o=t.pendingProps,i=Li.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),fo(Li,1&i),null===e?(void 0!==o.fallback&&qi(t),e=o.children,i=o.fallback,a?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,e):"number"===typeof o.unstable_expectedLoadTime?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,t.lanes=33554432,e):((n=Ku({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Qa,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Za(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=Ku(t,o,0,null),n=Gu(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Wu(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Wu(a,s),null!==e?r=Wu(e,r):(r=Gu(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(La(e,t,r.children,n),0!==(2&(r=Li.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Li,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ii(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ii(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Us|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Wu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Wu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Vi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return go(t.type)&&bo(),null;case 3:return Ri(),lo(vo),lo(ho),Ji(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Yi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Bi(t);var i=Mi(Ti.current);if(n=t.type,null!==e&&null!=t.stateNode)Ka(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Mi(Ai.current),Yi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xr]=t,r[Zr]=s,n){case"dialog":Ar("cancel",r),Ar("close",r);break;case"iframe":case"object":case"embed":Ar("load",r);break;case"video":case"audio":for(e=0;e<Sr.length;e++)Ar(Sr[e],r);break;case"source":Ar("error",r);break;case"img":case"image":case"link":Ar("error",r),Ar("load",r);break;case"details":Ar("toggle",r);break;case"input":ee(r,s),Ar("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ar("invalid",r);break;case"textarea":ue(r,s),Ar("invalid",r)}for(var c in Ee(n,s),e=null,s)s.hasOwnProperty(c)&&(i=s[c],"children"===c?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):u.hasOwnProperty(c)&&null!=i&&"onScroll"===c&&Ar("scroll",r));switch(n){case"input":J(r),re(r,s,!0);break;case"textarea":J(r),le(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=zr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===i.nodeType?i:i.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Zr]=r,Ga(e,t),t.stateNode=e,c=De(n,r),n){case"dialog":Ar("cancel",e),Ar("close",e),i=r;break;case"iframe":case"object":case"embed":Ar("load",e),i=r;break;case"video":case"audio":for(i=0;i<Sr.length;i++)Ar(Sr[i],e);i=r;break;case"source":Ar("error",e),i=r;break;case"img":case"image":case"link":Ar("error",e),Ar("load",e),i=r;break;case"details":Ar("toggle",e),i=r;break;case"input":ee(e,r),i=Z(e,r),Ar("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Ar("invalid",e);break;case"textarea":ue(e,r),i=se(e,r),Ar("invalid",e);break;default:i=r}Ee(n,i);var l=i;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?xe(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&ye(e,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&ge(e,f):"number"===typeof f&&ge(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Ar("scroll",e):null!=f&&k(e,s,f,c))}switch(n){case"input":J(e),re(e,r,!1);break;case"textarea":J(e),le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+G(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=zr)}$r(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ja(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Mi(Ti.current),Mi(Ai.current),Yi(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return lo(Li),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Yi(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Li.current)?0===Ls&&(Ls=3):(0!==Ls&&3!==Ls||(Ls=4),null===Ms||0===(134217727&Us)&&0===(134217727&Vs)||gu(Ms,Rs))),(r||n)&&(t.flags|=4),null);case 4:return Ri(),null===e&&Tr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(lo(Li),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=r.rendering))if(s)as(r,!1);else{if(0!==Ls||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Ii(e))){for(t.flags|=64,as(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fo(Li,1&Li.current|2),t.child}e=e.sibling}null!==r.tail&&Ho()>Ws&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Ii(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Vi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ho()-r.renderingStartTime>Ws&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ho(),n.sibling=null,t=Li.current,fo(Li,s?1&t|2:1&t),n):null;case 23:case 24:return Ou(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function us(e){switch(e.tag){case 1:go(e.type)&&bo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ri(),lo(vo),lo(ho),Ji(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Bi(e),null;case 13:return lo(Li),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return lo(Li),null;case 4:return Ri(),null;case 10:return oi(e),null;case 23:case 24:return Ou(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function ls(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ka=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Mi(Ai.current);var a,s=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=zr)}for(f in Ee(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var c=i[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Ar("scroll",e),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===R?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(t.updateQueue=f)&&(t.flags|=4)}},Ja=function(e,t,n,r){n!==r&&(t.flags|=4)};var fs="function"===typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=fi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Js||(Js=!0,Qs=r),ls(0,t)},n}function ps(e,t,n){(n=fi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return ls(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Xs?Xs=new Set([this]):Xs.add(this),ls(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"===typeof WeakSet?WeakSet:Set;function vs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){zu(e,n)}else t.current=null}function ms(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Yr(t.stateNode.containerInfo))}throw Error(a(163))}function ys(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Bu(n,e),Pu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&vi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}vi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&$r(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function gs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Do&&"function"===typeof Do.onCommitFiberUnmount)try{Do.onCommitFiberUnmount(Eo,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Bu(t,n);else{r=t;try{o()}catch(i){zu(r,i)}}n=n.next}while(n!==e)}break;case 1:if(vs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){zu(t,i)}break;case 5:vs(t);break;case 4:Ds(e,t)}}function ks(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ws(e){return 5===e.tag||3===e.tag||4===e.tag}function xs(e){e:{for(var t=e.return;null!==t;){if(ws(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ws(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Os(e,n,t):Es(e,n,t)}function Os(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=zr));else if(4!==r&&null!==(e=e.child))for(Os(e,t,n),e=e.sibling;null!==e;)Os(e,t,n),e=e.sibling}function Es(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Es(e,t,n),e=e.sibling;null!==e;)Es(e,t,n),e=e.sibling}function Ds(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,u=o,c=u;;)if(bs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,u=o.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bs(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Ss(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),De(e,o),t=De(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?xe(n,u):"dangerouslySetInnerHTML"===s?ye(n,u):"children"===s?ge(n,u):k(n,s,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(qs=Ho(),gs(t.child,!0)),void Cs(t);case 19:return void Cs(t);case 23:case 24:return void gs(t,null!==t.memoizedState)}throw Error(a(163))}function Cs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Vu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function js(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var _s=Math.ceil,As=w.ReactCurrentDispatcher,Ns=w.ReactCurrentOwner,Ts=0,Ms=null,Fs=null,Rs=0,Ps=0,Bs=co(0),Ls=0,Is=null,zs=0,Us=0,Vs=0,$s=0,Hs=null,qs=0,Ws=1/0;function Ys(){Ws=Ho()+500}var Gs,Ks=null,Js=!1,Qs=null,Xs=null,Zs=!1,eu=null,tu=90,nu=[],ru=[],ou=null,iu=0,au=null,su=-1,uu=0,cu=0,lu=null,fu=!1;function du(){return 0!==(48&Ts)?Ho():-1!==su?su:su=Ho()}function pu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===qo()?1:2;if(0===uu&&(uu=zs),0!==Qo.transition){0!==cu&&(cu=null!==Hs?Hs.pendingLanes:0),e=uu;var t=4186112&~cu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=qo(),0!==(4&Ts)&&98===e?e=zt(12,uu):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),uu),e}function hu(e,t,n){if(50<iu)throw iu=0,au=null,Error(a(185));if(null===(e=vu(e,t)))return null;$t(e,t,n),e===Ms&&(Vs|=t,4===Ls&&gu(e,Rs));var r=qo();1===t?0!==(8&Ts)&&0===(48&Ts)?bu(e):(mu(e,n),0===Ts&&(Ys(),Ko())):(0===(4&Ts)||98!==r&&99!==r||(null===ou?ou=new Set([e]):ou.add(e)),mu(e,n)),Hs=e}function vu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function mu(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-Ht(s),c=1<<u,l=i[u];if(-1===l){if(0===(c&r)||0!==(c&o)){l=t,Bt(c);var f=Pt;i[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=t&&(e.expiredLanes|=c);s&=~c}if(r=Lt(e,e===Ms?Rs:0),t=Pt,0===r)null!==n&&(n!==Lo&&jo(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Lo&&jo(n)}15===t?(n=bu.bind(null,e),null===zo?(zo=[n],Uo=Co(Mo,Jo)):zo.push(n),n=Lo):14===t?n=Go(99,bu.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Go(n,yu.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function yu(e){if(su=-1,cu=uu=0,0!==(48&Ts))throw Error(a(327));var t=e.callbackNode;if(Ru()&&e.callbackNode!==t)return null;var n=Lt(e,e===Ms?Rs:0);if(0===n)return null;var r=n,o=Ts;Ts|=16;var i=Su();for(Ms===e&&Rs===r||(Ys(),Eu(e,r));;)try{_u();break}catch(u){Du(e,u)}if(ri(),As.current=i,Ts=o,null!==Fs?r=0:(Ms=null,Rs=0,r=Ls),0!==(zs&Vs))Eu(e,0);else if(0!==r){if(2===r&&(Ts|=64,e.hydrate&&(e.hydrate=!1,Yr(e.containerInfo)),0!==(n=It(e))&&(r=Cu(e,n))),1===r)throw t=Is,Eu(e,0),gu(e,n),mu(e,Ho()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Tu(e);break;case 3:if(gu(e,n),(62914560&n)===n&&10<(r=qs+500-Ho())){if(0!==Lt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){du(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=qr(Tu.bind(null,e),r);break}Tu(e);break;case 4:if(gu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Ht(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=Ho()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*_s(n/1960))-n)){e.timeoutHandle=qr(Tu.bind(null,e),n);break}Tu(e);break;default:throw Error(a(329))}}return mu(e,Ho()),e.callbackNode===t?yu.bind(null,e):null}function gu(e,t){for(t&=~$s,t&=~Vs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function bu(e){if(0!==(48&Ts))throw Error(a(327));if(Ru(),e===Ms&&0!==(e.expiredLanes&Rs)){var t=Rs,n=Cu(e,t);0!==(zs&Vs)&&(n=Cu(e,t=Lt(e,t)))}else n=Cu(e,t=Lt(e,0));if(0!==e.tag&&2===n&&(Ts|=64,e.hydrate&&(e.hydrate=!1,Yr(e.containerInfo)),0!==(t=It(e))&&(n=Cu(e,t))),1===n)throw n=Is,Eu(e,0),gu(e,t),mu(e,Ho()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tu(e),mu(e,Ho()),null}function ku(e,t){var n=Ts;Ts|=1;try{return e(t)}finally{0===(Ts=n)&&(Ys(),Ko())}}function wu(e,t){var n=Ts;Ts&=-2,Ts|=8;try{return e(t)}finally{0===(Ts=n)&&(Ys(),Ko())}}function xu(e,t){fo(Bs,Ps),Ps|=t,zs|=t}function Ou(){Ps=Bs.current,lo(Bs)}function Eu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Wr(n)),null!==Fs)for(n=Fs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bo();break;case 3:Ri(),lo(vo),lo(ho),Ji();break;case 5:Bi(r);break;case 4:Ri();break;case 13:case 19:lo(Li);break;case 10:oi(r);break;case 23:case 24:Ou()}n=n.return}Ms=e,Fs=Wu(e.current,null),Rs=Ps=zs=t,Ls=0,Is=null,$s=Vs=Us=0}function Du(e,t){for(;;){var n=Fs;try{if(ri(),Qi.current=Ta,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Zi=0,na=ta=ea=null,oa=!1,Ns.current=null,null===n||null===n.return){Ls=1,Is=t,Fs=null;break}e:{var i=e,a=n.return,s=n,u=t;if(t=Rs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.lanes=l.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&Li.current),d=a;do{var p;if(p=13===d.tag){var h=d.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var v=d.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var m=d.updateQueue;if(null===m){var y=new Set;y.add(c),d.updateQueue=y}else m.add(c);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var g=fi(-1,1);g.tag=2,di(s,g)}s.lanes|=1;break e}u=void 0,s=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new fs,u=new Set,b.set(c,u)):void 0===(u=b.get(c))&&(u=new Set,b.set(c,u)),!u.has(s)){u.add(s);var k=Uu.bind(null,i,c,s);c.then(k,k)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);u=Error((Y(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ls&&(Ls=2),u=cs(u,s),d=a;do{switch(d.tag){case 3:i=u,d.flags|=4096,t&=-t,d.lanes|=t,pi(d,ds(0,i,t));break e;case 1:i=u;var w=d.type,x=d.stateNode;if(0===(64&d.flags)&&("function"===typeof w.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Xs||!Xs.has(x)))){d.flags|=4096,t&=-t,d.lanes|=t,pi(d,ps(d,i,t));break e}}d=d.return}while(null!==d)}Nu(n)}catch(O){t=O,Fs===n&&null!==n&&(Fs=n=n.return);continue}break}}function Su(){var e=As.current;return As.current=Ta,null===e?Ta:e}function Cu(e,t){var n=Ts;Ts|=16;var r=Su();for(Ms===e&&Rs===t||Eu(e,t);;)try{ju();break}catch(o){Du(e,o)}if(ri(),Ts=n,As.current=r,null!==Fs)throw Error(a(261));return Ms=null,Rs=0,Ls}function ju(){for(;null!==Fs;)Au(Fs)}function _u(){for(;null!==Fs&&!_o();)Au(Fs)}function Au(e){var t=Gs(e.alternate,e,Ps);e.memoizedProps=e.pendingProps,null===t?Nu(e):Fs=t,Ns.current=null}function Nu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Ps)))return void(Fs=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ps)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=us(t)))return n.flags&=2047,void(Fs=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Fs=t);Fs=t=e}while(null!==t);0===Ls&&(Ls=5)}function Tu(e){var t=qo();return Yo(99,Mu.bind(null,e,t)),null}function Mu(e,t){do{Ru()}while(null!==eu);if(0!==(48&Ts))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<i;){var c=31-Ht(i),l=1<<c;o[c]=0,s[c]=-1,u[c]=-1,i&=~l}if(null!==ou&&0===(24&r)&&ou.has(e)&&ou.delete(e),e===Ms&&(Fs=Ms=null,Rs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Ts,Ts|=32,Ns.current=null,Ur=Kt,yr(s=mr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(l=u.getSelection&&u.getSelection())&&0!==l.rangeCount){u=l.anchorNode,i=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{u.nodeType,c.nodeType}catch(S){u=null;break e}var f=0,d=-1,p=-1,h=0,v=0,m=s,y=null;t:for(;;){for(var g;m!==u||0!==i&&3!==m.nodeType||(d=f+i),m!==c||0!==l&&3!==m.nodeType||(p=f+l),3===m.nodeType&&(f+=m.nodeValue.length),null!==(g=m.firstChild);)y=m,m=g;for(;;){if(m===s)break t;if(y===u&&++h===i&&(d=f),y===c&&++v===l&&(p=f),null!==(g=m.nextSibling))break;y=(m=y).parentNode}m=g}u=-1===d||-1===p?null:{start:d,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Vr={focusedElem:s,selectionRange:u},Kt=!1,lu=null,fu=!1,Ks=r;do{try{Fu()}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);lu=null,Ks=r;do{try{for(s=e;null!==Ks;){var b=Ks.flags;if(16&b&&ge(Ks.stateNode,""),128&b){var k=Ks.alternate;if(null!==k){var w=k.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:xs(Ks),Ks.flags&=-3;break;case 6:xs(Ks),Ks.flags&=-3,Ss(Ks.alternate,Ks);break;case 1024:Ks.flags&=-1025;break;case 1028:Ks.flags&=-1025,Ss(Ks.alternate,Ks);break;case 4:Ss(Ks.alternate,Ks);break;case 8:Ds(s,u=Ks);var x=u.alternate;ks(u),null!==x&&ks(x)}Ks=Ks.nextEffect}}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);if(w=Vr,k=mr(),b=w.focusedElem,s=w.selectionRange,k!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==s&&yr(b)&&(k=s.start,void 0===(w=s.end)&&(w=k),"selectionStart"in b?(b.selectionStart=k,b.selectionEnd=Math.min(w,b.value.length)):(w=(k=b.ownerDocument||document)&&k.defaultView||window).getSelection&&(w=w.getSelection(),u=b.textContent.length,x=Math.min(s.start,u),s=void 0===s.end?x:Math.min(s.end,u),!w.extend&&x>s&&(u=s,s=x,x=u),u=hr(b,x),i=hr(b,s),u&&i&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&((k=k.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),x>s?(w.addRange(k),w.extend(i.node,i.offset)):(k.setEnd(i.node,i.offset),w.addRange(k))))),k=[];for(w=b;w=w.parentNode;)1===w.nodeType&&k.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<k.length;b++)(w=k[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Kt=!!Ur,Vr=Ur=null,e.current=n,Ks=r;do{try{for(b=e;null!==Ks;){var O=Ks.flags;if(36&O&&ys(b,Ks.alternate,Ks),128&O){k=void 0;var E=Ks.ref;if(null!==E){var D=Ks.stateNode;Ks.tag,k=D,"function"===typeof E?E(k):E.current=k}}Ks=Ks.nextEffect}}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);Ks=null,Io(),Ts=o}else e.current=n;if(Zs)Zs=!1,eu=e,tu=t;else for(Ks=r;null!==Ks;)t=Ks.nextEffect,Ks.nextEffect=null,8&Ks.flags&&((O=Ks).sibling=null,O.stateNode=null),Ks=t;if(0===(r=e.pendingLanes)&&(Xs=null),1===r?e===au?iu++:(iu=0,au=e):iu=0,n=n.stateNode,Do&&"function"===typeof Do.onCommitFiberRoot)try{Do.onCommitFiberRoot(Eo,n,void 0,64===(64&n.current.flags))}catch(S){}if(mu(e,Ho()),Js)throw Js=!1,e=Qs,Qs=null,e;return 0!==(8&Ts)||Ko(),null}function Fu(){for(;null!==Ks;){var e=Ks.alternate;fu||null===lu||(0!==(8&Ks.flags)?et(Ks,lu)&&(fu=!0):13===Ks.tag&&js(e,Ks)&&et(Ks,lu)&&(fu=!0));var t=Ks.flags;0!==(256&t)&&ms(e,Ks),0===(512&t)||Zs||(Zs=!0,Go(97,(function(){return Ru(),null}))),Ks=Ks.nextEffect}}function Ru(){if(90!==tu){var e=97<tu?97:tu;return tu=90,Yo(e,Lu)}return!1}function Pu(e,t){nu.push(t,e),Zs||(Zs=!0,Go(97,(function(){return Ru(),null})))}function Bu(e,t){ru.push(t,e),Zs||(Zs=!0,Go(97,(function(){return Ru(),null})))}function Lu(){if(null===eu)return!1;var e=eu;if(eu=null,0!==(48&Ts))throw Error(a(331));var t=Ts;Ts|=32;var n=ru;ru=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===i)throw Error(a(330));zu(i,c)}}for(n=nu,nu=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var u=o.create;o.destroy=u()}catch(c){if(null===i)throw Error(a(330));zu(i,c)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return Ts=t,Ko(),!0}function Iu(e,t,n){di(e,t=ds(0,t=cs(n,t),1)),t=du(),null!==(e=vu(e,1))&&($t(e,1,t),mu(e,t))}function zu(e,t){if(3===e.tag)Iu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Iu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r))){var o=ps(n,e=cs(t,e),1);if(di(n,o),o=du(),null!==(n=vu(n,1)))$t(n,1,o),mu(n,o);else if("function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function Uu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=du(),e.pingedLanes|=e.suspendedLanes&n,Ms===e&&(Rs&n)===n&&(4===Ls||3===Ls&&(62914560&Rs)===Rs&&500>Ho()-qs?Eu(e,0):$s|=n),mu(e,t)}function Vu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===qo()?1:2:(0===uu&&(uu=zs),0===(t=Ut(62914560&~uu))&&(t=4194304))),n=du(),null!==(e=vu(e,t))&&($t(e,t,n),mu(e,n))}function $u(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hu(e,t,n,r){return new $u(e,t,n,r)}function qu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Wu(e,t){var n=e.alternate;return null===n?((n=Hu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Yu(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)qu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case E:return Gu(n.children,o,i,t);case P:s=8,o|=16;break;case D:s=8,o|=1;break;case S:return(e=Hu(12,n,t,8|o)).elementType=S,e.type=S,e.lanes=i,e;case A:return(e=Hu(13,n,t,o)).type=A,e.elementType=A,e.lanes=i,e;case N:return(e=Hu(19,n,t,o)).elementType=N,e.lanes=i,e;case B:return Ku(n,o,i,t);case L:return(e=Hu(24,n,t,o)).elementType=L,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case j:s=9;break e;case _:s=11;break e;case T:s=14;break e;case M:s=16,r=null;break e;case F:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Hu(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Gu(e,t,n,r){return(e=Hu(7,e,r,t)).lanes=n,e}function Ku(e,t,n,r){return(e=Hu(23,e,r,t)).elementType=B,e.lanes=n,e}function Ju(e,t,n){return(e=Hu(6,e,null,t)).lanes=n,e}function Qu(e,t,n){return(t=Hu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xu(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Vt(0),this.expirationTimes=Vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vt(0),this.mutableSourceEagerHydrationData=null}function Zu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:O,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ec(e,t,n,r){var o=t.current,i=du(),s=pu(o);e:if(n){t:{if(Je(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(go(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(go(c)){n=wo(n,c,u);break e}}n=u}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=fi(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),di(o,t),hu(o,s,i),s}function tc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rc(e,t){nc(e,t),(e=e.alternate)&&nc(e,t)}function oc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xu(e,t,null!=n&&!0===n.hydrate),t=Hu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ci(t),e[eo]=n.current,Tr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ac(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=tc(a);s.call(e)}}ec(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new oc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var u=o;o=function(){var e=tc(a);u.call(e)}}wu((function(){ec(t,a,e,o)}))}return tc(a)}function sc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return Zu(e,t,null,n)}Gs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||vo.current)Ba=!0;else{if(0===(n&r)){switch(Ba=!1,t.tag){case 3:Ya(t),Gi();break;case 5:Pi(t);break;case 1:go(t.type)&&xo(t);break;case 4:Fi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fo(Zo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Xa(e,t,n):(fo(Li,1&Li.current),null!==(t=is(e,t,n))?t.sibling:null);fo(Li,1&Li.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),fo(Li,Li.current),r)break;return null;case 23:case 24:return t.lanes=0,Va(e,t,n)}return is(e,t,n)}Ba=0!==(16384&e.flags)}else Ba=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=yo(t,ho.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,go(r)){var i=!0;xo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ci(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&yi(t,r,s,e),o.updater=gi,t.stateNode=o,o._reactInternals=t,xi(t,r,e,n),t=Wa(null,t,r,!0,i,n)}else t.tag=0,La(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return qu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===_)return 11;if(e===T)return 14}return 2}(o),e=Xo(o,e),i){case 0:t=Ha(null,t,o,e,n);break e;case 1:t=qa(null,t,o,e,n);break e;case 11:t=Ia(null,t,o,e,n);break e;case 14:t=za(null,t,o,Xo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ha(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 1:return r=t.type,o=t.pendingProps,qa(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 3:if(Ya(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,li(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Gi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Ui=Gr(t.stateNode.containerInfo.firstChild),zi=t,i=Vi=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Ki.push(i);for(n=ji(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else La(e,t,r,n),Gi();t=t.child}return t;case 5:return Pi(t),null===e&&qi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,Hr(r,o)?s=null:null!==i&&Hr(r,i)&&(t.flags|=16),$a(e,t),La(e,t,s,n),t.child;case 6:return null===e&&qi(t),null;case 13:return Xa(e,t,n);case 4:return Fi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ci(t,null,r,n):La(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ia(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 7:return La(e,t,t.pendingProps,n),t.child;case 8:case 12:return La(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(fo(Zo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0===(i=lr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!vo.current){t=is(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&i)){1===u.tag&&((l=fi(-1,n&-n)).tag=2,di(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),ii(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}La(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,La(e,t,r,n),t.child;case 14:return i=Xo(o=t.type,t.pendingProps),za(e,t,o,i=Xo(o.type,i),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,go(r)?(e=!0,xo(t)):e=!1,ai(t,n),ki(t,r,o),xi(t,r,o,n),Wa(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return Va(e,t,n)}throw Error(a(156,t.tag))},oc.prototype.render=function(e){ec(e,this._internalRoot,null,null)},oc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ec(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hu(e,4,du()),rc(e,4))},nt=function(e){13===e.tag&&(hu(e,67108864,du()),rc(e,67108864))},rt=function(e){if(13===e.tag){var t=du(),n=pu(e);hu(e,n,t),rc(e,n)}},ot=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Q(r),ne(r,o)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Me=ku,Fe=function(e,t,n,r,o){var i=Ts;Ts|=4;try{return Yo(98,e.bind(null,t,n,r,o))}finally{0===(Ts=i)&&(Ys(),Ko())}},Re=function(){0===(49&Ts)&&(function(){if(null!==ou){var e=ou;ou=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,mu(e,Ho())}))}Ko()}(),Ru())},Pe=function(e,t){var n=Ts;Ts|=2;try{return e(t)}finally{0===(Ts=n)&&(Ys(),Ko())}};var uc={Events:[ro,oo,io,Ne,Te,Ru,{current:!1}]},cc={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},lc={bundleType:cc.bundleType,version:cc.version,rendererPackageName:cc.rendererPackageName,rendererConfig:cc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:cc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{Eo=fc.inject(lc),Do=fc}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uc,t.createPortal=sc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ts;if(0!==(48&n))return e(t);Ts|=1;try{if(e)return Yo(99,e.bind(null,t))}finally{Ts=n,Ko()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(wu((function(){ac(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=ku,t.unstable_createPortal=function(e,t){return sc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ac(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(33)},function(e,t,n){"use strict";var r,o,i,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,d=function e(){if(null!==l)try{var n=t.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var v=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,y=null,g=-1,b=5,k=0;t.unstable_shouldYield=function(){return t.unstable_now()>=k},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,x=w.port2;w.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();k=e+b;try{y(!0,e)?x.postMessage(null):(m=!1,y=null)}catch(n){throw x.postMessage(null),n}}else m=!1},r=function(e){y=e,m||(m=!0,x.postMessage(null))},o=function(e,n){g=p((function(){e(t.unstable_now())}),n)},i=function(){h(g),g=-1}}function O(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<S(o,t)))break e;e[r]=t,e[n]=o,n=r}}function E(e){return void 0===(e=e[0])?null:e}function D(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>S(a,n))void 0!==u&&0>S(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],j=[],_=1,A=null,N=3,T=!1,M=!1,F=!1;function R(e){for(var t=E(j);null!==t;){if(null===t.callback)D(j);else{if(!(t.startTime<=e))break;D(j),t.sortIndex=t.expirationTime,O(C,t)}t=E(j)}}function P(e){if(F=!1,R(e),!M)if(null!==E(C))M=!0,r(B);else{var t=E(j);null!==t&&o(P,t.startTime-e)}}function B(e,n){M=!1,F&&(F=!1,i()),T=!0;var r=N;try{for(R(n),A=E(C);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"===typeof a){A.callback=null,N=A.priorityLevel;var s=a(A.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?A.callback=s:A===E(C)&&D(C),R(n)}else D(C);A=E(C)}if(null!==A)var u=!0;else{var c=E(j);null!==c&&o(P,c.startTime-n),u=!1}return u}finally{A=null,N=r,T=!1}}var L=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||T||(M=!0,r(B))},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_getFirstCallbackNode=function(){return E(C)},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=L,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:_++,callback:n,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(e.sortIndex=a,O(j,e),null===E(C)&&e===E(j)&&(F?i():F=!0,o(P,a-s))):(e.sortIndex=u,O(C,e),M||T||(M=!0,r(B))),e},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}}},function(e,t,n){"use strict";n(19);var r=n(2),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";e.exports=n(36)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,k=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case p:case y:case m:case c:return e;default:return t}}case i:return t}}}function O(e){return x(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||x(e)===f},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===u},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===u||e===s||e===h||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===k||e.$$typeof===w||e.$$typeof===g)},t.typeOf=x},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"FunctionToString",(function(){return ye})),n.d(r,"InboundFilters",(function(){return be}));var o=n(0);function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var a=n(2),s=n.n(a),u=n(11),c=n.n(u);function l(e){return l="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},l(e)}function f(){f=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(j){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new D(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(j){return{type:"throw",arg:j}}}e.wrap=u;var d={};function p(){}function h(){}function v(){}var m={};s(m,o,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(S([])));g&&g!==t&&n.call(g,o)&&(m=g);var b=v.prototype=p.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(o,i,a,s){var u=c(e[o],e,i);if("throw"!==u.type){var f=u.arg,d=f.value;return d&&"object"==l(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){f.value=e,a(f)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=v,s(b,"constructor",v),s(v,"constructor",h),h.displayName=s(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},k(w.prototype),s(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new w(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(b),s(b,a,"Generator"),s(b,o,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function d(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,s,"next",e)}function s(e){d(i,r,o,a,s,"throw",e)}a(void 0)}))}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function k(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(ur){return!1}}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,t){if(t&&("object"===l(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function O(e){var t=k();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}var E=n(4),D=n(2).createContext({site:{},member:{},action:"",brandColor:"",pageData:{},onAction:function(e,t){return{action:e,data:t}}}),S=n(1),C=["children","head","title","style","onResize"],j=function(e){g(n,e);var t=O(n);function n(){var e;h(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).handleLoad=function(){e.setupFrameBaseStyle()},e}return m(n,[{key:"componentDidMount",value:function(){this.node.addEventListener("load",this.handleLoad)}},{key:"componentWillUnmout",value:function(){this.node.removeEventListener("load",this.handleLoad)}},{key:"setupFrameBaseStyle",value:function(){var e=this;if(this.node.contentDocument){var t,n;if(this.iframeHtml=this.node.contentDocument.documentElement,this.iframeHead=this.node.contentDocument.head,this.iframeRoot=this.node.contentDocument.body,this.forceUpdate(),this.props.onResize)null===(t=new ResizeObserver((function(t){return e.props.onResize(e.iframeRoot)})))||void 0===t||null===(n=t.observe)||void 0===n||n.call(t,this.iframeRoot);this.node.contentWindow.addEventListener("keydown",(function(e){window.dispatchEvent(new KeyboardEvent("keydown",e))}))}}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.head,a=t.title,s=void 0===a?"":a,c=t.style,l=void 0===c?{}:c,f=(t.onResize,i(t,C));return Object(S.jsxs)("iframe",Object(o.a)(Object(o.a)({srcDoc:"<!DOCTYPE html>"},f),{},{ref:function(t){return e.node=t},title:s,style:l,frameBorder:"0",children:[this.iframeHead&&Object(u.createPortal)(r,this.iframeHead),this.iframeRoot&&Object(u.createPortal)(n,this.iframeRoot)]}))}}]),n}(a.Component),_=["children","type","style"],A=function(e){var t,n=e.children,r=e.type,s=e.style,u=i(e,_),c=Object(a.useContext)(D).stylesUrl,l="dynamic"===(r=null!==(t=r)&&void 0!==t?t:"dynamic")?{width:"100%",height:"400px"}:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},f=Object(a.useState)(l),d=Object(E.a)(f,2),p=d[0],h=d[1],v=Object(a.useState)(!1),m=Object(E.a)(v,2),y=m[0],g=m[1],b=Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("link",{rel:"stylesheet",href:c,onLoad:function(){g(!0)}}),Object(S.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n body, html {\n overflow: hidden;\n }\n "}}),Object(S.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}),k=Object(o.a)(Object(o.a)({},p),s);return Object(S.jsx)(j,Object(o.a)(Object(o.a)({},u),{},{head:b,style:k,onResize:"dynamic"===r?function(e){h((function(t){return Object(o.a)(Object(o.a)({},t),{},{height:"".concat(e.scrollHeight,"px")})}))}:null,children:y&&n}))},N=n(9),T=n(10),M=n(12);function F(){var e=Object(N.a)(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0".concat(t);return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function R(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function P(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function B(e){var t=e.message,n=e.event_id;if(t)return t;var r=P(e);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"<unknown>":n||"<unknown>"}function L(e,t,n){var r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function I(e,t){var n=P(e);if(n){var r=n.mechanism;if(n.mechanism=Object(o.a)(Object(o.a)(Object(o.a)({},{type:"generic",handled:!0}),r),t),t&&"data"in t){var i=Object(o.a)(Object(o.a)({},r&&r.data),t.data);n.mechanism.data=i}}}function z(e){if(e&&e.__sentry_captured__)return!0;try{Object(T.a)(e,"__sentry_captured__",!0)}catch(t){}return!1}var U,V=n(23),$=Object(N.a)(),H="Sentry Logger ",q=["debug","info","warn","error","log","assert","trace"];function W(e){var t=Object(N.a)();if(!("console"in t))return e();var n=t.console,r={};q.forEach((function(e){var o=n[e]&&n[e].__sentry_original__;e in t.console&&o&&(r[e]=n[e],n[e]=o)}));try{return e()}finally{Object.keys(r).forEach((function(e){n[e]=r[e]}))}}function Y(){var e=!1,t={enable:function(){e=!0},disable:function(){e=!1}};return"undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?q.forEach((function(n){t[n]=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];e&&W((function(){var e;(e=$.console)[n].apply(e,["".concat(H,"[").concat(n,"]:")].concat(r))}))}})):q.forEach((function(e){t[e]=function(){}})),t}U="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Object(N.b)("logger",Y):Y();var G,K=n(15),J=n(3),Q=n(5),X=n(7);function Z(e){return new te((function(t){t(e)}))}function ee(e){return new te((function(t,n){n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(G||(G={}));var te=function(){function e(t){h(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(ur){this._reject(ur)}}return m(e,[{key:"__init",value:function(){this._state=G.PENDING}},{key:"__init2",value:function(){this._handlers=[]}},{key:"then",value:function(t,n){var r=this;return new e((function(e,o){r._handlers.push([!1,function(n){if(t)try{e(t(n))}catch(ur){o(ur)}else e(n)},function(t){if(n)try{e(n(t))}catch(ur){o(ur)}else o(t)}]),r._executeHandlers()}))}},{key:"catch",value:function(e){return this.then((function(e){return e}),e)}},{key:"finally",value:function(t){var n=this;return new e((function(e,r){var o,i;return n.then((function(e){i=!1,o=e,t&&t()}),(function(e){i=!0,o=e,t&&t()})).then((function(){i?r(o):e(o)}))}))}},{key:"__init3",value:function(){var e=this;this._resolve=function(t){e._setResult(G.RESOLVED,t)}}},{key:"__init4",value:function(){var e=this;this._reject=function(t){e._setResult(G.REJECTED,t)}}},{key:"__init5",value:function(){var e=this;this._setResult=function(t,n){e._state===G.PENDING&&(Object(X.n)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))}}},{key:"__init6",value:function(){var e=this;this._executeHandlers=function(){if(e._state!==G.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t[0]||(e._state===G.RESOLVED&&t[1](e._value),e._state===G.REJECTED&&t[2](e._value),t[0]=!0)}))}}}}]),e}();function ne(e){var t=Object(V.b)(),n={sid:F(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:function(){return function(e){return Object(T.c)({sid:"".concat(e.sid),init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?"".concat(e.did):void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)}};return e&&re(n,e),n}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(V.b)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:F()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(t.did)),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}var oe=function(){function e(){h(this,e),this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return m(e,[{key:"addScopeListener",value:function(e){this._scopeListeners.push(e)}},{key:"addEventProcessor",value:function(e){return this._eventProcessors.push(e),this}},{key:"setUser",value:function(e){return this._user=e||{},this._session&&re(this._session,{user:e}),this._notifyScopeListeners(),this}},{key:"getUser",value:function(){return this._user}},{key:"getRequestSession",value:function(){return this._requestSession}},{key:"setRequestSession",value:function(e){return this._requestSession=e,this}},{key:"setTags",value:function(e){return this._tags=Object(o.a)(Object(o.a)({},this._tags),e),this._notifyScopeListeners(),this}},{key:"setTag",value:function(e,t){return this._tags=Object(o.a)(Object(o.a)({},this._tags),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setExtras",value:function(e){return this._extra=Object(o.a)(Object(o.a)({},this._extra),e),this._notifyScopeListeners(),this}},{key:"setExtra",value:function(e,t){return this._extra=Object(o.a)(Object(o.a)({},this._extra),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setFingerprint",value:function(e){return this._fingerprint=e,this._notifyScopeListeners(),this}},{key:"setLevel",value:function(e){return this._level=e,this._notifyScopeListeners(),this}},{key:"setTransactionName",value:function(e){return this._transactionName=e,this._notifyScopeListeners(),this}},{key:"setContext",value:function(e,t){return null===t?delete this._contexts[e]:this._contexts=Object(o.a)(Object(o.a)({},this._contexts),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setSpan",value:function(e){return this._span=e,this._notifyScopeListeners(),this}},{key:"getSpan",value:function(){return this._span}},{key:"getTransaction",value:function(){var e=this.getSpan();return e&&e.transaction}},{key:"setSession",value:function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}},{key:"getSession",value:function(){return this._session}},{key:"update",value:function(t){if(!t)return this;if("function"===typeof t){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=Object(o.a)(Object(o.a)({},this._tags),t._tags),this._extra=Object(o.a)(Object(o.a)({},this._extra),t._extra),this._contexts=Object(o.a)(Object(o.a)({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):Object(X.i)(t)&&(this._tags=Object(o.a)(Object(o.a)({},this._tags),t.tags),this._extra=Object(o.a)(Object(o.a)({},this._extra),t.extra),this._contexts=Object(o.a)(Object(o.a)({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}},{key:"clear",value:function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}},{key:"addBreadcrumb",value:function(e,t){var n="number"===typeof t?Math.min(t,100):100;if(n<=0)return this;var r=Object(o.a)({timestamp:Object(V.a)()},e);return this._breadcrumbs=[].concat(Object(J.a)(this._breadcrumbs),[r]).slice(-n),this._notifyScopeListeners(),this}},{key:"clearBreadcrumbs",value:function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}},{key:"addAttachment",value:function(e){return this._attachments.push(e),this}},{key:"getAttachments",value:function(){return this._attachments}},{key:"clearAttachments",value:function(){return this._attachments=[],this}},{key:"applyToEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._extra&&Object.keys(this._extra).length&&(e.extra=Object(o.a)(Object(o.a)({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=Object(o.a)(Object(o.a)({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=Object(o.a)(Object(o.a)({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=Object(o.a)(Object(o.a)({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=Object(o.a)({trace:this._span.getTraceContext()},e.contexts);var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags=Object(o.a)({transaction:n},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=[].concat(Object(J.a)(e.breadcrumbs||[]),Object(J.a)(this._breadcrumbs)),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata=Object(o.a)(Object(o.a)({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),this._notifyEventProcessors([].concat(Object(J.a)(ie()),Object(J.a)(this._eventProcessors)),e,t)}},{key:"setSDKProcessingMetadata",value:function(e){return this._sdkProcessingMetadata=Object(o.a)(Object(o.a)({},this._sdkProcessingMetadata),e),this}},{key:"_notifyEventProcessors",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new te((function(a,s){var u=e[i];if(null===t||"function"!==typeof u)a(t);else{var c=u(Object(o.a)({},t),n);("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&u.id&&null===c&&U.log('Event processor "'.concat(u.id,'" dropped event')),Object(X.n)(c)?c.then((function(t){return r._notifyEventProcessors(e,t,n,i+1).then(a)})).then(null,s):r._notifyEventProcessors(e,c,n,i+1).then(a).then(null,s)}}))}},{key:"_notifyScopeListeners",value:function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)}},{key:"_applyFingerprint",value:function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}],[{key:"clone",value:function(t){var n=new e;return t&&(n._breadcrumbs=Object(J.a)(t._breadcrumbs),n._tags=Object(o.a)({},t._tags),n._extra=Object(o.a)({},t._extra),n._contexts=Object(o.a)({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=Object(J.a)(t._eventProcessors),n._requestSession=t._requestSession,n._attachments=Object(J.a)(t._attachments)),n}}]),e}();function ie(){return Object(N.b)("globalEventProcessors",(function(){return[]}))}function ae(e){ie().push(e)}var se,ue=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new oe,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4;h(this,e),this._version=r,e.prototype.__init.call(this),this.getStackTop().scope=n,t&&this.bindClient(t)}return m(e,[{key:"__init",value:function(){this._stack=[{}]}},{key:"isOlderThan",value:function(e){return this._version<e}},{key:"bindClient",value:function(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}},{key:"pushScope",value:function(){var e=oe.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}},{key:"popScope",value:function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}},{key:"withScope",value:function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}},{key:"getClient",value:function(){return this.getStackTop().client}},{key:"getScope",value:function(){return this.getStackTop().scope}},{key:"getStack",value:function(){return this._stack}},{key:"getStackTop",value:function(){return this._stack[this._stack.length-1]}},{key:"captureException",value:function(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:F(),r=new Error("Sentry syntheticException");return this._withClient((function(i,a){i.captureException(e,Object(o.a)(Object(o.a)({originalException:e,syntheticException:r},t),{},{event_id:n}),a)})),n}},{key:"captureMessage",value:function(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:F(),i=new Error(e);return this._withClient((function(a,s){a.captureMessage(e,t,Object(o.a)(Object(o.a)({originalException:e,syntheticException:i},n),{},{event_id:r}),s)})),r}},{key:"captureEvent",value:function(e,t){var n=t&&t.event_id?t.event_id:F();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((function(r,i){r.captureEvent(e,Object(o.a)(Object(o.a)({},t),{},{event_id:n}),i)})),n}},{key:"lastEventId",value:function(){return this._lastEventId}},{key:"addBreadcrumb",value:function(e,t){var n=this.getStackTop(),r=n.scope,i=n.client;if(r&&i){var a=i.getOptions&&i.getOptions()||{},s=a.beforeBreadcrumb,u=void 0===s?null:s,c=a.maxBreadcrumbs,l=void 0===c?100:c;if(!(l<=0)){var f=Object(V.a)(),d=Object(o.a)({timestamp:f},e),p=u?W((function(){return u(d,t)})):d;null!==p&&r.addBreadcrumb(p,l)}}}},{key:"setUser",value:function(e){var t=this.getScope();t&&t.setUser(e)}},{key:"setTags",value:function(e){var t=this.getScope();t&&t.setTags(e)}},{key:"setExtras",value:function(e){var t=this.getScope();t&&t.setExtras(e)}},{key:"setTag",value:function(e,t){var n=this.getScope();n&&n.setTag(e,t)}},{key:"setExtra",value:function(e,t){var n=this.getScope();n&&n.setExtra(e,t)}},{key:"setContext",value:function(e,t){var n=this.getScope();n&&n.setContext(e,t)}},{key:"configureScope",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client;n&&r&&e(n)}},{key:"run",value:function(e){var t=le(this);try{e(this)}finally{le(t)}}},{key:"getIntegration",value:function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Cannot retrieve integration ".concat(e.id," from the current Hub")),null}}},{key:"startTransaction",value:function(e,t){return this._callExtensionMethod("startTransaction",e,t)}},{key:"traceHeaders",value:function(){return this._callExtensionMethod("traceHeaders")}},{key:"captureSession",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e)return this.endSession();this._sendSessionUpdate()}},{key:"endSession",value:function(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){var n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),re(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}},{key:"startSession",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client,i=r&&r.getOptions()||{},a=i.release,s=i.environment,u=(Object(N.a)().navigator||{}).userAgent,c=ne(Object(o.a)(Object(o.a)(Object(o.a)({release:a,environment:s},n&&{user:n.getUser()}),u&&{userAgent:u}),e));if(n){var l=n.getSession&&n.getSession();l&&"ok"===l.status&&re(l,{status:"exited"}),this.endSession(),n.setSession(c)}return c}},{key:"shouldSendDefaultPii",value:function(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}},{key:"_sendSessionUpdate",value:function(){var e=this.getStackTop(),t=e.scope,n=e.client;if(t){var r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}}},{key:"_withClient",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client;r&&e(r,n)}},{key:"_callExtensionMethod",value:function(e){var t=ce(),n=t.__SENTRY__;if(n&&n.extensions&&"function"===typeof n.extensions[e]){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.extensions[e].apply(this,o)}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Extension method ".concat(e," couldn't be found, doing nothing."))}}]),e}();function ce(){var e=Object(N.a)();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function le(e){var t=ce(),n=pe(t);return he(t,e),n}function fe(){var e=ce();return de(e)&&!pe(e).isOlderThan(4)||he(e,new ue),Object(K.b)()?function(e){try{var t=ce().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return pe(e);if(!de(n)||pe(n).isOlderThan(4)){var r=pe(e).getStackTop();he(n,new ue(r.client,oe.clone(r.scope)))}return pe(n)}catch(o){return pe(e)}}(e):pe(e)}function de(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function pe(e){return Object(N.b)("hub",(function(){return new ue}),e)}function he(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function ve(e,t){return fe().captureException(e,{captureContext:t})}function me(e){fe().withScope(e)}var ye=function(){function e(){h(this,e),e.prototype.__init.call(this)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){se=Function.prototype.toString,Function.prototype.toString=function(){for(var e=Object(T.f)(this)||this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return se.apply(e,n)}}}],[{key:"__initStatic",value:function(){this.id="FunctionToString"}}]),e}();ye.__initStatic();var ge=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],be=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this._options=t,e.prototype.__init.call(this)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(t,n){var r=function(t){var r=n();if(r){var o=r.getIntegration(e);if(o){var i=r.getClient(),a=i?i.getOptions():{},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[].concat(Object(J.a)(e.allowUrls||[]),Object(J.a)(t.allowUrls||[])),denyUrls:[].concat(Object(J.a)(e.denyUrls||[]),Object(J.a)(t.denyUrls||[])),ignoreErrors:[].concat(Object(J.a)(e.ignoreErrors||[]),Object(J.a)(t.ignoreErrors||[]),ge),ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(o._options,a);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(ur){}return!1}(e))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat(B(e))),!0;if(function(e,t){if(!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=void 0===n?"":n,o=t.value,i=void 0===o?"":o;return["".concat(i),"".concat(r,": ").concat(i)]}catch(a){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Cannot extract message for event ".concat(B(e))),[]}return[]}(e).some((function(e){return t.some((function(t){return Object(M.a)(e,t)}))}))}(e,t.ignoreErrors))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(B(e))),!0;if(function(e,t){if(!t||!t.length)return!1;var n=ke(e);return!!n&&t.some((function(e){return Object(M.a)(n,e)}))}(e,t.denyUrls))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(B(e),".\nUrl: ").concat(ke(e))),!0;if(!function(e,t){if(!t||!t.length)return!0;var n=ke(e);return!n||t.some((function(e){return Object(M.a)(n,e)}))}(e,t.allowUrls))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(B(e),".\nUrl: ").concat(ke(e))),!0;return!1}(t,s)?null:t}}return t};r.id=this.name,t(r)}}],[{key:"__initStatic",value:function(){this.id="InboundFilters"}}]),e}();function ke(e){try{var t;try{t=e.exception.values[0].stacktrace.frames}catch(ur){}return t?function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.length-1;t>=0;t--){var n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(n){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Cannot extract url for event ".concat(B(e))),null}}be.__initStatic();var we=[];function xe(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function Oe(e){var t=e.defaultIntegrations&&Object(J.a)(e.defaultIntegrations)||[],n=e.integrations,r=Object(J.a)(xe(t));Array.isArray(n)?r=[].concat(Object(J.a)(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))}))),Object(J.a)(xe(n))):"function"===typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o,i=r.map((function(e){return e.name})),a="Debug";-1!==i.indexOf(a)&&(o=r).push.apply(o,Object(J.a)(r.splice(i.indexOf(a),1)));return r}function Ee(e,t){!0===t.debug&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?U.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=fe(),r=n.getScope();r&&r.update(t.initialScope);var o=new e(t);n.bindClient(o)}function De(e,t,n){return De=k()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&y(o,n.prototype),o},De.apply(null,arguments)}function Se(e){var t="function"===typeof Map?new Map:void 0;return Se=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return De(e,arguments,b(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},Se(e)}var Ce=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),(r=t.call(this,e)).message=e,r.name=(this instanceof n?this.constructor:void 0).prototype.constructor.name,Object.setPrototypeOf(w(r),(this instanceof n?this.constructor:void 0).prototype),r}return m(n)}(Se(Error)),je=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function _e(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.host,r=e.path,o=e.pass,i=e.port,a=e.projectId,s=e.protocol,u=e.publicKey;return"".concat(s,"://").concat(u).concat(t&&o?":".concat(o):"")+"@".concat(n).concat(i?":".concat(i):"","/").concat(r?"".concat(r,"/"):r).concat(a)}function Ae(e){var t=je.exec(e);if(!t)throw new Ce("Invalid Sentry Dsn: ".concat(e));var n=t.slice(1),r=Object(E.a)(n,6),o=r[0],i=r[1],a=r[2],s=void 0===a?"":a,u=r[3],c=r[4],l=void 0===c?"":c,f="",d=r[5],p=d.split("/");if(p.length>1&&(f=p.slice(0,-1).join("/"),d=p.pop()),d){var h=d.match(/^\d+/);h&&(d=h[0])}return Ne({host:u,pass:s,path:f,projectId:d,port:l,protocol:o,publicKey:i})}function Ne(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Te(e){var t="string"===typeof e?Ae(e):Ne(e);return function(e){if("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){var t=e.port,n=e.projectId,r=e.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(t){if(!e[t])throw new Ce("Invalid Sentry Dsn: ".concat(t," missing"))})),!n.match(/^\d+$/))throw new Ce("Invalid Sentry Dsn: Invalid projectId ".concat(n));if(!function(e){return"http"===e||"https"===e}(r))throw new Ce("Invalid Sentry Dsn: Invalid protocol ".concat(r));if(t&&isNaN(parseInt(t,10)))throw new Ce("Invalid Sentry Dsn: Invalid port ".concat(t))}}(t),t}function Me(e){var t=e.protocol?"".concat(e.protocol,":"):"",n=e.port?":".concat(e.port):"";return"".concat(t,"//").concat(e.host).concat(n).concat(e.path?"/".concat(e.path):"","/api/")}function Fe(e,t){return t||"".concat(function(e){return"".concat(Me(e)).concat(e.projectId,"/envelope/")}(e),"?").concat(function(e){return Object(T.h)({sentry_key:e.publicKey,sentry_version:"7"})}(e))}function Re(e,t){var n=Te(e),r="".concat(Me(n),"embed/error-page/"),o="dsn=".concat(_e(n));for(var i in t)if("dsn"!==i)if("user"===i){var a=t.user;if(!a)continue;a.name&&(o+="&name=".concat(encodeURIComponent(a.name))),a.email&&(o+="&email=".concat(encodeURIComponent(a.email)))}else o+="&".concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t[i]));return"".concat(r,"?").concat(o)}var Pe=n(16);function Be(){if(!("fetch"in Object(N.a)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(ur){return!1}}function Le(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var Ie,ze=n(6),Ue=Object(N.a)(),Ve={},$e={};function He(e){if(!$e[e])switch($e[e]=!0,e){case"console":!function(){if(!("console"in Ue))return;q.forEach((function(e){e in Ue.console&&Object(T.e)(Ue.console,e,(function(t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];We("console",{args:r,level:e}),t&&t.apply(Ue.console,r)}}))}))}();break;case"dom":!function(){if(!("document"in Ue))return;var e=We.bind(null,"dom"),t=Ze(e,!0);Ue.document.addEventListener("click",t,!1),Ue.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((function(t){var n=Ue[t]&&Ue[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(T.e)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{var i=this,a=i.__sentry_instrumentation_handlers__=i.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var u=Ze(e);s.handler=u,t.call(this,n,u,o)}s.refCount+=1}catch(ur){}return t.call(this,n,r,o)}})),Object(T.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{var o=this,i=o.__sentry_instrumentation_handlers__||{},a=i[t];a&&(a.refCount-=1,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete o.__sentry_instrumentation_handlers__)}catch(ur){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Ue))return;var e=XMLHttpRequest.prototype;Object(T.e)(e,"open",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this,i=n[1],a=o.__sentry_xhr__={method:Object(X.l)(n[0])?n[0].toUpperCase():n[0],url:n[1]};Object(X.l)(i)&&"POST"===a.method&&i.match(/sentry_key/)&&(o.__sentry_own_request__=!0);var s=function(){if(4===o.readyState){try{a.status_code=o.status}catch(ur){}We("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:o})}};return"onreadystatechange"in o&&"function"===typeof o.onreadystatechange?Object(T.e)(o,"onreadystatechange",(function(e){return function(){s();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(o,n)}})):o.addEventListener("readystatechange",s),e.apply(o,n)}})),Object(T.e)(e,"send",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.__sentry_xhr__&&void 0!==n[0]&&(this.__sentry_xhr__.body=n[0]),We("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),e.apply(this,n)}}))}();break;case"fetch":!function(){if(!function(){if(!Be())return!1;var e=Object(N.a)();if(Le(e.fetch))return!0;var t=!1,n=e.document;if(n&&"function"===typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Le(r.contentWindow.fetch)),n.head.removeChild(r)}catch(o){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",o)}return t}())return;Object(T.e)(Ue,"fetch",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i={args:n,fetchData:{method:Ye(n),url:Ge(n)},startTimestamp:Date.now()};return We("fetch",Object(o.a)({},i)),e.apply(Ue,n).then((function(e){return We("fetch",Object(o.a)(Object(o.a)({},i),{},{endTimestamp:Date.now(),response:e})),e}),(function(e){throw We("fetch",Object(o.a)(Object(o.a)({},i),{},{endTimestamp:Date.now(),error:e})),e}))}}))}();break;case"history":!function(){if(!function(){var e=Object(N.a)(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}())return;var e=Ue.onpopstate;function t(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length>2?n[2]:void 0;if(o){var i=Ie,a=String(o);Ie=a,We("history",{from:i,to:a})}return e.apply(this,n)}}Ue.onpopstate=function(){var t=Ue.location.href,n=Ie;if(Ie=t,We("history",{from:n,to:t}),e)try{for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(this,o)}catch(a){}},Object(T.e)(Ue.history,"pushState",t),Object(T.e)(Ue.history,"replaceState",t)}();break;case"error":et=Ue.onerror,Ue.onerror=function(e,t,n,r,o){return We("error",{column:r,error:o,line:n,msg:e,url:t}),!!et&&et.apply(this,arguments)};break;case"unhandledrejection":tt=Ue.onunhandledrejection,Ue.onunhandledrejection=function(e){return We("unhandledrejection",e),!tt||tt.apply(this,arguments)};break;default:return void(("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("unknown instrumentation type:",e))}}function qe(e,t){Ve[e]=Ve[e]||[],Ve[e].push(t),He(e)}function We(e,t){if(e&&Ve[e]){var n,r=Object(ze.a)(Ve[e]||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{o(t)}catch(ur){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Error while triggering instrumentation handler.\nType: ".concat(e,"\nName: ").concat(Object(Pe.b)(o),"\nError:"),ur)}}}catch(i){r.e(i)}finally{r.f()}}}function Ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"Request"in Ue&&Object(X.g)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"string"===typeof e[0]?e[0]:"Request"in Ue&&Object(X.g)(e[0],Request)?e[0].url:String(e[0])}var Ke,Je;function Qe(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(ur){}return!1}function Xe(e){if("keypress"!==e.type)return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(ur){}return!0}function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){if(n&&Je!==n&&!Xe(n)){var r="keypress"===n.type?"input":n.type;(void 0===Ke||Qe(Je,n))&&(e({event:n,name:r,global:t}),Je=n),clearTimeout(Ke),Ke=Ue.setTimeout((function(){Ke=void 0}),1e3)}}}var et=null;var tt=null;function nt(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}function rt(){return rt="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=nt(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},rt.apply(this,arguments)}var ot="7.5.0";function it(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[e,t]}function at(e,t){var n=Object(E.a)(e,2),r=n[0],o=n[1];return[r,[].concat(Object(J.a)(o),[t])]}function st(e,t){e[1].forEach((function(e){var n=e[0].type;t(e,n)}))}function ut(e,t){return(t||new TextEncoder).encode(e)}function ct(e,t){var n=Object(E.a)(e,2),r=n[0],o=n[1],i=JSON.stringify(r);function a(e){"string"===typeof i?i="string"===typeof e?i+e:[ut(i,t),e]:i.push("string"===typeof e?ut(e,t):e)}var s,u=Object(ze.a)(o);try{for(u.s();!(s=u.n()).done;){var c=s.value,l=Object(E.a)(c,2),f=l[0],d=l[1];a("\n".concat(JSON.stringify(f),"\n")),a("string"===typeof d||d instanceof Uint8Array?d:JSON.stringify(d))}}catch(p){u.e(p)}finally{u.f()}return"string"===typeof i?i:function(e){var t,n=e.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),o=0,i=Object(ze.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;r.set(a,o),o+=a.length}}catch(p){i.e(p)}finally{i.f()}return r}(i)}function lt(e,t){var n="string"===typeof e.data?ut(e.data,t):e.data;return[Object(T.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var ft={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function dt(e){return ft[e]}var pt=n(46);function ht(e){if(e&&e.sdk){var t=e.sdk;return{name:t.name,version:t.version}}}function vt(e,t,n,r){var i=ht(n),a=e.type||"event",s=(e.sdkProcessingMetadata||{}).transactionSampling||{},u=s.method,c=s.rate;!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[].concat(Object(J.a)(e.sdk.integrations||[]),Object(J.a)(t.integrations||[])),e.sdk.packages=[].concat(Object(J.a)(e.sdk.packages||[]),Object(J.a)(t.packages||[])))}(e,n&&n.sdk);var l=function(e,t,n,r){var i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baggage,a=i&&function(e){return e[0]}(i);return Object(o.a)(Object(o.a)(Object(o.a)({event_id:e.event_id,sent_at:(new Date).toISOString()},t&&{sdk:t}),!!n&&{dsn:_e(r)}),"transaction"===e.type&&a&&{trace:Object(T.c)(Object(o.a)({},a))})}(e,i,r,t);return delete e.sdkProcessingMetadata,it(l,[[{type:a,sample_rates:[{id:u,rate:c}]},e]])}var mt="Not capturing exception because it's already been captured.",yt=function(){function e(t){if(h(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._options=t,t.dsn){this._dsn=Te(t.dsn);var n=Fe(this._dsn,t.tunnel);this._transport=t.transport(Object(o.a)(Object(o.a)({recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{},{url:n}))}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("No DSN provided, client will not do anything.")}return m(e,[{key:"__init",value:function(){this._integrations={}}},{key:"__init2",value:function(){this._integrationsInitialized=!1}},{key:"__init3",value:function(){this._numProcessing=0}},{key:"__init4",value:function(){this._outcomes={}}},{key:"captureException",value:function(e,t,n){var r=this;if(!z(e)){var o=t&&t.event_id;return this._process(this.eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log(mt)}},{key:"captureMessage",value:function(e,t,n,r){var o=this,i=n&&n.event_id,a=Object(X.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i}},{key:"captureEvent",value:function(e,t,n){if(!(t&&t.originalException&&z(t.originalException))){var r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){r=e}))),r}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log(mt)}},{key:"captureSession",value:function(e){this._isEnabled()?"string"!==typeof e.release?("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),re(e,{init:!1})):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("SDK not enabled, will not capture session.")}},{key:"getDsn",value:function(){return this._dsn}},{key:"getOptions",value:function(){return this._options}},{key:"getTransport",value:function(){return this._transport}},{key:"flush",value:function(e){var t=this._transport;return t?this._isClientDoneProcessing(e).then((function(n){return t.flush(e).then((function(e){return n&&e}))})):Z(!0)}},{key:"close",value:function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))}},{key:"setupIntegrations",value:function(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){var t={};return e.forEach((function(e){t[e.name]=e,-1===we.indexOf(e.name)&&(e.setupOnce(ae,fe),we.push(e.name),("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Integration installed: ".concat(e.name)))})),t}(this._options.integrations),this._integrationsInitialized=!0)}},{key:"getIntegrationById",value:function(e){return this._integrations[e]}},{key:"getIntegration",value:function(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Cannot retrieve integration ".concat(e.id," from the current Client")),null}}},{key:"sendEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._dsn){var n,r=vt(e,this._dsn,this._options._metadata,this._options.tunnel),o=Object(ze.a)(t.attachments||[]);try{for(o.s();!(n=o.n()).done;){var i=n.value;r=at(r,lt(i,this._options.transportOptions&&this._options.transportOptions.textEncoder))}}catch(a){o.e(a)}finally{o.f()}this._sendEnvelope(r)}}},{key:"sendSession",value:function(e){if(this._dsn){var t=function(e,t,n,r){var i=ht(n);return it(Object(o.a)(Object(o.a)({sent_at:(new Date).toISOString()},i&&{sdk:i}),!!r&&{dsn:_e(t)}),["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}},{key:"recordDroppedEvent",value:function(e,t){if(this._options.sendClientReports){var n="".concat(e,":").concat(t);("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log('Adding outcome: "'.concat(n,'"')),this._outcomes[n]=this._outcomes[n]+1||1}}},{key:"_updateSessionFromEvent",value:function(e,t){var n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;var a,s=Object(ze.a)(i);try{for(s.s();!(a=s.n()).done;){var u=a.value.mechanism;if(u&&!1===u.handled){n=!0;break}}}catch(l){s.e(l)}finally{s.f()}}var c="ok"===e.status;(c&&0===e.errors||c&&n)&&(re(e,Object(o.a)(Object(o.a)({},n&&{status:"crashed"}),{},{errors:e.errors||Number(r||n)})),this.captureSession(e))}},{key:"_isClientDoneProcessing",value:function(e){var t=this;return new te((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))}},{key:"_isEnabled",value:function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}},{key:"_prepareEvent",value:function(e,t,n){var r=this,i=this.getOptions(),a=i.normalizeDepth,s=void 0===a?3:a,u=i.normalizeMaxBreadth,c=void 0===u?1e3:u,l=Object(o.a)(Object(o.a)({},e),{},{event_id:e.event_id||t.event_id||F(),timestamp:e.timestamp||Object(V.a)()});this._applyClientOptions(l),this._applyIntegrationsMetadata(l);var f=n;t.captureContext&&(f=oe.clone(f).update(t.captureContext));var d=Z(l);if(f){var p=[].concat(Object(J.a)(t.attachments||[]),Object(J.a)(f.getAttachments()));p.length&&(t.attachments=p),d=f.applyToEvent(l,t)}return d.then((function(e){return"number"===typeof s&&s>0?r._normalizeEvent(e,s,c):e}))}},{key:"_normalizeEvent",value:function(e,t,n){if(!e)return null;var r=Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return Object(o.a)(Object(o.a)({},e),e.data&&{data:Object(pt.a)(e.data,t,n)})}))}),e.user&&{user:Object(pt.a)(e.user,t,n)}),e.contexts&&{contexts:Object(pt.a)(e.contexts,t,n)}),e.extra&&{extra:Object(pt.a)(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(pt.a)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((function(e){return e.data&&(e.data=Object(pt.a)(e.data,t,n)),e}))),r}},{key:"_applyClientOptions",value:function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Object(M.d)(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(M.d)(s.value,a));var u=e.request;u&&u.url&&(u.url=Object(M.d)(u.url,a))}},{key:"_applyIntegrationsMetadata",value:function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[].concat(Object(J.a)(e.sdk.integrations||[]),Object(J.a)(t)))}},{key:"_captureEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn(e)}))}},{key:"_processEvent",value:function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;if(!this._isEnabled())return ee(new Ce("SDK not enabled, will not capture event."));var s="transaction"===e.type;return!s&&"number"===typeof a&&Math.random()>a?(this.recordDroppedEvent("sample_rate","error"),ee(new Ce("Discarding event because it's not included in the random sample (sampling rate = ".concat(a,")")))):this._prepareEvent(e,t,n).then((function(n){if(null===n)throw r.recordDroppedEvent("event_processor",e.type||"error"),new Ce("An event processor returned null, will not send event.");return t.data&&!0===t.data.__sentry__||s||!i?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Object(X.n)(e))return e.then((function(e){if(!Object(X.i)(e)&&null!==e)throw new Ce(t);return e}),(function(e){throw new Ce("beforeSend rejected with ".concat(e))}));if(!Object(X.i)(e)&&null!==e)throw new Ce(t);return e}(i(n,t))})).then((function(o){if(null===o)throw r.recordDroppedEvent("before_send",e.type||"error"),new Ce("`beforeSend` returned `null`, will not send event.");var i=n&&n.getSession();return!s&&i&&r._updateSessionFromEvent(i,o),r.sendEvent(o,t),o})).then(null,(function(e){if(e instanceof Ce)throw e;throw r.captureException(e,{data:{__sentry__:!0},originalException:e}),new Ce("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(e))}))}},{key:"_process",value:function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))}},{key:"_sendEnvelope",value:function(e){this._transport&&this._dsn?this._transport.send(e).then(null,(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Error while sending event:",e)})):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Transport disabled")}},{key:"_clearOutcomes",value:function(){var e=this._outcomes;return this._outcomes={},Object.keys(e).map((function(t){var n=t.split(":"),r=Object(E.a)(n,2);return{reason:r[0],category:r[1],quantity:e[t]}}))}}]),e}();function gt(e,t){var n=kt(e,t),r={type:t&&t.name,value:xt(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function bt(e,t){return{exception:{values:[gt(e,t)]}}}function kt(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"===typeof e.framesToPop)return e.framesToPop;if(wt.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(ur){}return[]}var wt=/Minified React error #\d+;/i;function xt(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=r&&r.syntheticException||void 0,a=Dt(e,t,i,o);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Z(a)}function Et(e,t,n,r,i){var a;if(Object(X.e)(t)&&t.error)return bt(e,t.error);if(Object(X.a)(t)||Object(X.b)(t)){var s=t;if("stack"in t)a=bt(e,t);else{var u=s.name||(Object(X.a)(s)?"DOMError":"DOMException"),c=s.message?"".concat(u,": ").concat(s.message):u;L(a=Dt(e,c,n,r),c)}return"code"in s&&(a.tags=Object(o.a)(Object(o.a)({},a.tags),{},{"DOMException.code":"".concat(s.code)})),a}return Object(X.d)(t)?bt(e,t):Object(X.i)(t)||Object(X.f)(t)?(a=function(e,t,n,r){var o={exception:{values:[{type:Object(X.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:"Non-Error ".concat(r?"promise rejection":"exception"," captured with keys: ").concat(Object(T.d)(t))}]},extra:{__serialized__:Object(pt.b)(t)}};if(n){var i=kt(e,n);i.length&&(o.exception.values[0].stacktrace={frames:i})}return o}(e,t,n,i),I(a,{synthetic:!0}),a):(L(a=Dt(e,t,n,r),"".concat(t),void 0),I(a,{synthetic:!0}),a)}function Dt(e,t,n,r){var o={message:t};if(r&&n){var i=kt(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]})}return o}var St=n(25),Ct=["fatal","error","warning","log","info","debug"];function jt(e){return"warn"===e?"warning":Ct.includes(e)?e:"log"}var _t="Breadcrumbs",At=function(){function e(t){h(this,e),e.prototype.__init.call(this),this.options=Object(o.a)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){this.options.console&&qe("console",Nt),this.options.dom&&qe("dom",function(e){function t(t){var n,r="object"===typeof e?e.serializeAttribute:void 0;"string"===typeof r&&(r=[r]);try{n=t.event.target?Object(St.b)(t.event.target,r):Object(St.b)(t.event,r)}catch(ur){n="<unknown>"}0!==n.length&&fe().addBreadcrumb({category:"ui.".concat(t.name),message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&qe("xhr",Tt),this.options.fetch&&qe("fetch",Mt),this.options.history&&qe("history",Ft)}}],[{key:"__initStatic",value:function(){this.id=_t}}]),e}();function Nt(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:jt(e.level),message:Object(M.b)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: ".concat(Object(M.b)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}fe().addBreadcrumb(t,{input:e.args,level:e.level})}function Tt(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;fe().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;}function Mt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?fe().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):fe().addBreadcrumb({category:"fetch",data:Object(o.a)(Object(o.a)({},e.fetchData),{},{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function Ft(e){var t=Object(N.a)(),n=e.from,r=e.to,o=R(t.location.href),i=R(n),a=R(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),fe().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}At.__initStatic();var Rt,Pt=Object(N.a)();function Bt(){if(Rt)return Rt;if(Le(Pt.fetch))return Rt=Pt.fetch.bind(Pt);var e=Pt.document,t=Pt.fetch;if(e&&"function"===typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(ur){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",ur)}return Rt=t.bind(Pt)}var Lt=Object(N.a)(),It=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:ot}],version:ot},r=t.call(this,e),e.sendClientReports&&Lt.document&&Lt.document.addEventListener("visibilitychange",(function(){"hidden"===Lt.document.visibilityState&&r._flushOutcomes()})),r}return m(n,[{key:"eventFromException",value:function(e,t){return function(e,t,n,r){var o=Et(e,t,n&&n.syntheticException||void 0,r);return I(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Z(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}},{key:"eventFromMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return Ot(this._options.stackParser,e,t,n,this._options.attachStacktrace)}},{key:"sendEvent",value:function(e,t){var r=this.getIntegrationById(_t);r&&r.options&&r.options.sentry&&fe().addBreadcrumb({category:"sentry.".concat("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:B(e)},{event:e}),rt(b(n.prototype),"sendEvent",this).call(this,e,t)}},{key:"_prepareEvent",value:function(e,t,r){return e.platform=e.platform||"javascript",rt(b(n.prototype),"_prepareEvent",this).call(this,e,t,r)}},{key:"_flushOutcomes",value:function(){var e=this._clearOutcomes();if(0!==e.length)if(this._dsn){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Sending outcomes:",e);var t,n,r,o=Fe(this._dsn,this._options.tunnel),i=(t=e,it((n=this._options.tunnel&&_e(this._dsn))?{dsn:n}:{},[[{type:"client_report"},{timestamp:r||Object(V.a)(),discarded_events:t}]]));try{!function(e,t){"[object Navigator]"===Object.prototype.toString.call(Pt&&Pt.navigator)&&"function"===typeof Pt.navigator.sendBeacon?Pt.navigator.sendBeacon.bind(Pt.navigator)(e,t):Be()&&Bt()(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error(e)}))}(o,ct(i))}catch(ur){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error(ur)}}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("No dsn provided, will not send outcomes");else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("No outcomes to send")}}]),n}(yt),zt=0;function Ut(){return zt>0}function Vt(){zt+=1,setTimeout((function(){zt-=1}))}function $t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("function"!==typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(Object(T.f)(e))return e}catch(ur){return e}var i=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var i=r.map((function(e){return $t(e,t)}));return e.apply(this,i)}catch(a){throw Vt(),me((function(e){e.addEventProcessor((function(e){return t.mechanism&&(L(e,void 0,void 0),I(e,t.mechanism)),e.extra=Object(o.a)(Object(o.a)({},e.extra),{},{arguments:r}),e})),ve(a)})),a}};try{for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=e[a])}catch(u){}Object(T.g)(i,e),Object(T.a)(e,"__sentry_wrapped__",i);try{var s=Object.getOwnPropertyDescriptor(i,"name");s.configurable&&Object.defineProperty(i,"name",{get:function(){return e.name}})}catch(u){}return i}var Ht="?";function qt(e,t,n,r){var o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var Wt=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yt=/\((\S*)(?::(\d+))(?::(\d+))\)/,Gt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Kt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Jt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Qt=[[30,function(e){var t=Wt.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=Yt.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}var r=Zt(t[1]||Ht,t[2]),o=Object(E.a)(r,2),i=o[0];return qt(o[1],i,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,function(e){var t=Gt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Kt.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],o=t[1]||Ht,i=Zt(o,r),a=Object(E.a)(i,2);return o=a[0],qt(r=a[1],o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,function(e){var t=Jt.exec(e);return t?qt(t[2],t[1]||Ht,+t[3],t[4]?+t[4]:void 0):void 0}]],Xt=Pe.a.apply(void 0,Qt),Zt=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Ht,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},en=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],tn=function(){function e(t){h(this,e),e.prototype.__init.call(this),this._options=Object(o.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){var e=Object(N.a)();this._options.setTimeout&&Object(T.e)(e,"setTimeout",nn),this._options.setInterval&&Object(T.e)(e,"setInterval",nn),this._options.requestAnimationFrame&&Object(T.e)(e,"requestAnimationFrame",rn),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Object(T.e)(XMLHttpRequest.prototype,"send",on);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:en).forEach(an)}}],[{key:"__initStatic",value:function(){this.id="TryCatch"}}]),e}();function nn(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];return n[0]=$t(o,{mechanism:{data:{function:Object(Pe.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,n)}}function rn(e){return function(t){return e.apply(this,[$t(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(Pe.b)(e)},handled:!0,type:"instrument"}})])}}function on(e){return function(){var t=this,n=["onload","onerror","onprogress","onreadystatechange"];n.forEach((function(e){e in t&&"function"===typeof t[e]&&Object(T.e)(t,e,(function(t){var n={mechanism:{data:{function:e,handler:Object(Pe.b)(t)},handled:!0,type:"instrument"}},r=Object(T.f)(t);return r&&(n.mechanism.data.handler=Object(Pe.b)(r)),$t(t,n)}))}));for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(this,o)}}function an(e){var t=Object(N.a)(),n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(T.e)(n,"addEventListener",(function(t){return function(n,r,o){try{"function"===typeof r.handleEvent&&(r.handleEvent=$t(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(Pe.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(i){}return t.apply(this,[n,$t(r,{mechanism:{data:{function:"addEventListener",handler:Object(Pe.b)(r),target:e},handled:!0,type:"instrument"}}),o])}})),Object(T.e)(n,"removeEventListener",(function(e){return function(t,n,r){var o=n;try{var i=o&&o.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(ur){}return e.call(this,t,o,r)}})))}tn.__initStatic();var sn=function(){function e(t){h(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),this._options=Object(o.a)({onerror:!0,onunhandledrejection:!0},t)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"__init2",value:function(){this._installFunc={onerror:un,onunhandledrejection:cn}}},{key:"setupOnce",value:function(){Error.stackTraceLimit=50;var e,t=this._options;for(var n in t){var r=this._installFunc[n];r&&t[n]&&(e=n,("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Global Handler attached: ".concat(e)),r(),this._installFunc[n]=void 0)}}}],[{key:"__initStatic",value:function(){this.id="GlobalHandlers"}}]),e}();function un(){qe("error",(function(e){var t=dn(),n=Object(E.a)(t,3),r=n[0],o=n[1],i=n[2];if(r.getIntegration(sn)){var a=e.msg,s=e.url,u=e.line,c=e.column,l=e.error;if(!(Ut()||l&&l.__sentry_own_request__)){var f=void 0===l&&Object(X.l)(a)?function(e,t,n,r){var o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Object(X.e)(e)?e.message:e,a="Error",s=i.match(o);s&&(a=s[1],i=s[2]);return ln({exception:{values:[{type:a,value:i}]}},t,n,r)}(a,s,u,c):ln(Et(o,l||a,void 0,i,!1),s,u,c);f.level="error",fn(r,l,f,"onerror")}}}))}function cn(){qe("unhandledrejection",(function(e){var t=dn(),n=Object(E.a)(t,3),r=n[0],o=n[1],i=n[2];if(r.getIntegration(sn)){var a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch(u){}if(Ut()||a&&a.__sentry_own_request__)return!0;var s=Object(X.j)(a)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(a))}]}}:Et(o,a,void 0,i,!0);s.level="error",fn(r,a,s,"onunhandledrejection")}}))}function ln(e,t,n,r){var o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},u=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,f=Object(X.l)(t)&&t.length>0?t:Object(St.a)();return 0===u.length&&u.push({colno:c,filename:f,function:"?",in_app:!0,lineno:l}),e}function fn(e,t,n,r){I(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function dn(){var e=fe(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:function(){return[]},attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}sn.__initStatic();var pn="cause",hn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),e.prototype.__init.call(this),this._key=t.key||pn,this._limit=t.limit||5}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){var t=fe().getClient();t&&ae((function(n,r){var o=fe().getIntegration(e);return o?function(e,t,n,r,o){if(!r.exception||!r.exception.values||!o||!Object(X.g)(o.originalException,Error))return r;var i=vn(e,n,o.originalException,t);return r.exception.values=[].concat(Object(J.a)(i),Object(J.a)(r.exception.values)),r}(t.getOptions().stackParser,o._key,o._limit,n,r):n}))}}],[{key:"__initStatic",value:function(){this.id="LinkedErrors"}}]),e}();function vn(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(!Object(X.g)(n[r],Error)||o.length+1>=t)return o;var i=gt(e,n[r]);return vn(e,t,n[r],r,[i].concat(Object(J.a)(o)))}hn.__initStatic();var mn=function(){function e(){h(this,e),e.prototype.__init.call(this)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(t,n){var r=function(t){var r=n().getIntegration(e);if(r){try{if(function(e,t){if(!t)return!1;if(function(e,t){var n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!gn(e,t))return!1;if(!yn(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){var n=bn(t),r=bn(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!gn(e,t))return!1;if(!yn(e,t))return!1;return!0}(e,t))return!0;return!1}(t,r._previousEvent))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){return r._previousEvent=t}return r._previousEvent=t}return t};r.id=this.name,t(r)}}],[{key:"__initStatic",value:function(){this.id="Dedupe"}}]),e}();function yn(e,t){var n=kn(e),r=kn(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++){var i=r[o],a=n[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function gn(e,t){var n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(o){return!1}}function bn(e){return e.exception&&e.exception.values&&e.exception.values[0]}function kn(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}mn.__initStatic();var wn=Object(N.a)(),xn=function(){function e(){h(this,e),e.prototype.__init.call(this)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){ae((function(t){if(fe().getIntegration(e)){if(!wn.navigator&&!wn.location&&!wn.document)return t;var n=t.request&&t.request.url||wn.location&&wn.location.href,r=(wn.document||{}).referrer,i=(wn.navigator||{}).userAgent,a=Object(o.a)(Object(o.a)(Object(o.a)({},t.request&&t.request.headers),r&&{Referer:r}),i&&{"User-Agent":i}),s=Object(o.a)(Object(o.a)({},n&&{url:n}),{},{headers:a});return Object(o.a)(Object(o.a)({},t),{},{request:s})}return t}))}}],[{key:"__initStatic",value:function(){this.id="HttpContext"}}]),e}();function On(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ee(new Ce("Not adding Promise due to buffer limit reached."));var o=r();return-1===t.indexOf(o)&&t.push(o),o.then((function(){return n(o)})).then(null,(function(){return n(o).then(null,(function(){}))})),o},drain:function(e){return new te((function(n,r){var o=t.length;if(!o)return n(!0);var i=setTimeout((function(){e&&e>0&&n(!1)}),e);t.forEach((function(e){Z(e).then((function(){--o||(clearTimeout(i),n(!0))}),r)}))}))}}}xn.__initStatic();function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),n=parseInt("".concat(e),10);if(!isNaN(n))return 1e3*n;var r=Date.parse("".concat(e));return isNaN(r)?6e4:r-t}function Dn(e,t){return e[t]||e.all||0}function Sn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return Dn(e,t)>n}function Cn(e,t){var n=t.statusCode,r=t.headers,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now(),a=Object(o.a)({},e),s=r&&r["x-sentry-rate-limits"],u=r&&r["retry-after"];if(s){var c,l=Object(ze.a)(s.trim().split(","));try{for(l.s();!(c=l.n()).done;){var f=c.value,d=f.split(":",2),p=Object(E.a)(d,2),h=p[0],v=p[1],m=parseInt(h,10),y=1e3*(isNaN(m)?60:m);if(v){var g,b=Object(ze.a)(v.split(";"));try{for(b.s();!(g=b.n()).done;){var k=g.value;a[k]=i+y}}catch(w){b.e(w)}finally{b.f()}}else a.all=i+y}}catch(w){l.e(w)}finally{l.f()}}else u?a.all=i+En(u,i):429===n&&(a.all=i+6e4);return a}function jn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:On(e.bufferSize||30),r={},o=function(e){return n.drain(e)};function i(o){var i=[];if(st(o,(function(t,n){var o=dt(n);Sn(r,o)?e.recordDroppedEvent("ratelimit_backoff",o):i.push(t)})),0===i.length)return Z();var a=it(o[0],i),s=function(t){st(a,(function(n,r){e.recordDroppedEvent(t,dt(r))}))};return n.add((function(){return t({body:ct(a,e.textEncoder)}).then((function(e){void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Sentry responded with status code ".concat(e.statusCode," to sent event.")),r=Cn(r,e)}),(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Failed while sending event:",e),s("network_error")}))})).then((function(e){return e}),(function(e){if(e instanceof Ce)return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Skipped sending event due to full buffer"),s("queue_overflow"),Z();throw e}))}return{send:i,flush:o}}function _n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bt();function n(n){var r=Object(o.a)({body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers},e.fetchOptions);return t(e.url,r).then((function(e){return{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}}))}return jn(e,n)}function An(e){return jn(e,(function(t){return new te((function(n,r){var o=new XMLHttpRequest;for(var i in o.onerror=r,o.onreadystatechange=function(){4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&o.setRequestHeader(i,e.headers[i]);o.send(t.body)}))}))}var Nn=[new r.InboundFilters,new r.FunctionToString,new tn,new At,new sn,new hn,new mn,new xn];function Tn(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function Mn(){if("undefined"!==typeof Object(N.a)().document){var e=fe();e.captureSession&&(Tn(e),qe("history",(function(e){var t=e.from,n=e.to;void 0!==t&&t!==n&&Tn(fe())})))}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")}n(22);var Fn={componentStack:null,error:null,eventId:null},Rn=function(e){g(n,e);var t=O(n);function n(){var e;h(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),n.prototype.__init.call(w(e)),n.prototype.__init2.call(w(e)),e}return m(n,[{key:"__init",value:function(){this.state=Fn}},{key:"componentDidCatch",value:function(e,t){var n=this,r=t.componentStack,i=this.props,s=i.beforeCapture,u=i.onError,c=i.showDialog,l=i.dialogOptions;me((function(t){if(function(e){var t=e.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}(a.version)){var i=new Error(e.message);i.name="React ErrorBoundary ".concat(i.name),i.stack=r,e.cause=i}s&&s(t,e,r);var f=ve(e,{contexts:{react:{componentStack:r}}});u&&u(e,r,f),c&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe(),n=Object(N.a)();if(n.document){var r=t.getStackTop(),i=r.client,a=r.scope,s=e.dsn||i&&i.getDsn();if(s){a&&(e.user=Object(o.a)(Object(o.a)({},a.getUser()),e.user)),e.eventId||(e.eventId=t.lastEventId());var u=n.document.createElement("script");u.async=!0,u.src=Re(s,e),e.onLoad&&(u.onload=e.onLoad);var c=n.document.head||n.document.body;c?c.appendChild(u):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Not injecting report dialog. No injection point found in HTML")}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("DSN not configured for showReportDialog call")}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Global document not defined in showReportDialog call")}(Object(o.a)(Object(o.a)({},l),{},{eventId:f})),n.setState({error:e,componentStack:r,eventId:f})}))}},{key:"componentDidMount",value:function(){var e=this.props.onMount;e&&e()}},{key:"componentWillUnmount",value:function(){var e=this.state,t=e.error,n=e.componentStack,r=e.eventId,o=this.props.onUnmount;o&&o(t,n,r)}},{key:"__init2",value:function(){var e=this;this.resetErrorBoundary=function(){var t=e.props.onReset,n=e.state,r=n.error,o=n.componentStack,i=n.eventId;t&&t(r,o,i),e.setState(Fn)}}},{key:"render",value:function(){var e=this.props,t=e.fallback,n=e.children,r=this.state,o=r.error,i=r.componentStack,s=r.eventId;if(o){var u=void 0;return u="function"===typeof t?t({error:o,componentStack:i,resetError:this.resetErrorBoundary,eventId:s}):t,a.isValidElement(u)?u:(t&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("fallback did not produce a valid ReactElement"),null)}return"function"===typeof n?n():n}}]),n}(a.Component);function Pn(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:ot}],version:ot},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=Nn),void 0===e.release){var t=Object(N.a)();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);var n=Object(o.a)(Object(o.a)({},e),{},{stackParser:Object(Pe.c)(e.stackParser||Xt),integrations:Oe(e),transport:e.transport||(Be()?_n:An)});Ee(It,n),e.autoSessionTracking&&Mn()}(e)}function Bn(){return(Bn=p(f().mark((function e(t){var n,r,o,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=1,n.pagination&&n.pagination.page&&(o=n.pagination.page+1),e.next=5,r.comments.browse({page:o,postId:n.postId});case 5:return i=e.sent,e.abrupt("return",{comments:[].concat(Object(J.a)(n.comments),Object(J.a)(i.comments)),pagination:i.meta.pagination});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ln(){return(Ln=p(f().mark((function e(t){var n,r,i,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.add({comment:i});case 3:return a=e.sent,i=a.comments[0],s=Object(o.a)(Object(o.a)({},i),{},{member:n.member,replies:[]}),e.abrupt("return",{comments:[s].concat(Object(J.a)(n.comments))});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function In(){return(In=p(f().mark((function e(t){var n,r,i,a,s,u,c;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,a=i.reply,s=i.parent,(u=a).parent_id=s.id,e.next=5,r.comments.add({comment:u});case 5:return c=e.sent,u=c.comments[0],u=Object(o.a)(Object(o.a)({},u),{},{member:n.member}),e.abrupt("return",{comments:n.comments.map((function(e){return e.id===s.id?Object(o.a)(Object(o.a)({},s),{},{replies:[].concat(Object(J.a)(s.replies),[u])}):e}))});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(){return(zn=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.adminApi,i=t.data,e.next=3,r.hideComment(i.id);case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"hidden"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"hidden",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Un(){return(Un=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.adminApi,i=t.data,e.next=3,r.showComment(i.id);case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"published"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"published",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vn(){return(Vn=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.like({comment:i});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!0,likes_count:e.likes_count+1}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!0,likes_count:e.likes_count+1,replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $n(){return($n=p(f().mark((function e(t){var n,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.state,n=t.api,r=t.data,e.next=3,n.comments.report({comment:r});case 3:return e.abrupt("return",{});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hn(){return(Hn=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.unlike({comment:i});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!1,likes_count:e.likes_count-1}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!1,likes_count:e.likes_count-1,replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qn(){return(qn=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.edit({comment:{id:i.id,status:"deleted"}});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"deleted"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"deleted",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wn(){return(Wn=p(f().mark((function e(t){var n,r,i,a,s,u;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,a=i.comment,s=i.parent,e.next=3,r.comments.edit({comment:a});case 3:return u=e.sent,a=u.comments[0],e.abrupt("return",{comments:n.comments.map((function(e){return s&&s.id===e.id?Object(o.a)(Object(o.a)({},e),{},{replies:e.replies.map((function(e){return e.id===a.id?a:e}))}):e.id===a.id?a:e}))});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yn(){return(Yn=p(f().mark((function e(t){var n,r,o,i,a,s,u,c,l,d,p;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.data,i=t.state,a=t.api,s=o.name,u=o.bio,c={},l=null===i||void 0===i||null===(n=i.member)||void 0===n?void 0:n.name,s&&l!==s&&(c.name=s),d=null===i||void 0===i||null===(r=i.member)||void 0===r?void 0:r.bio,void 0!==u&&d!==u&&(c.bio=u),!(Object.keys(c).length>0)){e.next=20;break}return e.prev=8,e.next=11,a.member.update(c);case 11:if(p=e.sent){e.next=14;break}throw new Error("Failed to update member");case 14:return e.abrupt("return",{member:p,success:!0});case 17:return e.prev=17,e.t0=e.catch(8),e.abrupt("return",{success:!1,error:e.t0});case 20:return e.abrupt("return",null);case 21:case"end":return e.stop()}}),e,null,[[8,17]])})))).apply(this,arguments)}var Gn={addComment:function(e){return Ln.apply(this,arguments)},editComment:function(e){return Wn.apply(this,arguments)},hideComment:function(e){return zn.apply(this,arguments)},deleteComment:function(e){return qn.apply(this,arguments)},showComment:function(e){return Un.apply(this,arguments)},likeComment:function(e){return Vn.apply(this,arguments)},unlikeComment:function(e){return Hn.apply(this,arguments)},reportComment:function(e){return $n.apply(this,arguments)},addReply:function(e){return In.apply(this,arguments)},loadMoreComments:function(e){return Bn.apply(this,arguments)},updateMember:function(e){return Yn.apply(this,arguments)},openPopup:function(e){return{popup:e.data}},closePopup:function(){return{popup:null}}};function Kn(e){return Jn.apply(this,arguments)}function Jn(){return(Jn=p(f().mark((function e(t){var n,r,o,i,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.action,r=t.data,o=t.state,i=t.api,a=t.adminApi,!(s=Gn[n])){e.next=9;break}return e.next=5,s({data:r,state:o,api:i,adminApi:a});case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:return e.abrupt("return",e.t0);case 9:return e.abrupt("return",{});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Qn=function(e){var t=e.type,n=e.status,r=e.autoHide,o=e.duration,i=void 0===o?2600:o,a=e.closeable,s=e.state,u=e.message,c=e.meta,l=void 0===c?{}:c,f=0;return s&&s.popupNotification&&(f=(s.popupNotification.count||0)+1),{type:t,status:n,autoHide:r,closeable:a,duration:i,meta:l,message:u,count:f}};function Xn(e){var t=e.site;return t||null}function Zn(e){var t=new Date(e),n=new Date,r=Math.round((n.getTime()-t.getTime())/1e3);if(r<5)return"Just now";if(r<60)return"".concat(r," seconds ago");if((r/=60)<60)return 1===Math.floor(r)?"One minute ago":"".concat(Math.floor(r)," minutes ago");var o=new Date(n.getFullYear(),n.getMonth(),n.getDate()-1);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()&&t.getDate()===o.getDate()?"Yesterday":(r/=60)<24?1===Math.floor(r)?"One hour ago":"".concat(Math.floor(r)," hours ago"):(r/=24)<7?1===Math.floor(r)?"One day ago":"".concat(Math.floor(r)," days ago"):(r/=7,1===Math.floor(r)?"One week ago":"".concat(Math.floor(r)," weeks ago"))}function er(e){var t=new Date(e),n=t.toLocaleDateString("en-us",{day:"2-digit"}),r=t.toLocaleString("en-us",{month:"short"}),o=t.getFullYear(),i=(t.getHours()<10?"0":"")+t.getHours(),a=(t.getMinutes()<10?"0":"")+t.getMinutes();return"".concat(n," ").concat(r," ").concat(o," ").concat(i,":").concat(a)}function tr(e){if(!e)return"";var t=e.split(" ");return 0===t.length?"":1===t.length?t[0].substring(0,1).toLocaleUpperCase():t[0].substring(0,1).toLocaleUpperCase()+t[t.length-1].substring(0,1).toLocaleUpperCase()}function nr(){return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<480}var rr={dev:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.customSiteUrl;return!1},test:function(){return!1}},or=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.some((function(e){var n=rr[e];return!(!n||!n(t))}))};var ir=function(e){var t=e.siteUrl,n=void 0===t?window.location.origin:t,r=e.apiUrl,i=e.apiKey;function a(e){var t=e.type,r=e.resource,o=e.params,i=void 0===o?"":o;if("members"===t)return"".concat(n.replace(/\/$/,""),"/").concat("members/api","/").concat(r,"/").concat(i)}function s(e){var t=e.url,n=e.method,r=void 0===n?"GET":n,o=e.headers,i=void 0===o?{}:o,a=e.credentials,s=void 0===a?void 0:a,u=e.body;return fetch(t,{method:r,headers:i,credentials:s,body:void 0===u?void 0:u})}var u={};u.site={settings:function(){return s({url:function(e){var t=e.resource,n=e.params,o=void 0===n?"":n;return r&&i?"".concat(r.replace(/\/$/,""),"/").concat(t,"/?key=").concat(i,"&limit=all").concat(o):""}({resource:"settings"}),method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch site data")}))}},u.member={identity:function(){return s({url:a({type:"members",resource:"session"}),credentials:"same-origin"}).then((function(e){return e.ok&&204!==e.status?e.text():null}))},sessionData:function(){return s({url:a({type:"members",resource:"member"}),credentials:"same-origin"}).then((function(e){return e.ok&&204!==e.status?e.json():null}))},update:function(e){var t={name:e.name,bio:e.bio};return s({url:a({type:"members",resource:"member"}),method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}).then((function(e){return e.ok?e.json():null}))}};var c=null;return u.comments={browse:function(e){var t,n=e.page,r=e.postId;c=null!==(t=c)&&void 0!==t?t:(new Date).toISOString();var o=encodeURIComponent("post_id:".concat(r,"+created_at:<=").concat(c)),i=encodeURIComponent("created_at DESC");return s({url:a({type:"members",resource:"comments",params:"?limit=5&order=".concat(i,"&filter=").concat(o,"&page=").concat(n)}),method:"GET",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch comments")}))},add:function(e){var t={comments:[e.comment]};return s({url:a({type:"members",resource:"comments"}),method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to add comment")}))},edit:function(e){var t=e.comment,n={comments:[t]};return s({url:a({type:"members",resource:"comments/".concat(t.id)}),method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to edit comment")}))},like:function(e){var t=e.comment;return s({url:a({type:"members",resource:"comments/".concat(t.id,"/like")}),method:"POST",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to like comment")}))},unlike:function(e){var t=e.comment,n={comments:[t]};return s({url:a({type:"members",resource:"comments/".concat(t.id,"/like")}),method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to unlike comment")}))},report:function(e){var t=e.comment;return s({url:a({type:"members",resource:"comments/".concat(t.id,"/report")}),method:"POST",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to report comment")}))}},u.init=p(f().mark((function e(){var t,n,r,i,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([u.member.sessionData()]);case 2:t=e.sent,n=Object(E.a)(t,1),r=n[0],i={},a={};try{i=Object(o.a)({},a)}catch(ur){}return i=Xn({site:i}),e.abrupt("return",{site:i,member:r});case 10:case"end":return e.stop()}}),e)}))),u},ar=function(e){var t=Object(a.useContext)(D).accentColor,n={backgroundColor:t},r={color:t},o=e.isFirst?"Be first to start the conversation":"Want to join the discussion?";return Object(S.jsxs)("section",{className:"flex flex-col items-center mb-1 pt-12 pb-12 px-8 border-t-2 border-gray-100 dark:border-gray-100/10 "+(e.isFirst&&" border-b-2"),children:[Object(S.jsx)("h1",{className:"text-center text-black text-[22px] font-sans mb-4 tracking-tight dark:text-[rgba(255,255,255,0.85)] "+(e.isFirst?"font-semibold":"font-bold"),children:o}),Object(S.jsx)("button",{onClick:function(e){window.location.href="#/portal/signup"},className:"text-white font-sans py-3 px-5 mb-4 rounded inline-block font-medium leading-none hover:opacity-90 transition-all",style:n,children:"Subscribe now"}),Object(S.jsxs)("p",{className:"text-sm font-sans text-center text-neutral-400 dark:text-[rgba(255,255,255,0.5)]",children:[Object(S.jsx)("span",{className:"inline-block mr-1",children:"Already have an account?"}),Object(S.jsx)("button",{onClick:function(e){window.location.href="#/portal/signin"},className:"rounded-md hover:opacity-90 transition-all text-sm font-semibold",style:r,children:"Sign in"})]})]})};function sr(e,t){if(e in t){for(var n=t[e],r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,o):n}var a=new Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map((function(e){return'"'.concat(e,'"')})).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(a,sr),a}var ur,cr,lr=["static"],fr=["unmount"],dr=["as","children","refName"],pr=((cr=pr||{})[cr.None=0]="None",cr[cr.RenderStrategy=1]="RenderStrategy",cr[cr.Static=2]="Static",cr),hr=((ur=hr||{})[ur.Unmount=0]="Unmount",ur[ur.Hidden=1]="Hidden",ur);function vr(e){var t=e.ourProps,n=e.theirProps,r=e.slot,a=e.defaultTag,s=e.features,u=e.visible,c=void 0===u||u,l=e.name,f=yr(n,t);if(c)return mr(f,r,a,l);var d=null!=s?s:0;if(2&d){var p=f.static,h=void 0!==p&&p,v=i(f,lr);if(h)return mr(v,r,a,l)}if(1&d){var m,y=f.unmount,g=void 0===y||y,b=i(f,fr);return sr(g?0:1,(m={},Object(Q.a)(m,0,(function(){return null})),Object(Q.a)(m,1,(function(){return mr(Object(o.a)(Object(o.a)({},b),{},{hidden:!0,style:{display:"none"}}),r,a,l)})),m))}return mr(f,r,a,l)}function mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=kr(e,["unmount","static"]),s=o.as,u=void 0===s?n:s,c=o.children,l=o.refName,f=void 0===l?"ref":l,d=i(o,dr),p=void 0!==e.ref?Object(Q.a)({},f,e.ref):{},h="function"==typeof c?c(t):c;d.className&&"function"==typeof d.className&&(d.className=d.className(t));var v={};if(u===a.Fragment&&Object.keys(br(d)).length>0){if(!Object(a.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <".concat(r,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - ".concat(e)})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - ".concat(e)})).join("\n")].join("\n"));return Object(a.cloneElement)(h,Object.assign({},yr(h.props,br(kr(d,["ref"]))),v,p))}return Object(a.createElement)(u,Object.assign({},kr(d,["ref"]),u!==a.Fragment&&p,u!==a.Fragment&&v),h)}function yr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];for(var r={},o={},i=0,a=t;i<a.length;i++){var s=a[i];for(var u in s)u.startsWith("on")&&"function"==typeof s[u]?(null!=o[u]||(o[u]=[]),o[u].push(s[u])):r[u]=s[u]}if(r.disabled||r["aria-disabled"])return Object.assign(r,Object.fromEntries(Object.keys(o).map((function(e){return[e,void 0]}))));var c=function(e){Object.assign(r,Object(Q.a)({},e,(function(t){for(var n=o[e],r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var s,u=Object(ze.a)(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(t.defaultPrevented)return;c.apply(void 0,[t].concat(i))}}catch(l){u.e(l)}finally{u.f()}})))};for(var l in o)c(l);return r}function gr(e){var t;return Object.assign(Object(a.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function br(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}function kr(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=Object(ze.a)(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}var wr=Object(a.createContext)(null);wr.displayName="OpenClosedContext";var xr=function(e){return e[e.Open=0]="Open",e[e.Closed=1]="Closed",e}(xr||{});function Or(){return Object(a.useContext)(wr)}function Er(e){var t=e.value,n=e.children;return s.a.createElement(wr.Provider,{value:t},n)}function Dr(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}var Sr,Cr="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,jr={serverHandoffComplete:!1};function _r(){var e=Object(a.useState)(jr.serverHandoffComplete),t=Object(E.a)(e,2),n=t[0],r=t[1];return Object(a.useEffect)((function(){!0!==n&&r(!0)}),[n]),Object(a.useEffect)((function(){!1===jr.serverHandoffComplete&&(jr.serverHandoffComplete=!0)}),[]),n}var Ar=0;function Nr(){return++Ar}var Tr=null!=(Sr=s.a.useId)?Sr:function(){var e=_r(),t=s.a.useState(e?Nr:null),n=Object(E.a)(t,2),r=n[0],o=n[1];return Cr((function(){null===r&&o(Nr())}),[r]),null!=r?""+r:void 0};function Mr(){var e=Object(a.useRef)(!1);return Cr((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function Fr(e){var t=Object(a.useRef)(e);return Cr((function(){t.current=e}),[e]),t}var Rr=function(e){var t=Fr(e);return s.a.useCallback((function(){return t.current.apply(t,arguments)}),[t])},Pr=Symbol();function Br(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(a.useRef)(t);Object(a.useEffect)((function(){r.current=t}),[t]);var o=Rr((function(e){var t,n=Object(ze.a)(r.current);try{for(n.s();!(t=n.n()).done;){var o=t.value;null!=o&&("function"==typeof o?o(e):o.current=e)}}catch(i){n.e(i)}finally{n.f()}}));return t.every((function(e){return null==e||(null==e?void 0:e[Pr])}))?void 0:o}function Lr(){var e=[],t=[],n={enqueue:function(e){t.push(e)},addEventListener:function(e,t,r,o){return e.addEventListener(t,r,o),n.add((function(){return e.removeEventListener(t,r,o)}))},requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);return n.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.requestAnimationFrame((function(){return n.requestAnimationFrame.apply(n,t)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);return n.add((function(){return clearTimeout(e)}))})),add:function(t){return e.push(t),function(){var n=e.indexOf(t);if(n>=0){var r=e.splice(n,1);(0,Object(E.a)(r,1)[0])()}}},dispose:function(){var t,n=Object(ze.a)(e.splice(0));try{for(n.s();!(t=n.n()).done;){(0,t.value)()}}catch(r){n.e(r)}finally{n.f()}},workQueue:function(){return p(f().mark((function e(){var n,r,o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Object(ze.a)(t.splice(0)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,o();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))()}};return n}function Ir(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function zr(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}var Ur=function(e){return e.Ended="ended",e.Cancelled="cancelled",e}(Ur||{});function Vr(e,t,n,r){var o=n?"enter":"leave",i=Lr(),a=void 0!==r?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(r):function(){},s=sr(o,{enter:function(){return t.enter},leave:function(){return t.leave}}),u=sr(o,{enter:function(){return t.enterTo},leave:function(){return t.leaveTo}}),c=sr(o,{enter:function(){return t.enterFrom},leave:function(){return t.leaveFrom}});return zr.apply(void 0,[e].concat(Object(J.a)(t.enter),Object(J.a)(t.enterTo),Object(J.a)(t.enterFrom),Object(J.a)(t.leave),Object(J.a)(t.leaveFrom),Object(J.a)(t.leaveTo),Object(J.a)(t.entered))),Ir.apply(void 0,[e].concat(Object(J.a)(s),Object(J.a)(c))),i.nextFrame((function(){zr.apply(void 0,[e].concat(Object(J.a)(c))),Ir.apply(void 0,[e].concat(Object(J.a)(u))),function(e,t){var n=Lr();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e})),n=Object(E.a)(t,1)[0];return void 0===n?0:n})),i=Object(E.a)(o,2);if(i[0]+i[1]!==0){var a=[];a.push(n.addEventListener(e,"transitionrun",(function(r){r.target===r.currentTarget&&(a.splice(0).forEach((function(e){return e()})),a.push(n.addEventListener(e,"transitionend",(function(e){e.target===e.currentTarget&&(t("ended"),a.splice(0).forEach((function(e){return e()})))})),n.addEventListener(e,"transitioncancel",(function(e){e.target===e.currentTarget&&(t("cancelled"),a.splice(0).forEach((function(e){return e()})))}))))})))}else t("ended");n.add((function(){return t("cancelled")})),n.dispose}(e,(function(n){return"ended"===n&&(zr.apply(void 0,[e].concat(Object(J.a)(s))),Ir.apply(void 0,[e].concat(Object(J.a)(t.entered)))),a(n)}))})),i.dispose}function $r(e){var t=e.container,n=e.direction,r=e.classes,o=e.events,i=e.onStart,s=e.onStop,u=Mr(),c=function(){var e=Object(a.useState)(Lr),t=Object(E.a)(e,1)[0];return Object(a.useEffect)((function(){return function(){return t.dispose()}}),[t]),t}(),l=Fr(n),f=Rr((function(){return sr(l.current,{enter:function(){return o.current.beforeEnter()},leave:function(){return o.current.beforeLeave()},idle:function(){}})})),d=Rr((function(){return sr(l.current,{enter:function(){return o.current.afterEnter()},leave:function(){return o.current.afterLeave()},idle:function(){}})}));Cr((function(){var e=Lr();c.add(e.dispose);var n=t.current;if(n&&"idle"!==l.current&&u.current)return e.dispose(),f(),i.current(l.current),e.add(Vr(n,r.current,"enter"===l.current,(function(t){var n;e.dispose(),sr(t,(n={},Object(Q.a)(n,Ur.Ended,(function(){d(),s.current(l.current)})),Object(Q.a)(n,Ur.Cancelled,(function(){})),n))}))),e.dispose}),[n])}var Hr=["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"],qr=["show","appear","unmount"];function Wr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(" ").filter((function(e){return e.trim().length>1}))}var Yr=Object(a.createContext)(null);Yr.displayName="TransitionContext";var Gr,Kr=((Gr=Kr||{}).Visible="visible",Gr.Hidden="hidden",Gr);var Jr=Object(a.createContext)(null);function Qr(e){return"children"in e?Qr(e.children):e.current.filter((function(e){return"visible"===e.state})).length>0}function Xr(e){var t=Fr(e),n=Object(a.useRef)([]),r=Mr(),o=Rr((function(e){var o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr.Hidden,a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&(sr(i,(o={},Object(Q.a)(o,hr.Unmount,(function(){n.current.splice(a,1)})),Object(Q.a)(o,hr.Hidden,(function(){n.current[a].state="hidden"})),o)),Dr((function(){var e;!Qr(n)&&r.current&&(null==(e=t.current)||e.call(t))})))})),i=Rr((function(e){var t=n.current.find((function(t){return t.id===e}));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({id:e,state:"visible"}),function(){return o(e,hr.Unmount)}}));return Object(a.useMemo)((function(){return{children:n,register:i,unregister:o}}),[i,o,n])}function Zr(){}Jr.displayName="NestingContext";var eo=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function to(e){var t,n,r={},o=Object(ze.a)(eo);try{for(o.s();!(n=o.n()).done;){var i=n.value;r[i]=null!=(t=e[i])?t:Zr}}catch(a){o.e(a)}finally{o.f()}return r}var no,ro,oo,io=pr.RenderStrategy,ao=gr((function(e,t){var n,r=e.beforeEnter,o=e.afterEnter,u=e.beforeLeave,c=e.afterLeave,l=e.enter,f=e.enterFrom,d=e.enterTo,p=e.entered,h=e.leave,v=e.leaveFrom,m=e.leaveTo,y=i(e,Hr),g=Object(a.useRef)(null),b=Br(g,t),k=Object(a.useState)("visible"),w=Object(E.a)(k,2),x=w[0],O=w[1],D=y.unmount?hr.Unmount:hr.Hidden,S=function(){var e=Object(a.useContext)(Yr);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),C=S.show,j=S.appear,_=S.initial,A=function(){var e=Object(a.useContext)(Jr);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),N=A.register,T=A.unregister,M=Object(a.useRef)(null),F=Tr();Object(a.useEffect)((function(){if(F)return N(F)}),[N,F]),Object(a.useEffect)((function(){if(D===hr.Hidden&&F){var e;if(C&&"visible"!==x)return void O("visible");sr(x,(e={},Object(Q.a)(e,"hidden",(function(){return T(F)})),Object(Q.a)(e,"visible",(function(){return N(F)})),e))}}),[x,F,N,T,C,D]);var R=Fr({enter:Wr(l),enterFrom:Wr(f),enterTo:Wr(d),entered:Wr(p),leave:Wr(h),leaveFrom:Wr(v),leaveTo:Wr(m)}),P=function(e){var t=Object(a.useRef)(to(e));return Object(a.useEffect)((function(){t.current=to(e)}),[e]),t}({beforeEnter:r,afterEnter:o,beforeLeave:u,afterLeave:c}),B=_r();Object(a.useEffect)((function(){if(B&&"visible"===x&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,x,B]);var L=_&&!j,I=!B||L||M.current===C?"idle":C?"enter":"leave",z=Object(a.useRef)(!1),U=Xr((function(){z.current||(O("hidden"),T(F))}));$r({container:g,classes:R,events:P,direction:I,onStart:Fr((function(){z.current=!0})),onStop:Fr((function(e){z.current=!1,"leave"===e&&!Qr(U)&&(O("hidden"),T(F))}))}),Object(a.useEffect)((function(){!L||(D===hr.Hidden?M.current=null:M.current=C)}),[C,L,x]);var V=y,$={ref:b};return s.a.createElement(Jr.Provider,{value:U},s.a.createElement(Er,{value:sr(x,(n={},Object(Q.a)(n,"visible",xr.Open),Object(Q.a)(n,"hidden",xr.Closed),n))},vr({ourProps:$,theirProps:V,defaultTag:"div",features:io,visible:"visible"===x,name:"Transition.Child"})))})),so=gr((function(e,t){var n,r=e.show,u=e.appear,c=void 0!==u&&u,l=e.unmount,f=i(e,qr),d=Object(a.useRef)(null),p=Br(d,t);_r();var h=Or();if(void 0===r&&null!==h&&(r=sr(h,(n={},Object(Q.a)(n,xr.Open,!0),Object(Q.a)(n,xr.Closed,!1),n))),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var v=Object(a.useState)(r?"visible":"hidden"),m=Object(E.a)(v,2),y=m[0],g=m[1],b=Xr((function(){g("hidden")})),k=Object(a.useState)(!0),w=Object(E.a)(k,2),x=w[0],O=w[1],D=Object(a.useRef)([r]);Cr((function(){!1!==x&&D.current[D.current.length-1]!==r&&(D.current.push(r),O(!1))}),[D,r]);var S=Object(a.useMemo)((function(){return{show:r,appear:c,initial:x}}),[r,c,x]);Object(a.useEffect)((function(){if(r)g("visible");else if(Qr(b)){var e=d.current;if(!e)return;var t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&g("hidden")}else g("hidden")}),[r,b]);var C={unmount:l};return s.a.createElement(Jr.Provider,{value:b},s.a.createElement(Yr.Provider,{value:S},vr({ourProps:Object(o.a)(Object(o.a)({},C),{},{as:a.Fragment,children:s.a.createElement(ao,Object(o.a)(Object(o.a)({ref:p},C),f))}),theirProps:{},defaultTag:a.Fragment,features:io,visible:"visible"===y,name:"Transition"})))})),uo=gr((function(e,t){var n=null!==Object(a.useContext)(Yr),r=null!==Or();return s.a.createElement(s.a.Fragment,null,!n&&r?s.a.createElement(so,Object(o.a)({ref:t},e)):s.a.createElement(ao,Object(o.a)({ref:t},e)))})),co=Object.assign(so,{Child:uo,Root:so}),lo=["title","titleId"];function fo(){return fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fo.apply(this,arguments)}function po(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ho(e,t){var n=e.title,r=e.titleId,o=po(e,lo);return a.createElement("svg",fo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,no||(no=a.createElement("path",{d:"M7 9.5C7 10.1566 7.12933 10.8068 7.3806 11.4134C7.63188 12.02 8.00017 12.5712 8.46447 13.0355C8.92876 13.4998 9.47995 13.8681 10.0866 14.1194C10.6932 14.3707 11.3434 14.5 12 14.5C12.6566 14.5 13.3068 14.3707 13.9134 14.1194C14.52 13.8681 15.0712 13.4998 15.5355 13.0355C15.9998 12.5712 16.3681 12.02 16.6194 11.4134C16.8707 10.8068 17 10.1566 17 9.5C17 8.84339 16.8707 8.19321 16.6194 7.58658C16.3681 6.97995 15.9998 6.42876 15.5355 5.96447C15.0712 5.50017 14.52 5.13188 13.9134 4.8806C13.3068 4.62933 12.6566 4.5 12 4.5C11.3434 4.5 10.6932 4.62933 10.0866 4.8806C9.47995 5.13188 8.92876 5.50017 8.46447 5.96447C8.00017 6.42876 7.63188 6.97995 7.3806 7.58658C7.12933 8.19321 7 8.84339 7 9.5V9.5Z",stroke:"white",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),ro||(ro=a.createElement("circle",{cx:12,cy:12,r:11.375,stroke:"white",strokeWidth:1.25})),oo||(oo=a.createElement("path",{d:"M19.5 20C19.092 19.6069 18.4941 19.2498 17.7403 18.9489C16.9864 18.6481 16.0915 18.4094 15.1066 18.2466C14.1217 18.0838 13.0661 18 12 18C10.9339 18 9.87831 18.0838 8.8934 18.2466C7.90848 18.4094 7.01357 18.6481 6.25975 18.9489C5.50593 19.2498 4.90796 19.6069 4.5 20",stroke:"white",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})))}var vo=a.forwardRef(ho),mo=(n.p,function(e){var t,n,r,o,i=Object(a.useContext)(D).member,s=null!==(t=null===i||void 0===i?void 0:i.name)&&void 0!==t?t:null===(n=e.comment)||void 0===n||null===(r=n.member)||void 0===r?void 0:r.name,u=function(e,t,n){return Math.floor(e%(n-t)+t)},c="small"===e.size?"w-6 h-6 sm:w-8 sm:h-8":"w-9 h-9 sm:w-[40px] sm:h-[40px]",l="small"===e.size?"text-sm":"text-lg",f=e.comment?e.comment.member:i,d=(o=function(){var t=e.comment?e.comment.member:i;if(!t||!t.name)return[0,0,10];var n=isNaN(e.saturation)?50:e.saturation,r=[0,360],o=Math.round(n/(100/30))+30,a=[o-20,o],s=function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return Math.abs(t)}(t.name);return[u(s,r[0],r[1]),n,u(s,a[0],a[1])]}(),"hsl(".concat(o[0],", ").concat(o[1],"%, ").concat(o[2],"%)")),p={background:d},h=Object(S.jsxs)(S.Fragment,{children:[s?Object(S.jsx)("div",{className:"flex justify-center items-center rounded-full ".concat(c),style:p,children:Object(S.jsx)("p",{className:"text-white font-sans font-semibold ".concat(l),children:function(){if(e.comment&&!e.comment.member)return tr("Deleted member");var t=e.comment?e.comment.member:i;return t&&t.name?tr(t.name):tr("Anonymous")}()})}):Object(S.jsx)("div",{className:"flex justify-center items-center rounded-full bg-neutral-900 dark:bg-[rgba(255,255,255,0.7)] ".concat(c),children:Object(S.jsx)(vo,{className:"stroke-white dark:stroke-[rgba(0,0,0,0.6)]"})}),f&&Object(S.jsx)("img",{className:"absolute top-0 left-0 rounded-full ".concat(c),src:f.avatar_image,alt:"Avatar"})]});return e.isBlank&&(h=Object(S.jsx)("div",{className:"flex justify-center items-center rounded-full bg-neutral-300 dark:opacity-70 ".concat(c),children:Object(S.jsx)(vo,{className:"stroke-white dark:stroke-neutral-600"})})),Object(S.jsx)("figure",{className:"relative ".concat(c),children:h})});function yo(e){this.content=e}yo.prototype={constructor:yo,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new yo(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new yo(n)},addToStart:function(e,t){return new yo([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new yo(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new yo(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=yo.from(e)).size?new yo(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=yo.from(e)).size?new yo(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=yo.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},yo.from=function(e){if(e instanceof yo)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new yo(t)};var go=yo;function bo(e,t,n){for(var r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;var o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=bo(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function ko(e,t,n,r){for(var o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=e.child(--o),s=t.child(--i),u=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var c=0,l=Math.min(a.text.length,s.text.length);c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){var f=ko(a.content,s.content,n-1,r-1);if(f)return f}n-=u,r-=u}else n-=u,r-=u}}var wo=function(){function e(t,n){if(h(this,e),this.content=t,this.size=n||0,null==n)for(var r=0;r<t.length;r++)this.size+=t[r].nodeSize}return m(e,[{key:"nodesBetween",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=0,a=0;a<t;i++){var s=this.content[i],u=a+s.nodeSize;if(u>e&&!1!==n(s,r+a,o||null,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=u}}},{key:"descendants",value:function(e){this.nodesBetween(0,this.size,e)}},{key:"textBetween",value:function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf?(r?o+="function"===typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new e(o,this.size+t.size)}},{key:"cut",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==t&&n==this.size)return this;var r=[],o=0;if(n>t)for(var i=0,a=0;a<n;i++){var s=this.content[i],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s=s.isText?s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=u}return new e(r,o)}},{key:"cutByIndex",value:function(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}},{key:"replaceChild",value:function(t,n){var r=this.content[t];if(r==n)return this;var o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}},{key:"addToStart",value:function(t){return new e([t].concat(this.content),this.size+t.nodeSize)}},{key:"addToEnd",value:function(t){return new e(this.content.concat(t),this.size+t.nodeSize)}},{key:"eq",value:function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}},{key:"maybeChild",value:function(e){return this.content[e]||null}},{key:"forEach",value:function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}}},{key:"findDiffStart",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return bo(this,e,t)}},{key:"findDiffEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size;return ko(this,e,t,n)}},{key:"findIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==e)return Oo(0,e);if(e==this.size)return Oo(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position ".concat(e," outside of fragment (").concat(this,")"));for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e||t>0?Oo(n+1,i):Oo(n,r);r=i}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}},{key:"fromArray",value:function(t){if(!t.length)return e.empty;for(var n,r=0,o=0;o<t.length;o++){var i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}},{key:"from",value:function(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),e}();wo.empty=new wo([],0);var xo={index:0,offset:0};function Oo(e,t){return xo.index=e,xo.offset=t,xo}function Eo(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!Eo(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!Eo(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}var Do=function(){function e(t,n){h(this,e),this.type=t,this.attrs=n}return m(e,[{key:"addToSet",value:function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){return this==e||this.type==e.type&&Eo(this.attrs,e.attrs)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type ".concat(t.type," in this schema"));return n.create(t.attrs)}},{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];var n=t.slice();return n.sort((function(e,t){return e.type.rank-t.type.rank})),n}}]),e}();Do.none=[];var So=function(e){g(n,e);var t=O(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(Se(Error)),Co=function(){function e(t,n,r){h(this,e),this.content=t,this.openStart=n,this.openEnd=r}return m(e,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(t,n){var r=_o(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(t,n){return new e(jo(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;var r=n.openStart||0,o=n.openEnd||0;if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new e(wo.fromJSON(t,n.content),r,o)}},{key:"maxOpen",value:function(t){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(var a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}}]),e}();function jo(e,t,n){var r=e.findIndex(t),o=r.index,i=r.offset,a=e.maybeChild(o),s=e.findIndex(n),u=s.index,c=s.offset;if(i==t||a.isText){if(c!=n&&!e.child(u).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(o!=u)throw new RangeError("Removing non-flat range");return e.replaceChild(o,a.copy(jo(a.content,t-i-1,n-i-1)))}function _o(e,t,n,r){var o=e.findIndex(t),i=o.index,a=o.offset,s=e.maybeChild(i);if(a==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));var u=_o(s.content,t-a-1,n);return u&&e.replaceChild(i,s.copy(u))}function Ao(e,t,n){if(n.openStart>e.depth)throw new So("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new So("Inconsistent open depths");return No(e,t,n,0)}function No(e,t,n,r){var o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){var a=No(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){var s=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(wo.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return Po(i,Bo(e,s.start,s.end,t,r))}var u=e.parent,c=u.content;return Po(u,c.cut(0,e.parentOffset).append(n.content).append(c.cut(t.parentOffset)))}return Po(i,Lo(e,t,r))}function To(e,t){if(!t.type.compatibleContent(e.type))throw new So("Cannot join "+t.type.name+" onto "+e.type.name)}function Mo(e,t,n){var r=e.node(n);return To(r,t.node(n)),r}function Fo(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Ro(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Fo(e.nodeAfter,r),i++));for(var s=i;s<a;s++)Fo(o.child(s),r);t&&t.depth==n&&t.textOffset&&Fo(t.nodeBefore,r)}function Po(e,t){if(!e.type.validContent(t))throw new So("Invalid content for node "+e.type.name);return e.copy(t)}function Bo(e,t,n,r,o){var i=e.depth>o&&Mo(e,t,o+1),a=r.depth>o&&Mo(n,r,o+1),s=[];return Ro(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(To(i,a),Fo(Po(i,Bo(e,t,n,r,o+1)),s)):(i&&Fo(Po(i,Lo(e,t,o+1)),s),Ro(t,n,o,s),a&&Fo(Po(a,Lo(n,r,o+1)),s)),Ro(r,null,o,s),new wo(s)}function Lo(e,t,n){var r=[];(Ro(null,e,n,r),e.depth>n)&&Fo(Po(Mo(e,t,n+1),Lo(e,t,n+1)),r);return Ro(t,null,n,r),new wo(r)}Co.empty=new Co(wo.empty,0,0);var Io=function(){function e(t,n,r){h(this,e),this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}return m(e,[{key:"resolveDepth",value:function(e){return null==e?this.depth:e<0?this.depth+e:e}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(e){return this.path[3*this.resolveDepth(e)]}},{key:"index",value:function(e){return this.path[3*this.resolveDepth(e)+1]}},{key:"indexAfter",value:function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}},{key:"start",value:function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}},{key:"end",value:function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}},{key:"before",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}},{key:"after",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}},{key:"nodeBefore",get:function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}},{key:"posAtIndex",value:function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r}},{key:"marks",value:function(){var e=this.parent,t=this.index();if(0==e.content.size)return Do.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}},{key:"marksAcross",value:function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}},{key:"sharedDepth",value:function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}},{key:"blockRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,t=arguments.length>1?arguments[1]:void 0;if(e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new $o(this,e,n);return null}},{key:"sameParent",value:function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}},{key:"max",value:function(e){return e.pos>this.pos?e:this}},{key:"min",value:function(e){return e.pos<this.pos?e:this}},{key:"toString",value:function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}}],[{key:"resolve",value:function(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],o=0,i=n,a=t;;){var s=a.content.findIndex(i),u=s.index,c=s.offset,l=i-c;if(r.push(a,u,o+c),!l)break;if((a=a.child(u)).isText)break;i=l-1,o+=c+1}return new e(n,r,i)}},{key:"resolveCached",value:function(t,n){for(var r=0;r<zo.length;r++){var o=zo[r];if(o.pos==n&&o.doc==t)return o}var i=zo[Uo]=e.resolve(t,n);return Uo=(Uo+1)%Vo,i}}]),e}(),zo=[],Uo=0,Vo=12,$o=function(){function e(t,n,r){h(this,e),this.$from=t,this.$to=n,this.depth=r}return m(e,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),e}(),Ho=Object.create(null),qo=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Do.none;h(this,e),this.type=t,this.attrs=n,this.marks=o,this.content=r||wo.empty}return m(e,[{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(e){return this.content.child(e)}},{key:"maybeChild",value:function(e){return this.content.maybeChild(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"nodesBetween",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(e,t,n,r,this)}},{key:"descendants",value:function(e){this.nodesBetween(0,this.content.size,e)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(e,t,n,r){return this.content.textBetween(e,t,n,r)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(e,t,n){return this.type==e&&Eo(this.attrs,t||e.defaultAttrs||Ho)&&Do.sameSet(this.marks,n||Do.none)}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}},{key:"mark",value:function(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}},{key:"cut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e==t)return Co.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i),u=s.content.cut(r.pos-a,o.pos-a);return new Co(u,r.depth-i,o.depth-i)}},{key:"replace",value:function(e,t,n){return Ao(this.resolve(e),this.resolve(t),n)}},{key:"nodeAt",value:function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}}},{key:"childAfter",value:function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}},{key:"resolve",value:function(e){return Io.resolveCached(this,e)}},{key:"resolveNoCache",value:function(e){return Io.resolve(this,e)}},{key:"rangeHasMark",value:function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Yo(this.marks,e)}},{key:"contentMatchAt",value:function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}},{key:"canReplace",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wo.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,i=this.contentMatchAt(e).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var s=r;s<o;s++)if(!this.type.allowsMarks(n.child(s).marks))return!1;return!0}},{key:"canReplaceWith",value:function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}},{key:"canAppend",value:function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}},{key:"check",value:function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node ".concat(this.type.name,": ").concat(this.content.toString().slice(0,50)));for(var e=Do.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Do.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map((function(e){return e.type.name}))));this.content.forEach((function(e){return e.check()}))}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=wo.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}]),e}();qo.prototype.text=void 0;var Wo=function(e){g(n,e);var t=O(n);function n(e,r,o,i){var a;if(h(this,n),a=t.call(this,e,r,null,i),!o)throw new RangeError("Empty text nodes are not allowed");return a.text=o,a}return m(n,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Yo(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(e,t){return this.text.slice(e,t)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}},{key:"withText",value:function(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}},{key:"cut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}},{key:"eq",value:function(e){return this.sameMarkup(e)&&this.text==e.text}},{key:"toJSON",value:function(){var e=rt(b(n.prototype),"toJSON",this).call(this);return e.text=this.text,e}}]),n}(qo);function Yo(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var Go=function(){function e(t){h(this,e),this.validEnd=t,this.next=[],this.wrapCache=[]}return m(e,[{key:"matchType",value:function(e){for(var t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}},{key:"matchFragment",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.childCount,r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}},{key:"inlineContent",get:function(){return this.next.length&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var e=0;e<this.next.length;e++){var t=this.next[e].type;if(!t.isText&&!t.hasRequiredAttrs())return t}return null}},{key:"compatible",value:function(e){for(var t=0;t<this.next.length;t++)for(var n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}},{key:"fillBefore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];function o(i,a){var s=i.matchFragment(e,n);if(s&&(!t||s.validEnd))return wo.from(a.map((function(e){return e.createAndFill()})));for(var u=0;u<i.next.length;u++){var c=i.next[u],l=c.type,f=c.next;if(!l.isText&&!l.hasRequiredAttrs()&&-1==r.indexOf(f)){r.push(f);var d=o(f,a.concat(l));if(d)return d}}return null}return o(this,[])}},{key:"findWrapping",value:function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}},{key:"computeWrapping",value:function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s++){var u=o.next[s],c=u.type,l=u.next;c.isLeaf||c.hasRequiredAttrs()||c.name in t||r.type&&!l.validEnd||(n.push({match:c.contentMatch,type:c,via:r}),t[c.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(e){if(e>=this.next.length)throw new RangeError("There's no ".concat(e,"th edge in this content match"));return this.next[e]}},{key:"toString",value:function(){var e=[];return function t(n){e.push(n);for(var r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}],[{key:"parse",value:function(t,n){var r=new Ko(t,n);if(null==r.next)return e.empty;var o=Jo(r);r.next&&r.err("Unexpected trailing text");var i=function(e){var t=Object.create(null);return n(ni(e,0));function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){for(var i,a=0;a<o.length;a++)o[a][0]==n&&(i=o[a][1]);ni(e,r).forEach((function(e){i||o.push([n,i=[]]),-1==i.indexOf(e)&&i.push(e)}))}}))}));for(var i=t[r.join(",")]=new Go(r.indexOf(e.length-1)>-1),a=0;a<o.length;a++){var s=o[a][1].sort(ti);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}(function(e){var t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}function i(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(i(n,t))}),[]);if("seq"!=e.type){if("star"==e.type){var a=n();return r(t,a),o(i(e.expr,a),a),[r(a)]}if("plus"==e.type){var s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){for(var u=t,c=0;c<e.min;c++){var l=n();o(i(e.expr,u),l),u=l}if(-1==e.max)o(i(e.expr,u),u);else for(var f=e.min;f<e.max;f++){var d=n();r(u,d),o(i(e.expr,u),d),u=d}return[r(u)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(var p=0;;p++){var h=i(e.exprs[p],t);if(p==e.exprs.length-1)return h;o(h,t=n())}}}(o));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s++){var u=o.next[s],c=u.type,l=u.next;a.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(l)&&r.push(l)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,r),i}}]),e}();Go.empty=new Go(!0);var Ko=function(){function e(t,n){h(this,e),this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}return m(e,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(e){return this.next==e&&(this.pos++||!0)}},{key:"err",value:function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}]),e}();function Jo(e){var t=[];do{t.push(Qo(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function Qo(e){var t=[];do{t.push(Xo(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function Xo(e){for(var t=function(e){if(e.eat("(")){var t=Jo(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=ei(e,t)}return t}function Zo(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function ei(e,t){var n=Zo(e),r=n;return e.eat(",")&&(r="}"!=e.next?Zo(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function ti(e,t){return t-e}function ni(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,u=a.to;s||-1!=n.indexOf(u)||t(u)}}(t),n.sort(ti)}function ri(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function oi(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function ii(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new si(e[n]);return t}var ai=function(){function e(t,n,r){h(this,e),this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ii(r.attrs),this.defaultAttrs=ri(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}return m(e,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==Go.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(e){return this==e||this.contentMatch.compatible(e.contentMatch)}},{key:"computeAttrs",value:function(e){return!e&&this.defaultAttrs?this.defaultAttrs:oi(this.attrs,e)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new qo(this,this.computeAttrs(e),wo.from(t),Do.setFrom(n))}},{key:"createChecked",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(t=wo.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new qo(this,this.computeAttrs(e),t,Do.setFrom(n))}},{key:"createAndFill",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(e=this.computeAttrs(e),(t=wo.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(wo.empty,!0);return i?new qo(this,e,t.append(i),Do.setFrom(n)):null}},{key:"validContent",value:function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}},{key:"allowsMarkType",value:function(e){return null==this.markSet||this.markSet.indexOf(e)>-1}},{key:"allowsMarks",value:function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}},{key:"allowedMarks",value:function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:Do.none:e}}],[{key:"compile",value:function(t,n){var r=Object.create(null);t.forEach((function(t,o){return r[t]=new e(t,n,o)}));var o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}]),e}(),si=function(){function e(t){h(this,e),this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}return m(e,[{key:"isRequired",get:function(){return!this.hasDefault}}]),e}(),ui=function(){function e(t,n,r,o){h(this,e),this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=ii(o.attrs),this.excluded=null;var i=ri(this.attrs);this.instance=i?new Do(this,i):null}return m(e,[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!e&&this.instance?this.instance:new Do(this,oi(this.attrs,e))}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}},{key:"excludes",value:function(e){return this.excluded.indexOf(e)>-1}}],[{key:"compile",value:function(t,n){var r=Object.create(null),o=0;return t.forEach((function(t,i){return r[t]=new e(t,o++,n,i)})),r}}]),e}(),ci=function(){function e(t){h(this,e),this.cached=Object.create(null),this.spec={nodes:go.from(t.nodes),marks:go.from(t.marks||{}),topNode:t.topNode},this.nodes=ai.compile(this.spec.nodes,this),this.marks=ui.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=Go.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?li(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var u=this.marks[s],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:li(this,c.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return m(e,[{key:"node",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof ai))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}},{key:"text",value:function(e,t){var n=this.nodes.text;return new Wo(n,n.defaultAttrs,e,Do.setFrom(t))}},{key:"mark",value:function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}},{key:"nodeFromJSON",value:function(e){return qo.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){return Do.fromJSON(this,e)}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}]),e}();function li(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var u=e.marks[s];("_"==o||u.spec.group&&u.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}var fi=function(){function e(t,n){var r=this;h(this,e),this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach((function(e){e.tag?r.tags.push(e):e.style&&r.styles.push(e)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}return m(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new yi(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}},{key:"parseSlice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new yi(this,t,!0);return n.addAll(e,t.from,t.to),Co.maxOpen(n.finish())}},{key:"matchTag",value:function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(gi(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i||void 0}return o}}}},{key:"matchStyle",value:function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o],a=i.style;if(!(0!=a.indexOf(e)||i.context&&!n.matchesContext(i.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(i.getAttrs){var s=i.getAttrs(t);if(!1===s)continue;i.attrs=s||void 0}return i}}}}],[{key:"schemaRules",value:function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=bi(e)),e.mark=t}))};for(var o in e.marks)r(o);var i=function(t){var r=e.nodes[t].spec.parseDOM;r&&r.forEach((function(e){n(e=bi(e)),e.node=t}))};for(var a in e.nodes)i(a);return t}},{key:"fromSchema",value:function(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}}]),e}(),di={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},pi={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hi={ol:!0,ul:!0};function vi(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var mi=function(){function e(t,n,r,o,i,a,s){h(this,e),this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=s,this.content=[],this.activeMarks=Do.none,this.stashMarks=[],this.match=a||(4&s?null:t.contentMatch)}return m(e,[{key:"findWrapping",value:function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(wo.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}},{key:"finish",value:function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];if(n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))){var r=n;n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-t[0].length))}}var o=wo.from(this.content);return!e&&this.match&&(o=o.append(this.match.fillBefore(wo.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}},{key:"popFromStashMark",value:function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}},{key:"applyPending",value:function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):ki(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}},{key:"inlineContext",value:function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!di.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}]),e}(),yi=function(){function e(t,n,r){h(this,e),this.parser=t,this.options=n,this.isOpen=r,this.open=0;var o,i=n.topNode,a=vi(null,n.preserveWhitespace,0)|(r?4:0);o=i?new mi(i.type,i.attrs,Do.none,Do.none,!0,n.topMatch||i.type.contentMatch,a):new mi(r?null:t.schema.topNodeType,null,Do.none,Do.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}return m(e,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}}},{key:"addTextNode",value:function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}},{key:"addElement",value:function(e,t){var n,r=e.nodeName.toLowerCase();hi.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&hi.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:pi.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(di.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}},{key:"leafFallback",value:function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}},{key:"ignoreFallback",value:function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}},{key:"readStyles",value:function(e){var t=Do.none;e:for(var n=0;n<e.length;n+=2)for(var r=void 0;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}},{key:"addElementByRule",value:function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var u=e;"string"==typeof t.contentElement?u=e.querySelector(t.contentElement):"function"==typeof t.contentElement?u=t.contentElement(e):t.contentElement&&(u=t.contentElement),this.findAround(e,u,!0),this.addAll(u)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}},{key:"addAll",value:function(e,t,n){for(var r=t||0,o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}},{key:"findPlace",value:function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0}},{key:"insertNode",value:function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}},{key:"enter",value:function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}},{key:"enterInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);var i=vi(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new mi(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}},{key:"closeExtra",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}},{key:"sync",value:function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}},{key:"findAtPoint",value:function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}},{key:"findInside",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}},{key:"findAround",value:function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}},{key:"findInText",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}},{key:"matchesContext",value:function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=u&&-1==c.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)}},{key:"textblockFromContext",value:function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}}},{key:"addPendingMark",value:function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}},{key:"removePendingMark",value:function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}}}]),e}();function gi(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function bi(e){var t={};for(var n in e)t[n]=e[n];return t}function ki(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(!o.allowsMarkType(e))return"continue";var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),a=o.type,s=o.next;if(a==t)return!0;if(i.indexOf(s)<0&&e(s))return!0}}(o.contentMatch)?{v:!0}:void 0};for(var o in n){var i=r(o);if("continue"!==i&&"object"===typeof i)return i.v}}var wi=function(){function e(t,n){h(this,e),this.nodes=t,this.marks=n}return m(e,[{key:"serializeFragment",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;r||(r=Oi(n).createDocumentFragment());var o=r,i=[];return e.forEach((function(e){if(i.length||e.marks.length){for(var r=0,a=0;r<i.length&&a<e.marks.length;){var s=e.marks[a];if(t.marks[s.type.name]){if(!s.eq(i[r][0])||!1===s.type.spec.spanning)break;r++,a++}else a++}for(;r<i.length;)o=i.pop()[1];for(;a<e.marks.length;){var u=e.marks[a++],c=t.serializeMark(u,e.isInline,n);c&&(i.push([u,o]),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(t.serializeNodeInner(e,n))})),r}},{key:"serializeNodeInner",value:function(t,n){var r=e.renderSpec(Oi(n),this.nodes[t.type.name](t)),o=r.dom,i=r.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return o}},{key:"serializeNode",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}},{key:"serializeMark",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.marks[t.type.name];return o&&e.renderSpec(Oi(r),o(t,n))}}],[{key:"renderSpec",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"==typeof n)return{dom:t.createTextNode(n)};if(null!=n.nodeType)return{dom:n};if(n.dom&&null!=n.dom.nodeType)return n;var o,i=n[0],a=i.indexOf(" ");a>0&&(r=i.slice(0,a),i=i.slice(a+1));var s=r?t.createElementNS(r,i):t.createElement(i),u=n[1],c=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u))for(var l in c=2,u)if(null!=u[l]){var f=l.indexOf(" ");f>0?s.setAttributeNS(l.slice(0,f),l.slice(f+1),u[l]):s.setAttribute(l,u[l])}for(var d=c;d<n.length;d++){var p=n[d];if(0===p){if(d<n.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=e.renderSpec(t,p,r),v=h.dom,m=h.contentDOM;if(s.appendChild(v),m){if(o)throw new RangeError("Multiple content holes");o=m}}return{dom:s,contentDOM:o}}},{key:"fromSchema",value:function(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}},{key:"nodesFromSchema",value:function(e){var t=xi(e.nodes);return t.text||(t.text=function(e){return e.text}),t}},{key:"marksFromSchema",value:function(e){return xi(e.marks)}}]),e}();function xi(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Oi(e){return e.document||window.document}var Ei=Math.pow(2,16);function Di(e){return 65535&e}var Si=function(){function e(t,n,r){h(this,e),this.pos=t,this.delInfo=n,this.recover=r}return m(e,[{key:"deleted",get:function(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function(){return(4&this.delInfo)>0}}]),e}(),Ci=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(h(this,e),this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}return m(e,[{key:"recover",value:function(e){var t=0,n=Di(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/Ei}(e)}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var u=this.ranges[a+o],c=this.ranges[a+i],l=s+u;if(e<=l){var f=s+r+((u?e==s?-1:e==l?1:t:t)<0?0:c);if(n)return f;var d=e==(t<0?s:l)?null:a/3+(e-s)*Ei,p=e==s?2:e==l?1:4;return(t<0?e!=s:e!=l)&&(p|=8),new Si(f,p,d)}r+=c-u}return n?e+r:new Si(e+r,0,null)}},{key:"touches",value:function(e,t){for(var n=0,r=Di(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var u=this.ranges[a+o];if(e<=s+u&&a==3*r)return!0;n+=this.ranges[a+i]-u}return!1}},{key:"forEach",value:function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),u=this.ranges[r+t],c=this.ranges[r+n];e(a,a+u,s,s+c),o+=c-u}}},{key:"invert",value:function(){return new e(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}}]),e}();Ci.empty=new Ci([]);var ji=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;h(this,e),this.maps=t,this.mirror=n,this.from=r,this.to=o}return m(e,[{key:"slice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new e(this.maps,this.mirror,t,n)}},{key:"copy",value:function(){return new e(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}},{key:"appendMapping",value:function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}},{key:"getMirror",value:function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}},{key:"setMirror",value:function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}},{key:"appendMappingInverted",value:function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}},{key:"invert",value:function(){var t=new e;return t.appendMappingInverted(this),t}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,e=this.maps[a].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new Si(e,r,null)}}]),e}(),_i=Object.create(null),Ai=function(){function e(){h(this,e)}return m(e,[{key:"getMap",value:function(){return Ci.empty}},{key:"merge",value:function(e){return null}}],[{key:"fromJSON",value:function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=_i[t.stepType];if(!n)throw new RangeError("No step type ".concat(t.stepType," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in _i)throw new RangeError("Duplicate use of step JSON ID "+e);return _i[e]=t,t.prototype.jsonID=e,t}}]),e}(),Ni=function(){function e(t,n){h(this,e),this.doc=t,this.failed=n}return m(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,n,r,o){try{return e.ok(t.replace(n,r,o))}catch(ur){if(ur instanceof So)return e.fail(ur.message);throw ur}}}]),e}();function Ti(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var i=e.child(o);i.content.size&&(i=i.copy(Ti(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return wo.fromArray(r)}var Mi=function(e){g(n,e);var t=O(n);function n(e,r,o){var i;return h(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return m(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Co(Ti(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return Ni.fromReplace(e,this.from,this.to,i)}},{key:"invert",value:function(){return new Fi(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(Ai);Ai.jsonID("addMark",Mi);var Fi=function(e){g(n,e);var t=O(n);function n(e,r,o){var i;return h(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return m(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=new Co(Ti(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))}),e),n.openStart,n.openEnd);return Ni.fromReplace(e,this.from,this.to,r)}},{key:"invert",value:function(){return new Mi(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(Ai);Ai.jsonID("removeMark",Fi);var Ri=function(e){g(n,e);var t=O(n);function n(e,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return h(this,n),(i=t.call(this)).from=e,i.to=r,i.slice=o,i.structure=a,i}return m(n,[{key:"apply",value:function(e){return this.structure&&Bi(e,this.from,this.to)?Ni.fail("Structure replace would overwrite content"):Ni.fromReplace(e,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new Ci([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new n(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new n(t.pos,Math.max(t.pos,r.pos),this.slice)}},{key:"merge",value:function(e){if(!(e instanceof n)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var t=this.slice.size+e.slice.size==0?Co.empty:new Co(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new n(e.from,this.to,t,this.structure)}var r=this.slice.size+e.slice.size==0?Co.empty:new Co(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new n(this.from,this.to+(e.to-e.from),r,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new n(t.from,t.to,Co.fromJSON(e,t.slice),!!t.structure)}}]),n}(Ai);Ai.jsonID("replace",Ri);var Pi=function(e){g(n,e);var t=O(n);function n(e,r,o,i,a,s){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return h(this,n),(u=t.call(this)).from=e,u.to=r,u.gapFrom=o,u.gapTo=i,u.slice=a,u.insert=s,u.structure=c,u}return m(n,[{key:"apply",value:function(e){if(this.structure&&(Bi(e,this.from,this.gapFrom)||Bi(e,this.gapTo,this.to)))return Ni.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ni.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?Ni.fromReplace(e,this.from,this.to,n):Ni.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new Ci([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var t=this.gapTo-this.gapFrom;return new n(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new n(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,Co.fromJSON(e,t.slice),t.insert,!!t.structure)}}]),n}(Ai);function Bi(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function Li(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ii(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!Li(r,o,i))break}return null}function zi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=Vi(e,t),i=o&&$i(r,t);return i?o.map(Ui).concat({type:t,attrs:n}).concat(i.map(Ui)):null}function Ui(e){return{type:e,attrs:null}}function Vi(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function $i(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,u=r;s&&u<o;u++)s=s.matchType(n.child(u).type);return s&&s.validEnd?a:null}function Hi(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=e.steps.length;e.doc.nodesBetween(t,n,(function(t,n){if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);var a=e.mapping.slice(i),s=a.map(n,1),u=a.map(n+t.nodeSize,1);return e.step(new Pi(s,u,s+1,u-1,new Co(wo.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}function qi(e,t,n,r,o){var i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);var a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Pi(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Co(wo.from(a),0,0),1,!0))}function Wi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,u=n-2;s>i;s--,u--){var c=o.node(s),l=o.index(s);if(c.type.spec.isolating)return!1;var f=c.content.cutByIndex(l,c.childCount),d=r&&r[u]||c;if(d!=c&&(f=f.replaceChild(0,d.type.create(d.attrs))),!c.canReplace(l+1,c.childCount)||!d.type.validContent(f))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)}function Yi(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.doc.resolve(t),i=wo.empty,a=wo.empty,s=o.depth,u=o.depth-n,c=n-1;s>u;s--,c--){i=wo.from(o.node(s).copy(i));var l=r&&r[c];a=wo.from(l?l.type.create(l.attrs,a):o.node(s).copy(a))}e.step(new Ri(t,t,new Co(i.append(a),n,n),!0))}function Gi(e,t){var n=e.resolve(t),r=n.index();return Ki(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Ki(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function Ji(e,t,n){var r=new Ri(t-n,t+n,Co.empty,!0);e.step(r)}function Qi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Co.empty;if(t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return Xi(o,i,r)?new Ri(t,n,r):new Zi(o,i,r).fit()}function Xi(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Ai.jsonID("replaceAround",Pi);var Zi=function(){function e(t,n,r){h(this,e),this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=wo.empty;for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(var a=t.depth;a>0;a--)this.placed=wo.from(t.node(a).copy(this.placed))}return m(e,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var u=new Co(i,a,s);return t>-1?new Pi(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new Ri(r.pos,o.pos,u):null}},{key:"findFittable",value:function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=null,r=(t?(n=na(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,u=void 0,c=null;if(1==e&&(r?s.matchType(r.type)||(c=s.fillBefore(wo.from(r),!1)):n&&a.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:c};if(2==e&&r&&(u=s.findWrapping(r.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:u};if(n&&s.matchType(n.type))break}}},{key:"openMore",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=na(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new Co(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}},{key:"dropNode",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=na(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new Co(ea(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Co(ea(t,n,1),n,r)}},{key:"placeNodes",value:function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,i=e.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a<i.length;a++)this.openFrontierNode(i[a]);var s=this.unplaced,u=r?r.content:s.content,c=s.openStart-t,l=0,f=[],d=this.frontier[n],p=d.match,h=d.type;if(o){for(a=0;a<o.childCount;a++)f.push(o.child(a));p=p.matchFragment(o)}for(var v=u.size+t-(s.content.size-s.openEnd);l<u.childCount;){var m=u.child(l),y=p.matchType(m.type);if(!y)break;(++l>1||0==c||m.content.size)&&(p=y,f.push(ra(m.mark(h.allowedMarks(m.marks)),1==l?c:0,l==u.childCount?v:-1)))}var g=l==u.childCount;g||(v=-1),this.placed=ta(this.placed,n,wo.from(f)),this.frontier[n].match=p,g&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var b=0,k=u;b<v;b++){var w=k.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),k=w.content}this.unplaced=g?0==t?Co.empty:new Co(ea(s.content,t-1,1),t-1,v<0?s.openEnd:t-1):new Co(ea(s.content,t,l),s.openStart,s.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!oa(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r}},{key:"findCloseLevel",value:function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=oa(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var u=this.frontier[s],c=u.match,l=oa(e,s,u.type,c,!0);if(!l||l.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}},{key:"close",value:function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=ta(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e}},{key:"openFrontierNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=ta(this.placed,this.depth,wo.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}},{key:"closeFrontierNode",value:function(){var e=this.frontier.pop().match.fillBefore(wo.empty,!0);e.childCount&&(this.placed=ta(this.placed,this.frontier.length,e))}}]),e}();function ea(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ea(e.firstChild.content,t-1,n)))}function ta(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ta(e.lastChild.content,t-1,n)))}function na(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function ra(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,ra(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(wo.empty,!0)))),e.copy(r)}function oa(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function ia(e){return e.spec.defining||e.spec.definingForContent}function aa(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(aa(i.content,t+1,n,r,i)))}if(t>r){var a=o.contentMatchAt(0),s=a.fillBefore(e).append(e);e=s.append(a.matchFragment(s).fillBefore(wo.empty,!0))}return e}function sa(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var ua=Error;((ua=function e(t){var n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype)).constructor=ua,ua.prototype.name="TransformError";var ca=function(){function e(t){h(this,e),this.doc=t,this.steps=[],this.docs=[],this.mapping=new ji}return m(e,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(e){var t=this.maybeStep(e);if(t.failed)throw new ua(t.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Co.empty,r=Qi(this.doc,e,t,n);return r&&this.step(r),this}},{key:"replaceWith",value:function(e,t,n){return this.replace(e,t,new Co(wo.from(n),0,0))}},{key:"delete",value:function(e,t){return this.replace(e,t,Co.empty)}},{key:"insert",value:function(e,t){return this.replaceWith(e,e,t)}},{key:"replaceRange",value:function(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);var o=e.doc.resolve(t),i=e.doc.resolve(n);if(Xi(o,i,r))return e.step(new Ri(t,n,r));var a=sa(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,c=o.pos-1;u>0;u--,c--){var l=o.node(u).type.spec;if(l.defining||l.definingAsContext||l.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==c&&a.splice(1,0,-u)}for(var f=a.indexOf(s),d=[],p=r.openStart,h=r.content,v=0;;v++){var m=h.firstChild;if(d.push(m),v==r.openStart)break;h=m.content}for(var y=p-1;y>=0;y--){var g=d[y].type,b=ia(g);if(b&&o.node(f).type!=g)p=y;else if(b||!g.isTextblock)break}for(var k=r.openStart;k>=0;k--){var w=(k+p+1)%(r.openStart+1),x=d[w];if(x)for(var O=0;O<a.length;O++){var E=a[(O+f)%a.length],D=!0;E<0&&(D=!1,E=-E);var S=o.node(E-1),C=o.index(E-1);if(S.canReplaceWith(C,C,x.type,x.marks))return e.replace(o.before(E),D?i.after(E):n,new Co(aa(r.content,0,r.openStart,w),w,r.openEnd))}}for(var j=e.steps.length,_=a.length-1;_>=0&&(e.replace(t,n,r),!(e.steps.length>j));_--){var A=a[_];A<0||(t=o.before(A),n=i.after(A))}}(this,e,t,n),this}},{key:"replaceRangeWith",value:function(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){var o=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new Co(wo.from(r),0,0))}(this,e,t,n),this}},{key:"deleteRange",value:function(e,t){return function(e,t,n){for(var r=e.doc.resolve(t),o=e.doc.resolve(n),i=sa(r,o),a=0;a<i.length;a++){var s=i[a],u=a==i.length-1;if(u&&0==s||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(u||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(var c=1;c<=r.depth&&c<=o.depth;c++)if(t-r.start(c)==r.depth-c&&n>r.end(c)&&o.end(c)-n!=o.depth-c)return e.delete(r.before(c),n);e.delete(t,n)}(this,e,t),this}},{key:"lift",value:function(e,t){return function(e,t,n){for(var r=t.$from,o=t.$to,i=t.depth,a=r.before(i+1),s=o.after(i+1),u=a,c=s,l=wo.empty,f=0,d=i,p=!1;d>n;d--)p||r.index(d)>0?(p=!0,l=wo.from(r.node(d).copy(l)),f++):u--;for(var h=wo.empty,v=0,m=i,y=!1;m>n;m--)y||o.after(m+1)<o.end(m)?(y=!0,h=wo.from(o.node(m).copy(h)),v++):c++;e.step(new Pi(u,c,a,s,new Co(l.append(h),f,v),l.size-f,!0))}(this,e,t),this}},{key:"join",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ji(this,e,t),this}},{key:"wrap",value:function(e,t){return function(e,t,n){for(var r=wo.empty,o=n.length-1;o>=0;o--){if(r.size){var i=n[o].type.contentMatch.matchFragment(r);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=wo.from(n[o].type.create(n[o].attrs,r))}var a=t.start,s=t.end;e.step(new Pi(a,s,a,s,new Co(r,0,0),n.length,!0))}(this,e,t),this}},{key:"setBlockType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Hi(this,e,t,n,r),this}},{key:"setNodeMarkup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return qi(this,e,t,n,r),this}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;return Yi(this,e,t,n),this}},{key:"addMark",value:function(e,t,n){return function(e,t,n,r){var o,i,a=[],s=[];e.doc.nodesBetween(t,n,(function(e,u,c){if(e.isInline){var l=e.marks;if(!r.isInSet(l)&&c.type.allowsMarkType(r.type)){for(var f=Math.max(u,t),d=Math.min(u+e.nodeSize,n),p=r.addToSet(l),h=0;h<l.length;h++)l[h].isInSet(p)||(o&&o.to==f&&o.mark.eq(l[h])?o.to=d:a.push(o=new Fi(f,d,l[h])));i&&i.to==f?i.to=d:s.push(i=new Mi(f,d,r))}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)}))}(this,e,t,n),this}},{key:"removeMark",value:function(e,t,n){return function(e,t,n,r){var o=[],i=0;e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof ui)for(var u,c=e.marks;u=r.isInSet(c);)(s||(s=[])).push(u),c=u.removeFromSet(c);else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var l=Math.min(a+e.nodeSize,n),f=0;f<s.length;f++){for(var d=s[f],p=void 0,h=0;h<o.length;h++){var v=o[h];v.step==i-1&&d.eq(o[h].style)&&(p=v)}p?(p.to=l,p.step=i):o.push({style:d,from:Math.max(a,t),to:l,step:i})}}})),o.forEach((function(t){return e.step(new Fi(t.from,t.to,t.style))}))}(this,e,t,n),this}},{key:"clearIncompatible",value:function(e,t,n){return function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.contentMatch,o=e.doc.nodeAt(t),i=[],a=t+1,s=0;s<o.childCount;s++){var u=o.child(s),c=a+u.nodeSize,l=r.matchType(u.type);if(l){r=l;for(var f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new Fi(a,c,u.marks[f]))}else i.push(new Ri(a,c,Co.empty));a=c}if(!r.validEnd){var d=r.fillBefore(wo.empty,!0);e.replace(a,a,new Co(d,0,0))}for(var p=i.length-1;p>=0;p--)e.step(i[p])}(this,e,t,n),this}}]),e}(),la=Object.create(null),fa=function(){function e(t,n,r){h(this,e),this.$anchor=t,this.$head=n,this.ranges=r||[new da(t.min(n),t.max(n))]}return m(e,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Co.empty,n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,a=this.ranges,s=0;s<a.length;s++){var u=a[s],c=u.$from,l=u.$to,f=e.mapping.slice(i);e.replaceRange(f.map(c.pos),f.map(l.pos),s?Co.empty:t),0==s&&xa(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,u=e.mapping.slice(n),c=u.map(a.pos),l=u.map(s.pos);o?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),xa(e,n,t.isInline?-1:1))}}},{key:"getBookmark",value:function(){return va.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.parent.inlineContent?new va(e):wa(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?wa(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):wa(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}return null}},{key:"near",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(e,t)||this.findFrom(e,-t)||new ba(e.node(0))}},{key:"atStart",value:function(e){return wa(e,e,0,0,1)||new ba(e)}},{key:"atEnd",value:function(e){return wa(e,e,e.content.size,e.childCount,-1)||new ba(e)}},{key:"fromJSON",value:function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=la[t.type];if(!n)throw new RangeError("No selection type ".concat(t.type," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in la)throw new RangeError("Duplicate use of selection JSON ID "+e);return la[e]=t,t.prototype.jsonID=e,t}}]),e}();fa.prototype.visible=!0;var da=m((function e(t,n){h(this,e),this.$from=t,this.$to=n})),pa=!1;function ha(e){pa||e.parent.inlineContent||(pa=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var va=function(e){g(n,e);var t=O(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return h(this,n),ha(e),ha(r),t.call(this,e,r)}return m(n,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return fa.near(r);var o=e.resolve(t.map(this.anchor));return new n(o.parent.inlineContent?o:r,r)}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Co.empty;if(rt(b(n.prototype),"replace",this).call(this,e,t),t==Co.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}},{key:"getBookmark",value:function(){return new ma(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}},{key:"between",value:function(e,t,r){var o=e.pos-t.pos;if(r&&!o||(r=o>=0?1:-1),!t.parent.inlineContent){var i=fa.findFrom(t,r,!0)||fa.findFrom(t,-r,!0);if(!i)return fa.near(t,r);t=i.$head}return e.parent.inlineContent||(0==o||(e=(fa.findFrom(e,-r,!0)||fa.findFrom(e,r,!0)).$anchor).pos<t.pos!=o<0)&&(e=t),new n(e,t)}}]),n}(fa);fa.jsonID("text",va);var ma=function(){function e(t,n){h(this,e),this.anchor=t,this.head=n}return m(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){return va.between(e.resolve(this.anchor),e.resolve(this.head))}}]),e}(),ya=function(e){g(n,e);var t=O(n);function n(e){var r;h(this,n);var o=e.nodeAfter,i=e.node(0).resolve(e.pos+o.nodeSize);return(r=t.call(this,e,i)).node=o,r}return m(n,[{key:"map",value:function(e,t){var r=t.mapResult(this.anchor),o=r.deleted,i=r.pos,a=e.resolve(i);return o?fa.near(a):new n(a)}},{key:"content",value:function(){return new Co(wo.from(this.node),0,0)}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new ga(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new n(e.resolve(t.anchor))}},{key:"create",value:function(e,t){return new n(e.resolve(t))}},{key:"isSelectable",value:function(e){return!e.isText&&!1!==e.type.spec.selectable}}]),n}(fa);ya.prototype.visible=!1,fa.jsonID("node",ya);var ga=function(){function e(t){h(this,e),this.anchor=t}return m(e,[{key:"map",value:function(t){var n=t.mapResult(this.anchor),r=n.deleted,o=n.pos;return r?new ma(o,o):new e(o)}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ya.isSelectable(n)?new ya(t):fa.near(t)}}]),e}(),ba=function(e){g(n,e);var t=O(n);function n(e){return h(this,n),t.call(this,e.resolve(0),e.resolve(e.content.size))}return m(n,[{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Co.empty;if(t==Co.empty){e.delete(0,e.doc.content.size);var r=fa.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else rt(b(n.prototype),"replace",this).call(this,e,t)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(e){return new n(e)}},{key:"eq",value:function(e){return e instanceof n}},{key:"getBookmark",value:function(){return ka}}],[{key:"fromJSON",value:function(e){return new n(e)}}]),n}(fa);fa.jsonID("all",ba);var ka={map:function(){return this},resolve:function(e){return new ba(e)}};function wa(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t.inlineContent)return va.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&ya.isSelectable(s))return ya.create(e,n-(o<0?s.nodeSize:0))}else{var u=wa(e,s,n+o,o<0?s.childCount:0,o,i);if(u)return u}n+=s.nodeSize*o}return null}function xa(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof Ri||i instanceof Pi)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(fa.near(e.doc.resolve(o),n))}}var Oa=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),(r=t.call(this,e.doc)).curSelectionFor=0,r.updated=0,r.meta=Object.create(null),r.time=Date.now(),r.curSelection=e.selection,r.storedMarks=e.storedMarks,r}return m(n,[{key:"selection",get:function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}},{key:"setSelection",value:function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(1&this.updated)>0}},{key:"setStoredMarks",value:function(e){return this.storedMarks=e,this.updated|=2,this}},{key:"ensureMarks",value:function(e){return Do.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}},{key:"addStoredMark",value:function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(2&this.updated)>0}},{key:"addStep",value:function(e,t){rt(b(n.prototype),"addStep",this).call(this,e,t),this.updated=-3&this.updated,this.storedMarks=null}},{key:"setTime",value:function(e){return this.time=e,this}},{key:"replaceSelection",value:function(e){return this.selection.replace(this,e),this}},{key:"replaceSelectionWith",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Do.none))),n.replaceWith(this,e),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(e,t,n){var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(fa.near(this.selection.$to)),this}},{key:"setMeta",value:function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}},{key:"getMeta",value:function(e){return this.meta["string"==typeof e?e:e.key]}},{key:"isGeneric",get:function(){for(var e in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=4,this}},{key:"scrolledIntoView",get:function(){return(4&this.updated)>0}}]),n}(ca);function Ea(e,t){return t&&e?e.bind(t):e}var Da=m((function e(t,n,r){h(this,e),this.name=t,this.init=Ea(n.init,r),this.apply=Ea(n.apply,r)})),Sa=[new Da("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new Da("selection",{init:function(e,t){return e.selection||fa.atStart(t.doc)},apply:function(e){return e.selection}}),new Da("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Da("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],Ca=m((function e(t,n){var r=this;h(this,e),this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Sa.slice(),n&&n.forEach((function(e){if(r.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");r.plugins.push(e),r.pluginsByKey[e.key]=e,e.spec.state&&r.fields.push(new Da(e.key,e.spec.state,e))}))})),ja=function(){function e(t){h(this,e),this.config=t}return m(e,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(e){return this.applyTransaction(e).state}},{key:"filterTransaction",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}},{key:"applyTransaction",value:function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,u=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,u,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var l=0;l<this.config.plugins.length;l++)r.push(l<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}},{key:"applyInner",value:function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var n=new e(this.config),r=this.config.fields,o=0;o<r.length;o++){var i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}},{key:"tr",get:function(){return new Oa(this)}},{key:"reconfigure",value:function(t){for(var n=new Ca(this.schema,t.plugins),r=n.fields,o=new e(n),i=0;i<r.length;i++){var a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}},{key:"toJSON",value:function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}}],[{key:"create",value:function(t){for(var n=new Ca(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n),o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}},{key:"fromJSON",value:function(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var o=new Ca(t.schema,t.plugins),i=new e(o);return o.fields.forEach((function(e){if("doc"==e.name)i.doc=qo.fromJSON(t.schema,n.doc);else if("selection"==e.name)i.selection=fa.fromJSON(i.doc,n.selection);else if("storedMarks"==e.name)n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var o in r){var a=r[o],s=a.spec.state;if(a.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,o))return void(i[e.name]=s.fromJSON.call(a,t,n[o],i))}i[e.name]=e.init(t,i)}})),i}}]),e}();function _a(e,t,n){for(var r in e){var o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=_a(o,t,{})),n[r]=o}return n}var Aa=function(){function e(t){h(this,e),this.spec=t,this.props={},t.props&&_a(t.props,this,this.props),this.key=t.key?t.key.key:Ta("plugin")}return m(e,[{key:"getState",value:function(e){return e[this.key]}}]),e}(),Na=Object.create(null);function Ta(e){return e in Na?e+"$"+ ++Na[e]:(Na[e]=0,e+"$")}var Ma=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";h(this,e),this.key=Ta(t)}return m(e,[{key:"get",value:function(e){return e.config.pluginsByKey[this.key]}},{key:"getState",value:function(e){return e[this.key]}}]),e}(),Fa="undefined"!=typeof navigator?navigator:null,Ra="undefined"!=typeof document?document:null,Pa=Fa&&Fa.userAgent||"",Ba=/Edge\/(\d+)/.exec(Pa),La=/MSIE \d/.exec(Pa),Ia=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Pa),za=!!(La||Ia||Ba),Ua=La?document.documentMode:Ia?+Ia[1]:Ba?+Ba[1]:0,Va=!za&&/gecko\/(\d+)/i.test(Pa);Va&&(/Firefox\/(\d+)/.exec(Pa)||[0,0])[1];var $a=!za&&/Chrome\/(\d+)/.exec(Pa),Ha=!!$a,qa=$a?+$a[1]:0,Wa=!za&&!!Fa&&/Apple Computer/.test(Fa.vendor),Ya=Wa&&(/Mobile\/\w+/.test(Pa)||!!Fa&&Fa.maxTouchPoints>2),Ga=Ya||!!Fa&&/Mac/.test(Fa.platform),Ka=/Android \d/.test(Pa),Ja=!!Ra&&"webkitFontSmoothing"in Ra.documentElement.style,Qa=Ja?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Xa=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Za=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},es=null,ts=function(e,t,n){var r=es||(es=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},ns=function(e,t,n,r){return n&&(is(e,t,n,r,-1)||is(e,t,n,r,1))},rs=/^(img|br|input|textarea|hr)$/i;function is(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:as(e))){var i=e.parentNode;if(!i||1!=i.nodeType||us(e)||rs.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Xa(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?as(e):0}}}function as(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ss(e,t,n){for(var r=0==t,o=t==as(e);r||o;){if(e==n)return!0;var i=Xa(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==as(e)}}function us(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var cs=function(e){var t=e.isCollapsed;return t&&Ha&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function ls(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function fs(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function ds(e,t){return"number"==typeof e?e:e[t]}function ps(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function hs(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=Za(a))if(1==a.nodeType){var s=a,u=s==i.body,c=u?fs(i):ps(s),l=0,f=0;if(t.top<c.top+ds(r,"top")?f=-(c.top-t.top+ds(o,"top")):t.bottom>c.bottom-ds(r,"bottom")&&(f=t.bottom-c.bottom+ds(o,"bottom")),t.left<c.left+ds(r,"left")?l=-(c.left-t.left+ds(o,"left")):t.right>c.right-ds(r,"right")&&(l=t.right-c.right+ds(o,"right")),l||f)if(u)i.defaultView.scrollBy(l,f);else{var d=s.scrollLeft,p=s.scrollTop;f&&(s.scrollTop+=f),l&&(s.scrollLeft+=l);var h=s.scrollLeft-d,v=s.scrollTop-p;t={left:t.left-h,top:t.top-v,right:t.right-h,bottom:t.bottom-v}}if(u)break}}function vs(e){for(var t=[],n=e.ownerDocument,r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Za(r));return t}function ms(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var ys=null;function gs(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,u=e.firstChild,c=0;u;u=u.nextSibling,c++){var l=void 0;if(1==u.nodeType)l=u.getClientRects();else{if(3!=u.nodeType)continue;l=ts(u).getClientRects()}for(var f=0;f<l.length;f++){var d=l[f];if(d.top<=a&&d.bottom>=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var p=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(p<o){n=u,o=p,r=p&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==u.nodeType&&p&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=xs(r,1);if(i.top!=i.bottom&&bs(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:gs(n,r)}function bs(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function ks(e,t,n){var r=e.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=e.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),u=0;u<s.length;u++){var c=s[u];if(bs(t,c))return ks(a,t,c)}if((i=(i+1)%r)==o)break}return e}function ws(e,t){var n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{var i=r.caretPositionFromPoint(t.left,t.top);i&&(n=i.offsetNode,o=i.offset)}catch(h){}if(!n&&r.caretRangeFromPoint){var a=r.caretRangeFromPoint(t.left,t.top);a&&(n=a.startContainer,o=a.startOffset)}var s,u=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top+1);if(!u||!e.dom.contains(1!=u.nodeType?u.parentNode:u)){var c=e.dom.getBoundingClientRect();if(!bs(t,c))return null;if(!(u=ks(e.dom,t,c)))return null}if(Wa)for(var l=u;n&&l;l=Za(l))l.draggable&&(n=void 0);if(u=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(u,t),n){if(Va&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length))<n.childNodes.length){var f,d=n.childNodes[o];"IMG"==d.nodeName&&(f=d.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==s&&(s=function(e,t,n){var r=gs(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,u,t));var p=e.docView.nearestDesc(u,!0);return{pos:s,inside:p?p.posAtStart-p.border:-1}}function xs(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var Os=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Es(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=Ja||Va;if(3==o.nodeType){if(!a||!Os.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==o.nodeValue.length?(s--,c=1):n<0?s--:u++,Ds(xs(ts(o,s,u),c),c<0)}var l=xs(ts(o,i,i),n);if(Va&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=xs(ts(o,i-1,i-1),-1);if(f.top==l.top){var d=xs(ts(o,i,i+1),-1);if(d.top!=l.top)return Ds(d,d.left<f.left)}}return l}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==as(o))){var p=o.childNodes[i-1];if(1==p.nodeType)return Ss(p.getBoundingClientRect(),!1)}if(i<as(o)){var h=o.childNodes[i];if(1==h.nodeType)return Ss(h.getBoundingClientRect(),!0)}return Ss(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==as(o))){var v=o.childNodes[i-1],m=3==v.nodeType?ts(v,as(v)-(a?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(m)return Ds(xs(m,1),!1)}if(i<as(o)){for(var y=o.childNodes[i];y.pmViewDesc&&y.pmViewDesc.ignoreForCoords;)y=y.nextSibling;var g=y?3==y.nodeType?ts(y,0,a?0:1):1==y.nodeType?y:null:null;if(g)return Ds(xs(g,-1),!0)}return Ds(xs(3==o.nodeType?ts(o):o,-n),n>=0)}function Ds(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Ss(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Cs(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var js=/[\u0590-\u08ac]/;var _s=null,As=null,Ns=!1;function Ts(e,t,n){return _s==t&&As==n?Ns:(_s=t,As=n,Ns="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Cs(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=Es(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=ts(a,0,a.nodeValue.length).getClientRects()}for(var u=0;u<s.length;u++){var c=s[u];if(c.bottom>c.top+1&&("up"==n?i.top-c.top>2*(c.bottom-i.top):c.bottom-i.bottom>2*(i.bottom-c.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return js.test(r.parent.textContent)&&s.modify?Cs(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?i:a}(e,t,n))}var Ms=function(){function e(t,n,r,o){h(this,e),this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=0,r.pmViewDesc=this}return m(e,[{key:"matchesWidget",value:function(e){return!1}},{key:"matchesMark",value:function(e){return!1}},{key:"matchesNode",value:function(e,t,n){return!1}},{key:"matchesHack",value:function(e){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(e){return!1}},{key:"size",get:function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var e=0;e<this.children.length;e++)this.children[e].destroy()}},{key:"posBeforeChild",value:function(e){for(var t=0,n=this.posAtStart;;t++){var r=this.children[t];if(r==e)return n;n+=r.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>Xa(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!1;break}if(u.previousSibling)break}if(null==s&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.nextSibling)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r),i=void 0;if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}},{key:"getDesc",value:function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t}},{key:"posFromDOM",value:function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}},{key:"descAt",value:function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}},{key:"domFromPos",value:function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n,r=0,o=0,i=0;r<this.children.length;r++){var a=this.children[r],s=i+a.size;if(s>e||a instanceof zs){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof Fs&&n.side>=0;r--);if(t<=0){for(var u,c=!0;(u=r?this.children[r-1]:null)&&u.dom.parentNode!=this.contentDOM;r--,c=!1);return u&&t&&c&&!u.border&&!u.domAtom?u.domFromPos(u.size,t):{node:this.contentDOM,offset:u?Xa(u.dom)+1:0}}for(var l,f=!0;(l=r<this.children.length?this.children[r]:null)&&l.dom.parentNode!=this.contentDOM;r++,f=!1);return l&&f&&!l.border&&!l.domAtom?l.domFromPos(0,t):{node:this.contentDOM,offset:l?Xa(l.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],u=i+s.size;if(-1==r&&e<=u){var c=i+s.border;if(e>=c&&t<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var l=a;l>0;l--){var f=this.children[l-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=Xa(f.dom)+1;break}e-=f.size}-1==r&&(r=0)}if(r>-1&&(u>t||a==this.children.length-1)){t=u;for(var d=a+1;d<this.children.length;d++){var p=this.children[d];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=Xa(p.dom);break}t+=p.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}},{key:"emptyChildAt",value:function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}},{key:"domAfterPos",value:function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}},{key:"setSelection",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var u=this.children[a],c=s+u.size;if(o>s&&i<c)return u.setSelection(e-s-u.border,t-s-u.border,n,r);s=c}var l=this.domFromPos(e,e?-1:1),f=t==e?l:this.domFromPos(t,t?-1:1),d=n.getSelection(),p=!1;if((Va||Wa)&&e==t){var h=l,v=h.node,m=h.offset;if(3==v.nodeType){if((p=!(!m||"\n"!=v.nodeValue[m-1]))&&m==v.nodeValue.length)for(var y,g=v;g;g=g.parentNode){if(y=g.nextSibling){"BR"==y.nodeName&&(l=f={node:y.parentNode,offset:Xa(y)+1});break}var b=g.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{var k=v.childNodes[m-1];p=k&&("BR"==k.nodeName||"false"==k.contentEditable)}}if(Va&&d.focusNode&&d.focusNode!=f.node&&1==d.focusNode.nodeType){var w=d.focusNode.childNodes[d.focusOffset];w&&"false"==w.contentEditable&&(r=!0)}if(r||p&&Wa||!ns(l.node,l.offset,d.anchorNode,d.anchorOffset)||!ns(f.node,f.offset,d.focusNode,d.focusOffset)){var x=!1;if((d.extend||e==t)&&!p){d.collapse(l.node,l.offset);try{e!=t&&d.extend(f.node,f.offset),x=!0}catch(D){if(!(D instanceof DOMException))throw D}}if(!x){if(e>t){var O=l;l=f,f=O}var E=document.createRange();E.setEnd(f.node,f.offset),E.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(E)}}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM&&"selection"!=e.type}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}},{key:"markParentsDirty",value:function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}}]),e}(),Fs=function(e){g(n,e);var t=O(n);function n(e,r,o,i){var a;h(this,n);var s,u=r.type.toDOM;if("function"==typeof u&&(u=u(o,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:i}))),!r.type.spec.raw){if(1!=u.nodeType){var c=document.createElement("span");c.appendChild(u),u=c}u.contentEditable="false",u.classList.add("ProseMirror-widget")}return(a=t.call(this,e,[],u,null)).widget=r,a.widget=r,s=w(a),a}return m(n,[{key:"matchesWidget",value:function(e){return 0==this.dirty&&e.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)}},{key:"ignoreMutation",value:function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),rt(b(n.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),n}(Ms),Rs=function(e){g(n,e);var t=O(n);function n(e,r,o,i){var a;return h(this,n),(a=t.call(this,e,[],r,null)).textDOM=o,a.text=i,a}return m(n,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}},{key:"domFromPos",value:function(e){return{node:this.textDOM,offset:e}}},{key:"ignoreMutation",value:function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}]),n}(Ms),Ps=function(e){g(n,e);var t=O(n);function n(e,r,o,i){var a;return h(this,n),(a=t.call(this,e,[],o,i)).mark=r,a}return m(n,[{key:"parseRule",value:function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}},{key:"matchesMark",value:function(e){return 3!=this.dirty&&this.mark.eq(e)}},{key:"markDirty",value:function(e,t){if(rt(b(n.prototype),"markDirty",this).call(this,e,t),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function(e,t,r){var o=n.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=Zs(i,t,a,r)),e>0&&(i=Zs(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}],[{key:"create",value:function(e,t,r,o){var i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return a&&a.dom||(a=wi.renderSpec(document,t.type.spec.toDOM(t,r))),new n(e,t,a.dom,a.contentDOM||a.dom)}}]),n}(Ms),Bs=function(e){g(n,e);var t=O(n);function n(e,r,o,i,a,s,u,c,l){var f;return h(this,n),(f=t.call(this,e,[],a,s)).node=r,f.outerDeco=o,f.innerDeco=i,f.nodeDOM=u,s&&f.updateChildren(c,l),f}return m(n,[{key:"parseRule",value:function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return wo.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t}},{key:"matchesNode",value:function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Ks(t,this.outerDeco)&&n.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,u=new Qs(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var u=0,c=[],l=null,f=0;;){if(u<o.length&&o[u].to==i){for(var d=o[u++],p=void 0;u<o.length&&o[u].to==i;)(p||(p=[d])).push(o[u++]);if(p){p.sort(Xs);for(var h=0;h<p.length;h++)n(p[h],f,!!l)}else n(d,f,!!l)}var v=void 0,m=void 0;if(l)m=-1,v=l,l=null;else{if(!(f<e.childCount))break;m=f,v=e.child(f++)}for(var y=0;y<c.length;y++)c[y].to<=i&&c.splice(y--,1);for(;u<o.length&&o[u].from<=i&&o[u].to>i;)c.push(o[u++]);var g=i+v.nodeSize;if(v.isText){var b=g;u<o.length&&o[u].from<b&&(b=o[u].from);for(var k=0;k<c.length;k++)c[k].to<b&&(b=c[k].to);b<g&&(l=v.cut(b-i),v=v.cut(0,b-i),g=b,m=-1)}r(v,v.isInline&&!v.isLeaf?c.filter((function(e){return!e.inline})):c.slice(),t.forChild(i,v),m),i=g}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?u.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&u.syncToMarks(i==n.node.childCount?Do.none:n.node.child(i).marks,r,e),u.placeWidget(t,e,o)}),(function(t,n,a,c){var l;u.syncToMarks(t.marks,r,e),u.findNodeMatch(t,n,a,c)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(l=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(t,n,a,l,e)||u.updateNextNode(t,n,a,e,c)||u.addNode(t,n,a,e,o),o+=t.nodeSize})),u.syncToMarks([],r,e),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),Vs(this.contentDOM,this.children,e),Ya&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}},{key:"localCompositionInfo",value:function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(e.state.selection instanceof va)||r<t||o>t+this.node.content.size)return null;var i=e.domSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=as(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){var s=a.nodeValue,u=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var u=a.text;o<e.childCount;){var c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;u+=c.text}if(i>=n){var l=s<r?u.lastIndexOf(t,r-s-1):-1;if(l>=0&&l+t.length+s>=n)return s+l;if(n==r&&u.length>=r+t.length-s&&u.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return u<0?null:{node:a,pos:u,text:s}}return{node:a,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}var a=new Rs(this,i,n,o);e.input.compositionNodes.push(a),this.children=Zs(this.children,r,r+o.length,e,a)}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}},{key:"updateInner",value:function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function(e){if(!Ks(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Ws(this.dom,this.nodeDOM,qs(this.outerDeco,this.node,t),qs(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}}},{key:"selectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(e,t,r,o,i,a){var s,u=i.nodeViews[t.type.name],c=u&&u(t,i,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:a}),r,o),l=c&&c.dom,f=c&&c.contentDOM;if(t.isText)if(l){if(3!=l.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else l=document.createTextNode(t.text);else if(!l){var d=wi.renderSpec(document,t.type.spec.toDOM(t));l=d.dom,f=d.contentDOM}f||t.isText||"BR"==l.nodeName||(l.hasAttribute("contenteditable")||(l.contentEditable="false"),t.type.spec.draggable&&(l.draggable=!0));var p=l;return l=Gs(l,r,t),c?s=new Us(e,t,r,o,l,f||null,p,c,i,a+1):t.isText?new Is(e,t,r,o,l,p,i):new n(e,t,r,o,l,f||null,p,i,a+1)}}]),n}(Ms);function Ls(e,t,n,r,o){return Gs(r,t,e),new Bs(void 0,e,t,n,r,r,r,o,0)}var Is=function(e){g(n,e);var t=O(n);function n(e,r,o,i,a,s,u){return h(this,n),t.call(this,e,r,o,i,a,null,s,u,0)}return m(n,[{key:"parseRule",value:function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}},{key:"inParent",value:function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}},{key:"domFromPos",value:function(e){return{node:this.nodeDOM,offset:e}}},{key:"localPosFromDOM",value:function(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):rt(b(n.prototype),"localPosFromDOM",this).call(this,e,t,r)}},{key:"ignoreMutation",value:function(e){return"characterData"!=e.type&&"selection"!=e.type}},{key:"slice",value:function(e,t,r){var o=this.node.cut(e,t),i=document.createTextNode(o.text);return new n(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}},{key:"markDirty",value:function(e,t){rt(b(n.prototype),"markDirty",this).call(this,e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function(){return!1}}]),n}(Bs),zs=function(e){g(n,e);var t=O(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(e){return 0==this.dirty&&this.dom.nodeName==e}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return"IMG"==this.dom.nodeName}}]),n}(Ms),Us=function(e){g(n,e);var t=O(n);function n(e,r,o,i,a,s,u,c,l,f){var d;return h(this,n),(d=t.call(this,e,r,o,i,a,s,u,l,f)).spec=c,d}return m(n,[{key:"update",value:function(e,t,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&rt(b(n.prototype),"update",this).call(this,e,t,r,o)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():rt(b(n.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():rt(b(n.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):rt(b(n.prototype),"setSelection",this).call(this,e,t,r,o)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),rt(b(n.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}},{key:"ignoreMutation",value:function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):rt(b(n.prototype),"ignoreMutation",this).call(this,e)}}]),n}(Bs);function Vs(e,t,n){for(var r=e.firstChild,o=!1,i=0;i<t.length;i++){var a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=Js(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof Ps){var u=r?r.previousSibling:e.lastChild;Vs(a.contentDOM,a.children,n),r=u?u.nextSibling:e.firstChild}}for(;r;)r=Js(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var $s=function(e){e&&(this.nodeName=e)};$s.prototype=Object.create(null);var Hs=[new $s];function qs(e,t,n){if(0==e.length)return Hs;for(var r=n?Hs[0]:new $s,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new $s(a.nodeName)),a){var u=a[s];null!=u&&(n&&1==o.length&&o.push(r=new $s(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+u:"style"==s?r.style=(r.style?r.style+";":"")+u:"nodeName"!=s&&(r[s]=u))}}return o}function Ws(e,t,n,r){if(n==Hs&&r==Hs)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var u=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(u=o.parentNode)&&u.nodeName.toLowerCase()==a.nodeName||((u=document.createElement(a.nodeName)).pmIsDeco=!0,u.appendChild(o),s=Hs[0]),o=u}Ys(o,s||Hs[0],a)}return o}function Ys(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):[],a=n.class?n.class.split(" ").filter(Boolean):[],s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var u=0;u<a.length;u++)-1==i.indexOf(a[u])&&e.classList.add(a[u]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var c,l=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=l.exec(t.style);)e.style.removeProperty(c[1]);n.style&&(e.style.cssText+=n.style)}}function Gs(e,t,n){return Ws(e,e,Hs,qs(t,n,1!=e.nodeType))}function Ks(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Js(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var Qs=function(){function e(t,n){h(this,e),this.lock=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var u=n.children[r-1];if(!(u instanceof Ps)){s=u,r--;break}n=u,r=u.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var c=s.node;if(c){if(c!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)}return m(e,[{key:"destroyBetween",value:function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var u=Ps.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}}},{key:"findNodeMatch",value:function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var u=this.top.children[a];if(u.matchesNode(e,t,n)&&!this.preMatch.matched.has(u)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}},{key:"updateNodeAt",value:function(e,t,n,r,o){var i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)}},{key:"findIndexWithChild",value:function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}}},{key:"updateNextNode",value:function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof Bs){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var u=a.dom;if(!(this.lock&&(u==this.lock||1==u.nodeType&&u.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&Ks(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=u&&(this.changed=!0),this.index++,!0;break}}return!1}},{key:"addNode",value:function(e,t,n,r,o){this.top.children.splice(this.index++,0,Bs.create(this.top,e,t,n,r,o)),this.changed=!0}},{key:"placeWidget",value:function(e,t,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){var o=new Fs(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function(){for(var e=this.top.children[this.index-1],t=this.top;e instanceof Ps;)e=(t=e).children[t.children.length-1];e&&e instanceof Is&&!/\n$/.test(e.node.text)||((Wa||Ha)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{var n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");var r=new zs(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}]),e}();function Xs(e,t){return e.type.side-t.type.side}function Zs(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var u=e[a],c=s,l=s+=u.size;c>=n||l<=t?i.push(u):(c<t&&i.push(u.slice(0,t-c,r)),o&&(i.push(o),o=void 0),l>n&&i.push(u.slice(n-c,u.size,r)))}return i}function eu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,u,c=r.resolve(a);if(cs(n)){for(s=c;o&&!o.node;)o=o.parent;var l=o.node;if(o&&l.isAtom&&ya.isSelectable(l)&&o.parent&&(!l.isInline||!ss(n.focusNode,n.focusOffset,o.dom))){var f=o.posBefore;u=new ya(a==f?c:r.resolve(f))}}else{var d=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(d<0)return null;s=r.resolve(d)}if(!u){var p="pointer"==t||e.state.selection.head<c.pos&&!i?1:-1;u=fu(e,s,c,p)}return u}function tu(e){return e.editable?e.hasFocus():pu(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function nu(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(cu(e,n),tu(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Ha){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&ns(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)uu(e);else{var i,a,s=n.anchor,u=n.head;!ru||n instanceof va||(n.$from.parent.inlineContent||(i=ou(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=ou(e,n.to))),e.docView.setSelection(s,u,e.root,t),ru&&(i&&au(i),a&&au(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&su(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var ru=Wa||Ha&&qa<63;function ou(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(Wa&&i&&"false"==i.contentEditable)return iu(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return iu(i);if(a)return iu(a)}}function iu(e){return e.contentEditable="true",Wa&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function au(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function su(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){tu(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function uu(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,Xa(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&za&&Ua<=11&&(r.disabled=!0,r.disabled=!1)}function cu(e,t){if(t instanceof ya){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(lu(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else lu(e)}function lu(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function fu(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||va.between(t,n,r)}function du(e){return(!e.editable||e.root.activeElement==e.dom)&&pu(e)}function pu(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function hu(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&fa.findFrom(a,t)}function vu(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function mu(e,t,n){var r=e.state.selection;if(!(r instanceof va)){if(r instanceof ya&&r.node.isInline)return vu(e,new va(t>0?r.$to:r.$from));var o=hu(e.state,t);return!!o&&vu(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=hu(e.state,t);return!!(i&&i instanceof ya)&&vu(e,i)}if(!(Ga&&n.indexOf("m")>-1)){var a,s=r.$head,u=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!u||u.isText)return!1;var c=t<0?s.pos-u.nodeSize:s.pos;return!!(u.isAtom||(a=e.docView.descAt(c))&&!a.contentDOM)&&(ya.isSelectable(u)?vu(e,new ya(t<0?e.state.doc.resolve(s.pos-u.nodeSize):s)):!!Ja&&vu(e,new va(e.state.doc.resolve(t<0?c:c+u.nodeSize))))}}function yu(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function gu(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function bu(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(Va&&1==n.nodeType&&r<yu(n)&&gu(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(gu(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(wu(n))break;for(var u=n.previousSibling;u&&gu(u);)o=n.parentNode,i=Xa(u),u=u.previousSibling;if(u)r=yu(n=u);else{if((n=n.parentNode)==e.dom)break;r=0}}a?xu(e,t,n,r):o&&xu(e,t,o,i)}}function ku(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=yu(n);;)if(r<a){if(1!=n.nodeType)break;if(!gu(n.childNodes[r]))break;o=n,i=++r}else{if(wu(n))break;for(var s=n.nextSibling;s&&gu(s);)o=s.parentNode,i=Xa(s)+1,s=s.nextSibling;if(s)r=0,a=yu(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&xu(e,t,o,i)}}function wu(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function xu(e,t,n,r){if(cs(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&nu(e)}),50)}function Ou(e,t,n){var r=e.state.selection;if(r instanceof va&&!r.empty||n.indexOf("s")>-1)return!1;if(Ga&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=hu(e.state,t);if(a&&a instanceof ya)return vu(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,u=r instanceof ba?fa.near(s,t):fa.findFrom(s,t);return!!u&&vu(e,u)}return!1}function Eu(e,t){if(!(e.state.selection instanceof va))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function Du(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Su(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Ga&&72==n&&"c"==r?Eu(e,-1)||bu(e):46==n||Ga&&68==n&&"c"==r?Eu(e,1)||ku(e):13==n||27==n||(37==n||Ga&&66==n&&"c"==r?mu(e,-1,r)||bu(e):39==n||Ga&&70==n&&"c"==r?mu(e,1,r)||ku(e):38==n||Ga&&80==n&&"c"==r?Ou(e,-1,r)||bu(e):40==n||Ga&&78==n&&"c"==r?function(e){if(!Wa||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Du(e,o,"true"),setTimeout((function(){return Du(e,o,"false")}),20)}return!1}(e)||Ou(e,1,r)||ku(e):r==(Ga?"m":"c")&&(66==n||73==n||89==n||90==n))}function Cu(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||wi.fromSchema(e.state.schema),u=Bu(),c=u.createElement("div");c.appendChild(s.serializeFragment(r,{document:u}));for(var l,f=c.firstChild,d=0;f&&1==f.nodeType&&(l=Ru[f.nodeName.toLowerCase()]);){for(var p=l.length-1;p>=0;p--){for(var h=u.createElement(l[p]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h),d++}f=c.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(d?" -".concat(d):""," ").concat(JSON.stringify(n))),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function ju(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||s||!n);if(u){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new Co(wo.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Co.empty;var c=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(c)a=c;else{var l=o.marks(),f=e.state.schema,d=wi.fromSchema(f);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(d.serializeNode(f.text(e,l)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Bu().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Ru[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),Ja&&function(e){for(var t=e.querySelectorAll(Ha?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var v=+h[3];v>0&&i.firstChild;v--)i=i.firstChild;if(!a){var m=e.someProp("clipboardParser")||e.someProp("domParser")||fi.fromSchema(e.state.schema);a=m.parseSlice(i,{preserveWhitespace:!(!u&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||_u.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(ur){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var u=r.nodes[n[s]];if(!u||u.hasRequiredAttrs())break;o=wo.from(u.create(n[s+1],o)),i++,a++}return new Co(o,i,a)}(Fu(a,+h[1],+h[2]),h[4]);else if(a=Co.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&Nu(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=Tu(i[i.length-1],o.length));var a=Au(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:wo.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,g=0,b=a.content.firstChild;y<a.openStart&&!b.type.spec.isolating;y++,b=b.firstChild);for(var k=a.content.lastChild;g<a.openEnd&&!k.type.spec.isolating;g++,k=k.lastChild);a=Fu(a,y,g)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var _u=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Au(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,wo.from(e));return e}function Nu(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=Nu(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(wo.from(Au(n,e,o+1))))}}function Tu(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,Tu(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(wo.empty,!0);return e.copy(n.append(r))}function Mu(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=Mu(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(wo.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function Fu(e,t,n){return t<e.openStart&&(e=new Co(Mu(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Co(Mu(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Ru={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Pu=null;function Bu(){return Pu||(Pu=document.implementation.createHTMLDocument("title"))}var Lu={},Iu={},zu=m((function e(){h(this,e),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}));function Uu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Vu(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=function(t){return $u(e,t)})}))}function $u(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Hu(e){return{left:e.clientX,top:e.clientY}}function qu(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var u=a(s);if("object"===typeof u)return u.v}return!1}function Wu(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Yu(e,t,n,r,o){return qu(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof ya&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(ya.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(Wu(e,ya.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&ya.isSelectable(r))&&(Wu(e,new ya(n),"pointer"),!0)}(e,n))}function Gu(e,t,n,r){return qu(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function Ku(e,t,n,r){return qu(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Wu(e,va.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)Wu(e,va.create(r,s+1,s+1+a.content.size),"pointer");else{if(!ya.isSelectable(a))continue;Wu(e,ya.create(r,s),"pointer")}return!0}}(e,n,r)}function Ju(e){return rc(e)}Iu.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Zu(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Ka||!Ha||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Ya||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||Su(e,n)?n.preventDefault():Uu(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,ls(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},Iu.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},Iu.keypress=function(e,t){var n=t;if(!(Zu(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ga&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof va)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var Qu=Ga?"metaKey":"ctrlKey";Lu.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=Ju(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Qu]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(Hu(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Xu(e,a,n,!!r)):("doubleClick"==i?Gu:Ku)(e,a.pos,a.inside,n)?n.preventDefault():Uu(e,"pointer"))};var Xu=function(){function e(t,n,r,o){var i,a,s=this;if(h(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Qu],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var u=t.state.doc.resolve(n.pos);i=u.parent,a=u.depth?u.before():0}var c=o?null:r.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof ya&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Va||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Uu(t,"pointer")}return m(e,[{key:"done",value:function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return nu(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Hu(e))),this.allowDefault||!t?Uu(this.view,"pointer"):Yu(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Wa&&this.mightDrag&&!this.mightDrag.node.isAtom||Ha&&!(this.view.state.selection instanceof va)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Wu(this.view,fa.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Uu(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Uu(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function Zu(e,t){return!!e.composing||!!(Wa&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Lu.touchdown=function(e){Ju(e),Uu(e,"pointer")},Lu.contextmenu=function(e){return Ju(e)};var ec=Ka?5e3:-1;function tc(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return rc(e)}),t))}function nc(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function rc(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(Ka&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),nc(e),t||e.docView&&e.docView.dirty){var n=eu(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}Iu.compositionstart=Iu.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),rc(e,!0),e.markCursor=null;else if(rc(e),Va&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}tc(e,ec)},Iu.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,tc(e,20))};var oc=za&&Ua<15||Ya&&Qa<604;function ic(e,t,n,r){var o=ju(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||Co.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Lu.copy=Iu.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=oc?null:n.clipboardData,a=Cu(e,r.content()),s=a.dom,u=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",u)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Iu.paste=function(e,t){var n=t;if(!e.composing||Ka){var r=oc?null:n.clipboardData;r&&ic(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ic(e,r.value,null,t):ic(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var ac=m((function e(t,n){h(this,e),this.slice=t,this.move=n})),sc=Ga?"altKey":"ctrlKey";for(var uc in Lu.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Hu(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof ya?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(ya.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(ya.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),u=Cu(e,s),c=u.dom,l=u.text;n.dataTransfer.clearData(),n.dataTransfer.setData(oc?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",oc||n.dataTransfer.setData("text/plain",l),e.dragging=new ac(s,!n[sc])}},Lu.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Iu.dragover=Iu.dragenter=function(e,t){return t.preventDefault()},Iu.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(Hu(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=ju(e,n.dataTransfer.getData(oc?"Text":"text/plain"),oc?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[sc]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||Co.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var u=a?function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(u>0?1:0),l=r.node(s),f=!1;if(1==a)f=l.canReplace(c,c,o);else{var d=l.contentMatchAt(c).findWrapping(o.firstChild.type);f=d&&l.canReplaceWith(c,c,d[0])}if(f)return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null}(e.state.doc,i.pos,a):i.pos;null==u&&(u=i.pos);var c=e.state.tr;s&&c.deleteSelection();var l=c.mapping.map(u),f=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,d=c.doc;if(f?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),!c.doc.eq(d)){var p=c.doc.resolve(l);if(f&&ya.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new ya(p));else{var h=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((function(e,t,n,r){return h=r})),c.setSelection(fu(e,p,c.doc.resolve(h)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))}}}}}},Lu.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&nu(e)}),20))},Lu.blur=function(e,t){var n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Lu.beforeinput=function(e,t){if(Ha&&Ka&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,ls(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Iu)Lu[uc]=Iu[uc];function cc(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var lc=function(){function e(t,n){h(this,e),this.toDOM=t,this.spec=n||vc,this.side=this.spec.side||0}return m(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new pc(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&cc(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),fc=function(){function e(t,n){h(this,e),this.attrs=t,this.spec=n||vc}return m(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new pc(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&cc(this.attrs,t.attrs)&&cc(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),dc=function(){function e(t,n){h(this,e),this.attrs=t,this.spec=n||vc}return m(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new pc(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&cc(this.attrs,t.attrs)&&cc(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),pc=function(){function e(t,n,r){h(this,e),this.from=t,this.to=n,this.type=r}return m(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof fc}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new lc(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new fc(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new dc(r,o))}}]),e}(),hc=[],vc={},mc=function(){function e(t,n){h(this,e),this.local=t.length?t:hc,this.children=n.length?n:hc}return m(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var u=this.children[s]+1;this.children[s+2].findInner(e-u,t-u,n,r+u,o)}}},{key:"map",value:function(e,t,n){return this==yc||0==e.maps.length?this:this.mapInner(e,t,0,0,n||vc)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var u=this.local[s].map(t,r,o);u&&u.type.valid(n,u)?(a||(a=[])).push(u):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),u=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var u=s[a+1],c=void 0;if(!(u<0||e>u+i)){var l=s[a]+i;t>=l?s[a+1]=e<=l?-2:-1:n>=o&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c)}}},c=0;c<n.maps.length;c++)n.maps[c].forEach(u);for(var l=!1,f=0;f<s.length;f+=3)if(s[f+1]<0){if(-2==s[f+1]){l=!0,s[f+1]=-1;continue}var d=n.map(e[f]+i),p=d-o;if(p<0||p>=r.content.size){l=!0;continue}var h=n.map(e[f+1]+i,-1)-o,v=r.content.findIndex(p),m=v.index,y=v.offset,g=r.maybeChild(m);if(g&&y==p&&y+g.nodeSize==h){var b=s[f+2].mapInner(n,g,d+1,e[f]+i+1,a);b!=yc?(s[f]=p,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,l=!0)}else l=!0}if(l){var k=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var u=e.local[i].map(r,o,t);u?n.push(u):a.onRemove&&a.onRemove(e.local[i].spec)}for(var c=0;c<e.children.length;c+=3)s(e.children[c+2],e.children[c]+t+1)}for(var u=0;u<e.length;u+=3)-1==e[u+1]&&s(e[u+2],t[u]+i+1);return n}(s,e,t,n,o,i,a),w=xc(k,r,0,a);t=w.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,E=0;O<w.children.length;O+=3){for(var D=w.children[O];E<s.length&&s[E]<D;)E+=3;s.splice(E,0,w.children[O],w.children[O+1],w.children[O+2])}}return new mc(t.sort(Oc),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(Oc),hc):yc}},{key:"add",value:function(t,n){return n.length?this==yc?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,u=t+r;if(s=kc(n,e,u)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,u+1):o.splice(a,0,t,t+e.nodeSize,xc(s,e,u+1,vc)),a+=3}}));for(var s=bc(a?wc(n):n,-r),u=0;u<s.length;u++)s[u].type.valid(t,s[u])||s.splice(u--,1);return new e(s.length?this.local.concat(s).sort(Oc):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==yc?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,u=r[i]+n,c=r[i+1]+n,l=0;l<t.length;l++)(a=t[l])&&a.from>u&&a.to<c&&(t[l]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var f=r[i+2].removeInner(s,u+1);f!=yc?r[i+2]=f:(r.splice(i,3),i-=3)}}if(o.length)for(var d,p=0;p<t.length;p++)if(d=t[p])for(var h=0;h<o.length;h++)o[h].eq(d,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):yc}},{key:"forChild",value:function(t,n){if(this==yc)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,u=0;u<this.local.length;u++){var c=this.local[u];if(c.from<s&&c.to>a&&c.type instanceof fc){var l=Math.max(a,c.from)-a,f=Math.min(s,c.to)-a;l<f&&(o||(o=[])).push(c.copy(l,f))}}if(o){var d=new e(o.sort(Oc),hc);return r?new gc([d,r]):d}return r||yc}},{key:"eq",value:function(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return Ec(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==yc)return hc;if(e.inlineContent||!this.local.some(fc.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof fc||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?xc(t,e,0,vc):yc}}]),e}();mc.empty=new mc([],[]),mc.removeOverlap=Ec;var yc=mc.empty,gc=function(){function e(t){h(this,e),this.members=t}return m(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,vc)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return mc.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=yc&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Ec(n?t:t.sort(Oc)):hc}}],[{key:"from",value:function(t){switch(t.length){case 0:return yc;case 1:return t[0];default:return new e(t)}}}]),e}();function bc(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new pc(o.from+t,o.to+t,o.type))}return n}function kc(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function wc(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function xc(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=kc(e,t,a+n);if(s){i=!0;var u=xc(s,t,n+a+1,r);u!=yc&&o.push(a,a+t.nodeSize,u)}}));for(var a=bc(i?wc(e):e,-n).sort(Oc),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new mc(a,o):yc}function Oc(e,t){return e.from-t.from||e.to-t.to}function Ec(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Dc(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Dc(t,o+1,i.copy(r.to,i.to)))}}return t}function Dc(e,t,n){for(;t<e.length&&Oc(n,e[t])>0;)t++;e.splice(t,0,n)}function Sc(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=yc&&t.push(r)})),e.cursorWrapper&&t.push(mc.create(e.state.doc,[e.cursorWrapper.deco])),gc.from(t)}var Cc={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jc=za&&Ua<=11,_c=function(){function e(){h(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return m(e,[{key:"set",value:function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}]),e}(),Ac=function(){function e(t,n){var r=this;h(this,e),this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new _c,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)r.queue.push(e[t]);za&&Ua<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?r.flushSoon():r.flush()})),jc&&(this.onCharData=function(e){r.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return m(e,[{key:"flushSoon",value:function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&this.observer.observe(this.view.dom,Cc),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)}},{key:"onSelectionChange",value:function(){if(du(this.view)){if(this.suppressingSelectionUpdates)return nu(this.view);if(za&&Ua<=11&&!this.view.state.selection.empty){var e=this.view.domSelection();if(e.focusNode&&ns(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelection())}},{key:"ignoreSelectionChange",value:function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}},{key:"flush",value:function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&du(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var u=this.registerMutation(e[s],a);u&&(r=r<0?u.from:Math.min(u.from,r),o=o<0?u.to:Math.max(u.to,o),u.typeOver&&(i=!0))}if(Va&&a.length>1){var c=a.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var l=c[0],f=c[1];l.parentNode&&l.parentNode.parentNode==f.parentNode?f.remove():l.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Nc)return;Nc=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||nu(this.view),this.currentSelection.set(t))}}},{key:"registerMutation",value:function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(za&&Ua<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],u=s.previousSibling,c=s.nextSibling;(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(o=u),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c)}var l=o&&o.parentNode==e.target?Xa(o)+1:0,f=n.localPosFromDOM(e.target,l,-1),d=i&&i.parentNode==e.target?Xa(i):e.target.childNodes.length;return{from:f,to:n.localPosFromDOM(e.target,d,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}]),e}(),Nc=!1;function Tc(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Wa&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||Wa&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function Mc(e,t,n,r,o){if(t<0){var i=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,a=eu(e,i);if(a&&!e.state.selection.eq(a)){var s=e.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),e.dispatch(s)}}else{var u=e.state.doc.resolve(t),c=u.sharedDepth(n);t=u.before(c+1),n=e.state.doc.resolve(n).after(c+1);var l=e.state.selection,f=function(e,t,n){var r,o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,s=o.toOffset,u=o.from,c=o.to,l=e.domSelection(),f=l.anchorNode;if(f&&e.dom.contains(1==f.nodeType?f:f.parentNode)&&(r=[{node:f,offset:l.anchorOffset}],cs(l)||r.push({node:l.focusNode,offset:l.focusOffset})),Ha&&8===e.input.lastKeyCode)for(var d=s;d>a;d--){var p=i.childNodes[d-1],h=p.pmViewDesc;if("BR"==p.nodeName&&!h){s=d;break}if(!h||h.size)break}var v=e.state.doc,m=e.someProp("domParser")||fi.fromSchema(e.state.schema),y=v.resolve(u),g=null,b=m.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",findPositions:r,ruleFromNode:Tc,context:y});if(r&&null!=r[0].pos){var k=r[0].pos,w=r[1]&&r[1].pos;null==w&&(w=k),g={anchor:k+u,head:w+u}}return{doc:b,sel:g,from:u,to:c}}(e,t,n);if(Ha&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from){var d=e.cursorWrapper.deco.type.toDOM.nextSibling,p=d&&d.nodeValue?d.nodeValue.length:1;f.sel={anchor:f.sel.anchor+p,head:f.sel.anchor+p}}var h,v,m=e.state.doc,y=m.slice(f.from,f.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(h=e.state.selection.to,v="end"):(h=e.state.selection.from,v="start"),e.input.lastKeyCode=null;var g=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,u=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,u))-i}if(s<i&&e.size<t.size){u=(i-=r<=i&&r>=s?i-r:0)+(u-s),s=i}else if(u<i){s=(i-=r<=i&&r>=u?i-r:0)+(s-u),u=i}return{start:i,endA:s,endB:u}}(y.content,f.doc.content,f.from,h,v);if((Ya&&e.input.lastIOSEnter>Date.now()-225||Ka)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!g||g.endA>=g.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,ls(13,"Enter"))})))e.input.lastIOSEnter=0;else{if(!g){if(!(r&&l instanceof va&&!l.empty&&l.$head.sameParent(l.$anchor))||e.composing||f.sel&&f.sel.anchor!=f.sel.head){if(f.sel){var b=Fc(e,e.state.doc,f.sel);b&&!b.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(b))}return}g={start:l.from,endA:l.to,endB:l.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&g.start==g.endB&&e.state.selection instanceof va&&(g.start>e.state.selection.from&&g.start<=e.state.selection.from+2&&e.state.selection.from>=f.from?g.start=e.state.selection.from:g.endA<e.state.selection.to&&g.endA>=e.state.selection.to-2&&e.state.selection.to<=f.to&&(g.endB+=e.state.selection.to-g.endA,g.endA=e.state.selection.to)),za&&Ua<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>f.from&&" \xa0"==f.doc.textBetween(g.start-f.from-1,g.start-f.from+1)&&(g.start--,g.endA--,g.endB--);var k,w=f.doc.resolveNoCache(g.start-f.from),x=f.doc.resolveNoCache(g.endB-f.from),O=m.resolve(g.start),E=w.sameParent(x)&&w.parent.inlineContent&&O.end()>=g.endA;if((Ya&&e.input.lastIOSEnter>Date.now()-225&&(!E||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!E&&w.pos<f.doc.content.size&&(k=fa.findFrom(f.doc.resolve(w.pos+1),1,!0))&&k.head==x.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,ls(13,"Enter"))})))e.input.lastIOSEnter=0;else if(e.state.selection.anchor>g.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Rc(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(Rc(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||Rc(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(m,g.start,g.endA,w,x)&&e.someProp("handleKeyDown",(function(t){return t(e,ls(8,"Backspace"))})))Ka&&Ha&&e.domObserver.suppressSelectionUpdates();else{Ha&&Ka&&g.endB==g.start&&(e.input.lastAndroidDelete=Date.now()),Ka&&!E&&w.start()!=x.start()&&0==x.parentOffset&&w.depth==x.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==g.endA&&(g.endB-=2,x=f.doc.resolveNoCache(g.endB-f.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,ls(13,"Enter"))}))}),20));var D,S,C,j=g.start,_=g.endA;if(E)if(w.pos==x.pos)za&&Ua<=11&&0==w.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return nu(e)}),20)),D=e.state.tr.delete(j,_),S=m.resolve(g.start).marksAcross(m.resolve(g.endA));else if(g.endA==g.endB&&(C=function(e,t){for(var n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,s=i,u=a,c=0;c<a.length;c++)s=a[c].removeFromSet(s);for(var l=0;l<i.length;l++)u=i[l].removeFromSet(u);if(1==s.length&&0==u.length)r=s[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=s.length||1!=u.length)return null;r=u[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var f=[],d=0;d<t.childCount;d++)f.push(o(t.child(d)));if(wo.from(f).eq(e))return{mark:r,type:n}}(w.parent.content.cut(w.parentOffset,x.parentOffset),O.parent.content.cut(O.parentOffset,g.endA-O.start()))))D=e.state.tr,"add"==C.type?D.addMark(j,_,C.mark):D.removeMark(j,_,C.mark);else if(w.parent.child(w.index()).isText&&w.index()==x.index()-(x.textOffset?0:1)){var A=w.parent.textBetween(w.parentOffset,x.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,j,_,A)})))return;D=e.state.tr.insertText(A,j,_)}if(D||(D=e.state.tr.replace(j,_,f.doc.slice(g.start-f.from,g.endB-f.from))),f.sel){var N=Fc(e,D.doc,f.sel);N&&!(Ha&&Ka&&e.composing&&N.empty&&(g.start!=g.endB||e.input.lastAndroidDelete<Date.now()-100)&&(N.head==j||N.head==D.mapping.map(_)-1)||za&&N.empty&&N.head==j)&&D.setSelection(N)}S&&D.ensureMarks(S),e.dispatch(D.scrollIntoView())}}}}function Fc(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:fu(e,t.resolve(n.anchor),t.resolve(n.head))}function Rc(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}var Pc=function(){function e(t,n){var r=this;h(this,e),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new zu,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Uc),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Ic(this),Lc(this),this.nodeViews=zc(this),this.docView=Ls(this.state.doc,Bc(this),Sc(this),this.dom,this),this.domObserver=new Ac(this,(function(e,t,n,o){return Mc(r,e,t,n,o)})),this.domObserver.start(),function(e){var t=function(t){var n=Lu[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||$u(e,t)||!e.editable&&t.type in Iu||n(e,t)})};for(var n in Lu)t(n);Wa&&e.dom.addEventListener("input",(function(){return null})),Vu(e)}(this),this.updatePluginViews()}return m(e,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}},{key:"update",value:function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Vu(this),this._props=e,e.plugins&&(e.plugins.forEach(Uc),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}},{key:"setProps",value:function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)}},{key:"updateState",value:function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}},{key:"updateStateInner",value:function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(nc(this),i=!0),this.state=e,t){var a=zc(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),Vu(this)}this.editable=Ic(this),Lc(this);var s=Sc(this),u=Bc(this),c=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",l=o||!this.docView.matchesNode(e.doc,u,s);!l&&e.selection.eq(r.selection)||(i=!0);var f="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s&&s!=e.dom&&e.dom.contains(s)){var u=s.getBoundingClientRect();if(u.top>=o-20){t=s,n=u.top;break}}}return{refDOM:t,refTop:n,stack:vs(e.dom)}}(this);if(i){this.domObserver.stop();var d=l&&(za||Ha)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(l){var p=Ha?this.trackWrites=this.domSelection().focusNode:null;!o&&this.docView.update(e.doc,u,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Ls(e.doc,u,s,this.dom,this)),p&&!this.trackWrites&&(d=!0)}d||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return ns(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?nu(this,d):(cu(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==c)this.dom.scrollTop=0;else if("to selection"==c){var h=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(function(e){return e(n)})));else if(e.selection instanceof ya){var v=this.docView.domAfterPos(e.selection.from);1==v.nodeType&&hs(this,v.getBoundingClientRect(),h)}else hs(this,this.coordsAtPos(e.selection.head,1),h)}else f&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;ms(r,0==o?0:o-n)}(f)}},{key:"destroyPluginViews",value:function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()}},{key:"updatePluginViews",value:function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}}},{key:"someProp",value:function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var u=a[s].props[e];if(null!=u&&(n=t?t(u):u))return n}}},{key:"hasFocus",value:function(){return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(ys)return e.focus(ys);var t=vs(e);e.focus(null==ys?{get preventScroll(){return ys={preventScroll:!0},!0}}:void 0),ys||(ys=!1,ms(t,0))}(this.dom),nu(this),this.domObserver.start()}},{key:"root",get:function(){var e=this,t=this._root;if(null==t)for(var n=function(t){if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return t.ownerDocument.getSelection()}),{v:e._root=t}},r=this.dom.parentNode;r;r=r.parentNode){var o=n(r);if("object"===typeof o)return o.v}return t||document}},{key:"posAtCoords",value:function(e){return ws(this,e)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Es(this,e,t)}},{key:"domAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}},{key:"nodeDOM",value:function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null}},{key:"posAtDOM",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}},{key:"endOfTextblock",value:function(e,t){return Ts(this,t||this.state,e)}},{key:"destroy",value:function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Sc(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}},{key:"isDestroyed",get:function(){return null==this.docView}},{key:"dispatchEvent",value:function(e){return function(e,t){$u(e,t)||!Lu[t.type]||!e.editable&&t.type in Iu||Lu[t.type](e,t)}(this,e)}},{key:"dispatch",value:function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),e}();function Bc(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[pc.node(0,e.state.doc.content.size,t)]}function Lc(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:pc.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Ic(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function zc(e){var t=Object.create(null);function n(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Uc(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Vc={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},$c={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Hc="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),qc="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Wc="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Yc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Gc="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Kc=Hc&&(Yc||+Hc[1]<57)||Wc&&Yc,Jc=0;Jc<10;Jc++)Vc[48+Jc]=Vc[96+Jc]=String(Jc);for(Jc=1;Jc<=24;Jc++)Vc[Jc+111]="F"+Jc;for(Jc=65;Jc<=90;Jc++)Vc[Jc]=String.fromCharCode(Jc+32),$c[Jc]=String.fromCharCode(Jc);for(var Qc in Vc)$c.hasOwnProperty(Qc)||($c[Qc]=Vc[Qc]);var Xc="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Zc(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var u=i[s];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: "+u);Xc?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function el(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function tl(e){var t=function(e){var t=Object.create(null);for(var n in e)t[Zc(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(Kc&&(e.ctrlKey||e.altKey||e.metaKey)||(qc||Gc)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?$c:Vc)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[el(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Vc[n.keyCode])&&r!=o){var s=t[el(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var u=t[el(o,n,!0)];if(u&&u(e.state,e.dispatch,e))return!0}return!1}}var nl=function(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)},rl=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=al(r);if(!o){var i=r.blockRange(),a=i&&Ii(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&yl(e,o,t))return!0;if(0==r.parent.content.size&&(ol(s,"end")||ya.isSelectable(s))){var u=Qi(e.doc,r.before(),r.after(),Co.empty);if(u&&u.slice.size<u.to-u.from){if(t){var c=e.tr.step(u);c.setSelection(ol(s,"end")?fa.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):ya.create(c.doc,o.pos-s.nodeSize)),t(c.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)};function ol(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}var il=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;i=al(o)}var a=i&&i.nodeBefore;return!(!a||!ya.isSelectable(a))&&(t&&t(e.tr.setSelection(ya.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function al(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}var sl=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=cl(r);if(!o)return!1;var i=o.nodeAfter;if(yl(e,o,t))return!0;if(0==r.parent.content.size&&(ol(i,"start")||ya.isSelectable(i))){var a=Qi(e.doc,r.before(),r.after(),Co.empty);if(a&&a.slice.size<a.to-a.from){if(t){var s=e.tr.step(a);s.setSelection(ol(i,"start")?fa.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):ya.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)},ul=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;i=cl(o)}var a=i&&i.nodeAfter;return!(!a||!ya.isSelectable(a))&&(t&&t(e.tr.setSelection(ya.create(e.doc,i.pos)).scrollIntoView()),!0)};function cl(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var ll=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&Ii(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},fl=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function dl(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var pl=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=dl(i.contentMatchAt(a));if(!s||!i.canReplaceWith(a,a,s))return!1;if(t){var u=r.after(),c=e.tr.replaceWith(u,u,s.createAndFill());c.setSelection(fa.near(c.doc.resolve(u),1)),t(c.scrollIntoView())}return!0},hl=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof ba||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=dl(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(va.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},vl=function(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(Wi(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&Ii(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},ml=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof ya&&e.selection.node.isBlock)return!(!r.parentOffset||!Wi(e.doc,r.pos))&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof va||e.selection instanceof ba)&&a.deleteSelection();var s=0==r.depth?null:dl(r.node(-1).contentMatchAt(r.indexAfter(-1))),u=i&&s?[{type:s}]:void 0,c=Wi(a.doc,a.mapping.map(r.pos),1,u);if(u||c||!Wi(a.doc,a.mapping.map(r.pos),1,s?[{type:s}]:void 0)||(s&&(u=[{type:s}]),c=!0),c&&(a.split(a.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=s)){var l=a.mapping.map(r.before()),f=a.doc.resolve(l);s&&r.node(-1).canReplaceWith(f.index(),f.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0};function yl(e,t,n){var r,o,i=t.nodeBefore,a=t.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(e,t,n){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(i,i+1)||!o.isTextblock&&!Gi(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){for(var u=t.pos+a.nodeSize,c=wo.empty,l=r.length-1;l>=0;l--)c=wo.from(r[l].create(null,c));c=wo.from(i.copy(c));var f=e.tr.step(new Pi(t.pos-1,u,t.pos,u,new Co(c,1,0),r.length,!0)),d=u+2*r.length;Gi(f.doc,d)&&f.join(d),n(f.scrollIntoView())}return!0}var p=fa.findFrom(t,1),h=p&&p.$from.blockRange(p.$to),v=h&&Ii(h);if(null!=v&&v>=t.depth)return n&&n(e.tr.lift(h,v).scrollIntoView()),!0;if(s&&ol(a,"start",!0)&&ol(i,"end")){for(var m=i,y=[];y.push(m),!m.isTextblock;)m=m.lastChild;for(var g=a,b=1;!g.isTextblock;g=g.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,g.content)){if(n){for(var k=wo.empty,w=y.length-1;w>=0;w--)k=wo.from(y[w].copy(k));n(e.tr.step(new Pi(t.pos-y.length,t.pos+a.nodeSize,t.pos+b,t.pos+a.nodeSize-b,new Co(k,y.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function gl(e){return function(t,n){for(var r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(va.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}var bl=gl(-1),kl=gl(1);function wl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),u=s&&zi(s,e,t);return!!u&&(r&&r(n.tr.wrap(s,u).scrollIntoView()),!0)}}function xl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function Ol(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,r){for(var o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var El=Ol(nl,rl,il),Dl=Ol(nl,sl,ul),Sl={Enter:Ol(fl,hl,vl,ml),"Mod-Enter":pl,Backspace:El,"Mod-Backspace":El,"Shift-Backspace":El,Delete:Dl,"Mod-Delete":Dl,"Mod-a":function(e,t){return t&&t(e.tr.setSelection(new ba(e.doc))),!0}},Cl={"Ctrl-h":Sl.Backspace,"Alt-Backspace":Sl["Mod-Backspace"],"Ctrl-d":Sl.Delete,"Ctrl-Alt-Backspace":Sl["Mod-Delete"],"Alt-Delete":Sl["Mod-Delete"],"Alt-d":Sl["Mod-Delete"],"Ctrl-a":bl,"Ctrl-e":kl};for(var jl in Sl)Cl[jl]=Sl[jl];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function _l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),u=!1,c=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var l=n.doc.resolve(s.start-2);c=new $o(l,l,s.depth),s.endIndex<s.parent.childCount&&(s=new $o(i,n.doc.resolve(a.end(s.depth)),s.depth)),u=!0}var f=zi(c,e,t,s);return!!f&&(r&&r(Al(n.tr,s,f,u,e).scrollIntoView()),!0)}}function Al(e,t,n,r,o){for(var i=wo.empty,a=n.length-1;a>=0;a--)i=wo.from(n[a].type.create(n[a].attrs,i));e.step(new Pi(t.start-(r?2:0),t.end,t.start,t.end,new Co(i,0,0),n.length,!0));for(var s=0,u=0;u<n.length;u++)n[u].type==o&&(s=u+1);for(var c=n.length-s,l=t.start+n.length-(r?2:0),f=t.parent,d=t.startIndex,p=t.endIndex,h=!0;d<p;d++,h=!1)!h&&Wi(e.doc,l,c)&&(e.split(l,c),l+=2*c),l+=f.child(d).nodeSize;return e}function Nl(e){return function(t,n){var r=t.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(t){return t.childCount>0&&t.firstChild.type==e}));return!!a&&(!n||(o.node(a.depth-1).type==e?function(e,t,n,r){var o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Pi(i-1,a,i,a,new Co(wo.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new $o(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));return t(o.lift(r,Ii(r)).scrollIntoView()),!0}(t,n,e,a):function(e,t,n){for(var r=e.tr,o=n.parent,i=n.end,a=n.endIndex-1,s=n.startIndex;a>s;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var u=r.doc.resolve(n.start),c=u.nodeAfter;if(r.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;var l=0==n.startIndex,f=n.endIndex==o.childCount,d=u.node(-1),p=u.index(-1);if(!d.canReplace(p+(l?0:1),p+1,c.content.append(f?wo.empty:wo.from(o))))return!1;var h=u.pos,v=h+c.nodeSize;return r.step(new Pi(h-(l?1:0),v+(f?1:0),h+1,v-1,new Co((l?wo.empty:wo.from(o.copy(wo.empty))).append(f?wo.empty:wo.from(o.copy(wo.empty))),l?0:1,f?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,a)))}}function Tl(e){var t=e.state,n=e.transaction,r=n.selection,i=n.doc,a=n.storedMarks;return Object(o.a)(Object(o.a)({},t),{},{apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}})}var Ml=function(){function e(t){h(this,e),this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}return m(e,[{key:"hasCustomState",get:function(){return!!this.customState}},{key:"state",get:function(){return this.customState||this.editor.state}},{key:"commands",get:function(){var e=this,t=this.rawCommands,n=this.editor,r=this.state,o=n.view,i=r.tr,a=this.buildProps(i);return Object.fromEntries(Object.entries(t).map((function(t){var n=Object(E.a)(t,2),r=n[0],s=n[1];return[r,function(){var t=s.apply(void 0,arguments)(a);return i.getMeta("preventDispatch")||e.hasCustomState||o.dispatch(i),t}]})))}},{key:"chain",get:function(){var e=this;return function(){return e.createChain()}}},{key:"can",get:function(){var e=this;return function(){return e.createCan()}}},{key:"createChain",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,i=this.editor,a=this.state,s=i.view,u=[],c=!!e,l=e||a.tr,f=function(){return c||!n||l.getMeta("preventDispatch")||t.hasCustomState||s.dispatch(l),u.every((function(e){return!0===e}))},d=Object(o.a)(Object(o.a)({},Object.fromEntries(Object.entries(r).map((function(e){var r=Object(E.a)(e,2),o=r[0],i=r[1];return[o,function(){var e=t.buildProps(l,n),r=i.apply(void 0,arguments)(e);return u.push(r),d}]})))),{},{run:f});return d}},{key:"createCan",value:function(e){var t=this,n=this.rawCommands,r=this.state,i=void 0,a=e||r.tr,s=this.buildProps(a,i),u=Object.fromEntries(Object.entries(n).map((function(e){var t=Object(E.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(Object(o.a)(Object(o.a)({},s),{},{dispatch:i}))}]})));return Object(o.a)(Object(o.a)({},u),{},{chain:function(){return t.createChain(a,i)}})}},{key:"buildProps",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,i=this.state,a=o.view;i.storedMarks&&e.setStoredMarks(i.storedMarks);var s={tr:e,editor:o,view:a,state:Tl({state:i,transaction:e}),dispatch:n?function(){}:void 0,chain:function(){return t.createChain(e)},can:function(){return t.createCan(e)},get commands(){return Object.fromEntries(Object.entries(r).map((function(e){var t=Object(E.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(s)}]})))}};return s}}]),e}(),Fl=function(){function e(){h(this,e),this.callbacks={}}return m(e,[{key:"on",value:function(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=this.callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){var n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((function(e){return e!==t})):delete this.callbacks[e]),this}},{key:"removeAllListeners",value:function(){this.callbacks={}}}]),e}();function Rl(e,t,n){return void 0===e.config[t]&&e.parent?Rl(e.parent,t,n):"function"===typeof e.config[t]?e.config[t].bind(Object(o.a)(Object(o.a)({},n),{},{parent:e.parent?Rl(e.parent,t,n):null})):e.config[t]}function Pl(e){return{baseExtensions:e.filter((function(e){return"extension"===e.type})),nodeExtensions:e.filter((function(e){return"node"===e.type})),markExtensions:e.filter((function(e){return"mark"===e.type}))}}function Bl(e){var t=[],n=Pl(e),r=n.nodeExtensions,i=n.markExtensions,a=[].concat(Object(J.a)(r),Object(J.a)(i)),s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((function(e){var n=Rl(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});n&&n().forEach((function(e){e.types.forEach((function(n){Object.entries(e.attributes).forEach((function(e){var r=Object(E.a)(e,2),i=r[0],a=r[1];t.push({type:n,name:i,attribute:Object(o.a)(Object(o.a)({},s),a)})}))}))}))})),a.forEach((function(e){var n={name:e.name,options:e.options,storage:e.storage},r=Rl(e,"addAttributes",n);if(r){var i=r();Object.entries(i).forEach((function(n){var r=Object(E.a)(n,2),i=r[0],a=r[1],u=Object(o.a)(Object(o.a)({},s),a);a.isRequired&&void 0===a.default&&delete u.default,t.push({type:e.name,name:i,attribute:u})}))}})),t}function Ll(e,t){if("string"===typeof e){if(!t.nodes[e])throw Error("There is no node type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.nodes[e]}return e}function Il(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return!!e})).reduce((function(e,t){var n=Object(o.a)({},e);return Object.entries(t).forEach((function(e){var t=Object(E.a)(e,2),r=t[0],o=t[1];n[r]?n[r]="class"===r?[n[r],o].join(" "):"style"===r?[n[r],o].join("; "):o:n[r]=o})),n}),{})}function zl(e,t){return t.filter((function(e){return e.attribute.rendered})).map((function(t){return t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:Object(Q.a)({},t.name,e.attrs[t.name])})).reduce((function(e,t){return Il(e,t)}),{})}function Ul(e){return"function"===typeof e}function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Ul(e)){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t?e.bind(t).apply(void 0,r):e.apply(void 0,r)}return e}function $l(e,t){return e.style?e:Object(o.a)(Object(o.a)({},e),{},{getAttrs:function(n){var r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;var i=t.reduce((function(e,t){var r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!==typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null===r||void 0===r?e:Object(o.a)(Object(o.a)({},e),{},Object(Q.a)({},t.name,r))}),{});return Object(o.a)(Object(o.a)({},r),i)}})}function Hl(e){return Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(E.a)(e,2),n=t[0],r=t[1];return("attrs"!==n||!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length&&e.constructor===Object}(r))&&(null!==r&&void 0!==r)})))}function ql(e){var t,n=Bl(e),r=Pl(e),i=r.nodeExtensions,a=r.markExtensions,s=null===(t=i.find((function(e){return Rl(e,"topNode")})))||void 0===t?void 0:t.name,u=Object.fromEntries(i.map((function(t){var r=n.filter((function(e){return e.type===t.name})),i={name:t.name,options:t.options,storage:t.storage},a=e.reduce((function(e,n){var r=Rl(n,"extendNodeSchema",i);return Object(o.a)(Object(o.a)({},e),r?r(t):{})}),{}),s=Hl(Object(o.a)(Object(o.a)({},a),{},{content:Vl(Rl(t,"content",i)),marks:Vl(Rl(t,"marks",i)),group:Vl(Rl(t,"group",i)),inline:Vl(Rl(t,"inline",i)),atom:Vl(Rl(t,"atom",i)),selectable:Vl(Rl(t,"selectable",i)),draggable:Vl(Rl(t,"draggable",i)),code:Vl(Rl(t,"code",i)),defining:Vl(Rl(t,"defining",i)),isolating:Vl(Rl(t,"isolating",i)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),u=Vl(Rl(t,"parseHTML",i));u&&(s.parseDOM=u.map((function(e){return $l(e,r)})));var c=Rl(t,"renderHTML",i);c&&(s.toDOM=function(e){return c({node:e,HTMLAttributes:zl(e,r)})});var l=Rl(t,"renderText",i);return l&&(s.toText=l),[t.name,s]}))),c=Object.fromEntries(a.map((function(t){var r=n.filter((function(e){return e.type===t.name})),i={name:t.name,options:t.options,storage:t.storage},a=e.reduce((function(e,n){var r=Rl(n,"extendMarkSchema",i);return Object(o.a)(Object(o.a)({},e),r?r(t):{})}),{}),s=Hl(Object(o.a)(Object(o.a)({},a),{},{inclusive:Vl(Rl(t,"inclusive",i)),excludes:Vl(Rl(t,"excludes",i)),group:Vl(Rl(t,"group",i)),spanning:Vl(Rl(t,"spanning",i)),code:Vl(Rl(t,"code",i)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),u=Vl(Rl(t,"parseHTML",i));u&&(s.parseDOM=u.map((function(e){return $l(e,r)})));var c=Rl(t,"renderHTML",i);return c&&(s.toDOM=function(e){return c({mark:e,HTMLAttributes:zl(e,r)})}),[t.name,s]})));return new ci({topNode:s,nodes:u,marks:c})}function Wl(e,t){return t.nodes[e]||t.marks[e]||null}function Yl(e,t){return Array.isArray(t)?t.some((function(t){return("string"===typeof t?t:t.name)===e.name})):t}function Gl(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Kl=m((function e(t){h(this,e),this.find=t.find,this.handler=t.handler}));function Jl(e){var t,n=e.editor,r=e.from,o=e.to,i=e.text,a=e.rules,s=e.plugin,u=n.view;if(u.composing)return!1;var c=u.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((function(e){return e.type.spec.code}))))return!1;var l=!1,f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n="";return e.parent.nodesBetween(Math.max(0,e.parentOffset-t),e.parentOffset,(function(t,r,o,i){var a,s,u;n+=(null===(s=(a=t.type.spec).toText)||void 0===s?void 0:s.call(a,{node:t,pos:r,parent:o,index:i}))||(null===(u=e.nodeBefore)||void 0===u?void 0:u.text)||"%leaf%"})),n}(c)+i;return a.forEach((function(e){if(!l){var t=function(e,t){if(Gl(t))return t.exec(e);var n=t(e);if(!n)return null;var r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r}(f,e.find);if(t){var a=u.state.tr,c=Tl({state:u.state,transaction:a}),d={from:r-(t[0].length-i.length),to:o},p=new Ml({editor:n,state:c}),h=p.commands,v=p.chain,m=p.can;null!==e.handler({state:c,range:d,match:t,commands:h,chain:v,can:m})&&a.steps.length&&(a.setMeta(s,{transform:a,from:r,to:o,text:i}),u.dispatch(a),l=!0)}}})),l}function Ql(e){var t=e.editor,n=e.rules,r=new Aa({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,o,i,a){return Jl({editor:t,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:function(e){return setTimeout((function(){var o=e.state.selection.$cursor;o&&Jl({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1}},handleKeyDown:function(e,o){if("Enter"!==o.key)return!1;var i=e.state.selection.$cursor;return!!i&&Jl({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}var Xl=m((function e(t){h(this,e),this.find=t.find,this.handler=t.handler}));function Zl(e){var t=e.editor,n=e.state,r=e.from,o=e.to,i=e.rule,a=new Ml({editor:t,state:n}),s=a.commands,u=a.chain,c=a.can,l=[];return n.doc.nodesBetween(r,o,(function(e,t){if(e.isTextblock&&!e.type.spec.code){var a=Math.max(r,t),f=Math.min(o,t+e.content.size);(function(e,t){if(Gl(t))return Object(J.a)(e.matchAll(t));var n=t(e);return n?n.map((function(t){var n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(a-t,f-t,void 0,"\ufffc"),i.find).forEach((function(e){if(void 0!==e.index){var t=a+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=i.handler({state:n,range:o,match:e,commands:s,chain:u,can:c});l.push(f)}}))}})),l.every((function(e){return null!==e}))}var ef=function(){function e(t,n){var r=this;h(this,e),this.splittableMarks=[],this.editor=n,this.extensions=e.resolve(t),this.schema=ql(this.extensions),this.extensions.forEach((function(e){var t;r.editor.extensionStorage[e.name]=e.storage;var n={name:e.name,options:e.options,storage:e.storage,editor:r.editor,type:Wl(e.name,r.schema)};"mark"===e.type&&((null===(t=Vl(Rl(e,"keepOnSplit",n)))||void 0===t||t)&&r.splittableMarks.push(e.name));var o=Rl(e,"onBeforeCreate",n);o&&r.editor.on("beforeCreate",o);var i=Rl(e,"onCreate",n);i&&r.editor.on("create",i);var a=Rl(e,"onUpdate",n);a&&r.editor.on("update",a);var s=Rl(e,"onSelectionUpdate",n);s&&r.editor.on("selectionUpdate",s);var u=Rl(e,"onTransaction",n);u&&r.editor.on("transaction",u);var c=Rl(e,"onFocus",n);c&&r.editor.on("focus",c);var l=Rl(e,"onBlur",n);l&&r.editor.on("blur",l);var f=Rl(e,"onDestroy",n);f&&r.editor.on("destroy",f)}))}return m(e,[{key:"commands",get:function(){var e=this;return this.extensions.reduce((function(t,n){var r=Rl(n,"addCommands",{name:n.name,options:n.options,storage:n.storage,editor:e.editor,type:Wl(n.name,e.schema)});return r?Object(o.a)(Object(o.a)({},t),r()):t}),{})}},{key:"plugins",get:function(){var t=this,n=this.editor,r=e.sort(Object(J.a)(this.extensions).reverse()),o=[],i=[],a=r.map((function(e){var r={name:e.name,options:e.options,storage:e.storage,editor:n,type:Wl(e.name,t.schema)},a=[],s=Rl(e,"addKeyboardShortcuts",r);if(s){var u=function(e){return new Aa({props:{handleKeyDown:tl(e)}})}(Object.fromEntries(Object.entries(s()).map((function(e){var t=Object(E.a)(e,2),r=t[0],o=t[1];return[r,function(){return o({editor:n})}]}))));a.push(u)}var c=Rl(e,"addInputRules",r);Yl(e,n.options.enableInputRules)&&c&&o.push.apply(o,Object(J.a)(c()));var l=Rl(e,"addPasteRules",r);Yl(e,n.options.enablePasteRules)&&l&&i.push.apply(i,Object(J.a)(l()));var f=Rl(e,"addProseMirrorPlugins",r);if(f){var d=f();a.push.apply(a,Object(J.a)(d))}return a})).flat();return[Ql({editor:n,rules:o})].concat(Object(J.a)(function(e){var t=e.editor,n=e.rules,r=null,o=!1,i=!1;return n.map((function(e){return new Aa({view:function(e){var t=function(t){var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy:function(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:function(e){return i=r===e.dom.parentElement,!1},paste:function(e,t){var n,r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null===r||void 0===r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:function(n,r,a){var s=n[0],u="paste"===s.getMeta("uiEvent")&&!o,c="drop"===s.getMeta("uiEvent")&&!i;if(u||c){var l=r.doc.content.findDiffStart(a.doc.content),f=r.doc.content.findDiffEnd(a.doc.content);if("number"===typeof l&&f&&l!==f.b){var d=a.tr,p=Tl({state:a,transaction:d});if(Zl({editor:t,state:p,from:Math.max(l-1,0),to:f.b,rule:e})&&d.steps.length)return d}}}})}))}({editor:n,rules:i})),Object(J.a)(a))}},{key:"attributes",get:function(){return Bl(this.extensions)}},{key:"nodeViews",get:function(){var e=this,t=this.editor,n=Pl(this.extensions).nodeExtensions;return Object.fromEntries(n.filter((function(e){return!!Rl(e,"addNodeView")})).map((function(n){var r=e.attributes.filter((function(e){return e.type===n.name})),o={name:n.name,options:n.options,storage:n.storage,editor:t,type:Ll(n.name,e.schema)},i=Rl(n,"addNodeView",o);if(!i)return[];return[n.name,function(e,o,a,s){var u=zl(e,r);return i()({editor:t,node:e,getPos:a,decorations:s,HTMLAttributes:u,extension:n})}]})))}}],[{key:"resolve",value:function(t){var n=e.sort(e.flatten(t)),r=function(e){var t=e.filter((function(t,n){return e.indexOf(t)!==n}));return Object(J.a)(new Set(t))}(n.map((function(e){return e.name})));return r.length&&console.warn("[tiptap warn]: Duplicate extension names found: [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"]. This can lead to issues.")),n}},{key:"flatten",value:function(e){var t=this;return e.map((function(e){var n=Rl(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return n?[e].concat(Object(J.a)(t.flatten(n()))):e})).flat(10)}},{key:"sort",value:function(e){return e.sort((function(e,t){var n=Rl(e,"priority")||100,r=Rl(t,"priority")||100;return n>r?-1:n<r?1:0}))}}]),e}();function tf(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function nf(e,t){var n=Object(o.a)({},e);return tf(e)&&tf(t)&&Object.keys(t).forEach((function(r){tf(t[r])&&r in e?n[r]=nf(e[r],t[r]):Object.assign(n,Object(Q.a)({},r,t[r]))})),n}var rf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Vl(Rl(this,"addOptions",{name:this.name}))),this.storage=Vl(Rl(this,"addStorage",{name:this.name,options:this.options}))||{}}return m(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=nf(this.options,e),t.storage=Vl(Rl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Vl(Rl(n,"addOptions",{name:n.name})),n.storage=Vl(Rl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function of(e,t,n){var r=t.from,o=t.to,i=n||{},a=i.blockSeparator,s=void 0===a?"\n\n":a,u=i.textSerializers,c=void 0===u?{}:u,l="",f=!0;return e.nodesBetween(r,o,(function(e,n,i,a){var u,d=null===c||void 0===c?void 0:c[e.type.name];d?(e.isBlock&&!f&&(l+=s,f=!0),i&&(l+=d({node:e,pos:n,parent:i,index:a,range:t}))):e.isText?(l+=null===(u=null===e||void 0===e?void 0:e.text)||void 0===u?void 0:u.slice(Math.max(r,n)-n,o-n),f=!1):e.isBlock&&!f&&(l+=s,f=!0)})),l}function af(e){return Object.fromEntries(Object.entries(e.nodes).filter((function(e){return Object(E.a)(e,2)[1].spec.toText})).map((function(e){var t=Object(E.a)(e,2);return[t[0],t[1].spec.toText]})))}var sf=rf.create({name:"clipboardTextSerializer",addProseMirrorPlugins:function(){var e=this;return[new Aa({key:new Ma("clipboardTextSerializer"),props:{clipboardTextSerializer:function(){var t=e.editor,n=t.state,r=t.schema,o=n.doc,i=n.selection.ranges,a=Math.min.apply(Math,Object(J.a)(i.map((function(e){return e.$from.pos})))),s=Math.max.apply(Math,Object(J.a)(i.map((function(e){return e.$to.pos}))));return of(o,{from:a,to:s},{textSerializers:af(r)})}}})]}});function uf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0},r=Object.keys(t);return!r.length||r.every((function(r){return n.strict?t[r]===e[r]:Gl(t[r])?t[r].test(e[r]):t[r]===e[r]}))}function cf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.find((function(e){return e.type===t&&uf(e.attrs,n)}))}function lf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!!cf(e,t,n)}function ff(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t){var r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),r.node){var o=cf(Object(J.a)(r.node.marks),t,n);if(o){var i=r.index,a=e.start()+r.offset,s=i+1,u=a+r.node.nodeSize;for(cf(Object(J.a)(r.node.marks),t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,a-=e.parent.child(i).nodeSize;for(;s<e.parent.childCount&&lf(Object(J.a)(e.parent.child(s).marks),t,n);)u+=e.parent.child(s).nodeSize,s+=1;return{from:a,to:u}}}}}function df(e,t){if("string"===typeof e){if(!t.marks[e])throw Error("There is no mark type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.marks[e]}return e}function pf(e){return e&&"object"===typeof e&&!Array.isArray(e)&&!function(e){var t;return"class"===(null===(t=e.constructor)||void 0===t?void 0:t.toString().substring(0,5))}(e)}function hf(e){return pf(e)&&e instanceof va}function vf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(e,t),n)}function mf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;var n=fa.atStart(e),r=fa.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;var o=n.from,i=r.to;return"all"===t?va.create(e,vf(0,o,i),vf(e.content.size,o,i)):va.create(e,vf(t,o,i),vf(t,o,i))}function yf(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function gf(e){var t="<body>".concat(e,"</body>");return(new window.DOMParser).parseFromString(t,"text/html").body}function bf(e,t,n){if(n=Object(o.a)({slice:!0,parseOptions:{}},n),"object"===typeof e&&null!==e)try{return Array.isArray(e)?wo.fromArray(e.map((function(e){return t.nodeFromJSON(e)}))):t.nodeFromJSON(e)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",i),bf("",t,n)}if("string"===typeof e){var r=fi.fromSchema(t);return n.slice?r.parseSlice(gf(e),n.parseOptions).content:r.parse(gf(e),n.parseOptions)}return bf("",t,n)}function kf(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}function wf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.from,i=r.to,a=r.empty,s=t?Ll(t,e.schema):null,u=[];e.doc.nodesBetween(o,i,(function(e,t){if(!e.isText){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);u.push({node:e,from:n,to:r})}}));var c=i-o,l=u.filter((function(e){return!s||s.name===e.node.type.name})).filter((function(e){return uf(e.node.attrs,n,{strict:!1})}));if(a)return!!l.length;var f=l.reduce((function(e,t){return e+t.to-t.from}),0);return f>=c}function xf(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Of(e,t){var n="string"===typeof t?[t]:t;return Object.keys(e).reduce((function(t,r){return n.includes(r)||(t[r]=e[r]),t}),{})}function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return bf(e,t,{slice:!1,parseOptions:n})}function Df(e,t){var n=df(t,e.schema),r=e.selection,i=r.from,a=r.to,s=r.empty,u=[];s?(e.storedMarks&&u.push.apply(u,Object(J.a)(e.storedMarks)),u.push.apply(u,Object(J.a)(e.selection.$head.marks()))):e.doc.nodesBetween(i,a,(function(e){u.push.apply(u,Object(J.a)(e.marks))}));var c=u.find((function(e){return e.type.name===n.name}));return c?Object(o.a)({},c.attrs):{}}function Sf(e,t,n){return Object.fromEntries(Object.entries(n).filter((function(n){var r=Object(E.a)(n,1)[0],o=e.find((function(e){return e.type===t&&e.name===r}));return!!o&&o.attribute.keepOnSplit})))}function Cf(e){for(var t=0;t<e.edgeCount;t+=1){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function jf(e,t){var n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){var r=n.filter((function(e){return null===t||void 0===t?void 0:t.includes(e.type.name)}));e.tr.ensureMarks(r)}}function _f(e){return function(t){return function(e,t){for(var n=e.depth;n>0;n-=1){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}}function Af(e,t){var n=Pl(t).nodeExtensions.find((function(t){return t.name===e}));if(!n)return!1;var r=Vl(Rl(n,"group",{name:n.name,options:n.options,storage:n.storage}));return"string"===typeof r&&r.split(" ").includes("list")}var Nf=function(e,t){var n=_f((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Gi(e.doc,n.pos)||(e.join(n.pos),!0)},Tf=function(e,t){var n=_f((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Gi(e.doc,r)||(e.join(r),!0)};function Mf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.empty,i=r.ranges,a=t?df(t,e.schema):null;if(o)return!!(e.storedMarks||e.selection.$from.marks()).filter((function(e){return!a||a.name===e.type.name})).find((function(e){return uf(e.attrs,n,{strict:!1})}));var s=0,u=[];if(i.forEach((function(t){var n=t.$from,r=t.$to,o=n.pos,i=r.pos;e.doc.nodesBetween(o,i,(function(e,t){if(e.isText||e.marks.length){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);s+=r-n,u.push.apply(u,Object(J.a)(e.marks.map((function(e){return{mark:e,from:n,to:r}}))))}}))})),0===s)return!1;var c=u.filter((function(e){return!a||a.name===e.mark.type.name})).filter((function(e){return uf(e.mark.attrs,n,{strict:!1})})).reduce((function(e,t){return e+t.to-t.from}),0),l=u.filter((function(e){return!a||e.mark.type!==a&&e.mark.type.excludes(a)})).reduce((function(e,t){return e+t.to-t.from}),0),f=c>0?c+l:c;return f>=s}var Ff=Object.freeze({__proto__:null,blur:function(){return function(e){var t=e.editor,n=e.view;return requestAnimationFrame((function(){var e;t.isDestroyed||(n.dom.blur(),null===(e=null===window||void 0===window?void 0:window.getSelection())||void 0===e||e.removeAllRanges())})),!0}},clearContent:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t){return t.commands.setContent("",e)}},clearNodes:function(){return function(e){var t=e.state,n=e.tr,r=e.dispatch,o=n.selection.ranges;return!r||(o.forEach((function(e){var r=e.$from,o=e.$to;t.doc.nodesBetween(r.pos,o.pos,(function(e,t){if(!e.type.isText){var r=n.doc,o=n.mapping,i=r.resolve(o.map(t)),a=r.resolve(o.map(t+e.nodeSize)),s=i.blockRange(a);if(s){var u=Ii(s);if(e.type.isTextblock){var c=i.parent.contentMatchAt(i.index()).defaultType;n.setNodeMarkup(s.start,c)}(u||0===u)&&n.lift(s,u)}}}))})),!0)}},command:function(e){return function(t){return e(t)}},createParagraphNear:function(){return function(e){var t=e.state,n=e.dispatch;return hl(t,n)}},deleteNode:function(e){return function(t){for(var n=t.tr,r=t.state,o=t.dispatch,i=Ll(e,r.schema),a=n.selection.$anchor,s=a.depth;s>0;s-=1){if(a.node(s).type===i){if(o){var u=a.before(s),c=a.after(s);n.delete(u,c).scrollIntoView()}return!0}}return!1}},deleteRange:function(e){return function(t){var n=t.tr,r=t.dispatch,o=e.from,i=e.to;return r&&n.delete(o,i),!0}},deleteSelection:function(){return function(e){var t=e.state,n=e.dispatch;return nl(t,n)}},enter:function(){return function(e){return e.commands.keyboardShortcut("Enter")}},exitCode:function(){return function(e){var t=e.state,n=e.dispatch;return pl(t,n)}},extendMarkRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=df(e,o.schema),s=r.doc,u=r.selection,c=u.$from,l=u.from,f=u.to;if(i){var d=ff(c,a,t);if(d&&d.from<=l&&d.to>=f){var p=va.create(s,d.from,d.to);r.setSelection(p)}}return!0}},first:function(e){return function(t){for(var n="function"===typeof e?e(t):e,r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1}},focus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.editor,i=n.view,a=n.tr,s=n.dispatch;t=Object(o.a)({scrollIntoView:!0},t);var u=function(){yf()&&i.dom.focus(),requestAnimationFrame((function(){r.isDestroyed||(i.focus(),(null===t||void 0===t?void 0:t.scrollIntoView)&&r.commands.scrollIntoView())}))};if(i.hasFocus()&&null===e||!1===e)return!0;if(s&&null===e&&!hf(r.state.selection))return u(),!0;var c=mf(a.doc,e)||r.state.selection,l=r.state.selection.eq(c);return s&&(l||a.setSelection(c),l&&a.storedMarks&&a.setStoredMarks(a.storedMarks),u()),!0}},forEach:function(e,t){return function(n){return e.every((function(e,r){return t(e,Object(o.a)(Object(o.a)({},n),{},{index:r}))}))}},insertContent:function(e,t){return function(n){var r=n.tr;return n.commands.insertContentAt({from:r.selection.from,to:r.selection.to},e,t)}},insertContentAt:function(e,t,n){return function(r){var i=r.tr,a=r.dispatch,s=r.editor;if(a){n=Object(o.a)({parseOptions:{},updateSelection:!0},n);var u=bf(t,s.schema,{parseOptions:Object(o.a)({preserveWhitespace:"full"},n.parseOptions)});if("<>"===u.toString())return!0;var c="number"===typeof e?{from:e,to:e}:e,l=c.from,f=c.to,d=!0,p=!0;if((u.toString().startsWith("<")?u:[u]).forEach((function(e){e.check(),d=!!d&&(e.isText&&0===e.marks.length),p=!!p&&e.isBlock})),l===f&&p){var h=i.doc.resolve(l).parent;h.isTextblock&&!h.type.spec.code&&!h.childCount&&(l-=1,f+=1)}d?i.insertText(t,l,f):i.replaceWith(l,f,u),n.updateSelection&&function(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o=e.steps[r];if(o instanceof Ri||o instanceof Pi){var i=e.mapping.maps[r],a=0;i.forEach((function(e,t,n,r){0===a&&(a=r)})),e.setSelection(fa.near(e.doc.resolve(a),n))}}}(i,i.steps.length-1,-1)}return!0}},joinBackward:function(){return function(e){var t=e.state,n=e.dispatch;return rl(t,n)}},joinForward:function(){return function(e){var t=e.state,n=e.dispatch;return sl(t,n)}},keyboardShortcut:function(e){return function(t){var n=t.editor,r=t.view,o=t.tr,i=t.dispatch,a=function(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"===a&&(a=" ");for(var s=0;s<i.length-1;s+=1){var u=i[s];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: ".concat(u));yf()||kf()?o=!0:n=!0}}return t&&(a="Alt-".concat(a)),n&&(a="Ctrl-".concat(a)),o&&(a="Meta-".concat(a)),r&&(a="Shift-".concat(a)),a}(e).split(/-(?!$)/),s=a.find((function(e){return!["Alt","Ctrl","Meta","Shift"].includes(e)})),u=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),c=n.captureTransaction((function(){r.someProp("handleKeyDown",(function(e){return e(r,u)}))}));return null===c||void 0===c||c.steps.forEach((function(e){var t=e.map(o.mapping);t&&i&&o.maybeStep(t)})),!0}},lift:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return!!wf(r,Ll(e,r.schema),t)&&ll(r,o)}},liftEmptyBlock:function(){return function(e){var t=e.state,n=e.dispatch;return vl(t,n)}},liftListItem:function(e){return function(t){var n=t.state,r=t.dispatch;return Nl(Ll(e,n.schema))(n,r)}},newlineInCode:function(){return function(e){var t=e.state,n=e.dispatch;return fl(t,n)}},resetAttributes:function(e,t){return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,u=xf("string"===typeof e?e:e.name,o.schema);return!!u&&("node"===u&&(a=Ll(e,o.schema)),"mark"===u&&(s=df(e,o.schema)),i&&r.selection.ranges.forEach((function(e){o.doc.nodesBetween(e.$from.pos,e.$to.pos,(function(e,n){a&&a===e.type&&r.setNodeMarkup(n,void 0,Of(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((function(o){s===o.type&&r.addMark(n,n+e.nodeSize,s.create(Of(o.attrs,t)))}))}))})),!0)}},scrollIntoView:function(){return function(e){var t=e.tr;return e.dispatch&&t.scrollIntoView(),!0}},selectAll:function(){return function(e){var t=e.tr;return e.commands.setTextSelection({from:0,to:t.doc.content.size})}},selectNodeBackward:function(){return function(e){var t=e.state,n=e.dispatch;return il(t,n)}},selectNodeForward:function(){return function(e){var t=e.state,n=e.dispatch;return ul(t,n)}},selectParentNode:function(){return function(e){return function(e,t){var n,r=e.selection,o=r.$from,i=r.to,a=o.sharedDepth(i);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(ya.create(e.doc,n))),!0)}(e.state,e.dispatch)}},selectTextblockEnd:function(){return function(e){var t=e.state,n=e.dispatch;return kl(t,n)}},selectTextblockStart:function(){return function(e){var t=e.state,n=e.dispatch;return bl(t,n)}},setContent:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.tr,i=r.editor,a=r.dispatch,s=o.doc,u=Ef(e,i.schema,n);return a&&o.replaceWith(0,s.content.size,u).setMeta("preventUpdate",!t),!0}},setMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,i=n.state,a=n.dispatch,s=r.selection,u=s.empty,c=s.ranges,l=df(e,i.schema);if(a)if(u){var f=Df(i,l);r.addStoredMark(l.create(Object(o.a)(Object(o.a)({},f),t)))}else c.forEach((function(e){var n=e.$from.pos,a=e.$to.pos;i.doc.nodesBetween(n,a,(function(e,i){var s=Math.max(i,n),u=Math.min(i+e.nodeSize,a);e.marks.find((function(e){return e.type===l}))?e.marks.forEach((function(e){l===e.type&&r.addMark(s,u,l.create(Object(o.a)(Object(o.a)({},e.attrs),t)))})):r.addMark(s,u,l.create(t))}))}));return!0}},setMeta:function(e,t){return function(n){return n.tr.setMeta(e,t),!0}},setNode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch,i=n.chain,a=Ll(e,r.schema);return a.isTextblock?i().command((function(e){var n=e.commands;return!!xl(a,t)(r)||n.clearNodes()})).command((function(e){var n=e.state;return xl(a,t)(n,o)})).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}},setNodeSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o=fa.atStart(r).from,i=fa.atEnd(r).to,a=vf(e,o,i),s=ya.create(r,a);n.setSelection(s)}return!0}},setTextSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o="number"===typeof e?{from:e,to:e}:e,i=o.from,a=o.to,s=va.atStart(r).from,u=va.atEnd(r).to,c=vf(i,s,u),l=vf(a,s,u),f=va.create(r,c,l);n.setSelection(f)}return!0}},sinkListItem:function(e){return function(t){var n,r=t.state,o=t.dispatch,i=Ll(e,r.schema);return(n=i,function(e,t){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount>0&&e.firstChild.type==n}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var u=a.parent,c=u.child(s-1);if(c.type!=n)return!1;if(t){var l=c.lastChild&&c.lastChild.type==u.type,f=wo.from(l?n.create():null),d=new Co(wo.from(n.create(null,wo.from(u.type.create(null,f)))),l?3:1,0),p=a.start,h=a.end;t(e.tr.step(new Pi(p-(l?3:1),h,p,h,d,1,!0)).scrollIntoView())}return!0})(r,o)}},splitBlock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.keepMarks,n=void 0===t||t;return function(e){var t=e.tr,r=e.state,o=e.dispatch,i=e.editor,a=t.selection,s=t.doc,u=a.$from,c=a.$to,l=Sf(i.extensionManager.attributes,u.node().type.name,u.node().attrs);if(a instanceof ya&&a.node.isBlock)return!(!u.parentOffset||!Wi(s,u.pos))&&(o&&(n&&jf(r,i.extensionManager.splittableMarks),t.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;if(o){var f=c.parentOffset===c.parent.content.size;a instanceof va&&t.deleteSelection();var d=0===u.depth?void 0:Cf(u.node(-1).contentMatchAt(u.indexAfter(-1))),p=f&&d?[{type:d,attrs:l}]:void 0,h=Wi(t.doc,t.mapping.map(u.pos),1,p);if(p||h||!Wi(t.doc,t.mapping.map(u.pos),1,d?[{type:d}]:void 0)||(h=!0,p=d?[{type:d,attrs:l}]:void 0),h&&(t.split(t.mapping.map(u.pos),1,p),d&&!f&&!u.parentOffset&&u.parent.type!==d)){var v=t.mapping.map(u.before()),m=t.doc.resolve(v);u.node(-1).canReplaceWith(m.index(),m.index()+1,d)&&t.setNodeMarkup(t.mapping.map(u.before()),d)}n&&jf(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0}},splitListItem:function(e){return function(t){var n,r=t.tr,o=t.state,i=t.dispatch,a=t.editor,s=Ll(e,o.schema),u=o.selection,c=u.$from,l=u.$to,f=o.selection.node;if(f&&f.isBlock||c.depth<2||!c.sameParent(l))return!1;var d=c.node(-1);if(d.type!==s)return!1;var p=a.extensionManager.attributes;if(0===c.parent.content.size&&c.node(-1).childCount===c.indexAfter(-1)){if(2===c.depth||c.node(-3).type!==s||c.index(-2)!==c.node(-2).childCount-1)return!1;if(i){for(var h=wo.empty,v=c.index(-1)?1:c.index(-2)?2:3,m=c.depth-v;m>=c.depth-3;m-=1)h=wo.from(c.node(m).copy(h));var y=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,g=Sf(p,c.node().type.name,c.node().attrs),b=(null===(n=s.contentMatch.defaultType)||void 0===n?void 0:n.createAndFill(g))||void 0;h=h.append(wo.from(s.createAndFill(null,b)||void 0));var k=c.before(c.depth-(v-1));r.replace(k,c.after(-y),new Co(h,4-v,0));var w=-1;r.doc.nodesBetween(k,r.doc.content.size,(function(e,t){if(w>-1)return!1;e.isTextblock&&0===e.content.size&&(w=t+1)})),w>-1&&r.setSelection(va.near(r.doc.resolve(w))),r.scrollIntoView()}return!0}var x=l.pos===c.end()?d.contentMatchAt(0).defaultType:null,O=Sf(p,d.type.name,d.attrs),E=Sf(p,c.node().type.name,c.node().attrs);r.delete(c.pos,l.pos);var D=x?[{type:s,attrs:O},{type:x,attrs:E}]:[{type:s,attrs:O}];return!!Wi(r.doc,c.pos,2)&&(i&&r.split(c.pos,2,D).scrollIntoView(),!0)}},toggleList:function(e,t){return function(n){var r=n.editor,o=n.tr,i=n.state,a=n.dispatch,s=n.chain,u=n.commands,c=n.can,l=r.extensionManager.extensions,f=Ll(e,i.schema),d=Ll(t,i.schema),p=i.selection,h=p.$from,v=p.$to,m=h.blockRange(v);if(!m)return!1;var y=_f((function(e){return Af(e.type.name,l)}))(p);if(m.depth>=1&&y&&m.depth-y.depth<=1){if(y.node.type===f)return u.liftListItem(d);if(Af(y.node.type.name,l)&&f.validContent(y.node.content)&&a)return s().command((function(){return o.setNodeMarkup(y.pos,f),!0})).command((function(){return Nf(o,f)})).command((function(){return Tf(o,f)})).run()}return s().command((function(){return!!c().wrapInList(f)||u.clearNodes()})).wrapInList(f).command((function(){return Nf(o,f)})).command((function(){return Tf(o,f)})).run()}},toggleMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=n.extendEmptyMarkRange,s=void 0!==a&&a,u=df(e,o.schema);return Mf(o,u,t)?i.unsetMark(u,{extendEmptyMarkRange:s}):i.setMark(u,t)}},toggleNode:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=Ll(e,o.schema),s=Ll(t,o.schema);return wf(o,a,n)?i.setNode(s):i.setNode(a,n)}},toggleWrap:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.commands,i=Ll(e,r.schema);return wf(r,i,t)?o.lift(i):o.wrapIn(i,t)}},undoInputRule:function(){return function(e){for(var t=e.state,n=e.dispatch,r=t.plugins,o=0;o<r.length;o+=1){var i=r[o],a=void 0;if(i.spec.isInputRules&&(a=i.getState(t))){if(n){for(var s=t.tr,u=a.transform,c=u.steps.length-1;c>=0;c-=1)s.step(u.steps[c].invert(u.docs[c]));if(a.text){var l=s.doc.resolve(a.from).marks();s.replaceWith(a.from,a.to,t.schema.text(a.text,l))}else s.delete(a.from,a.to)}return!0}}return!1}},unsetAllMarks:function(){return function(e){var t=e.tr,n=e.dispatch,r=t.selection,o=r.empty,i=r.ranges;return o||n&&i.forEach((function(e){t.removeMark(e.$from.pos,e.$to.pos)})),!0}},unsetMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r,o=n.tr,i=n.state,a=n.dispatch,s=t.extendEmptyMarkRange,u=void 0!==s&&s,c=o.selection,l=df(e,i.schema),f=c.$from,d=c.empty,p=c.ranges;if(!a)return!0;if(d&&u){var h=c.from,v=c.to,m=null===(r=f.marks().find((function(e){return e.type===l})))||void 0===r?void 0:r.attrs,y=ff(f,l,m);y&&(h=y.from,v=y.to),o.removeMark(h,v,l)}else p.forEach((function(e){o.removeMark(e.$from.pos,e.$to.pos,l)}));return o.removeStoredMark(l),!0}},updateAttributes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,i=n.state,a=n.dispatch,s=null,u=null,c=xf("string"===typeof e?e:e.name,i.schema);return!!c&&("node"===c&&(s=Ll(e,i.schema)),"mark"===c&&(u=df(e,i.schema)),a&&r.selection.ranges.forEach((function(e){var n=e.$from.pos,a=e.$to.pos;i.doc.nodesBetween(n,a,(function(e,i){s&&s===e.type&&r.setNodeMarkup(i,void 0,Object(o.a)(Object(o.a)({},e.attrs),t)),u&&e.marks.length&&e.marks.forEach((function(s){if(u===s.type){var c=Math.max(i,n),l=Math.min(i+e.nodeSize,a);r.addMark(c,l,u.create(Object(o.a)(Object(o.a)({},s.attrs),t)))}}))}))})),!0)}},wrapIn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return wl(Ll(e,r.schema),t)(r,o)}},wrapInList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return _l(Ll(e,r.schema),t)(r,o)}}}),Rf=rf.create({name:"commands",addCommands:function(){return Object(o.a)({},Ff)}}),Pf=rf.create({name:"editable",addProseMirrorPlugins:function(){var e=this;return[new Aa({key:new Ma("editable"),props:{editable:function(){return e.editor.options.editable}}})]}}),Bf=rf.create({name:"focusEvents",addProseMirrorPlugins:function(){var e=this.editor;return[new Aa({key:new Ma("focusEvents"),props:{handleDOMEvents:{focus:function(t,n){e.isFocused=!0;var r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:function(t,n){e.isFocused=!1;var r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),Lf=rf.create({name:"keymap",addKeyboardShortcuts:function(){var e=this,t=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.undoInputRule()},function(){return t.command((function(e){var n=e.tr,r=n.selection,o=n.doc,i=r.empty,a=r.$anchor,s=a.pos,u=a.parent,c=fa.atStart(o).from===s;return!(!(i&&c&&u.type.isTextblock)||u.textContent.length)&&t.clearNodes()}))},function(){return t.deleteSelection()},function(){return t.joinBackward()},function(){return t.selectNodeBackward()}]}))},n=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.deleteSelection()},function(){return t.joinForward()},function(){return t.selectNodeForward()}]}))},r={Enter:function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.newlineInCode()},function(){return t.createParagraphNear()},function(){return t.liftEmptyBlock()},function(){return t.splitBlock()}]}))},"Mod-Enter":function(){return e.editor.commands.exitCode()},Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:n,"Mod-Delete":n,"Mod-a":function(){return e.editor.commands.selectAll()}},i=Object(o.a)({},r),a=Object(o.a)(Object(o.a)({},r),{},{"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":n,"Ctrl-Alt-Backspace":n,"Alt-Delete":n,"Alt-d":n,"Ctrl-a":function(){return e.editor.commands.selectTextblockStart()},"Ctrl-e":function(){return e.editor.commands.selectTextblockEnd()}});return yf()||kf()?a:i},addProseMirrorPlugins:function(){var e=this;return[new Aa({key:new Ma("clearDocument"),appendTransaction:function(t,n,r){if(t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc)){var o=n.selection,i=o.empty,a=o.from,s=o.to,u=fa.atStart(n.doc).from,c=fa.atEnd(n.doc).to,l=a===u&&s===c,f=0===r.doc.textBetween(0,r.doc.content.size," "," ").length;if(!i&&l&&f){var d=r.tr,p=Tl({state:r,transaction:d});if(new Ml({editor:e.editor,state:p}).commands.clearNodes(),d.steps.length)return d}}}})]}}),If=rf.create({name:"tabindex",addProseMirrorPlugins:function(){return[new Aa({key:new Ma("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}}),zf=Object.freeze({__proto__:null,ClipboardTextSerializer:sf,Commands:Rf,Editable:Pf,FocusEvents:Bf,Keymap:Lf,Tabindex:If});function Uf(e,t){var n=xf("string"===typeof t?t:t.name,e.schema);return"node"===n?function(e,t){var n=Ll(t,e.schema),r=e.selection,i=r.from,a=r.to,s=[];e.doc.nodesBetween(i,a,(function(e){s.push(e)}));var u=s.reverse().find((function(e){return e.type.name===n.name}));return u?Object(o.a)({},u.attrs):{}}(e,t):"mark"===n?Df(e,t):{}}function Vf(e,t){var n=wi.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function $f(e,t){return of(e,{from:0,to:e.content.size},t)}var Hf=function(e){g(n,e);var t=O(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(this,n),(e=t.call(this)).isFocused=!1,e.extensionStorage={},e.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:function(){return null},onCreate:function(){return null},onUpdate:function(){return null},onSelectionUpdate:function(){return null},onTransaction:function(){return null},onFocus:function(){return null},onBlur:function(){return null},onDestroy:function(){return null}},e.isCapturingTransaction=!1,e.capturedTransaction=null,e.setOptions(r),e.createExtensionManager(),e.createCommandManager(),e.createSchema(),e.on("beforeCreate",e.options.onBeforeCreate),e.emit("beforeCreate",{editor:w(e)}),e.createView(),e.injectCSS(),e.on("create",e.options.onCreate),e.on("update",e.options.onUpdate),e.on("selectionUpdate",e.options.onSelectionUpdate),e.on("transaction",e.options.onTransaction),e.on("focus",e.options.onFocus),e.on("blur",e.options.onBlur),e.on("destroy",e.options.onDestroy),window.setTimeout((function(){e.isDestroyed||(e.commands.focus(e.options.autofocus),e.emit("create",{editor:w(e)}))}),0),e}return m(n,[{key:"storage",get:function(){return this.extensionStorage}},{key:"commands",get:function(){return this.commandManager.commands}},{key:"chain",value:function(){return this.commandManager.chain()}},{key:"can",value:function(){return this.commandManager.can()}},{key:"injectCSS",value:function(){this.options.injectCSS&&document&&(this.css=function(e,t){var n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=Object(o.a)(Object(o.a)({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}},{key:"setEditable",value:function(e){this.setOptions({editable:e})}},{key:"isEditable",get:function(){return this.options.editable&&this.view&&this.view.editable}},{key:"state",get:function(){return this.view.state}},{key:"registerPlugin",value:function(e,t){var n=Ul(t)?t(e,Object(J.a)(this.state.plugins)):[].concat(Object(J.a)(this.state.plugins),[e]),r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(e){if(!this.isDestroyed){var t="string"===typeof e?"".concat(e,"$"):e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((function(e){return!e.key.startsWith(t)}))});this.view.updateState(n)}}},{key:"createExtensionManager",value:function(){var e=this.options.enableCoreExtensions?Object.values(zf):[],t=[].concat(Object(J.a)(e),Object(J.a)(this.options.extensions)).filter((function(e){return["extension","node","mark"].includes(null===e||void 0===e?void 0:e.type)}));this.extensionManager=new ef(t,this)}},{key:"createCommandManager",value:function(){this.commandManager=new Ml({editor:this})}},{key:"createSchema",value:function(){this.schema=this.extensionManager.schema}},{key:"createView",value:function(){var e=Ef(this.options.content,this.schema,this.options.parseOptions),t=mf(e,this.options.autofocus);this.view=new Pc(this.options.element,Object(o.a)(Object(o.a)({},this.options.editorProps),{},{dispatchTransaction:this.dispatchTransaction.bind(this),state:ja.create({doc:e,selection:t||void 0})}));var n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.view.dom.editor=this}},{key:"createNodeViews",value:function(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}},{key:"captureTransaction",value:function(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;var t=this.capturedTransaction;return this.capturedTransaction=null,t}},{key:"dispatchTransaction",value:function(e){var t=this;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((function(e){var n;return null===(n=t.capturedTransaction)||void 0===n?void 0:n.step(e)})):void(this.capturedTransaction=e);var n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});var o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}},{key:"getAttributes",value:function(e){return Uf(this.state,e)}},{key:"isActive",value:function(e,t){var n="string"===typeof e?e:null,r="string"===typeof e?t:e;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return wf(e,null,n)||Mf(e,null,n);var r=xf(t,e.schema);return"node"===r?wf(e,t,n):"mark"===r&&Mf(e,t,n)}(this.state,n,r)}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"getHTML",value:function(){return Vf(this.state.doc.content,this.schema)}},{key:"getText",value:function(e){var t=e||{},n=t.blockSeparator,r=void 0===n?"\n\n":n,i=t.textSerializers,a=void 0===i?{}:i;return $f(this.state.doc,{blockSeparator:r,textSerializers:Object(o.a)(Object(o.a)({},a),af(this.schema))})}},{key:"isEmpty",get:function(){return function(e){var t,n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}},{key:"getCharacterCount",value:function(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}},{key:"destroy",value:function(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}},{key:"isDestroyed",get:function(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}]),n}(Fl);function qf(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,n={};return e.filter((function(e){var r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter((function(e,n){return!t.filter((function(e,t){return t!==n})).some((function(t){return e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to}))}))}function Wf(e,t,n){var r=[];return e===t?n.resolve(e).marks().forEach((function(t){var i=ff(n.resolve(e-1),t.type);i&&r.push(Object(o.a)({mark:t},i))})):n.nodesBetween(e,t,(function(e,t){r.push.apply(r,Object(J.a)(e.marks.map((function(n){return{from:t,to:t+e.nodeSize,mark:n}}))))})),r}function Yf(e,t,n){var r=e.state.doc.content.size,i=vf(t,0,r),a=vf(n,0,r),s=e.coordsAtPos(i),u=e.coordsAtPos(a,-1),c=Math.min(s.top,u.top),l=Math.max(s.bottom,u.bottom),f=Math.min(s.left,u.left),d=Math.max(s.right,u.right),p={top:c,bottom:l,left:f,right:d,width:d-f,height:l-c,x:f,y:c};return Object(o.a)(Object(o.a)({},p),{},{toJSON:function(){return p}})}var Gf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Vl(Rl(this,"addOptions",{name:this.name}))),this.storage=Vl(Rl(this,"addStorage",{name:this.name,options:this.options}))||{}}return m(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=nf(this.options,e),t.storage=Vl(Rl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Vl(Rl(n,"addOptions",{name:n.name})),n.storage=Vl(Rl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}(),Kf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Vl(Rl(this,"addOptions",{name:this.name}))),this.storage=Vl(Rl(this,"addStorage",{name:this.name,options:this.options}))||{}}return m(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=nf(this.options,e),t.storage=Vl(Rl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Vl(Rl(n,"addOptions",{name:n.name})),n.storage=Vl(Rl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function Jf(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qf(e){return e instanceof Jf(e).Element||e instanceof Element}function Xf(e){return e instanceof Jf(e).HTMLElement||e instanceof HTMLElement}function Zf(e){return"undefined"!==typeof ShadowRoot&&(e instanceof Jf(e).ShadowRoot||e instanceof ShadowRoot)}var ed=Math.max,td=Math.min,nd=Math.round;function rd(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(Xf(e)&&t){var i=e.offsetHeight,a=e.offsetWidth;a>0&&(r=nd(n.width)/a||1),i>0&&(o=nd(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function od(e){var t=Jf(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function id(e){return e?(e.nodeName||"").toLowerCase():null}function ad(e){return((Qf(e)?e.ownerDocument:e.document)||window.document).documentElement}function sd(e){return rd(ad(e)).left+od(e).scrollLeft}function ud(e){return Jf(e).getComputedStyle(e)}function cd(e){var t=ud(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ld(e,t,n){void 0===n&&(n=!1);var r=Xf(t),o=Xf(t)&&function(e){var t=e.getBoundingClientRect(),n=nd(t.width)/e.offsetWidth||1,r=nd(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=ad(t),a=rd(e,o),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==id(t)||cd(i))&&(s=function(e){return e!==Jf(e)&&Xf(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:od(e);var t}(t)),Xf(t)?((u=rd(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=sd(i))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function fd(e){var t=rd(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function dd(e){return"html"===id(e)?e:e.assignedSlot||e.parentNode||(Zf(e)?e.host:null)||ad(e)}function pd(e){return["html","body","#document"].indexOf(id(e))>=0?e.ownerDocument.body:Xf(e)&&cd(e)?e:pd(dd(e))}function hd(e,t){var n;void 0===t&&(t=[]);var r=pd(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Jf(r),a=o?[i].concat(i.visualViewport||[],cd(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(hd(dd(a)))}function vd(e){return["table","td","th"].indexOf(id(e))>=0}function md(e){return Xf(e)&&"fixed"!==ud(e).position?e.offsetParent:null}function yd(e){for(var t=Jf(e),n=md(e);n&&vd(n)&&"static"===ud(n).position;)n=md(n);return n&&("html"===id(n)||"body"===id(n)&&"static"===ud(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Xf(e)&&"fixed"===ud(e).position)return null;var n=dd(e);for(Zf(n)&&(n=n.host);Xf(n)&&["html","body"].indexOf(id(n))<0;){var r=ud(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var gd="top",bd="bottom",kd="right",wd="left",xd="auto",Od=[gd,bd,kd,wd],Ed="start",Dd="end",Sd="viewport",Cd="popper",jd=Od.reduce((function(e,t){return e.concat([t+"-"+Ed,t+"-"+Dd])}),[]),_d=[].concat(Od,[xd]).reduce((function(e,t){return e.concat([t,t+"-"+Ed,t+"-"+Dd])}),[]),Ad=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Nd(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function Td(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Md={placement:"bottom",modifiers:[],strategy:"absolute"};function Fd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function Rd(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Md:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Md,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,u={state:o,setOptions:function(n){var s="function"===typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:Qf(e)?hd(e):e.contextElement?hd(e.contextElement):[],popper:hd(t)};var l=function(e){var t=Nd(e);return Ad.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=l.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"===typeof i){var s=i({state:o,name:t,instance:u,options:r}),c=function(){};a.push(s||c)}})),u.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(Fd(t,n)){o.rects={reference:ld(t,yd(n),"fixed"===o.options.strategy),popper:fd(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,l=void 0===c?{}:c,f=i.name;"function"===typeof a&&(o=a({state:o,options:l,name:f,instance:u})||o)}else o.reset=!1,r=-1}}},update:Td((function(){return new Promise((function(e){u.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!Fd(e,t))return u;function c(){a.forEach((function(e){return e()})),a=[]}return u.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Pd={passive:!0};function Bd(e){return e.split("-")[0]}function Ld(e){return e.split("-")[1]}function Id(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zd(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Bd(o):null,a=o?Ld(o):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case gd:t={x:s,y:n.y-r.height};break;case bd:t={x:s,y:n.y+n.height};break;case kd:t={x:n.x+n.width,y:u};break;case wd:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var c=i?Id(i):null;if(null!=c){var l="y"===c?"height":"width";switch(a){case Ed:t[c]=t[c]-(n[l]/2-r[l]/2);break;case Dd:t[c]=t[c]+(n[l]/2-r[l]/2)}}return t}var Ud={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vd(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,f=e.isFixed,d=a.x,p=void 0===d?0:d,h=a.y,v=void 0===h?0:h,m="function"===typeof l?l({x:p,y:v}):{x:p,y:v};p=m.x,v=m.y;var y=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=wd,k=gd,w=window;if(c){var x=yd(n),O="clientHeight",E="clientWidth";if(x===Jf(n)&&"static"!==ud(x=ad(n)).position&&"absolute"===s&&(O="scrollHeight",E="scrollWidth"),o===gd||(o===wd||o===kd)&&i===Dd)k=bd,v-=(f&&x===w&&w.visualViewport?w.visualViewport.height:x[O])-r.height,v*=u?1:-1;if(o===wd||(o===gd||o===bd)&&i===Dd)b=kd,p-=(f&&x===w&&w.visualViewport?w.visualViewport.width:x[E])-r.width,p*=u?1:-1}var D,S=Object.assign({position:s},c&&Ud),C=!0===l?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:nd(t*r)/r||0,y:nd(n*r)/r||0}}({x:p,y:v}):{x:p,y:v};return p=C.x,v=C.y,u?Object.assign({},S,((D={})[k]=g?"0":"",D[b]=y?"0":"",D.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",D)):Object.assign({},S,((t={})[k]=g?v+"px":"",t[b]=y?p+"px":"",t.transform="",t))}var $d={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Xf(o)&&id(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Xf(r)&&id(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Hd={left:"right",right:"left",bottom:"top",top:"bottom"};function qd(e){return e.replace(/left|right|bottom|top/g,(function(e){return Hd[e]}))}var Wd={start:"end",end:"start"};function Yd(e){return e.replace(/start|end/g,(function(e){return Wd[e]}))}function Gd(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Kd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Jd(e,t){return t===Sd?Kd(function(e){var t=Jf(e),n=ad(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+sd(e),y:s}}(e)):Qf(t)?function(e){var t=rd(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Kd(function(e){var t,n=ad(e),r=od(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=ed(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=ed(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+sd(e),u=-r.scrollTop;return"rtl"===ud(o||n).direction&&(s+=ed(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}(ad(e)))}function Qd(e,t,n){var r="clippingParents"===t?function(e){var t=hd(dd(e)),n=["absolute","fixed"].indexOf(ud(e).position)>=0&&Xf(e)?yd(e):e;return Qf(n)?t.filter((function(e){return Qf(e)&&Gd(e,n)&&"body"!==id(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=Jd(e,n);return t.top=ed(r.top,t.top),t.right=td(r.right,t.right),t.bottom=td(r.bottom,t.bottom),t.left=ed(r.left,t.left),t}),Jd(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Xd(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Zd(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ep(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,s=n.rootBoundary,u=void 0===s?Sd:s,c=n.elementContext,l=void 0===c?Cd:c,f=n.altBoundary,d=void 0!==f&&f,p=n.padding,h=void 0===p?0:p,v=Xd("number"!==typeof h?h:Zd(h,Od)),m=l===Cd?"reference":Cd,y=e.rects.popper,g=e.elements[d?m:l],b=Qd(Qf(g)?g:g.contextElement||ad(e.elements.popper),a,u),k=rd(e.elements.reference),w=zd({reference:k,element:y,strategy:"absolute",placement:o}),x=Kd(Object.assign({},y,w)),O=l===Cd?x:k,E={top:b.top-O.top+v.top,bottom:O.bottom-b.bottom+v.bottom,left:b.left-O.left+v.left,right:O.right-b.right+v.right},D=e.modifiersData.offset;if(l===Cd&&D){var S=D[o];Object.keys(E).forEach((function(e){var t=[kd,bd].indexOf(e)>=0?1:-1,n=[gd,bd].indexOf(e)>=0?"y":"x";E[e]+=S[n]*t}))}return E}function tp(e,t,n){return ed(e,td(t,n))}function np(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function rp(e){return[gd,kd,bd,wd].some((function(t){return e[t]>=0}))}var op=Rd({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,u=Jf(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Pd)})),s&&u.addEventListener("resize",n.update,Pd),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Pd)})),s&&u.removeEventListener("resize",n.update,Pd)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=zd({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,u=void 0===s||s,c={placement:Bd(t.placement),variation:Ld(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Vd(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Vd(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},$d,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=_d.reduce((function(e,n){return e[n]=function(e,t,n){var r=Bd(e),o=[wd,gd].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[wd,kd].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,u=n.fallbackPlacements,c=n.padding,l=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,h=void 0===p||p,v=n.allowedAutoPlacements,m=t.options.placement,y=Bd(m),g=u||(y===m||!h?[qd(m)]:function(e){if(Bd(e)===xd)return[];var t=qd(e);return[Yd(e),t,Yd(t)]}(m)),b=[m].concat(g).reduce((function(e,n){return e.concat(Bd(n)===xd?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?_d:u,l=Ld(r),f=l?s?jd:jd.filter((function(e){return Ld(e)===l})):Od,d=f.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=f);var p=d.reduce((function(t,n){return t[n]=ep(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Bd(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:l,rootBoundary:f,padding:c,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),k=t.rects.reference,w=t.rects.popper,x=new Map,O=!0,E=b[0],D=0;D<b.length;D++){var S=b[D],C=Bd(S),j=Ld(S)===Ed,_=[gd,bd].indexOf(C)>=0,A=_?"width":"height",N=ep(t,{placement:S,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),T=_?j?kd:wd:j?bd:gd;k[A]>w[A]&&(T=qd(T));var M=qd(T),F=[];if(i&&F.push(N[C]<=0),s&&F.push(N[T]<=0,N[M]<=0),F.every((function(e){return e}))){E=S,O=!1;break}x.set(S,F)}if(O)for(var R=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},P=h?3:1;P>0;P--){if("break"===R(P))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,f=n.padding,d=n.tether,p=void 0===d||d,h=n.tetherOffset,v=void 0===h?0:h,m=ep(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),y=Bd(t.placement),g=Ld(t.placement),b=!g,k=Id(y),w="x"===k?"y":"x",x=t.modifiersData.popperOffsets,O=t.rects.reference,E=t.rects.popper,D="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,S="number"===typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(x){if(i){var _,A="y"===k?gd:wd,N="y"===k?bd:kd,T="y"===k?"height":"width",M=x[k],F=M+m[A],R=M-m[N],P=p?-E[T]/2:0,B=g===Ed?O[T]:E[T],L=g===Ed?-E[T]:-O[T],I=t.elements.arrow,z=p&&I?fd(I):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=U[A],$=U[N],H=tp(0,O[T],z[T]),q=b?O[T]/2-P-H-V-S.mainAxis:B-H-V-S.mainAxis,W=b?-O[T]/2+P+H+$+S.mainAxis:L+H+$+S.mainAxis,Y=t.elements.arrow&&yd(t.elements.arrow),G=Y?"y"===k?Y.clientTop||0:Y.clientLeft||0:0,K=null!=(_=null==C?void 0:C[k])?_:0,J=M+W-K,Q=tp(p?td(F,M+q-K-G):F,M,p?ed(R,J):R);x[k]=Q,j[k]=Q-M}if(s){var X,Z="x"===k?gd:wd,ee="x"===k?bd:kd,te=x[w],ne="y"===w?"height":"width",re=te+m[Z],oe=te-m[ee],ie=-1!==[gd,wd].indexOf(y),ae=null!=(X=null==C?void 0:C[w])?X:0,se=ie?re:te-O[ne]-E[ne]-ae+S.altAxis,ue=ie?te+O[ne]+E[ne]-ae-S.altAxis:oe,ce=p&&ie?function(e,t,n){var r=tp(e,t,n);return r>n?n:r}(se,te,ue):tp(p?se:re,te,p?ue:oe);x[w]=ce,j[w]=ce-te}t.modifiersData[r]=j}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Bd(n.placement),u=Id(s),c=[wd,kd].indexOf(s)>=0?"height":"width";if(i&&a){var l=function(e,t){return Xd("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Zd(e,Od))}(o.padding,n),f=fd(i),d="y"===u?gd:wd,p="y"===u?bd:kd,h=n.rects.reference[c]+n.rects.reference[u]-a[u]-n.rects.popper[c],v=a[u]-n.rects.reference[u],m=yd(i),y=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,g=h/2-v/2,b=l[d],k=y-f[c]-l[p],w=y/2-f[c]/2+g,x=tp(b,w,k),O=u;n.modifiersData[r]=((t={})[O]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&Gd(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ep(t,{elementContext:"reference"}),s=ep(t,{altBoundary:!0}),u=np(a,r),c=np(s,o,i),l=rp(u),f=rp(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),ip="tippy-content",ap="tippy-backdrop",sp="tippy-arrow",up="tippy-svg-arrow",cp={passive:!0,capture:!0},lp=function(){return document.body};function fp(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function dp(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function pp(e,t){return"function"===typeof e?e.apply(void 0,t):e}function hp(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function vp(e){return[].concat(e)}function mp(e,t){-1===e.indexOf(t)&&e.push(t)}function yp(e){return e.split("-")[0]}function gp(e){return[].slice.call(e)}function bp(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function kp(){return document.createElement("div")}function wp(e){return["Element","Fragment"].some((function(t){return dp(e,t)}))}function xp(e){return dp(e,"MouseEvent")}function Op(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function Ep(e){return wp(e)?[e]:function(e){return dp(e,"NodeList")}(e)?gp(e):Array.isArray(e)?e:gp(document.querySelectorAll(e))}function Dp(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Sp(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Cp(e){var t,n=vp(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function jp(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function _p(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Ap={isTouch:!1},Np=0;function Tp(){Ap.isTouch||(Ap.isTouch=!0,window.performance&&document.addEventListener("mousemove",Mp))}function Mp(){var e=performance.now();e-Np<20&&(Ap.isTouch=!1,document.removeEventListener("mousemove",Mp)),Np=e}function Fp(){var e=document.activeElement;if(Op(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Rp=!!("undefined"!==typeof window&&"undefined"!==typeof document)&&!!window.msCrypto;var Pp={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Bp=Object.assign({appendTo:lp,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Pp,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Lp=Object.keys(Bp);function Ip(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=Bp[o])?r:i);return t}),{});return Object.assign({},e,t)}function zp(e,t){var n=Object.assign({},t,{content:pp(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ip(Object.assign({},Bp,{plugins:t}))):Lp).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(ur){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Bp.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Up(e,t){e.innerHTML=t}function Vp(e){var t=kp();return!0===e?t.className=sp:(t.className=up,wp(e)?t.appendChild(e):Up(t,e)),t}function $p(e,t){wp(t.content)?(Up(e,""),e.appendChild(t.content)):"function"!==typeof t.content&&(t.allowHTML?Up(e,t.content):e.textContent=t.content)}function Hp(e){var t=e.firstElementChild,n=gp(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ip)})),arrow:n.find((function(e){return e.classList.contains(sp)||e.classList.contains(up)})),backdrop:n.find((function(e){return e.classList.contains(ap)}))}}function qp(e){var t=kp(),n=kp();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=kp();function o(n,r){var o=Hp(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"===typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"===typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||$p(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Vp(r.arrow))):i.appendChild(Vp(r.arrow)):s&&i.removeChild(s)}return r.className=ip,r.setAttribute("data-state","hidden"),$p(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}qp.$$tippy=!0;var Wp=1,Yp=[],Gp=[];function Kp(e,t){var n,r,o,i,a,s,u,c,l=zp(e,Object.assign({},Bp,Ip(bp(t)))),f=!1,d=!1,p=!1,h=!1,v=[],m=hp(Y,l.interactiveDebounce),y=Wp++,g=(c=l.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:y,reference:e,popper:kp(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){0;if(b.state.isDestroyed)return;M("onBeforeUpdate",[b,t]),q();var n=b.props,r=zp(e,Object.assign({},n,bp(t),{ignoreAttributes:!0}));b.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(P(),m=hp(Y,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?vp(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");R(),T(),x&&x(n,r);b.popperInstance&&(Q(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Ap.isTouch&&!b.props.touch,o=fp(b.props.duration,0,Bp.duration);if(e||t||n||r)return;if(j().hasAttribute("disabled"))return;if(M("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,C()&&(w.style.visibility="visible");T(),z(),b.state.isMounted||(w.style.transition="none");if(C()){var i=A(),a=i.box,u=i.content;Dp([a,u],0)}s=function(){var e;if(b.state.isVisible&&!h){if(h=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,C()&&b.props.animation){var t=A(),n=t.box,r=t.content;Dp([n,r],o),Sp([n,r],"visible")}F(),R(),mp(Gp,b),null==(e=b.popperInstance)||e.forceUpdate(),M("onMount",[b]),b.props.animation&&C()&&function(e,t){V(e,t)}(o,(function(){b.state.isShown=!0,M("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=j();e=b.props.interactive&&t===lp||"parent"===t?n.parentNode:pp(t,[n]);e.contains(w)||e.appendChild(w);b.state.isMounted=!0,Q(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=fp(b.props.duration,1,Bp.duration);if(e||t||n)return;if(M("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,h=!1,f=!1,C()&&(w.style.visibility="hidden");if(P(),U(),T(!0),C()){var o=A(),i=o.box,a=o.content;b.props.animation&&(Dp([i,a],r),Sp([i,a],"hidden"))}F(),R(),b.props.animation?C()&&function(e,t){V(e,(function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;_().addEventListener("mousemove",m),mp(Yp,m),m(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;X(),Z().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);Gp=Gp.filter((function(e){return e!==b})),b.state.isMounted=!1,M("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),q(),delete e._tippy,b.state.isDestroyed=!0,M("onDestroy",[b])}};if(!l.render)return b;var k=l.render(b),w=k.popper,x=k.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,e._tippy=b,w._tippy=b;var O=g.map((function(e){return e.fn(b)})),E=e.hasAttribute("aria-expanded");return H(),R(),T(),M("onCreate",[b]),l.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&_().addEventListener("mousemove",m)})),b;function D(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===D()[0]}function C(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function j(){return u||e}function _(){var e=j().parentNode;return e?Cp(e):document}function A(){return Hp(w)}function N(e){return b.state.isMounted&&!b.state.isVisible||Ap.isTouch||i&&"focus"===i.type?0:fp(b.props.delay,e?0:1,Bp.delay)}function T(e){void 0===e&&(e=!1),w.style.pointerEvents=b.props.interactive&&!e?"":"none",w.style.zIndex=""+b.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),O.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=b.props)[e].apply(r,t)}function F(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;vp(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function R(){!E&&b.props.aria.expanded&&vp(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===j()?"true":"false"):e.removeAttribute("aria-expanded")}))}function P(){_().removeEventListener("mousemove",m),Yp=Yp.filter((function(e){return e!==m}))}function B(t){if(!Ap.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!_p(w,n)){if(vp(b.props.triggerTarget||e).some((function(e){return _p(e,n)}))){if(Ap.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout((function(){d=!1})),b.state.isMounted||U())}}}function L(){p=!0}function I(){p=!1}function z(){var e=_();e.addEventListener("mousedown",B,!0),e.addEventListener("touchend",B,cp),e.addEventListener("touchstart",I,cp),e.addEventListener("touchmove",L,cp)}function U(){var e=_();e.removeEventListener("mousedown",B,!0),e.removeEventListener("touchend",B,cp),e.removeEventListener("touchstart",I,cp),e.removeEventListener("touchmove",L,cp)}function V(e,t){var n=A().box;function r(e){e.target===n&&(jp(n,"remove",r),t())}if(0===e)return t();jp(n,"remove",a),jp(n,"add",r),a=r}function $(t,n,r){void 0===r&&(r=!1),vp(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;S()&&($("touchstart",W,{passive:!0}),$("touchend",G,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,W),e){case"mouseenter":$("mouseleave",G);break;case"focus":$(Rp?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),v=[]}function W(e){var t,n=!1;if(b.state.isEnabled&&!J(e)&&!d){var r="focus"===(null==(t=i)?void 0:t.type);i=e,u=e.currentTarget,R(),!b.state.isVisible&&xp(e)&&Yp.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||f)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(f=!n),n&&!r&&te(e)}}function Y(e){var t=e.target,n=j().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:l}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=yp(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,l="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-r+u>i,p=r-t.bottom-c>i,h=t.left-n+l>i,v=n-t.right-f>i;return d||p||h||v}))})(r,e)&&(P(),te(e))}}function G(e){J(e)||b.props.trigger.indexOf("click")>=0&&f||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function K(e){b.props.trigger.indexOf("focusin")<0&&e.target!==j()||b.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function J(e){return!!Ap.isTouch&&S()!==e.type.indexOf("touch")>=0}function Q(){X();var t=b.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,u=C()?Hp(w).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||j()}:e,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(C()){var n=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},f=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},l];C()&&u&&f.push({name:"arrow",options:{element:u,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),b.popperInstance=op(c,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:f}))}function X(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Z(){return gp(w.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&M("onTrigger",[b,e]),z();var t=N(!0),r=D(),o=r[0],i=r[1];Ap.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),M("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=N(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else U()}}function Jp(e,t){void 0===t&&(t={});var n=Bp.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Tp,cp),window.addEventListener("blur",Fp);var r=Object.assign({},t,{plugins:n}),o=Ep(e).reduce((function(e,t){var n=t&&Kp(t,r);return n&&e.push(n),e}),[]);return wp(e)?o[0]:o}Jp.defaultProps=Bp,Jp.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Bp[t]=e[t]}))},Jp.currentInput=Ap;Object.assign({},$d,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Jp.setDefaultProps({render:qp});var Qp=Jp,Xp=function(){function e(t){var n=this,r=t.editor,o=t.element,i=t.view,a=t.tippyOptions,s=void 0===a?{}:a,u=t.shouldShow;h(this,e),this.preventHide=!1,this.shouldShow=function(e){var t=e.view,n=e.state,r=e.from,o=e.to,i=n.doc,a=n.selection.empty,s=!i.textBetween(r,o).length&&hf(n.selection);return!(!t.hasFocus()||a||s)},this.mousedownHandler=function(){n.preventHide=!0},this.dragstartHandler=function(){n.hide()},this.focusHandler=function(){setTimeout((function(){return n.update(n.editor.view)}))},this.blurHandler=function(e){var t,r=e.event;n.preventHide?n.preventHide=!1:(null===r||void 0===r?void 0:r.relatedTarget)&&(null===(t=n.element.parentNode)||void 0===t?void 0:t.contains(r.relatedTarget))||n.hide()},this.editor=r,this.element=o,this.view=i,u&&(this.shouldShow=u),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}return m(e,[{key:"createTooltip",value:function(){var e=this,t=this.editor.options.element,n=!!t.parentElement;!this.tippy&&n&&(this.tippy=Qp(t,Object(o.a)({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(function(t){e.blurHandler({event:t})})))}},{key:"update",value:function(e,t){var n,r,o,i=e.state,a=e.composing,s=i.doc,u=i.selection,c=t&&t.doc.eq(s)&&t.selection.eq(u);if(!a&&!c){this.createTooltip();var l=u.ranges,f=Math.min.apply(Math,Object(J.a)(l.map((function(e){return e.$from.pos})))),d=Math.max.apply(Math,Object(J.a)(l.map((function(e){return e.$to.pos}))));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t,from:f,to:d}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||function(){if(pf(n=i.selection)&&n instanceof ya){var t=e.nodeDOM(f);if(t)return t.getBoundingClientRect()}var n;return Yf(e,f,d)}}),this.show()):this.hide()}}},{key:"show",value:function(){var e;null===(e=this.tippy)||void 0===e||e.show()}},{key:"hide",value:function(){var e;null===(e=this.tippy)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}]),e}(),Zp=function(e){return new Aa({key:"string"===typeof e.pluginKey?new Ma(e.pluginKey):e.pluginKey,view:function(t){return new Xp(Object(o.a)({view:t},e))}})},eh=(rf.create({name:"bubbleMenu",addOptions:function(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}},addProseMirrorPlugins:function(){return this.options.element?[Zp({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),function(){function e(t){var n=this,r=t.editor,o=t.element,i=t.view,a=t.tippyOptions,s=void 0===a?{}:a,u=t.shouldShow;h(this,e),this.preventHide=!1,this.shouldShow=function(e){var t=e.view,n=e.state.selection,r=n.$anchor,o=n.empty,i=1===r.depth,a=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(t.hasFocus()&&o&&i&&a)},this.mousedownHandler=function(){n.preventHide=!0},this.focusHandler=function(){setTimeout((function(){return n.update(n.editor.view)}))},this.blurHandler=function(e){var t,r=e.event;n.preventHide?n.preventHide=!1:(null===r||void 0===r?void 0:r.relatedTarget)&&(null===(t=n.element.parentNode)||void 0===t?void 0:t.contains(r.relatedTarget))||n.hide()},this.editor=r,this.element=o,this.view=i,u&&(this.shouldShow=u),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}return m(e,[{key:"createTooltip",value:function(){var e=this,t=this.editor.options.element,n=!!t.parentElement;!this.tippy&&n&&(this.tippy=Qp(t,Object(o.a)({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(function(t){e.blurHandler({event:t})})))}},{key:"update",value:function(e,t){var n,r,o,i=e.state,a=i.doc,s=i.selection,u=s.from,c=s.to;t&&t.doc.eq(a)&&t.selection.eq(s)||(this.createTooltip(),(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||function(){return Yf(e,u,c)}}),this.show()):this.hide())}},{key:"show",value:function(){var e;null===(e=this.tippy)||void 0===e||e.show()}},{key:"hide",value:function(){var e;null===(e=this.tippy)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}]),e}()),th=function(e){return new Aa({key:"string"===typeof e.pluginKey?new Ma(e.pluginKey):e.pluginKey,view:function(t){return new eh(Object(o.a)({view:t},e))}})},nh=(rf.create({name:"floatingMenu",addOptions:function(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins:function(){return this.options.element?[th({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),["editor"]),rh=function(e){g(n,e);var t=O(n);function n(){var e;return h(this,n),(e=t.apply(this,arguments)).contentComponent=null,e}return m(n)}(Hf),oh=function(e){var t=e.renderers;return s.a.createElement(s.a.Fragment,null,Array.from(t).map((function(e){var t=Object(E.a)(e,2),n=t[0],r=t[1];return c.a.createPortal(r.reactElement,r.element,n)})))},ih=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),(r=t.call(this,e)).editorContentRef=s.a.createRef(),r.state={renderers:new Map},r}return m(n,[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(){this.init()}},{key:"init",value:function(){var e=this.props.editor;if(e&&e.options.element){if(e.contentComponent)return;var t=this.editorContentRef.current;t.append.apply(t,Object(J.a)(e.options.element.childNodes)),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews()}}},{key:"componentWillUnmount",value:function(){var e=this.props.editor;if(e&&(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,e.options.element.firstChild)){var t=document.createElement("div");t.append.apply(t,Object(J.a)(e.options.element.childNodes)),e.setOptions({element:t})}}},{key:"render",value:function(){var e=this.props,t=(e.editor,i(e,nh));return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",Object(o.a)({ref:this.editorContentRef},t)),s.a.createElement(oh,{renderers:this.state.renderers}))}}]),n}(s.a.Component),ah=s.a.memo(ih),sh=Object(a.createContext)({onDragStart:void 0}),uh=function(){return Object(a.useContext)(sh)};s.a.forwardRef((function(e,t){var n=uh().onDragStart,r=e.as||"div";return s.a.createElement(r,Object(o.a)(Object(o.a)({},e),{},{ref:t,"data-node-view-wrapper":"",onDragStart:n,style:Object(o.a)({whiteSpace:"normal"},e.style)}))}));function ch(){var e=Object(a.useState)(0),t=Object(E.a)(e,2)[1];return function(){return t((function(e){return e+1}))}}var lh=rf.create({name:"placeholder",addOptions:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins:function(){var e=this;return[new Aa({props:{decorations:function(t){var n=t.doc,r=t.selection,o=e.editor.isEditable||!e.options.showOnlyWhenEditable,i=r.anchor,a=[];return o?(n.descendants((function(t,n){var r=i>=n&&i<=n+t.nodeSize,o=!t.isLeaf&&!t.childCount;if((r||!e.options.showOnlyCurrent)&&o){var s=[e.options.emptyNodeClass];e.editor.isEmpty&&s.push(e.options.emptyEditorClass);var u=pc.node(n,n+t.nodeSize,{class:s.join(" "),"data-placeholder":"function"===typeof e.options.placeholder?e.options.placeholder({editor:e.editor,node:t,pos:n,hasAnchor:r}):e.options.placeholder});a.push(u)}return e.options.includeChildren})),mc.create(n,a)):null}}})]}}),fh=Kf.create({name:"text",group:"inline"});function dh(e){this.j={},this.jr=[],this.jd=null,this.t=e}dh.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=ph();var o=yh(this,e);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[e]=r,r}};var ph=function(){return new dh},hh=function(e){return new dh(e)},vh=function(e,t,n){e.j[t]||(e.j[t]=n)},mh=function(e,t,n){e.jr.push([t,n])},yh=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var o=e.jr[r][0],i=e.jr[r][1];if(o.test(t))return i}return e.jd},gh=function(e,t,n){for(var r=0;r<t.length;r++)vh(e,t[r],n)},bh=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],o=t[n][1];vh(e,r,o)}},kh=function(e,t,n,r){for(var o,i=0,a=t.length;i<a&&(o=e.j[t[i]]);)e=o,i++;if(i>=a)return[];for(;i<a-1;)o=r(),vh(e,t[i],o),e=o,i++;vh(e,t[a-1],n)},wh="DOMAIN",xh="LOCALHOST",Oh="TLD",Eh="NUM",Dh="PROTOCOL",Sh="MAILTO",Ch="WS",jh="NL",_h="OPENBRACE",Ah="OPENBRACKET",Nh="OPENANGLEBRACKET",Th="OPENPAREN",Mh="CLOSEBRACE",Fh="CLOSEBRACKET",Rh="CLOSEANGLEBRACKET",Ph="CLOSEPAREN",Bh="AMPERSAND",Lh="APOSTROPHE",Ih="ASTERISK",zh="AT",Uh="BACKSLASH",Vh="BACKTICK",$h="CARET",Hh="COLON",qh="COMMA",Wh="DOLLAR",Yh="DOT",Gh="EQUALS",Kh="EXCLAMATION",Jh="HYPHEN",Qh="PERCENT",Xh="PIPE",Zh="PLUS",ev="POUND",tv="QUERY",nv="QUOTE",rv="SEMI",ov="SLASH",iv="TILDE",av="UNDERSCORE",sv="SYM",uv=Object.freeze({__proto__:null,DOMAIN:wh,LOCALHOST:xh,TLD:Oh,NUM:Eh,PROTOCOL:Dh,MAILTO:Sh,WS:Ch,NL:jh,OPENBRACE:_h,OPENBRACKET:Ah,OPENANGLEBRACKET:Nh,OPENPAREN:Th,CLOSEBRACE:Mh,CLOSEBRACKET:Fh,CLOSEANGLEBRACKET:Rh,CLOSEPAREN:Ph,AMPERSAND:Bh,APOSTROPHE:Lh,ASTERISK:Ih,AT:zh,BACKSLASH:Uh,BACKTICK:Vh,CARET:$h,COLON:Hh,COMMA:qh,DOLLAR:Wh,DOT:Yh,EQUALS:Gh,EXCLAMATION:Kh,HYPHEN:Jh,PERCENT:Qh,PIPE:Xh,PLUS:Zh,POUND:ev,QUERY:tv,QUOTE:nv,SEMI:rv,SLASH:ov,TILDE:iv,UNDERSCORE:av,SYM:sv}),cv="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw verm\xf6gensberater-ctb verm\xf6gensberatung-pwb \u03b5\u03bb \u03b5\u03c5 \u0431\u0433 \u0431\u0435\u043b \u0434\u0435\u0442\u0438 \u0435\u044e \u043a\u0430\u0442\u043e\u043b\u0438\u043a \u043a\u043e\u043c \u049b\u0430\u0437 \u043c\u043a\u0434 \u043c\u043e\u043d \u043c\u043e\u0441\u043a\u0432\u0430 \u043e\u043d\u043b\u0430\u0439\u043d \u043e\u0440\u0433 \u0440\u0443\u0441 \u0440\u0444 \u0441\u0430\u0439\u0442 \u0441\u0440\u0431 \u0443\u043a\u0440 \u10d2\u10d4 \u0570\u0561\u0575 \u05d9\u05e9\u05e8\u05d0\u05dc \u05e7\u05d5\u05dd \u0627\u0628\u0648\u0638\u0628\u064a \u0627\u062a\u0635\u0627\u0644\u0627\u062a \u0627\u0631\u0627\u0645\u0643\u0648 \u0627\u0644\u0627\u0631\u062f\u0646 \u0627\u0644\u0628\u062d\u0631\u064a\u0646 \u0627\u0644\u062c\u0632\u0627\u0626\u0631 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629 \u0627\u0644\u0639\u0644\u064a\u0627\u0646 \u0627\u0644\u0645\u063a\u0631\u0628 \u0627\u0645\u0627\u0631\u0627\u062a \u0627\u06cc\u0631\u0627\u0646 \u0628\u0627\u0631\u062a \u0628\u0627\u0632\u0627\u0631 \u0628\u06be\u0627\u0631\u062a \u0628\u064a\u062a\u0643 \u067e\u0627\u06a9\u0633\u062a\u0627\u0646 \u0680\u0627\u0631\u062a \u062a\u0648\u0646\u0633 \u0633\u0648\u062f\u0627\u0646 \u0633\u0648\u0631\u064a\u0629 \u0634\u0628\u0643\u0629 \u0639\u0631\u0627\u0642 \u0639\u0631\u0628 \u0639\u0645\u0627\u0646 \u0641\u0644\u0633\u0637\u064a\u0646 \u0642\u0637\u0631 \u0643\u0627\u062b\u0648\u0644\u064a\u0643 \u0643\u0648\u0645 \u0645\u0635\u0631 \u0645\u0644\u064a\u0633\u064a\u0627 \u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627 \u0645\u0648\u0642\u0639 \u0647\u0645\u0631\u0627\u0647 \u0915\u0949\u092e \u0928\u0947\u091f \u092d\u093e\u0930\u0924 \u092d\u093e\u0930\u0924\u092e\u094d \u092d\u093e\u0930\u094b\u0924 \u0938\u0902\u0917\u0920\u0928 \u09ac\u09be\u0982\u09b2\u09be \u09ad\u09be\u09b0\u09a4 \u09ad\u09be\u09f0\u09a4 \u0a2d\u0a3e\u0a30\u0a24 \u0aad\u0abe\u0ab0\u0aa4 \u0b2d\u0b3e\u0b30\u0b24 \u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe \u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8 \u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd \u0c2d\u0c3e\u0c30\u0c24\u0c4d \u0cad\u0cbe\u0cb0\u0ca4 \u0d2d\u0d3e\u0d30\u0d24\u0d02 \u0dbd\u0d82\u0d9a\u0dcf \u0e04\u0e2d\u0e21 \u0e44\u0e17\u0e22 \u0ea5\u0eb2\u0ea7 \ub2f7\ub137 \ub2f7\ucef4 \uc0bc\uc131 \ud55c\uad6d \u30a2\u30de\u30be\u30f3 \u30b0\u30fc\u30b0\u30eb \u30af\u30e9\u30a6\u30c9 \u30b3\u30e0 \u30b9\u30c8\u30a2 \u30bb\u30fc\u30eb \u30d5\u30a1\u30c3\u30b7\u30e7\u30f3 \u30dd\u30a4\u30f3\u30c8 \u307f\u3093\u306a \u4e16\u754c \u4e2d\u4fe1 \u4e2d\u56fd \u4e2d\u570b \u4e2d\u6587\u7f51 \u4e9a\u9a6c\u900a \u4f01\u4e1a \u4f5b\u5c71 \u4fe1\u606f \u5065\u5eb7 \u516b\u5366 \u516c\u53f8 \u516c\u76ca \u53f0\u6e7e \u53f0\u7063 \u5546\u57ce \u5546\u5e97 \u5546\u6807 \u5609\u91cc \u5609\u91cc\u5927\u9152\u5e97 \u5728\u7ebf \u5927\u4f17\u6c7d\u8f66 \u5927\u62ff \u5929\u4e3b\u6559 \u5a31\u4e50 \u5bb6\u96fb \u5e7f\u4e1c \u5fae\u535a \u6148\u5584 \u6211\u7231\u4f60 \u624b\u673a \u62db\u8058 \u653f\u52a1 \u653f\u5e9c \u65b0\u52a0\u5761 \u65b0\u95fb \u65f6\u5c1a \u66f8\u7c4d \u673a\u6784 \u6de1\u9a6c\u9521 \u6e38\u620f \u6fb3\u9580 \u70b9\u770b \u79fb\u52a8 \u7ec4\u7ec7\u673a\u6784 \u7f51\u5740 \u7f51\u5e97 \u7f51\u7ad9 \u7f51\u7edc \u8054\u901a \u8bfa\u57fa\u4e9a \u8c37\u6b4c \u8d2d\u7269 \u901a\u8ca9 \u96c6\u56e2 \u96fb\u8a0a\u76c8\u79d1 \u98de\u5229\u6d66 \u98df\u54c1 \u9910\u5385 \u9999\u683c\u91cc\u62c9 \u9999\u6e2f".split(" "),lv=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,fv=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,dv=/\uFE0F/,pv=/\d/,hv=/\s/;function vv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=ph(),n=hh(Eh),r=hh(wh),o=ph(),i=hh(Ch),a=[[pv,r],[lv,r],[fv,r],[dv,r]],s=function(){var e=hh(wh);return e.j={"-":o},e.jr=[].concat(a),e},u=function(e){var t=s();return t.t=e,t};bh(t,[["'",hh(Lh)],["{",hh(_h)],["[",hh(Ah)],["<",hh(Nh)],["(",hh(Th)],["}",hh(Mh)],["]",hh(Fh)],[">",hh(Rh)],[")",hh(Ph)],["&",hh(Bh)],["*",hh(Ih)],["@",hh(zh)],["`",hh(Vh)],["^",hh($h)],[":",hh(Hh)],[",",hh(qh)],["$",hh(Wh)],[".",hh(Yh)],["=",hh(Gh)],["!",hh(Kh)],["-",hh(Jh)],["%",hh(Qh)],["|",hh(Xh)],["+",hh(Zh)],["#",hh(ev)],["?",hh(tv)],['"',hh(nv)],["/",hh(ov)],[";",hh(rv)],["~",hh(iv)],["_",hh(av)],["\\",hh(Uh)]]),vh(t,"\n",hh(jh)),mh(t,hv,i),vh(i,"\n",ph()),mh(i,hv,i);for(var c=0;c<cv.length;c++)kh(t,cv[c],u(Oh),s);var l=s(),f=s(),d=s(),p=s();kh(t,"file",l,s),kh(t,"ftp",f,s),kh(t,"http",d,s),kh(t,"mailto",p,s);var h=s(),v=hh(Dh),m=hh(Sh);vh(f,"s",h),vh(f,":",v),vh(d,"s",h),vh(d,":",v),vh(l,":",v),vh(h,":",v),vh(p,":",m);for(var y=s(),g=0;g<e.length;g++)kh(t,e[g],y,s);return vh(y,":",v),kh(t,"localhost",u(xh),s),mh(t,pv,n),mh(t,lv,r),mh(t,fv,r),mh(t,dv,r),mh(n,pv,n),mh(n,lv,r),mh(n,fv,r),mh(n,dv,r),vh(n,"-",o),vh(r,"-",o),vh(o,"-",o),mh(r,pv,r),mh(r,lv,r),mh(r,fv,r),mh(r,dv,r),mh(o,pv,r),mh(o,lv,r),mh(o,fv,r),mh(o,dv,r),t.jd=hh(sv),t}function mv(e){return mv="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},mv(e)}var yv={defaultProtocol:"http",events:null,format:bv,formatHref:bv,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function gv(e){e=e||{},this.defaultProtocol="defaultProtocol"in e?e.defaultProtocol:yv.defaultProtocol,this.events="events"in e?e.events:yv.events,this.format="format"in e?e.format:yv.format,this.formatHref="formatHref"in e?e.formatHref:yv.formatHref,this.nl2br="nl2br"in e?e.nl2br:yv.nl2br,this.tagName="tagName"in e?e.tagName:yv.tagName,this.target="target"in e?e.target:yv.target,this.rel="rel"in e?e.rel:yv.rel,this.validate="validate"in e?e.validate:yv.validate,this.truncate="truncate"in e?e.truncate:yv.truncate,this.className="className"in e?e.className:yv.className,this.attributes=e.attributes||yv.attributes,this.ignoreTags=[];for(var t=("ignoreTags"in e?e.ignoreTags:yv.ignoreTags),n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function bv(e){return e}gv.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),rel:this.get("rel",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e),truncate:this.get("truncate",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var r,o=this[e];if(!o)return o;switch(mv(o)){case"function":return o(t,n.t);case"object":return"function"===typeof(r=n.t in o?o[n.t]:yv[e])?r(t,n.t):r}return o},getObject:function(e,t,n){var r=this[e];return"function"===typeof r?r(t,n.t):r}};function kv(){}function wv(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];r.constructor=t,t.prototype=r}(kv,n,t),n}kv.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yv.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var xv=wv("email",{isLink:!0}),Ov=wv("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),Ev=wv("text"),Dv=wv("nl"),Sv=wv("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yv.defaultProtocol,t=this.tk,n=!1,r=!1,o=[],i=0;t[i].t===Dh;)n=!0,o.push(t[i].v),i++;for(;t[i].t===ov;)r=!0,o.push(t[i].v),i++;for(;i<t.length;i++)o.push(t[i].v);return o=o.join(""),n||r||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===Dh}}),Cv=Object.freeze({__proto__:null,MultiToken:kv,Base:kv,createTokenClass:wv,MailtoEmail:xv,Email:Ov,Text:Ev,Nl:Dv,Url:Sv});function jv(){var e=ph(),t=ph(),n=ph(),r=ph(),o=ph(),i=ph(),a=ph(),s=hh(Sv),u=ph(),c=hh(Sv),l=hh(Sv),f=ph(),d=ph(),p=ph(),h=ph(),v=ph(),m=hh(Sv),y=hh(Sv),g=hh(Sv),b=hh(Sv),k=ph(),w=ph(),x=ph(),O=ph(),E=ph(),D=ph(),S=hh(Ov),C=ph(),j=hh(Ov),_=hh(xv),A=ph(),N=ph(),T=ph(),M=ph(),F=hh(Dv);vh(e,jh,F),vh(e,Dh,t),vh(e,Sh,n),vh(t,ov,r),vh(r,ov,o),vh(e,Oh,i),vh(e,wh,i),vh(e,xh,s),vh(e,Eh,i),vh(o,Oh,l),vh(o,wh,l),vh(o,Eh,l),vh(o,xh,l),vh(i,Yh,a),vh(E,Yh,D),vh(a,Oh,s),vh(a,wh,i),vh(a,Eh,i),vh(a,xh,i),vh(D,Oh,S),vh(D,wh,E),vh(D,Eh,E),vh(D,xh,E),vh(s,Yh,a),vh(S,Yh,D),vh(s,Hh,u),vh(s,ov,l),vh(u,Eh,c),vh(c,ov,l),vh(S,Hh,C),vh(C,Eh,j);var R=[Bh,Ih,zh,Uh,Vh,$h,Wh,wh,Gh,Jh,xh,Eh,Qh,Xh,Zh,ev,Dh,ov,sv,iv,Oh,av],P=[Lh,Rh,Mh,Fh,Ph,Hh,qh,Yh,Kh,Nh,_h,Ah,Th,tv,nv,rv];vh(l,_h,d),vh(l,Ah,p),vh(l,Nh,h),vh(l,Th,v),vh(f,_h,d),vh(f,Ah,p),vh(f,Nh,h),vh(f,Th,v),vh(d,Mh,l),vh(p,Fh,l),vh(h,Rh,l),vh(v,Ph,l),vh(m,Mh,l),vh(y,Fh,l),vh(g,Rh,l),vh(b,Ph,l),vh(k,Mh,l),vh(w,Fh,l),vh(x,Rh,l),vh(O,Ph,l),gh(d,R,m),gh(p,R,y),gh(h,R,g),gh(v,R,b),gh(d,P,k),gh(p,P,w),gh(h,P,x),gh(v,P,O),gh(m,R,m),gh(y,R,y),gh(g,R,g),gh(b,R,b),gh(m,P,m),gh(y,P,y),gh(g,P,g),gh(b,P,b),gh(k,R,m),gh(w,R,y),gh(x,R,g),gh(O,R,b),gh(k,P,k),gh(w,P,w),gh(x,P,x),gh(O,P,O),gh(l,R,l),gh(f,R,l),gh(l,P,f),gh(f,P,f),vh(n,Oh,_),vh(n,wh,_),vh(n,Eh,_),vh(n,xh,_),gh(_,R,_),gh(_,P,A),gh(A,R,_),gh(A,P,A);var B=[Bh,Lh,Ih,Uh,Vh,$h,Mh,Wh,wh,Gh,Jh,Eh,_h,Qh,Xh,Zh,ev,tv,ov,sv,iv,Oh,av];return gh(i,B,N),vh(i,zh,T),gh(s,B,N),vh(s,zh,T),gh(a,B,N),gh(N,B,N),vh(N,zh,T),vh(N,Yh,M),gh(M,B,N),vh(T,Oh,E),vh(T,wh,E),vh(T,Eh,E),vh(T,xh,S),e}function _v(e,t,n){var r=n[0].s,o=n[n.length-1].e;return new e(t.substr(r,o-r),n)}var Av="undefined"!==typeof console&&console&&console.warn||function(){},Nv={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function Tv(e){if(Nv.initialized&&Av('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");Nv.customProtocols.push(e)}function Mv(e){return Nv.initialized||function(){Nv.scanner={start:vv(Nv.customProtocols),tokens:uv},Nv.parser={start:jv(),tokens:Cv};for(var e={createTokenClass:wv},t=0;t<Nv.pluginQueue.length;t++)Nv.pluginQueue[t][1]({scanner:Nv.scanner,parser:Nv.parser,utils:e});Nv.initialized=!0}(),function(e,t,n){for(var r=n.length,o=0,i=[],a=[];o<r;){for(var s=e,u=null,c=null,l=0,f=null,d=-1;o<r&&!(u=yh(s,n[o].t));)a.push(n[o++]);for(;o<r&&(c=u||yh(s,n[o].t));)u=null,(s=c).accepts()?(d=0,f=s):d>=0&&d++,o++,l++;if(d<0)for(var p=o-l;p<o;p++)a.push(n[p]);else{a.length>0&&(i.push(_v(Ev,t,a)),a=[]),o-=d,l-=d;var h=f.t,v=n.slice(o-l,o);i.push(_v(h,t,v))}}return a.length>0&&i.push(_v(Ev,t,a)),i}(Nv.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var o=e.charCodeAt(r),i=void 0,a=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,o=[],i=0,a=0;a<r;){for(var s=e,u=null,c=0,l=null,f=-1,d=-1;a<r&&(u=yh(s,n[a]));)(s=u).accepts()?(f=0,d=0,l=s):f>=0&&(f+=n[a].length,d++),c+=n[a].length,i+=n[a].length,a++;i-=f,a-=d,c-=f,o.push({t:l.t,v:t.substr(i-c,c),s:i-c,e:i})}return o}(Nv.scanner.start,e))}function Fv(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Mv(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.t!==t||r.push(i.toObject())}return r}function Rv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Mv(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function Pv(e){return new Aa({key:new Ma("autolink"),appendTransaction:function(t,n,r){var i=t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc),a=t.some((function(e){return e.getMeta("preventAutolink")}));if(i&&!a){var s=r.tr,u=function(e,t){var n=new ca(e);return t.forEach((function(e){e.steps.forEach((function(e){n.step(e)}))})),n}(n.doc,Object(J.a)(t)),c=u.mapping,l=function(e){var t=e.mapping,n=e.steps,r=[];return t.maps.forEach((function(e,o){var i=[];if(e.ranges.length)e.forEach((function(e,t){i.push({from:e,to:t})}));else{var a=n[o],s=a.from,u=a.to;if(void 0===s||void 0===u)return;i.push({from:s,to:u})}i.forEach((function(e){var n=e.from,i=e.to,a=t.slice(o).map(n,-1),s=t.slice(o).map(i),u=t.invert().map(a,-1),c=t.invert().map(s);r.push({oldRange:{from:u,to:c},newRange:{from:a,to:s}})}))})),qf(r)}(u);if(l.forEach((function(t){var i=t.oldRange,a=t.newRange;Wf(i.from,i.to,n.doc).filter((function(t){return t.mark.type===e.type})).forEach((function(t){var o=Wf(c.map(t.from),c.map(t.to),r.doc).filter((function(t){return t.mark.type===e.type}));if(o.length){var i=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),u=r.doc.textBetween(i.from,i.to,void 0," "),l=Rv(a),f=Rv(u);l&&!f&&s.removeMark(i.from,i.to,e.type)}})),function(e,t,n){var r=[];return e.nodesBetween(t.from,t.to,(function(e,t){n(e)&&r.push({node:e,pos:t})})),r}(r.doc,a,(function(e){return e.isTextblock})).forEach((function(t){Fv(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((function(e){return e.isLink})).filter((function(t){return!e.validate||e.validate(t.value)})).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{from:t.pos+e.start+1,to:t.pos+e.end+1})})).filter((function(e){var t=a.from>=e.from&&a.from<=e.to,n=a.to>=e.from&&a.to<=e.to;return t||n})).forEach((function(t){s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length)return s}}})}var Bv,Lv=Gf.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate:function(){this.options.protocols.forEach(Tv)},inclusive:function(){return this.options.autolink},addOptions:function(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes:function(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:function(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML:function(e){var t=e.HTMLAttributes;return["a",Il(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setLink:function(t){return function(n){return(0,n.chain)().setMark(e.name,t).setMeta("preventAutolink",!0).run()}},toggleLink:function(t){return function(n){return(0,n.chain)().toggleMark(e.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},unsetLink:function(){return function(t){return(0,t.chain)().unsetMark(e.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}},addPasteRules:function(){var e,t=this;return[(e={find:function(e){return Fv(e).filter((function(e){return!t.options.validate||t.options.validate(e.value)})).filter((function(e){return e.isLink})).map((function(e){return{text:e.value,index:e.start,data:e}}))},type:this.type,getAttributes:function(e){var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}},new Xl({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Vl(e.getAttributes,void 0,o);if(!1===i||null===i)return null;var a=n.tr,s=o[o.length-1],u=o[0],c=r.to;if(s){var l=u.search(/\S/),f=r.from+u.indexOf(s),d=f+s.length;if(Wf(r.from,r.to,n.doc).filter((function(t){return t.mark.type.excluded.find((function(n){return n===e.type&&n!==t.mark.type}))})).filter((function(e){return e.to>f})).length)return null;d<r.to&&a.delete(d,r.to),f>r.from&&a.delete(r.from+l,f),c=r.from+l+s.length,a.addMark(r.from+l,c,e.type.create(i||{})),a.removeStoredMark(e.type)}}}))]},addProseMirrorPlugins:function(){var e,t=[];return this.options.autolink&&t.push(Pv({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new Aa({key:new Ma("handleClickLink"),props:{handleClick:function(t,n,r){var o,i=Uf(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href)&&(window.open(i.href,i.target),!0)}}}))),this.options.linkOnPaste&&t.push(function(e){return new Aa({key:new Ma("handlePasteLink"),props:{handlePaste:function(t,n,r){if(t.state.selection.empty)return!1;var o="";r.content.forEach((function(e){o+=e.textContent}));var i=Fv(o).find((function(e){return e.isLink&&e.value===o}));return!(!o||!i)&&(e.editor.commands.setMark(e.type,{href:i.href}),!0)}}})}({editor:this.editor,type:this.type})),t}}),Iv=Kf.create({name:"paragraph",priority:1e3,addOptions:function(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML:function(){return[{tag:"p"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["p",Il(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setParagraph:function(){return function(t){return t.commands.setNode(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-0":function(){return e.editor.commands.setParagraph()}}}}),zv=Kf.create({name:"doc",topNode:!0,content:"block+"}),Uv=/^\s*>\s$/,Vv=Kf.create({name:"blockquote",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML:function(){return[{tag:"blockquote"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["blockquote",Il(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setBlockquote:function(){return function(t){return t.commands.wrapIn(e.name)}},toggleBlockquote:function(){return function(t){return t.commands.toggleWrap(e.name)}},unsetBlockquote:function(){return function(t){return t.commands.lift(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-b":function(){return e.editor.commands.toggleBlockquote()}}},addInputRules:function(){return[(e={find:Uv,type:this.type},new Kl({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Vl(e.getAttributes,void 0,o)||{},a=n.tr.delete(r.from,r.to),s=a.doc.resolve(r.from).blockRange(),u=s&&zi(s,e.type,i);if(!u)return null;a.wrap(s,u);var c=a.doc.resolve(r.from-1).nodeBefore;c&&c.type===e.type&&Gi(a.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(o,c))&&a.join(r.from-1)}}))];var e}});var $v=["title","titleId"];function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hv.apply(this,arguments)}function qv(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Wv(e,t){var n=e.title,r=e.titleId,o=qv(e,$v);return a.createElement("svg",Hv({id:"loader-1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"40px",height:"40px",viewBox:"0 0 50 50",style:{enableBackground:"new 0 0 50 50"},xmlSpace:"preserve",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Bv||(Bv=a.createElement("path",{d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"},a.createElement("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"}))))}var Yv,Gv=a.forwardRef(Wv),Kv=(n.p,function(e){var t,n,r,i,s,u=Object(a.useContext)(D),c=u.member,l=u.postId,d=u.dispatchAction,h=u.avatarSaturation,v=Object(a.useState)(!(!e.isReply&&!e.isEdit)),m=Object(E.a)(v,2),y=m[0],g=m[1],b=Object(a.useRef)(null),k=Object(a.useState)("default"),w=Object(E.a)(k,2),x=w[0],O=w[1],C=Object(a.useState)(!1),j=Object(E.a)(C,2),_=j[0],A=j[1],N=e.comment,T=e.commentsCount,M=null!==(t=null===c||void 0===c?void 0:c.name)&&void 0!==t?t:null===N||void 0===N||null===(n=N.member)||void 0===n?void 0:n.name,F=null!==(r=null===c||void 0===c?void 0:c.bio)&&void 0!==r?r:null===N||void 0===N||null===(i=N.member)||void 0===i?void 0:i.bio,R=null;"sending"===x?R=Object(S.jsx)(Gv,{className:"w-[24px] h-[24px] fill-white"}):"sent"===x&&(R=null),s=e.isReply?{placeholder:"Reply to comment",autofocus:!0}:e.isEdit?{placeholder:"Edit this comment",autofocus:!1,content:e.comment.html}:{placeholder:0===T?"Be first to start the conversation":"Join the discussion",autofocus:!1};var P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(a.useState)(null),r=Object(E.a)(n,2),o=r[0],i=r[1],s=ch();return Object(a.useEffect)((function(){var t=!0,n=new rh(e);return i(n),n.on("transaction",(function(){requestAnimationFrame((function(){requestAnimationFrame((function(){t&&s()}))}))})),function(){n.destroy(),t=!1}}),t),o}(Object(o.a)({},function(e){var t=e.placeholder,n=e.autofocus,r=void 0!==n&&n,o=e.content,i=void 0===o?"":o;return{extensions:[zv,fh,Iv,Lv.configure({openOnClick:!1}),lh.configure({placeholder:t}),Vv.configure({})],content:i,autofocus:r,editorProps:{attributes:{class:"gh-comment-content focus:outline-0"}},parseOptions:{preserveWhitespace:"full"}}}(s))),B=function(){for(var e=-100,t=b.current,n=t.ownerDocument.defaultView;n!==window;)for(var r=n.parent,o=0;o<r.frames.length;o++)if(r.frames[o]===n){var i,a=Object(ze.a)(r.document.getElementsByTagName("iframe"));try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s.contentWindow===n)e+=s.getBoundingClientRect().top+n.pageYOffset}}catch(u){a.e(u)}finally{a.f()}n=r;break}return t.getBoundingClientRect().top+window.pageYOffset+e},L=Object(a.useCallback)((function(){M||e.isEdit?g(!0):(A(!0),P.commands.blur(),d("openPopup",{type:"addDetailsDialog",callback:function(t){t?P.commands.focus():e.close&&e.close(),A(!1)}}))}),[P,d,M,e]);Object(a.useEffect)((function(){var t;if(P)return e.isReply&&(t=setTimeout((function(){window.scrollTo({top:B(),left:0,behavior:"smooth"})}),100)),e.isEdit?(P.chain().focus().command((function(e){var t=e.tr;return e.commands.setTextSelection({from:t.doc.content.size,to:t.doc.content.size})})).run(),function(){t&&clearTimeout(t)}):function(){t&&clearTimeout(t)}}),[P,e]);var I=Object(a.useCallback)(p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!P.isEmpty){t.next=2;break}return t.abrupt("return");case 2:if(O("sending"),!e.isReply){t.next=17;break}return t.prev=4,t.next=7,d("addReply",{parent:e.parent,reply:{post_id:l,status:"published",html:P.getHTML()}});case 7:P.chain().clearContent().blur().run(),O("sent"),e.close(),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(4),console.error(t.t0);case 15:t.next=35;break;case 17:if(!e.isEdit){t.next=24;break}return t.next=20,d("editComment",{comment:{id:e.comment.id,html:P.getHTML()},parent:e.parent});case 20:O("sent"),e.close(),t.next=35;break;case 24:return t.prev=24,t.next=27,d("addComment",{post_id:l,status:"published",html:P.getHTML()});case 27:P.chain().clearContent().blur().run(),g(!1),O("sent"),t.next=35;break;case 32:t.prev=32,t.t1=t.catch(24),console.error(t.t1);case 35:return t.abrupt("return",!1);case 36:case"end":return t.stop()}}),t,null,[[4,12],[24,32]])}))),[P,e,d,l]);Object(a.useEffect)((function(){if(P){P.on("focus",(function(){L()})),P.on("blur",(function(){null!==P&&void 0!==P&&P.isEmpty&&(g(!1),e.isReply&&e.close&&!_&&e.close())}));var t=function(t){if(t.metaKey)"Escape"===t.key&&null!==P&&void 0!==P&&P.isFocused&&I();else{if("Escape"!==t.key)return"c"!==t.key||e.isEdit||e.isReply||null!==P&&void 0!==P&&P.isFocused?void 0:(null===P||void 0===P||P.commands.focus(),void window.scrollTo({top:B(),left:0,behavior:"smooth"}));null!==P&&void 0!==P&&P.isFocused&&!_&&(e.close?e.close():null===P||void 0===P||P.commands.blur())}};return window.addEventListener("keydown",t,{passive:!0}),function(){window.removeEventListener("keydown",t,{passive:!0}),null===P||void 0===P||P.off("focus"),null===P||void 0===P||P.off("blur")}}}),[P,e,L,_,I]);var z,U=function(e){P.isFocused&&e.preventDefault()},V=function(e){P.isFocused&&e.stopPropagation()},$=function(e,t){var n;e.preventDefault(),A(!0),d("openPopup",{type:"addDetailsDialog",bioAutofocus:null!==(n=t.bioAutofocus)&&void 0!==n&&n,callback:function(){null===P||void 0===P||P.commands.focus(),A(!1)}})};z=e.isReply?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{className:"hidden sm:inline",children:"Add "}),Object(S.jsx)("span",{className:"capitalize sm:normal-case",children:"reply"})]}):e.isEdit?"Save":Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{className:"hidden sm:inline",children:"Add "}),Object(S.jsx)("span",{className:"capitalize sm:normal-case",children:"comment"})]}),"sending"===x&&(z=null);var H=nr()&&e.isReply||nr()&&e.isEdit,q=e.isReply||e.isEdit||y||_;return Object(S.jsx)(S.Fragment,{children:Object(S.jsx)("form",{ref:b,onClick:function(e){P.isFocused||P.commands.focus()},onMouseDown:U,onTouchStart:U,className:"\n transition duration-200\n pt-3 pb-2 px-3\n -mt-[12px] -mr-3 mb-10 -ml-[12px]\n rounded-md\n ".concat(!T&&!e.isEdit&&!e.isReply&&"mt-0 ml-0 mr-0","\n ").concat(q?"cursor-default":"cursor-pointer","\n ").concat(!e.isReply&&!e.isEdit&&"-mt-[4px]","\n ").concat((e.isReply||e.isEdit)&&"-mt-[16px]","\n ").concat(H&&"pl-1","\n "),children:Object(S.jsxs)("div",{className:"w-full relative",children:[Object(S.jsx)("div",{className:"pr-[1px] font-sans leading-normal dark:text-neutral-300",children:Object(S.jsxs)("div",{className:"transition-[padding] duration-150 delay-100 relative w-full pl-[52px] ".concat(H&&"pl-0"," ").concat(q&&"pt-[64px]"),children:[Object(S.jsx)("div",{className:"\n transition-all duration-150 delay-100\n w-full px-3 py-4\n bg-transparent dark:bg-[rgba(255,255,255,0.08)]\n rounded-md border-none border border-slate-50 dark:border-none\n font-sans text-[16.5px] leading-normal dark:text-neutral-300 \n focus:outline-0\n shadow-form hover:shadow-formxl dark:shadow-transparent\n ".concat(0===T&&"placeholder:text-neutral-700","\n ").concat(q?"cursor-text min-h-[144px] pb-[68px] pt-2":"cursor-pointer overflow-hidden min-h-[48px] hover:border-slate-300","\n ").concat(e.isEdit&&"cursor-text","\n ").concat(!M&&"pointer-events-none","\n "),children:Object(S.jsx)(ah,{onMouseDown:V,onTouchStart:V,editor:P})}),Object(S.jsxs)("div",{className:" absolute right-[9px] bottom-[9px] flex space-x-4 transition-[opacity] duration-150 ",children:[(e.isEdit||e.isReply)&&Object(S.jsx)("button",{type:"button",onClick:e.close,className:"font-sans text-sm font-medium ml-2.5 text-neutral-500 dark:text-neutral-400",children:"Cancel"}),Object(S.jsxs)("button",{className:"\n flex items-center justify-center w-auto sm:w-32 h-[39px]\n transition-[opacity] duration-150\n bg-neutral-900 dark:bg-[rgba(255,255,255,0.9)]\n rounded-[6px] border\n py-2 px-3\n text-sm text-center font-sans font-semibold\n text-white dark:text-neutral-800\n ",type:"button",onClick:I,children:[Object(S.jsx)("span",{children:R}),z&&Object(S.jsx)("span",{children:z})]})]})]})}),Object(S.jsxs)("div",{className:"absolute top-1 left-0 flex justify-start items-center h-12",children:[Object(S.jsx)("div",{className:"mr-3",children:Object(S.jsx)(mo,{comment:N,saturation:h,className:"pointer-events-none"})}),Object(S.jsx)("div",{children:Object(S.jsxs)(co,{show:q,enter:"transition duration-500 delay-100 ease-in-out",enterFrom:"opacity-0 -translate-x-2",enterTo:"opacity-100 translate-x-0",leave:"transition-none duration-0",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:[Object(S.jsx)("button",{className:"text-[17px] font-sans font-bold tracking-tight text-[rgb(23,23,23)] dark:text-[rgba(255,255,255,0.85)]",onClick:function(e){$(e,{bioAutofocus:!1})},children:M||"Anonymous"}),Object(S.jsx)("div",{className:"flex items-baseline",children:Object(S.jsx)("button",{className:"transition duration-150 font-sans text-[14px] tracking-tight text-neutral-400 hover:text-neutral-500 dark:text-[rgba(255,255,255,0.5)] ".concat(!F&&"text-neutral-300 hover:text-neutral-400"),onClick:function(e){$(e,{bioAutofocus:!0})},children:F||"Add your bio"})})]})})]})]})})})}),Jv=["title","titleId"];function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qv.apply(this,arguments)}function Xv(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Zv(e,t){var n=e.title,r=e.titleId,o=Xv(e,Jv);return a.createElement("svg",Qv({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"black",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Yv||(Yv=a.createElement("path",{d:"M8.00025 13.8739L2.46073 8.09636C1.97388 7.60989 1.65255 6.98248 1.54231 6.30312C1.43208 5.62376 1.53853 4.92694 1.84658 4.31148V4.31148C2.07887 3.84703 2.41819 3.44443 2.83659 3.13684C3.25499 2.82925 3.74049 2.62547 4.25308 2.54231C4.76567 2.45914 5.29069 2.49896 5.78488 2.65849C6.27906 2.81802 6.72827 3.09269 7.09549 3.45987L8.00025 4.36406L8.90502 3.45987C9.27224 3.09269 9.72145 2.81802 10.2156 2.65849C10.7098 2.49896 11.2348 2.45914 11.7474 2.54231C12.26 2.62547 12.7455 2.82925 13.1639 3.13684C13.5823 3.44443 13.9216 3.84703 14.1539 4.31148C14.4616 4.9267 14.5678 5.62311 14.4577 6.30208C14.3476 6.98105 14.0267 7.60817 13.5404 8.09462L8.00025 13.8739Z",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})))}var em=a.forwardRef(Zv);n.p;var tm,nm=function(e){var t=Object(a.useContext)(D),n=t.dispatchAction,r=t.member,o=t.commentsEnabled,i=Object(a.useState)(""),s=Object(E.a)(i,2),u=s[0],c=s[1],l="paid"===o,f=r&&!!r.paid,d=r&&(f||!l),p=d?"button":"span",h="cursor-pointer";return d||(h="cursor-text"),Object(S.jsxs)(p,{className:"group transition-all duration-50 ease-linear flex font-sans items-center text-sm outline-0 ".concat(e.comment.liked?"text-neutral-900 dark:text-[rgba(255,255,255,0.9)]":"text-neutral-400 dark:text-[rgba(255,255,255,0.5)]"," ").concat(!e.comment.liked&&d&&"hover:text-neutral-600"," ").concat(h),onClick:function(){d&&(e.comment.liked?n("unlikeComment",e.comment):(n("likeComment",e.comment),c("animate-heartbeat"),setTimeout((function(){c("")}),400)))},children:[Object(S.jsx)(em,{className:u+" mr-[6px] ".concat(e.comment.liked?"fill-neutral-900 stroke-neutral-900 dark:fill-white dark:stroke-white":"stroke-neutral-400 dark:stroke-[rgba(255,255,255,0.5)"," ").concat(!e.comment.liked&&d&&"group-hover:stroke-neutral-600"," transition duration-50 ease-linear")}),e.comment.likes_count]})},rm=["title","titleId"];function om(){return om=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},om.apply(this,arguments)}function im(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function am(e,t){var n=e.title,r=e.titleId,o=im(e,rm);return a.createElement("svg",om({width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"black",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,tm||(tm=a.createElement("path",{d:"M7.17463 2.98741C7.17439 2.7888 7.11434 2.59487 7.00229 2.43088C6.89025 2.26689 6.73141 2.14046 6.54647 2.06805C6.36153 1.99564 6.15907 1.98061 5.96546 2.02492C5.77186 2.06923 5.5961 2.17083 5.46107 2.31648L1.86192 6.21418C1.69351 6.39677 1.60001 6.63606 1.60001 6.88445C1.60001 7.13284 1.69351 7.37213 1.86192 7.55472L5.45909 11.4524C5.59412 11.5981 5.76988 11.6997 5.96349 11.744C6.15709 11.7883 6.35955 11.7733 6.54449 11.7009C6.72943 11.6284 6.88827 11.502 7.00032 11.338C7.11236 11.174 7.17242 10.9801 7.17265 10.7815V8.86164H9.12703C10.438 8.86164 11.6953 9.38241 12.6222 10.3094C13.5492 11.2364 14.07 12.4937 14.07 13.8046V9.85023C14.07 8.53927 13.5492 7.28201 12.6222 6.35502C11.6953 5.42803 10.438 4.90726 9.12703 4.90726H7.17265L7.17463 2.98741Z",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})))}var sm=a.forwardRef(am);n.p;var um,cm,lm,fm=function(e){return Object(a.useContext)(D).member?Object(S.jsxs)("button",{disabled:!!e.disabled,className:"group transition-all duration-50 ease-linear flex font-sans items-center text-sm outline-0 ".concat(e.isReplying?"text-neutral-900 dark:text-[rgba(255,255,255,0.9)]":"text-neutral-400 dark:text-[rgba(255,255,255,0.5)] hover:text-neutral-600"),onMouseDown:function(e){e.preventDefault()},onClick:e.toggleReply,children:[Object(S.jsx)(sm,{className:"mr-[6px] ".concat(e.isReplying?"fill-neutral-900 stroke-neutral-900 dark:fill-white dark:stroke-white":"stroke-neutral-400 dark:stroke-[rgba(255,255,255,0.5)] group-hover:stroke-neutral-600"," transition duration-50 ease-linear")}),"Reply"]}):null},dm=function(e){var t=Object(a.useContext)(D).dispatchAction,n="published"!==e.comment.status;return Object(S.jsx)("div",{className:"flex flex-col",children:n?Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(n){t("showComment",e.comment),e.close()},children:[Object(S.jsx)("span",{children:"Show "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]}):Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(n){t("hideComment",e.comment),e.close()},children:[Object(S.jsx)("span",{children:"Hide "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]})})},pm=function(e){var t=Object(a.useContext)(D).dispatchAction;return Object(S.jsxs)("div",{className:"flex flex-col",children:[Object(S.jsx)("button",{className:"w-full mb-3 text-left text-[14px]",onClick:e.toggleEdit,disabled:e.disableEditing,children:"Edit"}),Object(S.jsx)("button",{className:"w-full text-left text-[14px] text-red-600",onClick:function(n){t("deleteComment",e.comment),e.close()},children:"Delete"})]})},hm=function(e){var t=Object(a.useContext)(D).dispatchAction;return Object(S.jsx)("div",{className:"flex flex-col",children:Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(){t("openPopup",{type:"reportDialog",comment:e.comment}),e.close()},children:[Object(S.jsx)("span",{children:"Report "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]})})},vm=function(e){var t,n=Object(a.useContext)(D),r=n.member,o=n.admin,i=e.comment,s=r&&(null===(t=i.member)||void 0===t?void 0:t.uuid)===(null===r||void 0===r?void 0:r.uuid),u=!!o,c=Object(a.useRef)();Object(a.useEffect)((function(){var t,n,r=function(){e.close()};window.addEventListener("click",r,{passive:!0});var o=null===(t=c.current)||void 0===t||null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;return o&&o!==window&&o.addEventListener("click",r,{passive:!0}),function(){window.removeEventListener("click",r,{passive:!0}),o&&o!==window&&o.removeEventListener("click",r,{passive:!0})}}),[e]),Object(a.useEffect)((function(){var t=function(t){"Escape"===t.key&&e.close()};return window.addEventListener("keydown",t,{passive:!0}),function(){window.removeEventListener("keydown",t,{passive:!0})}}));var l=null;if("published"===i.status)l=s?Object(S.jsx)(pm,{comment:i,close:e.close,toggleEdit:e.toggleEdit,disableEditing:e.disableEditing}):u?Object(S.jsx)(dm,{comment:i,close:e.close}):Object(S.jsx)(hm,{comment:i,close:e.close});else{if(!u)return null;l=Object(S.jsx)(dm,{comment:i,close:e.close})}return Object(S.jsx)("div",{ref:c,onClick:function(e){e.stopPropagation()},children:Object(S.jsx)("div",{className:"min-w-min sm:min-w-[150px] bg-white absolute font-sans rounded py-3 pl-4 pr-8 shadow-lg text-sm whitespace-nowrap z-10 dark:bg-zinc-900 dark:text-white outline-0",children:l})})},mm=["title","titleId"];function ym(){return ym=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ym.apply(this,arguments)}function gm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function bm(e,t){var n=e.title,r=e.titleId,o=gm(e,mm);return a.createElement("svg",ym({width:16,height:16,viewBox:"0 0 16 16",fill:"black",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,um||(um=a.createElement("path",{d:"M3 12C3.82843 12 4.5 11.3284 4.5 10.5C4.5 9.67157 3.82843 9 3 9C2.17157 9 1.5 9.67157 1.5 10.5C1.5 11.3284 2.17157 12 3 12Z"})),cm||(cm=a.createElement("path",{d:"M8 12C8.82843 12 9.5 11.3284 9.5 10.5C9.5 9.67157 8.82843 9 8 9C7.17157 9 6.5 9.67157 6.5 10.5C6.5 11.3284 7.17157 12 8 12Z"})),lm||(lm=a.createElement("path",{d:"M13 12C13.8284 12 14.5 11.3284 14.5 10.5C14.5 9.67157 13.8284 9 13 9C12.1716 9 11.5 9.67157 11.5 10.5C11.5 11.3284 12.1716 12 13 12Z"})))}var km=a.forwardRef(bm),wm=(n.p,function(e){var t=Object(a.useState)(!1),n=Object(E.a)(t,2),r=n[0],o=n[1],i=Object(a.useContext)(D),s=i.member,u=i.admin,c=e.comment,l=!!s&&"published"===c.status||!!u;return s?Object(S.jsxs)("div",{className:"relative",children:[l?Object(S.jsx)("button",{onClick:function(){o((function(e){return!e}))},className:"outline-0",children:Object(S.jsx)(km,{className:"transition duration-50 ease-linear gh-comments-icon gh-comments-icon-more outline-0 fill-neutral-400 dark:fill-rgba(255,255,255,0.5) hover:fill-neutral-600"})}):null,r?Object(S.jsx)(vm,{comment:c,close:function(){o(!1)},toggleEdit:e.toggleEdit,disableEditing:e.disableEditing}):null]}):null}),xm=function(e){var t=e.loadMore,n=e.count;return Object(S.jsxs)("button",{className:"group w-full text-neutral-700 font-semibold px-0 pt-0 pb-3 mt-10 sm:mt-0 mb-10 font-sans text-md text-left dark:text-white flex items-center ",onClick:t,children:[Object(S.jsxs)("span",{className:"whitespace-nowrap mr-4",children:["\u2193 Show ",n," more replies"]}),Object(S.jsx)("span",{className:"transition-[background-color] duration-200 ease-out inline-block w-full bg-neutral-100 dark:bg-[rgba(255,255,255,0.08)] group-hover:bg-neutral-200 rounded h-[2px] mt-[3px]"})]})},Om=function(e){var t=e.comment,n=Object(a.useState)([]),r=Object(E.a)(n,2),o=r[0],i=r[1];Object(a.useEffect)((function(){i((function(e){return 0===e.length?t.replies.slice(0,3):t.replies.slice(0,t.replies.length)}))}),[t.replies]);var s=t.replies.length-o.length;return Object(S.jsxs)("div",{children:[o.map((function(e){return Object(S.jsx)(Sm,{comment:e,parent:t,isReply:!0},e.id)})),!!s&&Object(S.jsx)(xm,{count:s,loadMore:function(){var e=o.length+5;i(t.replies.slice(0,e))}})]})},Em=["updateIsEditing","isEditing"];function Dm(e){return e.comment.edited_at?Object(S.jsxs)("div",{children:[Object(S.jsx)("span",{className:"mx-[0.3em]",children:"\xb7"}),"Edited"]}):null}var Sm=function(e){var t,n=e.updateIsEditing,r=void 0===n?null:n,o=e.isEditing,s=i(e,Em),u=Object(a.useState)(!1),c=Object(E.a)(u,2),l=c[0],f=c[1],d=Object(a.useState)(!1),p=Object(E.a)(d,2),h=p[0],v=p[1];Object(a.useEffect)((function(){null===r||void 0===r||r(h||l)}),[r,h,l]);var m,y=Object(a.useContext)(D),g=y.admin,b=y.avatarSaturation,k=y.member,w=y.commentsEnabled,x=s.comment,O=x.replies&&x.replies.length>0,C="published"!==x.status,j={__html:x.html};C&&(m=g&&"hidden"===x.status?"This comment has been hidden.":"This comment has been removed.");var _="paid"===w,A=k&&!!k.paid,N=k&&(A||!_),T=k&&x.member&&x.member.uuid===k.uuid?k.bio:null===x||void 0===x||null===(t=x.member)||void 0===t?void 0:t.bio;return l?Object(S.jsx)(Kv,{comment:x,close:function(){f(!1)},parent:s.parent,isEdit:!0}):Object(S.jsxs)(co,{appear:!0,show:!0,enter:"transition-opacity duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:[Object(S.jsx)("div",{className:"flex flex-row ".concat(O?"mb-2 sm:mb-4":"mb-6 sm:mb-10"),children:Object(S.jsxs)("div",{children:[Object(S.jsxs)("div",{className:"flex items-center mb-2 h-12",children:[Object(S.jsx)("div",{className:"mr-3",children:Object(S.jsx)(mo,{comment:x,saturation:b,isBlank:C})}),C?Object(S.jsx)("div",{children:Object(S.jsx)("p",{className:"font-sans text-[16px] leading-normal text-neutral-400 italic mt-[4px]",children:m})}):Object(S.jsxs)("div",{children:[Object(S.jsx)("h4",{className:"text-[17px] font-sans font-bold tracking-tight text-[rgb(23,23,23] dark:text-[rgba(255,255,255,0.85)]",children:x.member?x.member.name?x.member.name:"Anonymous":"Deleted member"}),Object(S.jsxs)("div",{className:"flex items-baseline font-sans text-[14px] tracking-tight text-neutral-400 dark:text-[rgba(255,255,255,0.5)]",children:[T&&Object(S.jsxs)("div",{children:[T,Object(S.jsx)("span",{className:"mx-[0.3em]",children:"\xb7"})]}),Object(S.jsx)("div",{title:er(x.created_at),children:Zn(x.created_at)}),Object(S.jsx)(Dm,{comment:x})]})]})]}),!C&&Object(S.jsx)("div",{className:"ml-12 sm:ml-[52px] mb-2 pr-4 font-sans leading-normal text-neutral-900 dark:text-[rgba(255,255,255,0.85)]",children:Object(S.jsx)("p",{dangerouslySetInnerHTML:j,className:"gh-comment-content text-[16px] leading-normal"})}),Object(S.jsxs)("div",{className:"ml-12 sm:ml-[52px] flex gap-5 items-center",children:[!C&&Object(S.jsx)(nm,{comment:x}),!C&&N&&(C||!s.parent)&&Object(S.jsx)(fm,{disabled:!!o,comment:x,toggleReply:function(){v((function(e){return!e}))},isReplying:h}),Object(S.jsx)(wm,{comment:x,toggleEdit:function(){f((function(e){return!e}))},disableEditing:o})]})]})}),O&&Object(S.jsx)("div",{className:"ml-11 sm:ml-14 mt-8 sm:mt-10 mb-4 sm:mb-0",children:Object(S.jsx)(Om,{comment:x})}),Object(S.jsx)(co,{show:h,enter:"transition duration-500 delay-50 ease-in-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-none duration-0",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"ml-14 my-10",children:Object(S.jsx)(Kv,{parent:x,close:function(){v(!1)},isReply:!0})})})]})},Cm=function(e){var t=Object(a.useContext)(D),n=t.pagination,r=t.dispatchAction;if(!n)return null;var o=n.total-n.page*n.limit;return o<=0?null:Object(S.jsxs)("button",{className:"group w-full text-neutral-700 font-semibold px-0 pt-0 pb-2 mb-10 font-sans text-md text-left dark:text-white flex items-center ",onClick:function(){r("loadMoreComments")},children:[Object(S.jsxs)("span",{className:"whitespace-nowrap mr-4",children:["\u2191 Show ",o," previous comments"]}),Object(S.jsx)("span",{className:"transition-[background-color] duration-200 ease-out inline-block w-full bg-neutral-100 group-hover:bg-neutral-200 dark:bg-[rgba(255,255,255,0.05)] rounded h-[2px] mt-[3px]"})]})},jm=function(e){var t={backgroundColor:Object(a.useContext)(D).accentColor},n=e.isFirst?"Be first to start the conversation":"Want to join the discussion?";return Object(S.jsxs)("section",{className:"flex flex-col items-center mb-1 pt-12 pb-12 px-8 border-t-2 border-gray-100 dark:border-gray-100/10 "+(e.isFirst&&" border-b-2"),children:[Object(S.jsx)("h1",{className:"text-center text-black text-[22px] font-sans mb-4 tracking-tight dark:text-[rgba(255,255,255,0.85)]"+(e.isFirst?"font-semibold":"font-bold"),children:n}),Object(S.jsx)("button",{onClick:function(e){window.location.href="#/portal/signup"},className:"text-white font-sans py-3 px-5 mb-4 rounded inline-block font-medium leading-none hover:opacity-90 transition-all",style:t,children:"Choose a plan"}),Object(S.jsx)("p",{className:"text-sm font-sans text-center text-neutral-400 dark:text-[rgba(255,255,255,0.5)] max-w-xs",children:"You need to be subscribed to a paid plan to be able to join the discussion."})]})};var _m,Am,Nm=function(){return Object(S.jsx)("div",{className:"flex items-center justify-center w-full h-32",children:Object(S.jsx)(Gv,{className:"w-12 h-12 mb-6 fill-[rgb(225,225,225,0.9)] dark:fill-[rgba(255,255,255,0.6)]"})})},Tm="ghost-comments-root",Mm=function(e){var t=e.title,n=e.showCount,r=e.count;if(!t&&!n&&null!==t)return null;var o=function(e){var t=e.title;return null===t?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{className:"hidden sm:inline",children:"Member "}),Object(S.jsx)("span",{className:"capitalize sm:normal-case",children:"discussion"})]}):t},i=function(e){var t=e.showCount,n=e.count;return t?Object(S.jsxs)("div",{className:"text-neutral-400 text-[1.6rem]",children:[n," comments"]}):null};return Object(S.jsxs)("div",{className:"w-full flex justify-between items-baseline font-sans mb-10",children:[Object(S.jsx)("h2",{className:"font-bold text-[2.8rem] tracking-tight dark:text-[rgba(255,255,255,0.85)]",children:Object(S.jsx)(o,{title:t})}),Object(S.jsx)(i,{showCount:n,count:r})]})},Fm=function(e){var t=Object(a.useState)(!1),n=Object(E.a)(t,2),r=n[0],o=n[1],i=Object(a.useContext)(D),s=i.pagination,u=i.member,c=i.comments,l=i.commentsEnabled,f=i.title,d=i.showCount,p=c.slice().reverse().map((function(e){return Object(S.jsx)(Sm,{isEditing:r,comment:e,updateIsEditing:o},e.id)})),h=(null===s||void 0===s?void 0:s.total)||0,v="paid"===l,m=u&&!!u.paid;return Object(a.useEffect)((function(){var e=document.getElementById(Tm);e&&"#ghost-comments"===window.location.hash&&0===window.scrollY&&requestAnimationFrame((function(){requestAnimationFrame((function(){e.scrollIntoView()}))}))}),[]),Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(Mm,{title:f,showCount:d,count:h}),Object(S.jsx)(Cm,{}),Object(S.jsx)("div",{className:s?"":"mt-4",children:h>0&&p}),Object(S.jsx)("div",{children:r?null:u?m||!v?Object(S.jsx)(Kv,{commentsCount:h}):Object(S.jsx)(jm,{isFirst:0===h}):Object(S.jsx)(ar,{isFirst:0===h})})]})},Rm=function(e){var t=function(e,t,n){var r=[e,t,n].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*r[0]+.7152*r[1]+.0722*r[2]},n=Object(a.useContext)(D),r=n.accentColor,o=n.colorScheme,i=function(){if("light"===o)return!1;if("dark"===o)return!0;var e=getComputedStyle(document.getElementById(Tm).parentNode).getPropertyValue("color"),n=e.substring(e.indexOf("(")+1,e.lastIndexOf(")")).split(/,\s*/);return function(e,n){var r=t(e[0],e[1],e[2]),o=t(n[0],n[1],n[2]);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}([255,255,255],[n[0],n[1],n[2]])<5}()?"dark":"",s={"--gh-accent-color":null!==r&&void 0!==r?r:"blue",paddingTop:0,paddingBottom:24};return Object(S.jsx)("section",{className:"ghost-display "+i,style:s,children:e.done?Object(S.jsx)(S.Fragment,{children:Object(S.jsx)(Fm,{})}):Object(S.jsx)(Nm,{})})},Pm=["title","titleId"];function Bm(){return Bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bm.apply(this,arguments)}function Lm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Im(e,t){var n=e.title,r=e.titleId,o=Lm(e,Pm);return a.createElement("svg",Bm({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"gh-portal-closeicon",alt:"Close",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,_m||(_m=a.createElement("defs",null,a.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.2px !important;}"))),Am||(Am=a.createElement("path",{className:"a",d:"M.75 23.249l22.5-22.5M23.25 23.249L.75.749"})))}var zm,Um=a.forwardRef(Im),Vm=(n.p,function(e){return Object(S.jsx)("button",{className:"transition-opacity duration-100 ease-out absolute top-[36px] sm:top-10 right-8 sm:right-10 opacity-20 hover:opacity-40",onClick:e.close,children:Object(S.jsx)(Um,{className:"w-[20px] h-[20px]"})})}),$m=function(e){var t,n,r=Object(a.useRef)(null),o=Object(a.useRef)(null),i=Object(a.useContext)(D),s=i.dispatchAction,u=i.member,c=Object(a.useState)(null!==(t=u.name)&&void 0!==t?t:""),l=Object(E.a)(c,2),d=l[0],h=l[1],v=Object(a.useState)(null!==(n=u.bio)&&void 0!==n?n:""),m=Object(E.a)(v,2),y=m[0],g=m[1],b=50;u.bio&&(b-=u.bio.length);var k=Object(a.useState)(b),w=Object(E.a)(k,2),x=w[0],O=w[1],C=Object(a.useState)({name:"",bio:""}),j=Object(E.a)(C,2),_=j[0],A=j[1],N=function(t){s("closePopup"),e.callback(t)},T=function(){var e=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""===d.trim()){e.next=6;break}return e.next=3,s("updateMember",{name:d,bio:y});case 3:N(!0),e.next=9;break;case 6:A({name:"Enter your name"}),h(""),null===(t=r.current)||void 0===t||t.focus();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(a.useEffect)((function(){var t=setTimeout((function(){var t,n;e.bioAutofocus?null===(t=o.current)||void 0===t||t.focus():null===(n=r.current)||void 0===n||n.focus()}),200);return function(){clearTimeout(t)}}),[r]),Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("h1",{className:"font-sans font-bold tracking-tight text-[24px] mb-3 text-black",children:"Add to your profile"}),Object(S.jsx)("p",{className:"font-sans text-[1.45rem] text-neutral-500 px-4 sm:px-8 leading-9",children:"For a healthy discussion, let other members know who you are when commenting."}),Object(S.jsxs)("section",{className:"mt-8 text-left",children:[Object(S.jsxs)("div",{className:"flex flex-row mb-2 justify-between",children:[Object(S.jsx)("label",{htmlFor:"comments-name",className:"font-sans font-medium text-sm",children:"Name"}),Object(S.jsx)(co,{show:!!_.name,enter:"transition duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition duration-100 ease-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"font-sans text-sm text-red-500",children:_.name})})]}),Object(S.jsx)("input",{id:"comments-name",className:"transition-[border-color] duration-200 font-sans px-3 rounded border border-neutral-200 focus:border-neutral-300 w-full outline-0 h-[42px] flex items-center ".concat(_.name&&"border-red-500 focus:border-red-500"),type:"text",name:"name",ref:r,value:d,placeholder:"Jamie Larson",onChange:function(e){h(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&(h(e.target.value),T())},maxLength:"64"}),Object(S.jsxs)("div",{className:"flex flex-row mt-4 mb-2 justify-between",children:[Object(S.jsx)("label",{htmlFor:"comments-name",className:"font-sans font-medium text-sm",children:"Bio"}),Object(S.jsxs)("div",{className:"font-sans text-sm text-neutral-400 ".concat(0===x&&"text-red-500"),children:[Object(S.jsx)("b",{children:x})," characters left"]})]}),Object(S.jsx)("input",{id:"comments-bio",className:"transition-[border-color] duration-200 font-sans px-3 rounded border border-neutral-200 focus:border-neutral-300 w-full outline-0 h-[42px] flex items-center ".concat(0===x&&"border-red-500 focus:border-red-500"),type:"text",name:"bio",ref:o,value:y,placeholder:"Head of Marketing at Acme, Inc",onChange:function(e){var t=e.target.value;O(50-t.length),g(t)},onKeyDown:function(e){"Enter"===e.key&&(g(e.target.value),T())},maxLength:50}),Object(S.jsx)("button",{className:"transition-opacity duration-200 ease-linear w-full h-[44px] mt-8 px-8 flex items-center justify-center rounded-md text-white font-sans font-semibold text-[15px] bg-[#3204F5] opacity-100 hover:opacity-90",onClick:T,children:"Save"})]}),Object(S.jsx)(Vm,{close:function(){return N(!1)}})]})},Hm=["title","titleId"];function qm(){return qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qm.apply(this,arguments)}function Wm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ym(e,t){var n=e.title,r=e.titleId,o=Wm(e,Hm);return a.createElement("svg",qm({width:"26px",height:"26px",viewBox:"-1 -1 26 26",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,zm||(zm=a.createElement("g",{id:"check-circle",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{className:"animated-check-circle",d:"M19.6004116,2.71490714 C17.5353801,1.0196018 14.8927356,0 12,0 C5.38938053,0 0,5.38938053 0,12 C0,18.6106195 5.38938053,24 12,24 C18.6106195,24 24,18.6106195 24,12 C24,9.71681416 23.3628319,7.59292035 22.2743363,5.78761062 L11.0442478,17.0442478 L5.49557522,11.4955752",id:"Shape",stroke:"#FFFFFF",strokeWidth:2}))))}var Gm=a.forwardRef(Ym),Km=(n.p,{addDetailsDialog:$m,reportDialog:function(e){var t=Object(a.useState)("default"),n=Object(E.a)(t,2),r=n[0],o=n[1],i="bg-red-600";"sent"===r&&(i="bg-green-600");var s="Yes";"sending"===r?s="Sending":"sent"===r&&(s="Sent");var u=null;"sending"===r?u=Object(S.jsx)(Gv,{className:"w-[24px] h-[24px] mr-2 fill-white"}):"sent"===r&&(u=Object(S.jsx)(Gm,{className:"w-[16px] h-[16px] mr-2"}));var c=Object(a.useContext)(D).dispatchAction,l=function(e){c("closePopup")};return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("h1",{className:"font-sans font-bold tracking-tight text-[24px] mb-3 text-black",children:"You sure you want to report?"}),Object(S.jsx)("p",{className:"font-sans text-[1.45rem] text-neutral-500",children:"You request will be sent to the owner of this site."}),Object(S.jsxs)("div",{className:"mt-10",children:[Object(S.jsxs)("button",{className:"transition duration-200 ease-linear w-full h-[44px] px-8 flex items-center justify-center rounded-md text-white font-sans font-semibold text-[15px] ".concat(i),onClick:function(t){t.stopPropagation(),o("sending"),setTimeout((function(){o("sent"),c("reportComment",e.comment),setTimeout((function(){l()}),750)}),1e3)},children:[u,s]}),Object(S.jsxs)("p",{className:"font-sans font-medium text-[1.45rem] text-neutral-500 mt-4 -mb-1",children:["No, ",Object(S.jsx)("button",{className:"font-sans underline",onClick:l,children:"I've changed my mind"})]})]})]})}}),Jm=function(e){var t=Object(a.useContext)(D).dispatchAction,n=function(n){t("closePopup"),e.callback&&e.callback(!1)};return Object(a.useEffect)((function(){var e=function(e){"Escape"===e.key&&n()};return window.addEventListener("keydown",e,{passive:!0}),function(){window.removeEventListener("keydown",e,{passive:!0})}})),Object(S.jsx)(co,{show:e.show,appear:!0,children:Object(S.jsx)(A,{type:"fixed",children:Object(S.jsx)("div",{children:Object(S.jsx)(co.Child,{enter:"transition duration-200 linear",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition duration-200 linear",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"fixed top-0 left-0 overflow-hidden w-screen h-screen flex pt-0 sm:pt-12 justify-center bg-gradient-to-b from-[rgba(0,0,0,0.2)] to-rgba(0,0,0,0.1) backdrop-blur-[2px]",onClick:n,children:Object(S.jsx)(co.Child,{enter:"transition duration-200 delay-150 linear",enterFrom:"translate-y-4 opacity-0",enterTo:"translate-y-0 opacity-100",leave:"transition duration-200 linear",leaveFrom:"translate-y-0 opacity-100",leaveTo:"translate-y-4 opacity-0",children:Object(S.jsx)("div",{className:"relative bg-white w-screen sm:w-[500px] h-screen sm:h-auto p-[28px] sm:p-8 rounded-none sm:rounded-xl text-center shadow-modal",onClick:function(e){e.stopPropagation()},children:e.children})})})})})})})},Qm=["type"];function Xm(e){var t=Object(a.useContext)(D).popup,n=Object(a.useState)(t),r=Object(E.a)(n,2),s=r[0],u=r[1];if(Object(a.useEffect)((function(){null!==t&&u(t)}),[t,u]),!s||!s.type)return null;var c=null!==t&&void 0!==t?t:s,l=c.type,f=i(c,Qm),d=Km[l];if(!d)return console.warn("Unknown popup of type ",l),null;var p=t===s;return Object(S.jsx)(Jm,{show:p,callback:f.callback,children:Object(S.jsx)(d,Object(o.a)({},f))})}function Zm(e){var t=e.adminUrl,n=e.onLoad;return Object(S.jsx)("iframe",{"data-frame":"admin-auth",src:t+"auth-frame/",style:{display:"none"},title:"auth-frame",onLoad:n})}function ey(e){var t=e.done;e.appVersion;return Object(S.jsx)(A,{children:Object(S.jsx)(Rm,{done:t})})}function ty(e){var t=e.dsn,n=e.children;return t?Object(S.jsx)(Rn,{children:n}):Object(S.jsx)(S.Fragment,{children:n})}var ny=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),(r=t.call(this,e)).state={action:"init:running",initStatus:"running",member:null,admin:null,comments:null,pagination:null,popupNotification:null,customSiteUrl:e.customSiteUrl,postId:e.postId,popup:null,accentColor:e.accentColor},r.adminApi=null,r.GhostApi=null,r}return m(n,[{key:"initSetup",value:function(){var e=p(f().mark((function e(){var t,n,r,o,i,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetchApiData();case 3:return t=e.sent,n=t.site,r=t.member,e.next=8,this.fetchComments();case 8:o=e.sent,i=o.comments,a=o.pagination,s={site:n,member:r,action:"init:success",initStatus:"success",comments:i,pagination:a},this.setState(s),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error("[Comments] Failed to initialize:",e.t0),this.setState({action:"init:failed",initStatus:"failed"});case 19:case"end":return e.stop()}}),e,this,[[0,15]])})));return function(){return e.apply(this,arguments)}}()},{key:"initAdminAuth",value:function(){var e=p(f().mark((function e(){var t,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.adminApi=this.setupAdminAPI(),t=null,e.prev=3,e.next=6,this.adminApi.getUser();case 6:t=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn("[Comments] Failed to fetch current admin user:",e.t0);case 12:n={admin:t},this.setState(n),e.next=19;break;case 16:e.prev=16,e.t1=e.catch(0),console.error("[Comments] Failed to initialize admin authentication:",e.t1);case 19:case"end":return e.stop()}}),e,this,[[0,16],[3,9]])})));return function(){return e.apply(this,arguments)}}()},{key:"dispatchAction",value:function(){var e=p(f().mark((function e(t,n){var r,o,i=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this.timeoutId),this.setState({action:"".concat(t,":running")}),e.prev=2,e.next=5,Kn({action:t,data:n,state:this.state,api:this.GhostApi,adminApi:this.adminApi});case 5:r=e.sent,this.setState(r),r&&r.action&&!r.action.includes(":failed")&&(this.timeoutId=setTimeout((function(){i.setState({action:""})}),2e3)),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(2),console.error(e.t0),o=Qn({type:"".concat(t,":failed"),autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:e.t0}}),this.setState({action:"".concat(t,":failed"),popupNotification:o});case 15:case"end":return e.stop()}}),e,this,[[2,10]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchApiData",value:function(){var e=p(f().mark((function e(){var t,n,r,o,i,a,s,u;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.siteUrl,r=t.customSiteUrl,o=t.apiUrl,i=t.apiKey,e.prev=1,this.GhostApi=this.props.api||ir({siteUrl:n,apiUrl:o,apiKey:i}),e.next=5,this.GhostApi.init();case 5:return a=e.sent,s=a.site,u=a.member,this.setupSentry({site:s}),e.abrupt("return",{site:s,member:u});case 12:if(e.prev=12,e.t0=e.catch(1),!or(["dev","test"],{customSiteUrl:r})){e.next=16;break}return e.abrupt("return",{});case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,this,[[1,12]])})));return function(){return e.apply(this,arguments)}}()},{key:"fetchComments",value:function(){var e=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.GhostApi.comments.browse({page:1,postId:this.state.postId});case 2:return t=e.sent,e.abrupt("return",{comments:t.comments,pagination:t.meta.pagination});case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setupAdminAPI",value:function(){var e=document.querySelector('iframe[data-frame="admin-auth"]'),t=1,n={},r=new URL(this.props.adminUrl).origin;function i(i,a){return new Promise((function(s,u){n[t+=1]=function(e,t){return e?u(e):s(t)},e.contentWindow.postMessage(JSON.stringify(Object(o.a)({uid:t,action:i},a)),r)}))}return window.addEventListener("message",(function(e){if(e.origin===r){var t=null;try{t=JSON.parse(e.data)}catch(i){return void console.error("Error parsing event data",i)}var o=n[t.uid];o&&(delete n[t.uid],o(t.error,t.result))}})),{getUser:function(){return p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i("getUser");case 2:return t=e.sent,e.abrupt("return",t.users[0]);case 4:case"end":return e.stop()}}),e)})))()},hideComment:function(e){return p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i("hideComment",{id:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()},showComment:function(e){return p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i("showComment",{id:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()}}}},{key:"setupSentry",value:function(e){var t=e.site;if(or(["test"]))return null;var n=t.portal_sentry,r=(t.portal_version,t.version),o="comments@".concat("0.4.0","|ghost@").concat(r);n&&n.dsn&&Pn({dsn:n.dsn,environment:n.env||"development",release:o,beforeSend:function(e){return function(e){var t,n,r,o,i=e.event,a=((null===i||void 0===i||null===(t=i.exception)||void 0===t||null===(n=t.values)||void 0===n||null===(r=n[0])||void 0===r||null===(o=r.stacktrace)||void 0===o?void 0:o.frames)||[]).map((function(e){return e.filename})).filter((function(e){return!!e}));return(a[a.length-1]||"").includes("@tryghost/comments")}({event:e})?e:null},allowUrls:[/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/comments/,/https?:\/\/((cdn)\.)?jsdelivr\.net\/npm\/@tryghost\/comments/]})}},{key:"getContextFromState",value:function(){var e=this,t=this.state,n=t.action,r=t.popupNotification,o=t.customSiteUrl,i=t.member,a=t.comments,s=t.pagination,u=t.postId,c=t.admin,l=t.popup;return{action:n,popupNotification:r,customSiteUrl:o,member:i,admin:c,comments:a,pagination:s,postId:u,title:this.props.title,showCount:this.props.showCount,colorScheme:this.props.colorScheme,avatarSaturation:this.props.avatarSaturation,accentColor:this.props.accentColor,commentsEnabled:this.props.commentsEnabled,appVersion:this.props.appVersion,stylesUrl:this.props.stylesUrl,popup:l,dispatchAction:function(t,n){return e.dispatchAction(t,n)},onAction:function(t,n){return e.dispatchAction(t,n)}}}},{key:"componentDidMount",value:function(){this.initSetup()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"render",value:function(){var e="success"===this.state.initStatus;return Object(S.jsx)(ty,{dsn:this.props.sentryDsn,children:Object(S.jsxs)(D.Provider,{value:this.getContextFromState(),children:[Object(S.jsx)(ey,{done:e}),Object(S.jsx)(Zm,{adminUrl:this.props.adminUrl,onLoad:this.initAdminAuth.bind(this)}),Object(S.jsx)(Xm,{})]})})}}]),n}(s.a.Component),ry=["siteUrl"];function oy(e){e.siteUrl;!function(){var e=document.querySelector("script[data-ghost-comments]");if(e){var t=document.createElement("div");t.id=Tm,e.parentElement.insertBefore(t,e)}else console.warn("[Comments] Comment box location was not found: could not load comments box.")}(),function(){var e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}()}!function(){var e=function(){var e=document.querySelector("script[data-ghost-comments]");if(e){var t=e.dataset.ghostComments,n=e.dataset.key,r=e.dataset.api,o=e.dataset.admin,i=e.dataset.sentryDsn,a=e.dataset.postId,s=e.dataset.colorScheme,u=e.dataset.avatarSaturation,c=e.dataset.accentColor,l=e.dataset.appVersion,f=e.dataset.commentsEnabled;return{siteUrl:t,stylesUrl:e.dataset.styles,apiKey:n,apiUrl:r,sentryDsn:i,postId:a,adminUrl:o,colorScheme:s,avatarSaturation:u,accentColor:c,appVersion:l,commentsEnabled:f,title:"null"===e.dataset.title?null:e.dataset.title,showCount:"true"===e.dataset.count}}return{}}(),t=e.siteUrl,n=i(e,ry),r=t||window.location.origin;oy({siteUrl:r}),c.a.render(Object(S.jsx)(s.a.StrictMode,{children:Object(S.jsx)(ny,Object(o.a)({siteUrl:r,customSiteUrl:t},n))}),document.getElementById(Tm))}()},,,,,,,,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(4),o=n(7),i=n(26),a=n(10),s=n(16);function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return l("",e,t,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400,r=u(e,t);return d(r)>n?c(e,t-1,n):r}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Object(i.a)(),c=Object(r.a)(u,2),d=c[0],p=c[1];if(null===t||["number","boolean","string"].includes(typeof t)&&!Object(o.h)(t))return t;var h=f(e,t);if(!h.startsWith("[object "))return h;if(t.__sentry_skip_normalization__)return t;if(0===n)return h.replace("object ","");if(d(t))return"[Circular ~]";var v=t;if(v&&"function"===typeof v.toJSON)try{var m=v.toJSON();return l("",m,n-1,s,u)}catch(x){}var y=Array.isArray(t)?[]:{},g=0,b=Object(a.b)(t);for(var k in b)if(Object.prototype.hasOwnProperty.call(b,k)){if(g>=s){y[k]="[MaxProperties ~]";break}var w=b[k];y[k]=l(k,w,n-1,s,u),g+=1}return p(t),y}function f(t,n){try{return"domain"===t&&n&&"object"===typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!==typeof e&&n===e?"[Global]":"undefined"!==typeof window&&n===window?"[Window]":"undefined"!==typeof document&&n===document?"[Document]":Object(o.m)(n)?"[SyntheticEvent]":"number"===typeof n&&n!==n?"[NaN]":void 0===n?"[undefined]":"function"===typeof n?"[Function: ".concat(Object(s.b)(n),"]"):"symbol"===typeof n?"[".concat(String(n),"]"):"bigint"===typeof n?"[BigInt: ".concat(String(n),"]"):"[object ".concat(Object.getPrototypeOf(n).constructor.name,"]")}catch(r){return"**non-serializable** (".concat(r,")")}}function d(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}}).call(this,n(21))}]);
2
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=38)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){"use strict";e.exports=n(30)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(14);var o=n(13);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(o.a)(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,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Object(r.a)(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(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return g})),n.d(t,"h",(function(){return y})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return l})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return c})),n.d(t,"m",(function(){return m})),n.d(t,"n",(function(){return v}));var r=Object.prototype.toString;function o(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(e,Error)}}function i(e,t){return r.call(e)==="[object ".concat(t,"]")}function a(e){return i(e,"ErrorEvent")}function s(e){return i(e,"DOMError")}function u(e){return i(e,"DOMException")}function c(e){return i(e,"String")}function l(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function f(e){return i(e,"Object")}function d(e){return"undefined"!==typeof Event&&g(e,Event)}function p(e){return"undefined"!==typeof Element&&g(e,Element)}function h(e){return i(e,"RegExp")}function v(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function m(e){return f(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e){return"number"===typeof e&&e!==e}function g(e,t){try{return e instanceof t}catch(n){return!1}}},,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(15),o={};function i(){return Object(r.b)()?e:"undefined"!==typeof window?window:"undefined"!==typeof self?self:o}function a(e,t,n){var r=n||i(),o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(21))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return f}));var r=n(0),o=n(25),i=n(7),a=n(12);function s(e,t,n){if(t in e){var r=e[t],o=n(r);if("function"===typeof o)try{c(o,r)}catch(i){}e[t]=o}}function u(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function c(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,u(e,"__sentry_original__",t)}function l(e){return e.__sentry_original__}function f(e){return Object.keys(e).map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))})).join("&")}function d(e){if(Object(i.d)(e))return Object(r.a)({message:e.message,name:e.name,stack:e.stack},h(e));if(Object(i.f)(e)){var t=Object(r.a)({type:e.type,target:p(e.target),currentTarget:p(e.currentTarget)},h(e));return"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function p(e){try{return Object(i.c)(e)?Object(o.b)(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function h(e){if("object"===typeof e&&null!==e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(a.d)(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:Object(a.d)(o,t)}return""}function m(e){return y(e,new Map)}function y(e,t){if(Object(i.i)(e)){if(void 0!==(s=t.get(e)))return s;var n={};t.set(e,n);for(var r=0,o=Object.keys(e);r<o.length;r++){var a=o[r];"undefined"!==typeof e[a]&&(n[a]=y(e[a],t))}return n}if(Array.isArray(e)){var s;if(void 0!==(s=t.get(e)))return s;n=[];return t.set(e,n),e.forEach((function(e){n.push(y(e,t))})),n}return e}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(31)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o}));var r=n(7);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof e||0===t||e.length<=t?e:"".concat(e.substr(0,t),"...")}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} ".concat(n)),i<r&&(n+=" {snip}"),n}function a(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r<e.length;r++){var o=e[r];try{n.push(String(o))}catch(i){n.push("[value cannot be serialized]")}}return n.join(t)}function s(e,t){return!!Object(r.l)(e)&&(Object(r.k)(t)?t.test(e):"string"===typeof t&&-1!==e.indexOf(t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(14);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var o=n(24);function i(){return!Object(o.a)()&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof e?e:0)}function a(e,t){return e.require(t)}}).call(this,n(37),n(20)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return s}));var r=n(0),o=n(3),i=n(6);function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.sort((function(e,t){return e[0]-t[0]})).map((function(e){return e[1]}));return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=[],a=Object(i.a)(e.split("\n").slice(n));try{for(a.s();!(t=a.n()).done;){var s,c=t.value,l=Object(i.a)(r);try{for(l.s();!(s=l.n()).done;){var f=s.value,d=f(c);if(d){o.push(d);break}}}catch(p){l.e(p)}finally{l.f()}}}catch(p){a.e(p)}finally{a.f()}return u(o)}}function s(e){return Array.isArray(e)?a.apply(void 0,Object(o.a)(e)):e}function u(e){if(!e.length)return[];var t=e,n=t[0].function||"",o=t[t.length-1].function||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==o.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return Object(r.a)(Object(r.a)({},e),{},{filename:e.filename||t[0].filename,function:e.function||"?"})})).reverse()}var c="<anonymous>";function l(e){try{return e&&"function"===typeof e&&e.name||c}catch(t){return c}}},,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(35),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),v=u(n),m=0;m<a.length;++m){var y=a[m];if(!i[y]&&(!r||!r[y])&&(!v||!v[y])&&(!s||!s[y])){var g=d(n,y);try{c(t,y,g)}catch(b){}}}}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(9),o=n(15),i={nowSeconds:function(){return Date.now()/1e3}};var a=Object(o.b)()?function(){try{return Object(o.a)(e,"perf_hooks").performance}catch(t){return}}():function(){var e=Object(r.a)().performance;if(e&&e.now)return{now:function(){return e.now()},timeOrigin:Date.now()-e.now()}}(),s=void 0===a?i:{nowSeconds:function(){return(a.timeOrigin+a.now())/1e3}},u=i.nowSeconds.bind(i),c=s.nowSeconds.bind(s);!function(){var e=Object(r.a)().performance;if(e&&e.now){var t=36e5,n=e.now(),o=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-o):t,a=i<t,s=e.timing&&e.timing.navigationStart,u="number"===typeof s?Math.abs(s+n-o):t;return a||u<t?i<=u?("timeOrigin",e.timeOrigin):("navigationStart",s):("dateNow",o)}"none"}()}).call(this,n(20)(e))},function(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));var r=n(9),o=n(7);function i(e,t){try{for(var n,r=e,o=[],i=0,s=0,u=" > ".length;r&&i++<5&&!("html"===(n=a(r,t))||i>1&&s+o.length*u+n.length>=80);)o.push(n),s+=n.length,r=r.parentNode;return o.reverse().join(" > ")}catch(c){return"<unknown>"}}function a(e,t){var n,r,i,a,s,u=e,c=[];if(!u||!u.tagName)return"";c.push(u.tagName.toLowerCase());var l=t&&t.length?t.filter((function(e){return u.getAttribute(e)})).map((function(e){return[e,u.getAttribute(e)]})):null;if(l&&l.length)l.forEach((function(e){c.push("[".concat(e[0],'="').concat(e[1],'"]'))}));else if(u.id&&c.push("#".concat(u.id)),(n=u.className)&&Object(o.l)(n))for(r=n.split(/\s+/),s=0;s<r.length;s++)c.push(".".concat(r[s]));var f=["type","name","title","alt"];for(s=0;s<f.length;s++)i=f[s],(a=u.getAttribute(i))&&c.push("[".concat(i,'="').concat(a,'"]'));return c.join("")}function s(){var e=Object(r.a)();try{return e.document.location.href}catch(t){return""}}},function(e,t,n){"use strict";function r(){var e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(var r=0;r<t.length;r++){if(t[r]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(var r=0;r<t.length;r++)if(t[r]===n){t.splice(r,1);break}}]}n.d(t,"a",(function(){return r}))},,,,function(e,t,n){"use strict";var r=n(19),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var b=g.prototype=new y;b.constructor=g,r(b,m.prototype),b.isPureReactComponent=!0;var k={current:null},w=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:k.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var D=/\/+/g;function S(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+S(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(D,"$&/")+"/"),C(a,t,n,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(D,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+S(s=e[c],c);u+=C(s,t,n,l,a)}else if(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=C(s=s.value,t,n,l=r+S(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function j(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function _(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var A={current:null};function N(){var e=A.current;if(null===e)throw Error(p(321));return e}var T={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:j,forEach:function(e,t,n){j(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return j(e,(function(){t++})),t},toArray:function(e){return j(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error(p(143));return e}},t.Component=m,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)w.call(t,l)&&!x.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:_}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return N().useCallback(e,t)},t.useContext=function(e,t){return N().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return N().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return N().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return N().useLayoutEffect(e,t)},t.useMemo=function(e,t){return N().useMemo(e,t)},t.useReducer=function(e,t,n){return N().useReducer(e,t,n)},t.useRef=function(e){return N().useRef(e)},t.useState=function(e){return N().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(2),o=n(19),i=n(32);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},v={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function k(e,t,n,r){var o=y.hasOwnProperty(t)?y[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(v,e)||!p.call(h,e)&&(d.test(e)?v[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,O=60106,E=60107,D=60108,S=60114,C=60109,j=60110,_=60112,A=60113,N=60120,T=60115,M=60116,F=60121,R=60128,P=60129,B=60130,L=60131;if("function"===typeof Symbol&&Symbol.for){var I=Symbol.for;x=I("react.element"),O=I("react.portal"),E=I("react.fragment"),D=I("react.strict_mode"),S=I("react.profiler"),C=I("react.provider"),j=I("react.context"),_=I("react.forward_ref"),A=I("react.suspense"),N=I("react.suspense_list"),T=I("react.memo"),M=I("react.lazy"),F=I("react.block"),I("react.scope"),R=I("react.opaque.id"),P=I("react.debug_trace_mode"),B=I("react.offscreen"),L=I("react.legacy_hidden")}var z,U="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function $(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var H=!1;function q(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$(e):""}function W(e){switch(e.tag){case 5:return $(e.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1);case 11:return e=q(e.type.render,!1);case 22:return e=q(e.type._render,!1);case 1:return e=q(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case O:return"Portal";case S:return"Profiler";case D:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case j:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case _:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case T:return G(e.type);case F:return G(e._render);case M:t=e._payload,e=e._init;try{return G(e(t))}catch(n){}}return null}function Y(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function J(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Y(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&k(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=Y(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,Y(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Y(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Y(n)}}function ce(e,t){var n=Y(t.value),r=Y(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,me,ye=(me=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ke=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(be).forEach((function(e){ke.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Oe=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ee(e,t){if(t){if(Oe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function De(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,je=null,_e=null;function Ae(e){if(e=ro(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),Ce(e.stateNode,e.type,t))}}function Ne(e){je?_e?_e.push(e):_e=[e]:je=e}function Te(){if(je){var e=je,t=_e;if(_e=je=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Me(e,t){return e(t)}function Fe(e,t,n,r,o){return e(t,n,r,o)}function Re(){}var Pe=Me,Be=!1,Le=!1;function Ie(){null===je&&null===_e||(Re(),Te())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ue=!1;if(f)try{var Ve={};Object.defineProperty(Ve,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",Ve,Ve),window.removeEventListener("test",Ve,Ve)}catch(me){Ue=!1}function $e(e,t,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var He=!1,qe=null,We=!1,Ge=null,Ye={onError:function(e){He=!0,qe=e}};function Ke(e,t,n,r,o,i,a,s,u){He=!1,qe=null,$e.apply(Ye,arguments)}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Je(e)!==e)throw Error(a(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xe(o),e;if(i===r)return Xe(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,ut=null,ct=null,lt=new Map,ft=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function mt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function yt(e){var t=no(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){gt(e)&&n.delete(t)}function kt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&gt(st)&&(st=null),null!==ut&&gt(ut)&&(ut=null),null!==ct&&gt(ct)&&(ct=null),lt.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,kt)))}function xt(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==ut&&wt(ut,e),null!==ct&&wt(ct,e),lt.forEach(t),ft.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)yt(n),null===n.blockedOn&&dt.shift()}function Ot(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Et={animationend:Ot("Animation","AnimationEnd"),animationiteration:Ot("Animation","AnimationIteration"),animationstart:Ot("Animation","AnimationStart"),transitionend:Ot("Transition","TransitionEnd")},Dt={},St={};function Ct(e){if(Dt[e])return Dt[e];if(!Et[e])return e;var t,n=Et[e];for(t in n)if(n.hasOwnProperty(t)&&t in St)return Dt[e]=n[t];return e}f&&(St=document.createElement("div").style,"AnimationEvent"in window||(delete Et.animationend.animation,delete Et.animationiteration.animation,delete Et.animationstart.animation),"TransitionEvent"in window||delete Et.transitionend.transition);var jt=Ct("animationend"),_t=Ct("animationiteration"),At=Ct("animationstart"),Nt=Ct("transitionend"),Tt=new Map,Mt=new Map,Ft=["abort","abort",jt,"animationEnd",_t,"animationIteration",At,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Nt,"transitionEnd","waiting","waiting"];function Rt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Mt.set(r,t),Tt.set(r,o),c(o,[r])}}(0,i.unstable_now)();var Pt=8;function Bt(e){if(0!==(1&e))return Pt=15,1;if(0!==(2&e))return Pt=14,2;if(0!==(4&e))return Pt=13,4;var t=24&e;return 0!==t?(Pt=12,t):0!==(32&e)?(Pt=11,32):0!==(t=192&e)?(Pt=10,t):0!==(256&e)?(Pt=9,256):0!==(t=3584&e)?(Pt=8,t):0!==(4096&e)?(Pt=7,4096):0!==(t=4186112&e)?(Pt=6,t):0!==(t=62914560&e)?(Pt=5,t):67108864&e?(Pt=4,67108864):0!==(134217728&e)?(Pt=3,134217728):0!==(t=805306368&e)?(Pt=2,t):0!==(1073741824&e)?(Pt=1,1073741824):(Pt=8,e)}function Lt(e,t){var n=e.pendingLanes;if(0===n)return Pt=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Pt=15;else if(0!==(i=134217727&n)){var u=i&~a;0!==u?(r=Bt(u),o=Pt):0!==(s&=i)&&(r=Bt(s),o=Pt)}else 0!==(i=n&~a)?(r=Bt(i),o=Pt):0!==s&&(r=Bt(s),o=Pt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Bt(t),o<=Pt)return t;Pt=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Ht(t)),r|=e[n],t&=~o;return r}function It(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?zt(10,t):e;case 10:return 0===(e=Ut(192&~t))?zt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ut(e){return e&-e}function Vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(qt(e)/Wt|0)|0},qt=Math.log,Wt=Math.LN2;var Gt=i.unstable_UserBlockingPriority,Yt=i.unstable_runWithPriority,Kt=!0;function Jt(e,t,n,r){Be||Re();var o=Xt,i=Be;Be=!0;try{Fe(o,e,t,n,r)}finally{(Be=i)||Ie()}}function Qt(e,t,n,r){Yt(Gt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var o;if(Kt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Zt(e,t,n,r);if(null===i)o&&vt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=mt(st,e,t,n,r,o),!0;case"dragenter":return ut=mt(ut,e,t,n,r,o),!0;case"mouseover":return ct=mt(ct,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return lt.set(i,mt(lt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ft.set(i,mt(ft.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;vt(e,r)}Rr(e,t,r,null,n)}}}function Zt(e,t,n,r){var o=Se(r);if(null!==(o=no(o))){var i=Je(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Qe(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Rr(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function un(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,ln,fn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=un(dn),hn=o({},dn,{view:0,detail:0}),vn=un(hn),mn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,ln=e.screenY-fn.screenY):ln=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),yn=un(mn),gn=un(o({},mn,{dataTransfer:0})),bn=un(o({},hn,{relatedTarget:0})),kn=un(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=un(wn),On=un(o({},dn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function jn(){return Cn}var _n=o({},hn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Dn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=un(_n),Nn=un(o({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=un(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Mn=un(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=o({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=un(Fn),Pn=[9,13,27,32],Bn=f&&"CompositionEvent"in window,Ln=null;f&&"documentMode"in document&&(Ln=document.documentMode);var In=f&&"TextEvent"in window&&!Ln,zn=f&&(!Bn||Ln&&8<Ln&&11>=Ln),Un=String.fromCharCode(32),Vn=!1;function $n(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Yn(e,t,n,r){Ne(r),0<(t=Br(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Jn=null;function Qn(e){_r(e,0)}function Xn(e){if(Q(oo(e)))return e}function Zn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){Kn&&(Kn.detachEvent("onpropertychange",ir),Jn=Kn=null)}function ir(e){if("value"===e.propertyName&&Xn(Jn)){var t=[];if(Yn(t,Jn,e,Se(e)),e=Qn,Be)e(t);else{Be=!0;try{Me(e,t)}finally{Be=!1,Ie()}}}}function ar(e,t,n){"focusin"===e?(or(),Jn=n,(Kn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Jn)}function ur(e,t){if("click"===e)return Xn(t)}function cr(e,t){if("input"===e||"change"===e)return Xn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function dr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!lr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gr=f&&"documentMode"in document&&11>=document.documentMode,br=null,kr=null,wr=null,xr=!1;function Or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==br||br!==X(r)||("selectionStart"in(r=br)&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Br(kr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Rt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Rt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Rt(Ft,2);for(var Er="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Dr=0;Dr<Er.length;Dr++)Mt.set(Er[Dr],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sr));function jr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,u,c){if(Ke.apply(this,arguments),He){if(!He)throw Error(a(198));var l=qe;He=!1,qe=null,We||(We=!0,Ge=l)}}(r,t,void 0,e),e.currentTarget=null}function _r(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==i&&o.isPropagationStopped())break e;jr(o,s,c),i=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,c=s.currentTarget,s=s.listener,u!==i&&o.isPropagationStopped())break e;jr(o,s,c),i=u}}}if(We)throw e=Ge,We=!1,Ge=null,e}function Ar(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Fr(t,e,2,!1),n.add(r))}var Nr="_reactListening"+Math.random().toString(36).slice(2);function Tr(e){e[Nr]||(e[Nr]=!0,s.forEach((function(t){Cr.has(t)||Mr(t,!1,e,null),Mr(t,!0,e,null)})))}function Mr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Cr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Fr(i,e,o,t),a.add(s))}function Fr(e,t,n,r){var o=Mt.get(t);switch(void 0===o?2:o){case 0:o=Jt;break;case 1:o=Qt;break;default:o=Xt}n=o.bind(null,t,n,e),o=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Rr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(u=a.tag)||6===u){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Le)return e(t,n);Le=!0;try{Pe(e,t,n)}finally{Le=!1,Ie()}}((function(){var r=i,o=Se(n),a=[];e:{var s=Tt.get(e);if(void 0!==s){var u=pn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":u=An;break;case"focusin":c="focus",u=bn;break;case"focusout":c="blur",u=bn;break;case"beforeblur":case"afterblur":u=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Tn;break;case jt:case _t:case At:u=kn;break;case Nt:u=Mn;break;case"scroll":u=vn;break;case"wheel":u=Rn;break;case"copy":case"cut":case"paste":u=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Nn}var l=0!==(4&t),f=!l&&"scroll"===e,d=l?null!==s?s+"Capture":null:s;l=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==d&&(null!=(v=ze(h,d))&&l.push(Pr(h,v,p)))),f)break;h=h.return}0<l.length&&(s=new u(s,c,null,n,o),a.push({event:s,listeners:l}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!no(c)&&!c[eo])&&(u||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?no(c):null)&&(c!==(f=Je(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=yn,v="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(l=Nn,v="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==u?s:oo(u),p=null==c?s:oo(c),(s=new l(v,h+"leave",u,n,o)).target=f,s.relatedTarget=p,v=null,no(o)===r&&((l=new l(d,h+"enter",c,n,o)).target=p,l.relatedTarget=f,v=l),f=v,u&&c)e:{for(d=c,h=0,p=l=u;p;p=Lr(p))h++;for(p=0,v=d;v;v=Lr(v))p++;for(;0<h-p;)l=Lr(l),h--;for(;0<p-h;)d=Lr(d),p--;for(;h--;){if(l===d||null!==d&&l===d.alternate)break e;l=Lr(l),d=Lr(d)}l=null}else l=null;null!==u&&Ir(a,s,u,l,!1),null!==c&&null!==f&&Ir(a,f,c,l,!0)}if("select"===(u=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var m=Zn;else if(Gn(s))if(er)m=cr;else{m=sr;var y=ar}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ur);switch(m&&(m=m(e,r))?Yn(a,m,n,o):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&oe(s,"number",s.value)),y=r?oo(r):window,e){case"focusin":(Gn(y)||"true"===y.contentEditable)&&(br=y,kr=r,wr=null);break;case"focusout":wr=kr=br=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,Or(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":Or(a,n,o)}var g;if(Bn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else qn?$n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zn&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(g=rn()):(tn="value"in(en=o)?en.value:en.textContent,qn=!0)),0<(y=Br(r,b)).length&&(b=new On(b,e,null,n,o),a.push({event:b,listeners:y}),g?b.data=g:null!==(g=Hn(n))&&(b.data=g))),(g=In?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Vn=!0,Un);case"textInput":return(e=t.data)===Un&&Vn?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Bn&&$n(e,t)?(e=rn(),nn=tn=en=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Br(r,"onBeforeInput")).length&&(o=new On("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=g))}_r(a,t)}))}function Pr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Br(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=ze(e,n))&&r.unshift(Pr(e,i,o)),null!=(i=ze(e,t))&&r.push(Pr(e,i,o))),e=e.return}return r}function Lr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ir(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(u=ze(n,i))&&a.unshift(Pr(n,u,s)):o||null!=(u=ze(n,i))&&a.push(Pr(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function zr(){}var Ur=null,Vr=null;function $r(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var qr="function"===typeof setTimeout?setTimeout:void 0,Wr="function"===typeof clearTimeout?clearTimeout:void 0;function Gr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Yr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Kr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Jr=0;var Qr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Qr,Zr="__reactProps$"+Qr,eo="__reactContainer$"+Qr,to="__reactEvents$"+Qr;function no(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Kr(e);null!==e;){if(n=e[Xr])return n;e=Kr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Xr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Zr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],uo=-1;function co(e){return{current:e}}function lo(e){0>uo||(e.current=so[uo],so[uo]=null,uo--)}function fo(e,t){uo++,so[uo]=e.current,e.current=t}var po={},ho=co(po),vo=co(!1),mo=po;function yo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function go(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bo(){lo(vo),lo(ho)}function ko(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(vo,n)}function wo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,G(t)||"Unknown",i));return o({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,mo=ho.current,fo(ho,e),fo(vo,vo.current),!0}function Oo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=wo(e,t,mo),r.__reactInternalMemoizedMergedChildContext=e,lo(vo),lo(ho),fo(ho,e)):lo(vo),fo(vo,n)}var Eo=null,Do=null,So=i.unstable_runWithPriority,Co=i.unstable_scheduleCallback,jo=i.unstable_cancelCallback,_o=i.unstable_shouldYield,Ao=i.unstable_requestPaint,No=i.unstable_now,To=i.unstable_getCurrentPriorityLevel,Mo=i.unstable_ImmediatePriority,Fo=i.unstable_UserBlockingPriority,Ro=i.unstable_NormalPriority,Po=i.unstable_LowPriority,Bo=i.unstable_IdlePriority,Lo={},Io=void 0!==Ao?Ao:function(){},zo=null,Uo=null,Vo=!1,$o=No(),Ho=1e4>$o?No:function(){return No()-$o};function qo(){switch(To()){case Mo:return 99;case Fo:return 98;case Ro:return 97;case Po:return 96;case Bo:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Mo;case 98:return Fo;case 97:return Ro;case 96:return Po;case 95:return Bo;default:throw Error(a(332))}}function Go(e,t){return e=Wo(e),So(e,t)}function Yo(e,t,n){return e=Wo(e),Co(e,t,n)}function Ko(){if(null!==Uo){var e=Uo;Uo=null,jo(e)}Jo()}function Jo(){if(!Vo&&null!==zo){Vo=!0;var e=0;try{var t=zo;Go(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zo=null}catch(n){throw null!==zo&&(zo=zo.slice(e+1)),Co(Mo,Ko),n}finally{Vo=!1}}}var Qo=w.ReactCurrentBatchConfig;function Xo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Zo=co(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Zo.current;lo(Zo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ba=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var ui=!1;function ci(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function li(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function di(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;ui=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,u=i.shared.pending;if(null!==u){i.shared.pending=null;var c=u,l=c.next;c.next=null,null===s?a=l:s.next=l,s=c;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==s&&(null===d?f.firstBaseUpdate=l:d.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,s=0,f=l=c=null;;){u=a.lane;var p=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(u=t,p=n,v.tag){case 1:if("function"===typeof(h=v.payload)){d=h.call(p,d,u);break e}d=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(u="function"===typeof(h=v.payload)?h.call(p,d,u):h)||void 0===u)break e;d=o({},d,u);break e;case 2:ui=!0}}null!==a.callback&&(e.flags|=32,null===(u=i.effects)?i.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=p,c=d):f=f.next=p,s|=u;if(null===(a=a.next)){if(null===(u=i.shared.pending))break;a=u.next,u.next=null,i.lastBaseUpdate=u,i.shared.pending=null}}null===f&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=f,Us|=s,e.lanes=s,e.memoizedState=d}}function vi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var mi=(new r.Component).refs;function yi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var gi={isMounted:function(e){return!!(e=e._reactInternals)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),o=pu(e),i=fi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hu(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),o=pu(e),i=fi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hu(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=pu(e),o=fi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),di(e,o),hu(e,r,n)}};function bi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(o,i))}function ki(e,t,n){var r=!1,o=po,i=t.contextType;return"object"===typeof i&&null!==i?i=si(i):(o=go(t)?mo:ho.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?yo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=gi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function wi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=mi,ci(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=si(i):(i=go(t)?mo:ho.current,o.context=yo(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(yi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&gi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var Oi=Array.isArray;function Ei(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===mi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Di(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Si(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Wu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ju(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Ei(e,t,n),r.return=e,r):((r=Gu(n.type,n.key,n.props,null,e.mode,r)).ref=Ei(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Yu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ju(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Gu(t.type,t.key,t.props,null,e.mode,n)).ref=Ei(e,null,t),n.return=e,n;case O:return(t=Qu(t,e.mode,n)).return=e,t}if(Oi(t)||V(t))return(t=Yu(t,e.mode,n,null)).return=e,t;Di(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===E?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case O:return n.key===o?l(e,t,n,r):null}if(Oi(n)||V(n))return null!==o?null:f(e,t,n,r,null);Di(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===E?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case O:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Oi(r)||V(r))return f(t,e=e.get(n)||null,r,o,null);Di(t,r)}return null}function v(o,a,s,u){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=p(o,f,s[v],u);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(o,f),a=i(y,a,v),null===l?c=y:l.sibling=y,l=y,f=m}if(v===s.length)return n(o,f),c;if(null===f){for(;v<s.length;v++)null!==(f=d(o,s[v],u))&&(a=i(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);v<s.length;v++)null!==(m=h(f,o,v,s[v],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=i(m,a,v),null===l?c=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(o,e)})),c}function m(o,s,u,c){var l=V(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,m=s=0,y=null,g=u.next();null!==v&&!g.done;m++,g=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=p(o,v,g.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=i(b,s,m),null===f?l=b:f.sibling=b,f=b,v=y}if(g.done)return n(o,v),l;if(null===v){for(;!g.done;m++,g=u.next())null!==(g=d(o,g.value,c))&&(s=i(g,s,m),null===f?l=g:f.sibling=g,f=g);return l}for(v=r(o,v);!g.done;m++,g=u.next())null!==(g=h(v,o,m,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=i(g,s,m),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(o,e)})),l}return function(e,r,i,u){var c="object"===typeof i&&null!==i&&i.type===E&&null===i.key;c&&(i=i.props.children);var l="object"===typeof i&&null!==i;if(l)switch(i.$$typeof){case x:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(i.type===E){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Ei(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===E?((r=Yu(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Gu(i.type,i.key,i.props,null,e.mode,u)).ref=Ei(e,r,i),u.return=e,e=u)}return s(e);case O:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qu(i,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Ju(i,e.mode,u)).return=e,e=r),s(e);if(Oi(i))return v(e,r,i,u);if(V(i))return m(e,r,i,u);if(l&&Di(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,G(e.type)||"Component"))}return n(e,r)}}var Ci=Si(!0),ji=Si(!1),_i={},Ai=co(_i),Ni=co(_i),Ti=co(_i);function Mi(e){if(e===_i)throw Error(a(174));return e}function Fi(e,t){switch(fo(Ti,t),fo(Ni,e),fo(Ai,_i),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ai),fo(Ai,t)}function Ri(){lo(Ai),lo(Ni),lo(Ti)}function Pi(e){Mi(Ti.current);var t=Mi(Ai.current),n=he(t,e.type);t!==n&&(fo(Ni,e),fo(Ai,n))}function Bi(e){Ni.current===e&&(lo(Ai),lo(Ni))}var Li=co(0);function Ii(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zi=null,Ui=null,Vi=!1;function $i(e,t){var n=Hu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Hi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function qi(e){if(Vi){var t=Ui;if(t){var n=t;if(!Hi(e,t)){if(!(t=Yr(n.nextSibling))||!Hi(e,t))return e.flags=-1025&e.flags|2,Vi=!1,void(zi=e);$i(zi,n)}zi=e,Ui=Yr(t.firstChild)}else e.flags=-1025&e.flags|2,Vi=!1,zi=e}}function Wi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zi=e}function Gi(e){if(e!==zi)return!1;if(!Vi)return Wi(e),Vi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Ui;t;)$i(e,t),t=Yr(t.nextSibling);if(Wi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ui=Yr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ui=null}}else Ui=zi?Yr(e.stateNode.nextSibling):null;return!0}function Yi(){Ui=zi=null,Vi=!1}var Ki=[];function Ji(){for(var e=0;e<Ki.length;e++)Ki[e]._workInProgressVersionPrimary=null;Ki.length=0}var Qi=w.ReactCurrentDispatcher,Xi=w.ReactCurrentBatchConfig,Zi=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Zi=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qi.current=null===e||null===e.memoizedState?Ma:Fa,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Qi.current=Ra,e=n(r,o)}while(oa)}if(Qi.current=Ta,t=null!==ta&&null!==ta.next,Zi=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ca(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function la(e,t){return"function"===typeof t?t(e):t}function fa(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.lane;if((Zi&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,ea.lanes|=l,Us|=l}c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,lr(r,t.memoizedState)||(Ba=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);lr(i,t.memoizedState)||(Ba=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Zi&e)===e)&&(t._workInProgressVersionPrimary=r,Ki.push(t))),e)return n(t._source);throw Ki.push(t),Error(a(350))}function ha(e,t,n,r){var o=Ms;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),u=Qi.current,c=u.useState((function(){return pa(o,t,n)})),l=c[1],f=c[0];c=na;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,v=d.source;d=d.subscribe;var m=ea;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=l;var e=i(t._source);if(!lr(s,e)){e=n(t._source),lr(f,e)||(l(e),e=pu(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var u=31-Ht(a),c=1<<u;r[u]|=e,a&=~c}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pu(m);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),lr(h,n)&&lr(v,t)&&lr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:f}).dispatch=l=Na.bind(null,ea,e),c.queue=e,c.baseQueue=null,f=pa(o,t,n),c.memoizedState=c.baseState=f),f}function va(e,t,n){return ha(ca(),e,t,n)}function ma(e){var t=ua();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:e}).dispatch=Na.bind(null,ea,e),[t.memoizedState,e]}function ya(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ga(e){return e={current:e},ua().memoizedState=e}function ba(){return ca().memoizedState}function ka(e,t,n,r){var o=ua();ea.flags|=e,o.memoizedState=ya(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ya(t,n,i,r)}ea.flags|=e,o.memoizedState=ya(1|t,n,i,r)}function xa(e,t){return ka(516,4,e,t)}function Oa(e,t){return wa(516,4,e,t)}function Ea(e,t){return wa(4,2,e,t)}function Da(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Sa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,Da.bind(null,t,e),n)}function Ca(){}function ja(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _a(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Aa(e,t){var n=qo();Go(98>n?98:n,(function(){e(!0)})),Go(97<n?97:n,(function(){var n=Xi.transition;Xi.transition=1;try{e(!1),t()}finally{Xi.transition=n}}))}function Na(e,t,n){var r=du(),o=pu(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=a(s,n);if(i.eagerReducer=a,i.eagerState=u,lr(u,s))return}catch(c){}hu(e,o,r)}}var Ta={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Ma={readContext:si,useCallback:function(e,t){return ua().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ka(4,2,Da.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ka(4,2,e,t)},useMemo:function(e,t){var n=ua();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ua();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Na.bind(null,ea,e),[r.memoizedState,e]},useRef:ga,useState:ma,useDebugValue:Ca,useDeferredValue:function(e){var t=ma(e),n=t[0],r=t[1];return xa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=ma(!1),t=e[0];return ga(e=Aa.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ua();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Vi){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Jr++).toString(36))),Error(a(355))})),n=ma(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ya(5,(function(){n("r:"+(Jr++).toString(36))}),void 0,null)),t}return ma(t="r:"+(Jr++).toString(36)),t},unstable_isNewReconciler:!1},Fa={readContext:si,useCallback:ja,useContext:si,useEffect:Oa,useImperativeHandle:Sa,useLayoutEffect:Ea,useMemo:_a,useReducer:fa,useRef:ba,useState:function(){return fa(la)},useDebugValue:Ca,useDeferredValue:function(e){var t=fa(la),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=fa(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return fa(la)[0]},unstable_isNewReconciler:!1},Ra={readContext:si,useCallback:ja,useContext:si,useEffect:Oa,useImperativeHandle:Sa,useLayoutEffect:Ea,useMemo:_a,useReducer:da,useRef:ba,useState:function(){return da(la)},useDebugValue:Ca,useDeferredValue:function(e){var t=da(la),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=da(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return da(la)[0]},unstable_isNewReconciler:!1},Pa=w.ReactCurrentOwner,Ba=!1;function La(e,t,n,r){t.child=null===e?ji(t,null,n,r):Ci(t,e.child,n,r)}function Ia(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||Ba?(t.flags|=1,La(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function za(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||qu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Gu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Wu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,o,i){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Ba=!1,0===(i&o))return t.lanes=e.lanes,is(e,t,i);0!==(16384&e.flags)&&(Ba=!0)}return Ha(e,t,n,r,i)}function Va(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},xu(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},xu(t,e),null;t.memoizedState={baseLanes:0},xu(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,xu(t,r);return La(e,t,o,n),t.child}function $a(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ha(e,t,n,r,o){var i=go(n)?mo:ho.current;return i=yo(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||Ba?(t.flags|=1,La(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function qa(e,t,n,r,o){if(go(n)){var i=!0;xo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ki(t,n,r),xi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=si(c):c=yo(t,c=go(n)?mo:ho.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&wi(t,a,r,c),ui=!1;var d=t.memoizedState;a.state=d,hi(t,r,a,o),u=t.memoizedState,s!==r||d!==u||vo.current||ui?("function"===typeof l&&(yi(t,n,l,r),u=t.memoizedState),(s=ui||bi(t,n,s,r,d,u,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,li(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xo(t.type,s),a.props=c,f=t.pendingProps,d=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=si(u):u=yo(t,u=go(n)?mo:ho.current);var p=n.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||d!==u)&&wi(t,a,r,u),ui=!1,d=t.memoizedState,a.state=d,hi(t,r,a,o);var h=t.memoizedState;s!==f||d!==h||vo.current||ui?("function"===typeof p&&(yi(t,n,p,r),h=t.memoizedState),(c=ui||bi(t,n,c,r,d,h,u))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Wa(e,t,n,r,i,o)}function Wa(e,t,n,r,o,i){$a(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&Oo(t,n,!1),is(e,t,i);r=t.stateNode,Pa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ci(t,e.child,null,i),t.child=Ci(t,null,s,i)):La(e,t,s,i),t.memoizedState=r.state,o&&Oo(t,n,!0),t.child}function Ga(e){var t=e.stateNode;t.pendingContext?ko(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ko(0,t.context,!1),Fi(e,t.containerInfo)}var Ya,Ka,Ja,Qa={dehydrated:null,retryLane:0};function Xa(e,t,n){var r,o=t.pendingProps,i=Li.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),fo(Li,1&i),null===e?(void 0!==o.fallback&&qi(t),e=o.children,i=o.fallback,a?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,e):"number"===typeof o.unstable_expectedLoadTime?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,t.lanes=33554432,e):((n=Ku({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Qa,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Za(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=Ku(t,o,0,null),n=Yu(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Wu(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Wu(a,s),null!==e?r=Wu(e,r):(r=Yu(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(La(e,t,r.children,n),0!==(2&(r=Li.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Li,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ii(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ii(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Us|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Wu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Wu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Vi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return go(t.type)&&bo(),null;case 3:return Ri(),lo(vo),lo(ho),Ji(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Gi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Bi(t);var i=Mi(Ti.current);if(n=t.type,null!==e&&null!=t.stateNode)Ka(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Mi(Ai.current),Gi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xr]=t,r[Zr]=s,n){case"dialog":Ar("cancel",r),Ar("close",r);break;case"iframe":case"object":case"embed":Ar("load",r);break;case"video":case"audio":for(e=0;e<Sr.length;e++)Ar(Sr[e],r);break;case"source":Ar("error",r);break;case"img":case"image":case"link":Ar("error",r),Ar("load",r);break;case"details":Ar("toggle",r);break;case"input":ee(r,s),Ar("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ar("invalid",r);break;case"textarea":ue(r,s),Ar("invalid",r)}for(var c in Ee(n,s),e=null,s)s.hasOwnProperty(c)&&(i=s[c],"children"===c?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):u.hasOwnProperty(c)&&null!=i&&"onScroll"===c&&Ar("scroll",r));switch(n){case"input":J(r),re(r,s,!0);break;case"textarea":J(r),le(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=zr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===i.nodeType?i:i.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Zr]=r,Ya(e,t),t.stateNode=e,c=De(n,r),n){case"dialog":Ar("cancel",e),Ar("close",e),i=r;break;case"iframe":case"object":case"embed":Ar("load",e),i=r;break;case"video":case"audio":for(i=0;i<Sr.length;i++)Ar(Sr[i],e);i=r;break;case"source":Ar("error",e),i=r;break;case"img":case"image":case"link":Ar("error",e),Ar("load",e),i=r;break;case"details":Ar("toggle",e),i=r;break;case"input":ee(e,r),i=Z(e,r),Ar("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Ar("invalid",e);break;case"textarea":ue(e,r),i=se(e,r),Ar("invalid",e);break;default:i=r}Ee(n,i);var l=i;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?xe(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&ye(e,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&ge(e,f):"number"===typeof f&&ge(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Ar("scroll",e):null!=f&&k(e,s,f,c))}switch(n){case"input":J(e),re(e,r,!1);break;case"textarea":J(e),le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Y(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=zr)}$r(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ja(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Mi(Ti.current),Mi(Ai.current),Gi(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return lo(Li),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Gi(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Li.current)?0===Ls&&(Ls=3):(0!==Ls&&3!==Ls||(Ls=4),null===Ms||0===(134217727&Us)&&0===(134217727&Vs)||gu(Ms,Rs))),(r||n)&&(t.flags|=4),null);case 4:return Ri(),null===e&&Tr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(lo(Li),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=r.rendering))if(s)as(r,!1);else{if(0!==Ls||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Ii(e))){for(t.flags|=64,as(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fo(Li,1&Li.current|2),t.child}e=e.sibling}null!==r.tail&&Ho()>Ws&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Ii(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Vi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ho()-r.renderingStartTime>Ws&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ho(),n.sibling=null,t=Li.current,fo(Li,s?1&t|2:1&t),n):null;case 23:case 24:return Ou(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function us(e){switch(e.tag){case 1:go(e.type)&&bo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ri(),lo(vo),lo(ho),Ji(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Bi(e),null;case 13:return lo(Li),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return lo(Li),null;case 4:return Ri(),null;case 10:return oi(e),null;case 23:case 24:return Ou(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function ls(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ya=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ka=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Mi(Ai.current);var a,s=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=zr)}for(f in Ee(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var c=i[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Ar("scroll",e),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===R?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(t.updateQueue=f)&&(t.flags|=4)}},Ja=function(e,t,n,r){n!==r&&(t.flags|=4)};var fs="function"===typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=fi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Js||(Js=!0,Qs=r),ls(0,t)},n}function ps(e,t,n){(n=fi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return ls(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Xs?Xs=new Set([this]):Xs.add(this),ls(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"===typeof WeakSet?WeakSet:Set;function vs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){zu(e,n)}else t.current=null}function ms(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Gr(t.stateNode.containerInfo))}throw Error(a(163))}function ys(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Bu(n,e),Pu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&vi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}vi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&$r(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function gs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Do&&"function"===typeof Do.onCommitFiberUnmount)try{Do.onCommitFiberUnmount(Eo,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Bu(t,n);else{r=t;try{o()}catch(i){zu(r,i)}}n=n.next}while(n!==e)}break;case 1:if(vs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){zu(t,i)}break;case 5:vs(t);break;case 4:Ds(e,t)}}function ks(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ws(e){return 5===e.tag||3===e.tag||4===e.tag}function xs(e){e:{for(var t=e.return;null!==t;){if(ws(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ws(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Os(e,n,t):Es(e,n,t)}function Os(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=zr));else if(4!==r&&null!==(e=e.child))for(Os(e,t,n),e=e.sibling;null!==e;)Os(e,t,n),e=e.sibling}function Es(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Es(e,t,n),e=e.sibling;null!==e;)Es(e,t,n),e=e.sibling}function Ds(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,u=o,c=u;;)if(bs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,u=o.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bs(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Ss(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),De(e,o),t=De(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?xe(n,u):"dangerouslySetInnerHTML"===s?ye(n,u):"children"===s?ge(n,u):k(n,s,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(qs=Ho(),gs(t.child,!0)),void Cs(t);case 19:return void Cs(t);case 23:case 24:return void gs(t,null!==t.memoizedState)}throw Error(a(163))}function Cs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Vu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function js(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var _s=Math.ceil,As=w.ReactCurrentDispatcher,Ns=w.ReactCurrentOwner,Ts=0,Ms=null,Fs=null,Rs=0,Ps=0,Bs=co(0),Ls=0,Is=null,zs=0,Us=0,Vs=0,$s=0,Hs=null,qs=0,Ws=1/0;function Gs(){Ws=Ho()+500}var Ys,Ks=null,Js=!1,Qs=null,Xs=null,Zs=!1,eu=null,tu=90,nu=[],ru=[],ou=null,iu=0,au=null,su=-1,uu=0,cu=0,lu=null,fu=!1;function du(){return 0!==(48&Ts)?Ho():-1!==su?su:su=Ho()}function pu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===qo()?1:2;if(0===uu&&(uu=zs),0!==Qo.transition){0!==cu&&(cu=null!==Hs?Hs.pendingLanes:0),e=uu;var t=4186112&~cu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=qo(),0!==(4&Ts)&&98===e?e=zt(12,uu):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),uu),e}function hu(e,t,n){if(50<iu)throw iu=0,au=null,Error(a(185));if(null===(e=vu(e,t)))return null;$t(e,t,n),e===Ms&&(Vs|=t,4===Ls&&gu(e,Rs));var r=qo();1===t?0!==(8&Ts)&&0===(48&Ts)?bu(e):(mu(e,n),0===Ts&&(Gs(),Ko())):(0===(4&Ts)||98!==r&&99!==r||(null===ou?ou=new Set([e]):ou.add(e)),mu(e,n)),Hs=e}function vu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function mu(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-Ht(s),c=1<<u,l=i[u];if(-1===l){if(0===(c&r)||0!==(c&o)){l=t,Bt(c);var f=Pt;i[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=t&&(e.expiredLanes|=c);s&=~c}if(r=Lt(e,e===Ms?Rs:0),t=Pt,0===r)null!==n&&(n!==Lo&&jo(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Lo&&jo(n)}15===t?(n=bu.bind(null,e),null===zo?(zo=[n],Uo=Co(Mo,Jo)):zo.push(n),n=Lo):14===t?n=Yo(99,bu.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Yo(n,yu.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function yu(e){if(su=-1,cu=uu=0,0!==(48&Ts))throw Error(a(327));var t=e.callbackNode;if(Ru()&&e.callbackNode!==t)return null;var n=Lt(e,e===Ms?Rs:0);if(0===n)return null;var r=n,o=Ts;Ts|=16;var i=Su();for(Ms===e&&Rs===r||(Gs(),Eu(e,r));;)try{_u();break}catch(u){Du(e,u)}if(ri(),As.current=i,Ts=o,null!==Fs?r=0:(Ms=null,Rs=0,r=Ls),0!==(zs&Vs))Eu(e,0);else if(0!==r){if(2===r&&(Ts|=64,e.hydrate&&(e.hydrate=!1,Gr(e.containerInfo)),0!==(n=It(e))&&(r=Cu(e,n))),1===r)throw t=Is,Eu(e,0),gu(e,n),mu(e,Ho()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Tu(e);break;case 3:if(gu(e,n),(62914560&n)===n&&10<(r=qs+500-Ho())){if(0!==Lt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){du(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=qr(Tu.bind(null,e),r);break}Tu(e);break;case 4:if(gu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Ht(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=Ho()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*_s(n/1960))-n)){e.timeoutHandle=qr(Tu.bind(null,e),n);break}Tu(e);break;default:throw Error(a(329))}}return mu(e,Ho()),e.callbackNode===t?yu.bind(null,e):null}function gu(e,t){for(t&=~$s,t&=~Vs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function bu(e){if(0!==(48&Ts))throw Error(a(327));if(Ru(),e===Ms&&0!==(e.expiredLanes&Rs)){var t=Rs,n=Cu(e,t);0!==(zs&Vs)&&(n=Cu(e,t=Lt(e,t)))}else n=Cu(e,t=Lt(e,0));if(0!==e.tag&&2===n&&(Ts|=64,e.hydrate&&(e.hydrate=!1,Gr(e.containerInfo)),0!==(t=It(e))&&(n=Cu(e,t))),1===n)throw n=Is,Eu(e,0),gu(e,t),mu(e,Ho()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tu(e),mu(e,Ho()),null}function ku(e,t){var n=Ts;Ts|=1;try{return e(t)}finally{0===(Ts=n)&&(Gs(),Ko())}}function wu(e,t){var n=Ts;Ts&=-2,Ts|=8;try{return e(t)}finally{0===(Ts=n)&&(Gs(),Ko())}}function xu(e,t){fo(Bs,Ps),Ps|=t,zs|=t}function Ou(){Ps=Bs.current,lo(Bs)}function Eu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Wr(n)),null!==Fs)for(n=Fs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bo();break;case 3:Ri(),lo(vo),lo(ho),Ji();break;case 5:Bi(r);break;case 4:Ri();break;case 13:case 19:lo(Li);break;case 10:oi(r);break;case 23:case 24:Ou()}n=n.return}Ms=e,Fs=Wu(e.current,null),Rs=Ps=zs=t,Ls=0,Is=null,$s=Vs=Us=0}function Du(e,t){for(;;){var n=Fs;try{if(ri(),Qi.current=Ta,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Zi=0,na=ta=ea=null,oa=!1,Ns.current=null,null===n||null===n.return){Ls=1,Is=t,Fs=null;break}e:{var i=e,a=n.return,s=n,u=t;if(t=Rs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.lanes=l.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&Li.current),d=a;do{var p;if(p=13===d.tag){var h=d.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var v=d.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var m=d.updateQueue;if(null===m){var y=new Set;y.add(c),d.updateQueue=y}else m.add(c);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var g=fi(-1,1);g.tag=2,di(s,g)}s.lanes|=1;break e}u=void 0,s=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new fs,u=new Set,b.set(c,u)):void 0===(u=b.get(c))&&(u=new Set,b.set(c,u)),!u.has(s)){u.add(s);var k=Uu.bind(null,i,c,s);c.then(k,k)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);u=Error((G(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ls&&(Ls=2),u=cs(u,s),d=a;do{switch(d.tag){case 3:i=u,d.flags|=4096,t&=-t,d.lanes|=t,pi(d,ds(0,i,t));break e;case 1:i=u;var w=d.type,x=d.stateNode;if(0===(64&d.flags)&&("function"===typeof w.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Xs||!Xs.has(x)))){d.flags|=4096,t&=-t,d.lanes|=t,pi(d,ps(d,i,t));break e}}d=d.return}while(null!==d)}Nu(n)}catch(O){t=O,Fs===n&&null!==n&&(Fs=n=n.return);continue}break}}function Su(){var e=As.current;return As.current=Ta,null===e?Ta:e}function Cu(e,t){var n=Ts;Ts|=16;var r=Su();for(Ms===e&&Rs===t||Eu(e,t);;)try{ju();break}catch(o){Du(e,o)}if(ri(),Ts=n,As.current=r,null!==Fs)throw Error(a(261));return Ms=null,Rs=0,Ls}function ju(){for(;null!==Fs;)Au(Fs)}function _u(){for(;null!==Fs&&!_o();)Au(Fs)}function Au(e){var t=Ys(e.alternate,e,Ps);e.memoizedProps=e.pendingProps,null===t?Nu(e):Fs=t,Ns.current=null}function Nu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Ps)))return void(Fs=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ps)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=us(t)))return n.flags&=2047,void(Fs=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Fs=t);Fs=t=e}while(null!==t);0===Ls&&(Ls=5)}function Tu(e){var t=qo();return Go(99,Mu.bind(null,e,t)),null}function Mu(e,t){do{Ru()}while(null!==eu);if(0!==(48&Ts))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<i;){var c=31-Ht(i),l=1<<c;o[c]=0,s[c]=-1,u[c]=-1,i&=~l}if(null!==ou&&0===(24&r)&&ou.has(e)&&ou.delete(e),e===Ms&&(Fs=Ms=null,Rs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Ts,Ts|=32,Ns.current=null,Ur=Kt,yr(s=mr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(l=u.getSelection&&u.getSelection())&&0!==l.rangeCount){u=l.anchorNode,i=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{u.nodeType,c.nodeType}catch(S){u=null;break e}var f=0,d=-1,p=-1,h=0,v=0,m=s,y=null;t:for(;;){for(var g;m!==u||0!==i&&3!==m.nodeType||(d=f+i),m!==c||0!==l&&3!==m.nodeType||(p=f+l),3===m.nodeType&&(f+=m.nodeValue.length),null!==(g=m.firstChild);)y=m,m=g;for(;;){if(m===s)break t;if(y===u&&++h===i&&(d=f),y===c&&++v===l&&(p=f),null!==(g=m.nextSibling))break;y=(m=y).parentNode}m=g}u=-1===d||-1===p?null:{start:d,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Vr={focusedElem:s,selectionRange:u},Kt=!1,lu=null,fu=!1,Ks=r;do{try{Fu()}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);lu=null,Ks=r;do{try{for(s=e;null!==Ks;){var b=Ks.flags;if(16&b&&ge(Ks.stateNode,""),128&b){var k=Ks.alternate;if(null!==k){var w=k.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:xs(Ks),Ks.flags&=-3;break;case 6:xs(Ks),Ks.flags&=-3,Ss(Ks.alternate,Ks);break;case 1024:Ks.flags&=-1025;break;case 1028:Ks.flags&=-1025,Ss(Ks.alternate,Ks);break;case 4:Ss(Ks.alternate,Ks);break;case 8:Ds(s,u=Ks);var x=u.alternate;ks(u),null!==x&&ks(x)}Ks=Ks.nextEffect}}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);if(w=Vr,k=mr(),b=w.focusedElem,s=w.selectionRange,k!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==s&&yr(b)&&(k=s.start,void 0===(w=s.end)&&(w=k),"selectionStart"in b?(b.selectionStart=k,b.selectionEnd=Math.min(w,b.value.length)):(w=(k=b.ownerDocument||document)&&k.defaultView||window).getSelection&&(w=w.getSelection(),u=b.textContent.length,x=Math.min(s.start,u),s=void 0===s.end?x:Math.min(s.end,u),!w.extend&&x>s&&(u=s,s=x,x=u),u=hr(b,x),i=hr(b,s),u&&i&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&((k=k.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),x>s?(w.addRange(k),w.extend(i.node,i.offset)):(k.setEnd(i.node,i.offset),w.addRange(k))))),k=[];for(w=b;w=w.parentNode;)1===w.nodeType&&k.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<k.length;b++)(w=k[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Kt=!!Ur,Vr=Ur=null,e.current=n,Ks=r;do{try{for(b=e;null!==Ks;){var O=Ks.flags;if(36&O&&ys(b,Ks.alternate,Ks),128&O){k=void 0;var E=Ks.ref;if(null!==E){var D=Ks.stateNode;Ks.tag,k=D,"function"===typeof E?E(k):E.current=k}}Ks=Ks.nextEffect}}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);Ks=null,Io(),Ts=o}else e.current=n;if(Zs)Zs=!1,eu=e,tu=t;else for(Ks=r;null!==Ks;)t=Ks.nextEffect,Ks.nextEffect=null,8&Ks.flags&&((O=Ks).sibling=null,O.stateNode=null),Ks=t;if(0===(r=e.pendingLanes)&&(Xs=null),1===r?e===au?iu++:(iu=0,au=e):iu=0,n=n.stateNode,Do&&"function"===typeof Do.onCommitFiberRoot)try{Do.onCommitFiberRoot(Eo,n,void 0,64===(64&n.current.flags))}catch(S){}if(mu(e,Ho()),Js)throw Js=!1,e=Qs,Qs=null,e;return 0!==(8&Ts)||Ko(),null}function Fu(){for(;null!==Ks;){var e=Ks.alternate;fu||null===lu||(0!==(8&Ks.flags)?et(Ks,lu)&&(fu=!0):13===Ks.tag&&js(e,Ks)&&et(Ks,lu)&&(fu=!0));var t=Ks.flags;0!==(256&t)&&ms(e,Ks),0===(512&t)||Zs||(Zs=!0,Yo(97,(function(){return Ru(),null}))),Ks=Ks.nextEffect}}function Ru(){if(90!==tu){var e=97<tu?97:tu;return tu=90,Go(e,Lu)}return!1}function Pu(e,t){nu.push(t,e),Zs||(Zs=!0,Yo(97,(function(){return Ru(),null})))}function Bu(e,t){ru.push(t,e),Zs||(Zs=!0,Yo(97,(function(){return Ru(),null})))}function Lu(){if(null===eu)return!1;var e=eu;if(eu=null,0!==(48&Ts))throw Error(a(331));var t=Ts;Ts|=32;var n=ru;ru=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===i)throw Error(a(330));zu(i,c)}}for(n=nu,nu=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var u=o.create;o.destroy=u()}catch(c){if(null===i)throw Error(a(330));zu(i,c)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return Ts=t,Ko(),!0}function Iu(e,t,n){di(e,t=ds(0,t=cs(n,t),1)),t=du(),null!==(e=vu(e,1))&&($t(e,1,t),mu(e,t))}function zu(e,t){if(3===e.tag)Iu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Iu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r))){var o=ps(n,e=cs(t,e),1);if(di(n,o),o=du(),null!==(n=vu(n,1)))$t(n,1,o),mu(n,o);else if("function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function Uu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=du(),e.pingedLanes|=e.suspendedLanes&n,Ms===e&&(Rs&n)===n&&(4===Ls||3===Ls&&(62914560&Rs)===Rs&&500>Ho()-qs?Eu(e,0):$s|=n),mu(e,t)}function Vu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===qo()?1:2:(0===uu&&(uu=zs),0===(t=Ut(62914560&~uu))&&(t=4194304))),n=du(),null!==(e=vu(e,t))&&($t(e,t,n),mu(e,n))}function $u(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hu(e,t,n,r){return new $u(e,t,n,r)}function qu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Wu(e,t){var n=e.alternate;return null===n?((n=Hu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gu(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)qu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case E:return Yu(n.children,o,i,t);case P:s=8,o|=16;break;case D:s=8,o|=1;break;case S:return(e=Hu(12,n,t,8|o)).elementType=S,e.type=S,e.lanes=i,e;case A:return(e=Hu(13,n,t,o)).type=A,e.elementType=A,e.lanes=i,e;case N:return(e=Hu(19,n,t,o)).elementType=N,e.lanes=i,e;case B:return Ku(n,o,i,t);case L:return(e=Hu(24,n,t,o)).elementType=L,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case j:s=9;break e;case _:s=11;break e;case T:s=14;break e;case M:s=16,r=null;break e;case F:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Hu(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Yu(e,t,n,r){return(e=Hu(7,e,r,t)).lanes=n,e}function Ku(e,t,n,r){return(e=Hu(23,e,r,t)).elementType=B,e.lanes=n,e}function Ju(e,t,n){return(e=Hu(6,e,null,t)).lanes=n,e}function Qu(e,t,n){return(t=Hu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xu(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Vt(0),this.expirationTimes=Vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vt(0),this.mutableSourceEagerHydrationData=null}function Zu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:O,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ec(e,t,n,r){var o=t.current,i=du(),s=pu(o);e:if(n){t:{if(Je(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(go(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(go(c)){n=wo(n,c,u);break e}}n=u}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=fi(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),di(o,t),hu(o,s,i),s}function tc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rc(e,t){nc(e,t),(e=e.alternate)&&nc(e,t)}function oc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xu(e,t,null!=n&&!0===n.hydrate),t=Hu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ci(t),e[eo]=n.current,Tr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ac(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=tc(a);s.call(e)}}ec(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new oc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var u=o;o=function(){var e=tc(a);u.call(e)}}wu((function(){ec(t,a,e,o)}))}return tc(a)}function sc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return Zu(e,t,null,n)}Ys=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||vo.current)Ba=!0;else{if(0===(n&r)){switch(Ba=!1,t.tag){case 3:Ga(t),Yi();break;case 5:Pi(t);break;case 1:go(t.type)&&xo(t);break;case 4:Fi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fo(Zo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Xa(e,t,n):(fo(Li,1&Li.current),null!==(t=is(e,t,n))?t.sibling:null);fo(Li,1&Li.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),fo(Li,Li.current),r)break;return null;case 23:case 24:return t.lanes=0,Va(e,t,n)}return is(e,t,n)}Ba=0!==(16384&e.flags)}else Ba=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=yo(t,ho.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,go(r)){var i=!0;xo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ci(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&yi(t,r,s,e),o.updater=gi,t.stateNode=o,o._reactInternals=t,xi(t,r,e,n),t=Wa(null,t,r,!0,i,n)}else t.tag=0,La(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return qu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===_)return 11;if(e===T)return 14}return 2}(o),e=Xo(o,e),i){case 0:t=Ha(null,t,o,e,n);break e;case 1:t=qa(null,t,o,e,n);break e;case 11:t=Ia(null,t,o,e,n);break e;case 14:t=za(null,t,o,Xo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ha(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 1:return r=t.type,o=t.pendingProps,qa(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 3:if(Ga(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,li(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Yi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Ui=Yr(t.stateNode.containerInfo.firstChild),zi=t,i=Vi=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Ki.push(i);for(n=ji(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else La(e,t,r,n),Yi();t=t.child}return t;case 5:return Pi(t),null===e&&qi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,Hr(r,o)?s=null:null!==i&&Hr(r,i)&&(t.flags|=16),$a(e,t),La(e,t,s,n),t.child;case 6:return null===e&&qi(t),null;case 13:return Xa(e,t,n);case 4:return Fi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ci(t,null,r,n):La(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ia(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 7:return La(e,t,t.pendingProps,n),t.child;case 8:case 12:return La(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(fo(Zo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0===(i=lr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!vo.current){t=is(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&i)){1===u.tag&&((l=fi(-1,n&-n)).tag=2,di(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),ii(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}La(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,La(e,t,r,n),t.child;case 14:return i=Xo(o=t.type,t.pendingProps),za(e,t,o,i=Xo(o.type,i),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,go(r)?(e=!0,xo(t)):e=!1,ai(t,n),ki(t,r,o),xi(t,r,o,n),Wa(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return Va(e,t,n)}throw Error(a(156,t.tag))},oc.prototype.render=function(e){ec(e,this._internalRoot,null,null)},oc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ec(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hu(e,4,du()),rc(e,4))},nt=function(e){13===e.tag&&(hu(e,67108864,du()),rc(e,67108864))},rt=function(e){if(13===e.tag){var t=du(),n=pu(e);hu(e,n,t),rc(e,n)}},ot=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Q(r),ne(r,o)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Me=ku,Fe=function(e,t,n,r,o){var i=Ts;Ts|=4;try{return Go(98,e.bind(null,t,n,r,o))}finally{0===(Ts=i)&&(Gs(),Ko())}},Re=function(){0===(49&Ts)&&(function(){if(null!==ou){var e=ou;ou=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,mu(e,Ho())}))}Ko()}(),Ru())},Pe=function(e,t){var n=Ts;Ts|=2;try{return e(t)}finally{0===(Ts=n)&&(Gs(),Ko())}};var uc={Events:[ro,oo,io,Ne,Te,Ru,{current:!1}]},cc={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},lc={bundleType:cc.bundleType,version:cc.version,rendererPackageName:cc.rendererPackageName,rendererConfig:cc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:cc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{Eo=fc.inject(lc),Do=fc}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uc,t.createPortal=sc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ts;if(0!==(48&n))return e(t);Ts|=1;try{if(e)return Go(99,e.bind(null,t))}finally{Ts=n,Ko()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(wu((function(){ac(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=ku,t.unstable_createPortal=function(e,t){return sc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ac(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(33)},function(e,t,n){"use strict";var r,o,i,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,d=function e(){if(null!==l)try{var n=t.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var v=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,y=null,g=-1,b=5,k=0;t.unstable_shouldYield=function(){return t.unstable_now()>=k},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,x=w.port2;w.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();k=e+b;try{y(!0,e)?x.postMessage(null):(m=!1,y=null)}catch(n){throw x.postMessage(null),n}}else m=!1},r=function(e){y=e,m||(m=!0,x.postMessage(null))},o=function(e,n){g=p((function(){e(t.unstable_now())}),n)},i=function(){h(g),g=-1}}function O(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<S(o,t)))break e;e[r]=t,e[n]=o,n=r}}function E(e){return void 0===(e=e[0])?null:e}function D(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>S(a,n))void 0!==u&&0>S(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],j=[],_=1,A=null,N=3,T=!1,M=!1,F=!1;function R(e){for(var t=E(j);null!==t;){if(null===t.callback)D(j);else{if(!(t.startTime<=e))break;D(j),t.sortIndex=t.expirationTime,O(C,t)}t=E(j)}}function P(e){if(F=!1,R(e),!M)if(null!==E(C))M=!0,r(B);else{var t=E(j);null!==t&&o(P,t.startTime-e)}}function B(e,n){M=!1,F&&(F=!1,i()),T=!0;var r=N;try{for(R(n),A=E(C);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"===typeof a){A.callback=null,N=A.priorityLevel;var s=a(A.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?A.callback=s:A===E(C)&&D(C),R(n)}else D(C);A=E(C)}if(null!==A)var u=!0;else{var c=E(j);null!==c&&o(P,c.startTime-n),u=!1}return u}finally{A=null,N=r,T=!1}}var L=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||T||(M=!0,r(B))},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_getFirstCallbackNode=function(){return E(C)},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=L,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:_++,callback:n,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(e.sortIndex=a,O(j,e),null===E(C)&&e===E(j)&&(F?i():F=!0,o(P,a-s))):(e.sortIndex=u,O(C,e),M||T||(M=!0,r(B))),e},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}}},function(e,t,n){"use strict";n(19);var r=n(2),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";e.exports=n(36)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,k=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case p:case y:case m:case c:return e;default:return t}}case i:return t}}}function O(e){return x(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||x(e)===f},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===u},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===u||e===s||e===h||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===k||e.$$typeof===w||e.$$typeof===g)},t.typeOf=x},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"FunctionToString",(function(){return ye})),n.d(r,"InboundFilters",(function(){return be}));var o=n(0);function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var a=n(2),s=n.n(a),u=n(11),c=n.n(u),l=n(4);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 d(){d=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(j){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new D(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(j){return{type:"throw",arg:j}}}e.wrap=u;var l={};function p(){}function h(){}function v(){}var m={};s(m,o,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(S([])));g&&g!==t&&n.call(g,o)&&(m=g);var b=v.prototype=p.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(o,i,a,s){var u=c(e[o],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==f(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=v,s(b,"constructor",v),s(v,"constructor",h),h.displayName=s(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},k(w.prototype),s(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new w(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(b),s(b,a,"Generator"),s(b,o,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}function p(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,s,"next",e)}function s(e){p(i,r,o,a,s,"throw",e)}a(void 0)}))}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function b(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function w(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(ur){return!1}}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e,t){if(t&&("object"===f(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function E(e){var t=w();return function(){var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}var D=n(2).createContext({site:{},member:{},action:"",brandColor:"",pageData:{},onAction:function(e,t){return{action:e,data:t}}}),S=n(1),C=["children","head","title","style","onResize"],j=function(e){b(n,e);var t=E(n);function n(){var e;v(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).handleLoad=function(){e.setupFrameBaseStyle()},e}return y(n,[{key:"componentDidMount",value:function(){this.node.addEventListener("load",this.handleLoad)}},{key:"componentWillUnmout",value:function(){this.node.removeEventListener("load",this.handleLoad)}},{key:"setupFrameBaseStyle",value:function(){var e=this;if(this.node.contentDocument){var t,n;if(this.iframeHtml=this.node.contentDocument.documentElement,this.iframeHead=this.node.contentDocument.head,this.iframeRoot=this.node.contentDocument.body,this.forceUpdate(),this.props.onResize)null===(t=new ResizeObserver((function(t){return e.props.onResize(e.iframeRoot)})))||void 0===t||null===(n=t.observe)||void 0===n||n.call(t,this.iframeRoot);this.node.contentWindow.addEventListener("keydown",(function(e){window.dispatchEvent(new KeyboardEvent("keydown",e))}))}}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.head,a=t.title,s=void 0===a?"":a,c=t.style,l=void 0===c?{}:c,f=(t.onResize,i(t,C));return Object(S.jsxs)("iframe",Object(o.a)(Object(o.a)({srcDoc:"<!DOCTYPE html>"},f),{},{ref:function(t){return e.node=t},title:s,style:l,frameBorder:"0",children:[this.iframeHead&&Object(u.createPortal)(r,this.iframeHead),this.iframeRoot&&Object(u.createPortal)(n,this.iframeRoot)]}))}}]),n}(a.Component),_=["children","type","style"],A=function(e){var t,n=e.children,r=e.type,s=e.style,u=i(e,_),c=Object(a.useContext)(D).stylesUrl,f="dynamic"===(r=null!==(t=r)&&void 0!==t?t:"dynamic")?{width:"100%",height:"400px"}:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},d=Object(a.useState)(f),p=Object(l.a)(d,2),h=p[0],v=p[1],m=Object(a.useState)(!1),y=Object(l.a)(m,2),g=y[0],b=y[1],k=Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("link",{rel:"stylesheet",href:c,onLoad:function(){b(!0)}}),Object(S.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n body, html {\n overflow: hidden;\n }\n "}}),Object(S.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}),w=Object(o.a)(Object(o.a)({},h),s);return Object(S.jsx)(j,Object(o.a)(Object(o.a)({},u),{},{head:k,style:w,onResize:"dynamic"===r?function(e){v((function(t){return Object(o.a)(Object(o.a)({},t),{},{height:"".concat(e.scrollHeight,"px")})}))}:null,children:g&&n}))},N=n(9),T=n(10),M=n(12);function F(){var e=Object(N.a)(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0".concat(t);return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function R(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function P(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function B(e){var t=e.message,n=e.event_id;if(t)return t;var r=P(e);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"<unknown>":n||"<unknown>"}function L(e,t,n){var r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function I(e,t){var n=P(e);if(n){var r=n.mechanism;if(n.mechanism=Object(o.a)(Object(o.a)(Object(o.a)({},{type:"generic",handled:!0}),r),t),t&&"data"in t){var i=Object(o.a)(Object(o.a)({},r&&r.data),t.data);n.mechanism.data=i}}}function z(e){if(e&&e.__sentry_captured__)return!0;try{Object(T.a)(e,"__sentry_captured__",!0)}catch(t){}return!1}var U,V=n(23),$=Object(N.a)(),H="Sentry Logger ",q=["debug","info","warn","error","log","assert","trace"];function W(e){var t=Object(N.a)();if(!("console"in t))return e();var n=t.console,r={};q.forEach((function(e){var o=n[e]&&n[e].__sentry_original__;e in t.console&&o&&(r[e]=n[e],n[e]=o)}));try{return e()}finally{Object.keys(r).forEach((function(e){n[e]=r[e]}))}}function G(){var e=!1,t={enable:function(){e=!0},disable:function(){e=!1}};return"undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?q.forEach((function(n){t[n]=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];e&&W((function(){var e;(e=$.console)[n].apply(e,["".concat(H,"[").concat(n,"]:")].concat(r))}))}})):q.forEach((function(e){t[e]=function(){}})),t}U="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Object(N.b)("logger",G):G();var Y,K=n(15),J=n(3),Q=n(5),X=n(7);function Z(e){return new te((function(t){t(e)}))}function ee(e){return new te((function(t,n){n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Y||(Y={}));var te=function(){function e(t){v(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(ur){this._reject(ur)}}return y(e,[{key:"__init",value:function(){this._state=Y.PENDING}},{key:"__init2",value:function(){this._handlers=[]}},{key:"then",value:function(t,n){var r=this;return new e((function(e,o){r._handlers.push([!1,function(n){if(t)try{e(t(n))}catch(ur){o(ur)}else e(n)},function(t){if(n)try{e(n(t))}catch(ur){o(ur)}else o(t)}]),r._executeHandlers()}))}},{key:"catch",value:function(e){return this.then((function(e){return e}),e)}},{key:"finally",value:function(t){var n=this;return new e((function(e,r){var o,i;return n.then((function(e){i=!1,o=e,t&&t()}),(function(e){i=!0,o=e,t&&t()})).then((function(){i?r(o):e(o)}))}))}},{key:"__init3",value:function(){var e=this;this._resolve=function(t){e._setResult(Y.RESOLVED,t)}}},{key:"__init4",value:function(){var e=this;this._reject=function(t){e._setResult(Y.REJECTED,t)}}},{key:"__init5",value:function(){var e=this;this._setResult=function(t,n){e._state===Y.PENDING&&(Object(X.n)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))}}},{key:"__init6",value:function(){var e=this;this._executeHandlers=function(){if(e._state!==Y.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t[0]||(e._state===Y.RESOLVED&&t[1](e._value),e._state===Y.REJECTED&&t[2](e._value),t[0]=!0)}))}}}}]),e}();function ne(e){var t=Object(V.b)(),n={sid:F(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:function(){return function(e){return Object(T.c)({sid:"".concat(e.sid),init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?"".concat(e.did):void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)}};return e&&re(n,e),n}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(V.b)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:F()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(t.did)),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}var oe=function(){function e(){v(this,e),this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return y(e,[{key:"addScopeListener",value:function(e){this._scopeListeners.push(e)}},{key:"addEventProcessor",value:function(e){return this._eventProcessors.push(e),this}},{key:"setUser",value:function(e){return this._user=e||{},this._session&&re(this._session,{user:e}),this._notifyScopeListeners(),this}},{key:"getUser",value:function(){return this._user}},{key:"getRequestSession",value:function(){return this._requestSession}},{key:"setRequestSession",value:function(e){return this._requestSession=e,this}},{key:"setTags",value:function(e){return this._tags=Object(o.a)(Object(o.a)({},this._tags),e),this._notifyScopeListeners(),this}},{key:"setTag",value:function(e,t){return this._tags=Object(o.a)(Object(o.a)({},this._tags),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setExtras",value:function(e){return this._extra=Object(o.a)(Object(o.a)({},this._extra),e),this._notifyScopeListeners(),this}},{key:"setExtra",value:function(e,t){return this._extra=Object(o.a)(Object(o.a)({},this._extra),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setFingerprint",value:function(e){return this._fingerprint=e,this._notifyScopeListeners(),this}},{key:"setLevel",value:function(e){return this._level=e,this._notifyScopeListeners(),this}},{key:"setTransactionName",value:function(e){return this._transactionName=e,this._notifyScopeListeners(),this}},{key:"setContext",value:function(e,t){return null===t?delete this._contexts[e]:this._contexts=Object(o.a)(Object(o.a)({},this._contexts),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setSpan",value:function(e){return this._span=e,this._notifyScopeListeners(),this}},{key:"getSpan",value:function(){return this._span}},{key:"getTransaction",value:function(){var e=this.getSpan();return e&&e.transaction}},{key:"setSession",value:function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}},{key:"getSession",value:function(){return this._session}},{key:"update",value:function(t){if(!t)return this;if("function"===typeof t){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=Object(o.a)(Object(o.a)({},this._tags),t._tags),this._extra=Object(o.a)(Object(o.a)({},this._extra),t._extra),this._contexts=Object(o.a)(Object(o.a)({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):Object(X.i)(t)&&(this._tags=Object(o.a)(Object(o.a)({},this._tags),t.tags),this._extra=Object(o.a)(Object(o.a)({},this._extra),t.extra),this._contexts=Object(o.a)(Object(o.a)({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}},{key:"clear",value:function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}},{key:"addBreadcrumb",value:function(e,t){var n="number"===typeof t?Math.min(t,100):100;if(n<=0)return this;var r=Object(o.a)({timestamp:Object(V.a)()},e);return this._breadcrumbs=[].concat(Object(J.a)(this._breadcrumbs),[r]).slice(-n),this._notifyScopeListeners(),this}},{key:"clearBreadcrumbs",value:function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}},{key:"addAttachment",value:function(e){return this._attachments.push(e),this}},{key:"getAttachments",value:function(){return this._attachments}},{key:"clearAttachments",value:function(){return this._attachments=[],this}},{key:"applyToEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._extra&&Object.keys(this._extra).length&&(e.extra=Object(o.a)(Object(o.a)({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=Object(o.a)(Object(o.a)({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=Object(o.a)(Object(o.a)({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=Object(o.a)(Object(o.a)({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=Object(o.a)({trace:this._span.getTraceContext()},e.contexts);var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags=Object(o.a)({transaction:n},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=[].concat(Object(J.a)(e.breadcrumbs||[]),Object(J.a)(this._breadcrumbs)),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata=Object(o.a)(Object(o.a)({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),this._notifyEventProcessors([].concat(Object(J.a)(ie()),Object(J.a)(this._eventProcessors)),e,t)}},{key:"setSDKProcessingMetadata",value:function(e){return this._sdkProcessingMetadata=Object(o.a)(Object(o.a)({},this._sdkProcessingMetadata),e),this}},{key:"_notifyEventProcessors",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new te((function(a,s){var u=e[i];if(null===t||"function"!==typeof u)a(t);else{var c=u(Object(o.a)({},t),n);("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&u.id&&null===c&&U.log('Event processor "'.concat(u.id,'" dropped event')),Object(X.n)(c)?c.then((function(t){return r._notifyEventProcessors(e,t,n,i+1).then(a)})).then(null,s):r._notifyEventProcessors(e,c,n,i+1).then(a).then(null,s)}}))}},{key:"_notifyScopeListeners",value:function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)}},{key:"_applyFingerprint",value:function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}],[{key:"clone",value:function(t){var n=new e;return t&&(n._breadcrumbs=Object(J.a)(t._breadcrumbs),n._tags=Object(o.a)({},t._tags),n._extra=Object(o.a)({},t._extra),n._contexts=Object(o.a)({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=Object(J.a)(t._eventProcessors),n._requestSession=t._requestSession,n._attachments=Object(J.a)(t._attachments)),n}}]),e}();function ie(){return Object(N.b)("globalEventProcessors",(function(){return[]}))}function ae(e){ie().push(e)}var se,ue=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new oe,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4;v(this,e),this._version=r,e.prototype.__init.call(this),this.getStackTop().scope=n,t&&this.bindClient(t)}return y(e,[{key:"__init",value:function(){this._stack=[{}]}},{key:"isOlderThan",value:function(e){return this._version<e}},{key:"bindClient",value:function(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}},{key:"pushScope",value:function(){var e=oe.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}},{key:"popScope",value:function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}},{key:"withScope",value:function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}},{key:"getClient",value:function(){return this.getStackTop().client}},{key:"getScope",value:function(){return this.getStackTop().scope}},{key:"getStack",value:function(){return this._stack}},{key:"getStackTop",value:function(){return this._stack[this._stack.length-1]}},{key:"captureException",value:function(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:F(),r=new Error("Sentry syntheticException");return this._withClient((function(i,a){i.captureException(e,Object(o.a)(Object(o.a)({originalException:e,syntheticException:r},t),{},{event_id:n}),a)})),n}},{key:"captureMessage",value:function(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:F(),i=new Error(e);return this._withClient((function(a,s){a.captureMessage(e,t,Object(o.a)(Object(o.a)({originalException:e,syntheticException:i},n),{},{event_id:r}),s)})),r}},{key:"captureEvent",value:function(e,t){var n=t&&t.event_id?t.event_id:F();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((function(r,i){r.captureEvent(e,Object(o.a)(Object(o.a)({},t),{},{event_id:n}),i)})),n}},{key:"lastEventId",value:function(){return this._lastEventId}},{key:"addBreadcrumb",value:function(e,t){var n=this.getStackTop(),r=n.scope,i=n.client;if(r&&i){var a=i.getOptions&&i.getOptions()||{},s=a.beforeBreadcrumb,u=void 0===s?null:s,c=a.maxBreadcrumbs,l=void 0===c?100:c;if(!(l<=0)){var f=Object(V.a)(),d=Object(o.a)({timestamp:f},e),p=u?W((function(){return u(d,t)})):d;null!==p&&r.addBreadcrumb(p,l)}}}},{key:"setUser",value:function(e){var t=this.getScope();t&&t.setUser(e)}},{key:"setTags",value:function(e){var t=this.getScope();t&&t.setTags(e)}},{key:"setExtras",value:function(e){var t=this.getScope();t&&t.setExtras(e)}},{key:"setTag",value:function(e,t){var n=this.getScope();n&&n.setTag(e,t)}},{key:"setExtra",value:function(e,t){var n=this.getScope();n&&n.setExtra(e,t)}},{key:"setContext",value:function(e,t){var n=this.getScope();n&&n.setContext(e,t)}},{key:"configureScope",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client;n&&r&&e(n)}},{key:"run",value:function(e){var t=le(this);try{e(this)}finally{le(t)}}},{key:"getIntegration",value:function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Cannot retrieve integration ".concat(e.id," from the current Hub")),null}}},{key:"startTransaction",value:function(e,t){return this._callExtensionMethod("startTransaction",e,t)}},{key:"traceHeaders",value:function(){return this._callExtensionMethod("traceHeaders")}},{key:"captureSession",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e)return this.endSession();this._sendSessionUpdate()}},{key:"endSession",value:function(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){var n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),re(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}},{key:"startSession",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client,i=r&&r.getOptions()||{},a=i.release,s=i.environment,u=(Object(N.a)().navigator||{}).userAgent,c=ne(Object(o.a)(Object(o.a)(Object(o.a)({release:a,environment:s},n&&{user:n.getUser()}),u&&{userAgent:u}),e));if(n){var l=n.getSession&&n.getSession();l&&"ok"===l.status&&re(l,{status:"exited"}),this.endSession(),n.setSession(c)}return c}},{key:"shouldSendDefaultPii",value:function(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}},{key:"_sendSessionUpdate",value:function(){var e=this.getStackTop(),t=e.scope,n=e.client;if(t){var r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}}},{key:"_withClient",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client;r&&e(r,n)}},{key:"_callExtensionMethod",value:function(e){var t=ce(),n=t.__SENTRY__;if(n&&n.extensions&&"function"===typeof n.extensions[e]){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.extensions[e].apply(this,o)}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Extension method ".concat(e," couldn't be found, doing nothing."))}}]),e}();function ce(){var e=Object(N.a)();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function le(e){var t=ce(),n=pe(t);return he(t,e),n}function fe(){var e=ce();return de(e)&&!pe(e).isOlderThan(4)||he(e,new ue),Object(K.b)()?function(e){try{var t=ce().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return pe(e);if(!de(n)||pe(n).isOlderThan(4)){var r=pe(e).getStackTop();he(n,new ue(r.client,oe.clone(r.scope)))}return pe(n)}catch(o){return pe(e)}}(e):pe(e)}function de(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function pe(e){return Object(N.b)("hub",(function(){return new ue}),e)}function he(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function ve(e,t){return fe().captureException(e,{captureContext:t})}function me(e){fe().withScope(e)}var ye=function(){function e(){v(this,e),e.prototype.__init.call(this)}return y(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){se=Function.prototype.toString,Function.prototype.toString=function(){for(var e=Object(T.f)(this)||this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return se.apply(e,n)}}}],[{key:"__initStatic",value:function(){this.id="FunctionToString"}}]),e}();ye.__initStatic();var ge=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],be=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v(this,e),this._options=t,e.prototype.__init.call(this)}return y(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(t,n){var r=function(t){var r=n();if(r){var o=r.getIntegration(e);if(o){var i=r.getClient(),a=i?i.getOptions():{},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[].concat(Object(J.a)(e.allowUrls||[]),Object(J.a)(t.allowUrls||[])),denyUrls:[].concat(Object(J.a)(e.denyUrls||[]),Object(J.a)(t.denyUrls||[])),ignoreErrors:[].concat(Object(J.a)(e.ignoreErrors||[]),Object(J.a)(t.ignoreErrors||[]),ge),ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(o._options,a);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(ur){}return!1}(e))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat(B(e))),!0;if(function(e,t){if(!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=void 0===n?"":n,o=t.value,i=void 0===o?"":o;return["".concat(i),"".concat(r,": ").concat(i)]}catch(a){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Cannot extract message for event ".concat(B(e))),[]}return[]}(e).some((function(e){return t.some((function(t){return Object(M.a)(e,t)}))}))}(e,t.ignoreErrors))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(B(e))),!0;if(function(e,t){if(!t||!t.length)return!1;var n=ke(e);return!!n&&t.some((function(e){return Object(M.a)(n,e)}))}(e,t.denyUrls))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(B(e),".\nUrl: ").concat(ke(e))),!0;if(!function(e,t){if(!t||!t.length)return!0;var n=ke(e);return!n||t.some((function(e){return Object(M.a)(n,e)}))}(e,t.allowUrls))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(B(e),".\nUrl: ").concat(ke(e))),!0;return!1}(t,s)?null:t}}return t};r.id=this.name,t(r)}}],[{key:"__initStatic",value:function(){this.id="InboundFilters"}}]),e}();function ke(e){try{var t;try{t=e.exception.values[0].stacktrace.frames}catch(ur){}return t?function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.length-1;t>=0;t--){var n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(n){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Cannot extract url for event ".concat(B(e))),null}}be.__initStatic();var we=[];function xe(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function Oe(e){var t=e.defaultIntegrations&&Object(J.a)(e.defaultIntegrations)||[],n=e.integrations,r=Object(J.a)(xe(t));Array.isArray(n)?r=[].concat(Object(J.a)(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))}))),Object(J.a)(xe(n))):"function"===typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o,i=r.map((function(e){return e.name})),a="Debug";-1!==i.indexOf(a)&&(o=r).push.apply(o,Object(J.a)(r.splice(i.indexOf(a),1)));return r}function Ee(e,t){!0===t.debug&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?U.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=fe(),r=n.getScope();r&&r.update(t.initialScope);var o=new e(t);n.bindClient(o)}function De(e,t,n){return De=w()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&g(o,n.prototype),o},De.apply(null,arguments)}function Se(e){var t="function"===typeof Map?new Map:void 0;return Se=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return De(e,arguments,k(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)},Se(e)}var Ce=function(e){b(n,e);var t=E(n);function n(e){var r;return v(this,n),(r=t.call(this,e)).message=e,r.name=(this instanceof n?this.constructor:void 0).prototype.constructor.name,Object.setPrototypeOf(x(r),(this instanceof n?this.constructor:void 0).prototype),r}return y(n)}(Se(Error)),je=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function _e(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.host,r=e.path,o=e.pass,i=e.port,a=e.projectId,s=e.protocol,u=e.publicKey;return"".concat(s,"://").concat(u).concat(t&&o?":".concat(o):"")+"@".concat(n).concat(i?":".concat(i):"","/").concat(r?"".concat(r,"/"):r).concat(a)}function Ae(e){var t=je.exec(e);if(!t)throw new Ce("Invalid Sentry Dsn: ".concat(e));var n=t.slice(1),r=Object(l.a)(n,6),o=r[0],i=r[1],a=r[2],s=void 0===a?"":a,u=r[3],c=r[4],f=void 0===c?"":c,d="",p=r[5],h=p.split("/");if(h.length>1&&(d=h.slice(0,-1).join("/"),p=h.pop()),p){var v=p.match(/^\d+/);v&&(p=v[0])}return Ne({host:u,pass:s,path:d,projectId:p,port:f,protocol:o,publicKey:i})}function Ne(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Te(e){var t="string"===typeof e?Ae(e):Ne(e);return function(e){if("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){var t=e.port,n=e.projectId,r=e.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(t){if(!e[t])throw new Ce("Invalid Sentry Dsn: ".concat(t," missing"))})),!n.match(/^\d+$/))throw new Ce("Invalid Sentry Dsn: Invalid projectId ".concat(n));if(!function(e){return"http"===e||"https"===e}(r))throw new Ce("Invalid Sentry Dsn: Invalid protocol ".concat(r));if(t&&isNaN(parseInt(t,10)))throw new Ce("Invalid Sentry Dsn: Invalid port ".concat(t))}}(t),t}function Me(e){var t=e.protocol?"".concat(e.protocol,":"):"",n=e.port?":".concat(e.port):"";return"".concat(t,"//").concat(e.host).concat(n).concat(e.path?"/".concat(e.path):"","/api/")}function Fe(e,t){return t||"".concat(function(e){return"".concat(Me(e)).concat(e.projectId,"/envelope/")}(e),"?").concat(function(e){return Object(T.h)({sentry_key:e.publicKey,sentry_version:"7"})}(e))}function Re(e,t){var n=Te(e),r="".concat(Me(n),"embed/error-page/"),o="dsn=".concat(_e(n));for(var i in t)if("dsn"!==i)if("user"===i){var a=t.user;if(!a)continue;a.name&&(o+="&name=".concat(encodeURIComponent(a.name))),a.email&&(o+="&email=".concat(encodeURIComponent(a.email)))}else o+="&".concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t[i]));return"".concat(r,"?").concat(o)}var Pe=n(16);function Be(){if(!("fetch"in Object(N.a)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(ur){return!1}}function Le(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var Ie,ze=n(6),Ue=Object(N.a)(),Ve={},$e={};function He(e){if(!$e[e])switch($e[e]=!0,e){case"console":!function(){if(!("console"in Ue))return;q.forEach((function(e){e in Ue.console&&Object(T.e)(Ue.console,e,(function(t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];We("console",{args:r,level:e}),t&&t.apply(Ue.console,r)}}))}))}();break;case"dom":!function(){if(!("document"in Ue))return;var e=We.bind(null,"dom"),t=Ze(e,!0);Ue.document.addEventListener("click",t,!1),Ue.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((function(t){var n=Ue[t]&&Ue[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(T.e)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{var i=this,a=i.__sentry_instrumentation_handlers__=i.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var u=Ze(e);s.handler=u,t.call(this,n,u,o)}s.refCount+=1}catch(ur){}return t.call(this,n,r,o)}})),Object(T.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{var o=this,i=o.__sentry_instrumentation_handlers__||{},a=i[t];a&&(a.refCount-=1,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete o.__sentry_instrumentation_handlers__)}catch(ur){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Ue))return;var e=XMLHttpRequest.prototype;Object(T.e)(e,"open",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this,i=n[1],a=o.__sentry_xhr__={method:Object(X.l)(n[0])?n[0].toUpperCase():n[0],url:n[1]};Object(X.l)(i)&&"POST"===a.method&&i.match(/sentry_key/)&&(o.__sentry_own_request__=!0);var s=function(){if(4===o.readyState){try{a.status_code=o.status}catch(ur){}We("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:o})}};return"onreadystatechange"in o&&"function"===typeof o.onreadystatechange?Object(T.e)(o,"onreadystatechange",(function(e){return function(){s();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(o,n)}})):o.addEventListener("readystatechange",s),e.apply(o,n)}})),Object(T.e)(e,"send",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.__sentry_xhr__&&void 0!==n[0]&&(this.__sentry_xhr__.body=n[0]),We("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),e.apply(this,n)}}))}();break;case"fetch":!function(){if(!function(){if(!Be())return!1;var e=Object(N.a)();if(Le(e.fetch))return!0;var t=!1,n=e.document;if(n&&"function"===typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Le(r.contentWindow.fetch)),n.head.removeChild(r)}catch(o){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",o)}return t}())return;Object(T.e)(Ue,"fetch",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i={args:n,fetchData:{method:Ge(n),url:Ye(n)},startTimestamp:Date.now()};return We("fetch",Object(o.a)({},i)),e.apply(Ue,n).then((function(e){return We("fetch",Object(o.a)(Object(o.a)({},i),{},{endTimestamp:Date.now(),response:e})),e}),(function(e){throw We("fetch",Object(o.a)(Object(o.a)({},i),{},{endTimestamp:Date.now(),error:e})),e}))}}))}();break;case"history":!function(){if(!function(){var e=Object(N.a)(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}())return;var e=Ue.onpopstate;function t(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length>2?n[2]:void 0;if(o){var i=Ie,a=String(o);Ie=a,We("history",{from:i,to:a})}return e.apply(this,n)}}Ue.onpopstate=function(){var t=Ue.location.href,n=Ie;if(Ie=t,We("history",{from:n,to:t}),e)try{for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(this,o)}catch(a){}},Object(T.e)(Ue.history,"pushState",t),Object(T.e)(Ue.history,"replaceState",t)}();break;case"error":et=Ue.onerror,Ue.onerror=function(e,t,n,r,o){return We("error",{column:r,error:o,line:n,msg:e,url:t}),!!et&&et.apply(this,arguments)};break;case"unhandledrejection":tt=Ue.onunhandledrejection,Ue.onunhandledrejection=function(e){return We("unhandledrejection",e),!tt||tt.apply(this,arguments)};break;default:return void(("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("unknown instrumentation type:",e))}}function qe(e,t){Ve[e]=Ve[e]||[],Ve[e].push(t),He(e)}function We(e,t){if(e&&Ve[e]){var n,r=Object(ze.a)(Ve[e]||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{o(t)}catch(ur){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Error while triggering instrumentation handler.\nType: ".concat(e,"\nName: ").concat(Object(Pe.b)(o),"\nError:"),ur)}}}catch(i){r.e(i)}finally{r.f()}}}function Ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"Request"in Ue&&Object(X.g)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"string"===typeof e[0]?e[0]:"Request"in Ue&&Object(X.g)(e[0],Request)?e[0].url:String(e[0])}var Ke,Je;function Qe(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(ur){}return!1}function Xe(e){if("keypress"!==e.type)return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(ur){}return!0}function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){if(n&&Je!==n&&!Xe(n)){var r="keypress"===n.type?"input":n.type;(void 0===Ke||Qe(Je,n))&&(e({event:n,name:r,global:t}),Je=n),clearTimeout(Ke),Ke=Ue.setTimeout((function(){Ke=void 0}),1e3)}}}var et=null;var tt=null;function nt(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=k(e)););return e}function rt(){return rt="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=nt(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},rt.apply(this,arguments)}var ot="7.5.0";function it(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[e,t]}function at(e,t){var n=Object(l.a)(e,2),r=n[0],o=n[1];return[r,[].concat(Object(J.a)(o),[t])]}function st(e,t){e[1].forEach((function(e){var n=e[0].type;t(e,n)}))}function ut(e,t){return(t||new TextEncoder).encode(e)}function ct(e,t){var n=Object(l.a)(e,2),r=n[0],o=n[1],i=JSON.stringify(r);function a(e){"string"===typeof i?i="string"===typeof e?i+e:[ut(i,t),e]:i.push("string"===typeof e?ut(e,t):e)}var s,u=Object(ze.a)(o);try{for(u.s();!(s=u.n()).done;){var c=s.value,f=Object(l.a)(c,2),d=f[0],p=f[1];a("\n".concat(JSON.stringify(d),"\n")),a("string"===typeof p||p instanceof Uint8Array?p:JSON.stringify(p))}}catch(h){u.e(h)}finally{u.f()}return"string"===typeof i?i:function(e){var t,n=e.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),o=0,i=Object(ze.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;r.set(a,o),o+=a.length}}catch(h){i.e(h)}finally{i.f()}return r}(i)}function lt(e,t){var n="string"===typeof e.data?ut(e.data,t):e.data;return[Object(T.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var ft={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function dt(e){return ft[e]}var pt=n(46);function ht(e){if(e&&e.sdk){var t=e.sdk;return{name:t.name,version:t.version}}}function vt(e,t,n,r){var i=ht(n),a=e.type||"event",s=(e.sdkProcessingMetadata||{}).transactionSampling||{},u=s.method,c=s.rate;!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[].concat(Object(J.a)(e.sdk.integrations||[]),Object(J.a)(t.integrations||[])),e.sdk.packages=[].concat(Object(J.a)(e.sdk.packages||[]),Object(J.a)(t.packages||[])))}(e,n&&n.sdk);var l=function(e,t,n,r){var i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baggage,a=i&&function(e){return e[0]}(i);return Object(o.a)(Object(o.a)(Object(o.a)({event_id:e.event_id,sent_at:(new Date).toISOString()},t&&{sdk:t}),!!n&&{dsn:_e(r)}),"transaction"===e.type&&a&&{trace:Object(T.c)(Object(o.a)({},a))})}(e,i,r,t);return delete e.sdkProcessingMetadata,it(l,[[{type:a,sample_rates:[{id:u,rate:c}]},e]])}var mt="Not capturing exception because it's already been captured.",yt=function(){function e(t){if(v(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._options=t,t.dsn){this._dsn=Te(t.dsn);var n=Fe(this._dsn,t.tunnel);this._transport=t.transport(Object(o.a)(Object(o.a)({recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{},{url:n}))}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("No DSN provided, client will not do anything.")}return y(e,[{key:"__init",value:function(){this._integrations={}}},{key:"__init2",value:function(){this._integrationsInitialized=!1}},{key:"__init3",value:function(){this._numProcessing=0}},{key:"__init4",value:function(){this._outcomes={}}},{key:"captureException",value:function(e,t,n){var r=this;if(!z(e)){var o=t&&t.event_id;return this._process(this.eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log(mt)}},{key:"captureMessage",value:function(e,t,n,r){var o=this,i=n&&n.event_id,a=Object(X.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i}},{key:"captureEvent",value:function(e,t,n){if(!(t&&t.originalException&&z(t.originalException))){var r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){r=e}))),r}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log(mt)}},{key:"captureSession",value:function(e){this._isEnabled()?"string"!==typeof e.release?("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),re(e,{init:!1})):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("SDK not enabled, will not capture session.")}},{key:"getDsn",value:function(){return this._dsn}},{key:"getOptions",value:function(){return this._options}},{key:"getTransport",value:function(){return this._transport}},{key:"flush",value:function(e){var t=this._transport;return t?this._isClientDoneProcessing(e).then((function(n){return t.flush(e).then((function(e){return n&&e}))})):Z(!0)}},{key:"close",value:function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))}},{key:"setupIntegrations",value:function(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){var t={};return e.forEach((function(e){t[e.name]=e,-1===we.indexOf(e.name)&&(e.setupOnce(ae,fe),we.push(e.name),("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Integration installed: ".concat(e.name)))})),t}(this._options.integrations),this._integrationsInitialized=!0)}},{key:"getIntegrationById",value:function(e){return this._integrations[e]}},{key:"getIntegration",value:function(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Cannot retrieve integration ".concat(e.id," from the current Client")),null}}},{key:"sendEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._dsn){var n,r=vt(e,this._dsn,this._options._metadata,this._options.tunnel),o=Object(ze.a)(t.attachments||[]);try{for(o.s();!(n=o.n()).done;){var i=n.value;r=at(r,lt(i,this._options.transportOptions&&this._options.transportOptions.textEncoder))}}catch(a){o.e(a)}finally{o.f()}this._sendEnvelope(r)}}},{key:"sendSession",value:function(e){if(this._dsn){var t=function(e,t,n,r){var i=ht(n);return it(Object(o.a)(Object(o.a)({sent_at:(new Date).toISOString()},i&&{sdk:i}),!!r&&{dsn:_e(t)}),["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}},{key:"recordDroppedEvent",value:function(e,t){if(this._options.sendClientReports){var n="".concat(e,":").concat(t);("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log('Adding outcome: "'.concat(n,'"')),this._outcomes[n]=this._outcomes[n]+1||1}}},{key:"_updateSessionFromEvent",value:function(e,t){var n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;var a,s=Object(ze.a)(i);try{for(s.s();!(a=s.n()).done;){var u=a.value.mechanism;if(u&&!1===u.handled){n=!0;break}}}catch(l){s.e(l)}finally{s.f()}}var c="ok"===e.status;(c&&0===e.errors||c&&n)&&(re(e,Object(o.a)(Object(o.a)({},n&&{status:"crashed"}),{},{errors:e.errors||Number(r||n)})),this.captureSession(e))}},{key:"_isClientDoneProcessing",value:function(e){var t=this;return new te((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))}},{key:"_isEnabled",value:function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}},{key:"_prepareEvent",value:function(e,t,n){var r=this,i=this.getOptions(),a=i.normalizeDepth,s=void 0===a?3:a,u=i.normalizeMaxBreadth,c=void 0===u?1e3:u,l=Object(o.a)(Object(o.a)({},e),{},{event_id:e.event_id||t.event_id||F(),timestamp:e.timestamp||Object(V.a)()});this._applyClientOptions(l),this._applyIntegrationsMetadata(l);var f=n;t.captureContext&&(f=oe.clone(f).update(t.captureContext));var d=Z(l);if(f){var p=[].concat(Object(J.a)(t.attachments||[]),Object(J.a)(f.getAttachments()));p.length&&(t.attachments=p),d=f.applyToEvent(l,t)}return d.then((function(e){return"number"===typeof s&&s>0?r._normalizeEvent(e,s,c):e}))}},{key:"_normalizeEvent",value:function(e,t,n){if(!e)return null;var r=Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return Object(o.a)(Object(o.a)({},e),e.data&&{data:Object(pt.a)(e.data,t,n)})}))}),e.user&&{user:Object(pt.a)(e.user,t,n)}),e.contexts&&{contexts:Object(pt.a)(e.contexts,t,n)}),e.extra&&{extra:Object(pt.a)(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(pt.a)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((function(e){return e.data&&(e.data=Object(pt.a)(e.data,t,n)),e}))),r}},{key:"_applyClientOptions",value:function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Object(M.d)(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(M.d)(s.value,a));var u=e.request;u&&u.url&&(u.url=Object(M.d)(u.url,a))}},{key:"_applyIntegrationsMetadata",value:function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[].concat(Object(J.a)(e.sdk.integrations||[]),Object(J.a)(t)))}},{key:"_captureEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn(e)}))}},{key:"_processEvent",value:function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;if(!this._isEnabled())return ee(new Ce("SDK not enabled, will not capture event."));var s="transaction"===e.type;return!s&&"number"===typeof a&&Math.random()>a?(this.recordDroppedEvent("sample_rate","error"),ee(new Ce("Discarding event because it's not included in the random sample (sampling rate = ".concat(a,")")))):this._prepareEvent(e,t,n).then((function(n){if(null===n)throw r.recordDroppedEvent("event_processor",e.type||"error"),new Ce("An event processor returned null, will not send event.");return t.data&&!0===t.data.__sentry__||s||!i?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Object(X.n)(e))return e.then((function(e){if(!Object(X.i)(e)&&null!==e)throw new Ce(t);return e}),(function(e){throw new Ce("beforeSend rejected with ".concat(e))}));if(!Object(X.i)(e)&&null!==e)throw new Ce(t);return e}(i(n,t))})).then((function(o){if(null===o)throw r.recordDroppedEvent("before_send",e.type||"error"),new Ce("`beforeSend` returned `null`, will not send event.");var i=n&&n.getSession();return!s&&i&&r._updateSessionFromEvent(i,o),r.sendEvent(o,t),o})).then(null,(function(e){if(e instanceof Ce)throw e;throw r.captureException(e,{data:{__sentry__:!0},originalException:e}),new Ce("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(e))}))}},{key:"_process",value:function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))}},{key:"_sendEnvelope",value:function(e){this._transport&&this._dsn?this._transport.send(e).then(null,(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Error while sending event:",e)})):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Transport disabled")}},{key:"_clearOutcomes",value:function(){var e=this._outcomes;return this._outcomes={},Object.keys(e).map((function(t){var n=t.split(":"),r=Object(l.a)(n,2);return{reason:r[0],category:r[1],quantity:e[t]}}))}}]),e}();function gt(e,t){var n=kt(e,t),r={type:t&&t.name,value:xt(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function bt(e,t){return{exception:{values:[gt(e,t)]}}}function kt(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"===typeof e.framesToPop)return e.framesToPop;if(wt.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(ur){}return[]}var wt=/Minified React error #\d+;/i;function xt(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=r&&r.syntheticException||void 0,a=Dt(e,t,i,o);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Z(a)}function Et(e,t,n,r,i){var a;if(Object(X.e)(t)&&t.error)return bt(e,t.error);if(Object(X.a)(t)||Object(X.b)(t)){var s=t;if("stack"in t)a=bt(e,t);else{var u=s.name||(Object(X.a)(s)?"DOMError":"DOMException"),c=s.message?"".concat(u,": ").concat(s.message):u;L(a=Dt(e,c,n,r),c)}return"code"in s&&(a.tags=Object(o.a)(Object(o.a)({},a.tags),{},{"DOMException.code":"".concat(s.code)})),a}return Object(X.d)(t)?bt(e,t):Object(X.i)(t)||Object(X.f)(t)?(a=function(e,t,n,r){var o={exception:{values:[{type:Object(X.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:"Non-Error ".concat(r?"promise rejection":"exception"," captured with keys: ").concat(Object(T.d)(t))}]},extra:{__serialized__:Object(pt.b)(t)}};if(n){var i=kt(e,n);i.length&&(o.exception.values[0].stacktrace={frames:i})}return o}(e,t,n,i),I(a,{synthetic:!0}),a):(L(a=Dt(e,t,n,r),"".concat(t),void 0),I(a,{synthetic:!0}),a)}function Dt(e,t,n,r){var o={message:t};if(r&&n){var i=kt(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]})}return o}var St=n(25),Ct=["fatal","error","warning","log","info","debug"];function jt(e){return"warn"===e?"warning":Ct.includes(e)?e:"log"}var _t="Breadcrumbs",At=function(){function e(t){v(this,e),e.prototype.__init.call(this),this.options=Object(o.a)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return y(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){this.options.console&&qe("console",Nt),this.options.dom&&qe("dom",function(e){function t(t){var n,r="object"===typeof e?e.serializeAttribute:void 0;"string"===typeof r&&(r=[r]);try{n=t.event.target?Object(St.b)(t.event.target,r):Object(St.b)(t.event,r)}catch(ur){n="<unknown>"}0!==n.length&&fe().addBreadcrumb({category:"ui.".concat(t.name),message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&qe("xhr",Tt),this.options.fetch&&qe("fetch",Mt),this.options.history&&qe("history",Ft)}}],[{key:"__initStatic",value:function(){this.id=_t}}]),e}();function Nt(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:jt(e.level),message:Object(M.b)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: ".concat(Object(M.b)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}fe().addBreadcrumb(t,{input:e.args,level:e.level})}function Tt(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;fe().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;}function Mt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?fe().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):fe().addBreadcrumb({category:"fetch",data:Object(o.a)(Object(o.a)({},e.fetchData),{},{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function Ft(e){var t=Object(N.a)(),n=e.from,r=e.to,o=R(t.location.href),i=R(n),a=R(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),fe().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}At.__initStatic();var Rt,Pt=Object(N.a)();function Bt(){if(Rt)return Rt;if(Le(Pt.fetch))return Rt=Pt.fetch.bind(Pt);var e=Pt.document,t=Pt.fetch;if(e&&"function"===typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(ur){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",ur)}return Rt=t.bind(Pt)}var Lt=Object(N.a)(),It=function(e){b(n,e);var t=E(n);function n(e){var r;return v(this,n),e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:ot}],version:ot},r=t.call(this,e),e.sendClientReports&&Lt.document&&Lt.document.addEventListener("visibilitychange",(function(){"hidden"===Lt.document.visibilityState&&r._flushOutcomes()})),r}return y(n,[{key:"eventFromException",value:function(e,t){return function(e,t,n,r){var o=Et(e,t,n&&n.syntheticException||void 0,r);return I(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Z(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}},{key:"eventFromMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return Ot(this._options.stackParser,e,t,n,this._options.attachStacktrace)}},{key:"sendEvent",value:function(e,t){var r=this.getIntegrationById(_t);r&&r.options&&r.options.sentry&&fe().addBreadcrumb({category:"sentry.".concat("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:B(e)},{event:e}),rt(k(n.prototype),"sendEvent",this).call(this,e,t)}},{key:"_prepareEvent",value:function(e,t,r){return e.platform=e.platform||"javascript",rt(k(n.prototype),"_prepareEvent",this).call(this,e,t,r)}},{key:"_flushOutcomes",value:function(){var e=this._clearOutcomes();if(0!==e.length)if(this._dsn){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Sending outcomes:",e);var t,n,r,o=Fe(this._dsn,this._options.tunnel),i=(t=e,it((n=this._options.tunnel&&_e(this._dsn))?{dsn:n}:{},[[{type:"client_report"},{timestamp:r||Object(V.a)(),discarded_events:t}]]));try{!function(e,t){"[object Navigator]"===Object.prototype.toString.call(Pt&&Pt.navigator)&&"function"===typeof Pt.navigator.sendBeacon?Pt.navigator.sendBeacon.bind(Pt.navigator)(e,t):Be()&&Bt()(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error(e)}))}(o,ct(i))}catch(ur){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error(ur)}}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("No dsn provided, will not send outcomes");else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("No outcomes to send")}}]),n}(yt),zt=0;function Ut(){return zt>0}function Vt(){zt+=1,setTimeout((function(){zt-=1}))}function $t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("function"!==typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(Object(T.f)(e))return e}catch(ur){return e}var i=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var i=r.map((function(e){return $t(e,t)}));return e.apply(this,i)}catch(a){throw Vt(),me((function(e){e.addEventProcessor((function(e){return t.mechanism&&(L(e,void 0,void 0),I(e,t.mechanism)),e.extra=Object(o.a)(Object(o.a)({},e.extra),{},{arguments:r}),e})),ve(a)})),a}};try{for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=e[a])}catch(u){}Object(T.g)(i,e),Object(T.a)(e,"__sentry_wrapped__",i);try{var s=Object.getOwnPropertyDescriptor(i,"name");s.configurable&&Object.defineProperty(i,"name",{get:function(){return e.name}})}catch(u){}return i}var Ht="?";function qt(e,t,n,r){var o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var Wt=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Gt=/\((\S*)(?::(\d+))(?::(\d+))\)/,Yt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Kt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Jt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Qt=[[30,function(e){var t=Wt.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=Gt.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}var r=Zt(t[1]||Ht,t[2]),o=Object(l.a)(r,2),i=o[0];return qt(o[1],i,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,function(e){var t=Yt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Kt.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],o=t[1]||Ht,i=Zt(o,r),a=Object(l.a)(i,2);return o=a[0],qt(r=a[1],o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,function(e){var t=Jt.exec(e);return t?qt(t[2],t[1]||Ht,+t[3],t[4]?+t[4]:void 0):void 0}]],Xt=Pe.a.apply(void 0,Qt),Zt=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Ht,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},en=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],tn=function(){function e(t){v(this,e),e.prototype.__init.call(this),this._options=Object(o.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return y(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){var e=Object(N.a)();this._options.setTimeout&&Object(T.e)(e,"setTimeout",nn),this._options.setInterval&&Object(T.e)(e,"setInterval",nn),this._options.requestAnimationFrame&&Object(T.e)(e,"requestAnimationFrame",rn),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Object(T.e)(XMLHttpRequest.prototype,"send",on);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:en).forEach(an)}}],[{key:"__initStatic",value:function(){this.id="TryCatch"}}]),e}();function nn(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];return n[0]=$t(o,{mechanism:{data:{function:Object(Pe.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,n)}}function rn(e){return function(t){return e.apply(this,[$t(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(Pe.b)(e)},handled:!0,type:"instrument"}})])}}function on(e){return function(){var t=this,n=["onload","onerror","onprogress","onreadystatechange"];n.forEach((function(e){e in t&&"function"===typeof t[e]&&Object(T.e)(t,e,(function(t){var n={mechanism:{data:{function:e,handler:Object(Pe.b)(t)},handled:!0,type:"instrument"}},r=Object(T.f)(t);return r&&(n.mechanism.data.handler=Object(Pe.b)(r)),$t(t,n)}))}));for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(this,o)}}function an(e){var t=Object(N.a)(),n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(T.e)(n,"addEventListener",(function(t){return function(n,r,o){try{"function"===typeof r.handleEvent&&(r.handleEvent=$t(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(Pe.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(i){}return t.apply(this,[n,$t(r,{mechanism:{data:{function:"addEventListener",handler:Object(Pe.b)(r),target:e},handled:!0,type:"instrument"}}),o])}})),Object(T.e)(n,"removeEventListener",(function(e){return function(t,n,r){var o=n;try{var i=o&&o.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(ur){}return e.call(this,t,o,r)}})))}tn.__initStatic();var sn=function(){function e(t){v(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),this._options=Object(o.a)({onerror:!0,onunhandledrejection:!0},t)}return y(e,[{key:"__init",value:function(){this.name=e.id}},{key:"__init2",value:function(){this._installFunc={onerror:un,onunhandledrejection:cn}}},{key:"setupOnce",value:function(){Error.stackTraceLimit=50;var e,t=this._options;for(var n in t){var r=this._installFunc[n];r&&t[n]&&(e=n,("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Global Handler attached: ".concat(e)),r(),this._installFunc[n]=void 0)}}}],[{key:"__initStatic",value:function(){this.id="GlobalHandlers"}}]),e}();function un(){qe("error",(function(e){var t=dn(),n=Object(l.a)(t,3),r=n[0],o=n[1],i=n[2];if(r.getIntegration(sn)){var a=e.msg,s=e.url,u=e.line,c=e.column,f=e.error;if(!(Ut()||f&&f.__sentry_own_request__)){var d=void 0===f&&Object(X.l)(a)?function(e,t,n,r){var o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Object(X.e)(e)?e.message:e,a="Error",s=i.match(o);s&&(a=s[1],i=s[2]);return ln({exception:{values:[{type:a,value:i}]}},t,n,r)}(a,s,u,c):ln(Et(o,f||a,void 0,i,!1),s,u,c);d.level="error",fn(r,f,d,"onerror")}}}))}function cn(){qe("unhandledrejection",(function(e){var t=dn(),n=Object(l.a)(t,3),r=n[0],o=n[1],i=n[2];if(r.getIntegration(sn)){var a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch(u){}if(Ut()||a&&a.__sentry_own_request__)return!0;var s=Object(X.j)(a)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(a))}]}}:Et(o,a,void 0,i,!0);s.level="error",fn(r,a,s,"onunhandledrejection")}}))}function ln(e,t,n,r){var o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},u=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,f=Object(X.l)(t)&&t.length>0?t:Object(St.a)();return 0===u.length&&u.push({colno:c,filename:f,function:"?",in_app:!0,lineno:l}),e}function fn(e,t,n,r){I(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function dn(){var e=fe(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:function(){return[]},attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}sn.__initStatic();var pn="cause",hn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v(this,e),e.prototype.__init.call(this),this._key=t.key||pn,this._limit=t.limit||5}return y(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){var t=fe().getClient();t&&ae((function(n,r){var o=fe().getIntegration(e);return o?function(e,t,n,r,o){if(!r.exception||!r.exception.values||!o||!Object(X.g)(o.originalException,Error))return r;var i=vn(e,n,o.originalException,t);return r.exception.values=[].concat(Object(J.a)(i),Object(J.a)(r.exception.values)),r}(t.getOptions().stackParser,o._key,o._limit,n,r):n}))}}],[{key:"__initStatic",value:function(){this.id="LinkedErrors"}}]),e}();function vn(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(!Object(X.g)(n[r],Error)||o.length+1>=t)return o;var i=gt(e,n[r]);return vn(e,t,n[r],r,[i].concat(Object(J.a)(o)))}hn.__initStatic();var mn=function(){function e(){v(this,e),e.prototype.__init.call(this)}return y(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(t,n){var r=function(t){var r=n().getIntegration(e);if(r){try{if(function(e,t){if(!t)return!1;if(function(e,t){var n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!gn(e,t))return!1;if(!yn(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){var n=bn(t),r=bn(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!gn(e,t))return!1;if(!yn(e,t))return!1;return!0}(e,t))return!0;return!1}(t,r._previousEvent))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){return r._previousEvent=t}return r._previousEvent=t}return t};r.id=this.name,t(r)}}],[{key:"__initStatic",value:function(){this.id="Dedupe"}}]),e}();function yn(e,t){var n=kn(e),r=kn(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++){var i=r[o],a=n[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function gn(e,t){var n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(o){return!1}}function bn(e){return e.exception&&e.exception.values&&e.exception.values[0]}function kn(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}mn.__initStatic();var wn=Object(N.a)(),xn=function(){function e(){v(this,e),e.prototype.__init.call(this)}return y(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){ae((function(t){if(fe().getIntegration(e)){if(!wn.navigator&&!wn.location&&!wn.document)return t;var n=t.request&&t.request.url||wn.location&&wn.location.href,r=(wn.document||{}).referrer,i=(wn.navigator||{}).userAgent,a=Object(o.a)(Object(o.a)(Object(o.a)({},t.request&&t.request.headers),r&&{Referer:r}),i&&{"User-Agent":i}),s=Object(o.a)(Object(o.a)({},n&&{url:n}),{},{headers:a});return Object(o.a)(Object(o.a)({},t),{},{request:s})}return t}))}}],[{key:"__initStatic",value:function(){this.id="HttpContext"}}]),e}();function On(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ee(new Ce("Not adding Promise due to buffer limit reached."));var o=r();return-1===t.indexOf(o)&&t.push(o),o.then((function(){return n(o)})).then(null,(function(){return n(o).then(null,(function(){}))})),o},drain:function(e){return new te((function(n,r){var o=t.length;if(!o)return n(!0);var i=setTimeout((function(){e&&e>0&&n(!1)}),e);t.forEach((function(e){Z(e).then((function(){--o||(clearTimeout(i),n(!0))}),r)}))}))}}}xn.__initStatic();function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),n=parseInt("".concat(e),10);if(!isNaN(n))return 1e3*n;var r=Date.parse("".concat(e));return isNaN(r)?6e4:r-t}function Dn(e,t){return e[t]||e.all||0}function Sn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return Dn(e,t)>n}function Cn(e,t){var n=t.statusCode,r=t.headers,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now(),a=Object(o.a)({},e),s=r&&r["x-sentry-rate-limits"],u=r&&r["retry-after"];if(s){var c,f=Object(ze.a)(s.trim().split(","));try{for(f.s();!(c=f.n()).done;){var d=c.value,p=d.split(":",2),h=Object(l.a)(p,2),v=h[0],m=h[1],y=parseInt(v,10),g=1e3*(isNaN(y)?60:y);if(m){var b,k=Object(ze.a)(m.split(";"));try{for(k.s();!(b=k.n()).done;){var w=b.value;a[w]=i+g}}catch(x){k.e(x)}finally{k.f()}}else a.all=i+g}}catch(x){f.e(x)}finally{f.f()}}else u?a.all=i+En(u,i):429===n&&(a.all=i+6e4);return a}function jn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:On(e.bufferSize||30),r={},o=function(e){return n.drain(e)};function i(o){var i=[];if(st(o,(function(t,n){var o=dt(n);Sn(r,o)?e.recordDroppedEvent("ratelimit_backoff",o):i.push(t)})),0===i.length)return Z();var a=it(o[0],i),s=function(t){st(a,(function(n,r){e.recordDroppedEvent(t,dt(r))}))};return n.add((function(){return t({body:ct(a,e.textEncoder)}).then((function(e){void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Sentry responded with status code ".concat(e.statusCode," to sent event.")),r=Cn(r,e)}),(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Failed while sending event:",e),s("network_error")}))})).then((function(e){return e}),(function(e){if(e instanceof Ce)return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Skipped sending event due to full buffer"),s("queue_overflow"),Z();throw e}))}return{send:i,flush:o}}function _n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bt();function n(n){var r=Object(o.a)({body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers},e.fetchOptions);return t(e.url,r).then((function(e){return{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}}))}return jn(e,n)}function An(e){return jn(e,(function(t){return new te((function(n,r){var o=new XMLHttpRequest;for(var i in o.onerror=r,o.onreadystatechange=function(){4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&o.setRequestHeader(i,e.headers[i]);o.send(t.body)}))}))}var Nn=[new r.InboundFilters,new r.FunctionToString,new tn,new At,new sn,new hn,new mn,new xn];function Tn(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function Mn(){if("undefined"!==typeof Object(N.a)().document){var e=fe();e.captureSession&&(Tn(e),qe("history",(function(e){var t=e.from,n=e.to;void 0!==t&&t!==n&&Tn(fe())})))}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")}n(22);var Fn={componentStack:null,error:null,eventId:null},Rn=function(e){b(n,e);var t=E(n);function n(){var e;v(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),n.prototype.__init.call(x(e)),n.prototype.__init2.call(x(e)),e}return y(n,[{key:"__init",value:function(){this.state=Fn}},{key:"componentDidCatch",value:function(e,t){var n=this,r=t.componentStack,i=this.props,s=i.beforeCapture,u=i.onError,c=i.showDialog,l=i.dialogOptions;me((function(t){if(function(e){var t=e.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}(a.version)){var i=new Error(e.message);i.name="React ErrorBoundary ".concat(i.name),i.stack=r,e.cause=i}s&&s(t,e,r);var f=ve(e,{contexts:{react:{componentStack:r}}});u&&u(e,r,f),c&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe(),n=Object(N.a)();if(n.document){var r=t.getStackTop(),i=r.client,a=r.scope,s=e.dsn||i&&i.getDsn();if(s){a&&(e.user=Object(o.a)(Object(o.a)({},a.getUser()),e.user)),e.eventId||(e.eventId=t.lastEventId());var u=n.document.createElement("script");u.async=!0,u.src=Re(s,e),e.onLoad&&(u.onload=e.onLoad);var c=n.document.head||n.document.body;c?c.appendChild(u):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Not injecting report dialog. No injection point found in HTML")}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("DSN not configured for showReportDialog call")}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Global document not defined in showReportDialog call")}(Object(o.a)(Object(o.a)({},l),{},{eventId:f})),n.setState({error:e,componentStack:r,eventId:f})}))}},{key:"componentDidMount",value:function(){var e=this.props.onMount;e&&e()}},{key:"componentWillUnmount",value:function(){var e=this.state,t=e.error,n=e.componentStack,r=e.eventId,o=this.props.onUnmount;o&&o(t,n,r)}},{key:"__init2",value:function(){var e=this;this.resetErrorBoundary=function(){var t=e.props.onReset,n=e.state,r=n.error,o=n.componentStack,i=n.eventId;t&&t(r,o,i),e.setState(Fn)}}},{key:"render",value:function(){var e=this.props,t=e.fallback,n=e.children,r=this.state,o=r.error,i=r.componentStack,s=r.eventId;if(o){var u=void 0;return u="function"===typeof t?t({error:o,componentStack:i,resetError:this.resetErrorBoundary,eventId:s}):t,a.isValidElement(u)?u:(t&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("fallback did not produce a valid ReactElement"),null)}return"function"===typeof n?n():n}}]),n}(a.Component);function Pn(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:ot}],version:ot},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=Nn),void 0===e.release){var t=Object(N.a)();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);var n=Object(o.a)(Object(o.a)({},e),{},{stackParser:Object(Pe.c)(e.stackParser||Xt),integrations:Oe(e),transport:e.transport||(Be()?_n:An)});Ee(It,n),e.autoSessionTracking&&Mn()}(e)}function Bn(){return(Bn=h(d().mark((function e(t){var n,r,o,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=1,n.pagination&&n.pagination.page&&(o=n.pagination.page+1),e.next=5,r.comments.browse({page:o,postId:n.postId});case 5:return i=e.sent,e.abrupt("return",{comments:[].concat(Object(J.a)(n.comments),Object(J.a)(i.comments)),pagination:i.meta.pagination});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ln(){return(Ln=h(d().mark((function e(t){var n,r,i,a,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.add({comment:i});case 3:return a=e.sent,i=a.comments[0],s=Object(o.a)(Object(o.a)({},i),{},{member:n.member,replies:[]}),e.abrupt("return",{comments:[s].concat(Object(J.a)(n.comments)),commentCount:n.commentCount+1});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function In(){return(In=h(d().mark((function e(t){var n,r,i,a,s,u,c;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,a=i.reply,s=i.parent,(u=a).parent_id=s.id,e.next=5,r.comments.add({comment:u});case 5:return c=e.sent,u=c.comments[0],u=Object(o.a)(Object(o.a)({},u),{},{member:n.member}),e.abrupt("return",{comments:n.comments.map((function(e){return e.id===s.id?Object(o.a)(Object(o.a)({},s),{},{replies:[].concat(Object(J.a)(s.replies),[u])}):e})),commentCount:n.commentCount+1});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(){return(zn=h(d().mark((function e(t){var n,r,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.adminApi,i=t.data,e.next=3,r.hideComment(i.id);case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"hidden"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"hidden",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})})),commentCount:n.commentCount-1});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Un(){return(Un=h(d().mark((function e(t){var n,r,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.adminApi,i=t.data,e.next=3,r.showComment(i.id);case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"published"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"published",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})})),commentCount:n.commentCount+1});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vn(){return(Vn=h(d().mark((function e(t){var n,r,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.like({comment:i});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!0,likes_count:e.likes_count+1}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!0,likes_count:e.likes_count+1,replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $n(){return($n=h(d().mark((function e(t){var n,r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.state,n=t.api,r=t.data,e.next=3,n.comments.report({comment:r});case 3:return e.abrupt("return",{});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hn(){return(Hn=h(d().mark((function e(t){var n,r,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.unlike({comment:i});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!1,likes_count:e.likes_count-1}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!1,likes_count:e.likes_count-1,replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qn(){return(qn=h(d().mark((function e(t){var n,r,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.edit({comment:{id:i.id,status:"deleted"}});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"deleted"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"deleted",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})})),commentCount:n.commentCount-1});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wn(){return(Wn=h(d().mark((function e(t){var n,r,i,a,s,u;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,a=i.comment,s=i.parent,e.next=3,r.comments.edit({comment:a});case 3:return u=e.sent,a=u.comments[0],e.abrupt("return",{comments:n.comments.map((function(e){return s&&s.id===e.id?Object(o.a)(Object(o.a)({},e),{},{replies:e.replies.map((function(e){return e.id===a.id?a:e}))}):e.id===a.id?a:e}))});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gn(){return(Gn=h(d().mark((function e(t){var n,r,o,i,a,s,u,c,l,f,p;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.data,i=t.state,a=t.api,s=o.name,u=o.bio,c={},l=null===i||void 0===i||null===(n=i.member)||void 0===n?void 0:n.name,s&&l!==s&&(c.name=s),f=null===i||void 0===i||null===(r=i.member)||void 0===r?void 0:r.bio,void 0!==u&&f!==u&&(c.bio=u),!(Object.keys(c).length>0)){e.next=20;break}return e.prev=8,e.next=11,a.member.update(c);case 11:if(p=e.sent){e.next=14;break}throw new Error("Failed to update member");case 14:return e.abrupt("return",{member:p,success:!0});case 17:return e.prev=17,e.t0=e.catch(8),e.abrupt("return",{success:!1,error:e.t0});case 20:return e.abrupt("return",null);case 21:case"end":return e.stop()}}),e,null,[[8,17]])})))).apply(this,arguments)}var Yn={addComment:function(e){return Ln.apply(this,arguments)},editComment:function(e){return Wn.apply(this,arguments)},hideComment:function(e){return zn.apply(this,arguments)},deleteComment:function(e){return qn.apply(this,arguments)},showComment:function(e){return Un.apply(this,arguments)},likeComment:function(e){return Vn.apply(this,arguments)},unlikeComment:function(e){return Hn.apply(this,arguments)},reportComment:function(e){return $n.apply(this,arguments)},addReply:function(e){return In.apply(this,arguments)},loadMoreComments:function(e){return Bn.apply(this,arguments)},updateMember:function(e){return Gn.apply(this,arguments)},openPopup:function(e){return{popup:e.data}},closePopup:function(){return{popup:null}}};function Kn(e){return Jn.apply(this,arguments)}function Jn(){return(Jn=h(d().mark((function e(t){var n,r,o,i,a,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.action,r=t.data,o=t.state,i=t.api,a=t.adminApi,!(s=Yn[n])){e.next=9;break}return e.next=5,s({data:r,state:o,api:i,adminApi:a});case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:return e.abrupt("return",e.t0);case 9:return e.abrupt("return",{});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Qn=function(e){var t=e.type,n=e.status,r=e.autoHide,o=e.duration,i=void 0===o?2600:o,a=e.closeable,s=e.state,u=e.message,c=e.meta,l=void 0===c?{}:c,f=0;return s&&s.popupNotification&&(f=(s.popupNotification.count||0)+1),{type:t,status:n,autoHide:r,closeable:a,duration:i,meta:l,message:u,count:f}};function Xn(e){var t=e.site;return t||null}function Zn(e){var t=new Date(e),n=new Date,r=Math.round((n.getTime()-t.getTime())/1e3);if(r<5)return"Just now";if(r<60)return"".concat(r," seconds ago");if((r/=60)<60)return 1===Math.floor(r)?"One minute ago":"".concat(Math.floor(r)," minutes ago");var o=new Date(n.getFullYear(),n.getMonth(),n.getDate()-1);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()&&t.getDate()===o.getDate()?"Yesterday":(r/=60)<24?1===Math.floor(r)?"One hour ago":"".concat(Math.floor(r)," hours ago"):(r/=24)<7?1===Math.floor(r)?"One day ago":"".concat(Math.floor(r)," days ago"):(r/=7,1===Math.floor(r)?"One week ago":"".concat(Math.floor(r)," weeks ago"))}function er(e){var t=new Date(e),n=t.toLocaleDateString("en-us",{day:"2-digit"}),r=t.toLocaleString("en-us",{month:"short"}),o=t.getFullYear(),i=(t.getHours()<10?"0":"")+t.getHours(),a=(t.getMinutes()<10?"0":"")+t.getMinutes();return"".concat(n," ").concat(r," ").concat(o," ").concat(i,":").concat(a)}function tr(e){if(!e)return"";var t=e.split(" ");return 0===t.length?"":1===t.length?t[0].substring(0,1).toLocaleUpperCase():t[0].substring(0,1).toLocaleUpperCase()+t[t.length-1].substring(0,1).toLocaleUpperCase()}function nr(){return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<480}var rr={dev:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.customSiteUrl;return!1},test:function(){return!1}},or=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.some((function(e){var n=rr[e];return!(!n||!n(t))}))};var ir=function(e){var t=e.siteUrl,n=void 0===t?window.location.origin:t,r=e.apiUrl,i=e.apiKey;function a(e){var t=e.type,r=e.resource,o=e.params,i=void 0===o?"":o;if("members"===t)return"".concat(n.replace(/\/$/,""),"/").concat("members/api","/").concat(r,"/").concat(i)}function s(e){var t=e.url,n=e.method,r=void 0===n?"GET":n,o=e.headers,i=void 0===o?{}:o,a=e.credentials,s=void 0===a?void 0:a,u=e.body;return fetch(t,{method:r,headers:i,credentials:s,body:void 0===u?void 0:u})}var u={};u.site={settings:function(){return s({url:function(e){var t=e.resource,n=e.params,o=void 0===n?"":n;return r&&i?"".concat(r.replace(/\/$/,""),"/").concat(t,"/?key=").concat(i,"&limit=all").concat(o):""}({resource:"settings"}),method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch site data")}))}},u.member={identity:function(){return s({url:a({type:"members",resource:"session"}),credentials:"same-origin"}).then((function(e){return e.ok&&204!==e.status?e.text():null}))},sessionData:function(){return s({url:a({type:"members",resource:"member"}),credentials:"same-origin"}).then((function(e){return e.ok&&204!==e.status?e.json():null}))},update:function(e){var t={name:e.name,bio:e.bio};return s({url:a({type:"members",resource:"member"}),method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}).then((function(e){return e.ok?e.json():null}))}};var c=null;return u.comments={count:function(e){return h(d().mark((function t(){var n,r,o,i;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.postId,r=a({type:"members",resource:"comments/counts"}),t.next=4,s({url:r,method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({ids:[n]})});case 4:return o=t.sent,t.next=7,o.json();case 7:return i=t.sent,t.abrupt("return",i[n]);case 9:case"end":return t.stop()}}),t)})))()},browse:function(e){var t,n=e.page,r=e.postId;c=null!==(t=c)&&void 0!==t?t:(new Date).toISOString();var o=encodeURIComponent("post_id:".concat(r,"+created_at:<=").concat(c)),i=encodeURIComponent("created_at DESC");return s({url:a({type:"members",resource:"comments",params:"?limit=5&order=".concat(i,"&filter=").concat(o,"&page=").concat(n)}),method:"GET",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch comments")}))},add:function(e){var t={comments:[e.comment]};return s({url:a({type:"members",resource:"comments"}),method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to add comment")}))},edit:function(e){var t=e.comment,n={comments:[t]};return s({url:a({type:"members",resource:"comments/".concat(t.id)}),method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to edit comment")}))},like:function(e){var t=e.comment;return s({url:a({type:"members",resource:"comments/".concat(t.id,"/like")}),method:"POST",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to like comment")}))},unlike:function(e){var t=e.comment,n={comments:[t]};return s({url:a({type:"members",resource:"comments/".concat(t.id,"/like")}),method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to unlike comment")}))},report:function(e){var t=e.comment;return s({url:a({type:"members",resource:"comments/".concat(t.id,"/report")}),method:"POST",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to report comment")}))}},u.init=h(d().mark((function e(){var t,n,r,i,a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([u.member.sessionData()]);case 2:t=e.sent,n=Object(l.a)(t,1),r=n[0],i={},a={};try{i=Object(o.a)({},a)}catch(ur){}return i=Xn({site:i}),e.abrupt("return",{site:i,member:r});case 10:case"end":return e.stop()}}),e)}))),u},ar=function(e){var t=Object(a.useContext)(D),n=t.accentColor,r=t.publication,o={backgroundColor:n},i={color:n},s=e.isFirst?"Start the conversation":"Join the discussion";return Object(S.jsxs)("section",{className:"flex flex-col items-center pt-[40px] pb-[48px] px-8 border-t-2 border-gray-100 dark:border-gray-100/10 border-b-2",children:[Object(S.jsx)("h1",{className:"mb-[8px] text-center text-black text-[24px] font-sans tracking-tight dark:text-[rgba(255,255,255,0.85)] ".concat(e.isFirst?"font-semibold":"font-bold"),children:s}),Object(S.jsxs)("p",{className:"mb-[28px] px-8 max-w-screen-sm font-sans text-[16px] text-center leading-normal text-neutral-600 dark:text-[rgba(255,255,255,0.85)]",children:["Become a ",e.isPaid&&"paid"," member of ",Object(S.jsx)("span",{className:"font-semibold",children:r})," to start commenting."]}),Object(S.jsx)("button",{onClick:function(t){window.location.href=e.isPaid?"#/portal/account/plans":"#/portal/signup"},className:"mb-[12px] text-white font-san py-[14px] px-5 rounded inline-block font-medium leading-none hover:opacity-90 transition-all",style:o,children:e.isPaid?"Choose a plan":"Subscribe now"}),Object(S.jsxs)("p",{className:"text-sm font-sans text-center text-neutral-400 dark:text-[rgba(255,255,255,0.5)]",children:[Object(S.jsx)("span",{className:"inline-block mr-1 text-[15px]",children:"Already a member?"}),Object(S.jsx)("button",{onClick:function(e){window.location.href="#/portal/signin"},className:"rounded-md hover:opacity-90 transition-all text-sm font-semibold",style:i,children:"Sign in"})]})]})};function sr(e,t){if(e in t){for(var n=t[e],r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,o):n}var a=new Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map((function(e){return'"'.concat(e,'"')})).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(a,sr),a}var ur,cr,lr=["static"],fr=["unmount"],dr=["as","children","refName"],pr=((cr=pr||{})[cr.None=0]="None",cr[cr.RenderStrategy=1]="RenderStrategy",cr[cr.Static=2]="Static",cr),hr=((ur=hr||{})[ur.Unmount=0]="Unmount",ur[ur.Hidden=1]="Hidden",ur);function vr(e){var t=e.ourProps,n=e.theirProps,r=e.slot,a=e.defaultTag,s=e.features,u=e.visible,c=void 0===u||u,l=e.name,f=yr(n,t);if(c)return mr(f,r,a,l);var d=null!=s?s:0;if(2&d){var p=f.static,h=void 0!==p&&p,v=i(f,lr);if(h)return mr(v,r,a,l)}if(1&d){var m,y=f.unmount,g=void 0===y||y,b=i(f,fr);return sr(g?0:1,(m={},Object(Q.a)(m,0,(function(){return null})),Object(Q.a)(m,1,(function(){return mr(Object(o.a)(Object(o.a)({},b),{},{hidden:!0,style:{display:"none"}}),r,a,l)})),m))}return mr(f,r,a,l)}function mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=kr(e,["unmount","static"]),s=o.as,u=void 0===s?n:s,c=o.children,l=o.refName,f=void 0===l?"ref":l,d=i(o,dr),p=void 0!==e.ref?Object(Q.a)({},f,e.ref):{},h="function"==typeof c?c(t):c;d.className&&"function"==typeof d.className&&(d.className=d.className(t));var v={};if(u===a.Fragment&&Object.keys(br(d)).length>0){if(!Object(a.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <".concat(r,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - ".concat(e)})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - ".concat(e)})).join("\n")].join("\n"));return Object(a.cloneElement)(h,Object.assign({},yr(h.props,br(kr(d,["ref"]))),v,p))}return Object(a.createElement)(u,Object.assign({},kr(d,["ref"]),u!==a.Fragment&&p,u!==a.Fragment&&v),h)}function yr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];for(var r={},o={},i=0,a=t;i<a.length;i++){var s=a[i];for(var u in s)u.startsWith("on")&&"function"==typeof s[u]?(null!=o[u]||(o[u]=[]),o[u].push(s[u])):r[u]=s[u]}if(r.disabled||r["aria-disabled"])return Object.assign(r,Object.fromEntries(Object.keys(o).map((function(e){return[e,void 0]}))));var c=function(e){Object.assign(r,Object(Q.a)({},e,(function(t){for(var n=o[e],r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var s,u=Object(ze.a)(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(t.defaultPrevented)return;c.apply(void 0,[t].concat(i))}}catch(l){u.e(l)}finally{u.f()}})))};for(var l in o)c(l);return r}function gr(e){var t;return Object.assign(Object(a.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function br(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}function kr(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=Object(ze.a)(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}var wr=Object(a.createContext)(null);wr.displayName="OpenClosedContext";var xr=function(e){return e[e.Open=0]="Open",e[e.Closed=1]="Closed",e}(xr||{});function Or(){return Object(a.useContext)(wr)}function Er(e){var t=e.value,n=e.children;return s.a.createElement(wr.Provider,{value:t},n)}function Dr(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}var Sr,Cr="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,jr={serverHandoffComplete:!1};function _r(){var e=Object(a.useState)(jr.serverHandoffComplete),t=Object(l.a)(e,2),n=t[0],r=t[1];return Object(a.useEffect)((function(){!0!==n&&r(!0)}),[n]),Object(a.useEffect)((function(){!1===jr.serverHandoffComplete&&(jr.serverHandoffComplete=!0)}),[]),n}var Ar=0;function Nr(){return++Ar}var Tr=null!=(Sr=s.a.useId)?Sr:function(){var e=_r(),t=s.a.useState(e?Nr:null),n=Object(l.a)(t,2),r=n[0],o=n[1];return Cr((function(){null===r&&o(Nr())}),[r]),null!=r?""+r:void 0};function Mr(){var e=Object(a.useRef)(!1);return Cr((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function Fr(e){var t=Object(a.useRef)(e);return Cr((function(){t.current=e}),[e]),t}var Rr=function(e){var t=Fr(e);return s.a.useCallback((function(){return t.current.apply(t,arguments)}),[t])},Pr=Symbol();function Br(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(a.useRef)(t);Object(a.useEffect)((function(){r.current=t}),[t]);var o=Rr((function(e){var t,n=Object(ze.a)(r.current);try{for(n.s();!(t=n.n()).done;){var o=t.value;null!=o&&("function"==typeof o?o(e):o.current=e)}}catch(i){n.e(i)}finally{n.f()}}));return t.every((function(e){return null==e||(null==e?void 0:e[Pr])}))?void 0:o}function Lr(){var e=[],t=[],n={enqueue:function(e){t.push(e)},addEventListener:function(e,t,r,o){return e.addEventListener(t,r,o),n.add((function(){return e.removeEventListener(t,r,o)}))},requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);return n.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.requestAnimationFrame((function(){return n.requestAnimationFrame.apply(n,t)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);return n.add((function(){return clearTimeout(e)}))})),add:function(t){return e.push(t),function(){var n=e.indexOf(t);if(n>=0){var r=e.splice(n,1);(0,Object(l.a)(r,1)[0])()}}},dispose:function(){var t,n=Object(ze.a)(e.splice(0));try{for(n.s();!(t=n.n()).done;){(0,t.value)()}}catch(r){n.e(r)}finally{n.f()}},workQueue:function(){return h(d().mark((function e(){var n,r,o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Object(ze.a)(t.splice(0)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,o();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))()}};return n}function Ir(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function zr(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}var Ur=function(e){return e.Ended="ended",e.Cancelled="cancelled",e}(Ur||{});function Vr(e,t,n,r){var o=n?"enter":"leave",i=Lr(),a=void 0!==r?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(r):function(){},s=sr(o,{enter:function(){return t.enter},leave:function(){return t.leave}}),u=sr(o,{enter:function(){return t.enterTo},leave:function(){return t.leaveTo}}),c=sr(o,{enter:function(){return t.enterFrom},leave:function(){return t.leaveFrom}});return zr.apply(void 0,[e].concat(Object(J.a)(t.enter),Object(J.a)(t.enterTo),Object(J.a)(t.enterFrom),Object(J.a)(t.leave),Object(J.a)(t.leaveFrom),Object(J.a)(t.leaveTo),Object(J.a)(t.entered))),Ir.apply(void 0,[e].concat(Object(J.a)(s),Object(J.a)(c))),i.nextFrame((function(){zr.apply(void 0,[e].concat(Object(J.a)(c))),Ir.apply(void 0,[e].concat(Object(J.a)(u))),function(e,t){var n=Lr();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e})),n=Object(l.a)(t,1)[0];return void 0===n?0:n})),i=Object(l.a)(o,2);if(i[0]+i[1]!==0){var a=[];a.push(n.addEventListener(e,"transitionrun",(function(r){r.target===r.currentTarget&&(a.splice(0).forEach((function(e){return e()})),a.push(n.addEventListener(e,"transitionend",(function(e){e.target===e.currentTarget&&(t("ended"),a.splice(0).forEach((function(e){return e()})))})),n.addEventListener(e,"transitioncancel",(function(e){e.target===e.currentTarget&&(t("cancelled"),a.splice(0).forEach((function(e){return e()})))}))))})))}else t("ended");n.add((function(){return t("cancelled")})),n.dispose}(e,(function(n){return"ended"===n&&(zr.apply(void 0,[e].concat(Object(J.a)(s))),Ir.apply(void 0,[e].concat(Object(J.a)(t.entered)))),a(n)}))})),i.dispose}function $r(e){var t=e.container,n=e.direction,r=e.classes,o=e.events,i=e.onStart,s=e.onStop,u=Mr(),c=function(){var e=Object(a.useState)(Lr),t=Object(l.a)(e,1)[0];return Object(a.useEffect)((function(){return function(){return t.dispose()}}),[t]),t}(),f=Fr(n),d=Rr((function(){return sr(f.current,{enter:function(){return o.current.beforeEnter()},leave:function(){return o.current.beforeLeave()},idle:function(){}})})),p=Rr((function(){return sr(f.current,{enter:function(){return o.current.afterEnter()},leave:function(){return o.current.afterLeave()},idle:function(){}})}));Cr((function(){var e=Lr();c.add(e.dispose);var n=t.current;if(n&&"idle"!==f.current&&u.current)return e.dispose(),d(),i.current(f.current),e.add(Vr(n,r.current,"enter"===f.current,(function(t){var n;e.dispose(),sr(t,(n={},Object(Q.a)(n,Ur.Ended,(function(){p(),s.current(f.current)})),Object(Q.a)(n,Ur.Cancelled,(function(){})),n))}))),e.dispose}),[n])}var Hr=["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"],qr=["show","appear","unmount"];function Wr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(" ").filter((function(e){return e.trim().length>1}))}var Gr=Object(a.createContext)(null);Gr.displayName="TransitionContext";var Yr,Kr=((Yr=Kr||{}).Visible="visible",Yr.Hidden="hidden",Yr);var Jr=Object(a.createContext)(null);function Qr(e){return"children"in e?Qr(e.children):e.current.filter((function(e){return"visible"===e.state})).length>0}function Xr(e){var t=Fr(e),n=Object(a.useRef)([]),r=Mr(),o=Rr((function(e){var o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr.Hidden,a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&(sr(i,(o={},Object(Q.a)(o,hr.Unmount,(function(){n.current.splice(a,1)})),Object(Q.a)(o,hr.Hidden,(function(){n.current[a].state="hidden"})),o)),Dr((function(){var e;!Qr(n)&&r.current&&(null==(e=t.current)||e.call(t))})))})),i=Rr((function(e){var t=n.current.find((function(t){return t.id===e}));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({id:e,state:"visible"}),function(){return o(e,hr.Unmount)}}));return Object(a.useMemo)((function(){return{children:n,register:i,unregister:o}}),[i,o,n])}function Zr(){}Jr.displayName="NestingContext";var eo=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function to(e){var t,n,r={},o=Object(ze.a)(eo);try{for(o.s();!(n=o.n()).done;){var i=n.value;r[i]=null!=(t=e[i])?t:Zr}}catch(a){o.e(a)}finally{o.f()}return r}var no,ro,oo,io=pr.RenderStrategy,ao=gr((function(e,t){var n,r=e.beforeEnter,o=e.afterEnter,u=e.beforeLeave,c=e.afterLeave,f=e.enter,d=e.enterFrom,p=e.enterTo,h=e.entered,v=e.leave,m=e.leaveFrom,y=e.leaveTo,g=i(e,Hr),b=Object(a.useRef)(null),k=Br(b,t),w=Object(a.useState)("visible"),x=Object(l.a)(w,2),O=x[0],E=x[1],D=g.unmount?hr.Unmount:hr.Hidden,S=function(){var e=Object(a.useContext)(Gr);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),C=S.show,j=S.appear,_=S.initial,A=function(){var e=Object(a.useContext)(Jr);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),N=A.register,T=A.unregister,M=Object(a.useRef)(null),F=Tr();Object(a.useEffect)((function(){if(F)return N(F)}),[N,F]),Object(a.useEffect)((function(){if(D===hr.Hidden&&F){var e;if(C&&"visible"!==O)return void E("visible");sr(O,(e={},Object(Q.a)(e,"hidden",(function(){return T(F)})),Object(Q.a)(e,"visible",(function(){return N(F)})),e))}}),[O,F,N,T,C,D]);var R=Fr({enter:Wr(f),enterFrom:Wr(d),enterTo:Wr(p),entered:Wr(h),leave:Wr(v),leaveFrom:Wr(m),leaveTo:Wr(y)}),P=function(e){var t=Object(a.useRef)(to(e));return Object(a.useEffect)((function(){t.current=to(e)}),[e]),t}({beforeEnter:r,afterEnter:o,beforeLeave:u,afterLeave:c}),B=_r();Object(a.useEffect)((function(){if(B&&"visible"===O&&null===b.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[b,O,B]);var L=_&&!j,I=!B||L||M.current===C?"idle":C?"enter":"leave",z=Object(a.useRef)(!1),U=Xr((function(){z.current||(E("hidden"),T(F))}));$r({container:b,classes:R,events:P,direction:I,onStart:Fr((function(){z.current=!0})),onStop:Fr((function(e){z.current=!1,"leave"===e&&!Qr(U)&&(E("hidden"),T(F))}))}),Object(a.useEffect)((function(){!L||(D===hr.Hidden?M.current=null:M.current=C)}),[C,L,O]);var V=g,$={ref:k};return s.a.createElement(Jr.Provider,{value:U},s.a.createElement(Er,{value:sr(O,(n={},Object(Q.a)(n,"visible",xr.Open),Object(Q.a)(n,"hidden",xr.Closed),n))},vr({ourProps:$,theirProps:V,defaultTag:"div",features:io,visible:"visible"===O,name:"Transition.Child"})))})),so=gr((function(e,t){var n,r=e.show,u=e.appear,c=void 0!==u&&u,f=e.unmount,d=i(e,qr),p=Object(a.useRef)(null),h=Br(p,t);_r();var v=Or();if(void 0===r&&null!==v&&(r=sr(v,(n={},Object(Q.a)(n,xr.Open,!0),Object(Q.a)(n,xr.Closed,!1),n))),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var m=Object(a.useState)(r?"visible":"hidden"),y=Object(l.a)(m,2),g=y[0],b=y[1],k=Xr((function(){b("hidden")})),w=Object(a.useState)(!0),x=Object(l.a)(w,2),O=x[0],E=x[1],D=Object(a.useRef)([r]);Cr((function(){!1!==O&&D.current[D.current.length-1]!==r&&(D.current.push(r),E(!1))}),[D,r]);var S=Object(a.useMemo)((function(){return{show:r,appear:c,initial:O}}),[r,c,O]);Object(a.useEffect)((function(){if(r)b("visible");else if(Qr(k)){var e=p.current;if(!e)return;var t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&b("hidden")}else b("hidden")}),[r,k]);var C={unmount:f};return s.a.createElement(Jr.Provider,{value:k},s.a.createElement(Gr.Provider,{value:S},vr({ourProps:Object(o.a)(Object(o.a)({},C),{},{as:a.Fragment,children:s.a.createElement(ao,Object(o.a)(Object(o.a)({ref:h},C),d))}),theirProps:{},defaultTag:a.Fragment,features:io,visible:"visible"===g,name:"Transition"})))})),uo=gr((function(e,t){var n=null!==Object(a.useContext)(Gr),r=null!==Or();return s.a.createElement(s.a.Fragment,null,!n&&r?s.a.createElement(so,Object(o.a)({ref:t},e)):s.a.createElement(ao,Object(o.a)({ref:t},e)))})),co=Object.assign(so,{Child:uo,Root:so}),lo=["title","titleId"];function fo(){return fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fo.apply(this,arguments)}function po(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ho(e,t){var n=e.title,r=e.titleId,o=po(e,lo);return a.createElement("svg",fo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,no||(no=a.createElement("path",{d:"M7 9.5C7 10.1566 7.12933 10.8068 7.3806 11.4134C7.63188 12.02 8.00017 12.5712 8.46447 13.0355C8.92876 13.4998 9.47995 13.8681 10.0866 14.1194C10.6932 14.3707 11.3434 14.5 12 14.5C12.6566 14.5 13.3068 14.3707 13.9134 14.1194C14.52 13.8681 15.0712 13.4998 15.5355 13.0355C15.9998 12.5712 16.3681 12.02 16.6194 11.4134C16.8707 10.8068 17 10.1566 17 9.5C17 8.84339 16.8707 8.19321 16.6194 7.58658C16.3681 6.97995 15.9998 6.42876 15.5355 5.96447C15.0712 5.50017 14.52 5.13188 13.9134 4.8806C13.3068 4.62933 12.6566 4.5 12 4.5C11.3434 4.5 10.6932 4.62933 10.0866 4.8806C9.47995 5.13188 8.92876 5.50017 8.46447 5.96447C8.00017 6.42876 7.63188 6.97995 7.3806 7.58658C7.12933 8.19321 7 8.84339 7 9.5V9.5Z",stroke:"white",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),ro||(ro=a.createElement("circle",{cx:12,cy:12,r:11.375,stroke:"white",strokeWidth:1.25})),oo||(oo=a.createElement("path",{d:"M19.5 20C19.092 19.6069 18.4941 19.2498 17.7403 18.9489C16.9864 18.6481 16.0915 18.4094 15.1066 18.2466C14.1217 18.0838 13.0661 18 12 18C10.9339 18 9.87831 18.0838 8.8934 18.2466C7.90848 18.4094 7.01357 18.6481 6.25975 18.9489C5.50593 19.2498 4.90796 19.6069 4.5 20",stroke:"white",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})))}var vo=a.forwardRef(ho),mo=(n.p,function(e){var t,n,r,o,i=Object(a.useContext)(D).member,s=null!==(t=null===i||void 0===i?void 0:i.name)&&void 0!==t?t:null===(n=e.comment)||void 0===n||null===(r=n.member)||void 0===r?void 0:r.name,u=function(e,t,n){return Math.floor(e%(n-t)+t)},c="small"===e.size?"w-6 h-6 sm:w-8 sm:h-8":"w-9 h-9 sm:w-[40px] sm:h-[40px]",l="small"===e.size?"text-sm":"text-lg",f=e.comment?e.comment.member:i,d=(o=function(){var t=e.comment?e.comment.member:i;if(!t||!t.name)return[0,0,10];var n=isNaN(e.saturation)?50:e.saturation,r=[0,360],o=Math.round(n/(100/30))+30,a=[o-20,o],s=function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return Math.abs(t)}(t.name);return[u(s,r[0],r[1]),n,u(s,a[0],a[1])]}(),"hsl(".concat(o[0],", ").concat(o[1],"%, ").concat(o[2],"%)")),p={background:d},h=Object(S.jsxs)(S.Fragment,{children:[s?Object(S.jsx)("div",{className:"flex justify-center items-center rounded-full ".concat(c),style:p,children:Object(S.jsx)("p",{className:"text-white font-sans font-semibold ".concat(l),children:function(){if(e.comment&&!e.comment.member)return tr("Deleted member");var t=e.comment?e.comment.member:i;return t&&t.name?tr(t.name):tr("Anonymous")}()})}):Object(S.jsx)("div",{className:"flex justify-center items-center rounded-full bg-neutral-900 dark:bg-[rgba(255,255,255,0.7)] ".concat(c),children:Object(S.jsx)(vo,{className:"stroke-white dark:stroke-[rgba(0,0,0,0.6)]"})}),f&&Object(S.jsx)("img",{className:"absolute top-0 left-0 rounded-full ".concat(c),src:f.avatar_image,alt:"Avatar"})]});return e.isBlank&&(h=Object(S.jsx)("div",{className:"flex justify-center items-center rounded-full bg-neutral-300 dark:opacity-70 ".concat(c),children:Object(S.jsx)(vo,{className:"stroke-white dark:stroke-neutral-600"})})),Object(S.jsx)("figure",{className:"relative ".concat(c),children:h})});function yo(e){this.content=e}yo.prototype={constructor:yo,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new yo(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new yo(n)},addToStart:function(e,t){return new yo([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new yo(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new yo(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=yo.from(e)).size?new yo(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=yo.from(e)).size?new yo(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=yo.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},yo.from=function(e){if(e instanceof yo)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new yo(t)};var go=yo;function bo(e,t,n){for(var r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;var o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=bo(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function ko(e,t,n,r){for(var o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=e.child(--o),s=t.child(--i),u=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var c=0,l=Math.min(a.text.length,s.text.length);c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){var f=ko(a.content,s.content,n-1,r-1);if(f)return f}n-=u,r-=u}else n-=u,r-=u}}var wo=function(){function e(t,n){if(v(this,e),this.content=t,this.size=n||0,null==n)for(var r=0;r<t.length;r++)this.size+=t[r].nodeSize}return y(e,[{key:"nodesBetween",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=0,a=0;a<t;i++){var s=this.content[i],u=a+s.nodeSize;if(u>e&&!1!==n(s,r+a,o||null,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=u}}},{key:"descendants",value:function(e){this.nodesBetween(0,this.size,e)}},{key:"textBetween",value:function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf?(r?o+="function"===typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new e(o,this.size+t.size)}},{key:"cut",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==t&&n==this.size)return this;var r=[],o=0;if(n>t)for(var i=0,a=0;a<n;i++){var s=this.content[i],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s=s.isText?s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=u}return new e(r,o)}},{key:"cutByIndex",value:function(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}},{key:"replaceChild",value:function(t,n){var r=this.content[t];if(r==n)return this;var o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}},{key:"addToStart",value:function(t){return new e([t].concat(this.content),this.size+t.nodeSize)}},{key:"addToEnd",value:function(t){return new e(this.content.concat(t),this.size+t.nodeSize)}},{key:"eq",value:function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}},{key:"maybeChild",value:function(e){return this.content[e]||null}},{key:"forEach",value:function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}}},{key:"findDiffStart",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return bo(this,e,t)}},{key:"findDiffEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size;return ko(this,e,t,n)}},{key:"findIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==e)return Oo(0,e);if(e==this.size)return Oo(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position ".concat(e," outside of fragment (").concat(this,")"));for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e||t>0?Oo(n+1,i):Oo(n,r);r=i}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}},{key:"fromArray",value:function(t){if(!t.length)return e.empty;for(var n,r=0,o=0;o<t.length;o++){var i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}},{key:"from",value:function(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),e}();wo.empty=new wo([],0);var xo={index:0,offset:0};function Oo(e,t){return xo.index=e,xo.offset=t,xo}function Eo(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!Eo(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!Eo(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}var Do=function(){function e(t,n){v(this,e),this.type=t,this.attrs=n}return y(e,[{key:"addToSet",value:function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){return this==e||this.type==e.type&&Eo(this.attrs,e.attrs)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type ".concat(t.type," in this schema"));return n.create(t.attrs)}},{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];var n=t.slice();return n.sort((function(e,t){return e.type.rank-t.type.rank})),n}}]),e}();Do.none=[];var So=function(e){b(n,e);var t=E(n);function n(){return v(this,n),t.apply(this,arguments)}return y(n)}(Se(Error)),Co=function(){function e(t,n,r){v(this,e),this.content=t,this.openStart=n,this.openEnd=r}return y(e,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(t,n){var r=_o(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(t,n){return new e(jo(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;var r=n.openStart||0,o=n.openEnd||0;if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new e(wo.fromJSON(t,n.content),r,o)}},{key:"maxOpen",value:function(t){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(var a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}}]),e}();function jo(e,t,n){var r=e.findIndex(t),o=r.index,i=r.offset,a=e.maybeChild(o),s=e.findIndex(n),u=s.index,c=s.offset;if(i==t||a.isText){if(c!=n&&!e.child(u).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(o!=u)throw new RangeError("Removing non-flat range");return e.replaceChild(o,a.copy(jo(a.content,t-i-1,n-i-1)))}function _o(e,t,n,r){var o=e.findIndex(t),i=o.index,a=o.offset,s=e.maybeChild(i);if(a==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));var u=_o(s.content,t-a-1,n);return u&&e.replaceChild(i,s.copy(u))}function Ao(e,t,n){if(n.openStart>e.depth)throw new So("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new So("Inconsistent open depths");return No(e,t,n,0)}function No(e,t,n,r){var o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){var a=No(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){var s=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(wo.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return Po(i,Bo(e,s.start,s.end,t,r))}var u=e.parent,c=u.content;return Po(u,c.cut(0,e.parentOffset).append(n.content).append(c.cut(t.parentOffset)))}return Po(i,Lo(e,t,r))}function To(e,t){if(!t.type.compatibleContent(e.type))throw new So("Cannot join "+t.type.name+" onto "+e.type.name)}function Mo(e,t,n){var r=e.node(n);return To(r,t.node(n)),r}function Fo(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Ro(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Fo(e.nodeAfter,r),i++));for(var s=i;s<a;s++)Fo(o.child(s),r);t&&t.depth==n&&t.textOffset&&Fo(t.nodeBefore,r)}function Po(e,t){if(!e.type.validContent(t))throw new So("Invalid content for node "+e.type.name);return e.copy(t)}function Bo(e,t,n,r,o){var i=e.depth>o&&Mo(e,t,o+1),a=r.depth>o&&Mo(n,r,o+1),s=[];return Ro(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(To(i,a),Fo(Po(i,Bo(e,t,n,r,o+1)),s)):(i&&Fo(Po(i,Lo(e,t,o+1)),s),Ro(t,n,o,s),a&&Fo(Po(a,Lo(n,r,o+1)),s)),Ro(r,null,o,s),new wo(s)}function Lo(e,t,n){var r=[];(Ro(null,e,n,r),e.depth>n)&&Fo(Po(Mo(e,t,n+1),Lo(e,t,n+1)),r);return Ro(t,null,n,r),new wo(r)}Co.empty=new Co(wo.empty,0,0);var Io=function(){function e(t,n,r){v(this,e),this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}return y(e,[{key:"resolveDepth",value:function(e){return null==e?this.depth:e<0?this.depth+e:e}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(e){return this.path[3*this.resolveDepth(e)]}},{key:"index",value:function(e){return this.path[3*this.resolveDepth(e)+1]}},{key:"indexAfter",value:function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}},{key:"start",value:function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}},{key:"end",value:function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}},{key:"before",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}},{key:"after",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}},{key:"nodeBefore",get:function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}},{key:"posAtIndex",value:function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r}},{key:"marks",value:function(){var e=this.parent,t=this.index();if(0==e.content.size)return Do.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}},{key:"marksAcross",value:function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}},{key:"sharedDepth",value:function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}},{key:"blockRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,t=arguments.length>1?arguments[1]:void 0;if(e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new $o(this,e,n);return null}},{key:"sameParent",value:function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}},{key:"max",value:function(e){return e.pos>this.pos?e:this}},{key:"min",value:function(e){return e.pos<this.pos?e:this}},{key:"toString",value:function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}}],[{key:"resolve",value:function(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],o=0,i=n,a=t;;){var s=a.content.findIndex(i),u=s.index,c=s.offset,l=i-c;if(r.push(a,u,o+c),!l)break;if((a=a.child(u)).isText)break;i=l-1,o+=c+1}return new e(n,r,i)}},{key:"resolveCached",value:function(t,n){for(var r=0;r<zo.length;r++){var o=zo[r];if(o.pos==n&&o.doc==t)return o}var i=zo[Uo]=e.resolve(t,n);return Uo=(Uo+1)%Vo,i}}]),e}(),zo=[],Uo=0,Vo=12,$o=function(){function e(t,n,r){v(this,e),this.$from=t,this.$to=n,this.depth=r}return y(e,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),e}(),Ho=Object.create(null),qo=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Do.none;v(this,e),this.type=t,this.attrs=n,this.marks=o,this.content=r||wo.empty}return y(e,[{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(e){return this.content.child(e)}},{key:"maybeChild",value:function(e){return this.content.maybeChild(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"nodesBetween",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(e,t,n,r,this)}},{key:"descendants",value:function(e){this.nodesBetween(0,this.content.size,e)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(e,t,n,r){return this.content.textBetween(e,t,n,r)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(e,t,n){return this.type==e&&Eo(this.attrs,t||e.defaultAttrs||Ho)&&Do.sameSet(this.marks,n||Do.none)}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}},{key:"mark",value:function(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}},{key:"cut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e==t)return Co.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i),u=s.content.cut(r.pos-a,o.pos-a);return new Co(u,r.depth-i,o.depth-i)}},{key:"replace",value:function(e,t,n){return Ao(this.resolve(e),this.resolve(t),n)}},{key:"nodeAt",value:function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}}},{key:"childAfter",value:function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}},{key:"resolve",value:function(e){return Io.resolveCached(this,e)}},{key:"resolveNoCache",value:function(e){return Io.resolve(this,e)}},{key:"rangeHasMark",value:function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Go(this.marks,e)}},{key:"contentMatchAt",value:function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}},{key:"canReplace",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wo.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,i=this.contentMatchAt(e).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var s=r;s<o;s++)if(!this.type.allowsMarks(n.child(s).marks))return!1;return!0}},{key:"canReplaceWith",value:function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}},{key:"canAppend",value:function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}},{key:"check",value:function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node ".concat(this.type.name,": ").concat(this.content.toString().slice(0,50)));for(var e=Do.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Do.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map((function(e){return e.type.name}))));this.content.forEach((function(e){return e.check()}))}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=wo.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}]),e}();qo.prototype.text=void 0;var Wo=function(e){b(n,e);var t=E(n);function n(e,r,o,i){var a;if(v(this,n),a=t.call(this,e,r,null,i),!o)throw new RangeError("Empty text nodes are not allowed");return a.text=o,a}return y(n,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Go(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(e,t){return this.text.slice(e,t)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}},{key:"withText",value:function(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}},{key:"cut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}},{key:"eq",value:function(e){return this.sameMarkup(e)&&this.text==e.text}},{key:"toJSON",value:function(){var e=rt(k(n.prototype),"toJSON",this).call(this);return e.text=this.text,e}}]),n}(qo);function Go(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var Yo=function(){function e(t){v(this,e),this.validEnd=t,this.next=[],this.wrapCache=[]}return y(e,[{key:"matchType",value:function(e){for(var t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}},{key:"matchFragment",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.childCount,r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}},{key:"inlineContent",get:function(){return this.next.length&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var e=0;e<this.next.length;e++){var t=this.next[e].type;if(!t.isText&&!t.hasRequiredAttrs())return t}return null}},{key:"compatible",value:function(e){for(var t=0;t<this.next.length;t++)for(var n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}},{key:"fillBefore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];function o(i,a){var s=i.matchFragment(e,n);if(s&&(!t||s.validEnd))return wo.from(a.map((function(e){return e.createAndFill()})));for(var u=0;u<i.next.length;u++){var c=i.next[u],l=c.type,f=c.next;if(!l.isText&&!l.hasRequiredAttrs()&&-1==r.indexOf(f)){r.push(f);var d=o(f,a.concat(l));if(d)return d}}return null}return o(this,[])}},{key:"findWrapping",value:function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}},{key:"computeWrapping",value:function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s++){var u=o.next[s],c=u.type,l=u.next;c.isLeaf||c.hasRequiredAttrs()||c.name in t||r.type&&!l.validEnd||(n.push({match:c.contentMatch,type:c,via:r}),t[c.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(e){if(e>=this.next.length)throw new RangeError("There's no ".concat(e,"th edge in this content match"));return this.next[e]}},{key:"toString",value:function(){var e=[];return function t(n){e.push(n);for(var r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}],[{key:"parse",value:function(t,n){var r=new Ko(t,n);if(null==r.next)return e.empty;var o=Jo(r);r.next&&r.err("Unexpected trailing text");var i=function(e){var t=Object.create(null);return n(ni(e,0));function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){for(var i,a=0;a<o.length;a++)o[a][0]==n&&(i=o[a][1]);ni(e,r).forEach((function(e){i||o.push([n,i=[]]),-1==i.indexOf(e)&&i.push(e)}))}}))}));for(var i=t[r.join(",")]=new Yo(r.indexOf(e.length-1)>-1),a=0;a<o.length;a++){var s=o[a][1].sort(ti);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}(function(e){var t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}function i(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(i(n,t))}),[]);if("seq"!=e.type){if("star"==e.type){var a=n();return r(t,a),o(i(e.expr,a),a),[r(a)]}if("plus"==e.type){var s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){for(var u=t,c=0;c<e.min;c++){var l=n();o(i(e.expr,u),l),u=l}if(-1==e.max)o(i(e.expr,u),u);else for(var f=e.min;f<e.max;f++){var d=n();r(u,d),o(i(e.expr,u),d),u=d}return[r(u)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(var p=0;;p++){var h=i(e.exprs[p],t);if(p==e.exprs.length-1)return h;o(h,t=n())}}}(o));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s++){var u=o.next[s],c=u.type,l=u.next;a.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(l)&&r.push(l)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,r),i}}]),e}();Yo.empty=new Yo(!0);var Ko=function(){function e(t,n){v(this,e),this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}return y(e,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(e){return this.next==e&&(this.pos++||!0)}},{key:"err",value:function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}]),e}();function Jo(e){var t=[];do{t.push(Qo(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function Qo(e){var t=[];do{t.push(Xo(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function Xo(e){for(var t=function(e){if(e.eat("(")){var t=Jo(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=ei(e,t)}return t}function Zo(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function ei(e,t){var n=Zo(e),r=n;return e.eat(",")&&(r="}"!=e.next?Zo(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function ti(e,t){return t-e}function ni(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,u=a.to;s||-1!=n.indexOf(u)||t(u)}}(t),n.sort(ti)}function ri(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function oi(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function ii(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new si(e[n]);return t}var ai=function(){function e(t,n,r){v(this,e),this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ii(r.attrs),this.defaultAttrs=ri(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}return y(e,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==Yo.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(e){return this==e||this.contentMatch.compatible(e.contentMatch)}},{key:"computeAttrs",value:function(e){return!e&&this.defaultAttrs?this.defaultAttrs:oi(this.attrs,e)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new qo(this,this.computeAttrs(e),wo.from(t),Do.setFrom(n))}},{key:"createChecked",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(t=wo.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new qo(this,this.computeAttrs(e),t,Do.setFrom(n))}},{key:"createAndFill",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(e=this.computeAttrs(e),(t=wo.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(wo.empty,!0);return i?new qo(this,e,t.append(i),Do.setFrom(n)):null}},{key:"validContent",value:function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}},{key:"allowsMarkType",value:function(e){return null==this.markSet||this.markSet.indexOf(e)>-1}},{key:"allowsMarks",value:function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}},{key:"allowedMarks",value:function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:Do.none:e}}],[{key:"compile",value:function(t,n){var r=Object.create(null);t.forEach((function(t,o){return r[t]=new e(t,n,o)}));var o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}]),e}(),si=function(){function e(t){v(this,e),this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}return y(e,[{key:"isRequired",get:function(){return!this.hasDefault}}]),e}(),ui=function(){function e(t,n,r,o){v(this,e),this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=ii(o.attrs),this.excluded=null;var i=ri(this.attrs);this.instance=i?new Do(this,i):null}return y(e,[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!e&&this.instance?this.instance:new Do(this,oi(this.attrs,e))}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}},{key:"excludes",value:function(e){return this.excluded.indexOf(e)>-1}}],[{key:"compile",value:function(t,n){var r=Object.create(null),o=0;return t.forEach((function(t,i){return r[t]=new e(t,o++,n,i)})),r}}]),e}(),ci=function(){function e(t){v(this,e),this.cached=Object.create(null),this.spec={nodes:go.from(t.nodes),marks:go.from(t.marks||{}),topNode:t.topNode},this.nodes=ai.compile(this.spec.nodes,this),this.marks=ui.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=Yo.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?li(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var u=this.marks[s],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:li(this,c.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return y(e,[{key:"node",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof ai))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}},{key:"text",value:function(e,t){var n=this.nodes.text;return new Wo(n,n.defaultAttrs,e,Do.setFrom(t))}},{key:"mark",value:function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}},{key:"nodeFromJSON",value:function(e){return qo.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){return Do.fromJSON(this,e)}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}]),e}();function li(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var u=e.marks[s];("_"==o||u.spec.group&&u.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}var fi=function(){function e(t,n){var r=this;v(this,e),this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach((function(e){e.tag?r.tags.push(e):e.style&&r.styles.push(e)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}return y(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new yi(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}},{key:"parseSlice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new yi(this,t,!0);return n.addAll(e,t.from,t.to),Co.maxOpen(n.finish())}},{key:"matchTag",value:function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(gi(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i||void 0}return o}}}},{key:"matchStyle",value:function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o],a=i.style;if(!(0!=a.indexOf(e)||i.context&&!n.matchesContext(i.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(i.getAttrs){var s=i.getAttrs(t);if(!1===s)continue;i.attrs=s||void 0}return i}}}}],[{key:"schemaRules",value:function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=bi(e)),e.mark=t}))};for(var o in e.marks)r(o);var i=function(t){var r=e.nodes[t].spec.parseDOM;r&&r.forEach((function(e){n(e=bi(e)),e.node=t}))};for(var a in e.nodes)i(a);return t}},{key:"fromSchema",value:function(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}}]),e}(),di={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},pi={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hi={ol:!0,ul:!0};function vi(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var mi=function(){function e(t,n,r,o,i,a,s){v(this,e),this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=s,this.content=[],this.activeMarks=Do.none,this.stashMarks=[],this.match=a||(4&s?null:t.contentMatch)}return y(e,[{key:"findWrapping",value:function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(wo.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}},{key:"finish",value:function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];if(n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))){var r=n;n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-t[0].length))}}var o=wo.from(this.content);return!e&&this.match&&(o=o.append(this.match.fillBefore(wo.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}},{key:"popFromStashMark",value:function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}},{key:"applyPending",value:function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):ki(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}},{key:"inlineContext",value:function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!di.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}]),e}(),yi=function(){function e(t,n,r){v(this,e),this.parser=t,this.options=n,this.isOpen=r,this.open=0;var o,i=n.topNode,a=vi(null,n.preserveWhitespace,0)|(r?4:0);o=i?new mi(i.type,i.attrs,Do.none,Do.none,!0,n.topMatch||i.type.contentMatch,a):new mi(r?null:t.schema.topNodeType,null,Do.none,Do.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}return y(e,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}}},{key:"addTextNode",value:function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}},{key:"addElement",value:function(e,t){var n,r=e.nodeName.toLowerCase();hi.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&hi.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:pi.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(di.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}},{key:"leafFallback",value:function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}},{key:"ignoreFallback",value:function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}},{key:"readStyles",value:function(e){var t=Do.none;e:for(var n=0;n<e.length;n+=2)for(var r=void 0;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}},{key:"addElementByRule",value:function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var u=e;"string"==typeof t.contentElement?u=e.querySelector(t.contentElement):"function"==typeof t.contentElement?u=t.contentElement(e):t.contentElement&&(u=t.contentElement),this.findAround(e,u,!0),this.addAll(u)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}},{key:"addAll",value:function(e,t,n){for(var r=t||0,o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}},{key:"findPlace",value:function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0}},{key:"insertNode",value:function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}},{key:"enter",value:function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}},{key:"enterInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);var i=vi(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new mi(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}},{key:"closeExtra",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}},{key:"sync",value:function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}},{key:"findAtPoint",value:function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}},{key:"findInside",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}},{key:"findAround",value:function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}},{key:"findInText",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}},{key:"matchesContext",value:function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=u&&-1==c.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)}},{key:"textblockFromContext",value:function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}}},{key:"addPendingMark",value:function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}},{key:"removePendingMark",value:function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}}}]),e}();function gi(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function bi(e){var t={};for(var n in e)t[n]=e[n];return t}function ki(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(!o.allowsMarkType(e))return"continue";var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),a=o.type,s=o.next;if(a==t)return!0;if(i.indexOf(s)<0&&e(s))return!0}}(o.contentMatch)?{v:!0}:void 0};for(var o in n){var i=r(o);if("continue"!==i&&"object"===typeof i)return i.v}}var wi=function(){function e(t,n){v(this,e),this.nodes=t,this.marks=n}return y(e,[{key:"serializeFragment",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;r||(r=Oi(n).createDocumentFragment());var o=r,i=[];return e.forEach((function(e){if(i.length||e.marks.length){for(var r=0,a=0;r<i.length&&a<e.marks.length;){var s=e.marks[a];if(t.marks[s.type.name]){if(!s.eq(i[r][0])||!1===s.type.spec.spanning)break;r++,a++}else a++}for(;r<i.length;)o=i.pop()[1];for(;a<e.marks.length;){var u=e.marks[a++],c=t.serializeMark(u,e.isInline,n);c&&(i.push([u,o]),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(t.serializeNodeInner(e,n))})),r}},{key:"serializeNodeInner",value:function(t,n){var r=e.renderSpec(Oi(n),this.nodes[t.type.name](t)),o=r.dom,i=r.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return o}},{key:"serializeNode",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}},{key:"serializeMark",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.marks[t.type.name];return o&&e.renderSpec(Oi(r),o(t,n))}}],[{key:"renderSpec",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"==typeof n)return{dom:t.createTextNode(n)};if(null!=n.nodeType)return{dom:n};if(n.dom&&null!=n.dom.nodeType)return n;var o,i=n[0],a=i.indexOf(" ");a>0&&(r=i.slice(0,a),i=i.slice(a+1));var s=r?t.createElementNS(r,i):t.createElement(i),u=n[1],c=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u))for(var l in c=2,u)if(null!=u[l]){var f=l.indexOf(" ");f>0?s.setAttributeNS(l.slice(0,f),l.slice(f+1),u[l]):s.setAttribute(l,u[l])}for(var d=c;d<n.length;d++){var p=n[d];if(0===p){if(d<n.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=e.renderSpec(t,p,r),v=h.dom,m=h.contentDOM;if(s.appendChild(v),m){if(o)throw new RangeError("Multiple content holes");o=m}}return{dom:s,contentDOM:o}}},{key:"fromSchema",value:function(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}},{key:"nodesFromSchema",value:function(e){var t=xi(e.nodes);return t.text||(t.text=function(e){return e.text}),t}},{key:"marksFromSchema",value:function(e){return xi(e.marks)}}]),e}();function xi(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Oi(e){return e.document||window.document}var Ei=Math.pow(2,16);function Di(e){return 65535&e}var Si=function(){function e(t,n,r){v(this,e),this.pos=t,this.delInfo=n,this.recover=r}return y(e,[{key:"deleted",get:function(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function(){return(4&this.delInfo)>0}}]),e}(),Ci=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(v(this,e),this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}return y(e,[{key:"recover",value:function(e){var t=0,n=Di(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/Ei}(e)}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var u=this.ranges[a+o],c=this.ranges[a+i],l=s+u;if(e<=l){var f=s+r+((u?e==s?-1:e==l?1:t:t)<0?0:c);if(n)return f;var d=e==(t<0?s:l)?null:a/3+(e-s)*Ei,p=e==s?2:e==l?1:4;return(t<0?e!=s:e!=l)&&(p|=8),new Si(f,p,d)}r+=c-u}return n?e+r:new Si(e+r,0,null)}},{key:"touches",value:function(e,t){for(var n=0,r=Di(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var u=this.ranges[a+o];if(e<=s+u&&a==3*r)return!0;n+=this.ranges[a+i]-u}return!1}},{key:"forEach",value:function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),u=this.ranges[r+t],c=this.ranges[r+n];e(a,a+u,s,s+c),o+=c-u}}},{key:"invert",value:function(){return new e(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}}]),e}();Ci.empty=new Ci([]);var ji=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;v(this,e),this.maps=t,this.mirror=n,this.from=r,this.to=o}return y(e,[{key:"slice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new e(this.maps,this.mirror,t,n)}},{key:"copy",value:function(){return new e(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}},{key:"appendMapping",value:function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}},{key:"getMirror",value:function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}},{key:"setMirror",value:function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}},{key:"appendMappingInverted",value:function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}},{key:"invert",value:function(){var t=new e;return t.appendMappingInverted(this),t}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,e=this.maps[a].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new Si(e,r,null)}}]),e}(),_i=Object.create(null),Ai=function(){function e(){v(this,e)}return y(e,[{key:"getMap",value:function(){return Ci.empty}},{key:"merge",value:function(e){return null}}],[{key:"fromJSON",value:function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=_i[t.stepType];if(!n)throw new RangeError("No step type ".concat(t.stepType," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in _i)throw new RangeError("Duplicate use of step JSON ID "+e);return _i[e]=t,t.prototype.jsonID=e,t}}]),e}(),Ni=function(){function e(t,n){v(this,e),this.doc=t,this.failed=n}return y(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,n,r,o){try{return e.ok(t.replace(n,r,o))}catch(ur){if(ur instanceof So)return e.fail(ur.message);throw ur}}}]),e}();function Ti(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var i=e.child(o);i.content.size&&(i=i.copy(Ti(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return wo.fromArray(r)}var Mi=function(e){b(n,e);var t=E(n);function n(e,r,o){var i;return v(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return y(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Co(Ti(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return Ni.fromReplace(e,this.from,this.to,i)}},{key:"invert",value:function(){return new Fi(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(Ai);Ai.jsonID("addMark",Mi);var Fi=function(e){b(n,e);var t=E(n);function n(e,r,o){var i;return v(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return y(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=new Co(Ti(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))}),e),n.openStart,n.openEnd);return Ni.fromReplace(e,this.from,this.to,r)}},{key:"invert",value:function(){return new Mi(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(Ai);Ai.jsonID("removeMark",Fi);var Ri=function(e){b(n,e);var t=E(n);function n(e,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return v(this,n),(i=t.call(this)).from=e,i.to=r,i.slice=o,i.structure=a,i}return y(n,[{key:"apply",value:function(e){return this.structure&&Bi(e,this.from,this.to)?Ni.fail("Structure replace would overwrite content"):Ni.fromReplace(e,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new Ci([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new n(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new n(t.pos,Math.max(t.pos,r.pos),this.slice)}},{key:"merge",value:function(e){if(!(e instanceof n)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var t=this.slice.size+e.slice.size==0?Co.empty:new Co(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new n(e.from,this.to,t,this.structure)}var r=this.slice.size+e.slice.size==0?Co.empty:new Co(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new n(this.from,this.to+(e.to-e.from),r,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new n(t.from,t.to,Co.fromJSON(e,t.slice),!!t.structure)}}]),n}(Ai);Ai.jsonID("replace",Ri);var Pi=function(e){b(n,e);var t=E(n);function n(e,r,o,i,a,s){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return v(this,n),(u=t.call(this)).from=e,u.to=r,u.gapFrom=o,u.gapTo=i,u.slice=a,u.insert=s,u.structure=c,u}return y(n,[{key:"apply",value:function(e){if(this.structure&&(Bi(e,this.from,this.gapFrom)||Bi(e,this.gapTo,this.to)))return Ni.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ni.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?Ni.fromReplace(e,this.from,this.to,n):Ni.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new Ci([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var t=this.gapTo-this.gapFrom;return new n(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new n(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,Co.fromJSON(e,t.slice),t.insert,!!t.structure)}}]),n}(Ai);function Bi(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function Li(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ii(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!Li(r,o,i))break}return null}function zi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=Vi(e,t),i=o&&$i(r,t);return i?o.map(Ui).concat({type:t,attrs:n}).concat(i.map(Ui)):null}function Ui(e){return{type:e,attrs:null}}function Vi(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function $i(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,u=r;s&&u<o;u++)s=s.matchType(n.child(u).type);return s&&s.validEnd?a:null}function Hi(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=e.steps.length;e.doc.nodesBetween(t,n,(function(t,n){if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);var a=e.mapping.slice(i),s=a.map(n,1),u=a.map(n+t.nodeSize,1);return e.step(new Pi(s,u,s+1,u-1,new Co(wo.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}function qi(e,t,n,r,o){var i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);var a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Pi(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Co(wo.from(a),0,0),1,!0))}function Wi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,u=n-2;s>i;s--,u--){var c=o.node(s),l=o.index(s);if(c.type.spec.isolating)return!1;var f=c.content.cutByIndex(l,c.childCount),d=r&&r[u]||c;if(d!=c&&(f=f.replaceChild(0,d.type.create(d.attrs))),!c.canReplace(l+1,c.childCount)||!d.type.validContent(f))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)}function Gi(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.doc.resolve(t),i=wo.empty,a=wo.empty,s=o.depth,u=o.depth-n,c=n-1;s>u;s--,c--){i=wo.from(o.node(s).copy(i));var l=r&&r[c];a=wo.from(l?l.type.create(l.attrs,a):o.node(s).copy(a))}e.step(new Ri(t,t,new Co(i.append(a),n,n),!0))}function Yi(e,t){var n=e.resolve(t),r=n.index();return Ki(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Ki(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function Ji(e,t,n){var r=new Ri(t-n,t+n,Co.empty,!0);e.step(r)}function Qi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Co.empty;if(t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return Xi(o,i,r)?new Ri(t,n,r):new Zi(o,i,r).fit()}function Xi(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Ai.jsonID("replaceAround",Pi);var Zi=function(){function e(t,n,r){v(this,e),this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=wo.empty;for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(var a=t.depth;a>0;a--)this.placed=wo.from(t.node(a).copy(this.placed))}return y(e,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var u=new Co(i,a,s);return t>-1?new Pi(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new Ri(r.pos,o.pos,u):null}},{key:"findFittable",value:function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=null,r=(t?(n=na(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,u=void 0,c=null;if(1==e&&(r?s.matchType(r.type)||(c=s.fillBefore(wo.from(r),!1)):n&&a.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:c};if(2==e&&r&&(u=s.findWrapping(r.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:u};if(n&&s.matchType(n.type))break}}},{key:"openMore",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=na(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new Co(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}},{key:"dropNode",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=na(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new Co(ea(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Co(ea(t,n,1),n,r)}},{key:"placeNodes",value:function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,i=e.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a<i.length;a++)this.openFrontierNode(i[a]);var s=this.unplaced,u=r?r.content:s.content,c=s.openStart-t,l=0,f=[],d=this.frontier[n],p=d.match,h=d.type;if(o){for(a=0;a<o.childCount;a++)f.push(o.child(a));p=p.matchFragment(o)}for(var v=u.size+t-(s.content.size-s.openEnd);l<u.childCount;){var m=u.child(l),y=p.matchType(m.type);if(!y)break;(++l>1||0==c||m.content.size)&&(p=y,f.push(ra(m.mark(h.allowedMarks(m.marks)),1==l?c:0,l==u.childCount?v:-1)))}var g=l==u.childCount;g||(v=-1),this.placed=ta(this.placed,n,wo.from(f)),this.frontier[n].match=p,g&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var b=0,k=u;b<v;b++){var w=k.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),k=w.content}this.unplaced=g?0==t?Co.empty:new Co(ea(s.content,t-1,1),t-1,v<0?s.openEnd:t-1):new Co(ea(s.content,t,l),s.openStart,s.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!oa(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r}},{key:"findCloseLevel",value:function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=oa(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var u=this.frontier[s],c=u.match,l=oa(e,s,u.type,c,!0);if(!l||l.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}},{key:"close",value:function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=ta(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e}},{key:"openFrontierNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=ta(this.placed,this.depth,wo.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}},{key:"closeFrontierNode",value:function(){var e=this.frontier.pop().match.fillBefore(wo.empty,!0);e.childCount&&(this.placed=ta(this.placed,this.frontier.length,e))}}]),e}();function ea(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ea(e.firstChild.content,t-1,n)))}function ta(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ta(e.lastChild.content,t-1,n)))}function na(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function ra(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,ra(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(wo.empty,!0)))),e.copy(r)}function oa(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function ia(e){return e.spec.defining||e.spec.definingForContent}function aa(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(aa(i.content,t+1,n,r,i)))}if(t>r){var a=o.contentMatchAt(0),s=a.fillBefore(e).append(e);e=s.append(a.matchFragment(s).fillBefore(wo.empty,!0))}return e}function sa(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var ua=Error;((ua=function e(t){var n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype)).constructor=ua,ua.prototype.name="TransformError";var ca=function(){function e(t){v(this,e),this.doc=t,this.steps=[],this.docs=[],this.mapping=new ji}return y(e,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(e){var t=this.maybeStep(e);if(t.failed)throw new ua(t.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Co.empty,r=Qi(this.doc,e,t,n);return r&&this.step(r),this}},{key:"replaceWith",value:function(e,t,n){return this.replace(e,t,new Co(wo.from(n),0,0))}},{key:"delete",value:function(e,t){return this.replace(e,t,Co.empty)}},{key:"insert",value:function(e,t){return this.replaceWith(e,e,t)}},{key:"replaceRange",value:function(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);var o=e.doc.resolve(t),i=e.doc.resolve(n);if(Xi(o,i,r))return e.step(new Ri(t,n,r));var a=sa(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,c=o.pos-1;u>0;u--,c--){var l=o.node(u).type.spec;if(l.defining||l.definingAsContext||l.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==c&&a.splice(1,0,-u)}for(var f=a.indexOf(s),d=[],p=r.openStart,h=r.content,v=0;;v++){var m=h.firstChild;if(d.push(m),v==r.openStart)break;h=m.content}for(var y=p-1;y>=0;y--){var g=d[y].type,b=ia(g);if(b&&o.node(f).type!=g)p=y;else if(b||!g.isTextblock)break}for(var k=r.openStart;k>=0;k--){var w=(k+p+1)%(r.openStart+1),x=d[w];if(x)for(var O=0;O<a.length;O++){var E=a[(O+f)%a.length],D=!0;E<0&&(D=!1,E=-E);var S=o.node(E-1),C=o.index(E-1);if(S.canReplaceWith(C,C,x.type,x.marks))return e.replace(o.before(E),D?i.after(E):n,new Co(aa(r.content,0,r.openStart,w),w,r.openEnd))}}for(var j=e.steps.length,_=a.length-1;_>=0&&(e.replace(t,n,r),!(e.steps.length>j));_--){var A=a[_];A<0||(t=o.before(A),n=i.after(A))}}(this,e,t,n),this}},{key:"replaceRangeWith",value:function(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){var o=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new Co(wo.from(r),0,0))}(this,e,t,n),this}},{key:"deleteRange",value:function(e,t){return function(e,t,n){for(var r=e.doc.resolve(t),o=e.doc.resolve(n),i=sa(r,o),a=0;a<i.length;a++){var s=i[a],u=a==i.length-1;if(u&&0==s||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(u||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(var c=1;c<=r.depth&&c<=o.depth;c++)if(t-r.start(c)==r.depth-c&&n>r.end(c)&&o.end(c)-n!=o.depth-c)return e.delete(r.before(c),n);e.delete(t,n)}(this,e,t),this}},{key:"lift",value:function(e,t){return function(e,t,n){for(var r=t.$from,o=t.$to,i=t.depth,a=r.before(i+1),s=o.after(i+1),u=a,c=s,l=wo.empty,f=0,d=i,p=!1;d>n;d--)p||r.index(d)>0?(p=!0,l=wo.from(r.node(d).copy(l)),f++):u--;for(var h=wo.empty,v=0,m=i,y=!1;m>n;m--)y||o.after(m+1)<o.end(m)?(y=!0,h=wo.from(o.node(m).copy(h)),v++):c++;e.step(new Pi(u,c,a,s,new Co(l.append(h),f,v),l.size-f,!0))}(this,e,t),this}},{key:"join",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ji(this,e,t),this}},{key:"wrap",value:function(e,t){return function(e,t,n){for(var r=wo.empty,o=n.length-1;o>=0;o--){if(r.size){var i=n[o].type.contentMatch.matchFragment(r);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=wo.from(n[o].type.create(n[o].attrs,r))}var a=t.start,s=t.end;e.step(new Pi(a,s,a,s,new Co(r,0,0),n.length,!0))}(this,e,t),this}},{key:"setBlockType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Hi(this,e,t,n,r),this}},{key:"setNodeMarkup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return qi(this,e,t,n,r),this}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;return Gi(this,e,t,n),this}},{key:"addMark",value:function(e,t,n){return function(e,t,n,r){var o,i,a=[],s=[];e.doc.nodesBetween(t,n,(function(e,u,c){if(e.isInline){var l=e.marks;if(!r.isInSet(l)&&c.type.allowsMarkType(r.type)){for(var f=Math.max(u,t),d=Math.min(u+e.nodeSize,n),p=r.addToSet(l),h=0;h<l.length;h++)l[h].isInSet(p)||(o&&o.to==f&&o.mark.eq(l[h])?o.to=d:a.push(o=new Fi(f,d,l[h])));i&&i.to==f?i.to=d:s.push(i=new Mi(f,d,r))}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)}))}(this,e,t,n),this}},{key:"removeMark",value:function(e,t,n){return function(e,t,n,r){var o=[],i=0;e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof ui)for(var u,c=e.marks;u=r.isInSet(c);)(s||(s=[])).push(u),c=u.removeFromSet(c);else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var l=Math.min(a+e.nodeSize,n),f=0;f<s.length;f++){for(var d=s[f],p=void 0,h=0;h<o.length;h++){var v=o[h];v.step==i-1&&d.eq(o[h].style)&&(p=v)}p?(p.to=l,p.step=i):o.push({style:d,from:Math.max(a,t),to:l,step:i})}}})),o.forEach((function(t){return e.step(new Fi(t.from,t.to,t.style))}))}(this,e,t,n),this}},{key:"clearIncompatible",value:function(e,t,n){return function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.contentMatch,o=e.doc.nodeAt(t),i=[],a=t+1,s=0;s<o.childCount;s++){var u=o.child(s),c=a+u.nodeSize,l=r.matchType(u.type);if(l){r=l;for(var f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new Fi(a,c,u.marks[f]))}else i.push(new Ri(a,c,Co.empty));a=c}if(!r.validEnd){var d=r.fillBefore(wo.empty,!0);e.replace(a,a,new Co(d,0,0))}for(var p=i.length-1;p>=0;p--)e.step(i[p])}(this,e,t,n),this}}]),e}(),la=Object.create(null),fa=function(){function e(t,n,r){v(this,e),this.$anchor=t,this.$head=n,this.ranges=r||[new da(t.min(n),t.max(n))]}return y(e,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Co.empty,n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,a=this.ranges,s=0;s<a.length;s++){var u=a[s],c=u.$from,l=u.$to,f=e.mapping.slice(i);e.replaceRange(f.map(c.pos),f.map(l.pos),s?Co.empty:t),0==s&&xa(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,u=e.mapping.slice(n),c=u.map(a.pos),l=u.map(s.pos);o?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),xa(e,n,t.isInline?-1:1))}}},{key:"getBookmark",value:function(){return va.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.parent.inlineContent?new va(e):wa(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?wa(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):wa(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}return null}},{key:"near",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(e,t)||this.findFrom(e,-t)||new ba(e.node(0))}},{key:"atStart",value:function(e){return wa(e,e,0,0,1)||new ba(e)}},{key:"atEnd",value:function(e){return wa(e,e,e.content.size,e.childCount,-1)||new ba(e)}},{key:"fromJSON",value:function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=la[t.type];if(!n)throw new RangeError("No selection type ".concat(t.type," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in la)throw new RangeError("Duplicate use of selection JSON ID "+e);return la[e]=t,t.prototype.jsonID=e,t}}]),e}();fa.prototype.visible=!0;var da=y((function e(t,n){v(this,e),this.$from=t,this.$to=n})),pa=!1;function ha(e){pa||e.parent.inlineContent||(pa=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var va=function(e){b(n,e);var t=E(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return v(this,n),ha(e),ha(r),t.call(this,e,r)}return y(n,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return fa.near(r);var o=e.resolve(t.map(this.anchor));return new n(o.parent.inlineContent?o:r,r)}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Co.empty;if(rt(k(n.prototype),"replace",this).call(this,e,t),t==Co.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}},{key:"getBookmark",value:function(){return new ma(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}},{key:"between",value:function(e,t,r){var o=e.pos-t.pos;if(r&&!o||(r=o>=0?1:-1),!t.parent.inlineContent){var i=fa.findFrom(t,r,!0)||fa.findFrom(t,-r,!0);if(!i)return fa.near(t,r);t=i.$head}return e.parent.inlineContent||(0==o||(e=(fa.findFrom(e,-r,!0)||fa.findFrom(e,r,!0)).$anchor).pos<t.pos!=o<0)&&(e=t),new n(e,t)}}]),n}(fa);fa.jsonID("text",va);var ma=function(){function e(t,n){v(this,e),this.anchor=t,this.head=n}return y(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){return va.between(e.resolve(this.anchor),e.resolve(this.head))}}]),e}(),ya=function(e){b(n,e);var t=E(n);function n(e){var r;v(this,n);var o=e.nodeAfter,i=e.node(0).resolve(e.pos+o.nodeSize);return(r=t.call(this,e,i)).node=o,r}return y(n,[{key:"map",value:function(e,t){var r=t.mapResult(this.anchor),o=r.deleted,i=r.pos,a=e.resolve(i);return o?fa.near(a):new n(a)}},{key:"content",value:function(){return new Co(wo.from(this.node),0,0)}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new ga(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new n(e.resolve(t.anchor))}},{key:"create",value:function(e,t){return new n(e.resolve(t))}},{key:"isSelectable",value:function(e){return!e.isText&&!1!==e.type.spec.selectable}}]),n}(fa);ya.prototype.visible=!1,fa.jsonID("node",ya);var ga=function(){function e(t){v(this,e),this.anchor=t}return y(e,[{key:"map",value:function(t){var n=t.mapResult(this.anchor),r=n.deleted,o=n.pos;return r?new ma(o,o):new e(o)}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ya.isSelectable(n)?new ya(t):fa.near(t)}}]),e}(),ba=function(e){b(n,e);var t=E(n);function n(e){return v(this,n),t.call(this,e.resolve(0),e.resolve(e.content.size))}return y(n,[{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Co.empty;if(t==Co.empty){e.delete(0,e.doc.content.size);var r=fa.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else rt(k(n.prototype),"replace",this).call(this,e,t)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(e){return new n(e)}},{key:"eq",value:function(e){return e instanceof n}},{key:"getBookmark",value:function(){return ka}}],[{key:"fromJSON",value:function(e){return new n(e)}}]),n}(fa);fa.jsonID("all",ba);var ka={map:function(){return this},resolve:function(e){return new ba(e)}};function wa(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t.inlineContent)return va.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&ya.isSelectable(s))return ya.create(e,n-(o<0?s.nodeSize:0))}else{var u=wa(e,s,n+o,o<0?s.childCount:0,o,i);if(u)return u}n+=s.nodeSize*o}return null}function xa(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof Ri||i instanceof Pi)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(fa.near(e.doc.resolve(o),n))}}var Oa=function(e){b(n,e);var t=E(n);function n(e){var r;return v(this,n),(r=t.call(this,e.doc)).curSelectionFor=0,r.updated=0,r.meta=Object.create(null),r.time=Date.now(),r.curSelection=e.selection,r.storedMarks=e.storedMarks,r}return y(n,[{key:"selection",get:function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}},{key:"setSelection",value:function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(1&this.updated)>0}},{key:"setStoredMarks",value:function(e){return this.storedMarks=e,this.updated|=2,this}},{key:"ensureMarks",value:function(e){return Do.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}},{key:"addStoredMark",value:function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(2&this.updated)>0}},{key:"addStep",value:function(e,t){rt(k(n.prototype),"addStep",this).call(this,e,t),this.updated=-3&this.updated,this.storedMarks=null}},{key:"setTime",value:function(e){return this.time=e,this}},{key:"replaceSelection",value:function(e){return this.selection.replace(this,e),this}},{key:"replaceSelectionWith",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Do.none))),n.replaceWith(this,e),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(e,t,n){var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(fa.near(this.selection.$to)),this}},{key:"setMeta",value:function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}},{key:"getMeta",value:function(e){return this.meta["string"==typeof e?e:e.key]}},{key:"isGeneric",get:function(){for(var e in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=4,this}},{key:"scrolledIntoView",get:function(){return(4&this.updated)>0}}]),n}(ca);function Ea(e,t){return t&&e?e.bind(t):e}var Da=y((function e(t,n,r){v(this,e),this.name=t,this.init=Ea(n.init,r),this.apply=Ea(n.apply,r)})),Sa=[new Da("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new Da("selection",{init:function(e,t){return e.selection||fa.atStart(t.doc)},apply:function(e){return e.selection}}),new Da("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Da("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],Ca=y((function e(t,n){var r=this;v(this,e),this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Sa.slice(),n&&n.forEach((function(e){if(r.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");r.plugins.push(e),r.pluginsByKey[e.key]=e,e.spec.state&&r.fields.push(new Da(e.key,e.spec.state,e))}))})),ja=function(){function e(t){v(this,e),this.config=t}return y(e,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(e){return this.applyTransaction(e).state}},{key:"filterTransaction",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}},{key:"applyTransaction",value:function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,u=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,u,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var l=0;l<this.config.plugins.length;l++)r.push(l<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}},{key:"applyInner",value:function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var n=new e(this.config),r=this.config.fields,o=0;o<r.length;o++){var i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}},{key:"tr",get:function(){return new Oa(this)}},{key:"reconfigure",value:function(t){for(var n=new Ca(this.schema,t.plugins),r=n.fields,o=new e(n),i=0;i<r.length;i++){var a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}},{key:"toJSON",value:function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}}],[{key:"create",value:function(t){for(var n=new Ca(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n),o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}},{key:"fromJSON",value:function(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var o=new Ca(t.schema,t.plugins),i=new e(o);return o.fields.forEach((function(e){if("doc"==e.name)i.doc=qo.fromJSON(t.schema,n.doc);else if("selection"==e.name)i.selection=fa.fromJSON(i.doc,n.selection);else if("storedMarks"==e.name)n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var o in r){var a=r[o],s=a.spec.state;if(a.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,o))return void(i[e.name]=s.fromJSON.call(a,t,n[o],i))}i[e.name]=e.init(t,i)}})),i}}]),e}();function _a(e,t,n){for(var r in e){var o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=_a(o,t,{})),n[r]=o}return n}var Aa=function(){function e(t){v(this,e),this.spec=t,this.props={},t.props&&_a(t.props,this,this.props),this.key=t.key?t.key.key:Ta("plugin")}return y(e,[{key:"getState",value:function(e){return e[this.key]}}]),e}(),Na=Object.create(null);function Ta(e){return e in Na?e+"$"+ ++Na[e]:(Na[e]=0,e+"$")}var Ma=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";v(this,e),this.key=Ta(t)}return y(e,[{key:"get",value:function(e){return e.config.pluginsByKey[this.key]}},{key:"getState",value:function(e){return e[this.key]}}]),e}(),Fa="undefined"!=typeof navigator?navigator:null,Ra="undefined"!=typeof document?document:null,Pa=Fa&&Fa.userAgent||"",Ba=/Edge\/(\d+)/.exec(Pa),La=/MSIE \d/.exec(Pa),Ia=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Pa),za=!!(La||Ia||Ba),Ua=La?document.documentMode:Ia?+Ia[1]:Ba?+Ba[1]:0,Va=!za&&/gecko\/(\d+)/i.test(Pa);Va&&(/Firefox\/(\d+)/.exec(Pa)||[0,0])[1];var $a=!za&&/Chrome\/(\d+)/.exec(Pa),Ha=!!$a,qa=$a?+$a[1]:0,Wa=!za&&!!Fa&&/Apple Computer/.test(Fa.vendor),Ga=Wa&&(/Mobile\/\w+/.test(Pa)||!!Fa&&Fa.maxTouchPoints>2),Ya=Ga||!!Fa&&/Mac/.test(Fa.platform),Ka=/Android \d/.test(Pa),Ja=!!Ra&&"webkitFontSmoothing"in Ra.documentElement.style,Qa=Ja?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Xa=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Za=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},es=null,ts=function(e,t,n){var r=es||(es=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},ns=function(e,t,n,r){return n&&(is(e,t,n,r,-1)||is(e,t,n,r,1))},rs=/^(img|br|input|textarea|hr)$/i;function is(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:as(e))){var i=e.parentNode;if(!i||1!=i.nodeType||us(e)||rs.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Xa(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?as(e):0}}}function as(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ss(e,t,n){for(var r=0==t,o=t==as(e);r||o;){if(e==n)return!0;var i=Xa(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==as(e)}}function us(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var cs=function(e){var t=e.isCollapsed;return t&&Ha&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function ls(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function fs(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function ds(e,t){return"number"==typeof e?e:e[t]}function ps(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function hs(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=Za(a))if(1==a.nodeType){var s=a,u=s==i.body,c=u?fs(i):ps(s),l=0,f=0;if(t.top<c.top+ds(r,"top")?f=-(c.top-t.top+ds(o,"top")):t.bottom>c.bottom-ds(r,"bottom")&&(f=t.bottom-c.bottom+ds(o,"bottom")),t.left<c.left+ds(r,"left")?l=-(c.left-t.left+ds(o,"left")):t.right>c.right-ds(r,"right")&&(l=t.right-c.right+ds(o,"right")),l||f)if(u)i.defaultView.scrollBy(l,f);else{var d=s.scrollLeft,p=s.scrollTop;f&&(s.scrollTop+=f),l&&(s.scrollLeft+=l);var h=s.scrollLeft-d,v=s.scrollTop-p;t={left:t.left-h,top:t.top-v,right:t.right-h,bottom:t.bottom-v}}if(u)break}}function vs(e){for(var t=[],n=e.ownerDocument,r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Za(r));return t}function ms(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var ys=null;function gs(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,u=e.firstChild,c=0;u;u=u.nextSibling,c++){var l=void 0;if(1==u.nodeType)l=u.getClientRects();else{if(3!=u.nodeType)continue;l=ts(u).getClientRects()}for(var f=0;f<l.length;f++){var d=l[f];if(d.top<=a&&d.bottom>=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var p=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(p<o){n=u,o=p,r=p&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==u.nodeType&&p&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=xs(r,1);if(i.top!=i.bottom&&bs(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:gs(n,r)}function bs(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function ks(e,t,n){var r=e.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=e.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),u=0;u<s.length;u++){var c=s[u];if(bs(t,c))return ks(a,t,c)}if((i=(i+1)%r)==o)break}return e}function ws(e,t){var n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{var i=r.caretPositionFromPoint(t.left,t.top);i&&(n=i.offsetNode,o=i.offset)}catch(h){}if(!n&&r.caretRangeFromPoint){var a=r.caretRangeFromPoint(t.left,t.top);a&&(n=a.startContainer,o=a.startOffset)}var s,u=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top+1);if(!u||!e.dom.contains(1!=u.nodeType?u.parentNode:u)){var c=e.dom.getBoundingClientRect();if(!bs(t,c))return null;if(!(u=ks(e.dom,t,c)))return null}if(Wa)for(var l=u;n&&l;l=Za(l))l.draggable&&(n=void 0);if(u=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(u,t),n){if(Va&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length))<n.childNodes.length){var f,d=n.childNodes[o];"IMG"==d.nodeName&&(f=d.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==s&&(s=function(e,t,n){var r=gs(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,u,t));var p=e.docView.nearestDesc(u,!0);return{pos:s,inside:p?p.posAtStart-p.border:-1}}function xs(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var Os=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Es(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=Ja||Va;if(3==o.nodeType){if(!a||!Os.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==o.nodeValue.length?(s--,c=1):n<0?s--:u++,Ds(xs(ts(o,s,u),c),c<0)}var l=xs(ts(o,i,i),n);if(Va&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=xs(ts(o,i-1,i-1),-1);if(f.top==l.top){var d=xs(ts(o,i,i+1),-1);if(d.top!=l.top)return Ds(d,d.left<f.left)}}return l}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==as(o))){var p=o.childNodes[i-1];if(1==p.nodeType)return Ss(p.getBoundingClientRect(),!1)}if(i<as(o)){var h=o.childNodes[i];if(1==h.nodeType)return Ss(h.getBoundingClientRect(),!0)}return Ss(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==as(o))){var v=o.childNodes[i-1],m=3==v.nodeType?ts(v,as(v)-(a?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(m)return Ds(xs(m,1),!1)}if(i<as(o)){for(var y=o.childNodes[i];y.pmViewDesc&&y.pmViewDesc.ignoreForCoords;)y=y.nextSibling;var g=y?3==y.nodeType?ts(y,0,a?0:1):1==y.nodeType?y:null:null;if(g)return Ds(xs(g,-1),!0)}return Ds(xs(3==o.nodeType?ts(o):o,-n),n>=0)}function Ds(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Ss(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Cs(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var js=/[\u0590-\u08ac]/;var _s=null,As=null,Ns=!1;function Ts(e,t,n){return _s==t&&As==n?Ns:(_s=t,As=n,Ns="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Cs(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=Es(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=ts(a,0,a.nodeValue.length).getClientRects()}for(var u=0;u<s.length;u++){var c=s[u];if(c.bottom>c.top+1&&("up"==n?i.top-c.top>2*(c.bottom-i.top):c.bottom-i.bottom>2*(i.bottom-c.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return js.test(r.parent.textContent)&&s.modify?Cs(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?i:a}(e,t,n))}var Ms=function(){function e(t,n,r,o){v(this,e),this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=0,r.pmViewDesc=this}return y(e,[{key:"matchesWidget",value:function(e){return!1}},{key:"matchesMark",value:function(e){return!1}},{key:"matchesNode",value:function(e,t,n){return!1}},{key:"matchesHack",value:function(e){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(e){return!1}},{key:"size",get:function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var e=0;e<this.children.length;e++)this.children[e].destroy()}},{key:"posBeforeChild",value:function(e){for(var t=0,n=this.posAtStart;;t++){var r=this.children[t];if(r==e)return n;n+=r.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>Xa(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!1;break}if(u.previousSibling)break}if(null==s&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.nextSibling)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r),i=void 0;if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}},{key:"getDesc",value:function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t}},{key:"posFromDOM",value:function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}},{key:"descAt",value:function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}},{key:"domFromPos",value:function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n,r=0,o=0,i=0;r<this.children.length;r++){var a=this.children[r],s=i+a.size;if(s>e||a instanceof zs){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof Fs&&n.side>=0;r--);if(t<=0){for(var u,c=!0;(u=r?this.children[r-1]:null)&&u.dom.parentNode!=this.contentDOM;r--,c=!1);return u&&t&&c&&!u.border&&!u.domAtom?u.domFromPos(u.size,t):{node:this.contentDOM,offset:u?Xa(u.dom)+1:0}}for(var l,f=!0;(l=r<this.children.length?this.children[r]:null)&&l.dom.parentNode!=this.contentDOM;r++,f=!1);return l&&f&&!l.border&&!l.domAtom?l.domFromPos(0,t):{node:this.contentDOM,offset:l?Xa(l.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],u=i+s.size;if(-1==r&&e<=u){var c=i+s.border;if(e>=c&&t<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var l=a;l>0;l--){var f=this.children[l-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=Xa(f.dom)+1;break}e-=f.size}-1==r&&(r=0)}if(r>-1&&(u>t||a==this.children.length-1)){t=u;for(var d=a+1;d<this.children.length;d++){var p=this.children[d];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=Xa(p.dom);break}t+=p.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}},{key:"emptyChildAt",value:function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}},{key:"domAfterPos",value:function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}},{key:"setSelection",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var u=this.children[a],c=s+u.size;if(o>s&&i<c)return u.setSelection(e-s-u.border,t-s-u.border,n,r);s=c}var l=this.domFromPos(e,e?-1:1),f=t==e?l:this.domFromPos(t,t?-1:1),d=n.getSelection(),p=!1;if((Va||Wa)&&e==t){var h=l,v=h.node,m=h.offset;if(3==v.nodeType){if((p=!(!m||"\n"!=v.nodeValue[m-1]))&&m==v.nodeValue.length)for(var y,g=v;g;g=g.parentNode){if(y=g.nextSibling){"BR"==y.nodeName&&(l=f={node:y.parentNode,offset:Xa(y)+1});break}var b=g.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{var k=v.childNodes[m-1];p=k&&("BR"==k.nodeName||"false"==k.contentEditable)}}if(Va&&d.focusNode&&d.focusNode!=f.node&&1==d.focusNode.nodeType){var w=d.focusNode.childNodes[d.focusOffset];w&&"false"==w.contentEditable&&(r=!0)}if(r||p&&Wa||!ns(l.node,l.offset,d.anchorNode,d.anchorOffset)||!ns(f.node,f.offset,d.focusNode,d.focusOffset)){var x=!1;if((d.extend||e==t)&&!p){d.collapse(l.node,l.offset);try{e!=t&&d.extend(f.node,f.offset),x=!0}catch(D){if(!(D instanceof DOMException))throw D}}if(!x){if(e>t){var O=l;l=f,f=O}var E=document.createRange();E.setEnd(f.node,f.offset),E.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(E)}}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM&&"selection"!=e.type}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}},{key:"markParentsDirty",value:function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}}]),e}(),Fs=function(e){b(n,e);var t=E(n);function n(e,r,o,i){var a;v(this,n);var s,u=r.type.toDOM;if("function"==typeof u&&(u=u(o,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:i}))),!r.type.spec.raw){if(1!=u.nodeType){var c=document.createElement("span");c.appendChild(u),u=c}u.contentEditable="false",u.classList.add("ProseMirror-widget")}return(a=t.call(this,e,[],u,null)).widget=r,a.widget=r,s=x(a),a}return y(n,[{key:"matchesWidget",value:function(e){return 0==this.dirty&&e.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)}},{key:"ignoreMutation",value:function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),rt(k(n.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),n}(Ms),Rs=function(e){b(n,e);var t=E(n);function n(e,r,o,i){var a;return v(this,n),(a=t.call(this,e,[],r,null)).textDOM=o,a.text=i,a}return y(n,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}},{key:"domFromPos",value:function(e){return{node:this.textDOM,offset:e}}},{key:"ignoreMutation",value:function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}]),n}(Ms),Ps=function(e){b(n,e);var t=E(n);function n(e,r,o,i){var a;return v(this,n),(a=t.call(this,e,[],o,i)).mark=r,a}return y(n,[{key:"parseRule",value:function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}},{key:"matchesMark",value:function(e){return 3!=this.dirty&&this.mark.eq(e)}},{key:"markDirty",value:function(e,t){if(rt(k(n.prototype),"markDirty",this).call(this,e,t),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function(e,t,r){var o=n.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=Zs(i,t,a,r)),e>0&&(i=Zs(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}],[{key:"create",value:function(e,t,r,o){var i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return a&&a.dom||(a=wi.renderSpec(document,t.type.spec.toDOM(t,r))),new n(e,t,a.dom,a.contentDOM||a.dom)}}]),n}(Ms),Bs=function(e){b(n,e);var t=E(n);function n(e,r,o,i,a,s,u,c,l){var f;return v(this,n),(f=t.call(this,e,[],a,s)).node=r,f.outerDeco=o,f.innerDeco=i,f.nodeDOM=u,s&&f.updateChildren(c,l),f}return y(n,[{key:"parseRule",value:function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return wo.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t}},{key:"matchesNode",value:function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Ks(t,this.outerDeco)&&n.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,u=new Qs(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var u=0,c=[],l=null,f=0;;){if(u<o.length&&o[u].to==i){for(var d=o[u++],p=void 0;u<o.length&&o[u].to==i;)(p||(p=[d])).push(o[u++]);if(p){p.sort(Xs);for(var h=0;h<p.length;h++)n(p[h],f,!!l)}else n(d,f,!!l)}var v=void 0,m=void 0;if(l)m=-1,v=l,l=null;else{if(!(f<e.childCount))break;m=f,v=e.child(f++)}for(var y=0;y<c.length;y++)c[y].to<=i&&c.splice(y--,1);for(;u<o.length&&o[u].from<=i&&o[u].to>i;)c.push(o[u++]);var g=i+v.nodeSize;if(v.isText){var b=g;u<o.length&&o[u].from<b&&(b=o[u].from);for(var k=0;k<c.length;k++)c[k].to<b&&(b=c[k].to);b<g&&(l=v.cut(b-i),v=v.cut(0,b-i),g=b,m=-1)}r(v,v.isInline&&!v.isLeaf?c.filter((function(e){return!e.inline})):c.slice(),t.forChild(i,v),m),i=g}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?u.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&u.syncToMarks(i==n.node.childCount?Do.none:n.node.child(i).marks,r,e),u.placeWidget(t,e,o)}),(function(t,n,a,c){var l;u.syncToMarks(t.marks,r,e),u.findNodeMatch(t,n,a,c)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(l=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(t,n,a,l,e)||u.updateNextNode(t,n,a,e,c)||u.addNode(t,n,a,e,o),o+=t.nodeSize})),u.syncToMarks([],r,e),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),Vs(this.contentDOM,this.children,e),Ga&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}},{key:"localCompositionInfo",value:function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(e.state.selection instanceof va)||r<t||o>t+this.node.content.size)return null;var i=e.domSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=as(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){var s=a.nodeValue,u=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var u=a.text;o<e.childCount;){var c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;u+=c.text}if(i>=n){var l=s<r?u.lastIndexOf(t,r-s-1):-1;if(l>=0&&l+t.length+s>=n)return s+l;if(n==r&&u.length>=r+t.length-s&&u.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return u<0?null:{node:a,pos:u,text:s}}return{node:a,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}var a=new Rs(this,i,n,o);e.input.compositionNodes.push(a),this.children=Zs(this.children,r,r+o.length,e,a)}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}},{key:"updateInner",value:function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function(e){if(!Ks(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Ws(this.dom,this.nodeDOM,qs(this.outerDeco,this.node,t),qs(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}}},{key:"selectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(e,t,r,o,i,a){var s,u=i.nodeViews[t.type.name],c=u&&u(t,i,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:a}),r,o),l=c&&c.dom,f=c&&c.contentDOM;if(t.isText)if(l){if(3!=l.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else l=document.createTextNode(t.text);else if(!l){var d=wi.renderSpec(document,t.type.spec.toDOM(t));l=d.dom,f=d.contentDOM}f||t.isText||"BR"==l.nodeName||(l.hasAttribute("contenteditable")||(l.contentEditable="false"),t.type.spec.draggable&&(l.draggable=!0));var p=l;return l=Ys(l,r,t),c?s=new Us(e,t,r,o,l,f||null,p,c,i,a+1):t.isText?new Is(e,t,r,o,l,p,i):new n(e,t,r,o,l,f||null,p,i,a+1)}}]),n}(Ms);function Ls(e,t,n,r,o){return Ys(r,t,e),new Bs(void 0,e,t,n,r,r,r,o,0)}var Is=function(e){b(n,e);var t=E(n);function n(e,r,o,i,a,s,u){return v(this,n),t.call(this,e,r,o,i,a,null,s,u,0)}return y(n,[{key:"parseRule",value:function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}},{key:"inParent",value:function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}},{key:"domFromPos",value:function(e){return{node:this.nodeDOM,offset:e}}},{key:"localPosFromDOM",value:function(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):rt(k(n.prototype),"localPosFromDOM",this).call(this,e,t,r)}},{key:"ignoreMutation",value:function(e){return"characterData"!=e.type&&"selection"!=e.type}},{key:"slice",value:function(e,t,r){var o=this.node.cut(e,t),i=document.createTextNode(o.text);return new n(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}},{key:"markDirty",value:function(e,t){rt(k(n.prototype),"markDirty",this).call(this,e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function(){return!1}}]),n}(Bs),zs=function(e){b(n,e);var t=E(n);function n(){return v(this,n),t.apply(this,arguments)}return y(n,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(e){return 0==this.dirty&&this.dom.nodeName==e}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return"IMG"==this.dom.nodeName}}]),n}(Ms),Us=function(e){b(n,e);var t=E(n);function n(e,r,o,i,a,s,u,c,l,f){var d;return v(this,n),(d=t.call(this,e,r,o,i,a,s,u,l,f)).spec=c,d}return y(n,[{key:"update",value:function(e,t,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&rt(k(n.prototype),"update",this).call(this,e,t,r,o)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():rt(k(n.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():rt(k(n.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):rt(k(n.prototype),"setSelection",this).call(this,e,t,r,o)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),rt(k(n.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}},{key:"ignoreMutation",value:function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):rt(k(n.prototype),"ignoreMutation",this).call(this,e)}}]),n}(Bs);function Vs(e,t,n){for(var r=e.firstChild,o=!1,i=0;i<t.length;i++){var a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=Js(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof Ps){var u=r?r.previousSibling:e.lastChild;Vs(a.contentDOM,a.children,n),r=u?u.nextSibling:e.firstChild}}for(;r;)r=Js(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var $s=function(e){e&&(this.nodeName=e)};$s.prototype=Object.create(null);var Hs=[new $s];function qs(e,t,n){if(0==e.length)return Hs;for(var r=n?Hs[0]:new $s,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new $s(a.nodeName)),a){var u=a[s];null!=u&&(n&&1==o.length&&o.push(r=new $s(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+u:"style"==s?r.style=(r.style?r.style+";":"")+u:"nodeName"!=s&&(r[s]=u))}}return o}function Ws(e,t,n,r){if(n==Hs&&r==Hs)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var u=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(u=o.parentNode)&&u.nodeName.toLowerCase()==a.nodeName||((u=document.createElement(a.nodeName)).pmIsDeco=!0,u.appendChild(o),s=Hs[0]),o=u}Gs(o,s||Hs[0],a)}return o}function Gs(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):[],a=n.class?n.class.split(" ").filter(Boolean):[],s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var u=0;u<a.length;u++)-1==i.indexOf(a[u])&&e.classList.add(a[u]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var c,l=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=l.exec(t.style);)e.style.removeProperty(c[1]);n.style&&(e.style.cssText+=n.style)}}function Ys(e,t,n){return Ws(e,e,Hs,qs(t,n,1!=e.nodeType))}function Ks(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Js(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var Qs=function(){function e(t,n){v(this,e),this.lock=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var u=n.children[r-1];if(!(u instanceof Ps)){s=u,r--;break}n=u,r=u.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var c=s.node;if(c){if(c!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)}return y(e,[{key:"destroyBetween",value:function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var u=Ps.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}}},{key:"findNodeMatch",value:function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var u=this.top.children[a];if(u.matchesNode(e,t,n)&&!this.preMatch.matched.has(u)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}},{key:"updateNodeAt",value:function(e,t,n,r,o){var i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)}},{key:"findIndexWithChild",value:function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}}},{key:"updateNextNode",value:function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof Bs){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var u=a.dom;if(!(this.lock&&(u==this.lock||1==u.nodeType&&u.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&Ks(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=u&&(this.changed=!0),this.index++,!0;break}}return!1}},{key:"addNode",value:function(e,t,n,r,o){this.top.children.splice(this.index++,0,Bs.create(this.top,e,t,n,r,o)),this.changed=!0}},{key:"placeWidget",value:function(e,t,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){var o=new Fs(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function(){for(var e=this.top.children[this.index-1],t=this.top;e instanceof Ps;)e=(t=e).children[t.children.length-1];e&&e instanceof Is&&!/\n$/.test(e.node.text)||((Wa||Ha)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{var n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");var r=new zs(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}]),e}();function Xs(e,t){return e.type.side-t.type.side}function Zs(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var u=e[a],c=s,l=s+=u.size;c>=n||l<=t?i.push(u):(c<t&&i.push(u.slice(0,t-c,r)),o&&(i.push(o),o=void 0),l>n&&i.push(u.slice(n-c,u.size,r)))}return i}function eu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,u,c=r.resolve(a);if(cs(n)){for(s=c;o&&!o.node;)o=o.parent;var l=o.node;if(o&&l.isAtom&&ya.isSelectable(l)&&o.parent&&(!l.isInline||!ss(n.focusNode,n.focusOffset,o.dom))){var f=o.posBefore;u=new ya(a==f?c:r.resolve(f))}}else{var d=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(d<0)return null;s=r.resolve(d)}if(!u){var p="pointer"==t||e.state.selection.head<c.pos&&!i?1:-1;u=fu(e,s,c,p)}return u}function tu(e){return e.editable?e.hasFocus():pu(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function nu(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(cu(e,n),tu(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Ha){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&ns(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)uu(e);else{var i,a,s=n.anchor,u=n.head;!ru||n instanceof va||(n.$from.parent.inlineContent||(i=ou(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=ou(e,n.to))),e.docView.setSelection(s,u,e.root,t),ru&&(i&&au(i),a&&au(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&su(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var ru=Wa||Ha&&qa<63;function ou(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(Wa&&i&&"false"==i.contentEditable)return iu(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return iu(i);if(a)return iu(a)}}function iu(e){return e.contentEditable="true",Wa&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function au(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function su(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){tu(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function uu(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,Xa(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&za&&Ua<=11&&(r.disabled=!0,r.disabled=!1)}function cu(e,t){if(t instanceof ya){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(lu(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else lu(e)}function lu(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function fu(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||va.between(t,n,r)}function du(e){return(!e.editable||e.root.activeElement==e.dom)&&pu(e)}function pu(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function hu(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&fa.findFrom(a,t)}function vu(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function mu(e,t,n){var r=e.state.selection;if(!(r instanceof va)){if(r instanceof ya&&r.node.isInline)return vu(e,new va(t>0?r.$to:r.$from));var o=hu(e.state,t);return!!o&&vu(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=hu(e.state,t);return!!(i&&i instanceof ya)&&vu(e,i)}if(!(Ya&&n.indexOf("m")>-1)){var a,s=r.$head,u=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!u||u.isText)return!1;var c=t<0?s.pos-u.nodeSize:s.pos;return!!(u.isAtom||(a=e.docView.descAt(c))&&!a.contentDOM)&&(ya.isSelectable(u)?vu(e,new ya(t<0?e.state.doc.resolve(s.pos-u.nodeSize):s)):!!Ja&&vu(e,new va(e.state.doc.resolve(t<0?c:c+u.nodeSize))))}}function yu(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function gu(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function bu(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(Va&&1==n.nodeType&&r<yu(n)&&gu(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(gu(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(wu(n))break;for(var u=n.previousSibling;u&&gu(u);)o=n.parentNode,i=Xa(u),u=u.previousSibling;if(u)r=yu(n=u);else{if((n=n.parentNode)==e.dom)break;r=0}}a?xu(e,t,n,r):o&&xu(e,t,o,i)}}function ku(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=yu(n);;)if(r<a){if(1!=n.nodeType)break;if(!gu(n.childNodes[r]))break;o=n,i=++r}else{if(wu(n))break;for(var s=n.nextSibling;s&&gu(s);)o=s.parentNode,i=Xa(s)+1,s=s.nextSibling;if(s)r=0,a=yu(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&xu(e,t,o,i)}}function wu(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function xu(e,t,n,r){if(cs(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&nu(e)}),50)}function Ou(e,t,n){var r=e.state.selection;if(r instanceof va&&!r.empty||n.indexOf("s")>-1)return!1;if(Ya&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=hu(e.state,t);if(a&&a instanceof ya)return vu(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,u=r instanceof ba?fa.near(s,t):fa.findFrom(s,t);return!!u&&vu(e,u)}return!1}function Eu(e,t){if(!(e.state.selection instanceof va))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function Du(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Su(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Ya&&72==n&&"c"==r?Eu(e,-1)||bu(e):46==n||Ya&&68==n&&"c"==r?Eu(e,1)||ku(e):13==n||27==n||(37==n||Ya&&66==n&&"c"==r?mu(e,-1,r)||bu(e):39==n||Ya&&70==n&&"c"==r?mu(e,1,r)||ku(e):38==n||Ya&&80==n&&"c"==r?Ou(e,-1,r)||bu(e):40==n||Ya&&78==n&&"c"==r?function(e){if(!Wa||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Du(e,o,"true"),setTimeout((function(){return Du(e,o,"false")}),20)}return!1}(e)||Ou(e,1,r)||ku(e):r==(Ya?"m":"c")&&(66==n||73==n||89==n||90==n))}function Cu(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||wi.fromSchema(e.state.schema),u=Bu(),c=u.createElement("div");c.appendChild(s.serializeFragment(r,{document:u}));for(var l,f=c.firstChild,d=0;f&&1==f.nodeType&&(l=Ru[f.nodeName.toLowerCase()]);){for(var p=l.length-1;p>=0;p--){for(var h=u.createElement(l[p]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h),d++}f=c.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(d?" -".concat(d):""," ").concat(JSON.stringify(n))),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function ju(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||s||!n);if(u){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new Co(wo.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Co.empty;var c=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(c)a=c;else{var l=o.marks(),f=e.state.schema,d=wi.fromSchema(f);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(d.serializeNode(f.text(e,l)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Bu().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Ru[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),Ja&&function(e){for(var t=e.querySelectorAll(Ha?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var v=+h[3];v>0&&i.firstChild;v--)i=i.firstChild;if(!a){var m=e.someProp("clipboardParser")||e.someProp("domParser")||fi.fromSchema(e.state.schema);a=m.parseSlice(i,{preserveWhitespace:!(!u&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||_u.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(ur){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var u=r.nodes[n[s]];if(!u||u.hasRequiredAttrs())break;o=wo.from(u.create(n[s+1],o)),i++,a++}return new Co(o,i,a)}(Fu(a,+h[1],+h[2]),h[4]);else if(a=Co.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&Nu(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=Tu(i[i.length-1],o.length));var a=Au(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:wo.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,g=0,b=a.content.firstChild;y<a.openStart&&!b.type.spec.isolating;y++,b=b.firstChild);for(var k=a.content.lastChild;g<a.openEnd&&!k.type.spec.isolating;g++,k=k.lastChild);a=Fu(a,y,g)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var _u=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Au(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,wo.from(e));return e}function Nu(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=Nu(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(wo.from(Au(n,e,o+1))))}}function Tu(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,Tu(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(wo.empty,!0);return e.copy(n.append(r))}function Mu(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=Mu(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(wo.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function Fu(e,t,n){return t<e.openStart&&(e=new Co(Mu(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Co(Mu(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Ru={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Pu=null;function Bu(){return Pu||(Pu=document.implementation.createHTMLDocument("title"))}var Lu={},Iu={},zu=y((function e(){v(this,e),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}));function Uu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Vu(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=function(t){return $u(e,t)})}))}function $u(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Hu(e){return{left:e.clientX,top:e.clientY}}function qu(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var u=a(s);if("object"===typeof u)return u.v}return!1}function Wu(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Gu(e,t,n,r,o){return qu(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof ya&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(ya.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(Wu(e,ya.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&ya.isSelectable(r))&&(Wu(e,new ya(n),"pointer"),!0)}(e,n))}function Yu(e,t,n,r){return qu(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function Ku(e,t,n,r){return qu(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Wu(e,va.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)Wu(e,va.create(r,s+1,s+1+a.content.size),"pointer");else{if(!ya.isSelectable(a))continue;Wu(e,ya.create(r,s),"pointer")}return!0}}(e,n,r)}function Ju(e){return rc(e)}Iu.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Zu(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Ka||!Ha||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Ga||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||Su(e,n)?n.preventDefault():Uu(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,ls(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},Iu.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},Iu.keypress=function(e,t){var n=t;if(!(Zu(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ya&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof va)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var Qu=Ya?"metaKey":"ctrlKey";Lu.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=Ju(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Qu]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(Hu(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Xu(e,a,n,!!r)):("doubleClick"==i?Yu:Ku)(e,a.pos,a.inside,n)?n.preventDefault():Uu(e,"pointer"))};var Xu=function(){function e(t,n,r,o){var i,a,s=this;if(v(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Qu],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var u=t.state.doc.resolve(n.pos);i=u.parent,a=u.depth?u.before():0}var c=o?null:r.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof ya&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Va||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Uu(t,"pointer")}return y(e,[{key:"done",value:function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return nu(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Hu(e))),this.allowDefault||!t?Uu(this.view,"pointer"):Gu(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Wa&&this.mightDrag&&!this.mightDrag.node.isAtom||Ha&&!(this.view.state.selection instanceof va)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Wu(this.view,fa.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Uu(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Uu(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function Zu(e,t){return!!e.composing||!!(Wa&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Lu.touchdown=function(e){Ju(e),Uu(e,"pointer")},Lu.contextmenu=function(e){return Ju(e)};var ec=Ka?5e3:-1;function tc(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return rc(e)}),t))}function nc(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function rc(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(Ka&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),nc(e),t||e.docView&&e.docView.dirty){var n=eu(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}Iu.compositionstart=Iu.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),rc(e,!0),e.markCursor=null;else if(rc(e),Va&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}tc(e,ec)},Iu.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,tc(e,20))};var oc=za&&Ua<15||Ga&&Qa<604;function ic(e,t,n,r){var o=ju(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||Co.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Lu.copy=Iu.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=oc?null:n.clipboardData,a=Cu(e,r.content()),s=a.dom,u=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",u)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Iu.paste=function(e,t){var n=t;if(!e.composing||Ka){var r=oc?null:n.clipboardData;r&&ic(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ic(e,r.value,null,t):ic(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var ac=y((function e(t,n){v(this,e),this.slice=t,this.move=n})),sc=Ya?"altKey":"ctrlKey";for(var uc in Lu.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Hu(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof ya?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(ya.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(ya.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),u=Cu(e,s),c=u.dom,l=u.text;n.dataTransfer.clearData(),n.dataTransfer.setData(oc?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",oc||n.dataTransfer.setData("text/plain",l),e.dragging=new ac(s,!n[sc])}},Lu.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Iu.dragover=Iu.dragenter=function(e,t){return t.preventDefault()},Iu.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(Hu(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=ju(e,n.dataTransfer.getData(oc?"Text":"text/plain"),oc?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[sc]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||Co.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var u=a?function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(u>0?1:0),l=r.node(s),f=!1;if(1==a)f=l.canReplace(c,c,o);else{var d=l.contentMatchAt(c).findWrapping(o.firstChild.type);f=d&&l.canReplaceWith(c,c,d[0])}if(f)return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null}(e.state.doc,i.pos,a):i.pos;null==u&&(u=i.pos);var c=e.state.tr;s&&c.deleteSelection();var l=c.mapping.map(u),f=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,d=c.doc;if(f?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),!c.doc.eq(d)){var p=c.doc.resolve(l);if(f&&ya.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new ya(p));else{var h=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((function(e,t,n,r){return h=r})),c.setSelection(fu(e,p,c.doc.resolve(h)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))}}}}}},Lu.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&nu(e)}),20))},Lu.blur=function(e,t){var n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Lu.beforeinput=function(e,t){if(Ha&&Ka&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,ls(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Iu)Lu[uc]=Iu[uc];function cc(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var lc=function(){function e(t,n){v(this,e),this.toDOM=t,this.spec=n||vc,this.side=this.spec.side||0}return y(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new pc(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&cc(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),fc=function(){function e(t,n){v(this,e),this.attrs=t,this.spec=n||vc}return y(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new pc(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&cc(this.attrs,t.attrs)&&cc(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),dc=function(){function e(t,n){v(this,e),this.attrs=t,this.spec=n||vc}return y(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new pc(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&cc(this.attrs,t.attrs)&&cc(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),pc=function(){function e(t,n,r){v(this,e),this.from=t,this.to=n,this.type=r}return y(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof fc}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new lc(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new fc(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new dc(r,o))}}]),e}(),hc=[],vc={},mc=function(){function e(t,n){v(this,e),this.local=t.length?t:hc,this.children=n.length?n:hc}return y(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var u=this.children[s]+1;this.children[s+2].findInner(e-u,t-u,n,r+u,o)}}},{key:"map",value:function(e,t,n){return this==yc||0==e.maps.length?this:this.mapInner(e,t,0,0,n||vc)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var u=this.local[s].map(t,r,o);u&&u.type.valid(n,u)?(a||(a=[])).push(u):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),u=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var u=s[a+1],c=void 0;if(!(u<0||e>u+i)){var l=s[a]+i;t>=l?s[a+1]=e<=l?-2:-1:n>=o&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c)}}},c=0;c<n.maps.length;c++)n.maps[c].forEach(u);for(var l=!1,f=0;f<s.length;f+=3)if(s[f+1]<0){if(-2==s[f+1]){l=!0,s[f+1]=-1;continue}var d=n.map(e[f]+i),p=d-o;if(p<0||p>=r.content.size){l=!0;continue}var h=n.map(e[f+1]+i,-1)-o,v=r.content.findIndex(p),m=v.index,y=v.offset,g=r.maybeChild(m);if(g&&y==p&&y+g.nodeSize==h){var b=s[f+2].mapInner(n,g,d+1,e[f]+i+1,a);b!=yc?(s[f]=p,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,l=!0)}else l=!0}if(l){var k=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var u=e.local[i].map(r,o,t);u?n.push(u):a.onRemove&&a.onRemove(e.local[i].spec)}for(var c=0;c<e.children.length;c+=3)s(e.children[c+2],e.children[c]+t+1)}for(var u=0;u<e.length;u+=3)-1==e[u+1]&&s(e[u+2],t[u]+i+1);return n}(s,e,t,n,o,i,a),w=xc(k,r,0,a);t=w.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,E=0;O<w.children.length;O+=3){for(var D=w.children[O];E<s.length&&s[E]<D;)E+=3;s.splice(E,0,w.children[O],w.children[O+1],w.children[O+2])}}return new mc(t.sort(Oc),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(Oc),hc):yc}},{key:"add",value:function(t,n){return n.length?this==yc?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,u=t+r;if(s=kc(n,e,u)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,u+1):o.splice(a,0,t,t+e.nodeSize,xc(s,e,u+1,vc)),a+=3}}));for(var s=bc(a?wc(n):n,-r),u=0;u<s.length;u++)s[u].type.valid(t,s[u])||s.splice(u--,1);return new e(s.length?this.local.concat(s).sort(Oc):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==yc?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,u=r[i]+n,c=r[i+1]+n,l=0;l<t.length;l++)(a=t[l])&&a.from>u&&a.to<c&&(t[l]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var f=r[i+2].removeInner(s,u+1);f!=yc?r[i+2]=f:(r.splice(i,3),i-=3)}}if(o.length)for(var d,p=0;p<t.length;p++)if(d=t[p])for(var h=0;h<o.length;h++)o[h].eq(d,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):yc}},{key:"forChild",value:function(t,n){if(this==yc)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,u=0;u<this.local.length;u++){var c=this.local[u];if(c.from<s&&c.to>a&&c.type instanceof fc){var l=Math.max(a,c.from)-a,f=Math.min(s,c.to)-a;l<f&&(o||(o=[])).push(c.copy(l,f))}}if(o){var d=new e(o.sort(Oc),hc);return r?new gc([d,r]):d}return r||yc}},{key:"eq",value:function(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return Ec(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==yc)return hc;if(e.inlineContent||!this.local.some(fc.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof fc||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?xc(t,e,0,vc):yc}}]),e}();mc.empty=new mc([],[]),mc.removeOverlap=Ec;var yc=mc.empty,gc=function(){function e(t){v(this,e),this.members=t}return y(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,vc)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return mc.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=yc&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Ec(n?t:t.sort(Oc)):hc}}],[{key:"from",value:function(t){switch(t.length){case 0:return yc;case 1:return t[0];default:return new e(t)}}}]),e}();function bc(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new pc(o.from+t,o.to+t,o.type))}return n}function kc(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function wc(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function xc(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=kc(e,t,a+n);if(s){i=!0;var u=xc(s,t,n+a+1,r);u!=yc&&o.push(a,a+t.nodeSize,u)}}));for(var a=bc(i?wc(e):e,-n).sort(Oc),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new mc(a,o):yc}function Oc(e,t){return e.from-t.from||e.to-t.to}function Ec(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Dc(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Dc(t,o+1,i.copy(r.to,i.to)))}}return t}function Dc(e,t,n){for(;t<e.length&&Oc(n,e[t])>0;)t++;e.splice(t,0,n)}function Sc(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=yc&&t.push(r)})),e.cursorWrapper&&t.push(mc.create(e.state.doc,[e.cursorWrapper.deco])),gc.from(t)}var Cc={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jc=za&&Ua<=11,_c=function(){function e(){v(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return y(e,[{key:"set",value:function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}]),e}(),Ac=function(){function e(t,n){var r=this;v(this,e),this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new _c,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)r.queue.push(e[t]);za&&Ua<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?r.flushSoon():r.flush()})),jc&&(this.onCharData=function(e){r.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return y(e,[{key:"flushSoon",value:function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&this.observer.observe(this.view.dom,Cc),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)}},{key:"onSelectionChange",value:function(){if(du(this.view)){if(this.suppressingSelectionUpdates)return nu(this.view);if(za&&Ua<=11&&!this.view.state.selection.empty){var e=this.view.domSelection();if(e.focusNode&&ns(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelection())}},{key:"ignoreSelectionChange",value:function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}},{key:"flush",value:function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&du(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var u=this.registerMutation(e[s],a);u&&(r=r<0?u.from:Math.min(u.from,r),o=o<0?u.to:Math.max(u.to,o),u.typeOver&&(i=!0))}if(Va&&a.length>1){var c=a.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var l=c[0],f=c[1];l.parentNode&&l.parentNode.parentNode==f.parentNode?f.remove():l.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Nc)return;Nc=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||nu(this.view),this.currentSelection.set(t))}}},{key:"registerMutation",value:function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(za&&Ua<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],u=s.previousSibling,c=s.nextSibling;(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(o=u),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c)}var l=o&&o.parentNode==e.target?Xa(o)+1:0,f=n.localPosFromDOM(e.target,l,-1),d=i&&i.parentNode==e.target?Xa(i):e.target.childNodes.length;return{from:f,to:n.localPosFromDOM(e.target,d,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}]),e}(),Nc=!1;function Tc(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Wa&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||Wa&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function Mc(e,t,n,r,o){if(t<0){var i=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,a=eu(e,i);if(a&&!e.state.selection.eq(a)){var s=e.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),e.dispatch(s)}}else{var u=e.state.doc.resolve(t),c=u.sharedDepth(n);t=u.before(c+1),n=e.state.doc.resolve(n).after(c+1);var l=e.state.selection,f=function(e,t,n){var r,o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,s=o.toOffset,u=o.from,c=o.to,l=e.domSelection(),f=l.anchorNode;if(f&&e.dom.contains(1==f.nodeType?f:f.parentNode)&&(r=[{node:f,offset:l.anchorOffset}],cs(l)||r.push({node:l.focusNode,offset:l.focusOffset})),Ha&&8===e.input.lastKeyCode)for(var d=s;d>a;d--){var p=i.childNodes[d-1],h=p.pmViewDesc;if("BR"==p.nodeName&&!h){s=d;break}if(!h||h.size)break}var v=e.state.doc,m=e.someProp("domParser")||fi.fromSchema(e.state.schema),y=v.resolve(u),g=null,b=m.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",findPositions:r,ruleFromNode:Tc,context:y});if(r&&null!=r[0].pos){var k=r[0].pos,w=r[1]&&r[1].pos;null==w&&(w=k),g={anchor:k+u,head:w+u}}return{doc:b,sel:g,from:u,to:c}}(e,t,n);if(Ha&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from){var d=e.cursorWrapper.deco.type.toDOM.nextSibling,p=d&&d.nodeValue?d.nodeValue.length:1;f.sel={anchor:f.sel.anchor+p,head:f.sel.anchor+p}}var h,v,m=e.state.doc,y=m.slice(f.from,f.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(h=e.state.selection.to,v="end"):(h=e.state.selection.from,v="start"),e.input.lastKeyCode=null;var g=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,u=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,u))-i}if(s<i&&e.size<t.size){u=(i-=r<=i&&r>=s?i-r:0)+(u-s),s=i}else if(u<i){s=(i-=r<=i&&r>=u?i-r:0)+(s-u),u=i}return{start:i,endA:s,endB:u}}(y.content,f.doc.content,f.from,h,v);if((Ga&&e.input.lastIOSEnter>Date.now()-225||Ka)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!g||g.endA>=g.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,ls(13,"Enter"))})))e.input.lastIOSEnter=0;else{if(!g){if(!(r&&l instanceof va&&!l.empty&&l.$head.sameParent(l.$anchor))||e.composing||f.sel&&f.sel.anchor!=f.sel.head){if(f.sel){var b=Fc(e,e.state.doc,f.sel);b&&!b.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(b))}return}g={start:l.from,endA:l.to,endB:l.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&g.start==g.endB&&e.state.selection instanceof va&&(g.start>e.state.selection.from&&g.start<=e.state.selection.from+2&&e.state.selection.from>=f.from?g.start=e.state.selection.from:g.endA<e.state.selection.to&&g.endA>=e.state.selection.to-2&&e.state.selection.to<=f.to&&(g.endB+=e.state.selection.to-g.endA,g.endA=e.state.selection.to)),za&&Ua<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>f.from&&" \xa0"==f.doc.textBetween(g.start-f.from-1,g.start-f.from+1)&&(g.start--,g.endA--,g.endB--);var k,w=f.doc.resolveNoCache(g.start-f.from),x=f.doc.resolveNoCache(g.endB-f.from),O=m.resolve(g.start),E=w.sameParent(x)&&w.parent.inlineContent&&O.end()>=g.endA;if((Ga&&e.input.lastIOSEnter>Date.now()-225&&(!E||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!E&&w.pos<f.doc.content.size&&(k=fa.findFrom(f.doc.resolve(w.pos+1),1,!0))&&k.head==x.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,ls(13,"Enter"))})))e.input.lastIOSEnter=0;else if(e.state.selection.anchor>g.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Rc(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(Rc(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||Rc(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(m,g.start,g.endA,w,x)&&e.someProp("handleKeyDown",(function(t){return t(e,ls(8,"Backspace"))})))Ka&&Ha&&e.domObserver.suppressSelectionUpdates();else{Ha&&Ka&&g.endB==g.start&&(e.input.lastAndroidDelete=Date.now()),Ka&&!E&&w.start()!=x.start()&&0==x.parentOffset&&w.depth==x.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==g.endA&&(g.endB-=2,x=f.doc.resolveNoCache(g.endB-f.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,ls(13,"Enter"))}))}),20));var D,S,C,j=g.start,_=g.endA;if(E)if(w.pos==x.pos)za&&Ua<=11&&0==w.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return nu(e)}),20)),D=e.state.tr.delete(j,_),S=m.resolve(g.start).marksAcross(m.resolve(g.endA));else if(g.endA==g.endB&&(C=function(e,t){for(var n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,s=i,u=a,c=0;c<a.length;c++)s=a[c].removeFromSet(s);for(var l=0;l<i.length;l++)u=i[l].removeFromSet(u);if(1==s.length&&0==u.length)r=s[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=s.length||1!=u.length)return null;r=u[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var f=[],d=0;d<t.childCount;d++)f.push(o(t.child(d)));if(wo.from(f).eq(e))return{mark:r,type:n}}(w.parent.content.cut(w.parentOffset,x.parentOffset),O.parent.content.cut(O.parentOffset,g.endA-O.start()))))D=e.state.tr,"add"==C.type?D.addMark(j,_,C.mark):D.removeMark(j,_,C.mark);else if(w.parent.child(w.index()).isText&&w.index()==x.index()-(x.textOffset?0:1)){var A=w.parent.textBetween(w.parentOffset,x.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,j,_,A)})))return;D=e.state.tr.insertText(A,j,_)}if(D||(D=e.state.tr.replace(j,_,f.doc.slice(g.start-f.from,g.endB-f.from))),f.sel){var N=Fc(e,D.doc,f.sel);N&&!(Ha&&Ka&&e.composing&&N.empty&&(g.start!=g.endB||e.input.lastAndroidDelete<Date.now()-100)&&(N.head==j||N.head==D.mapping.map(_)-1)||za&&N.empty&&N.head==j)&&D.setSelection(N)}S&&D.ensureMarks(S),e.dispatch(D.scrollIntoView())}}}}function Fc(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:fu(e,t.resolve(n.anchor),t.resolve(n.head))}function Rc(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}var Pc=function(){function e(t,n){var r=this;v(this,e),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new zu,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Uc),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Ic(this),Lc(this),this.nodeViews=zc(this),this.docView=Ls(this.state.doc,Bc(this),Sc(this),this.dom,this),this.domObserver=new Ac(this,(function(e,t,n,o){return Mc(r,e,t,n,o)})),this.domObserver.start(),function(e){var t=function(t){var n=Lu[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||$u(e,t)||!e.editable&&t.type in Iu||n(e,t)})};for(var n in Lu)t(n);Wa&&e.dom.addEventListener("input",(function(){return null})),Vu(e)}(this),this.updatePluginViews()}return y(e,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}},{key:"update",value:function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Vu(this),this._props=e,e.plugins&&(e.plugins.forEach(Uc),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}},{key:"setProps",value:function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)}},{key:"updateState",value:function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}},{key:"updateStateInner",value:function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(nc(this),i=!0),this.state=e,t){var a=zc(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),Vu(this)}this.editable=Ic(this),Lc(this);var s=Sc(this),u=Bc(this),c=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",l=o||!this.docView.matchesNode(e.doc,u,s);!l&&e.selection.eq(r.selection)||(i=!0);var f="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s&&s!=e.dom&&e.dom.contains(s)){var u=s.getBoundingClientRect();if(u.top>=o-20){t=s,n=u.top;break}}}return{refDOM:t,refTop:n,stack:vs(e.dom)}}(this);if(i){this.domObserver.stop();var d=l&&(za||Ha)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(l){var p=Ha?this.trackWrites=this.domSelection().focusNode:null;!o&&this.docView.update(e.doc,u,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Ls(e.doc,u,s,this.dom,this)),p&&!this.trackWrites&&(d=!0)}d||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return ns(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?nu(this,d):(cu(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==c)this.dom.scrollTop=0;else if("to selection"==c){var h=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(function(e){return e(n)})));else if(e.selection instanceof ya){var v=this.docView.domAfterPos(e.selection.from);1==v.nodeType&&hs(this,v.getBoundingClientRect(),h)}else hs(this,this.coordsAtPos(e.selection.head,1),h)}else f&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;ms(r,0==o?0:o-n)}(f)}},{key:"destroyPluginViews",value:function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()}},{key:"updatePluginViews",value:function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}}},{key:"someProp",value:function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var u=a[s].props[e];if(null!=u&&(n=t?t(u):u))return n}}},{key:"hasFocus",value:function(){return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(ys)return e.focus(ys);var t=vs(e);e.focus(null==ys?{get preventScroll(){return ys={preventScroll:!0},!0}}:void 0),ys||(ys=!1,ms(t,0))}(this.dom),nu(this),this.domObserver.start()}},{key:"root",get:function(){var e=this,t=this._root;if(null==t)for(var n=function(t){if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return t.ownerDocument.getSelection()}),{v:e._root=t}},r=this.dom.parentNode;r;r=r.parentNode){var o=n(r);if("object"===typeof o)return o.v}return t||document}},{key:"posAtCoords",value:function(e){return ws(this,e)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Es(this,e,t)}},{key:"domAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}},{key:"nodeDOM",value:function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null}},{key:"posAtDOM",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}},{key:"endOfTextblock",value:function(e,t){return Ts(this,t||this.state,e)}},{key:"destroy",value:function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Sc(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}},{key:"isDestroyed",get:function(){return null==this.docView}},{key:"dispatchEvent",value:function(e){return function(e,t){$u(e,t)||!Lu[t.type]||!e.editable&&t.type in Iu||Lu[t.type](e,t)}(this,e)}},{key:"dispatch",value:function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),e}();function Bc(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[pc.node(0,e.state.doc.content.size,t)]}function Lc(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:pc.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Ic(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function zc(e){var t=Object.create(null);function n(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Uc(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Vc={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},$c={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Hc="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),qc="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Wc="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Gc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Yc="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Kc=Hc&&(Gc||+Hc[1]<57)||Wc&&Gc,Jc=0;Jc<10;Jc++)Vc[48+Jc]=Vc[96+Jc]=String(Jc);for(Jc=1;Jc<=24;Jc++)Vc[Jc+111]="F"+Jc;for(Jc=65;Jc<=90;Jc++)Vc[Jc]=String.fromCharCode(Jc+32),$c[Jc]=String.fromCharCode(Jc);for(var Qc in Vc)$c.hasOwnProperty(Qc)||($c[Qc]=Vc[Qc]);var Xc="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Zc(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var u=i[s];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: "+u);Xc?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function el(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function tl(e){var t=function(e){var t=Object.create(null);for(var n in e)t[Zc(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(Kc&&(e.ctrlKey||e.altKey||e.metaKey)||(qc||Yc)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?$c:Vc)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[el(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Vc[n.keyCode])&&r!=o){var s=t[el(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var u=t[el(o,n,!0)];if(u&&u(e.state,e.dispatch,e))return!0}return!1}}var nl=function(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)},rl=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=al(r);if(!o){var i=r.blockRange(),a=i&&Ii(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&yl(e,o,t))return!0;if(0==r.parent.content.size&&(ol(s,"end")||ya.isSelectable(s))){var u=Qi(e.doc,r.before(),r.after(),Co.empty);if(u&&u.slice.size<u.to-u.from){if(t){var c=e.tr.step(u);c.setSelection(ol(s,"end")?fa.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):ya.create(c.doc,o.pos-s.nodeSize)),t(c.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)};function ol(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}var il=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;i=al(o)}var a=i&&i.nodeBefore;return!(!a||!ya.isSelectable(a))&&(t&&t(e.tr.setSelection(ya.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function al(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}var sl=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=cl(r);if(!o)return!1;var i=o.nodeAfter;if(yl(e,o,t))return!0;if(0==r.parent.content.size&&(ol(i,"start")||ya.isSelectable(i))){var a=Qi(e.doc,r.before(),r.after(),Co.empty);if(a&&a.slice.size<a.to-a.from){if(t){var s=e.tr.step(a);s.setSelection(ol(i,"start")?fa.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):ya.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)},ul=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;i=cl(o)}var a=i&&i.nodeAfter;return!(!a||!ya.isSelectable(a))&&(t&&t(e.tr.setSelection(ya.create(e.doc,i.pos)).scrollIntoView()),!0)};function cl(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var ll=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&Ii(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},fl=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function dl(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var pl=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=dl(i.contentMatchAt(a));if(!s||!i.canReplaceWith(a,a,s))return!1;if(t){var u=r.after(),c=e.tr.replaceWith(u,u,s.createAndFill());c.setSelection(fa.near(c.doc.resolve(u),1)),t(c.scrollIntoView())}return!0},hl=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof ba||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=dl(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(va.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},vl=function(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(Wi(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&Ii(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},ml=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof ya&&e.selection.node.isBlock)return!(!r.parentOffset||!Wi(e.doc,r.pos))&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof va||e.selection instanceof ba)&&a.deleteSelection();var s=0==r.depth?null:dl(r.node(-1).contentMatchAt(r.indexAfter(-1))),u=i&&s?[{type:s}]:void 0,c=Wi(a.doc,a.mapping.map(r.pos),1,u);if(u||c||!Wi(a.doc,a.mapping.map(r.pos),1,s?[{type:s}]:void 0)||(s&&(u=[{type:s}]),c=!0),c&&(a.split(a.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=s)){var l=a.mapping.map(r.before()),f=a.doc.resolve(l);s&&r.node(-1).canReplaceWith(f.index(),f.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0};function yl(e,t,n){var r,o,i=t.nodeBefore,a=t.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(e,t,n){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(i,i+1)||!o.isTextblock&&!Yi(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){for(var u=t.pos+a.nodeSize,c=wo.empty,l=r.length-1;l>=0;l--)c=wo.from(r[l].create(null,c));c=wo.from(i.copy(c));var f=e.tr.step(new Pi(t.pos-1,u,t.pos,u,new Co(c,1,0),r.length,!0)),d=u+2*r.length;Yi(f.doc,d)&&f.join(d),n(f.scrollIntoView())}return!0}var p=fa.findFrom(t,1),h=p&&p.$from.blockRange(p.$to),v=h&&Ii(h);if(null!=v&&v>=t.depth)return n&&n(e.tr.lift(h,v).scrollIntoView()),!0;if(s&&ol(a,"start",!0)&&ol(i,"end")){for(var m=i,y=[];y.push(m),!m.isTextblock;)m=m.lastChild;for(var g=a,b=1;!g.isTextblock;g=g.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,g.content)){if(n){for(var k=wo.empty,w=y.length-1;w>=0;w--)k=wo.from(y[w].copy(k));n(e.tr.step(new Pi(t.pos-y.length,t.pos+a.nodeSize,t.pos+b,t.pos+a.nodeSize-b,new Co(k,y.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function gl(e){return function(t,n){for(var r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(va.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}var bl=gl(-1),kl=gl(1);function wl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),u=s&&zi(s,e,t);return!!u&&(r&&r(n.tr.wrap(s,u).scrollIntoView()),!0)}}function xl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function Ol(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,r){for(var o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var El=Ol(nl,rl,il),Dl=Ol(nl,sl,ul),Sl={Enter:Ol(fl,hl,vl,ml),"Mod-Enter":pl,Backspace:El,"Mod-Backspace":El,"Shift-Backspace":El,Delete:Dl,"Mod-Delete":Dl,"Mod-a":function(e,t){return t&&t(e.tr.setSelection(new ba(e.doc))),!0}},Cl={"Ctrl-h":Sl.Backspace,"Alt-Backspace":Sl["Mod-Backspace"],"Ctrl-d":Sl.Delete,"Ctrl-Alt-Backspace":Sl["Mod-Delete"],"Alt-Delete":Sl["Mod-Delete"],"Alt-d":Sl["Mod-Delete"],"Ctrl-a":bl,"Ctrl-e":kl};for(var jl in Sl)Cl[jl]=Sl[jl];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function _l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),u=!1,c=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var l=n.doc.resolve(s.start-2);c=new $o(l,l,s.depth),s.endIndex<s.parent.childCount&&(s=new $o(i,n.doc.resolve(a.end(s.depth)),s.depth)),u=!0}var f=zi(c,e,t,s);return!!f&&(r&&r(Al(n.tr,s,f,u,e).scrollIntoView()),!0)}}function Al(e,t,n,r,o){for(var i=wo.empty,a=n.length-1;a>=0;a--)i=wo.from(n[a].type.create(n[a].attrs,i));e.step(new Pi(t.start-(r?2:0),t.end,t.start,t.end,new Co(i,0,0),n.length,!0));for(var s=0,u=0;u<n.length;u++)n[u].type==o&&(s=u+1);for(var c=n.length-s,l=t.start+n.length-(r?2:0),f=t.parent,d=t.startIndex,p=t.endIndex,h=!0;d<p;d++,h=!1)!h&&Wi(e.doc,l,c)&&(e.split(l,c),l+=2*c),l+=f.child(d).nodeSize;return e}function Nl(e){return function(t,n){var r=t.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(t){return t.childCount>0&&t.firstChild.type==e}));return!!a&&(!n||(o.node(a.depth-1).type==e?function(e,t,n,r){var o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Pi(i-1,a,i,a,new Co(wo.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new $o(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));return t(o.lift(r,Ii(r)).scrollIntoView()),!0}(t,n,e,a):function(e,t,n){for(var r=e.tr,o=n.parent,i=n.end,a=n.endIndex-1,s=n.startIndex;a>s;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var u=r.doc.resolve(n.start),c=u.nodeAfter;if(r.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;var l=0==n.startIndex,f=n.endIndex==o.childCount,d=u.node(-1),p=u.index(-1);if(!d.canReplace(p+(l?0:1),p+1,c.content.append(f?wo.empty:wo.from(o))))return!1;var h=u.pos,v=h+c.nodeSize;return r.step(new Pi(h-(l?1:0),v+(f?1:0),h+1,v-1,new Co((l?wo.empty:wo.from(o.copy(wo.empty))).append(f?wo.empty:wo.from(o.copy(wo.empty))),l?0:1,f?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,a)))}}function Tl(e){var t=e.state,n=e.transaction,r=n.selection,i=n.doc,a=n.storedMarks;return Object(o.a)(Object(o.a)({},t),{},{apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}})}var Ml=function(){function e(t){v(this,e),this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}return y(e,[{key:"hasCustomState",get:function(){return!!this.customState}},{key:"state",get:function(){return this.customState||this.editor.state}},{key:"commands",get:function(){var e=this,t=this.rawCommands,n=this.editor,r=this.state,o=n.view,i=r.tr,a=this.buildProps(i);return Object.fromEntries(Object.entries(t).map((function(t){var n=Object(l.a)(t,2),r=n[0],s=n[1];return[r,function(){var t=s.apply(void 0,arguments)(a);return i.getMeta("preventDispatch")||e.hasCustomState||o.dispatch(i),t}]})))}},{key:"chain",get:function(){var e=this;return function(){return e.createChain()}}},{key:"can",get:function(){var e=this;return function(){return e.createCan()}}},{key:"createChain",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,i=this.editor,a=this.state,s=i.view,u=[],c=!!e,f=e||a.tr,d=function(){return c||!n||f.getMeta("preventDispatch")||t.hasCustomState||s.dispatch(f),u.every((function(e){return!0===e}))},p=Object(o.a)(Object(o.a)({},Object.fromEntries(Object.entries(r).map((function(e){var r=Object(l.a)(e,2),o=r[0],i=r[1];return[o,function(){var e=t.buildProps(f,n),r=i.apply(void 0,arguments)(e);return u.push(r),p}]})))),{},{run:d});return p}},{key:"createCan",value:function(e){var t=this,n=this.rawCommands,r=this.state,i=void 0,a=e||r.tr,s=this.buildProps(a,i),u=Object.fromEntries(Object.entries(n).map((function(e){var t=Object(l.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(Object(o.a)(Object(o.a)({},s),{},{dispatch:i}))}]})));return Object(o.a)(Object(o.a)({},u),{},{chain:function(){return t.createChain(a,i)}})}},{key:"buildProps",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,i=this.state,a=o.view;i.storedMarks&&e.setStoredMarks(i.storedMarks);var s={tr:e,editor:o,view:a,state:Tl({state:i,transaction:e}),dispatch:n?function(){}:void 0,chain:function(){return t.createChain(e)},can:function(){return t.createCan(e)},get commands(){return Object.fromEntries(Object.entries(r).map((function(e){var t=Object(l.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(s)}]})))}};return s}}]),e}(),Fl=function(){function e(){v(this,e),this.callbacks={}}return y(e,[{key:"on",value:function(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=this.callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){var n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((function(e){return e!==t})):delete this.callbacks[e]),this}},{key:"removeAllListeners",value:function(){this.callbacks={}}}]),e}();function Rl(e,t,n){return void 0===e.config[t]&&e.parent?Rl(e.parent,t,n):"function"===typeof e.config[t]?e.config[t].bind(Object(o.a)(Object(o.a)({},n),{},{parent:e.parent?Rl(e.parent,t,n):null})):e.config[t]}function Pl(e){return{baseExtensions:e.filter((function(e){return"extension"===e.type})),nodeExtensions:e.filter((function(e){return"node"===e.type})),markExtensions:e.filter((function(e){return"mark"===e.type}))}}function Bl(e){var t=[],n=Pl(e),r=n.nodeExtensions,i=n.markExtensions,a=[].concat(Object(J.a)(r),Object(J.a)(i)),s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((function(e){var n=Rl(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});n&&n().forEach((function(e){e.types.forEach((function(n){Object.entries(e.attributes).forEach((function(e){var r=Object(l.a)(e,2),i=r[0],a=r[1];t.push({type:n,name:i,attribute:Object(o.a)(Object(o.a)({},s),a)})}))}))}))})),a.forEach((function(e){var n={name:e.name,options:e.options,storage:e.storage},r=Rl(e,"addAttributes",n);if(r){var i=r();Object.entries(i).forEach((function(n){var r=Object(l.a)(n,2),i=r[0],a=r[1],u=Object(o.a)(Object(o.a)({},s),a);a.isRequired&&void 0===a.default&&delete u.default,t.push({type:e.name,name:i,attribute:u})}))}})),t}function Ll(e,t){if("string"===typeof e){if(!t.nodes[e])throw Error("There is no node type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.nodes[e]}return e}function Il(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return!!e})).reduce((function(e,t){var n=Object(o.a)({},e);return Object.entries(t).forEach((function(e){var t=Object(l.a)(e,2),r=t[0],o=t[1];n[r]?n[r]="class"===r?[n[r],o].join(" "):"style"===r?[n[r],o].join("; "):o:n[r]=o})),n}),{})}function zl(e,t){return t.filter((function(e){return e.attribute.rendered})).map((function(t){return t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:Object(Q.a)({},t.name,e.attrs[t.name])})).reduce((function(e,t){return Il(e,t)}),{})}function Ul(e){return"function"===typeof e}function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Ul(e)){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t?e.bind(t).apply(void 0,r):e.apply(void 0,r)}return e}function $l(e,t){return e.style?e:Object(o.a)(Object(o.a)({},e),{},{getAttrs:function(n){var r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;var i=t.reduce((function(e,t){var r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!==typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null===r||void 0===r?e:Object(o.a)(Object(o.a)({},e),{},Object(Q.a)({},t.name,r))}),{});return Object(o.a)(Object(o.a)({},r),i)}})}function Hl(e){return Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(l.a)(e,2),n=t[0],r=t[1];return("attrs"!==n||!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length&&e.constructor===Object}(r))&&(null!==r&&void 0!==r)})))}function ql(e){var t,n=Bl(e),r=Pl(e),i=r.nodeExtensions,a=r.markExtensions,s=null===(t=i.find((function(e){return Rl(e,"topNode")})))||void 0===t?void 0:t.name,u=Object.fromEntries(i.map((function(t){var r=n.filter((function(e){return e.type===t.name})),i={name:t.name,options:t.options,storage:t.storage},a=e.reduce((function(e,n){var r=Rl(n,"extendNodeSchema",i);return Object(o.a)(Object(o.a)({},e),r?r(t):{})}),{}),s=Hl(Object(o.a)(Object(o.a)({},a),{},{content:Vl(Rl(t,"content",i)),marks:Vl(Rl(t,"marks",i)),group:Vl(Rl(t,"group",i)),inline:Vl(Rl(t,"inline",i)),atom:Vl(Rl(t,"atom",i)),selectable:Vl(Rl(t,"selectable",i)),draggable:Vl(Rl(t,"draggable",i)),code:Vl(Rl(t,"code",i)),defining:Vl(Rl(t,"defining",i)),isolating:Vl(Rl(t,"isolating",i)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),u=Vl(Rl(t,"parseHTML",i));u&&(s.parseDOM=u.map((function(e){return $l(e,r)})));var c=Rl(t,"renderHTML",i);c&&(s.toDOM=function(e){return c({node:e,HTMLAttributes:zl(e,r)})});var l=Rl(t,"renderText",i);return l&&(s.toText=l),[t.name,s]}))),c=Object.fromEntries(a.map((function(t){var r=n.filter((function(e){return e.type===t.name})),i={name:t.name,options:t.options,storage:t.storage},a=e.reduce((function(e,n){var r=Rl(n,"extendMarkSchema",i);return Object(o.a)(Object(o.a)({},e),r?r(t):{})}),{}),s=Hl(Object(o.a)(Object(o.a)({},a),{},{inclusive:Vl(Rl(t,"inclusive",i)),excludes:Vl(Rl(t,"excludes",i)),group:Vl(Rl(t,"group",i)),spanning:Vl(Rl(t,"spanning",i)),code:Vl(Rl(t,"code",i)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),u=Vl(Rl(t,"parseHTML",i));u&&(s.parseDOM=u.map((function(e){return $l(e,r)})));var c=Rl(t,"renderHTML",i);return c&&(s.toDOM=function(e){return c({mark:e,HTMLAttributes:zl(e,r)})}),[t.name,s]})));return new ci({topNode:s,nodes:u,marks:c})}function Wl(e,t){return t.nodes[e]||t.marks[e]||null}function Gl(e,t){return Array.isArray(t)?t.some((function(t){return("string"===typeof t?t:t.name)===e.name})):t}function Yl(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Kl=y((function e(t){v(this,e),this.find=t.find,this.handler=t.handler}));function Jl(e){var t,n=e.editor,r=e.from,o=e.to,i=e.text,a=e.rules,s=e.plugin,u=n.view;if(u.composing)return!1;var c=u.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((function(e){return e.type.spec.code}))))return!1;var l=!1,f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n="";return e.parent.nodesBetween(Math.max(0,e.parentOffset-t),e.parentOffset,(function(t,r,o,i){var a,s,u;n+=(null===(s=(a=t.type.spec).toText)||void 0===s?void 0:s.call(a,{node:t,pos:r,parent:o,index:i}))||(null===(u=e.nodeBefore)||void 0===u?void 0:u.text)||"%leaf%"})),n}(c)+i;return a.forEach((function(e){if(!l){var t=function(e,t){if(Yl(t))return t.exec(e);var n=t(e);if(!n)return null;var r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r}(f,e.find);if(t){var a=u.state.tr,c=Tl({state:u.state,transaction:a}),d={from:r-(t[0].length-i.length),to:o},p=new Ml({editor:n,state:c}),h=p.commands,v=p.chain,m=p.can;null!==e.handler({state:c,range:d,match:t,commands:h,chain:v,can:m})&&a.steps.length&&(a.setMeta(s,{transform:a,from:r,to:o,text:i}),u.dispatch(a),l=!0)}}})),l}function Ql(e){var t=e.editor,n=e.rules,r=new Aa({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,o,i,a){return Jl({editor:t,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:function(e){return setTimeout((function(){var o=e.state.selection.$cursor;o&&Jl({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1}},handleKeyDown:function(e,o){if("Enter"!==o.key)return!1;var i=e.state.selection.$cursor;return!!i&&Jl({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}var Xl=y((function e(t){v(this,e),this.find=t.find,this.handler=t.handler}));function Zl(e){var t=e.editor,n=e.state,r=e.from,o=e.to,i=e.rule,a=new Ml({editor:t,state:n}),s=a.commands,u=a.chain,c=a.can,l=[];return n.doc.nodesBetween(r,o,(function(e,t){if(e.isTextblock&&!e.type.spec.code){var a=Math.max(r,t),f=Math.min(o,t+e.content.size);(function(e,t){if(Yl(t))return Object(J.a)(e.matchAll(t));var n=t(e);return n?n.map((function(t){var n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(a-t,f-t,void 0,"\ufffc"),i.find).forEach((function(e){if(void 0!==e.index){var t=a+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=i.handler({state:n,range:o,match:e,commands:s,chain:u,can:c});l.push(f)}}))}})),l.every((function(e){return null!==e}))}var ef=function(){function e(t,n){var r=this;v(this,e),this.splittableMarks=[],this.editor=n,this.extensions=e.resolve(t),this.schema=ql(this.extensions),this.extensions.forEach((function(e){var t;r.editor.extensionStorage[e.name]=e.storage;var n={name:e.name,options:e.options,storage:e.storage,editor:r.editor,type:Wl(e.name,r.schema)};"mark"===e.type&&((null===(t=Vl(Rl(e,"keepOnSplit",n)))||void 0===t||t)&&r.splittableMarks.push(e.name));var o=Rl(e,"onBeforeCreate",n);o&&r.editor.on("beforeCreate",o);var i=Rl(e,"onCreate",n);i&&r.editor.on("create",i);var a=Rl(e,"onUpdate",n);a&&r.editor.on("update",a);var s=Rl(e,"onSelectionUpdate",n);s&&r.editor.on("selectionUpdate",s);var u=Rl(e,"onTransaction",n);u&&r.editor.on("transaction",u);var c=Rl(e,"onFocus",n);c&&r.editor.on("focus",c);var l=Rl(e,"onBlur",n);l&&r.editor.on("blur",l);var f=Rl(e,"onDestroy",n);f&&r.editor.on("destroy",f)}))}return y(e,[{key:"commands",get:function(){var e=this;return this.extensions.reduce((function(t,n){var r=Rl(n,"addCommands",{name:n.name,options:n.options,storage:n.storage,editor:e.editor,type:Wl(n.name,e.schema)});return r?Object(o.a)(Object(o.a)({},t),r()):t}),{})}},{key:"plugins",get:function(){var t=this,n=this.editor,r=e.sort(Object(J.a)(this.extensions).reverse()),o=[],i=[],a=r.map((function(e){var r={name:e.name,options:e.options,storage:e.storage,editor:n,type:Wl(e.name,t.schema)},a=[],s=Rl(e,"addKeyboardShortcuts",r);if(s){var u=function(e){return new Aa({props:{handleKeyDown:tl(e)}})}(Object.fromEntries(Object.entries(s()).map((function(e){var t=Object(l.a)(e,2),r=t[0],o=t[1];return[r,function(){return o({editor:n})}]}))));a.push(u)}var c=Rl(e,"addInputRules",r);Gl(e,n.options.enableInputRules)&&c&&o.push.apply(o,Object(J.a)(c()));var f=Rl(e,"addPasteRules",r);Gl(e,n.options.enablePasteRules)&&f&&i.push.apply(i,Object(J.a)(f()));var d=Rl(e,"addProseMirrorPlugins",r);if(d){var p=d();a.push.apply(a,Object(J.a)(p))}return a})).flat();return[Ql({editor:n,rules:o})].concat(Object(J.a)(function(e){var t=e.editor,n=e.rules,r=null,o=!1,i=!1;return n.map((function(e){return new Aa({view:function(e){var t=function(t){var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy:function(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:function(e){return i=r===e.dom.parentElement,!1},paste:function(e,t){var n,r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null===r||void 0===r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:function(n,r,a){var s=n[0],u="paste"===s.getMeta("uiEvent")&&!o,c="drop"===s.getMeta("uiEvent")&&!i;if(u||c){var l=r.doc.content.findDiffStart(a.doc.content),f=r.doc.content.findDiffEnd(a.doc.content);if("number"===typeof l&&f&&l!==f.b){var d=a.tr,p=Tl({state:a,transaction:d});if(Zl({editor:t,state:p,from:Math.max(l-1,0),to:f.b,rule:e})&&d.steps.length)return d}}}})}))}({editor:n,rules:i})),Object(J.a)(a))}},{key:"attributes",get:function(){return Bl(this.extensions)}},{key:"nodeViews",get:function(){var e=this,t=this.editor,n=Pl(this.extensions).nodeExtensions;return Object.fromEntries(n.filter((function(e){return!!Rl(e,"addNodeView")})).map((function(n){var r=e.attributes.filter((function(e){return e.type===n.name})),o={name:n.name,options:n.options,storage:n.storage,editor:t,type:Ll(n.name,e.schema)},i=Rl(n,"addNodeView",o);if(!i)return[];return[n.name,function(e,o,a,s){var u=zl(e,r);return i()({editor:t,node:e,getPos:a,decorations:s,HTMLAttributes:u,extension:n})}]})))}}],[{key:"resolve",value:function(t){var n=e.sort(e.flatten(t)),r=function(e){var t=e.filter((function(t,n){return e.indexOf(t)!==n}));return Object(J.a)(new Set(t))}(n.map((function(e){return e.name})));return r.length&&console.warn("[tiptap warn]: Duplicate extension names found: [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"]. This can lead to issues.")),n}},{key:"flatten",value:function(e){var t=this;return e.map((function(e){var n=Rl(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return n?[e].concat(Object(J.a)(t.flatten(n()))):e})).flat(10)}},{key:"sort",value:function(e){return e.sort((function(e,t){var n=Rl(e,"priority")||100,r=Rl(t,"priority")||100;return n>r?-1:n<r?1:0}))}}]),e}();function tf(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function nf(e,t){var n=Object(o.a)({},e);return tf(e)&&tf(t)&&Object.keys(t).forEach((function(r){tf(t[r])&&r in e?n[r]=nf(e[r],t[r]):Object.assign(n,Object(Q.a)({},r,t[r]))})),n}var rf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v(this,e),this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Vl(Rl(this,"addOptions",{name:this.name}))),this.storage=Vl(Rl(this,"addStorage",{name:this.name,options:this.options}))||{}}return y(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=nf(this.options,e),t.storage=Vl(Rl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Vl(Rl(n,"addOptions",{name:n.name})),n.storage=Vl(Rl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function of(e,t,n){var r=t.from,o=t.to,i=n||{},a=i.blockSeparator,s=void 0===a?"\n\n":a,u=i.textSerializers,c=void 0===u?{}:u,l="",f=!0;return e.nodesBetween(r,o,(function(e,n,i,a){var u,d=null===c||void 0===c?void 0:c[e.type.name];d?(e.isBlock&&!f&&(l+=s,f=!0),i&&(l+=d({node:e,pos:n,parent:i,index:a,range:t}))):e.isText?(l+=null===(u=null===e||void 0===e?void 0:e.text)||void 0===u?void 0:u.slice(Math.max(r,n)-n,o-n),f=!1):e.isBlock&&!f&&(l+=s,f=!0)})),l}function af(e){return Object.fromEntries(Object.entries(e.nodes).filter((function(e){return Object(l.a)(e,2)[1].spec.toText})).map((function(e){var t=Object(l.a)(e,2);return[t[0],t[1].spec.toText]})))}var sf=rf.create({name:"clipboardTextSerializer",addProseMirrorPlugins:function(){var e=this;return[new Aa({key:new Ma("clipboardTextSerializer"),props:{clipboardTextSerializer:function(){var t=e.editor,n=t.state,r=t.schema,o=n.doc,i=n.selection.ranges,a=Math.min.apply(Math,Object(J.a)(i.map((function(e){return e.$from.pos})))),s=Math.max.apply(Math,Object(J.a)(i.map((function(e){return e.$to.pos}))));return of(o,{from:a,to:s},{textSerializers:af(r)})}}})]}});function uf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0},r=Object.keys(t);return!r.length||r.every((function(r){return n.strict?t[r]===e[r]:Yl(t[r])?t[r].test(e[r]):t[r]===e[r]}))}function cf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.find((function(e){return e.type===t&&uf(e.attrs,n)}))}function lf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!!cf(e,t,n)}function ff(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t){var r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),r.node){var o=cf(Object(J.a)(r.node.marks),t,n);if(o){var i=r.index,a=e.start()+r.offset,s=i+1,u=a+r.node.nodeSize;for(cf(Object(J.a)(r.node.marks),t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,a-=e.parent.child(i).nodeSize;for(;s<e.parent.childCount&&lf(Object(J.a)(e.parent.child(s).marks),t,n);)u+=e.parent.child(s).nodeSize,s+=1;return{from:a,to:u}}}}}function df(e,t){if("string"===typeof e){if(!t.marks[e])throw Error("There is no mark type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.marks[e]}return e}function pf(e){return e&&"object"===typeof e&&!Array.isArray(e)&&!function(e){var t;return"class"===(null===(t=e.constructor)||void 0===t?void 0:t.toString().substring(0,5))}(e)}function hf(e){return pf(e)&&e instanceof va}function vf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(e,t),n)}function mf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;var n=fa.atStart(e),r=fa.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;var o=n.from,i=r.to;return"all"===t?va.create(e,vf(0,o,i),vf(e.content.size,o,i)):va.create(e,vf(t,o,i),vf(t,o,i))}function yf(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function gf(e){var t="<body>".concat(e,"</body>");return(new window.DOMParser).parseFromString(t,"text/html").body}function bf(e,t,n){if(n=Object(o.a)({slice:!0,parseOptions:{}},n),"object"===typeof e&&null!==e)try{return Array.isArray(e)?wo.fromArray(e.map((function(e){return t.nodeFromJSON(e)}))):t.nodeFromJSON(e)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",i),bf("",t,n)}if("string"===typeof e){var r=fi.fromSchema(t);return n.slice?r.parseSlice(gf(e),n.parseOptions).content:r.parse(gf(e),n.parseOptions)}return bf("",t,n)}function kf(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}function wf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.from,i=r.to,a=r.empty,s=t?Ll(t,e.schema):null,u=[];e.doc.nodesBetween(o,i,(function(e,t){if(!e.isText){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);u.push({node:e,from:n,to:r})}}));var c=i-o,l=u.filter((function(e){return!s||s.name===e.node.type.name})).filter((function(e){return uf(e.node.attrs,n,{strict:!1})}));if(a)return!!l.length;var f=l.reduce((function(e,t){return e+t.to-t.from}),0);return f>=c}function xf(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Of(e,t){var n="string"===typeof t?[t]:t;return Object.keys(e).reduce((function(t,r){return n.includes(r)||(t[r]=e[r]),t}),{})}function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return bf(e,t,{slice:!1,parseOptions:n})}function Df(e,t){var n=df(t,e.schema),r=e.selection,i=r.from,a=r.to,s=r.empty,u=[];s?(e.storedMarks&&u.push.apply(u,Object(J.a)(e.storedMarks)),u.push.apply(u,Object(J.a)(e.selection.$head.marks()))):e.doc.nodesBetween(i,a,(function(e){u.push.apply(u,Object(J.a)(e.marks))}));var c=u.find((function(e){return e.type.name===n.name}));return c?Object(o.a)({},c.attrs):{}}function Sf(e,t,n){return Object.fromEntries(Object.entries(n).filter((function(n){var r=Object(l.a)(n,1)[0],o=e.find((function(e){return e.type===t&&e.name===r}));return!!o&&o.attribute.keepOnSplit})))}function Cf(e){for(var t=0;t<e.edgeCount;t+=1){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function jf(e,t){var n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){var r=n.filter((function(e){return null===t||void 0===t?void 0:t.includes(e.type.name)}));e.tr.ensureMarks(r)}}function _f(e){return function(t){return function(e,t){for(var n=e.depth;n>0;n-=1){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}}function Af(e,t){var n=Pl(t).nodeExtensions.find((function(t){return t.name===e}));if(!n)return!1;var r=Vl(Rl(n,"group",{name:n.name,options:n.options,storage:n.storage}));return"string"===typeof r&&r.split(" ").includes("list")}var Nf=function(e,t){var n=_f((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Yi(e.doc,n.pos)||(e.join(n.pos),!0)},Tf=function(e,t){var n=_f((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Yi(e.doc,r)||(e.join(r),!0)};function Mf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.empty,i=r.ranges,a=t?df(t,e.schema):null;if(o)return!!(e.storedMarks||e.selection.$from.marks()).filter((function(e){return!a||a.name===e.type.name})).find((function(e){return uf(e.attrs,n,{strict:!1})}));var s=0,u=[];if(i.forEach((function(t){var n=t.$from,r=t.$to,o=n.pos,i=r.pos;e.doc.nodesBetween(o,i,(function(e,t){if(e.isText||e.marks.length){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);s+=r-n,u.push.apply(u,Object(J.a)(e.marks.map((function(e){return{mark:e,from:n,to:r}}))))}}))})),0===s)return!1;var c=u.filter((function(e){return!a||a.name===e.mark.type.name})).filter((function(e){return uf(e.mark.attrs,n,{strict:!1})})).reduce((function(e,t){return e+t.to-t.from}),0),l=u.filter((function(e){return!a||e.mark.type!==a&&e.mark.type.excludes(a)})).reduce((function(e,t){return e+t.to-t.from}),0),f=c>0?c+l:c;return f>=s}var Ff=Object.freeze({__proto__:null,blur:function(){return function(e){var t=e.editor,n=e.view;return requestAnimationFrame((function(){var e;t.isDestroyed||(n.dom.blur(),null===(e=null===window||void 0===window?void 0:window.getSelection())||void 0===e||e.removeAllRanges())})),!0}},clearContent:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t){return t.commands.setContent("",e)}},clearNodes:function(){return function(e){var t=e.state,n=e.tr,r=e.dispatch,o=n.selection.ranges;return!r||(o.forEach((function(e){var r=e.$from,o=e.$to;t.doc.nodesBetween(r.pos,o.pos,(function(e,t){if(!e.type.isText){var r=n.doc,o=n.mapping,i=r.resolve(o.map(t)),a=r.resolve(o.map(t+e.nodeSize)),s=i.blockRange(a);if(s){var u=Ii(s);if(e.type.isTextblock){var c=i.parent.contentMatchAt(i.index()).defaultType;n.setNodeMarkup(s.start,c)}(u||0===u)&&n.lift(s,u)}}}))})),!0)}},command:function(e){return function(t){return e(t)}},createParagraphNear:function(){return function(e){var t=e.state,n=e.dispatch;return hl(t,n)}},deleteNode:function(e){return function(t){for(var n=t.tr,r=t.state,o=t.dispatch,i=Ll(e,r.schema),a=n.selection.$anchor,s=a.depth;s>0;s-=1){if(a.node(s).type===i){if(o){var u=a.before(s),c=a.after(s);n.delete(u,c).scrollIntoView()}return!0}}return!1}},deleteRange:function(e){return function(t){var n=t.tr,r=t.dispatch,o=e.from,i=e.to;return r&&n.delete(o,i),!0}},deleteSelection:function(){return function(e){var t=e.state,n=e.dispatch;return nl(t,n)}},enter:function(){return function(e){return e.commands.keyboardShortcut("Enter")}},exitCode:function(){return function(e){var t=e.state,n=e.dispatch;return pl(t,n)}},extendMarkRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=df(e,o.schema),s=r.doc,u=r.selection,c=u.$from,l=u.from,f=u.to;if(i){var d=ff(c,a,t);if(d&&d.from<=l&&d.to>=f){var p=va.create(s,d.from,d.to);r.setSelection(p)}}return!0}},first:function(e){return function(t){for(var n="function"===typeof e?e(t):e,r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1}},focus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.editor,i=n.view,a=n.tr,s=n.dispatch;t=Object(o.a)({scrollIntoView:!0},t);var u=function(){yf()&&i.dom.focus(),requestAnimationFrame((function(){r.isDestroyed||(i.focus(),(null===t||void 0===t?void 0:t.scrollIntoView)&&r.commands.scrollIntoView())}))};if(i.hasFocus()&&null===e||!1===e)return!0;if(s&&null===e&&!hf(r.state.selection))return u(),!0;var c=mf(a.doc,e)||r.state.selection,l=r.state.selection.eq(c);return s&&(l||a.setSelection(c),l&&a.storedMarks&&a.setStoredMarks(a.storedMarks),u()),!0}},forEach:function(e,t){return function(n){return e.every((function(e,r){return t(e,Object(o.a)(Object(o.a)({},n),{},{index:r}))}))}},insertContent:function(e,t){return function(n){var r=n.tr;return n.commands.insertContentAt({from:r.selection.from,to:r.selection.to},e,t)}},insertContentAt:function(e,t,n){return function(r){var i=r.tr,a=r.dispatch,s=r.editor;if(a){n=Object(o.a)({parseOptions:{},updateSelection:!0},n);var u=bf(t,s.schema,{parseOptions:Object(o.a)({preserveWhitespace:"full"},n.parseOptions)});if("<>"===u.toString())return!0;var c="number"===typeof e?{from:e,to:e}:e,l=c.from,f=c.to,d=!0,p=!0;if((u.toString().startsWith("<")?u:[u]).forEach((function(e){e.check(),d=!!d&&(e.isText&&0===e.marks.length),p=!!p&&e.isBlock})),l===f&&p){var h=i.doc.resolve(l).parent;h.isTextblock&&!h.type.spec.code&&!h.childCount&&(l-=1,f+=1)}d?i.insertText(t,l,f):i.replaceWith(l,f,u),n.updateSelection&&function(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o=e.steps[r];if(o instanceof Ri||o instanceof Pi){var i=e.mapping.maps[r],a=0;i.forEach((function(e,t,n,r){0===a&&(a=r)})),e.setSelection(fa.near(e.doc.resolve(a),n))}}}(i,i.steps.length-1,-1)}return!0}},joinBackward:function(){return function(e){var t=e.state,n=e.dispatch;return rl(t,n)}},joinForward:function(){return function(e){var t=e.state,n=e.dispatch;return sl(t,n)}},keyboardShortcut:function(e){return function(t){var n=t.editor,r=t.view,o=t.tr,i=t.dispatch,a=function(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"===a&&(a=" ");for(var s=0;s<i.length-1;s+=1){var u=i[s];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: ".concat(u));yf()||kf()?o=!0:n=!0}}return t&&(a="Alt-".concat(a)),n&&(a="Ctrl-".concat(a)),o&&(a="Meta-".concat(a)),r&&(a="Shift-".concat(a)),a}(e).split(/-(?!$)/),s=a.find((function(e){return!["Alt","Ctrl","Meta","Shift"].includes(e)})),u=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),c=n.captureTransaction((function(){r.someProp("handleKeyDown",(function(e){return e(r,u)}))}));return null===c||void 0===c||c.steps.forEach((function(e){var t=e.map(o.mapping);t&&i&&o.maybeStep(t)})),!0}},lift:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return!!wf(r,Ll(e,r.schema),t)&&ll(r,o)}},liftEmptyBlock:function(){return function(e){var t=e.state,n=e.dispatch;return vl(t,n)}},liftListItem:function(e){return function(t){var n=t.state,r=t.dispatch;return Nl(Ll(e,n.schema))(n,r)}},newlineInCode:function(){return function(e){var t=e.state,n=e.dispatch;return fl(t,n)}},resetAttributes:function(e,t){return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,u=xf("string"===typeof e?e:e.name,o.schema);return!!u&&("node"===u&&(a=Ll(e,o.schema)),"mark"===u&&(s=df(e,o.schema)),i&&r.selection.ranges.forEach((function(e){o.doc.nodesBetween(e.$from.pos,e.$to.pos,(function(e,n){a&&a===e.type&&r.setNodeMarkup(n,void 0,Of(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((function(o){s===o.type&&r.addMark(n,n+e.nodeSize,s.create(Of(o.attrs,t)))}))}))})),!0)}},scrollIntoView:function(){return function(e){var t=e.tr;return e.dispatch&&t.scrollIntoView(),!0}},selectAll:function(){return function(e){var t=e.tr;return e.commands.setTextSelection({from:0,to:t.doc.content.size})}},selectNodeBackward:function(){return function(e){var t=e.state,n=e.dispatch;return il(t,n)}},selectNodeForward:function(){return function(e){var t=e.state,n=e.dispatch;return ul(t,n)}},selectParentNode:function(){return function(e){return function(e,t){var n,r=e.selection,o=r.$from,i=r.to,a=o.sharedDepth(i);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(ya.create(e.doc,n))),!0)}(e.state,e.dispatch)}},selectTextblockEnd:function(){return function(e){var t=e.state,n=e.dispatch;return kl(t,n)}},selectTextblockStart:function(){return function(e){var t=e.state,n=e.dispatch;return bl(t,n)}},setContent:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.tr,i=r.editor,a=r.dispatch,s=o.doc,u=Ef(e,i.schema,n);return a&&o.replaceWith(0,s.content.size,u).setMeta("preventUpdate",!t),!0}},setMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,i=n.state,a=n.dispatch,s=r.selection,u=s.empty,c=s.ranges,l=df(e,i.schema);if(a)if(u){var f=Df(i,l);r.addStoredMark(l.create(Object(o.a)(Object(o.a)({},f),t)))}else c.forEach((function(e){var n=e.$from.pos,a=e.$to.pos;i.doc.nodesBetween(n,a,(function(e,i){var s=Math.max(i,n),u=Math.min(i+e.nodeSize,a);e.marks.find((function(e){return e.type===l}))?e.marks.forEach((function(e){l===e.type&&r.addMark(s,u,l.create(Object(o.a)(Object(o.a)({},e.attrs),t)))})):r.addMark(s,u,l.create(t))}))}));return!0}},setMeta:function(e,t){return function(n){return n.tr.setMeta(e,t),!0}},setNode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch,i=n.chain,a=Ll(e,r.schema);return a.isTextblock?i().command((function(e){var n=e.commands;return!!xl(a,t)(r)||n.clearNodes()})).command((function(e){var n=e.state;return xl(a,t)(n,o)})).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}},setNodeSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o=fa.atStart(r).from,i=fa.atEnd(r).to,a=vf(e,o,i),s=ya.create(r,a);n.setSelection(s)}return!0}},setTextSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o="number"===typeof e?{from:e,to:e}:e,i=o.from,a=o.to,s=va.atStart(r).from,u=va.atEnd(r).to,c=vf(i,s,u),l=vf(a,s,u),f=va.create(r,c,l);n.setSelection(f)}return!0}},sinkListItem:function(e){return function(t){var n,r=t.state,o=t.dispatch,i=Ll(e,r.schema);return(n=i,function(e,t){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount>0&&e.firstChild.type==n}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var u=a.parent,c=u.child(s-1);if(c.type!=n)return!1;if(t){var l=c.lastChild&&c.lastChild.type==u.type,f=wo.from(l?n.create():null),d=new Co(wo.from(n.create(null,wo.from(u.type.create(null,f)))),l?3:1,0),p=a.start,h=a.end;t(e.tr.step(new Pi(p-(l?3:1),h,p,h,d,1,!0)).scrollIntoView())}return!0})(r,o)}},splitBlock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.keepMarks,n=void 0===t||t;return function(e){var t=e.tr,r=e.state,o=e.dispatch,i=e.editor,a=t.selection,s=t.doc,u=a.$from,c=a.$to,l=Sf(i.extensionManager.attributes,u.node().type.name,u.node().attrs);if(a instanceof ya&&a.node.isBlock)return!(!u.parentOffset||!Wi(s,u.pos))&&(o&&(n&&jf(r,i.extensionManager.splittableMarks),t.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;if(o){var f=c.parentOffset===c.parent.content.size;a instanceof va&&t.deleteSelection();var d=0===u.depth?void 0:Cf(u.node(-1).contentMatchAt(u.indexAfter(-1))),p=f&&d?[{type:d,attrs:l}]:void 0,h=Wi(t.doc,t.mapping.map(u.pos),1,p);if(p||h||!Wi(t.doc,t.mapping.map(u.pos),1,d?[{type:d}]:void 0)||(h=!0,p=d?[{type:d,attrs:l}]:void 0),h&&(t.split(t.mapping.map(u.pos),1,p),d&&!f&&!u.parentOffset&&u.parent.type!==d)){var v=t.mapping.map(u.before()),m=t.doc.resolve(v);u.node(-1).canReplaceWith(m.index(),m.index()+1,d)&&t.setNodeMarkup(t.mapping.map(u.before()),d)}n&&jf(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0}},splitListItem:function(e){return function(t){var n,r=t.tr,o=t.state,i=t.dispatch,a=t.editor,s=Ll(e,o.schema),u=o.selection,c=u.$from,l=u.$to,f=o.selection.node;if(f&&f.isBlock||c.depth<2||!c.sameParent(l))return!1;var d=c.node(-1);if(d.type!==s)return!1;var p=a.extensionManager.attributes;if(0===c.parent.content.size&&c.node(-1).childCount===c.indexAfter(-1)){if(2===c.depth||c.node(-3).type!==s||c.index(-2)!==c.node(-2).childCount-1)return!1;if(i){for(var h=wo.empty,v=c.index(-1)?1:c.index(-2)?2:3,m=c.depth-v;m>=c.depth-3;m-=1)h=wo.from(c.node(m).copy(h));var y=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,g=Sf(p,c.node().type.name,c.node().attrs),b=(null===(n=s.contentMatch.defaultType)||void 0===n?void 0:n.createAndFill(g))||void 0;h=h.append(wo.from(s.createAndFill(null,b)||void 0));var k=c.before(c.depth-(v-1));r.replace(k,c.after(-y),new Co(h,4-v,0));var w=-1;r.doc.nodesBetween(k,r.doc.content.size,(function(e,t){if(w>-1)return!1;e.isTextblock&&0===e.content.size&&(w=t+1)})),w>-1&&r.setSelection(va.near(r.doc.resolve(w))),r.scrollIntoView()}return!0}var x=l.pos===c.end()?d.contentMatchAt(0).defaultType:null,O=Sf(p,d.type.name,d.attrs),E=Sf(p,c.node().type.name,c.node().attrs);r.delete(c.pos,l.pos);var D=x?[{type:s,attrs:O},{type:x,attrs:E}]:[{type:s,attrs:O}];return!!Wi(r.doc,c.pos,2)&&(i&&r.split(c.pos,2,D).scrollIntoView(),!0)}},toggleList:function(e,t){return function(n){var r=n.editor,o=n.tr,i=n.state,a=n.dispatch,s=n.chain,u=n.commands,c=n.can,l=r.extensionManager.extensions,f=Ll(e,i.schema),d=Ll(t,i.schema),p=i.selection,h=p.$from,v=p.$to,m=h.blockRange(v);if(!m)return!1;var y=_f((function(e){return Af(e.type.name,l)}))(p);if(m.depth>=1&&y&&m.depth-y.depth<=1){if(y.node.type===f)return u.liftListItem(d);if(Af(y.node.type.name,l)&&f.validContent(y.node.content)&&a)return s().command((function(){return o.setNodeMarkup(y.pos,f),!0})).command((function(){return Nf(o,f)})).command((function(){return Tf(o,f)})).run()}return s().command((function(){return!!c().wrapInList(f)||u.clearNodes()})).wrapInList(f).command((function(){return Nf(o,f)})).command((function(){return Tf(o,f)})).run()}},toggleMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=n.extendEmptyMarkRange,s=void 0!==a&&a,u=df(e,o.schema);return Mf(o,u,t)?i.unsetMark(u,{extendEmptyMarkRange:s}):i.setMark(u,t)}},toggleNode:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=Ll(e,o.schema),s=Ll(t,o.schema);return wf(o,a,n)?i.setNode(s):i.setNode(a,n)}},toggleWrap:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.commands,i=Ll(e,r.schema);return wf(r,i,t)?o.lift(i):o.wrapIn(i,t)}},undoInputRule:function(){return function(e){for(var t=e.state,n=e.dispatch,r=t.plugins,o=0;o<r.length;o+=1){var i=r[o],a=void 0;if(i.spec.isInputRules&&(a=i.getState(t))){if(n){for(var s=t.tr,u=a.transform,c=u.steps.length-1;c>=0;c-=1)s.step(u.steps[c].invert(u.docs[c]));if(a.text){var l=s.doc.resolve(a.from).marks();s.replaceWith(a.from,a.to,t.schema.text(a.text,l))}else s.delete(a.from,a.to)}return!0}}return!1}},unsetAllMarks:function(){return function(e){var t=e.tr,n=e.dispatch,r=t.selection,o=r.empty,i=r.ranges;return o||n&&i.forEach((function(e){t.removeMark(e.$from.pos,e.$to.pos)})),!0}},unsetMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r,o=n.tr,i=n.state,a=n.dispatch,s=t.extendEmptyMarkRange,u=void 0!==s&&s,c=o.selection,l=df(e,i.schema),f=c.$from,d=c.empty,p=c.ranges;if(!a)return!0;if(d&&u){var h=c.from,v=c.to,m=null===(r=f.marks().find((function(e){return e.type===l})))||void 0===r?void 0:r.attrs,y=ff(f,l,m);y&&(h=y.from,v=y.to),o.removeMark(h,v,l)}else p.forEach((function(e){o.removeMark(e.$from.pos,e.$to.pos,l)}));return o.removeStoredMark(l),!0}},updateAttributes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,i=n.state,a=n.dispatch,s=null,u=null,c=xf("string"===typeof e?e:e.name,i.schema);return!!c&&("node"===c&&(s=Ll(e,i.schema)),"mark"===c&&(u=df(e,i.schema)),a&&r.selection.ranges.forEach((function(e){var n=e.$from.pos,a=e.$to.pos;i.doc.nodesBetween(n,a,(function(e,i){s&&s===e.type&&r.setNodeMarkup(i,void 0,Object(o.a)(Object(o.a)({},e.attrs),t)),u&&e.marks.length&&e.marks.forEach((function(s){if(u===s.type){var c=Math.max(i,n),l=Math.min(i+e.nodeSize,a);r.addMark(c,l,u.create(Object(o.a)(Object(o.a)({},s.attrs),t)))}}))}))})),!0)}},wrapIn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return wl(Ll(e,r.schema),t)(r,o)}},wrapInList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return _l(Ll(e,r.schema),t)(r,o)}}}),Rf=rf.create({name:"commands",addCommands:function(){return Object(o.a)({},Ff)}}),Pf=rf.create({name:"editable",addProseMirrorPlugins:function(){var e=this;return[new Aa({key:new Ma("editable"),props:{editable:function(){return e.editor.options.editable}}})]}}),Bf=rf.create({name:"focusEvents",addProseMirrorPlugins:function(){var e=this.editor;return[new Aa({key:new Ma("focusEvents"),props:{handleDOMEvents:{focus:function(t,n){e.isFocused=!0;var r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:function(t,n){e.isFocused=!1;var r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),Lf=rf.create({name:"keymap",addKeyboardShortcuts:function(){var e=this,t=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.undoInputRule()},function(){return t.command((function(e){var n=e.tr,r=n.selection,o=n.doc,i=r.empty,a=r.$anchor,s=a.pos,u=a.parent,c=fa.atStart(o).from===s;return!(!(i&&c&&u.type.isTextblock)||u.textContent.length)&&t.clearNodes()}))},function(){return t.deleteSelection()},function(){return t.joinBackward()},function(){return t.selectNodeBackward()}]}))},n=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.deleteSelection()},function(){return t.joinForward()},function(){return t.selectNodeForward()}]}))},r={Enter:function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.newlineInCode()},function(){return t.createParagraphNear()},function(){return t.liftEmptyBlock()},function(){return t.splitBlock()}]}))},"Mod-Enter":function(){return e.editor.commands.exitCode()},Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:n,"Mod-Delete":n,"Mod-a":function(){return e.editor.commands.selectAll()}},i=Object(o.a)({},r),a=Object(o.a)(Object(o.a)({},r),{},{"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":n,"Ctrl-Alt-Backspace":n,"Alt-Delete":n,"Alt-d":n,"Ctrl-a":function(){return e.editor.commands.selectTextblockStart()},"Ctrl-e":function(){return e.editor.commands.selectTextblockEnd()}});return yf()||kf()?a:i},addProseMirrorPlugins:function(){var e=this;return[new Aa({key:new Ma("clearDocument"),appendTransaction:function(t,n,r){if(t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc)){var o=n.selection,i=o.empty,a=o.from,s=o.to,u=fa.atStart(n.doc).from,c=fa.atEnd(n.doc).to,l=a===u&&s===c,f=0===r.doc.textBetween(0,r.doc.content.size," "," ").length;if(!i&&l&&f){var d=r.tr,p=Tl({state:r,transaction:d});if(new Ml({editor:e.editor,state:p}).commands.clearNodes(),d.steps.length)return d}}}})]}}),If=rf.create({name:"tabindex",addProseMirrorPlugins:function(){return[new Aa({key:new Ma("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}}),zf=Object.freeze({__proto__:null,ClipboardTextSerializer:sf,Commands:Rf,Editable:Pf,FocusEvents:Bf,Keymap:Lf,Tabindex:If});function Uf(e,t){var n=xf("string"===typeof t?t:t.name,e.schema);return"node"===n?function(e,t){var n=Ll(t,e.schema),r=e.selection,i=r.from,a=r.to,s=[];e.doc.nodesBetween(i,a,(function(e){s.push(e)}));var u=s.reverse().find((function(e){return e.type.name===n.name}));return u?Object(o.a)({},u.attrs):{}}(e,t):"mark"===n?Df(e,t):{}}function Vf(e,t){var n=wi.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function $f(e,t){return of(e,{from:0,to:e.content.size},t)}var Hf=function(e){b(n,e);var t=E(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(this,n),(e=t.call(this)).isFocused=!1,e.extensionStorage={},e.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:function(){return null},onCreate:function(){return null},onUpdate:function(){return null},onSelectionUpdate:function(){return null},onTransaction:function(){return null},onFocus:function(){return null},onBlur:function(){return null},onDestroy:function(){return null}},e.isCapturingTransaction=!1,e.capturedTransaction=null,e.setOptions(r),e.createExtensionManager(),e.createCommandManager(),e.createSchema(),e.on("beforeCreate",e.options.onBeforeCreate),e.emit("beforeCreate",{editor:x(e)}),e.createView(),e.injectCSS(),e.on("create",e.options.onCreate),e.on("update",e.options.onUpdate),e.on("selectionUpdate",e.options.onSelectionUpdate),e.on("transaction",e.options.onTransaction),e.on("focus",e.options.onFocus),e.on("blur",e.options.onBlur),e.on("destroy",e.options.onDestroy),window.setTimeout((function(){e.isDestroyed||(e.commands.focus(e.options.autofocus),e.emit("create",{editor:x(e)}))}),0),e}return y(n,[{key:"storage",get:function(){return this.extensionStorage}},{key:"commands",get:function(){return this.commandManager.commands}},{key:"chain",value:function(){return this.commandManager.chain()}},{key:"can",value:function(){return this.commandManager.can()}},{key:"injectCSS",value:function(){this.options.injectCSS&&document&&(this.css=function(e,t){var n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=Object(o.a)(Object(o.a)({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}},{key:"setEditable",value:function(e){this.setOptions({editable:e})}},{key:"isEditable",get:function(){return this.options.editable&&this.view&&this.view.editable}},{key:"state",get:function(){return this.view.state}},{key:"registerPlugin",value:function(e,t){var n=Ul(t)?t(e,Object(J.a)(this.state.plugins)):[].concat(Object(J.a)(this.state.plugins),[e]),r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(e){if(!this.isDestroyed){var t="string"===typeof e?"".concat(e,"$"):e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((function(e){return!e.key.startsWith(t)}))});this.view.updateState(n)}}},{key:"createExtensionManager",value:function(){var e=this.options.enableCoreExtensions?Object.values(zf):[],t=[].concat(Object(J.a)(e),Object(J.a)(this.options.extensions)).filter((function(e){return["extension","node","mark"].includes(null===e||void 0===e?void 0:e.type)}));this.extensionManager=new ef(t,this)}},{key:"createCommandManager",value:function(){this.commandManager=new Ml({editor:this})}},{key:"createSchema",value:function(){this.schema=this.extensionManager.schema}},{key:"createView",value:function(){var e=Ef(this.options.content,this.schema,this.options.parseOptions),t=mf(e,this.options.autofocus);this.view=new Pc(this.options.element,Object(o.a)(Object(o.a)({},this.options.editorProps),{},{dispatchTransaction:this.dispatchTransaction.bind(this),state:ja.create({doc:e,selection:t||void 0})}));var n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.view.dom.editor=this}},{key:"createNodeViews",value:function(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}},{key:"captureTransaction",value:function(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;var t=this.capturedTransaction;return this.capturedTransaction=null,t}},{key:"dispatchTransaction",value:function(e){var t=this;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((function(e){var n;return null===(n=t.capturedTransaction)||void 0===n?void 0:n.step(e)})):void(this.capturedTransaction=e);var n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});var o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}},{key:"getAttributes",value:function(e){return Uf(this.state,e)}},{key:"isActive",value:function(e,t){var n="string"===typeof e?e:null,r="string"===typeof e?t:e;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return wf(e,null,n)||Mf(e,null,n);var r=xf(t,e.schema);return"node"===r?wf(e,t,n):"mark"===r&&Mf(e,t,n)}(this.state,n,r)}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"getHTML",value:function(){return Vf(this.state.doc.content,this.schema)}},{key:"getText",value:function(e){var t=e||{},n=t.blockSeparator,r=void 0===n?"\n\n":n,i=t.textSerializers,a=void 0===i?{}:i;return $f(this.state.doc,{blockSeparator:r,textSerializers:Object(o.a)(Object(o.a)({},a),af(this.schema))})}},{key:"isEmpty",get:function(){return function(e){var t,n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}},{key:"getCharacterCount",value:function(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}},{key:"destroy",value:function(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}},{key:"isDestroyed",get:function(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}]),n}(Fl);function qf(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,n={};return e.filter((function(e){var r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter((function(e,n){return!t.filter((function(e,t){return t!==n})).some((function(t){return e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to}))}))}function Wf(e,t,n){var r=[];return e===t?n.resolve(e).marks().forEach((function(t){var i=ff(n.resolve(e-1),t.type);i&&r.push(Object(o.a)({mark:t},i))})):n.nodesBetween(e,t,(function(e,t){r.push.apply(r,Object(J.a)(e.marks.map((function(n){return{from:t,to:t+e.nodeSize,mark:n}}))))})),r}function Gf(e,t,n){var r=e.state.doc.content.size,i=vf(t,0,r),a=vf(n,0,r),s=e.coordsAtPos(i),u=e.coordsAtPos(a,-1),c=Math.min(s.top,u.top),l=Math.max(s.bottom,u.bottom),f=Math.min(s.left,u.left),d=Math.max(s.right,u.right),p={top:c,bottom:l,left:f,right:d,width:d-f,height:l-c,x:f,y:c};return Object(o.a)(Object(o.a)({},p),{},{toJSON:function(){return p}})}var Yf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v(this,e),this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Vl(Rl(this,"addOptions",{name:this.name}))),this.storage=Vl(Rl(this,"addStorage",{name:this.name,options:this.options}))||{}}return y(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=nf(this.options,e),t.storage=Vl(Rl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Vl(Rl(n,"addOptions",{name:n.name})),n.storage=Vl(Rl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}(),Kf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v(this,e),this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Vl(Rl(this,"addOptions",{name:this.name}))),this.storage=Vl(Rl(this,"addStorage",{name:this.name,options:this.options}))||{}}return y(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=nf(this.options,e),t.storage=Vl(Rl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Vl(Rl(n,"addOptions",{name:n.name})),n.storage=Vl(Rl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function Jf(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qf(e){return e instanceof Jf(e).Element||e instanceof Element}function Xf(e){return e instanceof Jf(e).HTMLElement||e instanceof HTMLElement}function Zf(e){return"undefined"!==typeof ShadowRoot&&(e instanceof Jf(e).ShadowRoot||e instanceof ShadowRoot)}var ed=Math.max,td=Math.min,nd=Math.round;function rd(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(Xf(e)&&t){var i=e.offsetHeight,a=e.offsetWidth;a>0&&(r=nd(n.width)/a||1),i>0&&(o=nd(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function od(e){var t=Jf(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function id(e){return e?(e.nodeName||"").toLowerCase():null}function ad(e){return((Qf(e)?e.ownerDocument:e.document)||window.document).documentElement}function sd(e){return rd(ad(e)).left+od(e).scrollLeft}function ud(e){return Jf(e).getComputedStyle(e)}function cd(e){var t=ud(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ld(e,t,n){void 0===n&&(n=!1);var r=Xf(t),o=Xf(t)&&function(e){var t=e.getBoundingClientRect(),n=nd(t.width)/e.offsetWidth||1,r=nd(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=ad(t),a=rd(e,o),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==id(t)||cd(i))&&(s=function(e){return e!==Jf(e)&&Xf(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:od(e);var t}(t)),Xf(t)?((u=rd(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=sd(i))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function fd(e){var t=rd(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function dd(e){return"html"===id(e)?e:e.assignedSlot||e.parentNode||(Zf(e)?e.host:null)||ad(e)}function pd(e){return["html","body","#document"].indexOf(id(e))>=0?e.ownerDocument.body:Xf(e)&&cd(e)?e:pd(dd(e))}function hd(e,t){var n;void 0===t&&(t=[]);var r=pd(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Jf(r),a=o?[i].concat(i.visualViewport||[],cd(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(hd(dd(a)))}function vd(e){return["table","td","th"].indexOf(id(e))>=0}function md(e){return Xf(e)&&"fixed"!==ud(e).position?e.offsetParent:null}function yd(e){for(var t=Jf(e),n=md(e);n&&vd(n)&&"static"===ud(n).position;)n=md(n);return n&&("html"===id(n)||"body"===id(n)&&"static"===ud(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Xf(e)&&"fixed"===ud(e).position)return null;var n=dd(e);for(Zf(n)&&(n=n.host);Xf(n)&&["html","body"].indexOf(id(n))<0;){var r=ud(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var gd="top",bd="bottom",kd="right",wd="left",xd="auto",Od=[gd,bd,kd,wd],Ed="start",Dd="end",Sd="viewport",Cd="popper",jd=Od.reduce((function(e,t){return e.concat([t+"-"+Ed,t+"-"+Dd])}),[]),_d=[].concat(Od,[xd]).reduce((function(e,t){return e.concat([t,t+"-"+Ed,t+"-"+Dd])}),[]),Ad=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Nd(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function Td(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Md={placement:"bottom",modifiers:[],strategy:"absolute"};function Fd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function Rd(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Md:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Md,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,u={state:o,setOptions:function(n){var s="function"===typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:Qf(e)?hd(e):e.contextElement?hd(e.contextElement):[],popper:hd(t)};var l=function(e){var t=Nd(e);return Ad.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=l.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"===typeof i){var s=i({state:o,name:t,instance:u,options:r}),c=function(){};a.push(s||c)}})),u.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(Fd(t,n)){o.rects={reference:ld(t,yd(n),"fixed"===o.options.strategy),popper:fd(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,l=void 0===c?{}:c,f=i.name;"function"===typeof a&&(o=a({state:o,options:l,name:f,instance:u})||o)}else o.reset=!1,r=-1}}},update:Td((function(){return new Promise((function(e){u.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!Fd(e,t))return u;function c(){a.forEach((function(e){return e()})),a=[]}return u.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Pd={passive:!0};function Bd(e){return e.split("-")[0]}function Ld(e){return e.split("-")[1]}function Id(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zd(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Bd(o):null,a=o?Ld(o):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case gd:t={x:s,y:n.y-r.height};break;case bd:t={x:s,y:n.y+n.height};break;case kd:t={x:n.x+n.width,y:u};break;case wd:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var c=i?Id(i):null;if(null!=c){var l="y"===c?"height":"width";switch(a){case Ed:t[c]=t[c]-(n[l]/2-r[l]/2);break;case Dd:t[c]=t[c]+(n[l]/2-r[l]/2)}}return t}var Ud={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vd(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,f=e.isFixed,d=a.x,p=void 0===d?0:d,h=a.y,v=void 0===h?0:h,m="function"===typeof l?l({x:p,y:v}):{x:p,y:v};p=m.x,v=m.y;var y=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=wd,k=gd,w=window;if(c){var x=yd(n),O="clientHeight",E="clientWidth";if(x===Jf(n)&&"static"!==ud(x=ad(n)).position&&"absolute"===s&&(O="scrollHeight",E="scrollWidth"),o===gd||(o===wd||o===kd)&&i===Dd)k=bd,v-=(f&&x===w&&w.visualViewport?w.visualViewport.height:x[O])-r.height,v*=u?1:-1;if(o===wd||(o===gd||o===bd)&&i===Dd)b=kd,p-=(f&&x===w&&w.visualViewport?w.visualViewport.width:x[E])-r.width,p*=u?1:-1}var D,S=Object.assign({position:s},c&&Ud),C=!0===l?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:nd(t*r)/r||0,y:nd(n*r)/r||0}}({x:p,y:v}):{x:p,y:v};return p=C.x,v=C.y,u?Object.assign({},S,((D={})[k]=g?"0":"",D[b]=y?"0":"",D.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",D)):Object.assign({},S,((t={})[k]=g?v+"px":"",t[b]=y?p+"px":"",t.transform="",t))}var $d={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Xf(o)&&id(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Xf(r)&&id(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Hd={left:"right",right:"left",bottom:"top",top:"bottom"};function qd(e){return e.replace(/left|right|bottom|top/g,(function(e){return Hd[e]}))}var Wd={start:"end",end:"start"};function Gd(e){return e.replace(/start|end/g,(function(e){return Wd[e]}))}function Yd(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Kd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Jd(e,t){return t===Sd?Kd(function(e){var t=Jf(e),n=ad(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+sd(e),y:s}}(e)):Qf(t)?function(e){var t=rd(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Kd(function(e){var t,n=ad(e),r=od(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=ed(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=ed(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+sd(e),u=-r.scrollTop;return"rtl"===ud(o||n).direction&&(s+=ed(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}(ad(e)))}function Qd(e,t,n){var r="clippingParents"===t?function(e){var t=hd(dd(e)),n=["absolute","fixed"].indexOf(ud(e).position)>=0&&Xf(e)?yd(e):e;return Qf(n)?t.filter((function(e){return Qf(e)&&Yd(e,n)&&"body"!==id(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=Jd(e,n);return t.top=ed(r.top,t.top),t.right=td(r.right,t.right),t.bottom=td(r.bottom,t.bottom),t.left=ed(r.left,t.left),t}),Jd(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Xd(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Zd(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ep(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,s=n.rootBoundary,u=void 0===s?Sd:s,c=n.elementContext,l=void 0===c?Cd:c,f=n.altBoundary,d=void 0!==f&&f,p=n.padding,h=void 0===p?0:p,v=Xd("number"!==typeof h?h:Zd(h,Od)),m=l===Cd?"reference":Cd,y=e.rects.popper,g=e.elements[d?m:l],b=Qd(Qf(g)?g:g.contextElement||ad(e.elements.popper),a,u),k=rd(e.elements.reference),w=zd({reference:k,element:y,strategy:"absolute",placement:o}),x=Kd(Object.assign({},y,w)),O=l===Cd?x:k,E={top:b.top-O.top+v.top,bottom:O.bottom-b.bottom+v.bottom,left:b.left-O.left+v.left,right:O.right-b.right+v.right},D=e.modifiersData.offset;if(l===Cd&&D){var S=D[o];Object.keys(E).forEach((function(e){var t=[kd,bd].indexOf(e)>=0?1:-1,n=[gd,bd].indexOf(e)>=0?"y":"x";E[e]+=S[n]*t}))}return E}function tp(e,t,n){return ed(e,td(t,n))}function np(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function rp(e){return[gd,kd,bd,wd].some((function(t){return e[t]>=0}))}var op=Rd({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,u=Jf(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Pd)})),s&&u.addEventListener("resize",n.update,Pd),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Pd)})),s&&u.removeEventListener("resize",n.update,Pd)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=zd({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,u=void 0===s||s,c={placement:Bd(t.placement),variation:Ld(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Vd(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Vd(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},$d,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=_d.reduce((function(e,n){return e[n]=function(e,t,n){var r=Bd(e),o=[wd,gd].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[wd,kd].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,u=n.fallbackPlacements,c=n.padding,l=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,h=void 0===p||p,v=n.allowedAutoPlacements,m=t.options.placement,y=Bd(m),g=u||(y===m||!h?[qd(m)]:function(e){if(Bd(e)===xd)return[];var t=qd(e);return[Gd(e),t,Gd(t)]}(m)),b=[m].concat(g).reduce((function(e,n){return e.concat(Bd(n)===xd?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?_d:u,l=Ld(r),f=l?s?jd:jd.filter((function(e){return Ld(e)===l})):Od,d=f.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=f);var p=d.reduce((function(t,n){return t[n]=ep(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Bd(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:l,rootBoundary:f,padding:c,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),k=t.rects.reference,w=t.rects.popper,x=new Map,O=!0,E=b[0],D=0;D<b.length;D++){var S=b[D],C=Bd(S),j=Ld(S)===Ed,_=[gd,bd].indexOf(C)>=0,A=_?"width":"height",N=ep(t,{placement:S,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),T=_?j?kd:wd:j?bd:gd;k[A]>w[A]&&(T=qd(T));var M=qd(T),F=[];if(i&&F.push(N[C]<=0),s&&F.push(N[T]<=0,N[M]<=0),F.every((function(e){return e}))){E=S,O=!1;break}x.set(S,F)}if(O)for(var R=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},P=h?3:1;P>0;P--){if("break"===R(P))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,f=n.padding,d=n.tether,p=void 0===d||d,h=n.tetherOffset,v=void 0===h?0:h,m=ep(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),y=Bd(t.placement),g=Ld(t.placement),b=!g,k=Id(y),w="x"===k?"y":"x",x=t.modifiersData.popperOffsets,O=t.rects.reference,E=t.rects.popper,D="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,S="number"===typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(x){if(i){var _,A="y"===k?gd:wd,N="y"===k?bd:kd,T="y"===k?"height":"width",M=x[k],F=M+m[A],R=M-m[N],P=p?-E[T]/2:0,B=g===Ed?O[T]:E[T],L=g===Ed?-E[T]:-O[T],I=t.elements.arrow,z=p&&I?fd(I):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=U[A],$=U[N],H=tp(0,O[T],z[T]),q=b?O[T]/2-P-H-V-S.mainAxis:B-H-V-S.mainAxis,W=b?-O[T]/2+P+H+$+S.mainAxis:L+H+$+S.mainAxis,G=t.elements.arrow&&yd(t.elements.arrow),Y=G?"y"===k?G.clientTop||0:G.clientLeft||0:0,K=null!=(_=null==C?void 0:C[k])?_:0,J=M+W-K,Q=tp(p?td(F,M+q-K-Y):F,M,p?ed(R,J):R);x[k]=Q,j[k]=Q-M}if(s){var X,Z="x"===k?gd:wd,ee="x"===k?bd:kd,te=x[w],ne="y"===w?"height":"width",re=te+m[Z],oe=te-m[ee],ie=-1!==[gd,wd].indexOf(y),ae=null!=(X=null==C?void 0:C[w])?X:0,se=ie?re:te-O[ne]-E[ne]-ae+S.altAxis,ue=ie?te+O[ne]+E[ne]-ae-S.altAxis:oe,ce=p&&ie?function(e,t,n){var r=tp(e,t,n);return r>n?n:r}(se,te,ue):tp(p?se:re,te,p?ue:oe);x[w]=ce,j[w]=ce-te}t.modifiersData[r]=j}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Bd(n.placement),u=Id(s),c=[wd,kd].indexOf(s)>=0?"height":"width";if(i&&a){var l=function(e,t){return Xd("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Zd(e,Od))}(o.padding,n),f=fd(i),d="y"===u?gd:wd,p="y"===u?bd:kd,h=n.rects.reference[c]+n.rects.reference[u]-a[u]-n.rects.popper[c],v=a[u]-n.rects.reference[u],m=yd(i),y=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,g=h/2-v/2,b=l[d],k=y-f[c]-l[p],w=y/2-f[c]/2+g,x=tp(b,w,k),O=u;n.modifiersData[r]=((t={})[O]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&Yd(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ep(t,{elementContext:"reference"}),s=ep(t,{altBoundary:!0}),u=np(a,r),c=np(s,o,i),l=rp(u),f=rp(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),ip="tippy-content",ap="tippy-backdrop",sp="tippy-arrow",up="tippy-svg-arrow",cp={passive:!0,capture:!0},lp=function(){return document.body};function fp(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function dp(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function pp(e,t){return"function"===typeof e?e.apply(void 0,t):e}function hp(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function vp(e){return[].concat(e)}function mp(e,t){-1===e.indexOf(t)&&e.push(t)}function yp(e){return e.split("-")[0]}function gp(e){return[].slice.call(e)}function bp(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function kp(){return document.createElement("div")}function wp(e){return["Element","Fragment"].some((function(t){return dp(e,t)}))}function xp(e){return dp(e,"MouseEvent")}function Op(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function Ep(e){return wp(e)?[e]:function(e){return dp(e,"NodeList")}(e)?gp(e):Array.isArray(e)?e:gp(document.querySelectorAll(e))}function Dp(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Sp(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Cp(e){var t,n=vp(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function jp(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function _p(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Ap={isTouch:!1},Np=0;function Tp(){Ap.isTouch||(Ap.isTouch=!0,window.performance&&document.addEventListener("mousemove",Mp))}function Mp(){var e=performance.now();e-Np<20&&(Ap.isTouch=!1,document.removeEventListener("mousemove",Mp)),Np=e}function Fp(){var e=document.activeElement;if(Op(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Rp=!!("undefined"!==typeof window&&"undefined"!==typeof document)&&!!window.msCrypto;var Pp={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Bp=Object.assign({appendTo:lp,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Pp,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Lp=Object.keys(Bp);function Ip(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=Bp[o])?r:i);return t}),{});return Object.assign({},e,t)}function zp(e,t){var n=Object.assign({},t,{content:pp(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ip(Object.assign({},Bp,{plugins:t}))):Lp).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(ur){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Bp.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Up(e,t){e.innerHTML=t}function Vp(e){var t=kp();return!0===e?t.className=sp:(t.className=up,wp(e)?t.appendChild(e):Up(t,e)),t}function $p(e,t){wp(t.content)?(Up(e,""),e.appendChild(t.content)):"function"!==typeof t.content&&(t.allowHTML?Up(e,t.content):e.textContent=t.content)}function Hp(e){var t=e.firstElementChild,n=gp(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ip)})),arrow:n.find((function(e){return e.classList.contains(sp)||e.classList.contains(up)})),backdrop:n.find((function(e){return e.classList.contains(ap)}))}}function qp(e){var t=kp(),n=kp();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=kp();function o(n,r){var o=Hp(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"===typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"===typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||$p(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Vp(r.arrow))):i.appendChild(Vp(r.arrow)):s&&i.removeChild(s)}return r.className=ip,r.setAttribute("data-state","hidden"),$p(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}qp.$$tippy=!0;var Wp=1,Gp=[],Yp=[];function Kp(e,t){var n,r,o,i,a,s,u,c,l=zp(e,Object.assign({},Bp,Ip(bp(t)))),f=!1,d=!1,p=!1,h=!1,v=[],m=hp(G,l.interactiveDebounce),y=Wp++,g=(c=l.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:y,reference:e,popper:kp(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){0;if(b.state.isDestroyed)return;M("onBeforeUpdate",[b,t]),q();var n=b.props,r=zp(e,Object.assign({},n,bp(t),{ignoreAttributes:!0}));b.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(P(),m=hp(G,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?vp(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");R(),T(),x&&x(n,r);b.popperInstance&&(Q(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Ap.isTouch&&!b.props.touch,o=fp(b.props.duration,0,Bp.duration);if(e||t||n||r)return;if(j().hasAttribute("disabled"))return;if(M("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,C()&&(w.style.visibility="visible");T(),z(),b.state.isMounted||(w.style.transition="none");if(C()){var i=A(),a=i.box,u=i.content;Dp([a,u],0)}s=function(){var e;if(b.state.isVisible&&!h){if(h=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,C()&&b.props.animation){var t=A(),n=t.box,r=t.content;Dp([n,r],o),Sp([n,r],"visible")}F(),R(),mp(Yp,b),null==(e=b.popperInstance)||e.forceUpdate(),M("onMount",[b]),b.props.animation&&C()&&function(e,t){V(e,t)}(o,(function(){b.state.isShown=!0,M("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=j();e=b.props.interactive&&t===lp||"parent"===t?n.parentNode:pp(t,[n]);e.contains(w)||e.appendChild(w);b.state.isMounted=!0,Q(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=fp(b.props.duration,1,Bp.duration);if(e||t||n)return;if(M("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,h=!1,f=!1,C()&&(w.style.visibility="hidden");if(P(),U(),T(!0),C()){var o=A(),i=o.box,a=o.content;b.props.animation&&(Dp([i,a],r),Sp([i,a],"hidden"))}F(),R(),b.props.animation?C()&&function(e,t){V(e,(function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;_().addEventListener("mousemove",m),mp(Gp,m),m(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;X(),Z().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);Yp=Yp.filter((function(e){return e!==b})),b.state.isMounted=!1,M("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),q(),delete e._tippy,b.state.isDestroyed=!0,M("onDestroy",[b])}};if(!l.render)return b;var k=l.render(b),w=k.popper,x=k.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,e._tippy=b,w._tippy=b;var O=g.map((function(e){return e.fn(b)})),E=e.hasAttribute("aria-expanded");return H(),R(),T(),M("onCreate",[b]),l.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&_().addEventListener("mousemove",m)})),b;function D(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===D()[0]}function C(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function j(){return u||e}function _(){var e=j().parentNode;return e?Cp(e):document}function A(){return Hp(w)}function N(e){return b.state.isMounted&&!b.state.isVisible||Ap.isTouch||i&&"focus"===i.type?0:fp(b.props.delay,e?0:1,Bp.delay)}function T(e){void 0===e&&(e=!1),w.style.pointerEvents=b.props.interactive&&!e?"":"none",w.style.zIndex=""+b.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),O.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=b.props)[e].apply(r,t)}function F(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;vp(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function R(){!E&&b.props.aria.expanded&&vp(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===j()?"true":"false"):e.removeAttribute("aria-expanded")}))}function P(){_().removeEventListener("mousemove",m),Gp=Gp.filter((function(e){return e!==m}))}function B(t){if(!Ap.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!_p(w,n)){if(vp(b.props.triggerTarget||e).some((function(e){return _p(e,n)}))){if(Ap.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout((function(){d=!1})),b.state.isMounted||U())}}}function L(){p=!0}function I(){p=!1}function z(){var e=_();e.addEventListener("mousedown",B,!0),e.addEventListener("touchend",B,cp),e.addEventListener("touchstart",I,cp),e.addEventListener("touchmove",L,cp)}function U(){var e=_();e.removeEventListener("mousedown",B,!0),e.removeEventListener("touchend",B,cp),e.removeEventListener("touchstart",I,cp),e.removeEventListener("touchmove",L,cp)}function V(e,t){var n=A().box;function r(e){e.target===n&&(jp(n,"remove",r),t())}if(0===e)return t();jp(n,"remove",a),jp(n,"add",r),a=r}function $(t,n,r){void 0===r&&(r=!1),vp(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;S()&&($("touchstart",W,{passive:!0}),$("touchend",Y,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,W),e){case"mouseenter":$("mouseleave",Y);break;case"focus":$(Rp?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),v=[]}function W(e){var t,n=!1;if(b.state.isEnabled&&!J(e)&&!d){var r="focus"===(null==(t=i)?void 0:t.type);i=e,u=e.currentTarget,R(),!b.state.isVisible&&xp(e)&&Gp.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||f)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(f=!n),n&&!r&&te(e)}}function G(e){var t=e.target,n=j().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:l}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=yp(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,l="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-r+u>i,p=r-t.bottom-c>i,h=t.left-n+l>i,v=n-t.right-f>i;return d||p||h||v}))})(r,e)&&(P(),te(e))}}function Y(e){J(e)||b.props.trigger.indexOf("click")>=0&&f||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function K(e){b.props.trigger.indexOf("focusin")<0&&e.target!==j()||b.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function J(e){return!!Ap.isTouch&&S()!==e.type.indexOf("touch")>=0}function Q(){X();var t=b.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,u=C()?Hp(w).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||j()}:e,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(C()){var n=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},f=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},l];C()&&u&&f.push({name:"arrow",options:{element:u,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),b.popperInstance=op(c,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:f}))}function X(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Z(){return gp(w.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&M("onTrigger",[b,e]),z();var t=N(!0),r=D(),o=r[0],i=r[1];Ap.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),M("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=N(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else U()}}function Jp(e,t){void 0===t&&(t={});var n=Bp.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Tp,cp),window.addEventListener("blur",Fp);var r=Object.assign({},t,{plugins:n}),o=Ep(e).reduce((function(e,t){var n=t&&Kp(t,r);return n&&e.push(n),e}),[]);return wp(e)?o[0]:o}Jp.defaultProps=Bp,Jp.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Bp[t]=e[t]}))},Jp.currentInput=Ap;Object.assign({},$d,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Jp.setDefaultProps({render:qp});var Qp=Jp,Xp=function(){function e(t){var n=this,r=t.editor,o=t.element,i=t.view,a=t.tippyOptions,s=void 0===a?{}:a,u=t.shouldShow;v(this,e),this.preventHide=!1,this.shouldShow=function(e){var t=e.view,n=e.state,r=e.from,o=e.to,i=n.doc,a=n.selection.empty,s=!i.textBetween(r,o).length&&hf(n.selection);return!(!t.hasFocus()||a||s)},this.mousedownHandler=function(){n.preventHide=!0},this.dragstartHandler=function(){n.hide()},this.focusHandler=function(){setTimeout((function(){return n.update(n.editor.view)}))},this.blurHandler=function(e){var t,r=e.event;n.preventHide?n.preventHide=!1:(null===r||void 0===r?void 0:r.relatedTarget)&&(null===(t=n.element.parentNode)||void 0===t?void 0:t.contains(r.relatedTarget))||n.hide()},this.editor=r,this.element=o,this.view=i,u&&(this.shouldShow=u),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}return y(e,[{key:"createTooltip",value:function(){var e=this,t=this.editor.options.element,n=!!t.parentElement;!this.tippy&&n&&(this.tippy=Qp(t,Object(o.a)({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(function(t){e.blurHandler({event:t})})))}},{key:"update",value:function(e,t){var n,r,o,i=e.state,a=e.composing,s=i.doc,u=i.selection,c=t&&t.doc.eq(s)&&t.selection.eq(u);if(!a&&!c){this.createTooltip();var l=u.ranges,f=Math.min.apply(Math,Object(J.a)(l.map((function(e){return e.$from.pos})))),d=Math.max.apply(Math,Object(J.a)(l.map((function(e){return e.$to.pos}))));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t,from:f,to:d}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||function(){if(pf(n=i.selection)&&n instanceof ya){var t=e.nodeDOM(f);if(t)return t.getBoundingClientRect()}var n;return Gf(e,f,d)}}),this.show()):this.hide()}}},{key:"show",value:function(){var e;null===(e=this.tippy)||void 0===e||e.show()}},{key:"hide",value:function(){var e;null===(e=this.tippy)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}]),e}(),Zp=function(e){return new Aa({key:"string"===typeof e.pluginKey?new Ma(e.pluginKey):e.pluginKey,view:function(t){return new Xp(Object(o.a)({view:t},e))}})},eh=(rf.create({name:"bubbleMenu",addOptions:function(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}},addProseMirrorPlugins:function(){return this.options.element?[Zp({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),function(){function e(t){var n=this,r=t.editor,o=t.element,i=t.view,a=t.tippyOptions,s=void 0===a?{}:a,u=t.shouldShow;v(this,e),this.preventHide=!1,this.shouldShow=function(e){var t=e.view,n=e.state.selection,r=n.$anchor,o=n.empty,i=1===r.depth,a=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(t.hasFocus()&&o&&i&&a)},this.mousedownHandler=function(){n.preventHide=!0},this.focusHandler=function(){setTimeout((function(){return n.update(n.editor.view)}))},this.blurHandler=function(e){var t,r=e.event;n.preventHide?n.preventHide=!1:(null===r||void 0===r?void 0:r.relatedTarget)&&(null===(t=n.element.parentNode)||void 0===t?void 0:t.contains(r.relatedTarget))||n.hide()},this.editor=r,this.element=o,this.view=i,u&&(this.shouldShow=u),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}return y(e,[{key:"createTooltip",value:function(){var e=this,t=this.editor.options.element,n=!!t.parentElement;!this.tippy&&n&&(this.tippy=Qp(t,Object(o.a)({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(function(t){e.blurHandler({event:t})})))}},{key:"update",value:function(e,t){var n,r,o,i=e.state,a=i.doc,s=i.selection,u=s.from,c=s.to;t&&t.doc.eq(a)&&t.selection.eq(s)||(this.createTooltip(),(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||function(){return Gf(e,u,c)}}),this.show()):this.hide())}},{key:"show",value:function(){var e;null===(e=this.tippy)||void 0===e||e.show()}},{key:"hide",value:function(){var e;null===(e=this.tippy)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}]),e}()),th=function(e){return new Aa({key:"string"===typeof e.pluginKey?new Ma(e.pluginKey):e.pluginKey,view:function(t){return new eh(Object(o.a)({view:t},e))}})},nh=(rf.create({name:"floatingMenu",addOptions:function(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins:function(){return this.options.element?[th({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),["editor"]),rh=function(e){b(n,e);var t=E(n);function n(){var e;return v(this,n),(e=t.apply(this,arguments)).contentComponent=null,e}return y(n)}(Hf),oh=function(e){var t=e.renderers;return s.a.createElement(s.a.Fragment,null,Array.from(t).map((function(e){var t=Object(l.a)(e,2),n=t[0],r=t[1];return c.a.createPortal(r.reactElement,r.element,n)})))},ih=function(e){b(n,e);var t=E(n);function n(e){var r;return v(this,n),(r=t.call(this,e)).editorContentRef=s.a.createRef(),r.state={renderers:new Map},r}return y(n,[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(){this.init()}},{key:"init",value:function(){var e=this.props.editor;if(e&&e.options.element){if(e.contentComponent)return;var t=this.editorContentRef.current;t.append.apply(t,Object(J.a)(e.options.element.childNodes)),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews()}}},{key:"componentWillUnmount",value:function(){var e=this.props.editor;if(e&&(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,e.options.element.firstChild)){var t=document.createElement("div");t.append.apply(t,Object(J.a)(e.options.element.childNodes)),e.setOptions({element:t})}}},{key:"render",value:function(){var e=this.props,t=(e.editor,i(e,nh));return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",Object(o.a)({ref:this.editorContentRef},t)),s.a.createElement(oh,{renderers:this.state.renderers}))}}]),n}(s.a.Component),ah=s.a.memo(ih),sh=Object(a.createContext)({onDragStart:void 0}),uh=function(){return Object(a.useContext)(sh)};s.a.forwardRef((function(e,t){var n=uh().onDragStart,r=e.as||"div";return s.a.createElement(r,Object(o.a)(Object(o.a)({},e),{},{ref:t,"data-node-view-wrapper":"",onDragStart:n,style:Object(o.a)({whiteSpace:"normal"},e.style)}))}));function ch(){var e=Object(a.useState)(0),t=Object(l.a)(e,2)[1];return function(){return t((function(e){return e+1}))}}var lh=rf.create({name:"placeholder",addOptions:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins:function(){var e=this;return[new Aa({props:{decorations:function(t){var n=t.doc,r=t.selection,o=e.editor.isEditable||!e.options.showOnlyWhenEditable,i=r.anchor,a=[];return o?(n.descendants((function(t,n){var r=i>=n&&i<=n+t.nodeSize,o=!t.isLeaf&&!t.childCount;if((r||!e.options.showOnlyCurrent)&&o){var s=[e.options.emptyNodeClass];e.editor.isEmpty&&s.push(e.options.emptyEditorClass);var u=pc.node(n,n+t.nodeSize,{class:s.join(" "),"data-placeholder":"function"===typeof e.options.placeholder?e.options.placeholder({editor:e.editor,node:t,pos:n,hasAnchor:r}):e.options.placeholder});a.push(u)}return e.options.includeChildren})),mc.create(n,a)):null}}})]}}),fh=Kf.create({name:"text",group:"inline"});function dh(e){this.j={},this.jr=[],this.jd=null,this.t=e}dh.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=ph();var o=yh(this,e);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[e]=r,r}};var ph=function(){return new dh},hh=function(e){return new dh(e)},vh=function(e,t,n){e.j[t]||(e.j[t]=n)},mh=function(e,t,n){e.jr.push([t,n])},yh=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var o=e.jr[r][0],i=e.jr[r][1];if(o.test(t))return i}return e.jd},gh=function(e,t,n){for(var r=0;r<t.length;r++)vh(e,t[r],n)},bh=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],o=t[n][1];vh(e,r,o)}},kh=function(e,t,n,r){for(var o,i=0,a=t.length;i<a&&(o=e.j[t[i]]);)e=o,i++;if(i>=a)return[];for(;i<a-1;)o=r(),vh(e,t[i],o),e=o,i++;vh(e,t[a-1],n)},wh="DOMAIN",xh="LOCALHOST",Oh="TLD",Eh="NUM",Dh="PROTOCOL",Sh="MAILTO",Ch="WS",jh="NL",_h="OPENBRACE",Ah="OPENBRACKET",Nh="OPENANGLEBRACKET",Th="OPENPAREN",Mh="CLOSEBRACE",Fh="CLOSEBRACKET",Rh="CLOSEANGLEBRACKET",Ph="CLOSEPAREN",Bh="AMPERSAND",Lh="APOSTROPHE",Ih="ASTERISK",zh="AT",Uh="BACKSLASH",Vh="BACKTICK",$h="CARET",Hh="COLON",qh="COMMA",Wh="DOLLAR",Gh="DOT",Yh="EQUALS",Kh="EXCLAMATION",Jh="HYPHEN",Qh="PERCENT",Xh="PIPE",Zh="PLUS",ev="POUND",tv="QUERY",nv="QUOTE",rv="SEMI",ov="SLASH",iv="TILDE",av="UNDERSCORE",sv="SYM",uv=Object.freeze({__proto__:null,DOMAIN:wh,LOCALHOST:xh,TLD:Oh,NUM:Eh,PROTOCOL:Dh,MAILTO:Sh,WS:Ch,NL:jh,OPENBRACE:_h,OPENBRACKET:Ah,OPENANGLEBRACKET:Nh,OPENPAREN:Th,CLOSEBRACE:Mh,CLOSEBRACKET:Fh,CLOSEANGLEBRACKET:Rh,CLOSEPAREN:Ph,AMPERSAND:Bh,APOSTROPHE:Lh,ASTERISK:Ih,AT:zh,BACKSLASH:Uh,BACKTICK:Vh,CARET:$h,COLON:Hh,COMMA:qh,DOLLAR:Wh,DOT:Gh,EQUALS:Yh,EXCLAMATION:Kh,HYPHEN:Jh,PERCENT:Qh,PIPE:Xh,PLUS:Zh,POUND:ev,QUERY:tv,QUOTE:nv,SEMI:rv,SLASH:ov,TILDE:iv,UNDERSCORE:av,SYM:sv}),cv="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw verm\xf6gensberater-ctb verm\xf6gensberatung-pwb \u03b5\u03bb \u03b5\u03c5 \u0431\u0433 \u0431\u0435\u043b \u0434\u0435\u0442\u0438 \u0435\u044e \u043a\u0430\u0442\u043e\u043b\u0438\u043a \u043a\u043e\u043c \u049b\u0430\u0437 \u043c\u043a\u0434 \u043c\u043e\u043d \u043c\u043e\u0441\u043a\u0432\u0430 \u043e\u043d\u043b\u0430\u0439\u043d \u043e\u0440\u0433 \u0440\u0443\u0441 \u0440\u0444 \u0441\u0430\u0439\u0442 \u0441\u0440\u0431 \u0443\u043a\u0440 \u10d2\u10d4 \u0570\u0561\u0575 \u05d9\u05e9\u05e8\u05d0\u05dc \u05e7\u05d5\u05dd \u0627\u0628\u0648\u0638\u0628\u064a \u0627\u062a\u0635\u0627\u0644\u0627\u062a \u0627\u0631\u0627\u0645\u0643\u0648 \u0627\u0644\u0627\u0631\u062f\u0646 \u0627\u0644\u0628\u062d\u0631\u064a\u0646 \u0627\u0644\u062c\u0632\u0627\u0626\u0631 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629 \u0627\u0644\u0639\u0644\u064a\u0627\u0646 \u0627\u0644\u0645\u063a\u0631\u0628 \u0627\u0645\u0627\u0631\u0627\u062a \u0627\u06cc\u0631\u0627\u0646 \u0628\u0627\u0631\u062a \u0628\u0627\u0632\u0627\u0631 \u0628\u06be\u0627\u0631\u062a \u0628\u064a\u062a\u0643 \u067e\u0627\u06a9\u0633\u062a\u0627\u0646 \u0680\u0627\u0631\u062a \u062a\u0648\u0646\u0633 \u0633\u0648\u062f\u0627\u0646 \u0633\u0648\u0631\u064a\u0629 \u0634\u0628\u0643\u0629 \u0639\u0631\u0627\u0642 \u0639\u0631\u0628 \u0639\u0645\u0627\u0646 \u0641\u0644\u0633\u0637\u064a\u0646 \u0642\u0637\u0631 \u0643\u0627\u062b\u0648\u0644\u064a\u0643 \u0643\u0648\u0645 \u0645\u0635\u0631 \u0645\u0644\u064a\u0633\u064a\u0627 \u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627 \u0645\u0648\u0642\u0639 \u0647\u0645\u0631\u0627\u0647 \u0915\u0949\u092e \u0928\u0947\u091f \u092d\u093e\u0930\u0924 \u092d\u093e\u0930\u0924\u092e\u094d \u092d\u093e\u0930\u094b\u0924 \u0938\u0902\u0917\u0920\u0928 \u09ac\u09be\u0982\u09b2\u09be \u09ad\u09be\u09b0\u09a4 \u09ad\u09be\u09f0\u09a4 \u0a2d\u0a3e\u0a30\u0a24 \u0aad\u0abe\u0ab0\u0aa4 \u0b2d\u0b3e\u0b30\u0b24 \u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe \u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8 \u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd \u0c2d\u0c3e\u0c30\u0c24\u0c4d \u0cad\u0cbe\u0cb0\u0ca4 \u0d2d\u0d3e\u0d30\u0d24\u0d02 \u0dbd\u0d82\u0d9a\u0dcf \u0e04\u0e2d\u0e21 \u0e44\u0e17\u0e22 \u0ea5\u0eb2\u0ea7 \ub2f7\ub137 \ub2f7\ucef4 \uc0bc\uc131 \ud55c\uad6d \u30a2\u30de\u30be\u30f3 \u30b0\u30fc\u30b0\u30eb \u30af\u30e9\u30a6\u30c9 \u30b3\u30e0 \u30b9\u30c8\u30a2 \u30bb\u30fc\u30eb \u30d5\u30a1\u30c3\u30b7\u30e7\u30f3 \u30dd\u30a4\u30f3\u30c8 \u307f\u3093\u306a \u4e16\u754c \u4e2d\u4fe1 \u4e2d\u56fd \u4e2d\u570b \u4e2d\u6587\u7f51 \u4e9a\u9a6c\u900a \u4f01\u4e1a \u4f5b\u5c71 \u4fe1\u606f \u5065\u5eb7 \u516b\u5366 \u516c\u53f8 \u516c\u76ca \u53f0\u6e7e \u53f0\u7063 \u5546\u57ce \u5546\u5e97 \u5546\u6807 \u5609\u91cc \u5609\u91cc\u5927\u9152\u5e97 \u5728\u7ebf \u5927\u4f17\u6c7d\u8f66 \u5927\u62ff \u5929\u4e3b\u6559 \u5a31\u4e50 \u5bb6\u96fb \u5e7f\u4e1c \u5fae\u535a \u6148\u5584 \u6211\u7231\u4f60 \u624b\u673a \u62db\u8058 \u653f\u52a1 \u653f\u5e9c \u65b0\u52a0\u5761 \u65b0\u95fb \u65f6\u5c1a \u66f8\u7c4d \u673a\u6784 \u6de1\u9a6c\u9521 \u6e38\u620f \u6fb3\u9580 \u70b9\u770b \u79fb\u52a8 \u7ec4\u7ec7\u673a\u6784 \u7f51\u5740 \u7f51\u5e97 \u7f51\u7ad9 \u7f51\u7edc \u8054\u901a \u8bfa\u57fa\u4e9a \u8c37\u6b4c \u8d2d\u7269 \u901a\u8ca9 \u96c6\u56e2 \u96fb\u8a0a\u76c8\u79d1 \u98de\u5229\u6d66 \u98df\u54c1 \u9910\u5385 \u9999\u683c\u91cc\u62c9 \u9999\u6e2f".split(" "),lv=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,fv=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,dv=/\uFE0F/,pv=/\d/,hv=/\s/;function vv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=ph(),n=hh(Eh),r=hh(wh),o=ph(),i=hh(Ch),a=[[pv,r],[lv,r],[fv,r],[dv,r]],s=function(){var e=hh(wh);return e.j={"-":o},e.jr=[].concat(a),e},u=function(e){var t=s();return t.t=e,t};bh(t,[["'",hh(Lh)],["{",hh(_h)],["[",hh(Ah)],["<",hh(Nh)],["(",hh(Th)],["}",hh(Mh)],["]",hh(Fh)],[">",hh(Rh)],[")",hh(Ph)],["&",hh(Bh)],["*",hh(Ih)],["@",hh(zh)],["`",hh(Vh)],["^",hh($h)],[":",hh(Hh)],[",",hh(qh)],["$",hh(Wh)],[".",hh(Gh)],["=",hh(Yh)],["!",hh(Kh)],["-",hh(Jh)],["%",hh(Qh)],["|",hh(Xh)],["+",hh(Zh)],["#",hh(ev)],["?",hh(tv)],['"',hh(nv)],["/",hh(ov)],[";",hh(rv)],["~",hh(iv)],["_",hh(av)],["\\",hh(Uh)]]),vh(t,"\n",hh(jh)),mh(t,hv,i),vh(i,"\n",ph()),mh(i,hv,i);for(var c=0;c<cv.length;c++)kh(t,cv[c],u(Oh),s);var l=s(),f=s(),d=s(),p=s();kh(t,"file",l,s),kh(t,"ftp",f,s),kh(t,"http",d,s),kh(t,"mailto",p,s);var h=s(),v=hh(Dh),m=hh(Sh);vh(f,"s",h),vh(f,":",v),vh(d,"s",h),vh(d,":",v),vh(l,":",v),vh(h,":",v),vh(p,":",m);for(var y=s(),g=0;g<e.length;g++)kh(t,e[g],y,s);return vh(y,":",v),kh(t,"localhost",u(xh),s),mh(t,pv,n),mh(t,lv,r),mh(t,fv,r),mh(t,dv,r),mh(n,pv,n),mh(n,lv,r),mh(n,fv,r),mh(n,dv,r),vh(n,"-",o),vh(r,"-",o),vh(o,"-",o),mh(r,pv,r),mh(r,lv,r),mh(r,fv,r),mh(r,dv,r),mh(o,pv,r),mh(o,lv,r),mh(o,fv,r),mh(o,dv,r),t.jd=hh(sv),t}function mv(e){return mv="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},mv(e)}var yv={defaultProtocol:"http",events:null,format:bv,formatHref:bv,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function gv(e){e=e||{},this.defaultProtocol="defaultProtocol"in e?e.defaultProtocol:yv.defaultProtocol,this.events="events"in e?e.events:yv.events,this.format="format"in e?e.format:yv.format,this.formatHref="formatHref"in e?e.formatHref:yv.formatHref,this.nl2br="nl2br"in e?e.nl2br:yv.nl2br,this.tagName="tagName"in e?e.tagName:yv.tagName,this.target="target"in e?e.target:yv.target,this.rel="rel"in e?e.rel:yv.rel,this.validate="validate"in e?e.validate:yv.validate,this.truncate="truncate"in e?e.truncate:yv.truncate,this.className="className"in e?e.className:yv.className,this.attributes=e.attributes||yv.attributes,this.ignoreTags=[];for(var t=("ignoreTags"in e?e.ignoreTags:yv.ignoreTags),n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function bv(e){return e}gv.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),rel:this.get("rel",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e),truncate:this.get("truncate",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var r,o=this[e];if(!o)return o;switch(mv(o)){case"function":return o(t,n.t);case"object":return"function"===typeof(r=n.t in o?o[n.t]:yv[e])?r(t,n.t):r}return o},getObject:function(e,t,n){var r=this[e];return"function"===typeof r?r(t,n.t):r}};function kv(){}function wv(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];r.constructor=t,t.prototype=r}(kv,n,t),n}kv.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yv.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var xv=wv("email",{isLink:!0}),Ov=wv("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),Ev=wv("text"),Dv=wv("nl"),Sv=wv("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yv.defaultProtocol,t=this.tk,n=!1,r=!1,o=[],i=0;t[i].t===Dh;)n=!0,o.push(t[i].v),i++;for(;t[i].t===ov;)r=!0,o.push(t[i].v),i++;for(;i<t.length;i++)o.push(t[i].v);return o=o.join(""),n||r||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===Dh}}),Cv=Object.freeze({__proto__:null,MultiToken:kv,Base:kv,createTokenClass:wv,MailtoEmail:xv,Email:Ov,Text:Ev,Nl:Dv,Url:Sv});function jv(){var e=ph(),t=ph(),n=ph(),r=ph(),o=ph(),i=ph(),a=ph(),s=hh(Sv),u=ph(),c=hh(Sv),l=hh(Sv),f=ph(),d=ph(),p=ph(),h=ph(),v=ph(),m=hh(Sv),y=hh(Sv),g=hh(Sv),b=hh(Sv),k=ph(),w=ph(),x=ph(),O=ph(),E=ph(),D=ph(),S=hh(Ov),C=ph(),j=hh(Ov),_=hh(xv),A=ph(),N=ph(),T=ph(),M=ph(),F=hh(Dv);vh(e,jh,F),vh(e,Dh,t),vh(e,Sh,n),vh(t,ov,r),vh(r,ov,o),vh(e,Oh,i),vh(e,wh,i),vh(e,xh,s),vh(e,Eh,i),vh(o,Oh,l),vh(o,wh,l),vh(o,Eh,l),vh(o,xh,l),vh(i,Gh,a),vh(E,Gh,D),vh(a,Oh,s),vh(a,wh,i),vh(a,Eh,i),vh(a,xh,i),vh(D,Oh,S),vh(D,wh,E),vh(D,Eh,E),vh(D,xh,E),vh(s,Gh,a),vh(S,Gh,D),vh(s,Hh,u),vh(s,ov,l),vh(u,Eh,c),vh(c,ov,l),vh(S,Hh,C),vh(C,Eh,j);var R=[Bh,Ih,zh,Uh,Vh,$h,Wh,wh,Yh,Jh,xh,Eh,Qh,Xh,Zh,ev,Dh,ov,sv,iv,Oh,av],P=[Lh,Rh,Mh,Fh,Ph,Hh,qh,Gh,Kh,Nh,_h,Ah,Th,tv,nv,rv];vh(l,_h,d),vh(l,Ah,p),vh(l,Nh,h),vh(l,Th,v),vh(f,_h,d),vh(f,Ah,p),vh(f,Nh,h),vh(f,Th,v),vh(d,Mh,l),vh(p,Fh,l),vh(h,Rh,l),vh(v,Ph,l),vh(m,Mh,l),vh(y,Fh,l),vh(g,Rh,l),vh(b,Ph,l),vh(k,Mh,l),vh(w,Fh,l),vh(x,Rh,l),vh(O,Ph,l),gh(d,R,m),gh(p,R,y),gh(h,R,g),gh(v,R,b),gh(d,P,k),gh(p,P,w),gh(h,P,x),gh(v,P,O),gh(m,R,m),gh(y,R,y),gh(g,R,g),gh(b,R,b),gh(m,P,m),gh(y,P,y),gh(g,P,g),gh(b,P,b),gh(k,R,m),gh(w,R,y),gh(x,R,g),gh(O,R,b),gh(k,P,k),gh(w,P,w),gh(x,P,x),gh(O,P,O),gh(l,R,l),gh(f,R,l),gh(l,P,f),gh(f,P,f),vh(n,Oh,_),vh(n,wh,_),vh(n,Eh,_),vh(n,xh,_),gh(_,R,_),gh(_,P,A),gh(A,R,_),gh(A,P,A);var B=[Bh,Lh,Ih,Uh,Vh,$h,Mh,Wh,wh,Yh,Jh,Eh,_h,Qh,Xh,Zh,ev,tv,ov,sv,iv,Oh,av];return gh(i,B,N),vh(i,zh,T),gh(s,B,N),vh(s,zh,T),gh(a,B,N),gh(N,B,N),vh(N,zh,T),vh(N,Gh,M),gh(M,B,N),vh(T,Oh,E),vh(T,wh,E),vh(T,Eh,E),vh(T,xh,S),e}function _v(e,t,n){var r=n[0].s,o=n[n.length-1].e;return new e(t.substr(r,o-r),n)}var Av="undefined"!==typeof console&&console&&console.warn||function(){},Nv={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function Tv(e){if(Nv.initialized&&Av('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");Nv.customProtocols.push(e)}function Mv(e){return Nv.initialized||function(){Nv.scanner={start:vv(Nv.customProtocols),tokens:uv},Nv.parser={start:jv(),tokens:Cv};for(var e={createTokenClass:wv},t=0;t<Nv.pluginQueue.length;t++)Nv.pluginQueue[t][1]({scanner:Nv.scanner,parser:Nv.parser,utils:e});Nv.initialized=!0}(),function(e,t,n){for(var r=n.length,o=0,i=[],a=[];o<r;){for(var s=e,u=null,c=null,l=0,f=null,d=-1;o<r&&!(u=yh(s,n[o].t));)a.push(n[o++]);for(;o<r&&(c=u||yh(s,n[o].t));)u=null,(s=c).accepts()?(d=0,f=s):d>=0&&d++,o++,l++;if(d<0)for(var p=o-l;p<o;p++)a.push(n[p]);else{a.length>0&&(i.push(_v(Ev,t,a)),a=[]),o-=d,l-=d;var h=f.t,v=n.slice(o-l,o);i.push(_v(h,t,v))}}return a.length>0&&i.push(_v(Ev,t,a)),i}(Nv.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var o=e.charCodeAt(r),i=void 0,a=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,o=[],i=0,a=0;a<r;){for(var s=e,u=null,c=0,l=null,f=-1,d=-1;a<r&&(u=yh(s,n[a]));)(s=u).accepts()?(f=0,d=0,l=s):f>=0&&(f+=n[a].length,d++),c+=n[a].length,i+=n[a].length,a++;i-=f,a-=d,c-=f,o.push({t:l.t,v:t.substr(i-c,c),s:i-c,e:i})}return o}(Nv.scanner.start,e))}function Fv(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Mv(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.t!==t||r.push(i.toObject())}return r}function Rv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Mv(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function Pv(e){return new Aa({key:new Ma("autolink"),appendTransaction:function(t,n,r){var i=t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc),a=t.some((function(e){return e.getMeta("preventAutolink")}));if(i&&!a){var s=r.tr,u=function(e,t){var n=new ca(e);return t.forEach((function(e){e.steps.forEach((function(e){n.step(e)}))})),n}(n.doc,Object(J.a)(t)),c=u.mapping,l=function(e){var t=e.mapping,n=e.steps,r=[];return t.maps.forEach((function(e,o){var i=[];if(e.ranges.length)e.forEach((function(e,t){i.push({from:e,to:t})}));else{var a=n[o],s=a.from,u=a.to;if(void 0===s||void 0===u)return;i.push({from:s,to:u})}i.forEach((function(e){var n=e.from,i=e.to,a=t.slice(o).map(n,-1),s=t.slice(o).map(i),u=t.invert().map(a,-1),c=t.invert().map(s);r.push({oldRange:{from:u,to:c},newRange:{from:a,to:s}})}))})),qf(r)}(u);if(l.forEach((function(t){var i=t.oldRange,a=t.newRange;Wf(i.from,i.to,n.doc).filter((function(t){return t.mark.type===e.type})).forEach((function(t){var o=Wf(c.map(t.from),c.map(t.to),r.doc).filter((function(t){return t.mark.type===e.type}));if(o.length){var i=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),u=r.doc.textBetween(i.from,i.to,void 0," "),l=Rv(a),f=Rv(u);l&&!f&&s.removeMark(i.from,i.to,e.type)}})),function(e,t,n){var r=[];return e.nodesBetween(t.from,t.to,(function(e,t){n(e)&&r.push({node:e,pos:t})})),r}(r.doc,a,(function(e){return e.isTextblock})).forEach((function(t){Fv(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((function(e){return e.isLink})).filter((function(t){return!e.validate||e.validate(t.value)})).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{from:t.pos+e.start+1,to:t.pos+e.end+1})})).filter((function(e){var t=a.from>=e.from&&a.from<=e.to,n=a.to>=e.from&&a.to<=e.to;return t||n})).forEach((function(t){s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length)return s}}})}var Bv,Lv=Yf.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate:function(){this.options.protocols.forEach(Tv)},inclusive:function(){return this.options.autolink},addOptions:function(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes:function(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:function(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML:function(e){var t=e.HTMLAttributes;return["a",Il(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setLink:function(t){return function(n){return(0,n.chain)().setMark(e.name,t).setMeta("preventAutolink",!0).run()}},toggleLink:function(t){return function(n){return(0,n.chain)().toggleMark(e.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},unsetLink:function(){return function(t){return(0,t.chain)().unsetMark(e.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}},addPasteRules:function(){var e,t=this;return[(e={find:function(e){return Fv(e).filter((function(e){return!t.options.validate||t.options.validate(e.value)})).filter((function(e){return e.isLink})).map((function(e){return{text:e.value,index:e.start,data:e}}))},type:this.type,getAttributes:function(e){var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}},new Xl({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Vl(e.getAttributes,void 0,o);if(!1===i||null===i)return null;var a=n.tr,s=o[o.length-1],u=o[0],c=r.to;if(s){var l=u.search(/\S/),f=r.from+u.indexOf(s),d=f+s.length;if(Wf(r.from,r.to,n.doc).filter((function(t){return t.mark.type.excluded.find((function(n){return n===e.type&&n!==t.mark.type}))})).filter((function(e){return e.to>f})).length)return null;d<r.to&&a.delete(d,r.to),f>r.from&&a.delete(r.from+l,f),c=r.from+l+s.length,a.addMark(r.from+l,c,e.type.create(i||{})),a.removeStoredMark(e.type)}}}))]},addProseMirrorPlugins:function(){var e,t=[];return this.options.autolink&&t.push(Pv({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new Aa({key:new Ma("handleClickLink"),props:{handleClick:function(t,n,r){var o,i=Uf(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href)&&(window.open(i.href,i.target),!0)}}}))),this.options.linkOnPaste&&t.push(function(e){return new Aa({key:new Ma("handlePasteLink"),props:{handlePaste:function(t,n,r){if(t.state.selection.empty)return!1;var o="";r.content.forEach((function(e){o+=e.textContent}));var i=Fv(o).find((function(e){return e.isLink&&e.value===o}));return!(!o||!i)&&(e.editor.commands.setMark(e.type,{href:i.href}),!0)}}})}({editor:this.editor,type:this.type})),t}}),Iv=Kf.create({name:"paragraph",priority:1e3,addOptions:function(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML:function(){return[{tag:"p"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["p",Il(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setParagraph:function(){return function(t){return t.commands.setNode(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-0":function(){return e.editor.commands.setParagraph()}}}}),zv=Kf.create({name:"doc",topNode:!0,content:"block+"}),Uv=/^\s*>\s$/,Vv=Kf.create({name:"blockquote",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML:function(){return[{tag:"blockquote"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["blockquote",Il(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setBlockquote:function(){return function(t){return t.commands.wrapIn(e.name)}},toggleBlockquote:function(){return function(t){return t.commands.toggleWrap(e.name)}},unsetBlockquote:function(){return function(t){return t.commands.lift(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-b":function(){return e.editor.commands.toggleBlockquote()}}},addInputRules:function(){return[(e={find:Uv,type:this.type},new Kl({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Vl(e.getAttributes,void 0,o)||{},a=n.tr.delete(r.from,r.to),s=a.doc.resolve(r.from).blockRange(),u=s&&zi(s,e.type,i);if(!u)return null;a.wrap(s,u);var c=a.doc.resolve(r.from-1).nodeBefore;c&&c.type===e.type&&Yi(a.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(o,c))&&a.join(r.from-1)}}))];var e}});var $v=["title","titleId"];function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hv.apply(this,arguments)}function qv(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Wv(e,t){var n=e.title,r=e.titleId,o=qv(e,$v);return a.createElement("svg",Hv({id:"loader-1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"40px",height:"40px",viewBox:"0 0 50 50",style:{enableBackground:"new 0 0 50 50"},xmlSpace:"preserve",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Bv||(Bv=a.createElement("path",{d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"},a.createElement("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"}))))}var Gv,Yv=a.forwardRef(Wv),Kv=(n.p,["title","titleId"]);function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jv.apply(this,arguments)}function Qv(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Xv(e,t){var n=e.title,r=e.titleId,o=Qv(e,Kv);return a.createElement("svg",Jv({xmlns:"http://www.w3.org/2000/svg",height:24,width:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Gv||(Gv=a.createElement("g",{strokeLinecap:"round",strokeWidth:2,fill:"none",strokeLinejoin:"round",className:"nc-icon-wrapper"},a.createElement("polygon",{points:"7 21 2 22 3 17 18 2 22 6 7 21"}))))}var Zv,em=a.forwardRef(Xv),tm=(n.p,function(e){var t,n,r,i,s,u=Object(a.useContext)(D),c=u.member,f=u.postId,p=u.dispatchAction,v=u.avatarSaturation,m=Object(a.useState)(!(!e.isReply&&!e.isEdit)),y=Object(l.a)(m,2),g=y[0],b=y[1],k=Object(a.useRef)(null),w=Object(a.useState)("default"),x=Object(l.a)(w,2),O=x[0],E=x[1],C=Object(a.useState)(!1),j=Object(l.a)(C,2),_=j[0],A=j[1],N=e.comment,T=e.commentsCount,M=null!==(t=null===c||void 0===c?void 0:c.name)&&void 0!==t?t:null===N||void 0===N||null===(n=N.member)||void 0===n?void 0:n.name,F=null!==(r=null===c||void 0===c?void 0:c.bio)&&void 0!==r?r:null===N||void 0===N||null===(i=N.member)||void 0===i?void 0:i.bio,R=null;"sending"===O?R=Object(S.jsx)(Yv,{className:"w-[24px] h-[24px] fill-white"}):"sent"===O&&(R=null),s=e.isReply?{placeholder:"Reply to comment",autofocus:!0}:e.isEdit?{placeholder:"Edit this comment",autofocus:!1,content:e.comment.html}:{placeholder:0===T?"Start the conversation":"Join the discussion",autofocus:!1};var P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(a.useState)(null),r=Object(l.a)(n,2),o=r[0],i=r[1],s=ch();return Object(a.useEffect)((function(){var t=!0,n=new rh(e);return i(n),n.on("transaction",(function(){requestAnimationFrame((function(){requestAnimationFrame((function(){t&&s()}))}))})),function(){n.destroy(),t=!1}}),t),o}(Object(o.a)({},function(e){var t=e.placeholder,n=e.autofocus,r=void 0!==n&&n,o=e.content,i=void 0===o?"":o;return{extensions:[zv,fh,Iv,Lv.configure({openOnClick:!1}),lh.configure({placeholder:t}),Vv.configure({})],content:i,autofocus:r,editorProps:{attributes:{class:"gh-comment-content focus:outline-0"}},parseOptions:{preserveWhitespace:"full"}}}(s))),B=function(){for(var e=-100,t=k.current,n=t.ownerDocument.defaultView;n!==window;)for(var r=n.parent,o=0;o<r.frames.length;o++)if(r.frames[o]===n){var i,a=Object(ze.a)(r.document.getElementsByTagName("iframe"));try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s.contentWindow===n)e+=s.getBoundingClientRect().top+n.pageYOffset}}catch(u){a.e(u)}finally{a.f()}n=r;break}return t.getBoundingClientRect().top+window.pageYOffset+e},L=Object(a.useCallback)((function(){M||e.isEdit?b(!0):(A(!0),P.commands.blur(),p("openPopup",{type:"addDetailsDialog",callback:function(t){t?P.commands.focus():e.close&&e.close(),A(!1)}}))}),[P,p,M,e]);Object(a.useEffect)((function(){var t;if(P)return e.isReply&&(t=setTimeout((function(){window.scrollTo({top:B(),left:0,behavior:"smooth"})}),100)),e.isEdit?(P.chain().focus().command((function(e){var t=e.tr;return e.commands.setTextSelection({from:t.doc.content.size,to:t.doc.content.size})})).run(),function(){t&&clearTimeout(t)}):function(){t&&clearTimeout(t)}}),[P,e]);var I=Object(a.useCallback)(h(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!P.isEmpty){t.next=2;break}return t.abrupt("return");case 2:if(E("sending"),!e.isReply){t.next=17;break}return t.prev=4,t.next=7,p("addReply",{parent:e.parent,reply:{post_id:f,status:"published",html:P.getHTML()}});case 7:P.chain().clearContent().blur().run(),E("sent"),e.close(),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(4),console.error(t.t0);case 15:t.next=35;break;case 17:if(!e.isEdit){t.next=24;break}return t.next=20,p("editComment",{comment:{id:e.comment.id,html:P.getHTML()},parent:e.parent});case 20:E("sent"),e.close(),t.next=35;break;case 24:return t.prev=24,t.next=27,p("addComment",{post_id:f,status:"published",html:P.getHTML()});case 27:P.chain().clearContent().blur().run(),b(!1),E("sent"),t.next=35;break;case 32:t.prev=32,t.t1=t.catch(24),console.error(t.t1);case 35:return t.abrupt("return",!1);case 36:case"end":return t.stop()}}),t,null,[[4,12],[24,32]])}))),[P,e,p,f]);Object(a.useEffect)((function(){if(P){P.on("focus",(function(){L()})),P.on("blur",(function(){null!==P&&void 0!==P&&P.isEmpty&&(b(!1),e.isReply&&e.close&&!_&&e.close())}));var t=function(t){if(t.metaKey||t.ctrlKey)"Enter"===t.key&&null!==P&&void 0!==P&&P.isFocused&&I();else{if("Escape"!==t.key)return"c"!==t.key||e.isEdit||e.isReply||null!==P&&void 0!==P&&P.isFocused?void 0:(null===P||void 0===P||P.commands.focus(),void window.scrollTo({top:B(),left:0,behavior:"smooth"}));null!==P&&void 0!==P&&P.isFocused&&!_&&(e.close?e.close():null===P||void 0===P||P.commands.blur())}};return window.addEventListener("keydown",t,{passive:!0}),function(){window.removeEventListener("keydown",t,{passive:!0}),null===P||void 0===P||P.off("focus"),null===P||void 0===P||P.off("blur")}}}),[P,e,L,_,I]);var z,U=function(e){P.isFocused&&e.preventDefault()},V=function(e){P.isFocused&&e.stopPropagation()},$=function(e,t){var n;e.preventDefault(),A(!0),p("openPopup",{type:"addDetailsDialog",bioAutofocus:null!==(n=t.bioAutofocus)&&void 0!==n&&n,callback:function(){null===P||void 0===P||P.commands.focus(),A(!1)}})};z=e.isReply?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{className:"hidden sm:inline",children:"Add "}),Object(S.jsx)("span",{className:"capitalize sm:normal-case",children:"reply"})]}):e.isEdit?"Save":Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{className:"hidden sm:inline",children:"Add "}),Object(S.jsx)("span",{className:"capitalize sm:normal-case",children:"comment"})]}),"sending"===O&&(z=null);var H=nr()&&e.isReply||nr()&&e.isEdit,q=e.isReply||e.isEdit||g||_;return Object(S.jsx)(S.Fragment,{children:Object(S.jsx)("form",{ref:k,onClick:function(e){P.isFocused||P.commands.focus()},onMouseDown:U,onTouchStart:U,className:"\n transition duration-200\n pt-3 pb-2 px-3\n -mt-[12px] -mx-3 mb-10\n rounded-md\n ".concat(q?"cursor-default":"cursor-pointer","\n ").concat(!e.isReply&&!e.isEdit&&"-mt-[4px]","\n ").concat((e.isReply||e.isEdit)&&"-mt-[16px]","\n ").concat(H&&"pl-1","\n "),children:Object(S.jsxs)("div",{className:"w-full relative",children:[Object(S.jsx)("div",{className:"pr-[1px] font-sans leading-normal dark:text-neutral-300",children:Object(S.jsxs)("div",{className:"transition-[padding] duration-150 delay-100 relative w-full pl-[52px] ".concat(H&&"pl-0"," ").concat(q&&"pt-[64px]"),children:[Object(S.jsx)("div",{className:"\n transition-all duration-150 delay-100\n w-full px-3 py-4\n bg-transparent dark:bg-[rgba(255,255,255,0.08)]\n rounded-md border-none border border-slate-50 dark:border-none\n font-sans text-[16.5px] leading-normal dark:text-neutral-300 \n focus:outline-0\n shadow-form hover:shadow-formxl dark:shadow-transparent\n ".concat(0===T&&"placeholder:text-neutral-700","\n ").concat(q?"cursor-text min-h-[144px] pb-[68px] pt-2":"cursor-pointer overflow-hidden min-h-[48px] hover:border-slate-300","\n ").concat(e.isEdit&&"cursor-text","\n ").concat(!M&&"pointer-events-none","\n "),children:Object(S.jsx)(ah,{onMouseDown:V,onTouchStart:V,editor:P})}),Object(S.jsxs)("div",{className:" absolute right-[9px] bottom-[9px] flex space-x-4 transition-[opacity] duration-150 ",children:[(e.isEdit||e.isReply)&&Object(S.jsx)("button",{type:"button",onClick:e.close,className:"font-sans text-sm font-medium ml-2.5 text-neutral-500 dark:text-neutral-400",children:"Cancel"}),Object(S.jsxs)("button",{className:"\n flex items-center justify-center w-auto sm:w-32 h-[39px]\n transition-[opacity] duration-150\n bg-neutral-900 dark:bg-[rgba(255,255,255,0.9)]\n rounded-[6px] border\n py-2 px-3\n text-sm text-center font-sans font-semibold\n text-white dark:text-neutral-800\n ",type:"button",onClick:I,children:[Object(S.jsx)("span",{children:R}),z&&Object(S.jsx)("span",{children:z})]})]})]})}),Object(S.jsxs)("div",{className:"absolute top-1 left-0 flex justify-start items-center h-12",children:[Object(S.jsx)("div",{className:"mr-3",children:Object(S.jsx)(mo,{comment:N,saturation:v,className:"pointer-events-none"})}),Object(S.jsx)("div",{children:Object(S.jsxs)(co,{show:q,enter:"transition duration-500 delay-100 ease-in-out",enterFrom:"opacity-0 -translate-x-2",enterTo:"opacity-100 translate-x-0",leave:"transition-none duration-0",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:[Object(S.jsx)("div",{className:"text-[17px] font-sans font-bold tracking-tight text-[rgb(23,23,23)] dark:text-[rgba(255,255,255,0.85)]",onClick:function(e){$(e,{bioAutofocus:!1})},children:M||"Anonymous"}),Object(S.jsx)("div",{className:"flex items-baseline",children:Object(S.jsxs)("button",{className:"group transition duration-150 flex justify-start items-center font-sans text-[14px] tracking-tight text-neutral-400 hover:text-neutral-500 dark:text-[rgba(255,255,255,0.5)] ".concat(!F&&"text-neutral-300 hover:text-neutral-400"),onClick:function(e){$(e,{bioAutofocus:!0})},children:[F||"Add your expertise",F&&Object(S.jsx)(em,{className:"transition-all duration-100 ease-out opacity-0 -translate-x-[6px] group-hover:opacity-100 group-hover:translate-x-0 w-[12px] h-[12px] stroke-neutral-500 ml-1"})]})})]})})]})]})})})}),nm=["title","titleId"];function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rm.apply(this,arguments)}function om(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function im(e,t){var n=e.title,r=e.titleId,o=om(e,nm);return a.createElement("svg",rm({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"black",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Zv||(Zv=a.createElement("path",{d:"M8.00025 13.8739L2.46073 8.09636C1.97388 7.60989 1.65255 6.98248 1.54231 6.30312C1.43208 5.62376 1.53853 4.92694 1.84658 4.31148V4.31148C2.07887 3.84703 2.41819 3.44443 2.83659 3.13684C3.25499 2.82925 3.74049 2.62547 4.25308 2.54231C4.76567 2.45914 5.29069 2.49896 5.78488 2.65849C6.27906 2.81802 6.72827 3.09269 7.09549 3.45987L8.00025 4.36406L8.90502 3.45987C9.27224 3.09269 9.72145 2.81802 10.2156 2.65849C10.7098 2.49896 11.2348 2.45914 11.7474 2.54231C12.26 2.62547 12.7455 2.82925 13.1639 3.13684C13.5823 3.44443 13.9216 3.84703 14.1539 4.31148C14.4616 4.9267 14.5678 5.62311 14.4577 6.30208C14.3476 6.98105 14.0267 7.60817 13.5404 8.09462L8.00025 13.8739Z",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})))}var am=a.forwardRef(im);n.p;var sm,um=function(e){var t=Object(a.useContext)(D),n=t.dispatchAction,r=t.member,o=t.commentsEnabled,i=Object(a.useState)(""),s=Object(l.a)(i,2),u=s[0],c=s[1],f="paid"===o,d=r&&!!r.paid,p=r&&(d||!f),h=p?"button":"span",v="cursor-pointer";return p||(v="cursor-text"),Object(S.jsxs)(h,{className:"group transition-all duration-50 ease-linear flex font-sans items-center text-sm outline-0 ".concat(e.comment.liked?"text-neutral-900 dark:text-[rgba(255,255,255,0.9)]":"text-neutral-400 dark:text-[rgba(255,255,255,0.5)]"," ").concat(!e.comment.liked&&p&&"hover:text-neutral-600"," ").concat(v),onClick:function(){p&&(e.comment.liked?n("unlikeComment",e.comment):(n("likeComment",e.comment),c("animate-heartbeat"),setTimeout((function(){c("")}),400)))},children:[Object(S.jsx)(am,{className:u+" mr-[6px] ".concat(e.comment.liked?"fill-neutral-900 stroke-neutral-900 dark:fill-white dark:stroke-white":"stroke-neutral-400 dark:stroke-[rgba(255,255,255,0.5)"," ").concat(!e.comment.liked&&p&&"group-hover:stroke-neutral-600"," transition duration-50 ease-linear")}),e.comment.likes_count]})},cm=["title","titleId"];function lm(){return lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lm.apply(this,arguments)}function fm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function dm(e,t){var n=e.title,r=e.titleId,o=fm(e,cm);return a.createElement("svg",lm({width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"black",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,sm||(sm=a.createElement("path",{d:"M7.17463 2.98741C7.17439 2.7888 7.11434 2.59487 7.00229 2.43088C6.89025 2.26689 6.73141 2.14046 6.54647 2.06805C6.36153 1.99564 6.15907 1.98061 5.96546 2.02492C5.77186 2.06923 5.5961 2.17083 5.46107 2.31648L1.86192 6.21418C1.69351 6.39677 1.60001 6.63606 1.60001 6.88445C1.60001 7.13284 1.69351 7.37213 1.86192 7.55472L5.45909 11.4524C5.59412 11.5981 5.76988 11.6997 5.96349 11.744C6.15709 11.7883 6.35955 11.7733 6.54449 11.7009C6.72943 11.6284 6.88827 11.502 7.00032 11.338C7.11236 11.174 7.17242 10.9801 7.17265 10.7815V8.86164H9.12703C10.438 8.86164 11.6953 9.38241 12.6222 10.3094C13.5492 11.2364 14.07 12.4937 14.07 13.8046V9.85023C14.07 8.53927 13.5492 7.28201 12.6222 6.35502C11.6953 5.42803 10.438 4.90726 9.12703 4.90726H7.17265L7.17463 2.98741Z",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})))}var pm=a.forwardRef(dm);n.p;var hm,vm,mm,ym=function(e){return Object(a.useContext)(D).member?Object(S.jsxs)("button",{disabled:!!e.disabled,className:"group transition-all duration-50 ease-linear flex font-sans items-center text-sm outline-0 ".concat(e.isReplying?"text-neutral-900 dark:text-[rgba(255,255,255,0.9)]":"text-neutral-400 dark:text-[rgba(255,255,255,0.5)] hover:text-neutral-600"),onMouseDown:function(e){e.preventDefault()},onClick:e.toggleReply,children:[Object(S.jsx)(pm,{className:"mr-[6px] ".concat(e.isReplying?"fill-neutral-900 stroke-neutral-900 dark:fill-white dark:stroke-white":"stroke-neutral-400 dark:stroke-[rgba(255,255,255,0.5)] group-hover:stroke-neutral-600"," transition duration-50 ease-linear")}),"Reply"]}):null},gm=function(e){var t=Object(a.useContext)(D).dispatchAction,n="published"!==e.comment.status;return Object(S.jsx)("div",{className:"flex flex-col",children:n?Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(n){t("showComment",e.comment),e.close()},children:[Object(S.jsx)("span",{children:"Show "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]}):Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(n){t("hideComment",e.comment),e.close()},children:[Object(S.jsx)("span",{children:"Hide "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]})})},bm=function(e){var t=Object(a.useContext)(D).dispatchAction;return Object(S.jsxs)("div",{className:"flex flex-col",children:[Object(S.jsx)("button",{className:"w-full mb-3 text-left text-[14px]",onClick:e.toggleEdit,disabled:e.disableEditing,children:"Edit"}),Object(S.jsx)("button",{className:"w-full text-left text-[14px] text-red-600",onClick:function(n){t("deleteComment",e.comment),e.close()},children:"Delete"})]})},km=function(e){var t=Object(a.useContext)(D).dispatchAction;return Object(S.jsx)("div",{className:"flex flex-col",children:Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(){t("openPopup",{type:"reportDialog",comment:e.comment}),e.close()},children:[Object(S.jsx)("span",{children:"Report "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]})})},wm=function(e){var t,n=Object(a.useContext)(D),r=n.member,o=n.admin,i=e.comment,s=r&&(null===(t=i.member)||void 0===t?void 0:t.uuid)===(null===r||void 0===r?void 0:r.uuid),u=!!o,c=Object(a.useRef)();Object(a.useEffect)((function(){var t,n,r=function(){e.close()};window.addEventListener("click",r,{passive:!0});var o=null===(t=c.current)||void 0===t||null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;return o&&o!==window&&o.addEventListener("click",r,{passive:!0}),function(){window.removeEventListener("click",r,{passive:!0}),o&&o!==window&&o.removeEventListener("click",r,{passive:!0})}}),[e]),Object(a.useEffect)((function(){var t=function(t){"Escape"===t.key&&e.close()};return window.addEventListener("keydown",t,{passive:!0}),function(){window.removeEventListener("keydown",t,{passive:!0})}}));var l=null;if("published"===i.status)l=s?Object(S.jsx)(bm,{comment:i,close:e.close,toggleEdit:e.toggleEdit,disableEditing:e.disableEditing}):u?Object(S.jsx)(gm,{comment:i,close:e.close}):Object(S.jsx)(km,{comment:i,close:e.close});else{if(!u)return null;l=Object(S.jsx)(gm,{comment:i,close:e.close})}return Object(S.jsx)("div",{ref:c,onClick:function(e){e.stopPropagation()},children:Object(S.jsx)("div",{className:"min-w-min sm:min-w-[150px] bg-white absolute font-sans rounded py-3 pl-4 pr-8 shadow-lg text-sm whitespace-nowrap z-10 dark:bg-zinc-900 dark:text-white outline-0",children:l})})},xm=["title","titleId"];function Om(){return Om=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Om.apply(this,arguments)}function Em(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Dm(e,t){var n=e.title,r=e.titleId,o=Em(e,xm);return a.createElement("svg",Om({width:16,height:16,viewBox:"0 0 16 16",fill:"black",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,hm||(hm=a.createElement("path",{d:"M3 12C3.82843 12 4.5 11.3284 4.5 10.5C4.5 9.67157 3.82843 9 3 9C2.17157 9 1.5 9.67157 1.5 10.5C1.5 11.3284 2.17157 12 3 12Z"})),vm||(vm=a.createElement("path",{d:"M8 12C8.82843 12 9.5 11.3284 9.5 10.5C9.5 9.67157 8.82843 9 8 9C7.17157 9 6.5 9.67157 6.5 10.5C6.5 11.3284 7.17157 12 8 12Z"})),mm||(mm=a.createElement("path",{d:"M13 12C13.8284 12 14.5 11.3284 14.5 10.5C14.5 9.67157 13.8284 9 13 9C12.1716 9 11.5 9.67157 11.5 10.5C11.5 11.3284 12.1716 12 13 12Z"})))}var Sm=a.forwardRef(Dm),Cm=(n.p,function(e){var t=Object(a.useState)(!1),n=Object(l.a)(t,2),r=n[0],o=n[1],i=Object(a.useContext)(D),s=i.member,u=i.admin,c=e.comment,f=!!s&&"published"===c.status||!!u;return s?Object(S.jsxs)("div",{className:"relative",children:[f?Object(S.jsx)("button",{onClick:function(){o((function(e){return!e}))},className:"outline-0",children:Object(S.jsx)(Sm,{className:"transition duration-50 ease-linear gh-comments-icon gh-comments-icon-more outline-0 fill-neutral-400 dark:fill-rgba(255,255,255,0.5) hover:fill-neutral-600"})}):null,r?Object(S.jsx)(wm,{comment:c,close:function(){o(!1)},toggleEdit:e.toggleEdit,disableEditing:e.disableEditing}):null]}):null}),jm=function(e){var t=e.loadMore,n=e.count;return Object(S.jsxs)("button",{className:"group w-full text-neutral-700 font-semibold px-0 pt-0 pb-3 mt-10 sm:mt-0 mb-10 font-sans text-md text-left dark:text-white flex items-center ",onClick:t,children:[Object(S.jsxs)("span",{className:"whitespace-nowrap mr-4",children:["\u2193 Show ",n," more replies"]}),Object(S.jsx)("span",{className:"transition-[background-color] duration-200 ease-out inline-block w-full bg-neutral-100 dark:bg-[rgba(255,255,255,0.08)] group-hover:bg-neutral-200 rounded h-[2px] mt-[3px]"})]})},_m=function(e){var t=e.comment,n=Object(a.useState)([]),r=Object(l.a)(n,2),o=r[0],i=r[1];Object(a.useEffect)((function(){i((function(e){return 0===e.length?t.replies.slice(0,3):t.replies.slice(0,t.replies.length)}))}),[t.replies]);var s=t.replies.length-o.length;return Object(S.jsxs)("div",{children:[o.map((function(e){return Object(S.jsx)(Tm,{comment:e,parent:t,isReply:!0},e.id)})),!!s&&Object(S.jsx)(jm,{count:s,loadMore:function(){var e=o.length+5;i(t.replies.slice(0,e))}})]})},Am=["updateIsEditing","isEditing"];function Nm(e){return e.comment.edited_at?Object(S.jsxs)("div",{children:[Object(S.jsx)("span",{className:"mx-[0.3em]",children:"\xb7"}),"Edited"]}):null}var Tm=function(e){var t,n=e.updateIsEditing,r=void 0===n?null:n,o=e.isEditing,s=i(e,Am),u=Object(a.useState)(!1),c=Object(l.a)(u,2),f=c[0],d=c[1],p=Object(a.useState)(!1),h=Object(l.a)(p,2),v=h[0],m=h[1];Object(a.useEffect)((function(){null===r||void 0===r||r(v||f)}),[r,v,f]);var y,g=Object(a.useContext)(D),b=g.admin,k=g.avatarSaturation,w=g.member,x=g.commentsEnabled,O=s.comment,E=O.replies&&O.replies.length>0,C="published"!==O.status,j={__html:O.html};C&&(y=b&&"hidden"===O.status?"This comment has been hidden.":"This comment has been removed.");var _="paid"===x,A=w&&!!w.paid,N=w&&(A||!_),T=w&&O.member&&O.member.uuid===w.uuid?w.bio:null===O||void 0===O||null===(t=O.member)||void 0===t?void 0:t.bio;return f?Object(S.jsx)(tm,{comment:O,close:function(){d(!1)},parent:s.parent,isEdit:!0}):Object(S.jsxs)(co,{appear:!0,show:!0,enter:"transition-opacity duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:[Object(S.jsx)("div",{className:"flex flex-row ".concat(E?"mb-2 sm:mb-4":"mb-6 sm:mb-10"),children:Object(S.jsxs)("div",{children:[Object(S.jsxs)("div",{className:"flex items-center mb-2 h-12",children:[Object(S.jsx)("div",{className:"mr-3",children:Object(S.jsx)(mo,{comment:O,saturation:k,isBlank:C})}),C?Object(S.jsx)("div",{children:Object(S.jsx)("p",{className:"font-sans text-[16px] leading-normal text-neutral-400 italic mt-[4px]",children:y})}):Object(S.jsxs)("div",{children:[Object(S.jsx)("h4",{className:"text-[17px] font-sans font-bold tracking-tight text-[rgb(23,23,23] dark:text-[rgba(255,255,255,0.85)]",children:O.member?O.member.name?O.member.name:"Anonymous":"Deleted member"}),Object(S.jsxs)("div",{className:"flex items-baseline font-sans text-[14px] tracking-tight text-neutral-400 dark:text-[rgba(255,255,255,0.5)]",children:[T&&Object(S.jsxs)("div",{children:[T,Object(S.jsx)("span",{className:"mx-[0.3em]",children:"\xb7"})]}),Object(S.jsx)("div",{title:er(O.created_at),children:Zn(O.created_at)}),Object(S.jsx)(Nm,{comment:O})]})]})]}),!C&&Object(S.jsx)("div",{className:"ml-12 sm:ml-[52px] mb-2 pr-4",children:Object(S.jsx)("p",{dangerouslySetInnerHTML:j,className:"gh-comment-content font-sans leading-normal text-[16px] text-neutral-900 dark:text-[rgba(255,255,255,0.85)]"})}),Object(S.jsxs)("div",{className:"ml-12 sm:ml-[52px] flex gap-5 items-center",children:[!C&&Object(S.jsx)(um,{comment:O}),!C&&N&&(C||!s.parent)&&Object(S.jsx)(ym,{disabled:!!o,comment:O,toggleReply:function(){m((function(e){return!e}))},isReplying:v}),Object(S.jsx)(Cm,{comment:O,toggleEdit:function(){d((function(e){return!e}))},disableEditing:o})]})]})}),E&&Object(S.jsx)("div",{className:"ml-11 sm:ml-14 mt-8 sm:mt-10 mb-4 sm:mb-0",children:Object(S.jsx)(_m,{comment:O})}),v&&Object(S.jsx)("div",{className:"ml-14 my-10",children:Object(S.jsx)(tm,{parent:O,close:function(){m(!1)},isReply:!0})})]})},Mm=function(e){var t=Object(a.useContext)(D),n=t.pagination,r=t.dispatchAction;if(!n)return null;var o=n.total-n.page*n.limit;return o<=0?null:Object(S.jsxs)("button",{className:"group w-full text-neutral-700 font-semibold px-0 pt-0 pb-2 mb-10 font-sans text-md text-left dark:text-white flex items-center ",onClick:function(){r("loadMoreComments")},children:[Object(S.jsxs)("span",{className:"whitespace-nowrap mr-4",children:["\u2191 Show ",o," previous comments"]}),Object(S.jsx)("span",{className:"transition-[background-color] duration-200 ease-out inline-block w-full bg-neutral-100 group-hover:bg-neutral-200 dark:bg-[rgba(255,255,255,0.05)] rounded h-[2px] mt-[3px]"})]})};var Fm,Rm,Pm=function(){return Object(S.jsx)("div",{className:"flex items-center justify-center w-full h-32",children:Object(S.jsx)(Yv,{className:"w-12 h-12 mb-6 fill-[rgb(225,225,225,0.9)] dark:fill-[rgba(255,255,255,0.6)]"})})},Bm="ghost-comments-root",Lm=function(e){var t=e.title,n=e.showCount,r=e.count;if(!t&&!n&&null!==t)return null;var o=function(e){var t=e.title;return null===t?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{className:"hidden sm:inline",children:"Member "}),Object(S.jsx)("span",{className:"capitalize sm:normal-case",children:"discussion"})]}):t},i=function(e){var t=e.showCount,n=e.count;return t?1===n?Object(S.jsx)("div",{className:"text-neutral-400 text-[1.6rem]",children:"1 comment"}):Object(S.jsxs)("div",{className:"text-neutral-400 text-[1.6rem]",children:[n," comments"]}):null};return Object(S.jsxs)("div",{className:"w-full flex justify-between items-baseline font-sans mb-10",children:[Object(S.jsx)("h2",{className:"font-bold text-[2.8rem] tracking-tight dark:text-[rgba(255,255,255,0.85)]",children:Object(S.jsx)(o,{title:t})}),Object(S.jsx)(i,{showCount:n,count:r})]})},Im=function(e){var t=Object(a.useState)(!1),n=Object(l.a)(t,2),r=n[0],o=n[1],i=Object(a.useContext)(D),s=i.pagination,u=i.member,c=i.comments,f=i.commentCount,d=i.commentsEnabled,p=i.title,h=i.showCount,v=c.slice().reverse().map((function(e){return Object(S.jsx)(Tm,{isEditing:r,comment:e,updateIsEditing:o},e.id)})),m="paid"===d,y=u&&!!u.paid;return Object(a.useEffect)((function(){var e=document.getElementById(Bm);e&&"#ghost-comments"===window.location.hash&&0===window.scrollY&&requestAnimationFrame((function(){requestAnimationFrame((function(){e.scrollIntoView()}))}))}),[]),Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(Lm,{title:p,showCount:h,count:f}),Object(S.jsx)(Mm,{}),Object(S.jsx)("div",{className:s?"":"mt-4",children:v}),Object(S.jsx)("div",{children:r?null:u&&(y||!m)?Object(S.jsx)(tm,{commentsCount:f}):Object(S.jsx)(ar,{isFirst:0===(null===s||void 0===s?void 0:s.total),isPaid:m})})]})},zm=function(e){var t=function(e,t,n){var r=[e,t,n].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*r[0]+.7152*r[1]+.0722*r[2]},n=Object(a.useContext)(D),r=n.accentColor,o=n.colorScheme,i=function(){if("light"===o)return!1;if("dark"===o)return!0;var e=getComputedStyle(document.getElementById(Bm).parentNode).getPropertyValue("color"),n=e.substring(e.indexOf("(")+1,e.lastIndexOf(")")).split(/,\s*/);return function(e,n){var r=t(e[0],e[1],e[2]),o=t(n[0],n[1],n[2]);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}([255,255,255],[n[0],n[1],n[2]])<5}()?"dark":"",s={"--gh-accent-color":null!==r&&void 0!==r?r:"blue",paddingTop:0,paddingBottom:24};return Object(S.jsx)("section",{className:"ghost-display "+i,style:s,children:e.done?Object(S.jsx)(S.Fragment,{children:Object(S.jsx)(Im,{})}):Object(S.jsx)(Pm,{})})},Um=["title","titleId"];function Vm(){return Vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vm.apply(this,arguments)}function $m(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Hm(e,t){var n=e.title,r=e.titleId,o=$m(e,Um);return a.createElement("svg",Vm({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"gh-portal-closeicon",alt:"Close",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Fm||(Fm=a.createElement("defs",null,a.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.2px !important;}"))),Rm||(Rm=a.createElement("path",{className:"a",d:"M.75 23.249l22.5-22.5M23.25 23.249L.75.749"})))}var qm,Wm=a.forwardRef(Hm),Gm=(n.p,function(e){return Object(S.jsx)("button",{className:"transition-opacity duration-100 ease-out absolute top-[36px] sm:top-10 right-8 sm:right-8 opacity-20 hover:opacity-40",onClick:e.close,children:Object(S.jsx)(Wm,{className:"w-[20px] h-[20px]"})})}),Ym=function(e){var t,n,r=Object(a.useRef)(null),o=Object(a.useRef)(null),i=Object(a.useContext)(D),s=i.dispatchAction,u=i.member,c=Object(a.useState)(null!==(t=u.name)&&void 0!==t?t:""),f=Object(l.a)(c,2),p=f[0],v=f[1],m=Object(a.useState)(null!==(n=u.bio)&&void 0!==n?n:""),y=Object(l.a)(m,2),g=y[0],b=y[1],k=Object(a.useState)([]),w=Object(l.a)(k,2),x=w[0],O=w[1],E=Object(a.useState)("Head of Marketing"),C=Object(l.a)(E,2),j=C[0],_=C[1],A=50;u.bio&&(A-=u.bio.length);var N=Object(a.useState)(A),T=Object(l.a)(N,2),M=T[0],F=T[1],R=Object(a.useState)({name:"",bio:""}),P=Object(l.a)(R,2),B=P[0],L=P[1],I=function(t){s("closePopup"),e.callback(t)},z=function(){var e=h(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""===p.trim()){e.next=6;break}return e.next=3,s("updateMember",{name:p,bio:g});case 3:I(!0),e.next=9;break;case 6:L({name:"Enter your name"}),v(""),null===(t=r.current)||void 0===t||t.focus();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(a.useEffect)((function(){O(function(){for(var e=[],t=[{avatar:"https://images.unsplash.com/photo-1607746882042-944635dfe10e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2670&q=80",name:"Sophie Joan",expertise:"Freelance Writer"},{avatar:"https://images.unsplash.com/photo-1569913486515-b74bf7751574?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1289&q=80",name:"Naomi Schiff",expertise:"Founder @ Acme Inc"},{avatar:"https://images.unsplash.com/photo-1544725176-7c40e5a71c5e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2667&q=80",name:"Katrina Klosp",expertise:"Local Resident"},{avatar:"https://images.unsplash.com/photo-1580489944761-15a19d654956?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1361&q=80",name:"Laura Smith",expertise:"Craft Maker"},{avatar:"https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1760&q=80",name:"Peter Kristy",expertise:"Design Consultant"},{avatar:"https://images.unsplash.com/photo-1534528741775-53994a69daeb?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1364&q=80",name:"Linda Lo",expertise:"Wedding Photographer"},{avatar:"https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1760&q=80",name:"Darren Mckenzie",expertise:"Senior Engineer"},{avatar:"https://images.unsplash.com/photo-1566492031773-4f4e44671857?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80",name:"Jack Tomlin",expertise:"Mid-level UX Designer"}],n=0;n<4;n++){var r=Math.floor(Math.random()*t.length);e.push(t[r]),t.splice(r,1)}return e}()),_(function(){var e=["Freelance Copywriter","Head of Marketing","Junior Developer","Full-time Parent","Local Resident","English Teacher","Support Officer","Professional Athlete"];return e[Math.floor(Math.random()*e.length)]}());var t=setTimeout((function(){var t,n;e.bioAutofocus?null===(t=o.current)||void 0===t||t.focus():null===(n=r.current)||void 0===n||n.focus()}),200);return function(){clearTimeout(t)}}),[r,o]);var U=function(e){return x[e]?Object(S.jsx)(co,{appear:!0,enter:"transition duration-200 delay-[400ms] ease-out",enterFrom:"opacity-0 translate-y-2",enterTo:"opacity-100 translate-y-0",leave:"transition duration-200 ease-in",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-2",children:Object(S.jsxs)("div",{className:"flex flex-row justify-start items-center gap-3 my-4 pr-4",children:[Object(S.jsx)("div",{className:"w-10 h-10 rounded-full border-2 border-white bg-no-repeat bg-cover",style:{backgroundImage:"url(".concat(x[e].avatar,")")}}),Object(S.jsxs)("div",{className:"flex flex-col justify-center items-start",children:[Object(S.jsx)("div",{className:"text-base font-sans font-semibold tracking-tight text-white",children:x[e].name}),Object(S.jsx)("div",{className:"font-sans text-[14px] tracking-tight text-neutral-400",children:x[e].expertise})]})]})}):null};return Object(S.jsx)("div",{className:"overflow-hidden relative bg-white w-screen sm:w-[720px] h-screen sm:h-auto p-[28px] sm:p-0 rounded-none sm:rounded-xl text-center shadow-modal",onClick:function(e){e.stopPropagation()},children:Object(S.jsxs)("div",{className:"flex",children:[Object(S.jsx)("div",{className:"flex flex-col justify-center items-center w-[40%] bg-[#1C1C1C]",children:Object(S.jsx)("div",{className:"flex flex-col",children:x.length>0&&Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{children:U(0)}),Object(S.jsx)("span",{children:U(1)}),Object(S.jsx)("span",{children:U(2)}),Object(S.jsx)("span",{children:U(3)})]})})}),Object(S.jsxs)("div",{className:"w-[60%] p-8",children:[Object(S.jsx)("h1",{className:"font-sans font-bold tracking-tight text-[24px] mb-1 text-black text-left",children:"Complete your profile."}),Object(S.jsx)("p",{className:"font-sans text-base text-neutral-500 pr-4 sm:pr-10 leading-9 text-left",children:"Add context to your comment, share your name and expertise to foster a healthy discussion."}),Object(S.jsxs)("section",{className:"mt-8 text-left",children:[Object(S.jsxs)("div",{className:"flex flex-row mb-2 justify-between",children:[Object(S.jsx)("label",{htmlFor:"comments-name",className:"font-sans font-medium text-sm",children:"Name"}),Object(S.jsx)(co,{show:!!B.name,enter:"transition duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition duration-100 ease-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"font-sans text-sm text-red-500",children:B.name})})]}),Object(S.jsx)("input",{id:"comments-name",className:"transition-[border-color] duration-200 font-sans px-3 rounded border border-neutral-200 focus:border-neutral-300 w-full outline-0 h-[42px] flex items-center ".concat(B.name&&"border-red-500 focus:border-red-500"),type:"text",name:"name",ref:r,value:p,placeholder:"Jamie Larson",onChange:function(e){v(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&(v(e.target.value),z())},maxLength:"64"}),Object(S.jsxs)("div",{className:"flex flex-row mt-6 mb-2 justify-between",children:[Object(S.jsx)("label",{htmlFor:"comments-name",className:"font-sans font-medium text-sm",children:"Expertise"}),Object(S.jsxs)("div",{className:"font-sans text-sm text-neutral-400 ".concat(0===M&&"text-red-500"),children:[Object(S.jsx)("b",{children:M})," characters left"]})]}),Object(S.jsx)("input",{id:"comments-bio",className:"transition-[border-color] duration-200 font-sans px-3 rounded border border-neutral-200 focus:border-neutral-300 w-full outline-0 h-[42px] flex items-center ".concat(0===M&&"border-red-500 focus:border-red-500"),type:"text",name:"bio",ref:o,value:g,placeholder:j,onChange:function(e){var t=e.target.value;F(50-t.length),b(t)},onKeyDown:function(e){"Enter"===e.key&&(b(e.target.value),z())},maxLength:50}),Object(S.jsx)("button",{className:"transition-opacity duration-200 ease-linear w-full h-[44px] mt-8 px-8 flex items-center justify-center rounded-md text-white font-sans font-semibold text-[15px] bg-[#3204F5] opacity-100 hover:opacity-90",onClick:z,children:"Save"})]})]}),Object(S.jsx)(Gm,{close:function(){return I(!1)}})]})})},Km=["title","titleId"];function Jm(){return Jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jm.apply(this,arguments)}function Qm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Xm(e,t){var n=e.title,r=e.titleId,o=Qm(e,Km);return a.createElement("svg",Jm({width:"26px",height:"26px",viewBox:"-1 -1 26 26",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,qm||(qm=a.createElement("g",{id:"check-circle",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{className:"animated-check-circle",d:"M19.6004116,2.71490714 C17.5353801,1.0196018 14.8927356,0 12,0 C5.38938053,0 0,5.38938053 0,12 C0,18.6106195 5.38938053,24 12,24 C18.6106195,24 24,18.6106195 24,12 C24,9.71681416 23.3628319,7.59292035 22.2743363,5.78761062 L11.0442478,17.0442478 L5.49557522,11.4955752",id:"Shape",stroke:"#FFFFFF",strokeWidth:2}))))}var Zm=a.forwardRef(Xm),ey=(n.p,{addDetailsDialog:Ym,reportDialog:function(e){var t=Object(a.useState)("default"),n=Object(l.a)(t,2),r=n[0],o=n[1],i="bg-red-600";"sent"===r&&(i="bg-green-600");var s="Yes";"sending"===r?s="Sending":"sent"===r&&(s="Sent");var u=null;"sending"===r?u=Object(S.jsx)(Yv,{className:"w-[24px] h-[24px] mr-2 fill-white"}):"sent"===r&&(u=Object(S.jsx)(Zm,{className:"w-[16px] h-[16px] mr-2"}));var c=Object(a.useContext)(D).dispatchAction,f=function(e){c("closePopup")};return Object(S.jsxs)("div",{className:"relative bg-white w-screen sm:w-[500px] h-screen sm:h-auto p-[28px] sm:p-8 rounded-none sm:rounded-xl text-center shadow-modal",onClick:function(e){e.stopPropagation()},children:[Object(S.jsx)("h1",{className:"font-sans font-bold tracking-tight text-[24px] mb-3 text-black",children:"You sure you want to report?"}),Object(S.jsx)("p",{className:"font-sans text-[1.45rem] text-neutral-500",children:"You request will be sent to the owner of this site."}),Object(S.jsxs)("div",{className:"mt-10",children:[Object(S.jsxs)("button",{className:"transition duration-200 ease-linear w-full h-[44px] px-8 flex items-center justify-center rounded-md text-white font-sans font-semibold text-[15px] ".concat(i),onClick:function(t){t.stopPropagation(),o("sending"),setTimeout((function(){o("sent"),c("reportComment",e.comment),setTimeout((function(){f()}),750)}),1e3)},children:[u,s]}),Object(S.jsxs)("p",{className:"font-sans font-medium text-[1.45rem] text-neutral-500 mt-4 -mb-1",children:["No, ",Object(S.jsx)("button",{className:"font-sans underline",onClick:f,children:"I've changed my mind"})]})]})]})}}),ty=function(e){var t=Object(a.useContext)(D).dispatchAction,n=function(n){t("closePopup"),e.callback&&e.callback(!1)};return Object(a.useEffect)((function(){var e=function(e){"Escape"===e.key&&n()};return window.addEventListener("keydown",e,{passive:!0}),function(){window.removeEventListener("keydown",e,{passive:!0})}})),Object(S.jsx)(co,{show:e.show,appear:!0,children:Object(S.jsx)(A,{type:"fixed",children:Object(S.jsx)("div",{children:Object(S.jsx)(co.Child,{enter:"transition duration-200 linear",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition duration-200 linear",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"fixed top-0 left-0 overflow-hidden w-screen h-screen flex pt-0 sm:pt-12 justify-center bg-gradient-to-b from-[rgba(0,0,0,0.2)] to-rgba(0,0,0,0.1) backdrop-blur-[2px]",onClick:n,children:Object(S.jsx)(co.Child,{enter:"transition duration-200 delay-150 linear",enterFrom:"translate-y-4 opacity-0",enterTo:"translate-y-0 opacity-100",leave:"transition duration-200 linear",leaveFrom:"translate-y-0 opacity-100",leaveTo:"translate-y-4 opacity-0",children:e.children})})})})})})},ny=["type"];function ry(e){var t=Object(a.useContext)(D).popup,n=Object(a.useState)(t),r=Object(l.a)(n,2),s=r[0],u=r[1];if(Object(a.useEffect)((function(){null!==t&&u(t)}),[t,u]),!s||!s.type)return null;var c=null!==t&&void 0!==t?t:s,f=c.type,d=i(c,ny),p=ey[f];if(!p)return console.warn("Unknown popup of type ",f),null;var h=t===s;return Object(S.jsx)(ty,{show:h,callback:d.callback,children:Object(S.jsx)(p,Object(o.a)({},d))})}function oy(e){var t=e.adminUrl,n=e.onLoad;return Object(S.jsx)("iframe",{"data-frame":"admin-auth",src:t+"auth-frame/",style:{display:"none"},title:"auth-frame",onLoad:n})}function iy(e){var t=e.done;e.appVersion;return Object(S.jsx)(A,{children:Object(S.jsx)(zm,{done:t})})}function ay(e){var t=e.dsn,n=e.children;return t?Object(S.jsx)(Rn,{children:n}):Object(S.jsx)(S.Fragment,{children:n})}var sy=function(e){b(n,e);var t=E(n);function n(e){var r;return v(this,n),(r=t.call(this,e)).state={action:"init:running",initStatus:"running",member:null,admin:null,comments:null,pagination:null,popupNotification:null,customSiteUrl:e.customSiteUrl,postId:e.postId,popup:null,accentColor:e.accentColor},r.adminApi=null,r.GhostApi=null,r}return y(n,[{key:"initSetup",value:function(){var e=h(d().mark((function e(){var t,n,r,o,i,a,s,u;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetchApiData();case 3:return t=e.sent,n=t.site,r=t.member,e.next=8,this.fetchComments();case 8:o=e.sent,i=o.comments,a=o.pagination,s=o.count,u={site:n,member:r,action:"init:success",initStatus:"success",comments:i,pagination:a,commentCount:s},this.setState(u),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),console.error("[Comments] Failed to initialize:",e.t0),this.setState({action:"init:failed",initStatus:"failed"});case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(){return e.apply(this,arguments)}}()},{key:"initAdminAuth",value:function(){var e=h(d().mark((function e(){var t,n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.adminApi=this.setupAdminAPI(),t=null,e.prev=3,e.next=6,this.adminApi.getUser();case 6:t=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn("[Comments] Failed to fetch current admin user:",e.t0);case 12:n={admin:t},this.setState(n),e.next=19;break;case 16:e.prev=16,e.t1=e.catch(0),console.error("[Comments] Failed to initialize admin authentication:",e.t1);case 19:case"end":return e.stop()}}),e,this,[[0,16],[3,9]])})));return function(){return e.apply(this,arguments)}}()},{key:"dispatchAction",value:function(){var e=h(d().mark((function e(t,n){var r,o,i=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this.timeoutId),this.setState({action:"".concat(t,":running")}),e.prev=2,e.next=5,Kn({action:t,data:n,state:this.state,api:this.GhostApi,adminApi:this.adminApi});case 5:r=e.sent,this.setState(r),r&&r.action&&!r.action.includes(":failed")&&(this.timeoutId=setTimeout((function(){i.setState({action:""})}),2e3)),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(2),console.error(e.t0),o=Qn({type:"".concat(t,":failed"),autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:e.t0}}),this.setState({action:"".concat(t,":failed"),popupNotification:o});case 15:case"end":return e.stop()}}),e,this,[[2,10]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchApiData",value:function(){var e=h(d().mark((function e(){var t,n,r,o,i,a,s,u;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.siteUrl,r=t.customSiteUrl,o=t.apiUrl,i=t.apiKey,e.prev=1,this.GhostApi=this.props.api||ir({siteUrl:n,apiUrl:o,apiKey:i}),e.next=5,this.GhostApi.init();case 5:return a=e.sent,s=a.site,u=a.member,this.setupSentry({site:s}),e.abrupt("return",{site:s,member:u});case 12:if(e.prev=12,e.t0=e.catch(1),!or(["dev","test"],{customSiteUrl:r})){e.next=16;break}return e.abrupt("return",{});case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,this,[[1,12]])})));return function(){return e.apply(this,arguments)}}()},{key:"fetchComments",value:function(){var e=h(d().mark((function e(){var t,n,r,o,i,a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.GhostApi.comments.browse({page:1,postId:this.state.postId}),n=this.GhostApi.comments.count({postId:this.state.postId}),e.next=4,Promise.all([t,n]);case 4:return r=e.sent,o=Object(l.a)(r,2),i=o[0],a=o[1],e.abrupt("return",{comments:i.comments,pagination:i.meta.pagination,count:a});case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setupAdminAPI",value:function(){var e=document.querySelector('iframe[data-frame="admin-auth"]'),t=1,n={},r=new URL(this.props.adminUrl).origin;function i(i,a){return new Promise((function(s,u){n[t+=1]=function(e,t){return e?u(e):s(t)},e.contentWindow.postMessage(JSON.stringify(Object(o.a)({uid:t,action:i},a)),r)}))}return window.addEventListener("message",(function(e){if(e.origin===r){var t=null;try{t=JSON.parse(e.data)}catch(i){return void console.error("Error parsing event data",i)}var o=n[t.uid];o&&(delete n[t.uid],o(t.error,t.result))}})),{getUser:function(){return h(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i("getUser");case 2:return t=e.sent,e.abrupt("return",t.users[0]);case 4:case"end":return e.stop()}}),e)})))()},hideComment:function(e){return h(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i("hideComment",{id:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()},showComment:function(e){return h(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i("showComment",{id:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()}}}},{key:"setupSentry",value:function(e){var t=e.site;if(or(["test"]))return null;var n=t.portal_sentry,r=(t.portal_version,t.version),o="comments@".concat("0.5.0","|ghost@").concat(r);n&&n.dsn&&Pn({dsn:n.dsn,environment:n.env||"development",release:o,beforeSend:function(e){return function(e){var t,n,r,o,i=e.event,a=((null===i||void 0===i||null===(t=i.exception)||void 0===t||null===(n=t.values)||void 0===n||null===(r=n[0])||void 0===r||null===(o=r.stacktrace)||void 0===o?void 0:o.frames)||[]).map((function(e){return e.filename})).filter((function(e){return!!e}));return(a[a.length-1]||"").includes("@tryghost/comments")}({event:e})?e:null},allowUrls:[/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/comments/,/https?:\/\/((cdn)\.)?jsdelivr\.net\/npm\/@tryghost\/comments/]})}},{key:"getContextFromState",value:function(){var e=this,t=this.state,n=t.action,r=t.popupNotification,o=t.customSiteUrl,i=t.member,a=t.comments,s=t.pagination,u=t.commentCount,c=t.postId,l=t.admin,f=t.popup;return{action:n,popupNotification:r,customSiteUrl:o,member:i,admin:l,comments:a,pagination:s,commentCount:u,postId:c,title:this.props.title,showCount:this.props.showCount,colorScheme:this.props.colorScheme,avatarSaturation:this.props.avatarSaturation,accentColor:this.props.accentColor,commentsEnabled:this.props.commentsEnabled,appVersion:this.props.appVersion,stylesUrl:this.props.stylesUrl,publication:this.props.publication,popup:f,dispatchAction:function(t,n){return e.dispatchAction(t,n)},onAction:function(t,n){return e.dispatchAction(t,n)}}}},{key:"componentDidMount",value:function(){this.initSetup()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"render",value:function(){var e="success"===this.state.initStatus;return Object(S.jsx)(ay,{dsn:this.props.sentryDsn,children:Object(S.jsxs)(D.Provider,{value:this.getContextFromState(),children:[Object(S.jsx)(iy,{done:e}),Object(S.jsx)(oy,{adminUrl:this.props.adminUrl,onLoad:this.initAdminAuth.bind(this)}),Object(S.jsx)(ry,{})]})})}}]),n}(s.a.Component),uy=["siteUrl"];function cy(e){e.siteUrl;!function(){var e=document.querySelector("script[data-ghost-comments]");if(e){var t=document.createElement("div");t.id=Bm,e.parentElement.insertBefore(t,e)}else console.warn("[Comments] Comment box location was not found: could not load comments box.")}(),function(){var e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}()}!function(){var e=function(){var e=document.querySelector("script[data-ghost-comments]");if(e){var t=e.dataset.ghostComments,n=e.dataset.key,r=e.dataset.api,o=e.dataset.admin,i=e.dataset.sentryDsn,a=e.dataset.postId,s=e.dataset.colorScheme,u=e.dataset.avatarSaturation,c=e.dataset.accentColor,l=e.dataset.appVersion,f=e.dataset.commentsEnabled;return{siteUrl:t,stylesUrl:e.dataset.styles,apiKey:n,apiUrl:r,sentryDsn:i,postId:a,adminUrl:o,colorScheme:s,avatarSaturation:u,accentColor:c,appVersion:l,commentsEnabled:f,title:"null"===e.dataset.title?null:e.dataset.title,showCount:"true"===e.dataset.count,publication:"The Off-Season"}}return{}}(),t=e.siteUrl,n=i(e,uy),r=t||window.location.origin;cy({siteUrl:r}),c.a.render(Object(S.jsx)(s.a.StrictMode,{children:Object(S.jsx)(sy,Object(o.a)({siteUrl:r,customSiteUrl:t},n))}),document.getElementById(Bm))}()},,,,,,,,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(4),o=n(7),i=n(26),a=n(10),s=n(16);function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return l("",e,t,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400,r=u(e,t);return d(r)>n?c(e,t-1,n):r}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Object(i.a)(),c=Object(r.a)(u,2),d=c[0],p=c[1];if(null===t||["number","boolean","string"].includes(typeof t)&&!Object(o.h)(t))return t;var h=f(e,t);if(!h.startsWith("[object "))return h;if(t.__sentry_skip_normalization__)return t;if(0===n)return h.replace("object ","");if(d(t))return"[Circular ~]";var v=t;if(v&&"function"===typeof v.toJSON)try{var m=v.toJSON();return l("",m,n-1,s,u)}catch(x){}var y=Array.isArray(t)?[]:{},g=0,b=Object(a.b)(t);for(var k in b)if(Object.prototype.hasOwnProperty.call(b,k)){if(g>=s){y[k]="[MaxProperties ~]";break}var w=b[k];y[k]=l(k,w,n-1,s,u),g+=1}return p(t),y}function f(t,n){try{return"domain"===t&&n&&"object"===typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!==typeof e&&n===e?"[Global]":"undefined"!==typeof window&&n===window?"[Window]":"undefined"!==typeof document&&n===document?"[Document]":Object(o.m)(n)?"[SyntheticEvent]":"number"===typeof n&&n!==n?"[NaN]":void 0===n?"[undefined]":"function"===typeof n?"[Function: ".concat(Object(s.b)(n),"]"):"symbol"===typeof n?"[".concat(String(n),"]"):"bigint"===typeof n?"[BigInt: ".concat(String(n),"]"):"[object ".concat(Object.getPrototypeOf(n).constructor.name,"]")}catch(r){return"**non-serializable** (".concat(r,")")}}function d(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}}).call(this,n(21))}]);
3
3
  //# sourceMappingURL=comments-ui.min.js.map