5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-30 16:16:07 +00:00
panel/public/packs/js/application-fd20cd4c95f90c1a3ecd.js
2023-08-31 10:48:54 -03:00

3 lines
1.1 MiB (Stored with Git LFS)

/*! For license information please see application-fd20cd4c95f90c1a3ecd.js.LICENSE.txt */
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/packs/",n(n.s=479)}([function(t,e,n){var r=n(2),i=n(14).f,o=n(17),a=n(15),s=n(87),u=n(120),c=n(57);t.exports=function(t,e){var n,l,h,f,d,p=t.target,m=t.global,v=t.stat;if(n=m?r:v?r[p]||s(p,{}):(r[p]||{}).prototype)for(l in e){if(f=e[l],h=t.noTargetGet?(d=i(n,l))&&d.value:n[l],!c(m?l:p+(v?".":"#")+l,t.forced)&&void 0!==h){if(typeof f===typeof h)continue;u(f,h)}(t.sham||h&&h.sham)&&o(f,"sham",!0),a(n,l,f,t)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(68))},function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,n){var r=n(3);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(1);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){"use strict";function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=Object.prototype.hasOwnProperty;function o(t,e){return i.call(t,e)}function a(t){return!(t>=55296&&t<=57343)&&(!(t>=64976&&t<=65007)&&(65535!==(65535&t)&&65534!==(65535&t)&&(!(t>=0&&t<=8)&&(11!==t&&(!(t>=14&&t<=31)&&(!(t>=127&&t<=159)&&!(t>1114111)))))))}function s(t){if(t>65535){var e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}var u=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(u.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,h=n(167);var f=/[&<>"]/,d=/[&<>"]/g,p={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function m(t){return p[t]}var v=/[.?*+^$[\]\\(){}|-]/g;var g=n(113);e.lib={},e.lib.mdurl=n(168),e.lib.ucmicro=n(424),e.assign=function(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach((function(e){if(e){if("object"!==r(e))throw new TypeError(e+"must be object");Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t},e.isString=function(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)},e.has=o,e.unescapeMd=function(t){return t.indexOf("\\")<0?t:t.replace(u,"$1")},e.unescapeAll=function(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(c,(function(t,e,n){return e||function(t,e){var n=0;return o(h,e)?h[e]:35===e.charCodeAt(0)&&l.test(e)&&a(n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10))?s(n):t}(t,n)}))},e.isValidEntityCode=a,e.fromCodePoint=s,e.escapeHtml=function(t){return f.test(t)?t.replace(d,m):t},e.arrayReplaceAt=function(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))},e.isSpace=function(t){switch(t){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(t){return g.test(t)},e.escapeRE=function(t){return t.replace(v,"\\$&")},e.normalizeReference=function(t){return t=t.trim().replace(/\s+/g," "),"\u1e7e"==="\u1e9e".toLowerCase()&&(t=t.replace(/\u1e9e/g,"\xdf")),t.toLowerCase().toUpperCase()}},function(t,e,n){var r=n(2),i=n(90),o=n(12),a=n(54),s=n(94),u=n(123),c=i("wks"),l=r.Symbol,h=u?l:l&&l.withoutSetter||a;t.exports=function(t){return o(c,t)||(s&&o(l,t)?c[t]=l[t]:c[t]=h("Symbol."+t)),c[t]}},function(t,e,n){"use strict";var r,i=n(101),o=n(5),a=n(2),s=n(3),u=n(12),c=n(65),l=n(17),h=n(15),f=n(10).f,d=n(29),p=n(47),m=n(7),v=n(54),g=a.Int8Array,y=g&&g.prototype,b=a.Uint8ClampedArray,_=b&&b.prototype,w=g&&d(g),x=y&&d(y),k=Object.prototype,S=k.isPrototypeOf,C=m("toStringTag"),M=v("TYPED_ARRAY_TAG"),E=i&&!!p&&"Opera"!==c(a.opera),T=!1,A={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},O={BigInt64Array:8,BigUint64Array:8},P=function(t){if(!s(t))return!1;var e=c(t);return u(A,e)||u(O,e)};for(r in A)a[r]||(E=!1);if((!E||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},E))for(r in A)a[r]&&p(a[r],w);if((!E||!x||x===k)&&(x=w.prototype,E))for(r in A)a[r]&&p(a[r].prototype,x);if(E&&d(_)!==x&&p(_,x),o&&!u(x,C))for(r in T=!0,f(x,C,{get:function(){return s(this)?this[M]:void 0}}),A)a[r]&&l(a[r],M,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:E,TYPED_ARRAY_TAG:T&&M,aTypedArray:function(t){if(P(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(p){if(S.call(w,t))return t}else for(var e in A)if(u(A,r)){var n=a[e];if(n&&(t===n||S.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(o){if(n)for(var r in A){var i=a[r];i&&u(i.prototype,t)&&delete i.prototype[t]}x[t]&&!n||h(x,t,n?e:E&&y[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(o){if(p){if(n)for(r in A)(i=a[r])&&u(i,t)&&delete i[t];if(w[t]&&!n)return;try{return h(w,t,n?e:E&&g[t]||e)}catch(s){}}for(r in A)!(i=a[r])||i[t]&&!n||h(i,t,e)}},isView:function(t){if(!s(t))return!1;var e=c(t);return"DataView"===e||u(A,e)||u(O,e)},isTypedArray:P,TypedArray:w,TypedArrayPrototype:x}},function(t,e,n){var r=n(24),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(5),i=n(118),o=n(4),a=n(27),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return s(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(39),i=n(53),o=n(11),a=n(9),s=n(59),u=[].push,c=function(t){var e=1==t,n=2==t,c=3==t,l=4==t,h=6==t,f=7==t,d=5==t||h;return function(p,m,v,g){for(var y,b,_=o(p),w=i(_),x=r(m,v,3),k=a(w.length),S=0,C=g||s,M=e?C(p,k):n||f?C(p,0):void 0;k>S;S++)if((d||S in w)&&(b=x(y=w[S],S,_),t))if(e)M[S]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:u.call(M,y)}else switch(t){case 4:return!1;case 7:u.call(M,y)}return h?-1:c||l?l:M}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(t,e,n){var r=n(5),i=n(69),o=n(36),a=n(19),s=n(27),u=n(12),c=n(118),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=a(t),e=s(e,!0),c)try{return l(t,e)}catch(n){}if(u(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){var r=n(2),i=n(17),o=n(12),a=n(87),s=n(88),u=n(20),c=u.get,l=u.enforce,h=String(String).split("String");(t.exports=function(t,e,n,s){var u,c=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),(u=l(n)).source||(u.source=h.join("string"==typeof e?e:""))),t!==r?(c?!d&&t[e]&&(f=!0):delete t[e],f?t[e]=n:i(t,e,n)):f?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(5),i=n(10),o=n(36);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(5),i=n(1),o=n(12),a=Object.defineProperty,s={},u=function(t){throw t};t.exports=function(t,e){if(o(s,t))return s[t];e||(e={});var n=[][t],c=!!o(e,"ACCESSORS")&&e.ACCESSORS,l=o(e,0)?e[0]:u,h=o(e,1)?e[1]:void 0;return s[t]=!!n&&!i((function(){if(c&&!r)return!0;var t={length:-1};c?a(t,1,{enumerable:!0,get:u}):t[1]=1,n.call(t,l,h)}))}},function(t,e,n){var r=n(53),i=n(16);t.exports=function(t){return r(i(t))}},function(t,e,n){var r,i,o,a=n(119),s=n(2),u=n(3),c=n(17),l=n(12),h=n(89),f=n(70),d=n(55),p=s.WeakMap;if(a){var m=h.state||(h.state=new p),v=m.get,g=m.has,y=m.set;r=function(t,e){return e.facade=t,y.call(m,t,e),e},i=function(t){return v.call(m,t)||{}},o=function(t){return g.call(m,t)}}else{var b=f("state");d[b]=!0,r=function(t,e){return e.facade=t,c(t,b,e),e},i=function(t){return l(t,b)?t[b]:{}},o=function(t){return l(t,b)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(121),i=n(12),o=n(126),a=n(10).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},function(t,e,n){var r=n(16),i=/"/g;t.exports=function(t,e,n,o){var a=String(r(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(o).replace(i,"&quot;")+'"'),s+">"+a+"</"+e+">"}},function(t,e,n){var r=n(1);t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var r,i,o,a;function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a=function(t){"use strict";function e(t){var e,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(e in i=arguments[n])t[e]=i[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function r(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var r=n.call(arguments,2);return function(){return t.apply(e,r.length?r.concat(n.call(arguments)):arguments)}}var i=0;function o(t){return t._leaflet_id=t._leaflet_id||++i,t._leaflet_id}function a(t,e,n){var r,i,o,a;return a=function(){r=!1,i&&(o.apply(n,i),i=!1)},o=function(){r?i=arguments:(t.apply(n,arguments),setTimeout(a,e),r=!0)}}function u(t,e,n){var r=e[1],i=e[0],o=r-i;return t===r&&n?t:((t-i)%o+o)%o+i}function c(){return!1}function l(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function f(t){return h(t).split(/\s+/)}function d(t,e){for(var r in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[r]=e[r];return t.options}function p(t,e,n){var r=[];for(var i in t)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(t[i]));return(e&&-1!==e.indexOf("?")?"&":"?")+r.join("&")}var m=/\{ *([\w_-]+) *\}/g;function v(t,e){return t.replace(m,(function(t,n){var r=e[n];if(void 0===r)throw new Error("No value provided for variable "+t);return"function"===typeof r&&(r=r(e)),r}))}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function _(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var k=window.requestAnimationFrame||_("RequestAnimationFrame")||x,S=window.cancelAnimationFrame||_("CancelAnimationFrame")||_("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,n){if(!n||k!==x)return k.call(window,r(t,e));t.call(e)}function M(t){t&&S.call(window,t)}var E={extend:e,create:n,bind:r,lastId:i,stamp:o,throttle:a,wrapNum:u,falseFn:c,formatNum:l,trim:h,splitWords:f,setOptions:d,getParamString:p,template:v,isArray:g,indexOf:y,emptyImageUrl:b,requestFn:k,cancelFn:S,requestAnimFrame:C,cancelAnimFrame:M};function T(){}T.extend=function(t){var r=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=r.__super__=this.prototype,o=n(i);for(var a in o.constructor=r,r.prototype=o,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(r[a]=this[a]);return t.statics&&(e(r,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!==typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),e.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=e(n(o.options),t.options)),e(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},r},T.include=function(t){return e(this.prototype,t),this},T.mergeOptions=function(t){return e(this.prototype.options,t),this},T.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"===typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var A={on:function(t,e,n){if("object"===s(t))for(var r in t)this._on(r,t[r],e);else for(var i=0,o=(t=f(t)).length;i<o;i++)this._on(t[i],e,n);return this},off:function(t,e,n){if(t)if("object"===s(t))for(var r in t)this._off(r,t[r],e);else for(var i=0,o=(t=f(t)).length;i<o;i++)this._off(t[i],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var r=this._events[t];r||(r=[],this._events[t]=r),n===this&&(n=void 0);for(var i={fn:e,ctx:n},o=r,a=0,s=o.length;a<s;a++)if(o[a].fn===e&&o[a].ctx===n)return;o.push(i)},_off:function(t,e,n){var r,i,o;if(this._events&&(r=this._events[t]))if(e){if(n===this&&(n=void 0),r)for(i=0,o=r.length;i<o;i++){var a=r[i];if(a.ctx===n&&a.fn===e)return a.fn=c,this._firingCount&&(this._events[t]=r=r.slice()),void r.splice(i,1)}}else{for(i=0,o=r.length;i<o;i++)r[i].fn=c;delete this._events[t]}},fire:function(t,n,r){if(!this.listens(t,r))return this;var i=e({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,s=o.length;a<s;a++){var u=o[a];u.fn.call(u.ctx||this,i)}this._firingCount--}}return r&&this._propagateEvent(i),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"===s(t)){for(var i in t)this.once(i,t[i],e);return this}var o=r((function(){this.off(t,e,n).off(t,o,n)}),this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var O=T.extend(A);function P(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof P?t:g(t)?new P(t[0],t[1]):void 0===t||null===t?t:"object"===s(t)&&"x"in t&&"y"in t?new P(t.x,t.y):new P(t,e,n)}function R(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r<i;r++)this.extend(n[r])}function N(t,e){return!t||t instanceof R?t:new R(t,e)}function z(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r<i;r++)this.extend(n[r])}function j(t,e){return t instanceof z?t:new z(t,e)}function B(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function F(t,e,n){return t instanceof B?t:g(t)&&"object"!==s(t[0])?3===t.length?new B(t[0],t[1],t[2]):2===t.length?new B(t[0],t[1]):null:void 0===t||null===t?t:"object"===s(t)&&"lat"in t?new B(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new B(t,e,n)}P.prototype={clone:function(){return new P(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new P(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new P(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=D(this.x),this.y=D(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},R.prototype={extend:function(t){return t=I(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new P((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new P(this.min.x,this.max.y)},getTopRight:function(){return new P(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"===typeof t[0]||t instanceof P?I(t):N(t))instanceof R?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>=e.x&&r.x<=n.x,a=i.y>=e.y&&r.y<=n.y;return o&&a},overlaps:function(t){t=N(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>e.x&&r.x<n.x,a=i.y>e.y&&r.y<n.y;return o&&a},isValid:function(){return!(!this.min||!this.max)}},z.prototype={extend:function(t){var e,n,r=this._southWest,i=this._northEast;if(t instanceof B)e=t,n=t;else{if(!(t instanceof z))return t?this.extend(F(t)||j(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return r||i?(r.lat=Math.min(e.lat,r.lat),r.lng=Math.min(e.lng,r.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)):(this._southWest=new B(e.lat,e.lng),this._northEast=new B(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,r=Math.abs(e.lat-n.lat)*t,i=Math.abs(e.lng-n.lng)*t;return new z(new B(e.lat-r,e.lng-i),new B(n.lat+r,n.lng+i))},getCenter:function(){return new B((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new B(this.getNorth(),this.getWest())},getSouthEast:function(){return new B(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"===typeof t[0]||t instanceof B||"lat"in t?F(t):j(t);var e,n,r=this._southWest,i=this._northEast;return t instanceof z?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=r.lat&&n.lat<=i.lat&&e.lng>=r.lng&&n.lng<=i.lng},intersects:function(t){t=j(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>=e.lat&&r.lat<=n.lat,a=i.lng>=e.lng&&r.lng<=n.lng;return o&&a},overlaps:function(t){t=j(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>e.lat&&r.lat<n.lat,a=i.lng>e.lng&&r.lng<n.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},B.prototype={equals:function(t,e){return!!t&&(t=F(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,F(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return j([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new B(this.lat,this.lng,this.alt)}};var q,V={latLngToPoint:function(t,e){var n=this.projection.project(t),r=this.scale(e);return this.transformation._transform(n,r)},pointToLatLng:function(t,e){var n=this.scale(e),r=this.transformation.untransform(t,n);return this.projection.unproject(r)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new R(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?u(t.lng,this.wrapLng,!0):t.lng;return new B(this.wrapLat?u(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),r=e.lat-n.lat,i=e.lng-n.lng;if(0===r&&0===i)return t;var o=t.getSouthWest(),a=t.getNorthEast();return new z(new B(o.lat-r,o.lng-i),new B(a.lat-r,a.lng-i))}},U=e({},V,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,r=t.lat*n,i=e.lat*n,o=Math.sin((e.lat-t.lat)*n/2),a=Math.sin((e.lng-t.lng)*n/2),s=o*o+Math.cos(r)*Math.cos(i)*a*a,u=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*u}}),H=6378137,W={R:H,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,t.lat),-n),i=Math.sin(r*e);return new P(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new B((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(q=H*Math.PI,new R([-q,-q],[q,q]))};function $(t,e,n,r){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=r}function Z(t,e,n,r){return new $(t,e,n,r)}$.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new P((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Y=e({},U,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return Z(t,.5,-t,.5)}()}),G=e({},Y,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var n,r,i,o,a,s,u="";for(n=0,i=t.length;n<i;n++){for(r=0,o=(a=t[n]).length;r<o;r++)u+=(r?"L":"M")+(s=a[r]).x+" "+s.y;u+=e?At?"z":"x":""}return u||"M0 0"}var X=document.documentElement.style,Q="ActiveXObject"in window,tt=Q&&!document.addEventListener,et="msLaunchUri"in navigator&&!("documentMode"in document),nt=Pt("webkit"),rt=Pt("android"),it=Pt("android 2")||Pt("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=rt&&Pt("Google")&&ot<537&&!("AudioNode"in window),st=!!window.opera,ut=!et&&Pt("chrome"),ct=Pt("gecko")&&!nt&&!st&&!Q,lt=!ut&&Pt("safari"),ht=Pt("phantom"),ft="OTransition"in X,dt=0===navigator.platform.indexOf("Win"),pt=Q&&"transition"in X,mt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!it,vt="MozPerspective"in X,gt=!window.L_DISABLE_3D&&(pt||mt||vt)&&!ft&&!ht,yt="undefined"!==typeof orientation||Pt("mobile"),bt=yt&&nt,_t=yt&&mt,wt=!window.PointerEvent&&window.MSPointerEvent,xt=!(!window.PointerEvent&&!wt),kt=!window.L_NO_TOUCH&&(xt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),St=yt&&st,Ct=yt&&ct,Mt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Et=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,e),window.removeEventListener("testPassiveEventSupport",c,e)}catch(n){}return t}(),Tt=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!K("svg").createSVGRect),Ot=!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"===s(e.adj)}catch(n){return!1}}();function Pt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Lt={ie:Q,ielt9:tt,edge:et,webkit:nt,android:rt,android23:it,androidStock:at,opera:st,chrome:ut,gecko:ct,safari:lt,phantom:ht,opera12:ft,win:dt,ie3d:pt,webkit3d:mt,gecko3d:vt,any3d:gt,mobile:yt,mobileWebkit:bt,mobileWebkit3d:_t,msPointer:wt,pointer:xt,touch:kt,mobileOpera:St,mobileGecko:Ct,retina:Mt,passiveEvents:Et,canvas:Tt,svg:At,vml:Ot},Dt=wt?"MSPointerDown":"pointerdown",It=wt?"MSPointerMove":"pointermove",Rt=wt?"MSPointerUp":"pointerup",Nt=wt?"MSPointerCancel":"pointercancel",zt={},jt=!1;function Bt(t,e,n,i){return"touchstart"===e?function(t,e,n){var i=r((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ne(t),Ut(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Dt,i,!1),jt||(document.addEventListener(Dt,Ft,!0),document.addEventListener(It,qt,!0),document.addEventListener(Rt,Vt,!0),document.addEventListener(Nt,Vt,!0),jt=!0)}(t,n,i):"touchmove"===e?function(t,e,n){var r=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,e)};t["_leaflet_touchmove"+n]=r,t.addEventListener(It,r,!1)}(t,n,i):"touchend"===e&&function(t,e,n){var r=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=r,t.addEventListener(Rt,r,!1),t.addEventListener(Nt,r,!1)}(t,n,i),this}function Ft(t){zt[t.pointerId]=t}function qt(t){zt[t.pointerId]&&(zt[t.pointerId]=t)}function Vt(t){delete zt[t.pointerId]}function Ut(t,e){for(var n in t.touches=[],zt)t.touches.push(zt[n]);t.changedTouches=[t],e(t)}var Ht,Wt,$t,Zt,Yt,Gt=wt?"MSPointerDown":xt?"pointerdown":"touchstart",Kt=wt?"MSPointerUp":xt?"pointerup":"touchend",Jt="_leaflet_",Xt=pe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Qt=pe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),te="webkitTransition"===Qt||"OTransition"===Qt?Qt+"End":"transitionend";function ee(t){return"string"===typeof t?document.getElementById(t):t}function ne(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);n=r?r[e]:null}return"auto"===n?null:n}function re(t,e,n){var r=document.createElement(t);return r.className=e||"",n&&n.appendChild(r),r}function ie(t){var e=t.parentNode;e&&e.removeChild(t)}function oe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ae(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function se(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ue(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=fe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ce(t,e){if(void 0!==t.classList)for(var n=f(e),r=0,i=n.length;r<i;r++)t.classList.add(n[r]);else if(!ue(t,e)){var o=fe(t);he(t,(o?o+" ":"")+e)}}function le(t,e){void 0!==t.classList?t.classList.remove(e):he(t,h((" "+fe(t)+" ").replace(" "+e+" "," ")))}function he(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function fe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function de(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(r)}catch(i){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+r+"(opacity="+e+")"}(t,e)}function pe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function me(t,e,n){var r=e||new P(0,0);t.style[Xt]=(pt?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(n?" scale("+n+")":"")}function ve(t,e){t._leaflet_pos=e,gt?me(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ge(t){return t._leaflet_pos||new P(0,0)}if("onselectstart"in document)Ht=function(){Me(window,"selectstart",Ne)},Wt=function(){Te(window,"selectstart",Ne)};else{var ye=pe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ht=function(){if(ye){var t=document.documentElement.style;$t=t[ye],t[ye]="none"}},Wt=function(){ye&&(document.documentElement.style[ye]=$t,$t=void 0)}}function be(){Me(window,"dragstart",Ne)}function _e(){Te(window,"dragstart",Ne)}function we(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(xe(),Zt=t,Yt=t.style.outline,t.style.outline="none",Me(window,"keydown",xe))}function xe(){Zt&&(Zt.style.outline=Yt,Zt=void 0,Yt=void 0,Te(window,"keydown",xe))}function ke(t){do{t=t.parentNode}while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Se(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ce={TRANSFORM:Xt,TRANSITION:Qt,TRANSITION_END:te,get:ee,getStyle:ne,create:re,remove:ie,empty:oe,toFront:ae,toBack:se,hasClass:ue,addClass:ce,removeClass:le,setClass:he,getClass:fe,setOpacity:de,testProp:pe,setTransform:me,setPosition:ve,getPosition:ge,disableTextSelection:Ht,enableTextSelection:Wt,disableImageDrag:be,enableImageDrag:_e,preventOutline:we,restoreOutline:xe,getSizedParentNode:ke,getScale:Se};function Me(t,e,n,r){if("object"===s(e))for(var i in e)Pe(t,i,e[i],n);else for(var o=0,a=(e=f(e)).length;o<a;o++)Pe(t,e[o],n,r);return this}var Ee="_leaflet_events";function Te(t,e,n,r){if("object"===s(e))for(var i in e)Le(t,i,e[i],n);else if(e)for(var o=0,a=(e=f(e)).length;o<a;o++)Le(t,e[o],n,r);else{for(var u in t[Ee])Le(t,u,t[Ee][u]);delete t[Ee]}return this}function Ae(){if(xt)return!(et||lt)}var Oe={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Pe(t,e,n,r){var i=e+o(n)+(r?"_"+o(r):"");if(t[Ee]&&t[Ee][i])return this;var a=function(e){return n.call(r||t,e||window.event)},s=a;xt&&0===e.indexOf("touch")?Bt(t,e,a,i):kt&&"dblclick"===e&&!Ae()?function(t,e,n){var r,i,o=!1;function a(t){if(xt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(r||e);i=t.touches?t.touches[0]:t,o=n>0&&n<=250,r=e}function s(t){if(o&&!i.cancelBubble){if(xt){if("mouse"===t.pointerType)return;var n,a,s={};for(a in i)n=i[a],s[a]=n&&n.bind?n.bind(i):n;i=s}i.type="dblclick",i.button=0,e(i),r=null}}t[Jt+Gt+n]=a,t[Jt+Kt+n]=s,t[Jt+"dblclick"+n]=e,t.addEventListener(Gt,a,!!Et&&{passive:!1}),t.addEventListener(Kt,s,!!Et&&{passive:!1}),t.addEventListener("dblclick",e,!1)}(t,a,i):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Oe[e]||e,a,!!Et&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(a=function(e){e=e||window.event,He(t,e)&&s(e)},t.addEventListener(Oe[e],a,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,a),t[Ee]=t[Ee]||{},t[Ee][i]=a}function Le(t,e,n,r){var i=e+o(n)+(r?"_"+o(r):""),a=t[Ee]&&t[Ee][i];if(!a)return this;xt&&0===e.indexOf("touch")?function(t,e,n){var r=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(Dt,r,!1):"touchmove"===e?t.removeEventListener(It,r,!1):"touchend"===e&&(t.removeEventListener(Rt,r,!1),t.removeEventListener(Nt,r,!1))}(t,e,i):kt&&"dblclick"===e&&!Ae()?function(t,e){var n=t[Jt+Gt+e],r=t[Jt+Kt+e],i=t[Jt+"dblclick"+e];t.removeEventListener(Gt,n,!!Et&&{passive:!1}),t.removeEventListener(Kt,r,!!Et&&{passive:!1}),t.removeEventListener("dblclick",i,!1)}(t,i):"removeEventListener"in t?t.removeEventListener(Oe[e]||e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[Ee][i]=null}function De(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ue(t),this}function Ie(t){return Pe(t,"wheel",De),this}function Re(t){return Me(t,"mousedown touchstart dblclick",De),Pe(t,"click",Ve),this}function Ne(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function ze(t){return Ne(t),De(t),this}function je(t,e){if(!e)return new P(t.clientX,t.clientY);var n=Se(e),r=n.boundingClientRect;return new P((t.clientX-r.left)/n.x-e.clientLeft,(t.clientY-r.top)/n.y-e.clientTop)}var Be=dt&&ut?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Fe(t){return et?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Be:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var qe={};function Ve(t){qe[t.type]=!0}function Ue(t){var e=qe[t.type];return qe[t.type]=!1,e}function He(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(r){return!1}return n!==t}var We={on:Me,off:Te,stopPropagation:De,disableScrollPropagation:Ie,disableClickPropagation:Re,preventDefault:Ne,stop:ze,getMousePosition:je,getWheelDelta:Fe,fakeStop:Ve,skipped:Ue,isExternalTarget:He,addListener:Me,removeListener:Te},$e=O.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=ge(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ve(this._el,n),this.fire("step")},_complete:function(){M(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ze=O.extend({options:{crs:Y,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(F(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Qt&&gt&&!St&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Me(this._proxy,te,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,r){return n=void 0===n?this._zoom:this._limitZoom(n),t=this._limitCenter(F(t),n,this.options.maxBounds),r=r||{},this._stop(),this._loaded&&!r.reset&&!0!==r&&(void 0!==r.animate&&(r.zoom=e({animate:r.animate},r.zoom),r.pan=e({animate:r.animate,duration:r.duration},r.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,r.zoom):this._tryAnimatedPan(t,r.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,n),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(gt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(gt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var r=this.getZoomScale(e),i=this.getSize().divideBy(2),o=(t instanceof P?t:this.latLngToContainerPoint(t)).subtract(i).multiplyBy(1-1/r),a=this.containerPointToLatLng(i.add(o));return this.setView(a,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():j(t);var n=I(e.paddingTopLeft||e.padding||[0,0]),r=I(e.paddingBottomRight||e.padding||[0,0]),i=this.getBoundsZoom(t,!1,n.add(r));if((i="number"===typeof e.maxZoom?Math.min(e.maxZoom,i):i)===1/0)return{center:t.getCenter(),zoom:i};var o=r.subtract(n).divideBy(2),a=this.project(t.getSouthWest(),i),s=this.project(t.getNorthEast(),i);return{center:this.unproject(a.add(s).divideBy(2).add(o),i),zoom:i}},fitBounds:function(t,e){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=I(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new $e,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ce(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!gt)return this.setView(t,e,n);this._stop();var r=this.project(this.getCenter()),i=this.project(t),o=this.getSize(),a=this._zoom;t=F(t),e=void 0===e?a:e;var s=Math.max(o.x,o.y),u=s*this.getZoomScale(a,e),c=i.distanceTo(r)||1,l=1.42,h=2.0164;function f(t){var e=(u*u-s*s+(t?-1:1)*h*h*c*c)/(2*(t?u:s)*h*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=f(0);function v(t){return s*(p(m)*(d(e=m+l*t)/p(e))-d(m))/h;var e}var g=Date.now(),y=(f(1)-m)/l,b=n.duration?1e3*n.duration:1e3*y*.8;return this._moveStart(!0,n.noMoveStart),function n(){var o=(Date.now()-g)/b,u=function(t){return 1-Math.pow(1-t,1.5)}(o)*y;o<=1?(this._flyToFrame=C(n,this),this._move(this.unproject(r.add(i.subtract(r).multiplyBy(v(u)/c)),a),this.getScaleZoom(s/function(t){return s*(p(m)/p(m+l*t))}(u),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=j(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,j(t));return n.equals(r)||this.panTo(r,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),r=I(e.paddingBottomRight||e.padding||[0,0]),i=this.getCenter(),o=this.project(i),a=this.project(t),s=this.getPixelBounds(),u=s.getSize().divideBy(2),c=N([s.min.add(n),s.max.subtract(r)]);if(!c.contains(a)){this._enforcingBounds=!0;var l=o.subtract(a),h=I(a.x+l.x,a.y+l.y);(a.x<c.min.x||a.x>c.max.x)&&(h.x=o.x-l.x,l.x>0?h.x+=u.x-n.x:h.x-=u.x-r.x),(a.y<c.min.y||a.y>c.max.y)&&(h.y=o.y-l.y,l.y>0?h.y+=u.y-n.y:h.y-=u.y-r.y),this.panTo(this.unproject(h),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),o=n.divideBy(2).round(),a=i.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,i,t):navigator.geolocation.getCurrentPosition(n,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new B(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){var i=this.getBoundsZoom(n);this.setView(e,r.maxZoom?Math.min(i,r.maxZoom):i)}var o={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"===typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ie(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(M(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ie(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=re("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new z(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=j(t),n=I(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),u=this.getSize().subtract(n),c=N(this.project(s,r),this.project(a,r)).getSize(),l=gt?this.options.zoomSnap:1,h=u.x/c.x,f=u.y/c.y,d=e?Math.max(h,f):Math.min(h,f);return r=this.getScaleZoom(d,r),l&&(r=Math.round(r/(l/100))*(l/100),r=e?Math.ceil(r/l)*l:Math.floor(r/l)*l),Math.max(i,Math.min(o,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new P(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new R(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"===typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var r=n.zoom(t*n.scale(e));return isNaN(r)?1/0:r},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return je(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ee(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Me(e,"scroll",this._onScroll,this),this._containerId=o(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&gt,ce(t,"leaflet-container"+(kt?" leaflet-touch":"")+(Mt?" leaflet-retina":"")+(tt?" leaflet-oldie":"")+(lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ne(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ve(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ve(this._mapPane,new P(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,!1)._move(t,e)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return M(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ve(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[o(this._container)]=this;var e=t?Te:Me;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),gt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){M(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,r=[],i="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,s=!1;a;){if((n=this._targets[o(a)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(i&&!He(a,t))break;if(r.push(n),i)break}if(a===this._container)break;a=a.parentNode}return r.length||s||i||!He(a,t)||(r=[this]),r},_handleDOMEvent:function(t){if(this._loaded&&!Ue(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||we(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,r){if("click"===t.type){var i=e({},t);i.type="preclick",this._fireDOMEvent(i,i.type,r)}if(!t._stopped&&(r=(r||[]).concat(this._findEventTargets(t,n))).length){var o=r[0];"contextmenu"===n&&o.listens(n,!0)&&Ne(t);var a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=o.getLatLng&&(!o._radius||o._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?o.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var u=0;u<r.length;u++)if(r[u].fire(n,a,!0),a.originalEvent._stopped||!1===r[u].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,n))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ge(this._mapPane)||new P(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var r=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(r)},_latLngBoundsToNewLayerBounds:function(t,e,n){var r=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(r),this.project(t.getNorthWest(),e)._subtract(r),this.project(t.getSouthEast(),e)._subtract(r),this.project(t.getNorthEast(),e)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var r=this.project(t,e),i=this.getSize().divideBy(2),o=new R(r.subtract(i),r.add(i)),a=this._getBoundsOffset(o,n,e);return a.round().equals([0,0])?t:this.unproject(r.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),r=new R(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(r,e))},_getBoundsOffset:function(t,e,n){var r=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),i=r.min.subtract(t.min),o=r.max.subtract(t.max);return new P(this._rebound(i.x,-o.x),this._rebound(i.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),r=gt?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){le(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n))&&(this.panBy(n,e),!0)},_createAnimProxy:function(){var t=this._proxy=re("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=Xt,n=this._proxy.style[e];me(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ie(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();me(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),i=this._getCenterOffset(t)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i))&&(C((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),!0)},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&le(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),C((function(){this._moveEnd(!0)}),this))}}),Ye=T.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),r=t._controlCorners[n];return ce(e,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ie(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ge=function(t){return new Ye(t)};Ze.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=re("div",e+"control-container",this._container);function r(r,i){var o=e+r+" "+e+i;t[r+i]=re("div",o,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ie(this._controlCorners[t]);ie(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ke=Ye.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,r){return n<r?-1:r<n?1:0}},initialize:function(t,e,n){for(var r in d(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[r],r);for(r in e)this._addLayer(e[r],r,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Ye.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(o(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ce(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ce(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):le(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return le(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=re("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Re(e),Ie(e);var r=this._section=re("section",t+"-list");n&&(this._map.on("click",this.collapse,this),rt||Me(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var i=this._layersLink=re("a",t+"-toggle",e);i.href="#",i.title="Layers",kt?(Me(i,"click",ze),Me(i,"click",this.expand,this)):Me(i,"focus",this.expand,this),n||this.expand(),this._baseLayersList=re("div",t+"-base",r),this._separator=re("div",t+"-separator",r),this._overlaysList=re("div",t+"-overlays",r),e.appendChild(r)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&o(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(r((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;oe(this._baseLayersList),oe(this._overlaysList),this._layerControlInputs=[];var t,e,n,r,i=0;for(n=0;n<this._layers.length;n++)r=this._layers[n],this._addItem(r),e=e||r.overlay,t=t||!r.overlay,i+=r.overlay?0:1;return this.options.hideSingleBase&&(t=t&&i>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(t){var e,n=document.createElement("label"),r=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=r):e=this._createRadioElement("leaflet-base-layers_"+o(this),r),this._layerControlInputs.push(e),e.layerId=o(t.layer),Me(e,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+t.name;var a=document.createElement("div");return n.appendChild(a),a.appendChild(e),a.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?r.push(e):t.checked||i.push(e);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])&&this._map.removeLayer(i[o]);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])||this._map.addLayer(r[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,r=this._map.getZoom(),i=n.length-1;i>=0;i--)t=n[i],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&r<e.options.minZoom||void 0!==e.options.maxZoom&&r>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Je=Ye.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=re("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,r,i){var o=re("a",n,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Re(o),Me(o,"click",ze),Me(o,"click",i,this),Me(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";le(this._zoomInButton,e),le(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ce(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ce(this._zoomInButton,e)}});Ze.mergeOptions({zoomControl:!0}),Ze.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Je,this.addControl(this.zoomControl))}));var Xe=Ye.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=re("div",e),r=this.options;return this._addScales(r,e+"-line",n),t.on(r.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=re("div",e,n)),t.imperial&&(this._iScale=re("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,r,i=3.2808399*t;i>5280?(e=i/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" ft",r/i))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Qe=Ye.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=re("div","leaflet-control-attribution"),Re(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Ze.mergeOptions({attributionControl:!0}),Ze.addInitHook((function(){this.options.attributionControl&&(new Qe).addTo(this)})),Ye.Layers=Ke,Ye.Zoom=Je,Ye.Scale=Xe,Ye.Attribution=Qe,Ge.layers=function(t,e,n){return new Ke(t,e,n)},Ge.zoom=function(t){return new Je(t)},Ge.scale=function(t){return new Xe(t)},Ge.attribution=function(t){return new Qe(t)};var tn=T.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});tn.addTo=function(t,e){return t.addHandler(e,this),this};var en,nn={Events:A},rn=kt?"touchstart mousedown":"mousedown",on={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},an={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},sn=O.extend({options:{clickTolerance:3},initialize:function(t,e,n,r){d(this,r),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Me(this._dragStartTarget,rn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(sn._dragging===this&&this.finishDrag(),Te(this._dragStartTarget,rn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ue(this._element,"leaflet-zoom-anim")&&!(sn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches)&&(sn._dragging=this,this._preventOutline&&we(this._element),be(),Ht(),!this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=ke(this._element);this._startPoint=new P(e.clientX,e.clientY),this._parentScale=Se(n),Me(document,an[t.type],this._onMove,this),Me(document,on[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new P(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Ne(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ge(this._element).subtract(n),ce(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ce(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,M(this._animRequest),this._lastEvent=t,this._animRequest=C(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ve(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in le(document.body,"leaflet-dragging"),this._lastTarget&&(le(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),an)Te(document,an[t],this._onMove,this),Te(document,on[t],this._onUp,this);_e(),Wt(),this._moved&&this._moving&&(M(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,sn._dragging=!1}});function un(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=function(t,e){var n=t.length,r=new(("undefined"===typeof Uint8Array?"undefined":s(Uint8Array))!==void 0+""?Uint8Array:Array)(n);r[0]=r[n-1]=1,ln(t,r,e,0,n-1);var i,o=[];for(i=0;i<n;i++)r[i]&&o.push(t[i]);return o}(t=function(t,e){for(var n=[t[0]],r=1,i=0,o=t.length;r<o;r++)pn(t[r],t[i])>e&&(n.push(t[r]),i=r);return i<o-1&&n.push(t[o-1]),n}(t,n),n)}function cn(t,e,n){return Math.sqrt(mn(t,e,n,!0))}function ln(t,e,n,r,i){var o,a,s,u=0;for(a=r+1;a<=i-1;a++)(s=mn(t[a],t[r],t[i],!0))>u&&(o=a,u=s);u>n&&(e[o]=1,ln(t,e,n,r,o),ln(t,e,n,o,i))}function hn(t,e,n,r,i){var o,a,s,u=r?en:dn(t,n),c=dn(e,n);for(en=c;;){if(!(u|c))return[t,e];if(u&c)return!1;s=dn(a=fn(t,e,o=u||c,n,i),n),o===u?(t=a,u=s):(e=a,c=s)}}function fn(t,e,n,r,i){var o,a,s=e.x-t.x,u=e.y-t.y,c=r.min,l=r.max;return 8&n?(o=t.x+s*(l.y-t.y)/u,a=l.y):4&n?(o=t.x+s*(c.y-t.y)/u,a=c.y):2&n?(o=l.x,a=t.y+u*(l.x-t.x)/s):1&n&&(o=c.x,a=t.y+u*(c.x-t.x)/s),new P(o,a,i)}function dn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function pn(t,e){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function mn(t,e,n,r){var i,o=e.x,a=e.y,s=n.x-o,u=n.y-a,c=s*s+u*u;return c>0&&((i=((t.x-o)*s+(t.y-a)*u)/c)>1?(o=n.x,a=n.y):i>0&&(o+=s*i,a+=u*i)),s=t.x-o,u=t.y-a,r?s*s+u*u:new P(o,a)}function vn(t){return!g(t[0])||"object"!==s(t[0][0])&&"undefined"!==typeof t[0][0]}function gn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),vn(t)}var yn={simplify:un,pointToSegmentDistance:cn,closestPointOnSegment:function(t,e,n){return mn(t,e,n)},clipSegment:hn,_getEdgeIntersection:fn,_getBitCode:dn,_sqClosestPointOnSegment:mn,isFlat:vn,_flat:gn};function bn(t,e,n){var r,i,o,a,s,u,c,l,h,f=[1,4,2,8];for(i=0,c=t.length;i<c;i++)t[i]._code=dn(t[i],e);for(a=0;a<4;a++){for(l=f[a],r=[],i=0,o=(c=t.length)-1;i<c;o=i++)s=t[i],u=t[o],s._code&l?u._code&l||((h=fn(u,s,l,e,n))._code=dn(h,e),r.push(h)):(u._code&l&&((h=fn(u,s,l,e,n))._code=dn(h,e),r.push(h)),r.push(s));t=r}return t}var _n={clipPolygon:bn},wn={project:function(t){return new P(t.lng,t.lat)},unproject:function(t){return new B(t.y,t.x)},bounds:new R([-180,-90],[180,90])},xn={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,r=t.lat*e,i=this.R_MINOR/n,o=Math.sqrt(1-i*i),a=o*Math.sin(r),s=Math.tan(Math.PI/4-r/2)/Math.pow((1-a)/(1+a),o/2);return r=-n*Math.log(Math.max(s,1e-10)),new P(t.lng*e*n,r)},unproject:function(t){for(var e,n=180/Math.PI,r=this.R,i=this.R_MINOR/r,o=Math.sqrt(1-i*i),a=Math.exp(-t.y/r),s=Math.PI/2-2*Math.atan(a),u=0,c=.1;u<15&&Math.abs(c)>1e-7;u++)e=o*Math.sin(s),e=Math.pow((1-e)/(1+e),o/2),s+=c=Math.PI/2-2*Math.atan(a*e)-s;return new B(s*n,t.x*n/r)}},kn={LonLat:wn,Mercator:xn,SphericalMercator:W},Sn=e({},U,{code:"EPSG:3395",projection:xn,transformation:function(){var t=.5/(Math.PI*xn.R);return Z(t,.5,-t,.5)}()}),Cn=e({},U,{code:"EPSG:4326",projection:wn,transformation:Z(1/180,1,-1/180,.5)}),Mn=e({},V,{projection:wn,transformation:Z(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,r=e.lat-t.lat;return Math.sqrt(n*n+r*r)},infinite:!0});V.Earth=U,V.EPSG3395=Sn,V.EPSG3857=Y,V.EPSG900913=G,V.EPSG4326=Cn,V.Simple=Mn;var En=O.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ze.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=o(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=o(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&o(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=o(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var r in this._zoomBoundLayers){var i=this._zoomBoundLayers[r].options;t=void 0===i.minZoom?t:Math.min(t,i.minZoom),e=void 0===i.maxZoom?e:Math.max(e,i.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Tn=En.extend({initialize:function(t,e){var n,r;if(d(this,e),this._layers={},t)for(n=0,r=t.length;n<r;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&("number"===typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,r=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,r);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o(t)}}),An=Tn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Tn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Tn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new z;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),On=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(r,t),r},_setIconStyles:function(t,e){var n=this.options,r=n[e+"Size"];"number"===typeof r&&(r=[r,r]);var i=I(r),o=I("shadow"===e&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),i&&(t.style.width=i.x+"px",t.style.height=i.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Mt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Pn=On.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Pn.imagePath||(Pn.imagePath=this._detectIconPath()),(this.options.imagePath||Pn.imagePath)+On.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=re("div","leaflet-default-icon-path",document.body),e=ne(t,"background-image")||ne(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ln=tn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new sn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ce(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&le(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,r=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,o=ge(e._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),u=N(a.min._subtract(s).add(i),a.max._subtract(s).subtract(i));if(!u.contains(o)){var c=I((Math.max(u.max.x,o.x)-u.max.x)/(a.max.x-u.max.x)-(Math.min(u.min.x,o.x)-u.min.x)/(a.min.x-u.min.x),(Math.max(u.max.y,o.y)-u.max.y)/(a.max.y-u.max.y)-(Math.min(u.min.y,o.y)-u.min.y)/(a.min.y-u.min.y)).multiplyBy(r);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),ve(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(M(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,r=ge(e._icon),i=e._map.layerPointToLatLng(r);n&&ve(n,r),e._latlng=i,t.latlng=i,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){M(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Dn=En.extend({options:{icon:new Pn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=F(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),ce(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var i=t.icon.createShadow(this._shadow),o=!1;i!==this._shadow&&(this._removeShadow(),o=!0),i&&(ce(i,e),i.alt=""),this._shadow=i,t.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ie(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ie(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ve(this._icon,t),this._shadow&&ve(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ce(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ln)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ln(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&de(this._icon,t),this._shadow&&de(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),In=En.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Rn=In.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=F(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return In.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),r=[t+n,e+n];this._pxBounds=new R(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Nn=Rn.extend({initialize:function(t,n,r){if("number"===typeof n&&(n=e({},r,{radius:n})),d(this,n),this._latlng=F(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new z(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:In.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,r=n.options.crs;if(r.distance===U.distance){var i=Math.PI/180,o=this._mRadius/U.R/i,a=n.project([e+o,t]),s=n.project([e-o,t]),u=a.add(s).divideBy(2),c=n.unproject(u).lat,l=Math.acos((Math.cos(o*i)-Math.sin(e*i)*Math.sin(c*i))/(Math.cos(e*i)*Math.cos(c*i)))/i;(isNaN(l)||0===l)&&(l=o/Math.cos(Math.PI/180*e)),this._point=u.subtract(n.getPixelOrigin()),this._radius=isNaN(l)?0:u.x-n.project([c,t-l]).x,this._radiusY=u.y-a.y}else{var h=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}}),zn=In.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,r=1/0,i=null,o=mn,a=0,s=this._parts.length;a<s;a++)for(var u=this._parts[a],c=1,l=u.length;c<l;c++){var h=o(t,e=u[c-1],n=u[c],!0);h<r&&(r=h,i=o(t,e,n))}return i&&(i.distance=Math.sqrt(r)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,r,i,o,a,s=this._rings[0],u=s.length;if(!u)return null;for(t=0,e=0;t<u-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,r=0;t<u-1;t++)if(i=s[t],o=s[t+1],(r+=n=i.distanceTo(o))>e)return a=(r-e)/n,this._map.layerPointToLatLng([o.x-a*(o.x-i.x),o.y-a*(o.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=F(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new z,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return vn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=vn(t),r=0,i=t.length;r<i;r++)n?(e[r]=F(t[r]),this._bounds.extend(e[r])):e[r]=this._convertLatLngs(t[r]);return e},_project:function(){var t=new R;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new P(t,t);this._pxBounds=new R([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var r,i,o=t[0]instanceof B,a=t.length;if(o){for(i=[],r=0;r<a;r++)i[r]=this._map.latLngToLayerPoint(t[r]),n.extend(i[r]);e.push(i)}else for(r=0;r<a;r++)this._projectLatlngs(t[r],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,r,i,o,a,s,u=this._parts;for(e=0,r=0,i=this._rings.length;e<i;e++)for(n=0,o=(s=this._rings[e]).length;n<o-1;n++)(a=hn(s[n],s[n+1],t,n,!0))&&(u[r]=u[r]||[],u[r].push(a[0]),a[1]===s[n+1]&&n!==o-2||(u[r].push(a[1]),r++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,r=t.length;n<r;n++)t[n]=un(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,r,i,o,a,s,u=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,o=this._parts.length;n<o;n++)for(r=0,i=(a=(s=this._parts[n]).length)-1;r<a;i=r++)if((e||0!==r)&&cn(t,s[i],s[r])<=u)return!0;return!1}});zn._flat=gn;var jn=zn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,r,i,o,a,s,u,c=this._rings[0],l=c.length;if(!l)return null;for(o=a=s=0,t=0,e=l-1;t<l;e=t++)n=c[t],r=c[e],i=n.y*r.x-r.y*n.x,a+=(n.x+r.x)*i,s+=(n.y+r.y)*i,o+=3*i;return u=0===o?c[0]:[a/o,s/o],this._map.layerPointToLatLng(u)},_convertLatLngs:function(t){var e=zn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof B&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){zn.prototype._setLatLngs.call(this,t),vn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return vn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new P(e,e);if(t=new R(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var r,i=0,o=this._rings.length;i<o;i++)(r=bn(this._rings[i],t,!0)).length&&this._parts.push(r)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,r,i,o,a,s,u,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(o=0,a=(u=(e=this._parts[i]).length)-1;o<u;a=o++)n=e[o],r=e[a],n.y>t.y!==r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(c=!c);return c||zn.prototype._containsPoint.call(this,t,!0)}}),Bn=An.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,r,i=g(t)?t:t.features;if(i){for(e=0,n=i.length;e<n;e++)((r=i[e]).geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=Fn(t,o);return a?(a.feature=Zn(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"===typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Fn(t,e){var n,r,i,o,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,u=[],c=e&&e.pointToLayer,l=e&&e.coordsToLatLng||Vn;if(!s&&!a)return null;switch(a.type){case"Point":return qn(c,t,n=l(s),e);case"MultiPoint":for(i=0,o=s.length;i<o;i++)n=l(s[i]),u.push(qn(c,t,n,e));return new An(u);case"LineString":case"MultiLineString":return r=Un(s,"LineString"===a.type?0:1,l),new zn(r,e);case"Polygon":case"MultiPolygon":return r=Un(s,"Polygon"===a.type?1:2,l),new jn(r,e);case"GeometryCollection":for(i=0,o=a.geometries.length;i<o;i++){var h=Fn({geometry:a.geometries[i],type:"Feature",properties:t.properties},e);h&&u.push(h)}return new An(u);default:throw new Error("Invalid GeoJSON object.")}}function qn(t,e,n,r){return t?t(e,n):new Dn(n,r&&r.markersInheritOptions&&r)}function Vn(t){return new B(t[1],t[0],t[2])}function Un(t,e,n){for(var r,i=[],o=0,a=t.length;o<a;o++)r=e?Un(t[o],e-1,n):(n||Vn)(t[o]),i.push(r);return i}function Hn(t,e){return e="number"===typeof e?e:6,void 0!==t.alt?[l(t.lng,e),l(t.lat,e),l(t.alt,e)]:[l(t.lng,e),l(t.lat,e)]}function Wn(t,e,n,r){for(var i=[],o=0,a=t.length;o<a;o++)i.push(e?Wn(t[o],e-1,n,r):Hn(t[o],r));return!e&&n&&i.push(i[0]),i}function $n(t,n){return t.feature?e({},t.feature,{geometry:n}):Zn(n)}function Zn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Yn={toGeoJSON:function(t){return $n(this,{type:"Point",coordinates:Hn(this.getLatLng(),t)})}};function Gn(t,e){return new Bn(t,e)}Dn.include(Yn),Nn.include(Yn),Rn.include(Yn),zn.include({toGeoJSON:function(t){var e=!vn(this._latlngs);return $n(this,{type:(e?"Multi":"")+"LineString",coordinates:Wn(this._latlngs,e?1:0,!1,t)})}}),jn.include({toGeoJSON:function(t){var e=!vn(this._latlngs),n=e&&!vn(this._latlngs[0]),r=Wn(this._latlngs,n?2:e?1:0,!0,t);return e||(r=[r]),$n(this,{type:(n?"Multi":"")+"Polygon",coordinates:r})}}),Tn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),$n(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,r=[];return this.eachLayer((function(e){if(e.toGeoJSON){var i=e.toGeoJSON(t);if(n)r.push(i.geometry);else{var o=Zn(i);"FeatureCollection"===o.type?r.push.apply(r,o.features):r.push(o)}}})),n?$n(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});var Kn=Gn,Jn=En.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=j(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ie(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ae(this._image),this},bringToBack:function(){return this._map&&se(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:re("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onload=r(this.fire,this,"load"),e.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;me(this._image,n,e)},_reset:function(){var t=this._image,e=new R(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ve(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){de(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Xn=Jn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:re("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onloadeddata=r(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=n.length>0?i:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var a=0;a<this._url.length;a++){var s=re("source");s.src=this._url[a],e.appendChild(s)}}}}),Qn=Jn.extend({_initImage:function(){var t=this._image=this._url;ce(t,"leaflet-image-layer"),this._zoomAnimated&&ce(t,"leaflet-zoom-animated"),this.options.className&&ce(t,this.options.className),t.onselectstart=c,t.onmousemove=c}}),tr=En.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&de(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&de(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(de(this._container,0),this._removeTimeout=setTimeout(r(ie,void 0,this._container),200)):ie(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=F(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ae(this._container),this},bringToBack:function(){return this._map&&se(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof En||(n=e,e=t),e instanceof An)for(var r in t._layers){e=t._layers[r];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"===typeof this._content?this._content(this._source||this):this._content;if("string"===typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),n=this._getAnchor();this._zoomAnimated?ve(this._container,t.add(n)):e=e.add(t).add(n);var r=this._containerBottom=-e.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=r+"px",this._container.style.left=i+"px"}},_getAnchor:function(){return[0,0]}}),er=tr.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){tr.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof In||this._source.on("preclick",De))},onRemove:function(t){tr.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof In||this._source.off("preclick",De))},getEvents:function(){var t=tr.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=re("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=re("div",t+"-content-wrapper",e);if(this._contentNode=re("div",t+"-content",n),Re(e),Ie(this._contentNode),Me(e,"contextmenu",De),this._tipContainer=re("div",t+"-tip-container",e),this._tip=re("div",t+"-tip",this._tipContainer),this.options.closeButton){var r=this._closeButton=re("a",t+"-close-button",e);r.href="#close",r.innerHTML="&#215;",Me(r,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var r=t.offsetHeight,i=this.options.maxHeight,o="leaflet-popup-scrolled";i&&r>i?(e.height=i+"px",ce(t,o)):le(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ve(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ne(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,r=this._containerWidth,i=new P(this._containerLeft,-n-this._containerBottom);i._add(ge(this._container));var o=t.layerPointToContainerPoint(i),a=I(this.options.autoPanPadding),s=I(this.options.autoPanPaddingTopLeft||a),u=I(this.options.autoPanPaddingBottomRight||a),c=t.getSize(),l=0,h=0;o.x+r+u.x>c.x&&(l=o.x+r-c.x+u.x),o.x-l-s.x<0&&(l=o.x-s.x),o.y+n+u.y>c.y&&(h=o.y+n-c.y+u.y),o.y-h-s.y<0&&(h=o.y-s.y),(l||h)&&t.fire("autopanstart").panBy([l,h])}},_onCloseButtonClick:function(t){this._close(),ze(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ze.mergeOptions({closePopupOnClick:!0}),Ze.include({openPopup:function(t,e,n){return t instanceof er||(t=new er(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),En.include({bindPopup:function(t,e){return t instanceof er?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new er(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(ze(t),e instanceof In?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var nr=tr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){tr.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){tr.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=tr.prototype.getEvents.call(this);return kt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=re("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,r=this._map,i=this._container,o=r.latLngToContainerPoint(r.getCenter()),a=r.layerPointToContainerPoint(t),s=this.options.direction,u=i.offsetWidth,c=i.offsetHeight,l=I(this.options.offset),h=this._getAnchor();"top"===s?(e=u/2,n=c):"bottom"===s?(e=u/2,n=0):"center"===s?(e=u/2,n=c/2):"right"===s?(e=0,n=c/2):"left"===s?(e=u,n=c/2):a.x<o.x?(s="right",e=0,n=c/2):(s="left",e=u+2*(l.x+h.x),n=c/2),t=t.subtract(I(e,n,!0)).add(l).add(h),le(i,"leaflet-tooltip-right"),le(i,"leaflet-tooltip-left"),le(i,"leaflet-tooltip-top"),le(i,"leaflet-tooltip-bottom"),ce(i,"leaflet-tooltip-"+s),ve(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&de(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ze.include({openTooltip:function(t,e,n){return t instanceof nr||(t=new nr(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),En.include({bindTooltip:function(t,e){return t instanceof nr?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new nr(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),kt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ce(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(le(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,r=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),r=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(r)}});var rr=On.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(oe(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var r=I(n.bgPos);e.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});On.Default=Pn;var ir=En.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ie(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ae(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(se(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof P?t:new P(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,r=-t(-1/0,1/0),i=0,o=n.length;i<o;i++)e=n[i].style.zIndex,n[i]!==this._container&&e&&(r=t(r,+e));isFinite(r)&&(this.options.zIndex=r+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!tt){de(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var r in this._tiles){var i=this._tiles[r];if(i.current&&i.loaded){var o=Math.min(1,(t-i.loaded)/200);de(i.el,o),o<1?e=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(M(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=re("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ie(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[t],i=this._map;return r||((r=this._levels[t]={}).el=re("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=e,r.origin=i.project(i.unproject(i.getPixelOrigin()),t).round(),r.zoom=t,this._setZoomTransform(r,i.getCenter(),i.getZoom()),r.el.offsetWidth,this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var r=e.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ie(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,r){var i=Math.floor(t/2),o=Math.floor(e/2),a=n-1,s=new P(+i,+o);s.z=+a;var u=this._tileCoordsToKey(s),c=this._tiles[u];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),a>r&&this._retainParent(i,o,a,r))},_retainChildren:function(t,e,n,r){for(var i=2*t;i<2*t+2;i++)for(var o=2*e;o<2*e+2;o++){var a=new P(i,o);a.z=n+1;var s=this._tileCoordsToKey(a),u=this._tiles[s];u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n+1<r&&this._retainChildren(i,o,n+1,r))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,r){var i=Math.round(e);i=void 0!==this.options.maxZoom&&i>this.options.maxZoom||void 0!==this.options.minZoom&&i<this.options.minZoom?void 0:this._clampZoom(i);var o=this.options.updateWhenZooming&&i!==this._tileZoom;r&&!o||(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==i&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var r=this._map.getZoomScale(n,t.zoom),i=t.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(e,n)).round();gt?me(t.el,i,r):ve(t.el,i)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],r).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],r).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],r).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],r).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),r=e.getZoomScale(n,this._tileZoom),i=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*r);return new R(i.subtract(o),i.add(o))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(t),i=this._pxBoundsToTileRange(r),o=i.getCenter(),a=[],s=this.options.keepBuffer,u=new R(i.getBottomLeft().subtract([s,-s]),i.getTopRight().add([s,-s]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var l=this._tiles[c].coords;l.z===this._tileZoom&&u.contains(new P(l.x,l.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=i.min.y;h<=i.max.y;h++)for(var f=i.min.x;f<=i.max.x;f++){var d=new P(f,h);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:a.push(d)}}if(a.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(f=0;f<a.length;f++)this._addTile(a[f],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),r=t.scaleBy(n),i=r.add(n);return[e.unproject(r,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new z(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new P(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ie(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,tt&&this.options.opacity<1&&de(t,this.options.opacity),rt&&!it&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&C(r(this._tileReady,this,t,null,o)),ve(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(de(n.el,0),M(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ce(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),tt||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new P(this._wrapX?u(t.x,this._wrapX):t.x,this._wrapY?u(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new R(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),or=ir.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Mt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"===typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),rt||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Me(n,"load",r(this._tileOnLoad,this,e,n)),Me(n,"error",r(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var n={r:Mt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=r),n["-y"]=r}return v(this._url,e(n,this.options))},_tileOnLoad:function(t,e){tt?setTimeout(r(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var r=this.options.errorTileUrl;r&&e.getAttribute("src")!==r&&(e.src=r),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,e.complete||(e.src=b,ie(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",b),ir.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==b))return ir.prototype._tileReady.call(this,t,e,n)}});function ar(t,e){return new or(t,e)}var sr=or.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var r=e({},this.defaultWmsParams);for(var i in n)i in this.options||(r[i]=n[i]);var o=(n=d(this,n)).detectRetina&&Mt?2:1,a=this.getTileSize();r.width=a.x*o,r.height=a.y*o,this.wmsParams=r},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,or.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,r=N(n.project(e[0]),n.project(e[1])),i=r.min,o=r.max,a=(this._wmsVersion>=1.3&&this._crs===Cn?[i.y,i.x,o.y,o.x]:[i.x,i.y,o.x,o.y]).join(","),s=or.prototype.getTileUrl.call(this,t);return s+p(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,n){return e(this.wmsParams,t),n||this.redraw(),this}});or.WMS=sr,ar.wms=function(t,e){return new sr(t,e)};var ur=En.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ce(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),r=ge(this._container),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e).subtract(o),s=i.multiplyBy(-n).add(r).add(i).subtract(a);gt?me(this._container,s,n):ve(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new R(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),cr=ur.extend({getEvents:function(){var t=ur.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ur.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Me(t,"mousemove",this._onMouseMove,this),Me(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Me(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){M(this._redrawRequest),delete this._ctx,ie(this._container),Te(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ur.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),r=Mt?2:1;ve(e,t.min),e.width=r*n.x,e.height=r*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Mt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ur.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,r=e.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete t._order,delete this._layers[o(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"===typeof t.options.dashArray){var e,n,r=t.options.dashArray.split(/[, ]+/),i=[];for(n=0;n<r.length;n++){if(e=Number(r[n]),isNaN(e))return;i.push(e)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new R,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)t=r.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,r,i,o,a=t._parts,s=a.length,u=this._ctx;if(s){for(u.beginPath(),n=0;n<s;n++){for(r=0,i=a[n].length;r<i;r++)o=a[n][r],u[r?"lineTo":"moveTo"](o.x,o.y);e&&u.closePath()}this._fillStroke(u,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,r=Math.max(Math.round(t._radius),1),i=(Math.max(Math.round(t._radiusY),1)||r)/r;1!==i&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(e.x,e.y/i,r,0,2*Math.PI,!1),1!==i&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,r=this._map.mouseEventToLayerPoint(t),i=this._drawFirst;i;i=i.next)(e=i.layer).options.interactive&&e._containsPoint(r)&&("click"!==t.type&&"preclick"===t.type||!this._map._draggableMoved(e))&&(n=e);n&&(Ve(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(le(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(ce(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(r((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,r=e.prev;n&&(n.prev=r,r?r.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,r=e.prev;r&&(r.next=n,n?n.prev=r:r&&(this._drawLast=r),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function lr(t){return Tt?new cr(t):null}var hr=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),fr={_initContainer:function(){this._container=re("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ur.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hr("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hr("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ie(e),t.removeInteractiveTarget(e),delete this._layers[o(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,r=t.options,i=t._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(e||(e=t._stroke=hr("stroke")),i.appendChild(e),e.weight=r.weight+"px",e.color=r.color,e.opacity=r.opacity,r.dashArray?e.dashStyle=g(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=r.lineCap.replace("butt","flat"),e.joinstyle=r.lineJoin):e&&(i.removeChild(e),t._stroke=null),r.fill?(n||(n=t._fill=hr("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),r=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+r+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ae(t._container)},_bringToBack:function(t){se(t._container)}},dr=Ot?hr:K,pr=ur.extend({getEvents:function(){var t=ur.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ie(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){ur.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ve(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=dr("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ie(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),r="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",i=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(t,i)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ae(t._path)},_bringToBack:function(t){se(t._path)}});function mr(t){return At||Ot?new pr(t):null}Ot&&pr.include(fr),Ze.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&lr(t)||mr(t)}});var vr=jn.extend({initialize:function(t,e){jn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pr.create=dr,pr.pointsToPath=J,Bn.geometryToLayer=Fn,Bn.coordsToLatLng=Vn,Bn.coordsToLatLngs=Un,Bn.latLngToCoords=Hn,Bn.latLngsToCoords=Wn,Bn.getFeature=$n,Bn.asFeature=Zn,Ze.mergeOptions({boxZoom:!0});var gr=tn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ie(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Ht(),be(),this._startPoint=this._map.mouseEventToContainerPoint(t),Me(document,{contextmenu:ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=re("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new R(this._point,this._startPoint),n=e.getSize();ve(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ie(this._box),le(this._container,"leaflet-crosshair")),Wt(),_e(),Te(document,{contextmenu:ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var e=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ze.addInitHook("addHandler","boxZoom",gr),Ze.mergeOptions({doubleClickZoom:!0});var yr=tn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),r=e.options.zoomDelta,i=t.originalEvent.shiftKey?n-r:n+r;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});Ze.addInitHook("addHandler","doubleClickZoom",yr),Ze.mergeOptions({dragging:!0,inertia:!it,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var br=tn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new sn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){le(this._map._container,"leaflet-grab"),le(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=j(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-e+n)%t+e-n,o=(r+e+n)%t-e-n,a=Math.abs(i+n)<Math.abs(o+n)?i:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,n=e.options,r=!n.inertia||this._times.length<2;if(e.fire("dragend",t),r)e.fire("moveend");else{this._prunePositions(+new Date);var i=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=i.multiplyBy(a/o),u=s.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,u),l=s.multiplyBy(c/u),h=c/(n.inertiaDeceleration*a),f=l.multiplyBy(-h/2).round();f.x||f.y?(f=e._limitOffset(f,e.options.maxBounds),C((function(){e.panBy(f,{duration:h,easeLinearity:a,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});Ze.addInitHook("addHandler","dragging",br),Ze.mergeOptions({keyboard:!0,keyboardPanDelta:80});var _r=tn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Me(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Te(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,r=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(r,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,r=this._panKeys={},i=this.keyCodes;for(e=0,n=i.left.length;e<n;e++)r[i.left[e]]=[-1*t,0];for(e=0,n=i.right.length;e<n;e++)r[i.right[e]]=[t,0];for(e=0,n=i.down.length;e<n;e++)r[i.down[e]]=[0,t];for(e=0,n=i.up.length;e<n;e++)r[i.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,r=this._zoomKeys={},i=this.keyCodes;for(e=0,n=i.zoomIn.length;e<n;e++)r[i.zoomIn[e]]=t;for(e=0,n=i.zoomOut.length;e<n;e++)r[i.zoomOut[e]]=-t},_addHooks:function(){Me(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Te(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,r=this._map;if(n in this._panKeys)r._panAnim&&r._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),r.panBy(e),r.options.maxBounds&&r.panInsideBounds(r.options.maxBounds));else if(n in this._zoomKeys)r.setZoom(r.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!r._popup||!r._popup.options.closeOnEscapeKey)return;r.closePopup()}ze(t)}}});Ze.addInitHook("addHandler","keyboard",_r),Ze.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var wr=tn.extend({addHooks:function(){Me(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Te(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Fe(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),i),ze(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var r=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,o=n?Math.ceil(i/n)*n:i,a=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});Ze.addInitHook("addHandler","scrollWheelZoom",wr),Ze.mergeOptions({tap:!0,tapTolerance:15});var xr=tn.extend({addHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Te(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Ne(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new P(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&ce(n,"leaflet-active"),this._holdTimeout=setTimeout(r((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Me(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Te(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&le(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new P(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!kt||xt&&!lt||Ze.addInitHook("addHandler","tap",xr),Ze.mergeOptions({touchZoom:kt&&!it,bounceAtZoomLimits:!0});var kr=tn.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){le(this._map._container,"leaflet-touch-zoom"),Te(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend",this._onTouchEnd,this),Ne(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),M(this._animRequest);var s=r(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(s,this,!0),Ne(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,M(this._animRequest),Te(document,"touchmove",this._onTouchMove,this),Te(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ze.addInitHook("addHandler","touchZoom",kr),Ze.BoxZoom=gr,Ze.DoubleClickZoom=yr,Ze.Drag=br,Ze.Keyboard=_r,Ze.ScrollWheelZoom=wr,Ze.Tap=xr,Ze.TouchZoom=kr,t.version="1.7.1",t.Control=Ye,t.control=Ge,t.Browser=Lt,t.Evented=O,t.Mixin=nn,t.Util=E,t.Class=T,t.Handler=tn,t.extend=e,t.bind=r,t.stamp=o,t.setOptions=d,t.DomEvent=We,t.DomUtil=Ce,t.PosAnimation=$e,t.Draggable=sn,t.LineUtil=yn,t.PolyUtil=_n,t.Point=P,t.point=I,t.Bounds=R,t.bounds=N,t.Transformation=$,t.transformation=Z,t.Projection=kn,t.LatLng=B,t.latLng=F,t.LatLngBounds=z,t.latLngBounds=j,t.CRS=V,t.GeoJSON=Bn,t.geoJSON=Gn,t.geoJson=Kn,t.Layer=En,t.LayerGroup=Tn,t.layerGroup=function(t,e){return new Tn(t,e)},t.FeatureGroup=An,t.featureGroup=function(t,e){return new An(t,e)},t.ImageOverlay=Jn,t.imageOverlay=function(t,e,n){return new Jn(t,e,n)},t.VideoOverlay=Xn,t.videoOverlay=function(t,e,n){return new Xn(t,e,n)},t.SVGOverlay=Qn,t.svgOverlay=function(t,e,n){return new Qn(t,e,n)},t.DivOverlay=tr,t.Popup=er,t.popup=function(t,e){return new er(t,e)},t.Tooltip=nr,t.tooltip=function(t,e){return new nr(t,e)},t.Icon=On,t.icon=function(t){return new On(t)},t.DivIcon=rr,t.divIcon=function(t){return new rr(t)},t.Marker=Dn,t.marker=function(t,e){return new Dn(t,e)},t.TileLayer=or,t.tileLayer=ar,t.GridLayer=ir,t.gridLayer=function(t){return new ir(t)},t.SVG=pr,t.svg=mr,t.Renderer=ur,t.Canvas=cr,t.canvas=lr,t.Path=In,t.CircleMarker=Rn,t.circleMarker=function(t,e){return new Rn(t,e)},t.Circle=Nn,t.circle=function(t,e,n){return new Nn(t,e,n)},t.Polyline=zn,t.polyline=function(t,e){return new zn(t,e)},t.Polygon=jn,t.polygon=function(t,e){return new jn(t,e)},t.Rectangle=vr,t.rectangle=function(t,e){return new vr(t,e)},t.Map=Ze,t.map=function(t,e){return new Ze(t,e)};var Sr=window.L;t.noConflict=function(){return window.L=Sr,this},window.L=t},"object"===s(e)&&"undefined"!==typeof t?a(e):(i=[e],void 0===(o="function"===typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},function(t,e,n){var r=n(3);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(121),i=n(2),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t])||o(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},function(t,e,n){var r=n(12),i=n(11),o=n(70),a=n(100),s=o("IE_PROTO"),u=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e){t.exports=!1},function(t,e,n){var r=n(10).f,i=n(12),o=n(7)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){"use strict";(function(t){var r=n(176),i=n(177);function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a=setTimeout;function s(t){return Boolean(t&&"undefined"!==typeof t.length)}function u(){}function c(t){if(!(this instanceof c))throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],m(t,this)}function l(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,c._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(i){return void f(e.promise,i)}h(e.promise,r)}else(1===t._state?h:f)(e.promise,t._value)}))):t._deferreds.push(e)}function h(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===o(e)||"function"===typeof e)){var n=e.then;if(e instanceof c)return t._state=3,t._value=e,void d(t);if("function"===typeof n)return void m((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,d(t)}catch(a){f(t,a)}var r,i}function f(t,e){t._state=2,t._value=e,d(t)}function d(t){2===t._state&&0===t._deferreds.length&&c._immediateFn((function(){t._handled||c._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)l(t,t._deferreds[e]);t._deferreds=null}function p(t,e,n){this.onFulfilled="function"===typeof t?t:null,this.onRejected="function"===typeof e?e:null,this.promise=n}function m(t,e){var n=!1;try{t((function(t){n||(n=!0,h(e,t))}),(function(t){n||(n=!0,f(e,t))}))}catch(r){if(n)return;n=!0,f(e,r)}}c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){var n=new this.constructor(u);return l(this,new p(t,e,n)),n},c.prototype.finally=r.a,c.all=function(t){return new c((function(e,n){if(!s(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function a(t,s){try{if(s&&("object"===o(s)||"function"===typeof s)){var u=s.then;if("function"===typeof u)return void u.call(s,(function(e){a(t,e)}),n)}r[t]=s,0===--i&&e(r)}catch(c){n(c)}}for(var u=0;u<r.length;u++)a(u,r[u])}))},c.allSettled=i.a,c.resolve=function(t){return t&&"object"===o(t)&&t.constructor===c?t:new c((function(e){e(t)}))},c.reject=function(t){return new c((function(e,n){n(t)}))},c.race=function(t){return new c((function(e,n){if(!s(t))return n(new TypeError("Promise.race accepts an array"));for(var r=0,i=t.length;r<i;r++)c.resolve(t[r]).then(e,n)}))},c._immediateFn="function"===typeof t&&function(e){t(e)}||function(t){a(t,0)},c._unhandledRejectionFn=function(t){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},e.a=c}).call(this,n(402).setImmediate)},function(t,e,n){var r,i=n(4),o=n(95),a=n(92),s=n(55),u=n(124),c=n(86),l=n(70),h=l("IE_PROTO"),f=function(){},d=function(t){return"<script>"+t+"</"+"script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(i){}var t,e;p=r?function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=c("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(f.prototype=i(t),n=new f,f.prototype=null,n[h]=t):n=p(),void 0===e?n:o(n,e)}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(5),a=n(112),s=n(8),u=n(74),c=n(41),l=n(36),h=n(17),f=n(9),d=n(136),p=n(155),m=n(27),v=n(12),g=n(65),y=n(3),b=n(33),_=n(47),w=n(44).f,x=n(156),k=n(13).forEach,S=n(50),C=n(10),M=n(14),E=n(20),T=n(76),A=E.get,O=E.set,P=C.f,L=M.f,D=Math.round,I=i.RangeError,R=u.ArrayBuffer,N=u.DataView,z=s.NATIVE_ARRAY_BUFFER_VIEWS,j=s.TYPED_ARRAY_TAG,B=s.TypedArray,F=s.TypedArrayPrototype,q=s.aTypedArrayConstructor,V=s.isTypedArray,U="BYTES_PER_ELEMENT",H="Wrong length",W=function(t,e){for(var n=0,r=e.length,i=new(q(t))(r);r>n;)i[n]=e[n++];return i},$=function(t,e){P(t,e,{get:function(){return A(this)[e]}})},Z=function(t){var e;return t instanceof R||"ArrayBuffer"==(e=g(t))||"SharedArrayBuffer"==e},Y=function(t,e){return V(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},G=function(t,e){return Y(t,e=m(e,!0))?l(2,t[e]):L(t,e)},K=function(t,e,n){return!(Y(t,e=m(e,!0))&&y(n)&&v(n,"value"))||v(n,"get")||v(n,"set")||n.configurable||v(n,"writable")&&!n.writable||v(n,"enumerable")&&!n.enumerable?P(t,e,n):(t[e]=n.value,t)};o?(z||(M.f=G,C.f=K,$(F,"buffer"),$(F,"byteOffset"),$(F,"byteLength"),$(F,"length")),r({target:"Object",stat:!0,forced:!z},{getOwnPropertyDescriptor:G,defineProperty:K}),t.exports=function(t,e,n){var o=t.match(/\d+$/)[0]/8,s=t+(n?"Clamped":"")+"Array",u="get"+t,l="set"+t,m=i[s],v=m,g=v&&v.prototype,C={},M=function(t,e){P(t,e,{get:function(){return function(t,e){var n=A(t);return n.view[u](e*o+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var i=A(t);n&&(r=(r=D(r))<0?0:r>255?255:255&r),i.view[l](e*o+i.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};z?a&&(v=e((function(t,e,n,r){return c(t,v,s),T(y(e)?Z(e)?void 0!==r?new m(e,p(n,o),r):void 0!==n?new m(e,p(n,o)):new m(e):V(e)?W(v,e):x.call(v,e):new m(d(e)),t,v)})),_&&_(v,B),k(w(m),(function(t){t in v||h(v,t,m[t])})),v.prototype=g):(v=e((function(t,e,n,r){c(t,v,s);var i,a,u,l=0,h=0;if(y(e)){if(!Z(e))return V(e)?W(v,e):x.call(v,e);i=e,h=p(n,o);var m=e.byteLength;if(void 0===r){if(m%o)throw I(H);if((a=m-h)<0)throw I(H)}else if((a=f(r)*o)+h>m)throw I(H);u=a/o}else u=d(e),i=new R(a=u*o);for(O(t,{buffer:i,byteOffset:h,byteLength:a,length:u,view:new N(i)});l<u;)M(t,l++)})),_&&_(v,B),g=v.prototype=b(F)),g.constructor!==v&&h(g,"constructor",v),j&&h(g,j,s),C[s]=v,r({global:!0,forced:v!=m,sham:!z},C),U in v||h(v,U,o),U in g||h(g,U,o),S(s)}):t.exports=function(){}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(24),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},function(t,e,n){var r=n(25);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(7),i=n(33),o=n(10),a=r("unscopables"),s=Array.prototype;void 0==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){var r=n(4),i=n(25),o=n(7)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return N})),n.d(e,"b",(function(){return j}));var r=function(){function t(t,e){this.eventTarget=t,this.eventName=e,this.unorderedBindings=new Set}return t.prototype.connect=function(){this.eventTarget.addEventListener(this.eventName,this,!1)},t.prototype.disconnect=function(){this.eventTarget.removeEventListener(this.eventName,this,!1)},t.prototype.bindingConnected=function(t){this.unorderedBindings.add(t)},t.prototype.bindingDisconnected=function(t){this.unorderedBindings.delete(t)},t.prototype.handleEvent=function(t){for(var e=function(t){if("immediatePropagationStopped"in t)return t;var e=t.stopImmediatePropagation;return Object.assign(t,{immediatePropagationStopped:!1,stopImmediatePropagation:function(){this.immediatePropagationStopped=!0,e.call(this)}})}(t),n=0,r=this.bindings;n<r.length;n++){var i=r[n];if(e.immediatePropagationStopped)break;i.handleEvent(e)}},Object.defineProperty(t.prototype,"bindings",{get:function(){return Array.from(this.unorderedBindings).sort((function(t,e){var n=t.index,r=e.index;return n<r?-1:n>r?1:0}))},enumerable:!0,configurable:!0}),t}();var i=function(){function t(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}return t.prototype.start=function(){this.started||(this.started=!0,this.eventListeners.forEach((function(t){return t.connect()})))},t.prototype.stop=function(){this.started&&(this.started=!1,this.eventListeners.forEach((function(t){return t.disconnect()})))},Object.defineProperty(t.prototype,"eventListeners",{get:function(){return Array.from(this.eventListenerMaps.values()).reduce((function(t,e){return t.concat(Array.from(e.values()))}),[])},enumerable:!0,configurable:!0}),t.prototype.bindingConnected=function(t){this.fetchEventListenerForBinding(t).bindingConnected(t)},t.prototype.bindingDisconnected=function(t){this.fetchEventListenerForBinding(t).bindingDisconnected(t)},t.prototype.handleError=function(t,e,n){void 0===n&&(n={}),this.application.handleError(t,"Error "+e,n)},t.prototype.fetchEventListenerForBinding=function(t){var e=t.eventTarget,n=t.eventName;return this.fetchEventListener(e,n)},t.prototype.fetchEventListener=function(t,e){var n=this.fetchEventListenerMapForEventTarget(t),r=n.get(e);return r||(r=this.createEventListener(t,e),n.set(e,r)),r},t.prototype.createEventListener=function(t,e){var n=new r(t,e);return this.started&&n.connect(),n},t.prototype.fetchEventListenerMapForEventTarget=function(t){var e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e},t}(),o=/^((.+?)(@(window|document))?->)?(.+?)(#(.+))?$/;function a(t){return"window"==t?window:"document"==t?document:void 0}var s=function(){function t(t,e,n){this.element=t,this.index=e,this.eventTarget=n.eventTarget||t,this.eventName=n.eventName||function(t){var e=t.tagName.toLowerCase();if(e in u)return u[e](t)}(t)||c("missing event name"),this.identifier=n.identifier||c("missing identifier"),this.methodName=n.methodName||c("missing method name")}return t.forToken=function(t){return new this(t.element,t.index,(e=t.content,{eventTarget:a((n=e.trim().match(o)||[])[4]),eventName:n[2],identifier:n[5],methodName:n[7]}));var e,n},t.prototype.toString=function(){var t=this.eventTargetName?"@"+this.eventTargetName:"";return""+this.eventName+t+"->"+this.identifier+"#"+this.methodName},Object.defineProperty(t.prototype,"eventTargetName",{get:function(){return(t=this.eventTarget)==window?"window":t==document?"document":void 0;var t},enumerable:!0,configurable:!0}),t}(),u={a:function(t){return"click"},button:function(t){return"click"},form:function(t){return"submit"},input:function(t){return"submit"==t.getAttribute("type")?"click":"change"},select:function(t){return"change"},textarea:function(t){return"change"}};function c(t){throw new Error(t)}var l=function(){function t(t,e){this.context=t,this.action=e}return Object.defineProperty(t.prototype,"index",{get:function(){return this.action.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventTarget",{get:function(){return this.action.eventTarget},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!0,configurable:!0}),t.prototype.handleEvent=function(t){this.willBeInvokedByEvent(t)&&this.invokeWithEvent(t)},Object.defineProperty(t.prototype,"eventName",{get:function(){return this.action.eventName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"method",{get:function(){var t=this.controller[this.methodName];if("function"==typeof t)return t;throw new Error('Action "'+this.action+'" references undefined method "'+this.methodName+'"')},enumerable:!0,configurable:!0}),t.prototype.invokeWithEvent=function(t){try{this.method.call(this.controller,t)}catch(c){var e=this,n={identifier:e.identifier,controller:e.controller,element:e.element,index:e.index,event:t};this.context.handleError(c,'invoking action "'+this.action+'"',n)}},t.prototype.willBeInvokedByEvent=function(t){var e=t.target;return this.element===e||(!(e instanceof Element&&this.element.contains(e))||this.scope.containsElement(e))},Object.defineProperty(t.prototype,"controller",{get:function(){return this.context.controller},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"methodName",{get:function(){return this.action.methodName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scope",{get:function(){return this.context.scope},enumerable:!0,configurable:!0}),t}(),h=function(){function t(t,e){var n=this;this.element=t,this.started=!1,this.delegate=e,this.elements=new Set,this.mutationObserver=new MutationObserver((function(t){return n.processMutations(t)}))}return t.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,childList:!0,subtree:!0}),this.refresh())},t.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},t.prototype.refresh=function(){if(this.started){for(var t=new Set(this.matchElementsInTree()),e=0,n=Array.from(this.elements);e<n.length;e++){var r=n[e];t.has(r)||this.removeElement(r)}for(var i=0,o=Array.from(t);i<o.length;i++){r=o[i];this.addElement(r)}}},t.prototype.processMutations=function(t){if(this.started)for(var e=0,n=t;e<n.length;e++){var r=n[e];this.processMutation(r)}},t.prototype.processMutation=function(t){"attributes"==t.type?this.processAttributeChange(t.target,t.attributeName):"childList"==t.type&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))},t.prototype.processAttributeChange=function(t,e){var n=t;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,e):this.removeElement(n):this.matchElement(n)&&this.addElement(n)},t.prototype.processRemovedNodes=function(t){for(var e=0,n=Array.from(t);e<n.length;e++){var r=n[e],i=this.elementFromNode(r);i&&this.processTree(i,this.removeElement)}},t.prototype.processAddedNodes=function(t){for(var e=0,n=Array.from(t);e<n.length;e++){var r=n[e],i=this.elementFromNode(r);i&&this.elementIsActive(i)&&this.processTree(i,this.addElement)}},t.prototype.matchElement=function(t){return this.delegate.matchElement(t)},t.prototype.matchElementsInTree=function(t){return void 0===t&&(t=this.element),this.delegate.matchElementsInTree(t)},t.prototype.processTree=function(t,e){for(var n=0,r=this.matchElementsInTree(t);n<r.length;n++){var i=r[n];e.call(this,i)}},t.prototype.elementFromNode=function(t){if(t.nodeType==Node.ELEMENT_NODE)return t},t.prototype.elementIsActive=function(t){return t.isConnected==this.element.isConnected&&this.element.contains(t)},t.prototype.addElement=function(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))},t.prototype.removeElement=function(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))},t}(),f=function(){function t(t,e,n){this.attributeName=e,this.delegate=n,this.elementObserver=new h(t,this)}return Object.defineProperty(t.prototype,"element",{get:function(){return this.elementObserver.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selector",{get:function(){return"["+this.attributeName+"]"},enumerable:!0,configurable:!0}),t.prototype.start=function(){this.elementObserver.start()},t.prototype.stop=function(){this.elementObserver.stop()},t.prototype.refresh=function(){this.elementObserver.refresh()},Object.defineProperty(t.prototype,"started",{get:function(){return this.elementObserver.started},enumerable:!0,configurable:!0}),t.prototype.matchElement=function(t){return t.hasAttribute(this.attributeName)},t.prototype.matchElementsInTree=function(t){var e=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(this.selector));return e.concat(n)},t.prototype.elementMatched=function(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)},t.prototype.elementUnmatched=function(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)},t.prototype.elementAttributeChanged=function(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)},t}();function d(t,e,n){m(t,e).add(n)}function p(t,e,n){m(t,e).delete(n),function(t,e){var n=t.get(e);null!=n&&0==n.size&&t.delete(e)}(t,e)}function m(t,e){var n=t.get(e);return n||(n=new Set,t.set(e,n)),n}var v,g=function(){function t(){this.valuesByKey=new Map}return Object.defineProperty(t.prototype,"values",{get:function(){return Array.from(this.valuesByKey.values()).reduce((function(t,e){return t.concat(Array.from(e))}),[])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return Array.from(this.valuesByKey.values()).reduce((function(t,e){return t+e.size}),0)},enumerable:!0,configurable:!0}),t.prototype.add=function(t,e){d(this.valuesByKey,t,e)},t.prototype.delete=function(t,e){p(this.valuesByKey,t,e)},t.prototype.has=function(t,e){var n=this.valuesByKey.get(t);return null!=n&&n.has(e)},t.prototype.hasKey=function(t){return this.valuesByKey.has(t)},t.prototype.hasValue=function(t){return Array.from(this.valuesByKey.values()).some((function(e){return e.has(t)}))},t.prototype.getValuesForKey=function(t){var e=this.valuesByKey.get(t);return e?Array.from(e):[]},t.prototype.getKeysForValue=function(t){return Array.from(this.valuesByKey).filter((function(e){e[0];return e[1].has(t)})).map((function(t){var e=t[0];t[1];return e}))},t}(),y=(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),b=(function(t){function e(){var e=t.call(this)||this;return e.keysByValue=new Map,e}y(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return Array.from(this.keysByValue.keys())},enumerable:!0,configurable:!0}),e.prototype.add=function(e,n){t.prototype.add.call(this,e,n),d(this.keysByValue,n,e)},e.prototype.delete=function(e,n){t.prototype.delete.call(this,e,n),p(this.keysByValue,n,e)},e.prototype.hasValue=function(t){return this.keysByValue.has(t)},e.prototype.getKeysForValue=function(t){var e=this.keysByValue.get(t);return e?Array.from(e):[]}}(g),function(){function t(t,e,n){this.attributeObserver=new f(t,e,this),this.delegate=n,this.tokensByElement=new g}return Object.defineProperty(t.prototype,"started",{get:function(){return this.attributeObserver.started},enumerable:!0,configurable:!0}),t.prototype.start=function(){this.attributeObserver.start()},t.prototype.stop=function(){this.attributeObserver.stop()},t.prototype.refresh=function(){this.attributeObserver.refresh()},Object.defineProperty(t.prototype,"element",{get:function(){return this.attributeObserver.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attributeName",{get:function(){return this.attributeObserver.attributeName},enumerable:!0,configurable:!0}),t.prototype.elementMatchedAttribute=function(t){this.tokensMatched(this.readTokensForElement(t))},t.prototype.elementAttributeValueChanged=function(t){var e=this.refreshTokensForElement(t),n=e[0],r=e[1];this.tokensUnmatched(n),this.tokensMatched(r)},t.prototype.elementUnmatchedAttribute=function(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))},t.prototype.tokensMatched=function(t){var e=this;t.forEach((function(t){return e.tokenMatched(t)}))},t.prototype.tokensUnmatched=function(t){var e=this;t.forEach((function(t){return e.tokenUnmatched(t)}))},t.prototype.tokenMatched=function(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)},t.prototype.tokenUnmatched=function(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)},t.prototype.refreshTokensForElement=function(t){var e,n,r,i=this.tokensByElement.getValuesForKey(t),o=this.readTokensForElement(t),a=(e=i,n=o,r=Math.max(e.length,n.length),Array.from({length:r},(function(t,r){return[e[r],n[r]]}))).findIndex((function(t){return!function(t,e){return t&&e&&t.index==e.index&&t.content==e.content}(t[0],t[1])}));return-1==a?[[],[]]:[i.slice(a),o.slice(a)]},t.prototype.readTokensForElement=function(t){var e=this.attributeName;return function(t,e,n){return t.trim().split(/\s+/).filter((function(t){return t.length})).map((function(t,r){return{element:e,attributeName:n,content:t,index:r}}))}(t.getAttribute(e)||"",t,e)},t}());var _=function(){function t(t,e,n){this.tokenListObserver=new b(t,e,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}return Object.defineProperty(t.prototype,"started",{get:function(){return this.tokenListObserver.started},enumerable:!0,configurable:!0}),t.prototype.start=function(){this.tokenListObserver.start()},t.prototype.stop=function(){this.tokenListObserver.stop()},t.prototype.refresh=function(){this.tokenListObserver.refresh()},Object.defineProperty(t.prototype,"element",{get:function(){return this.tokenListObserver.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attributeName",{get:function(){return this.tokenListObserver.attributeName},enumerable:!0,configurable:!0}),t.prototype.tokenMatched=function(t){var e=t.element,n=this.fetchParseResultForToken(t).value;n&&(this.fetchValuesByTokenForElement(e).set(t,n),this.delegate.elementMatchedValue(e,n))},t.prototype.tokenUnmatched=function(t){var e=t.element,n=this.fetchParseResultForToken(t).value;n&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,n))},t.prototype.fetchParseResultForToken=function(t){var e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e},t.prototype.fetchValuesByTokenForElement=function(t){var e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e},t.prototype.parseToken=function(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(c){return{error:c}}},t}(),w=function(){function t(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}return t.prototype.start=function(){this.valueListObserver||(this.valueListObserver=new _(this.element,this.actionAttribute,this),this.valueListObserver.start())},t.prototype.stop=function(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())},Object.defineProperty(t.prototype,"element",{get:function(){return this.context.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionAttribute",{get:function(){return this.schema.actionAttribute},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return this.context.schema},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return Array.from(this.bindingsByAction.values())},enumerable:!0,configurable:!0}),t.prototype.connectAction=function(t){var e=new l(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)},t.prototype.disconnectAction=function(t){var e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))},t.prototype.disconnectAllActions=function(){var t=this;this.bindings.forEach((function(e){return t.delegate.bindingDisconnected(e)})),this.bindingsByAction.clear()},t.prototype.parseValueForToken=function(t){var e=s.forToken(t);if(e.identifier==this.identifier)return e},t.prototype.elementMatchedValue=function(t,e){this.connectAction(e)},t.prototype.elementUnmatchedValue=function(t,e){this.disconnectAction(e)},t}(),x=function(){function t(t,e){this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new w(this,this.dispatcher);try{this.controller.initialize()}catch(c){this.handleError(c,"initializing controller")}}return t.prototype.connect=function(){this.bindingObserver.start();try{this.controller.connect()}catch(c){this.handleError(c,"connecting controller")}},t.prototype.disconnect=function(){try{this.controller.disconnect()}catch(c){this.handleError(c,"disconnecting controller")}this.bindingObserver.stop()},Object.defineProperty(t.prototype,"application",{get:function(){return this.module.application},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{get:function(){return this.module.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return this.application.schema},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dispatcher",{get:function(){return this.application.dispatcher},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentElement",{get:function(){return this.element.parentElement},enumerable:!0,configurable:!0}),t.prototype.handleError=function(t,e,n){void 0===n&&(n={});var r=this,i=r.identifier,o=r.controller,a=r.element;n=Object.assign({identifier:i,controller:o,element:a},n),this.application.handleError(t,"Error "+e,n)},t}(),k=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function S(t){var e=C(t);return e.bless(),e}var C=function(){function t(t){function e(){var n=this&&this instanceof e?this.constructor:void 0;return Reflect.construct(t,arguments,n)}return e.prototype=Object.create(t.prototype,{constructor:{value:e}}),Reflect.setPrototypeOf(e,t),e}try{return(e=t((function(){this.a.call(this)}))).prototype.a=function(){},new e,t}catch(c){return function(t){return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),e}(t)}}var e}(),M=function(){function t(t,e){this.application=t,this.definition=function(t){return{identifier:t.identifier,controllerConstructor:S(t.controllerConstructor)}}(e),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}return Object.defineProperty(t.prototype,"identifier",{get:function(){return this.definition.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controllerConstructor",{get:function(){return this.definition.controllerConstructor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contexts",{get:function(){return Array.from(this.connectedContexts)},enumerable:!0,configurable:!0}),t.prototype.connectContextForScope=function(t){var e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()},t.prototype.disconnectContextForScope=function(t){var e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())},t.prototype.fetchContextForScope=function(t){var e=this.contextsByScope.get(t);return e||(e=new x(this,t),this.contextsByScope.set(t,e)),e},t}(),E=function(){function t(t){this.scope=t}return Object.defineProperty(t.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return t=this.getFormattedKey(t),this.element.getAttribute(t)},t.prototype.set=function(t,e){return t=this.getFormattedKey(t),this.element.setAttribute(t,e),this.get(t)},t.prototype.has=function(t){return t=this.getFormattedKey(t),this.element.hasAttribute(t)},t.prototype.delete=function(t){return!!this.has(t)&&(t=this.getFormattedKey(t),this.element.removeAttribute(t),!0)},t.prototype.getFormattedKey=function(t){return"data-"+this.identifier+"-"+t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))},t}();function T(t,e){return"["+t+'~="'+e+'"]'}var A=function(){function t(t){this.scope=t}return Object.defineProperty(t.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return this.scope.schema},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return null!=this.find(t)},t.prototype.find=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.getSelectorForTargetNames(t);return this.scope.findElement(n)},t.prototype.findAll=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.getSelectorForTargetNames(t);return this.scope.findAllElements(n)},t.prototype.getSelectorForTargetNames=function(t){var e=this;return t.map((function(t){return e.getSelectorForTargetName(t)})).join(", ")},t.prototype.getSelectorForTargetName=function(t){var e=this.identifier+"."+t;return T(this.schema.targetAttribute,e)},t}(),O=function(){function t(t,e,n){this.schema=t,this.identifier=e,this.element=n,this.targets=new A(this),this.data=new E(this)}return t.prototype.findElement=function(t){return this.findAllElements(t)[0]},t.prototype.findAllElements=function(t){var e=this.element.matches(t)?[this.element]:[],n=this.filterElements(Array.from(this.element.querySelectorAll(t)));return e.concat(n)},t.prototype.filterElements=function(t){var e=this;return t.filter((function(t){return e.containsElement(t)}))},t.prototype.containsElement=function(t){return t.closest(this.controllerSelector)===this.element},Object.defineProperty(t.prototype,"controllerSelector",{get:function(){return T(this.schema.controllerAttribute,this.identifier)},enumerable:!0,configurable:!0}),t}(),P=function(){function t(t,e,n){this.element=t,this.schema=e,this.delegate=n,this.valueListObserver=new _(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}return t.prototype.start=function(){this.valueListObserver.start()},t.prototype.stop=function(){this.valueListObserver.stop()},Object.defineProperty(t.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!0,configurable:!0}),t.prototype.parseValueForToken=function(t){var e=t.element,n=t.content,r=this.fetchScopesByIdentifierForElement(e),i=r.get(n);return i||(i=new O(this.schema,n,e),r.set(n,i)),i},t.prototype.elementMatchedValue=function(t,e){var n=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,n),1==n&&this.delegate.scopeConnected(e)},t.prototype.elementUnmatchedValue=function(t,e){var n=this.scopeReferenceCounts.get(e);n&&(this.scopeReferenceCounts.set(e,n-1),1==n&&this.delegate.scopeDisconnected(e))},t.prototype.fetchScopesByIdentifierForElement=function(t){var e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e},t}(),L=function(){function t(t){this.application=t,this.scopeObserver=new P(this.element,this.schema,this),this.scopesByIdentifier=new g,this.modulesByIdentifier=new Map}return Object.defineProperty(t.prototype,"element",{get:function(){return this.application.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"schema",{get:function(){return this.application.schema},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"modules",{get:function(){return Array.from(this.modulesByIdentifier.values())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contexts",{get:function(){return this.modules.reduce((function(t,e){return t.concat(e.contexts)}),[])},enumerable:!0,configurable:!0}),t.prototype.start=function(){this.scopeObserver.start()},t.prototype.stop=function(){this.scopeObserver.stop()},t.prototype.loadDefinition=function(t){this.unloadIdentifier(t.identifier);var e=new M(this.application,t);this.connectModule(e)},t.prototype.unloadIdentifier=function(t){var e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)},t.prototype.getContextForElementAndIdentifier=function(t,e){var n=this.modulesByIdentifier.get(e);if(n)return n.contexts.find((function(e){return e.element==t}))},t.prototype.handleError=function(t,e,n){this.application.handleError(t,e,n)},t.prototype.scopeConnected=function(t){this.scopesByIdentifier.add(t.identifier,t);var e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)},t.prototype.scopeDisconnected=function(t){this.scopesByIdentifier.delete(t.identifier,t);var e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)},t.prototype.connectModule=function(t){this.modulesByIdentifier.set(t.identifier,t),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((function(e){return t.connectContextForScope(e)}))},t.prototype.disconnectModule=function(t){this.modulesByIdentifier.delete(t.identifier),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((function(e){return t.disconnectContextForScope(e)}))},t}(),D={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target"},I=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(e){o(e)}}function s(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){t.done?i(t.value):new n((function(e){e(t.value)})).then(a,s)}u((r=r.apply(t,e||[])).next())}))},R=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},N=function(){function t(t,e){void 0===t&&(t=document.documentElement),void 0===e&&(e=D),this.element=t,this.schema=e,this.dispatcher=new i(this),this.router=new L(this)}return t.start=function(e,n){var r=new t(e,n);return r.start(),r},t.prototype.start=function(){return I(this,void 0,void 0,(function(){return R(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",t):t()}))];case 1:return t.sent(),this.router.start(),this.dispatcher.start(),[2]}}))}))},t.prototype.stop=function(){this.router.stop(),this.dispatcher.stop()},t.prototype.register=function(t,e){this.load({identifier:t,controllerConstructor:e})},t.prototype.load=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=Array.isArray(t)?t:[t].concat(n);i.forEach((function(t){return e.router.loadDefinition(t)}))},t.prototype.unload=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=Array.isArray(t)?t:[t].concat(n);i.forEach((function(t){return e.router.unloadIdentifier(t)}))},Object.defineProperty(t.prototype,"controllers",{get:function(){return this.router.contexts.map((function(t){return t.controller}))},enumerable:!0,configurable:!0}),t.prototype.getControllerForElementAndIdentifier=function(t,e){var n=this.router.getContextForElementAndIdentifier(t,e);return n?n.controller:null},t.prototype.handleError=function(t,e,n){console.error("%s\n\n%o\n\n%o",e,t,n)},t}();function z(t){var e=t.prototype;(function(t){var e=function(t){var e=[];for(;t;)e.push(t),t=Object.getPrototypeOf(t);return e}(t);return Array.from(e.reduce((function(t,e){return function(t){var e=t.targets;return Array.isArray(e)?e:[]}(e).forEach((function(e){return t.add(e)})),t}),new Set))})(t).forEach((function(t){var n,r,i;return r=e,(n={})[t+"Target"]={get:function(){var e=this.targets.find(t);if(e)return e;throw new Error('Missing target element "'+this.identifier+"."+t+'"')}},n[t+"Targets"]={get:function(){return this.targets.findAll(t)}},n["has"+function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(t)+"Target"]={get:function(){return this.targets.has(t)}},i=n,void Object.keys(i).forEach((function(t){if(!(t in r)){var e=i[t];Object.defineProperty(r,t,e)}}))}))}var j=function(){function t(t){this.context=t}return t.bless=function(){z(this)},Object.defineProperty(t.prototype,"application",{get:function(){return this.context.application},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scope",{get:function(){return this.context.scope},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.scope.element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"targets",{get:function(){return this.scope.targets},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.scope.data},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){},t.prototype.connect=function(){},t.prototype.disconnect=function(){},t.targets=[],t}()},function(t,e,n){var r=n(122),i=n(92).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(37);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(27),i=n(10),o=n(36);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},function(t,e,n){var r=n(4),i=n(134);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(o){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},function(t,e,n){var r=n(55),i=n(3),o=n(12),a=n(10).f,s=n(54),u=n(66),c=s("meta"),l=0,h=Object.isExtensible||function(){return!0},f=function(t){a(t,c,{value:{objectID:"O"+ ++l,weakData:{}}})},d=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,c)){if(!h(t))return"F";if(!e)return"E";f(t)}return t[c].objectID},getWeakData:function(t,e){if(!o(t,c)){if(!h(t))return!0;if(!e)return!1;f(t)}return t[c].weakData},onFreeze:function(t){return u&&d.REQUIRED&&h(t)&&!o(t,c)&&f(t),t}};r[c]=!0},function(t,e,n){var r=n(37),i=n(2);t.exports="process"==r(i.process)},function(t,e,n){"use strict";var r=n(28),i=n(10),o=n(7),a=n(5),s=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(15);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(16),i="["+n(78)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},function(t,e,n){var r=n(1),i=n(37),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e){t.exports={}},function(t,e,n){var r=n(19),i=n(9),o=n(38),a=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(1),i=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==c||n!=u&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},function(t,e,n){var r=n(122),i=n(92);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(3),i=n(45),o=n(7)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){var r=n(1),i=n(7),o=n(61),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var r,i,o=n(2),a=n(62),s=o.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},function(t,e,n){var r=n(28);t.exports=r("navigator","userAgent")||""},function(t,e){t.exports={}},function(t,e,n){var r=n(65),i=n(63),o=n(7)("iterator");t.exports=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(98),i=n(37),o=n(7)("toStringTag"),a="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=Object(t),o))?n:a?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},function(t,e,n){var r=n(1);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var r=n(4),i=n(97),o=n(9),a=n(39),s=n(64),u=n(131),c=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var l,h,f,d,p,m,v,g=n&&n.that,y=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),_=!(!n||!n.INTERRUPTED),w=a(e,g,1+y+_),x=function(t){return l&&u(l),new c(!0,t)},k=function(t){return y?(r(t),_?w(t[0],t[1],x):w(t[0],t[1])):_?w(t,x):w(t)};if(b)l=t;else{if("function"!=typeof(h=s(t)))throw TypeError("Target is not iterable");if(i(h)){for(f=0,d=o(t.length);d>f;f++)if((p=k(t[f]))&&p instanceof c)return p;return new c(!1)}l=h.call(t)}for(m=l.next;!(v=m.call(l)).done;){try{p=k(v.value)}catch(S){throw u(l),S}if("object"==typeof p&&p&&p instanceof c)return p}return new c(!1)}},function(t,e){function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(i){"object"===("undefined"===typeof window?"undefined":n(window))&&(r=window)}t.exports=r},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(90),i=n(54),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e,n){var r=n(7)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(s){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(s){}return n}},function(t,e,n){"use strict";var r=n(19),i=n(40),o=n(63),a=n(20),s=n(99),u="Array Iterator",c=a.set,l=a.getterFor(u);t.exports=s(Array,"Array",(function(t,e){c(this,{type:u,target:r(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,n){var r=n(25),i=n(11),o=n(53),a=n(9),s=function(t){return function(e,n,s,u){r(n);var c=i(e),l=o(c),h=a(c.length),f=t?h-1:0,d=t?-1:1;if(s<2)for(;;){if(f in l){u=l[f],f+=d;break}if(f+=d,t?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;t?f>=0:h>f;f+=d)f in l&&(u=n(u,l[f],f,c));return u}};t.exports={left:s(!1),right:s(!0)}},function(t,e,n){"use strict";var r=n(2),i=n(5),o=n(101),a=n(17),s=n(51),u=n(1),c=n(41),l=n(24),h=n(9),f=n(136),d=n(228),p=n(29),m=n(47),v=n(44).f,g=n(10).f,y=n(96),b=n(31),_=n(20),w=_.get,x=_.set,k="ArrayBuffer",S="DataView",C="Wrong index",M=r.ArrayBuffer,E=M,T=r.DataView,A=T&&T.prototype,O=Object.prototype,P=r.RangeError,L=d.pack,D=d.unpack,I=function(t){return[255&t]},R=function(t){return[255&t,t>>8&255]},N=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},z=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},j=function(t){return L(t,23,4)},B=function(t){return L(t,52,8)},F=function(t,e){g(t.prototype,e,{get:function(){return w(this)[e]}})},q=function(t,e,n,r){var i=f(n),o=w(t);if(i+e>o.byteLength)throw P(C);var a=w(o.buffer).bytes,s=i+o.byteOffset,u=a.slice(s,s+e);return r?u:u.reverse()},V=function(t,e,n,r,i,o){var a=f(n),s=w(t);if(a+e>s.byteLength)throw P(C);for(var u=w(s.buffer).bytes,c=a+s.byteOffset,l=r(+i),h=0;h<e;h++)u[c+h]=l[o?h:e-h-1]};if(o){if(!u((function(){M(1)}))||!u((function(){new M(-1)}))||u((function(){return new M,new M(1.5),new M(NaN),M.name!=k}))){for(var U,H=(E=function(t){return c(this,E),new M(f(t))}).prototype=M.prototype,W=v(M),$=0;W.length>$;)(U=W[$++])in E||a(E,U,M[U]);H.constructor=E}m&&p(A)!==O&&m(A,O);var Z=new T(new E(2)),Y=A.setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||s(A,{setInt8:function(t,e){Y.call(this,t,e<<24>>24)},setUint8:function(t,e){Y.call(this,t,e<<24>>24)}},{unsafe:!0})}else E=function(t){c(this,E,k);var e=f(t);x(this,{bytes:y.call(new Array(e),0),byteLength:e}),i||(this.byteLength=e)},T=function(t,e,n){c(this,T,S),c(t,E,S);var r=w(t).byteLength,o=l(e);if(o<0||o>r)throw P("Wrong offset");if(o+(n=void 0===n?r-o:h(n))>r)throw P("Wrong length");x(this,{buffer:t,byteLength:n,byteOffset:o}),i||(this.buffer=t,this.byteLength=n,this.byteOffset=o)},i&&(F(E,"byteLength"),F(T,"buffer"),F(T,"byteLength"),F(T,"byteOffset")),s(T.prototype,{getInt8:function(t){return q(this,1,t)[0]<<24>>24},getUint8:function(t){return q(this,1,t)[0]},getInt16:function(t){var e=q(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=q(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return z(q(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return z(q(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return D(q(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return D(q(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){V(this,1,t,I,e)},setUint8:function(t,e){V(this,1,t,I,e)},setInt16:function(t,e){V(this,2,t,R,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){V(this,2,t,R,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){V(this,4,t,N,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){V(this,4,t,N,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){V(this,4,t,j,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){V(this,8,t,B,e,arguments.length>2?arguments[2]:void 0)}});b(E,k),b(T,S),t.exports={ArrayBuffer:E,DataView:T}},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(57),a=n(15),s=n(48),u=n(67),c=n(41),l=n(3),h=n(1),f=n(71),d=n(31),p=n(76);t.exports=function(t,e,n){var m=-1!==t.indexOf("Map"),v=-1!==t.indexOf("Weak"),g=m?"set":"add",y=i[t],b=y&&y.prototype,_=y,w={},x=function(t){var e=b[t];a(b,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(o(t,"function"!=typeof y||!(v||b.forEach&&!h((function(){(new y).entries().next()})))))_=n.getConstructor(e,t,m,g),s.REQUIRED=!0;else if(o(t,!0)){var k=new _,S=k[g](v?{}:-0,1)!=k,C=h((function(){k.has(1)})),M=f((function(t){new y(t)})),E=!v&&h((function(){for(var t=new y,e=5;e--;)t[g](e,e);return!t.has(-0)}));M||((_=e((function(e,n){c(e,_,t);var r=p(new y,e,_);return void 0!=n&&u(n,r[g],{that:r,AS_ENTRIES:m}),r}))).prototype=b,b.constructor=_),(C||E)&&(x("delete"),x("has"),m&&x("get")),(E||S)&&x(g),v&&b.clear&&delete b.clear}return w[t]=_,r({global:!0,forced:_!=y},w),d(_,t),v||n.setStrong(_,t,m),_}},function(t,e,n){var r=n(3),i=n(47);t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},function(t,e){var n=Math.expm1,r=Math.exp;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:r(t)-1}:n},function(t,e){t.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(30),i=n(2),o=n(1);t.exports=r||!o((function(){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete i[t]}))},function(t,e,n){"use strict";var r=n(4);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r,i,o=n(80),a=n(107),s=RegExp.prototype.exec,u=String.prototype.replace,c=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),h=a.UNSUPPORTED_Y||a.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(l||f||h)&&(c=function(t){var e,n,r,i,a=this,c=h&&a.sticky,d=o.call(a),p=a.source,m=0,v=t;return c&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),v=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(p="(?: "+p+")",v=" "+v,m++),n=new RegExp("^(?:"+p+")",d)),f&&(n=new RegExp("^"+p+"$(?!\\s)",d)),l&&(e=a.lastIndex),r=s.call(c?n:a,v),c?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:l&&r&&(a.lastIndex=a.global?r.index+r[0].length:e),f&&r&&r.length>1&&u.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=c},function(t,e,n){var r=n(24),i=n(16),o=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e,n){"use strict";n(152);var r=n(15),i=n(1),o=n(7),a=n(81),s=n(17),u=o("species"),c=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),h=o("replace"),f=!!/./[h]&&""===/./[h]("a","$0"),d=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,h){var p=o(t),m=!i((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),v=m&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!m||!v||"replace"===t&&(!c||!l||f)||"split"===t&&!d){var g=/./[p],y=n(p,""[t],(function(t,e,n,r,i){return e.exec===a?m&&!i?{done:!0,value:g.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),b=y[0],_=y[1];r(String.prototype,t,b),r(RegExp.prototype,p,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}h&&s(RegExp.prototype[p],"sham",!0)}},function(t,e,n){var r=n(37),i=n(81);t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){var r,i,o,a;function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a=function(t){"use strict";var e=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,a,s,u,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,r(t.substring(e-64,e)));for(i=(t=t.substring(e-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(l,o),l}function a(t){var e,r,o,a,s,u,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,i(t.subarray(e-64,e)));for(r=(t=e-64<c?t.subarray(e-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(l,o),l}function s(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function u(t){var e;for(e=0;e<t.length;e+=1)t[e]=s(t[e]);return t.join("")}function c(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function h(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function f(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function d(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return u(o("hello")),"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,u=this.byteLength,c=e(n,u),l=u;return r!==t&&(l=e(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,c,i),a.set(s),o)}}(),p.prototype.append=function(t){return this.appendBinary(c(t)),this},p.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},p.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},p.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(t,e){var r,i,o,a=e;if(t[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,t),a=0;a<16;a+=1)t[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},p.hash=function(t,e){return p.hashBinary(c(t),e)},p.hashBinary=function(t,e){var n=u(o(t));return e?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(t){var e,r=f(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=u(this._hash),t&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var t=p.prototype.getState.call(this);return t.buff=h(t.buff),t},p.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),p.prototype.setState.call(this,t)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(t,e){var n=u(a(new Uint8Array(t)));return e?d(n):n},p}()})),n=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,o=function(){function t(e){n(this,t),this.file=e,this.chunkSize=2097152,this.chunkCount=Math.ceil(this.file.size/this.chunkSize),this.chunkIndex=0}return r(t,null,[{key:"create",value:function(e,n){new t(e).create(n)}}]),r(t,[{key:"create",value:function(t){var n=this;this.callback=t,this.md5Buffer=new e.ArrayBuffer,this.fileReader=new FileReader,this.fileReader.addEventListener("load",(function(t){return n.fileReaderDidLoad(t)})),this.fileReader.addEventListener("error",(function(t){return n.fileReaderDidError(t)})),this.readNextChunk()}},{key:"fileReaderDidLoad",value:function(t){if(this.md5Buffer.append(t.target.result),!this.readNextChunk()){var e=this.md5Buffer.end(!0),n=btoa(e);this.callback(null,n)}}},{key:"fileReaderDidError",value:function(t){this.callback("Error reading "+this.file.name)}},{key:"readNextChunk",value:function(){if(this.chunkIndex<this.chunkCount||0==this.chunkIndex&&0==this.chunkCount){var t=this.chunkIndex*this.chunkSize,e=Math.min(t+this.chunkSize,this.file.size),n=i.call(this.file,t,e);return this.fileReader.readAsArrayBuffer(n),this.chunkIndex++,!0}return!1}}]),t}();function a(t,e){return"string"==typeof t&&(e=t,t=document),t.querySelector(e)}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.disabled,i=n.bubbles,o=n.cancelable,a=n.detail,s=document.createEvent("Event");s.initEvent(e,i||!0,o||!0),s.detail=a||{};try{t.disabled=!1,t.dispatchEvent(s)}finally{t.disabled=r}return s}function u(t){return Array.isArray(t)?t:Array.from?Array.from(t):[].slice.call(t)}var c=function(){function t(e,r,i){var o=this;n(this,t),this.file=e,this.attributes={filename:e.name,content_type:e.type||"application/octet-stream",byte_size:e.size,checksum:r},this.xhr=new XMLHttpRequest,this.xhr.open("POST",i,!0),this.xhr.responseType="json",this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.setRequestHeader("Accept","application/json"),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");var s=function(t){var e=a(document.head,'meta[name="'+t+'"]');if(e)return e.getAttribute("content")}("csrf-token");void 0!=s&&this.xhr.setRequestHeader("X-CSRF-Token",s),this.xhr.addEventListener("load",(function(t){return o.requestDidLoad(t)})),this.xhr.addEventListener("error",(function(t){return o.requestDidError(t)}))}return r(t,[{key:"create",value:function(t){this.callback=t,this.xhr.send(JSON.stringify({blob:this.attributes}))}},{key:"requestDidLoad",value:function(t){if(this.status>=200&&this.status<300){var e=this.response,n=e.direct_upload;delete e.direct_upload,this.attributes=e,this.directUploadData=n,this.callback(null,this.toJSON())}else this.requestDidError(t)}},{key:"requestDidError",value:function(t){this.callback('Error creating Blob for "'+this.file.name+'". Status: '+this.status)}},{key:"toJSON",value:function(){var t={};for(var e in this.attributes)t[e]=this.attributes[e];return t}},{key:"status",get:function(){return this.xhr.status}},{key:"response",get:function(){var t=this.xhr,e=t.responseType,n=t.response;return"json"==e?n:JSON.parse(n)}}]),t}(),l=function(){function t(e){var r=this;n(this,t),this.blob=e,this.file=e.file;var i=e.directUploadData,o=i.url,a=i.headers;for(var s in this.xhr=new XMLHttpRequest,this.xhr.open("PUT",o,!0),this.xhr.responseType="text",a)this.xhr.setRequestHeader(s,a[s]);this.xhr.addEventListener("load",(function(t){return r.requestDidLoad(t)})),this.xhr.addEventListener("error",(function(t){return r.requestDidError(t)}))}return r(t,[{key:"create",value:function(t){this.callback=t,this.xhr.send(this.file.slice())}},{key:"requestDidLoad",value:function(t){var e=this.xhr,n=e.status,r=e.response;n>=200&&n<300?this.callback(null,r):this.requestDidError(t)}},{key:"requestDidError",value:function(t){this.callback('Error storing "'+this.file.name+'". Status: '+this.xhr.status)}}]),t}(),h=0,f=function(){function t(e,r,i){n(this,t),this.id=++h,this.file=e,this.url=r,this.delegate=i}return r(t,[{key:"create",value:function(t){var e=this;o.create(this.file,(function(n,r){if(n)t(n);else{var i=new c(e.file,r,e.url);d(e.delegate,"directUploadWillCreateBlobWithXHR",i.xhr),i.create((function(n){if(n)t(n);else{var r=new l(i);d(e.delegate,"directUploadWillStoreFileWithXHR",r.xhr),r.create((function(e){e?t(e):t(null,i.toJSON())}))}}))}}))}}]),t}();function d(t,e){if(t&&"function"==typeof t[e]){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return t[e].apply(t,r)}}var p=function(){function t(e,r){n(this,t),this.input=e,this.file=r,this.directUpload=new f(this.file,this.url,this),this.dispatch("initialize")}return r(t,[{key:"start",value:function(t){var e=this,n=document.createElement("input");n.type="hidden",n.name=this.input.name,this.input.insertAdjacentElement("beforebegin",n),this.dispatch("start"),this.directUpload.create((function(r,i){r?(n.parentNode.removeChild(n),e.dispatchError(r)):n.value=i.signed_id,e.dispatch("end"),t(r)}))}},{key:"uploadRequestDidProgress",value:function(t){var e=t.loaded/t.total*100;e&&this.dispatch("progress",{progress:e})}},{key:"dispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.file=this.file,e.id=this.directUpload.id,s(this.input,"direct-upload:"+t,{detail:e})}},{key:"dispatchError",value:function(t){this.dispatch("error",{error:t}).defaultPrevented||alert(t)}},{key:"directUploadWillCreateBlobWithXHR",value:function(t){this.dispatch("before-blob-request",{xhr:t})}},{key:"directUploadWillStoreFileWithXHR",value:function(t){var e=this;this.dispatch("before-storage-request",{xhr:t}),t.upload.addEventListener("progress",(function(t){return e.uploadRequestDidProgress(t)}))}},{key:"url",get:function(){return this.input.getAttribute("data-direct-upload-url")}}]),t}(),m=function(){function t(e){var r,i;n(this,t),this.form=e,this.inputs=(r=e,i="input[type=file][data-direct-upload-url]:not([disabled])","string"==typeof r&&(i=r,r=document),u(r.querySelectorAll(i))).filter((function(t){return t.files.length}))}return r(t,[{key:"start",value:function(t){var e=this,n=this.createDirectUploadControllers();this.dispatch("start"),function r(){var i=n.shift();i?i.start((function(n){n?(t(n),e.dispatch("end")):r()})):(t(),e.dispatch("end"))}()}},{key:"createDirectUploadControllers",value:function(){var t=[];return this.inputs.forEach((function(e){u(e.files).forEach((function(n){var r=new p(e,n);t.push(r)}))})),t}},{key:"dispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this.form,"direct-uploads:"+t,{detail:e})}}]),t}(),v="data-direct-uploads-processing",g=new WeakMap,y=!1;function b(){y||(y=!0,document.addEventListener("click",_,!0),document.addEventListener("submit",w),document.addEventListener("ajax:before",x))}function _(t){var e=t.target;"INPUT"!=e.tagName&&"BUTTON"!=e.tagName||"submit"!=e.type||!e.form||g.set(e.form,e)}function w(t){k(t)}function x(t){"FORM"==t.target.tagName&&k(t)}function k(t){var e=t.target;if(e.hasAttribute(v))t.preventDefault();else{var n=new m(e),r=n.inputs;r.length&&(t.preventDefault(),e.setAttribute(v,""),r.forEach(S),n.start((function(t){e.removeAttribute(v),t?r.forEach(C):function(t){var e=g.get(t)||a(t,"input[type=submit], button[type=submit]");if(e){var n=e.disabled;e.disabled=!1,e.focus(),e.click(),e.disabled=n}else(e=document.createElement("input")).type="submit",e.style.display="none",t.appendChild(e),e.click(),t.removeChild(e);g.delete(t)}(e)})))}}function S(t){t.disabled=!0}function C(t){t.disabled=!1}setTimeout((function(){window.ActiveStorage&&b()}),1),t.start=b,t.DirectUpload=f,Object.defineProperty(t,"__esModule",{value:!0})},"object"===s(e)&&"undefined"!==typeof t?a(e):(i=[e],void 0===(o="function"===typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},function(t,e,n){var r=n(2),i=n(3),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},function(t,e,n){var r=n(2),i=n(17);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(89),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},function(t,e,n){var r=n(2),i=n(87),o="__core-js_shared__",a=r[o]||i(o,{});t.exports=a},function(t,e,n){var r=n(30),i=n(89);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.3",mode:r?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(28),i=n(44),o=n(93),a=n(4);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(1);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,e,n){var r=n(5),i=n(10),o=n(4),a=n(58);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=r.length,u=0;s>u;)i.f(t,n=r[u++],e[n]);return t}},function(t,e,n){"use strict";var r=n(11),i=n(38),o=n(9);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){var r=n(7),i=n(63),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},function(t,e,n){var r={};r[n(7)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){"use strict";var r=n(0),i=n(132),o=n(29),a=n(47),s=n(31),u=n(17),c=n(15),l=n(7),h=n(30),f=n(63),d=n(133),p=d.IteratorPrototype,m=d.BUGGY_SAFARI_ITERATORS,v=l("iterator"),g="keys",y="values",b="entries",_=function(){return this};t.exports=function(t,e,n,l,d,w,x){i(n,e,l);var k,S,C,M=function(t){if(t===d&&P)return P;if(!m&&t in A)return A[t];switch(t){case g:case y:case b:return function(){return new n(this,t)}}return function(){return new n(this)}},E=e+" Iterator",T=!1,A=t.prototype,O=A[v]||A["@@iterator"]||d&&A[d],P=!m&&O||M(d),L="Array"==e&&A.entries||O;if(L&&(k=o(L.call(new t)),p!==Object.prototype&&k.next&&(h||o(k)===p||(a?a(k,p):"function"!=typeof k[v]&&u(k,v,_)),s(k,E,!0,!0),h&&(f[E]=_))),d==y&&O&&O.name!==y&&(T=!0,P=function(){return O.call(this)}),h&&!x||A[v]===P||u(A,v,P),f[e]=P,d)if(S={values:M(y),keys:w?P:M(g),entries:M(b)},x)for(C in S)(m||T||!(C in A))&&c(A,C,S[C]);else r({target:e,proto:!0,forced:m||T},S);return S}},function(t,e,n){var r=n(1);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e){t.exports="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView},function(t,e,n){var r=n(9),i=n(103),o=n(16),a=Math.ceil,s=function(t){return function(e,n,s){var u,c,l=String(o(e)),h=l.length,f=void 0===s?" ":String(s),d=r(n);return d<=h||""==f?l:(u=d-h,(c=i.call(f,a(u/f.length))).length>u&&(c=c.slice(0,u)),t?l+c:c+l)}};t.exports={start:s(!1),end:s(!0)}},function(t,e,n){"use strict";var r=n(24),i=n(16);t.exports="".repeat||function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var r,i,o,a=n(2),s=n(1),u=n(39),c=n(124),l=n(86),h=n(148),f=n(49),d=a.location,p=a.setImmediate,m=a.clearImmediate,v=a.process,g=a.MessageChannel,y=a.Dispatch,b=0,_={},w="onreadystatechange",x=function(t){if(_.hasOwnProperty(t)){var e=_[t];delete _[t],e()}},k=function(t){return function(){x(t)}},S=function(t){x(t.data)},C=function(t){a.postMessage(t+"",d.protocol+"//"+d.host)};p&&m||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return _[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(b),b},m=function(t){delete _[t]},f?r=function(t){v.nextTick(k(t))}:y&&y.now?r=function(t){y.now(k(t))}:g&&!h?(o=(i=new g).port2,i.port1.onmessage=S,r=u(o.postMessage,o,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&d&&"file:"!==d.protocol&&!s(C)?(r=C,a.addEventListener("message",S,!1)):r=w in l("script")?function(t){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),x(t)}}:function(t){setTimeout(k(t),0)}),t.exports={set:p,clear:m}},function(t,e,n){var r=n(3),i=n(37),o=n(7)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){"use strict";var r=n(1);function i(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,n){var r=n(106);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(7)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(i){}}return!1}},function(t,e,n){"use strict";var r=n(82).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(1),i=n(78);t.exports=function(t){return r((function(){return!!i[t]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[t]()||i[t].name!==t}))}},function(t,e,n){var r=n(2),i=n(1),o=n(71),a=n(8).NATIVE_ARRAY_BUFFER_VIEWS,s=r.ArrayBuffer,u=r.Int8Array;t.exports=!a||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!o((function(t){new u,new u(null),new u(1.5),new u(t)}),!0)||i((function(){return 1!==new u(new s(2),1,void 0).length}))},function(t,e){t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(t,e,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1},r.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach((function(t){t.enabled&&t.alt.forEach((function(t){e.indexOf(t)<0&&e.push(t)}))})),t.__cache__={},e.forEach((function(e){t.__cache__[e]=[],t.__rules__.forEach((function(n){n.enabled&&(e&&n.alt.indexOf(e)<0||t.__cache__[e].push(n.fn))}))}))},r.prototype.at=function(t,e,n){var r=this.__find__(t),i=n||{};if(-1===r)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=i.alt||[],this.__cache__=null},r.prototype.before=function(t,e,n,r){var i=this.__find__(t),o=r||{};if(-1===i)throw new Error("Parser rule not found: "+t);this.__rules__.splice(i,0,{name:e,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},r.prototype.after=function(t,e,n,r){var i=this.__find__(t),o=r||{};if(-1===i)throw new Error("Parser rule not found: "+t);this.__rules__.splice(i+1,0,{name:e,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},r.prototype.push=function(t,e,n){var r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null},r.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach((function(t){var r=this.__find__(t);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[r].enabled=!0,n.push(t)}),this),this.__cache__=null,n},r.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach((function(t){t.enabled=!1})),this.enable(t,e)},r.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach((function(t){var r=this.__find__(t);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[r].enabled=!1,n.push(t)}),this),this.__cache__=null,n},r.prototype.getRules=function(t){return null===this.__cache__&&this.__compile__(),this.__cache__[t]||[]},t.exports=r},function(t,e,n){"use strict";function r(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}r.prototype.attrIndex=function(t){var e,n,r;if(!this.attrs)return-1;for(n=0,r=(e=this.attrs).length;n<r;n++)if(e[n][0]===t)return n;return-1},r.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},r.prototype.attrSet=function(t,e){var n=this.attrIndex(t),r=[t,e];n<0?this.attrPush(r):this.attrs[n]=r},r.prototype.attrGet=function(t){var e=this.attrIndex(t),n=null;return e>=0&&(n=this.attrs[e][1]),n},r.prototype.attrJoin=function(t,e){var n=this.attrIndex(t);n<0?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e},t.exports=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],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}}),t.webpackPolyfill=1),t}},function(t,e,n){t.exports=n(162)},function(t,e,n){var r=n(5),i=n(1),o=n(86);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(2),i=n(88),o=r.WeakMap;t.exports="function"===typeof o&&/native code/.test(i(o))},function(t,e,n){var r=n(12),i=n(91),o=n(14),a=n(10);t.exports=function(t,e){for(var n=i(e),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(t,l)||s(t,l,u(e,l))}}},function(t,e,n){var r=n(2);t.exports=r},function(t,e,n){var r=n(12),i=n(19),o=n(56).indexOf,a=n(55);t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(94);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(28);t.exports=r("document","documentElement")},function(t,e,n){var r=n(19),i=n(44).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(e){return a.slice()}}(t):i(r(t))}},function(t,e,n){var r=n(7);e.f=r},function(t,e,n){"use strict";var r=n(11),i=n(38),o=n(9),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=r(this),s=o(n.length),u=i(t,s),c=i(e,s),l=arguments.length>2?arguments[2]:void 0,h=a((void 0===l?s:i(l,s))-c,s-u),f=1;for(c<u&&u<c+h&&(f=-1,c+=h-1,u+=h-1);h-- >0;)c in n?n[u]=n[c]:delete n[u],u+=f,c+=f;return n}},function(t,e,n){"use strict";var r=n(45),i=n(9),o=n(39),a=function(t,e,n,s,u,c,l,h){for(var f,d=u,p=0,m=!!l&&o(l,h,3);p<s;){if(p in n){if(f=m?m(n[p],p,e):n[p],c>0&&r(f))d=a(t,e,f,i(f.length),d,c-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[d]=f}d++}p++}return d};t.exports=a},function(t,e,n){"use strict";var r=n(13).forEach,i=n(34),o=n(18),a=i("forEach"),s=o("forEach");t.exports=a&&s?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var r=n(39),i=n(11),o=n(209),a=n(97),s=n(9),u=n(46),c=n(64);t.exports=function(t){var e,n,l,h,f,d,p=i(t),m="function"==typeof this?this:Array,v=arguments.length,g=v>1?arguments[1]:void 0,y=void 0!==g,b=c(p),_=0;if(y&&(g=r(g,v>2?arguments[2]:void 0,2)),void 0==b||m==Array&&a(b))for(n=new m(e=s(p.length));e>_;_++)d=y?g(p[_],_):p[_],u(n,_,d);else for(f=(h=b.call(p)).next,n=new m;!(l=f.call(h)).done;_++)d=y?o(h,g,[l.value,_],!0):l.value,u(n,_,d);return n.length=_,n}},function(t,e,n){var r=n(4);t.exports=function(t){var e=t.return;if(void 0!==e)return r(e.call(t)).value}},function(t,e,n){"use strict";var r=n(133).IteratorPrototype,i=n(33),o=n(36),a=n(31),s=n(63),u=function(){return this};t.exports=function(t,e,n){var c=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,c,!1,!0),s[c]=u,t}},function(t,e,n){"use strict";var r,i,o,a=n(1),s=n(29),u=n(17),c=n(12),l=n(7),h=n(30),f=l("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=s(s(o)))!==Object.prototype&&(r=i):d=!0);var p=void 0==r||a((function(){var t={};return r[f].call(t)!==t}));p&&(r={}),h&&!p||c(r,f)||u(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(t,e,n){var r=n(3);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,n){"use strict";var r=n(19),i=n(24),o=n(9),a=n(34),s=n(18),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,h=a("lastIndexOf"),f=s("indexOf",{ACCESSORS:!0,1:0}),d=l||!h||!f;t.exports=d?function(t){if(l)return c.apply(this,arguments)||0;var e=r(this),n=o(e.length),a=n-1;for(arguments.length>1&&(a=u(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}:c},function(t,e,n){var r=n(24),i=n(9);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length or index");return n}},function(t,e,n){"use strict";var r=n(25),i=n(3),o=[].slice,a={},s=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?s(e,r.length,r):e.apply(t,r)};return i(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e,n){"use strict";var r=n(10).f,i=n(33),o=n(51),a=n(39),s=n(41),u=n(67),c=n(99),l=n(50),h=n(5),f=n(48).fastKey,d=n(20),p=d.set,m=d.getterFor;t.exports={getConstructor:function(t,e,n,c){var l=t((function(t,r){s(t,l,e),p(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),h||(t.size=0),void 0!=r&&u(r,t[c],{that:t,AS_ENTRIES:n})})),d=m(e),v=function(t,e,n){var r,i,o=d(t),a=g(t,e);return a?a.value=n:(o.last=a={index:i=f(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),h?o.size++:t.size++,"F"!==i&&(o.index[i]=a)),t},g=function(t,e){var n,r=d(t),i=f(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return o(l.prototype,{clear:function(){for(var t=d(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,h?t.size=0:this.size=0},delete:function(t){var e=this,n=d(e),r=g(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),h?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=d(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!g(this,t)}}),o(l.prototype,n?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),h&&r(l.prototype,"size",{get:function(){return d(this).size}}),l},setStrong:function(t,e,n){var r=e+" Iterator",i=m(e),o=m(r);c(t,e,(function(t,e){p(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(e)}}},function(t,e){var n=Math.log;t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:n(1+t)}},function(t,e,n){var r=n(3),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(2),i=n(52).trim,o=n(78),a=r.parseFloat,s=1/a(o+"-0")!==-1/0;t.exports=s?function(t){var e=i(String(t)),n=a(e);return 0===n&&"-"==e.charAt(0)?-0:n}:a},function(t,e,n){var r=n(2),i=n(52).trim,o=n(78),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");t.exports=u?function(t,e){var n=i(String(t));return a(n,e>>>0||(s.test(n)?16:10))}:a},function(t,e,n){var r=n(37);t.exports=function(t){if("number"!=typeof t&&"Number"!=r(t))throw TypeError("Incorrect invocation");return+t}},function(t,e,n){"use strict";var r=n(5),i=n(1),o=n(58),a=n(93),s=n(69),u=n(11),c=n(53),l=Object.assign,h=Object.defineProperty;t.exports=!l||i((function(){if(r&&1!==l({b:1},l(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||o(l({},e)).join("")!=i}))?function(t,e){for(var n=u(t),i=arguments.length,l=1,h=a.f,f=s.f;i>l;)for(var d,p=c(arguments[l++]),m=h?o(p).concat(h(p)):o(p),v=m.length,g=0;v>g;)d=m[g++],r&&!f.call(p,d)||(n[d]=p[d]);return n}:l},function(t,e,n){var r=n(5),i=n(58),o=n(19),a=n(69).f,s=function(t){return function(e){for(var n,s=o(e),u=i(s),c=u.length,l=0,h=[];c>l;)n=u[l++],r&&!a.call(s,n)||h.push(t?[n,s[n]]:s[n]);return h}};t.exports={entries:s(!0),values:s(!1)}},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(2);t.exports=r.Promise},function(t,e,n){var r=n(62);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(t,e,n){var r,i,o,a,s,u,c,l,h=n(2),f=n(14).f,d=n(105).set,p=n(148),m=n(305),v=n(49),g=h.MutationObserver||h.WebKitMutationObserver,y=h.document,b=h.process,_=h.Promise,w=f(h,"queueMicrotask"),x=w&&w.value;x||(r=function(){var t,e;for(v&&(t=b.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(n){throw i?a():o=void 0,n}}o=void 0,t&&t.enter()},p||v||m||!g||!y?_&&_.resolve?(c=_.resolve(void 0),l=c.then,a=function(){l.call(c,r)}):a=v?function(){b.nextTick(r)}:function(){d.call(h,r)}:(s=!0,u=y.createTextNode(""),new g(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s})),t.exports=x||function(t){var e={fn:t,next:void 0};o&&(o.next=e),i||(i=e,a()),o=e}},function(t,e,n){var r=n(4),i=n(3),o=n(151);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(25),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},function(t,e,n){"use strict";var r=n(0),i=n(81);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(t,e,n){"use strict";var r=n(82).charAt,i=n(20),o=n(99),a="String Iterator",s=i.set,u=i.getterFor(a);o(String,"String",(function(t){s(this,{type:a,string:String(t),index:0})}),(function(){var t,e=u(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(62);t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(t,e,n){var r=n(357);t.exports=function(t,e){var n=r(t);if(n%e)throw RangeError("Wrong offset");return n}},function(t,e,n){var r=n(11),i=n(9),o=n(64),a=n(97),s=n(39),u=n(8).aTypedArrayConstructor;t.exports=function(t){var e,n,c,l,h,f,d=r(t),p=arguments.length,m=p>1?arguments[1]:void 0,v=void 0!==m,g=o(d);if(void 0!=g&&!a(g))for(f=(h=g.call(d)).next,d=[];!(l=f.call(h)).done;)d.push(l.value);for(v&&p>2&&(m=s(m,arguments[2],2)),n=i(d.length),c=new(u(this))(n),e=0;n>e;e++)c[e]=v?m(d[e],e):d[e];return c}},function(t,e,n){"use strict";var r=n(51),i=n(48).getWeakData,o=n(4),a=n(3),s=n(41),u=n(67),c=n(13),l=n(12),h=n(20),f=h.set,d=h.getterFor,p=c.find,m=c.findIndex,v=0,g=function(t){return t.frozen||(t.frozen=new y)},y=function(){this.entries=[]},b=function(t,e){return p(t.entries,(function(t){return t[0]===e}))};y.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=m(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,c){var h=t((function(t,r){s(t,h,e),f(t,{type:e,id:v++,frozen:void 0}),void 0!=r&&u(r,t[c],{that:t,AS_ENTRIES:n})})),p=d(e),m=function(t,e,n){var r=p(t),a=i(o(e),!0);return!0===a?g(r).set(e,n):a[r.id]=n,t};return r(h.prototype,{delete:function(t){var e=p(this);if(!a(t))return!1;var n=i(t);return!0===n?g(e).delete(t):n&&l(n,e.id)&&delete n[e.id]},has:function(t){var e=p(this);if(!a(t))return!1;var n=i(t);return!0===n?g(e).has(t):n&&l(n,e.id)}}),r(h.prototype,n?{get:function(t){var e=p(this);if(a(t)){var n=i(t);return!0===n?g(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return m(this,t,e)}}:{add:function(t){return m(this,t,!0)}}),h}}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){var r=n(1),i=n(7),o=n(30),a=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),o&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://\u0442\u0435\u0441\u0442").host||"#%D0%B1"!==new URL("http://a#\u0431").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";n(72);var r=n(0),i=n(28),o=n(159),a=n(15),s=n(51),u=n(31),c=n(132),l=n(20),h=n(41),f=n(12),d=n(39),p=n(65),m=n(4),v=n(3),g=n(33),y=n(36),b=n(400),_=n(64),w=n(7),x=i("fetch"),k=i("Headers"),S=w("iterator"),C="URLSearchParams",M="URLSearchParamsIterator",E=l.set,T=l.getterFor(C),A=l.getterFor(M),O=/\+/g,P=Array(4),L=function(t){return P[t-1]||(P[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},D=function(t){try{return decodeURIComponent(t)}catch(e){return t}},I=function(t){var e=t.replace(O," "),n=4;try{return decodeURIComponent(e)}catch(r){for(;n;)e=e.replace(L(n--),D);return e}},R=/[!'()~]|%20/g,N={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},z=function(t){return N[t]},j=function(t){return encodeURIComponent(t).replace(R,z)},B=function(t,e){if(e)for(var n,r,i=e.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),t.push({key:I(r.shift()),value:I(r.join("="))}))},F=function(t){this.entries.length=0,B(this.entries,t)},q=function(t,e){if(t<e)throw TypeError("Not enough arguments")},V=c((function(t,e){E(this,{type:M,iterator:b(T(t).entries),kind:e})}),"Iterator",(function(){var t=A(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),U=function(){h(this,U,C);var t,e,n,r,i,o,a,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,d=[];if(E(l,{type:C,entries:d,updateURL:function(){},updateSearchParams:F}),void 0!==c)if(v(c))if("function"===typeof(t=_(c)))for(n=(e=t.call(c)).next;!(r=n.call(e)).done;){if((a=(o=(i=b(m(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:a.value+"",value:s.value+""})}else for(u in c)f(c,u)&&d.push({key:u,value:c[u]+""});else B(d,"string"===typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},H=U.prototype;s(H,{append:function(t,e){q(arguments.length,2);var n=T(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){q(arguments.length,1);for(var e=T(this),n=e.entries,r=t+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){q(arguments.length,1);for(var e=T(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){q(arguments.length,1);for(var e=T(this).entries,n=t+"",r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){q(arguments.length,1);for(var e=T(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){q(arguments.length,1);for(var n,r=T(this),i=r.entries,o=!1,a=t+"",s=e+"",u=0;u<i.length;u++)(n=i[u]).key===a&&(o?i.splice(u--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var t,e,n,r=T(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(t=o[n],e=0;e<n;e++)if(i[e].key>t.key){i.splice(e,0,t);break}e===n&&i.push(t)}r.updateURL()},forEach:function(t){for(var e,n=T(this).entries,r=d(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new V(this,"keys")},values:function(){return new V(this,"values")},entries:function(){return new V(this,"entries")}},{enumerable:!0}),a(H,S,H.entries),a(H,"toString",(function(){for(var t,e=T(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(j(t.key)+"="+j(t.value));return n.join("&")}),{enumerable:!0}),u(U,C),r({global:!0,forced:!o},{URLSearchParams:U}),o||"function"!=typeof x||"function"!=typeof k||r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,r,i=[t];return arguments.length>1&&(v(e=arguments[1])&&(n=e.body,p(n)===C&&((r=e.headers?new k(e.headers):new k).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=g(e,{body:y(0,String(n)),headers:y(0,r)}))),i.push(e)),x.apply(this,i)}}),t.exports={URLSearchParams:U,getState:T}},function(t,e){function n(){}function r(t){this._tree=t,this._ancestors=[],this._cursor=null}n.prototype.clear=function(){this._root=null,this.size=0},n.prototype.find=function(t){for(var e=this._root;null!==e;){var n=this._comparator(t,e.data);if(0===n)return e.data;e=e.get_child(n>0)}return null},n.prototype.findIter=function(t){for(var e=this._root,n=this.iterator();null!==e;){var r=this._comparator(t,e.data);if(0===r)return n._cursor=e,n;n._ancestors.push(e),e=e.get_child(r>0)}return null},n.prototype.lowerBound=function(t){for(var e=this._root,n=this.iterator(),r=this._comparator;null!==e;){var i=r(t,e.data);if(0===i)return n._cursor=e,n;n._ancestors.push(e),e=e.get_child(i>0)}for(var o=n._ancestors.length-1;o>=0;--o)if(r(t,(e=n._ancestors[o]).data)<0)return n._cursor=e,n._ancestors.length=o,n;return n._ancestors.length=0,n},n.prototype.upperBound=function(t){for(var e=this.lowerBound(t),n=this._comparator;null!==e.data()&&0===n(e.data(),t);)e.next();return e},n.prototype.min=function(){var t=this._root;if(null===t)return null;for(;null!==t.left;)t=t.left;return t.data},n.prototype.max=function(){var t=this._root;if(null===t)return null;for(;null!==t.right;)t=t.right;return t.data},n.prototype.iterator=function(){return new r(this)},n.prototype.each=function(t){for(var e,n=this.iterator();null!==(e=n.next());)t(e)},n.prototype.reach=function(t){for(var e,n=this.iterator();null!==(e=n.prev());)t(e)},r.prototype.data=function(){return null!==this._cursor?this._cursor.data:null},r.prototype.next=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._minNode(t)}else{var e;if(null===this._cursor.right)do{if(e=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.right===e);else this._ancestors.push(this._cursor),this._minNode(this._cursor.right)}return null!==this._cursor?this._cursor.data:null},r.prototype.prev=function(){if(null===this._cursor){var t=this._tree._root;null!==t&&this._maxNode(t)}else{var e;if(null===this._cursor.left)do{if(e=this._cursor,!this._ancestors.length){this._cursor=null;break}this._cursor=this._ancestors.pop()}while(this._cursor.left===e);else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left)}return null!==this._cursor?this._cursor.data:null},r.prototype._minNode=function(t){for(;null!==t.left;)this._ancestors.push(t),t=t.left;this._cursor=t},r.prototype._maxNode=function(t){for(;null!==t.right;)this._ancestors.push(t),t=t.right;this._cursor=t},t.exports=n},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new T(r||[]);return o._invoke=function(t,e,n){var r=h;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?p:f,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=c;var h="suspendedStart",f="suspendedYield",d="executing",p="completed",m={};function v(){}function g(){}function y(){}var b={};b[o]=function(){return this};var _=Object.getPrototypeOf,w=_&&_(_(A([])));w&&w!==n&&r.call(w,o)&&(b=w);var x=y.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"===typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function C(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function A(t){if(t){var n=t[o];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:O}}function O(){return{value:e,done:!0}}return g.prototype=x.constructor=y,y.constructor=g,g.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,s,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(S.prototype),S.prototype[a]=function(){return this},t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,s,"Generator"),x[o]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){},function(t,e,n){t.exports=n.p+"media/images/marker-icon-2x-680f69f3.png"},function(t,e,n){t.exports=n.p+"media/images/marker-icon-2b3e1faf.png"},function(t,e,n){t.exports=n.p+"media/images/marker-shadow-a0c6cc14.png"},function(t,e,n){"use strict";t.exports=n(419)},function(t,e,n){"use strict";t.exports.encode=n(420),t.exports.decode=n(421),t.exports.format=n(422),t.exports.parse=n(423)},function(t,e){t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(t,e){t.exports=/[\0-\x1F\x7F-\x9F]/},function(t,e){t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(t,e,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",o=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),a=new RegExp("^(?:"+r+"|"+i+")");t.exports.HTML_TAG_RE=o,t.exports.HTML_OPEN_CLOSE_TAG_RE=a},function(t,e,n){"use strict";function r(t,e){var n,r,i,o,a,s=[],u=e.length;for(n=0;n<u;n++)126===(i=e[n]).marker&&-1!==i.end&&(o=e[i.end],(a=t.tokens[i.token]).type="s_open",a.tag="s",a.nesting=1,a.markup="~~",a.content="",(a=t.tokens[o.token]).type="s_close",a.tag="s",a.nesting=-1,a.markup="~~",a.content="","text"===t.tokens[o.token-1].type&&"~"===t.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<t.tokens.length&&"s_close"===t.tokens[r].type;)r++;n!==--r&&(a=t.tokens[r],t.tokens[r]=t.tokens[n],t.tokens[n]=a)}}t.exports.tokenize=function(t,e){var n,r,i,o,a=t.pos,s=t.src.charCodeAt(a);if(e)return!1;if(126!==s)return!1;if(i=(r=t.scanDelims(t.pos,!0)).length,o=String.fromCharCode(s),i<2)return!1;for(i%2&&(t.push("text","",0).content=o,i--),n=0;n<i;n+=2)t.push("text","",0).content=o+o,t.delimiters.push({marker:s,length:0,jump:n,token:t.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return t.pos+=r.length,!0},t.exports.postProcess=function(t){var e,n=t.tokens_meta,i=t.tokens_meta.length;for(r(t,t.delimiters),e=0;e<i;e++)n[e]&&n[e].delimiters&&r(t,n[e].delimiters)}},function(t,e,n){"use strict";function r(t,e){var n,r,i,o,a,s;for(n=e.length-1;n>=0;n--)95!==(r=e[n]).marker&&42!==r.marker||-1!==r.end&&(i=e[r.end],s=n>0&&e[n-1].end===r.end+1&&e[n-1].token===r.token-1&&e[r.end+1].token===i.token+1&&e[n-1].marker===r.marker,a=String.fromCharCode(r.marker),(o=t.tokens[r.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=t.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--))}t.exports.tokenize=function(t,e){var n,r,i=t.pos,o=t.src.charCodeAt(i);if(e)return!1;if(95!==o&&42!==o)return!1;for(r=t.scanDelims(t.pos,42===o),n=0;n<r.length;n++)t.push("text","",0).content=String.fromCharCode(o),t.delimiters.push({marker:o,length:r.length,jump:n,token:t.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return t.pos+=r.length,!0},t.exports.postProcess=function(t){var e,n=t.tokens_meta,i=t.tokens_meta.length;for(r(t,t.delimiters),e=0;e<i;e++)n[e]&&n[e].delimiters&&r(t,n[e].delimiters)}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,n){"use strict";e.a=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}},function(t,e,n){"use strict";function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.a=function(t){return new this((function(e,n){if(!t||"undefined"===typeof t.length)return n(new TypeError(r(t)+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var i=Array.prototype.slice.call(t);if(0===i.length)return e([]);var o=i.length;function a(t,n){if(n&&("object"===r(n)||"function"===typeof n)){var s=n.then;if("function"===typeof s)return void s.call(n,(function(e){a(t,e)}),(function(n){i[t]={status:"rejected",reason:n},0===--o&&e(i)}))}i[t]={status:"fulfilled",value:n},0===--o&&e(i)}for(var s=0;s<i.length;s++)a(s,i[s])}))}},function(t,e,n){var r,i,o;!function(a,s){"use strict";i=[n(405)],void 0===(o="function"===typeof(r=function(t){var e=/(^|@)\S+:\d+/,n=/^\s*at .*(\S+:\d+|\(native\))/m,r=/^(eval@)?(\[native code])?$/;return{parse:function(t){if("undefined"!==typeof t.stacktrace||"undefined"!==typeof t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(n))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(t){return!!t.match(n)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=n.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(n=r?n.replace(r[0],""):n).split(/\s+/).slice(1),o=this.extractLocation(r?r[1]:i.pop()),a=i.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(o[0])>-1?void 0:o[0];return new t({functionName:a,fileName:s,lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(r)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(n),i=r&&r[1]?r[1]:void 0,o=this.extractLocation(e.replace(n,""));return new t({functionName:i,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),i=[],o=2,a=r.length;o<a;o+=2){var s=n.exec(r[o]);s&&i.push(new t({fileName:s[2],lineNumber:s[1],source:r[o]}))}return i},parseOpera10:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),i=[],o=0,a=r.length;o<a;o+=2){var s=n.exec(r[o]);s&&i.push(new t({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:r[o]}))}return i},parseOpera11:function(n){return n.stack.split("\n").filter((function(t){return!!t.match(e)&&!t.match(/^Error created at/)}),this).map((function(e){var n,r=e.split("@"),i=this.extractLocation(r.pop()),o=r.shift()||"",a=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;o.match(/\(([^)]*)\)/)&&(n=o.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new t({functionName:a,args:s,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)}}})?r.apply(e,i):r)||(t.exports=o)}()},function(t,e){var n=function(t){function e(){this.fetch=!1,this.DOMException=t.DOMException}return e.prototype=t,new e}("undefined"!==typeof self?self:this);!function(t){!function(e){var n="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,a="ArrayBuffer"in t;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!==typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!==typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function f(t){this.map={},t instanceof f?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function m(t){var e=new FileReader,n=p(e);return e.readAsArrayBuffer(t),n}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"===typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"===typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var t,e,n,r=d(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=p(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(t,e){t=c(t),e=l(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},f.prototype.delete=function(t){delete this.map[c(t)]},f.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},f.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},f.prototype.set=function(t,e){this.map[c(t)]=l(e)},f.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},f.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),h(t)},f.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},f.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),h(t)},r&&(f.prototype[Symbol.iterator]=f.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(t,e){var n,r,i=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new f(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new f(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),y.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new f(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];w.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(S){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function k(t,n){return new Promise((function(r,o){var a=new b(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new f,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new w(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send("undefined"===typeof a._bodyInit?null:a._bodyInit)}))}k.polyfill=!0,t.fetch||(t.fetch=k,t.Headers=f,t.Request=b,t.Response=w),e.Headers=f,e.Request=b,e.Response=w,e.fetch=k}({})}(n),delete n.fetch.polyfill,(e=n.fetch).default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,t.exports=e},function(t,e,n){"use strict";t.exports=n(418)},function(t,e,n){(function(t){var r,i;function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}(function(){(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(this);var a=this.Rails;(function(){(function(){var t;t=null,a.loadCSPNonce=function(){var e;return t=null!=(e=document.querySelector("meta[name=csp-nonce]"))?e.content:void 0},a.cspNonce=function(){return null!=t?t:a.loadCSPNonce()}}).call(this),function(){var t;t=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,a.matches=function(e,n){return null!=n.exclude?t.call(e,n.selector)&&!t.call(e,n.exclude):t.call(e,n)},a.getData=function(t,e){var n;return null!=(n=t._ujsData)?n[e]:void 0},a.setData=function(t,e,n){return null==t._ujsData&&(t._ujsData={}),t._ujsData[e]=n},a.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}.call(this),function(){var t,e,n;t=a.$,n=a.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},e=a.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},a.CSRFProtection=function(t){var e;if(null!=(e=n()))return t.setRequestHeader("X-CSRF-Token",e)},a.refreshCSRFTokens=function(){var r,i;if(i=n(),r=e(),null!=i&&null!=r)return t('form input[name="'+r+'"]').forEach((function(t){return t.value=i}))}}.call(this),function(){var t,e,n,r;n=a.matches,"function"!==typeof(t=window.CustomEvent)&&((t=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,r=t.prototype.preventDefault,t.prototype.preventDefault=function(){var t;return t=r.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),t}),e=a.fire=function(e,n,r){var i;return i=new t(n,{bubbles:!0,cancelable:!0,detail:r}),e.dispatchEvent(i),!i.defaultPrevented},a.stopEverything=function(t){return e(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},a.delegate=function(t,e,r,i){return t.addEventListener(r,(function(t){var r;for(r=t.target;r instanceof Element&&!n(r,e);)r=r.parentNode;if(r instanceof Element&&!1===i.call(r,t))return t.preventDefault(),t.stopPropagation()}))}}.call(this),function(){var t,e,n,r,i,o;r=a.cspNonce,e=a.CSRFProtection,a.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},a.ajax=function(t){var e;return t=i(t),e=n(t,(function(){var n,r;return r=o(null!=(n=e.response)?n:e.responseText,e.getResponseHeader("Content-Type")),2===Math.floor(e.status/100)?"function"===typeof t.success&&t.success(r,e.statusText,e):"function"===typeof t.error&&t.error(r,e.statusText,e),"function"===typeof t.complete?t.complete(e,e.statusText):void 0})),!(null!=t.beforeSend&&!t.beforeSend(e,t))&&(e.readyState===XMLHttpRequest.OPENED?e.send(t.data):void 0)},i=function(e){return e.url=e.url||location.href,e.type=e.type.toUpperCase(),"GET"===e.type&&e.data&&(e.url.indexOf("?")<0?e.url+="?"+e.data:e.url+="&"+e.data),null==t[e.dataType]&&(e.dataType="*"),e.accept=t[e.dataType],"*"!==e.dataType&&(e.accept+=", */*; q=0.01"),e},n=function(t,n){var r;return(r=new XMLHttpRequest).open(t.type,t.url,!0),r.setRequestHeader("Accept",t.accept),"string"===typeof t.data&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||(r.setRequestHeader("X-Requested-With","XMLHttpRequest"),e(r)),r.withCredentials=!!t.withCredentials,r.onreadystatechange=function(){if(r.readyState===XMLHttpRequest.DONE)return n(r)},r},o=function(t,e){var n,i;if("string"===typeof t&&"string"===typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(o){}else if(e.match(/\b(?:java|ecma)script\b/))(i=document.createElement("script")).setAttribute("nonce",r()),i.text=t,document.head.appendChild(i).parentNode.removeChild(i);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(o){}}return t},a.href=function(t){return t.href},a.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host===n.protocol+"//"+n.host)}catch(r){return r,!0}}}.call(this),function(){var t,e;t=a.matches,e=function(t){return Array.prototype.slice.call(t)},a.serializeElement=function(n,r){var i,o;return i=[n],t(n,"form")&&(i=e(n.elements)),o=[],i.forEach((function(n){if(n.name&&!n.disabled&&!t(n,"fieldset[disabled] *"))return t(n,"select")?e(n.options).forEach((function(t){if(t.selected)return o.push({name:n.name,value:t.value})})):n.checked||-1===["radio","checkbox","submit"].indexOf(n.type)?o.push({name:n.name,value:n.value}):void 0})),r&&o.push(r),o.map((function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t})).join("&")},a.formElements=function(n,r){return t(n,"form")?e(n.elements).filter((function(e){return t(e,r)})):e(n.querySelectorAll(r))}}.call(this),function(){var t,e,n;e=a.fire,n=a.stopEverything,a.handleConfirm=function(e){if(!t(this))return n(e)},a.confirm=function(t,e){return confirm(t)},t=function(t){var n,r,i;if(!(i=t.getAttribute("data-confirm")))return!0;if(n=!1,e(t,"confirm")){try{n=a.confirm(i,t)}catch(o){}r=e(t,"confirm:complete",[n])}return n&&r}}.call(this),function(){var t,e,n,r,i,o,s,u,c,l,h,f;l=a.matches,u=a.getData,h=a.setData,f=a.stopEverything,s=a.formElements,a.handleDisabledElement=function(t){if(this,this.disabled)return f(t)},a.enableElement=function(t){var e;if(t instanceof Event){if(c(t))return;e=t.target}else e=t;return l(e,a.linkDisableSelector)?o(e):l(e,a.buttonDisableSelector)||l(e,a.formEnableSelector)?r(e):l(e,a.formSubmitSelector)?i(e):void 0},a.disableElement=function(r){var i;return i=r instanceof Event?r.target:r,l(i,a.linkDisableSelector)?n(i):l(i,a.buttonDisableSelector)||l(i,a.formDisableSelector)?t(i):l(i,a.formSubmitSelector)?e(i):void 0},n=function(t){var e;if(!u(t,"ujs:disabled"))return null!=(e=t.getAttribute("data-disable-with"))&&(h(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",f),h(t,"ujs:disabled",!0)},o=function(t){var e;return null!=(e=u(t,"ujs:enable-with"))&&(t.innerHTML=e,h(t,"ujs:enable-with",null)),t.removeEventListener("click",f),h(t,"ujs:disabled",null)},e=function(e){return s(e,a.formDisableSelector).forEach(t)},t=function(t){var e;if(!u(t,"ujs:disabled"))return null!=(e=t.getAttribute("data-disable-with"))&&(l(t,"button")?(h(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(h(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,h(t,"ujs:disabled",!0)},i=function(t){return s(t,a.formEnableSelector).forEach(r)},r=function(t){var e;return null!=(e=u(t,"ujs:enable-with"))&&(l(t,"button")?t.innerHTML=e:t.value=e,h(t,"ujs:enable-with",null)),t.disabled=!1,h(t,"ujs:disabled",null)},c=function(t){var e,n;return null!=(null!=(n=null!=(e=t.detail)?e[0]:void 0)?n.getResponseHeader("X-Xhr-Redirect"):void 0)}}.call(this),function(){var t;t=a.stopEverything,a.handleMethod=function(e){var n,r,i,o,s,u,c;if(c=(u=this).getAttribute("data-method"))return s=a.href(u),r=a.csrfToken(),n=a.csrfParam(),i=document.createElement("form"),o="<input name='_method' value='"+c+"' type='hidden' />",null==n||null==r||a.isCrossDomain(s)||(o+="<input name='"+n+"' value='"+r+"' type='hidden' />"),o+='<input type="submit" />',i.method="post",i.action=s,i.target=u.target,i.innerHTML=o,i.style.display="none",document.body.appendChild(i),i.querySelector('[type="submit"]').click(),t(e)}}.call(this),function(){var t,e,n,r,i,o,s,u,c,l=[].slice;o=a.matches,n=a.getData,u=a.setData,e=a.fire,c=a.stopEverything,t=a.ajax,r=a.isCrossDomain,s=a.serializeElement,i=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},a.handleRemote=function(h){var f,d,p,m,v,g,y;return!i(m=this)||(e(m,"ajax:before")?(y=m.getAttribute("data-with-credentials"),p=m.getAttribute("data-type")||"script",o(m,a.formSubmitSelector)?(f=n(m,"ujs:submit-button"),v=n(m,"ujs:submit-button-formmethod")||m.method,g=n(m,"ujs:submit-button-formaction")||m.getAttribute("action")||location.href,"GET"===v.toUpperCase()&&(g=g.replace(/\?.*$/,"")),"multipart/form-data"===m.enctype?(d=new FormData(m),null!=f&&d.append(f.name,f.value)):d=s(m,f),u(m,"ujs:submit-button",null),u(m,"ujs:submit-button-formmethod",null),u(m,"ujs:submit-button-formaction",null)):o(m,a.buttonClickSelector)||o(m,a.inputChangeSelector)?(v=m.getAttribute("data-method"),g=m.getAttribute("data-url"),d=s(m,m.getAttribute("data-params"))):(v=m.getAttribute("data-method"),g=a.href(m),d=m.getAttribute("data-params")),t({type:v||"GET",url:g,data:d,dataType:p,beforeSend:function(t,n){return e(m,"ajax:beforeSend",[t,n])?e(m,"ajax:send",[t]):(e(m,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?l.call(arguments,0):[],e(m,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?l.call(arguments,0):[],e(m,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?l.call(arguments,0):[],e(m,"ajax:complete",t)},crossDomain:r(g),withCredentials:null!=y&&"false"!==y}),c(h)):(e(m,"ajax:stopped"),!1))},a.formSubmitButtonClick=function(t){var e,n;if(n=(e=this).form)return e.name&&u(n,"ujs:submit-button",{name:e.name,value:e.value}),u(n,"ujs:formnovalidate-button",e.formNoValidate),u(n,"ujs:submit-button-formaction",e.getAttribute("formaction")),u(n,"ujs:submit-button-formmethod",e.getAttribute("formmethod"))},a.preventInsignificantClick=function(t){var e,n,r;if(this,r=(this.getAttribute("data-method")||"GET").toUpperCase(),e=this.getAttribute("data-params"),n=(t.metaKey||t.ctrlKey)&&"GET"===r&&!e,null!=t.button&&0!==t.button||n)return t.stopImmediatePropagation()}}.call(this),function(){var t,e,n,r,i,o,s,u,c,l,h,f,d,p,m;if(o=a.fire,n=a.delegate,u=a.getData,t=a.$,m=a.refreshCSRFTokens,e=a.CSRFProtection,d=a.loadCSPNonce,i=a.enableElement,r=a.disableElement,l=a.handleDisabledElement,c=a.handleConfirm,p=a.preventInsignificantClick,f=a.handleRemote,s=a.formSubmitButtonClick,h=a.handleMethod,"undefined"!==typeof jQuery&&null!==jQuery&&null!=jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=a,jQuery.ajaxPrefilter((function(t,n,r){if(!t.crossDomain)return e(r)}))}a.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",(function(){return t(a.formEnableSelector).forEach((function(t){if(u(t,"ujs:disabled"))return i(t)})),t(a.linkDisableSelector).forEach((function(t){if(u(t,"ujs:disabled"))return i(t)}))})),n(document,a.linkDisableSelector,"ajax:complete",i),n(document,a.linkDisableSelector,"ajax:stopped",i),n(document,a.buttonDisableSelector,"ajax:complete",i),n(document,a.buttonDisableSelector,"ajax:stopped",i),n(document,a.linkClickSelector,"click",p),n(document,a.linkClickSelector,"click",l),n(document,a.linkClickSelector,"click",c),n(document,a.linkClickSelector,"click",r),n(document,a.linkClickSelector,"click",f),n(document,a.linkClickSelector,"click",h),n(document,a.buttonClickSelector,"click",p),n(document,a.buttonClickSelector,"click",l),n(document,a.buttonClickSelector,"click",c),n(document,a.buttonClickSelector,"click",r),n(document,a.buttonClickSelector,"click",f),n(document,a.inputChangeSelector,"change",l),n(document,a.inputChangeSelector,"change",c),n(document,a.inputChangeSelector,"change",f),n(document,a.formSubmitSelector,"submit",l),n(document,a.formSubmitSelector,"submit",c),n(document,a.formSubmitSelector,"submit",f),n(document,a.formSubmitSelector,"submit",(function(t){return setTimeout((function(){return r(t)}),13)})),n(document,a.formSubmitSelector,"ajax:send",r),n(document,a.formSubmitSelector,"ajax:complete",i),n(document,a.formInputClickSelector,"click",p),n(document,a.formInputClickSelector,"click",l),n(document,a.formInputClickSelector,"click",c),n(document,a.formInputClickSelector,"click",s),document.addEventListener("DOMContentLoaded",m),document.addEventListener("DOMContentLoaded",d),window._rails_loaded=!0},window.Rails===a&&o(document,"rails:attachBindings")&&a.start()}.call(this)}).call(this),"object"===o(t)&&t.exports?t.exports=a:void 0===(i="function"===typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)}).call(this)}).call(this,n(116)(t))},function(t,e,n){(function(t){var r,i;function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}(function(){(function(){(function(){this.Turbolinks={supported:null!=window.history.pushState&&null!=window.requestAnimationFrame&&null!=window.addEventListener,visit:function(t,e){return a.controller.visit(t,e)},clearCache:function(){return a.controller.clearCache()},setProgressBarDelay:function(t){return a.controller.setProgressBarDelay(t)}}}).call(this)}).call(this);var a=this.Turbolinks;(function(){(function(){var t,e,n,r=[].slice;a.copyObject=function(t){var e,n,r;for(e in n={},t)r=t[e],n[e]=r;return n},a.closest=function(e,n){return t.call(e,n)},t=function(){var t;return null!=(t=document.documentElement.closest)?t:function(t){var n;for(n=this;n;){if(n.nodeType===Node.ELEMENT_NODE&&e.call(n,t))return n;n=n.parentNode}}}(),a.defer=function(t){return setTimeout(t,1)},a.throttle=function(t){var e;return e=null,function(){var n;return n=1<=arguments.length?r.call(arguments,0):[],null!=e?e:e=requestAnimationFrame(function(r){return function(){return e=null,t.apply(r,n)}}(this))}},a.dispatch=function(t,e){var r,i,o,a,s,u;return u=(s=null!=e?e:{}).target,r=s.cancelable,i=s.data,(o=document.createEvent("Events")).initEvent(t,!0,!0===r),o.data=null!=i?i:{},o.cancelable&&!n&&(a=o.preventDefault,o.preventDefault=function(){return this.defaultPrevented||Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),a.call(this)}),(null!=u?u:document).dispatchEvent(o),o},n=function(){var t;return(t=document.createEvent("Events")).initEvent("test",!0,!0),t.preventDefault(),t.defaultPrevented}(),a.match=function(t,n){return e.call(t,n)},e=function(){var t,e,n,r;return null!=(e=null!=(n=null!=(r=(t=document.documentElement).matchesSelector)?r:t.webkitMatchesSelector)?n:t.msMatchesSelector)?e:t.mozMatchesSelector}(),a.uuid=function(){var t,e,n;for(n="",t=e=1;36>=e;t=++e)n+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return n}}).call(this),function(){a.Location=function(){function t(t){var e,n;null==t&&(t=""),(n=document.createElement("a")).href=t.toString(),this.absoluteURL=n.href,2>(e=n.hash.length)?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=n.hash.slice(1))}var e,n,r,i;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.requestURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=n(t),this.isEqualTo(t)||i(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},n=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return r(t,"/")?t:t+"/"},i=function(t,e){return t.slice(0,e.length)===e},r=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};a.HttpRequest=function(){function e(e,n,r){this.delegate=e,this.requestCanceled=t(this.requestCanceled,this),this.requestTimedOut=t(this.requestTimedOut,this),this.requestFailed=t(this.requestFailed,this),this.requestLoaded=t(this.requestLoaded,this),this.requestProgressed=t(this.requestProgressed,this),this.url=a.Location.wrap(n).requestURL,this.referrer=a.Location.wrap(r).absoluteURL,this.createXHR()}return e.NETWORK_FAILURE=0,e.TIMEOUT_FAILURE=-1,e.timeout=60,e.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},e.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},e.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},e.prototype.requestLoaded=function(){return this.endRequest(function(t){return function(){var e;return 200<=(e=t.xhr.status)&&300>e?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}}(this))},e.prototype.requestFailed=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}}(this))},e.prototype.requestTimedOut=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}}(this))},e.prototype.requestCanceled=function(){return this.endRequest()},e.prototype.notifyApplicationBeforeRequestStart=function(){return a.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},e.prototype.notifyApplicationAfterRequestEnd=function(){return a.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},e.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},e.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},e.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},e.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},e}()}.call(this),function(){a.ProgressBar=function(){function t(){this.trickle=function(t,e){return function(){return t.apply(e,arguments)}}(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var e;return e=300,t.defaultCSS=".turbolinks-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 9999;\n transition: width 300ms ease-out, opacity 150ms 150ms ease-in;\n transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(t){return function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}}(this))):void 0},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,450)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,e)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame(function(t){return function(){return t.progressElement.style.width=10+90*t.value+"%"}}(this))},t.prototype.createStylesheetElement=function(){var t;return(t=document.createElement("style")).type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return(t=document.createElement("div")).className="turbolinks-progress-bar",t},t}()}.call(this),function(){a.BrowserAdapter=function(){function t(t){this.controller=t,this.showProgressBar=function(t,e){return function(){return t.apply(e,arguments)}}(this.showProgressBar,this),this.progressBar=new a.ProgressBar}var e,n,r;return r=a.HttpRequest,e=r.NETWORK_FAILURE,n=r.TIMEOUT_FAILURE,t.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},t.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},t.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},t.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},t.prototype.visitRequestCompleted=function(t){return t.loadResponse()},t.prototype.visitRequestFailedWithStatusCode=function(t,r){switch(r){case e:case n:return this.reload();default:return t.loadResponse()}},t.prototype.visitRequestFinished=function(t){return this.hideProgressBar()},t.prototype.visitCompleted=function(t){return t.followRedirect()},t.prototype.pageInvalidated=function(){return this.reload()},t.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,this.controller.progressBarDelay)},t.prototype.showProgressBar=function(){return this.progressBar.show()},t.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},t.prototype.reload=function(){return window.location.reload()},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};a.History=function(){function e(e){this.delegate=e,this.onPageLoad=t(this.onPageLoad,this),this.onPopState=t(this.onPopState,this)}return e.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},e.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1):void 0},e.prototype.push=function(t,e){return t=a.Location.wrap(t),this.update("push",t,e)},e.prototype.replace=function(t,e){return t=a.Location.wrap(t),this.update("replace",t,e)},e.prototype.onPopState=function(t){var e,n,r,i;return this.shouldHandlePopState()&&(i=null!=(n=t.state)?n.turbolinks:void 0)?(e=a.Location.wrap(window.location),r=i.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(e,r)):void 0},e.prototype.onPageLoad=function(t){return a.defer(function(t){return function(){return t.pageLoaded=!0}}(this))},e.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},e.prototype.pageIsLoaded=function(){return this.pageLoaded||"complete"===document.readyState},e.prototype.update=function(t,e,n){var r;return r={turbolinks:{restorationIdentifier:n}},history[t+"State"](r,null,e)},e}()}.call(this),function(){a.HeadDetails=function(){function t(t){var e,n,r,a,s;for(this.elements={},n=0,a=t.length;a>n;n++)(s=t[n]).nodeType===Node.ELEMENT_NODE&&(r=s.outerHTML,(null!=(e=this.elements)[r]?e[r]:e[r]={type:o(s),tracked:i(s),elements:[]}).elements.push(s))}var e,n,r,i,o;return t.fromHeadElement=function(t){var e;return new this(null!=(e=null!=t?t.childNodes:void 0)?e:[])},t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var t;return function(){var e,n;for(t in n=[],e=this.elements)e[t].tracked&&n.push(t);return n}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var n,r,i,o,a,s;for(r in a=[],i=this.elements)s=(o=i[r]).type,n=o.elements,s!==t||e.hasElementWithKey(r)||a.push(n[0]);return a},t.prototype.getProvisionalElements=function(){var t,e,n,r,i,o,a;for(e in n=[],r=this.elements)a=(i=r[e]).type,o=i.tracked,t=i.elements,null!=a||o?t.length>1&&n.push.apply(n,t.slice(1)):n.push.apply(n,t);return n},t.prototype.getMetaValue=function(t){var e;return null!=(e=this.findMetaElementByName(t))?e.getAttribute("content"):void 0},t.prototype.findMetaElementByName=function(t){var n,r,i,o;for(i in n=void 0,o=this.elements)r=o[i].elements,e(r[0],t)&&(n=r[0]);return n},o=function(t){return n(t)?"script":r(t)?"stylesheet":void 0},i=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},n=function(t){return"script"===t.tagName.toLowerCase()},r=function(t){var e;return"style"===(e=t.tagName.toLowerCase())||"link"===e&&"stylesheet"===t.getAttribute("rel")},e=function(t,e){return"meta"===t.tagName.toLowerCase()&&t.getAttribute("name")===e},t}()}.call(this),function(){a.Snapshot=function(){function t(t,e){this.headDetails=t,this.bodyElement=e}return t.wrap=function(t){return t instanceof this?t:"string"==typeof t?this.fromHTMLString(t):this.fromHTMLElement(t)},t.fromHTMLString=function(t){var e;return(e=document.createElement("html")).innerHTML=t,this.fromHTMLElement(e)},t.fromHTMLElement=function(t){var e,n,r;return n=t.querySelector("head"),e=null!=(r=t.querySelector("body"))?r:document.createElement("body"),new this(a.HeadDetails.fromHeadElement(n),e)},t.prototype.clone=function(){return new this.constructor(this.headDetails,this.bodyElement.cloneNode(!0))},t.prototype.getRootLocation=function(){var t,e;return e=null!=(t=this.getSetting("root"))?t:"/",new a.Location(e)},t.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},t.prototype.getElementForAnchor=function(t){try{return this.bodyElement.querySelector("[id='"+t+"'], a[name='"+t+"']")}catch(a){}},t.prototype.getPermanentElements=function(){return this.bodyElement.querySelectorAll("[id][data-turbolinks-permanent]")},t.prototype.getPermanentElementById=function(t){return this.bodyElement.querySelector("#"+t+"[data-turbolinks-permanent]")},t.prototype.getPermanentElementsPresentInSnapshot=function(t){var e,n,r,i,o;for(o=[],n=0,r=(i=this.getPermanentElements()).length;r>n;n++)e=i[n],t.getPermanentElementById(e.id)&&o.push(e);return o},t.prototype.findFirstAutofocusableElement=function(){return this.bodyElement.querySelector("[autofocus]")},t.prototype.hasAnchor=function(t){return null!=this.getElementForAnchor(t)},t.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},t.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},t.prototype.isVisitable=function(){return"reload"!==this.getSetting("visit-control")},t.prototype.getSetting=function(t){return this.headDetails.getMetaValue("turbolinks-"+t)},t}()}.call(this),function(){var t=[].slice;a.Renderer=function(){function e(){}var n;return e.render=function(){var e,n,r;return n=arguments[0],e=arguments[1],(r=function(t,e,n){n.prototype=t.prototype;var r=new n,i=t.apply(r,e);return Object(i)===i?i:r}(this,3<=arguments.length?t.call(arguments,2):[],(function(){}))).delegate=n,r.render(e),r},e.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},e.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},e.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:((e=document.createElement("script")).textContent=t.textContent,e.async=!1,n(e,t),e)},n=function(t,e){var n,r,i,o,a,s,u;for(s=[],n=0,r=(o=e.attributes).length;r>n;n++)i=(a=o[n]).name,u=a.value,s.push(t.setAttribute(i,u));return s},e}()}.call(this),function(){var t,e,n=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},r={}.hasOwnProperty;a.SnapshotRenderer=function(r){function i(t,e,n){this.currentSnapshot=t,this.newSnapshot=e,this.isPreview=n,this.currentHeadDetails=this.currentSnapshot.headDetails,this.newHeadDetails=this.newSnapshot.headDetails,this.currentBody=this.currentSnapshot.bodyElement,this.newBody=this.newSnapshot.bodyElement}return n(i,r),i.prototype.render=function(t){return this.shouldRender()?(this.mergeHead(),this.renderView(function(e){return function(){return e.replaceBody(),e.isPreview||e.focusFirstAutofocusableElement(),t()}}(this))):this.invalidateView()},i.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},i.prototype.replaceBody=function(){var t;return t=this.relocateCurrentBodyPermanentElements(),this.activateNewBodyScriptElements(),this.assignNewBody(),this.replacePlaceholderElementsWithClonedPermanentElements(t)},i.prototype.shouldRender=function(){return this.newSnapshot.isVisitable()&&this.trackedElementsAreIdentical()},i.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},i.prototype.copyNewHeadStylesheetElements=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.getNewHeadStylesheetElements()).length;n>e;e++)t=r[e],i.push(document.head.appendChild(t));return i},i.prototype.copyNewHeadScriptElements=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.getNewHeadScriptElements()).length;n>e;e++)t=r[e],i.push(document.head.appendChild(this.createScriptElement(t)));return i},i.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.getCurrentHeadProvisionalElements()).length;n>e;e++)t=r[e],i.push(document.head.removeChild(t));return i},i.prototype.copyNewHeadProvisionalElements=function(){var t,e,n,r,i;for(i=[],e=0,n=(r=this.getNewHeadProvisionalElements()).length;n>e;e++)t=r[e],i.push(document.head.appendChild(t));return i},i.prototype.relocateCurrentBodyPermanentElements=function(){var n,r,i,o,a,s,u;for(u=[],n=0,r=(s=this.getCurrentBodyPermanentElements()).length;r>n;n++)o=s[n],a=t(o),i=this.newSnapshot.getPermanentElementById(o.id),e(o,a.element),e(i,o),u.push(a);return u},i.prototype.replacePlaceholderElementsWithClonedPermanentElements=function(t){var n,r,i,o,a,s;for(s=[],i=0,o=t.length;o>i;i++)r=(a=t[i]).element,n=a.permanentElement.cloneNode(!0),s.push(e(r,n));return s},i.prototype.activateNewBodyScriptElements=function(){var t,n,r,i,o,a;for(a=[],n=0,i=(o=this.getNewBodyScriptElements()).length;i>n;n++)r=o[n],t=this.createScriptElement(r),a.push(e(r,t));return a},i.prototype.assignNewBody=function(){return document.body=this.newBody},i.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.newSnapshot.findFirstAutofocusableElement())?t.focus():void 0},i.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},i.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},i.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},i.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},i.prototype.getCurrentBodyPermanentElements=function(){return this.currentSnapshot.getPermanentElementsPresentInSnapshot(this.newSnapshot)},i.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},i}(a.Renderer),t=function(t){var e;return(e=document.createElement("meta")).setAttribute("name","turbolinks-permanent-placeholder"),e.setAttribute("content",t.id),{element:e,permanentElement:t}},e=function(t,e){var n;return(n=t.parentNode)?n.replaceChild(e,t):void 0}}.call(this),function(){var t=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t},e={}.hasOwnProperty;a.ErrorRenderer=function(e){function n(t){var e;(e=document.createElement("html")).innerHTML=t,this.newHead=e.querySelector("head"),this.newBody=e.querySelector("body")}return t(n,e),n.prototype.render=function(t){return this.renderView(function(e){return function(){return e.replaceHeadAndBody(),e.activateBodyScriptElements(),t()}}(this))},n.prototype.replaceHeadAndBody=function(){var t,e;return e=document.head,t=document.body,e.parentNode.replaceChild(this.newHead,e),t.parentNode.replaceChild(this.newBody,t)},n.prototype.activateBodyScriptElements=function(){var t,e,n,r,i,o;for(o=[],e=0,n=(r=this.getScriptElements()).length;n>e;e++)i=r[e],t=this.createScriptElement(i),o.push(i.parentNode.replaceChild(t,i));return o},n.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},n}(a.Renderer)}.call(this),function(){a.View=function(){function t(t){this.delegate=t,this.htmlElement=document.documentElement}return t.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},t.prototype.getElementForAnchor=function(t){return this.getSnapshot().getElementForAnchor(t)},t.prototype.getSnapshot=function(){return a.Snapshot.fromHTMLElement(this.htmlElement)},t.prototype.render=function(t,e){var n,r,i;return i=t.snapshot,n=t.error,r=t.isPreview,this.markAsPreview(r),null!=i?this.renderSnapshot(i,r,e):this.renderError(n,e)},t.prototype.markAsPreview=function(t){return t?this.htmlElement.setAttribute("data-turbolinks-preview",""):this.htmlElement.removeAttribute("data-turbolinks-preview")},t.prototype.renderSnapshot=function(t,e,n){return a.SnapshotRenderer.render(this.delegate,n,this.getSnapshot(),a.Snapshot.wrap(t),e)},t.prototype.renderError=function(t,e){return a.ErrorRenderer.render(this.delegate,e,t)},t}()}.call(this),function(){a.ScrollManager=function(){function t(t){this.delegate=t,this.onScroll=function(t,e){return function(){return t.apply(e,arguments)}}(this.onScroll,this),this.onScroll=a.throttle(this.onScroll)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},t.prototype.scrollToElement=function(t){return t.scrollIntoView()},t.prototype.scrollToPosition=function(t){var e,n;return e=t.x,n=t.y,window.scrollTo(e,n)},t.prototype.onScroll=function(t){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},t.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},t}()}.call(this),function(){a.SnapshotCache=function(){function t(t){this.size=t,this.keys=[],this.snapshots={}}var e;return t.prototype.has=function(t){return e(t)in this.snapshots},t.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},t.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},t.prototype.read=function(t){var n;return n=e(t),this.snapshots[n]},t.prototype.write=function(t,n){var r;return r=e(t),this.snapshots[r]=n},t.prototype.touch=function(t){var n,r;return r=e(t),(n=this.keys.indexOf(r))>-1&&this.keys.splice(n,1),this.keys.unshift(r),this.trim()},t.prototype.trim=function(){var t,e,n,r,i;for(i=[],t=0,n=(r=this.keys.splice(this.size)).length;n>t;t++)e=r[t],i.push(delete this.snapshots[e]);return i},e=function(t){return a.Location.wrap(t).toCacheKey()},t}()}.call(this),function(){a.Visit=function(){function t(t,e,n){this.controller=t,this.action=n,this.performScroll=function(t,e){return function(){return t.apply(e,arguments)}}(this.performScroll,this),this.identifier=a.uuid(),this.location=a.Location.wrap(e),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var e;return t.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},t.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},t.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},t.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},t.prototype.changeHistory=function(){var t,n;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,n=e(t),this.controller[n](this.location,this.restorationIdentifier),this.historyChanged=!0)},t.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new a.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},t.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},t.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},t.prototype.loadCachedSnapshot=function(){var t,e;return(e=this.getCachedSnapshot())?(t=this.shouldIssueRequest(),this.render((function(){var n;return this.cacheSnapshot(),this.controller.render({snapshot:e,isPreview:t},this.performScroll),"function"==typeof(n=this.adapter).visitRendered&&n.visitRendered(this),t?void 0:this.complete()}))):void 0},t.prototype.loadResponse=function(){return null!=this.response?this.render((function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())})):void 0},t.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},t.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},t.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},t.prototype.requestCompletedWithResponse=function(t,e){return this.response=t,null!=e&&(this.redirectedToLocation=a.Location.wrap(e)),this.adapter.visitRequestCompleted(this)},t.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},t.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},t.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},t.prototype.scrollToRestoredPosition=function(){var t,e;return null!=(t=null!=(e=this.restorationData)?e.scrollPosition:void 0)?(this.controller.scrollToPosition(t),!0):void 0},t.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},t.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},t.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},t.prototype.getTimingMetrics=function(){return a.copyObject(this.timingMetrics)},e=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},t.prototype.shouldIssueRequest=function(){return"restore"!==this.action||!this.hasCachedSnapshot()},t.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},t.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame(function(e){return function(){return e.frame=null,t.call(e)}}(this))},t.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},t}()}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};a.Controller=function(){function e(){this.clickBubbled=t(this.clickBubbled,this),this.clickCaptured=t(this.clickCaptured,this),this.pageLoaded=t(this.pageLoaded,this),this.history=new a.History(this),this.view=new a.View(this),this.scrollManager=new a.ScrollManager(this),this.restorationData={},this.clearCache(),this.setProgressBarDelay(500)}return e.prototype.start=function(){return a.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},e.prototype.disable=function(){return this.enabled=!1},e.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},e.prototype.clearCache=function(){return this.cache=new a.SnapshotCache(10)},e.prototype.visit=function(t,e){var n,r;return null==e&&(e={}),t=a.Location.wrap(t),this.applicationAllowsVisitingLocation(t)?this.locationIsVisitable(t)?(n=null!=(r=e.action)?r:"advance",this.adapter.visitProposedToLocationWithAction(t,n)):window.location=t:void 0},e.prototype.startVisitToLocationWithAction=function(t,e,n){var r;return a.supported?(r=this.getRestorationDataForIdentifier(n),this.startVisit(t,e,{restorationData:r})):window.location=t},e.prototype.setProgressBarDelay=function(t){return this.progressBarDelay=t},e.prototype.startHistory=function(){return this.location=a.Location.wrap(window.location),this.restorationIdentifier=a.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},e.prototype.stopHistory=function(){return this.history.stop()},e.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(t,e){return this.restorationIdentifier=e,this.location=a.Location.wrap(t),this.history.push(this.location,this.restorationIdentifier)},e.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(t,e){return this.restorationIdentifier=e,this.location=a.Location.wrap(t),this.history.replace(this.location,this.restorationIdentifier)},e.prototype.historyPoppedToLocationWithRestorationIdentifier=function(t,e){var n;return this.restorationIdentifier=e,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(t,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=a.Location.wrap(t)):this.adapter.pageInvalidated()},e.prototype.getCachedSnapshotForLocation=function(t){var e;return null!=(e=this.cache.get(t))?e.clone():void 0},e.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},e.prototype.cacheSnapshot=function(){var t,e;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),e=this.view.getSnapshot(),t=this.lastRenderedLocation,a.defer(function(n){return function(){return n.cache.put(t,e.clone())}}(this))):void 0},e.prototype.scrollToAnchor=function(t){var e;return(e=this.view.getElementForAnchor(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},e.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},e.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},e.prototype.scrollPositionChanged=function(t){return this.getCurrentRestorationData().scrollPosition=t},e.prototype.render=function(t,e){return this.view.render(t,e)},e.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},e.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},e.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},e.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},e.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},e.prototype.clickBubbled=function(t){var e,n,r;return this.enabled&&this.clickEventIsSignificant(t)&&(n=this.getVisitableLinkForNode(t.target))&&(r=this.getVisitableLocationForLink(n))&&this.applicationAllowsFollowingLinkToLocation(n,r)?(t.preventDefault(),e=this.getActionForLink(n),this.visit(r,{action:e})):void 0},e.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){return!this.notifyApplicationAfterClickingLinkToLocation(t,e).defaultPrevented},e.prototype.applicationAllowsVisitingLocation=function(t){return!this.notifyApplicationBeforeVisitingLocation(t).defaultPrevented},e.prototype.notifyApplicationAfterClickingLinkToLocation=function(t,e){return a.dispatch("turbolinks:click",{target:t,data:{url:e.absoluteURL},cancelable:!0})},e.prototype.notifyApplicationBeforeVisitingLocation=function(t){return a.dispatch("turbolinks:before-visit",{data:{url:t.absoluteURL},cancelable:!0})},e.prototype.notifyApplicationAfterVisitingLocation=function(t){return a.dispatch("turbolinks:visit",{data:{url:t.absoluteURL}})},e.prototype.notifyApplicationBeforeCachingSnapshot=function(){return a.dispatch("turbolinks:before-cache")},e.prototype.notifyApplicationBeforeRender=function(t){return a.dispatch("turbolinks:before-render",{data:{newBody:t}})},e.prototype.notifyApplicationAfterRender=function(){return a.dispatch("turbolinks:render")},e.prototype.notifyApplicationAfterPageLoad=function(t){return null==t&&(t={}),a.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:t}})},e.prototype.startVisit=function(t,e,n){var r;return null!=(r=this.currentVisit)&&r.cancel(),this.currentVisit=this.createVisit(t,e,n),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},e.prototype.createVisit=function(t,e,n){var r,i,o,s,u;return s=(i=null!=n?n:{}).restorationIdentifier,o=i.restorationData,r=i.historyChanged,(u=new a.Visit(this,t,e)).restorationIdentifier=null!=s?s:a.uuid(),u.restorationData=a.copyObject(o),u.historyChanged=r,u.referrer=this.location,u},e.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},e.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||t.which>1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},e.prototype.getVisitableLinkForNode=function(t){return this.nodeIsVisitable(t)?a.closest(t,"a[href]:not([target]):not([download])"):void 0},e.prototype.getVisitableLocationForLink=function(t){var e;return e=new a.Location(t.getAttribute("href")),this.locationIsVisitable(e)?e:void 0},e.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},e.prototype.nodeIsVisitable=function(t){var e;return!(e=a.closest(t,"[data-turbolinks]"))||"false"!==e.getAttribute("data-turbolinks")},e.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},e.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},e.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},e}()}.call(this),function(){!function(){var t,e;if((t=e=document.currentScript)&&!e.hasAttribute("data-turbolinks-suppress-warning"))for(;t=t.parentNode;)if(t===document.body)return console.warn("You are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!\n\nLoad your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\nFor more information, see: https://github.com/turbolinks/turbolinks#working-with-script-elements\n\n\u2014\u2014\nSuppress this warning by adding a `data-turbolinks-suppress-warning` attribute to: %s",e.outerHTML)}()}.call(this),function(){var t,e,n;a.start=function(){return e()?(null==a.controller&&(a.controller=t()),a.controller.start()):void 0},e=function(){return null==window.Turbolinks&&(window.Turbolinks=a),n()},t=function(){var t;return t=new a.Controller,t.adapter=new a.BrowserAdapter(t),t},(n=function(){return window.Turbolinks===a})()&&a.start()}.call(this)}).call(this),"object"==o(t)&&t.exports?t.exports=a:void 0===(i="function"===typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)}).call(this)}).call(this,n(116)(t))},function(t,e,n){var r,i,o;function a(t){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t){return"[object Array]"===Object.prototype.toString.call(t)}function e(t){return t instanceof Function}function n(t){return"[object Object]"===Object.prototype.toString.call(t)&&!e(t)&&t instanceof Object}function r(e,i){var o;for(o in i)"__proto__"!==o&&(n(i[o])||t(i[o])?(n(i[o])&&!n(e[o])&&(e[o]={}),t(i[o])&&!t(e[o])&&(e[o]=[]),r(e[o],i[o])):void 0!==i[o]&&(e[o]=i[o]))}function i(t,e){var n={};return r(n,t),r(n,e),n}var o=/^(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)$/i;function s(t){return""+t}function u(t){return parseFloat(t)}function c(t){var e,n,r,i;if("object"!==a(t))if("number"===typeof t)t=new Date(1e3*t);else{if(e=(t=s(t)).match(o))return n=parseInt(e[1],10),r=parseInt(e[3],10)-1,i=parseInt(e[5],10),new Date(n,r,i);var u=t.replace(/ /,"T").replace(" ","").replace("UTC","Z");t=new Date(Date.parse(u)||t)}return t}function l(e){if(!t(e)){var n,r=[];for(n in e)e.hasOwnProperty(n)&&r.push([n,e[n]]);e=r}return e}function h(t,e,n,r,o,a,s,u){return function(c,l,h){var f=c.data,d=i({},t);return d=i(d,h||{}),(c.singleSeriesFormat||"legend"in l)&&e(d,l.legend,c.singleSeriesFormat),l.title&&n(d,l.title),"min"in l?r(d,l.min):function(t){var e,n,r;for(e=0;e<t.length;e++)for(r=t[e].data,n=0;n<r.length;n++)if(r[n][1]<0)return!0;return!1}(f)||r(d,0),l.max&&o(d,l.max),"stacked"in l&&a(d,l.stacked),l.colors&&(d.colors=l.colors),l.xtitle&&s(d,l.xtitle),l.ytitle&&u(d,l.ytitle),d=i(d,l.library||{})}}function f(t,e){return t[0].getTime()-e[0].getTime()}function d(t,e){return t[0]-e[0]}function p(t,e){return t-e}function m(t){return 0===t.getMilliseconds()&&0===t.getSeconds()}function v(t){return m(t)&&0===t.getMinutes()}function g(t){return v(t)&&0===t.getHours()}function y(t,e){return g(t)&&t.getDay()===e}function b(t){return g(t)&&1===t.getDate()}function _(t){return b(t)&&0===t.getMonth()}function w(t){return!isNaN(c(t))&&s(t).length>=6}function x(t){return"number"===typeof t}var k=["bytes","KB","MB","GB","TB","PB","EB"];function S(t,e,n,r){t=t||"",n.prefix&&(e<0&&(e*=-1,t+="-"),t+=n.prefix);var i=n.suffix||"",o=n.precision,a=n.round;if(n.byteScale){var u,c=r?n.byteScale:e;c>=0x1000000000000000?(e/=0x1000000000000000,u=6):c>=0x4000000000000?(e/=0x4000000000000,u=5):c>=1099511627776?(e/=1099511627776,u=4):c>=1073741824?(e/=1073741824,u=3):c>=1048576?(e/=1048576,u=2):c>=1024?(e/=1024,u=1):u=0,void 0===o&&void 0===a&&(e>=1023.5&&u<k.length-1&&(e=1,u+=1),o=e>=1e3?4:3),i=" "+k[u]}if(void 0!==o&&void 0!==a)throw Error("Use either round or precision, not both");if(!r&&(void 0!==o&&(e=e.toPrecision(o),n.zeros||(e=parseFloat(e))),void 0!==a))if(a<0){var l=Math.pow(10,-1*a);e=parseInt((1*e/l).toFixed(0))*l}else e=e.toFixed(a),n.zeros||(e=parseFloat(e));if(n.thousands||n.decimal){var h=(e=s(e)).split(".");e=h[0],n.thousands&&(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,n.thousands)),h.length>1&&(e+=(n.decimal||".")+h[1])}return t+e+i}function C(t,e,n){return n in e?e[n]:n in t.options?t.options[n]:null}var M={maintainAspectRatio:!1,animation:!1,plugins:{legend:{},tooltip:{displayColors:!1,callbacks:{}},title:{font:{size:20},color:"#333"}},interaction:{}},E={scales:{y:{ticks:{maxTicksLimit:4},title:{font:{size:16},color:"#333"},grid:{}},x:{grid:{drawOnChartArea:!1},title:{font:{size:16},color:"#333"},time:{},ticks:{}}}},T=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"],A=function(t,e,n){void 0!==e?(t.plugins.legend.display=!!e,e&&!0!==e&&(t.plugins.legend.position=e)):n&&(t.plugins.legend.display=!1)},O=function(t,e){t.plugins.title.display=!0,t.plugins.title.text=e},P=function(t,e){null!==e&&(t.scales.x.min=u(e))},L=function(t,e){t.scales.x.max=u(e)},D=function(t,e){t.scales.x.stacked=!!e,t.scales.y.stacked=!!e},I=function(t,e){t.scales.x.title.display=!0,t.scales.x.title.text=e},R=function(t,e){t.scales.y.title.display=!0,t.scales.y.title.text=e},N=function(t,e){var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?"rgba("+parseInt(n[1],16)+", "+parseInt(n[2],16)+", "+parseInt(n[3],16)+", "+e+")":t},z=function(t){return null!=t},j=function(e,n,r){var i={prefix:e.options.prefix,suffix:e.options.suffix,thousands:e.options.thousands,decimal:e.options.decimal,precision:e.options.precision,round:e.options.round,zeros:e.options.zeros};if(e.options.bytes){var o=e.data;"pie"===r&&(o=[{data:o}]);for(var a=0,s=0;s<o.length;s++)for(var u=o[s],c=0;c<u.data.length;c++)u.data[c][1]>a&&(a=u.data[c][1]);for(var l=1;a>=1024;)l*=1024,a/=1024;i.byteScale=l}if("pie"!==r){var h=n.scales.y;"bar"===r&&(h=n.scales.x),i.byteScale&&(h.ticks.stepSize||(h.ticks.stepSize=i.byteScale/2),h.ticks.maxTicksLimit||(h.ticks.maxTicksLimit=4)),h.ticks.callback||(h.ticks.callback=function(t){return S("",t,i,!0)})}if(!n.plugins.tooltip.callbacks.label)if("scatter"===r)n.plugins.tooltip.callbacks.label=function(t){var e=t.dataset.label||"";return e&&(e+=": "),e+"("+t.label+", "+t.formattedValue+")"};else if("bubble"===r)n.plugins.tooltip.callbacks.label=function(t){var e=t.dataset.label||"";e&&(e+=": ");var n=t.raw;return e+"("+n.x+", "+n.y+", "+n.v+")"};else if("pie"===r)n.plugins.tooltip.callbacks.label=function(e){var n=e.label;return t(n)?(n=n.slice())[0]+=": ":n+=": ",S(n,e.parsed,i)};else{var f="bar"===r?"x":"y";n.plugins.tooltip.callbacks.label=function(t){if(null!==t.parsed[f]){var e=t.dataset.label||"";return e&&(e+=": "),S(e,t.parsed[f],i)}}}},B=h(i(M,E),A,O,(function(t,e){null!==e&&(t.scales.y.min=u(e))}),(function(t,e){t.scales.y.max=u(e)}),D,I,R),F=function(e,n,r){var o,a=[],s=[],l=e.options.colors||T,h=!0,f=!0,d=!0,w=!0,x=!0,k=!0,S=e.data,M=0;if("bubble"===r)for(var E=0;E<S.length;E++)for(var A=S[E],O=0;O<A.data.length;O++)A.data[O][2]>M&&(M=A.data[O][2]);var P,L,D,I,R,j,B,F=[],q=[];if("bar"===r||"column"===r||"number"!==e.xtype&&"bubble"!==e.xtype){var V,U,H=[];for(P=0;P<S.length;P++)for(D=S[P],L=0;L<D.data.length;L++)I=D.data[L],F[R="datetime"==e.xtype?I[0].getTime():I[0]]||(F[R]=new Array(S.length)),F[R][P]=u(I[1]),-1===H.indexOf(R)&&H.push(R);for("datetime"!==e.xtype&&"number"!==e.xtype||H.sort(p),L=0;L<S.length;L++)q.push([]);for(U=0;U<H.length;U++)for(P=H[U],"datetime"===e.xtype?(V=new Date(u(P)),h=h&&g(V),o||(o=V.getDay()),f=f&&y(V,o),d=d&&b(V),w=w&&_(V),x=x&&v(V),k=k&&m(V)):V=P,s.push(V),L=0;L<S.length;L++)q[L].push(void 0===F[P][L]?null:F[P][L])}else for(var W=0;W<S.length;W++){for(var $=S[W],Z=[],Y=0;Y<$.data.length;Y++){var G={x:u($.data[Y][0]),y:u($.data[Y][1])};"bubble"===r&&(G.r=20*u($.data[Y][2])/M,G.v=$.data[Y][2]),Z.push(G)}q.push(Z)}for(P=0;P<S.length;P++){if(D=S[P],!e.options.colors||!e.singleSeriesFormat||"bar"!==r&&"column"!==r||D.color||!t(e.options.colors)||t(e.options.colors[0]))j=D.color||l[P],B="line"!==r?N(j,.5):j;else{j=l,B=[];for(var K=0;K<l.length;K++)B[K]=N(j[K],.5)}var J={label:D.name||"",data:q[P],fill:"area"===r,borderColor:j,backgroundColor:B,borderWidth:2},X="line"===r||"area"===r||"scatter"===r||"bubble"===r;X&&(J.pointBackgroundColor=j,J.pointHoverBackgroundColor=j,J.pointHitRadius=50),"bubble"===r&&(J.pointBackgroundColor=B,J.pointHoverBackgroundColor=B,J.pointHoverBorderWidth=2),D.stack&&(J.stack=D.stack),!1===C(e,D,"curve")?J.tension=0:X&&(J.tension=.4),!1===C(e,D,"points")&&(J.pointRadius=0,J.pointHoverRadius=0),J=i(J,e.options.dataset||{}),J=i(J,D.library||{}),J=i(J,D.dataset||{}),a.push(J)}var Q=e.options.xmin,tt=e.options.xmax;if("datetime"===e.xtype?(z(Q)&&(n.scales.x.ticks.min=c(Q).getTime()),z(tt)&&(n.scales.x.ticks.max=c(tt).getTime())):"number"===e.xtype&&(z(Q)&&(n.scales.x.ticks.min=Q),z(tt)&&(n.scales.x.ticks.max=tt)),"datetime"===e.xtype&&0===s.length&&(z(Q)&&s.push(c(Q)),z(tt)&&s.push(c(tt)),h=!1,f=!1,d=!1,w=!1,x=!1,k=!1),"datetime"===e.xtype&&s.length>0){var et=(z(Q)?c(Q):s[0]).getTime(),nt=(z(tt)?c(tt):s[0]).getTime();for(P=1;P<s.length;P++){var rt=s[P].getTime();rt<et&&(et=rt),rt>nt&&(nt=rt)}var it,ot=(nt-et)/864e5;if(!n.scales.x.time.unit&&(w||ot>3650?(n.scales.x.time.unit="year",it=365):d||ot>300?(n.scales.x.time.unit="month",it=30):h||ot>10?(n.scales.x.time.unit="day",it=1):x||ot>.5?(n.scales.x.time.displayFormats={hour:"MMM d, h a"},n.scales.x.time.unit="hour",it=1/24):k&&(n.scales.x.time.displayFormats={minute:"h:mm a"},n.scales.x.time.unit="minute",it=1/24/60),it&&ot>0)){var at=e.element.offsetWidth;if(at>0){var st=Math.ceil(ot/it/(at/100));f&&1===it&&(st=7*Math.ceil(st/7)),n.scales.x.time.stepSize=st}}n.scales.x.time.tooltipFormat||(h?n.scales.x.time.tooltipFormat="PP":x?n.scales.x.time.tooltipFormat="MMM d, h a":k&&(n.scales.x.time.tooltipFormat="h:mm a"))}return{labels:s,datasets:a}},q=function(t){this.name="chartjs",this.library=t};q.prototype.renderLineChart=function(t,e){var n={};!t.options.max&&function(t){var e,n,r;for(e=0;e<t.length;e++)for(r=t[e].data,n=0;n<r.length;n++)if(0!=r[n][1])return!1;return!0}(t.data)&&(n.max=1);var r=B(t,i(n,t.options));j(t,r,e);var o=F(t,r,e||"line");"number"===t.xtype?(r.scales.x.type=r.scales.x.type||"linear",r.scales.x.position=r.scales.x.position||"bottom"):r.scales.x.type="string"===t.xtype?"category":"time",this.drawChart(t,"line",o,r)},q.prototype.renderPieChart=function(t){var e=i({},M);t.options.donut&&(e.cutout="50%"),"legend"in t.options&&A(e,t.options.legend),t.options.title&&O(e,t.options.title),e=i(e,t.options.library||{}),j(t,e,"pie");for(var n=[],r=[],o=0;o<t.data.length;o++){var a=t.data[o];n.push(a[0]),r.push(a[1])}var s={data:r,backgroundColor:t.options.colors||T},u={labels:n,datasets:[s=i(s,t.options.dataset||{})]};this.drawChart(t,"pie",u,e)},q.prototype.renderColumnChart=function(t,e){var n;if("bar"===e){var r=i(M,E);r.indexAxis="y",r.scales.x.grid.drawOnChartArea=!0,r.scales.y.grid.drawOnChartArea=!1,delete r.scales.y.ticks.maxTicksLimit,n=h(r,A,O,P,L,D,I,R)(t,t.options)}else n=B(t,t.options);j(t,n,e);var o=F(t,n,"column");"bar"!==e&&function(t,e,n){var r=Math.ceil(t.element.offsetWidth/4/e.labels.length);r>25?r=25:r<10&&(r=10),n.scales.x.ticks.callback||(n.scales.x.ticks.callback=function(t){return(t=s(this.getLabelForValue(t))).length>r?t.substring(0,r-2)+"...":t})}(t,o,n),this.drawChart(t,"bar",o,n)},q.prototype.renderAreaChart=function(t){this.renderLineChart(t,"area")},q.prototype.renderBarChart=function(t){this.renderColumnChart(t,"bar")},q.prototype.renderScatterChart=function(t,e){e=e||"scatter";var n=B(t,t.options);j(t,n,e),"showLine"in n||(n.showLine=!1);var r=F(t,n,e);n.scales.x.type=n.scales.x.type||"linear",n.scales.x.position=n.scales.x.position||"bottom","mode"in n.interaction||(n.interaction.mode="nearest"),this.drawChart(t,e,r,n)},q.prototype.renderBubbleChart=function(t){this.renderScatterChart(t,"bubble")},q.prototype.destroy=function(t){t.chart&&t.chart.destroy()},q.prototype.drawChart=function(t,e,n,r){if(this.destroy(t),!t.destroyed){var i={type:e,data:n,options:r};t.options.code&&window.console.log("new Chart(ctx, "+JSON.stringify(i)+");"),t.element.innerHTML="<canvas></canvas>";var o=t.element.getElementsByTagName("CANVAS")[0];t.chart=new this.library(o,i)}};var V={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},yAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},title:{text:null},credits:{enabled:!1},legend:{borderWidth:0},tooltip:{style:{fontSize:"12px"}},plotOptions:{areaspline:{},area:{},series:{marker:{}}},time:{useUTC:!1}},U=function(t,e,n){void 0!==e?(t.legend.enabled=!!e,e&&!0!==e&&("top"===e||"bottom"===e?t.legend.verticalAlign=e:(t.legend.layout="vertical",t.legend.verticalAlign="middle",t.legend.align=e))):n&&(t.legend.enabled=!1)},H=function(t,e){t.title.text=e},W=h(V,U,H,(function(t,e){t.yAxis.min=e}),(function(t,e){t.yAxis.max=e}),(function(t,e){var n=e?!0===e?"normal":e:null;t.plotOptions.series.stacking=n,t.plotOptions.area.stacking=n,t.plotOptions.areaspline.stacking=n}),(function(t,e){t.xAxis.title.text=e}),(function(t,e){t.yAxis.title.text=e})),$=function(t,e,n){var r={prefix:t.options.prefix,suffix:t.options.suffix,thousands:t.options.thousands,decimal:t.options.decimal,precision:t.options.precision,round:t.options.round,zeros:t.options.zeros};"pie"===n||e.yAxis.labels.formatter||(e.yAxis.labels.formatter=function(){return S("",this.value,r)}),e.tooltip.pointFormatter||e.tooltip.pointFormat||(e.tooltip.pointFormatter=function(){return'<span style="color:'+this.color+'">\u25cf</span> '+S(this.series.name+": <b>",this.y,r)+"</b><br/>"})},Z=function(t){this.name="highcharts",this.library=t};Z.prototype.renderLineChart=function(t,e){var n={};"areaspline"===(e=e||"spline")&&(n={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),!1===t.options.curve&&("areaspline"===e?e="area":"spline"===e&&(e="line"));var r,i,o,a=W(t,t.options,n);"number"===t.xtype?a.xAxis.type=a.xAxis.type||"linear":a.xAxis.type="string"===t.xtype?"category":"datetime",a.chart.type||(a.chart.type=e),$(t,a,e);var s=t.data;for(i=0;i<s.length;i++){if(s[i].name=s[i].name||"Value",r=s[i].data,"datetime"===t.xtype)for(o=0;o<r.length;o++)r[o][0]=r[o][0].getTime();s[i].marker={symbol:"circle"},!1===t.options.points&&(s[i].marker.enabled=!1)}this.drawChart(t,s,a)},Z.prototype.renderScatterChart=function(t){var e=W(t,t.options,{});e.chart.type="scatter",this.drawChart(t,t.data,e)},Z.prototype.renderPieChart=function(t){var e=i(V,{});t.options.colors&&(e.colors=t.options.colors),t.options.donut&&(e.plotOptions={pie:{innerSize:"50%"}}),"legend"in t.options&&U(e,t.options.legend),t.options.title&&H(e,t.options.title);var n=i(e,t.options.library||{});$(t,n,"pie");var r=[{type:"pie",name:t.options.label||"Value",data:t.data}];this.drawChart(t,r,n)},Z.prototype.renderColumnChart=function(t,e){e=e||"column";var n,r,i,o,a=t.data,s=W(t,t.options),u=[],c=[];for(s.chart.type=e,$(t,s,e),n=0;n<a.length;n++)for(i=a[n],r=0;r<i.data.length;r++)u[(o=i.data[r])[0]]||(u[o[0]]=new Array(a.length),c.push(o[0])),u[o[0]][n]=o[1];"number"===t.xtype&&c.sort(p),s.xAxis.categories=c;var l,h=[];for(n=0;n<a.length;n++){for(o=[],r=0;r<c.length;r++)o.push(u[c[r]][n]||0);l={name:a[n].name||"Value",data:o},a[n].stack&&(l.stack=a[n].stack),h.push(l)}this.drawChart(t,h,s)},Z.prototype.renderBarChart=function(t){this.renderColumnChart(t,"bar")},Z.prototype.renderAreaChart=function(t){this.renderLineChart(t,"areaspline")},Z.prototype.destroy=function(t){t.chart&&t.chart.destroy()},Z.prototype.drawChart=function(t,e,n){this.destroy(t),t.destroyed||(n.chart.renderTo=t.element.id,n.series=e,t.options.code&&window.console.log("new Highcharts.Chart("+JSON.stringify(n)+");"),t.chart=new this.library.Chart(n))};var Y={},G=[],K={chartArea:{},fontName:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",pointSize:6,legend:{textStyle:{fontSize:12,color:"#444"},alignment:"center",position:"right"},curveType:"function",hAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},gridlines:{color:"transparent"},baselineColor:"#ccc",viewWindow:{}},vAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},baselineColor:"#ccc",viewWindow:{}},tooltip:{textStyle:{color:"#666",fontSize:12}}},J=function(t,e,n){var r;void 0!==e?(r=e?!0===e?"right":e:"none",t.legend.position=r):n&&(t.legend.position="none")},X=function(t,e){t.title=e,t.titleTextStyle={color:"#333",fontSize:"20px"}},Q=function(t,e){t.hAxis.viewWindow.min=e},tt=function(t,e){t.hAxis.viewWindow.max=e},et=function(t,e){t.isStacked=e||!1},nt=function(t,e){t.hAxis.title=e,t.hAxis.titleTextStyle.italic=!1},rt=function(t,e){t.vAxis.title=e,t.vAxis.titleTextStyle.italic=!1},it=h(K,J,X,(function(t,e){t.vAxis.viewWindow.min=e}),(function(t,e){t.vAxis.viewWindow.max=e}),et,nt,rt),ot=function(t){this.name="google",this.library=t};function at(t,e){var n,r,i=[];if(r="number"===e?u:"datetime"===e?c:s,"bubble"===e)for(n=0;n<t.length;n++)i.push([u(t[n][0]),u(t[n][1]),u(t[n][2])]);else for(n=0;n<t.length;n++)i.push([r(t[n][0]),u(t[n][1])]);return"datetime"===e?i.sort(f):"number"===e&&i.sort(d),i}function st(t,e){var n,r,i;for(n=0;n<t.length;n++)for(i=l(t[n].data),r=0;r<i.length;r++)if(!e(i[r][0]))return!1;return!0}function ut(e,n,r){var i,o=e.options,s=e.rawData;for(e.singleSeriesFormat=!t(s)||"object"!==a(s[0])||t(s[0]),e.singleSeriesFormat&&(s=[{name:o.label,data:s}]),s=function(t){var e,n,r=[];for(e=0;e<t.length;e++){var i={};for(n in t[e])t[e].hasOwnProperty(n)&&(i[n]=t[e][n]);r.push(i)}return r}(s),i=0;i<s.length;i++)s[i].data=l(s[i].data);for(e.xtype=n||(o.discrete?"string":function(t,e,n){return lt(t)?!n.xmin&&!n.xmax||n.xmin&&!w(n.xmin)||n.xmax&&!w(n.xmax)?"number":"datetime":st(t,x)?"number":!e&&st(t,w)?"datetime":"string"}(s,r,o)),i=0;i<s.length;i++)s[i].data=at(s[i].data,e.xtype);return s}function ct(t){var e,n=l(t.rawData);for(e=0;e<n.length;e++)n[e]=[s(n[e][0]),u(n[e][1])];return n}function lt(t,e){if("PieChart"===e||"GeoChart"===e||"Timeline"===e)return 0===t.length;for(var n=0;n<t.length;n++)if(t[n].data.length>0)return!1;return!0}function ht(t,e,n){if(t.addEventListener)return t.addEventListener(e,n,!1),n;var r=function(){return n.call(t,window.event)};return t.attachEvent("on"+e,r),r}function ft(t,e,n){t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)}function dt(t,e){if(t===e)return!1;for(;e&&e!==t;)e=e.parentNode;return e===t}ot.prototype.renderLineChart=function(t){var e=this;this.waitForLoaded(t,(function(){var n={};!1===t.options.curve&&(n.curveType="none"),!1===t.options.points&&(n.pointSize=0);var r=it(t,t.options,n),i=e.createDataTable(t.data,t.xtype);e.drawChart(t,"LineChart",i,r)}))},ot.prototype.renderPieChart=function(t){var e=this;this.waitForLoaded(t,(function(){var n={chartArea:{top:"10%",height:"80%"},legend:{}};t.options.colors&&(n.colors=t.options.colors),t.options.donut&&(n.pieHole=.5),"legend"in t.options&&J(n,t.options.legend),t.options.title&&X(n,t.options.title);var r=i(i(K,n),t.options.library||{}),o=new e.library.visualization.DataTable;o.addColumn("string",""),o.addColumn("number","Value"),o.addRows(t.data),e.drawChart(t,"PieChart",o,r)}))},ot.prototype.renderColumnChart=function(t){var e=this;this.waitForLoaded(t,(function(){var n=it(t,t.options),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"ColumnChart",r,n)}))},ot.prototype.renderBarChart=function(t){var e=this;this.waitForLoaded(t,(function(){var n=h(K,J,X,Q,tt,et,nt,rt)(t,t.options,{hAxis:{gridlines:{color:"#ccc"}}}),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"BarChart",r,n)}))},ot.prototype.renderAreaChart=function(t){var e=this;this.waitForLoaded(t,(function(){var n=it(t,t.options,{isStacked:!0,pointSize:0,areaOpacity:.5}),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"AreaChart",r,n)}))},ot.prototype.renderGeoChart=function(t){var e=this;this.waitForLoaded(t,"geochart",(function(){var n={legend:"none",colorAxis:{colors:t.options.colors||["#f6c7b6","#ce502d"]}},r=i(i(K,n),t.options.library||{}),o=new e.library.visualization.DataTable;o.addColumn("string",""),o.addColumn("number",t.options.label||"Value"),o.addRows(t.data),e.drawChart(t,"GeoChart",o,r)}))},ot.prototype.renderScatterChart=function(t){var e=this;this.waitForLoaded(t,(function(){var n,r,i,o,a=it(t,t.options,{}),s=t.data,u=[];for(n=0;n<s.length;n++)for(s[n].name=s[n].name||"Value",o=s[n].data,r=0;r<o.length;r++){var c=new Array(s.length+1);c[0]=o[r][0],c[n+1]=o[r][1],u.push(c)}for((i=new e.library.visualization.DataTable).addColumn("number",""),n=0;n<s.length;n++)i.addColumn("number",s[n].name);i.addRows(u),e.drawChart(t,"ScatterChart",i,a)}))},ot.prototype.renderTimeline=function(t){var e=this;this.waitForLoaded(t,"timeline",(function(){var n={legend:"none"};t.options.colors&&(n.colors=t.options.colors);var r=i(i(K,n),t.options.library||{}),o=new e.library.visualization.DataTable;o.addColumn({type:"string",id:"Name"}),o.addColumn({type:"date",id:"Start"}),o.addColumn({type:"date",id:"End"}),o.addRows(t.data),t.element.style.lineHeight="normal",e.drawChart(t,"Timeline",o,r)}))},ot.prototype.destroy=function(t){t.chart&&t.chart.clearChart()},ot.prototype.drawChart=function(t,e,n,r){var i;this.destroy(t),t.destroyed||(t.options.code&&window.console.log("var data = new google.visualization.DataTable("+n.toJSON()+");\nvar chart = new google.visualization."+e+"(element);\nchart.draw(data, "+JSON.stringify(r)+");"),t.chart=new this.library.visualization[e](t.element),i=function(){t.chart.draw(n,r)},window.attachEvent?window.attachEvent("onresize",i):window.addEventListener&&window.addEventListener("resize",i,!0),i())},ot.prototype.waitForLoaded=function(t,e,n){var r=this;if(n||(n=e,e="corechart"),G.push({pack:e,callback:n}),Y[e])this.runCallbacks();else{Y[e]=!0;var i={packages:[e],callback:function(){r.runCallbacks()}},o=t.__config();o.language&&(i.language=o.language),"geochart"===e&&o.mapsApiKey&&(i.mapsApiKey=o.mapsApiKey),this.library.charts.load("current",i)}},ot.prototype.runCallbacks=function(){for(var t,e=0;e<G.length;e++)t=G[e],this.library.visualization&&("corechart"===t.pack&&this.library.visualization.LineChart||"timeline"===t.pack&&this.library.visualization.Timeline||"geochart"===t.pack&&this.library.visualization.GeoChart)&&(t.callback(),G.splice(e,1),e--)},ot.prototype.createDataTable=function(t,e){var n,r,i,o,a,c=[],l=[];for(n=0;n<t.length;n++)for(i=t[n],t[n].name=t[n].name||"Value",r=0;r<i.data.length;r++)o=i.data[r],c[a="datetime"===e?o[0].getTime():o[0]]||(c[a]=new Array(t.length),l.push(a)),c[a][n]=u(o[1]);var h,p=[],m=!0;for(r=0;r<l.length;r++)n=l[r],"datetime"===e?(h=new Date(u(n)),m=m&&g(h)):h="number"===e?u(n):n,p.push([h].concat(c[n]));if("datetime"===e)p.sort(f);else if("number"===e){for(p.sort(d),n=0;n<p.length;n++)p[n][0]=s(p[n][0]);e="string"}var v=new this.library.visualization.DataTable;for(e="datetime"===e&&m?"date":e,v.addColumn(e,""),n=0;n<t.length;n++)v.addColumn("number",t[n].name);return v.addRows(p),v};var pt=[],mt=0;function vt(){if(mt<4){var t=pt.shift();t&&(mt++,e=t[0],n=t[1],r=t[2],function(t,e,n){var r=window.jQuery||window.Zepto||window.$;if(r&&r.ajax)r.ajax({dataType:"json",url:t,success:e,error:n,complete:gt});else{var i=new XMLHttpRequest;i.open("GET",t,!0),i.setRequestHeader("Content-Type","application/json"),i.onload=function(){gt(),200===i.status?e(JSON.parse(i.responseText),i.statusText,i):n(i,"error",i.statusText)},i.send()}}(e,n,(function(t,e,n){var i="string"===typeof n?n:n.message;r(i)})),vt())}var e,n,r}function gt(){mt--,vt()}var yt={},bt=[];function _t(t,e){document.body.innerText?t.innerText=e:t.textContent=e}function wt(t,e,n){n||(e="Error Loading Chart: "+e),_t(t,e),t.style.color="#ff0000"}function xt(t){try{t.__render()}catch(e){throw wt(t.element,e.message),e}}function kt(t,e,n){if(n&&t.options.loading&&("string"===typeof e||"function"===typeof e)&&_t(t.element,t.options.loading),"string"===typeof e)r=e,i=function(e){t.rawData=e,xt(t)},o=function(e){wt(t.element,e)},pt.push([r,i,o]),vt();else if("function"===typeof e)try{e((function(e){t.rawData=e,xt(t)}),(function(e){wt(t.element,e,!0)}))}catch(a){wt(t.element,a,!0)}else t.rawData=e,xt(t);var r,i,o}function St(t){var n=new(function(t){if(t){if("Highcharts"===t.product)return Z;if(t.charts)return ot;if(e(t))return q}throw new Error("Unknown adapter")}(t))(t);-1===bt.indexOf(n)&&bt.push(n)}function Ct(t,n){if(lt(n.data,t)){var r=n.options.empty||n.options.messages&&n.options.messages.empty||"No data";_t(n.element,r)}else!function(t,n){var r,i,o,a;for((o="render"+t,a=n.options.adapter,"Chart"in window&&St(window.Chart),"Highcharts"in window&&St(window.Highcharts),window.google&&window.google.charts&&St(window.google),r=0);r<bt.length;r++)if(i=bt[r],(!a||a===i.name)&&e(i[o]))return n.adapter=i.name,n.__adapterObject=i,i[o](n);throw bt.length>0?new Error("No charting library found for "+t):new Error("No charting libraries found - be sure to include one before your charts")}(t,n),n.options.download&&!n.__downloadAttached&&"chartjs"===n.adapter&&function(t){var e=t.element,n=document.createElement("a"),r=t.options.download;!0===r?r={}:"string"===typeof r&&(r={filename:r}),n.download=r.filename||"chart.png",n.style.position="absolute",n.style.top="20px",n.style.right="20px",n.style.zIndex=1e3,n.style.lineHeight="20px",n.target="_blank";var i=document.createElement("img");i.alt="Download",i.style.border="none",i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==",n.appendChild(i),e.style.position="relative",t.__downloadAttached=!0,t.__enterEvent=ht(e,"mouseover",(function(i){var o=i.relatedTarget;o&&(o===this||dt(this,o))||!t.options.download||(n.href=t.toImage(r),e.appendChild(n))})),t.__leaveEvent=ht(e,"mouseout",(function(t){var e=t.relatedTarget;e&&(e===this||dt(this,e))||n.parentNode&&n.parentNode.removeChild(n)}))}(n)}var Mt=function(t,e,n){var r;if("string"===typeof t&&(r=t,!(t=document.getElementById(t))))throw new Error("No element with id "+r);this.element=t,this.options=i(Et.options,n||{}),this.dataSource=e,Et.charts[t.id]=this,kt(this,e,!0),this.options.refresh&&this.startRefresh()};Mt.prototype.getElement=function(){return this.element},Mt.prototype.getDataSource=function(){return this.dataSource},Mt.prototype.getData=function(){return this.data},Mt.prototype.getOptions=function(){return this.options},Mt.prototype.getChartObject=function(){return this.chart},Mt.prototype.getAdapter=function(){return this.adapter},Mt.prototype.updateData=function(t,e){this.dataSource=t,e&&this.__updateOptions(e),kt(this,t,!0)},Mt.prototype.setOptions=function(t){this.__updateOptions(t),this.redraw()},Mt.prototype.redraw=function(){kt(this,this.rawData)},Mt.prototype.refreshData=function(){if("string"===typeof this.dataSource){var t=-1===this.dataSource.indexOf("?")?"?":"&";kt(this,this.dataSource+t+"_="+(new Date).getTime())}else"function"===typeof this.dataSource&&kt(this,this.dataSource)},Mt.prototype.startRefresh=function(){var t=this,e=this.options.refresh;if(e&&"string"!==typeof this.dataSource&&"function"!==typeof this.dataSource)throw new Error("Data source must be a URL or callback for refresh");if(!this.intervalId){if(!e)throw new Error("No refresh interval");this.intervalId=setInterval((function(){t.refreshData()}),1e3*e)}},Mt.prototype.stopRefresh=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},Mt.prototype.toImage=function(t){if("chartjs"===this.adapter){if(t&&t.background&&"transparent"!==t.background){var e=this.chart.canvas,n=this.chart.ctx,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=n.canvas.width,r.height=n.canvas.height,i.fillStyle=t.background,i.fillRect(0,0,r.width,r.height),i.drawImage(e,0,0),r.toDataURL("image/png")}return this.chart.toBase64Image()}throw new Error("Feature only available for Chart.js")},Mt.prototype.destroy=function(){this.destroyed=!0,this.stopRefresh(),this.__adapterObject&&this.__adapterObject.destroy(this),this.__enterEvent&&ft(this.element,"mouseover",this.__enterEvent),this.__leaveEvent&&ft(this.element,"mouseout",this.__leaveEvent)},Mt.prototype.__updateOptions=function(t){var e=t.refresh&&t.refresh!==this.options.refresh;this.options=i(Et.options,t),e&&(this.stopRefresh(),this.startRefresh())},Mt.prototype.__render=function(){this.data=this.__processData(),Ct(this.__chartName(),this)},Mt.prototype.__config=function(){return yt};var Et={LineChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ut(this)},e.prototype.__chartName=function(){return"LineChart"},e}(Mt),PieChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ct(this)},e.prototype.__chartName=function(){return"PieChart"},e}(Mt),ColumnChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ut(this,null,!0)},e.prototype.__chartName=function(){return"ColumnChart"},e}(Mt),BarChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ut(this,null,!0)},e.prototype.__chartName=function(){return"BarChart"},e}(Mt),AreaChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ut(this)},e.prototype.__chartName=function(){return"AreaChart"},e}(Mt),GeoChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ct(this)},e.prototype.__chartName=function(){return"GeoChart"},e}(Mt),ScatterChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ut(this,"number")},e.prototype.__chartName=function(){return"ScatterChart"},e}(Mt),BubbleChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return ut(this,"bubble")},e.prototype.__chartName=function(){return"BubbleChart"},e}(Mt),Timeline:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){var t,e=this.rawData;for(t=0;t<e.length;t++)e[t][1]=c(e[t][1]),e[t][2]=c(e[t][2]);return e},e.prototype.__chartName=function(){return"Timeline"},e}(Mt),charts:{},configure:function(t){for(var e in t)t.hasOwnProperty(e)&&(yt[e]=t[e])},setDefaultOptions:function(t){Et.options=t},eachChart:function(t){for(var e in Et.charts)Et.charts.hasOwnProperty(e)&&t(Et.charts[e])},destroyAll:function(){for(var t in Et.charts)Et.charts.hasOwnProperty(t)&&(Et.charts[t].destroy(),delete Et.charts[t])},config:yt,options:{},adapters:bt,addAdapter:St,use:function(t){return St(t),Et}};return"undefined"===typeof window||window.Chartkick||(window.Chartkick=Et,document.addEventListener("turbolinks:before-render",(function(){Et.destroyAll()})),setTimeout((function(){window.dispatchEvent(new Event("chartkick:load"))}),0)),Et.default=Et,Et},"object"===a(e)&&"undefined"!==typeof t?t.exports=o():void 0===(i="function"===typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(28),a=n(30),s=n(5),u=n(94),c=n(123),l=n(1),h=n(12),f=n(45),d=n(3),p=n(4),m=n(11),v=n(19),g=n(27),y=n(36),b=n(33),_=n(58),w=n(44),x=n(125),k=n(93),S=n(14),C=n(10),M=n(69),E=n(17),T=n(15),A=n(90),O=n(70),P=n(55),L=n(54),D=n(7),I=n(126),R=n(21),N=n(31),z=n(20),j=n(13).forEach,B=O("hidden"),F="Symbol",q=D("toPrimitive"),V=z.set,U=z.getterFor(F),H=Object.prototype,W=i.Symbol,$=o("JSON","stringify"),Z=S.f,Y=C.f,G=x.f,K=M.f,J=A("symbols"),X=A("op-symbols"),Q=A("string-to-symbol-registry"),tt=A("symbol-to-string-registry"),et=A("wks"),nt=i.QObject,rt=!nt||!nt.prototype||!nt.prototype.findChild,it=s&&l((function(){return 7!=b(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=Z(H,e);r&&delete H[e],Y(t,e,n),r&&t!==H&&Y(H,e,r)}:Y,ot=function(t,e){var n=J[t]=b(W.prototype);return V(n,{type:F,tag:t,description:e}),s||(n.description=e),n},at=c?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof W},st=function(t,e,n){t===H&&st(X,e,n),p(t);var r=g(e,!0);return p(n),h(J,r)?(n.enumerable?(h(t,B)&&t[B][r]&&(t[B][r]=!1),n=b(n,{enumerable:y(0,!1)})):(h(t,B)||Y(t,B,y(1,{})),t[B][r]=!0),it(t,r,n)):Y(t,r,n)},ut=function(t,e){p(t);var n=v(e),r=_(n).concat(ft(n));return j(r,(function(e){s&&!ct.call(n,e)||st(t,e,n[e])})),t},ct=function(t){var e=g(t,!0),n=K.call(this,e);return!(this===H&&h(J,e)&&!h(X,e))&&(!(n||!h(this,e)||!h(J,e)||h(this,B)&&this[B][e])||n)},lt=function(t,e){var n=v(t),r=g(e,!0);if(n!==H||!h(J,r)||h(X,r)){var i=Z(n,r);return!i||!h(J,r)||h(n,B)&&n[B][r]||(i.enumerable=!0),i}},ht=function(t){var e=G(v(t)),n=[];return j(e,(function(t){h(J,t)||h(P,t)||n.push(t)})),n},ft=function(t){var e=t===H,n=G(e?X:v(t)),r=[];return j(n,(function(t){!h(J,t)||e&&!h(H,t)||r.push(J[t])})),r};(u||(T((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=L(t),n=function(t){this===H&&n.call(X,t),h(this,B)&&h(this[B],e)&&(this[B][e]=!1),it(this,e,y(1,t))};return s&&rt&&it(H,e,{configurable:!0,set:n}),ot(e,t)}).prototype,"toString",(function(){return U(this).tag})),T(W,"withoutSetter",(function(t){return ot(L(t),t)})),M.f=ct,C.f=st,S.f=lt,w.f=x.f=ht,k.f=ft,I.f=function(t){return ot(D(t),t)},s&&(Y(W.prototype,"description",{configurable:!0,get:function(){return U(this).description}}),a||T(H,"propertyIsEnumerable",ct,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:W}),j(_(et),(function(t){R(t)})),r({target:F,stat:!0,forced:!u},{for:function(t){var e=String(t);if(h(Q,e))return Q[e];var n=W(e);return Q[e]=n,tt[n]=e,n},keyFor:function(t){if(!at(t))throw TypeError(t+" is not a symbol");if(h(tt,t))return tt[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(t,e){return void 0===e?b(t):ut(b(t),e)},defineProperty:st,defineProperties:ut,getOwnPropertyDescriptor:lt}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ht,getOwnPropertySymbols:ft}),r({target:"Object",stat:!0,forced:l((function(){k.f(1)}))},{getOwnPropertySymbols:function(t){return k.f(m(t))}}),$)&&r({target:"JSON",stat:!0,forced:!u||l((function(){var t=W();return"[null]"!=$([t])||"{}"!=$({a:t})||"{}"!=$(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=e,(d(e)||void 0!==t)&&!at(t))return f(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!at(e))return e}),i[1]=e,$.apply(null,i)}});W.prototype[q]||E(W.prototype,q,W.prototype.valueOf),N(W,F),P[B]=!0},function(t,e,n){"use strict";var r=n(0),i=n(5),o=n(2),a=n(12),s=n(3),u=n(10).f,c=n(120),l=o.Symbol;if(i&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var h={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new l(t):void 0===t?l():l(t);return""===t&&(h[e]=!0),e};c(f,l);var d=f.prototype=l.prototype;d.constructor=f;var p=d.toString,m="Symbol(test)"==String(l("test")),v=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=p.call(t);if(a(h,t))return"";var n=m?e.slice(7,-1):e.replace(v,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:f})}},function(t,e,n){n(21)("asyncIterator")},function(t,e,n){n(21)("hasInstance")},function(t,e,n){n(21)("isConcatSpreadable")},function(t,e,n){n(21)("iterator")},function(t,e,n){n(21)("match")},function(t,e,n){n(21)("replace")},function(t,e,n){n(21)("search")},function(t,e,n){n(21)("species")},function(t,e,n){n(21)("split")},function(t,e,n){n(21)("toPrimitive")},function(t,e,n){n(21)("toStringTag")},function(t,e,n){n(21)("unscopables")},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(45),a=n(3),s=n(11),u=n(9),c=n(46),l=n(59),h=n(60),f=n(7),d=n(61),p=f("isConcatSpreadable"),m=9007199254740991,v="Maximum allowed index exceeded",g=d>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),y=h("concat"),b=function(t){if(!a(t))return!1;var e=t[p];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!g||!y},{concat:function(t){var e,n,r,i,o,a=s(this),h=l(a,0),f=0;for(e=-1,r=arguments.length;e<r;e++)if(b(o=-1===e?a:arguments[e])){if(f+(i=u(o.length))>m)throw TypeError(v);for(n=0;n<i;n++,f++)n in o&&c(h,f,o[n])}else{if(f>=m)throw TypeError(v);c(h,f++,o)}return h.length=f,h}})},function(t,e,n){var r=n(0),i=n(127),o=n(40);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(t,e,n){"use strict";var r=n(0),i=n(13).every,o=n(34),a=n(18),s=o("every"),u=a("every");r({target:"Array",proto:!0,forced:!s||!u},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0),i=n(96),o=n(40);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(t,e,n){"use strict";var r=n(0),i=n(13).filter,o=n(60),a=n(18),s=o("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!s||!u},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),i=n(13).find,o=n(40),a=n(18),s="find",u=!0,c=a(s);s in[]&&Array(1).find((function(){u=!1})),r({target:"Array",proto:!0,forced:u||!c},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},function(t,e,n){"use strict";var r=n(0),i=n(13).findIndex,o=n(40),a=n(18),s="findIndex",u=!0,c=a(s);s in[]&&Array(1).findIndex((function(){u=!1})),r({target:"Array",proto:!0,forced:u||!c},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},function(t,e,n){"use strict";var r=n(0),i=n(128),o=n(11),a=n(9),s=n(24),u=n(59);r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=o(this),n=a(e.length),r=u(e,0);return r.length=i(r,e,e,n,0,void 0===t?1:s(t)),r}})},function(t,e,n){"use strict";var r=n(0),i=n(128),o=n(11),a=n(9),s=n(25),u=n(59);r({target:"Array",proto:!0},{flatMap:function(t){var e,n=o(this),r=a(n.length);return s(t),(e=u(n,0)).length=i(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},function(t,e,n){"use strict";var r=n(0),i=n(129);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(t,e,n){var r=n(0),i=n(130);r({target:"Array",stat:!0,forced:!n(71)((function(t){Array.from(t)}))},{from:i})},function(t,e,n){var r=n(4),i=n(131);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){throw i(t),a}}},function(t,e,n){"use strict";var r=n(0),i=n(56).includes,o=n(40);r({target:"Array",proto:!0,forced:!n(18)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(t,e,n){"use strict";var r=n(0),i=n(56).indexOf,o=n(34),a=n(18),s=[].indexOf,u=!!s&&1/[1].indexOf(1,-0)<0,c=o("indexOf"),l=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:u||!c||!l},{indexOf:function(t){return u?s.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){n(0)({target:"Array",stat:!0},{isArray:n(45)})},function(t,e,n){"use strict";var r=n(0),i=n(53),o=n(19),a=n(34),s=[].join,u=i!=Object,c=a("join",",");r({target:"Array",proto:!0,forced:u||!c},{join:function(t){return s.call(o(this),void 0===t?",":t)}})},function(t,e,n){var r=n(0),i=n(135);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(t,e,n){"use strict";var r=n(0),i=n(13).map,o=n(60),a=n(18),s=o("map"),u=a("map");r({target:"Array",proto:!0,forced:!s||!u},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(46);r({target:"Array",stat:!0,forced:i((function(){function t(){}return!(Array.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),i=n(73).left,o=n(34),a=n(18),s=n(61),u=n(49),c=o("reduce"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!l||!u&&s>79&&s<83},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),i=n(73).right,o=n(34),a=n(18),s=n(61),u=n(49),c=o("reduceRight"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!l||!u&&s>79&&s<83},{reduceRight:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),i=n(45),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(t,e,n){"use strict";var r=n(0),i=n(3),o=n(45),a=n(38),s=n(9),u=n(19),c=n(46),l=n(7),h=n(60),f=n(18),d=h("slice"),p=f("slice",{ACCESSORS:!0,0:0,1:2}),m=l("species"),v=[].slice,g=Math.max;r({target:"Array",proto:!0,forced:!d||!p},{slice:function(t,e){var n,r,l,h=u(this),f=s(h.length),d=a(t,f),p=a(void 0===e?f:e,f);if(o(h)&&("function"!=typeof(n=h.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[m])&&(n=void 0):n=void 0,n===Array||void 0===n))return v.call(h,d,p);for(r=new(void 0===n?Array:n)(g(p-d,0)),l=0;d<p;d++,l++)d in h&&c(r,l,h[d]);return r.length=l,r}})},function(t,e,n){"use strict";var r=n(0),i=n(13).some,o=n(34),a=n(18),s=o("some"),u=a("some");r({target:"Array",proto:!0,forced:!s||!u},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),i=n(25),o=n(11),a=n(1),s=n(34),u=[],c=u.sort,l=a((function(){u.sort(void 0)})),h=a((function(){u.sort(null)})),f=s("sort");r({target:"Array",proto:!0,forced:l||!h||!f},{sort:function(t){return void 0===t?c.call(o(this)):c.call(o(this),i(t))}})},function(t,e,n){n(50)("Array")},function(t,e,n){"use strict";var r=n(0),i=n(38),o=n(24),a=n(9),s=n(11),u=n(59),c=n(46),l=n(60),h=n(18),f=l("splice"),d=h("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,m=Math.min,v=9007199254740991,g="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!f||!d},{splice:function(t,e){var n,r,l,h,f,d,y=s(this),b=a(y.length),_=i(t,b),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=b-_):(n=w-2,r=m(p(o(e),0),b-_)),b+n-r>v)throw TypeError(g);for(l=u(y,r),h=0;h<r;h++)(f=_+h)in y&&c(l,h,y[f]);if(l.length=r,n<r){for(h=_;h<b-r;h++)d=h+n,(f=h+r)in y?y[d]=y[f]:delete y[d];for(h=b;h>b-r+n;h--)delete y[h-1]}else if(n>r)for(h=b-r;h>_;h--)d=h+n-1,(f=h+r-1)in y?y[d]=y[f]:delete y[d];for(h=0;h<n;h++)y[h+_]=arguments[h+2];return y.length=b-r+n,l}})},function(t,e,n){n(40)("flat")},function(t,e,n){n(40)("flatMap")},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(74),a=n(50),s="ArrayBuffer",u=o.ArrayBuffer;r({global:!0,forced:i.ArrayBuffer!==u},{ArrayBuffer:u}),a(s)},function(t,e){var n=1/0,r=Math.abs,i=Math.pow,o=Math.floor,a=Math.log,s=Math.LN2;t.exports={pack:function(t,e,u){var c,l,h,f=new Array(u),d=8*u-e-1,p=(1<<d)-1,m=p>>1,v=23===e?i(2,-24)-i(2,-77):0,g=t<0||0===t&&1/t<0?1:0,y=0;for((t=r(t))!=t||t===n?(l=t!=t?1:0,c=p):(c=o(a(t)/s),t*(h=i(2,-c))<1&&(c--,h*=2),(t+=c+m>=1?v/h:v*i(2,1-m))*h>=2&&(c++,h/=2),c+m>=p?(l=0,c=p):c+m>=1?(l=(t*h-1)*i(2,e),c+=m):(l=t*i(2,m-1)*i(2,e),c=0));e>=8;f[y++]=255&l,l/=256,e-=8);for(c=c<<e|l,d+=e;d>0;f[y++]=255&c,c/=256,d-=8);return f[--y]|=128*g,f},unpack:function(t,e){var r,o=t.length,a=8*o-e-1,s=(1<<a)-1,u=s>>1,c=a-7,l=o-1,h=t[l--],f=127&h;for(h>>=7;c>0;f=256*f+t[l],l--,c-=8);for(r=f&(1<<-c)-1,f>>=-c,c+=e;c>0;r=256*r+t[l],l--,c-=8);if(0===f)f=1-u;else{if(f===s)return r?NaN:h?-1/0:n;r+=i(2,e),f-=u}return(h?-1:1)*r*i(2,f-e)}}},function(t,e,n){var r=n(0),i=n(8);r({target:"ArrayBuffer",stat:!0,forced:!i.NATIVE_ARRAY_BUFFER_VIEWS},{isView:i.isView})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(74),a=n(4),s=n(38),u=n(9),c=n(42),l=o.ArrayBuffer,h=o.DataView,f=l.prototype.slice;r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new l(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(void 0!==f&&void 0===e)return f.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(c(this,l))(u(i-r)),d=new h(this),p=new h(o),m=0;r<i;)p.setUint8(m++,d.getUint8(r++));return o}})},function(t,e,n){var r=n(0),i=n(74);r({global:!0,forced:!n(101)},{DataView:i.DataView})},function(t,e,n){n(0)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(t,e,n){var r=n(0),i=n(234);r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==i},{toISOString:i})},function(t,e,n){"use strict";var r=n(1),i=n(102).start,o=Math.abs,a=Date.prototype,s=a.getTime,u=a.toISOString;t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=u.call(new Date(-50000000000001))}))||!r((function(){u.call(new Date(NaN))}))?function(){if(!isFinite(s.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+i(o(e),r?6:4,0)+"-"+i(t.getUTCMonth()+1,2,0)+"-"+i(t.getUTCDate(),2,0)+"T"+i(t.getUTCHours(),2,0)+":"+i(t.getUTCMinutes(),2,0)+":"+i(t.getUTCSeconds(),2,0)+"."+i(n,3,0)+"Z"}:u},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(11),a=n(27);r({target:"Date",proto:!0,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=o(this),n=a(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(17),i=n(237),o=n(7)("toPrimitive"),a=Date.prototype;o in a||r(a,o,i)},function(t,e,n){"use strict";var r=n(4),i=n(27);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!==t)}},function(t,e,n){var r=n(15),i=Date.prototype,o="Invalid Date",a="toString",s=i.toString,u=i.getTime;new Date(NaN)+""!=o&&r(i,a,(function(){var t=u.call(this);return t===t?s.call(this):o}))},function(t,e,n){n(0)({target:"Function",proto:!0},{bind:n(137)})},function(t,e,n){"use strict";var r=n(3),i=n(10),o=n(29),a=n(7)("hasInstance"),s=Function.prototype;a in s||i.f(s,a,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(5),i=n(10).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/,u="name";r&&!(u in o)&&i(o,u,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(t){return""}}})},function(t,e,n){var r=n(2);n(31)(r.JSON,"JSON",!0)},function(t,e,n){"use strict";var r=n(75),i=n(138);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},function(t,e,n){var r=n(0),i=n(139),o=Math.acosh,a=Math.log,s=Math.sqrt,u=Math.LN2;r({target:"Math",stat:!0,forced:!o||710!=Math.floor(o(Number.MAX_VALUE))||o(1/0)!=1/0},{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?a(t)+u:i(t-1+s(t-1)*s(t+1))}})},function(t,e,n){var r=n(0),i=Math.asinh,o=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(i&&1/i(0)>0)},{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):o(e+a(e*e+1)):e}})},function(t,e,n){var r=n(0),i=Math.atanh,o=Math.log;r({target:"Math",stat:!0,forced:!(i&&1/i(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:o((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),i=n(104),o=Math.abs,a=Math.pow;r({target:"Math",stat:!0},{cbrt:function(t){return i(t=+t)*a(o(t),1/3)}})},function(t,e,n){var r=n(0),i=Math.floor,o=Math.log,a=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-i(o(t+.5)*a):32}})},function(t,e,n){var r=n(0),i=n(77),o=Math.cosh,a=Math.abs,s=Math.E;r({target:"Math",stat:!0,forced:!o||o(710)===1/0},{cosh:function(t){var e=i(a(t)-1)+1;return(e+1/(e*s*s))*(s/2)}})},function(t,e,n){var r=n(0),i=n(77);r({target:"Math",stat:!0,forced:i!=Math.expm1},{expm1:i})},function(t,e,n){n(0)({target:"Math",stat:!0},{fround:n(252)})},function(t,e,n){var r=n(104),i=Math.abs,o=Math.pow,a=o(2,-52),s=o(2,-23),u=o(2,127)*(2-s),c=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=i(t),l=r(t);return o<c?l*(o/c/s+1/a-1/a)*c*s:(n=(e=(1+s/a)*o)-(e-o))>u||n!=n?l*(1/0):l*n}},function(t,e,n){var r=n(0),i=Math.hypot,o=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!i&&i(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,r,i=0,s=0,u=arguments.length,c=0;s<u;)c<(n=o(arguments[s++]))?(i=i*(r=c/n)*r+1,c=n):i+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*a(i)}})},function(t,e,n){var r=n(0),i=n(1),o=Math.imul;r({target:"Math",stat:!0,forced:i((function(){return-5!=o(4294967295,5)||2!=o.length}))},{imul:function(t,e){var n=65535,r=+t,i=+e,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0),i=Math.log,o=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(t){return i(t)*o}})},function(t,e,n){n(0)({target:"Math",stat:!0},{log1p:n(139)})},function(t,e,n){var r=n(0),i=Math.log,o=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return i(t)/o}})},function(t,e,n){n(0)({target:"Math",stat:!0},{sign:n(104)})},function(t,e,n){var r=n(0),i=n(1),o=n(77),a=Math.abs,s=Math.exp,u=Math.E;r({target:"Math",stat:!0,forced:i((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){return a(t=+t)<1?(o(t)-o(-t))/2:(s(t-1)-s(-t-1))*(u/2)}})},function(t,e,n){var r=n(0),i=n(77),o=Math.exp;r({target:"Math",stat:!0},{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){n(31)(Math,"Math",!0)},function(t,e,n){var r=n(0),i=Math.ceil,o=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?o:i)(t)}})},function(t,e,n){"use strict";var r=n(5),i=n(2),o=n(57),a=n(15),s=n(12),u=n(37),c=n(76),l=n(27),h=n(1),f=n(33),d=n(44).f,p=n(14).f,m=n(10).f,v=n(52).trim,g="Number",y=i.Number,b=y.prototype,_=u(f(b))==g,w=function(t){var e,n,r,i,o,a,s,u,c=l(t,!1);if("string"==typeof c&&c.length>2)if(43===(e=(c=v(c)).charCodeAt(0))||45===e){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=c.slice(2)).length,s=0;s<a;s++)if((u=o.charCodeAt(s))<48||u>i)return NaN;return parseInt(o,r)}return+c};if(o(g,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var x,k=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof k&&(_?h((function(){b.valueOf.call(n)})):u(n)!=g)?c(new y(w(e)),n,k):w(e)},S=r?d(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),C=0;S.length>C;C++)s(y,x=S[C])&&!s(k,x)&&m(k,x,p(y,x));k.prototype=b,b.constructor=k,a(i,g,k)}},function(t,e,n){n(0)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){n(0)({target:"Number",stat:!0},{isFinite:n(266)})},function(t,e,n){var r=n(2).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&r(t)}},function(t,e,n){n(0)({target:"Number",stat:!0},{isInteger:n(140)})},function(t,e,n){n(0)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),i=n(140),o=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){n(0)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){n(0)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),i=n(141);r({target:"Number",stat:!0,forced:Number.parseFloat!=i},{parseFloat:i})},function(t,e,n){var r=n(0),i=n(142);r({target:"Number",stat:!0,forced:Number.parseInt!=i},{parseInt:i})},function(t,e,n){"use strict";var r=n(0),i=n(24),o=n(143),a=n(103),s=n(1),u=1..toFixed,c=Math.floor,l=function(t,e,n){return 0===e?n:e%2===1?l(t,e-1,n*t):l(t*t,e/2,n)};r({target:"Number",proto:!0,forced:u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){u.call({})}))},{toFixed:function(t){var e,n,r,s,u=o(this),h=i(t),f=[0,0,0,0,0,0],d="",p="0",m=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*f[n],f[n]=r%1e7,r=c(r/1e7)},v=function(t){for(var e=6,n=0;--e>=0;)n+=f[e],f[e]=c(n/t),n=n%t*1e7},g=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==f[t]){var n=String(f[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e};if(h<0||h>20)throw RangeError("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(d="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*l(2,69,1))-69)<0?u*l(2,-e,1):u/l(2,e,1),n*=4503599627370496,(e=52-e)>0){for(m(0,n),r=h;r>=7;)m(1e7,0),r-=7;for(m(l(10,r,1),0),r=e-1;r>=23;)v(1<<23),r-=23;v(1<<r),m(1,1),v(2),p=g()}else m(0,n),m(1<<-e,0),p=g()+a.call("0",h);return p=h>0?d+((s=p.length)<=h?"0."+a.call("0",h-s)+p:p.slice(0,s-h)+"."+p.slice(s-h)):d+p}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(143),a=1..toPrecision;r({target:"Number",proto:!0,forced:i((function(){return"1"!==a.call(1,void 0)}))||!i((function(){a.call({})}))},{toPrecision:function(t){return void 0===t?a.call(o(this)):a.call(o(this),t)}})},function(t,e,n){var r=n(0),i=n(144);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(t,e,n){n(0)({target:"Object",stat:!0,sham:!n(5)},{create:n(33)})},function(t,e,n){"use strict";var r=n(0),i=n(5),o=n(79),a=n(11),s=n(25),u=n(10);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(t,e){u.f(a(this),t,{get:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(0),i=n(5);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(95)})},function(t,e,n){var r=n(0),i=n(5);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(10).f})},function(t,e,n){"use strict";var r=n(0),i=n(5),o=n(79),a=n(11),s=n(25),u=n(10);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(t,e){u.f(a(this),t,{set:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(0),i=n(145).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},function(t,e,n){var r=n(0),i=n(66),o=n(1),a=n(3),s=n(48).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(t){return u&&a(t)?u(s(t)):t}})},function(t,e,n){var r=n(0),i=n(67),o=n(46);r({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,n){o(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){var r=n(0),i=n(1),o=n(19),a=n(14).f,s=n(5),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},function(t,e,n){var r=n(0),i=n(5),o=n(91),a=n(19),s=n(14),u=n(46);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),i=s.f,c=o(r),l={},h=0;c.length>h;)void 0!==(n=i(r,e=c[h++]))&&u(l,e,n);return l}})},function(t,e,n){var r=n(0),i=n(1),o=n(125).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(t,e,n){var r=n(0),i=n(1),o=n(11),a=n(29),s=n(100);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},function(t,e,n){n(0)({target:"Object",stat:!0},{is:n(146)})},function(t,e,n){var r=n(0),i=n(1),o=n(3),a=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isExtensible:function(t){return!!o(t)&&(!a||a(t))}})},function(t,e,n){var r=n(0),i=n(1),o=n(3),a=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isFrozen:function(t){return!o(t)||!!a&&a(t)}})},function(t,e,n){var r=n(0),i=n(1),o=n(3),a=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isSealed:function(t){return!o(t)||!!a&&a(t)}})},function(t,e,n){var r=n(0),i=n(11),o=n(58);r({target:"Object",stat:!0,forced:n(1)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},function(t,e,n){"use strict";var r=n(0),i=n(5),o=n(79),a=n(11),s=n(27),u=n(29),c=n(14).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(t){var e,n=a(this),r=s(t,!0);do{if(e=c(n,r))return e.get}while(n=u(n))}})},function(t,e,n){"use strict";var r=n(0),i=n(5),o=n(79),a=n(11),s=n(27),u=n(29),c=n(14).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(t){var e,n=a(this),r=s(t,!0);do{if(e=c(n,r))return e.set}while(n=u(n))}})},function(t,e,n){var r=n(0),i=n(3),o=n(48).onFreeze,a=n(66),s=n(1),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{preventExtensions:function(t){return u&&i(t)?u(o(t)):t}})},function(t,e,n){var r=n(0),i=n(3),o=n(48).onFreeze,a=n(66),s=n(1),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{seal:function(t){return u&&i(t)?u(o(t)):t}})},function(t,e,n){n(0)({target:"Object",stat:!0},{setPrototypeOf:n(47)})},function(t,e,n){var r=n(98),i=n(15),o=n(300);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(t,e,n){"use strict";var r=n(98),i=n(65);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(t,e,n){var r=n(0),i=n(145).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},function(t,e,n){var r=n(0),i=n(141);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},function(t,e,n){var r=n(0),i=n(142);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(t,e,n){"use strict";var r,i,o,a,s=n(0),u=n(30),c=n(2),l=n(28),h=n(147),f=n(15),d=n(51),p=n(31),m=n(50),v=n(3),g=n(25),y=n(41),b=n(88),_=n(67),w=n(71),x=n(42),k=n(105).set,S=n(149),C=n(150),M=n(306),E=n(151),T=n(307),A=n(20),O=n(57),P=n(7),L=n(49),D=n(61),I=P("species"),R="Promise",N=A.get,z=A.set,j=A.getterFor(R),B=h,F=c.TypeError,q=c.document,V=c.process,U=l("fetch"),H=E.f,W=H,$=!!(q&&q.createEvent&&c.dispatchEvent),Z="function"==typeof PromiseRejectionEvent,Y="unhandledrejection",G=O(R,(function(){if(!(b(B)!==String(B))){if(66===D)return!0;if(!L&&!Z)return!0}if(u&&!B.prototype.finally)return!0;if(D>=51&&/native code/.test(B))return!1;var t=B.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[I]=e,!(t.then((function(){}))instanceof e)})),K=G||!w((function(t){B.all(t).catch((function(){}))})),J=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},X=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;S((function(){for(var r=t.value,i=1==t.state,o=0;n.length>o;){var a,s,u,c=n[o++],l=i?c.ok:c.fail,h=c.resolve,f=c.reject,d=c.domain;try{l?(i||(2===t.rejection&&nt(t),t.rejection=1),!0===l?a=r:(d&&d.enter(),a=l(r),d&&(d.exit(),u=!0)),a===c.promise?f(F("Promise-chain cycle")):(s=J(a))?s.call(a,h,f):h(a)):f(r)}catch(p){d&&!u&&d.exit(),f(p)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&tt(t)}))}},Q=function(t,e,n){var r,i;$?((r=q.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!Z&&(i=c["on"+t])?i(r):t===Y&&M("Unhandled promise rejection",n)},tt=function(t){k.call(c,(function(){var e,n=t.facade,r=t.value;if(et(t)&&(e=T((function(){L?V.emit("unhandledRejection",r,n):Q(Y,n,r)})),t.rejection=L||et(t)?2:1,e.error))throw e.value}))},et=function(t){return 1!==t.rejection&&!t.parent},nt=function(t){k.call(c,(function(){var e=t.facade;L?V.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},rt=function(t,e,n){return function(r){t(e,r,n)}},it=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,X(t,!0))},ot=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw F("Promise can't be resolved itself");var r=J(e);r?S((function(){var n={done:!1};try{r.call(e,rt(ot,n,t),rt(it,n,t))}catch(i){it(n,i,t)}})):(t.value=e,t.state=1,X(t,!1))}catch(i){it({done:!1},i,t)}}};G&&(B=function(t){y(this,B,R),g(t),r.call(this);var e=N(this);try{t(rt(ot,e),rt(it,e))}catch(n){it(e,n)}},(r=function(t){z(this,{type:R,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(B.prototype,{then:function(t,e){var n=j(this),r=H(x(this,B));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=L?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=N(t);this.promise=t,this.resolve=rt(ot,e),this.reject=rt(it,e)},E.f=H=function(t){return t===B||t===o?new i(t):W(t)},u||"function"!=typeof h||(a=h.prototype.then,f(h.prototype,"then",(function(t,e){var n=this;return new B((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof U&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return C(B,U.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:G},{Promise:B}),p(B,R,!1,!0),m(R),o=l(R),s({target:R,stat:!0,forced:G},{reject:function(t){var e=H(this);return e.reject.call(void 0,t),e.promise}}),s({target:R,stat:!0,forced:u||G},{resolve:function(t){return C(u&&this===o?B:this,t)}}),s({target:R,stat:!0,forced:K},{all:function(t){var e=this,n=H(e),r=n.resolve,i=n.reject,o=T((function(){var n=g(e.resolve),o=[],a=0,s=1;_(t,(function(t){var u=a++,c=!1;o.push(void 0),s++,n.call(e,t).then((function(t){c||(c=!0,o[u]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=H(e),r=n.reject,i=T((function(){var i=g(e.resolve);_(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(t,e,n){var r=n(62);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,e,n){var r=n(2);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(147),a=n(1),s=n(28),u=n(42),c=n(150),l=n(15);r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then((function(){return n}))}:t,n?function(n){return c(e,t()).then((function(){throw n}))}:t)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",s("Promise").prototype.finally)},function(t,e,n){var r=n(0),i=n(28),o=n(25),a=n(4),s=n(1),u=i("Reflect","apply"),c=Function.apply;r({target:"Reflect",stat:!0,forced:!s((function(){u((function(){}))}))},{apply:function(t,e,n){return o(t),a(n),u?u(t,e,n):c.call(t,e,n)}})},function(t,e,n){var r=n(0),i=n(28),o=n(25),a=n(4),s=n(3),u=n(33),c=n(137),l=n(1),h=i("Reflect","construct"),f=l((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),d=!l((function(){h((function(){}))})),p=f||d;r({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(d&&!f)return h(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var i=n.prototype,l=u(s(i)?i:Object.prototype),p=Function.apply.call(t,l,e);return s(p)?p:l}})},function(t,e,n){var r=n(0),i=n(5),o=n(4),a=n(27),s=n(10);r({target:"Reflect",stat:!0,forced:n(1)((function(){Reflect.defineProperty(s.f({},1,{value:1}),1,{value:2})})),sham:!i},{defineProperty:function(t,e,n){o(t);var r=a(e,!0);o(n);try{return s.f(t,r,n),!0}catch(i){return!1}}})},function(t,e,n){var r=n(0),i=n(4),o=n(14).f;r({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){var r=n(0),i=n(3),o=n(4),a=n(12),s=n(14),u=n(29);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,c,l=arguments.length<3?e:arguments[2];return o(e)===l?e[n]:(r=s.f(e,n))?a(r,"value")?r.value:void 0===r.get?void 0:r.get.call(l):i(c=u(e))?t(c,n,l):void 0}})},function(t,e,n){var r=n(0),i=n(5),o=n(4),a=n(14);r({target:"Reflect",stat:!0,sham:!i},{getOwnPropertyDescriptor:function(t,e){return a.f(o(t),e)}})},function(t,e,n){var r=n(0),i=n(4),o=n(29);r({target:"Reflect",stat:!0,sham:!n(100)},{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,n){n(0)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),i=n(4),o=Object.isExtensible;r({target:"Reflect",stat:!0},{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){n(0)({target:"Reflect",stat:!0},{ownKeys:n(91)})},function(t,e,n){var r=n(0),i=n(28),o=n(4);r({target:"Reflect",stat:!0,sham:!n(66)},{preventExtensions:function(t){o(t);try{var e=i("Object","preventExtensions");return e&&e(t),!0}catch(n){return!1}}})},function(t,e,n){var r=n(0),i=n(4),o=n(3),a=n(12),s=n(1),u=n(10),c=n(14),l=n(29),h=n(36);r({target:"Reflect",stat:!0,forced:s((function(){var t=function(){},e=u.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}))},{set:function t(e,n,r){var s,f,d=arguments.length<4?e:arguments[3],p=c.f(i(e),n);if(!p){if(o(f=l(e)))return t(f,n,r,d);p=h(0)}if(a(p,"value")){if(!1===p.writable||!o(d))return!1;if(s=c.f(d,n)){if(s.get||s.set||!1===s.writable)return!1;s.value=r,u.f(d,n,s)}else u.f(d,n,h(0,r));return!0}return void 0!==p.set&&(p.set.call(d,r),!0)}})},function(t,e,n){var r=n(0),i=n(4),o=n(134),a=n(47);a&&r({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){i(t),o(e);try{return a(t,e),!0}catch(n){return!1}}})},function(t,e,n){var r=n(5),i=n(2),o=n(57),a=n(76),s=n(10).f,u=n(44).f,c=n(106),l=n(80),h=n(107),f=n(15),d=n(1),p=n(20).set,m=n(50),v=n(7)("match"),g=i.RegExp,y=g.prototype,b=/a/g,_=/a/g,w=new g(b)!==b,x=h.UNSUPPORTED_Y;if(r&&o("RegExp",!w||x||d((function(){return _[v]=!1,g(b)!=b||g(_)==_||"/a/i"!=g(b,"i")})))){for(var k=function(t,e){var n,r=this instanceof k,i=c(t),o=void 0===e;if(!r&&i&&t.constructor===k&&o)return t;w?i&&!o&&(t=t.source):t instanceof k&&(o&&(e=l.call(t)),t=t.source),x&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var s=a(w?new g(t,e):g(t,e),r?this:y,k);return x&&n&&p(s,{sticky:n}),s},S=function(t){t in k||s(k,t,{configurable:!0,get:function(){return g[t]},set:function(e){g[t]=e}})},C=u(g),M=0;C.length>M;)S(C[M++]);y.constructor=k,k.prototype=y,f(i,"RegExp",k)}m("RegExp")},function(t,e,n){var r=n(5),i=n(10),o=n(80),a=n(107).UNSUPPORTED_Y;r&&("g"!=/./g.flags||a)&&i.f(RegExp.prototype,"flags",{configurable:!0,get:o})},function(t,e,n){"use strict";var r=n(15),i=n(4),o=n(1),a=n(80),s="toString",u=RegExp.prototype,c=u.toString,l=o((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),h=c.name!=s;(l||h)&&r(RegExp.prototype,s,(function(){var t=i(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in u)?a.call(t):n)}),{unsafe:!0})},function(t,e,n){"use strict";var r=n(75),i=n(138);t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},function(t,e,n){"use strict";var r=n(0),i=n(82).codeAt;r({target:"String",proto:!0},{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r,i=n(0),o=n(14).f,a=n(9),s=n(108),u=n(16),c=n(109),l=n(30),h="".endsWith,f=Math.min,d=c("endsWith");i({target:"String",proto:!0,forced:!(!l&&!d&&!(!(r=o(String.prototype,"endsWith"))||r.writable))&&!d},{endsWith:function(t){var e=String(u(this));s(t);var n=arguments.length>1?arguments[1]:void 0,r=a(e.length),i=void 0===n?r:f(a(n),r),o=String(t);return h?h.call(e,o,i):e.slice(i-o.length,i)===o}})},function(t,e,n){var r=n(0),i=n(38),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){"use strict";var r=n(0),i=n(108),o=n(16);r({target:"String",proto:!0,forced:!n(109)("includes")},{includes:function(t){return!!~String(o(this)).indexOf(i(t),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(83),i=n(4),o=n(9),a=n(16),s=n(110),u=n(84);r("match",1,(function(t,e,n){return[function(e){var n=a(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var a=i(t),c=String(this);if(!a.global)return u(a,c);var l=a.unicode;a.lastIndex=0;for(var h,f=[],d=0;null!==(h=u(a,c));){var p=String(h[0]);f[d]=p,""===p&&(a.lastIndex=s(c,o(a.lastIndex),l)),d++}return 0===d?null:f}]}))},function(t,e,n){"use strict";var r=n(0),i=n(102).end;r({target:"String",proto:!0,forced:n(154)},{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0),i=n(102).start;r({target:"String",proto:!0,forced:n(154)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0),i=n(19),o=n(9);r({target:"String",stat:!0},{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,n){n(0)({target:"String",proto:!0},{repeat:n(103)})},function(t,e,n){"use strict";var r=n(83),i=n(4),o=n(9),a=n(24),s=n(16),u=n(110),c=n(336),l=n(84),h=Math.max,f=Math.min;r("replace",2,(function(t,e,n,r){var d=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,p=r.REPLACE_KEEPS_$0,m=d?"$":"$0";return[function(n,r){var i=s(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!d&&p||"string"===typeof r&&-1===r.indexOf(m)){var s=n(e,t,this,r);if(s.done)return s.value}var v=i(t),g=String(this),y="function"===typeof r;y||(r=String(r));var b=v.global;if(b){var _=v.unicode;v.lastIndex=0}for(var w=[];;){var x=l(v,g);if(null===x)break;if(w.push(x),!b)break;""===String(x[0])&&(v.lastIndex=u(g,o(v.lastIndex),_))}for(var k,S="",C=0,M=0;M<w.length;M++){x=w[M];for(var E=String(x[0]),T=h(f(a(x.index),g.length),0),A=[],O=1;O<x.length;O++)A.push(void 0===(k=x[O])?k:String(k));var P=x.groups;if(y){var L=[E].concat(A,T,g);void 0!==P&&L.push(P);var D=String(r.apply(void 0,L))}else D=c(E,g,T,A,P,r);T>=C&&(S+=g.slice(C,T)+D,C=T+E.length)}return S+g.slice(C)}]}))},function(t,e,n){var r=n(11),i=Math.floor,o="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,s=/\$([$&'`]|\d\d?)/g;t.exports=function(t,e,n,u,c,l){var h=n+t.length,f=u.length,d=s;return void 0!==c&&(c=r(c),d=a),o.call(l,d,(function(r,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(h);case"<":a=c[o.slice(1,-1)];break;default:var s=+o;if(0===s)return r;if(s>f){var l=i(s/10);return 0===l?r:l<=f?void 0===u[l-1]?o.charAt(1):u[l-1]+o.charAt(1):r}a=u[s-1]}return void 0===a?"":a}))}},function(t,e,n){"use strict";var r=n(83),i=n(4),o=n(16),a=n(146),s=n(84);r("search",1,(function(t,e,n){return[function(e){var n=o(this),r=void 0==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var o=i(t),u=String(this),c=o.lastIndex;a(c,0)||(o.lastIndex=0);var l=s(o,u);return a(o.lastIndex,c)||(o.lastIndex=c),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var r=n(83),i=n(106),o=n(4),a=n(16),s=n(42),u=n(110),c=n(9),l=n(84),h=n(81),f=n(1),d=[].push,p=Math.min,m=4294967295,v=!f((function(){return!RegExp(m,"y")}));r("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(a(this)),o=void 0===n?m:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,o);for(var s,u,c,l=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,v=new RegExp(t.source,f+"g");(s=h.call(v,r))&&!((u=v.lastIndex)>p&&(l.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&d.apply(l,s.slice(1)),c=s[0].length,p=u,l.length>=o));)v.lastIndex===s.index&&v.lastIndex++;return p===r.length?!c&&v.test("")||l.push(""):l.push(r.slice(p)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=a(this),o=void 0==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var a=n(r,t,this,i,r!==e);if(a.done)return a.value;var h=o(t),f=String(this),d=s(h,RegExp),g=h.unicode,y=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(v?"y":"g"),b=new d(v?h:"^(?:"+h.source+")",y),_=void 0===i?m:i>>>0;if(0===_)return[];if(0===f.length)return null===l(b,f)?[f]:[];for(var w=0,x=0,k=[];x<f.length;){b.lastIndex=v?x:0;var S,C=l(b,v?f:f.slice(x));if(null===C||(S=p(c(b.lastIndex+(v?0:x)),f.length))===w)x=u(f,x,g);else{if(k.push(f.slice(w,x)),k.length===_)return k;for(var M=1;M<=C.length-1;M++)if(k.push(C[M]),k.length===_)return k;x=w=S}}return k.push(f.slice(w)),k}]}),!v)},function(t,e,n){"use strict";var r,i=n(0),o=n(14).f,a=n(9),s=n(108),u=n(16),c=n(109),l=n(30),h="".startsWith,f=Math.min,d=c("startsWith");i({target:"String",proto:!0,forced:!(!l&&!d&&!(!(r=o(String.prototype,"startsWith"))||r.writable))&&!d},{startsWith:function(t){var e=String(u(this));s(t);var n=a(f(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return h?h.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";var r=n(0),i=n(52).trim;r({target:"String",proto:!0,forced:n(111)("trim")},{trim:function(){return i(this)}})},function(t,e,n){"use strict";var r=n(0),i=n(52).end,o=n(111)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:a,trimRight:a})},function(t,e,n){"use strict";var r=n(0),i=n(52).start,o=n(111)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:a,trimLeft:a})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("anchor")},{anchor:function(t){return i(this,"a","name",t)}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("big")},{big:function(){return i(this,"big","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("blink")},{blink:function(){return i(this,"blink","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("bold")},{bold:function(){return i(this,"b","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("fontcolor")},{fontcolor:function(t){return i(this,"font","color",t)}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("fontsize")},{fontsize:function(t){return i(this,"font","size",t)}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("italics")},{italics:function(){return i(this,"i","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("link")},{link:function(t){return i(this,"a","href",t)}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("small")},{small:function(){return i(this,"small","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("strike")},{strike:function(){return i(this,"strike","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("sub")},{sub:function(){return i(this,"sub","","")}})},function(t,e,n){"use strict";var r=n(0),i=n(22);r({target:"String",proto:!0,forced:n(23)("sup")},{sup:function(){return i(this,"sup","","")}})},function(t,e,n){n(35)("Float32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){var r=n(24);t.exports=function(t){var e=r(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},function(t,e,n){n(35)("Float64",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(35)("Int8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(35)("Int16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(35)("Int32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(35)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(35)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},function(t,e,n){n(35)("Uint16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(35)("Uint32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){"use strict";var r=n(8),i=n(127),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(t,e){return i.call(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var r=n(8),i=n(13).every,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(8),i=n(96),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(t){return i.apply(o(this),arguments)}))},function(t,e,n){"use strict";var r=n(8),i=n(13).filter,o=n(42),a=r.aTypedArray,s=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("filter",(function(t){for(var e=i(a(this),t,arguments.length>1?arguments[1]:void 0),n=o(this,this.constructor),r=0,u=e.length,c=new(s(n))(u);u>r;)c[r]=e[r++];return c}))},function(t,e,n){"use strict";var r=n(8),i=n(13).find,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(8),i=n(13).findIndex,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(8),i=n(13).forEach,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(t){i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(112);(0,n(8).exportTypedArrayStaticMethod)("from",n(156),r)},function(t,e,n){"use strict";var r=n(8),i=n(56).includes,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(8),i=n(56).indexOf,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(2),i=n(8),o=n(72),a=n(7)("iterator"),s=r.Uint8Array,u=o.values,c=o.keys,l=o.entries,h=i.aTypedArray,f=i.exportTypedArrayMethod,d=s&&s.prototype[a],p=!!d&&("values"==d.name||void 0==d.name),m=function(){return u.call(h(this))};f("entries",(function(){return l.call(h(this))})),f("keys",(function(){return c.call(h(this))})),f("values",m,!p),f(a,m,!p)},function(t,e,n){"use strict";var r=n(8),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=[].join;o("join",(function(t){return a.apply(i(this),arguments)}))},function(t,e,n){"use strict";var r=n(8),i=n(135),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(t){return i.apply(o(this),arguments)}))},function(t,e,n){"use strict";var r=n(8),i=n(13).map,o=n(42),a=r.aTypedArray,s=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(s(o(t,t.constructor)))(e)}))}))},function(t,e,n){"use strict";var r=n(8),i=n(112),o=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(o(this))(e);e>t;)n[t]=arguments[t++];return n}),i)},function(t,e,n){"use strict";var r=n(8),i=n(73).left,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(t){return i(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(8),i=n(73).right,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(t){return i(o(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(8),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var t,e=this,n=i(e).length,r=a(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e}))},function(t,e,n){"use strict";var r=n(8),i=n(9),o=n(155),a=n(11),s=n(1),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("set",(function(t){u(this);var e=o(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=a(t),s=i(r.length),c=0;if(s+e>n)throw RangeError("Wrong length");for(;c<s;)this[e+c]=r[c++]}),s((function(){new Int8Array(1).set({})})))},function(t,e,n){"use strict";var r=n(8),i=n(42),o=n(1),a=r.aTypedArray,s=r.aTypedArrayConstructor,u=r.exportTypedArrayMethod,c=[].slice;u("slice",(function(t,e){for(var n=c.call(a(this),t,e),r=i(this,this.constructor),o=0,u=n.length,l=new(s(r))(u);u>o;)l[o]=n[o++];return l}),o((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var r=n(8),i=n(13).some,o=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(8),i=r.aTypedArray,o=r.exportTypedArrayMethod,a=[].sort;o("sort",(function(t){return a.call(i(this),t)}))},function(t,e,n){"use strict";var r=n(8),i=n(9),o=n(38),a=n(42),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(t,e){var n=s(this),r=n.length,u=o(t,r);return new(a(n,n.constructor))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,i((void 0===e?r:o(e,r))-u))}))},function(t,e,n){"use strict";var r=n(2),i=n(8),o=n(1),a=r.Int8Array,s=i.aTypedArray,u=i.exportTypedArrayMethod,c=[].toLocaleString,l=[].slice,h=!!a&&o((function(){c.call(new a(1))}));u("toLocaleString",(function(){return c.apply(h?l.call(s(this)):s(this),arguments)}),o((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!o((function(){a.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var r=n(8).exportTypedArrayMethod,i=n(1),o=n(2).Uint8Array,a=o&&o.prototype||{},s=[].toString,u=[].join;i((function(){s.call({})}))&&(s=function(){return u.call(this)});var c=a.toString!=s;r("toString",s,c)},function(t,e,n){"use strict";var r,i=n(2),o=n(51),a=n(48),s=n(75),u=n(157),c=n(3),l=n(20).enforce,h=n(119),f=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},m=t.exports=s("WeakMap",p,u);if(h&&f){r=u.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var v=m.prototype,g=v.delete,y=v.has,b=v.get,_=v.set;o(v,{delete:function(t){if(c(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new r),g.call(this,t)||e.frozen.delete(t)}return g.call(this,t)},has:function(t){if(c(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new r),y.call(this,t)||e.frozen.has(t)}return y.call(this,t)},get:function(t){if(c(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new r),y.call(this,t)?b.call(this,t):e.frozen.get(t)}return b.call(this,t)},set:function(t,e){if(c(t)&&!d(t)){var n=l(this);n.frozen||(n.frozen=new r),y.call(this,t)?_.call(this,t,e):n.frozen.set(t,e)}else _.call(this,t,e);return this}})}},function(t,e,n){"use strict";n(75)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(157))},function(t,e,n){var r=n(2),i=n(158),o=n(129),a=n(17);for(var s in i){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(l){c.forEach=o}}},function(t,e,n){var r=n(2),i=n(158),o=n(72),a=n(17),s=n(7),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var h in i){var f=r[h],d=f&&f.prototype;if(d){if(d[u]!==l)try{a(d,u,l)}catch(m){d[u]=l}if(d[c]||a(d,c,h),i[h])for(var p in o)if(d[p]!==o[p])try{a(d,p,o[p])}catch(m){d[p]=o[p]}}}},function(t,e,n){var r=n(0),i=n(2),o=n(105);r({global:!0,bind:!0,enumerable:!0,forced:!i.setImmediate||!i.clearImmediate},{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,n){var r=n(0),i=n(2),o=n(149),a=n(49),s=i.process;r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(t){var e=a&&s.domain;o(e?e.bind(t):t)}})},function(t,e,n){var r=n(0),i=n(2),o=n(62),a=[].slice,s=function(t){return function(e,n){var r=arguments.length>2,i=r?a.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(o)},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})},function(t,e,n){"use strict";n(153);var r,i=n(0),o=n(5),a=n(159),s=n(2),u=n(95),c=n(15),l=n(41),h=n(12),f=n(144),d=n(130),p=n(82).codeAt,m=n(399),v=n(31),g=n(160),y=n(20),b=s.URL,_=g.URLSearchParams,w=g.getState,x=y.set,k=y.getterFor("URL"),S=Math.floor,C=Math.pow,M="Invalid scheme",E="Invalid host",T="Invalid port",A=/[A-Za-z]/,O=/[\d+-.A-Za-z]/,P=/\d/,L=/^(0x|0X)/,D=/^[0-7]+$/,I=/^\d+$/,R=/^[\dA-Fa-f]+$/,N=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,z=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,j=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\u0009\u000A\u000D]/g,F=function(t,e){var n,r,i;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return E;if(!(n=V(e.slice(1,-1))))return E;t.host=n}else if(K(t)){if(e=m(e),N.test(e))return E;if(null===(n=q(e)))return E;t.host=n}else{if(z.test(e))return E;for(n="",r=d(e),i=0;i<r.length;i++)n+=Y(r[i],H);t.host=n}},q=function(t){var e,n,r,i,o,a,s,u=t.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(e=u.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=u[r]))return t;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=L.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?I:8==o?D:R).test(i))return t;a=parseInt(i,o)}n.push(a)}for(r=0;r<e;r++)if(a=n[r],r==e-1){if(a>=C(256,5-e))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*C(256,3-r);return s},V=function(t){var e,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,f=function(){return t.charAt(h)};if(":"==f()){if(":"!=t.charAt(1))return;h+=2,l=++c}for(;f();){if(8==c)return;if(":"!=f()){for(e=n=0;n<4&&R.test(f());)e=16*e+parseInt(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,c>6)return;for(r=0;f();){if(i=null,r>0){if(!("."==f()&&r<4))return;h++}if(!P.test(f()))return;for(;P.test(f());){if(o=parseInt(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;u[c++]=e}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u},U=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=S(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},H={},W=f({},H,{" ":1,'"':1,"<":1,">":1,"`":1}),$=f({},W,{"#":1,"?":1,"{":1,"}":1}),Z=f({},$,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(t,e){var n=p(t,0);return n>32&&n<127&&!h(e,t)?t:encodeURIComponent(t)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(t){return h(G,t.scheme)},J=function(t){return""!=t.username||""!=t.password},X=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},Q=function(t,e){var n;return 2==t.length&&A.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},tt=function(t){var e;return t.length>1&&Q(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},et=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&Q(e[0],!0)||e.pop()},nt=function(t){return"."===t||"%2e"===t.toLowerCase()},rt={},it={},ot={},at={},st={},ut={},ct={},lt={},ht={},ft={},dt={},pt={},mt={},vt={},gt={},yt={},bt={},_t={},wt={},xt={},kt={},St=function(t,e,n,i){var o,a,s,u,c,l=n||rt,f=0,p="",m=!1,v=!1,g=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(j,"")),e=e.replace(B,""),o=d(e);f<=o.length;){switch(a=o[f],l){case rt:if(!a||!A.test(a)){if(n)return M;l=ot;continue}p+=a.toLowerCase(),l=it;break;case it:if(a&&(O.test(a)||"+"==a||"-"==a||"."==a))p+=a.toLowerCase();else{if(":"!=a){if(n)return M;p="",l=ot,f=0;continue}if(n&&(K(t)!=h(G,p)||"file"==p&&(J(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=p,n)return void(K(t)&&G[t.scheme]==t.port&&(t.port=null));p="","file"==t.scheme?l=vt:K(t)&&i&&i.scheme==t.scheme?l=at:K(t)?l=lt:"/"==o[f+1]?(l=st,f++):(t.cannotBeABaseURL=!0,t.path.push(""),l=wt)}break;case ot:if(!i||i.cannotBeABaseURL&&"#"!=a)return M;if(i.cannotBeABaseURL&&"#"==a){t.scheme=i.scheme,t.path=i.path.slice(),t.query=i.query,t.fragment="",t.cannotBeABaseURL=!0,l=kt;break}l="file"==i.scheme?vt:ut;continue;case at:if("/"!=a||"/"!=o[f+1]){l=ut;continue}l=ht,f++;break;case st:if("/"==a){l=ft;break}l=_t;continue;case ut:if(t.scheme=i.scheme,a==r)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query;else if("/"==a||"\\"==a&&K(t))l=ct;else if("?"==a)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query="",l=xt;else{if("#"!=a){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.path.pop(),l=_t;continue}t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query,t.fragment="",l=kt}break;case ct:if(!K(t)||"/"!=a&&"\\"!=a){if("/"!=a){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,l=_t;continue}l=ft}else l=ht;break;case lt:if(l=ht,"/"!=a||"/"!=p.charAt(f+1))continue;f++;break;case ht:if("/"!=a&&"\\"!=a){l=ft;continue}break;case ft:if("@"==a){m&&(p="%40"+p),m=!0,s=d(p);for(var y=0;y<s.length;y++){var b=s[y];if(":"!=b||g){var _=Y(b,Z);g?t.password+=_:t.username+=_}else g=!0}p=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)){if(m&&""==p)return"Invalid authority";f-=d(p).length+1,p="",l=dt}else p+=a;break;case dt:case pt:if(n&&"file"==t.scheme){l=yt;continue}if(":"!=a||v){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)){if(K(t)&&""==p)return E;if(n&&""==p&&(J(t)||null!==t.port))return;if(u=F(t,p))return u;if(p="",l=bt,n)return;continue}"["==a?v=!0:"]"==a&&(v=!1),p+=a}else{if(""==p)return E;if(u=F(t,p))return u;if(p="",l=mt,n==pt)return}break;case mt:if(!P.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&K(t)||n){if(""!=p){var w=parseInt(p,10);if(w>65535)return T;t.port=K(t)&&w===G[t.scheme]?null:w,p=""}if(n)return;l=bt;continue}return T}p+=a;break;case vt:if(t.scheme="file","/"==a||"\\"==a)l=gt;else{if(!i||"file"!=i.scheme){l=_t;continue}if(a==r)t.host=i.host,t.path=i.path.slice(),t.query=i.query;else if("?"==a)t.host=i.host,t.path=i.path.slice(),t.query="",l=xt;else{if("#"!=a){tt(o.slice(f).join(""))||(t.host=i.host,t.path=i.path.slice(),et(t)),l=_t;continue}t.host=i.host,t.path=i.path.slice(),t.query=i.query,t.fragment="",l=kt}}break;case gt:if("/"==a||"\\"==a){l=yt;break}i&&"file"==i.scheme&&!tt(o.slice(f).join(""))&&(Q(i.path[0],!0)?t.path.push(i.path[0]):t.host=i.host),l=_t;continue;case yt:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Q(p))l=_t;else if(""==p){if(t.host="",n)return;l=bt}else{if(u=F(t,p))return u;if("localhost"==t.host&&(t.host=""),n)return;p="",l=bt}continue}p+=a;break;case bt:if(K(t)){if(l=_t,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(l=_t,"/"!=a))continue}else t.fragment="",l=kt;else t.query="",l=xt;break;case _t:if(a==r||"/"==a||"\\"==a&&K(t)||!n&&("?"==a||"#"==a)){if(".."===(c=(c=p).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(et(t),"/"==a||"\\"==a&&K(t)||t.path.push("")):nt(p)?"/"==a||"\\"==a&&K(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&Q(p)&&(t.host&&(t.host=""),p=p.charAt(0)+":"),t.path.push(p)),p="","file"==t.scheme&&(a==r||"?"==a||"#"==a))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==a?(t.query="",l=xt):"#"==a&&(t.fragment="",l=kt)}else p+=Y(a,$);break;case wt:"?"==a?(t.query="",l=xt):"#"==a?(t.fragment="",l=kt):a!=r&&(t.path[0]+=Y(a,H));break;case xt:n||"#"!=a?a!=r&&("'"==a&&K(t)?t.query+="%27":t.query+="#"==a?"%23":Y(a,H)):(t.fragment="",l=kt);break;case kt:a!=r&&(t.fragment+=Y(a,W))}f++}},Ct=function(t){var e,n,r=l(this,Ct,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(t),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof Ct)e=k(i);else if(n=St(e={},String(i)))throw TypeError(n);if(n=St(s,a,null,e))throw TypeError(n);var u=s.searchParams=new _,c=w(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},o||(r.href=Et.call(r),r.origin=Tt.call(r),r.protocol=At.call(r),r.username=Ot.call(r),r.password=Pt.call(r),r.host=Lt.call(r),r.hostname=Dt.call(r),r.port=It.call(r),r.pathname=Rt.call(r),r.search=Nt.call(r),r.searchParams=zt.call(r),r.hash=jt.call(r))},Mt=Ct.prototype,Et=function(){var t=k(this),e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,a=t.path,s=t.query,u=t.fragment,c=e+":";return null!==i?(c+="//",J(t)&&(c+=n+(r?":"+r:"")+"@"),c+=U(i),null!==o&&(c+=":"+o)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},Tt=function(){var t=k(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(r){return"null"}return"file"!=e&&K(t)?e+"://"+U(t.host)+(null!==n?":"+n:""):"null"},At=function(){return k(this).scheme+":"},Ot=function(){return k(this).username},Pt=function(){return k(this).password},Lt=function(){var t=k(this),e=t.host,n=t.port;return null===e?"":null===n?U(e):U(e)+":"+n},Dt=function(){var t=k(this).host;return null===t?"":U(t)},It=function(){var t=k(this).port;return null===t?"":String(t)},Rt=function(){var t=k(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Nt=function(){var t=k(this).query;return t?"?"+t:""},zt=function(){return k(this).searchParams},jt=function(){var t=k(this).fragment;return t?"#"+t:""},Bt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&u(Mt,{href:Bt(Et,(function(t){var e=k(this),n=String(t),r=St(e,n);if(r)throw TypeError(r);w(e.searchParams).updateSearchParams(e.query)})),origin:Bt(Tt),protocol:Bt(At,(function(t){var e=k(this);St(e,String(t)+":",rt)})),username:Bt(Ot,(function(t){var e=k(this),n=d(String(t));if(!X(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=Y(n[r],Z)}})),password:Bt(Pt,(function(t){var e=k(this),n=d(String(t));if(!X(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=Y(n[r],Z)}})),host:Bt(Lt,(function(t){var e=k(this);e.cannotBeABaseURL||St(e,String(t),dt)})),hostname:Bt(Dt,(function(t){var e=k(this);e.cannotBeABaseURL||St(e,String(t),pt)})),port:Bt(It,(function(t){var e=k(this);X(e)||(""==(t=String(t))?e.port=null:St(e,t,mt))})),pathname:Bt(Rt,(function(t){var e=k(this);e.cannotBeABaseURL||(e.path=[],St(e,t+"",bt))})),search:Bt(Nt,(function(t){var e=k(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",St(e,t,xt)),w(e.searchParams).updateSearchParams(e.query)})),searchParams:Bt(zt),hash:Bt(jt,(function(t){var e=k(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",St(e,t,kt)):e.fragment=null}))}),c(Mt,"toJSON",(function(){return Et.call(this)}),{enumerable:!0}),c(Mt,"toString",(function(){return Et.call(this)}),{enumerable:!0}),b){var Ft=b.createObjectURL,qt=b.revokeObjectURL;Ft&&c(Ct,"createObjectURL",(function(t){return Ft.apply(b,arguments)})),qt&&c(Ct,"revokeObjectURL",(function(t){return qt.apply(b,arguments)}))}v(Ct,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Ct})},function(t,e,n){"use strict";var r=2147483647,i=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",s=Math.floor,u=String.fromCharCode,c=function(t){return t+22+75*(t<26)},l=function(t,e,n){var r=0;for(t=n?s(t/700):t>>1,t+=s(t/e);t>455;r+=36)t=s(t/35);return s(r+36*t/(t+38))},h=function(t){var e,n,i=[],o=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),n--)}else e.push(i)}return e}(t)).length,h=128,f=0,d=72;for(e=0;e<t.length;e++)(n=t[e])<128&&i.push(u(n));var p=i.length,m=p;for(p&&i.push("-");m<o;){var v=r;for(e=0;e<t.length;e++)(n=t[e])>=h&&n<v&&(v=n);var g=m+1;if(v-h>s((r-f)/g))throw RangeError(a);for(f+=(v-h)*g,h=v,e=0;e<t.length;e++){if((n=t[e])<h&&++f>r)throw RangeError(a);if(n==h){for(var y=f,b=36;;b+=36){var _=b<=d?1:b>=d+26?26:b-d;if(y<_)break;var w=y-_,x=36-_;i.push(u(c(_+w%x))),y=s(w/x)}i.push(u(c(y))),d=l(f,g,m==p),f=0,++m}}++f,++h}return i.join("")};t.exports=function(t){var e,n,r=[],a=t.toLowerCase().replace(o,".").split(".");for(e=0;e<a.length;e++)n=a[e],r.push(i.test(n)?"xn--"+h(n):n);return r.join(".")}},function(t,e,n){var r=n(4),i=n(64);t.exports=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},function(t,e,n){"use strict";n(0)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(t,e,n){(function(t){var r="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(403),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(68))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,c={},l=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"===typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[u]=i,r(u),u++},f.clearImmediate=d}function d(t){delete c[t]}function p(t){if(l)setTimeout(p,0,t);else{var e=c[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{d(t),l=!1}}}}}("undefined"===typeof self?"undefined"===typeof t?this:t:self)}).call(this,n(68),n(404))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r,i,o;!function(n,a){"use strict";i=[],void 0===(o="function"===typeof(r=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t.charAt(0).toUpperCase()+t.substring(1)}function n(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],i=["columnNumber","lineNumber"],o=["fileName","functionName","source"],a=["args"],s=["evalOrigin"],u=r.concat(i,o,a,s);function c(t){if(t)for(var n=0;n<u.length;n++)void 0!==t[u[n]]&&this["set"+e(u[n])](t[u[n]])}c.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof c)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new c(t)}},toString:function(){var t=this.getFileName()||"",e=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?t?"[eval] ("+t+":"+e+":"+n+")":"[eval]:"+e+":"+n:r?r+" ("+t+":"+e+":"+n+")":t+":"+e+":"+n}},c.fromString=function(t){var e=t.indexOf("("),n=t.lastIndexOf(")"),r=t.substring(0,e),i=t.substring(e+1,n).split(","),o=t.substring(n+1);if(0===o.indexOf("@"))var a=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),s=a[1],u=a[2],l=a[3];return new c({functionName:r,args:i||void 0,fileName:s,lineNumber:u||void 0,columnNumber:l||void 0})};for(var l=0;l<r.length;l++)c.prototype["get"+e(r[l])]=n(r[l]),c.prototype["set"+e(r[l])]=function(t){return function(e){this[t]=Boolean(e)}}(r[l]);for(var h=0;h<i.length;h++)c.prototype["get"+e(i[h])]=n(i[h]),c.prototype["set"+e(i[h])]=function(e){return function(n){if(!t(n))throw new TypeError(e+" must be a Number");this[e]=Number(n)}}(i[h]);for(var f=0;f<o.length;f++)c.prototype["get"+e(o[f])]=n(o[f]),c.prototype["set"+e(o[f])]=function(t){return function(e){this[t]=String(e)}}(o[f]);return c})?r.apply(e,i):r)||(t.exports=o)}()},function(t,e,n){var r=n(407).RBTree;function i(t,e,n){this.discrete=!1===t,this.delta=t||.01,this.K=void 0===e?25:e,this.CX=void 0===n?1.1:n,this.centroids=new r(o),this.nreset=0,this.reset()}function o(t,e){return t.mean>e.mean?1:t.mean<e.mean?-1:0}function a(t,e){return t.mean_cumn-e.mean_cumn}function s(t){this.config=t||{},this.mode=this.config.mode||"auto",i.call(this,"cont"===this.mode&&t.delta),this.digest_ratio=this.config.ratio||.9,this.digest_thresh=this.config.thresh||1e3,this.n_unique=0}i.prototype.reset=function(){this.centroids.clear(),this.n=0,this.nreset+=1,this.last_cumulate=0},i.prototype.size=function(){return this.centroids.size},i.prototype.toArray=function(t){var e=[];return t?(this._cumulate(!0),this.centroids.each((function(t){e.push(t)}))):this.centroids.each((function(t){e.push({mean:t.mean,n:t.n})})),e},i.prototype.summary=function(){return[(this.discrete?"exact ":"approximating ")+this.n+" samples using "+this.size()+" centroids","min = "+this.percentile(0),"Q1 = "+this.percentile(.25),"Q2 = "+this.percentile(.5),"Q3 = "+this.percentile(.75),"max = "+this.percentile(1)].join("\n")},i.prototype.push=function(t,e){e=e||1,t=Array.isArray(t)?t:[t];for(var n=0;n<t.length;n++)this._digest(t[n],e)},i.prototype.push_centroid=function(t){t=Array.isArray(t)?t:[t];for(var e=0;e<t.length;e++)this._digest(t[e].mean,t[e].n)},i.prototype._cumulate=function(t){if(!(this.n===this.last_cumulate||!t&&this.CX&&this.CX>this.n/this.last_cumulate)){var e=0;this.centroids.each((function(t){t.mean_cumn=e+t.n/2,e=t.cumn=e+t.n})),this.n=this.last_cumulate=e}},i.prototype.find_nearest=function(t){if(0===this.size())return null;var e=this.centroids.lowerBound({mean:t}),n=null===e.data()?e.prev():e.data();if(n.mean===t||this.discrete)return n;var r=e.prev();return r&&Math.abs(r.mean-t)<Math.abs(n.mean-t)?r:n},i.prototype._new_centroid=function(t,e,n){var r={mean:t,n:e,cumn:n};return this.centroids.insert(r),this.n+=e,r},i.prototype._addweight=function(t,e,n){e!==t.mean&&(t.mean+=n*(e-t.mean)/(t.n+n)),t.cumn+=n,t.mean_cumn+=n/2,t.n+=n,this.n+=n},i.prototype._digest=function(t,e){var n=this.centroids.min(),r=this.centroids.max(),i=this.find_nearest(t);if(i&&i.mean===t)this._addweight(i,t,e);else if(i===n)this._new_centroid(t,e,0);else if(i===r)this._new_centroid(t,e,this.n);else if(this.discrete)this._new_centroid(t,e,i.cumn);else{var o=i.mean_cumn/this.n;Math.floor(4*this.n*this.delta*o*(1-o))-i.n>=e?this._addweight(i,t,e):this._new_centroid(t,e,i.cumn)}this._cumulate(!1),!this.discrete&&this.K&&this.size()>this.K/this.delta&&this.compress()},i.prototype.bound_mean=function(t){var e=this.centroids.upperBound({mean:t}),n=e.prev();return[n,n.mean===t?n:e.next()]},i.prototype.p_rank=function(t){var e=(Array.isArray(t)?t:[t]).map(this._p_rank,this);return Array.isArray(t)?e:e[0]},i.prototype._p_rank=function(t){if(0!==this.size()){if(t<this.centroids.min().mean)return 0;if(t>this.centroids.max().mean)return 1;this._cumulate(!0);var e=this.bound_mean(t),n=e[0],r=e[1];if(this.discrete)return n.cumn/this.n;var i=n.mean_cumn;return n!==r&&(i+=(t-n.mean)*(r.mean_cumn-n.mean_cumn)/(r.mean-n.mean)),i/this.n}},i.prototype.bound_mean_cumn=function(t){this.centroids._comparator=a;var e=this.centroids.upperBound({mean_cumn:t});this.centroids._comparator=o;var n=e.prev();return[n,n&&n.mean_cumn===t?n:e.next()]},i.prototype.percentile=function(t){var e=(Array.isArray(t)?t:[t]).map(this._percentile,this);return Array.isArray(t)?e:e[0]},i.prototype._percentile=function(t){if(0!==this.size()){this._cumulate(!0);this.centroids.min(),this.centroids.max();var e=this.n*t,n=this.bound_mean_cumn(e),r=n[0],i=n[1];return i===r||null===r||null===i?(r||i).mean:this.discrete?e<=r.cumn?r.mean:i.mean:r.mean+(e-r.mean_cumn)*(i.mean-r.mean)/(i.mean_cumn-r.mean_cumn)}},i.prototype.compress=function(){if(!this.compressing){var t,e,n=this.toArray();for(this.reset(),this.compressing=!0;n.length>0;)this.push_centroid((t=n,e=void 0,e=Math.floor(Math.random()*t.length),t.splice(e,1)[0]));this._cumulate(!0),this.compressing=!1}},s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.prototype.push=function(t){i.prototype.push.call(this,t),this.check_continuous()},s.prototype._new_centroid=function(t,e,n){this.n_unique+=1,i.prototype._new_centroid.call(this,t,e,n)},s.prototype._addweight=function(t,e,n){1===t.n&&(this.n_unique-=1),i.prototype._addweight.call(this,t,e,n)},s.prototype.check_continuous=function(){return!("auto"!==this.mode||this.size()<this.digest_thresh)&&(this.n_unique/this.size()>this.digest_ratio&&(this.mode="cont",this.discrete=!1,this.delta=this.config.delta||.01,this.compress(),!0))},t.exports={TDigest:i,Digest:s}},function(t,e,n){t.exports={RBTree:n(408),BinTree:n(409)}},function(t,e,n){var r=n(161);function i(t){this.data=t,this.left=null,this.right=null,this.red=!0}function o(t){this._root=null,this._comparator=t,this.size=0}function a(t){return null!==t&&t.red}function s(t,e){var n=t.get_child(!e);return t.set_child(!e,n.get_child(e)),n.set_child(e,t),t.red=!0,n.red=!1,n}function u(t,e){return t.set_child(!e,s(t.get_child(!e),!e)),s(t,e)}i.prototype.get_child=function(t){return t?this.right:this.left},i.prototype.set_child=function(t,e){t?this.right=e:this.left=e},o.prototype=new r,o.prototype.insert=function(t){var e=!1;if(null===this._root)this._root=new i(t),e=!0,this.size++;else{var n=new i(void 0),r=0,o=0,c=null,l=n,h=null,f=this._root;for(l.right=this._root;;){if(null===f?(f=new i(t),h.set_child(r,f),e=!0,this.size++):a(f.left)&&a(f.right)&&(f.red=!0,f.left.red=!1,f.right.red=!1),a(f)&&a(h)){var d=l.right===c;f===h.get_child(o)?l.set_child(d,s(c,!o)):l.set_child(d,u(c,!o))}var p=this._comparator(f.data,t);if(0===p)break;o=r,r=p<0,null!==c&&(l=c),c=h,h=f,f=f.get_child(r)}this._root=n.right}return this._root.red=!1,e},o.prototype.remove=function(t){if(null===this._root)return!1;var e=new i(void 0),n=e;n.right=this._root;for(var r=null,o=null,c=null,l=1;null!==n.get_child(l);){var h=l;o=r,r=n,n=n.get_child(l);var f=this._comparator(t,n.data);if(l=f>0,0===f&&(c=n),!a(n)&&!a(n.get_child(l)))if(a(n.get_child(!l))){var d=s(n,l);r.set_child(h,d),r=d}else if(!a(n.get_child(!l))){var p=r.get_child(!h);if(null!==p)if(a(p.get_child(!h))||a(p.get_child(h))){var m=o.right===r;a(p.get_child(h))?o.set_child(m,u(r,h)):a(p.get_child(!h))&&o.set_child(m,s(r,h));var v=o.get_child(m);v.red=!0,n.red=!0,v.left.red=!1,v.right.red=!1}else r.red=!1,p.red=!0,n.red=!0}}return null!==c&&(c.data=n.data,r.set_child(r.right===n,n.get_child(null===n.left)),this.size--),this._root=e.right,null!==this._root&&(this._root.red=!1),null!==c},t.exports=o},function(t,e,n){var r=n(161);function i(t){this.data=t,this.left=null,this.right=null}function o(t){this._root=null,this._comparator=t,this.size=0}i.prototype.get_child=function(t){return t?this.right:this.left},i.prototype.set_child=function(t,e){t?this.right=e:this.left=e},o.prototype=new r,o.prototype.insert=function(t){if(null===this._root)return this._root=new i(t),this.size++,!0;for(var e=0,n=null,r=this._root;;){if(null===r)return r=new i(t),n.set_child(e,r),ret=!0,this.size++,!0;if(0===this._comparator(r.data,t))return!1;e=this._comparator(r.data,t)<0,n=r,r=r.get_child(e)}},o.prototype.remove=function(t){if(null===this._root)return!1;var e=new i(void 0),n=e;n.right=this._root;for(var r=null,o=null,a=1;null!==n.get_child(a);){r=n,n=n.get_child(a);var s=this._comparator(t,n.data);a=s>0,0===s&&(o=n)}return null!==o&&(o.data=n.data,r.set_child(r.right===n,n.get_child(null===n.left)),this._root=e.right,this.size--,!0)},t.exports=o},function(t,e,n){var r={"./geo_controller.js":411,"./non_geo_controller.js":412,"./reorder_controller.js":413};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=410},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return f}));var r=n(43),i=n(26),o=n.n(i);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function l(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n(163),delete o.a.Icon.Default.prototype._getIconUrl,o.a.Icon.Default.mergeOptions({iconRetinaUrl:n(164),iconUrl:n(165),shadowUrl:n(166)});var f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(l,t);var e,n,r,i=c(l);function l(){return a(this,l),i.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){var t=this;this.marker(),this.latTarget.addEventListener("change",(function(e){return t.marker()})),this.lngTarget.addEventListener("change",(function(e){return t.marker()})),window.addEventListener("resize",(function(e){return t.map.invalidateSize()})),this.map.on("click",(function(e){t.latTarget.value=e.latlng.lat,t.lngTarget.value=e.latlng.lng,t.latTarget.dispatchEvent(new Event("change"))}))}},{key:"marker",value:function(){return this._marker&&this.map.removeLayer(this._marker),this._marker=o.a.marker(this.coords).addTo(this.map),this._marker}},{key:"lat",get:function(){var t=parseFloat(this.latTarget.value);return isNaN(t)?0:t}},{key:"lng",get:function(){var t=parseFloat(this.lngTarget.value);return isNaN(t)?0:t}},{key:"coords",get:function(){return[this.lat,this.lng]}},{key:"map",get:function(){return this._map||(this._map=o.a.map(this.mapTarget).setView(this.coords,13),o.a.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'}).addTo(this._map)),this._map}}])&&s(e.prototype,n),r&&s(e,r),l}(r.b);f.targets=["lat","lng","map"]},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return m}));var r=n(117),i=n.n(r),o=n(43),a=n(26),s=n.n(a);function u(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=p(t);if(e){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n(163),delete s.a.Icon.Default.prototype._getIconUrl,s.a.Icon.Default.mergeOptions({iconRetinaUrl:n(164),iconUrl:n(165),shadowUrl:n(166)});var m=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(p,t);var e,n,r,o,a,d=f(p);function p(){return c(this,p),d.apply(this,arguments)}return e=p,(n=[{key:"connect",value:(o=i.a.mark((function t(){var e=this;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.marker(),this.latTarget.addEventListener("change",(function(t){return e.marker()})),this.lngTarget.addEventListener("change",(function(t){return e.marker()})),window.addEventListener("resize",(function(t){return e.map.invalidateSize()})),this.map.on("click",(function(t){e.latTarget.value=t.latlng.lat,e.lngTarget.value=t.latlng.lng,e.latTarget.dispatchEvent(new Event("change"))}));case 5:case"end":return t.stop()}}),t,this)})),a=function(){var t=this,e=arguments;return new Promise((function(n,r){var i=o.apply(t,e);function a(t){u(i,n,r,a,s,"next",t)}function s(t){u(i,n,r,a,s,"throw",t)}a(void 0)}))},function(){return a.apply(this,arguments)})},{key:"marker",value:function(){return this._marker&&this.map.removeLayer(this._marker),this._marker=s.a.marker(this.coords).addTo(this.map),this._marker}},{key:"lat",get:function(){var t=parseFloat(this.latTarget.value);return isNaN(t)?0:t}},{key:"lng",get:function(){var t=parseFloat(this.lngTarget.value);return isNaN(t)?0:t}},{key:"coords",get:function(){return[this.lat,this.lng]}},{key:"bounds",get:function(){return[[0,0],[this.svgOverlay.viewBox.baseVal.height,this.svgOverlay.viewBox.baseVal.width]]}},{key:"map",get:function(){return this._map||(this._map=s.a.map(this.mapTarget,{minZoom:0,maxZoom:5}).setView(this.coords,0),this._layer=s.a.tileLayer("".concat(this.element.dataset.site,"public/map/{z}/{y}/{x}.png"),{minNativeZoom:0,maxNativeZoom:5,noWrap:!0}).addTo(this._map)),this._map}}])&&l(e.prototype,n),r&&l(e,r),p}(o.b);m.targets=["lat","lng","map","overlay"]},function(t,e,n){"use strict";function r(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.r(e),n.d(e,"default",(function(){return h}));var h=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,n,i,c=u(l);function l(){return o(this,l),c.apply(this,arguments)}return e=l,(n=[{key:"connect",value:function(){var t=this;document.addEventListener("keydown",(function(e){t.codes.includes(e.keyCode)&&(t.empty||(e.preventDefault(),t.move(38===e.keyCode?"up":"down")))}))}},{key:"selected_rows",get:function(){return this._selected_rows||(this._selected_rows={}),this._selected_rows}},{key:"codes",get:function(){return this._codes||(this._codes=[38,40]),this._codes}},{key:"empty",get:function(){return 0===Object.keys(this.selected_rows).length}},{key:"sorted_rows",get:function(){return Object.values(this.selected_rows).sort((function(t,e){return t.order-e.order}))}},{key:"reorder",value:function(){for(var t=0,e=Object.values(this.selected_rows);t<e.length;t++){var n=e[t];this.selected_rows[n.row.id].order=this.rowTargets.indexOf(n.row)}var r=this.rowTargets.length;this.rowTargets.forEach((function(t,e){t.querySelector("[data-reorder]").value=r-e}))}},{key:"move",value:function(t){if(!this.empty){var e="up"===t,n=!e,i=e?"previousElementSibling":"nextElementSibling",o=this.sorted_rows;n&&o.reverse();var a,s=r(o);try{for(s.s();!(a=s.n()).done;){var u=a.value.row,c=u[i];c&&c.tagName===u.tagName&&(e?u.parentElement.insertBefore(u,c):u.parentElement.insertBefore(c,u))}}catch(l){s.e(l)}finally{s.f()}this.reorder(),o[0].row.scrollIntoView({block:"center"})}}},{key:"counter",value:function(){this.counterTarget.innerText=Object.keys(this.selected_rows).length}},{key:"unselect",value:function(t){t.preventDefault(),t.stopPropagation();for(var e=0,n=Object.values(this.selected_rows);e<n.length;e++)n[e].row.querySelector('[data-action="reorder#select"]').click()}},{key:"top",value:function(t){if(t.preventDefault(),t.stopPropagation(),!this.empty){var e,n=this.sorted_rows,i=n[0].row.parentElement.firstElementChild,o=r(n);try{for(o.s();!(e=o.n()).done;){var a=e.value.row;a!==i&&a.parentElement.insertBefore(a,i)}}catch(s){o.e(s)}finally{o.f()}this.reorder(),n[0].row.scrollIntoView({block:"center"})}}},{key:"bottom",value:function(t){if(t.preventDefault(),t.stopPropagation(),!this.empty){var e,n=this.sorted_rows,i=r(n);try{for(i.s();!(e=i.n()).done;){var o=e.value.row;o.parentElement.appendChild(o)}}catch(a){i.e(a)}finally{i.f()}this.reorder(),n[0].row.scrollIntoView({block:"center"})}}},{key:"select",value:function(t){var e=t.target.closest("tr");t.target.checked?this.selected_rows[e.id]={row:e,order:this.rowTargets.indexOf(e)}:delete this.selected_rows[e.id],this.counter()}},{key:"up",value:function(t){t.preventDefault(),t.stopPropagation(),this.empty||this.move("up")}},{key:"down",value:function(t){t.preventDefault(),t.stopPropagation(),this.empty||this.move("down")}}])&&a(e.prototype,n),i&&a(e,i),l}(n(43).b);h.targets=["row","counter"]},function(t,e,n){},function(t,e){document.addEventListener("turbolinks:load",(function(){document.querySelectorAll("a[href^='http://'],a[href^='https://'],a[href^='//']").forEach((function(t){t.rel="noopener",t.target="_blank"}))}))},function(t,e){document.addEventListener("turbolinks:load",(function(){document.querySelectorAll("input[type=file]").forEach((function(t){t.dataset.preview&&t.addEventListener("change",(function(e){0!==t.files.length&&(document.querySelector("#"+t.dataset.preview).src=window.URL.createObjectURL(t.files[0]))}))}))}))},function(t,e){document.addEventListener("turbolinks:load",(function(){document.querySelectorAll('input[type="date"]').forEach((function(t){"date"!==t.type&&t.addEventListener("change",(function(e){t.setCustomValidity(t.validity.patternMismatch?t.dataset.patternMismatch:"")}))}))}))},function(t,e,n){"use strict";var r=n(6),i=n(426),o=n(430),a=n(431),s=n(439),u=n(453),c=n(466),l=n(168),h=n(468),f={default:n(469),zero:n(470),commonmark:n(471)},d=/^(vbscript|javascript|file|data):/,p=/^data:image\/(gif|png|jpeg|webp);/;function m(t){var e=t.trim().toLowerCase();return!d.test(e)||!!p.test(e)}var v=["http:","https:","mailto:"];function g(t){var e=l.parse(t,!0);if(e.hostname&&(!e.protocol||v.indexOf(e.protocol)>=0))try{e.hostname=h.toASCII(e.hostname)}catch(n){}return l.encode(l.format(e))}function y(t){var e=l.parse(t,!0);if(e.hostname&&(!e.protocol||v.indexOf(e.protocol)>=0))try{e.hostname=h.toUnicode(e.hostname)}catch(n){}return l.decode(l.format(e))}function b(t,e){if(!(this instanceof b))return new b(t,e);e||r.isString(t)||(e=t||{},t="default"),this.inline=new u,this.block=new s,this.core=new a,this.renderer=new o,this.linkify=new c,this.validateLink=m,this.normalizeLink=g,this.normalizeLinkText=y,this.utils=r,this.helpers=r.assign({},i),this.options={},this.configure(t),e&&this.set(e)}b.prototype.set=function(t){return r.assign(this.options,t),this},b.prototype.configure=function(t){var e,n=this;if(r.isString(t)&&!(t=f[e=t]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach((function(e){t.components[e].rules&&n[e].ruler.enableOnly(t.components[e].rules),t.components[e].rules2&&n[e].ruler2.enableOnly(t.components[e].rules2)})),this},b.prototype.enable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.enable(t,!0))}),this),n=n.concat(this.inline.ruler2.enable(t,!0));var r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},b.prototype.disable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.disable(t,!0))}),this),n=n.concat(this.inline.ruler2.disable(t,!0));var r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},b.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},b.prototype.parse=function(t,e){if("string"!==typeof t)throw new Error("Input data should be a String");var n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},b.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},b.prototype.parseInline=function(t,e){var n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},b.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)},t.exports=b},function(t){t.exports=JSON.parse('{"Aacute":"\xc1","aacute":"\xe1","Abreve":"\u0102","abreve":"\u0103","ac":"\u223e","acd":"\u223f","acE":"\u223e\u0333","Acirc":"\xc2","acirc":"\xe2","acute":"\xb4","Acy":"\u0410","acy":"\u0430","AElig":"\xc6","aelig":"\xe6","af":"\u2061","Afr":"\ud835\udd04","afr":"\ud835\udd1e","Agrave":"\xc0","agrave":"\xe0","alefsym":"\u2135","aleph":"\u2135","Alpha":"\u0391","alpha":"\u03b1","Amacr":"\u0100","amacr":"\u0101","amalg":"\u2a3f","amp":"&","AMP":"&","andand":"\u2a55","And":"\u2a53","and":"\u2227","andd":"\u2a5c","andslope":"\u2a58","andv":"\u2a5a","ang":"\u2220","ange":"\u29a4","angle":"\u2220","angmsdaa":"\u29a8","angmsdab":"\u29a9","angmsdac":"\u29aa","angmsdad":"\u29ab","angmsdae":"\u29ac","angmsdaf":"\u29ad","angmsdag":"\u29ae","angmsdah":"\u29af","angmsd":"\u2221","angrt":"\u221f","angrtvb":"\u22be","angrtvbd":"\u299d","angsph":"\u2222","angst":"\xc5","angzarr":"\u237c","Aogon":"\u0104","aogon":"\u0105","Aopf":"\ud835\udd38","aopf":"\ud835\udd52","apacir":"\u2a6f","ap":"\u2248","apE":"\u2a70","ape":"\u224a","apid":"\u224b","apos":"\'","ApplyFunction":"\u2061","approx":"\u2248","approxeq":"\u224a","Aring":"\xc5","aring":"\xe5","Ascr":"\ud835\udc9c","ascr":"\ud835\udcb6","Assign":"\u2254","ast":"*","asymp":"\u2248","asympeq":"\u224d","Atilde":"\xc3","atilde":"\xe3","Auml":"\xc4","auml":"\xe4","awconint":"\u2233","awint":"\u2a11","backcong":"\u224c","backepsilon":"\u03f6","backprime":"\u2035","backsim":"\u223d","backsimeq":"\u22cd","Backslash":"\u2216","Barv":"\u2ae7","barvee":"\u22bd","barwed":"\u2305","Barwed":"\u2306","barwedge":"\u2305","bbrk":"\u23b5","bbrktbrk":"\u23b6","bcong":"\u224c","Bcy":"\u0411","bcy":"\u0431","bdquo":"\u201e","becaus":"\u2235","because":"\u2235","Because":"\u2235","bemptyv":"\u29b0","bepsi":"\u03f6","bernou":"\u212c","Bernoullis":"\u212c","Beta":"\u0392","beta":"\u03b2","beth":"\u2136","between":"\u226c","Bfr":"\ud835\udd05","bfr":"\ud835\udd1f","bigcap":"\u22c2","bigcirc":"\u25ef","bigcup":"\u22c3","bigodot":"\u2a00","bigoplus":"\u2a01","bigotimes":"\u2a02","bigsqcup":"\u2a06","bigstar":"\u2605","bigtriangledown":"\u25bd","bigtriangleup":"\u25b3","biguplus":"\u2a04","bigvee":"\u22c1","bigwedge":"\u22c0","bkarow":"\u290d","blacklozenge":"\u29eb","blacksquare":"\u25aa","blacktriangle":"\u25b4","blacktriangledown":"\u25be","blacktriangleleft":"\u25c2","blacktriangleright":"\u25b8","blank":"\u2423","blk12":"\u2592","blk14":"\u2591","blk34":"\u2593","block":"\u2588","bne":"=\u20e5","bnequiv":"\u2261\u20e5","bNot":"\u2aed","bnot":"\u2310","Bopf":"\ud835\udd39","bopf":"\ud835\udd53","bot":"\u22a5","bottom":"\u22a5","bowtie":"\u22c8","boxbox":"\u29c9","boxdl":"\u2510","boxdL":"\u2555","boxDl":"\u2556","boxDL":"\u2557","boxdr":"\u250c","boxdR":"\u2552","boxDr":"\u2553","boxDR":"\u2554","boxh":"\u2500","boxH":"\u2550","boxhd":"\u252c","boxHd":"\u2564","boxhD":"\u2565","boxHD":"\u2566","boxhu":"\u2534","boxHu":"\u2567","boxhU":"\u2568","boxHU":"\u2569","boxminus":"\u229f","boxplus":"\u229e","boxtimes":"\u22a0","boxul":"\u2518","boxuL":"\u255b","boxUl":"\u255c","boxUL":"\u255d","boxur":"\u2514","boxuR":"\u2558","boxUr":"\u2559","boxUR":"\u255a","boxv":"\u2502","boxV":"\u2551","boxvh":"\u253c","boxvH":"\u256a","boxVh":"\u256b","boxVH":"\u256c","boxvl":"\u2524","boxvL":"\u2561","boxVl":"\u2562","boxVL":"\u2563","boxvr":"\u251c","boxvR":"\u255e","boxVr":"\u255f","boxVR":"\u2560","bprime":"\u2035","breve":"\u02d8","Breve":"\u02d8","brvbar":"\xa6","bscr":"\ud835\udcb7","Bscr":"\u212c","bsemi":"\u204f","bsim":"\u223d","bsime":"\u22cd","bsolb":"\u29c5","bsol":"\\\\","bsolhsub":"\u27c8","bull":"\u2022","bullet":"\u2022","bump":"\u224e","bumpE":"\u2aae","bumpe":"\u224f","Bumpeq":"\u224e","bumpeq":"\u224f","Cacute":"\u0106","cacute":"\u0107","capand":"\u2a44","capbrcup":"\u2a49","capcap":"\u2a4b","cap":"\u2229","Cap":"\u22d2","capcup":"\u2a47","capdot":"\u2a40","CapitalDifferentialD":"\u2145","caps":"\u2229\ufe00","caret":"\u2041","caron":"\u02c7","Cayleys":"\u212d","ccaps":"\u2a4d","Ccaron":"\u010c","ccaron":"\u010d","Ccedil":"\xc7","ccedil":"\xe7","Ccirc":"\u0108","ccirc":"\u0109","Cconint":"\u2230","ccups":"\u2a4c","ccupssm":"\u2a50","Cdot":"\u010a","cdot":"\u010b","cedil":"\xb8","Cedilla":"\xb8","cemptyv":"\u29b2","cent":"\xa2","centerdot":"\xb7","CenterDot":"\xb7","cfr":"\ud835\udd20","Cfr":"\u212d","CHcy":"\u0427","chcy":"\u0447","check":"\u2713","checkmark":"\u2713","Chi":"\u03a7","chi":"\u03c7","circ":"\u02c6","circeq":"\u2257","circlearrowleft":"\u21ba","circlearrowright":"\u21bb","circledast":"\u229b","circledcirc":"\u229a","circleddash":"\u229d","CircleDot":"\u2299","circledR":"\xae","circledS":"\u24c8","CircleMinus":"\u2296","CirclePlus":"\u2295","CircleTimes":"\u2297","cir":"\u25cb","cirE":"\u29c3","cire":"\u2257","cirfnint":"\u2a10","cirmid":"\u2aef","cirscir":"\u29c2","ClockwiseContourIntegral":"\u2232","CloseCurlyDoubleQuote":"\u201d","CloseCurlyQuote":"\u2019","clubs":"\u2663","clubsuit":"\u2663","colon":":","Colon":"\u2237","Colone":"\u2a74","colone":"\u2254","coloneq":"\u2254","comma":",","commat":"@","comp":"\u2201","compfn":"\u2218","complement":"\u2201","complexes":"\u2102","cong":"\u2245","congdot":"\u2a6d","Congruent":"\u2261","conint":"\u222e","Conint":"\u222f","ContourIntegral":"\u222e","copf":"\ud835\udd54","Copf":"\u2102","coprod":"\u2210","Coproduct":"\u2210","copy":"\xa9","COPY":"\xa9","copysr":"\u2117","CounterClockwiseContourIntegral":"\u2233","crarr":"\u21b5","cross":"\u2717","Cross":"\u2a2f","Cscr":"\ud835\udc9e","cscr":"\ud835\udcb8","csub":"\u2acf","csube":"\u2ad1","csup":"\u2ad0","csupe":"\u2ad2","ctdot":"\u22ef","cudarrl":"\u2938","cudarrr":"\u2935","cuepr":"\u22de","cuesc":"\u22df","cularr":"\u21b6","cularrp":"\u293d","cupbrcap":"\u2a48","cupcap":"\u2a46","CupCap":"\u224d","cup":"\u222a","Cup":"\u22d3","cupcup":"\u2a4a","cupdot":"\u228d","cupor":"\u2a45","cups":"\u222a\ufe00","curarr":"\u21b7","curarrm":"\u293c","curlyeqprec":"\u22de","curlyeqsucc":"\u22df","curlyvee":"\u22ce","curlywedge":"\u22cf","curren":"\xa4","curvearrowleft":"\u21b6","curvearrowright":"\u21b7","cuvee":"\u22ce","cuwed":"\u22cf","cwconint":"\u2232","cwint":"\u2231","cylcty":"\u232d","dagger":"\u2020","Dagger":"\u2021","daleth":"\u2138","darr":"\u2193","Darr":"\u21a1","dArr":"\u21d3","dash":"\u2010","Dashv":"\u2ae4","dashv":"\u22a3","dbkarow":"\u290f","dblac":"\u02dd","Dcaron":"\u010e","dcaron":"\u010f","Dcy":"\u0414","dcy":"\u0434","ddagger":"\u2021","ddarr":"\u21ca","DD":"\u2145","dd":"\u2146","DDotrahd":"\u2911","ddotseq":"\u2a77","deg":"\xb0","Del":"\u2207","Delta":"\u0394","delta":"\u03b4","demptyv":"\u29b1","dfisht":"\u297f","Dfr":"\ud835\udd07","dfr":"\ud835\udd21","dHar":"\u2965","dharl":"\u21c3","dharr":"\u21c2","DiacriticalAcute":"\xb4","DiacriticalDot":"\u02d9","DiacriticalDoubleAcute":"\u02dd","DiacriticalGrave":"`","DiacriticalTilde":"\u02dc","diam":"\u22c4","diamond":"\u22c4","Diamond":"\u22c4","diamondsuit":"\u2666","diams":"\u2666","die":"\xa8","DifferentialD":"\u2146","digamma":"\u03dd","disin":"\u22f2","div":"\xf7","divide":"\xf7","divideontimes":"\u22c7","divonx":"\u22c7","DJcy":"\u0402","djcy":"\u0452","dlcorn":"\u231e","dlcrop":"\u230d","dollar":"$","Dopf":"\ud835\udd3b","dopf":"\ud835\udd55","Dot":"\xa8","dot":"\u02d9","DotDot":"\u20dc","doteq":"\u2250","doteqdot":"\u2251","DotEqual":"\u2250","dotminus":"\u2238","dotplus":"\u2214","dotsquare":"\u22a1","doublebarwedge":"\u2306","DoubleContourIntegral":"\u222f","DoubleDot":"\xa8","DoubleDownArrow":"\u21d3","DoubleLeftArrow":"\u21d0","DoubleLeftRightArrow":"\u21d4","DoubleLeftTee":"\u2ae4","DoubleLongLeftArrow":"\u27f8","DoubleLongLeftRightArrow":"\u27fa","DoubleLongRightArrow":"\u27f9","DoubleRightArrow":"\u21d2","DoubleRightTee":"\u22a8","DoubleUpArrow":"\u21d1","DoubleUpDownArrow":"\u21d5","DoubleVerticalBar":"\u2225","DownArrowBar":"\u2913","downarrow":"\u2193","DownArrow":"\u2193","Downarrow":"\u21d3","DownArrowUpArrow":"\u21f5","DownBreve":"\u0311","downdownarrows":"\u21ca","downharpoonleft":"\u21c3","downharpoonright":"\u21c2","DownLeftRightVector":"\u2950","DownLeftTeeVector":"\u295e","DownLeftVectorBar":"\u2956","DownLeftVector":"\u21bd","DownRightTeeVector":"\u295f","DownRightVectorBar":"\u2957","DownRightVector":"\u21c1","DownTeeArrow":"\u21a7","DownTee":"\u22a4","drbkarow":"\u2910","drcorn":"\u231f","drcrop":"\u230c","Dscr":"\ud835\udc9f","dscr":"\ud835\udcb9","DScy":"\u0405","dscy":"\u0455","dsol":"\u29f6","Dstrok":"\u0110","dstrok":"\u0111","dtdot":"\u22f1","dtri":"\u25bf","dtrif":"\u25be","duarr":"\u21f5","duhar":"\u296f","dwangle":"\u29a6","DZcy":"\u040f","dzcy":"\u045f","dzigrarr":"\u27ff","Eacute":"\xc9","eacute":"\xe9","easter":"\u2a6e","Ecaron":"\u011a","ecaron":"\u011b","Ecirc":"\xca","ecirc":"\xea","ecir":"\u2256","ecolon":"\u2255","Ecy":"\u042d","ecy":"\u044d","eDDot":"\u2a77","Edot":"\u0116","edot":"\u0117","eDot":"\u2251","ee":"\u2147","efDot":"\u2252","Efr":"\ud835\udd08","efr":"\ud835\udd22","eg":"\u2a9a","Egrave":"\xc8","egrave":"\xe8","egs":"\u2a96","egsdot":"\u2a98","el":"\u2a99","Element":"\u2208","elinters":"\u23e7","ell":"\u2113","els":"\u2a95","elsdot":"\u2a97","Emacr":"\u0112","emacr":"\u0113","empty":"\u2205","emptyset":"\u2205","EmptySmallSquare":"\u25fb","emptyv":"\u2205","EmptyVerySmallSquare":"\u25ab","emsp13":"\u2004","emsp14":"\u2005","emsp":"\u2003","ENG":"\u014a","eng":"\u014b","ensp":"\u2002","Eogon":"\u0118","eogon":"\u0119","Eopf":"\ud835\udd3c","eopf":"\ud835\udd56","epar":"\u22d5","eparsl":"\u29e3","eplus":"\u2a71","epsi":"\u03b5","Epsilon":"\u0395","epsilon":"\u03b5","epsiv":"\u03f5","eqcirc":"\u2256","eqcolon":"\u2255","eqsim":"\u2242","eqslantgtr":"\u2a96","eqslantless":"\u2a95","Equal":"\u2a75","equals":"=","EqualTilde":"\u2242","equest":"\u225f","Equilibrium":"\u21cc","equiv":"\u2261","equivDD":"\u2a78","eqvparsl":"\u29e5","erarr":"\u2971","erDot":"\u2253","escr":"\u212f","Escr":"\u2130","esdot":"\u2250","Esim":"\u2a73","esim":"\u2242","Eta":"\u0397","eta":"\u03b7","ETH":"\xd0","eth":"\xf0","Euml":"\xcb","euml":"\xeb","euro":"\u20ac","excl":"!","exist":"\u2203","Exists":"\u2203","expectation":"\u2130","exponentiale":"\u2147","ExponentialE":"\u2147","fallingdotseq":"\u2252","Fcy":"\u0424","fcy":"\u0444","female":"\u2640","ffilig":"\ufb03","fflig":"\ufb00","ffllig":"\ufb04","Ffr":"\ud835\udd09","ffr":"\ud835\udd23","filig":"\ufb01","FilledSmallSquare":"\u25fc","FilledVerySmallSquare":"\u25aa","fjlig":"fj","flat":"\u266d","fllig":"\ufb02","fltns":"\u25b1","fnof":"\u0192","Fopf":"\ud835\udd3d","fopf":"\ud835\udd57","forall":"\u2200","ForAll":"\u2200","fork":"\u22d4","forkv":"\u2ad9","Fouriertrf":"\u2131","fpartint":"\u2a0d","frac12":"\xbd","frac13":"\u2153","frac14":"\xbc","frac15":"\u2155","frac16":"\u2159","frac18":"\u215b","frac23":"\u2154","frac25":"\u2156","frac34":"\xbe","frac35":"\u2157","frac38":"\u215c","frac45":"\u2158","frac56":"\u215a","frac58":"\u215d","frac78":"\u215e","frasl":"\u2044","frown":"\u2322","fscr":"\ud835\udcbb","Fscr":"\u2131","gacute":"\u01f5","Gamma":"\u0393","gamma":"\u03b3","Gammad":"\u03dc","gammad":"\u03dd","gap":"\u2a86","Gbreve":"\u011e","gbreve":"\u011f","Gcedil":"\u0122","Gcirc":"\u011c","gcirc":"\u011d","Gcy":"\u0413","gcy":"\u0433","Gdot":"\u0120","gdot":"\u0121","ge":"\u2265","gE":"\u2267","gEl":"\u2a8c","gel":"\u22db","geq":"\u2265","geqq":"\u2267","geqslant":"\u2a7e","gescc":"\u2aa9","ges":"\u2a7e","gesdot":"\u2a80","gesdoto":"\u2a82","gesdotol":"\u2a84","gesl":"\u22db\ufe00","gesles":"\u2a94","Gfr":"\ud835\udd0a","gfr":"\ud835\udd24","gg":"\u226b","Gg":"\u22d9","ggg":"\u22d9","gimel":"\u2137","GJcy":"\u0403","gjcy":"\u0453","gla":"\u2aa5","gl":"\u2277","glE":"\u2a92","glj":"\u2aa4","gnap":"\u2a8a","gnapprox":"\u2a8a","gne":"\u2a88","gnE":"\u2269","gneq":"\u2a88","gneqq":"\u2269","gnsim":"\u22e7","Gopf":"\ud835\udd3e","gopf":"\ud835\udd58","grave":"`","GreaterEqual":"\u2265","GreaterEqualLess":"\u22db","GreaterFullEqual":"\u2267","GreaterGreater":"\u2aa2","GreaterLess":"\u2277","GreaterSlantEqual":"\u2a7e","GreaterTilde":"\u2273","Gscr":"\ud835\udca2","gscr":"\u210a","gsim":"\u2273","gsime":"\u2a8e","gsiml":"\u2a90","gtcc":"\u2aa7","gtcir":"\u2a7a","gt":">","GT":">","Gt":"\u226b","gtdot":"\u22d7","gtlPar":"\u2995","gtquest":"\u2a7c","gtrapprox":"\u2a86","gtrarr":"\u2978","gtrdot":"\u22d7","gtreqless":"\u22db","gtreqqless":"\u2a8c","gtrless":"\u2277","gtrsim":"\u2273","gvertneqq":"\u2269\ufe00","gvnE":"\u2269\ufe00","Hacek":"\u02c7","hairsp":"\u200a","half":"\xbd","hamilt":"\u210b","HARDcy":"\u042a","hardcy":"\u044a","harrcir":"\u2948","harr":"\u2194","hArr":"\u21d4","harrw":"\u21ad","Hat":"^","hbar":"\u210f","Hcirc":"\u0124","hcirc":"\u0125","hearts":"\u2665","heartsuit":"\u2665","hellip":"\u2026","hercon":"\u22b9","hfr":"\ud835\udd25","Hfr":"\u210c","HilbertSpace":"\u210b","hksearow":"\u2925","hkswarow":"\u2926","hoarr":"\u21ff","homtht":"\u223b","hookleftarrow":"\u21a9","hookrightarrow":"\u21aa","hopf":"\ud835\udd59","Hopf":"\u210d","horbar":"\u2015","HorizontalLine":"\u2500","hscr":"\ud835\udcbd","Hscr":"\u210b","hslash":"\u210f","Hstrok":"\u0126","hstrok":"\u0127","HumpDownHump":"\u224e","HumpEqual":"\u224f","hybull":"\u2043","hyphen":"\u2010","Iacute":"\xcd","iacute":"\xed","ic":"\u2063","Icirc":"\xce","icirc":"\xee","Icy":"\u0418","icy":"\u0438","Idot":"\u0130","IEcy":"\u0415","iecy":"\u0435","iexcl":"\xa1","iff":"\u21d4","ifr":"\ud835\udd26","Ifr":"\u2111","Igrave":"\xcc","igrave":"\xec","ii":"\u2148","iiiint":"\u2a0c","iiint":"\u222d","iinfin":"\u29dc","iiota":"\u2129","IJlig":"\u0132","ijlig":"\u0133","Imacr":"\u012a","imacr":"\u012b","image":"\u2111","ImaginaryI":"\u2148","imagline":"\u2110","imagpart":"\u2111","imath":"\u0131","Im":"\u2111","imof":"\u22b7","imped":"\u01b5","Implies":"\u21d2","incare":"\u2105","in":"\u2208","infin":"\u221e","infintie":"\u29dd","inodot":"\u0131","intcal":"\u22ba","int":"\u222b","Int":"\u222c","integers":"\u2124","Integral":"\u222b","intercal":"\u22ba","Intersection":"\u22c2","intlarhk":"\u2a17","intprod":"\u2a3c","InvisibleComma":"\u2063","InvisibleTimes":"\u2062","IOcy":"\u0401","iocy":"\u0451","Iogon":"\u012e","iogon":"\u012f","Iopf":"\ud835\udd40","iopf":"\ud835\udd5a","Iota":"\u0399","iota":"\u03b9","iprod":"\u2a3c","iquest":"\xbf","iscr":"\ud835\udcbe","Iscr":"\u2110","isin":"\u2208","isindot":"\u22f5","isinE":"\u22f9","isins":"\u22f4","isinsv":"\u22f3","isinv":"\u2208","it":"\u2062","Itilde":"\u0128","itilde":"\u0129","Iukcy":"\u0406","iukcy":"\u0456","Iuml":"\xcf","iuml":"\xef","Jcirc":"\u0134","jcirc":"\u0135","Jcy":"\u0419","jcy":"\u0439","Jfr":"\ud835\udd0d","jfr":"\ud835\udd27","jmath":"\u0237","Jopf":"\ud835\udd41","jopf":"\ud835\udd5b","Jscr":"\ud835\udca5","jscr":"\ud835\udcbf","Jsercy":"\u0408","jsercy":"\u0458","Jukcy":"\u0404","jukcy":"\u0454","Kappa":"\u039a","kappa":"\u03ba","kappav":"\u03f0","Kcedil":"\u0136","kcedil":"\u0137","Kcy":"\u041a","kcy":"\u043a","Kfr":"\ud835\udd0e","kfr":"\ud835\udd28","kgreen":"\u0138","KHcy":"\u0425","khcy":"\u0445","KJcy":"\u040c","kjcy":"\u045c","Kopf":"\ud835\udd42","kopf":"\ud835\udd5c","Kscr":"\ud835\udca6","kscr":"\ud835\udcc0","lAarr":"\u21da","Lacute":"\u0139","lacute":"\u013a","laemptyv":"\u29b4","lagran":"\u2112","Lambda":"\u039b","lambda":"\u03bb","lang":"\u27e8","Lang":"\u27ea","langd":"\u2991","langle":"\u27e8","lap":"\u2a85","Laplacetrf":"\u2112","laquo":"\xab","larrb":"\u21e4","larrbfs":"\u291f","larr":"\u2190","Larr":"\u219e","lArr":"\u21d0","larrfs":"\u291d","larrhk":"\u21a9","larrlp":"\u21ab","larrpl":"\u2939","larrsim":"\u2973","larrtl":"\u21a2","latail":"\u2919","lAtail":"\u291b","lat":"\u2aab","late":"\u2aad","lates":"\u2aad\ufe00","lbarr":"\u290c","lBarr":"\u290e","lbbrk":"\u2772","lbrace":"{","lbrack":"[","lbrke":"\u298b","lbrksld":"\u298f","lbrkslu":"\u298d","Lcaron":"\u013d","lcaron":"\u013e","Lcedil":"\u013b","lcedil":"\u013c","lceil":"\u2308","lcub":"{","Lcy":"\u041b","lcy":"\u043b","ldca":"\u2936","ldquo":"\u201c","ldquor":"\u201e","ldrdhar":"\u2967","ldrushar":"\u294b","ldsh":"\u21b2","le":"\u2264","lE":"\u2266","LeftAngleBracket":"\u27e8","LeftArrowBar":"\u21e4","leftarrow":"\u2190","LeftArrow":"\u2190","Leftarrow":"\u21d0","LeftArrowRightArrow":"\u21c6","leftarrowtail":"\u21a2","LeftCeiling":"\u2308","LeftDoubleBracket":"\u27e6","LeftDownTeeVector":"\u2961","LeftDownVectorBar":"\u2959","LeftDownVector":"\u21c3","LeftFloor":"\u230a","leftharpoondown":"\u21bd","leftharpoonup":"\u21bc","leftleftarrows":"\u21c7","leftrightarrow":"\u2194","LeftRightArrow":"\u2194","Leftrightarrow":"\u21d4","leftrightarrows":"\u21c6","leftrightharpoons":"\u21cb","leftrightsquigarrow":"\u21ad","LeftRightVector":"\u294e","LeftTeeArrow":"\u21a4","LeftTee":"\u22a3","LeftTeeVector":"\u295a","leftthreetimes":"\u22cb","LeftTriangleBar":"\u29cf","LeftTriangle":"\u22b2","LeftTriangleEqual":"\u22b4","LeftUpDownVector":"\u2951","LeftUpTeeVector":"\u2960","LeftUpVectorBar":"\u2958","LeftUpVector":"\u21bf","LeftVectorBar":"\u2952","LeftVector":"\u21bc","lEg":"\u2a8b","leg":"\u22da","leq":"\u2264","leqq":"\u2266","leqslant":"\u2a7d","lescc":"\u2aa8","les":"\u2a7d","lesdot":"\u2a7f","lesdoto":"\u2a81","lesdotor":"\u2a83","lesg":"\u22da\ufe00","lesges":"\u2a93","lessapprox":"\u2a85","lessdot":"\u22d6","lesseqgtr":"\u22da","lesseqqgtr":"\u2a8b","LessEqualGreater":"\u22da","LessFullEqual":"\u2266","LessGreater":"\u2276","lessgtr":"\u2276","LessLess":"\u2aa1","lesssim":"\u2272","LessSlantEqual":"\u2a7d","LessTilde":"\u2272","lfisht":"\u297c","lfloor":"\u230a","Lfr":"\ud835\udd0f","lfr":"\ud835\udd29","lg":"\u2276","lgE":"\u2a91","lHar":"\u2962","lhard":"\u21bd","lharu":"\u21bc","lharul":"\u296a","lhblk":"\u2584","LJcy":"\u0409","ljcy":"\u0459","llarr":"\u21c7","ll":"\u226a","Ll":"\u22d8","llcorner":"\u231e","Lleftarrow":"\u21da","llhard":"\u296b","lltri":"\u25fa","Lmidot":"\u013f","lmidot":"\u0140","lmoustache":"\u23b0","lmoust":"\u23b0","lnap":"\u2a89","lnapprox":"\u2a89","lne":"\u2a87","lnE":"\u2268","lneq":"\u2a87","lneqq":"\u2268","lnsim":"\u22e6","loang":"\u27ec","loarr":"\u21fd","lobrk":"\u27e6","longleftarrow":"\u27f5","LongLeftArrow":"\u27f5","Longleftarrow":"\u27f8","longleftrightarrow":"\u27f7","LongLeftRightArrow":"\u27f7","Longleftrightarrow":"\u27fa","longmapsto":"\u27fc","longrightarrow":"\u27f6","LongRightArrow":"\u27f6","Longrightarrow":"\u27f9","looparrowleft":"\u21ab","looparrowright":"\u21ac","lopar":"\u2985","Lopf":"\ud835\udd43","lopf":"\ud835\udd5d","loplus":"\u2a2d","lotimes":"\u2a34","lowast":"\u2217","lowbar":"_","LowerLeftArrow":"\u2199","LowerRightArrow":"\u2198","loz":"\u25ca","lozenge":"\u25ca","lozf":"\u29eb","lpar":"(","lparlt":"\u2993","lrarr":"\u21c6","lrcorner":"\u231f","lrhar":"\u21cb","lrhard":"\u296d","lrm":"\u200e","lrtri":"\u22bf","lsaquo":"\u2039","lscr":"\ud835\udcc1","Lscr":"\u2112","lsh":"\u21b0","Lsh":"\u21b0","lsim":"\u2272","lsime":"\u2a8d","lsimg":"\u2a8f","lsqb":"[","lsquo":"\u2018","lsquor":"\u201a","Lstrok":"\u0141","lstrok":"\u0142","ltcc":"\u2aa6","ltcir":"\u2a79","lt":"<","LT":"<","Lt":"\u226a","ltdot":"\u22d6","lthree":"\u22cb","ltimes":"\u22c9","ltlarr":"\u2976","ltquest":"\u2a7b","ltri":"\u25c3","ltrie":"\u22b4","ltrif":"\u25c2","ltrPar":"\u2996","lurdshar":"\u294a","luruhar":"\u2966","lvertneqq":"\u2268\ufe00","lvnE":"\u2268\ufe00","macr":"\xaf","male":"\u2642","malt":"\u2720","maltese":"\u2720","Map":"\u2905","map":"\u21a6","mapsto":"\u21a6","mapstodown":"\u21a7","mapstoleft":"\u21a4","mapstoup":"\u21a5","marker":"\u25ae","mcomma":"\u2a29","Mcy":"\u041c","mcy":"\u043c","mdash":"\u2014","mDDot":"\u223a","measuredangle":"\u2221","MediumSpace":"\u205f","Mellintrf":"\u2133","Mfr":"\ud835\udd10","mfr":"\ud835\udd2a","mho":"\u2127","micro":"\xb5","midast":"*","midcir":"\u2af0","mid":"\u2223","middot":"\xb7","minusb":"\u229f","minus":"\u2212","minusd":"\u2238","minusdu":"\u2a2a","MinusPlus":"\u2213","mlcp":"\u2adb","mldr":"\u2026","mnplus":"\u2213","models":"\u22a7","Mopf":"\ud835\udd44","mopf":"\ud835\udd5e","mp":"\u2213","mscr":"\ud835\udcc2","Mscr":"\u2133","mstpos":"\u223e","Mu":"\u039c","mu":"\u03bc","multimap":"\u22b8","mumap":"\u22b8","nabla":"\u2207","Nacute":"\u0143","nacute":"\u0144","nang":"\u2220\u20d2","nap":"\u2249","napE":"\u2a70\u0338","napid":"\u224b\u0338","napos":"\u0149","napprox":"\u2249","natural":"\u266e","naturals":"\u2115","natur":"\u266e","nbsp":"\xa0","nbump":"\u224e\u0338","nbumpe":"\u224f\u0338","ncap":"\u2a43","Ncaron":"\u0147","ncaron":"\u0148","Ncedil":"\u0145","ncedil":"\u0146","ncong":"\u2247","ncongdot":"\u2a6d\u0338","ncup":"\u2a42","Ncy":"\u041d","ncy":"\u043d","ndash":"\u2013","nearhk":"\u2924","nearr":"\u2197","neArr":"\u21d7","nearrow":"\u2197","ne":"\u2260","nedot":"\u2250\u0338","NegativeMediumSpace":"\u200b","NegativeThickSpace":"\u200b","NegativeThinSpace":"\u200b","NegativeVeryThinSpace":"\u200b","nequiv":"\u2262","nesear":"\u2928","nesim":"\u2242\u0338","NestedGreaterGreater":"\u226b","NestedLessLess":"\u226a","NewLine":"\\n","nexist":"\u2204","nexists":"\u2204","Nfr":"\ud835\udd11","nfr":"\ud835\udd2b","ngE":"\u2267\u0338","nge":"\u2271","ngeq":"\u2271","ngeqq":"\u2267\u0338","ngeqslant":"\u2a7e\u0338","nges":"\u2a7e\u0338","nGg":"\u22d9\u0338","ngsim":"\u2275","nGt":"\u226b\u20d2","ngt":"\u226f","ngtr":"\u226f","nGtv":"\u226b\u0338","nharr":"\u21ae","nhArr":"\u21ce","nhpar":"\u2af2","ni":"\u220b","nis":"\u22fc","nisd":"\u22fa","niv":"\u220b","NJcy":"\u040a","njcy":"\u045a","nlarr":"\u219a","nlArr":"\u21cd","nldr":"\u2025","nlE":"\u2266\u0338","nle":"\u2270","nleftarrow":"\u219a","nLeftarrow":"\u21cd","nleftrightarrow":"\u21ae","nLeftrightarrow":"\u21ce","nleq":"\u2270","nleqq":"\u2266\u0338","nleqslant":"\u2a7d\u0338","nles":"\u2a7d\u0338","nless":"\u226e","nLl":"\u22d8\u0338","nlsim":"\u2274","nLt":"\u226a\u20d2","nlt":"\u226e","nltri":"\u22ea","nltrie":"\u22ec","nLtv":"\u226a\u0338","nmid":"\u2224","NoBreak":"\u2060","NonBreakingSpace":"\xa0","nopf":"\ud835\udd5f","Nopf":"\u2115","Not":"\u2aec","not":"\xac","NotCongruent":"\u2262","NotCupCap":"\u226d","NotDoubleVerticalBar":"\u2226","NotElement":"\u2209","NotEqual":"\u2260","NotEqualTilde":"\u2242\u0338","NotExists":"\u2204","NotGreater":"\u226f","NotGreaterEqual":"\u2271","NotGreaterFullEqual":"\u2267\u0338","NotGreaterGreater":"\u226b\u0338","NotGreaterLess":"\u2279","NotGreaterSlantEqual":"\u2a7e\u0338","NotGreaterTilde":"\u2275","NotHumpDownHump":"\u224e\u0338","NotHumpEqual":"\u224f\u0338","notin":"\u2209","notindot":"\u22f5\u0338","notinE":"\u22f9\u0338","notinva":"\u2209","notinvb":"\u22f7","notinvc":"\u22f6","NotLeftTriangleBar":"\u29cf\u0338","NotLeftTriangle":"\u22ea","NotLeftTriangleEqual":"\u22ec","NotLess":"\u226e","NotLessEqual":"\u2270","NotLessGreater":"\u2278","NotLessLess":"\u226a\u0338","NotLessSlantEqual":"\u2a7d\u0338","NotLessTilde":"\u2274","NotNestedGreaterGreater":"\u2aa2\u0338","NotNestedLessLess":"\u2aa1\u0338","notni":"\u220c","notniva":"\u220c","notnivb":"\u22fe","notnivc":"\u22fd","NotPrecedes":"\u2280","NotPrecedesEqual":"\u2aaf\u0338","NotPrecedesSlantEqual":"\u22e0","NotReverseElement":"\u220c","NotRightTriangleBar":"\u29d0\u0338","NotRightTriangle":"\u22eb","NotRightTriangleEqual":"\u22ed","NotSquareSubset":"\u228f\u0338","NotSquareSubsetEqual":"\u22e2","NotSquareSuperset":"\u2290\u0338","NotSquareSupersetEqual":"\u22e3","NotSubset":"\u2282\u20d2","NotSubsetEqual":"\u2288","NotSucceeds":"\u2281","NotSucceedsEqual":"\u2ab0\u0338","NotSucceedsSlantEqual":"\u22e1","NotSucceedsTilde":"\u227f\u0338","NotSuperset":"\u2283\u20d2","NotSupersetEqual":"\u2289","NotTilde":"\u2241","NotTildeEqual":"\u2244","NotTildeFullEqual":"\u2247","NotTildeTilde":"\u2249","NotVerticalBar":"\u2224","nparallel":"\u2226","npar":"\u2226","nparsl":"\u2afd\u20e5","npart":"\u2202\u0338","npolint":"\u2a14","npr":"\u2280","nprcue":"\u22e0","nprec":"\u2280","npreceq":"\u2aaf\u0338","npre":"\u2aaf\u0338","nrarrc":"\u2933\u0338","nrarr":"\u219b","nrArr":"\u21cf","nrarrw":"\u219d\u0338","nrightarrow":"\u219b","nRightarrow":"\u21cf","nrtri":"\u22eb","nrtrie":"\u22ed","nsc":"\u2281","nsccue":"\u22e1","nsce":"\u2ab0\u0338","Nscr":"\ud835\udca9","nscr":"\ud835\udcc3","nshortmid":"\u2224","nshortparallel":"\u2226","nsim":"\u2241","nsime":"\u2244","nsimeq":"\u2244","nsmid":"\u2224","nspar":"\u2226","nsqsube":"\u22e2","nsqsupe":"\u22e3","nsub":"\u2284","nsubE":"\u2ac5\u0338","nsube":"\u2288","nsubset":"\u2282\u20d2","nsubseteq":"\u2288","nsubseteqq":"\u2ac5\u0338","nsucc":"\u2281","nsucceq":"\u2ab0\u0338","nsup":"\u2285","nsupE":"\u2ac6\u0338","nsupe":"\u2289","nsupset":"\u2283\u20d2","nsupseteq":"\u2289","nsupseteqq":"\u2ac6\u0338","ntgl":"\u2279","Ntilde":"\xd1","ntilde":"\xf1","ntlg":"\u2278","ntriangleleft":"\u22ea","ntrianglelefteq":"\u22ec","ntriangleright":"\u22eb","ntrianglerighteq":"\u22ed","Nu":"\u039d","nu":"\u03bd","num":"#","numero":"\u2116","numsp":"\u2007","nvap":"\u224d\u20d2","nvdash":"\u22ac","nvDash":"\u22ad","nVdash":"\u22ae","nVDash":"\u22af","nvge":"\u2265\u20d2","nvgt":">\u20d2","nvHarr":"\u2904","nvinfin":"\u29de","nvlArr":"\u2902","nvle":"\u2264\u20d2","nvlt":"<\u20d2","nvltrie":"\u22b4\u20d2","nvrArr":"\u2903","nvrtrie":"\u22b5\u20d2","nvsim":"\u223c\u20d2","nwarhk":"\u2923","nwarr":"\u2196","nwArr":"\u21d6","nwarrow":"\u2196","nwnear":"\u2927","Oacute":"\xd3","oacute":"\xf3","oast":"\u229b","Ocirc":"\xd4","ocirc":"\xf4","ocir":"\u229a","Ocy":"\u041e","ocy":"\u043e","odash":"\u229d","Odblac":"\u0150","odblac":"\u0151","odiv":"\u2a38","odot":"\u2299","odsold":"\u29bc","OElig":"\u0152","oelig":"\u0153","ofcir":"\u29bf","Ofr":"\ud835\udd12","ofr":"\ud835\udd2c","ogon":"\u02db","Ograve":"\xd2","ograve":"\xf2","ogt":"\u29c1","ohbar":"\u29b5","ohm":"\u03a9","oint":"\u222e","olarr":"\u21ba","olcir":"\u29be","olcross":"\u29bb","oline":"\u203e","olt":"\u29c0","Omacr":"\u014c","omacr":"\u014d","Omega":"\u03a9","omega":"\u03c9","Omicron":"\u039f","omicron":"\u03bf","omid":"\u29b6","ominus":"\u2296","Oopf":"\ud835\udd46","oopf":"\ud835\udd60","opar":"\u29b7","OpenCurlyDoubleQuote":"\u201c","OpenCurlyQuote":"\u2018","operp":"\u29b9","oplus":"\u2295","orarr":"\u21bb","Or":"\u2a54","or":"\u2228","ord":"\u2a5d","order":"\u2134","orderof":"\u2134","ordf":"\xaa","ordm":"\xba","origof":"\u22b6","oror":"\u2a56","orslope":"\u2a57","orv":"\u2a5b","oS":"\u24c8","Oscr":"\ud835\udcaa","oscr":"\u2134","Oslash":"\xd8","oslash":"\xf8","osol":"\u2298","Otilde":"\xd5","otilde":"\xf5","otimesas":"\u2a36","Otimes":"\u2a37","otimes":"\u2297","Ouml":"\xd6","ouml":"\xf6","ovbar":"\u233d","OverBar":"\u203e","OverBrace":"\u23de","OverBracket":"\u23b4","OverParenthesis":"\u23dc","para":"\xb6","parallel":"\u2225","par":"\u2225","parsim":"\u2af3","parsl":"\u2afd","part":"\u2202","PartialD":"\u2202","Pcy":"\u041f","pcy":"\u043f","percnt":"%","period":".","permil":"\u2030","perp":"\u22a5","pertenk":"\u2031","Pfr":"\ud835\udd13","pfr":"\ud835\udd2d","Phi":"\u03a6","phi":"\u03c6","phiv":"\u03d5","phmmat":"\u2133","phone":"\u260e","Pi":"\u03a0","pi":"\u03c0","pitchfork":"\u22d4","piv":"\u03d6","planck":"\u210f","planckh":"\u210e","plankv":"\u210f","plusacir":"\u2a23","plusb":"\u229e","pluscir":"\u2a22","plus":"+","plusdo":"\u2214","plusdu":"\u2a25","pluse":"\u2a72","PlusMinus":"\xb1","plusmn":"\xb1","plussim":"\u2a26","plustwo":"\u2a27","pm":"\xb1","Poincareplane":"\u210c","pointint":"\u2a15","popf":"\ud835\udd61","Popf":"\u2119","pound":"\xa3","prap":"\u2ab7","Pr":"\u2abb","pr":"\u227a","prcue":"\u227c","precapprox":"\u2ab7","prec":"\u227a","preccurlyeq":"\u227c","Precedes":"\u227a","PrecedesEqual":"\u2aaf","PrecedesSlantEqual":"\u227c","PrecedesTilde":"\u227e","preceq":"\u2aaf","precnapprox":"\u2ab9","precneqq":"\u2ab5","precnsim":"\u22e8","pre":"\u2aaf","prE":"\u2ab3","precsim":"\u227e","prime":"\u2032","Prime":"\u2033","primes":"\u2119","prnap":"\u2ab9","prnE":"\u2ab5","prnsim":"\u22e8","prod":"\u220f","Product":"\u220f","profalar":"\u232e","profline":"\u2312","profsurf":"\u2313","prop":"\u221d","Proportional":"\u221d","Proportion":"\u2237","propto":"\u221d","prsim":"\u227e","prurel":"\u22b0","Pscr":"\ud835\udcab","pscr":"\ud835\udcc5","Psi":"\u03a8","psi":"\u03c8","puncsp":"\u2008","Qfr":"\ud835\udd14","qfr":"\ud835\udd2e","qint":"\u2a0c","qopf":"\ud835\udd62","Qopf":"\u211a","qprime":"\u2057","Qscr":"\ud835\udcac","qscr":"\ud835\udcc6","quaternions":"\u210d","quatint":"\u2a16","quest":"?","questeq":"\u225f","quot":"\\"","QUOT":"\\"","rAarr":"\u21db","race":"\u223d\u0331","Racute":"\u0154","racute":"\u0155","radic":"\u221a","raemptyv":"\u29b3","rang":"\u27e9","Rang":"\u27eb","rangd":"\u2992","range":"\u29a5","rangle":"\u27e9","raquo":"\xbb","rarrap":"\u2975","rarrb":"\u21e5","rarrbfs":"\u2920","rarrc":"\u2933","rarr":"\u2192","Rarr":"\u21a0","rArr":"\u21d2","rarrfs":"\u291e","rarrhk":"\u21aa","rarrlp":"\u21ac","rarrpl":"\u2945","rarrsim":"\u2974","Rarrtl":"\u2916","rarrtl":"\u21a3","rarrw":"\u219d","ratail":"\u291a","rAtail":"\u291c","ratio":"\u2236","rationals":"\u211a","rbarr":"\u290d","rBarr":"\u290f","RBarr":"\u2910","rbbrk":"\u2773","rbrace":"}","rbrack":"]","rbrke":"\u298c","rbrksld":"\u298e","rbrkslu":"\u2990","Rcaron":"\u0158","rcaron":"\u0159","Rcedil":"\u0156","rcedil":"\u0157","rceil":"\u2309","rcub":"}","Rcy":"\u0420","rcy":"\u0440","rdca":"\u2937","rdldhar":"\u2969","rdquo":"\u201d","rdquor":"\u201d","rdsh":"\u21b3","real":"\u211c","realine":"\u211b","realpart":"\u211c","reals":"\u211d","Re":"\u211c","rect":"\u25ad","reg":"\xae","REG":"\xae","ReverseElement":"\u220b","ReverseEquilibrium":"\u21cb","ReverseUpEquilibrium":"\u296f","rfisht":"\u297d","rfloor":"\u230b","rfr":"\ud835\udd2f","Rfr":"\u211c","rHar":"\u2964","rhard":"\u21c1","rharu":"\u21c0","rharul":"\u296c","Rho":"\u03a1","rho":"\u03c1","rhov":"\u03f1","RightAngleBracket":"\u27e9","RightArrowBar":"\u21e5","rightarrow":"\u2192","RightArrow":"\u2192","Rightarrow":"\u21d2","RightArrowLeftArrow":"\u21c4","rightarrowtail":"\u21a3","RightCeiling":"\u2309","RightDoubleBracket":"\u27e7","RightDownTeeVector":"\u295d","RightDownVectorBar":"\u2955","RightDownVector":"\u21c2","RightFloor":"\u230b","rightharpoondown":"\u21c1","rightharpoonup":"\u21c0","rightleftarrows":"\u21c4","rightleftharpoons":"\u21cc","rightrightarrows":"\u21c9","rightsquigarrow":"\u219d","RightTeeArrow":"\u21a6","RightTee":"\u22a2","RightTeeVector":"\u295b","rightthreetimes":"\u22cc","RightTriangleBar":"\u29d0","RightTriangle":"\u22b3","RightTriangleEqual":"\u22b5","RightUpDownVector":"\u294f","RightUpTeeVector":"\u295c","RightUpVectorBar":"\u2954","RightUpVector":"\u21be","RightVectorBar":"\u2953","RightVector":"\u21c0","ring":"\u02da","risingdotseq":"\u2253","rlarr":"\u21c4","rlhar":"\u21cc","rlm":"\u200f","rmoustache":"\u23b1","rmoust":"\u23b1","rnmid":"\u2aee","roang":"\u27ed","roarr":"\u21fe","robrk":"\u27e7","ropar":"\u2986","ropf":"\ud835\udd63","Ropf":"\u211d","roplus":"\u2a2e","rotimes":"\u2a35","RoundImplies":"\u2970","rpar":")","rpargt":"\u2994","rppolint":"\u2a12","rrarr":"\u21c9","Rrightarrow":"\u21db","rsaquo":"\u203a","rscr":"\ud835\udcc7","Rscr":"\u211b","rsh":"\u21b1","Rsh":"\u21b1","rsqb":"]","rsquo":"\u2019","rsquor":"\u2019","rthree":"\u22cc","rtimes":"\u22ca","rtri":"\u25b9","rtrie":"\u22b5","rtrif":"\u25b8","rtriltri":"\u29ce","RuleDelayed":"\u29f4","ruluhar":"\u2968","rx":"\u211e","Sacute":"\u015a","sacute":"\u015b","sbquo":"\u201a","scap":"\u2ab8","Scaron":"\u0160","scaron":"\u0161","Sc":"\u2abc","sc":"\u227b","sccue":"\u227d","sce":"\u2ab0","scE":"\u2ab4","Scedil":"\u015e","scedil":"\u015f","Scirc":"\u015c","scirc":"\u015d","scnap":"\u2aba","scnE":"\u2ab6","scnsim":"\u22e9","scpolint":"\u2a13","scsim":"\u227f","Scy":"\u0421","scy":"\u0441","sdotb":"\u22a1","sdot":"\u22c5","sdote":"\u2a66","searhk":"\u2925","searr":"\u2198","seArr":"\u21d8","searrow":"\u2198","sect":"\xa7","semi":";","seswar":"\u2929","setminus":"\u2216","setmn":"\u2216","sext":"\u2736","Sfr":"\ud835\udd16","sfr":"\ud835\udd30","sfrown":"\u2322","sharp":"\u266f","SHCHcy":"\u0429","shchcy":"\u0449","SHcy":"\u0428","shcy":"\u0448","ShortDownArrow":"\u2193","ShortLeftArrow":"\u2190","shortmid":"\u2223","shortparallel":"\u2225","ShortRightArrow":"\u2192","ShortUpArrow":"\u2191","shy":"\xad","Sigma":"\u03a3","sigma":"\u03c3","sigmaf":"\u03c2","sigmav":"\u03c2","sim":"\u223c","simdot":"\u2a6a","sime":"\u2243","simeq":"\u2243","simg":"\u2a9e","simgE":"\u2aa0","siml":"\u2a9d","simlE":"\u2a9f","simne":"\u2246","simplus":"\u2a24","simrarr":"\u2972","slarr":"\u2190","SmallCircle":"\u2218","smallsetminus":"\u2216","smashp":"\u2a33","smeparsl":"\u29e4","smid":"\u2223","smile":"\u2323","smt":"\u2aaa","smte":"\u2aac","smtes":"\u2aac\ufe00","SOFTcy":"\u042c","softcy":"\u044c","solbar":"\u233f","solb":"\u29c4","sol":"/","Sopf":"\ud835\udd4a","sopf":"\ud835\udd64","spades":"\u2660","spadesuit":"\u2660","spar":"\u2225","sqcap":"\u2293","sqcaps":"\u2293\ufe00","sqcup":"\u2294","sqcups":"\u2294\ufe00","Sqrt":"\u221a","sqsub":"\u228f","sqsube":"\u2291","sqsubset":"\u228f","sqsubseteq":"\u2291","sqsup":"\u2290","sqsupe":"\u2292","sqsupset":"\u2290","sqsupseteq":"\u2292","square":"\u25a1","Square":"\u25a1","SquareIntersection":"\u2293","SquareSubset":"\u228f","SquareSubsetEqual":"\u2291","SquareSuperset":"\u2290","SquareSupersetEqual":"\u2292","SquareUnion":"\u2294","squarf":"\u25aa","squ":"\u25a1","squf":"\u25aa","srarr":"\u2192","Sscr":"\ud835\udcae","sscr":"\ud835\udcc8","ssetmn":"\u2216","ssmile":"\u2323","sstarf":"\u22c6","Star":"\u22c6","star":"\u2606","starf":"\u2605","straightepsilon":"\u03f5","straightphi":"\u03d5","strns":"\xaf","sub":"\u2282","Sub":"\u22d0","subdot":"\u2abd","subE":"\u2ac5","sube":"\u2286","subedot":"\u2ac3","submult":"\u2ac1","subnE":"\u2acb","subne":"\u228a","subplus":"\u2abf","subrarr":"\u2979","subset":"\u2282","Subset":"\u22d0","subseteq":"\u2286","subseteqq":"\u2ac5","SubsetEqual":"\u2286","subsetneq":"\u228a","subsetneqq":"\u2acb","subsim":"\u2ac7","subsub":"\u2ad5","subsup":"\u2ad3","succapprox":"\u2ab8","succ":"\u227b","succcurlyeq":"\u227d","Succeeds":"\u227b","SucceedsEqual":"\u2ab0","SucceedsSlantEqual":"\u227d","SucceedsTilde":"\u227f","succeq":"\u2ab0","succnapprox":"\u2aba","succneqq":"\u2ab6","succnsim":"\u22e9","succsim":"\u227f","SuchThat":"\u220b","sum":"\u2211","Sum":"\u2211","sung":"\u266a","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","sup":"\u2283","Sup":"\u22d1","supdot":"\u2abe","supdsub":"\u2ad8","supE":"\u2ac6","supe":"\u2287","supedot":"\u2ac4","Superset":"\u2283","SupersetEqual":"\u2287","suphsol":"\u27c9","suphsub":"\u2ad7","suplarr":"\u297b","supmult":"\u2ac2","supnE":"\u2acc","supne":"\u228b","supplus":"\u2ac0","supset":"\u2283","Supset":"\u22d1","supseteq":"\u2287","supseteqq":"\u2ac6","supsetneq":"\u228b","supsetneqq":"\u2acc","supsim":"\u2ac8","supsub":"\u2ad4","supsup":"\u2ad6","swarhk":"\u2926","swarr":"\u2199","swArr":"\u21d9","swarrow":"\u2199","swnwar":"\u292a","szlig":"\xdf","Tab":"\\t","target":"\u2316","Tau":"\u03a4","tau":"\u03c4","tbrk":"\u23b4","Tcaron":"\u0164","tcaron":"\u0165","Tcedil":"\u0162","tcedil":"\u0163","Tcy":"\u0422","tcy":"\u0442","tdot":"\u20db","telrec":"\u2315","Tfr":"\ud835\udd17","tfr":"\ud835\udd31","there4":"\u2234","therefore":"\u2234","Therefore":"\u2234","Theta":"\u0398","theta":"\u03b8","thetasym":"\u03d1","thetav":"\u03d1","thickapprox":"\u2248","thicksim":"\u223c","ThickSpace":"\u205f\u200a","ThinSpace":"\u2009","thinsp":"\u2009","thkap":"\u2248","thksim":"\u223c","THORN":"\xde","thorn":"\xfe","tilde":"\u02dc","Tilde":"\u223c","TildeEqual":"\u2243","TildeFullEqual":"\u2245","TildeTilde":"\u2248","timesbar":"\u2a31","timesb":"\u22a0","times":"\xd7","timesd":"\u2a30","tint":"\u222d","toea":"\u2928","topbot":"\u2336","topcir":"\u2af1","top":"\u22a4","Topf":"\ud835\udd4b","topf":"\ud835\udd65","topfork":"\u2ada","tosa":"\u2929","tprime":"\u2034","trade":"\u2122","TRADE":"\u2122","triangle":"\u25b5","triangledown":"\u25bf","triangleleft":"\u25c3","trianglelefteq":"\u22b4","triangleq":"\u225c","triangleright":"\u25b9","trianglerighteq":"\u22b5","tridot":"\u25ec","trie":"\u225c","triminus":"\u2a3a","TripleDot":"\u20db","triplus":"\u2a39","trisb":"\u29cd","tritime":"\u2a3b","trpezium":"\u23e2","Tscr":"\ud835\udcaf","tscr":"\ud835\udcc9","TScy":"\u0426","tscy":"\u0446","TSHcy":"\u040b","tshcy":"\u045b","Tstrok":"\u0166","tstrok":"\u0167","twixt":"\u226c","twoheadleftarrow":"\u219e","twoheadrightarrow":"\u21a0","Uacute":"\xda","uacute":"\xfa","uarr":"\u2191","Uarr":"\u219f","uArr":"\u21d1","Uarrocir":"\u2949","Ubrcy":"\u040e","ubrcy":"\u045e","Ubreve":"\u016c","ubreve":"\u016d","Ucirc":"\xdb","ucirc":"\xfb","Ucy":"\u0423","ucy":"\u0443","udarr":"\u21c5","Udblac":"\u0170","udblac":"\u0171","udhar":"\u296e","ufisht":"\u297e","Ufr":"\ud835\udd18","ufr":"\ud835\udd32","Ugrave":"\xd9","ugrave":"\xf9","uHar":"\u2963","uharl":"\u21bf","uharr":"\u21be","uhblk":"\u2580","ulcorn":"\u231c","ulcorner":"\u231c","ulcrop":"\u230f","ultri":"\u25f8","Umacr":"\u016a","umacr":"\u016b","uml":"\xa8","UnderBar":"_","UnderBrace":"\u23df","UnderBracket":"\u23b5","UnderParenthesis":"\u23dd","Union":"\u22c3","UnionPlus":"\u228e","Uogon":"\u0172","uogon":"\u0173","Uopf":"\ud835\udd4c","uopf":"\ud835\udd66","UpArrowBar":"\u2912","uparrow":"\u2191","UpArrow":"\u2191","Uparrow":"\u21d1","UpArrowDownArrow":"\u21c5","updownarrow":"\u2195","UpDownArrow":"\u2195","Updownarrow":"\u21d5","UpEquilibrium":"\u296e","upharpoonleft":"\u21bf","upharpoonright":"\u21be","uplus":"\u228e","UpperLeftArrow":"\u2196","UpperRightArrow":"\u2197","upsi":"\u03c5","Upsi":"\u03d2","upsih":"\u03d2","Upsilon":"\u03a5","upsilon":"\u03c5","UpTeeArrow":"\u21a5","UpTee":"\u22a5","upuparrows":"\u21c8","urcorn":"\u231d","urcorner":"\u231d","urcrop":"\u230e","Uring":"\u016e","uring":"\u016f","urtri":"\u25f9","Uscr":"\ud835\udcb0","uscr":"\ud835\udcca","utdot":"\u22f0","Utilde":"\u0168","utilde":"\u0169","utri":"\u25b5","utrif":"\u25b4","uuarr":"\u21c8","Uuml":"\xdc","uuml":"\xfc","uwangle":"\u29a7","vangrt":"\u299c","varepsilon":"\u03f5","varkappa":"\u03f0","varnothing":"\u2205","varphi":"\u03d5","varpi":"\u03d6","varpropto":"\u221d","varr":"\u2195","vArr":"\u21d5","varrho":"\u03f1","varsigma":"\u03c2","varsubsetneq":"\u228a\ufe00","varsubsetneqq":"\u2acb\ufe00","varsupsetneq":"\u228b\ufe00","varsupsetneqq":"\u2acc\ufe00","vartheta":"\u03d1","vartriangleleft":"\u22b2","vartriangleright":"\u22b3","vBar":"\u2ae8","Vbar":"\u2aeb","vBarv":"\u2ae9","Vcy":"\u0412","vcy":"\u0432","vdash":"\u22a2","vDash":"\u22a8","Vdash":"\u22a9","VDash":"\u22ab","Vdashl":"\u2ae6","veebar":"\u22bb","vee":"\u2228","Vee":"\u22c1","veeeq":"\u225a","vellip":"\u22ee","verbar":"|","Verbar":"\u2016","vert":"|","Vert":"\u2016","VerticalBar":"\u2223","VerticalLine":"|","VerticalSeparator":"\u2758","VerticalTilde":"\u2240","VeryThinSpace":"\u200a","Vfr":"\ud835\udd19","vfr":"\ud835\udd33","vltri":"\u22b2","vnsub":"\u2282\u20d2","vnsup":"\u2283\u20d2","Vopf":"\ud835\udd4d","vopf":"\ud835\udd67","vprop":"\u221d","vrtri":"\u22b3","Vscr":"\ud835\udcb1","vscr":"\ud835\udccb","vsubnE":"\u2acb\ufe00","vsubne":"\u228a\ufe00","vsupnE":"\u2acc\ufe00","vsupne":"\u228b\ufe00","Vvdash":"\u22aa","vzigzag":"\u299a","Wcirc":"\u0174","wcirc":"\u0175","wedbar":"\u2a5f","wedge":"\u2227","Wedge":"\u22c0","wedgeq":"\u2259","weierp":"\u2118","Wfr":"\ud835\udd1a","wfr":"\ud835\udd34","Wopf":"\ud835\udd4e","wopf":"\ud835\udd68","wp":"\u2118","wr":"\u2240","wreath":"\u2240","Wscr":"\ud835\udcb2","wscr":"\ud835\udccc","xcap":"\u22c2","xcirc":"\u25ef","xcup":"\u22c3","xdtri":"\u25bd","Xfr":"\ud835\udd1b","xfr":"\ud835\udd35","xharr":"\u27f7","xhArr":"\u27fa","Xi":"\u039e","xi":"\u03be","xlarr":"\u27f5","xlArr":"\u27f8","xmap":"\u27fc","xnis":"\u22fb","xodot":"\u2a00","Xopf":"\ud835\udd4f","xopf":"\ud835\udd69","xoplus":"\u2a01","xotime":"\u2a02","xrarr":"\u27f6","xrArr":"\u27f9","Xscr":"\ud835\udcb3","xscr":"\ud835\udccd","xsqcup":"\u2a06","xuplus":"\u2a04","xutri":"\u25b3","xvee":"\u22c1","xwedge":"\u22c0","Yacute":"\xdd","yacute":"\xfd","YAcy":"\u042f","yacy":"\u044f","Ycirc":"\u0176","ycirc":"\u0177","Ycy":"\u042b","ycy":"\u044b","yen":"\xa5","Yfr":"\ud835\udd1c","yfr":"\ud835\udd36","YIcy":"\u0407","yicy":"\u0457","Yopf":"\ud835\udd50","yopf":"\ud835\udd6a","Yscr":"\ud835\udcb4","yscr":"\ud835\udcce","YUcy":"\u042e","yucy":"\u044e","yuml":"\xff","Yuml":"\u0178","Zacute":"\u0179","zacute":"\u017a","Zcaron":"\u017d","zcaron":"\u017e","Zcy":"\u0417","zcy":"\u0437","Zdot":"\u017b","zdot":"\u017c","zeetrf":"\u2128","ZeroWidthSpace":"\u200b","Zeta":"\u0396","zeta":"\u03b6","zfr":"\ud835\udd37","Zfr":"\u2128","ZHcy":"\u0416","zhcy":"\u0436","zigrarr":"\u21dd","zopf":"\ud835\udd6b","Zopf":"\u2124","Zscr":"\ud835\udcb5","zscr":"\ud835\udccf","zwj":"\u200d","zwnj":"\u200c"}')},function(t,e,n){"use strict";var r={};function i(t,e,n){var o,a,s,u,c,l="";for("string"!==typeof e&&(n=e,e=i.defaultChars),"undefined"===typeof n&&(n=!0),c=function(t){var e,n,i=r[t];if(i)return i;for(i=r[t]=[],e=0;e<128;e++)n=String.fromCharCode(e),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<t.length;e++)i[t.charCodeAt(e)]=t[e];return i}(e),o=0,a=t.length;o<a;o++)if(s=t.charCodeAt(o),n&&37===s&&o+2<a&&/^[0-9a-f]{2}$/i.test(t.slice(o+1,o+3)))l+=t.slice(o,o+3),o+=2;else if(s<128)l+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<a&&(u=t.charCodeAt(o+1))>=56320&&u<=57343){l+=encodeURIComponent(t[o]+t[o+1]),o++;continue}l+="%EF%BF%BD"}else l+=encodeURIComponent(t[o]);return l}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",t.exports=i},function(t,e,n){"use strict";var r={};function i(t,e){var n;return"string"!==typeof e&&(e=i.defaultChars),n=function(t){var e,n,i=r[t];if(i)return i;for(i=r[t]=[],e=0;e<128;e++)n=String.fromCharCode(e),i.push(n);for(e=0;e<t.length;e++)i[n=t.charCodeAt(e)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return i}(e),t.replace(/(%[a-f0-9]{2})+/gi,(function(t){var e,r,i,o,a,s,u,c="";for(e=0,r=t.length;e<r;e+=3)(i=parseInt(t.slice(e+1,e+3),16))<128?c+=n[i]:192===(224&i)&&e+3<r&&128===(192&(o=parseInt(t.slice(e+4,e+6),16)))?(c+=(u=i<<6&1984|63&o)<128?"\ufffd\ufffd":String.fromCharCode(u),e+=3):224===(240&i)&&e+6<r&&(o=parseInt(t.slice(e+4,e+6),16),a=parseInt(t.slice(e+7,e+9),16),128===(192&o)&&128===(192&a))?(c+=(u=i<<12&61440|o<<6&4032|63&a)<2048||u>=55296&&u<=57343?"\ufffd\ufffd\ufffd":String.fromCharCode(u),e+=6):240===(248&i)&&e+9<r&&(o=parseInt(t.slice(e+4,e+6),16),a=parseInt(t.slice(e+7,e+9),16),s=parseInt(t.slice(e+10,e+12),16),128===(192&o)&&128===(192&a)&&128===(192&s))?((u=i<<18&1835008|o<<12&258048|a<<6&4032|63&s)<65536||u>1114111?c+="\ufffd\ufffd\ufffd\ufffd":(u-=65536,c+=String.fromCharCode(55296+(u>>10),56320+(1023&u))),e+=9):c+="\ufffd";return c}))}i.defaultChars=";/?:@&=+$,#",i.componentChars="",t.exports=i},function(t,e,n){"use strict";t.exports=function(t){var e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||""}},function(t,e,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,s=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(s),c=["%","/","?",";","#"].concat(u),l=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};r.prototype.parse=function(t,e){var n,r,o,s,u,m=t;if(m=m.trim(),!e&&1===t.split("#").length){var v=a.exec(m);if(v)return this.pathname=v[1],v[2]&&(this.search=v[2]),this}var g=i.exec(m);if(g&&(o=(g=g[0]).toLowerCase(),this.protocol=g,m=m.substr(g.length)),(e||g||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(u="//"===m.substr(0,2))||g&&d[g]||(m=m.substr(2),this.slashes=!0)),!d[g]&&(u||g&&!p[g])){var y,b,_=-1;for(n=0;n<l.length;n++)-1!==(s=m.indexOf(l[n]))&&(-1===_||s<_)&&(_=s);for(-1!==(b=-1===_?m.lastIndexOf("@"):m.lastIndexOf("@",_))&&(y=m.slice(0,b),m=m.slice(b+1),this.auth=y),_=-1,n=0;n<c.length;n++)-1!==(s=m.indexOf(c[n]))&&(-1===_||s<_)&&(_=s);-1===_&&(_=m.length),":"===m[_-1]&&_--;var w=m.slice(0,_);m=m.slice(_),this.parseHost(w),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x){var k=this.hostname.split(/\./);for(n=0,r=k.length;n<r;n++){var S=k[n];if(S&&!S.match(h)){for(var C="",M=0,E=S.length;M<E;M++)S.charCodeAt(M)>127?C+="x":C+=S[M];if(!C.match(h)){var T=k.slice(0,n),A=k.slice(n+1),O=S.match(f);O&&(T.push(O[1]),A.unshift(O[2])),A.length&&(m=A.join(".")+m),this.hostname=T.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var P=m.indexOf("#");-1!==P&&(this.hash=m.substr(P),m=m.slice(0,P));var L=m.indexOf("?");return-1!==L&&(this.search=m.substr(L),m=m.slice(0,L)),m&&(this.pathname=m),p[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},r.prototype.parseHost=function(t){var e=o.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},t.exports=function(t,e){if(t&&t instanceof r)return t;var n=new r;return n.parse(t,e),n}},function(t,e,n){"use strict";e.Any=n(169),e.Cc=n(170),e.Cf=n(425),e.P=n(113),e.Z=n(171)},function(t,e){t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(t,e,n){"use strict";e.parseLinkLabel=n(427),e.parseLinkDestination=n(428),e.parseLinkTitle=n(429)},function(t,e,n){"use strict";t.exports=function(t,e,n){var r,i,o,a,s=-1,u=t.posMax,c=t.pos;for(t.pos=e+1,r=1;t.pos<u;){if(93===(o=t.src.charCodeAt(t.pos))&&0===--r){i=!0;break}if(a=t.pos,t.md.inline.skipToken(t),91===o)if(a===t.pos-1)r++;else if(n)return t.pos=c,-1}return i&&(s=t.pos),t.pos=c,s}},function(t,e,n){"use strict";var r=n(6).unescapeAll;t.exports=function(t,e,n){var i,o,a=e,s={ok:!1,pos:0,lines:0,str:""};if(60===t.charCodeAt(e)){for(e++;e<n;){if(10===(i=t.charCodeAt(e)))return s;if(62===i)return s.pos=e+1,s.str=r(t.slice(a+1,e)),s.ok=!0,s;92===i&&e+1<n?e+=2:e++}return s}for(o=0;e<n&&32!==(i=t.charCodeAt(e))&&!(i<32||127===i);)if(92===i&&e+1<n)e+=2;else{if(40===i&&o++,41===i){if(0===o)break;o--}e++}return a===e||0!==o||(s.str=r(t.slice(a,e)),s.lines=0,s.pos=e,s.ok=!0),s}},function(t,e,n){"use strict";var r=n(6).unescapeAll;t.exports=function(t,e,n){var i,o,a=0,s=e,u={ok:!1,pos:0,lines:0,str:""};if(e>=n)return u;if(34!==(o=t.charCodeAt(e))&&39!==o&&40!==o)return u;for(e++,40===o&&(o=41);e<n;){if((i=t.charCodeAt(e))===o)return u.pos=e+1,u.lines=a,u.str=r(t.slice(s+1,e)),u.ok=!0,u;10===i?a++:92===i&&e+1<n&&(e++,10===t.charCodeAt(e)&&a++),e++}return u}},function(t,e,n){"use strict";var r=n(6).assign,i=n(6).unescapeAll,o=n(6).escapeHtml,a={};function s(){this.rules=r({},a)}a.code_inline=function(t,e,n,r,i){var a=t[e];return"<code"+i.renderAttrs(a)+">"+o(t[e].content)+"</code>"},a.code_block=function(t,e,n,r,i){var a=t[e];return"<pre"+i.renderAttrs(a)+"><code>"+o(t[e].content)+"</code></pre>\n"},a.fence=function(t,e,n,r,a){var s,u,c,l,h=t[e],f=h.info?i(h.info).trim():"",d="";return f&&(d=f.split(/\s+/g)[0]),0===(s=n.highlight&&n.highlight(h.content,d)||o(h.content)).indexOf("<pre")?s+"\n":f?(u=h.attrIndex("class"),c=h.attrs?h.attrs.slice():[],u<0?c.push(["class",n.langPrefix+d]):c[u][1]+=" "+n.langPrefix+d,l={attrs:c},"<pre><code"+a.renderAttrs(l)+">"+s+"</code></pre>\n"):"<pre><code"+a.renderAttrs(h)+">"+s+"</code></pre>\n"},a.image=function(t,e,n,r,i){var o=t[e];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(t,e,n)},a.hardbreak=function(t,e,n){return n.xhtmlOut?"<br />\n":"<br>\n"},a.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},a.text=function(t,e){return o(t[e].content)},a.html_block=function(t,e){return t[e].content},a.html_inline=function(t,e){return t[e].content},s.prototype.renderAttrs=function(t){var e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e<n;e++)r+=" "+o(t.attrs[e][0])+'="'+o(t.attrs[e][1])+'"';return r},s.prototype.renderToken=function(t,e,n){var r,i="",o=!1,a=t[e];return a.hidden?"":(a.block&&-1!==a.nesting&&e&&t[e-1].hidden&&(i+="\n"),i+=(-1===a.nesting?"</":"<")+a.tag,i+=this.renderAttrs(a),0===a.nesting&&n.xhtmlOut&&(i+=" /"),a.block&&(o=!0,1===a.nesting&&e+1<t.length&&("inline"===(r=t[e+1]).type||r.hidden||-1===r.nesting&&r.tag===a.tag)&&(o=!1)),i+=o?">\n":">")},s.prototype.renderInline=function(t,e,n){for(var r,i="",o=this.rules,a=0,s=t.length;a<s;a++)"undefined"!==typeof o[r=t[a].type]?i+=o[r](t,a,e,n,this):i+=this.renderToken(t,a,e);return i},s.prototype.renderInlineAsText=function(t,e,n){for(var r="",i=0,o=t.length;i<o;i++)"text"===t[i].type?r+=t[i].content:"image"===t[i].type&&(r+=this.renderInlineAsText(t[i].children,e,n));return r},s.prototype.render=function(t,e,n){var r,i,o,a="",s=this.rules;for(r=0,i=t.length;r<i;r++)"inline"===(o=t[r].type)?a+=this.renderInline(t[r].children,e,n):"undefined"!==typeof s[o]?a+=s[t[r].type](t,r,e,n,this):a+=this.renderToken(t,r,e,n);return a},t.exports=s},function(t,e,n){"use strict";var r=n(114),i=[["normalize",n(432)],["block",n(433)],["inline",n(434)],["linkify",n(435)],["replacements",n(436)],["smartquotes",n(437)]];function o(){this.ruler=new r;for(var t=0;t<i.length;t++)this.ruler.push(i[t][0],i[t][1])}o.prototype.process=function(t){var e,n,r;for(e=0,n=(r=this.ruler.getRules("")).length;e<n;e++)r[e](t)},o.prototype.State=n(438),t.exports=o},function(t,e,n){"use strict";var r=/\r\n?|\n/g,i=/\0/g;t.exports=function(t){var e;e=(e=t.src.replace(r,"\n")).replace(i,"\ufffd"),t.src=e}},function(t,e,n){"use strict";t.exports=function(t){var e;t.inlineMode?((e=new t.Token("inline","",0)).content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}},function(t,e,n){"use strict";t.exports=function(t){var e,n,r,i=t.tokens;for(n=0,r=i.length;n<r;n++)"inline"===(e=i[n]).type&&t.md.inline.parse(e.content,t.md,t.env,e.children)}},function(t,e,n){"use strict";var r=n(6).arrayReplaceAt;function i(t){return/^<\/a\s*>/i.test(t)}t.exports=function(t){var e,n,o,a,s,u,c,l,h,f,d,p,m,v,g,y,b,_,w=t.tokens;if(t.md.options.linkify)for(n=0,o=w.length;n<o;n++)if("inline"===w[n].type&&t.md.linkify.pretest(w[n].content))for(m=0,e=(a=w[n].children).length-1;e>=0;e--)if("link_close"!==(u=a[e]).type){if("html_inline"===u.type&&(_=u.content,/^<a[>\s]/i.test(_)&&m>0&&m--,i(u.content)&&m++),!(m>0)&&"text"===u.type&&t.md.linkify.test(u.content)){for(h=u.content,b=t.md.linkify.match(h),c=[],p=u.level,d=0,l=0;l<b.length;l++)v=b[l].url,g=t.md.normalizeLink(v),t.md.validateLink(g)&&(y=b[l].text,y=b[l].schema?"mailto:"!==b[l].schema||/^mailto:/i.test(y)?t.md.normalizeLinkText(y):t.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):t.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),(f=b[l].index)>d&&((s=new t.Token("text","",0)).content=h.slice(d,f),s.level=p,c.push(s)),(s=new t.Token("link_open","a",1)).attrs=[["href",g]],s.level=p++,s.markup="linkify",s.info="auto",c.push(s),(s=new t.Token("text","",0)).content=y,s.level=p,c.push(s),(s=new t.Token("link_close","a",-1)).level=--p,s.markup="linkify",s.info="auto",c.push(s),d=b[l].lastIndex);d<h.length&&((s=new t.Token("text","",0)).content=h.slice(d),s.level=p,c.push(s)),w[n].children=a=r(a,e,c)}}else for(e--;a[e].level!==u.level&&"link_open"!==a[e].type;)e--}},function(t,e,n){"use strict";var r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,i=/\((c|tm|r|p)\)/i,o=/\((c|tm|r|p)\)/gi,a={c:"\xa9",r:"\xae",p:"\xa7",tm:"\u2122"};function s(t,e){return a[e.toLowerCase()]}function u(t){var e,n,r=0;for(e=t.length-1;e>=0;e--)"text"!==(n=t[e]).type||r||(n.content=n.content.replace(o,s)),"link_open"===n.type&&"auto"===n.info&&r--,"link_close"===n.type&&"auto"===n.info&&r++}function c(t){var e,n,i=0;for(e=t.length-1;e>=0;e--)"text"!==(n=t[e]).type||i||r.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1\u2014$2").replace(/(^|\s)--(\s|$)/gm,"$1\u2013$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1\u2013$2")),"link_open"===n.type&&"auto"===n.info&&i--,"link_close"===n.type&&"auto"===n.info&&i++}t.exports=function(t){var e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&(i.test(t.tokens[e].content)&&u(t.tokens[e].children),r.test(t.tokens[e].content)&&c(t.tokens[e].children))}},function(t,e,n){"use strict";var r=n(6).isWhiteSpace,i=n(6).isPunctChar,o=n(6).isMdAsciiPunct,a=/['"]/,s=/['"]/g;function u(t,e,n){return t.substr(0,e)+n+t.substr(e+1)}function c(t,e){var n,a,c,l,h,f,d,p,m,v,g,y,b,_,w,x,k,S,C,M,E;for(C=[],n=0;n<t.length;n++){for(a=t[n],d=t[n].level,k=C.length-1;k>=0&&!(C[k].level<=d);k--);if(C.length=k+1,"text"===a.type){h=0,f=(c=a.content).length;t:for(;h<f&&(s.lastIndex=h,l=s.exec(c));){if(w=x=!0,h=l.index+1,S="'"===l[0],m=32,l.index-1>=0)m=c.charCodeAt(l.index-1);else for(k=n-1;k>=0&&("softbreak"!==t[k].type&&"hardbreak"!==t[k].type);k--)if("text"===t[k].type){m=t[k].content.charCodeAt(t[k].content.length-1);break}if(v=32,h<f)v=c.charCodeAt(h);else for(k=n+1;k<t.length&&("softbreak"!==t[k].type&&"hardbreak"!==t[k].type);k++)if("text"===t[k].type){v=t[k].content.charCodeAt(0);break}if(g=o(m)||i(String.fromCharCode(m)),y=o(v)||i(String.fromCharCode(v)),b=r(m),(_=r(v))?w=!1:y&&(b||g||(w=!1)),b?x=!1:g&&(_||y||(x=!1)),34===v&&'"'===l[0]&&m>=48&&m<=57&&(x=w=!1),w&&x&&(w=!1,x=y),w||x){if(x)for(k=C.length-1;k>=0&&(p=C[k],!(C[k].level<d));k--)if(p.single===S&&C[k].level===d){p=C[k],S?(M=e.md.options.quotes[2],E=e.md.options.quotes[3]):(M=e.md.options.quotes[0],E=e.md.options.quotes[1]),a.content=u(a.content,l.index,E),t[p.token].content=u(t[p.token].content,p.pos,M),h+=E.length-1,p.token===n&&(h+=M.length-1),f=(c=a.content).length,C.length=k;continue t}w?C.push({token:n,pos:l.index,single:S,level:d}):x&&S&&(a.content=u(a.content,l.index,"\u2019"))}else S&&(a.content=u(a.content,l.index,"\u2019"))}}}}t.exports=function(t){var e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&a.test(t.tokens[e].content)&&c(t.tokens[e].children,t)}},function(t,e,n){"use strict";var r=n(115);function i(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}i.prototype.Token=r,t.exports=i},function(t,e,n){"use strict";var r=n(114),i=[["table",n(440),["paragraph","reference"]],["code",n(441)],["fence",n(442),["paragraph","reference","blockquote","list"]],["blockquote",n(443),["paragraph","reference","blockquote","list"]],["hr",n(444),["paragraph","reference","blockquote","list"]],["list",n(445),["paragraph","reference","blockquote"]],["reference",n(446)],["heading",n(447),["paragraph","reference","blockquote"]],["lheading",n(448)],["html_block",n(449),["paragraph","reference","blockquote"]],["paragraph",n(451)]];function o(){this.ruler=new r;for(var t=0;t<i.length;t++)this.ruler.push(i[t][0],i[t][1],{alt:(i[t][2]||[]).slice()})}o.prototype.tokenize=function(t,e,n){for(var r,i=this.ruler.getRules(""),o=i.length,a=e,s=!1,u=t.md.options.maxNesting;a<n&&(t.line=a=t.skipEmptyLines(a),!(a>=n))&&!(t.sCount[a]<t.blkIndent);){if(t.level>=u){t.line=n;break}for(r=0;r<o&&!i[r](t,a,n,!1);r++);t.tight=!s,t.isEmpty(t.line-1)&&(s=!0),(a=t.line)<n&&t.isEmpty(a)&&(s=!0,a++,t.line=a)}},o.prototype.parse=function(t,e,n,r){var i;t&&(i=new this.State(t,e,n,r),this.tokenize(i,i.line,i.lineMax))},o.prototype.State=n(452),t.exports=o},function(t,e,n){"use strict";var r=n(6).isSpace;function i(t,e){var n=t.bMarks[e]+t.blkIndent,r=t.eMarks[e];return t.src.substr(n,r-n)}function o(t){var e,n=[],r=0,i=t.length,o=0,a=0,s=!1,u=0;for(e=t.charCodeAt(r);r<i;)96===e?s?(s=!1,u=r):o%2===0&&(s=!0,u=r):124!==e||o%2!==0||s||(n.push(t.substring(a,r)),a=r+1),92===e?o++:o=0,++r===i&&s&&(s=!1,r=u+1),e=t.charCodeAt(r);return n.push(t.substring(a)),n}t.exports=function(t,e,n,a){var s,u,c,l,h,f,d,p,m,v,g,y;if(e+2>n)return!1;if(h=e+1,t.sCount[h]<t.blkIndent)return!1;if(t.sCount[h]-t.blkIndent>=4)return!1;if((c=t.bMarks[h]+t.tShift[h])>=t.eMarks[h])return!1;if(124!==(s=t.src.charCodeAt(c++))&&45!==s&&58!==s)return!1;for(;c<t.eMarks[h];){if(124!==(s=t.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(f=(u=i(t,e+1)).split("|"),m=[],l=0;l<f.length;l++){if(!(v=f[l].trim())){if(0===l||l===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(v))return!1;58===v.charCodeAt(v.length-1)?m.push(58===v.charCodeAt(0)?"center":"right"):58===v.charCodeAt(0)?m.push("left"):m.push("")}if(-1===(u=i(t,e).trim()).indexOf("|"))return!1;if(t.sCount[e]-t.blkIndent>=4)return!1;if((d=(f=o(u.replace(/^\||\|$/g,""))).length)>m.length)return!1;if(a)return!0;for((p=t.push("table_open","table",1)).map=g=[e,0],(p=t.push("thead_open","thead",1)).map=[e,e+1],(p=t.push("tr_open","tr",1)).map=[e,e+1],l=0;l<f.length;l++)(p=t.push("th_open","th",1)).map=[e,e+1],m[l]&&(p.attrs=[["style","text-align:"+m[l]]]),(p=t.push("inline","",0)).content=f[l].trim(),p.map=[e,e+1],p.children=[],p=t.push("th_close","th",-1);for(p=t.push("tr_close","tr",-1),p=t.push("thead_close","thead",-1),(p=t.push("tbody_open","tbody",1)).map=y=[e+2,0],h=e+2;h<n&&!(t.sCount[h]<t.blkIndent)&&-1!==(u=i(t,h).trim()).indexOf("|")&&!(t.sCount[h]-t.blkIndent>=4);h++){for(f=o(u.replace(/^\||\|$/g,"")),p=t.push("tr_open","tr",1),l=0;l<d;l++)p=t.push("td_open","td",1),m[l]&&(p.attrs=[["style","text-align:"+m[l]]]),(p=t.push("inline","",0)).content=f[l]?f[l].trim():"",p.children=[],p=t.push("td_close","td",-1);p=t.push("tr_close","tr",-1)}return p=t.push("tbody_close","tbody",-1),p=t.push("table_close","table",-1),g[1]=y[1]=h,t.line=h,!0}},function(t,e,n){"use strict";t.exports=function(t,e,n){var r,i,o;if(t.sCount[e]-t.blkIndent<4)return!1;for(i=r=e+1;r<n;)if(t.isEmpty(r))r++;else{if(!(t.sCount[r]-t.blkIndent>=4))break;i=++r}return t.line=i,(o=t.push("code_block","code",0)).content=t.getLines(e,i,4+t.blkIndent,!0),o.map=[e,t.line],!0}},function(t,e,n){"use strict";t.exports=function(t,e,n,r){var i,o,a,s,u,c,l,h=!1,f=t.bMarks[e]+t.tShift[e],d=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(f+3>d)return!1;if(126!==(i=t.src.charCodeAt(f))&&96!==i)return!1;if(u=f,(o=(f=t.skipChars(f,i))-u)<3)return!1;if(l=t.src.slice(u,f),a=t.src.slice(f,d),96===i&&a.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;for(s=e;!(++s>=n)&&!((f=u=t.bMarks[s]+t.tShift[s])<(d=t.eMarks[s])&&t.sCount[s]<t.blkIndent);)if(t.src.charCodeAt(f)===i&&!(t.sCount[s]-t.blkIndent>=4)&&!((f=t.skipChars(f,i))-u<o)&&!((f=t.skipSpaces(f))<d)){h=!0;break}return o=t.sCount[e],t.line=s+(h?1:0),(c=t.push("fence","code",0)).info=a,c.content=t.getLines(e+1,s,o,!0),c.markup=l,c.map=[e,t.line],!0}},function(t,e,n){"use strict";var r=n(6).isSpace;t.exports=function(t,e,n,i){var o,a,s,u,c,l,h,f,d,p,m,v,g,y,b,_,w,x,k,S,C=t.lineMax,M=t.bMarks[e]+t.tShift[e],E=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(62!==t.src.charCodeAt(M++))return!1;if(i)return!0;for(u=d=t.sCount[e]+M-(t.bMarks[e]+t.tShift[e]),32===t.src.charCodeAt(M)?(M++,u++,d++,o=!1,_=!0):9===t.src.charCodeAt(M)?(_=!0,(t.bsCount[e]+d)%4===3?(M++,u++,d++,o=!1):o=!0):_=!1,p=[t.bMarks[e]],t.bMarks[e]=M;M<E&&(a=t.src.charCodeAt(M),r(a));)9===a?d+=4-(d+t.bsCount[e]+(o?1:0))%4:d++,M++;for(m=[t.bsCount[e]],t.bsCount[e]=t.sCount[e]+1+(_?1:0),l=M>=E,y=[t.sCount[e]],t.sCount[e]=d-u,b=[t.tShift[e]],t.tShift[e]=M-t.bMarks[e],x=t.md.block.ruler.getRules("blockquote"),g=t.parentType,t.parentType="blockquote",S=!1,f=e+1;f<n&&(t.sCount[f]<t.blkIndent&&(S=!0),!((M=t.bMarks[f]+t.tShift[f])>=(E=t.eMarks[f])));f++)if(62!==t.src.charCodeAt(M++)||S){if(l)break;for(w=!1,s=0,c=x.length;s<c;s++)if(x[s](t,f,n,!0)){w=!0;break}if(w){t.lineMax=f,0!==t.blkIndent&&(p.push(t.bMarks[f]),m.push(t.bsCount[f]),b.push(t.tShift[f]),y.push(t.sCount[f]),t.sCount[f]-=t.blkIndent);break}p.push(t.bMarks[f]),m.push(t.bsCount[f]),b.push(t.tShift[f]),y.push(t.sCount[f]),t.sCount[f]=-1}else{for(u=d=t.sCount[f]+M-(t.bMarks[f]+t.tShift[f]),32===t.src.charCodeAt(M)?(M++,u++,d++,o=!1,_=!0):9===t.src.charCodeAt(M)?(_=!0,(t.bsCount[f]+d)%4===3?(M++,u++,d++,o=!1):o=!0):_=!1,p.push(t.bMarks[f]),t.bMarks[f]=M;M<E&&(a=t.src.charCodeAt(M),r(a));)9===a?d+=4-(d+t.bsCount[f]+(o?1:0))%4:d++,M++;l=M>=E,m.push(t.bsCount[f]),t.bsCount[f]=t.sCount[f]+1+(_?1:0),y.push(t.sCount[f]),t.sCount[f]=d-u,b.push(t.tShift[f]),t.tShift[f]=M-t.bMarks[f]}for(v=t.blkIndent,t.blkIndent=0,(k=t.push("blockquote_open","blockquote",1)).markup=">",k.map=h=[e,0],t.md.block.tokenize(t,e,f),(k=t.push("blockquote_close","blockquote",-1)).markup=">",t.lineMax=C,t.parentType=g,h[1]=t.line,s=0;s<b.length;s++)t.bMarks[s+e]=p[s],t.tShift[s+e]=b[s],t.sCount[s+e]=y[s],t.bsCount[s+e]=m[s];return t.blkIndent=v,!0}},function(t,e,n){"use strict";var r=n(6).isSpace;t.exports=function(t,e,n,i){var o,a,s,u,c=t.bMarks[e]+t.tShift[e],l=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(42!==(o=t.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(a=1;c<l;){if((s=t.src.charCodeAt(c++))!==o&&!r(s))return!1;s===o&&a++}return!(a<3)&&(i||(t.line=e+1,(u=t.push("hr","hr",0)).map=[e,t.line],u.markup=Array(a+1).join(String.fromCharCode(o))),!0)}},function(t,e,n){"use strict";var r=n(6).isSpace;function i(t,e){var n,i,o,a;return i=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],42!==(n=t.src.charCodeAt(i++))&&45!==n&&43!==n||i<o&&(a=t.src.charCodeAt(i),!r(a))?-1:i}function o(t,e){var n,i=t.bMarks[e]+t.tShift[e],o=i,a=t.eMarks[e];if(o+1>=a)return-1;if((n=t.src.charCodeAt(o++))<48||n>57)return-1;for(;;){if(o>=a)return-1;if(!((n=t.src.charCodeAt(o++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(o-i>=10)return-1}return o<a&&(n=t.src.charCodeAt(o),!r(n))?-1:o}t.exports=function(t,e,n,r){var a,s,u,c,l,h,f,d,p,m,v,g,y,b,_,w,x,k,S,C,M,E,T,A,O,P,L,D,I=!1,R=!0;if(t.sCount[e]-t.blkIndent>=4)return!1;if(t.listIndent>=0&&t.sCount[e]-t.listIndent>=4&&t.sCount[e]<t.blkIndent)return!1;if(r&&"paragraph"===t.parentType&&t.tShift[e]>=t.blkIndent&&(I=!0),(T=o(t,e))>=0){if(f=!0,O=t.bMarks[e]+t.tShift[e],y=Number(t.src.substr(O,T-O-1)),I&&1!==y)return!1}else{if(!((T=i(t,e))>=0))return!1;f=!1}if(I&&t.skipSpaces(T)>=t.eMarks[e])return!1;if(g=t.src.charCodeAt(T-1),r)return!0;for(v=t.tokens.length,f?(D=t.push("ordered_list_open","ol",1),1!==y&&(D.attrs=[["start",y]])):D=t.push("bullet_list_open","ul",1),D.map=m=[e,0],D.markup=String.fromCharCode(g),_=e,A=!1,L=t.md.block.ruler.getRules("list"),k=t.parentType,t.parentType="list";_<n;){for(E=T,b=t.eMarks[_],h=w=t.sCount[_]+T-(t.bMarks[e]+t.tShift[e]);E<b;){if(9===(a=t.src.charCodeAt(E)))w+=4-(w+t.bsCount[_])%4;else{if(32!==a)break;w++}E++}if((l=(s=E)>=b?1:w-h)>4&&(l=1),c=h+l,(D=t.push("list_item_open","li",1)).markup=String.fromCharCode(g),D.map=d=[e,0],M=t.tight,C=t.tShift[e],S=t.sCount[e],x=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=c,t.tight=!0,t.tShift[e]=s-t.bMarks[e],t.sCount[e]=w,s>=b&&t.isEmpty(e+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,e,n,!0),t.tight&&!A||(R=!1),A=t.line-e>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=x,t.tShift[e]=C,t.sCount[e]=S,t.tight=M,(D=t.push("list_item_close","li",-1)).markup=String.fromCharCode(g),_=e=t.line,d[1]=_,s=t.bMarks[e],_>=n)break;if(t.sCount[_]<t.blkIndent)break;if(t.sCount[e]-t.blkIndent>=4)break;for(P=!1,u=0,p=L.length;u<p;u++)if(L[u](t,_,n,!0)){P=!0;break}if(P)break;if(f){if((T=o(t,_))<0)break}else if((T=i(t,_))<0)break;if(g!==t.src.charCodeAt(T-1))break}return(D=f?t.push("ordered_list_close","ol",-1):t.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(g),m[1]=_,t.line=_,t.parentType=k,R&&function(t,e){var n,r,i=t.level+2;for(n=e+2,r=t.tokens.length-2;n<r;n++)t.tokens[n].level===i&&"paragraph_open"===t.tokens[n].type&&(t.tokens[n+2].hidden=!0,t.tokens[n].hidden=!0,n+=2)}(t,v),!0}},function(t,e,n){"use strict";var r=n(6).normalizeReference,i=n(6).isSpace;t.exports=function(t,e,n,o){var a,s,u,c,l,h,f,d,p,m,v,g,y,b,_,w,x=0,k=t.bMarks[e]+t.tShift[e],S=t.eMarks[e],C=e+1;if(t.sCount[e]-t.blkIndent>=4)return!1;if(91!==t.src.charCodeAt(k))return!1;for(;++k<S;)if(93===t.src.charCodeAt(k)&&92!==t.src.charCodeAt(k-1)){if(k+1===S)return!1;if(58!==t.src.charCodeAt(k+1))return!1;break}for(c=t.lineMax,_=t.md.block.ruler.getRules("reference"),m=t.parentType,t.parentType="reference";C<c&&!t.isEmpty(C);C++)if(!(t.sCount[C]-t.blkIndent>3)&&!(t.sCount[C]<0)){for(b=!1,h=0,f=_.length;h<f;h++)if(_[h](t,C,c,!0)){b=!0;break}if(b)break}for(S=(y=t.getLines(e,C,t.blkIndent,!1).trim()).length,k=1;k<S;k++){if(91===(a=y.charCodeAt(k)))return!1;if(93===a){p=k;break}(10===a||92===a&&++k<S&&10===y.charCodeAt(k))&&x++}if(p<0||58!==y.charCodeAt(p+1))return!1;for(k=p+2;k<S;k++)if(10===(a=y.charCodeAt(k)))x++;else if(!i(a))break;if(!(v=t.md.helpers.parseLinkDestination(y,k,S)).ok)return!1;if(l=t.md.normalizeLink(v.str),!t.md.validateLink(l))return!1;for(s=k=v.pos,u=x+=v.lines,g=k;k<S;k++)if(10===(a=y.charCodeAt(k)))x++;else if(!i(a))break;for(v=t.md.helpers.parseLinkTitle(y,k,S),k<S&&g!==k&&v.ok?(w=v.str,k=v.pos,x+=v.lines):(w="",k=s,x=u);k<S&&(a=y.charCodeAt(k),i(a));)k++;if(k<S&&10!==y.charCodeAt(k)&&w)for(w="",k=s,x=u;k<S&&(a=y.charCodeAt(k),i(a));)k++;return!(k<S&&10!==y.charCodeAt(k))&&(!!(d=r(y.slice(1,p)))&&(o||("undefined"===typeof t.env.references&&(t.env.references={}),"undefined"===typeof t.env.references[d]&&(t.env.references[d]={title:w,href:l}),t.parentType=m,t.line=e+x+1),!0))}},function(t,e,n){"use strict";var r=n(6).isSpace;t.exports=function(t,e,n,i){var o,a,s,u,c=t.bMarks[e]+t.tShift[e],l=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(35!==(o=t.src.charCodeAt(c))||c>=l)return!1;for(a=1,o=t.src.charCodeAt(++c);35===o&&c<l&&a<=6;)a++,o=t.src.charCodeAt(++c);return!(a>6||c<l&&!r(o))&&(i||(l=t.skipSpacesBack(l,c),(s=t.skipCharsBack(l,35,c))>c&&r(t.src.charCodeAt(s-1))&&(l=s),t.line=e+1,(u=t.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),u.map=[e,t.line],(u=t.push("inline","",0)).content=t.src.slice(c,l).trim(),u.map=[e,t.line],u.children=[],(u=t.push("heading_close","h"+String(a),-1)).markup="########".slice(0,a)),!0)}},function(t,e,n){"use strict";t.exports=function(t,e,n){var r,i,o,a,s,u,c,l,h,f,d=e+1,p=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;for(f=t.parentType,t.parentType="paragraph";d<n&&!t.isEmpty(d);d++)if(!(t.sCount[d]-t.blkIndent>3)){if(t.sCount[d]>=t.blkIndent&&(u=t.bMarks[d]+t.tShift[d])<(c=t.eMarks[d])&&(45===(h=t.src.charCodeAt(u))||61===h)&&(u=t.skipChars(u,h),(u=t.skipSpaces(u))>=c)){l=61===h?1:2;break}if(!(t.sCount[d]<0)){for(i=!1,o=0,a=p.length;o<a;o++)if(p[o](t,d,n,!0)){i=!0;break}if(i)break}}return!!l&&(r=t.getLines(e,d,t.blkIndent,!1).trim(),t.line=d+1,(s=t.push("heading_open","h"+String(l),1)).markup=String.fromCharCode(h),s.map=[e,t.line],(s=t.push("inline","",0)).content=r,s.map=[e,t.line-1],s.children=[],(s=t.push("heading_close","h"+String(l),-1)).markup=String.fromCharCode(h),t.parentType=f,!0)}},function(t,e,n){"use strict";var r=n(450),i=n(172).HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(i.source+"\\s*$"),/^$/,!1]];t.exports=function(t,e,n,r){var i,a,s,u,c=t.bMarks[e]+t.tShift[e],l=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(c))return!1;for(u=t.src.slice(c,l),i=0;i<o.length&&!o[i][0].test(u);i++);if(i===o.length)return!1;if(r)return o[i][2];if(a=e+1,!o[i][1].test(u))for(;a<n&&!(t.sCount[a]<t.blkIndent);a++)if(c=t.bMarks[a]+t.tShift[a],l=t.eMarks[a],u=t.src.slice(c,l),o[i][1].test(u)){0!==u.length&&a++;break}return t.line=a,(s=t.push("html_block","",0)).map=[e,a],s.content=t.getLines(e,a,t.blkIndent,!0),!0}},function(t,e,n){"use strict";t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},function(t,e,n){"use strict";t.exports=function(t,e){var n,r,i,o,a,s,u=e+1,c=t.md.block.ruler.getRules("paragraph"),l=t.lineMax;for(s=t.parentType,t.parentType="paragraph";u<l&&!t.isEmpty(u);u++)if(!(t.sCount[u]-t.blkIndent>3)&&!(t.sCount[u]<0)){for(r=!1,i=0,o=c.length;i<o;i++)if(c[i](t,u,l,!0)){r=!0;break}if(r)break}return n=t.getLines(e,u,t.blkIndent,!1).trim(),t.line=u,(a=t.push("paragraph_open","p",1)).map=[e,t.line],(a=t.push("inline","",0)).content=n,a.map=[e,t.line],a.children=[],a=t.push("paragraph_close","p",-1),t.parentType=s,!0}},function(t,e,n){"use strict";var r=n(115),i=n(6).isSpace;function o(t,e,n,r){var o,a,s,u,c,l,h,f;for(this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",f=!1,s=u=l=h=0,c=(a=this.src).length;u<c;u++){if(o=a.charCodeAt(u),!f){if(i(o)){l++,9===o?h+=4-h%4:h++;continue}f=!0}10!==o&&u!==c-1||(10!==o&&u++,this.bMarks.push(s),this.eMarks.push(u),this.tShift.push(l),this.sCount.push(h),this.bsCount.push(0),f=!1,l=0,h=0,s=u+1)}this.bMarks.push(a.length),this.eMarks.push(a.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(t,e,n){var i=new r(t,e,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i},o.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},o.prototype.skipEmptyLines=function(t){for(var e=this.lineMax;t<e&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},o.prototype.skipSpaces=function(t){for(var e,n=this.src.length;t<n&&(e=this.src.charCodeAt(t),i(e));t++);return t},o.prototype.skipSpacesBack=function(t,e){if(t<=e)return t;for(;t>e;)if(!i(this.src.charCodeAt(--t)))return t+1;return t},o.prototype.skipChars=function(t,e){for(var n=this.src.length;t<n&&this.src.charCodeAt(t)===e;t++);return t},o.prototype.skipCharsBack=function(t,e,n){if(t<=n)return t;for(;t>n;)if(e!==this.src.charCodeAt(--t))return t+1;return t},o.prototype.getLines=function(t,e,n,r){var o,a,s,u,c,l,h,f=t;if(t>=e)return"";for(l=new Array(e-t),o=0;f<e;f++,o++){for(a=0,h=u=this.bMarks[f],c=f+1<e||r?this.eMarks[f]+1:this.eMarks[f];u<c&&a<n;){if(s=this.src.charCodeAt(u),i(s))9===s?a+=4-(a+this.bsCount[f])%4:a++;else{if(!(u-h<this.tShift[f]))break;a++}u++}l[o]=a>n?new Array(a-n+1).join(" ")+this.src.slice(u,c):this.src.slice(u,c)}return l.join("")},o.prototype.Token=r,t.exports=o},function(t,e,n){"use strict";var r=n(114),i=[["text",n(454)],["newline",n(455)],["escape",n(456)],["backticks",n(457)],["strikethrough",n(173).tokenize],["emphasis",n(174).tokenize],["link",n(458)],["image",n(459)],["autolink",n(460)],["html_inline",n(461)],["entity",n(462)]],o=[["balance_pairs",n(463)],["strikethrough",n(173).postProcess],["emphasis",n(174).postProcess],["text_collapse",n(464)]];function a(){var t;for(this.ruler=new r,t=0;t<i.length;t++)this.ruler.push(i[t][0],i[t][1]);for(this.ruler2=new r,t=0;t<o.length;t++)this.ruler2.push(o[t][0],o[t][1])}a.prototype.skipToken=function(t){var e,n,r=t.pos,i=this.ruler.getRules(""),o=i.length,a=t.md.options.maxNesting,s=t.cache;if("undefined"===typeof s[r]){if(t.level<a)for(n=0;n<o&&(t.level++,e=i[n](t,!0),t.level--,!e);n++);else t.pos=t.posMax;e||t.pos++,s[r]=t.pos}else t.pos=s[r]},a.prototype.tokenize=function(t){for(var e,n,r=this.ruler.getRules(""),i=r.length,o=t.posMax,a=t.md.options.maxNesting;t.pos<o;){if(t.level<a)for(n=0;n<i&&!(e=r[n](t,!1));n++);if(e){if(t.pos>=o)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},a.prototype.parse=function(t,e,n,r){var i,o,a,s=new this.State(t,e,n,r);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i<a;i++)o[i](s)},a.prototype.State=n(465),t.exports=a},function(t,e,n){"use strict";function r(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}t.exports=function(t,e){for(var n=t.pos;n<t.posMax&&!r(t.src.charCodeAt(n));)n++;return n!==t.pos&&(e||(t.pending+=t.src.slice(t.pos,n)),t.pos=n,!0)}},function(t,e,n){"use strict";var r=n(6).isSpace;t.exports=function(t,e){var n,i,o=t.pos;if(10!==t.src.charCodeAt(o))return!1;for(n=t.pending.length-1,i=t.posMax,e||(n>=0&&32===t.pending.charCodeAt(n)?n>=1&&32===t.pending.charCodeAt(n-1)?(t.pending=t.pending.replace(/ +$/,""),t.push("hardbreak","br",0)):(t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0)):t.push("softbreak","br",0)),o++;o<i&&r(t.src.charCodeAt(o));)o++;return t.pos=o,!0}},function(t,e,n){"use strict";for(var r=n(6).isSpace,i=[],o=0;o<256;o++)i.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(t){i[t.charCodeAt(0)]=1})),t.exports=function(t,e){var n,o=t.pos,a=t.posMax;if(92!==t.src.charCodeAt(o))return!1;if(++o<a){if((n=t.src.charCodeAt(o))<256&&0!==i[n])return e||(t.pending+=t.src[o]),t.pos+=2,!0;if(10===n){for(e||t.push("hardbreak","br",0),o++;o<a&&(n=t.src.charCodeAt(o),r(n));)o++;return t.pos=o,!0}}return e||(t.pending+="\\"),t.pos++,!0}},function(t,e,n){"use strict";t.exports=function(t,e){var n,r,i,o,a,s,u=t.pos;if(96!==t.src.charCodeAt(u))return!1;for(n=u,u++,r=t.posMax;u<r&&96===t.src.charCodeAt(u);)u++;for(i=t.src.slice(n,u),o=a=u;-1!==(o=t.src.indexOf("`",a));){for(a=o+1;a<r&&96===t.src.charCodeAt(a);)a++;if(a-o===i.length)return e||((s=t.push("code_inline","code",0)).markup=i,s.content=t.src.slice(u,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=a,!0}return e||(t.pending+=i),t.pos+=i.length,!0}},function(t,e,n){"use strict";var r=n(6).normalizeReference,i=n(6).isSpace;t.exports=function(t,e){var n,o,a,s,u,c,l,h,f,d="",p=t.pos,m=t.posMax,v=t.pos,g=!0;if(91!==t.src.charCodeAt(t.pos))return!1;if(u=t.pos+1,(s=t.md.helpers.parseLinkLabel(t,t.pos,!0))<0)return!1;if((c=s+1)<m&&40===t.src.charCodeAt(c)){for(g=!1,c++;c<m&&(o=t.src.charCodeAt(c),i(o)||10===o);c++);if(c>=m)return!1;for(v=c,(l=t.md.helpers.parseLinkDestination(t.src,c,t.posMax)).ok&&(d=t.md.normalizeLink(l.str),t.md.validateLink(d)?c=l.pos:d=""),v=c;c<m&&(o=t.src.charCodeAt(c),i(o)||10===o);c++);if(l=t.md.helpers.parseLinkTitle(t.src,c,t.posMax),c<m&&v!==c&&l.ok)for(f=l.str,c=l.pos;c<m&&(o=t.src.charCodeAt(c),i(o)||10===o);c++);else f="";(c>=m||41!==t.src.charCodeAt(c))&&(g=!0),c++}if(g){if("undefined"===typeof t.env.references)return!1;if(c<m&&91===t.src.charCodeAt(c)?(v=c+1,(c=t.md.helpers.parseLinkLabel(t,c))>=0?a=t.src.slice(v,c++):c=s+1):c=s+1,a||(a=t.src.slice(u,s)),!(h=t.env.references[r(a)]))return t.pos=p,!1;d=h.href,f=h.title}return e||(t.pos=u,t.posMax=s,t.push("link_open","a",1).attrs=n=[["href",d]],f&&n.push(["title",f]),t.md.inline.tokenize(t),t.push("link_close","a",-1)),t.pos=c,t.posMax=m,!0}},function(t,e,n){"use strict";var r=n(6).normalizeReference,i=n(6).isSpace;t.exports=function(t,e){var n,o,a,s,u,c,l,h,f,d,p,m,v,g="",y=t.pos,b=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;if(c=t.pos+2,(u=t.md.helpers.parseLinkLabel(t,t.pos+1,!1))<0)return!1;if((l=u+1)<b&&40===t.src.charCodeAt(l)){for(l++;l<b&&(o=t.src.charCodeAt(l),i(o)||10===o);l++);if(l>=b)return!1;for(v=l,(f=t.md.helpers.parseLinkDestination(t.src,l,t.posMax)).ok&&(g=t.md.normalizeLink(f.str),t.md.validateLink(g)?l=f.pos:g=""),v=l;l<b&&(o=t.src.charCodeAt(l),i(o)||10===o);l++);if(f=t.md.helpers.parseLinkTitle(t.src,l,t.posMax),l<b&&v!==l&&f.ok)for(d=f.str,l=f.pos;l<b&&(o=t.src.charCodeAt(l),i(o)||10===o);l++);else d="";if(l>=b||41!==t.src.charCodeAt(l))return t.pos=y,!1;l++}else{if("undefined"===typeof t.env.references)return!1;if(l<b&&91===t.src.charCodeAt(l)?(v=l+1,(l=t.md.helpers.parseLinkLabel(t,l))>=0?s=t.src.slice(v,l++):l=u+1):l=u+1,s||(s=t.src.slice(c,u)),!(h=t.env.references[r(s)]))return t.pos=y,!1;g=h.href,d=h.title}return e||(a=t.src.slice(c,u),t.md.inline.parse(a,t.md,t.env,m=[]),(p=t.push("image","img",0)).attrs=n=[["src",g],["alt",""]],p.children=m,p.content=a,d&&n.push(["title",d])),t.pos=l,t.posMax=b,!0}},function(t,e,n){"use strict";var r=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,i=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;t.exports=function(t,e){var n,o,a,s,u,c,l=t.pos;return 60===t.src.charCodeAt(l)&&(!((n=t.src.slice(l)).indexOf(">")<0)&&(i.test(n)?(s=(o=n.match(i))[0].slice(1,-1),u=t.md.normalizeLink(s),!!t.md.validateLink(u)&&(e||((c=t.push("link_open","a",1)).attrs=[["href",u]],c.markup="autolink",c.info="auto",(c=t.push("text","",0)).content=t.md.normalizeLinkText(s),(c=t.push("link_close","a",-1)).markup="autolink",c.info="auto"),t.pos+=o[0].length,!0)):!!r.test(n)&&(s=(a=n.match(r))[0].slice(1,-1),u=t.md.normalizeLink("mailto:"+s),!!t.md.validateLink(u)&&(e||((c=t.push("link_open","a",1)).attrs=[["href",u]],c.markup="autolink",c.info="auto",(c=t.push("text","",0)).content=t.md.normalizeLinkText(s),(c=t.push("link_close","a",-1)).markup="autolink",c.info="auto"),t.pos+=a[0].length,!0))))}},function(t,e,n){"use strict";var r=n(172).HTML_TAG_RE;t.exports=function(t,e){var n,i,o,a=t.pos;return!!t.md.options.html&&(o=t.posMax,!(60!==t.src.charCodeAt(a)||a+2>=o)&&(!(33!==(n=t.src.charCodeAt(a+1))&&63!==n&&47!==n&&!function(t){var e=32|t;return e>=97&&e<=122}(n))&&(!!(i=t.src.slice(a).match(r))&&(e||(t.push("html_inline","",0).content=t.src.slice(a,a+i[0].length)),t.pos+=i[0].length,!0))))}},function(t,e,n){"use strict";var r=n(167),i=n(6).has,o=n(6).isValidEntityCode,a=n(6).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(t,e){var n,c,l=t.pos,h=t.posMax;if(38!==t.src.charCodeAt(l))return!1;if(l+1<h)if(35===t.src.charCodeAt(l+1)){if(c=t.src.slice(l).match(s))return e||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),t.pending+=o(n)?a(n):a(65533)),t.pos+=c[0].length,!0}else if((c=t.src.slice(l).match(u))&&i(r,c[1]))return e||(t.pending+=r[c[1]]),t.pos+=c[0].length,!0;return e||(t.pending+="&"),t.pos++,!0}},function(t,e,n){"use strict";function r(t,e){var n,r,i,o,a,s,u,c,l={},h=e.length;for(n=0;n<h;n++)if((i=e[n]).length=i.length||0,i.close){for(l.hasOwnProperty(i.marker)||(l[i.marker]=[-1,-1,-1]),a=l[i.marker][i.length%3],s=-1,r=n-i.jump-1;r>a;r-=o.jump+1)if((o=e[r]).marker===i.marker&&(-1===s&&(s=r),o.open&&o.end<0&&o.level===i.level&&(u=!1,(o.close||i.open)&&(o.length+i.length)%3===0&&(o.length%3===0&&i.length%3===0||(u=!0)),!u))){c=r>0&&!e[r-1].open?e[r-1].jump+1:0,i.jump=n-r+c,i.open=!1,o.end=n,o.jump=c,o.close=!1,s=-1;break}-1!==s&&(l[i.marker][(i.length||0)%3]=s)}}t.exports=function(t){var e,n=t.tokens_meta,i=t.tokens_meta.length;for(r(0,t.delimiters),e=0;e<i;e++)n[e]&&n[e].delimiters&&r(0,n[e].delimiters)}},function(t,e,n){"use strict";t.exports=function(t){var e,n,r=0,i=t.tokens,o=t.tokens.length;for(e=n=0;e<o;e++)i[e].nesting<0&&r--,i[e].level=r,i[e].nesting>0&&r++,"text"===i[e].type&&e+1<o&&"text"===i[e+1].type?i[e+1].content=i[e].content+i[e+1].content:(e!==n&&(i[n]=i[e]),n++);e!==n&&(i.length=n)}},function(t,e,n){"use strict";var r=n(115),i=n(6).isWhiteSpace,o=n(6).isPunctChar,a=n(6).isMdAsciiPunct;function s(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}s.prototype.pushPending=function(){var t=new r("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},s.prototype.push=function(t,e,n){this.pending&&this.pushPending();var i=new r(t,e,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},s.prototype.scanDelims=function(t,e){var n,r,s,u,c,l,h,f,d,p=t,m=!0,v=!0,g=this.posMax,y=this.src.charCodeAt(t);for(n=t>0?this.src.charCodeAt(t-1):32;p<g&&this.src.charCodeAt(p)===y;)p++;return s=p-t,r=p<g?this.src.charCodeAt(p):32,h=a(n)||o(String.fromCharCode(n)),d=a(r)||o(String.fromCharCode(r)),l=i(n),(f=i(r))?m=!1:d&&(l||h||(m=!1)),l?v=!1:h&&(f||d||(v=!1)),e?(u=m,c=v):(u=m&&(!v||h),c=v&&(!m||d)),{can_open:u,can_close:c,length:s}},s.prototype.Token=r,t.exports=s},function(t,e,n){"use strict";function r(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach((function(e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))})),t}function i(t){return Object.prototype.toString.call(t)}function o(t){return"[object Function]"===i(t)}function a(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var u={"http:":{validate:function(t,e,n){var r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){var r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){var r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function l(t){var e=t.re=n(467)(t.__opts__),r=t.__tlds__.slice();function s(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(s(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(s(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(s(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(s(e.tpl_host_fuzzy_test),"i");var u=[];function c(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){var n=t.__schemas__[e];if(null!==n){var r={validate:null,link:null};if(t.__compiled__[e]=r,"[object Object]"===i(n))return!function(t){return"[object RegExp]"===i(t)}(n.validate)?o(n.validate)?r.validate=n.validate:c(e,n):r.validate=function(t){return function(e,n){var r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}(n.validate),void(o(n.normalize)?r.normalize=n.normalize:n.normalize?c(e,n):r.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===i(t)}(n)?c(e,n):u.push(e)}})),u.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};var l=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(a).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><\uff5c]|"+e.src_ZPCc+"))("+l+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><\uff5c]|"+e.src_ZPCc+"))("+l+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function h(t,e){var n=t.__index__,r=t.__last_index__,i=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=i,this.text=i,this.url=i}function f(t,e){var n=new h(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function d(t,e){if(!(this instanceof d))return new d(t,e);var n;e||(n=t,Object.keys(n||{}).reduce((function(t,e){return t||s.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=r({},s,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},u,t),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},l(this)}d.prototype.add=function(t,e){return this.__schemas__[t]=e,l(this),this},d.prototype.set=function(t){return this.__opts__=r(this.__opts__,t),this},d.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var e,n,r,i,o,a,s,u;if(this.re.schema_test.test(t))for((s=this.re.schema_search).lastIndex=0;null!==(e=s.exec(t));)if(i=this.testSchemaAt(t,e[2],s.lastIndex)){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=t.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||u<this.__index__)&&null!==(n=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&null!==(r=t.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),this.__index__>=0},d.prototype.pretest=function(t){return this.re.pretest.test(t)},d.prototype.testSchemaAt=function(t,e,n){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,n,this):0},d.prototype.match=function(t){var e=0,n=[];this.__index__>=0&&this.__text_cache__===t&&(n.push(f(this,e)),e=this.__last_index__);for(var r=e?t.slice(e):t;this.test(r);)n.push(f(this,e)),r=r.slice(this.__last_index__),e+=this.__last_index__;return n.length?n:null},d.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,n){return t!==n[e-1]})).reverse(),l(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,l(this),this)},d.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},d.prototype.onCompile=function(){},t.exports=d},function(t,e,n){"use strict";t.exports=function(t){var e={};e.src_Any=n(169).source,e.src_Cc=n(170).source,e.src_Z=n(171).source,e.src_P=n(113).source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");return e.src_pseudo_letter="(?:(?![><\uff5c]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><\uff5c]|"+e.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+"[><\uff5c]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+e.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+e.src_ZCc+").|\\!(?!"+e.src_ZCc+"|[!]).|\\?(?!"+e.src_ZCc+"|[?]).)+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><\uff5c]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|"+e.src_ZPCc+"))((?![$+<=>^`|\uff5c])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|"+e.src_ZPCc+"))((?![$+<=>^`|\uff5c])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}},function(t,e,n){(function(t,r){var i;function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(a){var s="object"==o(e)&&e&&!e.nodeType&&e,u="object"==o(t)&&t&&!t.nodeType&&t,c="object"==("undefined"===typeof r?"undefined":o(r))&&r;c.global!==c&&c.window!==c&&c.self!==c||(a=c);var l,h,f=2147483647,d=36,p=/^xn--/,m=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,b=String.fromCharCode;function _(t){throw new RangeError(g[t])}function w(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function x(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+w((t=t.replace(v,".")).split("."),e).join(".")}function k(t){for(var e,n,r=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}function S(t){return w(t,(function(t){var e="";return t>65535&&(e+=b((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=b(t)})).join("")}function C(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function M(t,e,n){var r=0;for(t=n?y(t/700):t>>1,t+=y(t/e);t>455;r+=d)t=y(t/35);return y(r+36*t/(t+38))}function E(t){var e,n,r,i,o,a,s,u,c,l,h,p=[],m=t.length,v=0,g=128,b=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&_("not-basic"),p.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(o=v,a=1,s=d;i>=m&&_("invalid-input"),((u=(h=t.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:d)>=d||u>y((f-v)/a))&&_("overflow"),v+=u*a,!(u<(c=s<=b?1:s>=b+26?26:s-b));s+=d)a>y(f/(l=d-c))&&_("overflow"),a*=l;b=M(v-o,e=p.length+1,0==o),y(v/e)>f-g&&_("overflow"),g+=y(v/e),v%=e,p.splice(v++,0,g)}return S(p)}function T(t){var e,n,r,i,o,a,s,u,c,l,h,p,m,v,g,w=[];for(p=(t=k(t)).length,e=128,n=0,o=72,a=0;a<p;++a)(h=t[a])<128&&w.push(b(h));for(r=i=w.length,i&&w.push("-");r<p;){for(s=f,a=0;a<p;++a)(h=t[a])>=e&&h<s&&(s=h);for(s-e>y((f-n)/(m=r+1))&&_("overflow"),n+=(s-e)*m,e=s,a=0;a<p;++a)if((h=t[a])<e&&++n>f&&_("overflow"),h==e){for(u=n,c=d;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=d)g=u-l,v=d-l,w.push(b(C(l+g%v,0))),u=y(g/v);w.push(b(C(u,0))),o=M(n,m,r==i),n=0,++r}++n,++e}return w.join("")}if(l={version:"1.4.1",ucs2:{decode:k,encode:S},decode:E,encode:T,toASCII:function(t){return x(t,(function(t){return m.test(t)?"xn--"+T(t):t}))},toUnicode:function(t){return x(t,(function(t){return p.test(t)?E(t.slice(4).toLowerCase()):t}))}},"object"==o(n(175))&&n(175))void 0===(i=function(){return l}.call(e,n,e,t))||(t.exports=i);else if(s&&u)if(t.exports==s)u.exports=l;else for(h in l)l.hasOwnProperty(h)&&(s[h]=l[h]);else a.punycode=l}(this)}).call(this,n(116)(t),n(68))},function(t,e,n){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(t,e,n){"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},function(t,e,n){"use strict";t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e){var n={720:"-12:00",660:"-11:00",600:"-10:00",570:"-09:30",540:"-09:00",480:"-08:00",420:"-07:00",360:"-06:00",300:"-05:00",240:"-04:00",210:"-03:30",180:"-03:00",120:"-02:00",60:"-01:00",0:"00:00","-60":"+01:00","-120":"+02:00","-180":"+03:00","-210":"+03:30","-240":"+04:00","-270":"+04:30","-300":"+05:00","-330":"+05:30","-345":"+05:45","-360":"+06:00","-390":"+06:30","-420":"+07:00","-480":"+08:00","-525":"+08:45","-540":"+09:00","-570":"+09:30","-600":"+10:00","-630":"+10:30","-660":"+11:00","-720":"+12:00","-765":"+12:45","-780":"+13:00","-840":"+14:00"}[(new Date).getTimezoneOffset().toString()];document.addEventListener("turbolinks:load",(function(){document.querySelectorAll(".new .event .zone select").forEach((function(t){return t.value=n}))}))},function(t,e){document.addEventListener("turbolinks:load",(function(){document.querySelectorAll('a[href^="#"]').forEach((function(t){return t.dataset.turbolinks=!1}))}))},function(t,e){document.addEventListener("turbolinks:load",(function(){document.querySelectorAll("form").forEach((function(t){t.addEventListener("submit",(function(e){var n=t.querySelectorAll(".invalid-help"),r=t.querySelectorAll(".sending-help");n.forEach((function(t){return t.classList.add("d-none")})),r.forEach((function(t){return t.classList.add("d-none")})),t.querySelectorAll('[aria-invalid="true"]').forEach((function(t){t.setAttribute("aria-invalid",!1),t.setAttribute("aria-describedby",t.parentElement.querySelector(".feedback").id)})),!1===t.checkValidity()?(e.preventDefault(),e.stopPropagation(),n.forEach((function(t){return t.classList.remove("d-none")})),t.querySelectorAll(":invalid").forEach((function(t){t.setAttribute("aria-invalid",!0),t.setAttribute("aria-describedby",t.parentElement.querySelector(".invalid-feedback").id)}))):r.forEach((function(t){return t.classList.remove("d-none")})),t.classList.add("was-validated")}))}))}))},function(t,e,n){"use strict";n.r(e);n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(210),n(211),n(212),n(72),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(229),n(230),n(231),n(232),n(233),n(235),n(236),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(301),n(302),n(303),n(304),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(152),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(153),n(330),n(331),n(332),n(333),n(334),n(335),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(401),n(160);var r=n(32);function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return t>>e||1}var a=function(){function t(t){this.maxStringLength=1024,this.maxObjectLength=128,this.maxArrayLength=128,this.maxDepth=8,this.keys=[],this.keysBlocklist=[],this.seen=[];var e=t.level||0;this.keysBlocklist=t.keysBlocklist||[],this.maxStringLength=o(this.maxStringLength,e),this.maxObjectLength=o(this.maxObjectLength,e),this.maxArrayLength=o(this.maxArrayLength,e),this.maxDepth=o(this.maxDepth,e)}return t.prototype.truncate=function(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n=0),null===t||void 0===t)return t;switch(i(t)){case"boolean":case"number":case"function":return t;case"string":return this.truncateString(t);case"object":break;default:return this.truncateString(String(t))}if(t instanceof String)return this.truncateString(t.toString());if(t instanceof Boolean||t instanceof Number||t instanceof Date||t instanceof RegExp)return t;if(t instanceof Error)return this.truncateString(t.toString());if(this.seen.indexOf(t)>=0)return"[Circular "+this.getPath(t)+"]";var r=function(t){return Object.prototype.toString.apply(t).slice("[object ".length,-1)}(t);if(++n>this.maxDepth)return"[Truncated "+r+"]";switch(this.keys.push(e),this.seen.push(t),r){case"Array":return this.truncateArray(t,n);case"Object":return this.truncateObject(t,n);default:var o=this.maxDepth;this.maxDepth=0;var a=this.truncateObject(t,n);return a.__type=r,this.maxDepth=o,a}},t.prototype.getPath=function(t){for(var e=this.seen.indexOf(t),n=[this.keys[e]],r=e;r>=0;r--){var i=this.seen[r];i&&u(i,n[0])===t&&(t=i,n.unshift(this.keys[r]))}return"~"+n.join(".")},t.prototype.truncateString=function(t){return t.length>this.maxStringLength?t.slice(0,this.maxStringLength)+"...":t},t.prototype.truncateArray=function(t,e){void 0===e&&(e=0);for(var n=0,r=[],i=0;i<t.length;i++){var o=t[i];if(r.push(this.truncate(o,i.toString(),e)),++n>=this.maxArrayLength)break}return r},t.prototype.truncateObject=function(t,e){void 0===e&&(e=0);var n=0,r={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))if(c(i,this.keysBlocklist))r[i]="[Filtered]";else{var o=u(t,i);if(void 0!==o&&"function"!==typeof o&&(r[i]=this.truncate(o,i,e),++n>=this.maxObjectLength))break}return r},t}();function s(t,e){return void 0===e&&(e={}),new a(e).truncate(t)}function u(t,e){try{return t[e]}catch(n){return}}function c(t,e){for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i===t)return!0;if(i instanceof RegExp&&t.match(i))return!0}return!1}var l=function(){function t(t,e,n){this._dur=0,this._level=0,this._metric=t,this.name=e,this.startTime=n||new Date}return t.prototype.end=function(t){this.endTime=t||new Date,this._dur+=this.endTime.getTime()-this.startTime.getTime(),this._metric._incGroup(this.name,this._dur),this._metric=null},t.prototype._pause=function(){if(!this._paused()){var t=new Date;this._dur+=t.getTime()-this.startTime.getTime(),this.startTime=null}},t.prototype._resume=function(){this._paused()&&(this.startTime=new Date)},t.prototype._paused=function(){return null==this.startTime},t}(),h=function(){function t(){this._spans={},this._groups={},this.startTime=new Date}return t.prototype.end=function(t){this.endTime||(this.endTime=t||new Date)},t.prototype.isRecording=function(){return!0},t.prototype.startSpan=function(t,e){var n=this._spans[t];n?n._level++:(n=new l(this,t,e),this._spans[t]=n)},t.prototype.endSpan=function(t,e){var n=this._spans[t];n?n._level>0?n._level--:(n.end(e),delete this._spans[n.name]):console.error("airbrake: span=%s does not exist",t)},t.prototype._incGroup=function(t,e){this._groups[t]=(this._groups[t]||0)+e},t.prototype._duration=function(){return this.endTime||(this.endTime=new Date),this.endTime.getTime()-this.startTime.getTime()},t}(),f=function(){function t(){}return t.prototype.isRecording=function(){return!1},t.prototype.startSpan=function(t,e){},t.prototype.endSpan=function(t,e){},t.prototype._incGroup=function(t,e){},t}(),d=function(){return(d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},p=function(){function t(){this._noopMetric=new f,this._context={},this._historyMaxLen=20,this._history=[]}return t.prototype.clone=function(){var e=new t;return e._context=d({},this._context),e._history=this._history.slice(),e},t.prototype.setContext=function(t){this._context=d(d({},this._context),t)},t.prototype.context=function(){var t=d({},this._context);return this._history.length>0&&(t.history=this._history.slice()),t},t.prototype.pushHistory=function(t){this._isDupState(t)?this._lastRecord.num?this._lastRecord.num++:this._lastRecord.num=2:(t.date||(t.date=new Date),this._history.push(t),this._lastRecord=t,this._history.length>this._historyMaxLen&&(this._history=this._history.slice(-this._historyMaxLen)))},t.prototype._isDupState=function(t){if(!this._lastRecord)return!1;for(var e in t)if(t.hasOwnProperty(e)&&"date"!==e&&t[e]!==this._lastRecord[e])return!1;return!0},t.prototype.routeMetric=function(){return this._routeMetric||this._noopMetric},t.prototype.setRouteMetric=function(t){this._routeMetric=t},t.prototype.queueMetric=function(){return this._queueMetric||this._noopMetric},t.prototype.setQueueMetric=function(t){this._queueMetric=t},t}(),m=n(178),v=n.n(m);function g(t){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var y="object"===("undefined"===typeof console?"undefined":g(console))&&console.warn;function b(t){try{return v.a.parse(t)}catch(e){y&&t.stack&&console.warn("ErrorStackParser:",e.toString(),t.stack)}return t.fileName?[t]:[]}function _(t){var e=[];if(t.noStack)e.push({function:t.functionName||"",file:t.fileName||"",line:t.lineNumber||0,column:t.columnNumber||0});else{var n=b(t);if(0===n.length)try{throw new Error("fake")}catch(a){(n=b(a)).shift(),n.shift()}for(var r=0,i=n;r<i.length;r++){var o=i[r];e.push({function:o.functionName||"",file:o.fileName||"",line:o.lineNumber||0,column:o.columnNumber||0})}}return{type:t.name?t.name:"",message:t.message?String(t.message):String(t),backtrace:e}}var w=new RegExp(["^","\\[(\\$.+)\\]","\\s","([\\s\\S]+)","$"].join(""));function x(t){var e=t.errors[0];if(""!==e.type&&"Error"!==e.type)return t;var n=e.message.match(w);return null!==n&&(e.type=n[1],e.message=n[2]),t}var k=["Script error","Script error.","InvalidAccessError"];function S(t){var e=t.errors[0];if(""===e.type&&-1!==k.indexOf(e.message))return null;if(e.backtrace&&e.backtrace.length>0&&"<anonymous>"===e.backtrace[0].file)return null;return t}var C=new RegExp(["^","Uncaught\\s","(.+?)",":\\s","(.+)","$"].join(""));function M(t){var e=t.errors[0];if(""!==e.type&&"Error"!==e.type)return t;var n=e.message.match(C);return null!==n&&(e.type=n[1],e.message=n[2]),t}var E=n(179),T=n.n(E),A={unauthorized:new Error("airbrake: unauthorized: project id or key are wrong"),ipRateLimited:new Error("airbrake: IP is rate limited")},O=0;function P(t){if(Date.now()/1e3<O)return r.a.reject(A.ipRateLimited);var e={method:t.method,body:t.body};return T()(t.url,e).then((function(t){if(401===t.status)throw A.unauthorized;if(429===t.status){var e=t.headers.get("X-RateLimit-Delay");if(!e)throw A.ipRateLimited;var n=parseInt(e,10);throw n>0&&(O=Date.now()/1e3+n),A.ipRateLimited}if(204===t.status)return{json:null};if(404===t.status)throw new Error("404 Not Found");return t.status>=200&&t.status<300?t.json().then((function(t){return{json:t}})):t.status>=400&&t.status<500?t.json().then((function(t){throw new Error(t.message)})):t.text().then((function(e){throw new Error("airbrake: fetch: unexpected response: code="+t.status+" body='"+e+"'")}))}))}function L(t){return function(e){return function(t,e){if(Date.now()/1e3<D)return r.a.reject(A.ipRateLimited);return new r.a((function(n,r){e({url:t.url,method:t.method,body:t.body,headers:{"content-type":"application/json"},timeout:t.timeout},(function(t,e,i){if(t)r(t);else{if(!e.statusCode)return t=new Error("airbrake: request: response statusCode is "+e.statusCode),void r(t);if(401!==e.statusCode)if(429!==e.statusCode)if(204!==e.statusCode)if(e.statusCode>=200&&e.statusCode<300){var o=void 0;try{o=JSON.parse(i)}catch(c){return void r(c)}n(o)}else{if(e.statusCode>=400&&e.statusCode<500){o=void 0;try{o=JSON.parse(i)}catch(c){return void r(c)}return t=new Error(o.message),void r(t)}i=i.trim(),t=new Error("airbrake: node: unexpected response: code="+e.statusCode+" body='"+i+"'"),r(t)}else n({json:null});else{r(A.ipRateLimited);var a=e.headers["x-ratelimit-delay"];if(!a)return;var s=void 0;if("string"===typeof a)s=a;else{if(!(a instanceof Array))return;s=a[0]}var u=parseInt(s,10);u>0&&(D=Date.now()/1e3+u)}else r(A.unauthorized)}}))}))}(e,t)}}var D=0;function I(t){return t.request?L(t.request):P}var R,N,z=(R=function(t,e){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}R(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),j=!1;try{N=n(406),j=!0}catch(Cw){}var B=function(){function t(){this.count=0,this.sum=0,this.sumsq=0,this._td=new N.Digest}return t.prototype.add=function(t){0===t&&(t=1e-5),this.count+=1,this.sum+=t,this.sumsq+=t*t,this._td&&this._td.push(t)},t.prototype.toJSON=function(){return{count:this.count,sum:this.sum,sumsq:this.sumsq,tdigestCentroids:q(this._td)}},t}(),F=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.groups={},e}return z(e,t),e.prototype.addGroups=function(t,e){for(var n in this.add(t),e)e.hasOwnProperty(n)&&this.addGroup(n,e[n])},e.prototype.addGroup=function(t,e){var n=this.groups[t];n||(n=new B,this.groups[t]=n),n.add(e)},e.prototype.toJSON=function(){return{count:this.count,sum:this.sum,sumsq:this.sumsq,tdigestCentroids:q(this._td),groups:this.groups}},e}(B);function q(t){var e=[],n=[];return t.centroids.each((function(t){e.push(t.mean),n.push(t.n)})),{mean:e,count:n}}var V=function(){return(V=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},U=function(){function t(t){void 0===t&&(t=""),this.method="",this.route="",this.query="",this.func="",this.file="",this.line=0,this.startTime=new Date,this.query=t}return t.prototype._duration=function(){return this.endTime||(this.endTime=new Date),this.endTime.getTime()-this.startTime.getTime()},t}(),H=function(){function t(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/queries-stats?key="+t.projectKey,this._requester=I(t)}return t.prototype.start=function(t){return void 0===t&&(t=""),new U(t)},t.prototype.notify=function(t){var e=this;if(j){var n=t._duration(),r=new Date(6e4*Math.floor(t.startTime.getTime()/6e4)),i={method:t.method,route:t.route,query:t.query,func:t.func,file:t.file,line:t.line,time:r},o=JSON.stringify(i),a=this._m[o];a||(a=new B,this._m[o]=a),a.add(n),this._timer||(this._timer=setTimeout((function(){e._flush()}),15e3))}},t.prototype._flush=function(){var t=[];for(var e in this._m)if(this._m.hasOwnProperty(e)){var n=JSON.parse(e),r=V(V({},n),this._m[e].toJSON());t.push(r)}this._m={},this._timer=null;var i=JSON.stringify({environment:this._opt.environment,queries:t}),o={method:"POST",url:this._url,body:i};this._requester(o).then((function(t){})).catch((function(t){console.error&&console.error("can not report queries stats",t)}))},t}(),W=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(){return($=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Z=function(t){function e(e){var n=t.call(this)||this;return n.queue=e,n.startTime=new Date,n}return W(e,t),e}(h),Y=function(){function t(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/queues-stats?key="+t.projectKey,this._requester=I(t)}return t.prototype.notify=function(t){var e=this;if(j){var n=t._duration();0===n&&(n=1e-5);var r=new Date(6e4*Math.floor(t.startTime.getTime()/6e4)),i={queue:t.queue,time:r},o=JSON.stringify(i),a=this._m[o];a||(a=new F,this._m[o]=a),a.addGroups(n,t._groups),this._timer||(this._timer=setTimeout((function(){e._flush()}),15e3))}},t.prototype._flush=function(){var t=[];for(var e in this._m)if(this._m.hasOwnProperty(e)){var n=JSON.parse(e),r=$($({},n),this._m[e].toJSON());t.push(r)}this._m={},this._timer=null;var i=JSON.stringify({environment:this._opt.environment,queues:t}),o={method:"POST",url:this._url,body:i};this._requester(o).then((function(t){})).catch((function(t){console.error&&console.error("can not report queues breakdowns",t)}))},t}(),G=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(){return(K=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},J=function(t){function e(e,n,r,i){void 0===e&&(e=""),void 0===n&&(n=""),void 0===r&&(r=0),void 0===i&&(i="");var o=t.call(this)||this;return o.method=e,o.route=n,o.statusCode=r,o.contentType=i,o.startTime=new Date,o}return G(e,t),e}(h),X=function(){function t(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/routes-stats?key="+t.projectKey,this._requester=I(t)}return t.prototype.notify=function(t){var e=this;if(j){var n=t._duration(),r=new Date(6e4*Math.floor(t.startTime.getTime()/6e4)),i={method:t.method,route:t.route,statusCode:t.statusCode,time:r},o=JSON.stringify(i),a=this._m[o];a||(a=new B,this._m[o]=a),a.add(n),this._timer||(this._timer=setTimeout((function(){e._flush()}),15e3))}},t.prototype._flush=function(){var t=[];for(var e in this._m)if(this._m.hasOwnProperty(e)){var n=JSON.parse(e),r=K(K({},n),this._m[e].toJSON());t.push(r)}this._m={},this._timer=null;var i=JSON.stringify({environment:this._opt.environment,routes:t}),o={method:"POST",url:this._url,body:i};this._requester(o).then((function(t){})).catch((function(t){console.error&&console.error("can not report routes stats",t)}))},t}(),Q=function(){function t(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/routes-breakdowns?key="+t.projectKey,this._requester=I(t)}return t.prototype.notify=function(t){var e=this;if(j&&!(t.statusCode<200||t.statusCode>=300&&t.statusCode<400||404===t.statusCode||0===Object.keys(t._groups).length)){var n=t._duration();0===n&&(n=1e-5);var r=new Date(6e4*Math.floor(t.startTime.getTime()/6e4)),i={method:t.method,route:t.route,responseType:this._responseType(t),time:r},o=JSON.stringify(i),a=this._m[o];a||(a=new F,this._m[o]=a),a.addGroups(n,t._groups),this._timer||(this._timer=setTimeout((function(){e._flush()}),15e3))}},t.prototype._flush=function(){var t=[];for(var e in this._m)if(this._m.hasOwnProperty(e)){var n=JSON.parse(e),r=K(K({},n),this._m[e].toJSON());t.push(r)}this._m={},this._timer=null;var i=JSON.stringify({environment:this._opt.environment,routes:t}),o={method:"POST",url:this._url,body:i};this._requester(o).then((function(t){})).catch((function(t){console.error&&console.error("can not report routes breakdowns",t)}))},t.prototype._responseType=function(t){return t.statusCode>=500?"5xx":t.statusCode>=400?"4xx":t.contentType?t.contentType.split(";")[0].split("/")[-1]:""},t}();function tt(t){return(tt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var et=function(){return(et=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},nt=function(){function t(t){var e,n,r=this;if(this._filters=[],this._performanceFilters=[],this._scope=new p,this._onClose=[],!t.projectId||!t.projectKey)throw new Error("airbrake: projectId and projectKey are required");this._opt=t,this._opt.host=this._opt.host||"https://api.airbrake.io",this._opt.timeout=this._opt.timeout||1e4,this._opt.keysBlocklist=this._opt.keysBlocklist||this._opt.keysBlacklist||[/password/,/secret/],this._url=this._opt.host+"/api/v3/projects/"+this._opt.projectId+"/notices?key="+this._opt.projectKey,this._processor=this._opt.processor||_,this._requester=I(this._opt),this.addFilter(S),this.addFilter((function(t){var r=JSON.stringify(t.errors);return r===e?null:(n&&clearTimeout(n),e=r,n=setTimeout((function(){e=""}),1e3),t)})),this.addFilter(M),this.addFilter(x),this.addFilter((function(t){return t.context.notifier={name:"airbrake-js/browser",version:"1.4.2",url:"https://github.com/airbrake/airbrake-js/tree/master/packages/browser"},r._opt.environment&&(t.context.environment=r._opt.environment),t})),this.routes=new rt(this),this.queues=new it(this),this.queries=new H(this._opt)}return t.prototype.close=function(){for(var t=0,e=this._onClose;t<e.length;t++){(0,e[t])()}},t.prototype.scope=function(){return this._scope},t.prototype.setActiveScope=function(t){this._scope=t},t.prototype.addFilter=function(t){this._filters.push(t)},t.prototype.addPerformanceFilter=function(t){this._performanceFilters.push(t)},t.prototype.notify=function(t){var e={errors:[],context:et(et({severity:"error"},this.scope().context()),t.context),params:t.params||{},environment:t.environment||{},session:t.session||{}};if("object"===tt(t)&&void 0!==t.error||(t={error:t}),!t.error)return e.error=new Error("airbrake: got err="+JSON.stringify(t.error)+", wanted an Error"),r.a.resolve(e);var n=this._processor(t.error);e.errors.push(n);for(var i=0,o=this._filters;i<o.length;i++){var a=(0,o[i])(e);if(null===a)return e.error=new Error("airbrake: error is filtered"),r.a.resolve(e);e=a}return e.context||(e.context={}),e.context.language="JavaScript",this._sendNotice(e)},t.prototype._sendNotice=function(t){var e=function(t,e){var n=void 0===e?{}:e,r=n.maxLength,i=void 0===r?64e3:r,o=n.keysBlocklist,u=void 0===o?[]:o;if(t.errors)for(var c=0;c<t.errors.length;c++){var l=new a({keysBlocklist:u});t.errors[c]=l.truncate(t.errors[c])}for(var h="",f=["context","params","environment","session"],d=0;d<8;d++){for(var p={level:d,keysBlocklist:u},m=0,v=f;m<v.length;m++)(w=t[_=v[m]])&&(t[_]=s(w,p));if((h=JSON.stringify(t)).length<i)return h}var g={json:h.slice(0,Math.floor(i/2))+"..."};f.push("errors");for(var y=0,b=f;y<b.length;y++){var _,w;(w=t[_=b[y]])&&(h=JSON.stringify(w),g[_]=h.length)}var x=new Error("airbrake: notice exceeds max length and can't be truncated");throw x.params=g,x}(t,{keysBlocklist:this._opt.keysBlocklist});if(this._opt.reporter){if("function"===typeof this._opt.reporter)return this._opt.reporter(t);console.warn("airbrake: options.reporter must be a function")}var n={method:"POST",url:this._url,body:e};return this._requester(n).then((function(e){return t.id=e.json.id,t.url=e.json.url,t})).catch((function(e){return t.error=e,t}))},t.prototype.wrap=function(t,e){if(void 0===e&&(e=[]),t._airbrake)return t;var n=this,r=function(){var e=Array.prototype.slice.call(arguments),r=n._wrapArguments(e);try{return t.apply(this,r)}catch(Cw){throw n.notify({error:Cw,params:{arguments:e}}),this._ignoreNextWindowError(),Cw}};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);for(var o=0,a=e;o<a.length;o++){i=a[o];t.hasOwnProperty(i)&&(r[i]=t[i])}return r._airbrake=!0,r.inner=t,r},t.prototype._wrapArguments=function(t){for(var e=0;e<t.length;e++){var n=t[e];"function"===typeof n&&(t[e]=this.wrap(n))}return t},t.prototype._ignoreNextWindowError=function(){},t.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.wrap(t);return r.apply(this,Array.prototype.slice.call(arguments,1))},t}(),rt=function(){function t(t){this._notifier=t,this._routes=new X(t._opt),this._breakdowns=new Q(t._opt)}return t.prototype.start=function(t,e,n,r){void 0===t&&(t=""),void 0===e&&(e=""),void 0===n&&(n=0),void 0===r&&(r="");var i=new J(t,e,n,r),o=this._notifier.scope().clone();return o.setContext({httpMethod:t,route:e}),o.setRouteMetric(i),this._notifier.setActiveScope(o),i},t.prototype.notify=function(t){t.end();for(var e=0,n=this._notifier._performanceFilters;e<n.length;e++){if(null===(0,n[e])(t))return}this._routes.notify(t),this._breakdowns.notify(t)},t}(),it=function(){function t(t){this._notifier=t,this._queues=new Y(t._opt)}return t.prototype.start=function(t){var e=new Z(t),n=this._notifier.scope().clone();return n.setContext({queue:t}),n.setQueueMetric(e),this._notifier.setActiveScope(n),e},t.prototype.notify=function(t){t.end(),this._queues.notify(t)},t}();function ot(t){return window.navigator&&window.navigator.userAgent&&(t.context.userAgent=window.navigator.userAgent),window.location&&(t.context.url=String(window.location),t.context.rootDirectory=window.location.protocol+"//"+window.location.host),t}var at=["debug","log","info","warn","error"];function st(t){return(st="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ut=["type","name","src"];function ct(t){var e=function(t){return function(e){var n=ht(e,"target");if(n){var r={type:e.type};try{r.target=function(t){var e=10,n=[],r=t;for(;r;){var i=lt(r);if(""!==i&&(n.push(i),n.length>e))break;r=r.parentNode}if(0===n.length)return String(t);return n.reverse().join(" > ")}(n)}catch(Cw){r.target="<"+String(Cw)+">"}t.scope().pushHistory(r)}}}(t);window.addEventListener&&(window.addEventListener("load",e),window.addEventListener("error",(function(t){ht(t,"error")||e(t)}),!0)),"object"===("undefined"===typeof document?"undefined":st(document))&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",e),document.addEventListener("click",e),document.addEventListener("keypress",e))}function lt(t){if(!t)return"";var e=[];if(t.tagName&&e.push(t.tagName.toLowerCase()),t.id&&(e.push("#"),e.push(t.id)),t.classList&&Array.from)e.push("."),e.push(Array.from(t.classList).join("."));else if(t.className){var n=function(t){if(t.split)return t.split(" ").join(".");if(t.baseVal&&t.baseVal.split)return t.baseVal.split(" ").join(".");return console.error("unsupported HTMLElement.className type",st(t)),""}(t.className);""!==n&&(e.push("."),e.push(n))}if(t.getAttribute)for(var r=0,i=ut;r<i.length;r++){var o=i[r],a=t.getAttribute(o);a&&e.push("["+o+'="'+a+'"]')}return e.join("")}function ht(t,e){try{return t[e]}catch(n){return null}}var ft="";function dt(){return document.location&&document.location.pathname}function pt(t,e){var n=e.indexOf("://");n>=0?(n=(e=e.slice(n+3)).indexOf("/"),e=n>=0?e.slice(n):"/"):"/"!==e.charAt(0)&&(e="/"+e),t.scope().pushHistory({type:"location",from:ft,to:e}),ft=e}function mt(t){return(mt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var vt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gt=function(){return(gt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},yt=function(t){function e(e){var n=t.call(this,e)||this;return n.offline=!1,n.todo=[],n._ignoreWindowError=0,n._ignoreNextXHR=0,"undefined"===typeof window||(n.addFilter(ot),window.addEventListener&&(n.onOnline=n.onOnline.bind(n),window.addEventListener("online",n.onOnline),n.onOffline=n.onOffline.bind(n),window.addEventListener("offline",n.onOffline),n.onUnhandledrejection=n.onUnhandledrejection.bind(n),window.addEventListener("unhandledrejection",n.onUnhandledrejection),n._onClose.push((function(){window.removeEventListener("online",n.onOnline),window.removeEventListener("offline",n.onOffline),window.removeEventListener("unhandledrejection",n.onUnhandledrejection)}))),n._opt.ignoreWindowError&&(e.instrumentation.onerror=!1),n._instrument(e.instrumentation)),n}return vt(e,t),e.prototype._instrument=function(t){var e,n,r;if(void 0===t&&(t={}),void 0===t.console&&(t.console=!((e=this._opt.environment)&&e.startsWith&&e.startsWith("dev"))),bt(t.onerror)){var i=this,o=window.onerror;window.onerror=function(){o&&o.apply(this,arguments),i.onerror.apply(i,arguments)}}ct(this),bt(t.fetch)&&"function"===typeof fetch&&(n=this,r=window.fetch,window.fetch=function(t,e){var i={type:"xhr",date:new Date};return i.method=e&&e.method?e.method:"GET","string"===typeof t?i.url=t:(i.method=t.method,i.url=t.url),n._ignoreNextXHR++,setTimeout((function(){return n._ignoreNextXHR--})),r.apply(this,arguments).then((function(t){return i.statusCode=t.status,i.duration=(new Date).getTime()-i.date.getTime(),n.scope().pushHistory(i),t})).catch((function(t){throw i.error=t,i.duration=(new Date).getTime()-i.date.getTime(),n.scope().pushHistory(i),t}))}),bt(t.history)&&"object"===("undefined"===typeof history?"undefined":mt(history))&&function(t){ft=dt();var e=window.onpopstate;window.onpopstate=function(n){var r=dt();if(r&&pt(t,r),e)return e.apply(this,arguments)};var n=history.pushState;history.pushState=function(e,r,i){i&&pt(t,i.toString()),n.apply(this,arguments)}}(this),bt(t.console)&&"object"===("undefined"===typeof console?"undefined":mt(console))&&function(t){for(var e=function(e){if(!(e in console))return"continue";var n=console[e],r=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];n.apply(console,r),t.scope().pushHistory({type:"log",severity:e,arguments:r})};r.inner=n,console[e]=r},n=0,r=at;n<r.length;n++)e(r[n])}(this),bt(t.xhr)&&"undefined"!==typeof XMLHttpRequest&&function(t){function e(e){var n=e.__state;n.statusCode=e.status,n.duration=(new Date).getTime()-n.date.getTime(),t.scope().pushHistory(n)}var n=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(e,r,i,o,a){0===t._ignoreNextXHR&&(this.__state={type:"xhr",method:e,url:r}),n.apply(this,arguments)};var r=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(t){var n=this.onreadystatechange;return this.onreadystatechange=function(t){if(4===this.readyState&&this.__state&&e(this),n)return n.apply(this,arguments)},this.__state&&(this.__state.date=new Date),r.apply(this,arguments)}}(this)},e.prototype.notify=function(e){var n=this;return this.offline?new r.a((function(t,r){for(n.todo.push({err:e,resolve:t,reject:r});n.todo.length>100;){var i=n.todo.shift();if(void 0===i)break;i.resolve({error:new Error("airbrake: offline queue is too large")})}})):t.prototype.notify.call(this,e)},e.prototype.onOnline=function(){this.offline=!1;for(var t=function(t){e.notify(t.err).then((function(e){t.resolve(e)}))},e=this,n=0,r=this.todo;n<r.length;n++){t(r[n])}this.todo=[]},e.prototype.onOffline=function(){this.offline=!0},e.prototype.onUnhandledrejection=function(t){var e=t.reason||t.detail&&t.detail.reason;if(e){var n=e.message||String(e);n.indexOf&&0===n.indexOf("airbrake: ")||("object"===mt(e)&&void 0!==e.error?this.notify(gt(gt({},e),{context:{unhandledRejection:!0}})):this.notify({error:e,context:{unhandledRejection:!0}}))}},e.prototype.onerror=function(t,e,n,r,i){this._ignoreWindowError>0||(i?this.notify({error:i,context:{windowError:!0}}):e&&n&&this.notify({error:{message:t,fileName:e,lineNumber:n,columnNumber:r,noStack:!0},context:{windowError:!0}}))},e.prototype._ignoreNextWindowError=function(){var t=this;this._ignoreWindowError++,setTimeout((function(){return t._ignoreWindowError--}))},e}(nt);function bt(t){return void 0===t||!0===t}n(162);var _t,wt=n(43).a.start(),xt=n(410);function kt(t){var e=t.editorEl.querySelector('[data-target="storage-key"]');if(!e)throw new Error("No encuentro la llave para guardar los art\xedculos");return e.value}function St(t){window.localStorage.removeItem(t)}wt.load((_t=xt).keys().map((function(t){return function(t,e){var n=function(t){var e=(t.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(e)return e.replace(/_/g,"-").replace(/\//g,"--")}(e);if(n)return function(t,e){var n=t.default;if("function"==typeof n)return{identifier:e,controllerConstructor:n}}(t(e),n)}(_t,t)})).filter((function(t){return t})));var Ct=["paragraph","h1","h2","h3","h4","h5","h6","unordered_list","ordered_list","blockquote"],Mt=["bold","italic","deleted","underline","sub","super","mark","link","small"];function Et(t,e,n){for(;t.firstChild;)e.insertBefore(t.firstChild,n)}function Tt(t){var e=window.getSelection();return e&&t.contentEl.contains(e.anchorNode)&&t.contentEl.contains(e.focusNode)&&e.anchorNode!=t.contentEl&&e.focusNode!=t.contentEl?e:null}function At(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;try{return t.getRangeAt(e)}catch(n){return null}}function Ot(t,e){for(var n=0,r=Object.values(t.toolbar.auxiliary);n<r.length;n++){delete r[n].parentEl.dataset.editorAuxiliaryActive}e&&(e.dataset.editorAuxiliaryActive="active")}function Pt(t){var e=t.contentEl.querySelector("[data-editor-selected]");e&&delete e.dataset.editorSelected}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Dt,It={selector:"a",allowedChildren:[].concat((Dt=Mt.filter((function(t){return"link"!==t})),function(t){if(Array.isArray(t))return Lt(t)}(Dt)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(Dt)||function(t,e){if(t){if("string"===typeof t)return Lt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(t,e):void 0}}(Dt)||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.")}()),["text"]),handleEmpty:"remove",create:function(){return document.createElement("a")},onClick:function(t,e){if(!(e instanceof HTMLAnchorElement))throw new Error("oh no");!function(t,e){Pt(t),e.dataset.editorSelected="",t.toolbar.auxiliary.link.urlEl.value=e.href,Ot(t,t.toolbar.auxiliary.link.parentEl)}(t,e)}};function Rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Nt=function(t){return("0"+parseInt(t).toString(16)).slice(-2)};function zt(t){var e=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!e)throw new Error("no pude parsear el rgb()");return"#"+Nt(e[1])+Nt(e[2])+Nt(e[3])}var jt={selector:"mark",allowedChildren:[].concat(function(t){return function(t){if(Array.isArray(t))return Rt(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return Rt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rt(t,e)}(t)||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.")}()}(Mt.filter((function(t){return"mark"!==t}))),["text"]),handleEmpty:"remove",create:function(){return document.createElement("mark")},onClick:function(t,e){if(!(e instanceof HTMLElement))throw new Error("oh no");!function(t,e){Pt(t),e.dataset.editorSelected="",t.toolbar.auxiliary.mark.colorEl.value=e.style.backgroundColor?zt(e.style.backgroundColor):"#f206f9",t.toolbar.auxiliary.mark.textColorEl.value=e.style.color?zt(e.style.color):"#000000",Ot(t,t.toolbar.auxiliary.mark.parentEl)}(t,e)}};function Bt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(Cw){i=!0,o=Cw}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||qt(t,e)||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 Ft(t){return function(t){if(Array.isArray(t))return Vt(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||qt(t)||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 qt(t,e){if(t){if("string"===typeof t)return Vt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vt(t,e):void 0}}function Vt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ut(t,e){return{selector:e,allowedChildren:[].concat(Ft(Mt.filter((function(e){return e!==t}))),["text"]),handleEmpty:"remove",create:function(){return document.createElement(e)}}}var Ht={bold:Ut("bold","strong"),italic:Ut("italic","em"),deleted:Ut("deleted","del"),underline:Ut("underline","u"),sub:Ut("sub","sub"),super:Ut("super","sup"),mark:jt,link:It,small:Ut("small","small")};function Wt(t,e,n){for(var r=[],i=0,o=Ft(t.children);i<o.length;i++){var a=o[i];a.matches(n)&&e.containsNode(a)&&r.push(a),r=[].concat(Ft(r),Ft(Wt(a,e,n)))}return r}function $t(t){for(var e=function(){var e=r[n],o=(i=Bt(e,2))[0],a=i[1],s=t.toolbarEl.querySelector('[data-editor-button="mark-'.concat(o,'"]'));if(!s)return"continue";s.addEventListener("click",(function(e){e.preventDefault();var n=Tt(t);if(n){var r=At(n);if(r){for(var i=r.commonAncestorContainer;!(i instanceof Element);){if(!i.parentElement)return;i=i.parentElement}var o=Wt(i,n,a.selector);if(console.debug("marks encontradas:",o),o.length>0){var s=o[0];if(!s.parentElement)throw new Error(":/");Et(s,s.parentElement,s),s.parentElement.removeChild(s)}else{if(r.commonAncestorContainer===t.contentEl)return console.error("No puedo marcar cosas a trav\xe9s de distintos bloques!");var u=a.create(t);a.onClick&&a.onClick(t,u),u.appendChild(r.extractContents()),r.insertNode(u),r.selectNode(u)}return!1}}}))},n=0,r=Object.entries(Ht);n<r.length;n++){var i;e()}}function Zt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(Cw){i=!0,o=Cw}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||Xt(t,e)||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 Yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Gt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(n),!0).forEach((function(e){Kt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Kt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jt(t){return function(t){if(Array.isArray(t))return Qt(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Xt(t)||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 Xt(t,e){if(t){if("string"===typeof t)return Qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qt(t,e):void 0}}function Qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function te(t){return{selector:t,allowedChildren:[].concat(Jt(Mt),["text"]),handleEmpty:"do-nothing",create:function(){return document.createElement(t)}}}var ee=te("li"),ne=te("p"),re={paragraph:ne,h1:te("h1"),h2:te("h2"),h3:te("h3"),h4:te("h4"),h5:te("h5"),h6:te("h6"),unordered_list:Gt(Gt({},te("ul")),{},{allowedChildren:["li"],handleEmpty:ee}),ordered_list:Gt(Gt({},te("ol")),{},{allowedChildren:["li"],handleEmpty:ee}),blockquote:Gt(Gt({},te("blockquote")),{},{allowedChildren:Ct,handleEmpty:ne})};function ie(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(Cw){i=!0,o=Cw}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||ae(t,e)||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 oe(t){return function(t){if(Array.isArray(t))return se(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||ae(t)||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 ae(t,e){if(t){if("string"===typeof t)return se(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?se(t,e):void 0}}function se(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ue(t,e){return{selector:t,allowedChildren:[].concat(oe(Ct),["multimedia"]),handleEmpty:"remove",create:e}}var ce={left:ue("div[data-align=left]",(function(){var t=document.createElement("div");return t.dataset.align="left",t.style.textAlign="left",t})),center:ue("div[data-align=center]",(function(){var t=document.createElement("div");return t.dataset.align="center",t.style.textAlign="center",t})),right:ue("div[data-align=right]",(function(){var t=document.createElement("div");return t.dataset.align="right",t.style.textAlign="right",t}))};var le=n(85);function he(t,e){switch(t.tagName){case"VIDEO":case"AUDIO":t.setAttribute("aria-label",e);break;case"IMG":t.alt=e;break;case"IFRAME":t.title=e;break;default:throw new Error("no pude setear el alt")}}function fe(t,e){Pt(t),e.dataset.editorSelected="";var n=e.querySelector("[data-multimedia-inner]");if(!n)throw new Error("No hay multimedia v\xe1lida");"P"===n.tagName?(t.toolbar.auxiliary.multimedia.altEl.value="",t.toolbar.auxiliary.multimedia.altEl.disabled=!0):(t.toolbar.auxiliary.multimedia.altEl.value=function(t){switch(t.tagName){case"VIDEO":case"AUDIO":return t.getAttribute("aria-label");case"IMG":return t.alt;case"IFRAME":return t.title;default:throw new Error("no pude conseguir el alt")}}(n)||"",t.toolbar.auxiliary.multimedia.altEl.disabled=!1),Ot(t,t.toolbar.auxiliary.multimedia.parentEl)}var de={selector:"figure[data-multimedia]",allowedChildren:"ignore-children",handleEmpty:"remove",create:function(){var t=document.createElement("figure");t.dataset.multimedia="",t.contentEditable="false";var e=document.createElement("p");e.dataset.multimediaInner="",e.append("\xa1Clickeame para subir un archivo!"),t.appendChild(e);var n=document.createElement("figcaption");return n.contentEditable="true",n.append("Escrib\xed ac\xe1 la descripci\xf3n del archivo."),t.appendChild(n),t},onClick:function(t,e){if(!(e instanceof HTMLElement))throw new Error("oh no");fe(t,e)}};function pe(t){t.toolbar.auxiliary.multimedia.uploadEl.addEventListener("click",(function(e){var n=t.toolbar.auxiliary.multimedia.fileEl.files;if(n&&n.length){var r=n[0],i=t.contentEl.querySelector("figure[data-editor-selected]");if(!i)throw new Error("No pude encontrar el elemento para setear el archivo");i.dataset.editorLoading="",function(t){return new Promise((function(e,n){new le.DirectUpload(t,origin+"/rails/active_storage/direct_uploads").create((function(t,r){if(t)n(t);else{var i="".concat(origin,"/rails/active_storage/blobs/").concat(r.signed_id,"/").concat(r.filename);e(i)}}))}))}(r).then((function(e){var n=i.querySelector("[data-multimedia-inner]");if(!n)throw new Error("No hay multimedia a reemplazar");var o=function(t,e){if(e.match(/^image\/.+$/)){var n=document.createElement("img");return n.dataset.multimediaInner="",n.src=t,n}if(e.match(/^video\/.+$/)){var r=document.createElement("video");return r.controls=!0,r.dataset.multimediaInner="",r.src=t,r}if(e.match(/^audio\/.+$/)){var i=document.createElement("audio");return i.controls=!0,i.dataset.multimediaInner="",i.src=t,i}if(e.match(/^application\/pdf$/)){var o=document.createElement("iframe");return o.dataset.multimediaInner="",o.src=t,o}throw new Error("Tipo de archivo no reconocido")}(e,r.type);he(o,t.toolbar.auxiliary.multimedia.altEl.value),i.replaceChild(o,n),fe(t,i),delete i.dataset.editorError})).catch((function(t){console.error(t),i.dataset.editorError=""})).finally((function(){delete i.dataset.editorLoading}))}else console.info("no hay archivos para subir")})),t.toolbar.auxiliary.multimedia.removeEl.addEventListener("click",(function(e){var n,r=t.contentEl.querySelector("figure[data-editor-selected]");if(!r)throw new Error("No pude encontrar el elemento para borrar");null===(n=r.parentElement)||void 0===n||n.removeChild(r),Ot(t,null)})),t.toolbar.auxiliary.multimedia.altEl.addEventListener("input",(function(e){var n=t.contentEl.querySelector("figure[data-editor-selected]");if(!n)throw new Error("No pude encontrar el multimedia para setear el alt");var r=n.querySelector("[data-multimedia-inner]");if(!r)throw new Error("No hay multimedia a para setear el alt");he(r,t.toolbar.auxiliary.multimedia.altEl.value)})),t.toolbar.auxiliary.multimedia.altEl.addEventListener("keydown",(function(t){13==t.keyCode&&t.preventDefault()}))}function me(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(Cw){i=!0,o=Cw}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||ge(t,e)||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 ve(t){return function(t){if(Array.isArray(t))return ye(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||ge(t)||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 ge(t,e){if(t){if("string"===typeof t)return ye(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(t,e):void 0}}function ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function be(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _e(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?be(Object(n),!0).forEach((function(e){we(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function we(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xe=_e(_e(_e(_e({},Ht),re),{},{li:ee},ce),{},{contentEl:{selector:".editor-content",allowedChildren:[].concat(ve(Ct),ve(["left","center","right"]),["multimedia"]),handleEmpty:re.paragraph,create:function(){throw new Error("se intent\xf3 crear contentEl")}},br:{selector:"br",allowedChildren:[],handleEmpty:"do-nothing",create:function(){throw new Error("se intent\xf3 crear br")}},multimedia:de});function ke(t){for(var e=0,n=Object.entries(xe);e<n.length;e++){var r=me(n[e],2),i=r[0],o=r[1];if(t.matches(o.selector))return{typeName:i,type:o}}return null}function Se(t){var e=Tt(t.editor);if(!e)throw new Error("No se donde insertar esto");if(!At(e))throw new Error("No se donde insertar esto");var n=[];if(!e.anchorNode)throw new Error("No se donde insertar esto");if(e.anchorNode instanceof Element)n=[e.anchorNode];else{if(!e.anchorNode.parentElement)throw new Error("No se donde insertar esto");n=[e.anchorNode.parentElement]}for(;;){var r=n[0];if(!t.editor.contentEl.contains(r)&&r!=t.editor.contentEl)throw new Error("No se donde insertar esto");var i=ke(r);if(i&&i.type.allowedChildren instanceof Array&&i.type.allowedChildren.includes(t.type))break;if(!r.parentElement)throw new Error("No se donde insertar esto");n=[r.parentElement].concat(ve(n))}return n}function Ce(t,e){if("ignore-children"===e.allowedChildren)throw new Error("se llam\xf3 a getValidChildren con un type que no lo permite!");return ve(t.childNodes).filter((function(t){var n;if(t.nodeType===Node.TEXT_NODE)return e.allowedChildren.includes("text")&&(null===(n=t.textContent)||void 0===n?void 0:n.length);if(!(t instanceof Element))return!1;var r=ke(t);return!!r&&e.allowedChildren.includes(r.typeName)}))}function Me(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Te(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ee(t){return function(t){if(Array.isArray(t))return Ae(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Te(t)||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 Te(t,e){if(t){if("string"===typeof t)return Ae(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(t,e):void 0}}function Ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Oe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.contentEl;if("SCRIPT"!==e.tagName&&"STYLE"!==e.tagName){if("I"===e.tagName){var n,r=document.createElement("em");Et(e,r,null),null===(n=e.parentElement)||void 0===n||n.replaceChild(r,e),e=r}if("B"===e.tagName){var i,o=document.createElement("strong");Et(e,o,null),null===(i=e.parentElement)||void 0===i||i.replaceChild(o,e),e=o}if(e instanceof HTMLImageElement){e.dataset.multimediaInner="";var a=xe.multimedia.create(t),s=e.parentElement;if(!s)throw new Error("No encontr\xe9 lx objetivo");for(;;){var u=ke(s);if(!u)throw new Error("lx objetivo tiene tipo");if(u.type.allowedChildren.includes("multimedia"))break;if(!s.parentElement)throw new Error("No encontr\xe9 lx objetivo");s=s.parentElement}var c=Ee(s.childNodes).find((function(t){return t.contains(e)}));if(!c)throw new Error("no encontr\xe9 lx pariente");s.insertBefore(a,c);var l=a.querySelector("[data-multimedia-inner]");if(!l)throw new Error("Raro.");a.replaceChild(e,l),e=a}var h=ke(e);if(h){h.typeName;var f=h.type;if("ignore-children"!==f.allowedChildren){var d=Tt(t),p=d&&At(d);if(0==Ce(e,f).length&&"string"!==typeof f.handleEmpty){var m=f.handleEmpty.create(t);Et(e,m,null),e.appendChild(m),null!==p&&void 0!==p&&p.intersectsNode(e)&&(null===d||void 0===d||d.collapse(m))}var v,g=Me(e.childNodes);try{for(g.s();!(v=g.n()).done;){var y=v.value;y instanceof Element&&Oe(t,y)}}catch(Cw){g.e(Cw)}finally{g.f()}}}}else{var b;null===(b=e.parentElement)||void 0===b||b.removeChild(e)}}function Pe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.contentEl,n=ke(e);if(n){var r=n.type;if("ignore-children"!==r.allowedChildren){var i,o=Me(e.childNodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a.nodeType!==Node.TEXT_NODE||r.allowedChildren.includes("text")){if(a instanceof Element){var s=ke(a);if("br"!==(null===s||void 0===s?void 0:s.typeName)){if(!s||!r.allowedChildren.includes(s.typeName))return Et(a,e,a),void e.removeChild(a);Pe(t,a)}}}else e.removeChild(a)}}catch(Cw){o.e(Cw)}finally{o.f()}var u,c=Ce(e,r).length,l=Tt(t);l&&At(l);if("remove"===r.handleEmpty&&0==c)return void(null===(u=e.parentNode)||void 0===u||u.removeChild(e))}}else{var h;null===(h=e.parentElement)||void 0===h||h.removeChild(e)}}function Le(t){try{Oe(t),Pe(t),function(t){0!==t.contentEl.innerText.trim().length&&window.localStorage.setItem(kt(t),t.contentEl.innerHTML)}(t),t.htmlEl.value=t.contentEl.innerHTML}catch(e){console.error("Hubo un problema corriendo la rutina",t,e)}}function De(t,e){var n=t.querySelector(e);if(!n)throw new Error("No pude encontrar un componente `".concat(e,"`"));return n}function Ie(t){document.execCommand("defaultParagraphSeparator",!1,"p");var e={editorEl:t,toolbarEl:De(t,".editor-toolbar"),toolbar:{auxiliary:{mark:{parentEl:De(t,"[data-editor-auxiliary=mark]"),colorEl:De(t,"[data-editor-auxiliary=mark] [name=mark-color]"),textColorEl:De(t,"[data-editor-auxiliary=mark] [name=mark-text-color]")},multimedia:{parentEl:De(t,"[data-editor-auxiliary=multimedia]"),fileEl:De(t,"[data-editor-auxiliary=multimedia] [name=multimedia-file]"),uploadEl:De(t,"[data-editor-auxiliary=multimedia] [name=multimedia-file-upload]"),altEl:De(t,"[data-editor-auxiliary=multimedia] [name=multimedia-alt]"),removeEl:De(t,"[data-editor-auxiliary=multimedia] [name=multimedia-remove]")},link:{parentEl:De(t,"[data-editor-auxiliary=link]"),urlEl:De(t,"[data-editor-auxiliary=link] [name=link-url]")}}},contentEl:De(t,".editor-content"),wordAlertEl:De(t,".editor-aviso-word"),htmlEl:De(t,"textarea")};console.debug("iniciando editor",e),function(t){var e=window.localStorage.getItem(kt(t));e&&0!==e.trim().length&&(t.contentEl.innerHTML=e)}(e),e.contentEl.addEventListener("paste",(function(){e.wordAlertEl.style.display="block"})),new MutationObserver((function(){return Le(e)})).observe(e.contentEl,{childList:!0,attributes:!0,subtree:!0,characterData:!0}),document.addEventListener("selectionchange",(function(){return Le(e)})),e.contentEl.addEventListener("click",(function(t){var n=t.target,r=ke(n);return r&&r.type.onClick?(r.type.onClick(e,n),!1):(Ot(e,null),Pt(e),!0)}),!0);var n=e.contentEl.querySelector("[data-editor-selected]");n&&delete n.dataset.editorSelected,$t(e),function(t){for(var e=function(){var e=r[n],o=(i=Zt(e,2))[0],a=i[1],s=t.toolbarEl.querySelector('[data-editor-button="block-'.concat(o,'"]'));if(!s)return"continue";s.addEventListener("click",(function(e){var n;e.preventDefault();var r=Se({editor:t,type:o});if(-1!==Ct.indexOf(ke(r[1]).typeName)){var i=r[1].matches(a.selector)?re.paragraph:a,s=i.create(t);return i.onClick&&i.onClick(t,s),Et(r[1],s,null),r[0].replaceChild(s,r[1]),null===(n=window.getSelection())||void 0===n||n.collapse(s),!1}}))},n=0,r=Object.entries(re);n<r.length;n++){var i;e()}}(e),function(t){for(var e=function(){var e=r[n],o=(i=ie(e,2))[0],a=i[1],s=t.toolbarEl.querySelector('[data-editor-button="parentBlock-'.concat(o,'"]'));if(!s)return"continue";s.addEventListener("click",(function(e){var n;e.preventDefault();var r=Se({editor:t,type:o}),i=a.create(t);return r[0]==t.contentEl?(t.contentEl.insertBefore(i,r[1]),i.appendChild(r[1])):(Et(r[0],i,null),t.contentEl.replaceChild(i,r[0])),null===(n=window.getSelection())||void 0===n||n.collapse(i),!1}))},n=0,r=Object.entries(ce);n<r.length;n++){var i;e()}}(e),function(t){var e=t.toolbarEl.querySelector('[data-editor-button="multimedia"]');if(!e)throw new Error("No encontre el bot\xf3n de multimedia");e.addEventListener("click",(function(e){e.preventDefault();var n=Se({editor:t,type:"multimedia"}),r=de.create(t);return n[0].insertBefore(r,n[1].nextElementSibling),fe(t,r),!1}))}(e),function(t){t.toolbar.auxiliary.link.urlEl.addEventListener("input",(function(e){var n=t.toolbar.auxiliary.link.urlEl.value,r=t.contentEl.querySelector("a[data-editor-selected]");if(!r)throw new Error("No pude encontrar el link para setear el enlace");r.href=n})),t.toolbar.auxiliary.link.urlEl.addEventListener("keydown",(function(t){13==t.keyCode&&t.preventDefault()}))}(e),pe(e),function(t){t.toolbar.auxiliary.mark.colorEl.addEventListener("input",(function(e){var n=t.toolbar.auxiliary.mark.colorEl.value,r=t.contentEl.querySelector("mark[data-editor-selected]");if(!r)throw new Error("No pude encontrar el mark para setear el color");r.style.backgroundColor=n})),t.toolbar.auxiliary.mark.textColorEl.addEventListener("input",(function(e){var n=t.toolbar.auxiliary.mark.textColorEl.value,r=t.contentEl.querySelector("mark[data-editor-selected]");if(!r)throw new Error("No pude encontrar el mark para setear el color del text");r.style.color=n})),t.toolbar.auxiliary.mark.colorEl.addEventListener("keydown",(function(t){13==t.keyCode&&t.preventDefault()}))}(e),Le(e)}document.addEventListener("turbolinks:load",(function(){var t=document.querySelector(".js-flash");if(t){var e=JSON.parse(t.dataset.keys||"[]");switch(t.dataset.target){case"editor":switch(t.dataset.action){case"forget-content":e.forEach(St)}}}var n,r=Me(document.querySelectorAll(".editor[data-editor]"));try{for(r.s();!(n=r.n()).done;){var i=n.value;try{Ie(i)}catch(o){console.error("no se pudo iniciar el editor, error completo",o)}}}catch(Cw){r.e(Cw)}finally{r.f()}}));var Re;n(414),n(415),n(416),n(417);function Ne(t,e){return(Ne=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ze(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fe(t);if(e){var i=Fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return je(this,n)}}function je(t,e){return!e||"object"!==We(e)&&"function"!==typeof e?Be(t):e}function Be(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fe(t){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function qe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ve(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ue(t){return function(t){if(Array.isArray(t))return He(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return He(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return He(t,e)}(t)||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 He(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function We(t){return(We="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $e(){}function Ze(t){return t()}function Ye(){return Object.create(null)}function Ge(t){t.forEach(Ze)}function Ke(t){return"function"==typeof t}function Je(t,e){return t!=t?e==e:t!==e||t&&"object"==We(t)||"function"==typeof t}function Xe(t,e){t.appendChild(e)}function Qe(t,e,n){t.insertBefore(e,n||null)}function tn(t){t.parentNode.removeChild(t)}function en(t){return document.createElement(t)}function nn(t){return document.createTextNode(t)}function rn(){return nn(" ")}function on(t,e,n,r){return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function an(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function sn(t,e){e=""+e,t.data!==e&&(t.data=e)}function un(t){Re=t}var cn=[],ln=[],hn=[],fn=[],dn=Promise.resolve(),pn=!1;function mn(t){hn.push(t)}function vn(){var t=new Set;do{for(;cn.length;){var e=cn.shift();un(e),gn(e.$$)}for(;ln.length;)ln.pop()();for(var n=0;n<hn.length;n+=1){var r=hn[n];t.has(r)||(r(),t.add(r))}hn.length=0}while(cn.length);for(;fn.length;)fn.pop()();pn=!1}function gn(t){t.fragment&&(t.update(t.dirty),Ge(t.before_update),t.fragment.p(t.dirty,t.ctx),t.dirty=null,t.after_update.forEach(mn))}var yn=new Set;function bn(t,e,n,r,i,o){var a=Re;un(t);var s,u,c=e.props||{},l=t.$$={fragment:null,ctx:null,props:o,update:$e,not_equal:i,bound:Ye(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:[]),callbacks:Ye(),dirty:null},h=!1;l.ctx=n?n(t,c,(function(e,n){l.ctx&&i(l.ctx[e],l.ctx[e]=n)&&(l.bound[e]&&l.bound[e](n),h&&function(t,e){t.$$.dirty||(cn.push(t),pn||(pn=!0,dn.then(vn)),t.$$.dirty=Ye()),t.$$.dirty[e]=!0}(t,e))})):c,l.update(),h=!0,Ge(l.before_update),l.fragment=r(l.ctx),e.target&&(e.hydrate?l.fragment.l((u=e.target,Array.from(u.childNodes))):l.fragment.c(),e.intro&&(s=t.$$.fragment)&&s.i&&(yn.delete(s),s.i(undefined)),function(t,e,n){var r=t.$$,i=r.fragment,o=r.on_mount,a=r.on_destroy,s=r.after_update;i.m(e,n),mn((function(){var e=o.map(Ze).filter(Ke);a?a.push.apply(a,Ue(e)):Ge(e),t.$$.on_mount=[]})),s.forEach(mn)}(t,e.target,e.anchor),vn()),un(a)}function _n(t,e,n){var r=Object.create(t);return r.value=e[n],r}function wn(t){var e,n,r,i,o,a,s,u=t.value+"";return{c:function(){e=en("label"),n=en("input"),i=rn(),o=nn(u),a=rn(),an(n,"type","checkbox"),n.checked="checked",an(n,"aria-describedby",t.described),n.value=r=t.value,an(n,"name",t.name),s=on(n,"change",t.removeValue)},m:function(t,r){Qe(t,e,r),Xe(e,n),Xe(e,i),Xe(e,o),Xe(e,a)},p:function(t,e){t.described&&an(n,"aria-describedby",e.described),t.group&&r!==(r=e.value)&&(n.value=r),t.name&&an(n,"name",e.name),t.group&&u!==(u=e.value+"")&&sn(o,u)},d:function(t){t&&tn(e),s()}}}function xn(t){for(var e,n,r,i,o,a,s,u,c,l,h=t.group,f=[],d=0;d<h.length;d+=1)f[d]=wn(_n(t,h,d));return{c:function(){e=en("div"),n=en("input"),r=rn(),i=en("input"),o=rn(),a=en("fieldset"),s=en("legend"),u=nn(t.legend),c=rn();for(var h=0;h<f.length;h+=1)f[h].c();an(n,"type","text"),an(n,"aria-describedby",t.described),an(n,"list",t.list),an(i,"type","button"),i.value=t.button,an(e,"class","input-tag"),l=[on(n,"input",t.input0_input_handler),on(n,"keypress",t.addValue),on(i,"click",t.addValue)]},m:function(l,h){Qe(l,e,h),Xe(e,n),n.value=t.added_value,Xe(e,r),Xe(e,i),Xe(e,o),Xe(e,a),Xe(a,s),Xe(s,u),Xe(a,c);for(var d=0;d<f.length;d+=1)f[d].m(a,null)},p:function(t,e){if(t.added_value&&n.value!==e.added_value&&(n.value=e.added_value),t.described&&an(n,"aria-describedby",e.described),t.list&&an(n,"list",e.list),t.button&&(i.value=e.button),t.legend&&sn(u,e.legend),t.group||t.described||t.name){h=e.group;for(var r=0;r<h.length;r+=1){var o=_n(e,h,r);f[r]?f[r].p(t,o):(f[r]=wn(o),f[r].c(),f[r].m(a,null))}for(;r<f.length;r+=1)f[r].d(1);f.length=h.length}},i:$e,o:$e,d:function(t){t&&tn(e),function(t,e){for(var n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(f,t),Ge(l)}}}function kn(t,e,n){var r=e.values,i=void 0===r?"[]":r,o=e.button,a=void 0===o?"Agregar":o,s=e.legend,u=void 0===s?"":s,c=e.described,l=void 0===c?"":c,h=e.name,f=e.list,d=e.remove,p=void 0===d||d,m=JSON.parse(i),v="";return t.$set=function(t){"values"in t&&n("values",i=t.values),"button"in t&&n("button",a=t.button),"legend"in t&&n("legend",u=t.legend),"described"in t&&n("described",l=t.described),"name"in t&&n("name",h=t.name),"list"in t&&n("list",f=t.list),"remove"in t&&n("remove",p=t.remove)},{values:i,button:a,legend:u,described:l,name:h,list:f,remove:p,group:m,added_value:v,addValue:function(t){null!=t.keyCode&&13!=t.keyCode||(t.preventDefault(),t.stopPropagation(),0!=v.length&&(m.includes(v)||(n("group",m=[].concat(Ue(m),[v.trim()])),n("added_value",v=""))))},removeValue:function(t){[!1,"false"].includes(p)||(t.target.checked="checked",n("group",m=m.filter((function(e){return e!==t.target.value}))))},input0_input_handler:function(){v=this.value,n("added_value",v)}}}var Sn,Cn=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ne(t,e)}(n,t);var e=ze(n);function n(t){var r;return qe(this,n),bn(Be(r=e.call(this)),t,kn,xn,Je,["values","button","legend","described","name","list","remove"]),r}return n}(function(){function t(){qe(this,t)}var e,n,r;return e=t,(n=[{key:"$destroy",value:function(){var t;(t=this).$$.fragment&&(Ge(t.$$.on_destroy),t.$$.fragment.d(1),t.$$.on_destroy=t.$$.fragment=null,t.$$.ctx={}),this.$destroy=$e}},{key:"$on",value:function(t,e){var n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}}},{key:"$set",value:function(){}}])&&Ve(e.prototype,n),r&&Ve(e,r),t}());function Mn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function En(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tn(t,e){return(Tn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function An(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ln(t);if(e){var i=Ln(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return On(this,n)}}function On(t,e){return!e||"object"!==zn(e)&&"function"!==typeof e?Pn(t):e}function Pn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ln(t){return(Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Dn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(Cw){i=!0,o=Cw}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||Rn(t,e)||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 In(t){return function(t){if(Array.isArray(t))return Nn(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Rn(t)||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 Rn(t,e){if(t){if("string"===typeof t)return Nn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nn(t,e):void 0}}function Nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function zn(t){return(zn="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jn(){}function Bn(t){return t()}function Fn(){return Object.create(null)}function qn(t){t.forEach(Bn)}function Vn(t){return"function"==typeof t}function Un(t,e){return t!=t?e==e:t!==e||t&&"object"==zn(t)||"function"==typeof t}function Hn(t,e){t.appendChild(e)}function Wn(t,e,n){t.insertBefore(e,n||null)}function $n(t){t.parentNode.removeChild(t)}function Zn(t){return document.createElement(t)}function Yn(t){return document.createTextNode(t)}function Gn(){return Yn(" ")}function Kn(t,e,n,r){return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function Jn(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Xn(t,e){e=""+e,t.data!==e&&(t.data=e)}function Qn(t,e){(null!=e||t.value)&&(t.value=e)}function tr(t){Sn=t}var er=[],nr=[],rr=[],ir=[],or=Promise.resolve(),ar=!1;function sr(t){rr.push(t)}var ur=new Set;function cr(){do{for(;er.length;){var t=er.shift();tr(t),lr(t.$$)}for(;nr.length;)nr.pop()();for(var e=0;e<rr.length;e+=1){var n=rr[e];ur.has(n)||(ur.add(n),n())}rr.length=0}while(er.length);for(;ir.length;)ir.pop()();ar=!1,ur.clear()}function lr(t){if(null!==t.fragment){t.update(),qn(t.before_update);var e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(sr)}}var hr=new Set;function fr(t,e){-1===t.$$.dirty[0]&&(er.push(t),ar||(ar=!0,or.then(cr)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function dr(t,e,n){var r=t.slice();return r[15]=e[n],r}function pr(t){var e,n,r,i,o,a,s,u=t[6][t[15]]+"";return{c:function(){e=Zn("label"),n=Zn("input"),i=Gn(),o=Yn(u),a=Gn(),Jn(n,"type","checkbox"),n.checked="checked",Jn(n,"aria-describedby",t[2]),n.value=r=t[15],Jn(n,"name",t[3])},m:function(r,u){Wn(r,e,u),Hn(e,n),Hn(e,i),Hn(e,o),Hn(e,a),s=Kn(n,"change",t[9])},p:function(t,e){4&e&&Jn(n,"aria-describedby",t[2]),32&e&&r!==(r=t[15])&&(n.value=r),8&e&&Jn(n,"name",t[3]),96&e&&u!==(u=t[6][t[15]]+"")&&Xn(o,u)},d:function(t){t&&$n(e),s()}}}function mr(t){for(var e,n,r,i,o,a,s,u,c,l,h=t[5],f=[],d=0;d<h.length;d+=1)f[d]=pr(dr(t,h,d));return{c:function(){e=Zn("div"),n=Zn("input"),r=Gn(),i=Zn("input"),o=Gn(),a=Zn("fieldset"),s=Zn("legend"),u=Yn(t[1]),c=Gn();for(var l=0;l<f.length;l+=1)f[l].c();Jn(n,"type","text"),Jn(n,"aria-describedby",t[2]),Jn(n,"list",t[4]),Jn(i,"type","button"),i.value=t[0],Jn(e,"class","input-map")},m:function(h,d){Wn(h,e,d),Hn(e,n),Qn(n,t[7]),Hn(e,r),Hn(e,i),Hn(e,o),Hn(e,a),Hn(a,s),Hn(s,u),Hn(a,c);for(var p=0;p<f.length;p+=1)f[p].m(a,null);l=[Kn(n,"keypress",t[8]),Kn(n,"input",t[14]),Kn(i,"click",t[8])]},p:function(t,e){var r=Dn(e,1)[0];if(4&r&&Jn(n,"aria-describedby",t[2]),16&r&&Jn(n,"list",t[4]),128&r&&n.value!==t[7]&&Qn(n,t[7]),1&r&&(i.value=t[0]),2&r&&Xn(u,t[1]),620&r){var o;for(h=t[5],o=0;o<h.length;o+=1){var s=dr(t,h,o);f[o]?f[o].p(s,r):(f[o]=pr(s),f[o].c(),f[o].m(a,null))}for(;o<f.length;o+=1)f[o].d(1);f.length=h.length}},i:jn,o:jn,d:function(t){t&&$n(e),function(t,e){for(var n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(f,t),qn(l)}}}function vr(t,e,n){var r=e.values,i=void 0===r?"[]":r,o=e.defaultValues,a=void 0===o?"{}":o,s=e.button,u=void 0===s?"Agregar":s,c=e.legend,l=void 0===c?"":c,h=e.described,f=void 0===h?"":h,d=e.name,p=e.list,m=e.remove,v=void 0===m||m,g=JSON.parse(a),y=JSON.parse(i),b={},_="";return y.forEach((function(t){return n(6,b[t]=Object.keys(g).find((function(e){return g[e]==t})),b)})),t.$set=function(t){"values"in t&&n(10,i=t.values),"defaultValues"in t&&n(11,a=t.defaultValues),"button"in t&&n(0,u=t.button),"legend"in t&&n(1,l=t.legend),"described"in t&&n(2,f=t.described),"name"in t&&n(3,d=t.name),"list"in t&&n(4,p=t.list),"remove"in t&&n(12,v=t.remove)},[u,l,f,d,p,y,b,_,function(t){null!=t.keyCode&&13!=t.keyCode||(t.preventDefault(),t.stopPropagation(),0!=_.length&&g[_]&&(b[g[_]]||(y.push(g[_]),n(6,b[g[_]]=_,b),n(7,_=""))))},function(t){[!1,"false"].includes(v)||(t.target.checked="checked",n(5,y=y.filter((function(e){return e!==t.target.value}))),delete b[t.target.value])},i,a,v,g,function(){_=this.value,n(7,_)}]}var gr=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tn(t,e)}(n,t);var e=An(n);function n(t){var r;return En(this,n),function(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[-1],s=Sn;tr(t);var u,c,l,h=e.props||{},f=t.$$={fragment:null,ctx:null,props:o,update:jn,not_equal:i,bound:Fn(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:[]),callbacks:Fn(),dirty:a},d=!1;f.ctx=n?n(t,h,(function(e,n){var r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return f.ctx&&i(f.ctx[e],f.ctx[e]=r)&&(f.bound[e]&&f.bound[e](r),d&&fr(t,e)),n})):[],f.update(),d=!0,qn(f.before_update),f.fragment=!!r&&r(f.ctx),e.target&&(e.hydrate?f.fragment&&f.fragment.l((l=e.target,Array.from(l.childNodes))):f.fragment&&f.fragment.c(),e.intro&&(u=t.$$.fragment)&&u.i&&(hr.delete(u),u.i(c)),function(t,e,n){var r=t.$$,i=r.fragment,o=r.on_mount,a=r.on_destroy,s=r.after_update;i&&i.m(e,n),sr((function(){var e=o.map(Bn).filter(Vn);a?a.push.apply(a,In(e)):qn(e),t.$$.on_mount=[]})),s.forEach(sr)}(t,e.target,e.anchor),cr()),tr(s)}(Pn(r=e.call(this)),t,vr,mr,Un,{values:10,defaultValues:11,button:0,legend:1,described:2,name:3,list:4,remove:12}),r}return n}(function(){function t(){En(this,t)}var e,n,r;return e=t,(n=[{key:"$destroy",value:function(){var t;null!==(t=this.$$).fragment&&(qn(t.on_destroy),t.fragment&&t.fragment.d(1),t.on_destroy=t.fragment=null,t.ctx=[]),this.$destroy=jn}},{key:"$on",value:function(t,e){var n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}}},{key:"$set",value:function(){}}])&&Mn(e.prototype,n),r&&Mn(e,r),t}());function yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function br(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yr(Object(n),!0).forEach((function(e){_r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wr(t){this.content=t}document.addEventListener("turbolinks:load",(function(){document.querySelectorAll(".taggable").forEach((function(t){t.innerHTML="",new Cn({target:t,props:br({},t.dataset)})})),document.querySelectorAll(".mapable").forEach((function(t){t.innerHTML="",new gr({target:t,props:br({},t.dataset)})}))})),wr.prototype={constructor:wr,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return-1==i?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new wr(o)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new wr(n)},addToStart:function(t,e){return new wr([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new wr(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(-1==o?i.length:o,0,e,n),new wr(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=wr.from(t)).size?new wr(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=wr.from(t)).size?new wr(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=wr.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},get size(){return this.content.length>>1}},wr.from=function(t){if(t instanceof wr)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new wr(e)};var xr=wr;function kr(t){return(kr="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Sr(t,e,n){for(var r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;var i=t.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(var a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){var s=Sr(i.content,o.content,n+1);if(null!=s)return s}n+=i.nodeSize}else n+=i.nodeSize}}function Cr(t,e,n,r){for(var i=t.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};var a=t.child(--i),s=e.child(--o),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 h=Cr(a.content,s.content,n-1,r-1);if(h)return h}n-=u,r-=u}else n-=u,r-=u}}var Mr=function(t,e){if(this.content=t,this.size=e||0,null==e)for(var n=0;n<t.length;n++)this.size+=t[n].nodeSize},Er={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};Mr.prototype.nodesBetween=function(t,e,n,r,i){void 0===r&&(r=0);for(var o=0,a=0;a<e;o++){var s=this.content[o],u=a+s.nodeSize;if(u>t&&!1!==n(s,r+a,i,o)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,t-c),Math.min(s.content.size,e-c),n,r+c)}a=u}},Mr.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},Mr.prototype.textBetween=function(t,e,n,r){var i="",o=!0;return this.nodesBetween(t,e,(function(a,s){a.isText?(i+=a.text.slice(Math.max(t,s)-s,e-s),o=!n):a.isLeaf&&r?(i+=r,o=!n):!o&&a.isBlock&&(i+=n,o=!0)}),0),i},Mr.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,n=t.firstChild,r=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),i=1);i<t.content.length;i++)r.push(t.content[i]);return new Mr(r,this.size+t.size)},Mr.prototype.cut=function(t,e){if(null==e&&(e=this.size),0==t&&e==this.size)return this;var n=[],r=0;if(e>t)for(var i=0,o=0;o<e;i++){var a=this.content[i],s=o+a.nodeSize;s>t&&((o<t||s>e)&&(a=a.isText?a.cut(Math.max(0,t-o),Math.min(a.text.length,e-o)):a.cut(Math.max(0,t-o-1),Math.min(a.content.size,e-o-1))),n.push(a),r+=a.nodeSize),o=s}return new Mr(n,r)},Mr.prototype.cutByIndex=function(t,e){return t==e?Mr.empty:0==t&&e==this.content.length?this:new Mr(this.content.slice(t,e))},Mr.prototype.replaceChild=function(t,e){var n=this.content[t];if(n==e)return this;var r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new Mr(r,i)},Mr.prototype.addToStart=function(t){return new Mr([t].concat(this.content),this.size+t.nodeSize)},Mr.prototype.addToEnd=function(t){return new Mr(this.content.concat(t),this.size+t.nodeSize)},Mr.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0},Er.firstChild.get=function(){return this.content.length?this.content[0]:null},Er.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},Er.childCount.get=function(){return this.content.length},Mr.prototype.child=function(t){var e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e},Mr.prototype.maybeChild=function(t){return this.content[t]},Mr.prototype.forEach=function(t){for(var e=0,n=0;e<this.content.length;e++){var r=this.content[e];t(r,n,e),n+=r.nodeSize}},Mr.prototype.findDiffStart=function(t,e){return void 0===e&&(e=0),Sr(this,t,e)},Mr.prototype.findDiffEnd=function(t,e,n){return void 0===e&&(e=this.size),void 0===n&&(n=t.size),Cr(this,t,e,n)},Mr.prototype.findIndex=function(t,e){if(void 0===e&&(e=-1),0==t)return Ar(0,t);if(t==this.size)return Ar(this.content.length,t);if(t>this.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var i=r+this.child(n).nodeSize;if(i>=t)return i==t||e>0?Ar(n+1,i):Ar(n,r);r=i}},Mr.prototype.toString=function(){return"<"+this.toStringInner()+">"},Mr.prototype.toStringInner=function(){return this.content.join(", ")},Mr.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},Mr.fromJSON=function(t,e){if(!e)return Mr.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new Mr(e.map(t.nodeFromJSON))},Mr.fromArray=function(t){if(!t.length)return Mr.empty;for(var e,n=0,r=0;r<t.length;r++){var i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new Mr(e||t,n)},Mr.from=function(t){if(!t)return Mr.empty;if(t instanceof Mr)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Mr([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(Mr.prototype,Er);var Tr={index:0,offset:0};function Ar(t,e){return Tr.index=t,Tr.offset=e,Tr}function Or(t,e){if(t===e)return!0;if(!t||"object"!=kr(t)||!e||"object"!=kr(e))return!1;var n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(!Or(t[r],e[r]))return!1}else{for(var i in t)if(!(i in e)||!Or(t[i],e[i]))return!1;for(var o in e)if(!(o in t))return!1}return!0}Mr.empty=new Mr([],0);var Pr=function(t,e){this.type=t,this.attrs=e};function Lr(t){var e=Error.call(this,t);return e.__proto__=Lr.prototype,e}Pr.prototype.addToSet=function(t){for(var e,n=!1,r=0;r<t.length;r++){var i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e},Pr.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t},Pr.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1},Pr.prototype.eq=function(t){return this==t||this.type==t.type&&Or(this.attrs,t.attrs)},Pr.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return t},Pr.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");var n=t.marks[e.type];if(!n)throw new RangeError("There is no mark type "+e.type+" in this schema");return n.create(e.attrs)},Pr.sameSet=function(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0},Pr.setFrom=function(t){if(!t||0==t.length)return Pr.none;if(t instanceof Pr)return[t];var e=t.slice();return e.sort((function(t,e){return t.type.rank-e.type.rank})),e},Pr.none=[],Lr.prototype=Object.create(Error.prototype),Lr.prototype.constructor=Lr,Lr.prototype.name="ReplaceError";var Dr=function(t,e,n){this.content=t,this.openStart=e,this.openEnd=n},Ir={size:{configurable:!0}};function Rr(t,e,n){var r=t.findIndex(e),i=r.index,o=r.offset,a=t.maybeChild(i),s=t.findIndex(n),u=s.index,c=s.offset;if(o==e||a.isText){if(c!=n&&!t.child(u).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(i!=u)throw new RangeError("Removing non-flat range");return t.replaceChild(i,a.copy(Rr(a.content,e-o-1,n-o-1)))}function Nr(t,e,n,r){var i=t.findIndex(e),o=i.index,a=i.offset,s=t.maybeChild(o);if(a==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));var u=Nr(s.content,e-a-1,n);return u&&t.replaceChild(o,s.copy(u))}function zr(t,e,n){if(n.openStart>t.depth)throw new Lr("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Lr("Inconsistent open depths");return jr(t,e,n,0)}function jr(t,e,n,r){var i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){var a=jr(t,e,n,r+1);return o.copy(o.content.replaceChild(i,a))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){var s=function(t,e){for(var n=e.depth-t.openStart,r=e.node(n).copy(t.content),i=n-1;i>=0;i--)r=e.node(i).copy(Mr.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return Ur(o,Hr(t,s.start,s.end,e,r))}var u=t.parent,c=u.content;return Ur(u,c.cut(0,t.parentOffset).append(n.content).append(c.cut(e.parentOffset)))}return Ur(o,Wr(t,e,r))}function Br(t,e){if(!e.type.compatibleContent(t.type))throw new Lr("Cannot join "+e.type.name+" onto "+t.type.name)}function Fr(t,e,n){var r=t.node(n);return Br(r,e.node(n)),r}function qr(t,e){var n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Vr(t,e,n,r){var i=(e||t).node(n),o=0,a=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(qr(t.nodeAfter,r),o++));for(var s=o;s<a;s++)qr(i.child(s),r);e&&e.depth==n&&e.textOffset&&qr(e.nodeBefore,r)}function Ur(t,e){if(!t.type.validContent(e))throw new Lr("Invalid content for node "+t.type.name);return t.copy(e)}function Hr(t,e,n,r,i){var o=t.depth>i&&Fr(t,e,i+1),a=r.depth>i&&Fr(n,r,i+1),s=[];return Vr(null,t,i,s),o&&a&&e.index(i)==n.index(i)?(Br(o,a),qr(Ur(o,Hr(t,e,n,r,i+1)),s)):(o&&qr(Ur(o,Wr(t,e,i+1)),s),Vr(e,n,i,s),a&&qr(Ur(a,Wr(n,r,i+1)),s)),Vr(r,null,i,s),new Mr(s)}function Wr(t,e,n){var r=[];(Vr(null,t,n,r),t.depth>n)&&qr(Ur(Fr(t,e,n+1),Wr(t,e,n+1)),r);return Vr(e,null,n,r),new Mr(r)}Ir.size.get=function(){return this.content.size-this.openStart-this.openEnd},Dr.prototype.insertAt=function(t,e){var n=Nr(this.content,t+this.openStart,e,null);return n&&new Dr(n,this.openStart,this.openEnd)},Dr.prototype.removeBetween=function(t,e){return new Dr(Rr(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},Dr.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},Dr.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},Dr.prototype.toJSON=function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},Dr.fromJSON=function(t,e){if(!e)return Dr.empty;var n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Dr(Mr.fromJSON(t,e.content),n,r)},Dr.maxOpen=function(t,e){void 0===e&&(e=!0);for(var n=0,r=0,i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)n++;for(var o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new Dr(t,n,r)},Object.defineProperties(Dr.prototype,Ir),Dr.empty=new Dr(Mr.empty,0,0);var $r=function(t,e,n){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=n},Zr={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};$r.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},Zr.parent.get=function(){return this.node(this.depth)},Zr.doc.get=function(){return this.node(0)},$r.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},$r.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},$r.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},$r.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},$r.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},$r.prototype.before=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]},$r.prototype.after=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},Zr.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},Zr.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r},Zr.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},$r.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1,i=0;i<t;i++)r+=n.child(i).nodeSize;return r},$r.prototype.marks=function(){var t=this.parent,e=this.index();if(0==t.content.size)return Pr.none;if(this.textOffset)return t.child(e).marks;var n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){var i=n;n=r,r=i}for(var o=n.marks,a=0;a<o.length;a++)!1!==o[a].type.spec.inclusive||r&&o[a].isInSet(r.marks)||(o=o[a--].removeFromSet(o));return o},$r.prototype.marksAcross=function(t){var e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;for(var n=e.marks,r=t.parent.maybeChild(t.index()),i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n},$r.prototype.sharedDepth=function(t){for(var e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},$r.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos<this.pos)return t.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new Jr(this,t,n)},$r.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},$r.prototype.max=function(t){return t.pos>this.pos?t:this},$r.prototype.min=function(t){return t.pos<this.pos?t:this},$r.prototype.toString=function(){for(var t="",e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset},$r.resolve=function(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var n=[],r=0,i=e,o=t;;){var a=o.content.findIndex(i),s=a.index,u=a.offset,c=i-u;if(n.push(o,s,r+u),!c)break;if((o=o.child(s)).isText)break;i=c-1,r+=u+1}return new $r(e,n,i)},$r.resolveCached=function(t,e){for(var n=0;n<Yr.length;n++){var r=Yr[n];if(r.pos==e&&r.doc==t)return r}var i=Yr[Gr]=$r.resolve(t,e);return Gr=(Gr+1)%Kr,i},Object.defineProperties($r.prototype,Zr);var Yr=[],Gr=0,Kr=12,Jr=function(t,e,n){this.$from=t,this.$to=e,this.depth=n},Xr={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};Xr.start.get=function(){return this.$from.before(this.depth+1)},Xr.end.get=function(){return this.$to.after(this.depth+1)},Xr.parent.get=function(){return this.$from.node(this.depth)},Xr.startIndex.get=function(){return this.$from.index(this.depth)},Xr.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(Jr.prototype,Xr);var Qr=Object.create(null),ti=function(t,e,n,r){this.type=t,this.attrs=e,this.content=n||Mr.empty,this.marks=r||Pr.none},ei={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};ei.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},ei.childCount.get=function(){return this.content.childCount},ti.prototype.child=function(t){return this.content.child(t)},ti.prototype.maybeChild=function(t){return this.content.maybeChild(t)},ti.prototype.forEach=function(t){this.content.forEach(t)},ti.prototype.nodesBetween=function(t,e,n,r){void 0===r&&(r=0),this.content.nodesBetween(t,e,n,r,this)},ti.prototype.descendants=function(t){this.nodesBetween(0,this.content.size,t)},ei.textContent.get=function(){return this.textBetween(0,this.content.size,"")},ti.prototype.textBetween=function(t,e,n,r){return this.content.textBetween(t,e,n,r)},ei.firstChild.get=function(){return this.content.firstChild},ei.lastChild.get=function(){return this.content.lastChild},ti.prototype.eq=function(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)},ti.prototype.sameMarkup=function(t){return this.hasMarkup(t.type,t.attrs,t.marks)},ti.prototype.hasMarkup=function(t,e,n){return this.type==t&&Or(this.attrs,e||t.defaultAttrs||Qr)&&Pr.sameSet(this.marks,n||Pr.none)},ti.prototype.copy=function(t){return void 0===t&&(t=null),t==this.content?this:new this.constructor(this.type,this.attrs,t,this.marks)},ti.prototype.mark=function(t){return t==this.marks?this:new this.constructor(this.type,this.attrs,this.content,t)},ti.prototype.cut=function(t,e){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))},ti.prototype.slice=function(t,e,n){if(void 0===e&&(e=this.content.size),void 0===n&&(n=!1),t==e)return Dr.empty;var r=this.resolve(t),i=this.resolve(e),o=n?0:r.sharedDepth(e),a=r.start(o),s=r.node(o).content.cut(r.pos-a,i.pos-a);return new Dr(s,r.depth-o,i.depth-o)},ti.prototype.replace=function(t,e,n){return zr(this.resolve(t),this.resolve(e),n)},ti.prototype.nodeAt=function(t){for(var e=this;;){var n=e.content.findIndex(t),r=n.index,i=n.offset;if(!(e=e.maybeChild(r)))return null;if(i==t||e.isText)return e;t-=i+1}},ti.prototype.childAfter=function(t){var e=this.content.findIndex(t),n=e.index,r=e.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},ti.prototype.childBefore=function(t){if(0==t)return{node:null,index:0,offset:0};var e=this.content.findIndex(t),n=e.index,r=e.offset;if(r<t)return{node:this.content.child(n),index:n,offset:r};var i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}},ti.prototype.resolve=function(t){return $r.resolveCached(this,t)},ti.prototype.resolveNoCache=function(t){return $r.resolve(this,t)},ti.prototype.rangeHasMark=function(t,e,n){var r=!1;return e>t&&this.nodesBetween(t,e,(function(t){return n.isInSet(t.marks)&&(r=!0),!r})),r},ei.isBlock.get=function(){return this.type.isBlock},ei.isTextblock.get=function(){return this.type.isTextblock},ei.inlineContent.get=function(){return this.type.inlineContent},ei.isInline.get=function(){return this.type.isInline},ei.isText.get=function(){return this.type.isText},ei.isLeaf.get=function(){return this.type.isLeaf},ei.isAtom.get=function(){return this.type.isAtom},ti.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),ri(this.marks,t)},ti.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},ti.prototype.canReplace=function(t,e,n,r,i){void 0===n&&(n=Mr.empty),void 0===r&&(r=0),void 0===i&&(i=n.childCount);var o=this.contentMatchAt(t).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(var s=r;s<i;s++)if(!this.type.allowsMarks(n.child(s).marks))return!1;return!0},ti.prototype.canReplaceWith=function(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;var i=this.contentMatchAt(t).matchType(n),o=i&&i.matchFragment(this.content,e);return!!o&&o.validEnd},ti.prototype.canAppend=function(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)},ti.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));this.content.forEach((function(t){return t.check()}))},ti.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((function(t){return t.toJSON()}))),t},ti.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}var r=Mr.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)},Object.defineProperties(ti.prototype,ei);var ni=function(t){function e(e,n,r,i){if(t.call(this,e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={textContent:{configurable:!0},nodeSize:{configurable:!0}};return e.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ri(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},e.prototype.textBetween=function(t,e){return this.text.slice(t,e)},n.nodeSize.get=function(){return this.text.length},e.prototype.mark=function(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)},e.prototype.withText=function(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)},e.prototype.cut=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.text.length),0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))},e.prototype.eq=function(t){return this.sameMarkup(t)&&this.text==t.text},e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.text=this.text,e},Object.defineProperties(e.prototype,n),e}(ti);function ri(t,e){for(var n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}var ii=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},oi={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};ii.parse=function(t,e){var n=new ai(t,e);if(null==n.next)return ii.empty;var r=ui(n);n.next&&n.err("Unexpected trailing text");var i=function(t){var e=Object.create(null);return n(pi(t,0));function n(r){var i=[];r.forEach((function(e){t[e].forEach((function(e){var n=e.term,r=e.to;if(n){var o=i.indexOf(n),a=o>-1&&i[o+1];pi(t,r).forEach((function(t){a||i.push(n,a=[]),-1==a.indexOf(t)&&a.push(t)}))}}))}));for(var o=e[r.join(",")]=new ii(r.indexOf(t.length-1)>-1),a=0;a<i.length;a+=2){var s=i[a+1].sort(di);o.next.push(i[a],e[s.join(",")]||n(s))}return o}}(function(t){var e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){var i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach((function(t){return t.to=e}))}function o(t,e){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(o(n,e))}),[]);if("seq"==t.type)for(var a=0;;a++){var s=o(t.exprs[a],e);if(a==t.exprs.length-1)return s;i(s,e=n())}else{if("star"==t.type){var u=n();return r(e,u),i(o(t.expr,u),u),[r(u)]}if("plus"==t.type){var c=n();return i(o(t.expr,e),c),i(o(t.expr,c),c),[r(c)]}if("opt"==t.type)return[r(e)].concat(o(t.expr,e));if("range"==t.type){for(var l=e,h=0;h<t.min;h++){var f=n();i(o(t.expr,l),f),l=f}if(-1==t.max)i(o(t.expr,l),l);else for(var d=t.min;d<t.max;d++){var p=n();r(l,p),i(o(t.expr,l),p),l=p}return[r(l)]}if("name"==t.type)return[r(e,null,t.value)]}}}(r));return function(t,e){for(var n=0,r=[t];n<r.length;n++){for(var i=r[n],o=!i.validEnd,a=[],s=0;s<i.next.length;s+=2){var u=i.next[s],c=i.next[s+1];a.push(u.name),!o||u.isText||u.hasRequiredAttrs()||(o=!1),-1==r.indexOf(c)&&r.push(c)}o&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,n),i},ii.prototype.matchType=function(t){for(var e=0;e<this.next.length;e+=2)if(this.next[e]==t)return this.next[e+1];return null},ii.prototype.matchFragment=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.childCount);for(var r=this,i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r},oi.inlineContent.get=function(){var t=this.next[0];return!!t&&t.isInline},oi.defaultType.get=function(){for(var t=0;t<this.next.length;t+=2){var e=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}},ii.prototype.compatible=function(t){for(var e=0;e<this.next.length;e+=2)for(var n=0;n<t.next.length;n+=2)if(this.next[e]==t.next[n])return!0;return!1},ii.prototype.fillBefore=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=0);var r=[this];return function i(o,a){var s=o.matchFragment(t,n);if(s&&(!e||s.validEnd))return Mr.from(a.map((function(t){return t.createAndFill()})));for(var u=0;u<o.next.length;u+=2){var c=o.next[u],l=o.next[u+1];if(!c.isText&&!c.hasRequiredAttrs()&&-1==r.indexOf(l)){r.push(l);var h=i(l,a.concat(c));if(h)return h}}}(this,[])},ii.prototype.findWrapping=function(t){for(var e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];var n=this.computeWrapping(t);return this.wrapCache.push(t,n),n},ii.prototype.computeWrapping=function(t){for(var e=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),i=r.match;if(i.matchType(t)){for(var o=[],a=r;a.type;a=a.via)o.push(a.type);return o.reverse()}for(var s=0;s<i.next.length;s+=2){var u=i.next[s];u.isLeaf||u.hasRequiredAttrs()||u.name in e||r.type&&!i.next[s+1].validEnd||(n.push({match:u.contentMatch,type:u,via:r}),e[u.name]=!0)}}},oi.edgeCount.get=function(){return this.next.length>>1},ii.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},ii.prototype.toString=function(){var t=[];return function e(n){t.push(n);for(var r=1;r<n.next.length;r+=2)-1==t.indexOf(n.next[r])&&e(n.next[r])}(this),t.map((function(e,n){for(var r=n+(e.validEnd?"*":" ")+" ",i=0;i<e.next.length;i+=2)r+=(i?", ":"")+e.next[i].name+"->"+t.indexOf(e.next[i+1]);return r})).join("\n")},Object.defineProperties(ii.prototype,oi),ii.empty=new ii(!0);var ai=function(t,e){this.string=t,this.nodeTypes=e,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()},si={next:{configurable:!0}};function ui(t){var e=[];do{e.push(ci(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function ci(t){var e=[];do{e.push(li(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function li(t){for(var e=function(t){if(t.eat("(")){var e=ui(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var n=function(t,e){var n=t.nodeTypes,r=n[e];if(r)return[r];var i=[];for(var o in n){var a=n[o];a.groups.indexOf(e)>-1&&i.push(a)}0==i.length&&t.err("No node type or group '"+e+"' found");return i}(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}t.err("Unexpected token '"+t.next+"'")}(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=fi(t,e)}return e}function hi(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function fi(t,e){var n=hi(t),r=n;return t.eat(",")&&(r="}"!=t.next?hi(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function di(t,e){return e-t}function pi(t,e){var n=[];return function e(r){var i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(var o=0;o<i.length;o++){var a=i[o],s=a.term,u=a.to;s||-1!=n.indexOf(u)||e(u)}}(e),n.sort(di)}function mi(t){var e=Object.create(null);for(var n in t){var r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function vi(t,e){var n=Object.create(null);for(var r in t){var i=e&&e[r];if(void 0===i){var o=t[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function gi(t){var e=Object.create(null);if(t)for(var n in t)e[n]=new _i(t[n]);return e}si.next.get=function(){return this.tokens[this.pos]},ai.prototype.eat=function(t){return this.next==t&&(this.pos++||!0)},ai.prototype.err=function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")},Object.defineProperties(ai.prototype,si);var yi=function(t,e,n){this.name=t,this.schema=e,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=gi(n.attrs),this.defaultAttrs=mi(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t},bi={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};bi.isInline.get=function(){return!this.isBlock},bi.isTextblock.get=function(){return this.isBlock&&this.inlineContent},bi.isLeaf.get=function(){return this.contentMatch==ii.empty},bi.isAtom.get=function(){return this.isLeaf||this.spec.atom},yi.prototype.hasRequiredAttrs=function(){for(var t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1},yi.prototype.compatibleContent=function(t){return this==t||this.contentMatch.compatible(t.contentMatch)},yi.prototype.computeAttrs=function(t){return!t&&this.defaultAttrs?this.defaultAttrs:vi(this.attrs,t)},yi.prototype.create=function(t,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ti(this,this.computeAttrs(t),Mr.from(e),Pr.setFrom(n))},yi.prototype.createChecked=function(t,e,n){if(e=Mr.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name);return new ti(this,this.computeAttrs(t),e,Pr.setFrom(n))},yi.prototype.createAndFill=function(t,e,n){if(t=this.computeAttrs(t),(e=Mr.from(e)).size){var r=this.contentMatch.fillBefore(e);if(!r)return null;e=r.append(e)}var i=this.contentMatch.matchFragment(e).fillBefore(Mr.empty,!0);return i?new ti(this,t,e.append(i),Pr.setFrom(n)):null},yi.prototype.validContent=function(t){var e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(var n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1;return!0},yi.prototype.allowsMarkType=function(t){return null==this.markSet||this.markSet.indexOf(t)>-1},yi.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0},yi.prototype.allowedMarks=function(t){if(null==this.markSet)return t;for(var e,n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:Pr.empty:t},yi.compile=function(t,e){var n=Object.create(null);t.forEach((function(t,r){return n[t]=new yi(t,e,r)}));var r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(yi.prototype,bi);var _i=function(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default},wi={isRequired:{configurable:!0}};wi.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(_i.prototype,wi);var xi=function(t,e,n,r){this.name=t,this.schema=n,this.spec=r,this.attrs=gi(r.attrs),this.rank=e,this.excluded=null;var i=mi(this.attrs);this.instance=i&&new Pr(this,i)};xi.prototype.create=function(t){return!t&&this.instance?this.instance:new Pr(this,vi(this.attrs,t))},xi.compile=function(t,e){var n=Object.create(null),r=0;return t.forEach((function(t,i){return n[t]=new xi(t,r++,e,i)})),n},xi.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t},xi.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t[e]},xi.prototype.excludes=function(t){return this.excluded.indexOf(t)>-1};var ki=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=xr.from(t.nodes),this.spec.marks=xr.from(t.marks),this.nodes=yi.compile(this.spec.nodes,this),this.marks=xi.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 i=this.nodes[r],o=i.spec.content||"",a=i.spec.marks;i.contentMatch=n[o]||(n[o]=ii.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==a?null:a?Si(this,a.split(" ")):""!=a&&i.inlineContent?null:[]}for(var s in this.marks){var u=this.marks[s],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:Si(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=Object.create(null),this.cached.wrappings=Object.create(null)};function Si(t,e){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=t.marks[i],a=o;if(o)n.push(o);else for(var s in t.marks){var u=t.marks[s];("_"==i||u.spec.group&&u.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}ki.prototype.node=function(t,e,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof yi))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)},ki.prototype.text=function(t,e){var n=this.nodes.text;return new ni(n,n.defaultAttrs,t,Pr.setFrom(e))},ki.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},ki.prototype.nodeFromJSON=function(t){return ti.fromJSON(this,t)},ki.prototype.markFromJSON=function(t){return Pr.fromJSON(this,t)},ki.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var Ci=function(t,e){var n=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((function(t){t.tag?n.tags.push(t):t.style&&n.styles.push(t)})),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)}))};Ci.prototype.parse=function(t,e){void 0===e&&(e={});var n=new Pi(this,e,!1);return n.addAll(t,null,e.from,e.to),n.finish()},Ci.prototype.parseSlice=function(t,e){void 0===e&&(e={});var n=new Pi(this,e,!0);return n.addAll(t,null,e.from,e.to),Dr.maxOpen(n.finish())},Ci.prototype.matchTag=function(t,e,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var i=this.tags[r];if(Di(t,i.tag)&&(void 0===i.namespace||t.namespaceURI==i.namespace)&&(!i.context||e.matchesContext(i.context))){if(i.getAttrs){var o=i.getAttrs(t);if(!1===o)continue;i.attrs=o}return i}}},Ci.prototype.matchStyle=function(t,e,n,r){for(var i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){var o=this.styles[i];if(!(0!=o.style.indexOf(t)||o.context&&!n.matchesContext(o.context)||o.style.length>t.length&&(61!=o.style.charCodeAt(t.length)||o.style.slice(t.length+1)!=e))){if(o.getAttrs){var a=o.getAttrs(e);if(!1===a)continue;o.attrs=a}return o}}},Ci.schemaRules=function(t){var e=[];function n(t){for(var n=null==t.priority?50:t.priority,r=0;r<e.length;r++){var i=e[r];if((null==i.priority?50:i.priority)<n)break}e.splice(r,0,t)}var r=function(e){var r=t.marks[e].spec.parseDOM;r&&r.forEach((function(t){n(t=Ii(t)),t.mark=e}))};for(var i in t.marks)r(i);var o;for(var a in t.nodes)o=void 0,(o=t.nodes[a].spec.parseDOM)&&o.forEach((function(t){n(t=Ii(t)),t.node=a}));return e},Ci.fromSchema=function(t){return t.cached.domParser||(t.cached.domParser=new Ci(t,Ci.schemaRules(t)))};var Mi={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},Ei={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ti={ol:!0,ul:!0};function Ai(t){return(t?1:0)|("full"===t?2:0)}var Oi=function(t,e,n,r,i,o,a){this.type=t,this.attrs=e,this.solid=i,this.match=o||(4&a?null:t.contentMatch),this.options=a,this.content=[],this.marks=n,this.activeMarks=Pr.none,this.pendingMarks=r,this.stashMarks=[]};Oi.prototype.findWrapping=function(t){if(!this.match){if(!this.type)return[];var e=this.type.contentMatch.fillBefore(Mr.from(t));if(!e){var n,r=this.type.contentMatch;return(n=r.findWrapping(t.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)},Oi.prototype.finish=function(t){if(!(1&this.options)){var e,n=this.content[this.content.length-1];n&&n.isText&&(e=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length)))}var r=Mr.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(Mr.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},Oi.prototype.popFromStashMark=function(t){for(var e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},Oi.prototype.applyPending=function(t){for(var e=0,n=this.pendingMarks;e<n.length;e++){var r=n[e];(this.type?this.type.allowsMarkType(r.type):Ri(r.type,t))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}};var Pi=function(t,e,n){this.parser=t,this.options=e,this.isOpen=n;var r,i=e.topNode,o=Ai(e.preserveWhitespace)|(n?4:0);r=i?new Oi(i.type,i.attrs,Pr.none,Pr.none,!0,e.topMatch||i.type.contentMatch,o):new Oi(n?null:t.schema.topNodeType,null,Pr.none,Pr.none,!0,null,o),this.nodes=[r],this.open=0,this.find=e.findPositions,this.needsBlock=!1},Li={top:{configurable:!0},currentPos:{configurable:!0}};function Di(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Ii(t){var e={};for(var n in t)e[n]=t[n];return e}function Ri(t,e){var n=e.schema.nodes,r=function(r){var i=n[r];if(i.allowsMarkType(t)){var o=[];return function t(n){o.push(n);for(var r=0;r<n.edgeCount;r++){var i=n.edge(r),a=i.type,s=i.next;if(a==e)return!0;if(o.indexOf(s)<0&&t(s))return!0}}(i.contentMatch)?{v:!0}:void 0}};for(var i in n){var o=r(i);if(o)return o.v}}Li.top.get=function(){return this.nodes[this.open]},Pi.prototype.addDOM=function(t){if(3==t.nodeType)this.addTextNode(t);else if(1==t.nodeType){var e=t.getAttribute("style"),n=e?this.readStyles(function(t){var e,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;e=n.exec(t);)r.push(e[1],e[2].trim());return r}(e)):null,r=this.top;if(null!=n)for(var i=0;i<n.length;i++)this.addPendingMark(n[i]);if(this.addElement(t),null!=n)for(var o=0;o<n.length;o++)this.removePendingMark(n[o],r)}},Pi.prototype.addTextNode=function(t){var e=t.nodeValue,n=this.top;if((n.type?n.type.inlineContent:n.content.length&&n.content[0].isInline)||/[^ \t\r\n\u000c]/.test(e)){if(1&n.options)2&n.options||(e=e.replace(/\r?\n|\r/g," "));else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],i=t.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)},Pi.prototype.addElement=function(t,e){var n,r=t.nodeName.toLowerCase();Ti.hasOwnProperty(r)&&this.parser.normalizeLists&&function(t){for(var e=t.firstChild,n=null;e;e=e.nextSibling){var r=1==e.nodeType?e.nodeName.toLowerCase():null;r&&Ti.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):"li"==r?n=e:r&&(n=null)}}(t);var i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(n=this.parser.matchTag(t,this,e));if(i?i.ignore:Ei.hasOwnProperty(r))this.findInside(t);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(t=i.skip);var o,a=this.top,s=this.needsBlock;if(Mi.hasOwnProperty(r))o=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);this.addAll(t),o&&this.sync(a),this.needsBlock=s}else this.addElementByRule(t,i,!1===i.consuming?n:null)},Pi.prototype.leafFallback=function(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))},Pi.prototype.readStyles=function(t){var e=Pr.none;t:for(var n=0;n<t.length;n+=2)for(var r=null;;){var i=this.parser.matchStyle(t[n],t[n+1],this,r);if(!i)continue t;if(i.ignore)return null;if(e=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(e),!1!==i.consuming)break;r=i}return e},Pi.prototype.addElementByRule=function(t,e,n){var r,i,o,a=this;e.node?(i=this.parser.schema.nodes[e.node]).isLeaf?this.insertNode(i.create(e.attrs))||this.leafFallback(t):r=this.enter(i,e.attrs,e.preserveWhitespace):(o=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(o));var s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((function(t){return a.insertNode(t)}));else{var u=e.contentElement;"string"==typeof u?u=t.querySelector(u):"function"==typeof u&&(u=u(t)),u||(u=t),this.findAround(t,u,!0),this.addAll(u,r)}r&&(this.sync(s),this.open--),o&&this.removePendingMark(o,s)},Pi.prototype.addAll=function(t,e,n,r){for(var i=n||0,o=n?t.childNodes[n]:t.firstChild,a=null==r?null:t.childNodes[r];o!=a;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o),e&&Mi.hasOwnProperty(o.nodeName.toLowerCase())&&this.sync(e);this.findAtPoint(t,i)},Pi.prototype.findPlace=function(t){for(var e,n,r=this.open;r>=0;r--){var i=this.nodes[r],o=i.findWrapping(t);if(o&&(!e||e.length>o.length)&&(e=o,n=i,!o.length))break;if(i.solid)break}if(!e)return!1;this.sync(n);for(var a=0;a<e.length;a++)this.enterInner(e[a],null,!1);return!0},Pi.prototype.insertNode=function(t){if(t.isInline&&this.needsBlock&&!this.top.type){var e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(t)){this.closeExtra();var n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));for(var r=n.activeMarks,i=0;i<t.marks.length;i++)n.type&&!n.type.allowsMarkType(t.marks[i].type)||(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1},Pi.prototype.enter=function(t,e,n){var r=this.findPlace(t.create(e));return r&&this.enterInner(t,e,!0,n),r},Pi.prototype.enterInner=function(t,e,n,r){this.closeExtra();var i=this.top;i.applyPending(t),i.match=i.match&&i.match.matchType(t,e);var o=null==r?-5&i.options:Ai(r);4&i.options&&0==i.content.length&&(o|=4),this.nodes.push(new Oi(t,e,i.activeMarks,i.pendingMarks,n,null,o)),this.open++},Pi.prototype.closeExtra=function(t){var e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},Pi.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Pi.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},Li.currentPos.get=function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var n=this.nodes[e].content,r=n.length-1;r>=0;r--)t+=n[r].nodeSize;e&&t++}return t},Pi.prototype.findAtPoint=function(t,e){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)},Pi.prototype.findInside=function(t){if(this.find)for(var e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)},Pi.prototype.findAround=function(t,e,n){if(t!=e&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node))e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},Pi.prototype.findInText=function(t){if(this.find)for(var e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))},Pi.prototype.matchesContext=function(t){var e=this;if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1);return function t(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=o;s--)if(t(a-1,s))return!0;return!1}var c=s>0||0==s&&i?e.nodes[s].type:r&&s>=o?r.node(s-o).type:null;if(!c||c.name!=u&&-1==c.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)},Pi.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;e--){var n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var i=this.parser.schema.nodes[r];if(i.isTextblock&&i.defaultAttrs)return i}},Pi.prototype.addPendingMark=function(t){var e=function(t,e){for(var n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)},Pi.prototype.removePendingMark=function(t,e){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);var i=r.popFromStashMark(t);i&&r.type&&r.type.allowsMarkType(i.type)&&(r.activeMarks=i.addToSet(r.activeMarks))}if(r==e)break}},Object.defineProperties(Pi.prototype,Li);var Ni=function(t,e){this.nodes=t||{},this.marks=e||{}};function zi(t){var e={};for(var n in t){var r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ji(t){return t.document||window.document}Ni.prototype.serializeFragment=function(t,e,n){var r=this;void 0===e&&(e={}),n||(n=ji(e).createDocumentFragment());var i=n,o=null;return t.forEach((function(t){if(o||t.marks.length){o||(o=[]);for(var n=0,a=0;n<o.length&&a<t.marks.length;){var s=t.marks[a];if(r.marks[s.type.name]){if(!s.eq(o[n])||!1===s.type.spec.spanning)break;n+=2,a++}else a++}for(;n<o.length;)i=o.pop(),o.pop();for(;a<t.marks.length;){var u=t.marks[a++],c=r.serializeMark(u,t.isInline,e);c&&(o.push(u,i),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(r.serializeNode(t,e))})),n},Ni.prototype.serializeNode=function(t,e){void 0===e&&(e={});var n=Ni.renderSpec(ji(e),this.nodes[t.type.name](t)),r=n.dom,i=n.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");e.onContent?e.onContent(t,i,e):this.serializeFragment(t.content,e,i)}return r},Ni.prototype.serializeNodeAndMarks=function(t,e){void 0===e&&(e={});for(var n=this.serializeNode(t,e),r=t.marks.length-1;r>=0;r--){var i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n},Ni.prototype.serializeMark=function(t,e,n){void 0===n&&(n={});var r=this.marks[t.type.name];return r&&Ni.renderSpec(ji(n),r(t,e))},Ni.renderSpec=function(t,e,n){if(void 0===n&&(n=null),"string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;var r=e[0],i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));var o=null,a=n?t.createElementNS(n,r):t.createElement(r),s=e[1],u=1;if(s&&"object"==kr(s)&&null==s.nodeType&&!Array.isArray(s))for(var c in u=2,s)if(null!=s[c]){var l=c.indexOf(" ");l>0?a.setAttributeNS(c.slice(0,l),c.slice(l+1),s[c]):a.setAttribute(c,s[c])}for(var h=u;h<e.length;h++){var f=e[h];if(0===f){if(h<e.length-1||h>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var d=Ni.renderSpec(t,f,n),p=d.dom,m=d.contentDOM;if(a.appendChild(p),m){if(o)throw new RangeError("Multiple content holes");o=m}}return{dom:a,contentDOM:o}},Ni.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new Ni(this.nodesFromSchema(t),this.marksFromSchema(t)))},Ni.nodesFromSchema=function(t){var e=zi(t.nodes);return e.text||(e.text=function(t){return t.text}),e},Ni.marksFromSchema=function(t){return zi(t.marks)};var Bi=Math.pow(2,16);function Fi(t){return 65535&t}var qi=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.pos=t,this.deleted=e,this.recover=n},Vi=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};Vi.prototype.recover=function(t){var e=0,n=Fi(t);if(!this.inverted)for(var r=0;r<n;r++)e+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+e+function(t){return(t-(65535&t))/Bi}(t)},Vi.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},Vi.prototype.map=function(t,e){return void 0===e&&(e=1),this._map(t,e,!0)},Vi.prototype._map=function(t,e,n){for(var r=0,i=this.inverted?2:1,o=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>t)break;var u=this.ranges[a+i],c=this.ranges[a+o],l=s+u;if(t<=l){var h=s+r+((u?t==s?-1:t==l?1:e:e)<0?0:c);if(n)return h;var f=t==(e<0?s:l)?null:a/3+(t-s)*Bi;return new qi(h,e<0?t!=s:t!=l,f)}r+=c-u}return n?t+r:new qi(t+r)},Vi.prototype.touches=function(t,e){for(var n=0,r=Fi(e),i=this.inverted?2:1,o=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>t)break;var u=this.ranges[a+i];if(t<=s+u&&a==3*r)return!0;n+=this.ranges[a+o]-u}return!1},Vi.prototype.forEach=function(t){for(var e=this.inverted?2:1,n=this.inverted?1:2,r=0,i=0;r<this.ranges.length;r+=3){var o=this.ranges[r],a=o-(this.inverted?i:0),s=o+(this.inverted?0:i),u=this.ranges[r+e],c=this.ranges[r+n];t(a,a+u,s,s+c),i+=c-u}},Vi.prototype.invert=function(){return new Vi(this.ranges,!this.inverted)},Vi.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},Vi.offset=function(t){return 0==t?Vi.empty:new Vi(t<0?[0,-t,0]:[0,0,t])},Vi.empty=new Vi([]);var Ui=function(t,e,n,r){this.maps=t||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=e};function Hi(t){var e=Error.call(this,t);return e.__proto__=Hi.prototype,e}Ui.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.maps.length),new Ui(this.maps,this.mirror,t,e)},Ui.prototype.copy=function(){return new Ui(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},Ui.prototype.appendMap=function(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)},Ui.prototype.appendMapping=function(t){for(var e=0,n=this.maps.length;e<t.maps.length;e++){var r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:null)}},Ui.prototype.getMirror=function(t){if(this.mirror)for(var e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]},Ui.prototype.setMirror=function(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)},Ui.prototype.appendMappingInverted=function(t){for(var e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){var r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:null)}},Ui.prototype.invert=function(){var t=new Ui;return t.appendMappingInverted(this),t},Ui.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t},Ui.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},Ui.prototype._map=function(t,e,n){for(var r=!1,i=this.from;i<this.to;i++){var o=this.maps[i].mapResult(t,e);if(null!=o.recover){var a=this.getMirror(i);if(null!=a&&a>i&&a<this.to){i=a,t=this.maps[a].recover(o.recover);continue}}o.deleted&&(r=!0),t=o.pos}return n?t:new qi(t,r)},Hi.prototype=Object.create(Error.prototype),Hi.prototype.constructor=Hi,Hi.prototype.name="TransformError";var Wi=function(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Ui},$i={before:{configurable:!0},docChanged:{configurable:!0}};function Zi(){throw new Error("Override me")}$i.before.get=function(){return this.docs.length?this.docs[0]:this.doc},Wi.prototype.step=function(t){var e=this.maybeStep(t);if(e.failed)throw new Hi(e.failed);return this},Wi.prototype.maybeStep=function(t){var e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e},$i.docChanged.get=function(){return this.steps.length>0},Wi.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(Wi.prototype,$i);var Yi=Object.create(null),Gi=function(){};Gi.prototype.apply=function(t){return Zi()},Gi.prototype.getMap=function(){return Vi.empty},Gi.prototype.invert=function(t){return Zi()},Gi.prototype.map=function(t){return Zi()},Gi.prototype.merge=function(t){return null},Gi.prototype.toJSON=function(){return Zi()},Gi.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=Yi[e.stepType];if(!n)throw new RangeError("No step type "+e.stepType+" defined");return n.fromJSON(t,e)},Gi.jsonID=function(t,e){if(t in Yi)throw new RangeError("Duplicate use of step JSON ID "+t);return Yi[t]=e,e.prototype.jsonID=t,e};var Ki=function(t,e){this.doc=t,this.failed=e};Ki.ok=function(t){return new Ki(t,null)},Ki.fail=function(t){return new Ki(null,t)},Ki.fromReplace=function(t,e,n,r){try{return Ki.ok(t.replace(e,n,r))}catch(i){if(i instanceof Lr)return Ki.fail(i.message);throw i}};var Ji=function(t){function e(e,n,r,i){t.call(this),this.from=e,this.to=n,this.slice=r,this.structure=!!i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&Qi(t,this.from,this.to)?Ki.fail("Structure replace would overwrite content"):Ki.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new Vi([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure!=this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var n=this.slice.size+t.slice.size==0?Dr.empty:new Dr(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}var r=this.slice.size+t.slice.size==0?Dr.empty:new Dr(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),r,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,Dr.fromJSON(t,n.slice),!!n.structure)},e}(Gi);Gi.jsonID("replace",Ji);var Xi=function(t){function e(e,n,r,i,o,a,s){t.call(this),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=!!s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(Qi(t,this.from,this.gapFrom)||Qi(t,this.gapTo,this.to)))return Ki.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return Ki.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,e.content);return n?Ki.fromReplace(t,this.from,this.to,n):Ki.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new Vi([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deleted&&r.deleted||i<n.pos||o>r.pos?null:new e(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,Dr.fromJSON(t,n.slice),n.insert,!!n.structure)},e}(Gi);function Qi(t,e,n){for(var r=t.resolve(e),i=n-e,o=r.depth;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0)for(var a=r.node(o).maybeChild(r.indexAfter(o));i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}return!1}function to(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function eo(t){for(var e=t.parent.content.cutByIndex(t.startIndex,t.endIndex),n=t.depth;;--n){var r=t.$from.node(n),i=t.$from.index(n),o=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(i,o,e))return n;if(0==n||r.type.spec.isolating||!to(r,i,o))break}}function no(t,e,n,r){void 0===r&&(r=t);var i=function(t,e){var n=t.parent,r=t.startIndex,i=t.endIndex,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;var a=o.length?o[0]:e;return n.canReplaceWith(r,i,a)?o:null}(t,e),o=i&&function(t,e){var n=t.parent,r=t.startIndex,i=t.endIndex,o=n.child(r),a=e.contentMatch.findWrapping(o.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:e).contentMatch,u=r;s&&u<i;u++)s=s.matchType(n.child(u).type);if(!s||!s.validEnd)return null;return a}(r,e);return o?i.map(ro).concat({type:e,attrs:n}).concat(o.map(ro)):null}function ro(t){return{type:t,attrs:null}}function io(t,e,n,r){void 0===n&&(n=1);var i=t.resolve(e),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(var s=i.depth-1,u=n-2;s>o;s--,u--){var c=i.node(s),l=i.index(s);if(c.type.spec.isolating)return!1;var h=c.content.cutByIndex(l,c.childCount),f=r&&r[u]||c;if(f!=c&&(h=h.replaceChild(0,f.type.create(f.attrs))),!c.canReplace(l+1,c.childCount)||!f.type.validContent(h))return!1}var d=i.indexAfter(o),p=r&&r[0];return i.node(o).canReplaceWith(d,d,p?p.type:i.node(o+1).type)}function oo(t,e){var n=t.resolve(e),r=n.index();return ao(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function ao(t,e){return t&&e&&!t.isLeaf&&t.canAppend(e)}function so(t,e,n){void 0===n&&(n=-1);for(var r=t.resolve(e),i=r.depth;;i--){var o=void 0,a=void 0,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&ao(o,a)&&r.node(i).canReplace(s,s+1))return e;if(0==i)break;e=n<0?r.before(i):r.after(i)}}function uo(t,e,n){var r=t.resolve(e);if(!n.content.size)return e;for(var i=n.content,o=0;o<n.openStart;o++)i=i.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);if(1==a?r.node(s).canReplace(c,c,i):r.node(s).contentMatchAt(c).findWrapping(i.firstChild.type))return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null}function co(t,e,n){for(var r=[],i=0;i<t.childCount;i++){var o=t.child(i);o.content.size&&(o=o.copy(co(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return Mr.fromArray(r)}Gi.jsonID("replaceAround",Xi),Wi.prototype.lift=function(t,e){for(var n=t.$from,r=t.$to,i=t.depth,o=n.before(i+1),a=r.after(i+1),s=o,u=a,c=Mr.empty,l=0,h=i,f=!1;h>e;h--)f||n.index(h)>0?(f=!0,c=Mr.from(n.node(h).copy(c)),l++):s--;for(var d=Mr.empty,p=0,m=i,v=!1;m>e;m--)v||r.after(m+1)<r.end(m)?(v=!0,d=Mr.from(r.node(m).copy(d)),p++):u++;return this.step(new Xi(s,u,o,a,new Dr(c.append(d),l,p),c.size-l,!0))},Wi.prototype.wrap=function(t,e){for(var n=Mr.empty,r=e.length-1;r>=0;r--)n=Mr.from(e[r].type.create(e[r].attrs,n));var i=t.start,o=t.end;return this.step(new Xi(i,o,i,o,new Dr(n,0,0),e.length,!0))},Wi.prototype.setBlockType=function(t,e,n,r){var i=this;if(void 0===e&&(e=t),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var o=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(n,r)&&function(t,e,n){var r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(i.doc,i.mapping.slice(o).map(e),n)){i.clearIncompatible(i.mapping.slice(o).map(e,1),n);var a=i.mapping.slice(o),s=a.map(e,1),u=a.map(e+t.nodeSize,1);return i.step(new Xi(s,u,s+1,u-1,new Dr(Mr.from(n.create(r,null,t.marks)),0,0),1,!0)),!1}})),this},Wi.prototype.setNodeMarkup=function(t,e,n,r){var i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");e||(e=i.type);var o=e.create(n,null,r||i.marks);if(i.isLeaf)return this.replaceWith(t,t+i.nodeSize,o);if(!e.validContent(i.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new Xi(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Dr(Mr.from(o),0,0),1,!0))},Wi.prototype.split=function(t,e,n){void 0===e&&(e=1);for(var r=this.doc.resolve(t),i=Mr.empty,o=Mr.empty,a=r.depth,s=r.depth-e,u=e-1;a>s;a--,u--){i=Mr.from(r.node(a).copy(i));var c=n&&n[u];o=Mr.from(c?c.type.create(c.attrs,o):r.node(a).copy(o))}return this.step(new Ji(t,t,new Dr(i.append(o),e,e),!0))},Wi.prototype.join=function(t,e){void 0===e&&(e=1);var n=new Ji(t-e,t+e,Dr.empty,!0);return this.step(n)};var lo=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new Dr(co(n.content,(function(t,n){return t.isAtom&&n.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),i),n.openStart,n.openEnd);return Ki.fromReplace(t,this.from,this.to,o)},e.prototype.invert=function(){return new ho(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(Gi);Gi.jsonID("addMark",lo);var ho=function(t){function e(e,n,r){t.call(this),this.from=e,this.to=n,this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,n=t.slice(this.from,this.to),r=new Dr(co(n.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),n.openStart,n.openEnd);return Ki.fromReplace(t,this.from,this.to,r)},e.prototype.invert=function(){return new lo(this.from,this.to,this.mark)},e.prototype.map=function(t){var n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))},e}(Gi);function fo(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}Gi.jsonID("removeMark",ho),Wi.prototype.addMark=function(t,e,n){var r=this,i=[],o=[],a=null,s=null;return this.doc.nodesBetween(t,e,(function(r,u,c){if(r.isInline){var l=r.marks;if(!n.isInSet(l)&&c.type.allowsMarkType(n.type)){for(var h=Math.max(u,t),f=Math.min(u+r.nodeSize,e),d=n.addToSet(l),p=0;p<l.length;p++)l[p].isInSet(d)||(a&&a.to==h&&a.mark.eq(l[p])?a.to=f:i.push(a=new ho(h,f,l[p])));s&&s.to==h?s.to=f:o.push(s=new lo(h,f,n))}}})),i.forEach((function(t){return r.step(t)})),o.forEach((function(t){return r.step(t)})),this},Wi.prototype.removeMark=function(t,e,n){var r=this;void 0===n&&(n=null);var i=[],o=0;return this.doc.nodesBetween(t,e,(function(r,a){if(r.isInline){o++;var s=null;if(n instanceof xi)for(var u,c=r.marks;u=n.isInSet(c);)(s||(s=[])).push(u),c=u.removeFromSet(c);else n?n.isInSet(r.marks)&&(s=[n]):s=r.marks;if(s&&s.length)for(var l=Math.min(a+r.nodeSize,e),h=0;h<s.length;h++){for(var f=s[h],d=void 0,p=0;p<i.length;p++){var m=i[p];m.step==o-1&&f.eq(i[p].style)&&(d=m)}d?(d.to=l,d.step=o):i.push({style:f,from:Math.max(a,t),to:l,step:o})}}})),i.forEach((function(t){return r.step(new ho(t.from,t.to,t.style))})),this},Wi.prototype.clearIncompatible=function(t,e,n){void 0===n&&(n=e.contentMatch);for(var r=this.doc.nodeAt(t),i=[],o=t+1,a=0;a<r.childCount;a++){var s=r.child(a),u=o+s.nodeSize,c=n.matchType(s.type,s.attrs);if(c){n=c;for(var l=0;l<s.marks.length;l++)e.allowsMarkType(s.marks[l].type)||this.step(new ho(o,u,s.marks[l]))}else i.push(new Ji(o,u,Dr.empty));o=u}if(!n.validEnd){var h=n.fillBefore(Mr.empty,!0);this.replace(o,o,new Dr(h,0,0))}for(var f=i.length-1;f>=0;f--)this.step(i[f]);return this},Wi.prototype.replace=function(t,e,n){void 0===e&&(e=t),void 0===n&&(n=Dr.empty);var r=function(t,e,n,r){if(void 0===n&&(n=e),void 0===r&&(r=Dr.empty),e==n&&!r.size)return null;var i=t.resolve(e),o=t.resolve(n);return fo(i,o,r)?new Ji(e,n,r):new po(i,o,r).fit()}(this.doc,t,e,n);return r&&this.step(r),this},Wi.prototype.replaceWith=function(t,e,n){return this.replace(t,e,new Dr(Mr.from(n),0,0))},Wi.prototype.delete=function(t,e){return this.replace(t,e,Dr.empty)},Wi.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var po=function(t,e,n){this.$to=e,this.$from=t,this.unplaced=n,this.frontier=[];for(var r=0;r<=t.depth;r++){var i=t.node(r);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(r))})}this.placed=Mr.empty;for(var o=t.depth;o>0;o--)this.placed=Mr.from(t.node(o).copy(this.placed))},mo={depth:{configurable:!0}};function vo(t,e,n){return 0==e?t.cutByIndex(n):t.replaceChild(0,t.firstChild.copy(vo(t.firstChild.content,e-1,n)))}function go(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(go(t.lastChild.content,e-1,n)))}function yo(t,e){for(var n=0;n<e;n++)t=t.firstChild.content;return t}function bo(t,e,n){if(e<=0)return t;var r=t.content;return e>1&&(r=r.replaceChild(0,bo(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Mr.empty,!0)))),t.copy(r)}function _o(t,e,n,r,i){var o=t.node(e),a=i?t.indexAfter(e):t.index(e);if(a==o.childCount&&!n.compatibleContent(o.type))return null;var s=r.fillBefore(o.content,!0,a);return s&&!function(t,e,n){for(var r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,o.content,a)?s:null}function wo(t,e,n,r,i){if(e<n){var o=t.firstChild;t=t.replaceChild(0,o.copy(wo(o.content,e+1,n,r,o)))}if(e>r){var a=i.contentMatchAt(0),s=a.fillBefore(t).append(t);t=s.append(a.matchFragment(s).fillBefore(Mr.empty,!0))}return t}function xo(t,e){for(var n=[],r=Math.min(t.depth,e.depth);r>=0;r--){var i=t.start(r);if(i<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;i==e.start(r)&&n.push(r)}return n}function ko(t){return(ko="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}mo.depth.get=function(){return this.frontier.length-1},po.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;for(var o=this.placed,a=r.depth,s=i.depth;a&&s&&1==o.childCount;)o=o.firstChild.content,a--,s--;var u=new Dr(o,a,s);return e>-1?new Xi(r.pos,e,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new Ji(r.pos,i.pos,u):void 0},po.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--)for(var n=void 0,r=(e?(n=yo(this.unplaced.content,e-1).firstChild).content:this.unplaced.content).firstChild,i=this.depth;i>=0;i--){var o=this.frontier[i],a=o.type,s=o.match,u=void 0,c=void 0;if(1==t&&(r?s.matchType(r.type)||(c=s.fillBefore(Mr.from(r),!1)):a.compatibleContent(n.type)))return{sliceDepth:e,frontierDepth:i,parent:n,inject:c};if(2==t&&r&&(u=s.findWrapping(r.type)))return{sliceDepth:e,frontierDepth:i,parent:n,wrap:u};if(n&&s.matchType(n.type))break}},po.prototype.openMore=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,i=yo(e,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new Dr(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)},po.prototype.dropNode=function(){var t=this.unplaced,e=t.content,n=t.openStart,r=t.openEnd,i=yo(e,n);if(i.childCount<=1&&n>0){var o=e.size-n<=n+i.size;this.unplaced=new Dr(vo(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new Dr(vo(e,n,1),n,r)},po.prototype.placeNodes=function(t){for(var e=t.sliceDepth,n=t.frontierDepth,r=t.parent,i=t.inject,o=t.wrap;this.depth>n;)this.closeFrontierNode();if(o)for(var a=0;a<o.length;a++)this.openFrontierNode(o[a]);var s=this.unplaced,u=r?r.content:s.content,c=s.openStart-e,l=0,h=[],f=this.frontier[n],d=f.match,p=f.type;if(i){for(var m=0;m<i.childCount;m++)h.push(i.child(m));d=d.matchFragment(i)}for(var v=u.size+e-(s.content.size-s.openEnd);l<u.childCount;){var g=u.child(l),y=d.matchType(g.type);if(!y)break;(++l>1||0==c||g.content.size)&&(d=y,h.push(bo(g.mark(p.allowedMarks(g.marks)),1==l?c:0,l==u.childCount?v:-1)))}var b=l==u.childCount;b||(v=-1),this.placed=go(this.placed,n,Mr.from(h)),this.frontier[n].match=d,b&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var _=0,w=u;_<v;_++){var x=w.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),w=x.content}this.unplaced=b?0==e?Dr.empty:new Dr(vo(s.content,e-1,1),e-1,v<0?s.openEnd:e-1):new Dr(vo(s.content,e,l),s.openStart,s.openEnd)},po.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock||this.$to.end()==this.$to.pos)return-1;var t,e=this.frontier[this.depth];if(!e.type.isTextblock||!_o(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.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},po.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var n=this.frontier[e],r=n.match,i=n.type,o=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),a=_o(t,e,i,r,o);if(a){for(var s=e-1;s>=0;s--){var u=this.frontier[s],c=u.match,l=_o(t,s,u.type,c,!0);if(!l||l.childCount)continue t}return{depth:e,fit:a,move:o?t.doc.resolve(t.after(e+1)):t}}}},po.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=go(this.placed,e.depth,e.fit)),t=e.move;for(var n=e.depth+1;n<=t.depth;n++){var r=t.node(n),i=r.type.contentMatch.fillBefore(r.content,!0,t.index(n));this.openFrontierNode(r.type,r.attrs,i)}return t},po.prototype.openFrontierNode=function(t,e,n){var r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=go(this.placed,this.depth,Mr.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})},po.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(Mr.empty,!0);t.childCount&&(this.placed=go(this.placed,this.frontier.length,t))},Object.defineProperties(po.prototype,mo),Wi.prototype.replaceRange=function(t,e,n){if(!n.size)return this.deleteRange(t,e);var r=this.doc.resolve(t),i=this.doc.resolve(e);if(fo(r,i,n))return this.step(new Ji(t,e,n));var o=xo(r,this.doc.resolve(e));0==o[o.length-1]&&o.pop();var a=-(r.depth+1);o.unshift(a);for(var s=r.depth,u=r.pos-1;s>0;s--,u--){var c=r.node(s).type.spec;if(c.defining||c.isolating)break;o.indexOf(s)>-1?a=s:r.before(s)==u&&o.splice(1,0,-s)}for(var l=o.indexOf(a),h=[],f=n.openStart,d=n.content,p=0;;p++){var m=d.firstChild;if(h.push(m),p==n.openStart)break;d=m.content}f>0&&h[f-1].type.spec.defining&&r.node(l).type!=h[f-1].type?f-=1:f>=2&&h[f-1].isTextblock&&h[f-2].type.spec.defining&&r.node(l).type!=h[f-2].type&&(f-=2);for(var v=n.openStart;v>=0;v--){var g=(v+f+1)%(n.openStart+1),y=h[g];if(y)for(var b=0;b<o.length;b++){var _=o[(b+l)%o.length],w=!0;_<0&&(w=!1,_=-_);var x=r.node(_-1),k=r.index(_-1);if(x.canReplaceWith(k,k,y.type,y.marks))return this.replace(r.before(_),w?i.after(_):e,new Dr(wo(n.content,0,n.openStart,g),g,n.openEnd))}}for(var S=this.steps.length,C=o.length-1;C>=0&&(this.replace(t,e,n),!(this.steps.length>S));C--){var M=o[C];C<0||(t=r.before(M),e=i.after(M))}return this},Wi.prototype.replaceRangeWith=function(t,e,n){if(!n.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var r=function(t,e,n){var r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(var i=r.depth-1;i>=0;i--){var o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>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}}(this.doc,t,n.type);null!=r&&(t=e=r)}return this.replaceRange(t,e,new Dr(Mr.from(n),0,0))},Wi.prototype.deleteRange=function(t,e){for(var n=this.doc.resolve(t),r=this.doc.resolve(e),i=xo(n,r),o=0;o<i.length;o++){var a=i[o],s=o==i.length-1;if(s&&0==a||n.node(a).type.contentMatch.validEnd)return this.delete(n.start(a),r.end(a));if(a>0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var u=1;u<=n.depth&&u<=r.depth;u++)if(t-n.start(u)==n.depth-u&&e>n.end(u)&&r.end(u)-e!=r.depth-u)return this.delete(n.before(u),e);return this.delete(t,e)};var So=Object.create(null),Co=function(t,e,n){this.ranges=n||[new Eo(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},Mo={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};Mo.anchor.get=function(){return this.$anchor.pos},Mo.head.get=function(){return this.$head.pos},Mo.from.get=function(){return this.$from.pos},Mo.to.get=function(){return this.$to.pos},Mo.$from.get=function(){return this.ranges[0].$from},Mo.$to.get=function(){return this.ranges[0].$to},Mo.empty.get=function(){for(var t=this.ranges,e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0},Co.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},Co.prototype.replace=function(t,e){void 0===e&&(e=Dr.empty);for(var n=e.content.lastChild,r=null,i=0;i<e.openEnd;i++)r=n,n=n.lastChild;for(var o=t.steps.length,a=this.ranges,s=0;s<a.length;s++){var u=a[s],c=u.$from,l=u.$to,h=t.mapping.slice(o);t.replaceRange(h.map(c.pos),h.map(l.pos),s?Dr.empty:e),0==s&&Ro(t,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}},Co.prototype.replaceWith=function(t,e){for(var n=t.steps.length,r=this.ranges,i=0;i<r.length;i++){var o=r[i],a=o.$from,s=o.$to,u=t.mapping.slice(n),c=u.map(a.pos),l=u.map(s.pos);i?t.deleteRange(c,l):(t.replaceRangeWith(c,l,e),Ro(t,n,e.isInline?-1:1))}},Co.findFrom=function(t,e,n){var r=t.parent.inlineContent?new To(t):Io(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(var i=t.depth-1;i>=0;i--){var o=e<0?Io(t.node(0),t.node(i),t.before(i+1),t.index(i),e,n):Io(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,e,n);if(o)return o}},Co.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new Lo(t.node(0))},Co.atStart=function(t){return Io(t,t,0,0,1)||new Lo(t)},Co.atEnd=function(t){return Io(t,t,t.content.size,t.childCount,-1)||new Lo(t)},Co.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=So[e.type];if(!n)throw new RangeError("No selection type "+e.type+" defined");return n.fromJSON(t,e)},Co.jsonID=function(t,e){if(t in So)throw new RangeError("Duplicate use of selection JSON ID "+t);return So[t]=e,e.prototype.jsonID=t,e},Co.prototype.getBookmark=function(){return To.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(Co.prototype,Mo),Co.prototype.visible=!0;var Eo=function(t,e){this.$from=t,this.$to=e},To=function(t){function e(e,n){void 0===n&&(n=e),t.call(this,e,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(n,r){var i=n.resolve(r.map(this.head));if(!i.parent.inlineContent)return t.near(i);var o=n.resolve(r.map(this.anchor));return new e(o.parent.inlineContent?o:i,i)},e.prototype.replace=function(e,n){if(void 0===n&&(n=Dr.empty),t.prototype.replace.call(this,e,n),n==Dr.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new Ao(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))},e.create=function(t,e,n){void 0===n&&(n=e);var r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))},e.between=function(n,r,i){var o=n.pos-r.pos;if(i&&!o||(i=o>=0?1:-1),!r.parent.inlineContent){var a=t.findFrom(r,i,!0)||t.findFrom(r,-i,!0);if(!a)return t.near(r,i);r=a.$head}return n.parent.inlineContent||(0==o||(n=(t.findFrom(n,-i,!0)||t.findFrom(n,i,!0)).$anchor).pos<r.pos!=o<0)&&(n=r),new e(n,r)},Object.defineProperties(e.prototype,n),e}(Co);Co.jsonID("text",To);var Ao=function(t,e){this.anchor=t,this.head=e};Ao.prototype.map=function(t){return new Ao(t.map(this.anchor),t.map(this.head))},Ao.prototype.resolve=function(t){return To.between(t.resolve(this.anchor),t.resolve(this.head))};var Oo=function(t){function e(e){var n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);t.call(this,e,r),this.node=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(n,r){var i=r.mapResult(this.anchor),o=i.deleted,a=i.pos,s=n.resolve(a);return o?t.near(s):new e(s)},e.prototype.content=function(){return new Dr(Mr.from(this.node),0,0)},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor},e.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},e.prototype.getBookmark=function(){return new Po(this.anchor)},e.fromJSON=function(t,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(n.anchor))},e.create=function(t,e){return new this(t.resolve(e))},e.isSelectable=function(t){return!t.isText&&!1!==t.type.spec.selectable},e}(Co);Oo.prototype.visible=!1,Co.jsonID("node",Oo);var Po=function(t){this.anchor=t};Po.prototype.map=function(t){var e=t.mapResult(this.anchor),n=e.deleted,r=e.pos;return n?new Ao(r,r):new Po(r)},Po.prototype.resolve=function(t){var e=t.resolve(this.anchor),n=e.nodeAfter;return n&&Oo.isSelectable(n)?new Oo(e):Co.near(e)};var Lo=function(t){function e(e){t.call(this,e.resolve(0),e.resolve(e.content.size))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.replace=function(e,n){if(void 0===n&&(n=Dr.empty),n==Dr.empty){e.delete(0,e.doc.content.size);var r=t.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else t.prototype.replace.call(this,e,n)},e.prototype.toJSON=function(){return{type:"all"}},e.fromJSON=function(t){return new e(t)},e.prototype.map=function(t){return new e(t)},e.prototype.eq=function(t){return t instanceof e},e.prototype.getBookmark=function(){return Do},e}(Co);Co.jsonID("all",Lo);var Do={map:function(){return this},resolve:function(t){return new Lo(t)}};function Io(t,e,n,r,i,o){if(e.inlineContent)return To.create(t,n);for(var a=r-(i>0?0:1);i>0?a<e.childCount:a>=0;a+=i){var s=e.child(a);if(s.isAtom){if(!o&&Oo.isSelectable(s))return Oo.create(t,n-(i<0?s.nodeSize:0))}else{var u=Io(t,s,n+i,i<0?s.childCount:0,i,o);if(u)return u}n+=s.nodeSize*i}}function Ro(t,e,n){var r=t.steps.length-1;if(!(r<e)){var i,o=t.steps[r];if(o instanceof Ji||o instanceof Xi)t.mapping.maps[r].forEach((function(t,e,n,r){null==i&&(i=r)})),t.setSelection(Co.near(t.doc.resolve(i),n))}}var No=function(t){function e(e){t.call(this,e.doc),this.time=Date.now(),this.curSelection=e.selection,this.curSelectionFor=0,this.storedMarks=e.storedMarks,this.updated=0,this.meta=Object.create(null)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return n.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},e.prototype.setSelection=function(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=2,this},e.prototype.ensureMarks=function(t){return Pr.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(e,n){t.prototype.addStep.call(this,e,n),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var n=this.selection;return!1!==e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Pr.none))),n.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,n){void 0===n&&(n=e);var r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();if(!t)return this.deleteRange(e,n);var i=this.storedMarks;if(!i){var o=this.doc.resolve(e);i=n==e?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(Co.near(this.selection.$to)),this},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},n.isGeneric.get=function(){for(var t in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,n),e}(Wi);function zo(t,e){return e&&t?t.bind(e):t}var jo=function(t,e,n){this.name=t,this.init=zo(e.init,n),this.apply=zo(e.apply,n)},Bo=[new jo("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new jo("selection",{init:function(t,e){return t.selection||Co.atStart(e.doc)},apply:function(t){return t.selection}}),new jo("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new jo("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],Fo=function(t,e){var n=this;this.schema=t,this.fields=Bo.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach((function(t){if(n.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");n.plugins.push(t),n.pluginsByKey[t.key]=t,t.spec.state&&n.fields.push(new jo(t.key,t.spec.state,t))}))},qo=function(t){this.config=t},Vo={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Vo.schema.get=function(){return this.config.schema},Vo.plugins.get=function(){return this.config.plugins},qo.prototype.apply=function(t){return this.applyTransaction(t).state},qo.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=e){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,t,this))return!1}return!0},qo.prototype.applyTransaction=function(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};for(var e=[t],n=this.applyInner(t),r=null;;){for(var i=!1,o=0;o<this.config.plugins.length;o++){var a=this.config.plugins[o];if(a.spec.appendTransaction){var s=r?r[o].n:0,u=r?r[o].state:this,c=s<e.length&&a.spec.appendTransaction.call(a,s?e.slice(s):e,u,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(var l=0;l<this.config.plugins.length;l++)r.push(l<o?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}},qo.prototype.applyInner=function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var e=new qo(this.config),n=this.config.fields,r=0;r<n.length;r++){var i=n[r];e[i.name]=i.apply(t,this[i.name],this,e)}for(var o=0;o<Uo.length;o++)Uo[o](this,t,e);return e},Vo.tr.get=function(){return new No(this)},qo.create=function(t){for(var e=new Fo(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new qo(e),r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n},qo.prototype.reconfigure=function(t){for(var e=new Fo(this.schema,t.plugins),n=e.fields,r=new qo(e),i=0;i<n.length;i++){var o=n[i].name;r[o]=this.hasOwnProperty(o)?this[o]:n[i].init(t,r)}return r},qo.prototype.toJSON=function(t){var e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((function(t){return t.toJSON()}))),t&&"object"==ko(t))for(var n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=t[n],i=r.spec.state;i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e},qo.fromJSON=function(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var r=new Fo(t.schema,t.plugins),i=new qo(r);return r.fields.forEach((function(r){if("doc"==r.name)i.doc=ti.fromJSON(t.schema,e.doc);else if("selection"==r.name)i.selection=Co.fromJSON(i.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(i.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(var o in n){var a=n[o],s=a.spec.state;if(a.key==r.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(e,o))return void(i[r.name]=s.fromJSON.call(a,t,e[o],i))}i[r.name]=r.init(t,i)}})),i},qo.addApplyListener=function(t){Uo.push(t)},qo.removeApplyListener=function(t){var e=Uo.indexOf(t);e>-1&&Uo.splice(e,1)},Object.defineProperties(qo.prototype,Vo);var Uo=[];function Ho(t,e,n){for(var r in t){var i=t[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=Ho(i,e,{})),n[r]=i}return n}var Wo=function(t){this.props={},t.props&&Ho(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:Zo("plugin")};Wo.prototype.getState=function(t){return t[this.key]};var $o=Object.create(null);function Zo(t){return t in $o?t+"$"+ ++$o[t]:($o[t]=0,t+"$")}var Yo=function(t){void 0===t&&(t="key"),this.key=Zo(t)};Yo.prototype.get=function(t){return t.config.pluginsByKey[this.key]},Yo.prototype.getState=function(t){return t[this.key]};var Go={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var Ko=/Edge\/(\d+)/.exec(navigator.userAgent),Jo=/MSIE \d/.test(navigator.userAgent),Xo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);Go.mac=/Mac/.test(navigator.platform);var Qo=Go.ie=!!(Jo||Xo||Ko);Go.ie_version=Jo?document.documentMode||6:Xo?+Xo[1]:Ko?+Ko[1]:null,Go.gecko=!Qo&&/gecko\/(\d+)/i.test(navigator.userAgent),Go.gecko_version=Go.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var ta=!Qo&&/Chrome\/(\d+)/.exec(navigator.userAgent);Go.chrome=!!ta,Go.chrome_version=ta&&+ta[1],Go.safari=!Qo&&/Apple Computer/.test(navigator.vendor),Go.ios=Go.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),Go.android=/Android \d/.test(navigator.userAgent),Go.webkit="webkitFontSmoothing"in document.documentElement.style,Go.webkit_version=Go.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var ea=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},na=function(t){var e=t.parentNode;return e&&11==e.nodeType?e.host:e},ra=null,ia=function(t,e,n){var r=ra||(ra=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},oa=function(t,e,n,r){return n&&(sa(t,e,n,r,-1)||sa(t,e,n,r,1))},aa=/^(img|br|input|textarea|hr)$/i;function sa(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:ua(t))){var o=t.parentNode;if(1!=o.nodeType||ca(t)||aa.test(t.nodeName)||"false"==t.contentEditable)return!1;e=ea(t)+(i<0?0:1),t=o}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(i<0?-1:0)]).contentEditable)return!1;e=i<0?ua(t):0}}}function ua(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function ca(t){for(var e,n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var la=function(t){var e=t.isCollapsed;return e&&Go.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function ha(t,e){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function fa(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function da(t,e){return"number"==typeof t?t:t[e]}function pa(t){var e=t.getBoundingClientRect();return{left:e.left,right:e.left+t.clientWidth,top:e.top,bottom:e.top+t.clientHeight}}function ma(t,e,n){for(var r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument,a=n||t.dom;a;a=na(a))if(1==a.nodeType){var s=a==o.body||1!=a.nodeType,u=s?fa(o):pa(a),c=0,l=0;if(e.top<u.top+da(r,"top")?l=-(u.top-e.top+da(i,"top")):e.bottom>u.bottom-da(r,"bottom")&&(l=e.bottom-u.bottom+da(i,"bottom")),e.left<u.left+da(r,"left")?c=-(u.left-e.left+da(i,"left")):e.right>u.right-da(r,"right")&&(c=e.right-u.right+da(i,"right")),c||l)if(s)o.defaultView.scrollBy(c,l);else{var h=a.scrollLeft,f=a.scrollTop;l&&(a.scrollTop+=l),c&&(a.scrollLeft+=c);var d=a.scrollLeft-h,p=a.scrollTop-f;e={left:e.left-d,top:e.top-p,right:e.right-d,bottom:e.bottom-p}}if(s)break}}function va(t){for(var e=[],n=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=n);t=na(t));return e}function ga(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=r.dom,o=r.top,a=r.left;i.scrollTop!=o+e&&(i.scrollTop=o+e),i.scrollLeft!=a&&(i.scrollLeft=a)}}var ya=null;function ba(t,e){for(var n,r,i=2e8,o=0,a=e.top,s=e.top,u=t.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=ia(u).getClientRects()}for(var h=0;h<l.length;h++){var f=l[h];if(f.top<=a&&f.bottom>=s){a=Math.max(f.bottom,a),s=Math.min(f.top,s);var d=f.left>e.left?f.left-e.left:f.right<e.left?e.left-f.right:0;if(d<i){n=u,i=d,r=d&&3==n.nodeType?{left:f.right<e.left?f.right:f.left,top:e.top}:e,1==u.nodeType&&d&&(o=c+(e.left>=(f.left+f.right)/2?1:0));continue}}!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(o=c+1)}}return n&&3==n.nodeType?function(t,e){for(var n=t.nodeValue.length,r=document.createRange(),i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);var o=ka(r,1);if(o.top!=o.bottom&&_a(e,o))return{node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:t,offset:o}:ba(n,r)}function _a(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function wa(t,e,n){var r=t.childNodes.length;if(r&&n.top<n.bottom)for(var i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){var a=t.childNodes[o];if(1==a.nodeType)for(var s=a.getClientRects(),u=0;u<s.length;u++){var c=s[u];if(_a(e,c))return wa(a,e,c)}if((o=(o+1)%r)==i)break}return t}function xa(t,e){var n,r,i,o,a=t.root;if(a.caretPositionFromPoint)try{var s=a.caretPositionFromPoint(e.left,e.top);s&&(i=(n=s).offsetNode,o=n.offset)}catch(m){}if(!i&&a.caretRangeFromPoint){var u=a.caretRangeFromPoint(e.left,e.top);u&&(i=(r=u).startContainer,o=r.startOffset)}var c,l=a.elementFromPoint(e.left,e.top+1);if(!l||!t.dom.contains(1!=l.nodeType?l.parentNode:l)){var h=t.dom.getBoundingClientRect();if(!_a(e,h))return null;if(!(l=wa(t.dom,e,h)))return null}if(Go.safari&&l.draggable&&(i=o=null),l=function(t,e){var n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(l,e),i){if(Go.gecko&&1==i.nodeType&&(o=Math.min(o,i.childNodes.length))<i.childNodes.length){var f,d=i.childNodes[o];"IMG"==d.nodeName&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}i==t.dom&&o==i.childNodes.length-1&&1==i.lastChild.nodeType&&e.top>i.lastChild.getBoundingClientRect().bottom?c=t.state.doc.content.size:0!=o&&1==i.nodeType&&"BR"==i.childNodes[o-1].nodeName||(c=function(t,e,n,r){for(var i=-1,o=e;o!=t.dom;){var a=t.docView.nearestDesc(o,!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)i=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;i=a.posAfter}}o=a.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n)}(t,i,o,e))}null==c&&(c=function(t,e,n){var r=ba(e,n),i=r.node,o=r.offset,a=-1;if(1==i.nodeType&&!i.firstChild){var s=i.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(i,o,a)}(t,l,e));var p=t.docView.nearestDesc(l,!0);return{pos:c,inside:p?p.posAtStart-p.border:-1}}function ka(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}var Sa=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ca(t,e,n){var r=t.docView.domFromPos(e,n<0?-1:1),i=r.node,o=r.offset,a=Go.webkit||Go.gecko;if(3==i.nodeType){if(!a||!Sa.test(i.nodeValue)&&(n<0?o:o!=i.nodeValue.length)){var s=o,u=o,c=n<0?1:-1;return n<0&&!o?(u++,c=-1):n>=0&&o==i.nodeValue.length?(s--,c=1):n<0?s--:u++,Ma(ka(ia(i,s,u),c),c<0)}var l=ka(ia(i,o,o),n);if(Go.gecko&&o&&/\s/.test(i.nodeValue[o-1])&&o<i.nodeValue.length){var h=ka(ia(i,o-1,o-1),-1);if(h.top==l.top){var f=ka(ia(i,o,o+1),-1);if(f.top!=l.top)return Ma(f,f.left<h.left)}}return l}if(!t.state.doc.resolve(e).parent.inlineContent){if(o&&(n<0||o==ua(i))){var d=i.childNodes[o-1];if(1==d.nodeType)return Ea(d.getBoundingClientRect(),!1)}if(o<ua(i)){var p=i.childNodes[o];if(1==p.nodeType)return Ea(p.getBoundingClientRect(),!0)}return Ea(i.getBoundingClientRect(),n>=0)}if(o&&(n<0||o==ua(i))){var m=i.childNodes[o-1],v=3==m.nodeType?ia(m,ua(m)-(a?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return Ma(ka(v,1),!1)}if(o<ua(i)){var g=i.childNodes[o],y=3==g.nodeType?ia(g,0,a?0:1):1==g.nodeType?g:null;if(y)return Ma(ka(y,-1),!0)}return Ma(ka(3==i.nodeType?ia(i):i,-n),n>=0)}function Ma(t,e){if(0==t.width)return t;var n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Ea(t,e){if(0==t.height)return t;var n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Ta(t,e,n){var r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}var Aa=/[\u0590-\u08ac]/;var Oa=null,Pa=null,La=!1;function Da(t,e,n){return Oa==e&&Pa==n?La:(Oa=e,Pa=n,La="up"==n||"down"==n?function(t,e,n){var r=e.selection,i="up"==n?r.$from:r.$to;return Ta(t,e,(function(){for(var e=t.docView.domFromPos(i.pos,"up"==n?-1:1).node;;){var r=t.docView.nearestDesc(e,!0);if(!r)break;if(r.node.isBlock){e=r.dom;break}e=r.dom.parentNode}for(var o=Ca(t,i.pos,1),a=e.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=ia(a,0,a.nodeValue.length).getClientRects()}for(var u=0;u<s.length;u++){var c=s[u];if(c.bottom>c.top&&("up"==n?c.bottom<o.top+1:c.top>o.bottom-1))return!1}}return!0}))}(t,e,n):function(t,e,n){var r=e.selection.$head;if(!r.parent.isTextblock)return!1;var i=r.parentOffset,o=!i,a=i==r.parent.content.size,s=getSelection();return Aa.test(r.parent.textContent)&&s.modify?Ta(t,e,(function(){var e=s.getRangeAt(0),i=s.focusNode,o=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||i==s.focusNode&&o==s.focusOffset;return s.removeAllRanges(),s.addRange(e),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?o:a}(t,e,n))}var Ia=function(t,e,n,r){this.parent=t,this.children=e,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},Ra={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0}};Ia.prototype.matchesWidget=function(){return!1},Ia.prototype.matchesMark=function(){return!1},Ia.prototype.matchesNode=function(){return!1},Ia.prototype.matchesHack=function(){return!1},Ra.beforePosition.get=function(){return!1},Ia.prototype.parseRule=function(){return null},Ia.prototype.stopEvent=function(){return!1},Ra.size.get=function(){for(var t=0,e=0;e<this.children.length;e++)t+=this.children[e].size;return t},Ra.border.get=function(){return 0},Ia.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var t=0;t<this.children.length;t++)this.children[t].destroy()},Ia.prototype.posBeforeChild=function(t){for(var e=0,n=this.posAtStart;e<this.children.length;e++){var r=this.children[e];if(r==t)return n;n+=r.size}},Ra.posBefore.get=function(){return this.parent.posBeforeChild(this)},Ra.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},Ra.posAfter.get=function(){return this.posBefore+this.size},Ra.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},Ia.prototype.localPosFromDOM=function(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){var r,i;if(t==this.contentDOM)r=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;r=t.previousSibling}for(;r&&(!(i=r.pmViewDesc)||i.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(i)+i.size:this.posAtStart}var o,a;if(t==this.contentDOM)o=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.nextSibling}for(;o&&(!(a=o.pmViewDesc)||a.parent!=this);)o=o.nextSibling;return o?this.posBeforeChild(a):this.posAtEnd}var s;if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var u=t;;u=u.parentNode){if(u==this.dom){s=!1;break}if(u.parentNode.firstChild!=u)break}if(null==s&&e==t.childNodes.length)for(var c=t;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.parentNode.lastChild!=c)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},Ia.prototype.nearestDesc=function(t,e){for(var n=!0,r=t;r;r=r.parentNode){var i=this.getDesc(r);if(i&&(!e||i.node)){if(!n||!i.nodeDOM||(1==i.nodeDOM.nodeType?i.nodeDOM.contains(1==t.nodeType?t:t.parentNode):i.nodeDOM==t))return i;n=!1}}},Ia.prototype.getDesc=function(t){for(var e=t.pmViewDesc,n=e;n;n=n.parent)if(n==this)return e},Ia.prototype.posFromDOM=function(t,e,n){for(var r=t;r;r=r.parentNode){var i=this.getDesc(r);if(i)return i.localPosFromDOM(t,e,n)}return-1},Ia.prototype.descAt=function(t){for(var e=0,n=0;e<this.children.length;e++){var r=this.children[e],i=n+r.size;if(n==t&&i!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(t<i)return r.descAt(t-n-r.border);n=i}},Ia.prototype.domFromPos=function(t,e){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n=0,r=0,i=!0;;r++,i=!1){for(;r<this.children.length&&(this.children[r].beforePosition||this.children[r].dom.parentNode!=this.contentDOM);)n+=this.children[r++].size;var o=r==this.children.length?null:this.children[r];if(n==t&&(0==e||!o||!o.size||o.border||e<0&&i)||o&&o.domAtom&&t<n+o.size)return{node:this.contentDOM,offset:o?ea(o.dom):this.contentDOM.childNodes.length};if(!o)throw new Error("Invalid position "+t);var a=n+o.size;if(!o.domAtom&&(e<0&&!o.border?a>=t:a>t))return o.domFromPos(t-n-o.border,e);n=a}},Ia.prototype.parseRange=function(t,e,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,i=-1,o=n,a=0;;a++){var s=this.children[a],u=o+s.size;if(-1==r&&t<=u){var c=o+s.border;if(t>=c&&e<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(t,e,c);t=o;for(var l=a;l>0;l--){var h=this.children[l-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){r=ea(h.dom)+1;break}t-=h.size}-1==r&&(r=0)}if(r>-1&&(u>e||a==this.children.length-1)){e=u;for(var f=a+1;f<this.children.length;f++){var d=this.children[f];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){i=ea(d.dom);break}e+=d.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:i}},Ia.prototype.emptyChildAt=function(t){if(this.border||!this.contentDOM||!this.children.length)return!1;var e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)},Ia.prototype.domAfterPos=function(t){var e=this.domFromPos(t,0),n=e.node,r=e.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]},Ia.prototype.setSelection=function(t,e,n,r){for(var i=Math.min(t,e),o=Math.max(t,e),a=0,s=0;a<this.children.length;a++){var u=this.children[a],c=s+u.size;if(i>s&&o<c)return u.setSelection(t-s-u.border,e-s-u.border,n,r);s=c}var l=this.domFromPos(t,t?-1:1),h=e==t?l:this.domFromPos(e,e?-1:1),f=n.getSelection(),d=!1;if((Go.gecko||Go.safari)&&t==e){var p=l.node,m=l.offset;if(3==p.nodeType)(d=m&&"\n"==p.nodeValue[m-1])&&m==p.nodeValue.length&&p.nextSibling&&"BR"==p.nextSibling.nodeName&&(l=h={node:p.parentNode,offset:ea(p)+1});else{var v=p.childNodes[m-1];d=v&&("BR"==v.nodeName||"false"==v.contentEditable)}}if(r||d&&Go.safari||!oa(l.node,l.offset,f.anchorNode,f.anchorOffset)||!oa(h.node,h.offset,f.focusNode,f.focusOffset)){var g=!1;if((f.extend||t==e)&&!d){f.collapse(l.node,l.offset);try{t!=e&&f.extend(h.node,h.offset),g=!0}catch(Cw){if(!(Cw instanceof DOMException))throw Cw}}if(!g){if(t>e){var y=l;l=h,h=y}var b=document.createRange();b.setEnd(h.node,h.offset),b.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(b)}}},Ia.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},Ra.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Ia.prototype.markDirty=function(t,e){for(var n=0,r=0;r<this.children.length;r++){var i=this.children[r],o=n+i.size;if(n==o?t<=o&&e>=n:t<o&&e>n){var a=n+i.border,s=o-i.border;if(t>=a&&e<=s)return this.dirty=t==n||e==o?2:1,void(t!=a||e!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(t-a,e-a):i.dirty=3);i.dirty=3}n=o}this.dirty=2},Ia.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var n=1==t?2:1;e.dirty<n&&(e.dirty=n)}},Ra.domAtom.get=function(){return!1},Object.defineProperties(Ia.prototype,Ra);var Na=[],za=function(t){function e(e,n,r,i){var o,a=n.type.toDOM;if("function"==typeof a&&(a=a(r,(function(){return o?o.parent?o.parent.posBeforeChild(o):void 0:i}))),!n.type.spec.raw){if(1!=a.nodeType){var s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable=!1,a.classList.add("ProseMirror-widget")}t.call(this,e,Na,a,null),this.widget=n,o=this}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={beforePosition:{configurable:!0},domAtom:{configurable:!0}};return n.beforePosition.get=function(){return this.widget.type.side<0},e.prototype.matchesWidget=function(t){return 0==this.dirty&&t.type.eq(this.widget.type)},e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.stopEvent=function(t){var e=this.widget.spec.stopEvent;return!!e&&e(t)},e.prototype.ignoreMutation=function(t){return"selection"!=t.type||this.widget.spec.ignoreSelection},n.domAtom.get=function(){return!0},Object.defineProperties(e.prototype,n),e}(Ia),ja=function(t){function e(e,n,r,i){t.call(this,e,Na,n,null),this.textDOM=r,this.text=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},e.prototype.localPosFromDOM=function(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e},e.prototype.domFromPos=function(t){return{node:this.textDOM,offset:t}},e.prototype.ignoreMutation=function(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue},Object.defineProperties(e.prototype,n),e}(Ia),Ba=function(t){function e(e,n,r,i){t.call(this,e,[],r,i),this.mark=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t,n,r,i){var o=i.nodeViews[n.type.name],a=o&&o(n,i,r);return a&&a.dom||(a=Ni.renderSpec(document,n.type.spec.toDOM(n,r))),new e(t,n,a.dom,a.contentDOM||a.dom)},e.prototype.parseRule=function(){return{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},e.prototype.matchesMark=function(t){return 3!=this.dirty&&this.mark.eq(t)},e.prototype.markDirty=function(e,n){if(t.prototype.markDirty.call(this,e,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},e.prototype.slice=function(t,n,r){var i=e.create(this.parent,this.mark,!0,r),o=this.children,a=this.size;n<a&&(o=ns(o,n,a,r)),t>0&&(o=ns(o,0,t,r));for(var s=0;s<o.length;s++)o[s].parent=i;return i.children=o,i},e}(Ia),Fa=function(t){function e(e,n,r,i,o,a,s,u,c){t.call(this,e,n.isLeaf?Na:[],o,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=i,a&&this.updateChildren(u,c)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0},border:{configurable:!0},domAtom:{configurable:!0}};return e.create=function(t,n,r,i,o,a){var s,u,c=o.nodeViews[n.type.name],l=c&&c(n,o,(function(){return u?u.parent?u.parent.posBeforeChild(u):void 0:a}),r),h=l&&l.dom,f=l&&l.contentDOM;if(n.isText)if(h){if(3!=h.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else h=document.createTextNode(n.text);else h||(h=(s=Ni.renderSpec(document,n.type.spec.toDOM(n))).dom,f=s.contentDOM);f||n.isText||"BR"==h.nodeName||(h.hasAttribute("contenteditable")||(h.contentEditable=!1),n.type.spec.draggable&&(h.draggable=!0));var d=h;return h=Ja(h,r,n),l?u=new Ha(t,n,r,i,h,f,d,l,o,a+1):n.isText?new Va(t,n,r,i,h,d,o):new e(t,n,r,i,h,f,d,o,a+1)},e.prototype.parseRule=function(){var t=this;if(this.node.type.spec.reparseInView)return null;var e={node:this.node.type.name,attrs:this.node.attrs};return this.node.type.spec.code&&(e.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?e.contentElement=this.contentDOM:e.getContent=function(){return t.contentDOM?Mr.empty:t.node.content},e},e.prototype.matchesNode=function(t,e,n){return 0==this.dirty&&t.eq(this.node)&&Xa(e,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(t,e){var n=this,r=this.node.inlineContent,i=e,o=r&&t.composing&&this.localCompositionNode(t,e),a=new ts(this,o&&o.node);!function(t,e,n,r){var i=e.locals(t),o=0;if(0==i.length){for(var a=0;a<t.childCount;a++){var s=t.child(a);r(s,i,e.forChild(o,s),a),o+=s.nodeSize}return}for(var u=0,c=[],l=null,h=0;;){if(u<i.length&&i[u].to==o){for(var f=i[u++],d=void 0;u<i.length&&i[u].to==o;)(d||(d=[f])).push(i[u++]);if(d){d.sort(es);for(var p=0;p<d.length;p++)n(d[p],h,!!l)}else n(f,h,!!l)}var m=void 0,v=void 0;if(l)v=-1,m=l,l=null;else{if(!(h<t.childCount))break;v=h,m=t.child(h++)}for(var g=0;g<c.length;g++)c[g].to<=o&&c.splice(g--,1);for(;u<i.length&&i[u].from<=o&&i[u].to>o;)c.push(i[u++]);var y=o+m.nodeSize;if(m.isText){var b=y;u<i.length&&i[u].from<b&&(b=i[u].from);for(var _=0;_<c.length;_++)c[_].to<b&&(b=c[_].to);b<y&&(l=m.cut(b-o),m=m.cut(0,b-o),y=b,v=-1)}r(m,c.length?m.isInline&&!m.isLeaf?c.filter((function(t){return!t.inline})):c.slice():Na,e.forChild(o,m),v),o=y}}(this.node,this.innerDeco,(function(e,o,s){e.spec.marks?a.syncToMarks(e.spec.marks,r,t):e.type.side>=0&&!s&&a.syncToMarks(o==n.node.childCount?Pr.none:n.node.child(o).marks,r,t),a.placeWidget(e,t,i)}),(function(e,n,o,s){a.syncToMarks(e.marks,r,t),a.findNodeMatch(e,n,o,s)||a.updateNextNode(e,n,o,t,s)||a.addNode(e,n,o,t,i),i+=e.nodeSize})),a.syncToMarks(Na,r,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(o&&this.protectLocalComposition(t,o),Wa(this.contentDOM,this.children,t),Go.ios&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))},e.prototype.localCompositionNode=function(t,e){var n=t.state.selection,r=n.from,i=n.to;if(!(!(t.state.selection instanceof To)||r<e||i>e+this.node.content.size)){var o=t.root.getSelection(),a=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=ua(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e<t.childNodes.length))return null;t=t.childNodes[e],e=0}}}(o.focusNode,o.focusOffset);if(a&&this.dom.contains(a.parentNode)){var s=a.nodeValue,u=function(t,e,n,r){for(var i=0,o=0;i<t.childCount&&o<=r;){var a=t.child(i++),s=o;if(o+=a.nodeSize,a.isText){for(var u=a.text;i<t.childCount;){var c=t.child(i++);if(o+=c.nodeSize,!c.isText)break;u+=c.text}if(o>=n){var l=u.lastIndexOf(e,r-s);if(l>=0&&l+e.length+s>=n)return s+l}}}return-1}(this.node.content,s,r-e,i-e);return u<0?null:{node:a,pos:u,text:s}}}},e.prototype.protectLocalComposition=function(t,e){var n=e.node,r=e.pos,i=e.text;if(!this.getDesc(n)){for(var o=n;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=null)}var a=new ja(this,o,n,i);t.compositionNodes.push(a),this.children=ns(this.children,r,r+i.length,t,a)}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)},e.prototype.updateInner=function(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(t){if(!Xa(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Ga(this.dom,this.nodeDOM,Ya(this.outerDeco,this.node,e),Ya(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,n),e}(Ia);function qa(t,e,n,r,i){return Ja(r,e,t),new Fa(null,t,e,n,r,r,r,i,0)}var Va=function(t){function e(e,n,r,i,o,a,s){t.call(this,e,n,r,i,o,null,a,s)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var t=this.nodeDOM.parentNode;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}},e.prototype.update=function(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,n,r)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,n,r){var i=this.node.cut(t,n),o=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)},n.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,n),e}(Fa),Ua=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(){return 0==this.dirty},n.domAtom.get=function(){return!0},Object.defineProperties(e.prototype,n),e}(Ia),Ha=function(t){function e(e,n,r,i,o,a,s,u,c,l){t.call(this,e,n,r,i,o,a,s,c,l),this.spec=u}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,n,r,i){if(3==this.dirty)return!1;if(this.spec.update){var o=this.spec.update(e,n);return o&&this.updateInner(e,n,r,i),o}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,n,r,i)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r):t.prototype.setSelection.call(this,e,n,r,i)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(Fa);function Wa(t,e,n){for(var r=t.firstChild,i=!1,o=0;o<e.length;o++){var a=e[o],s=a.dom;if(s.parentNode==t){for(;s!=r;)r=Qa(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(s,r);if(a instanceof Ba){var u=r?r.previousSibling:t.lastChild;Wa(a.contentDOM,a.children,n),r=u?u.nextSibling:t.firstChild}}for(;r;)r=Qa(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}function $a(t){t&&(this.nodeName=t)}$a.prototype=Object.create(null);var Za=[new $a];function Ya(t,e,n){if(0==t.length)return Za;for(var r=n?Za[0]:new $a,i=[r],o=0;o<t.length;o++){var a=t[o].type.attrs;if(a)for(var s in a.nodeName&&i.push(r=new $a(a.nodeName)),a){var u=a[s];null!=u&&(n&&1==i.length&&i.push(r=new $a(e.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 i}function Ga(t,e,n,r){if(n==Za&&r==Za)return e;for(var i=e,o=0;o<r.length;o++){var a=r[o],s=n[o];if(o){var u=void 0;s&&s.nodeName==a.nodeName&&i!=t&&(u=i.parentNode)&&u.tagName.toLowerCase()==a.nodeName||((u=document.createElement(a.nodeName)).pmIsDeco=!0,u.appendChild(i),s=Za[0]),i=u}Ka(i,s||Za[0],a)}return i}function Ka(t,e,n){for(var r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(var i in n)"class"!=i&&"style"!=i&&"nodeName"!=i&&n[i]!=e[i]&&t.setAttribute(i,n[i]);if(e.class!=n.class){for(var o=e.class?e.class.split(" "):Na,a=n.class?n.class.split(" "):Na,s=0;s<o.length;s++)-1==a.indexOf(o[s])&&t.classList.remove(o[s]);for(var u=0;u<a.length;u++)-1==o.indexOf(a[u])&&t.classList.add(a[u])}if(e.style!=n.style){if(e.style)for(var c,l=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=l.exec(e.style);)t.style.removeProperty(c[1]);n.style&&(t.style.cssText+=n.style)}}function Ja(t,e,n){return Ga(t,t,Za,Ya(e,n,1!=t.nodeType))}function Xa(t,e){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Qa(t){var e=t.nextSibling;return t.parentNode.removeChild(t),e}var ts=function(t,e){this.top=t,this.lock=e,this.index=0,this.stack=[],this.changed=!1;var n=function(t,e){for(var n=[],r=t.childCount,i=e.length-1;r>0&&i>=0;i--){var o=e[i],a=o.node;if(a){if(a!=t.child(r-1))break;n.push(o),--r}}return{nodes:n.reverse(),offset:r}}(t.node.content,t.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function es(t,e){return t.type.side-e.type.side}function ns(t,e,n,r,i){for(var o=[],a=0,s=0;a<t.length;a++){var u=t[a],c=s,l=s+=u.size;c>=n||l<=e?o.push(u):(c<e&&o.push(u.slice(0,e-c,r)),i&&(o.push(i),i=null),l>n&&o.push(u.slice(n-c,u.size,r)))}return o}function rs(t,e){var n=t.root.getSelection(),r=t.state.doc;if(!n.focusNode)return null;var i=t.docView.nearestDesc(n.focusNode),o=i&&0==i.size,a=t.docView.posFromDOM(n.focusNode,n.focusOffset);if(a<0)return null;var s,u,c=r.resolve(a);if(la(n)){for(s=c;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&Oo.isSelectable(i.node)&&i.parent&&(!i.node.isInline||!function(t,e,n){for(var r=0==e,i=e==ua(t);r||i;){if(t==n)return!0;var o=ea(t);if(!(t=t.parentNode))return!1;r=r&&0==o,i=i&&o==ua(t)}}(n.focusNode,n.focusOffset,i.dom))){var l=i.posBefore;u=new Oo(a==l?c:r.resolve(l))}}else{var h=t.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(h<0)return null;s=r.resolve(h)}u||(u=fs(t,s,c,"pointer"==e||t.state.selection.head<c.pos&&!o?1:-1));return u}function is(t,e){var n=t.state.selection;if(ls(t,n),t.editable?t.hasFocus():ds(t)&&document.activeElement&&document.activeElement.contains(t.dom)){if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){var e=t.root.getSelection(),n=document.createRange(),r=t.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,ea(r)+1):n.setEnd(r,0);n.collapse(!1),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&Go.ie&&Go.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(t);else{var r,i,o=n.anchor,a=n.head;!as||n instanceof To||(n.$from.parent.inlineContent||(r=ss(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=ss(t,n.to))),t.docView.setSelection(o,a,t.root,e),as&&(r&&cs(r),i&&cs(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){var e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.hideSelectionGuard);var n=t.root.getSelection(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==i||(e.removeEventListener("selectionchange",t.hideSelectionGuard),t.dom.classList.remove("ProseMirror-hideselection"))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}ts.prototype.getPreMatch=function(t){return t>=this.preMatchOffset?this.preMatched[t-this.preMatchOffset]:null},ts.prototype.destroyBetween=function(t,e){if(t!=e){for(var n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}},ts.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},ts.prototype.syncToMarks=function(t,e,n){for(var r=0,i=this.stack.length>>1,o=Math.min(i,t.length);r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.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(t[i])){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=Ba.create(this.top,t[i],e,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,i++}},ts.prototype.findNodeMatch=function(t,e,n,r){var i=-1,o=r<0?void 0:this.getPreMatch(r),a=this.top.children;if(o&&o.matchesNode(t,e,n))i=a.indexOf(o);else for(var s=this.index,u=Math.min(a.length,s+5);s<u;s++){var c=a[s];if(c.matchesNode(t,e,n)&&this.preMatched.indexOf(c)<0){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},ts.prototype.updateNextNode=function(t,e,n,r,i){for(var o=this.index;o<this.top.children.length;o++){var a=this.top.children[o];if(a instanceof Fa){var s=this.preMatched.indexOf(a);if(s>-1&&s+this.preMatchOffset!=i)return!1;var u=a.dom;if(!(this.lock&&(u==this.lock||1==u.nodeType&&u.contains(this.lock.parentNode))&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&3!=a.dirty&&Xa(e,a.outerDeco)))&&a.update(t,e,n,r))return this.destroyBetween(this.index,o),a.dom!=u&&(this.changed=!0),this.index++,!0;break}}return!1},ts.prototype.addNode=function(t,e,n,r,i){this.top.children.splice(this.index++,0,Fa.create(this.top,t,e,n,r,i)),this.changed=!0},ts.prototype.placeWidget=function(t,e,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){var i=new za(this.top,t,e,n);this.top.children.splice(this.index++,0,i),this.changed=!0}else this.index++},ts.prototype.addTextblockHacks=function(){for(var t=this.top.children[this.index-1];t instanceof Ba;)t=t.children[t.children.length-1];if(!t||!(t instanceof Va)||/\n$/.test(t.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++;else{var e=document.createElement("br");this.top.children.splice(this.index++,0,new Ua(this.top,Na,e,null)),this.changed=!0}};var as=Go.safari||Go.chrome&&Go.chrome_version<63;function ss(t,e){var n=t.docView.domFromPos(e,0),r=n.node,i=n.offset,o=i<r.childNodes.length?r.childNodes[i]:null,a=i?r.childNodes[i-1]:null;if(Go.safari&&o&&"false"==o.contentEditable)return us(o);if((!o||"false"==o.contentEditable)&&(!a||"false"==a.contentEditable)){if(o)return us(o);if(a)return us(a)}}function us(t){return t.contentEditable="true",Go.safari&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function cs(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function ls(t,e){if(e instanceof Oo){var n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(hs(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else hs(t)}function hs(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=null)}function fs(t,e,n,r){return t.someProp("createSelectionBetween",(function(r){return r(t,e,n)}))||To.between(e,n,r)}function ds(t){var e=t.root.getSelection();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function ps(t,e){var n=t.selection,r=n.$anchor,i=n.$head,o=e>0?r.max(i):r.min(i),a=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return a&&Co.findFrom(a,e)}function ms(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function vs(t,e,n){var r=t.state.selection;if(!(r instanceof To)){if(r instanceof Oo&&r.node.isInline)return ms(t,new To(e>0?r.$to:r.$from));var i=ps(t.state,e);return!!i&&ms(t,i)}if(!r.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var o=ps(t.state,e);return!!(o&&o instanceof Oo)&&ms(t,o)}if(!(Go.mac&&n.indexOf("m")>-1)){var a,s=r.$head,u=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!u||u.isText)return!1;var c=e<0?s.pos-u.nodeSize:s.pos;return!!(u.isAtom||(a=t.docView.descAt(c))&&!a.contentDOM)&&(Oo.isSelectable(u)?ms(t,new Oo(e<0?t.state.doc.resolve(s.pos-u.nodeSize):s)):!!Go.webkit&&ms(t,new To(t.state.doc.resolve(e<0?c:c+u.nodeSize))))}}function gs(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function ys(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function bs(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){var i,o,a=!1;for(Go.gecko&&1==n.nodeType&&r<gs(n)&&ys(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(ys(s))i=n,o=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(ws(n))break;for(var u=n.previousSibling;u&&ys(u);)i=n.parentNode,o=ea(u),u=u.previousSibling;if(u)r=gs(n=u);else{if((n=n.parentNode)==t.dom)break;r=0}}a?xs(t,e,n,r):i&&xs(t,e,i,o)}}function _s(t){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n){for(var i,o,a=gs(n);;)if(r<a){if(1!=n.nodeType)break;if(!ys(n.childNodes[r]))break;i=n,o=++r}else{if(ws(n))break;for(var s=n.nextSibling;s&&ys(s);)i=s.parentNode,o=ea(s)+1,s=s.nextSibling;if(s)r=0,a=gs(n=s);else{if((n=n.parentNode)==t.dom)break;r=a=0}}i&&xs(t,e,i,o)}}function ws(t){var e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function xs(t,e,n,r){if(la(e)){var i=document.createRange();i.setEnd(n,r),i.setStart(n,r),e.removeAllRanges(),e.addRange(i)}else e.extend&&e.extend(n,r);t.domObserver.setCurSelection();var o=t.state;setTimeout((function(){t.state==o&&is(t)}),50)}function ks(t,e,n){var r=t.state.selection;if(r instanceof To&&!r.empty||n.indexOf("s")>-1)return!1;if(Go.mac&&n.indexOf("m")>-1)return!1;var i=r.$from,o=r.$to;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var a=ps(t.state,e);if(a&&a instanceof Oo)return ms(t,a)}if(!i.parent.inlineContent){var s=e<0?i:o,u=r instanceof Lo?Co.near(s,e):Co.findFrom(s,e);return!!u&&ms(t,u)}return!1}function Ss(t,e){if(!(t.state.selection instanceof To))return!0;var n=t.state.selection,r=n.$head,i=n.$anchor,o=n.empty;if(!r.sameParent(i))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var a=!r.textOffset&&(e<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=t.state.tr;return e<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),t.dispatch(s),!0}return!1}function Cs(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Ms(t,e){var n=e.keyCode,r=function(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==n||Go.mac&&72==n&&"c"==r?Ss(t,-1)||bs(t):46==n||Go.mac&&68==n&&"c"==r?Ss(t,1)||_s(t):13==n||27==n||(37==n?vs(t,-1,r)||bs(t):39==n?vs(t,1,r)||_s(t):38==n?ks(t,-1,r)||bs(t):40==n?function(t){if(Go.safari&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),n=e.focusNode,r=e.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var i=n.firstChild;Cs(t,i,!0),setTimeout((function(){return Cs(t,i,!1)}),20)}}}(t)||ks(t,1,r)||_s(t):r==(Go.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Es(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(Go.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||Go.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function Ts(t,e,n,r,i){if(e<0){var o=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,a=rs(t,o);if(a&&!t.state.selection.eq(a)){var s=t.state.tr.setSelection(a);"pointer"==o?s.setMeta("pointer",!0):"key"==o&&s.scrollIntoView(),t.dispatch(s)}}else{var u=t.state.doc.resolve(e),c=u.sharedDepth(n);e=u.before(c+1),n=t.state.doc.resolve(n).after(c+1);var l=t.state.selection,h=function(t,e,n){var r=t.docView.parseRange(e,n),i=r.node,o=r.fromOffset,a=r.toOffset,s=r.from,u=r.to,c=t.root.getSelection(),l=null,h=c.anchorNode;if(h&&t.dom.contains(1==h.nodeType?h:h.parentNode)&&(l=[{node:h,offset:c.anchorOffset}],la(c)||l.push({node:c.focusNode,offset:c.focusOffset})),Go.chrome&&8===t.lastKeyCode)for(var f=a;f>o;f--){var d=i.childNodes[f-1],p=d.pmViewDesc;if("BR"==d.nodeType&&!p){a=f;break}if(!p||p.size)break}var m=t.state.doc,v=t.someProp("domParser")||Ci.fromSchema(t.state.schema),g=m.resolve(s),y=null,b=v.parse(i,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:o,to:a,preserveWhitespace:!g.parent.type.spec.code||"full",editableContent:!0,findPositions:l,ruleFromNode:Es,context:g});if(l&&null!=l[0].pos){var _=l[0].pos,w=l[1]&&l[1].pos;null==w&&(w=_),y={anchor:_+s,head:w+s}}return{doc:b,sel:y,from:s,to:u}}(t,e,n);if(Go.chrome&&t.cursorWrapper&&h.sel&&h.sel.anchor==t.cursorWrapper.deco.from){var f=t.cursorWrapper.deco.type.toDOM.nextSibling,d=f&&f.nodeValue?f.nodeValue.length:1;h.sel={anchor:h.sel.anchor+d,head:h.sel.anchor+d}}var p,m,v=t.state.doc,g=v.slice(h.from,h.to);8===t.lastKeyCode&&Date.now()-100<t.lastKeyCodeTime?(p=t.state.selection.to,m="end"):(p=t.state.selection.from,m="start"),t.lastKeyCode=null;var y=function(t,e,n,r,i){var o=t.findDiffStart(e,n);if(null==o)return null;var a=t.findDiffEnd(e,n+t.size,n+e.size),s=a.a,u=a.b;if("end"==i){r-=s+Math.max(0,o-Math.min(s,u))-o}if(s<o&&t.size<e.size){u=(o-=r<=o&&r>=s?o-r:0)+(u-s),s=o}else if(u<o){s=(o-=r<=o&&r>=u?o-r:0)+(s-u),u=o}return{start:o,endA:s,endB:u}}(g.content,h.doc.content,h.from,p,m);if(!y){if(!(r&&l instanceof To&&!l.empty&&l.$head.sameParent(l.$anchor))||t.composing||h.sel&&h.sel.anchor!=h.sel.head){if(Go.ios&&t.lastIOSEnter>Date.now()-225&&i.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName}))&&t.someProp("handleKeyDown",(function(e){return e(t,ha(13,"Enter"))})))return void(t.lastIOSEnter=0);if(h.sel){var b=As(t,t.state.doc,h.sel);b&&!b.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(b))}return}y={start:l.from,endA:l.to,endB:l.to}}t.domChangeCount++,t.state.selection.from<t.state.selection.to&&y.start==y.endB&&t.state.selection instanceof To&&(y.start>t.state.selection.from&&y.start<=t.state.selection.from+2?y.start=t.state.selection.from:y.endA<t.state.selection.to&&y.endA>=t.state.selection.to-2&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),Go.ie&&Go.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>h.from&&" \xa0"==h.doc.textBetween(y.start-h.from-1,y.start-h.from+1)&&(y.start--,y.endA--,y.endB--);var _,w=h.doc.resolveNoCache(y.start-h.from),x=h.doc.resolveNoCache(y.endB-h.from),k=w.sameParent(x)&&w.parent.inlineContent;if((Go.ios&&t.lastIOSEnter>Date.now()-225&&(!k||i.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!k&&w.pos<h.doc.content.size&&(_=Co.findFrom(h.doc.resolve(w.pos+1),1,!0))&&_.head==x.pos)&&t.someProp("handleKeyDown",(function(e){return e(t,ha(13,"Enter"))})))t.lastIOSEnter=0;else if(t.state.selection.anchor>y.start&&function(t,e,n,r,i){if(!r.parent.isTextblock||n-e<=i.pos-r.pos||Os(r,!0,!1)<i.pos)return!1;var o=t.resolve(e);if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;var a=t.resolve(Os(o,!0,!0));if(!a.parent.isTextblock||a.pos>n||Os(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(v,y.start,y.endA,w,x)&&t.someProp("handleKeyDown",(function(e){return e(t,ha(8,"Backspace"))})))Go.android&&Go.chrome&&t.domObserver.suppressSelectionUpdates();else{Go.android&&!k&&w.start()!=x.start()&&0==x.parentOffset&&w.depth==x.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==y.endA&&(y.endB-=2,x=h.doc.resolveNoCache(y.endB-h.from),setTimeout((function(){t.someProp("handleKeyDown",(function(e){return e(t,ha(13,"Enter"))}))}),20));var S,C,M,E,T=y.start,A=y.endA;if(k)if(w.pos==x.pos)Go.ie&&Go.ie_version<=11&&0==w.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((function(){return is(t)}),20)),S=t.state.tr.delete(T,A),C=v.resolve(y.start).marksAcross(v.resolve(y.endA));else if(y.endA==y.endB&&(E=v.resolve(y.start))&&(M=function(t,e){for(var n,r,i,o=t.firstChild.marks,a=e.firstChild.marks,s=o,u=a,c=0;c<a.length;c++)s=a[c].removeFromSet(s);for(var l=0;l<o.length;l++)u=o[l].removeFromSet(u);if(1==s.length&&0==u.length)r=s[0],n="add",i=function(t){return t.mark(r.addToSet(t.marks))};else{if(0!=s.length||1!=u.length)return null;r=u[0],n="remove",i=function(t){return t.mark(r.removeFromSet(t.marks))}}for(var h=[],f=0;f<e.childCount;f++)h.push(i(e.child(f)));if(Mr.from(h).eq(t))return{mark:r,type:n}}(w.parent.content.cut(w.parentOffset,x.parentOffset),E.parent.content.cut(E.parentOffset,y.endA-E.start()))))S=t.state.tr,"add"==M.type?S.addMark(T,A,M.mark):S.removeMark(T,A,M.mark);else if(w.parent.child(w.index()).isText&&w.index()==x.index()-(x.textOffset?0:1)){var O=w.parent.textBetween(w.parentOffset,x.parentOffset);if(t.someProp("handleTextInput",(function(e){return e(t,T,A,O)})))return;S=t.state.tr.insertText(O,T,A)}if(S||(S=t.state.tr.replace(T,A,h.doc.slice(y.start-h.from,y.endB-h.from))),h.sel){var P=As(t,S.doc,h.sel);P&&!(Go.chrome&&Go.android&&t.composing&&P.empty&&(P.head==T||P.head==S.mapping.map(A)-1)||Go.ie&&P.empty&&P.head==T)&&S.setSelection(P)}C&&S.ensureMarks(C),t.dispatch(S.scrollIntoView())}}}function As(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:fs(t,e.resolve(n.anchor),e.resolve(n.head))}function Os(t,e,n){for(var r=t.depth,i=e?t.end():t.pos;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n)for(var o=t.node(r).maybeChild(t.indexAfter(r));o&&!o.isLeaf;)o=o.firstChild,i++;return i}function Ps(t,e){for(var n=[],r=e.content,i=e.openStart,o=e.openEnd;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=t.someProp("clipboardSerializer")||Ni.fromSchema(t.state.schema),u=Bs(),c=u.createElement("div");c.appendChild(s.serializeFragment(r,{document:u}));for(var l,h=c.firstChild;h&&1==h.nodeType&&(l=zs[h.nodeName.toLowerCase()]);){for(var f=l.length-1;f>=0;f--){for(var d=u.createElement(l[f]);c.firstChild;)d.appendChild(c.firstChild);c.appendChild(d)}h=c.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",i+" "+o+" "+JSON.stringify(n)),{dom:c,text:t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n")}}function Ls(t,e,n,r,i){var o,a,s=i.parent.type.spec.code;if(!n&&!e)return null;var u=e&&(r||s||!n);if(u){if(t.someProp("transformPastedText",(function(t){e=t(e,s||r)})),s)return new Dr(Mr.from(t.state.schema.text(e)),0,0);var c=t.someProp("clipboardTextParser",(function(t){return t(e,i,r)}));c?a=c:(o=document.createElement("div"),e.trim().split(/(?:\r\n?|\n)+/).forEach((function(t){o.appendChild(document.createElement("p")).textContent=t})))}else t.someProp("transformPastedHTML",(function(t){n=t(n)})),o=function(t){var e=/(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var n,r=Bs().createElement("div"),i=/(?:<meta [^>]*>)*<([a-z][^>\s]+)/i.exec(t),o=0;(n=i&&zs[i[1].toLowerCase()])&&(t=n.map((function(t){return"<"+t+">"})).join("")+t+n.map((function(t){return"</"+t+">"})).reverse().join(""),o=n.length);r.innerHTML=t;for(var a=0;a<o;a++)r=r.firstChild;return r}(n);var l=o&&o.querySelector("[data-pm-slice]"),h=l&&/^(\d+) (\d+) (.*)/.exec(l.getAttribute("data-pm-slice"));if(!a){var f=t.someProp("clipboardParser")||t.someProp("domParser")||Ci.fromSchema(t.state.schema);a=f.parseSlice(o,{preserveWhitespace:!(!u&&!h),context:i})}return a=h?function(t,e){if(!t.size)return t;var n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(c){return t}for(var i=t.content,o=t.openStart,a=t.openEnd,s=n.length-2;s>=0;s-=2){var u=r.nodes[n[s]];if(!u||u.hasRequiredAttrs())break;i=Mr.from(u.create(n[s+1],i)),o++,a++}return new Dr(i,o,a)}(function(t,e,n){e<t.openStart&&(t=new Dr(Ns(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd));n<t.openEnd&&(t=new Dr(Ns(t.content,1,n,t.openEnd,0,0),t.openStart,n));return t}(a,+h[1],+h[2]),h[3]):Dr.maxOpen(function(t,e){if(t.childCount<2)return t;for(var n=function(n){var r=e.node(n).contentMatchAt(e.index(n)),i=void 0,o=[];if(t.forEach((function(t){if(o){var e,n=r.findWrapping(t.type);if(!n)return o=null;if(e=o.length&&i.length&&Is(n,i,t,o[o.length-1],0))o[o.length-1]=e;else{o.length&&(o[o.length-1]=Rs(o[o.length-1],i.length));var a=Ds(t,n);o.push(a),r=r.matchType(a.type,a.attrs),i=n}}})),o)return{v:Mr.from(o)}},r=e.depth;r>=0;r--){var i=n(r);if(i)return i.v}return t}(a.content,i),!1),t.someProp("transformPasted",(function(t){a=t(a)})),a}function Ds(t,e,n){void 0===n&&(n=0);for(var r=e.length-1;r>=n;r--)t=e[r].create(null,Mr.from(t));return t}function Is(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){var o=Is(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(Mr.from(Ds(n,t,i+1))))}}function Rs(t,e){if(0==e)return t;var n=t.content.replaceChild(t.childCount-1,Rs(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Mr.empty,!0);return t.copy(n.append(r))}function Ns(t,e,n,r,i,o){var a=e<0?t.firstChild:t.lastChild,s=a.content;return i<r-1&&(s=Ns(s,e,n,r,i+1,o)),i>=n&&(s=e<0?a.contentMatchAt(0).fillBefore(s,t.childCount>1||o<=i).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(Mr.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(s))}var zs={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},js=null;function Bs(){return js||(js=document.implementation.createHTMLDocument("title"))}var Fs={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},qs=Go.ie&&Go.ie_version<=11,Vs=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Vs.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},Vs.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var Us=function(t,e){var n=this;this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(t){for(var e=0;e<t.length;e++)n.queue.push(t[e]);Go.ie&&Go.ie_version<=11&&t.some((function(t){return"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new Vs,qs&&(this.onCharData=function(t){n.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Us.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},Us.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Us.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Fs),qs&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Us.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout((function(){return t.flush()}),20)}this.observer.disconnect()}qs&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Us.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Us.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Us.prototype.suppressSelectionUpdates=function(){var t=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return t.suppressingSelectionUpdates=!1}),50)},Us.prototype.onSelectionChange=function(){if((!(t=this.view).editable||t.root.activeElement==t.dom)&&ds(t)){var t;if(this.suppressingSelectionUpdates)return is(this.view);if(Go.ie&&Go.ie_version<=11&&!this.view.state.selection.empty){var e=this.view.root.getSelection();if(e.focusNode&&oa(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}},Us.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Us.prototype.ignoreSelectionChange=function(t){if(0==t.rangeCount)return!0;var e=t.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(e);return n&&n.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0},Us.prototype.flush=function(){if(this.view.docView&&!(this.flushingSoon>-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&ds(this.view)&&!this.ignoreSelectionChange(e),r=-1,i=-1,o=!1,a=[];if(this.view.editable)for(var s=0;s<t.length;s++){var u=this.registerMutation(t[s],a);u&&(r=r<0?u.from:Math.min(u.from,r),i=i<0?u.to:Math.max(u.to,i),u.typeOver&&(o=!0))}if(Go.gecko&&a.length>1){var c=a.filter((function(t){return"BR"==t.nodeName}));if(2==c.length){var l=c[0],h=c[1];l.parentNode&&l.parentNode.parentNode==h.parentNode?h.remove():l.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,i),function(t){if(Hs)return;Hs=!0,"normal"==getComputedStyle(t.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,i,o,a),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||is(this.view),this.currentSelection.set(e))}},Us.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){var r=t.previousSibling,i=t.nextSibling;if(Go.ie&&Go.ie_version<=11&&t.addedNodes.length)for(var o=0;o<t.addedNodes.length;o++){var a=t.addedNodes[o],s=a.previousSibling,u=a.nextSibling;(!s||Array.prototype.indexOf.call(t.addedNodes,s)<0)&&(r=s),(!u||Array.prototype.indexOf.call(t.addedNodes,u)<0)&&(i=u)}for(var c=r&&r.parentNode==t.target?ea(r)+1:0,l=n.localPosFromDOM(t.target,c,-1),h=i&&i.parentNode==t.target?ea(i):t.target.childNodes.length,f=0;f<t.addedNodes.length;f++)e.push(t.addedNodes[f]);return{from:l,to:n.localPosFromDOM(t.target,h,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}};var Hs=!1;var Ws={},$s={};function Zs(t,e){t.lastSelectionOrigin=e,t.lastSelectionTime=Date.now()}function Ys(t){t.someProp("handleDOMEvents",(function(e){for(var n in e)t.eventHandlers[n]||t.dom.addEventListener(n,t.eventHandlers[n]=function(e){return Gs(t,e)})}))}function Gs(t,e){return t.someProp("handleDOMEvents",(function(n){var r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function Ks(t){return{left:t.clientX,top:t.clientY}}function Js(t,e,n,r,i){if(-1==r)return!1;for(var o=t.state.doc.resolve(r),a=function(r){if(t.someProp(e,(function(e){return r>o.depth?e(t,n,o.nodeAfter,o.before(r),i,!0):e(t,n,o.node(r),o.before(r),i,!1)})))return{v:!0}},s=o.depth+1;s>0;s--){var u=a(s);if(u)return u.v}return!1}function Xs(t,e,n){t.focused||t.focus();var r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Qs(t,e,n,r,i){return Js(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(function(n){return n(t,e,r)}))||(i?function(t,e){if(-1==e)return!1;var n,r,i=t.state.selection;i instanceof Oo&&(n=i.node);for(var o=t.state.doc.resolve(e),a=o.depth+1;a>0;a--){var s=a>o.depth?o.nodeAfter:o.node(a);if(Oo.isSelectable(s)){r=n&&i.$from.depth>0&&a>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(a);break}}return null!=r&&(Xs(t,Oo.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;var n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&Oo.isSelectable(r))&&(Xs(t,new Oo(n),"pointer"),!0)}(t,n))}function tu(t,e,n,r){return Js(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(function(n){return n(t,e,r)}))}function eu(t,e,n,r){return Js(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(function(n){return n(t,e,r)}))||function(t,e){var n=t.state.doc;if(-1==e)return!!n.inlineContent&&(Xs(t,To.create(n,0,n.content.size),"pointer"),!0);for(var r=n.resolve(e),i=r.depth+1;i>0;i--){var o=i>r.depth?r.nodeAfter:r.node(i),a=r.before(i);if(o.inlineContent)Xs(t,To.create(n,a+1,a+1+o.content.size),"pointer");else{if(!Oo.isSelectable(o))continue;Xs(t,Oo.create(n,a),"pointer")}return!0}}(t,n)}function nu(t){return cu(t)}$s.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!ou(t,e))if(t.domObserver.forceFlush(),t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!Go.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(n){return n(t,e)}))||Ms(t,e)?e.preventDefault():Zs(t,"key");else{var n=Date.now();t.lastIOSEnter=n,t.lastIOSEnterFallbackTimeout=setTimeout((function(){t.lastIOSEnter==n&&(t.someProp("handleKeyDown",(function(e){return e(t,ha(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},$s.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},$s.keypress=function(t,e){if(!(ou(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||Go.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(n){return n(t,e)})))e.preventDefault();else{var n=t.state.selection;if(!(n instanceof To)||!n.$from.sameParent(n.$to)){var r=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,n.$from.pos,n.$to.pos,r)}))||t.dispatch(t.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}}};var ru=Go.mac?"metaKey":"ctrlKey";Ws.mousedown=function(t,e){t.shiftKey=e.shiftKey;var n=nu(t),r=Date.now(),i="singleClick";r-t.lastClick.time<500&&function(t,e){var n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(e,t.lastClick)&&!e[ru]&&("singleClick"==t.lastClick.type?i="doubleClick":"doubleClick"==t.lastClick.type&&(i="tripleClick")),t.lastClick={time:r,x:e.clientX,y:e.clientY,type:i};var o=t.posAtCoords(Ks(e));o&&("singleClick"==i?t.mouseDown=new iu(t,o,e,n):("doubleClick"==i?tu:eu)(t,o.pos,o.inside,e)?e.preventDefault():Zs(t,"pointer"))};var iu=function(t,e,n,r){var i,o,a=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=n,this.flushed=r,this.selectNode=n[ru],this.allowDefault=n.shiftKey,e.inside>-1)i=t.state.doc.nodeAt(e.inside),o=e.inside;else{var s=t.state.doc.resolve(e.pos);i=s.parent,o=s.depth?s.before():0}this.mightDrag=null;var u=r?null:n.target,c=u?t.docView.nearestDesc(u,!0):null;this.target=c?c.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||t.state.selection instanceof Oo&&o==t.state.selection.from)&&(this.mightDrag={node:i,pos:o,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&Go.gecko&&!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(){return a.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)),Zs(t,"pointer")};function ou(t,e){return!!t.composing||!!(Go.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}iu.prototype.done=function(){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.view.mouseDown=null},iu.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(Ks(t))),this.allowDefault||!e?Zs(this.view,"pointer"):Qs(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():this.flushed||Go.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||Go.chrome&&!(this.view.state.selection instanceof To)&&(e.pos==this.view.state.selection.from||e.pos==this.view.state.selection.to)?(Xs(this.view,Co.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Zs(this.view,"pointer")}},iu.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),Zs(this.view,"pointer")},Ws.touchdown=function(t){nu(t),Zs(t,"pointer")},Ws.contextmenu=function(t){return nu(t)};var au=Go.android?5e3:-1;function su(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return cu(t)}),e))}function uu(t){for(t.composing=!1;t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty()}function cu(t,e){if(t.domObserver.forceFlush(),uu(t),e||t.docView.dirty){var n=rs(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}$s.compositionstart=$s.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||n.marks(),cu(t,!0),t.markCursor=null;else if(cu(t),Go.gecko&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=t.root.getSelection(),i=r.focusNode,o=r.focusOffset;i&&1==i.nodeType&&0!=o;){var a=o<0?i.lastChild:i.childNodes[o-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}i=a,o=-1}t.composing=!0}su(t,au)},$s.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,su(t,20))};var lu=Go.ie&&Go.ie_version<15||Go.ios&&Go.webkit_version<604;function hu(t,e,n,r){var i=Ls(t,e,n,t.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(function(e){return e(t,r,i||Dr.empty)})))return!0;if(!i)return!1;var o=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(i),a=o?t.state.tr.replaceSelectionWith(o,t.shiftKey):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Ws.copy=$s.cut=function(t,e){var n=t.state.selection,r="cut"==e.type;if(!n.empty){var i=lu?null:e.clipboardData,o=Ps(t,n.content()),a=o.dom,s=o.text;i?(e.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",s)):function(t,e){if(t.dom.parentNode){var n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}}(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},$s.paste=function(t,e){var n=lu?null:e.clipboardData;n&&hu(t,n.getData("text/plain"),n.getData("text/html"),e)?e.preventDefault():function(t,e){if(t.dom.parentNode){var n=t.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.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(){t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?hu(t,r.value,null,e):hu(t,r.textContent,r.innerHTML,e)}),50)}}(t,e)};var fu=function(t,e){this.slice=t,this.move=e},du=Go.mac?"altKey":"ctrlKey";for(var pu in Ws.dragstart=function(t,e){var n=t.mouseDown;if(n&&n.done(),e.dataTransfer){var r=t.state.selection,i=r.empty?null:t.posAtCoords(Ks(e));if(i&&i.pos>=r.from&&i.pos<=(r instanceof Oo?r.to-1:r.to));else if(n&&n.mightDrag)t.dispatch(t.state.tr.setSelection(Oo.create(t.state.doc,n.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var o=t.docView.nearestDesc(e.target,!0);if(!o||!o.node.type.spec.draggable||o==t.docView)return;t.dispatch(t.state.tr.setSelection(Oo.create(t.state.doc,o.posBefore)))}var a=t.state.selection.content(),s=Ps(t,a),u=s.dom,c=s.text;e.dataTransfer.clearData(),e.dataTransfer.setData(lu?"Text":"text/html",u.innerHTML),lu||e.dataTransfer.setData("text/plain",c),t.dragging=new fu(a,!e[du])}},Ws.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},$s.dragover=$s.dragenter=function(t,e){return e.preventDefault()},$s.drop=function(t,e){var n=t.dragging;if(t.dragging=null,e.dataTransfer){var r=t.posAtCoords(Ks(e));if(r){var i=t.state.doc.resolve(r.pos);if(i){var o=n&&n.slice||Ls(t,e.dataTransfer.getData(lu?"Text":"text/plain"),lu?null:e.dataTransfer.getData("text/html"),!1,i),a=n&&!e[du];if(t.someProp("handleDrop",(function(n){return n(t,e,o||Dr.empty,a)})))e.preventDefault();else if(o){e.preventDefault();var s=o?uo(t.state.doc,i.pos,o):i.pos;null==s&&(s=i.pos);var u=t.state.tr;a&&u.deleteSelection();var c=u.mapping.map(s),l=0==o.openStart&&0==o.openEnd&&1==o.content.childCount,h=u.doc;if(l?u.replaceRangeWith(c,c,o.content.firstChild):u.replaceRange(c,c,o),!u.doc.eq(h)){var f=u.doc.resolve(c);if(l&&Oo.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new Oo(f));else{var d=u.mapping.map(s);u.mapping.maps[u.mapping.maps.length-1].forEach((function(t,e,n,r){return d=r})),u.setSelection(fs(t,f,u.doc.resolve(d)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))}}}}}},Ws.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((function(){t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.root.getSelection())&&is(t)}),20))},Ws.blur=function(t){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),t.domObserver.currentSelection.set({}),t.focused=!1)},Ws.beforeinput=function(t,e){if(Go.chrome&&Go.android&&"deleteContentBackward"==e.inputType){var n=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==n&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,ha(8,"Backspace"))})))){var e=t.state.selection.$cursor;e&&e.pos>0&&t.dispatch(t.state.tr.delete(e.pos-1,e.pos).scrollIntoView())}}),50)}},$s)Ws[pu]=$s[pu];function mu(t,e){if(t==e)return!0;for(var n in t)if(t[n]!==e[n])return!1;for(var r in e)if(!(r in t))return!1;return!0}var vu=function(t,e){this.spec=e||xu,this.side=this.spec.side||0,this.toDOM=t};vu.prototype.map=function(t,e,n,r){var i=t.mapResult(e.from+r,this.side<0?-1:1),o=i.pos;return i.deleted?null:new bu(o-n,o-n,this)},vu.prototype.valid=function(){return!0},vu.prototype.eq=function(t){return this==t||t instanceof vu&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&mu(this.spec,t.spec))};var gu=function(t,e){this.spec=e||xu,this.attrs=t};gu.prototype.map=function(t,e,n,r){var i=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,o=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new bu(i,o,this)},gu.prototype.valid=function(t,e){return e.from<e.to},gu.prototype.eq=function(t){return this==t||t instanceof gu&&mu(this.attrs,t.attrs)&&mu(this.spec,t.spec)},gu.is=function(t){return t.type instanceof gu};var yu=function(t,e){this.spec=e||xu,this.attrs=t};yu.prototype.map=function(t,e,n,r){var i=t.mapResult(e.from+r,1);if(i.deleted)return null;var o=t.mapResult(e.to+r,-1);return o.deleted||o.pos<=i.pos?null:new bu(i.pos-n,o.pos-n,this)},yu.prototype.valid=function(t,e){var n=t.content.findIndex(e.from),r=n.index,i=n.offset;return i==e.from&&i+t.child(r).nodeSize==e.to},yu.prototype.eq=function(t){return this==t||t instanceof yu&&mu(this.attrs,t.attrs)&&mu(this.spec,t.spec)};var bu=function(t,e,n){this.from=t,this.to=e,this.type=n},_u={spec:{configurable:!0},inline:{configurable:!0}};bu.prototype.copy=function(t,e){return new bu(t,e,this.type)},bu.prototype.eq=function(t,e){return void 0===e&&(e=0),this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to},bu.prototype.map=function(t,e,n){return this.type.map(t,this,e,n)},bu.widget=function(t,e,n){return new bu(t,t,new vu(e,n))},bu.inline=function(t,e,n,r){return new bu(t,e,new gu(n,r))},bu.node=function(t,e,n,r){return new bu(t,e,new yu(n,r))},_u.spec.get=function(){return this.type.spec},_u.inline.get=function(){return this.type instanceof gu},Object.defineProperties(bu.prototype,_u);var wu=[],xu={},ku=function(t,e){this.local=t&&t.length?t:wu,this.children=e&&e.length?e:wu};ku.create=function(t,e){return e.length?Au(e,t,0,xu):Su},ku.prototype.find=function(t,e,n){var r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r},ku.prototype.findInner=function(t,e,n,r,i){for(var o=0;o<this.local.length;o++){var a=this.local[o];a.from<=e&&a.to>=t&&(!i||i(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]<e&&this.children[s+1]>t){var u=this.children[s]+1;this.children[s+2].findInner(t-u,e-u,n,r+u,i)}},ku.prototype.map=function(t,e,n){return this==Su||0==t.maps.length?this:this.mapInner(t,e,0,0,n||xu)},ku.prototype.mapInner=function(t,e,n,r,i){for(var o,a=0;a<this.local.length;a++){var s=this.local[a].map(t,n,r);s&&s.type.valid(e,s)?(o||(o=[])).push(s):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?function(t,e,n,r,i,o,a){for(var s=t.slice(),u=function(t,e,n,r){for(var a=0;a<s.length;a+=3){var u=s[a+1],c=void 0;-1==u||t>u+o||(e>=s[a]+o?s[a+1]=-1:n>=i&&(c=r-n-(e-t))&&(s[a]+=c,s[a+1]+=c))}},c=0;c<n.maps.length;c++)n.maps[c].forEach(u);for(var l=!1,h=0;h<s.length;h+=3)if(-1==s[h+1]){var f=n.map(t[h]+o),d=f-i;if(d<0||d>=r.content.size){l=!0;continue}var p=n.map(t[h+1]+o,-1)-i,m=r.content.findIndex(d),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==d&&g+y.nodeSize==p){var b=s[h+2].mapInner(n,y,f+1,t[h]+o+1,a);b!=Su?(s[h]=d,s[h+1]=p,s[h+2]=b):(s[h+1]=-2,l=!0)}else l=!0}if(l){var _=Au(function(t,e,n,r,i,o,a){function s(t,e){for(var o=0;o<t.local.length;o++){var u=t.local[o].map(r,i,e);u?n.push(u):a.onRemove&&a.onRemove(t.local[o].spec)}for(var c=0;c<t.children.length;c+=3)s(t.children[c+2],t.children[c]+e+1)}for(var u=0;u<t.length;u+=3)-1==t[u+1]&&s(t[u+2],e[u]+o+1);return n}(s,t,e||[],n,i,o,a),r,0,a);e=_.local;for(var w=0;w<s.length;w+=3)s[w+1]<0&&(s.splice(w,3),w-=3);for(var x=0,k=0;x<_.children.length;x+=3){for(var S=_.children[x];k<s.length&&s[k]<S;)k+=3;s.splice(k,0,_.children[x],_.children[x+1],_.children[x+2])}}return new ku(e&&e.sort(Ou),s)}(this.children,o,t,e,n,r,i):o?new ku(o.sort(Ou)):Su},ku.prototype.add=function(t,e){return e.length?this==Su?ku.create(t,e):this.addInner(t,e,0):this},ku.prototype.addInner=function(t,e,n){var r,i=this,o=0;t.forEach((function(t,a){var s,u=a+n;if(s=Eu(e,t,u)){for(r||(r=i.children.slice());o<r.length&&r[o]<a;)o+=3;r[o]==a?r[o+2]=r[o+2].addInner(t,s,u+1):r.splice(o,0,a,a+t.nodeSize,Au(s,t,u+1,xu)),o+=3}}));for(var a=Mu(o?Tu(e):e,-n),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||a.splice(s--,1);return new ku(a.length?this.local.concat(a).sort(Ou):this.local,r||this.children)},ku.prototype.remove=function(t){return 0==t.length||this==Su?this:this.removeInner(t,0)},ku.prototype.removeInner=function(t,e){for(var n=this.children,r=this.local,i=0;i<n.length;i+=3){for(var o=void 0,a=n[i]+e,s=n[i+1]+e,u=0,c=void 0;u<t.length;u++)(c=t[u])&&c.from>a&&c.to<s&&(t[u]=null,(o||(o=[])).push(c));if(o){n==this.children&&(n=this.children.slice());var l=n[i+2].removeInner(o,a+1);l!=Su?n[i+2]=l:(n.splice(i,3),i-=3)}}if(r.length)for(var h=0,f=void 0;h<t.length;h++)if(f=t[h])for(var d=0;d<r.length;d++)r[d].eq(f,e)&&(r==this.local&&(r=this.local.slice()),r.splice(d--,1));return n==this.children&&r==this.local?this:r.length||n.length?new ku(r,n):Su},ku.prototype.forChild=function(t,e){if(this==Su)return this;if(e.isLeaf)return ku.empty;for(var n,r,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(n=this.children[i+2]);break}for(var o=t+1,a=o+e.content.size,s=0;s<this.local.length;s++){var u=this.local[s];if(u.from<a&&u.to>o&&u.type instanceof gu){var c=Math.max(o,u.from)-o,l=Math.min(a,u.to)-o;c<l&&(r||(r=[])).push(u.copy(c,l))}}if(r){var h=new ku(r.sort(Ou));return n?new Cu([h,n]):h}return n||Su},ku.prototype.eq=function(t){if(this==t)return!0;if(!(t instanceof ku)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0},ku.prototype.locals=function(t){return Pu(this.localsInner(t))},ku.prototype.localsInner=function(t){if(this==Su)return wu;if(t.inlineContent||!this.local.some(gu.is))return this.local;for(var e=[],n=0;n<this.local.length;n++)this.local[n].type instanceof gu||e.push(this.local[n]);return e};var Su=new ku;ku.empty=Su,ku.removeOverlap=Pu;var Cu=function(t){this.members=t};function Mu(t,e){if(!e||!t.length)return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];n.push(new bu(i.from+e,i.to+e,i.type))}return n}function Eu(t,e,n){if(e.isLeaf)return null;for(var r=n+e.nodeSize,i=null,o=0,a=void 0;o<t.length;o++)(a=t[o])&&a.from>n&&a.to<r&&((i||(i=[])).push(a),t[o]=null);return i}function Tu(t){for(var e=[],n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Au(t,e,n,r){var i=[],o=!1;e.forEach((function(e,a){var s=Eu(t,e,a+n);if(s){o=!0;var u=Au(s,e,n+a+1,r);u!=Su&&i.push(a,a+e.nodeSize,u)}}));for(var a=Mu(o?Tu(t):t,-n).sort(Ou),s=0;s<a.length;s++)a[s].type.valid(e,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||i.length?new ku(a,i):Su}function Ou(t,e){return t.from-e.from||t.to-e.to}function Pu(t){for(var e=t,n=0;n<e.length-1;n++){var r=e[n];if(r.from!=r.to)for(var i=n+1;i<e.length;i++){var o=e[i];if(o.from!=r.from){o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),Lu(e,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),Lu(e,i+1,o.copy(r.to,o.to)))}}return e}function Lu(t,e,n){for(;e<t.length&&Ou(n,t[e])>0;)e++;t.splice(e,0,n)}function Du(t){var e=[];return t.someProp("decorations",(function(n){var r=n(t.state);r&&r!=Su&&e.push(r)})),t.cursorWrapper&&e.push(ku.create(t.state.doc,[t.cursorWrapper.deco])),Cu.from(e)}Cu.prototype.forChild=function(t,e){if(e.isLeaf)return ku.empty;for(var n=[],r=0;r<this.members.length;r++){var i=this.members[r].forChild(t,e);i!=Su&&(i instanceof Cu?n=n.concat(i.members):n.push(i))}return Cu.from(n)},Cu.prototype.eq=function(t){if(!(t instanceof Cu)||t.members.length!=this.members.length)return!1;for(var e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0},Cu.prototype.locals=function(t){for(var e,n=!0,r=0;r<this.members.length;r++){var i=this.members[r].localsInner(t);if(i.length)if(e){n&&(e=e.slice(),n=!1);for(var o=0;o<i.length;o++)e.push(i[o])}else e=i}return e?Pu(n?e:e.sort(Ou)):wu},Cu.from=function(t){switch(t.length){case 0:return Su;case 1:return t[0];default:return new Cu(t)}};var Iu=function(t,e){this._props=e,this.state=e.state,this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):t.apply?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=ju(this),this.markCursor=null,this.cursorWrapper=null,zu(this),this.nodeViews=Bu(this),this.docView=qa(this.state.doc,Nu(this),Du(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(t){t.shiftKey=!1,t.mouseDown=null,t.lastKeyCode=null,t.lastKeyCodeTime=0,t.lastClick={time:0,x:0,y:0,type:""},t.lastSelectionOrigin=null,t.lastSelectionTime=0,t.lastIOSEnter=0,t.lastIOSEnterFallbackTimeout=null,t.composing=!1,t.composingTimeout=null,t.compositionNodes=[],t.compositionEndedAt=-2e8,t.domObserver=new Us(t,(function(e,n,r,i){return Ts(t,e,n,r,i)})),t.domObserver.start(),t.domChangeCount=0,t.eventHandlers=Object.create(null);var e=function(e){var n=Ws[e];t.dom.addEventListener(e,t.eventHandlers[e]=function(e){!function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(var n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}(t,e)||Gs(t,e)||!t.editable&&e.type in $s||n(t,e)})};for(var n in Ws)e(n);Go.safari&&t.dom.addEventListener("input",(function(){return null})),Ys(t)}(this),this.pluginViews=[],this.updatePluginViews()},Ru={props:{configurable:!0},root:{configurable:!0}};function Nu(t){var e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(t.state)),n)for(var r in n)"class"==r?e.class+=" "+n[r]:e[r]||"contenteditable"==r||"nodeName"==r||(e[r]=String(n[r]))})),[bu.node(0,t.state.doc.content.size,e)]}function zu(t){if(t.markCursor){var e=document.createElement("img");e.setAttribute("mark-placeholder","true"),t.cursorWrapper={dom:e,deco:bu.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function ju(t){return!t.someProp("editable",(function(e){return!1===e(t.state)}))}function Bu(t){var e={};return t.someProp("nodeViews",(function(t){for(var n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])})),e}Ru.props.get=function(){if(this._props.state!=this.state){var t=this._props;for(var e in this._props={},t)this._props[e]=t[e];this._props.state=this.state}return this._props},Iu.prototype.update=function(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Ys(this),this._props=t,this.updateStateInner(t.state,!0)},Iu.prototype.setProps=function(t){var e={};for(var n in this._props)e[n]=this._props[n];for(var r in e.state=this.state,t)e[r]=t[r];this.update(e)},Iu.prototype.updateState=function(t){this.updateStateInner(t,this.state.plugins!=t.plugins)},Iu.prototype.updateStateInner=function(t,e){var n=this,r=this.state,i=!1,o=!1;if(t.storedMarks&&this.composing&&(uu(this),o=!0),this.state=t,e){var a=Bu(this);(function(t,e){var n=0,r=0;for(var i in t){if(t[i]!=e[i])return!0;n++}for(var o in e)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,i=!0),Ys(this)}this.editable=ju(this),zu(this);var s=Du(this),u=Nu(this),c=e?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",l=i||!this.docView.matchesNode(t.doc,u,s);!l&&t.selection.eq(r.selection)||(o=!0);var h,f,d,p,m,v,g,y,b,_,w,x="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function(t){for(var e,n,r=t.dom.getBoundingClientRect(),i=Math.max(0,r.top),o=(r.left+r.right)/2,a=i+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=t.root.elementFromPoint(o,a);if(s!=t.dom&&t.dom.contains(s)){var u=s.getBoundingClientRect();if(u.top>=i-20){e=s,n=u.top;break}}}return{refDOM:e,refTop:n,stack:va(t.dom)}}(this);if(o){this.domObserver.stop();var k=l&&(Go.ie||Go.chrome)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&(p=r.selection,m=t.selection,v=Math.min(p.$anchor.sharedDepth(p.head),m.$anchor.sharedDepth(m.head)),p.$anchor.start(v)!=m.$anchor.start(v));if(l){var S=Go.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!i&&this.docView.update(t.doc,u,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=qa(t.doc,u,s,this.dom,this)),S&&!this.trackWrites&&(k=!0)}k||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(h=this,f=h.docView.domFromPos(h.state.selection.anchor,0),d=h.root.getSelection(),oa(f.node,f.offset,d.anchorNode,d.anchorOffset)))?is(this,k):(ls(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==c)this.dom.scrollTop=0;else if("to selection"==c){var C=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(n)}))||(t.selection instanceof Oo?ma(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),C):ma(this,this.coordsAtPos(t.selection.head,1),C))}else x&&(y=(g=x).refDOM,b=g.refTop,_=g.stack,w=y?y.getBoundingClientRect().top:0,ga(_,0==w?0:w-b))},Iu.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},Iu.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins)for(var e=0;e<this.pluginViews.length;e++){var n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.destroyPluginViews();for(var r=0;r<this.state.plugins.length;r++){var i=this.state.plugins[r];i.spec.view&&this.pluginViews.push(i.spec.view(this))}}},Iu.prototype.someProp=function(t,e){var n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;var i=this.state.plugins;if(i)for(var o=0;o<i.length;o++){var a=i[o].props[t];if(null!=a&&(n=e?e(a):a))return n}},Iu.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Iu.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(ya)return t.focus(ya);var e=va(t);t.focus(null==ya?{get preventScroll(){return ya={preventScroll:!0},!0}}:void 0),ya||(ya=!1,ga(e,0))}(this.dom),is(this),this.domObserver.start()},Ru.root.get=function(){var t=this._root;if(null==t)for(var e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=function(){return document.getSelection()}),this._root=e;return t||document},Iu.prototype.posAtCoords=function(t){return xa(this,t)},Iu.prototype.coordsAtPos=function(t,e){return void 0===e&&(e=1),Ca(this,t,e)},Iu.prototype.domAtPos=function(t,e){return void 0===e&&(e=0),this.docView.domFromPos(t,e)},Iu.prototype.nodeDOM=function(t){var e=this.docView.descAt(t);return e?e.nodeDOM:null},Iu.prototype.posAtDOM=function(t,e,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},Iu.prototype.endOfTextblock=function(t,e){return Da(this,e||this.state,t)},Iu.prototype.destroy=function(){this.docView&&(!function(t){for(var e in t.domObserver.stop(),t.eventHandlers)t.dom.removeEventListener(e,t.eventHandlers[e]);clearTimeout(t.composingTimeout),clearTimeout(t.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Du(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Iu.prototype.dispatchEvent=function(t){return function(t,e){Gs(t,e)||!Ws[e.type]||!t.editable&&e.type in $s||Ws[e.type](t,e)}(this,t)},Iu.prototype.dispatch=function(t){var e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))},Object.defineProperties(Iu.prototype,Ru);var Fu=n(180),qu=n.n(Fu),Vu=new ki({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:function(t){return["h"+t.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(t){return{params:t.getAttribute("data-params")||""}}}],toDOM:function(t){return["pre",t.attrs.params?{"data-params":t.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:function(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1,tight:t.hasAttribute("data-tight")}}}],toDOM:function(t){return["ol",{start:1==t.attrs.order?null:t.attrs.order,"data-tight":t.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:function(t){return{tight:t.hasAttribute("data-tight")}}}],toDOM:function(t){return["ul",{"data-tight":t.attrs.tight?"true":null},0]}},list_item:{content:"paragraph block*",defining:!0,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:function(t){return{src:t.getAttribute("src"),title:t.getAttribute("title"),alt:t.getAttribute("alt")}}}],toDOM:function(t){return["img",t.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:function(t){return"italic"==t&&null}}],toDOM:function(){return["em"]}},strong:{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-weight",getAttrs:function(t){return/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}}],toDOM:function(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(t){return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:function(t){return["a",t.attrs]}},code:{parseDOM:[{tag:"code"}],toDOM:function(){return["code"]}}}});var Uu=function(t,e){this.schema=t,this.stack=[{type:t.topNodeType,content:[]}],this.marks=Pr.none,this.tokenHandlers=e};function Hu(t,e,n,r){return t.getAttrs?t.getAttrs(e,n,r):t.attrs instanceof Function?t.attrs(e):t.attrs}function Wu(t,e){return t.noCloseToken||"code_inline"==e||"code_block"==e||"fence"==e}function $u(t){return"\n"==t[t.length-1]?t.slice(0,t.length-1):t}function Zu(){}Uu.prototype.top=function(){return this.stack[this.stack.length-1]},Uu.prototype.push=function(t){this.stack.length&&this.top().content.push(t)},Uu.prototype.addText=function(t){if(t){var e,n=this.top().content,r=n[n.length-1],i=this.schema.text(t,this.marks);r&&(e=function(t,e){if(t.isText&&e.isText&&Pr.sameSet(t.marks,e.marks))return t.withText(t.text+e.text)}(r,i))?n[n.length-1]=e:n.push(i)}},Uu.prototype.openMark=function(t){this.marks=t.addToSet(this.marks)},Uu.prototype.closeMark=function(t){this.marks=t.removeFromSet(this.marks)},Uu.prototype.parseTokens=function(t){for(var e=0;e<t.length;e++){var n=t[e],r=this.tokenHandlers[n.type];if(!r)throw new Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n,t,e)}},Uu.prototype.addNode=function(t,e,n){var r=t.createAndFill(e,n,this.marks);return r?(this.push(r),r):null},Uu.prototype.openNode=function(t,e){this.stack.push({type:t,attrs:e,content:[]})},Uu.prototype.closeNode=function(){this.marks.length&&(this.marks=Pr.none);var t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)};var Yu=function(t,e,n){this.tokens=n,this.schema=t,this.tokenizer=e,this.tokenHandlers=function(t,e){var n=Object.create(null),r=function(r){var i=e[r];if(i.block){var o=t.nodeType(i.block);Wu(i,r)?n[r]=function(t,e,n,r){t.openNode(o,Hu(i,e,n,r)),t.addText($u(e.content)),t.closeNode()}:(n[r+"_open"]=function(t,e,n,r){return t.openNode(o,Hu(i,e,n,r))},n[r+"_close"]=function(t){return t.closeNode()})}else if(i.node){var a=t.nodeType(i.node);n[r]=function(t,e,n,r){return t.addNode(a,Hu(i,e,n,r))}}else if(i.mark){var s=t.marks[i.mark];Wu(i,r)?n[r]=function(t,e,n,r){t.openMark(s.create(Hu(i,e,n,r))),t.addText($u(e.content)),t.closeMark(s)}:(n[r+"_open"]=function(t,e,n,r){return t.openMark(s.create(Hu(i,e,n,r)))},n[r+"_close"]=function(t){return t.closeMark(s)})}else{if(!i.ignore)throw new RangeError("Unrecognized parsing spec "+JSON.stringify(i));Wu(i,r)?n[r]=Zu:(n[r+"_open"]=Zu,n[r+"_close"]=Zu)}};for(var i in e)r(i);return n.text=function(t,e){return t.addText(e.content)},n.inline=function(t,e){return t.parseTokens(e.children)},n.softbreak=n.softbreak||function(t){return t.addText("\n")},n}(t,n)};function Gu(t,e){for(;++e<t.length;)if("list_item_open"!=t[e].type)return t[e].hidden;return!1}Yu.prototype.parse=function(t){var e,n=new Uu(this.schema,this.tokenHandlers);n.parseTokens(this.tokenizer.parse(t,{}));do{e=n.closeNode()}while(n.stack.length);return e};var Ku=new Yu(Vu,qu()("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:function(t,e,n){return{tight:Gu(e,n)}}},ordered_list:{block:"ordered_list",getAttrs:function(t,e,n){return{order:+t.attrGet("start")||1,tight:Gu(e,n)}}},heading:{block:"heading",getAttrs:function(t){return{level:+t.tag.slice(1)}}},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:function(t){return{params:t.info||""}},noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:function(t){return{src:t.attrGet("src"),title:t.attrGet("title")||null,alt:t.children[0]&&t.children[0].content||null}}},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:function(t){return{href:t.attrGet("href"),title:t.attrGet("title")||null}}},code_inline:{mark:"code",noCloseToken:!0}}),Ju=function(t,e){this.nodes=t,this.marks=e};Ju.prototype.serialize=function(t,e){var n=new ec(this.nodes,this.marks,e);return n.renderContent(t),n.out};var Xu=new Ju({blockquote:function(t,e){t.wrapBlock("> ",null,e,(function(){return t.renderContent(e)}))},code_block:function(t,e){t.write("```"+(e.attrs.params||"")+"\n"),t.text(e.textContent,!1),t.ensureNewLine(),t.write("```"),t.closeBlock(e)},heading:function(t,e){t.write(t.repeat("#",e.attrs.level)+" "),t.renderInline(e),t.closeBlock(e)},horizontal_rule:function(t,e){t.write(e.attrs.markup||"---"),t.closeBlock(e)},bullet_list:function(t,e){t.renderList(e," ",(function(){return(e.attrs.bullet||"*")+" "}))},ordered_list:function(t,e){var n=e.attrs.order||1,r=String(n+e.childCount-1).length,i=t.repeat(" ",r+2);t.renderList(e,i,(function(e){var i=String(n+e);return t.repeat(" ",r-i.length)+i+". "}))},list_item:function(t,e){t.renderContent(e)},paragraph:function(t,e){t.renderInline(e),t.closeBlock(e)},image:function(t,e){t.write("!["+t.esc(e.attrs.alt||"")+"]("+t.esc(e.attrs.src)+(e.attrs.title?" "+t.quote(e.attrs.title):"")+")")},hard_break:function(t,e,n,r){for(var i=r+1;i<n.childCount;i++)if(n.child(i).type!=e.type)return void t.write("\\\n")},text:function(t,e){t.text(e.text)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open:function(t,e,n,r){return tc(e,n,r,1)?"<":"["},close:function(t,e,n,r){return tc(e,n,r,-1)?">":"]("+t.esc(e.attrs.href)+(e.attrs.title?" "+t.quote(e.attrs.title):"")+")"}},code:{open:function(t,e,n,r){return Qu(n.child(r),-1)},close:function(t,e,n,r){return Qu(n.child(r-1),1)},escape:!1}});function Qu(t,e){var n,r=/`+/g,i=0;if(t.isText)for(;n=r.exec(t.text);)i=Math.max(i,n[0].length);for(var o=i>0&&e>0?" `":"`",a=0;a<i;a++)o+="`";return i>0&&e<0&&(o+=" "),o}function tc(t,e,n,r){if(t.attrs.title||!/^\w+:/.test(t.attrs.href))return!1;var i=e.child(n+(r<0?-1:0));if(!i.isText||i.text!=t.attrs.href||i.marks[i.marks.length-1]!=t)return!1;if(n==(r<0?1:e.childCount-1))return!0;var o=e.child(n+(r<0?-2:1));return!t.isInSet(o.marks)}var ec=function(t,e,n){this.nodes=t,this.marks=e,this.delim=this.out="",this.closed=!1,this.inTightList=!1,this.options=n||{},"undefined"==typeof this.options.tightLists&&(this.options.tightLists=!1)};ec.prototype.flushClose=function(t){if(this.closed){if(this.atBlank()||(this.out+="\n"),null==t&&(t=2),t>1){var e=this.delim,n=/\s+$/.exec(e);n&&(e=e.slice(0,e.length-n[0].length));for(var r=1;r<t;r++)this.out+=e+"\n"}this.closed=!1}},ec.prototype.wrapBlock=function(t,e,n,r){var i=this.delim;this.write(e||t),this.delim+=t,r(),this.delim=i,this.closeBlock(n)},ec.prototype.atBlank=function(){return/(^|\n)$/.test(this.out)},ec.prototype.ensureNewLine=function(){this.atBlank()||(this.out+="\n")},ec.prototype.write=function(t){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),t&&(this.out+=t)},ec.prototype.closeBlock=function(t){this.closed=t},ec.prototype.text=function(t,e){for(var n=t.split("\n"),r=0;r<n.length;r++){var i=this.atBlank()||this.closed;this.write(),this.out+=!1!==e?this.esc(n[r],i):n[r],r!=n.length-1&&(this.out+="\n")}},ec.prototype.render=function(t,e,n){if("number"==typeof e)throw new Error("!");if(!this.nodes[t.type.name])throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");this.nodes[t.type.name](this,t,e,n)},ec.prototype.renderContent=function(t){var e=this;t.forEach((function(n,r,i){return e.render(n,t,i)}))},ec.prototype.renderInline=function(t){var e=this,n=[],r="",i=function(i,o,a){var s=i?i.marks:[];i&&"hard_break"===i.type.name&&(s=s.filter((function(e){if(a+1==t.childCount)return!1;var n=t.child(a+1);return e.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))})));var u=r;if(r="",i&&i.isText&&s.some((function(t){var n=e.marks[t.type.name];return n&&n.expelEnclosingWhitespace}))){var c=/^(\s*)(.*?)(\s*)$/m.exec(i.text),l=(c[0],c[1]),h=c[2],f=c[3];u+=l,r=f,(l||f)&&((i=h?i.withText(h):null)||(s=n))}var d=s.length&&s[s.length-1],p=d&&!1===e.marks[d.type.name].escape,m=s.length-(p?1:0);t:for(var v=0;v<m;v++){var g=s[v];if(!e.marks[g.type.name].mixable)break;for(var y=0;y<n.length;y++){var b=n[y];if(!e.marks[b.type.name].mixable)break;if(g.eq(b)){v>y?s=s.slice(0,y).concat(g).concat(s.slice(y,v)).concat(s.slice(v+1,m)):y>v&&(s=s.slice(0,v).concat(s.slice(v+1,y)).concat(g).concat(s.slice(y,m)));continue t}}}for(var _=0;_<Math.min(n.length,m)&&s[_].eq(n[_]);)++_;for(;_<n.length;)e.text(e.markString(n.pop(),!1,t,a),!1);if(u&&e.text(u),i){for(;n.length<m;){var w=s[n.length];n.push(w),e.text(e.markString(w,!0,t,a),!1)}p&&i.isText?e.text(e.markString(d,!0,t,a)+i.text+e.markString(d,!1,t,a+1),!1):e.render(i,t,a)}};t.forEach(i),i(null,0,t.childCount)},ec.prototype.renderList=function(t,e,n){var r=this;this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);var i="undefined"!=typeof t.attrs.tight?t.attrs.tight:this.options.tightLists,o=this.inTightList;this.inTightList=i,t.forEach((function(o,a,s){s&&i&&r.flushClose(1),r.wrapBlock(e,n(s),t,(function(){return r.render(o,t,s)}))})),this.inTightList=o},ec.prototype.esc=function(t,e){return t=t.replace(/[`*\\~\[\]]/g,"\\$&"),e&&(t=t.replace(/^[:#\-*+]/,"\\$&").replace(/^(\s*\d+)\./,"$1\\.")),t},ec.prototype.quote=function(t){var e=-1==t.indexOf('"')?'""':-1==t.indexOf("'")?"''":"()";return e[0]+t+e[1]},ec.prototype.repeat=function(t,e){for(var n="",r=0;r<e;r++)n+=t;return n},ec.prototype.markString=function(t,e,n,r){var i=this.marks[t.type.name],o=e?i.open:i.close;return"string"==typeof o?o:o(this,t,n,r)},ec.prototype.getEnclosingWhitespace=function(t){return{leading:(t.match(/^(\s+)/)||[])[0],trailing:(t.match(/(\s+)$/)||[])[0]}};for(var nc={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"},rc={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"},ic="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),oc="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),ac="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),sc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),uc="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),cc=ic&&(sc||+ic[1]<57)||ac&&sc,lc=0;lc<10;lc++)nc[48+lc]=nc[96+lc]=String(lc);for(lc=1;lc<=24;lc++)nc[lc+111]="F"+lc;for(lc=65;lc<=90;lc++)nc[lc]=String.fromCharCode(lc+32),rc[lc]=String.fromCharCode(lc);for(var hc in nc)rc.hasOwnProperty(hc)||(rc[hc]=nc[hc]);var fc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function dc(t){var e,n,r,i,o=t.split(/-(?!$)/),a=o[o.length-1];"Space"==a&&(a=" ");for(var s=0;s<o.length-1;s++){var u=o[s];if(/^(cmd|meta|m)$/i.test(u))i=!0;else if(/^a(lt)?$/i.test(u))e=!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);fc?i=!0:n=!0}}return e&&(a="Alt-"+a),n&&(a="Ctrl-"+a),i&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function pc(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}function mc(t){return new Wo({props:{handleKeyDown:vc(t)}})}function vc(t){var e=function(t){var e=Object.create(null);for(var n in t)e[dc(n)]=t[n];return e}(t);return function(t,n){var r,i=function(t){var e=!(cc&&(t.ctrlKey||t.altKey||t.metaKey)||(oc||uc)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?rc:nc)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),o=1==i.length&&" "!=i,a=e[pc(i,n,!o)];if(a&&a(t.state,t.dispatch,t))return!0;if(o&&(n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(r=nc[n.keyCode])&&r!=i){var s=e[pc(r,n,!0)];if(s&&s(t.state,t.dispatch,t))return!0}else if(o&&n.shiftKey){var u=e[pc(i,n,!0)];if(u&&u(t.state,t.dispatch,t))return!0}return!1}}var gc=200,yc=function(){};yc.prototype.append=function(t){return t.length?(t=yc.from(t),!this.length&&t||t.length<gc&&this.leafAppend(t)||this.length<gc&&t.leafPrepend(this)||this.appendInner(t)):this},yc.prototype.prepend=function(t){return t.length?yc.from(t).append(this):this},yc.prototype.appendInner=function(t){return new _c(this,t)},yc.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?yc.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},yc.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},yc.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},yc.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},yc.from=function(t){return t instanceof yc?t:t&&t.length?new bc(t):yc.empty};var bc=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=gc)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=gc)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(yc);yc.empty=new bc([]);var _c=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length;return!(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r))&&(!(n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;return!(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i))&&(!(n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))&&void 0)},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(yc),wc=yc,xc=function(t,e){this.items=t,this.eventCount=e};xc.prototype.popEvent=function(t,e){var n=this;if(0==this.eventCount)return null;for(var r,i,o=this.items.length;;o--){if(this.items.get(o-1).selection){--o;break}}e&&(r=this.remapping(o,this.items.length),i=r.maps.length);var a,s,u=t.tr,c=[],l=[];return this.items.forEach((function(t,e){if(!t.step)return r||(r=n.remapping(o,e+1),i=r.maps.length),i--,void l.push(t);if(r){l.push(new kc(t.map));var h,f=t.step.map(r.slice(i));f&&u.maybeStep(f).doc&&(h=u.mapping.maps[u.mapping.maps.length-1],c.push(new kc(h,null,null,c.length+l.length))),i--,h&&r.appendMap(h,i)}else u.maybeStep(t.step);return t.selection?(a=r?t.selection.map(r.slice(i)):t.selection,s=new xc(n.items.slice(0,o).append(l.reverse().concat(c)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:u,selection:a}},xc.prototype.addTransform=function(t,e,n,r){for(var i=[],o=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,u=0;u<t.steps.length;u++){var c,l=t.steps[u].invert(t.docs[u]),h=new kc(t.mapping.maps[u],l,e);(c=s&&s.merge(h))&&(h=c,u?i.pop():a=a.slice(0,a.length-1)),i.push(h),e&&(o++,e=null),r||(s=h)}var f,d,p,m=o-n.depth;return m>Cc&&(d=m,(f=a).forEach((function(t,e){if(t.selection&&0==d--)return p=e,!1})),a=f.slice(p),o-=m),new xc(a.append(i),o)},xc.prototype.remapping=function(t,e){var n=new Ui;return this.items.forEach((function(e,r){var i=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:null;n.appendMap(e.map,i)}),t,e),n},xc.prototype.addMaps=function(t){return 0==this.eventCount?this:new xc(this.items.append(t.map((function(t){return new kc(t)}))),this.eventCount)},xc.prototype.rebased=function(t,e){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-e),i=t.mapping,o=t.steps.length,a=this.eventCount;this.items.forEach((function(t){t.selection&&a--}),r);var s=e;this.items.forEach((function(e){var r=i.getMirror(--s);if(null!=r){o=Math.min(o,r);var u=i.maps[r];if(e.step){var c=t.steps[r].invert(t.docs[r]),l=e.selection&&e.selection.map(i.slice(s+1,r));l&&a++,n.push(new kc(u,c,l))}else n.push(new kc(u))}}),r);for(var u=[],c=e;c<o;c++)u.push(new kc(i.maps[c]));var l=this.items.slice(0,r).append(u).append(n),h=new xc(l,a);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-n.length)),h},xc.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},xc.prototype.compress=function(t){void 0===t&&(t=this.items.length);var e=this.remapping(0,t),n=e.maps.length,r=[],i=0;return this.items.forEach((function(o,a){if(a>=t)r.push(o),o.selection&&i++;else if(o.step){var s=o.step.map(e.slice(n)),u=s&&s.getMap();if(n--,u&&e.appendMap(u,n),s){var c=o.selection&&o.selection.map(e.slice(n));c&&i++;var l,h=new kc(u.invert(),s,c),f=r.length-1;(l=r.length&&r[f].merge(h))?r[f]=l:r.push(h)}}else o.map&&n--}),this.items.length,0),new xc(wc.from(r.reverse()),i)},xc.empty=new xc(wc.empty,0);var kc=function(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r};kc.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new kc(e.getMap().invert(),e,this.selection)}};var Sc=function(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r},Cc=20;function Mc(t){var e=[];return t.forEach((function(t,n,r,i){return e.push(r,i)})),e}function Ec(t,e){if(!t)return null;for(var n=[],r=0;r<t.length;r+=2){var i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function Tc(t,e,n,r){var i=Pc(e),o=Lc.get(e).spec.config,a=(r?t.undone:t.done).popEvent(e,i);if(a){var s=a.selection.resolve(a.transform.doc),u=(r?t.done:t.undone).addTransform(a.transform,e.selection.getBookmark(),o,i),c=new Sc(r?u:a.remaining,r?a.remaining:u,null,0);n(a.transform.setSelection(s).setMeta(Lc,{redo:r,historyState:c}).scrollIntoView())}}var Ac=!1,Oc=null;function Pc(t){var e=t.plugins;if(Oc!=e){Ac=!1,Oc=e;for(var n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ac=!0;break}}return Ac}var Lc=new Yo("history"),Dc=new Yo("closeHistory");function Ic(t){return t={depth:t&&t.depth||100,newGroupDelay:t&&t.newGroupDelay||500},new Wo({key:Lc,state:{init:function(){return new Sc(xc.empty,xc.empty,null,0)},apply:function(e,n,r){return function(t,e,n,r){var i,o=n.getMeta(Lc);if(o)return o.historyState;n.getMeta(Dc)&&(t=new Sc(t.done,t.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(a&&a.getMeta(Lc))return a.getMeta(Lc).redo?new Sc(t.done.addTransform(n,null,r,Pc(e)),t.undone,Mc(n.mapping.maps[n.steps.length-1]),t.prevTime):new Sc(t.done,t.undone.addTransform(n,null,r,Pc(e)),null,t.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new Sc(t.done.rebased(n,i),t.undone.rebased(n,i),Ec(t.prevRanges,n.mapping),t.prevTime):new Sc(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Ec(t.prevRanges,n.mapping),t.prevTime);var s=0==t.prevTime||!a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;var n=!1;return t.mapping.maps[0].forEach((function(t,r){for(var i=0;i<e.length;i+=2)t<=e[i+1]&&r>=e[i]&&(n=!0)})),n}(n,t.prevRanges)),u=a?Ec(t.prevRanges,n.mapping):Mc(n.mapping.maps[n.steps.length-1]);return new Sc(t.done.addTransform(n,s?e.selection.getBookmark():null,r,Pc(e)),xc.empty,u,n.time)}(n,r,e,t)}},config:t})}function Rc(t,e){var n=Lc.getState(t);return!(!n||0==n.done.eventCount)&&(e&&Tc(n,t,e,!1),!0)}function Nc(t,e){var n=Lc.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&Tc(n,t,e,!0),!0)}function zc(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function jc(t,e){for(;t;t="start"==e?t.firstChild:t.lastChild)if(t.isTextblock)return!0;return!1}function Bc(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function Fc(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){var n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}function qc(t,e){var n,r=t.selection,i=r instanceof Oo;if(i){if(r.node.isTextblock||!oo(t.doc,r.from))return!1;n=r.from}else if(null==(n=so(t.doc,r.from,-1)))return!1;if(e){var o=t.tr.join(n);i&&o.setSelection(Oo.create(o.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0}function Vc(t,e){var n,r=t.selection;if(r instanceof Oo){if(r.node.isTextblock||!oo(t.doc,r.to))return!1;n=r.to}else if(null==(n=so(t.doc,r.to,1)))return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0}function Uc(t,e){var n=t.selection,r=n.$from,i=n.$to,o=r.blockRange(i),a=o&&eo(o);return null!=a&&(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}function Hc(t){for(var e=0;e<t.edgeCount;e++){var n=t.edge(e).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Wc(t,e){var n=t.selection,r=n.$head,i=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(i))return!1;var o=r.node(-1),a=r.indexAfter(-1),s=Hc(o.contentMatchAt(a));if(!o.canReplaceWith(a,a,s))return!1;if(e){var u=r.after(),c=t.tr.replaceWith(u,u,s.createAndFill());c.setSelection(Co.near(c.doc.resolve(u),1)),e(c.scrollIntoView())}return!0}function $c(t,e){var n=t.selection,r=n.$from,i=n.$to;if(t.selection instanceof Oo&&t.selection.node.isBlock)return!(!r.parentOffset||!io(t.doc,r.pos))&&(e&&e(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(e){var o=i.parentOffset==i.parent.content.size,a=t.tr;(t.selection instanceof To||t.selection instanceof Lo)&&a.deleteSelection();var s=0==r.depth?null:Hc(r.node(-1).contentMatchAt(r.indexAfter(-1))),u=o&&s?[{type:s}]:null,c=io(a.doc,a.mapping.map(r.pos),1,u);u||c||!io(a.doc,a.mapping.map(r.pos),1,s&&[{type:s}])||(u=[{type:s}],c=!0),c&&(a.split(a.mapping.map(r.pos),1,u),o||r.parentOffset||r.parent.type==s||!r.node(-1).canReplace(r.index(-1),r.indexAfter(-1),Mr.from([s.create(),r.parent]))||a.setNodeMarkup(a.mapping.map(r.before()),s)),e(a.scrollIntoView())}return!0}function Zc(t,e){var n,r=t.selection,i=r.$from,o=r.to,a=i.sharedDepth(o);return 0!=a&&(n=i.before(a),e&&e(t.tr.setSelection(Oo.create(t.doc,n))),!0)}function Yc(t,e,n){var r,i,o=e.nodeBefore,a=e.nodeAfter;if(o.type.spec.isolating||a.type.spec.isolating)return!1;if(function(t,e,n){var r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!!(r&&i&&r.type.compatibleContent(i.type))&&(!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!(!e.parent.canReplace(o,o+1)||!i.isTextblock&&!oo(t.doc,e.pos))&&(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0))}(t,e,n))return!0;var s=e.parent.canReplace(e.index(),e.index()+1);if(s&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(a.type))&&i.matchType(r[0]||a.type).validEnd){if(n){for(var u=e.pos+a.nodeSize,c=Mr.empty,l=r.length-1;l>=0;l--)c=Mr.from(r[l].create(null,c));c=Mr.from(o.copy(c));var h=t.tr.step(new Xi(e.pos-1,u,e.pos,u,new Dr(c,1,0),r.length,!0)),f=u+2*r.length;oo(h.doc,f)&&h.join(f),n(h.scrollIntoView())}return!0}var d=Co.findFrom(e,1),p=d&&d.$from.blockRange(d.$to),m=p&&eo(p);if(null!=m&&m>=e.depth)return n&&n(t.tr.lift(p,m).scrollIntoView()),!0;if(s&&a.isTextblock&&jc(o,"end")){for(var v=o,g=[];g.push(v),!v.isTextblock;)v=v.lastChild;if(v.canReplace(v.childCount,v.childCount,a.content)){if(n){for(var y=Mr.empty,b=g.length-1;b>=0;b--)y=Mr.from(g[b].copy(y));n(t.tr.step(new Xi(e.pos-g.length,e.pos+a.nodeSize,e.pos+1,e.pos+a.nodeSize-1,new Dr(y,g.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function Gc(t,e){return function(n,r){var i=n.selection,o=i.$from,a=i.$to,s=o.blockRange(a),u=s&&no(s,t,e);return!!u&&(r&&r(n.tr.wrap(s,u).scrollIntoView()),!0)}}function Kc(t,e){return function(n,r){var i=n.selection,o=i.from,a=i.to,s=!1;return n.doc.nodesBetween(o,a,(function(r,i){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{var o=n.doc.resolve(i),a=o.index();s=o.parent.canReplaceWith(a,a+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(o,a,t,e).scrollIntoView()),!0)}}function Jc(t,e){return function(n,r){var i=n.selection,o=i.empty,a=i.$cursor,s=i.ranges;if(o&&!a||!function(t,e,n){for(var r=function(r){var i=e[r],o=i.$from,a=i.$to,s=0==o.depth&&t.type.allowsMarkType(n);if(t.nodesBetween(o.pos,a.pos,(function(t){if(s)return!1;s=t.inlineContent&&t.type.allowsMarkType(n)})),s)return{v:!0}},i=0;i<e.length;i++){var o=r(i);if(o)return o.v}return!1}(n.doc,s,t))return!1;if(r)if(a)t.isInSet(n.storedMarks||a.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{for(var u=!1,c=n.tr,l=0;!u&&l<s.length;l++){var h=s[l],f=h.$from,d=h.$to;u=n.doc.rangeHasMark(f.pos,d.pos,t)}for(var p=0;p<s.length;p++){var m=s[p],v=m.$from,g=m.$to;if(u)c.removeMark(v.pos,g.pos,t);else{var y=v.pos,b=g.pos,_=v.nodeAfter,w=g.nodeBefore,x=_&&_.isText?/^\s*/.exec(_.text)[0].length:0,k=w&&w.isText?/\s*$/.exec(w.text)[0].length:0;y+x<b&&(y+=x,b-=k),c.addMark(y,b,t.create(e))}}r(c.scrollIntoView())}return!0}}function Xc(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(e,n,r){for(var i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}var Qc=Xc(zc,(function(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",t):r.parentOffset>0))return!1;var i=Bc(r);if(!i){var o=r.blockRange(),a=o&&eo(o);return null!=a&&(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}var s=i.nodeBefore;if(!s.type.spec.isolating&&Yc(t,i,e))return!0;if(0==r.parent.content.size&&(jc(s,"end")||Oo.isSelectable(s))){if(e){var u=t.tr.deleteRange(r.before(),r.after());u.setSelection(jc(s,"end")?Co.findFrom(u.doc.resolve(u.mapping.map(i.pos,-1)),-1):Oo.create(u.doc,i.pos-s.nodeSize)),e(u.scrollIntoView())}return!0}return!(!s.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0)}),(function(t,e,n){var r=t.selection,i=r.$head,o=i;if(!r.empty)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):i.parentOffset>0)return!1;o=Bc(i)}var a=o&&o.nodeBefore;return!(!a||!Oo.isSelectable(a))&&(e&&e(t.tr.setSelection(Oo.create(t.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)})),tl=Xc(zc,(function(t,e,n){var r=t.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size))return!1;var i=Fc(r);if(!i)return!1;var o=i.nodeAfter;if(Yc(t,i,e))return!0;if(0==r.parent.content.size&&(jc(o,"start")||Oo.isSelectable(o))){if(e){var a=t.tr.deleteRange(r.before(),r.after());a.setSelection(jc(o,"start")?Co.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):Oo.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)}),(function(t,e,n){var r=t.selection,i=r.$head,o=i;if(!r.empty)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):i.parentOffset<i.parent.content.size)return!1;o=Fc(i)}var a=o&&o.nodeAfter;return!(!a||!Oo.isSelectable(a))&&(e&&e(t.tr.setSelection(Oo.create(t.doc,o.pos)).scrollIntoView()),!0)})),el={Enter:Xc((function(t,e){var n=t.selection,r=n.$head,i=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(i))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)}),(function(t,e){var n=t.selection,r=n.$from,i=n.$to;if(!(n instanceof Oo)||r.parent.inlineContent)return!1;var o=Hc(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){var a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=t.tr.insert(a,o.createAndFill());s.setSelection(To.create(s.doc,a+1)),e(s.scrollIntoView())}return!0}),(function(t,e){var n=t.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(io(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}var i=n.blockRange(),o=i&&eo(i);return null!=o&&(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)}),$c),"Mod-Enter":Wc,Backspace:Qc,"Mod-Backspace":Qc,Delete:tl,"Mod-Delete":tl,"Mod-a":function(t,e){return e&&e(t.tr.setSelection(new Lo(t.doc))),!0}},nl={"Ctrl-h":el.Backspace,"Alt-Backspace":el["Mod-Backspace"],"Ctrl-d":el.Delete,"Ctrl-Alt-Backspace":el["Mod-Delete"],"Alt-Delete":el["Mod-Delete"],"Alt-d":el["Mod-Delete"]};for(var rl in el)nl[rl]=el[rl];var il=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?nl:el;function ol(t){return void 0===t&&(t={}),new Wo({view:function(e){return new al(e,t)}})}var al=function(t,e){var n=this;this.editorView=t,this.width=e.width||1,this.color=e.color||"black",this.class=e.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var r=function(t){return n[e](t)};return t.dom.addEventListener(e,r),{name:e,handler:r}}))};al.prototype.destroy=function(){var t=this;this.handlers.forEach((function(e){var n=e.name,r=e.handler;return t.editorView.dom.removeEventListener(n,r)}))},al.prototype.update=function(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&this.updateOverlay()},al.prototype.setCursor=function(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},al.prototype.updateOverlay=function(){var t,e=this.editorView.state.doc.resolve(this.cursorPos);if(!e.parent.inlineContent){var n=e.nodeBefore,r=e.nodeAfter;if(n||r){var i=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),o=n?i.bottom:i.top;n&&r&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:i.left,right:i.right,top:o-this.width/2,bottom:o+this.width/2}}}if(!t){var a=this.editorView.coordsAtPos(this.cursorPos);t={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var s,u,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!c||c==document.body&&"static"==getComputedStyle(c).position)s=-pageXOffset,u=-pageYOffset;else{var l=c.getBoundingClientRect();s=l.left-c.scrollLeft,u=l.top-c.scrollTop}this.element.style.left=t.left-s+"px",this.element.style.top=t.top-u+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"},al.prototype.scheduleRemoval=function(t){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.setCursor(null)}),t)},al.prototype.dragover=function(t){if(this.editorView.editable){var e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY});if(e){var n=e.pos;this.editorView.dragging&&this.editorView.dragging.slice&&null==(n=uo(this.editorView.state.doc,n,this.editorView.dragging.slice))&&(n=e.pos),this.setCursor(n),this.scheduleRemoval(5e3)}}},al.prototype.dragend=function(){this.scheduleRemoval(20)},al.prototype.drop=function(){this.scheduleRemoval(20)},al.prototype.dragleave=function(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)};var sl=function(t){function e(e){t.call(this,e,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(n,r){var i=n.resolve(r.map(this.head));return e.valid(i)?new e(i):t.near(i)},e.prototype.content=function(){return Dr.empty},e.prototype.eq=function(t){return t instanceof e&&t.head==this.head},e.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},e.fromJSON=function(t,n){if("number"!=typeof n.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))},e.prototype.getBookmark=function(){return new ul(this.anchor)},e.valid=function(t){var e=t.parent;if(e.isTextblock||!function(t){for(var e=t.depth;e>=0;e--){var n=t.index(e);if(0!=n)for(var r=t.node(e).child(n-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}(t)||!function(t){for(var e=t.depth;e>=0;e--){var n=t.indexAfter(e),r=t.node(e);if(n!=r.childCount)for(var i=r.child(n);;i=i.firstChild){if(0==i.childCount&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}(t))return!1;var n=e.type.spec.allowGapCursor;if(null!=n)return n;var r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock},e.findFrom=function(t,n,r){t:for(;;){if(!r&&e.valid(t))return t;for(var i=t.pos,o=null,a=t.depth;;a--){var s=t.node(a);if(n>0?t.indexAfter(a)<s.childCount:t.index(a)>0){o=s.child(n>0?t.indexAfter(a):t.index(a)-1);break}if(0==a)return null;i+=n;var u=t.doc.resolve(i);if(e.valid(u))return u}for(;;){var c=n>0?o.firstChild:o.lastChild;if(!c){if(o.isAtom&&!o.isText&&!Oo.isSelectable(o)){t=t.doc.resolve(i+o.nodeSize*n),r=!1;continue t}break}o=c,i+=n;var l=t.doc.resolve(i);if(e.valid(l))return l}return null}},e}(Co);sl.prototype.visible=!1,Co.jsonID("gapcursor",sl);var ul=function(t){this.pos=t};ul.prototype.map=function(t){return new ul(t.map(this.pos))},ul.prototype.resolve=function(t){var e=t.resolve(this.pos);return sl.valid(e)?new sl(e):Co.near(e)};var cl=vc({ArrowLeft:ll("horiz",-1),ArrowRight:ll("horiz",1),ArrowUp:ll("vert",-1),ArrowDown:ll("vert",1)});function ll(t,e){var n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,i){var o=t.selection,a=e>0?o.$to:o.$from,s=o.empty;if(o instanceof To){if(!i.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=t.doc.resolve(e>0?a.after():a.before())}var u=sl.findFrom(a,e,s);return!!u&&(r&&r(t.tr.setSelection(new sl(u))),!0)}}function hl(t,e,n){if(!t.editable)return!1;var r=t.state.doc.resolve(e);if(!sl.valid(r))return!1;var i=t.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(i>-1&&Oo.isSelectable(t.state.doc.nodeAt(i)))&&(t.dispatch(t.state.tr.setSelection(new sl(r))),!0)}function fl(t){if(!(t.selection instanceof sl))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",ku.create(t.doc,[bu.widget(t.selection.head,e,{key:"gapcursor"})])}function dl(t){return(dl="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pl(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&"object"==dl(n)&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?t.setAttribute(r,i):null!=i&&(t[r]=i)}e++}for(;e<arguments.length;e++)ml(t,arguments[e]);return t}function ml(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var n=0;n<e.length;n++)ml(t,e[n])}}var vl="http://www.w3.org/2000/svg",gl="ProseMirror-icon";function yl(t){var e=document.createElement("div");if(e.className=gl,t.path){var n="pm-icon-"+function(t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return e}(t.path).toString(16);document.getElementById(n)||function(t,e){var n=document.getElementById(gl+"-collection");n||((n=document.createElementNS(vl,"svg")).id=gl+"-collection",n.style.display="none",document.body.insertBefore(n,document.body.firstChild));var r=document.createElementNS(vl,"symbol");r.id=t,r.setAttribute("viewBox","0 0 "+e.width+" "+e.height),r.appendChild(document.createElementNS(vl,"path")).setAttribute("d",e.path),n.appendChild(r)}(n,t);var r=e.appendChild(document.createElementNS(vl,"svg"));r.style.width=t.width/t.height+"em",r.appendChild(document.createElementNS(vl,"use")).setAttributeNS("http://www.w3.org/1999/xlink","href",/([^#]*)/.exec(document.location)[1]+"#"+n)}else t.dom?e.appendChild(t.dom.cloneNode(!0)):(e.appendChild(document.createElement("span")).textContent=t.text||"",t.css&&(e.firstChild.style.cssText=t.css));return e}var bl="ProseMirror-menu",_l=function(t){this.spec=t};function wl(t,e){return t._props.translate?t._props.translate(e):e}_l.prototype.render=function(t){var e=this.spec,n=e.render?e.render(t):e.icon?yl(e.icon):e.label?pl("div",null,wl(t,e.label)):null;if(!n)throw new RangeError("MenuItem without icon or label property");if(e.title){var r="function"===typeof e.title?e.title(t.state):e.title;n.setAttribute("title",wl(t,r))}return e.class&&n.classList.add(e.class),e.css&&(n.style.cssText+=e.css),n.addEventListener("mousedown",(function(r){r.preventDefault(),n.classList.contains(bl+"-disabled")||e.run(t.state,t.dispatch,t,r)})),{dom:n,update:function(t){if(e.select){var r=e.select(t);if(n.style.display=r?"":"none",!r)return!1}var i=!0;if(e.enable&&(i=e.enable(t)||!1,Nl(n,bl+"-disabled",!i)),e.active){var o=i&&e.active(t)||!1;Nl(n,bl+"-active",o)}return!0}}};var xl={time:0,node:null};function kl(t){xl.time=Date.now(),xl.node=t.target}function Sl(t){return Date.now()-100<xl.time&&xl.node&&t.contains(xl.node)}var Cl=function(t,e){this.options=e||{},this.content=Array.isArray(t)?t:[t]};function Ml(t,e){for(var n=[],r=[],i=0;i<t.length;i++){var o=t[i].render(e),a=o.dom,s=o.update;n.push(pl("div",{class:bl+"-dropdown-item"},a)),r.push(s)}return{dom:n,update:El(r,n)}}function El(t,e){return function(n){for(var r=!1,i=0;i<t.length;i++){var o=t[i](n);e[i].style.display=o?"":"none",o&&(r=!0)}return r}}Cl.prototype.render=function(t){var e=this,n=Ml(this.content,t),r=pl("div",{class:bl+"-dropdown "+(this.options.class||""),style:this.options.css},wl(t,this.options.label));this.options.title&&r.setAttribute("title",wl(t,this.options.title));var i=pl("div",{class:bl+"-dropdown-wrap"},r),o=null,a=null,s=function(){o&&o.close()&&(o=null,window.removeEventListener("mousedown",a))};return r.addEventListener("mousedown",(function(t){t.preventDefault(),kl(t),o?s():(o=e.expand(i,n.dom),window.addEventListener("mousedown",a=function(){Sl(i)||s()}))})),{dom:i,update:function(t){var e=n.update(t);return i.style.display=e?"":"none",e}}},Cl.prototype.expand=function(t,e){var n=pl("div",{class:bl+"-dropdown-menu "+(this.options.class||"")},e),r=!1;return t.appendChild(n),{close:function(){if(!r)return r=!0,t.removeChild(n),!0},node:n}};var Tl=function(t,e){this.options=e||{},this.content=Array.isArray(t)?t:[t]};Tl.prototype.render=function(t){var e=Ml(this.content,t),n=pl("div",{class:bl+"-submenu-label"},wl(t,this.options.label)),r=pl("div",{class:bl+"-submenu-wrap"},n,pl("div",{class:bl+"-submenu"},e.dom)),i=null;return n.addEventListener("mousedown",(function(t){t.preventDefault(),kl(t),Nl(r,bl+"-submenu-wrap-active"),i||window.addEventListener("mousedown",i=function(){Sl(r)||(r.classList.remove(bl+"-submenu-wrap-active"),window.removeEventListener("mousedown",i),i=null)})})),{dom:r,update:function(t){var n=e.update(t);return r.style.display=n?"":"none",n}}};var Al={join:{width:800,height:900,path:"M0 75h800v125h-800z M0 825h800v-125h-800z M250 400h100v-100h100v100h100v100h-100v100h-100v-100h-100z"},lift:{width:1024,height:1024,path:"M219 310v329q0 7-5 12t-12 5q-8 0-13-5l-164-164q-5-5-5-13t5-13l164-164q5-5 13-5 7 0 12 5t5 12zM1024 749v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12zM1024 530v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 310v109q0 7-5 12t-12 5h-621q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h621q7 0 12 5t5 12zM1024 91v109q0 7-5 12t-12 5h-987q-7 0-12-5t-5-12v-109q0-7 5-12t12-5h987q7 0 12 5t5 12z"},selectParentNode:{text:"\u2b1a",css:"font-weight: bold"},undo:{width:1024,height:1024,path:"M761 1024c113-206 132-520-313-509v253l-384-384 384-384v248c534-13 594 472 313 775z"},redo:{width:1024,height:1024,path:"M576 248v-248l384 384-384 384v-253c-446-10-427 303-313 509-280-303-221-789 313-775z"},strong:{width:805,height:1024,path:"M317 869q42 18 80 18 214 0 214-191 0-65-23-102-15-25-35-42t-38-26-46-14-48-6-54-1q-41 0-57 5 0 30-0 90t-0 90q0 4-0 38t-0 55 2 47 6 38zM309 442q24 4 62 4 46 0 81-7t62-25 42-51 14-81q0-40-16-70t-45-46-61-24-70-8q-28 0-74 7 0 28 2 86t2 86q0 15-0 45t-0 45q0 26 0 39zM0 950l1-53q8-2 48-9t60-15q4-6 7-15t4-19 3-18 1-21 0-19v-37q0-561-12-585-2-4-12-8t-25-6-28-4-27-2-17-1l-2-47q56-1 194-6t213-5q13 0 39 0t38 0q40 0 78 7t73 24 61 40 42 59 16 78q0 29-9 54t-22 41-36 32-41 25-48 22q88 20 146 76t58 141q0 57-20 102t-53 74-78 48-93 27-100 8q-25 0-75-1t-75-1q-60 0-175 6t-132 6z"},em:{width:585,height:1024,path:"M0 949l9-48q3-1 46-12t63-21q16-20 23-57 0-4 35-165t65-310 29-169v-14q-13-7-31-10t-39-4-33-3l10-58q18 1 68 3t85 4 68 1q27 0 56-1t69-4 56-3q-2 22-10 50-17 5-58 16t-62 19q-4 10-8 24t-5 22-4 26-3 24q-15 84-50 239t-44 203q-1 5-7 33t-11 51-9 47-3 32l0 10q9 2 105 17-1 25-9 56-6 0-18 0t-18 0q-16 0-49-5t-49-5q-78-1-117-1-29 0-81 5t-69 6z"},code:{width:896,height:1024,path:"M608 192l-96 96 224 224-224 224 96 96 288-320-288-320zM288 192l-288 320 288 320 96-96-224-224 224-224-96-96z"},link:{width:951,height:1024,path:"M832 694q0-22-16-38l-118-118q-16-16-38-16-24 0-41 18 1 1 10 10t12 12 8 10 7 14 2 15q0 22-16 38t-38 16q-8 0-15-2t-14-7-10-8-12-12-10-10q-18 17-18 41 0 22 16 38l117 118q15 15 38 15 22 0 38-14l84-83q16-16 16-38zM430 292q0-22-16-38l-117-118q-16-16-38-16-22 0-38 15l-84 83q-16 16-16 38 0 22 16 38l118 118q15 15 38 15 24 0 41-17-1-1-10-10t-12-12-8-10-7-14-2-15q0-22 16-38t38-16q8 0 15 2t14 7 10 8 12 12 10 10q18-17 18-41zM941 694q0 68-48 116l-84 83q-47 47-116 47-69 0-116-48l-117-118q-47-47-47-116 0-70 50-119l-50-50q-49 50-118 50-68 0-116-48l-118-118q-48-48-48-116t48-116l84-83q47-47 116-47 69 0 116 48l117 118q47 47 47 116 0 70-50 119l50 50q49-50 118-50 68 0 116 48l118 118q48 48 48 116z"},bulletList:{width:768,height:896,path:"M0 512h128v-128h-128v128zM0 256h128v-128h-128v128zM0 768h128v-128h-128v128zM256 512h512v-128h-512v128zM256 256h512v-128h-512v128zM256 768h512v-128h-512v128z"},orderedList:{width:768,height:896,path:"M320 512h448v-128h-448v128zM320 768h448v-128h-448v128zM320 128v128h448v-128h-448zM79 384h78v-256h-36l-85 23v50l43-2v185zM189 590c0-36-12-78-96-78-33 0-64 6-83 16l1 66c21-10 42-15 67-15s32 11 32 28c0 26-30 58-110 112v50h192v-67l-91 2c49-30 87-66 87-113l1-1z"},blockquote:{width:640,height:896,path:"M0 448v256h256v-256h-128c0 0 0-128 128-128v-128c0 0-256 0-256 256zM640 320v-128c0 0-256 0-256 256v256h256v-256h-128c0 0 0-128 128-128z"}},Ol=new _l({title:"Join with above block",run:qc,select:function(t){return qc(t)},icon:Al.join}),Pl=new _l({title:"Lift out of enclosing block",run:Uc,select:function(t){return Uc(t)},icon:Al.lift}),Ll=new _l({title:"Select parent node",run:Zc,select:function(t){return Zc(t)},icon:Al.selectParentNode}),Dl=new _l({title:"Undo last change",run:Rc,enable:function(t){return Rc(t)},icon:Al.undo}),Il=new _l({title:"Redo last undone change",run:Nc,enable:function(t){return Nc(t)},icon:Al.redo});function Rl(t,e){var n=Kc(t,e.attrs),r={run:n,enable:function(t){return n(t)},active:function(n){var r=n.selection,i=r.$from,o=r.to,a=r.node;return a?a.hasMarkup(t,e.attrs):o<=i.end()&&i.parent.hasMarkup(t,e.attrs)}};for(var i in e)r[i]=e[i];return new _l(r)}function Nl(t,e,n){n?t.classList.add(e):t.classList.remove(e)}var zl="ProseMirror-menubar";var jl=function(t,e){var n=this;this.editorView=t,this.options=e,this.wrapper=pl("div",{class:zl+"-wrapper"}),this.menu=this.wrapper.appendChild(pl("div",{class:zl})),this.menu.className=zl,this.spacer=null,t.dom.parentNode.replaceChild(this.wrapper,t.dom),this.wrapper.appendChild(t.dom),this.maxHeight=0,this.widthForMaxHeight=0,this.floating=!1;var r=function(t,e){for(var n=document.createDocumentFragment(),r=[],i=[],o=0;o<e.length;o++){for(var a=e[o],s=[],u=[],c=0;c<a.length;c++){var l=a[c].render(t),h=l.dom,f=l.update,d=pl("span",{class:bl+"item"},h);n.appendChild(d),u.push(d),s.push(f)}s.length&&(r.push(El(s,u)),o<e.length-1&&i.push(n.appendChild(pl("span",{class:bl+"separator"}))))}return{dom:n,update:function(t){for(var e=!1,n=!1,o=0;o<r.length;o++){var a=r[o](t);o&&(i[o-1].style.display=n&&a?"":"none"),n=a,a&&(e=!0)}return e}}}(this.editorView,this.options.content),i=r.dom,o=r.update;if(this.contentUpdate=o,this.menu.appendChild(i),this.update(),e.floating&&!function(){if("undefined"==typeof navigator)return!1;var t=navigator.userAgent;return!/Edge\/\d/.test(t)&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t)}()){this.updateFloat();var a=function(t){for(var e=[window],n=t.parentNode;n;n=n.parentNode)e.push(n);return e}(this.wrapper);this.scrollFunc=function(t){var e=n.editorView.root;(e.body||e).contains(n.wrapper)?n.updateFloat(t.target.getBoundingClientRect&&t.target):a.forEach((function(t){return t.removeEventListener("scroll",n.scrollFunc)}))},a.forEach((function(t){return t.addEventListener("scroll",n.scrollFunc)}))}};jl.prototype.update=function(){this.contentUpdate(this.editorView.state),this.floating?this.updateScrollCursor():(this.menu.offsetWidth!=this.widthForMaxHeight&&(this.widthForMaxHeight=this.menu.offsetWidth,this.maxHeight=0),this.menu.offsetHeight>this.maxHeight&&(this.maxHeight=this.menu.offsetHeight,this.menu.style.minHeight=this.maxHeight+"px"))},jl.prototype.updateScrollCursor=function(){var t=this.editorView.root.getSelection();if(t.focusNode){var e=t.getRangeAt(0).getClientRects(),n=e[function(t){if(t.anchorNode==t.focusNode)return t.anchorOffset>t.focusOffset;return t.anchorNode.compareDocumentPosition(t.focusNode)==Node.DOCUMENT_POSITION_FOLLOWING}(t)?0:e.length-1];if(n){var r=this.menu.getBoundingClientRect();if(n.top<r.bottom&&n.bottom>r.top){var i=function(t){for(var e=t.parentNode;e;e=e.parentNode)if(e.scrollHeight>e.clientHeight)return e}(this.wrapper);i&&(i.scrollTop-=r.bottom-n.top)}}}},jl.prototype.updateFloat=function(t){var e=this.wrapper,n=e.getBoundingClientRect(),r=t?Math.max(0,t.getBoundingClientRect().top):0;if(this.floating)if(n.top>=r||n.bottom<this.menu.offsetHeight+10)this.floating=!1,this.menu.style.position=this.menu.style.left=this.menu.style.top=this.menu.style.width="",this.menu.style.display="",this.spacer.parentNode.removeChild(this.spacer),this.spacer=null;else{var i=(e.offsetWidth-e.clientWidth)/2;this.menu.style.left=n.left+i+"px",this.menu.style.display=n.top>window.innerHeight?"none":"",t&&(this.menu.style.top=r+"px")}else if(n.top<r&&n.bottom>=this.menu.offsetHeight+10){this.floating=!0;var o=this.menu.getBoundingClientRect();this.menu.style.left=o.left+"px",this.menu.style.width=o.width+"px",t&&(this.menu.style.top=r+"px"),this.menu.style.position="fixed",this.spacer=pl("div",{class:zl+"-spacer",style:"height: "+o.height+"px"}),e.insertBefore(this.spacer,this.menu)}},jl.prototype.destroy=function(){this.wrapper.parentNode&&this.wrapper.parentNode.replaceChild(this.editorView.dom,this.wrapper)};function Bl(t,e){return function(n,r){var i=n.selection,o=i.$from,a=i.$to,s=o.blockRange(a),u=!1,c=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==o.index(s.depth-1))return!1;var l=n.doc.resolve(s.start-2);c=new Jr(l,l,s.depth),s.endIndex<s.parent.childCount&&(s=new Jr(o,n.doc.resolve(a.end(s.depth)),s.depth)),u=!0}var h=no(c,t,e,s);return!!h&&(r&&r(function(t,e,n,r,i){for(var o=Mr.empty,a=n.length-1;a>=0;a--)o=Mr.from(n[a].type.create(n[a].attrs,o));t.step(new Xi(e.start-(r?2:0),e.end,e.start,e.end,new Dr(o,0,0),n.length,!0));for(var s=0,u=0;u<n.length;u++)n[u].type==i&&(s=u+1);for(var c=n.length-s,l=e.start+n.length-(r?2:0),h=e.parent,f=e.startIndex,d=e.endIndex,p=!0;f<d;f++,p=!1)!p&&io(t.doc,l,c)&&(t.split(l,c),l+=2*c),l+=h.child(f).nodeSize;return t}(n.tr,s,h,u,t).scrollIntoView()),!0)}}function Fl(t){return function(e,n){var r=e.selection,i=r.$from,o=r.$to,a=i.blockRange(o,(function(e){return e.childCount&&e.firstChild.type==t}));return!!a&&(!n||(i.node(a.depth-1).type==t?function(t,e,n,r){var i=t.tr,o=r.end,a=r.$to.end(r.depth);o<a&&(i.step(new Xi(o-1,a,o,a,new Dr(Mr.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Jr(i.doc.resolve(r.$from.pos),i.doc.resolve(a),r.depth));return e(i.lift(r,eo(r)).scrollIntoView()),!0}(e,n,t,a):function(t,e,n){for(var r=t.tr,i=n.parent,o=n.end,a=n.endIndex-1,s=n.startIndex;a>s;a--)o-=i.child(a).nodeSize,r.delete(o-1,o+1);var u=r.doc.resolve(n.start),c=u.nodeAfter,l=0==n.startIndex,h=n.endIndex==i.childCount,f=u.node(-1),d=u.index(-1);if(!f.canReplace(d+(l?0:1),d+1,c.content.append(h?Mr.empty:Mr.from(i))))return!1;var p=u.pos,m=p+c.nodeSize;return r.step(new Xi(p-(l?1:0),m+(h?1:0),p+1,m-1,new Dr((l?Mr.empty:Mr.from(i.copy(Mr.empty))).append(h?Mr.empty:Mr.from(i.copy(Mr.empty))),l?0:1,h?0:1),l?0:1)),e(r.scrollIntoView()),!0}(e,n,a)))}}var ql=function(t,e){var n;this.match=t,this.handler="string"==typeof e?(n=e,function(t,e,r,i){var o=n;if(e[1]){var a=e[0].lastIndexOf(e[1]);o+=e[0].slice(a+e[1].length);var s=(r+=a)-i;s>0&&(o=e[0].slice(a-s,a)+o,r=i)}return t.tr.insertText(o,r,i)}):e};function Vl(t,e,n,r,i,o){if(t.composing)return!1;var a=t.state,s=a.doc.resolve(e);if(s.parent.type.spec.code)return!1;for(var u=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"\ufffc")+r,c=0;c<i.length;c++){var l=i[c].match.exec(u),h=l&&i[c].handler(a,l,e-(l[0].length-r.length),n);if(h)return t.dispatch(h.setMeta(o,{transform:h,from:e,to:n,text:r})),!0}return!1}function Ul(t,e){for(var n=t.plugins,r=0;r<n.length;r++){var i=n[r],o=void 0;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){for(var a=t.tr,s=o.transform,u=s.steps.length-1;u>=0;u--)a.step(s.steps[u].invert(s.docs[u]));if(o.text){var c=a.doc.resolve(o.from).marks();a.replaceWith(o.from,o.to,t.schema.text(o.text,c))}else a.delete(o.from,o.to);e(a)}return!0}}return!1}var Hl=new ql(/--$/,"\u2014"),Wl=new ql(/\.\.\.$/,"\u2026"),$l=[new ql(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201c"),new ql(/"$/,"\u201d"),new ql(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),new ql(/'$/,"\u2019")];function Zl(t,e,n,r){return new ql(t,(function(t,i,o,a){var s=n instanceof Function?n(i):n,u=t.tr.delete(o,a),c=u.doc.resolve(o).blockRange(),l=c&&no(c,e,s);if(!l)return null;u.wrap(c,l);var h=u.doc.resolve(o-1).nodeBefore;return h&&h.type==e&&oo(u.doc,o-1)&&(!r||r(i,h))&&u.join(o-1),u}))}function Yl(t,e,n){return new ql(t,(function(t,r,i,o){var a=t.doc.resolve(i),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?t.tr.delete(i,o).setBlockType(i,i,e,s):null}))}var Gl="ProseMirror-prompt";function Kl(t){var e=document.body.appendChild(document.createElement("div"));e.className=Gl;var n=function(t){e.contains(t.target)||r()};setTimeout((function(){return window.addEventListener("mousedown",n)}),50);var r=function(){window.removeEventListener("mousedown",n),e.parentNode&&e.parentNode.removeChild(e)},i=[];for(var o in t.fields)i.push(t.fields[o].render());var a=document.createElement("button");a.type="submit",a.className=Gl+"-submit",a.textContent="OK";var s=document.createElement("button");s.type="button",s.className=Gl+"-cancel",s.textContent="Cancel",s.addEventListener("click",r);var u=e.appendChild(document.createElement("form"));t.title&&(u.appendChild(document.createElement("h5")).textContent=t.title),i.forEach((function(t){u.appendChild(document.createElement("div")).appendChild(t)}));var c=u.appendChild(document.createElement("div"));c.className=Gl+"-buttons",c.appendChild(a),c.appendChild(document.createTextNode(" ")),c.appendChild(s);var l=e.getBoundingClientRect();e.style.top=(window.innerHeight-l.height)/2+"px",e.style.left=(window.innerWidth-l.width)/2+"px";var h=function(){var e=function(t,e){var n=Object.create(null),r=0;for(var i in t){var o=t[i],a=e[r++],s=o.read(a),u=o.validate(s);if(u)return Jl(a,u),null;n[i]=o.clean(s)}return n}(t.fields,i);e&&(r(),t.callback(e))};u.addEventListener("submit",(function(t){t.preventDefault(),h()})),u.addEventListener("keydown",(function(t){27==t.keyCode?(t.preventDefault(),r()):13!=t.keyCode||t.ctrlKey||t.metaKey||t.shiftKey?9==t.keyCode&&window.setTimeout((function(){e.contains(document.activeElement)||r()}),500):(t.preventDefault(),h())}));var f=u.elements[0];f&&f.focus()}function Jl(t,e){var n=t.parentNode,r=n.appendChild(document.createElement("div"));r.style.left=t.offsetLeft+t.offsetWidth+2+"px",r.style.top=t.offsetTop-5+"px",r.className="ProseMirror-invalid",r.textContent=e,setTimeout((function(){return n.removeChild(r)}),1500)}var Xl=function(t){this.options=t};Xl.prototype.read=function(t){return t.value},Xl.prototype.validateType=function(t){},Xl.prototype.validate=function(t){return!t&&this.options.required?"Required field":this.validateType(t)||this.options.validate&&this.options.validate(t)},Xl.prototype.clean=function(t){return this.options.clean?this.options.clean(t):t};var Ql=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(){var t=document.createElement("input");return t.type="text",t.placeholder=this.options.label,t.value=this.options.value||"",t.autocomplete="off",t},e}(Xl);function th(t,e){for(var n=t.selection.$from,r=n.depth;r>=0;r--){var i=n.index(r);if(n.node(r).canReplaceWith(i,i,e))return!0}return!1}function eh(t,e){var n={label:e.title,run:t};for(var r in e)n[r]=e[r];return e.enable&&!0!==e.enable||e.select||(n[e.enable?"enable":"select"]=function(e){return t(e)}),new _l(n)}function nh(t,e){var n=t.selection,r=n.from,i=n.$from,o=n.to;return n.empty?e.isInSet(t.storedMarks||i.marks()):t.doc.rangeHasMark(r,o,e)}function rh(t,e){var n={active:function(e){return nh(e,t)},enable:!0};for(var r in e)n[r]=e[r];return eh(Jc(t),n)}function ih(t,e){return eh(Bl(t,e.attrs),e)}function oh(t){var e,n,r,i={};if((e=t.marks.strong)&&(i.toggleStrong=rh(e,{title:"Toggle strong style",icon:Al.strong})),(e=t.marks.em)&&(i.toggleEm=rh(e,{title:"Toggle emphasis",icon:Al.em})),(e=t.marks.code)&&(i.toggleCode=rh(e,{title:"Toggle code font",icon:Al.code})),(e=t.marks.link)&&(i.toggleLink=(n=e,new _l({title:"Add or remove link",icon:Al.link,active:function(t){return nh(t,n)},enable:function(t){return!t.selection.empty},run:function(t,e,r){if(nh(t,n))return Jc(n)(t,e),!0;Kl({title:"Create a link",fields:{href:new Ql({label:"Link target",required:!0}),title:new Ql({label:"Title"})},callback:function(t){Jc(n,t)(r.state,r.dispatch),r.focus()}})}}))),(e=t.nodes.image)&&(i.insertImage=(r=e,new _l({title:"Insert image",label:"Image",enable:function(t){return th(t,r)},run:function(t,e,n){var i=t.selection,o=i.from,a=i.to,s=null;t.selection instanceof Oo&&t.selection.node.type==r&&(s=t.selection.node.attrs),Kl({title:"Insert image",fields:{src:new Ql({label:"Location",required:!0,value:s&&s.src}),title:new Ql({label:"Title",value:s&&s.title}),alt:new Ql({label:"Description",value:s?s.alt:t.doc.textBetween(o,a," ")})},callback:function(t){n.dispatch(n.state.tr.replaceSelectionWith(r.createAndFill(t))),n.focus()}})}}))),(e=t.nodes.bullet_list)&&(i.wrapBulletList=ih(e,{title:"Wrap in bullet list",icon:Al.bulletList})),(e=t.nodes.ordered_list)&&(i.wrapOrderedList=ih(e,{title:"Wrap in ordered list",icon:Al.orderedList})),(e=t.nodes.blockquote)&&(i.wrapBlockQuote=function(t,e){var n={run:function(n,r){return Gc(t,e.attrs)(n,r)},select:function(n){return Gc(t,e.attrs instanceof Function?null:e.attrs)(n)}};for(var r in e)n[r]=e[r];return new _l(n)}(e,{title:"Wrap in block quote",icon:Al.blockquote})),(e=t.nodes.paragraph)&&(i.makeParagraph=Rl(e,{title:"Change to paragraph",label:"Plain"})),(e=t.nodes.code_block)&&(i.makeCodeBlock=Rl(e,{title:"Change to code block",label:"Code"})),e=t.nodes.heading)for(var o=1;o<=10;o++)i["makeHead"+o]=Rl(e,{title:"Change to heading "+o,label:"Level "+o,attrs:{level:o}});if(e=t.nodes.horizontal_rule){var a=e;i.insertHorizontalRule=new _l({title:"Insert horizontal rule",label:"Horizontal rule",enable:function(t){return th(t,a)},run:function(t,e){e(t.tr.replaceSelectionWith(a.create()))}})}var s=function(t){return t.filter((function(t){return t}))};return i.insertMenu=new Cl(s([i.insertImage,i.insertHorizontalRule]),{label:"Insert"}),i.typeMenu=new Cl(s([i.makeParagraph,i.makeCodeBlock,i.makeHead1&&new Tl(s([i.makeHead1,i.makeHead2,i.makeHead3,i.makeHead4,i.makeHead5,i.makeHead6]),{label:"Heading"})]),{label:"Type..."}),i.inlineMenu=[s([i.toggleStrong,i.toggleEm,i.toggleCode,i.toggleLink])],i.blockMenu=[s([i.wrapBulletList,i.wrapOrderedList,i.wrapBlockQuote,Ol,Pl,Ll])],i.fullMenu=i.inlineMenu.concat([[i.insertMenu,i.typeMenu]],[[Dl,Il]],i.blockMenu),i}var ah="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function sh(t,e){var n,r,i={};function o(t,n){if(e){var r=e[t];if(!1===r)return;r&&(t=r)}i[t]=n}if(o("Mod-z",Rc),o("Shift-Mod-z",Nc),o("Backspace",Ul),ah||o("Mod-y",Nc),o("Alt-ArrowUp",qc),o("Alt-ArrowDown",Vc),o("Mod-BracketLeft",Uc),o("Escape",Zc),(n=t.marks.strong)&&(o("Mod-b",Jc(n)),o("Mod-B",Jc(n))),(n=t.marks.em)&&(o("Mod-i",Jc(n)),o("Mod-I",Jc(n))),(n=t.marks.code)&&o("Mod-`",Jc(n)),(n=t.nodes.bullet_list)&&o("Shift-Ctrl-8",Bl(n)),(n=t.nodes.ordered_list)&&o("Shift-Ctrl-9",Bl(n)),(n=t.nodes.blockquote)&&o("Ctrl->",Gc(n)),n=t.nodes.hard_break){var a=n,s=Xc(Wc,(function(t,e){return e(t.tr.replaceSelectionWith(a.create()).scrollIntoView()),!0}));o("Mod-Enter",s),o("Shift-Enter",s),ah&&o("Ctrl-Enter",s)}if((n=t.nodes.list_item)&&(o("Enter",(r=n,function(t,e){var n=t.selection,i=n.$from,o=n.$to,a=n.node;if(a&&a.isBlock||i.depth<2||!i.sameParent(o))return!1;var s=i.node(-1);if(s.type!=r)return!1;if(0==i.parent.content.size&&i.node(-1).childCount==i.indexAfter(-1)){if(2==i.depth||i.node(-3).type!=r||i.index(-2)!=i.node(-2).childCount-1)return!1;if(e){for(var u=Mr.empty,c=i.index(-1)>0,l=i.depth-(c?1:2);l>=i.depth-3;l--)u=Mr.from(i.node(l).copy(u));u=u.append(Mr.from(r.createAndFill()));var h=t.tr.replace(i.before(c?null:-1),i.after(-3),new Dr(u,c?3:2,2));h.setSelection(t.selection.constructor.near(h.doc.resolve(i.pos+(c?3:2)))),e(h.scrollIntoView())}return!0}var f=o.pos==i.end()?s.contentMatchAt(0).defaultType:null,d=t.tr.delete(i.pos,o.pos),p=f&&[null,{type:f}];return!!io(d.doc,i.pos,2,p)&&(e&&e(d.split(i.pos,2,p).scrollIntoView()),!0)})),o("Mod-[",Fl(n)),o("Mod-]",function(t){return function(e,n){var r=e.selection,i=r.$from,o=r.$to,a=i.blockRange(o,(function(e){return e.childCount&&e.firstChild.type==t}));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!=t)return!1;if(n){var l=c.lastChild&&c.lastChild.type==u.type,h=Mr.from(l?t.create():null),f=new Dr(Mr.from(t.create(null,Mr.from(u.type.create(null,h)))),l?3:1,0),d=a.start,p=a.end;n(e.tr.step(new Xi(d-(l?3:1),p,d,p,f,1,!0)).scrollIntoView())}return!0}}(n))),(n=t.nodes.paragraph)&&o("Shift-Ctrl-0",Kc(n)),(n=t.nodes.code_block)&&o("Shift-Ctrl-\\",Kc(n)),n=t.nodes.heading)for(var u=1;u<=6;u++)o("Shift-Ctrl-"+u,Kc(n,{level:u}));if(n=t.nodes.horizontal_rule){var c=n;o("Mod-_",(function(t,e){return e(t.tr.replaceSelectionWith(c.create()).scrollIntoView()),!0}))}return i}function uh(t){var e,n=$l.concat(Wl,Hl);return(e=t.nodes.blockquote)&&n.push(Zl(/^\s*>\s$/,e)),(e=t.nodes.ordered_list)&&n.push(function(t){return Zl(/^(\d+)\.\s$/,t,(function(t){return{order:+t[1]}}),(function(t,e){return e.childCount+e.attrs.order==+t[1]}))}(e)),(e=t.nodes.bullet_list)&&n.push(function(t){return Zl(/^\s*([-+*])\s$/,t)}(e)),(e=t.nodes.code_block)&&n.push(function(t){return Yl(/^```$/,t)}(e)),(e=t.nodes.heading)&&n.push(function(t,e){return Yl(new RegExp("^(#{1,"+e+"})\\s$"),t,(function(t){return{level:t[1].length}}))}(e,6)),function(t){var e=t.rules,n=new Wo({state:{init:function(){return null},apply:function(t,e){return t.getMeta(this)||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,r,i,o){return Vl(t,r,i,o,e,n)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var r=t.state.selection.$cursor;r&&Vl(t,r.pos,r.pos,"",e,n)}))}}},isInputRules:!0});return n}({rules:n})}function ch(t){var e=[uh(t.schema),mc(sh(t.schema,t.mapKeys)),mc(il),ol(),new Wo({props:{decorations:fl,createSelectionBetween:function(t,e,n){if(e.pos==n.pos&&sl.valid(n))return new sl(n)},handleClick:hl,handleKeyDown:cl}})];return!1!==t.menuBar&&e.push(function(t){return new Wo({view:function(e){return new jl(e,t)}})}({floating:!1!==t.floatingMenu,content:t.menuContent||oh(t.schema).fullMenu})),!1!==t.history&&e.push(Ic()),e.concat(new Wo({props:{attributes:{class:"ProseMirror-example-setup-style"}}}))}n(472),n(473),n(474),n(475);document.addEventListener("turbolinks:load",(function(){document.querySelectorAll(".markdown-content").forEach((function(t){var e=t.querySelector(".content"),n=t.querySelector(".markdown-editor"),r=new Iu(n,{state:qo.create({doc:Ku.parse(e.value),plugins:ch({schema:Vu})})});e.form.addEventListener("submit",(function(t){return e.value=Xu.serialize(r.state.doc)})),setInterval((function(){return e.value=Xu.serialize(r.state.doc)}),1e4),e.style.display="none"}))}));n(476),n(477),n(478);var lh=n(181),hh=n.n(lh),fh=n(182),dh=n.n(fh),ph=n(183),mh=n.n(ph);function vh(t){return function(t){if(Array.isArray(t))return Sh(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||kh(t)||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 gh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yh(t){return(yh="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wh(t,e,n){return e&&_h(t.prototype,e),n&&_h(t,n),t}function xh(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=kh(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function kh(t,e){if(t){if("string"===typeof t)return Sh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sh(t,e):void 0}}function Sh(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ch="undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame;function Mh(t,e,n){var r=n||function(t){return Array.prototype.slice.call(t)},i=!1,o=[];return function(){for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];o=r(a),i||(i=!0,Ch.call(window,(function(){i=!1,t.apply(e,o)})))}}var Eh=function(t){return"start"===t?"left":"end"===t?"right":"center"},Th=function(t,e,n){return"start"===t?e:"end"===t?n:(e+n)/2};function Ah(){}var Oh,Ph=(Oh=0,function(){return Oh++});function Lh(t){return null===t||"undefined"===typeof t}function Dh(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function Ih(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}var Rh=function(t){return("number"===typeof t||t instanceof Number)&&isFinite(+t)};function Nh(t,e){return Rh(t)?t:e}function zh(t,e){return"undefined"===typeof t?e:t}var jh=function(t,e){return"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t};function Bh(t,e,n){if(t&&"function"===typeof t.call)return t.apply(n,e)}function Fh(t,e,n,r){var i,o,a;if(Dh(t))if(o=t.length,r)for(i=o-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<o;i++)e.call(n,t[i],i);else if(Ih(t))for(o=(a=Object.keys(t)).length,i=0;i<o;i++)e.call(n,t[a[i]],a[i])}function qh(t,e){var n,r,i,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],o=e[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Vh(t){if(Dh(t))return t.map(Vh);if(Ih(t)){for(var e=Object.create(null),n=Object.keys(t),r=n.length,i=0;i<r;++i)e[n[i]]=Vh(t[n[i]]);return e}return t}function Uh(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Hh(t,e,n,r){if(Uh(t)){var i=e[t],o=n[t];Ih(i)&&Ih(o)?Wh(i,o,r):e[t]=Vh(o)}}function Wh(t,e,n){var r=Dh(e)?e:[e],i=r.length;if(!Ih(t))return t;for(var o=(n=n||{}).merger||Hh,a=0;a<i;++a)if(Ih(e=r[a]))for(var s=Object.keys(e),u=0,c=s.length;u<c;++u)o(s[u],t,e,n);return t}function $h(t,e){return Wh(t,e,{merger:Zh})}function Zh(t,e,n){if(Uh(t)){var r=e[t],i=n[t];Ih(r)&&Ih(i)?$h(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Vh(i))}}function Yh(t,e){var n=t.indexOf(".",e);return-1===n?t.length:n}function Gh(t,e){if(""===e)return t;for(var n=0,r=Yh(e,n);t&&r>n;)t=t[e.substr(n,r-n)],r=Yh(e,n=r+1);return t}function Kh(t){return t.charAt(0).toUpperCase()+t.slice(1)}var Jh=function(t){return"undefined"!==typeof t},Xh=function(t){return"function"===typeof t},Qh=Math.PI,tf=2*Qh,ef=tf+Qh,nf=Number.POSITIVE_INFINITY,rf=Qh/180,of=Qh/2,af=Qh/4,sf=2*Qh/3,uf=Math.log10,cf=Math.sign;function lf(t){var e=Math.round(t);t=ff(t,e,t/1e3)?e:t;var n=Math.pow(10,Math.floor(uf(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function hf(t){return!isNaN(parseFloat(t))&&isFinite(t)}function ff(t,e,n){return Math.abs(t-e)<n}function df(t,e,n){var r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function pf(t){return t*(Qh/180)}function mf(t){return t*(180/Qh)}function vf(t){if(Rh(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}}function gf(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function yf(t,e){return(t-e+ef)%tf-Qh}function bf(t){return(t%tf+tf)%tf}function _f(t,e,n,r){var i=bf(t),o=bf(e),a=bf(n),s=bf(o-i),u=bf(a-i),c=bf(i-o),l=bf(i-a);return i===o||i===a||r&&o===a||s>u&&c<l}function wf(t,e,n){return Math.max(e,Math.min(n,t))}var xf=function(t){return 0===t||1===t},kf=function(t,e,n){return-Math.pow(2,10*(t-=1))*Math.sin((t-e)*tf/n)},Sf=function(t,e,n){return Math.pow(2,-10*t)*Math.sin((t-e)*tf/n)+1},Cf={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*of)},easeOutSine:function(t){return Math.sin(t*of)},easeInOutSine:function(t){return-.5*(Math.cos(Qh*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return xf(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1)))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){return xf(t)?t:kf(t,.075,.3)},easeOutElastic:function(t){return xf(t)?t:Sf(t,.075,.3)},easeInOutElastic:function(t){var e=.1125;return xf(t)?t:t<.5?.5*kf(2*t,e,.45):.5+.5*Sf(2*t-1,e,.45)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-Cf.easeOutBounce(1-t)},easeOutBounce:function(t){var e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*Cf.easeInBounce(2*t):.5*Cf.easeOutBounce(2*t-1)+.5}},Mf={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ef="0123456789ABCDEF",Tf=function(t){return Ef[15&t]},Af=function(t){return Ef[(240&t)>>4]+Ef[15&t]},Of=function(t){return(240&t)>>4===(15&t)};function Pf(t){var e=function(t){return Of(t.r)&&Of(t.g)&&Of(t.b)&&Of(t.a)}(t)?Tf:Af;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function Lf(t){return t+.5|0}var Df=function(t,e,n){return Math.max(Math.min(t,n),e)};function If(t){return Df(Lf(2.55*t),0,255)}function Rf(t){return Df(Lf(255*t),0,255)}function Nf(t){return Df(Lf(t/2.55)/100,0,1)}function zf(t){return Df(Lf(100*t),0,100)}var jf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;var Bf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ff(t,e,n){var r=e*Math.min(n,1-n),i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return n-r*Math.max(Math.min(i-3,9-i,1),-1)};return[i(0),i(8),i(4)]}function qf(t,e,n){var r=function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+t/60)%6;return n-n*e*Math.max(Math.min(i,4-i,1),0)};return[r(5),r(3),r(1)]}function Vf(t,e,n){var r,i=Ff(t,1,.5);for(e+n>1&&(e*=r=1/(e+n),n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function Uf(t){var e,n,r,i=t.r/255,o=t.g/255,a=t.b/255,s=Math.max(i,o,a),u=Math.min(i,o,a),c=(s+u)/2;return s!==u&&(r=s-u,n=c>.5?r/(2-s-u):r/(s+u),e=60*(e=s===i?(o-a)/r+(o<a?6:0):s===o?(a-i)/r+2:(i-o)/r+4)+.5),[0|e,n||0,c]}function Hf(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Rf)}function Wf(t,e,n){return Hf(Ff,t,e,n)}function $f(t){return(t%360+360)%360}function Zf(t){var e,n=Bf.exec(t),r=255;if(n){n[5]!==e&&(r=n[6]?If(+n[5]):Rf(+n[5]));var i=$f(+n[2]),o=+n[3]/100,a=+n[4]/100;return{r:(e="hwb"===n[1]?function(t,e,n){return Hf(Vf,t,e,n)}(i,o,a):"hsv"===n[1]?function(t,e,n){return Hf(qf,t,e,n)}(i,o,a):Wf(i,o,a))[0],g:e[1],b:e[2],a:r}}}var Yf,Gf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Kf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Jf(t){Yf||((Yf=function(){var t,e,n,r,i,o={},a=Object.keys(Kf),s=Object.keys(Gf);for(t=0;t<a.length;t++){for(r=i=a[t],e=0;e<s.length;e++)n=s[e],i=i.replace(n,Gf[n]);n=parseInt(Kf[r],16),o[i]=[n>>16&255,n>>8&255,255&n]}return o}()).transparent=[0,0,0,0]);var e=Yf[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Xf(t,e,n){if(t){var r=Uf(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,0===e?360:1)),r=Wf(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function Qf(t,e){return t?Object.assign(e||{},t):t}function td(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Rf(t[3]))):(e=Qf(t,{r:0,g:0,b:0,a:1})).a=Rf(e.a),e}function ed(t){return"r"===t.charAt(0)?function(t){var e,n,r,i=jf.exec(t),o=255;if(i){if(i[7]!==e){var a=+i[7];o=255&(i[8]?If(a):255*a)}return e=+i[1],n=+i[3],r=+i[5],{r:e=255&(i[2]?If(e):e),g:n=255&(i[4]?If(n):n),b:r=255&(i[6]?If(r):r),a:o}}}(t):Zf(t)}var nd=function(){function t(e){if(bh(this,t),e instanceof t)return e;var n,r=yh(e);"object"===r?n=td(e):"string"===r&&(n=function(t){var e,n=t.length;return"#"===t[0]&&(4===n||5===n?e={r:255&17*Mf[t[1]],g:255&17*Mf[t[2]],b:255&17*Mf[t[3]],a:5===n?17*Mf[t[4]]:255}:7!==n&&9!==n||(e={r:Mf[t[1]]<<4|Mf[t[2]],g:Mf[t[3]]<<4|Mf[t[4]],b:Mf[t[5]]<<4|Mf[t[6]],a:9===n?Mf[t[7]]<<4|Mf[t[8]]:255})),e}(e)||Jf(e)||ed(e)),this._rgb=n,this._valid=!!n}return wh(t,[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var t=Qf(this._rgb);return t&&(t.a=Nf(t.a)),t},set:function(t){this._rgb=td(t)}},{key:"rgbString",value:function(){return this._valid?(t=this._rgb)&&(t.a<255?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(Nf(t.a),")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")")):this._rgb;var t}},{key:"hexString",value:function(){return this._valid?Pf(this._rgb):this._rgb}},{key:"hslString",value:function(){return this._valid?function(t){if(t){var e=Uf(t),n=e[0],r=zf(e[1]),i=zf(e[2]);return t.a<255?"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(Nf(t.a),")"):"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)")}}(this._rgb):this._rgb}},{key:"mix",value:function(t,e){var n=this;if(t){var r,i=n.rgb,o=t.rgb,a=e===r?.5:e,s=2*a-1,u=i.a-o.a,c=((s*u===-1?s:(s+u)/(1+s*u))+1)/2;r=1-c,i.r=255&c*i.r+r*o.r+.5,i.g=255&c*i.g+r*o.g+.5,i.b=255&c*i.b+r*o.b+.5,i.a=a*i.a+(1-a)*o.a,n.rgb=i}return n}},{key:"clone",value:function(){return new t(this.rgb)}},{key:"alpha",value:function(t){return this._rgb.a=Rf(t),this}},{key:"clearer",value:function(t){return this._rgb.a*=1-t,this}},{key:"greyscale",value:function(){var t=this._rgb,e=Lf(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}},{key:"opaquer",value:function(t){return this._rgb.a*=1+t,this}},{key:"negate",value:function(){var t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}},{key:"lighten",value:function(t){return Xf(this._rgb,2,t),this}},{key:"darken",value:function(t){return Xf(this._rgb,2,-t),this}},{key:"saturate",value:function(t){return Xf(this._rgb,1,t),this}},{key:"desaturate",value:function(t){return Xf(this._rgb,1,-t),this}},{key:"rotate",value:function(t){return function(t,e){var n=Uf(t);n[0]=$f(n[0]+e),n=Wf(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}]),t}();function rd(t){return new nd(t)}var id=function(t){return t instanceof CanvasGradient||t instanceof CanvasPattern};function od(t){return id(t)?t:rd(t)}function ad(t){return id(t)?t:rd(t).saturate(.5).darken(.1).hexString()}var sd=Object.create(null),ud=Object.create(null);function cd(t,e){if(!e)return t;for(var n=e.split("."),r=0,i=n.length;r<i;++r){var o=n[r];t=t[o]||(t[o]=Object.create(null))}return t}function ld(t,e,n){return"string"===typeof e?Wh(cd(t,e),n):Wh(cd(t,""),e)}var hd=new(function(){function t(e){bh(this,t),this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=function(t){return t.chart.platform.getDevicePixelRatio()},this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=function(t,e){return ad(e.backgroundColor)},this.hoverBorderColor=function(t,e){return ad(e.borderColor)},this.hoverColor=function(t,e){return ad(e.color)},this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(e)}return wh(t,[{key:"set",value:function(t,e){return ld(this,t,e)}},{key:"get",value:function(t){return cd(this,t)}},{key:"describe",value:function(t,e){return ld(ud,t,e)}},{key:"override",value:function(t,e){return ld(sd,t,e)}},{key:"route",value:function(t,e,n,r){var i,o=cd(this,t),a=cd(this,n),s="_"+e;Object.defineProperties(o,(gh(i={},s,{value:o[e],writable:!0}),gh(i,e,{enumerable:!0,get:function(){var t=this[s],e=a[r];return Ih(t)?Object.assign({},e,t):zh(t,e)},set:function(t){this[s]=t}}),i))}}]),t}())({_scriptable:function(t){return!t.startsWith("on")},_indexable:function(t){return"events"!==t},hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function fd(t,e,n,r,i){var o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>r&&(r=o),r}function dd(t,e,n,r){var i=(r=r||{}).data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},o=r.garbageCollect=[],r.font=e),t.save(),t.font=e;var a,s,u,c,l,h=0,f=n.length;for(a=0;a<f;a++)if(void 0!==(c=n[a])&&null!==c&&!0!==Dh(c))h=fd(t,i,o,h,c);else if(Dh(c))for(s=0,u=c.length;s<u;s++)void 0===(l=c[s])||null===l||Dh(l)||(h=fd(t,i,o,h,l));t.restore();var d=o.length/2;if(d>n.length){for(a=0;a<d;a++)delete i[o[a]];o.splice(0,d)}return h}function pd(t,e,n){var r=t.currentDevicePixelRatio,i=0!==n?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function md(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function vd(t,e,n,r){var i,o,a,s,u,c=e.pointStyle,l=e.rotation,h=e.radius,f=(l||0)*rf;if(c&&"object"===yh(c)&&("[object HTMLImageElement]"===(i=c.toString())||"[object HTMLCanvasElement]"===i))return t.save(),t.translate(n,r),t.rotate(f),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(h)||h<=0)){switch(t.beginPath(),c){default:t.arc(n,r,h,0,tf),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(f)*h,r-Math.cos(f)*h),f+=sf,t.lineTo(n+Math.sin(f)*h,r-Math.cos(f)*h),f+=sf,t.lineTo(n+Math.sin(f)*h,r-Math.cos(f)*h),t.closePath();break;case"rectRounded":s=h-(u=.516*h),o=Math.cos(f+af)*s,a=Math.sin(f+af)*s,t.arc(n-o,r-a,u,f-Qh,f-of),t.arc(n+a,r-o,u,f-of,f),t.arc(n+o,r+a,u,f,f+of),t.arc(n-a,r+o,u,f+of,f+Qh),t.closePath();break;case"rect":if(!l){s=Math.SQRT1_2*h,t.rect(n-s,r-s,2*s,2*s);break}f+=af;case"rectRot":o=Math.cos(f)*h,a=Math.sin(f)*h,t.moveTo(n-o,r-a),t.lineTo(n+a,r-o),t.lineTo(n+o,r+a),t.lineTo(n-a,r+o),t.closePath();break;case"crossRot":f+=af;case"cross":o=Math.cos(f)*h,a=Math.sin(f)*h,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a),t.moveTo(n+a,r-o),t.lineTo(n-a,r+o);break;case"star":o=Math.cos(f)*h,a=Math.sin(f)*h,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a),t.moveTo(n+a,r-o),t.lineTo(n-a,r+o),f+=af,o=Math.cos(f)*h,a=Math.sin(f)*h,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a),t.moveTo(n+a,r-o),t.lineTo(n-a,r+o);break;case"line":o=Math.cos(f)*h,a=Math.sin(f)*h,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(f)*h,r+Math.sin(f)*h)}t.fill(),e.borderWidth>0&&t.stroke()}}function gd(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function yd(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function bd(t){t.restore()}function _d(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if("middle"===i){var o=(e.x+n.x)/2;t.lineTo(o,e.y),t.lineTo(o,n.y)}else"after"===i!==!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function wd(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function xd(t,e,n,r,i){var o,a,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=Dh(e)?e:[e],c=s.strokeWidth>0&&""!==s.strokeColor;for(t.save(),t.font=i.string,kd(t,s),o=0;o<u.length;++o)a=u[o],c&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),Lh(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(a,n,r,s.maxWidth)),t.fillText(a,n,r,s.maxWidth),Sd(t,n,r,a,s),r+=i.lineHeight;t.restore()}function kd(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Lh(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Sd(t,e,n,r,i){if(i.strikethrough||i.underline){var o=t.measureText(r),a=e-o.actualBoundingBoxLeft,s=e+o.actualBoundingBoxRight,u=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,l=i.strikethrough?(u+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(a,l),t.lineTo(s,l),t.stroke()}}function Cd(t,e){var n=e.x,r=e.y,i=e.w,o=e.h,a=e.radius;t.arc(n+a.topLeft,r+a.topLeft,a.topLeft,-of,Qh,!0),t.lineTo(n,r+o-a.bottomLeft),t.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,Qh,of,!0),t.lineTo(n+i-a.bottomRight,r+o),t.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,of,0,!0),t.lineTo(n+i,r+a.topRight),t.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-of,!0),t.lineTo(n+a.topLeft,r)}var Md=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Ed=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Td(t,e){var n=(""+t).match(Md);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}function Ad(t,e){var n,r={},i=Ih(e),o=i?Object.keys(e):e,a=Ih(t)?i?function(n){return zh(t[n],t[e[n]])}:function(e){return t[e]}:function(){return t},s=xh(o);try{for(s.s();!(n=s.n()).done;){var u=n.value;r[u]=+a(u)||0}}catch(Cw){s.e(Cw)}finally{s.f()}return r}function Od(t){return Ad(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Pd(t){return Ad(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ld(t){var e=Od(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Dd(t,e){t=t||{},e=e||hd.font;var n=zh(t.size,e.size);"string"===typeof n&&(n=parseInt(n,10));var r=zh(t.style,e.style);r&&!(""+r).match(Ed)&&(console.warn('Invalid font style specified: "'+r+'"'),r="");var i={family:zh(t.family,e.family),lineHeight:Td(zh(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:zh(t.weight,e.weight),string:""};return i.string=function(t){return!t||Lh(t.size)||Lh(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i}function Id(t,e,n,r){var i,o,a,s=!0;for(i=0,o=t.length;i<o;++i)if(void 0!==(a=t[i])&&(void 0!==e&&"function"===typeof a&&(a=a(e),s=!1),void 0!==n&&Dh(a)&&(a=a[n%a.length],s=!1),void 0!==a))return r&&!s&&(r.cacheable=!1),a}function Rd(t,e,n){n=n||function(n){return t[n]<e};for(var r,i=t.length-1,o=0;i-o>1;)n(r=o+i>>1)?o=r:i=r;return{lo:o,hi:i}}var Nd=function(t,e,n){return Rd(t,n,(function(r){return t[r][e]<n}))},zd=function(t,e,n){return Rd(t,n,(function(r){return t[r][e]>=n}))};var jd=["push","pop","shift","splice","unshift"];function Bd(t,e){var n=t._chartjs;if(n){var r=n.listeners,i=r.indexOf(e);-1!==i&&r.splice(i,1),r.length>0||(jd.forEach((function(e){delete t[e]})),delete t._chartjs)}}function Fd(t){var e,n,r=new Set;for(e=0,n=t.length;e<n;++e)r.add(t[e]);return r.size===n?t:Array.from(r)}function qd(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return t[0]};Jh(i)||(i=Qd("_fallback",t));var a=(gh(e={},Symbol.toStringTag,"Object"),gh(e,"_cacheable",!0),gh(e,"_scopes",t),gh(e,"_rootScopes",r),gh(e,"_fallback",i),gh(e,"_getTarget",o),gh(e,"override",(function(e){return qd([e].concat(vh(t)),n,r,i)})),e);return new Proxy(a,{deleteProperty:function(e,n){return delete e[n],delete e._keys,delete t[0][n],!0},get:function(e,r){return $d(e,r,(function(){return Xd(r,n,t,e)}))},getOwnPropertyDescriptor:function(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t[0])},has:function(t,e){return tp(t).includes(e)},ownKeys:function(t){return tp(t)},set:function(t,e,n){return(t._storage||(t._storage=o()))[e]=n,delete t[e],delete t._keys,!0}})}function Vd(t,e,n,r){var i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Ud(t,r),setContext:function(e){return Vd(t,e,n,r)},override:function(i){return Vd(t.override(i),e,n,r)}};return new Proxy(i,{deleteProperty:function(e,n){return delete e[n],delete t[n],!0},get:function(t,e,n){return $d(t,e,(function(){return function(t,e,n){var r=t._proxy,i=t._context,o=t._subProxy,a=t._descriptors,s=r[e];Xh(s)&&a.isScriptable(e)&&(s=function(t,e,n,r){var i=n._proxy,o=n._context,a=n._subProxy,s=n._stack;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t),e=e(o,a||r),s.delete(t),Ih(e)&&(e=Kd(i._scopes,i,t,e));return e}(e,s,t,n));Dh(s)&&s.length&&(s=function(t,e,n,r){var i=n._proxy,o=n._context,a=n._subProxy,s=n._descriptors;if(Jh(o.index)&&r(t))e=e[o.index%e.length];else if(Ih(e[0])){var u=e,c=i._scopes.filter((function(t){return t!==u}));e=[];var l,h=xh(u);try{for(h.s();!(l=h.n()).done;){var f=Kd(c,i,t,l.value);e.push(Vd(f,o,a&&a[t],s))}}catch(Cw){h.e(Cw)}finally{h.f()}}return e}(e,s,t,a.isIndexable));Wd(e,s)&&(s=Vd(s,i,o&&o[e],a));return s}(t,e,n)}))},getOwnPropertyDescriptor:function(e,n){return e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t)},has:function(e,n){return Reflect.has(t,n)},ownKeys:function(){return Reflect.ownKeys(t)},set:function(e,n,r){return t[n]=r,delete e[n],!0}})}function Ud(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},n=t._scriptable,r=void 0===n?e.scriptable:n,i=t._indexable,o=void 0===i?e.indexable:i,a=t._allKeys,s=void 0===a?e.allKeys:a;return{allKeys:s,scriptable:r,indexable:o,isScriptable:Xh(r)?r:function(){return r},isIndexable:Xh(o)?o:function(){return o}}}var Hd=function(t,e){return t?t+Kh(e):e},Wd=function(t,e){return Ih(e)&&"adapters"!==t};function $d(t,e,n){var r=t[e];return Jh(r)||(r=n(),Jh(r)&&(t[e]=r)),r}function Zd(t,e,n){return Xh(t)?t(e,n):t}var Yd=function(t,e){return!0===t?e:"string"===typeof t?Gh(e,t):void 0};function Gd(t,e,n,r){var i,o=xh(e);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=Yd(n,a);if(s){t.add(s);var u=Zd(s._fallback,n,s);if(Jh(u)&&u!==n&&u!==r)return u}else if(!1===s&&Jh(r)&&n!==r)return null}}catch(Cw){o.e(Cw)}finally{o.f()}return!1}function Kd(t,e,n,r){var i=e._rootScopes,o=Zd(e._fallback,n,r),a=[].concat(vh(t),vh(i)),s=new Set;s.add(r);var u=Jd(s,a,n,o||n);return null!==u&&((!Jh(o)||o===n||null!==(u=Jd(s,a,o,u)))&&qd(Array.from(s),[""],i,o,(function(){return function(t,e,n){var r=t._getTarget();e in r||(r[e]={});var i=r[e];if(Dh(i)&&Ih(n))return n;return i}(e,n,r)})))}function Jd(t,e,n,r){for(;n;)n=Gd(t,e,n,r);return n}function Xd(t,e,n,r){var i,o,a=xh(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(i=Qd(Hd(s,t),n),Jh(i))return Wd(t,i)?Kd(n,r,t,i):i}}catch(Cw){a.e(Cw)}finally{a.f()}}function Qd(t,e){var n,r=xh(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i){var o=i[t];if(Jh(o))return o}}}catch(Cw){r.e(Cw)}finally{r.f()}}function tp(t){var e=t._keys;return e||(e=t._keys=function(t){var e,n=new Set,r=xh(t);try{for(r.s();!(e=r.n()).done;){var i,o=e.value,a=xh(Object.keys(o).filter((function(t){return!t.startsWith("_")})));try{for(a.s();!(i=a.n()).done;){var s=i.value;n.add(s)}}catch(Cw){a.e(Cw)}finally{a.f()}}}catch(Cw){r.e(Cw)}finally{r.f()}return Array.from(n)}(t._scopes)),e}var ep=Number.EPSILON||1e-14,np=function(t,e){return e<t.length&&!t[e].skip&&t[e]},rp=function(t){return"x"===t?"y":"x"};function ip(t,e,n){for(var r,i,o,a,s,u=t.length,c=np(t,0),l=0;l<u-1;++l)s=c,c=np(t,l+1),s&&c&&(ff(e[l],0,ep)?n[l]=n[l+1]=0:(r=n[l]/e[l],i=n[l+1]/e[l],(a=Math.pow(r,2)+Math.pow(i,2))<=9||(o=3/Math.sqrt(a),n[l]=r*o*e[l],n[l+1]=i*o*e[l])))}function op(t,e){for(var n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",a=rp(o),s=t.length,u=np(t,0),c=0;c<s;++c)if(r=i,i=u,u=np(t,c+1),i){var l=i[o],h=i[a];r&&(n=(l-r[o])/3,i["cp1".concat(o)]=l-n,i["cp1".concat(a)]=h-n*e[c]),u&&(n=(u[o]-l)/3,i["cp2".concat(o)]=l+n,i["cp2".concat(a)]=h+n*e[c])}}function ap(t,e,n){return Math.max(Math.min(t,n),e)}function sp(t,e,n,r,i){var o,a,s,u,c,l,h,f,d,p,m,v,g,y,b,_,w;if(e.spanGaps&&(t=t.filter((function(t){return!t.skip}))),"monotone"===e.cubicInterpolationMode)!function(t){var e,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",o=rp(i),a=t.length,s=Array(a).fill(0),u=Array(a),c=np(t,0);for(e=0;e<a;++e)if(n=r,r=c,c=np(t,e+1),r){if(c){var l=c[i]-r[i];s[e]=0!==l?(c[o]-r[o])/l:0}u[e]=n?c?cf(s[e-1])!==cf(s[e])?0:(s[e-1]+s[e])/2:s[e-1]:s[e]}ip(t,s,u),op(t,u,i)}(t,i);else{var x=r?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)s=t[o],c=x,l=s,h=t[Math.min(o+1,a-(r?0:1))%a],f=e.tension,d=void 0,p=void 0,m=void 0,v=void 0,g=void 0,y=void 0,b=void 0,_=void 0,w=void 0,d=c.skip?l:c,p=l,m=h.skip?l:h,v=gf(p,d),g=gf(m,p),y=v/(v+g),b=g/(v+g),_=f*(y=isNaN(y)?0:y),w=f*(b=isNaN(b)?0:b),u={previous:{x:p.x-_*(m.x-d.x),y:p.y-_*(m.y-d.y)},next:{x:p.x+w*(m.x-d.x),y:p.y+w*(m.y-d.y)}},s.cp1x=u.previous.x,s.cp1y=u.previous.y,s.cp2x=u.next.x,s.cp2y=u.next.y,x=s}e.capBezierPoints&&function(t,e){var n,r,i,o,a,s=gd(t[0],e);for(n=0,r=t.length;n<r;++n)a=o,o=s,s=n<r-1&&gd(t[n+1],e),o&&(i=t[n],a&&(i.cp1x=ap(i.cp1x,e.left,e.right),i.cp1y=ap(i.cp1y,e.top,e.bottom)),s&&(i.cp2x=ap(i.cp2x,e.left,e.right),i.cp2y=ap(i.cp2y,e.top,e.bottom)))}(t,n)}function up(){return"undefined"!==typeof window&&"undefined"!==typeof document}function cp(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function lp(t,e,n){var r;return"string"===typeof t?(r=parseInt(t,10),-1!==t.indexOf("%")&&(r=r/100*e.parentNode[n])):r=t,r}var hp=function(t){return window.getComputedStyle(t,null)};var fp=["top","right","bottom","left"];function dp(t,e,n){var r={};n=n?"-"+n:"";for(var i=0;i<4;i++){var o=fp[i];r[o]=parseFloat(t[e+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function pp(t,e){var n=e.canvas,r=e.currentDevicePixelRatio,i=hp(n),o="border-box"===i.boxSizing,a=dp(i,"padding"),s=dp(i,"border","width"),u=function(t,e){var n,r,i=t.native||t,o=i.touches,a=o&&o.length?o[0]:i,s=a.offsetX,u=a.offsetY,c=!1;if(function(t,e,n){return(t>0||e>0)&&(!n||!n.shadowRoot)}(s,u,i.target))n=s,r=u;else{var l=e.getBoundingClientRect();n=a.clientX-l.left,r=a.clientY-l.top,c=!0}return{x:n,y:r,box:c}}(t,n),c=u.x,l=u.y,h=u.box,f=a.left+(h&&s.left),d=a.top+(h&&s.top),p=e.width,m=e.height;return o&&(p-=a.width+s.width,m-=a.height+s.height),{x:Math.round((c-f)/p*n.width/r),y:Math.round((l-d)/m*n.height/r)}}var mp=function(t){return Math.round(10*t)/10};function vp(t,e,n,r){var i=hp(t),o=dp(i,"margin"),a=lp(i.maxWidth,t,"clientWidth")||nf,s=lp(i.maxHeight,t,"clientHeight")||nf,u=function(t,e,n){var r,i;if(void 0===e||void 0===n){var o=cp(t);if(o){var a=o.getBoundingClientRect(),s=hp(o),u=dp(s,"border","width"),c=dp(s,"padding");e=a.width-c.width-u.width,n=a.height-c.height-u.height,r=lp(s.maxWidth,o,"clientWidth"),i=lp(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:r||nf,maxHeight:i||nf}}(t,e,n),c=u.width,l=u.height;if("content-box"===i.boxSizing){var h=dp(i,"border","width"),f=dp(i,"padding");c-=f.width+h.width,l-=f.height+h.height}return c=Math.max(0,c-o.width),l=Math.max(0,r?Math.floor(c/r):l-o.height),c=mp(Math.min(c,a,u.maxWidth)),l=mp(Math.min(l,s,u.maxHeight)),c&&!l&&(l=mp(c/2)),{width:c,height:l}}function gp(t,e,n){var r=e||1,i=Math.floor(t.height*r),o=Math.floor(t.width*r);t.height=i/r,t.width=o/r;var a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height="".concat(t.height,"px"),a.style.width="".concat(t.width,"px")),(t.currentDevicePixelRatio!==r||a.height!==i||a.width!==o)&&(t.currentDevicePixelRatio=r,a.height=i,a.width=o,t.ctx.setTransform(r,0,0,r,0,0),!0)}var yp=function(){var t=!1;try{var e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(n){}return t}();function bp(t,e){var n=function(t,e){return hp(t).getPropertyValue(e)}(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function _p(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function wp(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:"middle"===r?n<.5?t.y:e.y:"after"===r?n<1?t.y:e.y:n>0?e.y:t.y}}function xp(t,e,n,r){var i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=_p(t,i,n),s=_p(i,o,n),u=_p(o,e,n),c=_p(a,s,n),l=_p(s,u,n);return _p(c,l,n)}var kp=new Map;function Sp(t,e,n){return function(t,e){e=e||{};var n=t+JSON.stringify(e),r=kp.get(n);return r||(r=new Intl.NumberFormat(t,e),kp.set(n,r)),r}(e,n).format(t)}function Cp(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}}function Mp(t,e){var n,r;"ltr"!==e&&"rtl"!==e||(r=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function Ep(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Tp(t){return"angle"===t?{between:_f,compare:yf,normalize:bf}:{between:function(t,e,n){return t>=Math.min(e,n)&&t<=Math.max(n,e)},compare:function(t,e){return t-e},normalize:function(t){return t}}}function Ap(t){var e=t.start,n=t.end,r=t.count;return{start:e%r,end:n%r,loop:t.loop&&(n-e+1)%r===0,style:t.style}}function Op(t,e,n){if(!n)return[t];for(var r,i,o,a=n.property,s=n.start,u=n.end,c=e.length,l=Tp(a),h=l.compare,f=l.between,d=l.normalize,p=function(t,e,n){var r,i,o=n.property,a=n.start,s=n.end,u=Tp(o),c=u.between,l=u.normalize,h=e.length,f=t.start,d=t.end,p=t.loop;if(p){for(f+=h,d+=h,r=0,i=h;r<i&&c(l(e[f%h][o]),a,s);++r)f--,d--;f%=h,d%=h}return d<f&&(d+=h),{start:f,end:d,loop:p,style:t.style}}(t,e,n),m=p.start,v=p.end,g=p.loop,y=p.style,b=[],_=!1,w=null,x=function(){return _||f(s,o,r)&&0!==h(s,o)},k=function(){return!_||0===h(u,r)||f(u,o,r)},S=m,C=m;S<=v;++S)(i=e[S%c]).skip||(r=d(i[a]))!==o&&(_=f(r,s,u),null===w&&x()&&(w=0===h(r,s)?S:C),null!==w&&k()&&(b.push(Ap({start:w,end:S,loop:g,count:c,style:y})),w=null),C=S,o=r);return null!==w&&b.push(Ap({start:w,end:v,loop:g,count:c,style:y})),b}function Pp(t,e){for(var n=[],r=t.segments,i=0;i<r.length;i++){var o=Op(r[i],t.points,e);o.length&&n.push.apply(n,vh(o))}return n}function Lp(t,e,n,r){return r&&r.setContext&&n?function(t,e,n,r){var i,o=Dp(t.options),a=n.length,s=[],u=e[0].start,c=u,l=xh(e);try{for(l.s();!(i=l.n()).done;){var h=i.value,f=o,d=n[u%a],p=void 0;for(c=u+1;c<=h.end;c++){var m=n[c%a];Ip(p=Dp(r.setContext({type:"segment",p0:d,p1:m,p0DataIndex:(c-1)%a,p1DataIndex:c%a,datasetIndex:t._datasetIndex})),f)&&(s.push({start:u,end:c-1,loop:h.loop,style:f}),f=p,u=c-1),d=m,f=p}u<c-1&&(s.push({start:u,end:c-1,loop:h.loop,style:p}),u=c-1)}}catch(Cw){l.e(Cw)}finally{l.f()}return s}(t,e,n,r):e}function Dp(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Ip(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}function Rp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Np(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Rp(Object(n),!0).forEach((function(e){Wp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function zp(t,e,n){return(zp="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Up(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function jp(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bp(t,e)}function Bp(t,e){return(Bp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fp(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Up(t);if(e){var i=Up(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qp(this,n)}}function qp(t,e){return!e||"object"!==Zp(e)&&"function"!==typeof e?Vp(t):e}function Vp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Up(t){return(Up=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Hp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(Cw){i=!0,o=Cw}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||Gp(t,e)||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 Wp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $p(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Gp(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Zp(t){return(Zp="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yp(t){return function(t){if(Array.isArray(t))return Kp(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Gp(t)||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 Gp(t,e){if(t){if("string"===typeof t)return Kp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kp(t,e):void 0}}function Kp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Jp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qp(t,e,n){return e&&Xp(t.prototype,e),n&&Xp(t,n),t}var tm=new(function(){function t(){Jp(this,t),this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}return Qp(t,[{key:"_notify",value:function(t,e,n,r){var i=e.listeners[r],o=e.duration;i.forEach((function(r){return r({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)})}))}},{key:"_refresh",value:function(){var t=this;t._request||(t._running=!0,t._request=Ch.call(window,(function(){t._update(),t._request=null,t._running&&t._refresh()})))}},{key:"_update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e=this,n=0;e._charts.forEach((function(r,i){if(r.running&&r.items.length){for(var o,a=r.items,s=a.length-1,u=!1;s>=0;--s)(o=a[s])._active?(o._total>r.duration&&(r.duration=o._total),o.tick(t),u=!0):(a[s]=a[a.length-1],a.pop());u&&(i.draw(),e._notify(i,r,t,"progress")),a.length||(r.running=!1,e._notify(i,r,t,"complete"),r.initial=!1),n+=a.length}})),e._lastDate=t,0===n&&(e._running=!1)}},{key:"_getAnims",value:function(t){var e=this._charts,n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}},{key:"listen",value:function(t,e,n){this._getAnims(t).listeners[e].push(n)}},{key:"add",value:function(t,e){var n;e&&e.length&&(n=this._getAnims(t).items).push.apply(n,Yp(e))}},{key:"has",value:function(t){return this._getAnims(t).items.length>0}},{key:"start",value:function(t){var e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((function(t,e){return Math.max(t,e._duration)}),0),this._refresh())}},{key:"running",value:function(t){if(!this._running)return!1;var e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}},{key:"stop",value:function(t){var e=this._charts.get(t);if(e&&e.items.length){for(var n=e.items,r=n.length-1;r>=0;--r)n[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}}},{key:"remove",value:function(t){return this._charts.delete(t)}}]),t}()),em="transparent",nm={boolean:function(t,e,n){return n>.5?e:t},color:function(t,e,n){var r=od(t||em),i=r.valid&&od(e||em);return i&&i.valid?i.mix(r,n).hexString():e},number:function(t,e,n){return t+(e-t)*n}},rm=function(){function t(e,n,r,i){Jp(this,t);var o=n[r];i=Id([e.to,i,o,e.from]);var a=Id([e.from,o,i]);this._active=!0,this._fn=e.fn||nm[e.type||Zp(a)],this._easing=Cf[e.easing]||Cf.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}return Qp(t,[{key:"active",value:function(){return this._active}},{key:"update",value:function(t,e,n){var r=this;if(r._active){r._notify(!1);var i=r._target[r._prop],o=n-r._start,a=r._duration-o;r._start=n,r._duration=Math.floor(Math.max(a,t.duration)),r._total+=o,r._loop=!!t.loop,r._to=Id([t.to,e,i,t.from]),r._from=Id([t.from,i,e])}}},{key:"cancel",value:function(){var t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}},{key:"tick",value:function(t){var e,n=this,r=t-n._start,i=n._duration,o=n._prop,a=n._from,s=n._loop,u=n._to;if(n._active=a!==u&&(s||r<i),!n._active)return n._target[o]=u,void n._notify(!0);r<0?n._target[o]=a:(e=r/i%2,e=s&&e>1?2-e:e,e=n._easing(Math.min(1,Math.max(0,e))),n._target[o]=n._fn(a,u,e))}},{key:"wait",value:function(){var t=this._promises||(this._promises=[]);return new Promise((function(e,n){t.push({res:e,rej:n})}))}},{key:"_notify",value:function(t){for(var e=t?"res":"rej",n=this._promises||[],r=0;r<n.length;r++)n[r][e]()}}]),t}();hd.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});var im=Object.keys(hd.animation);hd.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:function(t){return"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}}),hd.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),hd.describe("animations",{_fallback:"animation"}),hd.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:function(t){return 0|t}}}}});var om=function(){function t(e,n){Jp(this,t),this._chart=e,this._properties=new Map,this.configure(n)}return Qp(t,[{key:"configure",value:function(t){if(Ih(t)){var e=this._properties;Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];if(Ih(r)){var i,o={},a=$p(im);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]=r[s]}}catch(Cw){a.e(Cw)}finally{a.f()}(Dh(r.properties)&&r.properties||[n]).forEach((function(t){t!==n&&e.has(t)||e.set(t,o)}))}}))}}},{key:"_animateOptions",value:function(t,e){var n=e.options,r=function(t,e){if(!e)return;var n=t.options;if(!n)return void(t.options=e);n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(t,n);if(!r)return[];var i=this._createAnimations(r,n);return n.$shared&&function(t,e){for(var n=[],r=Object.keys(e),i=0;i<r.length;i++){var o=t[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}(t.options.$animations,n).then((function(){t.options=n}),(function(){})),i}},{key:"_createAnimations",value:function(t,e){var n,r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),s=Date.now();for(n=a.length-1;n>=0;--n){var u=a[n];if("$"!==u.charAt(0))if("options"!==u){var c=e[u],l=o[u],h=r.get(u);if(l){if(h&&l.active()){l.update(h,c,s);continue}l.cancel()}h&&h.duration?(o[u]=l=new rm(h,t,u,c),i.push(l)):t[u]=c}else i.push.apply(i,Yp(this._animateOptions(t,e)))}return i}},{key:"update",value:function(t,e){if(0!==this._properties.size){var n=this._createAnimations(t,e);return n.length?(tm.add(this._chart,n),!0):void 0}Object.assign(t,e)}}]),t}();function am(t,e){var n=t&&t.options||{},r=n.reverse,i=void 0===n.min?e:0,o=void 0===n.max?e:0;return{start:r?o:i,end:r?i:o}}function sm(t,e){var n,r,i=[],o=t._getSortedDatasetMetas(e);for(n=0,r=o.length;n<r;++n)i.push(o[n].index);return i}function um(t,e,n,r){var i,o,a,s,u=t.keys,c="single"===r.mode;if(null!==e){for(i=0,o=u.length;i<o;++i){if((a=+u[i])===n){if(r.all)continue;break}s=t.values[a],Rh(s)&&(c||0===e||cf(e)===cf(s))&&(e+=s)}return e}}function cm(t,e){var n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function lm(t,e,n){var r=t[e]||(t[e]={});return r[n]||(r[n]={})}function hm(t,e,n){var r,i=$p(e.getMatchingVisibleMetas("bar").reverse());try{for(i.s();!(r=i.n()).done;){var o=r.value,a=t[o.index];if(n&&a>0||!n&&a<0)return o.index}}catch(Cw){i.e(Cw)}finally{i.f()}return null}function fm(t,e){for(var n,r=t.chart,i=t._cachedMeta,o=r._stacks||(r._stacks={}),a=i.iScale,s=i.vScale,u=i.index,c=a.axis,l=s.axis,h=function(t,e,n){return"".concat(t.id,".").concat(e.id,".").concat(n.stack||n.type)}(a,s,i),f=e.length,d=0;d<f;++d){var p=e[d],m=p[c],v=p[l];(n=(p._stacks||(p._stacks={}))[l]=lm(o,h,m))[u]=v,n._top=hm(n,s,!0),n._bottom=hm(n,s,!1)}}function dm(t,e){var n=t.scales;return Object.keys(n).filter((function(t){return n[t].axis===e})).shift()}function pm(t,e){var n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){var i,o=$p(e=e||t._parsed);try{for(o.s();!(i=o.n()).done;){var a=i.value._stacks;if(!a||void 0===a[r]||void 0===a[r][n])return;delete a[r][n]}}catch(Cw){o.e(Cw)}finally{o.f()}}}var mm=function(t){return"reset"===t||"none"===t},vm=function(t,e){return e?t:Object.assign({},t)},gm=function(){function t(e,n){Jp(this,t),this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}return Qp(t,[{key:"initialize",value:function(){var t=this,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=cm(e.vScale,e),t.addElements()}},{key:"updateIndex",value:function(t){this.index!==t&&pm(this._cachedMeta),this.index=t}},{key:"linkScales",value:function(){var t=this,e=t.chart,n=t._cachedMeta,r=t.getDataset(),i=function(t,e,n,r){return"x"===t?e:"r"===t?r:n},o=n.xAxisID=zh(r.xAxisID,dm(e,"x")),a=n.yAxisID=zh(r.yAxisID,dm(e,"y")),s=n.rAxisID=zh(r.rAxisID,dm(e,"r")),u=n.indexAxis,c=n.iAxisID=i(u,o,a,s),l=n.vAxisID=i(u,a,o,s);n.xScale=t.getScaleForId(o),n.yScale=t.getScaleForId(a),n.rScale=t.getScaleForId(s),n.iScale=t.getScaleForId(c),n.vScale=t.getScaleForId(l)}},{key:"getDataset",value:function(){return this.chart.data.datasets[this.index]}},{key:"getMeta",value:function(){return this.chart.getDatasetMeta(this.index)}},{key:"getScaleForId",value:function(t){return this.chart.scales[t]}},{key:"_getOtherScale",value:function(t){var e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}},{key:"reset",value:function(){this._update("reset")}},{key:"_destroy",value:function(){var t=this._cachedMeta;this._data&&Bd(this._data,this),t._stacked&&pm(t)}},{key:"_dataCheck",value:function(){var t,e,n=this,r=n.getDataset(),i=r.data||(r.data=[]),o=n._data;if(Ih(i))n._data=function(t){var e,n,r,i=Object.keys(t),o=new Array(i.length);for(e=0,n=i.length;e<n;++e)r=i[e],o[e]={x:r,y:t[r]};return o}(i);else if(o!==i){if(o){Bd(o,n);var a=n._cachedMeta;pm(a),a._parsed=[]}i&&Object.isExtensible(i)&&(e=n,(t=i)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),jd.forEach((function(e){var n="_onData"+Kh(e),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];var a=r.apply(this,i);return t._chartjs.listeners.forEach((function(t){"function"===typeof t[n]&&t[n].apply(t,i)})),a}})})))),n._syncList=[],n._data=i}}},{key:"addElements",value:function(){var t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}},{key:"buildOrUpdateElements",value:function(t){var e=this,n=e._cachedMeta,r=e.getDataset(),i=!1;e._dataCheck();var o=n._stacked;n._stacked=cm(n.vScale,n),n.stack!==r.stack&&(i=!0,pm(n),n.stack=r.stack),e._resyncElements(t),(i||o!==n._stacked)&&fm(e,n._parsed)}},{key:"configure",value:function(){var t=this,e=t.chart.config,n=e.datasetScopeKeys(t._type),r=e.getOptionScopes(t.getDataset(),n,!0);t.options=e.createResolver(r,t.getContext()),t._parsing=t.options.parsing}},{key:"parse",value:function(t,e){var n,r,i,o=this,a=o._cachedMeta,s=o._data,u=a.iScale,c=a._stacked,l=u.axis,h=0===t&&e===s.length||a._sorted,f=t>0&&a._parsed[t-1];if(!1===o._parsing)a._parsed=s,a._sorted=!0,i=s;else{i=Dh(s[t])?o.parseArrayData(a,s,t,e):Ih(s[t])?o.parseObjectData(a,s,t,e):o.parsePrimitiveData(a,s,t,e);for(n=0;n<e;++n)a._parsed[n+t]=r=i[n],h&&((null===r[l]||f&&r[l]<f[l])&&(h=!1),f=r);a._sorted=h}c&&fm(o,i)}},{key:"parsePrimitiveData",value:function(t,e,n,r){var i,o,a,s=t.iScale,u=t.vScale,c=s.axis,l=u.axis,h=s.getLabels(),f=s===u,d=new Array(r);for(i=0,o=r;i<o;++i){var p;a=i+n,d[i]=(Wp(p={},c,f||s.parse(h[a],a)),Wp(p,l,u.parse(e[a],a)),p)}return d}},{key:"parseArrayData",value:function(t,e,n,r){var i,o,a,s,u=t.xScale,c=t.yScale,l=new Array(r);for(i=0,o=r;i<o;++i)s=e[a=i+n],l[i]={x:u.parse(s[0],a),y:c.parse(s[1],a)};return l}},{key:"parseObjectData",value:function(t,e,n,r){var i,o,a,s,u=t.xScale,c=t.yScale,l=this._parsing,h=l.xAxisKey,f=void 0===h?"x":h,d=l.yAxisKey,p=void 0===d?"y":d,m=new Array(r);for(i=0,o=r;i<o;++i)s=e[a=i+n],m[i]={x:u.parse(Gh(s,f),a),y:c.parse(Gh(s,p),a)};return m}},{key:"getParsed",value:function(t){return this._cachedMeta._parsed[t]}},{key:"getDataElement",value:function(t){return this._cachedMeta.data[t]}},{key:"applyStack",value:function(t,e,n){var r=this.chart,i=this._cachedMeta,o=e[t.axis];return um({keys:sm(r,!0),values:e._stacks[t.axis]},o,i.index,{mode:n})}},{key:"updateRangeFromParsed",value:function(t,e,n,r){var i=n[e.axis],o=null===i?NaN:i,a=r&&n._stacks[e.axis];r&&a&&(r.values=a,t.min=Math.min(t.min,o),t.max=Math.max(t.max,o),o=um(r,i,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}},{key:"getMinMax",value:function(t,e){var n,r,i,o,a=this,s=a._cachedMeta,u=s._parsed,c=s._sorted&&t===s.iScale,l=u.length,h=a._getOtherScale(t),f=e&&s._stacked&&{keys:sm(a.chart,!0),values:null},d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},p=function(t){var e=t.getUserBounds(),n=e.min,r=e.max,i=e.minDefined,o=e.maxDefined;return{min:i?n:Number.NEGATIVE_INFINITY,max:o?r:Number.POSITIVE_INFINITY}}(h),m=p.min,v=p.max;function g(){return i=u[n],r=i[t.axis],o=i[h.axis],!Rh(r)||m>o||v<o}for(n=0;n<l&&(g()||(a.updateRangeFromParsed(d,t,i,f),!c));++n);if(c)for(n=l-1;n>=0;--n)if(!g()){a.updateRangeFromParsed(d,t,i,f);break}return d}},{key:"getAllParsedValues",value:function(t){var e,n,r,i=this._cachedMeta._parsed,o=[];for(e=0,n=i.length;e<n;++e)r=i[e][t.axis],Rh(r)&&o.push(r);return o}},{key:"getMaxOverflow",value:function(){return!1}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,n=e.iScale,r=e.vScale,i=this.getParsed(t);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:r?""+r.getLabelForValue(i[r.axis]):""}}},{key:"_update",value:function(t){var e,n,r,i,o,a=this,s=a._cachedMeta;a.configure(),a._cachedDataOpts={},a.update(t||"default"),s._clip=(Ih(e=zh(a.options.clip,function(t,e,n){if(!1===n)return!1;var r=am(t,n),i=am(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}(s.xScale,s.yScale,a.getMaxOverflow())))?(n=e.top,r=e.right,i=e.bottom,o=e.left):n=r=i=o=e,{top:n,right:r,bottom:i,left:o,disabled:!1===e})}},{key:"update",value:function(t){}},{key:"draw",value:function(){var t,e=this,n=e._ctx,r=e.chart,i=e._cachedMeta,o=i.data||[],a=r.chartArea,s=[],u=e._drawStart||0,c=e._drawCount||o.length-u;for(i.dataset&&i.dataset.draw(n,a,u,c),t=u;t<u+c;++t){var l=o[t];l.hidden||(l.active?s.push(l):l.draw(n,a))}for(t=0;t<s.length;++t)s[t].draw(n,a)}},{key:"getStyle",value:function(t,e){var n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}},{key:"getContext",value:function(t,e,n){var r,i=this,o=i.getDataset();if(t>=0&&t<i._cachedMeta.data.length){var a=i._cachedMeta.data[t];(r=a.$context||(a.$context=function(t,e,n){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(i.getContext(),t,a))).parsed=i.getParsed(t),r.raw=o.data[t],r.index=r.dataIndex=t}else(r=i.$context||(i.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(i.chart.getContext(),i.index))).dataset=o,r.index=r.datasetIndex=i.index;return r.active=!!e,r.mode=n,r}},{key:"resolveDatasetElementOptions",value:function(t){return this._resolveElementOptions(this.datasetElementType.id,t)}},{key:"resolveDataElementOptions",value:function(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}},{key:"_resolveElementOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0,r=this,i="active"===e,o=r._cachedDataOpts,a=t+"-"+e,s=o[a],u=r.enableOptionSharing&&Jh(n);if(s)return vm(s,u);var c=r.chart.config,l=c.datasetElementScopeKeys(r._type,t),h=i?["".concat(t,"Hover"),"hover",t,""]:[t,""],f=c.getOptionScopes(r.getDataset(),l),d=Object.keys(hd.elements[t]),p=function(){return r.getContext(n,i)},m=c.resolveNamedOptions(f,d,p,h);return m.$shared&&(m.$shared=u,o[a]=Object.freeze(vm(m,u))),m}},{key:"_resolveAnimations",value:function(t,e,n){var r,i=this,o=i.chart,a=i._cachedDataOpts,s="animation-".concat(e),u=a[s];if(u)return u;if(!1!==o.options.animation){var c=i.chart.config,l=c.datasetAnimationScopeKeys(i._type,e),h=c.getOptionScopes(i.getDataset(),l);r=c.createResolver(h,i.getContext(t,n,e))}var f=new om(o,r&&r.animations);return r&&r._cacheable&&(a[s]=Object.freeze(f)),f}},{key:"getSharedOptions",value:function(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}},{key:"includeOptions",value:function(t,e){return!e||mm(t)||this.chart._animationsDisabled}},{key:"updateElement",value:function(t,e,n,r){mm(r)?Object.assign(t,n):this._resolveAnimations(e,r).update(t,n)}},{key:"updateSharedOptions",value:function(t,e,n){t&&!mm(e)&&this._resolveAnimations(void 0,e).update(t,n)}},{key:"_setStyle",value:function(t,e,n,r){t.active=r;var i=this.getStyle(e,r);this._resolveAnimations(e,n,r).update(t,{options:!r&&this.getSharedOptions(i)||i})}},{key:"removeHoverStyle",value:function(t,e,n){this._setStyle(t,n,"active",!1)}},{key:"setHoverStyle",value:function(t,e,n){this._setStyle(t,n,"active",!0)}},{key:"_removeDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}},{key:"_setDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}},{key:"_resyncElements",value:function(t){var e,n=this,r=n._data,i=n._cachedMeta.data,o=$p(n._syncList);try{for(o.s();!(e=o.n()).done;){var a=Hp(e.value,3),s=a[0],u=a[1],c=a[2];n[s](u,c)}}catch(Cw){o.e(Cw)}finally{o.f()}n._syncList=[];var l=i.length,h=r.length,f=Math.min(h,l);f&&n.parse(0,f),h>l?n._insertElements(l,h-l,t):h<l&&n._removeElements(h,l-h)}},{key:"_insertElements",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this,o=i._cachedMeta,a=o.data,s=t+e,u=function(t){for(t.length+=e,n=t.length-1;n>=s;n--)t[n]=t[n-e]};for(u(a),n=t;n<s;++n)a[n]=new i.dataElementType;i._parsing&&u(o._parsed),i.parse(t,e),r&&i.updateElements(a,t,e,"reset")}},{key:"updateElements",value:function(t,e,n,r){}},{key:"_removeElements",value:function(t,e){var n=this._cachedMeta;if(this._parsing){var r=n._parsed.splice(t,e);n._stacked&&pm(n,r)}n.data.splice(t,e)}},{key:"_sync",value:function(t){if(this._parsing)this._syncList.push(t);else{var e=Hp(t,3),n=e[0],r=e[1],i=e[2];this[n](r,i)}}},{key:"_onDataPush",value:function(){var t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}},{key:"_onDataPop",value:function(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}},{key:"_onDataShift",value:function(){this._sync(["_removeElements",0,1])}},{key:"_onDataSplice",value:function(t,e){this._sync(["_removeElements",t,e]),this._sync(["_insertElements",t,arguments.length-2])}},{key:"_onDataUnshift",value:function(){this._sync(["_insertElements",0,arguments.length])}}]),t}();function ym(t){var e,n,r,i,o=function(t){if(!t._cache.$bar){for(var e=t.getMatchingVisibleMetas("bar"),n=[],r=0,i=e.length;r<i;r++)n=n.concat(e[r].controller.getAllParsedValues(t));t._cache.$bar=Fd(n.sort((function(t,e){return t-e})))}return t._cache.$bar}(t),a=t._length,s=function(){32767!==r&&-32768!==r&&(Jh(i)&&(a=Math.min(a,Math.abs(r-i)||a)),i=r)};for(e=0,n=o.length;e<n;++e)r=t.getPixelForValue(o[e]),s();for(i=void 0,e=0,n=t.ticks.length;e<n;++e)r=t.getPixelForTick(e),s();return a}function bm(t,e,n,r){return Dh(t)?function(t,e,n,r){var i=n.parse(t[0],r),o=n.parse(t[1],r),a=Math.min(i,o),s=Math.max(i,o),u=a,c=s;Math.abs(a)>Math.abs(s)&&(u=s,c=a),e[n.axis]=c,e._custom={barStart:u,barEnd:c,start:i,end:o,min:a,max:s}}(t,e,n,r):e[n.axis]=n.parse(t,r),e}function _m(t,e,n,r){var i,o,a,s,u=t.iScale,c=t.vScale,l=u.getLabels(),h=u===c,f=[];for(i=n,o=n+r;i<o;++i)s=e[i],(a={})[u.axis]=h||u.parse(l[i],i),f.push(bm(s,a,c,i));return f}function wm(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function xm(t,e,n,r){var i=e.borderSkipped,o={};if(i){var a=function(t){var e,n,r,i,o;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:e,top:i,bottom:o}}(t),s=a.start,u=a.end,c=a.reverse,l=a.top,h=a.bottom;"middle"===i&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?i=l:(n._bottom||0)===r?i=h:(o[km(h,s,u,c)]=!0,i=l)),o[km(i,s,u,c)]=!0,t.borderSkipped=o}else t.borderSkipped=o}function km(t,e,n,r){var i,o,a;return r?(a=n,t=Sm(t=(i=t)===(o=e)?a:i===a?o:i,n,e)):t=Sm(t,e,n),t}function Sm(t,e,n){return"start"===t?e:"end"===t?n:t}gm.defaults={},gm.prototype.datasetElementType=null,gm.prototype.dataElementType=null;var Cm=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return Qp(n,[{key:"parsePrimitiveData",value:function(t,e,n,r){return _m(t,e,n,r)}},{key:"parseArrayData",value:function(t,e,n,r){return _m(t,e,n,r)}},{key:"parseObjectData",value:function(t,e,n,r){var i,o,a,s,u=t.iScale,c=t.vScale,l=this._parsing,h=l.xAxisKey,f=void 0===h?"x":h,d=l.yAxisKey,p=void 0===d?"y":d,m="x"===u.axis?f:p,v="x"===c.axis?f:p,g=[];for(i=n,o=n+r;i<o;++i)s=e[i],(a={})[u.axis]=u.parse(Gh(s,m),i),g.push(bm(Gh(s,v),a,c,i));return g}},{key:"updateRangeFromParsed",value:function(t,e,r,i){zp(Up(n.prototype),"updateRangeFromParsed",this).call(this,t,e,r,i);var o=r._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}},{key:"getMaxOverflow",value:function(){return 0}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,n=e.iScale,r=e.vScale,i=this.getParsed(t),o=i._custom,a=wm(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(i[r.axis]);return{label:""+n.getLabelForValue(i[n.axis]),value:a}}},{key:"initialize",value:function(){var t=this;t.enableOptionSharing=!0,zp(Up(n.prototype),"initialize",this).call(this),t._cachedMeta.stack=t.getDataset().stack}},{key:"update",value:function(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}},{key:"updateElements",value:function(t,e,n,r){var i=this,o="reset"===r,a=i.index,s=i._cachedMeta.vScale,u=s.getBasePixel(),c=s.isHorizontal(),l=i._getRuler(),h=i.resolveDataElementOptions(e,r),f=i.getSharedOptions(h),d=i.includeOptions(r,f);i.updateSharedOptions(f,r,h);for(var p=e;p<e+n;p++){var m=i.getParsed(p),v=o||Lh(m[s.axis])?{base:u,head:u}:i._calculateBarValuePixels(p),g=i._calculateBarIndexPixels(p,l),y=(m._stacks||{})[s.axis],b={horizontal:c,base:v.base,enableBorderRadius:!y||wm(m._custom)||a===y._top||a===y._bottom,x:c?v.head:g.center,y:c?g.center:v.head,height:c?g.size:Math.abs(v.size),width:c?Math.abs(v.size):g.size};d&&(b.options=f||i.resolveDataElementOptions(p,t[p].active?"active":r)),xm(b,b.options||t[p].options,y,a),i.updateElement(t[p],p,b,r)}}},{key:"_getStacks",value:function(t,e){var n,r,i=this._cachedMeta.iScale,o=i.getMatchingVisibleMetas(this._type),a=i.options.stacked,s=o.length,u=[];for(n=0;n<s;++n)if((r=o[n]).controller.options.grouped){if("undefined"!==typeof e){var c=r.controller.getParsed(e)[r.controller._cachedMeta.vScale.axis];if(Lh(c)||isNaN(c))continue}if((!1===a||-1===u.indexOf(r.stack)||void 0===a&&void 0===r.stack)&&u.push(r.stack),r.index===t)break}return u.length||u.push(void 0),u}},{key:"_getStackCount",value:function(t){return this._getStacks(void 0,t).length}},{key:"_getStackIndex",value:function(t,e,n){var r=this._getStacks(t,n),i=void 0!==e?r.indexOf(e):-1;return-1===i?r.length-1:i}},{key:"_getRuler",value:function(){var t,e,n=this,r=n.options,i=n._cachedMeta,o=i.iScale,a=[];for(t=0,e=i.data.length;t<e;++t)a.push(o.getPixelForValue(n.getParsed(t)[o.axis],t));var s=r.barThickness;return{min:s||ym(o),pixels:a,start:o._startPixel,end:o._endPixel,stackCount:n._getStackCount(),scale:o,grouped:r.grouped,ratio:s?1:r.categoryPercentage*r.barPercentage}}},{key:"_calculateBarValuePixels",value:function(t){var e,n,r=this,i=r._cachedMeta,o=i.vScale,a=i._stacked,s=r.options,u=s.base,c=s.minBarLength,l=u||0,h=r.getParsed(t),f=h._custom,d=wm(f),p=h[o.axis],m=0,v=a?r.applyStack(o,h,a):p;v!==p&&(m=v-p,v=p),d&&(p=f.barStart,v=f.barEnd-f.barStart,0!==p&&cf(p)!==cf(f.barEnd)&&(m=0),m+=p);var g=Lh(u)||d?m:u,y=o.getPixelForValue(g);if(n=(e=r.chart.getDataVisibility(t)?o.getPixelForValue(m+v):y)-y,Math.abs(n)<c&&(n=function(t,e,n){return 0!==t?cf(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(n,o,l)*c,p===l&&(y-=n/2),e=y+n),y===o.getPixelForValue(l)){var b=cf(n)*o.getLineWidthForValue(l)/2;y+=b,n-=b}return{size:n,base:y,head:e,center:e+n/2}}},{key:"_calculateBarIndexPixels",value:function(t,e){var n,r,i=this,o=e.scale,a=i.options,s=a.skipNull,u=zh(a.maxBarThickness,1/0);if(e.grouped){var c=s?i._getStackCount(t):e.stackCount,l="flex"===a.barThickness?function(t,e,n,r){var i=e.pixels,o=i[t],a=t>0?i[t-1]:null,s=t<i.length-1?i[t+1]:null,u=n.categoryPercentage;null===a&&(a=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-a);var c=o-(o-Math.min(a,s))/2*u;return{chunk:Math.abs(s-a)/2*u/r,ratio:n.barPercentage,start:c}}(t,e,a,c):function(t,e,n,r){var i,o,a=n.barThickness;return Lh(a)?(i=e.min*n.categoryPercentage,o=n.barPercentage):(i=a*r,o=1),{chunk:i/r,ratio:o,start:e.pixels[t]-i/2}}(t,e,a,c),h=i._getStackIndex(i.index,i._cachedMeta.stack,s?t:void 0);n=l.start+l.chunk*h+l.chunk/2,r=Math.min(u,l.chunk*l.ratio)}else n=o.getPixelForValue(i.getParsed(t)[o.axis],t),r=Math.min(u,e.min*e.ratio);return{base:n-r/2,head:n+r/2,center:n,size:r}}},{key:"draw",value:function(){for(var t=this,e=t._cachedMeta,n=e.vScale,r=e.data,i=r.length,o=0;o<i;++o)null!==t.getParsed(o)[n.axis]&&r[o].draw(t._ctx)}}]),n}(gm);Cm.id="bar",Cm.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Cm.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};var Mm=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return Qp(n,[{key:"initialize",value:function(){this.enableOptionSharing=!0,zp(Up(n.prototype),"initialize",this).call(this)}},{key:"parseObjectData",value:function(t,e,n,r){var i,o,a,s=t.xScale,u=t.yScale,c=this._parsing,l=c.xAxisKey,h=void 0===l?"x":l,f=c.yAxisKey,d=void 0===f?"y":f,p=[];for(i=n,o=n+r;i<o;++i)a=e[i],p.push({x:s.parse(Gh(a,h),i),y:u.parse(Gh(a,d),i),_custom:a&&a.r&&+a.r});return p}},{key:"getMaxOverflow",value:function(){for(var t=this._cachedMeta,e=t.data,n=t._parsed,r=0,i=e.length-1;i>=0;--i)r=Math.max(r,e[i].size()/2,n[i]._custom);return r>0&&r}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,n=e.xScale,r=e.yScale,i=this.getParsed(t),o=n.getLabelForValue(i.x),a=r.getLabelForValue(i.y),s=i._custom;return{label:e.label,value:"("+o+", "+a+(s?", "+s:"")+")"}}},{key:"update",value:function(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}},{key:"updateElements",value:function(t,e,n,r){for(var i=this,o="reset"===r,a=i._cachedMeta,s=a.iScale,u=a.vScale,c=i.resolveDataElementOptions(e,r),l=i.getSharedOptions(c),h=i.includeOptions(r,l),f=s.axis,d=u.axis,p=e;p<e+n;p++){var m=t[p],v=!o&&i.getParsed(p),g={},y=g[f]=o?s.getPixelForDecimal(.5):s.getPixelForValue(v[f]),b=g[d]=o?u.getBasePixel():u.getPixelForValue(v[d]);g.skip=isNaN(y)||isNaN(b),h&&(g.options=i.resolveDataElementOptions(p,m.active?"active":r),o&&(g.options.radius=0)),i.updateElement(m,p,g,r)}i.updateSharedOptions(l,r,c)}},{key:"resolveDataElementOptions",value:function(t,e){var r=this.getParsed(t),i=zp(Up(n.prototype),"resolveDataElementOptions",this).call(this,t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));var o=i.radius;return"active"!==e&&(i.radius=0),i.radius+=zh(r&&r._custom,o),i}}]),n}(gm);Mm.id="bubble",Mm.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Mm.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:function(){return""}}}}};var Em=function(t){jp(n,t);var e=Fp(n);function n(t,r){var i;return Jp(this,n),(i=e.call(this,t,r)).enableOptionSharing=!0,i.innerRadius=void 0,i.outerRadius=void 0,i.offsetX=void 0,i.offsetY=void 0,i}return Qp(n,[{key:"linkScales",value:function(){}},{key:"parse",value:function(t,e){var n,r,i=this.getDataset().data,o=this._cachedMeta;for(n=t,r=t+e;n<r;++n)o._parsed[n]=+i[n]}},{key:"_getRotation",value:function(){return pf(this.options.rotation-90)}},{key:"_getCircumference",value:function(){return pf(this.options.circumference)}},{key:"_getRotationExtents",value:function(){for(var t=tf,e=-tf,n=this,r=0;r<n.chart.data.datasets.length;++r)if(n.chart.isDatasetVisible(r)){var i=n.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}},{key:"update",value:function(t){var e,n,r=this,i=r.chart.chartArea,o=r._cachedMeta,a=o.data,s=r.getMaxBorderWidth()+r.getMaxOffset(a)+r.options.spacing,u=Math.max((Math.min(i.width,i.height)-s)/2,0),c=Math.min((e=r.options.cutout,n=u,"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100:e/n),1),l=r._getRingWeight(r.index),h=r._getRotationExtents(),f=h.circumference,d=function(t,e,n){var r=1,i=1,o=0,a=0;if(e<tf){var s=t,u=s+e,c=Math.cos(s),l=Math.sin(s),h=Math.cos(u),f=Math.sin(u),d=function(t,e,r){return _f(t,s,u,!0)?1:Math.max(e,e*n,r,r*n)},p=function(t,e,r){return _f(t,s,u,!0)?-1:Math.min(e,e*n,r,r*n)},m=d(0,c,h),v=d(of,l,f),g=p(Qh,c,h),y=p(Qh+of,l,f);r=(m-g)/2,i=(v-y)/2,o=-(m+g)/2,a=-(v+y)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}(h.rotation,f,c),p=d.ratioX,m=d.ratioY,v=d.offsetX,g=d.offsetY,y=(i.width-s)/p,b=(i.height-s)/m,_=Math.max(Math.min(y,b)/2,0),w=jh(r.options.radius,_),x=(w-Math.max(w*c,0))/r._getVisibleDatasetWeightTotal();r.offsetX=v*w,r.offsetY=g*w,o.total=r.calculateTotal(),r.outerRadius=w-x*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-x*l,0),r.updateElements(a,0,a.length,t)}},{key:"_circumference",value:function(t,e){var n=this,r=n.options,i=n._cachedMeta,o=n._getCircumference();return e&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:n.calculateCircumference(i._parsed[t]*o/tf)}},{key:"updateElements",value:function(t,e,n,r){var i,o=this,a="reset"===r,s=o.chart,u=s.chartArea,c=s.options.animation,l=(u.left+u.right)/2,h=(u.top+u.bottom)/2,f=a&&c.animateScale,d=f?0:o.innerRadius,p=f?0:o.outerRadius,m=o.resolveDataElementOptions(e,r),v=o.getSharedOptions(m),g=o.includeOptions(r,v),y=o._getRotation();for(i=0;i<e;++i)y+=o._circumference(i,a);for(i=e;i<e+n;++i){var b=o._circumference(i,a),_=t[i],w={x:l+o.offsetX,y:h+o.offsetY,startAngle:y,endAngle:y+b,circumference:b,outerRadius:p,innerRadius:d};g&&(w.options=v||o.resolveDataElementOptions(i,_.active?"active":r)),y+=b,o.updateElement(_,i,w,r)}o.updateSharedOptions(v,r,m)}},{key:"calculateTotal",value:function(){var t,e=this._cachedMeta,n=e.data,r=0;for(t=0;t<n.length;t++){var i=e._parsed[t];null===i||isNaN(i)||!this.chart.getDataVisibility(t)||n[t].hidden||(r+=Math.abs(i))}return r}},{key:"calculateCircumference",value:function(t){var e=this._cachedMeta.total;return e>0&&!isNaN(t)?tf*(Math.abs(t)/e):0}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Sp(e._parsed[t],n.options.locale);return{label:r[t]||"",value:i}}},{key:"getMaxBorderWidth",value:function(t){var e,n,r,i,o,a=0,s=this.chart;if(!t)for(e=0,n=s.data.datasets.length;e<n;++e)if(s.isDatasetVisible(e)){t=(r=s.getDatasetMeta(e)).data,(i=r.controller)!==this&&i.configure();break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)"inner"!==(o=i.resolveDataElementOptions(e)).borderAlign&&(a=Math.max(a,o.borderWidth||0,o.hoverBorderWidth||0));return a}},{key:"getMaxOffset",value:function(t){for(var e=0,n=0,r=t.length;n<r;++n){var i=this.resolveDataElementOptions(n);e=Math.max(e,i.offset||0,i.hoverOffset||0)}return e}},{key:"_getRingWeightOffset",value:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}},{key:"_getRingWeight",value:function(t){return Math.max(zh(this.chart.data.datasets[t].weight,1),0)}},{key:"_getVisibleDatasetWeightTotal",value:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}]),n}(gm);Em.id="doughnut",Em.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},Em.descriptors={_scriptable:function(t){return"spacing"!==t},_indexable:function(t){return"spacing"!==t}},Em.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels:function(t){var e=t.data;if(e.labels.length&&e.datasets.length){var n=t.legend.options.labels.pointStyle;return e.labels.map((function(e,r){var i=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}}))}return[]}},onClick:function(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title:function(){return""},label:function(t){var e=t.label,n=": "+t.formattedValue;return Dh(e)?(e=e.slice())[0]+=n:e+=n,e}}}}};var Tm=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return Qp(n,[{key:"initialize",value:function(){this.enableOptionSharing=!0,zp(Up(n.prototype),"initialize",this).call(this)}},{key:"update",value:function(t){var e=this,n=e._cachedMeta,r=n.dataset,i=n.data,o=void 0===i?[]:i,a=n._dataset,s=e.chart._animationsDisabled,u=function(t,e,n){var r=e.length,i=0,o=r;if(t._sorted){var a=t.iScale,s=t._parsed,u=a.axis,c=a.getUserBounds(),l=c.min,h=c.max,f=c.minDefined,d=c.maxDefined;f&&(i=wf(Math.min(Nd(s,a.axis,l).lo,n?r:Nd(e,u,a.getPixelForValue(l)).lo),0,r-1)),o=d?wf(Math.max(Nd(s,a.axis,h).hi+1,n?0:Nd(e,u,a.getPixelForValue(h)).hi+1),i,r)-i:r-i}return{start:i,count:o}}(n,o,s),c=u.start,l=u.count;e._drawStart=c,e._drawCount=l,function(t){var e=t.xScale,n=t.yScale,r=t._scaleRanges,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;var o=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}(n)&&(c=0,l=o.length),r._datasetIndex=e.index,r._decimated=!!a._decimated,r.points=o;var h=e.resolveDatasetElementOptions(t);e.options.showLine||(h.borderWidth=0),h.segment=e.options.segment,e.updateElement(r,void 0,{animated:!s,options:h},t),e.updateElements(o,c,l,t)}},{key:"updateElements",value:function(t,e,n,r){for(var i=this,o="reset"===r,a=i._cachedMeta,s=a.iScale,u=a.vScale,c=a._stacked,l=i.resolveDataElementOptions(e,r),h=i.getSharedOptions(l),f=i.includeOptions(r,h),d=s.axis,p=u.axis,m=i.options.spanGaps,v=hf(m)?m:Number.POSITIVE_INFINITY,g=i.chart._animationsDisabled||o||"none"===r,y=e>0&&i.getParsed(e-1),b=e;b<e+n;++b){var _=t[b],w=i.getParsed(b),x=g?_:{},k=Lh(w[p]),S=x[d]=s.getPixelForValue(w[d],b),C=x[p]=o||k?u.getBasePixel():u.getPixelForValue(c?i.applyStack(u,w,c):w[p],b);x.skip=isNaN(S)||isNaN(C)||k,x.stop=b>0&&w[d]-y[d]>v,x.parsed=w,f&&(x.options=h||i.resolveDataElementOptions(b,_.active?"active":r)),g||i.updateElement(_,b,x,r),y=w}i.updateSharedOptions(h,r,l)}},{key:"getMaxOverflow",value:function(){var t=this,e=t._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return r;var o=i[0].size(t.resolveDataElementOptions(0)),a=i[i.length-1].size(t.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}},{key:"draw",value:function(){var t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),zp(Up(n.prototype),"draw",this).call(this)}}]),n}(gm);Tm.id="line",Tm.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Tm.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var Am=function(t){jp(n,t);var e=Fp(n);function n(t,r){var i;return Jp(this,n),(i=e.call(this,t,r)).innerRadius=void 0,i.outerRadius=void 0,i}return Qp(n,[{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Sp(e._parsed[t].r,n.options.locale);return{label:r[t]||"",value:i}}},{key:"update",value:function(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}},{key:"_updateRadius",value:function(){var t=this,e=t.chart,n=e.chartArea,r=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),a=(o-Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=o-a*t.index,t.innerRadius=t.outerRadius-a}},{key:"updateElements",value:function(t,e,n,r){var i,o=this,a="reset"===r,s=o.chart,u=o.getDataset(),c=s.options.animation,l=o._cachedMeta.rScale,h=l.xCenter,f=l.yCenter,d=l.getIndexAngle(0)-.5*Qh,p=d,m=360/o.countVisibleElements();for(i=0;i<e;++i)p+=o._computeAngle(i,r,m);for(i=e;i<e+n;i++){var v=t[i],g=p,y=p+o._computeAngle(i,r,m),b=s.getDataVisibility(i)?l.getDistanceFromCenterForValue(u.data[i]):0;p=y,a&&(c.animateScale&&(b=0),c.animateRotate&&(g=y=d));var _={x:h,y:f,innerRadius:0,outerRadius:b,startAngle:g,endAngle:y,options:o.resolveDataElementOptions(i,v.active?"active":r)};o.updateElement(v,i,_,r)}}},{key:"countVisibleElements",value:function(){var t=this,e=this.getDataset(),n=this._cachedMeta,r=0;return n.data.forEach((function(n,i){!isNaN(e.data[i])&&t.chart.getDataVisibility(i)&&r++})),r}},{key:"_computeAngle",value:function(t,e,n){return this.chart.getDataVisibility(t)?pf(this.resolveDataElementOptions(t,e).angle||n):0}}]),n}(gm);Am.id="polarArea",Am.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Am.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels:function(t){var e=t.data;if(e.labels.length&&e.datasets.length){var n=t.legend.options.labels.pointStyle;return e.labels.map((function(e,r){var i=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}}))}return[]}},onClick:function(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title:function(){return""},label:function(t){return t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};var Om=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return n}(Em);Om.id="pie",Om.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};var Pm=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return Qp(n,[{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}},{key:"update",value:function(t){var e=this,n=e._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,"resize"!==t){var a=e.resolveDatasetElementOptions(t);e.options.showLine||(a.borderWidth=0);var s={_loop:!0,_fullLoop:o.length===i.length,options:a};e.updateElement(r,void 0,s,t)}e.updateElements(i,0,i.length,t)}},{key:"updateElements",value:function(t,e,n,r){for(var i=this,o=i.getDataset(),a=i._cachedMeta.rScale,s="reset"===r,u=e;u<e+n;u++){var c=t[u],l=i.resolveDataElementOptions(u,c.active?"active":r),h=a.getPointPositionForValue(u,o.data[u]),f=s?a.xCenter:h.x,d=s?a.yCenter:h.y,p={x:f,y:d,angle:h.angle,skip:isNaN(f)||isNaN(d),options:l};i.updateElement(c,u,p,r)}}}]),n}(gm);Pm.id="radar",Pm.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Pm.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};var Lm=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return n}(Tm);Lm.id="scatter",Lm.defaults={showLine:!1,fill:!1},Lm.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:function(){return""},label:function(t){return"("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Dm=Object.freeze({__proto__:null,BarController:Cm,BubbleController:Mm,DoughnutController:Em,LineController:Tm,PolarAreaController:Am,PieController:Om,RadarController:Pm,ScatterController:Lm});function Im(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Rm=function(){function t(e){Jp(this,t),this.options=e||{}}return Qp(t,[{key:"formats",value:function(){return Im()}},{key:"parse",value:function(t,e){return Im()}},{key:"format",value:function(t,e){return Im()}},{key:"add",value:function(t,e,n){return Im()}},{key:"diff",value:function(t,e,n){return Im()}},{key:"startOf",value:function(t,e,n){return Im()}},{key:"endOf",value:function(t,e){return Im()}}]),t}();Rm.override=function(t){Object.assign(Rm.prototype,t)};var Nm={_date:Rm};function zm(t,e){return"native"in t?{x:t.x,y:t.y}:pp(t,e)}function jm(t,e,n,r){var i=t.controller,o=t.data,a=t._sorted,s=i._cachedMeta.iScale;if(s&&e===s.axis&&a&&o.length){var u=s._reversePixels?zd:Nd;if(!r)return u(o,e,n);if(i._sharedOptions){var c=o[0],l="function"===typeof c.getRange&&c.getRange(e);if(l){var h=u(o,e,n-l),f=u(o,e,n+l);return{lo:h.lo,hi:f.hi}}}}return{lo:0,hi:o.length-1}}function Bm(t,e,n,r,i){for(var o=t.getSortedVisibleDatasetMetas(),a=n[e],s=0,u=o.length;s<u;++s)for(var c=o[s],l=c.index,h=c.data,f=jm(o[s],e,a,i),d=f.lo,p=f.hi,m=d;m<=p;++m){var v=h[m];v.skip||r(v,l,m)}}function Fm(t,e,n,r){var i=[];if(!gd(e,t.chartArea,t._minPadding))return i;return Bm(t,n,e,(function(t,n,o){t.inRange(e.x,e.y,r)&&i.push({element:t,datasetIndex:n,index:o})}),!0),i}function qm(t,e,n,r,i){var o=function(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,r){var i=e?Math.abs(t.x-r.x):0,o=n?Math.abs(t.y-r.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}(n),a=Number.POSITIVE_INFINITY,s=[];if(!gd(e,t.chartArea,t._minPadding))return s;return Bm(t,n,e,(function(n,u,c){if(!r||n.inRange(e.x,e.y,i)){var l=n.getCenterPoint(i);if(gd(l,t.chartArea,t._minPadding)||n.inRange(e.x,e.y,i)){var h=o(e,l);h<a?(s=[{element:n,datasetIndex:u,index:c}],a=h):h===a&&s.push({element:n,datasetIndex:u,index:c})}}})),s}function Vm(t,e,n,r){var i=zm(e,t),o=[],a=n.axis,s="x"===a?"inXRange":"inYRange",u=!1;return function(t,e){for(var n,r,i,o=t.getSortedVisibleDatasetMetas(),a=0,s=o.length;a<s;++a){var u=o[a];n=u.index;for(var c=0,l=(r=u.data).length;c<l;++c)(i=r[c]).skip||e(i,n,c)}}(t,(function(t,e,n){t[s](i[a],r)&&o.push({element:t,datasetIndex:e,index:n}),t.inRange(i.x,i.y,r)&&(u=!0)})),n.intersect&&!u?[]:o}var Um={modes:{index:function(t,e,n,r){var i=zm(e,t),o=n.axis||"x",a=n.intersect?Fm(t,i,o,r):qm(t,i,o,!1,r),s=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((function(t){var e=a[0].index,n=t.data[e];n&&!n.skip&&s.push({element:n,datasetIndex:t.index,index:e})})),s):[]},dataset:function(t,e,n,r){var i=zm(e,t),o=n.axis||"xy",a=n.intersect?Fm(t,i,o,r):qm(t,i,o,!1,r);if(a.length>0){var s=a[0].datasetIndex,u=t.getDatasetMeta(s).data;a=[];for(var c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:s,index:c})}return a},point:function(t,e,n,r){return Fm(t,zm(e,t),n.axis||"xy",r)},nearest:function(t,e,n,r){return qm(t,zm(e,t),n.axis||"xy",n.intersect,r)},x:function(t,e,n,r){return n.axis="x",Vm(t,e,n,r)},y:function(t,e,n,r){return n.axis="y",Vm(t,e,n,r)}}},Hm=["left","top","right","bottom"];function Wm(t,e){return t.filter((function(t){return t.pos===e}))}function $m(t,e){return t.filter((function(t){return-1===Hm.indexOf(t.pos)&&t.box.axis===e}))}function Zm(t,e){return t.sort((function(t,n){var r=e?n:t,i=e?t:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function Ym(t,e){var n,r,i,o=function(t){var e,n={},r=$p(t);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=i.stack,a=i.pos,s=i.stackWeight;if(o&&Hm.includes(a)){var u=n[o]||(n[o]={count:0,placed:0,weight:0,size:0});u.count++,u.weight+=s}}}catch(Cw){r.e(Cw)}finally{r.f()}return n}(t),a=e.vBoxMaxWidth,s=e.hBoxMaxHeight;for(n=0,r=t.length;n<r;++n){var u=(i=t[n]).box.fullSize,c=o[i.stack],l=c&&i.stackWeight/c.weight;i.horizontal?(i.width=l?l*a:u&&e.availableWidth,i.height=s):(i.width=a,i.height=l?l*s:u&&e.availableHeight)}return o}function Gm(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function Km(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Jm(t,e,n,r){var i=n.pos,o=n.box,a=t.maxPadding;if(!Ih(i)){n.size&&(t[i]-=n.size);var s=r[n.stack]||{size:0,count:1};s.size=Math.max(s.size,n.horizontal?o.height:o.width),n.size=s.size/s.count,t[i]+=n.size}o.getPadding&&Km(a,o.getPadding());var u=Math.max(0,e.outerWidth-Gm(a,t,"left","right")),c=Math.max(0,e.outerHeight-Gm(a,t,"top","bottom")),l=u!==t.w,h=c!==t.h;return t.w=u,t.h=c,n.horizontal?{same:l,other:h}:{same:h,other:l}}function Xm(t,e){var n=e.maxPadding;function r(t){var r={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){r[t]=Math.max(e[t],n[t])})),r}return r(t?["left","right"]:["top","bottom"])}function Qm(t,e,n,r){var i,o,a,s,u,c,l=[];for(i=0,o=t.length,u=0;i<o;++i){(s=(a=t[i]).box).update(a.width||e.w,a.height||e.h,Xm(a.horizontal,e));var h=Jm(e,n,a,r),f=h.same,d=h.other;u|=f&&l.length,c=c||d,s.fullSize||l.push(a)}return u&&Qm(l,e,n,r)||c}function tv(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function ev(t,e,n,r){var i,o=n.padding,a=e.x,s=e.y,u=$p(t);try{for(u.s();!(i=u.n()).done;){var c=i.value,l=c.box,h=r[c.stack]||{count:1,placed:0,weight:1},f=c.stackWeight/h.weight||1;if(c.horizontal){var d=e.w*f,p=h.size||l.height;Jh(h.start)&&(s=h.start),l.fullSize?tv(l,o.left,s,n.outerWidth-o.right-o.left,p):tv(l,e.left+h.placed,s,d,p),h.start=s,h.placed+=d,s=l.bottom}else{var m=e.h*f,v=h.size||l.width;Jh(h.start)&&(a=h.start),l.fullSize?tv(l,a,o.top,v,n.outerHeight-o.bottom-o.top):tv(l,a,e.top+h.placed,v,m),h.start=a,h.placed+=m,a=l.right}}}catch(Cw){u.e(Cw)}finally{u.f()}e.x=a,e.y=s}hd.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var nv=function(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(t){e.draw(t)}}]},t.boxes.push(e)},rv=function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},iv=function(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},ov=function(t,e,n,r){if(t){var i=Ld(t.options.layout.padding),o=Math.max(e-i.width,0),a=Math.max(n-i.height,0),s=function(t){var e=function(t){var e,n,r,i,o,a,s=[];for(e=0,n=(t||[]).length;e<n;++e){var u=r=t[e];i=u.position;var c=u.options;o=c.stack;var l=c.stackWeight;a=void 0===l?1:l,s.push({index:e,box:r,pos:i,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&i+o,stackWeight:a})}return s}(t),n=Zm(e.filter((function(t){return t.box.fullSize})),!0),r=Zm(Wm(e,"left"),!0),i=Zm(Wm(e,"right")),o=Zm(Wm(e,"top"),!0),a=Zm(Wm(e,"bottom")),s=$m(e,"x"),u=$m(e,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(u).concat(a).concat(s),chartArea:Wm(e,"chartArea"),vertical:r.concat(i).concat(u),horizontal:o.concat(a).concat(s)}}(t.boxes),u=s.vertical,c=s.horizontal;Fh(t.boxes,(function(t){"function"===typeof t.beforeLayout&&t.beforeLayout()}));var l=u.reduce((function(t,e){return e.box.options&&!1===e.box.options.display?t:t+1}),0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/l,hBoxMaxHeight:a/2}),f=Object.assign({},i);Km(f,Ld(r));var d=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),p=Ym(u.concat(c),h);Qm(s.fullSize,d,h,p),Qm(u,d,h,p),Qm(c,d,h,p)&&Qm(u,d,h,p),function(t){var e=t.maxPadding;function n(n){var r=Math.max(e[n]-t[n],0);return t[n]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(d),ev(s.leftAndTop,d,h,p),d.x+=d.w,d.y+=d.h,ev(s.rightAndBottom,d,h,p),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},Fh(s.chartArea,(function(e){var n=e.box;Object.assign(n,t.chartArea),n.update(d.w,d.h)}))}},av=function(){function t(){Jp(this,t)}return Qp(t,[{key:"acquireContext",value:function(t,e){}},{key:"releaseContext",value:function(t){return!1}},{key:"addEventListener",value:function(t,e,n){}},{key:"removeEventListener",value:function(t,e,n){}},{key:"getDevicePixelRatio",value:function(){return 1}},{key:"getMaximumSize",value:function(t,e,n,r){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):n)}}},{key:"isAttached",value:function(t){return!0}}]),t}(),sv=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return Qp(n,[{key:"acquireContext",value:function(t){return t&&t.getContext&&t.getContext("2d")||null}}]),n}(av),uv={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},cv=function(t){return null===t||""===t};var lv=!!yp&&{passive:!0};function hv(t,e,n){t.canvas.removeEventListener(e,n,lv)}function fv(t,e,n){var r=t.canvas,i=r&&cp(r)||r,o=new MutationObserver((function(t){var e=cp(i);t.forEach((function(t){for(var r=0;r<t.addedNodes.length;r++){var o=t.addedNodes[r];o!==i&&o!==e||n(t.target)}}))}));return o.observe(document,{childList:!0,subtree:!0}),o}function dv(t,e,n){var r=t.canvas,i=r&&cp(r);if(i){var o=new MutationObserver((function(t){t.forEach((function(t){for(var e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===r){n();break}}))}));return o.observe(i,{childList:!0}),o}}var pv=new Map,mv=0;function vv(){var t=window.devicePixelRatio;t!==mv&&(mv=t,pv.forEach((function(e,n){n.currentDevicePixelRatio!==t&&e()})))}function gv(t,e,n){var r=t.canvas,i=r&&cp(r);if(i){var o=Mh((function(t,e){var r=i.clientWidth;n(t,e),r<i.clientWidth&&n()}),window),a=new ResizeObserver((function(t){var e=t[0],n=e.contentRect.width,r=e.contentRect.height;0===n&&0===r||o(n,r)}));return a.observe(i),function(t,e){pv.size||window.addEventListener("resize",vv),pv.set(t,e)}(t,o),a}}function yv(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){pv.delete(t),pv.size||window.removeEventListener("resize",vv)}(t)}function bv(t,e,n){var r=t.canvas,i=Mh((function(e){null!==t.ctx&&n(function(t,e){var n=uv[t.type]||t.type,r=pp(t,e),i=r.x,o=r.y;return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==o?o:null}}(e,t))}),t,(function(t){var e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,n){t.addEventListener(e,n,lv)}(r,e,i),i}var _v=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return Qp(n,[{key:"acquireContext",value:function(t,e){var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){var n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t.$chartjs={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",cv(i)){var o=bp(t,"width");void 0!==o&&(t.width=o)}if(cv(r))if(""===t.style.height)t.height=t.width/(e||2);else{var a=bp(t,"height");void 0!==a&&(t.height=a)}}(t,e),n):null}},{key:"releaseContext",value:function(t){var e=t.canvas;if(!e.$chartjs)return!1;var n=e.$chartjs.initial;["height","width"].forEach((function(t){var r=n[t];Lh(r)?e.removeAttribute(t):e.setAttribute(t,r)}));var r=n.style||{};return Object.keys(r).forEach((function(t){e.style[t]=r[t]})),e.width=e.width,delete e.$chartjs,!0}},{key:"addEventListener",value:function(t,e,n){this.removeEventListener(t,e);var r=t.$proxies||(t.$proxies={}),i={attach:fv,detach:dv,resize:gv}[e]||bv;r[e]=i(t,e,n)}},{key:"removeEventListener",value:function(t,e){var n=t.$proxies||(t.$proxies={}),r=n[e];r&&(({attach:yv,detach:yv,resize:yv}[e]||hv)(t,e,r),n[e]=void 0)}},{key:"getDevicePixelRatio",value:function(){return window.devicePixelRatio}},{key:"getMaximumSize",value:function(t,e,n,r){return vp(t,e,n,r)}},{key:"isAttached",value:function(t){var e=cp(t);return!(!e||!e.isConnected)}}]),n}(av);var wv=function(){function t(){Jp(this,t),this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}return Qp(t,[{key:"tooltipPosition",value:function(t){var e=this.getProps(["x","y"],t);return{x:e.x,y:e.y}}},{key:"hasValue",value:function(){return hf(this.x)&&hf(this.y)}},{key:"getProps",value:function(t,e){var n=this,r=this.$animations;if(!e||!r)return n;var i={};return t.forEach((function(t){i[t]=r[t]&&r[t].active()?r[t]._to:n[t]})),i}}]),t}();wv.defaults={},wv.defaultRoutes=void 0;var xv={values:function(t){return Dh(t)?t:""+t},numeric:function(t,e,n){if(0===t)return"0";var r,i=this.chart.options.locale,o=t;if(n.length>1){var a=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(a<1e-4||a>1e15)&&(r="scientific"),o=function(t,e){var n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t));return n}(t,n)}var s=uf(Math.abs(o)),u=Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:r,minimumFractionDigits:u,maximumFractionDigits:u};return Object.assign(c,this.options.ticks.format),Sp(t,i,c)},logarithmic:function(t,e,n){if(0===t)return"0";var r=t/Math.pow(10,Math.floor(uf(t)));return 1===r||2===r||5===r?xv.numeric.call(this,t,e,n):""}};var kv={formatters:xv};function Sv(t,e){var n=t.options.ticks,r=n.maxTicksLimit||function(t){var e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}(t),i=n.major.enabled?function(t){var e,n,r=[];for(e=0,n=t.length;e<n;e++)t[e].major&&r.push(e);return r}(e):[],o=i.length,a=i[0],s=i[o-1],u=[];if(o>r)return function(t,e,n,r){var i,o=0,a=n[0];for(r=Math.ceil(r),i=0;i<t.length;i++)i===a&&(e.push(t[i]),a=n[++o*r])}(e,u,i,o/r),u;var c=function(t,e,n){var r=function(t){var e,n,r=t.length;if(r<2)return!1;for(n=t[0],e=1;e<r;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),i=e.length/n;if(!r)return Math.max(i,1);for(var o=function(t){var e,n=[],r=Math.sqrt(t);for(e=1;e<r;e++)t%e===0&&(n.push(e),n.push(t/e));return r===(0|r)&&n.push(r),n.sort((function(t,e){return t-e})).pop(),n}(r),a=0,s=o.length-1;a<s;a++){var u=o[a];if(u>i)return u}return Math.max(i,1)}(i,e,r);if(o>0){var l,h,f=o>1?Math.round((s-a)/(o-1)):null;for(Cv(e,u,c,Lh(f)?0:a-f,a),l=0,h=o-1;l<h;l++)Cv(e,u,c,i[l],i[l+1]);return Cv(e,u,c,s,Lh(f)?e.length:s+f),u}return Cv(e,u,c),u}function Cv(t,e,n,r,i){var o,a,s,u=zh(r,0),c=Math.min(zh(i,t.length),t.length),l=0;for(n=Math.ceil(n),i&&(n=(o=i-r)/Math.floor(o/n)),s=u;s<0;)l++,s=Math.round(u+l*n);for(a=Math.max(u,0);a<c;a++)a===s&&(e.push(t[a]),l++,s=Math.round(u+l*n))}hd.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:function(t,e){return e.lineWidth},tickColor:function(t,e){return e.color},offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:kv.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),hd.route("scale.ticks","color","","color"),hd.route("scale.grid","color","","borderColor"),hd.route("scale.grid","borderColor","","borderColor"),hd.route("scale.title","color","","color"),hd.describe("scale",{_fallback:!1,_scriptable:function(t){return!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t},_indexable:function(t){return"borderDash"!==t&&"tickBorderDash"!==t}}),hd.describe("scales",{_fallback:"scale"}),hd.describe("scale.ticks",{_scriptable:function(t){return"backdropPadding"!==t&&"callback"!==t},_indexable:function(t){return"backdropPadding"!==t}});var Mv=function(t,e,n){return"top"===e||"left"===e?t[e]+n:t[e]-n};function Ev(t,e){for(var n=[],r=t.length/e,i=t.length,o=0;o<i;o+=r)n.push(t[Math.floor(o)]);return n}function Tv(t,e,n){var r,i=t.ticks.length,o=Math.min(e,i-1),a=t._startPixel,s=t._endPixel,u=1e-6,c=t.getPixelForTick(o);if(!(n&&(r=1===i?Math.max(c-a,s-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,(c+=o<e?r:-r)<a-u||c>s+u)))return c}function Av(t){return t.drawTicks?t.tickLength:0}function Ov(t,e){if(!t.display)return 0;var n=Dd(t.font,e),r=Ld(t.padding);return(Dh(t.text)?t.text.length:1)*n.lineHeight+r.height}function Pv(t,e,n){var r=Eh(t);return(n&&"right"!==e||!n&&"right"===e)&&(r=function(t){return"left"===t?"right":"right"===t?"left":t}(r)),r}var Lv=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this)).id=t.id,r.type=t.type,r.options=void 0,r.ctx=t.ctx,r.chart=t.chart,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.width=void 0,r.height=void 0,r._margins={left:0,right:0,top:0,bottom:0},r.maxWidth=void 0,r.maxHeight=void 0,r.paddingTop=void 0,r.paddingBottom=void 0,r.paddingLeft=void 0,r.paddingRight=void 0,r.axis=void 0,r.labelRotation=void 0,r.min=void 0,r.max=void 0,r._range=void 0,r.ticks=[],r._gridLineItems=null,r._labelItems=null,r._labelSizes=null,r._length=0,r._maxLength=0,r._longestTextCache={},r._startPixel=void 0,r._endPixel=void 0,r._reversePixels=!1,r._userMax=void 0,r._userMin=void 0,r._suggestedMax=void 0,r._suggestedMin=void 0,r._ticksLength=0,r._borderValue=0,r._cache={},r._dataLimitsCached=!1,r.$context=void 0,r}return Qp(n,[{key:"init",value:function(t){var e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}},{key:"parse",value:function(t,e){return t}},{key:"getUserBounds",value:function(){var t=this._userMin,e=this._userMax,n=this._suggestedMin,r=this._suggestedMax;return t=Nh(t,Number.POSITIVE_INFINITY),e=Nh(e,Number.NEGATIVE_INFINITY),n=Nh(n,Number.POSITIVE_INFINITY),r=Nh(r,Number.NEGATIVE_INFINITY),{min:Nh(t,n),max:Nh(e,r),minDefined:Rh(t),maxDefined:Rh(e)}}},{key:"getMinMax",value:function(t){var e,n=this,r=n.getUserBounds(),i=r.min,o=r.max,a=r.minDefined,s=r.maxDefined;if(a&&s)return{min:i,max:o};for(var u=n.getMatchingVisibleMetas(),c=0,l=u.length;c<l;++c)e=u[c].controller.getMinMax(n,t),a||(i=Math.min(i,e.min)),s||(o=Math.max(o,e.max));return{min:Nh(i,Nh(o,i)),max:Nh(o,Nh(i,o))}}},{key:"getPadding",value:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}}},{key:"getTicks",value:function(){return this.ticks}},{key:"getLabels",value:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}},{key:"beforeLayout",value:function(){this._cache={},this._dataLimitsCached=!1}},{key:"beforeUpdate",value:function(){Bh(this.options.beforeUpdate,[this])}},{key:"update",value:function(t,e,n){var r,i,o,a,s=this,u=s.options.ticks,c=u.sampleSize;s.beforeUpdate(),s.maxWidth=t,s.maxHeight=e,s._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),s.ticks=null,s._labelSizes=null,s._gridLineItems=null,s._labelItems=null,s.beforeSetDimensions(),s.setDimensions(),s.afterSetDimensions(),s._maxLength=s.isHorizontal()?s.width+n.left+n.right:s.height+n.top+n.bottom,s._dataLimitsCached||(s.beforeDataLimits(),s.determineDataLimits(),s.afterDataLimits(),s._range=(r=s,i=s.options.grace,o=r.min,a=r.max,{min:o-Math.abs(jh(i,o)),max:a+jh(i,a)}),s._dataLimitsCached=!0),s.beforeBuildTicks(),s.ticks=s.buildTicks()||[],s.afterBuildTicks();var l=c<s.ticks.length;s._convertTicksToLabels(l?Ev(s.ticks,c):s.ticks),s.configure(),s.beforeCalculateLabelRotation(),s.calculateLabelRotation(),s.afterCalculateLabelRotation(),u.display&&(u.autoSkip||"auto"===u.source)&&(s.ticks=Sv(s,s.ticks),s._labelSizes=null),l&&s._convertTicksToLabels(s.ticks),s.beforeFit(),s.fit(),s.afterFit(),s.afterUpdate()}},{key:"configure",value:function(){var t,e,n=this,r=n.options.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,r=!r),n._startPixel=t,n._endPixel=e,n._reversePixels=r,n._length=e-t,n._alignToPixels=n.options.alignToPixels}},{key:"afterUpdate",value:function(){Bh(this.options.afterUpdate,[this])}},{key:"beforeSetDimensions",value:function(){Bh(this.options.beforeSetDimensions,[this])}},{key:"setDimensions",value:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}},{key:"afterSetDimensions",value:function(){Bh(this.options.afterSetDimensions,[this])}},{key:"_callHooks",value:function(t){var e=this;e.chart.notifyPlugins(t,e.getContext()),Bh(e.options[t],[e])}},{key:"beforeDataLimits",value:function(){this._callHooks("beforeDataLimits")}},{key:"determineDataLimits",value:function(){}},{key:"afterDataLimits",value:function(){this._callHooks("afterDataLimits")}},{key:"beforeBuildTicks",value:function(){this._callHooks("beforeBuildTicks")}},{key:"buildTicks",value:function(){return[]}},{key:"afterBuildTicks",value:function(){this._callHooks("afterBuildTicks")}},{key:"beforeTickToLabelConversion",value:function(){Bh(this.options.beforeTickToLabelConversion,[this])}},{key:"generateTickLabels",value:function(t){var e,n,r,i=this.options.ticks;for(e=0,n=t.length;e<n;e++)(r=t[e]).label=Bh(i.callback,[r.value,e,t],this)}},{key:"afterTickToLabelConversion",value:function(){Bh(this.options.afterTickToLabelConversion,[this])}},{key:"beforeCalculateLabelRotation",value:function(){Bh(this.options.beforeCalculateLabelRotation,[this])}},{key:"calculateLabelRotation",value:function(){var t,e,n,r=this,i=r.options,o=i.ticks,a=r.ticks.length,s=o.minRotation||0,u=o.maxRotation,c=s;if(!r._isVisible()||!o.display||s>=u||a<=1||!r.isHorizontal())r.labelRotation=s;else{var l=r._getLabelSizes(),h=l.widest.width,f=l.highest.height,d=wf(r.chart.width-h,0,r.maxWidth);h+6>(t=i.offset?r.maxWidth/a:d/(a-1))&&(t=d/(a-(i.offset?.5:1)),e=r.maxHeight-Av(i.grid)-o.padding-Ov(i.title,r.chart.options.font),n=Math.sqrt(h*h+f*f),c=mf(Math.min(Math.asin(wf((l.highest.height+6)/t,-1,1)),Math.asin(wf(e/n,-1,1))-Math.asin(wf(f/n,-1,1)))),c=Math.max(s,Math.min(u,c))),r.labelRotation=c}}},{key:"afterCalculateLabelRotation",value:function(){Bh(this.options.afterCalculateLabelRotation,[this])}},{key:"beforeFit",value:function(){Bh(this.options.beforeFit,[this])}},{key:"fit",value:function(){var t=this,e={width:0,height:0},n=t.chart,r=t.options,i=r.ticks,o=r.title,a=r.grid,s=t._isVisible(),u=t.isHorizontal();if(s){var c=Ov(o,n.options.font);if(u?(e.width=t.maxWidth,e.height=Av(a)+c):(e.height=t.maxHeight,e.width=Av(a)+c),i.display&&t.ticks.length){var l=t._getLabelSizes(),h=l.first,f=l.last,d=l.widest,p=l.highest,m=2*i.padding,v=pf(t.labelRotation),g=Math.cos(v),y=Math.sin(v);if(u){var b=i.mirror?0:y*d.width+g*p.height;e.height=Math.min(t.maxHeight,e.height+b+m)}else{var _=i.mirror?0:g*d.width+y*p.height;e.width=Math.min(t.maxWidth,e.width+_+m)}t._calculatePadding(h,f,y,g)}}t._handleMargins(),u?(t.width=t._length=n.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t._margins.top-t._margins.bottom)}},{key:"_calculatePadding",value:function(t,e,n,r){var i=this,o=i.options,a=o.ticks,s=a.align,u=a.padding,c=o.position,l=0!==i.labelRotation,h="top"!==c&&"x"===i.axis;if(i.isHorizontal()){var f=i.getPixelForTick(0)-i.left,d=i.right-i.getPixelForTick(i.ticks.length-1),p=0,m=0;l?h?(p=r*t.width,m=n*e.height):(p=n*t.height,m=r*e.width):"start"===s?m=e.width:"end"===s?p=t.width:(p=t.width/2,m=e.width/2),i.paddingLeft=Math.max((p-f+u)*i.width/(i.width-f),0),i.paddingRight=Math.max((m-d+u)*i.width/(i.width-d),0)}else{var v=e.height/2,g=t.height/2;"start"===s?(v=0,g=t.height):"end"===s&&(v=e.height,g=0),i.paddingTop=v+u,i.paddingBottom=g+u}}},{key:"_handleMargins",value:function(){var t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}},{key:"afterFit",value:function(){Bh(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var t=this.options,e=t.axis,n=t.position;return"top"===n||"bottom"===n||"x"===e}},{key:"isFullSize",value:function(){return this.options.fullSize}},{key:"_convertTicksToLabels",value:function(t){var e,n,r=this;for(r.beforeTickToLabelConversion(),r.generateTickLabels(t),e=0,n=t.length;e<n;e++)Lh(t[e].label)&&(t.splice(e,1),n--,e--);r.afterTickToLabelConversion()}},{key:"_getLabelSizes",value:function(){var t=this,e=t._labelSizes;if(!e){var n=t.options.ticks.sampleSize,r=t.ticks;n<r.length&&(r=Ev(r,n)),t._labelSizes=e=t._computeLabelSizes(r,r.length)}return e}},{key:"_computeLabelSizes",value:function(t,e){var n,r,i,o,a,s,u,c,l,h,f,d=this.ctx,p=this._longestTextCache,m=[],v=[],g=0,y=0;for(n=0;n<e;++n){if(o=t[n].label,a=this._resolveTickFontOptions(n),d.font=s=a.string,u=p[s]=p[s]||{data:{},gc:[]},c=a.lineHeight,l=h=0,Lh(o)||Dh(o)){if(Dh(o))for(r=0,i=o.length;r<i;++r)Lh(f=o[r])||Dh(f)||(l=fd(d,u.data,u.gc,l,f),h+=c)}else l=fd(d,u.data,u.gc,l,o),h=c;m.push(l),v.push(h),g=Math.max(l,g),y=Math.max(h,y)}!function(t,e){Fh(t,(function(t){var n,r=t.gc,i=r.length/2;if(i>e){for(n=0;n<i;++n)delete t.data[r[n]];r.splice(0,i)}}))}(p,e);var b=m.indexOf(g),_=v.indexOf(y),w=function(t){return{width:m[t]||0,height:v[t]||0}};return{first:w(0),last:w(e-1),widest:w(b),highest:w(_),widths:m,heights:v}}},{key:"getLabelForValue",value:function(t){return t}},{key:"getPixelForValue",value:function(t,e){return NaN}},{key:"getValueForPixel",value:function(t){}},{key:"getPixelForTick",value:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getPixelForDecimal",value:function(t){var e=this;e._reversePixels&&(t=1-t);var n=e._startPixel+t*e._length;return wf(e._alignToPixels?pd(e.chart,n,0):n,-32768,32767)}},{key:"getDecimalForPixel",value:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var t=this.min,e=this.max;return t<0&&e<0?e:t>0&&e>0?t:0}},{key:"getContext",value:function(t){var e,n,r=this,i=r.ticks||[];if(t>=0&&t<i.length){var o=i[t];return o.$context||(o.$context=function(t,e,n){return Object.assign(Object.create(t),{tick:n,index:e,type:"tick"})}(r.getContext(),t,o))}return r.$context||(r.$context=(e=r.chart.getContext(),n=r,Object.assign(Object.create(e),{scale:n,type:"scale"})))}},{key:"_tickSize",value:function(){var t=this,e=t.options.ticks,n=pf(t.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=t._getLabelSizes(),a=e.autoSkipPadding||0,s=o?o.widest.width+a:0,u=o?o.highest.height+a:0;return t.isHorizontal()?u*r>s*i?s/r:u/i:u*i<s*r?u/r:s/i}},{key:"_isVisible",value:function(){var t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}},{key:"_computeGridLineItems",value:function(t){var e,n,r,i,o,a,s,u,c,l,h,f,d=this,p=d.axis,m=d.chart,v=d.options,g=v.grid,y=v.position,b=g.offset,_=d.isHorizontal(),w=d.ticks.length+(b?1:0),x=Av(g),k=[],S=g.setContext(d.getContext()),C=S.drawBorder?S.borderWidth:0,M=C/2,E=function(t){return pd(m,t,C)};if("top"===y)e=E(d.bottom),a=d.bottom-x,u=e-M,l=E(t.top)+M,f=t.bottom;else if("bottom"===y)e=E(d.top),l=t.top,f=E(t.bottom)-M,a=e+M,u=d.top+x;else if("left"===y)e=E(d.right),o=d.right-x,s=e-M,c=E(t.left)+M,h=t.right;else if("right"===y)e=E(d.left),c=t.left,h=E(t.right)-M,o=e+M,s=d.left+x;else if("x"===p){if("center"===y)e=E((t.top+t.bottom)/2+.5);else if(Ih(y)){var T=Object.keys(y)[0],A=y[T];e=E(d.chart.scales[T].getPixelForValue(A))}l=t.top,f=t.bottom,u=(a=e+M)+x}else if("y"===p){if("center"===y)e=E((t.left+t.right)/2);else if(Ih(y)){var O=Object.keys(y)[0],P=y[O];e=E(d.chart.scales[O].getPixelForValue(P))}s=(o=e-M)-x,c=t.left,h=t.right}var L=zh(v.ticks.maxTicksLimit,w),D=Math.max(1,Math.ceil(w/L));for(n=0;n<w;n+=D){var I=g.setContext(d.getContext(n)),R=I.lineWidth,N=I.color,z=g.borderDash||[],j=I.borderDashOffset,B=I.tickWidth,F=I.tickColor,q=I.tickBorderDash||[],V=I.tickBorderDashOffset;void 0!==(r=Tv(d,n,b))&&(i=pd(m,r,R),_?o=s=c=h=i:a=u=l=f=i,k.push({tx1:o,ty1:a,tx2:s,ty2:u,x1:c,y1:l,x2:h,y2:f,width:R,color:N,borderDash:z,borderDashOffset:j,tickWidth:B,tickColor:F,tickBorderDash:q,tickBorderDashOffset:V}))}return d._ticksLength=w,d._borderValue=e,k}},{key:"_computeLabelItems",value:function(t){var e,n,r,i,o,a,s,u,c,l,h,f=this,d=f.axis,p=f.options,m=p.position,v=p.ticks,g=f.isHorizontal(),y=f.ticks,b=v.align,_=v.crossAlign,w=v.padding,x=v.mirror,k=Av(p.grid),S=k+w,C=x?-w:S,M=-pf(f.labelRotation),E=[],T="middle";if("top"===m)o=f.bottom-C,a=f._getXAxisLabelAlignment();else if("bottom"===m)o=f.top+C,a=f._getXAxisLabelAlignment();else if("left"===m){var A=f._getYAxisLabelAlignment(k);a=A.textAlign,i=A.x}else if("right"===m){var O=f._getYAxisLabelAlignment(k);a=O.textAlign,i=O.x}else if("x"===d){if("center"===m)o=(t.top+t.bottom)/2+S;else if(Ih(m)){var P=Object.keys(m)[0],L=m[P];o=f.chart.scales[P].getPixelForValue(L)+S}a=f._getXAxisLabelAlignment()}else if("y"===d){if("center"===m)i=(t.left+t.right)/2-S;else if(Ih(m)){var D=Object.keys(m)[0],I=m[D];i=f.chart.scales[D].getPixelForValue(I)}a=f._getYAxisLabelAlignment(k).textAlign}"y"===d&&("start"===b?T="top":"end"===b&&(T="bottom"));var R=f._getLabelSizes();for(e=0,n=y.length;e<n;++e){r=y[e].label;var N=v.setContext(f.getContext(e));s=f.getPixelForTick(e)+v.labelOffset,c=(u=f._resolveTickFontOptions(e)).lineHeight;var z=(l=Dh(r)?r.length:1)/2,j=N.color,B=N.textStrokeColor,F=N.textStrokeWidth;g?(i=s,h="top"===m?"near"===_||0!==M?-l*c+c/2:"center"===_?-R.highest.height/2-z*c+c:-R.highest.height+c/2:"near"===_||0!==M?c/2:"center"===_?R.highest.height/2-z*c:R.highest.height-l*c,x&&(h*=-1)):(o=s,h=(1-l)*c/2);var q=void 0;if(N.showLabelBackdrop){var V=Ld(N.backdropPadding),U=R.heights[e],H=R.widths[e],W=o+h-V.top,$=i-V.left;switch(T){case"middle":W-=U/2;break;case"bottom":W-=U}switch(a){case"center":$-=H/2;break;case"right":$-=H}q={left:$,top:W,width:H+V.width,height:U+V.height,color:N.backdropColor}}E.push({rotation:M,label:r,font:u,color:j,strokeColor:B,strokeWidth:F,textOffset:h,textAlign:a,textBaseline:T,translation:[i,o],backdrop:q})}return E}},{key:"_getXAxisLabelAlignment",value:function(){var t=this.options,e=t.position,n=t.ticks;if(-pf(this.labelRotation))return"top"===e?"left":"right";var r="center";return"start"===n.align?r="left":"end"===n.align&&(r="right"),r}},{key:"_getYAxisLabelAlignment",value:function(t){var e,n,r=this,i=r.options,o=i.position,a=i.ticks,s=a.crossAlign,u=a.mirror,c=a.padding,l=t+c,h=r._getLabelSizes().widest.width;return"left"===o?u?(n=r.right+c,"near"===s?e="left":"center"===s?(e="center",n+=h/2):(e="right",n+=h)):(n=r.right-l,"near"===s?e="right":"center"===s?(e="center",n-=h/2):(e="left",n=r.left)):"right"===o?u?(n=r.left+c,"near"===s?e="right":"center"===s?(e="center",n-=h/2):(e="left",n-=h)):(n=r.left+l,"near"===s?e="left":"center"===s?(e="center",n+=h/2):(e="right",n=r.right)):e="right",{textAlign:e,x:n}}},{key:"_computeLabelArea",value:function(){var t=this;if(!t.options.ticks.mirror){var e=t.chart,n=t.options.position;return"left"===n||"right"===n?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===n||"bottom"===n?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}}},{key:"drawBackground",value:function(){var t=this.ctx,e=this.options.backgroundColor,n=this.left,r=this.top,i=this.width,o=this.height;e&&(t.save(),t.fillStyle=e,t.fillRect(n,r,i,o),t.restore())}},{key:"getLineWidthForValue",value:function(t){var e=this,n=e.options.grid;if(!e._isVisible()||!n.display)return 0;var r=e.ticks.findIndex((function(e){return e.value===t}));return r>=0?n.setContext(e.getContext(r)).lineWidth:0}},{key:"drawGrid",value:function(t){var e,n,r=this,i=r.options.grid,o=r.ctx,a=r._gridLineItems||(r._gridLineItems=r._computeGridLineItems(t)),s=function(t,e,n){n.width&&n.color&&(o.save(),o.lineWidth=n.width,o.strokeStyle=n.color,o.setLineDash(n.borderDash||[]),o.lineDashOffset=n.borderDashOffset,o.beginPath(),o.moveTo(t.x,t.y),o.lineTo(e.x,e.y),o.stroke(),o.restore())};if(i.display)for(e=0,n=a.length;e<n;++e){var u=a[e];i.drawOnChartArea&&s({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),i.drawTicks&&s({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}},{key:"drawBorder",value:function(){var t=this,e=t.chart,n=t.ctx,r=t.options.grid,i=r.setContext(t.getContext()),o=r.drawBorder?i.borderWidth:0;if(o){var a,s,u,c,l=r.setContext(t.getContext(0)).lineWidth,h=t._borderValue;t.isHorizontal()?(a=pd(e,t.left,o)-o/2,s=pd(e,t.right,l)+l/2,u=c=h):(u=pd(e,t.top,o)-o/2,c=pd(e,t.bottom,l)+l/2,a=s=h),n.save(),n.lineWidth=i.borderWidth,n.strokeStyle=i.borderColor,n.beginPath(),n.moveTo(a,u),n.lineTo(s,c),n.stroke(),n.restore()}}},{key:"drawLabels",value:function(t){var e=this;if(e.options.ticks.display){var n=e.ctx,r=e._computeLabelArea();r&&yd(n,r);var i,o,a=e._labelItems||(e._labelItems=e._computeLabelItems(t));for(i=0,o=a.length;i<o;++i){var s=a[i],u=s.font,c=s.label;s.backdrop&&(n.fillStyle=s.backdrop.color,n.fillRect(s.backdrop.left,s.backdrop.top,s.backdrop.width,s.backdrop.height)),xd(n,c,0,s.textOffset,u,s)}r&&bd(n)}}},{key:"drawTitle",value:function(){var t=this.ctx,e=this.options,n=e.position,r=e.title,i=e.reverse;if(r.display){var o=Dd(r.font),a=Ld(r.padding),s=r.align,u=o.lineHeight/2;"bottom"===n||"center"===n||Ih(n)?(u+=a.bottom,Dh(r.text)&&(u+=o.lineHeight*(r.text.length-1))):u+=a.top;var c=function(t,e,n,r){var i,o,a,s=t.top,u=t.left,c=t.bottom,l=t.right,h=t.chart,f=h.chartArea,d=h.scales,p=0,m=c-s,v=l-u;if(t.isHorizontal()){if(o=Th(r,u,l),Ih(n)){var g=Object.keys(n)[0],y=n[g];a=d[g].getPixelForValue(y)+m-e}else a="center"===n?(f.bottom+f.top)/2+m-e:Mv(t,n,e);i=l-u}else{if(Ih(n)){var b=Object.keys(n)[0],_=n[b];o=d[b].getPixelForValue(_)-v+e}else o="center"===n?(f.left+f.right)/2-v+e:Mv(t,n,e);a=Th(r,c,s),p="left"===n?-of:of}return{titleX:o,titleY:a,maxWidth:i,rotation:p}}(this,u,n,s),l=c.titleX,h=c.titleY,f=c.maxWidth,d=c.rotation;xd(t,r.text,0,0,o,{color:r.color,maxWidth:f,rotation:d,textAlign:Pv(s,n,i),textBaseline:"middle",translation:[l,h]})}}},{key:"draw",value:function(t){var e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}},{key:"_layers",value:function(){var t=this,e=t.options,r=e.ticks&&e.ticks.z||0,i=zh(e.grid&&e.grid.z,-1);return t._isVisible()&&t.draw===n.prototype.draw?[{z:i,draw:function(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:i+1,draw:function(){t.drawBorder()}},{z:r,draw:function(e){t.drawLabels(e)}}]:[{z:r,draw:function(e){t.draw(e)}}]}},{key:"getMatchingVisibleMetas",value:function(t){var e,n,r=this,i=r.chart.getSortedVisibleDatasetMetas(),o=r.axis+"AxisID",a=[];for(e=0,n=i.length;e<n;++e){var s=i[e];s[o]!==r.id||t&&s.type!==t||a.push(s)}return a}},{key:"_resolveTickFontOptions",value:function(t){return Dd(this.options.ticks.setContext(this.getContext(t)).font)}},{key:"_maxDigits",value:function(){var t=this,e=t._resolveTickFontOptions(0).lineHeight;return(t.isHorizontal()?t.width:t.height)/e}}]),n}(wv),Dv=function(){function t(e,n,r){Jp(this,t),this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}return Qp(t,[{key:"isForType",value:function(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}},{key:"register",value:function(t){var e,n=this,r=Object.getPrototypeOf(t);(function(t){return"id"in t&&"defaults"in t})(r)&&(e=n.register(r));var i=n.items,o=t.id,a=n.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,function(t,e,n){var r=Wh(Object.create(null),[n?hd.get(n):{},hd.get(e),t.defaults]);hd.set(e,r),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((function(n){var r=n.split("."),i=r.pop(),o=[t].concat(r).join("."),a=e[n].split("."),s=a.pop(),u=a.join(".");hd.route(o,i,u,s)}))}(e,t.defaultRoutes);t.descriptors&&hd.describe(e,t.descriptors)}(t,a,e),n.override&&hd.override(t.id,t.overrides)),a}},{key:"get",value:function(t){return this.items[t]}},{key:"unregister",value:function(t){var e=this.items,n=t.id,r=this.scope;n in e&&delete e[n],r&&n in hd[r]&&(delete hd[r][n],this.override&&delete sd[n])}}]),t}();var Iv=new(function(){function t(){Jp(this,t),this.controllers=new Dv(gm,"datasets",!0),this.elements=new Dv(wv,"elements"),this.plugins=new Dv(Object,"plugins"),this.scales=new Dv(Lv,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}return Qp(t,[{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e)}},{key:"remove",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e)}},{key:"addControllers",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e,this.controllers)}},{key:"addElements",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e,this.elements)}},{key:"addPlugins",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e,this.plugins)}},{key:"addScales",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e,this.scales)}},{key:"getController",value:function(t){return this._get(t,this.controllers,"controller")}},{key:"getElement",value:function(t){return this._get(t,this.elements,"element")}},{key:"getPlugin",value:function(t){return this._get(t,this.plugins,"plugin")}},{key:"getScale",value:function(t){return this._get(t,this.scales,"scale")}},{key:"removeControllers",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e,this.controllers)}},{key:"removeElements",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e,this.elements)}},{key:"removePlugins",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e,this.plugins)}},{key:"removeScales",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e,this.scales)}},{key:"_each",value:function(t,e,n){var r=this;Yp(e).forEach((function(e){var i=n||r._getRegistryForType(e);n||i.isForType(e)||i===r.plugins&&e.id?r._exec(t,i,e):Fh(e,(function(e){var i=n||r._getRegistryForType(e);r._exec(t,i,e)}))}))}},{key:"_exec",value:function(t,e,n){var r=Kh(t);Bh(n["before"+r],[],n),e[t](n),Bh(n["after"+r],[],n)}},{key:"_getRegistryForType",value:function(t){for(var e=0;e<this._typedRegistries.length;e++){var n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}},{key:"_get",value:function(t,e,n){var r=e.get(t);if(void 0===r)throw new Error('"'+t+'" is not a registered '+n+".");return r}}]),t}()),Rv=function(){function t(){Jp(this,t),this._init=[]}return Qp(t,[{key:"notify",value:function(t,e,n,r){var i=this;"beforeInit"===e&&(i._init=i._createDescriptors(t,!0),i._notify(i._init,t,"install"));var o=r?i._descriptors(t).filter(r):i._descriptors(t),a=i._notify(o,t,e,n);return"destroy"===e&&(i._notify(o,t,"stop"),i._notify(i._init,t,"uninstall")),a}},{key:"_notify",value:function(t,e,n,r){r=r||{};var i,o=$p(t);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=a.plugin;if(!1===Bh(s[n],[e,r,a.options],s)&&r.cancelable)return!1}}catch(Cw){o.e(Cw)}finally{o.f()}return!0}},{key:"invalidate",value:function(){Lh(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}},{key:"_descriptors",value:function(t){if(this._cache)return this._cache;var e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}},{key:"_createDescriptors",value:function(t,e){var n=t&&t.config,r=zh(n.options&&n.options.plugins,{}),i=function(t){for(var e=[],n=Object.keys(Iv.plugins.items),r=0;r<n.length;r++)e.push(Iv.getPlugin(n[r]));for(var i=t.plugins||[],o=0;o<i.length;o++){var a=i[o];-1===e.indexOf(a)&&e.push(a)}return e}(n);return!1!==r||e?function(t,e,n,r){for(var i=[],o=t.getContext(),a=0;a<e.length;a++){var s=e[a],u=Nv(n[s.id],r);null!==u&&i.push({plugin:s,options:zv(t.config,s,u,o)})}return i}(t,i,r,e):[]}},{key:"_notifyStateChanges",value:function(t){var e=this._oldCache||[],n=this._cache,r=function(t,e){return t.filter((function(t){return!e.some((function(e){return t.plugin.id===e.plugin.id}))}))};this._notify(r(e,n),t,"stop"),this._notify(r(n,e),t,"start")}}]),t}();function Nv(t,e){return e||!1!==t?!0===t?{}:t:null}function zv(t,e,n,r){var i=t.pluginScopeKeys(e),o=t.getOptionScopes(n,i);return t.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function jv(t,e){var n=hd.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Bv(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(n=e.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.charAt(0).toLowerCase();var n}function Fv(t){var e=t.options||(t.options={});e.plugins=zh(e.plugins,{}),e.scales=function(t,e){var n=sd[t.type]||{scales:{}},r=e.scales||{},i=jv(t.type,e),o=Object.create(null),a=Object.create(null);return Object.keys(r).forEach((function(t){var e=r[t],s=Bv(t,e),u=function(t,e){return t===e?"_index_":"_value_"}(s,i),c=n.scales||{};o[s]=o[s]||t,a[t]=$h(Object.create(null),[{axis:s},e,c[s],c[u]])})),t.data.datasets.forEach((function(n){var i=n.type||t.type,s=n.indexAxis||jv(i,e),u=(sd[i]||{}).scales||{};Object.keys(u).forEach((function(t){var e=function(t,e){var n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,s),i=n[e+"AxisID"]||o[e]||e;a[i]=a[i]||Object.create(null),$h(a[i],[{axis:e},r[i],u[t]])}))})),Object.keys(a).forEach((function(t){var e=a[t];$h(e,[hd.scales[e.type],hd.scale])})),a}(t,e)}function qv(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}var Vv=new Map,Uv=new Set;function Hv(t,e){var n=Vv.get(t);return n||(n=e(),Vv.set(t,n),Uv.add(n)),n}var Wv=function(t,e,n){var r=Gh(e,n);void 0!==r&&t.add(r)},$v=function(){function t(e){Jp(this,t),this._config=function(t){return(t=t||{}).data=qv(t.data),Fv(t),t}(e),this._scopeCache=new Map,this._resolverCache=new Map}return Qp(t,[{key:"platform",get:function(){return this._config.platform}},{key:"type",get:function(){return this._config.type},set:function(t){this._config.type=t}},{key:"data",get:function(){return this._config.data},set:function(t){this._config.data=qv(t)}},{key:"options",get:function(){return this._config.options},set:function(t){this._config.options=t}},{key:"plugins",get:function(){return this._config.plugins}},{key:"update",value:function(){var t=this._config;this.clearCache(),Fv(t)}},{key:"clearCache",value:function(){this._scopeCache.clear(),this._resolverCache.clear()}},{key:"datasetScopeKeys",value:function(t){return Hv(t,(function(){return[["datasets.".concat(t),""]]}))}},{key:"datasetAnimationScopeKeys",value:function(t,e){return Hv("".concat(t,".transition.").concat(e),(function(){return[["datasets.".concat(t,".transitions.").concat(e),"transitions.".concat(e)],["datasets.".concat(t),""]]}))}},{key:"datasetElementScopeKeys",value:function(t,e){return Hv("".concat(t,"-").concat(e),(function(){return[["datasets.".concat(t,".elements.").concat(e),"datasets.".concat(t),"elements.".concat(e),""]]}))}},{key:"pluginScopeKeys",value:function(t){var e=t.id,n=this.type;return Hv("".concat(n,"-plugin-").concat(e),(function(){return[["plugins.".concat(e)].concat(Yp(t.additionalOptionScopes||[]))]}))}},{key:"_cachedScopes",value:function(t,e){var n=this._scopeCache,r=n.get(t);return r&&!e||(r=new Map,n.set(t,r)),r}},{key:"getOptionScopes",value:function(t,e,n){var r=this.options,i=this.type,o=this._cachedScopes(t,n),a=o.get(e);if(a)return a;var s=new Set;e.forEach((function(e){t&&(s.add(t),e.forEach((function(e){return Wv(s,t,e)}))),e.forEach((function(t){return Wv(s,r,t)})),e.forEach((function(t){return Wv(s,sd[i]||{},t)})),e.forEach((function(t){return Wv(s,hd,t)})),e.forEach((function(t){return Wv(s,ud,t)}))}));var u=Array.from(s);return 0===u.length&&u.push(Object.create(null)),Uv.has(e)&&o.set(e,u),u}},{key:"chartOptionScopes",value:function(){var t=this.options,e=this.type;return[t,sd[e]||{},hd.datasets[e]||{},{type:e},hd,ud]}},{key:"resolveNamedOptions",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""],i={$shared:!0},o=Zv(this._resolverCache,t,r),a=o.resolver,s=o.subPrefixes,u=a;if(Yv(a,e)){i.$shared=!1,n=Xh(n)?n():n;var c=this.createResolver(t,n,s);u=Vd(a,n,c)}var l,h=$p(e);try{for(h.s();!(l=h.n()).done;){var f=l.value;i[f]=u[f]}}catch(Cw){h.e(Cw)}finally{h.f()}return i}},{key:"createResolver",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0,i=Zv(this._resolverCache,t,n),o=i.resolver;return Ih(e)?Vd(o,e,void 0,r):o}}]),t}();function Zv(t,e,n){var r=t.get(e);r||(r=new Map,t.set(e,r));var i=n.join(),o=r.get(i);o||(o={resolver:qd(e,n),subPrefixes:n.filter((function(t){return!t.toLowerCase().includes("hover")}))},r.set(i,o));return o}function Yv(t,e){var n,r=Ud(t),i=r.isScriptable,o=r.isIndexable,a=$p(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(i(s)&&Xh(t[s])||o(s)&&Dh(t[s]))return!0}}catch(Cw){a.e(Cw)}finally{a.f()}return!1}var Gv=["top","bottom","left","right","chartArea"];function Kv(t,e){return"top"===t||"bottom"===t||-1===Gv.indexOf(t)&&"x"===e}function Jv(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function Xv(t){var e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Bh(n&&n.onComplete,[t],e)}function Qv(t){var e=t.chart,n=e.options.animation;Bh(n&&n.onProgress,[t],e)}function tg(t){return up()&&"string"===typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var eg={},ng=function(t){var e=tg(t);return Object.values(eg).filter((function(t){return t.canvas===e})).pop()},rg=function(){function t(e,n){var r=this;Jp(this,t);var i=this,o=this.config=new $v(n),a=tg(e),s=ng(a);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");var u=o.createResolver(o.chartOptionScopes(),i.getContext());this.platform=new(o.platform||function(t){return!up()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?sv:_v}(a));var c,l,h,f=i.platform.acquireContext(a,u.aspectRatio),d=f&&f.canvas,p=d&&d.height,m=d&&d.width;this.id=Ph(),this.ctx=f,this.canvas=d,this.width=m,this.height=p,this._options=u,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Rv,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(c=function(){return r.update("resize")},l=u.resizeDelay||0,function(){return l?(clearTimeout(h),h=setTimeout(c,l)):c(),l}),eg[i.id]=i,f&&d?(tm.listen(i,"complete",Xv),tm.listen(i,"progress",Qv),i._initialize(),i.attached&&i.update()):console.error("Failed to create chart: can't acquire context from the given item")}return Qp(t,[{key:"aspectRatio",get:function(){var t=this.options,e=t.aspectRatio,n=t.maintainAspectRatio,r=this.width,i=this.height,o=this._aspectRatio;return Lh(e)?n&&o?o:i?r/i:null:e}},{key:"data",get:function(){return this.config.data},set:function(t){this.config.data=t}},{key:"options",get:function(){return this._options},set:function(t){this.config.options=t}},{key:"_initialize",value:function(){var t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():gp(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}},{key:"clear",value:function(){return md(this.canvas,this.ctx),this}},{key:"stop",value:function(){return tm.stop(this),this}},{key:"resize",value:function(t,e){tm.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}},{key:"_resize",value:function(t,e){var n=this,r=n.options,i=n.canvas,o=r.maintainAspectRatio&&n.aspectRatio,a=n.platform.getMaximumSize(i,t,e,o),s=r.devicePixelRatio||n.platform.getDevicePixelRatio();n.width=a.width,n.height=a.height,n._aspectRatio=n.aspectRatio,gp(n,s,!0)&&(n.notifyPlugins("resize",{size:a}),Bh(r.onResize,[n,a],n),n.attached&&n._doResize()&&n.render())}},{key:"ensureScalesHaveIDs",value:function(){Fh(this.options.scales||{},(function(t,e){t.id=e}))}},{key:"buildOrUpdateScales",value:function(){var t=this,e=t.options,n=e.scales,r=t.scales,i=Object.keys(r).reduce((function(t,e){return t[e]=!1,t}),{}),o=[];n&&(o=o.concat(Object.keys(n).map((function(t){var e=n[t],r=Bv(t,e),i="r"===r,o="x"===r;return{options:e,dposition:i?"chartArea":o?"bottom":"left",dtype:i?"radialLinear":o?"category":"linear"}})))),Fh(o,(function(n){var o=n.options,a=o.id,s=Bv(a,o),u=zh(o.type,n.dtype);void 0!==o.position&&Kv(o.position,s)===Kv(n.dposition)||(o.position=n.dposition),i[a]=!0;var c=null;a in r&&r[a].type===u?c=r[a]:(c=new(Iv.getScale(u))({id:a,type:u,ctx:t.ctx,chart:t}),r[c.id]=c);c.init(o,e)})),Fh(i,(function(t,e){t||delete r[e]})),Fh(r,(function(e){iv(t,e,e.options),nv(t,e)}))}},{key:"_updateMetasets",value:function(){var t=this,e=t._metasets,n=t.data.datasets.length,r=e.length;if(e.sort((function(t,e){return t.index-e.index})),r>n){for(var i=n;i<r;++i)t._destroyDatasetMeta(i);e.splice(n,r-n)}t._sortedMetasets=e.slice(0).sort(Jv("order","index"))}},{key:"_removeUnreferencedMetasets",value:function(){var t=this,e=t._metasets,n=t.data.datasets;e.length>n.length&&delete t._stacks,e.forEach((function(e,r){0===n.filter((function(t){return t===e._dataset})).length&&t._destroyDatasetMeta(r)}))}},{key:"buildOrUpdateControllers",value:function(){var t,e,n=this,r=[],i=n.data.datasets;for(n._removeUnreferencedMetasets(),t=0,e=i.length;t<e;t++){var o=i[t],a=n.getDatasetMeta(t),s=o.type||n.config.type;if(a.type&&a.type!==s&&(n._destroyDatasetMeta(t),a=n.getDatasetMeta(t)),a.type=s,a.indexAxis=o.indexAxis||jv(s,n.options),a.order=o.order||0,a.index=t,a.label=""+o.label,a.visible=n.isDatasetVisible(t),a.controller)a.controller.updateIndex(t),a.controller.linkScales();else{var u=Iv.getController(s),c=hd.datasets[s],l=c.datasetElementType,h=c.dataElementType;Object.assign(u.prototype,{dataElementType:Iv.getElement(h),datasetElementType:l&&Iv.getElement(l)}),a.controller=new u(n,t),r.push(a.controller)}}return n._updateMetasets(),r}},{key:"_resetElements",value:function(){var t=this;Fh(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)}},{key:"reset",value:function(){this._resetElements(),this.notifyPlugins("reset")}},{key:"update",value:function(t){var e=this,n=e.config;n.update(),e._options=n.createResolver(n.chartOptionScopes(),e.getContext()),Fh(e.scales,(function(t){rv(e,t)}));var r=e._animationsDisabled=!e.options.animation;if(e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),function(t,e){if(t.size!==e.size)return!1;var n,r=xh(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!e.has(i))return!1}}catch(Cw){r.e(Cw)}finally{r.f()}return!0}(new Set(Object.keys(e._listeners)),new Set(e.options.events))&&!!this._responsiveListeners===e.options.responsive||(e.unbindEvents(),e.bindEvents()),e._plugins.invalidate(),!1!==e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})){var i=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");for(var o=0,a=0,s=e.data.datasets.length;a<s;a++){var u=e.getDatasetMeta(a).controller,c=!r&&-1===i.indexOf(u);u.buildOrUpdateElements(c),o=Math.max(+u.getMaxOverflow(),o)}e._minPadding=o,e._updateLayout(o),r||Fh(i,(function(t){t.reset()})),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(Jv("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}}},{key:"_updateLayout",value:function(t){var e=this;if(!1!==e.notifyPlugins("beforeLayout",{cancelable:!0})){ov(e,e.width,e.height,t);var n=e.chartArea,r=n.width<=0||n.height<=0;e._layers=[],Fh(e.boxes,(function(t){var n;r&&"chartArea"===t.position||(t.configure&&t.configure(),(n=e._layers).push.apply(n,Yp(t._layers())))}),e),e._layers.forEach((function(t,e){t._idx=e})),e.notifyPlugins("afterLayout")}}},{key:"_updateDatasets",value:function(t){var e=this,n="function"===typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(var r=0,i=e.data.datasets.length;r<i;++r)e._updateDataset(r,n?t({datasetIndex:r}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}},{key:"_updateDataset",value:function(t,e){var n=this,r=n.getDatasetMeta(t),i={meta:r,index:t,mode:e,cancelable:!0};!1!==n.notifyPlugins("beforeDatasetUpdate",i)&&(r.controller._update(e),i.cancelable=!1,n.notifyPlugins("afterDatasetUpdate",i))}},{key:"render",value:function(){var t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(tm.has(t)?t.attached&&!tm.running(t)&&tm.start(t):(t.draw(),Xv({chart:t})))}},{key:"draw",value:function(){var t,e=this;if(e._resizeBeforeDraw){var n=e._resizeBeforeDraw,r=n.width,i=n.height;e._resize(r,i),e._resizeBeforeDraw=null}if(e.clear(),!(e.width<=0||e.height<=0)&&!1!==e.notifyPlugins("beforeDraw",{cancelable:!0})){var o=e._layers;for(t=0;t<o.length&&o[t].z<=0;++t)o[t].draw(e.chartArea);for(e._drawDatasets();t<o.length;++t)o[t].draw(e.chartArea);e.notifyPlugins("afterDraw")}}},{key:"_getSortedDatasetMetas",value:function(t){var e,n,r=this._sortedMetasets,i=[];for(e=0,n=r.length;e<n;++e){var o=r[e];t&&!o.visible||i.push(o)}return i}},{key:"getSortedVisibleDatasetMetas",value:function(){return this._getSortedDatasetMetas(!0)}},{key:"_drawDatasets",value:function(){var t=this;if(!1!==t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})){for(var e=t.getSortedVisibleDatasetMetas(),n=e.length-1;n>=0;--n)t._drawDataset(e[n]);t.notifyPlugins("afterDatasetsDraw")}}},{key:"_drawDataset",value:function(t){var e=this,n=e.ctx,r=t._clip,i=!r.disabled,o=e.chartArea,a={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",a)&&(i&&yd(n,{left:!1===r.left?0:o.left-r.left,right:!1===r.right?e.width:o.right+r.right,top:!1===r.top?0:o.top-r.top,bottom:!1===r.bottom?e.height:o.bottom+r.bottom}),t.controller.draw(),i&&bd(n),a.cancelable=!1,e.notifyPlugins("afterDatasetDraw",a))}},{key:"getElementsAtEventForMode",value:function(t,e,n,r){var i=Um.modes[e];return"function"===typeof i?i(this,t,n,r):[]}},{key:"getDatasetMeta",value:function(t){var e=this.data.datasets[t],n=this._metasets,r=n.filter((function(t){return t&&t._dataset===e})).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(r)),r}},{key:"getContext",value:function(){return this.$context||(this.$context={chart:this,type:"chart"})}},{key:"getVisibleDatasetCount",value:function(){return this.getSortedVisibleDatasetMetas().length}},{key:"isDatasetVisible",value:function(t){var e=this.data.datasets[t];if(!e)return!1;var n=this.getDatasetMeta(t);return"boolean"===typeof n.hidden?!n.hidden:!e.hidden}},{key:"setDatasetVisibility",value:function(t,e){this.getDatasetMeta(t).hidden=!e}},{key:"toggleDataVisibility",value:function(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}},{key:"getDataVisibility",value:function(t){return!this._hiddenIndices[t]}},{key:"_updateVisibility",value:function(t,e,n){var r=this,i=n?"show":"hide",o=r.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);Jh(e)?(o.data[e].hidden=!n,r.update()):(r.setDatasetVisibility(t,n),a.update(o,{visible:n}),r.update((function(e){return e.datasetIndex===t?i:void 0})))}},{key:"hide",value:function(t,e){this._updateVisibility(t,e,!1)}},{key:"show",value:function(t,e){this._updateVisibility(t,e,!0)}},{key:"_destroyDatasetMeta",value:function(t){var e=this,n=e._metasets&&e._metasets[t];n&&n.controller&&(n.controller._destroy(),delete e._metasets[t])}},{key:"destroy",value:function(){var t,e,n=this,r=n.canvas,i=n.ctx;for(n.stop(),tm.remove(n),t=0,e=n.data.datasets.length;t<e;++t)n._destroyDatasetMeta(t);n.config.clearCache(),r&&(n.unbindEvents(),md(r,i),n.platform.releaseContext(i),n.canvas=null,n.ctx=null),n.notifyPlugins("destroy"),delete eg[n.id]}},{key:"toBase64Image",value:function(){var t;return(t=this.canvas).toDataURL.apply(t,arguments)}},{key:"bindEvents",value:function(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}},{key:"bindUserEvents",value:function(){var t=this,e=t._listeners,n=t.platform,r=function(e,n,r){e.offsetX=n,e.offsetY=r,t._eventHandler(e)};Fh(t.options.events,(function(i){return function(r,i){n.addEventListener(t,r,i),e[r]=i}(i,r)}))}},{key:"bindResponsiveEvents",value:function(){var t=this;t._responsiveListeners||(t._responsiveListeners={});var e,n=t._responsiveListeners,r=t.platform,i=function(e,i){r.addEventListener(t,e,i),n[e]=i},o=function(e,i){n[e]&&(r.removeEventListener(t,e,i),delete n[e])},a=function(e,n){t.canvas&&t.resize(e,n)},s=function n(){o("attach",n),t.attached=!0,t.resize(),i("resize",a),i("detach",e)};e=function(){t.attached=!1,o("resize",a),i("attach",s)},r.isAttached(t.canvas)?s():e()}},{key:"unbindEvents",value:function(){var t=this;Fh(t._listeners,(function(e,n){t.platform.removeEventListener(t,n,e)})),t._listeners={},Fh(t._responsiveListeners,(function(e,n){t.platform.removeEventListener(t,n,e)})),t._responsiveListeners=void 0}},{key:"updateHoverStyle",value:function(t,e,n){var r,i,o,a=n?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+a+"DatasetHoverStyle"](),i=0,o=t.length;i<o;++i){var s=(r=t[i])&&this.getDatasetMeta(r.datasetIndex).controller;s&&s[a+"HoverStyle"](r.element,r.datasetIndex,r.index)}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(t){var e=this,n=e._active||[],r=t.map((function(t){var n=t.datasetIndex,r=t.index,i=e.getDatasetMeta(n);if(!i)throw new Error("No dataset found at index "+n);return{datasetIndex:n,element:i.data[r],index:r}}));!qh(r,n)&&(e._active=r,e._updateHoverStyles(r,n))}},{key:"notifyPlugins",value:function(t,e,n){return this._plugins.notify(this,t,e,n)}},{key:"_updateHoverStyles",value:function(t,e,n){var r=this,i=r.options.hover,o=function(t,e){return t.filter((function(t){return!e.some((function(e){return t.datasetIndex===e.datasetIndex&&t.index===e.index}))}))},a=o(e,t),s=n?t:o(t,e);a.length&&r.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&r.updateHoverStyle(s,i.mode,!0)}},{key:"_eventHandler",value:function(t,e){var n=this,r=this,i={event:t,replay:e,cancelable:!0},o=function(e){return(e.options.events||n.options.events).includes(t.type)};if(!1!==r.notifyPlugins("beforeEvent",i,o)){var a=r._handleEvent(t,e);return i.cancelable=!1,r.notifyPlugins("afterEvent",i,o),(a||i.changed)&&r.render(),r}}},{key:"_handleEvent",value:function(t,e){var n,r=this,i=r._active,o=void 0===i?[]:i,a=r.options,s=a.hover,u=e,c=[],l=null;return"mouseout"!==t.type&&(c=r.getElementsAtEventForMode(t,s.mode,s,u),l="click"===t.type?r._lastEvent:t),r._lastEvent=null,gd(t,r.chartArea,r._minPadding)&&(Bh(a.onHover,[t,c,r],r),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Bh(a.onClick,[t,c,r],r)),((n=!qh(c,o))||e)&&(r._active=c,r._updateHoverStyles(c,o,e)),r._lastEvent=l,n}}]),t}(),ig=function(){return Fh(rg.instances,(function(t){return t._plugins.invalidate()}))},og=!0;function ag(t,e,n){var r=e.startAngle,i=e.pixelMargin,o=e.x,a=e.y,s=e.outerRadius,u=e.innerRadius,c=i/s;t.beginPath(),t.arc(o,a,s,r-c,n+c),u>i?(c=i/u,t.arc(o,a,u,n+c,r-c,!0)):t.arc(o,a,i,n+of,r-of),t.closePath(),t.clip()}function sg(t,e,n,r){var i=Ad(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),o=(n-e)/2,a=Math.min(o,r*e/2),s=function(t){var e=(n-Math.min(o,t))*r/2;return wf(t,0,Math.min(o,e))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:wf(i.innerStart,0,a),innerEnd:wf(i.innerEnd,0,a)}}function ug(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function cg(t,e,n,r,i){var o=e.x,a=e.y,s=e.startAngle,u=e.pixelMargin,c=e.innerRadius,l=Math.max(e.outerRadius+r+n-u,0),h=c>0?c+r+n+u:0,f=0,d=i-s;if(r){var p=((c>0?c-r:0)+(l>0?l-r:0))/2;f=(d-(0!==p?d*p/(p+r):d))/2}var m=(d-Math.max(.001,d*l-n/Qh)/l)/2,v=s+m+f,g=i-m-f,y=sg(e,h,l,g-v),b=y.outerStart,_=y.outerEnd,w=y.innerStart,x=y.innerEnd,k=l-b,S=l-_,C=v+b/k,M=g-_/S,E=h+w,T=h+x,A=v+w/E,O=g-x/T;if(t.beginPath(),t.arc(o,a,l,C,M),_>0){var P=ug(S,M,o,a);t.arc(P.x,P.y,_,M,g+of)}var L=ug(T,g,o,a);if(t.lineTo(L.x,L.y),x>0){var D=ug(T,O,o,a);t.arc(D.x,D.y,x,g+of,O+Math.PI)}if(t.arc(o,a,h,g-x/h,v+w/h,!0),w>0){var I=ug(E,A,o,a);t.arc(I.x,I.y,w,A+Math.PI,v-of)}var R=ug(k,v,o,a);if(t.lineTo(R.x,R.y),b>0){var N=ug(k,C,o,a);t.arc(N.x,N.y,b,v-of,C)}t.closePath()}function lg(t,e,n,r,i){var o=e.options,a="inner"===o.borderAlign;o.borderWidth&&(a?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,n){var r,i=e.x,o=e.y,a=e.startAngle,s=e.pixelMargin,u=e.fullCircles,c=Math.max(e.outerRadius-s,0),l=e.innerRadius+s;for(n&&ag(t,e,a+tf),t.beginPath(),t.arc(i,o,l,a+tf,a,!0),r=0;r<u;++r)t.stroke();for(t.beginPath(),t.arc(i,o,c,a,a+tf),r=0;r<u;++r)t.stroke()}(t,e,a),a&&ag(t,e,i),cg(t,e,n,r,i),t.stroke())}Object.defineProperties(rg,{defaults:{enumerable:og,value:hd},instances:{enumerable:og,value:eg},overrides:{enumerable:og,value:sd},registry:{enumerable:og,value:Iv},version:{enumerable:og,value:"3.5.1"},getChart:{enumerable:og,value:ng},register:{enumerable:og,value:function(){Iv.add.apply(Iv,arguments),ig()}},unregister:{enumerable:og,value:function(){Iv.remove.apply(Iv,arguments),ig()}}});var hg=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this)).options=void 0,r.circumference=void 0,r.startAngle=void 0,r.endAngle=void 0,r.innerRadius=void 0,r.outerRadius=void 0,r.pixelMargin=0,r.fullCircles=0,t&&Object.assign(Vp(r),t),r}return Qp(n,[{key:"inRange",value:function(t,e,n){var r=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r),o=Math.atan2(r,n);return o<-.5*Qh&&(o+=tf),{angle:o,distance:i}}(this.getProps(["x","y"],n),{x:t,y:e}),i=r.angle,o=r.distance,a=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),s=a.startAngle,u=a.endAngle,c=a.innerRadius,l=a.outerRadius,h=a.circumference,f=this.options.spacing/2;return(h>=tf||_f(i,s,u))&&(o>=c+f&&o<=l+f)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),n=e.x,r=e.y,i=e.startAngle,o=e.endAngle,a=e.innerRadius,s=e.outerRadius,u=this.options,c=u.offset,l=(i+o)/2,h=(a+s+u.spacing+c)/2;return{x:n+Math.cos(l)*h,y:r+Math.sin(l)*h}}},{key:"tooltipPosition",value:function(t){return this.getCenterPoint(t)}},{key:"draw",value:function(t){var e=this,n=e.options,r=e.circumference,i=(n.offset||0)/2,o=(n.spacing||0)/2;if(e.pixelMargin="inner"===n.borderAlign?.33:0,e.fullCircles=r>tf?Math.floor(r/tf):0,!(0===r||e.innerRadius<0||e.outerRadius<0)){t.save();var a=0;if(i){a=i/2;var s=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(s)*a,Math.sin(s)*a),e.circumference>=Qh&&(a=i)}t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor;var u=function(t,e,n,r){var i=e.fullCircles,o=e.startAngle,a=e.circumference,s=e.endAngle;if(i){cg(t,e,n,r,o+tf);for(var u=0;u<i;++u)t.fill();isNaN(a)||(s=o+a%tf,a%tf===0&&(s+=tf))}return cg(t,e,n,r,s),t.fill(),s}(t,e,a,o);lg(t,e,a,o,u),t.restore()}}}]),n}(wv);function fg(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=zh(n.borderCapStyle,e.borderCapStyle),t.setLineDash(zh(n.borderDash,e.borderDash)),t.lineDashOffset=zh(n.borderDashOffset,e.borderDashOffset),t.lineJoin=zh(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=zh(n.borderWidth,e.borderWidth),t.strokeStyle=zh(n.borderColor,e.borderColor)}function dg(t,e,n){t.lineTo(n.x,n.y)}function pg(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.length,i=n.start,o=void 0===i?0:i,a=n.end,s=void 0===a?r-1:a,u=e.start,c=e.end,l=Math.max(o,u),h=Math.min(s,c),f=o<u&&s<u||o>c&&s>c;return{count:r,start:l,loop:e.loop,ilen:h<l&&!f?r+h-l:h-l}}function mg(t,e,n,r){var i,o,a,s=e.points,u=e.options,c=pg(s,n,r),l=c.count,h=c.start,f=c.loop,d=c.ilen,p=function(t){return t.stepped?_d:t.tension||"monotone"===t.cubicInterpolationMode?wd:dg}(u),m=r||{},v=m.move,g=void 0===v||v,y=m.reverse;for(i=0;i<=d;++i)(o=s[(h+(y?d-i:i))%l]).skip||(g?(t.moveTo(o.x,o.y),g=!1):p(t,a,o,y,u.stepped),a=o);return f&&p(t,a,o=s[(h+(y?d:0))%l],y,u.stepped),!!f}function vg(t,e,n,r){var i,o,a,s,u,c,l=e.points,h=pg(l,n,r),f=h.count,d=h.start,p=h.ilen,m=r||{},v=m.move,g=void 0===v||v,y=m.reverse,b=0,_=0,w=function(t){return(d+(y?p-t:t))%f},x=function(){s!==u&&(t.lineTo(b,u),t.lineTo(b,s),t.lineTo(b,c))};for(g&&(o=l[w(0)],t.moveTo(o.x,o.y)),i=0;i<=p;++i)if(!(o=l[w(i)]).skip){var k=o.x,S=o.y,C=0|k;C===a?(S<s?s=S:S>u&&(u=S),b=(_*b+k)/++_):(x(),t.lineTo(k,S),a=C,_=0,s=u=S),c=S}x()}function gg(t){var e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!n?vg:mg}hg.id="arc",hg.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},hg.defaultRoutes={backgroundColor:"backgroundColor"};var yg="function"===typeof Path2D;function bg(t,e,n,r){yg&&1===e.segments.length?function(t,e,n,r){var i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),fg(t,e.options),t.stroke(i)}(t,e,n,r):function(t,e,n,r){var i,o=e.segments,a=e.options,s=gg(e),u=$p(o);try{for(u.s();!(i=u.n()).done;){var c=i.value;fg(t,a,c.style),t.beginPath(),s(t,e,c,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}}catch(Cw){u.e(Cw)}finally{u.f()}}(t,e,n,r)}var _g=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this)).animated=!0,r.options=void 0,r._loop=void 0,r._fullLoop=void 0,r._path=void 0,r._points=void 0,r._segments=void 0,r._decimated=!1,r._pointsUpdated=!1,r._datasetIndex=void 0,t&&Object.assign(Vp(r),t),r}return Qp(n,[{key:"updateControlPoints",value:function(t,e){var n=this,r=n.options;if((r.tension||"monotone"===r.cubicInterpolationMode)&&!r.stepped&&!n._pointsUpdated){var i=r.spanGaps?n._loop:n._fullLoop;sp(n._points,r,t,i,e),n._pointsUpdated=!0}}},{key:"points",get:function(){return this._points},set:function(t){var e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}},{key:"segments",get:function(){return this._segments||(this._segments=function(t,e){var n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];var o=!!t._loop,a=function(t,e,n,r){var i=0,o=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(o+=i);o>i&&t[o%e].skip;)o--;return{start:i,end:o%=e}}(n,i,o,r),s=a.start,u=a.end;return Lp(t,!0===r?[{start:s,end:u,loop:o}]:function(t,e,n,r){var i,o=t.length,a=[],s=e,u=t[e];for(i=e+1;i<=n;++i){var c=t[i%o];c.skip||c.stop?u.skip||(r=!1,a.push({start:e%o,end:(i-1)%o,loop:r}),e=s=c.stop?i:null):(s=i,u.skip&&(e=i)),u=c}return null!==s&&a.push({start:e%o,end:s%o,loop:r}),a}(n,s,u<s?u+i:u,!!t._fullLoop&&0===s&&u===i-1),n,e)}(this,this.options.segment))}},{key:"first",value:function(){var t=this.segments,e=this.points;return t.length&&e[t[0].start]}},{key:"last",value:function(){var t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}},{key:"interpolate",value:function(t,e){var n=this,r=n.options,i=t[e],o=n.points,a=Pp(n,{property:e,start:i,end:i});if(a.length){var s,u,c=[],l=function(t){return t.stepped?wp:t.tension||"monotone"===t.cubicInterpolationMode?xp:_p}(r);for(s=0,u=a.length;s<u;++s){var h=a[s],f=h.start,d=h.end,p=o[f],m=o[d];if(p!==m){var v=l(p,m,Math.abs((i-p[e])/(m[e]-p[e])),r.stepped);v[e]=t[e],c.push(v)}else c.push(p)}return 1===c.length?c[0]:c}}},{key:"pathSegment",value:function(t,e,n){return gg(this)(t,this,e,n)}},{key:"path",value:function(t,e,n){var r=this,i=r.segments,o=gg(r),a=r._loop;e=e||0,n=n||r.points.length-e;var s,u=$p(i);try{for(u.s();!(s=u.n()).done;){a&=o(t,r,s.value,{start:e,end:e+n-1})}}catch(Cw){u.e(Cw)}finally{u.f()}return!!a}},{key:"draw",value:function(t,e,n,r){var i=this,o=i.options||{};(i.points||[]).length&&o.borderWidth&&(t.save(),bg(t,i,n,r),t.restore(),i.animated&&(i._pointsUpdated=!1,i._path=void 0))}}]),n}(wv);function wg(t,e,n,r){var i=t.options,o=t.getProps([n],r)[n];return Math.abs(e-o)<i.radius+i.hitRadius}_g.id="line",_g.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},_g.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},_g.descriptors={_scriptable:!0,_indexable:function(t){return"borderDash"!==t&&"fill"!==t}};var xg=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this)).options=void 0,r.parsed=void 0,r.skip=void 0,r.stop=void 0,t&&Object.assign(Vp(r),t),r}return Qp(n,[{key:"inRange",value:function(t,e,n){var r=this.options,i=this.getProps(["x","y"],n),o=i.x,a=i.y;return Math.pow(t-o,2)+Math.pow(e-a,2)<Math.pow(r.hitRadius+r.radius,2)}},{key:"inXRange",value:function(t,e){return wg(this,t,"x",e)}},{key:"inYRange",value:function(t,e){return wg(this,t,"y",e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y"],t);return{x:e.x,y:e.y}}},{key:"size",value:function(t){var e=(t=t||this.options||{}).radius||0;return 2*((e=Math.max(e,e&&t.hoverRadius||0))+(e&&t.borderWidth||0))}},{key:"draw",value:function(t,e){var n=this,r=n.options;n.skip||r.radius<.1||!gd(n,e,n.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,vd(t,r,n.x,n.y))}},{key:"getRange",value:function(){var t=this.options||{};return t.radius+t.hitRadius}}]),n}(wv);function kg(t,e){var n,r,i,o,a,s=t.getProps(["x","y","base","width","height"],e),u=s.x,c=s.y,l=s.base,h=s.width,f=s.height;return t.horizontal?(a=f/2,n=Math.min(u,l),r=Math.max(u,l),i=c-a,o=c+a):(n=u-(a=h/2),r=u+a,i=Math.min(c,l),o=Math.max(c,l)),{left:n,top:i,right:r,bottom:o}}function Sg(t,e,n,r){return t?0:wf(e,n,r)}function Cg(t){var e=kg(t),n=e.right-e.left,r=e.bottom-e.top,i=function(t,e,n){var r=t.options.borderWidth,i=t.borderSkipped,o=Od(r);return{t:Sg(i.top,o.top,0,n),r:Sg(i.right,o.right,0,e),b:Sg(i.bottom,o.bottom,0,n),l:Sg(i.left,o.left,0,e)}}(t,n/2,r/2),o=function(t,e,n){var r=t.getProps(["enableBorderRadius"]).enableBorderRadius,i=t.options.borderRadius,o=Pd(i),a=Math.min(e,n),s=t.borderSkipped,u=r||Ih(i);return{topLeft:Sg(!u||s.top||s.left,o.topLeft,0,a),topRight:Sg(!u||s.top||s.right,o.topRight,0,a),bottomLeft:Sg(!u||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Sg(!u||s.bottom||s.right,o.bottomRight,0,a)}}(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:o},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function Mg(t,e,n,r){var i=null===e,o=null===n,a=t&&!(i&&o)&&kg(t,r);return a&&(i||e>=a.left&&e<=a.right)&&(o||n>=a.top&&n<=a.bottom)}function Eg(t,e){t.rect(e.x,e.y,e.w,e.h)}function Tg(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,o=(t.x+t.w!==n.x+n.w?e:0)-r,a=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+r,y:t.y+i,w:t.w+o,h:t.h+a,radius:t.radius}}xg.id="point",xg.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},xg.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Ag=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this)).options=void 0,r.horizontal=void 0,r.base=void 0,r.width=void 0,r.height=void 0,t&&Object.assign(Vp(r),t),r}return Qp(n,[{key:"draw",value:function(t){var e,n=this.options,r=Cg(this),i=r.inner,o=r.outer,a=(e=o.radius).topLeft||e.topRight||e.bottomLeft||e.bottomRight?Cd:Eg,s=.33;t.save(),o.w===i.w&&o.h===i.h||(t.beginPath(),a(t,Tg(o,s,i)),t.clip(),a(t,Tg(i,-.33,o)),t.fillStyle=n.borderColor,t.fill("evenodd")),t.beginPath(),a(t,Tg(i,s,o)),t.fillStyle=n.backgroundColor,t.fill(),t.restore()}},{key:"inRange",value:function(t,e,n){return Mg(this,t,e,n)}},{key:"inXRange",value:function(t,e){return Mg(this,t,null,e)}},{key:"inYRange",value:function(t,e){return Mg(this,null,t,e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","base","horizontal"],t),n=e.x,r=e.y,i=e.base,o=e.horizontal;return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}},{key:"getRange",value:function(t){return"x"===t?this.width/2:this.height/2}}]),n}(wv);Ag.id="bar",Ag.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},Ag.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Og=Object.freeze({__proto__:null,ArcElement:hg,LineElement:_g,PointElement:xg,BarElement:Ag});function Pg(t){if(t._decimated){var e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Lg(t){t.data.datasets.forEach((function(t){Pg(t)}))}var Dg={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:function(t,e,n){if(n.enabled){var r=t.width;t.data.datasets.forEach((function(e,i){var o=e._data,a=e.indexAxis,s=t.getDatasetMeta(i),u=o||e.data;if("y"!==Id([a,t.options.indexAxis])&&"line"===s.type){var c=t.scales[s.xAxisID];if(("linear"===c.type||"time"===c.type)&&!t.options.parsing){var l=function(t,e){var n=e.length,r=0,i=t.iScale,o=i.getUserBounds(),a=o.min,s=o.max,u=o.minDefined,c=o.maxDefined;return u&&(r=wf(Nd(e,i.axis,a).lo,0,n-1)),{start:r,count:c?wf(Nd(e,i.axis,s).hi+1,r,n)-r:n-r}}(s,u),h=l.start,f=l.count;if(f<=(n.threshold||4*r))Pg(e);else{var d;switch(Lh(o)&&(e._data=u,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),n.algorithm){case"lttb":d=function(t,e,n,r,i){var o=i.samples||r;if(o>=n)return t.slice(e,e+n);var a,s,u,c,l,h=[],f=(n-2)/(o-2),d=0,p=e+n-1,m=e;for(h[d++]=t[m],a=0;a<o-2;a++){var v=0,g=0,y=void 0,b=Math.floor((a+1)*f)+1+e,_=Math.min(Math.floor((a+2)*f)+1,n)+e,w=_-b;for(y=b;y<_;y++)v+=t[y].x,g+=t[y].y;v/=w,g/=w;var x=Math.floor(a*f)+1+e,k=Math.min(Math.floor((a+1)*f)+1,n)+e,S=t[m],C=S.x,M=S.y;for(u=c=-1,y=x;y<k;y++)(c=.5*Math.abs((C-v)*(t[y].y-M)-(C-t[y].x)*(g-M)))>u&&(u=c,s=t[y],l=y);h[d++]=s,m=l}return h[d++]=t[p],h}(u,h,f,r,n);break;case"min-max":d=function(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p=0,m=0,v=[],g=e+n-1,y=t[e].x,b=t[g].x-y;for(i=e;i<e+n;++i){a=((o=t[i]).x-y)/b*r,s=o.y;var _=0|a;if(_===u)s<f?(f=s,c=i):s>d&&(d=s,l=i),p=(m*p+o.x)/++m;else{var w=i-1;if(!Lh(c)&&!Lh(l)){var x=Math.min(c,l),k=Math.max(c,l);x!==h&&x!==w&&v.push(Np(Np({},t[x]),{},{x:p})),k!==h&&k!==w&&v.push(Np(Np({},t[k]),{},{x:p}))}i>0&&w!==h&&v.push(t[w]),v.push(o),u=_,m=0,f=d=s,c=l=h=i}}return v}(u,h,f,r);break;default:throw new Error("Unsupported decimation algorithm '".concat(n.algorithm,"'"))}e._decimated=d}}}}))}else Lg(t)},destroy:function(t){Lg(t)}};function Ig(t,e,n){var r=function(t){var e=t.options,n=e.fill,r=zh(n&&n.target,n);return void 0===r&&(r=!!e.backgroundColor),!1!==r&&null!==r&&(!0===r?"origin":r)}(t);if(Ih(r))return!isNaN(r.value)&&r;var i=parseFloat(r);return Rh(i)&&Math.floor(i)===i?("-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}var Rg=function(){function t(e){Jp(this,t),this.x=e.x,this.y=e.y,this.radius=e.radius}return Qp(t,[{key:"pathSegment",value:function(t,e,n){var r=this.x,i=this.y,o=this.radius;return e=e||{start:0,end:tf},t.arc(r,i,o,e.end,e.start,!0),!n.bounds}},{key:"interpolate",value:function(t){var e=this.x,n=this.y,r=this.radius,i=t.angle;return{x:e+Math.cos(i)*r,y:n+Math.sin(i)*r,angle:i}}}]),t}();function Ng(t){return(t.scale||{}).getPointPositionForValue?function(t){var e,n,r,i=t.scale,o=t.fill,a=i.options,s=i.getLabels().length,u=[],c=a.reverse?i.max:i.min,l=a.reverse?i.min:i.max;if(r="start"===o?c:"end"===o?l:Ih(o)?o.value:i.getBaseValue(),a.grid.circular)return n=i.getPointPositionForValue(0,c),new Rg({x:n.x,y:n.y,radius:i.getDistanceFromCenterForValue(r)});for(e=0;e<s;++e)u.push(i.getPointPositionForValue(e,r));return u}(t):function(t){var e,n=t.scale,r=void 0===n?{}:n,i=t.fill,o=null;return"start"===i?o=r.bottom:"end"===i?o=r.top:Ih(i)?o=r.getPixelForValue(i.value):r.getBasePixel&&(o=r.getBasePixel()),Rh(o)?{x:(e=r.isHorizontal())?o:null,y:e?null:o}:null}(t)}function zg(t,e,n){for(;e>t;e--){var r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function jg(t){var e=t.chart,n=t.scale,r=t.index,i=t.line,o=[],a=i.segments,s=i.points,u=function(t,e){for(var n=[],r=t.getSortedVisibleDatasetMetas(),i=0;i<r.length;i++){var o=r[i];if(o.index===e)break;Bg(o)&&n.unshift(o.dataset)}return n}(e,r);u.push(Vg({x:null,y:n.bottom},i));for(var c=0;c<a.length;c++)for(var l=a[c],h=l.start;h<=l.end;h++)Fg(o,s[h],u);return new _g({points:o,options:{}})}var Bg=function(t){return"line"===t.type&&!t.hidden};function Fg(t,e,n){for(var r=[],i=0;i<n.length;i++){var o=qg(n[i],e,"x"),a=o.first,s=o.last,u=o.point;if(!(!u||a&&s))if(a)r.unshift(u);else if(t.push(u),!s)break}t.push.apply(t,r)}function qg(t,e,n){var r=t.interpolate(e,n);if(!r)return{};for(var i=r[n],o=t.segments,a=t.points,s=!1,u=!1,c=0;c<o.length;c++){var l=o[c],h=a[l.start][n],f=a[l.end][n];if(i>=h&&i<=f){s=i===h,u=i===f;break}}return{first:s,last:u,point:r}}function Vg(t,e){var n=[],r=!1;return Dh(t)?(r=!0,n=t):n=function(t,e){var n=t||{},r=n.x,i=void 0===r?null:r,o=n.y,a=void 0===o?null:o,s=e.points,u=[];return e.segments.forEach((function(t){var e=t.start,n=t.end;n=zg(e,n,s);var r=s[e],o=s[n];null!==a?(u.push({x:r.x,y:a}),u.push({x:o.x,y:a})):null!==i&&(u.push({x:i,y:r.y}),u.push({x:i,y:o.y}))})),u}(t,e),n.length?new _g({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Ug(t,e,n){var r,i=t[e].fill,o=[e];if(!n)return i;for(;!1!==i&&-1===o.indexOf(i);){if(!Rh(i))return i;if(!(r=t[i]))return!1;if(r.visible)return i;o.push(i),i=r.fill}return!1}function Hg(t,e,n){t.beginPath(),e.path(t),t.lineTo(e.last().x,n),t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Wg(t,e,n,r){if(!r){var i=e[t],o=n[t];return"angle"===t&&(i=bf(i),o=bf(o)),{property:t,start:i,end:o}}}function $g(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function Zg(t,e,n){var r=e.chart.chartArea,i=r.top,o=r.bottom,a=n||{},s=a.property,u=a.start,c=a.end;"x"===s&&(t.beginPath(),t.rect(u,i,c-u,o-i),t.clip())}function Yg(t,e,n,r){var i=e.interpolate(n,r);i&&t.lineTo(i.x,i.y)}function Gg(t,e){var n,r=e.line,i=e.target,o=e.property,a=e.color,s=e.scale,u=function(t,e,n){var r,i=t.segments,o=t.points,a=e.points,s=[],u=$p(i);try{for(u.s();!(r=u.n()).done;){var c=r.value,l=c.start,h=c.end;h=zg(l,h,o);var f=Wg(n,o[l],o[h],c.loop);if(e.segments){var d,p=$p(Pp(e,f));try{for(p.s();!(d=p.n()).done;){var m,v=d.value,g=Wg(n,a[v.start],a[v.end],v.loop),y=$p(Op(c,o,g));try{for(y.s();!(m=y.n()).done;){var b=m.value;s.push({source:b,target:v,start:Wp({},n,$g(f,g,"start",Math.max)),end:Wp({},n,$g(f,g,"end",Math.min))})}}catch(Cw){y.e(Cw)}finally{y.f()}}}catch(Cw){p.e(Cw)}finally{p.f()}}else s.push({source:c,target:f,start:o[l],end:o[h]})}}catch(Cw){u.e(Cw)}finally{u.f()}return s}(r,i,o),c=$p(u);try{for(c.s();!(n=c.n()).done;){var l=n.value,h=l.source,f=l.target,d=l.start,p=l.end,m=h.style,v=(m=void 0===m?{}:m).backgroundColor,g=void 0===v?a:v,y=!0!==i;t.save(),t.fillStyle=g,Zg(t,s,y&&Wg(o,d,p)),t.beginPath();var b=!!r.pathSegment(t,h),_=void 0;if(y){b?t.closePath():Yg(t,i,p,o);var w=!!i.pathSegment(t,f,{move:b,reverse:!0});(_=b&&w)||Yg(t,i,d,o)}t.closePath(),t.fill(_?"evenodd":"nonzero"),t.restore()}}catch(Cw){c.e(Cw)}finally{c.f()}}function Kg(t,e,n){var r=function(t){var e=t.chart,n=t.fill,r=t.line;if(Rh(n))return function(t,e){var n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}(e,n);if("stack"===n)return jg(t);if("shape"===n)return!0;var i=Ng(t);return i instanceof Rg?i:Vg(i,r)}(e),i=e.line,o=e.scale,a=e.axis,s=i.options,u=s.fill,c=s.backgroundColor,l=u||{},h=l.above,f=void 0===h?c:h,d=l.below,p=void 0===d?c:d;r&&i.points.length&&(yd(t,n),function(t,e){var n=e.line,r=e.target,i=e.above,o=e.below,a=e.area,s=e.scale,u=n._loop?"angle":e.axis;t.save(),"x"===u&&o!==i&&(Hg(t,r,a.top),Gg(t,{line:n,target:r,color:i,scale:s,property:u}),t.restore(),t.save(),Hg(t,r,a.bottom)),Gg(t,{line:n,target:r,color:o,scale:s,property:u}),t.restore()}(t,{line:i,target:r,above:f,below:p,area:n,scale:o,axis:a}),bd(t))}var Jg={id:"filler",afterDatasetsUpdate:function(t,e,n){var r,i,o,a,s=(t.data.datasets||[]).length,u=[];for(i=0;i<s;++i)a=null,(o=(r=t.getDatasetMeta(i)).dataset)&&o.options&&o instanceof _g&&(a={visible:t.isDatasetVisible(i),index:i,fill:Ig(o,i,s),chart:t,axis:r.controller.options.indexAxis,scale:r.vScale,line:o}),r.$filler=a,u.push(a);for(i=0;i<s;++i)(a=u[i])&&!1!==a.fill&&(a.fill=Ug(u,i,n.propagate))},beforeDraw:function(t,e,n){for(var r="beforeDraw"===n.drawTime,i=t.getSortedVisibleDatasetMetas(),o=t.chartArea,a=i.length-1;a>=0;--a){var s=i[a].$filler;s&&(s.line.updateControlPoints(o,s.axis),r&&Kg(t.ctx,s,o))}},beforeDatasetsDraw:function(t,e,n){if("beforeDatasetsDraw"===n.drawTime)for(var r=t.getSortedVisibleDatasetMetas(),i=r.length-1;i>=0;--i){var o=r[i].$filler;o&&Kg(t.ctx,o,t.chartArea)}},beforeDatasetDraw:function(t,e,n){var r=e.meta.$filler;r&&!1!==r.fill&&"beforeDatasetDraw"===n.drawTime&&Kg(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Xg=function(t,e){var n=t.boxHeight,r=void 0===n?e:n,i=t.boxWidth,o=void 0===i?e:i;return t.usePointStyle&&(r=Math.min(r,e),o=Math.min(o,e)),{boxWidth:o,boxHeight:r,itemHeight:Math.max(e,r)}},Qg=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this))._added=!1,r.legendHitBoxes=[],r._hoveredItem=null,r.doughnutMode=!1,r.chart=t.chart,r.options=t.options,r.ctx=t.ctx,r.legendItems=void 0,r.columnSizes=void 0,r.lineWidths=void 0,r.maxHeight=void 0,r.maxWidth=void 0,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.height=void 0,r.width=void 0,r._margins=void 0,r.position=void 0,r.weight=void 0,r.fullSize=void 0,r}return Qp(n,[{key:"update",value:function(t,e,n){var r=this;r.maxWidth=t,r.maxHeight=e,r._margins=n,r.setDimensions(),r.buildLabels(),r.fit()}},{key:"setDimensions",value:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=t._margins.left,t.right=t.width):(t.height=t.maxHeight,t.top=t._margins.top,t.bottom=t.height)}},{key:"buildLabels",value:function(){var t=this,e=t.options.labels||{},n=Bh(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),e.sort&&(n=n.sort((function(n,r){return e.sort(n,r,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n}},{key:"fit",value:function(){var t=this,e=t.options,n=t.ctx;if(e.display){var r,i,o=e.labels,a=Dd(o.font),s=a.size,u=t._computeTitleHeight(),c=Xg(o,s),l=c.boxWidth,h=c.itemHeight;n.font=a.string,t.isHorizontal()?(r=t.maxWidth,i=t._fitRows(u,s,l,h)+10):(i=t.maxHeight,r=t._fitCols(u,s,l,h)+10),t.width=Math.min(r,e.maxWidth||t.maxWidth),t.height=Math.min(i,e.maxHeight||t.maxHeight)}else t.width=t.height=0}},{key:"_fitRows",value:function(t,e,n,r){var i=this,o=i.ctx,a=i.maxWidth,s=i.options.labels.padding,u=i.legendHitBoxes=[],c=i.lineWidths=[0],l=r+s,h=t;o.textAlign="left",o.textBaseline="middle";var f=-1,d=-l;return i.legendItems.forEach((function(t,i){var p=n+e/2+o.measureText(t.text).width;(0===i||c[c.length-1]+p+2*s>a)&&(h+=l,c[c.length-(i>0?0:1)]=0,d+=l,f++),u[i]={left:0,top:d,row:f,width:p,height:r},c[c.length-1]+=p+s})),h}},{key:"_fitCols",value:function(t,e,n,r){var i=this,o=i.ctx,a=i.maxHeight,s=i.options.labels.padding,u=i.legendHitBoxes=[],c=i.columnSizes=[],l=a-t,h=s,f=0,d=0,p=0,m=0;return i.legendItems.forEach((function(t,i){var a=n+e/2+o.measureText(t.text).width;i>0&&d+r+2*s>l&&(h+=f+s,c.push({width:f,height:d}),p+=f+s,m++,f=d=0),u[i]={left:p,top:d,col:m,width:a,height:r},f=Math.max(f,a),d+=r+s})),h+=f,c.push({width:f,height:d}),h}},{key:"adjustHitBoxes",value:function(){var t=this;if(t.options.display){var e=t._computeTitleHeight(),n=t.legendHitBoxes,r=t.options,i=r.align,o=r.labels.padding,a=Cp(r.rtl,t.left,t.width);if(this.isHorizontal()){var s,u=0,c=Th(i,t.left+o,t.right-t.lineWidths[u]),l=$p(n);try{for(l.s();!(s=l.n()).done;){var h=s.value;u!==h.row&&(u=h.row,c=Th(i,t.left+o,t.right-t.lineWidths[u])),h.top+=t.top+e+o,h.left=a.leftForLtr(a.x(c),h.width),c+=h.width+o}}catch(Cw){l.e(Cw)}finally{l.f()}}else{var f,d=0,p=Th(i,t.top+e+o,t.bottom-t.columnSizes[d].height),m=$p(n);try{for(m.s();!(f=m.n()).done;){var v=f.value;v.col!==d&&(d=v.col,p=Th(i,t.top+e+o,t.bottom-t.columnSizes[d].height)),v.top=p,v.left+=t.left+o,v.left=a.leftForLtr(a.x(v.left),v.width),p+=v.height+o}}catch(Cw){m.e(Cw)}finally{m.f()}}}}},{key:"isHorizontal",value:function(){return"top"===this.options.position||"bottom"===this.options.position}},{key:"draw",value:function(){var t=this;if(t.options.display){var e=t.ctx;yd(e,t),t._draw(),bd(e)}}},{key:"_draw",value:function(){var t,e=this,n=e.options,r=e.columnSizes,i=e.lineWidths,o=e.ctx,a=n.align,s=n.labels,u=hd.color,c=Cp(n.rtl,e.left,e.width),l=Dd(s.font),h=s.color,f=s.padding,d=l.size,p=d/2;e.drawTitle(),o.textAlign=c.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=l.string;var m=Xg(s,d),v=m.boxWidth,g=m.boxHeight,y=m.itemHeight,b=e.isHorizontal(),_=this._computeTitleHeight();t=b?{x:Th(a,e.left+f,e.right-i[0]),y:e.top+f+_,line:0}:{x:e.left+f,y:Th(a,e.top+_+f,e.bottom-r[0].height),line:0},Mp(e.ctx,n.textDirection);var w=y+f;e.legendItems.forEach((function(m,x){o.strokeStyle=m.fontColor||h,o.fillStyle=m.fontColor||h;var k=o.measureText(m.text).width,S=c.textAlign(m.textAlign||(m.textAlign=s.textAlign)),C=v+p+k,M=t.x,E=t.y;c.setWidth(e.width),b?x>0&&M+C+f>e.right&&(E=t.y+=w,t.line++,M=t.x=Th(a,e.left+f,e.right-i[t.line])):x>0&&E+w>e.bottom&&(M=t.x=M+r[t.line].width+f,t.line++,E=t.y=Th(a,e.top+_+f,e.bottom-r[t.line].height)),function(t,e,n){if(!(isNaN(v)||v<=0||isNaN(g)||g<0)){o.save();var r=zh(n.lineWidth,1);if(o.fillStyle=zh(n.fillStyle,u),o.lineCap=zh(n.lineCap,"butt"),o.lineDashOffset=zh(n.lineDashOffset,0),o.lineJoin=zh(n.lineJoin,"miter"),o.lineWidth=r,o.strokeStyle=zh(n.strokeStyle,u),o.setLineDash(zh(n.lineDash,[])),s.usePointStyle){var i={radius:v*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:r},a=c.xPlus(t,v/2);vd(o,i,a,e+p)}else{var l=e+Math.max((d-g)/2,0),h=c.leftForLtr(t,v),f=Pd(n.borderRadius);o.beginPath(),Object.values(f).some((function(t){return 0!==t}))?Cd(o,{x:h,y:l,w:v,h:g,radius:f}):o.rect(h,l,v,g),o.fill(),0!==r&&o.stroke()}o.restore()}}(c.x(M),E,m),M=function(t,e,n,r){return t===(r?"left":"right")?n:"center"===t?(e+n)/2:e}(S,M+v+p,b?M+C:e.right,n.rtl),function(t,e,n){xd(o,n.text,t,e+y/2,l,{strikethrough:n.hidden,textAlign:c.textAlign(n.textAlign)})}(c.x(M),E,m),b?t.x+=C+f:t.y+=w})),Ep(e.ctx,n.textDirection)}},{key:"drawTitle",value:function(){var t=this,e=t.options,n=e.title,r=Dd(n.font),i=Ld(n.padding);if(n.display){var o,a=Cp(e.rtl,t.left,t.width),s=t.ctx,u=n.position,c=r.size/2,l=i.top+c,h=t.left,f=t.width;if(this.isHorizontal())f=Math.max.apply(Math,Yp(t.lineWidths)),o=t.top+l,h=Th(e.align,h,t.right-f);else{var d=t.columnSizes.reduce((function(t,e){return Math.max(t,e.height)}),0);o=l+Th(e.align,t.top,t.bottom-d-e.labels.padding-t._computeTitleHeight())}var p=Th(u,h,h+f);s.textAlign=a.textAlign(Eh(u)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,xd(s,n.text,p,o,r)}}},{key:"_computeTitleHeight",value:function(){var t=this.options.title,e=Dd(t.font),n=Ld(t.padding);return t.display?e.lineHeight+n.height:0}},{key:"_getLegendItemAt",value:function(t,e){var n,r,i,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(i=o.legendHitBoxes,n=0;n<i.length;++n)if(t>=(r=i[n]).left&&t<=r.left+r.width&&e>=r.top&&e<=r.top+r.height)return o.legendItems[n];return null}},{key:"handleEvent",value:function(t){var e=this,n=e.options;if(function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,n)){var r,i,o=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){var a=e._hoveredItem,s=(i=o,null!==(r=a)&&null!==i&&r.datasetIndex===i.datasetIndex&&r.index===i.index);a&&!s&&Bh(n.onLeave,[t,a,e],e),e._hoveredItem=o,o&&!s&&Bh(n.onHover,[t,o,e],e)}else o&&Bh(n.onClick,[t,o,e],e)}}}]),n}(wv);var ty={id:"legend",_element:Qg,start:function(t,e,n){var r=t.legend=new Qg({ctx:t.ctx,options:n,chart:t});iv(t,r,n),nv(t,r)},stop:function(t){rv(t,t.legend),delete t.legend},beforeUpdate:function(t,e,n){var r=t.legend;iv(t,r,n),r.options=n},afterUpdate:function(t){var e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent:function(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick:function(t,e,n){var r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=!0):(i.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:function(t){return t.chart.options.color},boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.legend.options.labels,r=n.usePointStyle,i=n.pointStyle,o=n.textAlign,a=n.color;return t._getSortedDatasetMetas().map((function(t){var n=t.controller.getStyle(r?0:void 0),s=Ld(n.borderWidth);return{text:e[t.index].label,fillStyle:n.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:n.borderCapStyle,lineDash:n.borderDash,lineDashOffset:n.borderDashOffset,lineJoin:n.borderJoinStyle,lineWidth:(s.width+s.height)/4,strokeStyle:n.borderColor,pointStyle:i||n.pointStyle,rotation:n.rotation,textAlign:o||n.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:function(t){return t.chart.options.color},display:!1,position:"center",text:""}},descriptors:{_scriptable:function(t){return!t.startsWith("on")},labels:{_scriptable:function(t){return!["generateLabels","filter","sort"].includes(t)}}}},ey=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this)).chart=t.chart,r.options=t.options,r.ctx=t.ctx,r._padding=void 0,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.width=void 0,r.height=void 0,r.position=void 0,r.weight=void 0,r.fullSize=void 0,r}return Qp(n,[{key:"update",value:function(t,e){var n=this,r=n.options;if(n.left=0,n.top=0,r.display){n.width=n.right=t,n.height=n.bottom=e;var i=Dh(r.text)?r.text.length:1;n._padding=Ld(r.padding);var o=i*Dd(r.font).lineHeight+n._padding.height;n.isHorizontal()?n.height=o:n.width=o}else n.width=n.height=n.right=n.bottom=0}},{key:"isHorizontal",value:function(){var t=this.options.position;return"top"===t||"bottom"===t}},{key:"_drawArgs",value:function(t){var e,n,r,i=this.top,o=this.left,a=this.bottom,s=this.right,u=this.options,c=u.align,l=0;return this.isHorizontal()?(n=Th(c,o,s),r=i+t,e=s-o):("left"===u.position?(n=o+t,r=Th(c,a,i),l=-.5*Qh):(n=s-t,r=Th(c,i,a),l=.5*Qh),e=a-i),{titleX:n,titleY:r,maxWidth:e,rotation:l}}},{key:"draw",value:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var r=Dd(n.font),i=r.lineHeight/2+t._padding.top,o=t._drawArgs(i),a=o.titleX,s=o.titleY,u=o.maxWidth,c=o.rotation;xd(e,n.text,0,0,r,{color:n.color,maxWidth:u,rotation:c,textAlign:Eh(n.align),textBaseline:"middle",translation:[a,s]})}}}]),n}(wv);var ny={id:"title",_element:ey,start:function(t,e,n){!function(t,e){var n=new ey({ctx:t.ctx,options:e,chart:t});iv(t,n,e),nv(t,n),t.titleBlock=n}(t,n)},stop:function(t){var e=t.titleBlock;rv(t,e),delete t.titleBlock},beforeUpdate:function(t,e,n){var r=t.titleBlock;iv(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},ry=new WeakMap,iy={id:"subtitle",start:function(t,e,n){var r=new ey({ctx:t.ctx,options:n,chart:t});iv(t,r,n),nv(t,r),ry.set(t,r)},stop:function(t){rv(t,ry.get(t)),ry.delete(t)},beforeUpdate:function(t,e,n){var r=ry.get(t);iv(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},oy={average:function(t){if(!t.length)return!1;var e,n,r=0,i=0,o=0;for(e=0,n=t.length;e<n;++e){var a=t[e].element;if(a&&a.hasValue()){var s=a.tooltipPosition();r+=s.x,i+=s.y,++o}}return{x:r/o,y:i/o}},nearest:function(t,e){if(!t.length)return!1;var n,r,i,o=e.x,a=e.y,s=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n<r;++n){var u=t[n].element;if(u&&u.hasValue()){var c=gf(e,u.getCenterPoint());c<s&&(s=c,i=u)}}if(i){var l=i.tooltipPosition();o=l.x,a=l.y}return{x:o,y:a}}};function ay(t,e){return e&&(Dh(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function sy(t){return("string"===typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function uy(t,e){var n=t._chart.ctx,r=t.body,i=t.footer,o=t.title,a=e.boxWidth,s=e.boxHeight,u=Dd(e.bodyFont),c=Dd(e.titleFont),l=Dd(e.footerFont),h=o.length,f=i.length,d=r.length,p=Ld(e.padding),m=p.height,v=0,g=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);(g+=t.beforeBody.length+t.afterBody.length,h&&(m+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),g)&&(m+=d*(e.displayColors?Math.max(s,u.lineHeight):u.lineHeight)+(g-d)*u.lineHeight+(g-1)*e.bodySpacing);f&&(m+=e.footerMarginTop+f*l.lineHeight+(f-1)*e.footerSpacing);var y=0,b=function(t){v=Math.max(v,n.measureText(t).width+y)};return n.save(),n.font=c.string,Fh(t.title,b),n.font=u.string,Fh(t.beforeBody.concat(t.afterBody),b),y=e.displayColors?a+2:0,Fh(r,(function(t){Fh(t.before,b),Fh(t.lines,b),Fh(t.after,b)})),y=0,n.font=l.string,Fh(t.footer,b),n.restore(),{width:v+=p.width,height:m}}function cy(t,e,n,r){var i=n.x,o=n.width,a=t.width,s=t.chartArea,u=s.left,c=s.right,l="center";return"center"===r?l=i<=(u+c)/2?"left":"right":i<=o/2?l="left":i>=a-o/2&&(l="right"),function(t,e,n,r){var i=r.x,o=r.width,a=n.caretSize+n.caretPadding;return"left"===t&&i+o+a>e.width||"right"===t&&i-o-a<0||void 0}(l,t,e,n)&&(l="center"),l}function ly(t,e,n){var r=e.yAlign||function(t,e){var n=e.y,r=e.height;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}(t,n);return{xAlign:e.xAlign||cy(t,e,n,r),yAlign:r}}function hy(t,e,n,r){var i=t.caretSize,o=t.caretPadding,a=t.cornerRadius,s=n.xAlign,u=n.yAlign,c=i+o,l=a+o,h=function(t,e){var n=t.x,r=t.width;return"right"===e?n-=r:"center"===e&&(n-=r/2),n}(e,s),f=function(t,e,n){var r=t.y,i=t.height;return"top"===e?r+=n:r-="bottom"===e?i+n:i/2,r}(e,u,c);return"center"===u?"left"===s?h+=c:"right"===s&&(h-=c):"left"===s?h-=l:"right"===s&&(h+=l),{x:wf(h,0,r.width-e.width),y:wf(f,0,r.height-e.height)}}function fy(t,e,n){var r=Ld(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function dy(t){return ay([],sy(t))}function py(t,e){var n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}var my=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this)).opacity=0,r._active=[],r._chart=t._chart,r._eventPosition=void 0,r._size=void 0,r._cachedAnimations=void 0,r._tooltipItems=[],r.$animations=void 0,r.$context=void 0,r.options=t.options,r.dataPoints=void 0,r.title=void 0,r.beforeBody=void 0,r.body=void 0,r.afterBody=void 0,r.footer=void 0,r.xAlign=void 0,r.yAlign=void 0,r.x=void 0,r.y=void 0,r.height=void 0,r.width=void 0,r.caretX=void 0,r.caretY=void 0,r.labelColors=void 0,r.labelPointStyles=void 0,r.labelTextColors=void 0,r}return Qp(n,[{key:"initialize",value:function(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}},{key:"_resolveAnimations",value:function(){var t=this,e=t._cachedAnimations;if(e)return e;var n=t._chart,r=t.options.setContext(t.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new om(t._chart,i);return i._cacheable&&(t._cachedAnimations=Object.freeze(o)),o}},{key:"getContext",value:function(){var t,e,n,r=this;return r.$context||(r.$context=(t=r._chart.getContext(),e=r,n=r._tooltipItems,Object.assign(Object.create(t),{tooltip:e,tooltipItems:n,type:"tooltip"})))}},{key:"getTitle",value:function(t,e){var n=this,r=e.callbacks,i=r.beforeTitle.apply(n,[t]),o=r.title.apply(n,[t]),a=r.afterTitle.apply(n,[t]),s=[];return s=ay(s,sy(i)),s=ay(s,sy(o)),s=ay(s,sy(a))}},{key:"getBeforeBody",value:function(t,e){return dy(e.callbacks.beforeBody.apply(this,[t]))}},{key:"getBody",value:function(t,e){var n=this,r=e.callbacks,i=[];return Fh(t,(function(t){var e={before:[],lines:[],after:[]},o=py(r,t);ay(e.before,sy(o.beforeLabel.call(n,t))),ay(e.lines,o.label.call(n,t)),ay(e.after,sy(o.afterLabel.call(n,t))),i.push(e)})),i}},{key:"getAfterBody",value:function(t,e){return dy(e.callbacks.afterBody.apply(this,[t]))}},{key:"getFooter",value:function(t,e){var n=this,r=e.callbacks,i=r.beforeFooter.apply(n,[t]),o=r.footer.apply(n,[t]),a=r.afterFooter.apply(n,[t]),s=[];return s=ay(s,sy(i)),s=ay(s,sy(o)),s=ay(s,sy(a))}},{key:"_createItems",value:function(t){var e,n,r,i,o,a,s,u,c,l,h,f=this,d=f._active,p=f._chart.data,m=[],v=[],g=[],y=[];for(e=0,n=d.length;e<n;++e)y.push((r=f._chart,i=d[e],o=void 0,a=void 0,s=void 0,u=void 0,c=void 0,l=void 0,h=void 0,o=i.element,a=i.datasetIndex,s=i.index,u=r.getDatasetMeta(a).controller,c=u.getLabelAndValue(s),l=c.label,h=c.value,{chart:r,label:l,parsed:u.getParsed(s),raw:r.data.datasets[a].data[s],formattedValue:h,dataset:u.getDataset(),dataIndex:s,datasetIndex:a,element:o}));return t.filter&&(y=y.filter((function(e,n,r){return t.filter(e,n,r,p)}))),t.itemSort&&(y=y.sort((function(e,n){return t.itemSort(e,n,p)}))),Fh(y,(function(e){var n=py(t.callbacks,e);m.push(n.labelColor.call(f,e)),v.push(n.labelPointStyle.call(f,e)),g.push(n.labelTextColor.call(f,e))})),f.labelColors=m,f.labelPointStyles=v,f.labelTextColors=g,f.dataPoints=y,y}},{key:"update",value:function(t,e){var n,r=this,i=r.options.setContext(r.getContext()),o=r._active,a=[];if(o.length){var s=oy[i.position].call(r,o,r._eventPosition);a=r._createItems(i),r.title=r.getTitle(a,i),r.beforeBody=r.getBeforeBody(a,i),r.body=r.getBody(a,i),r.afterBody=r.getAfterBody(a,i),r.footer=r.getFooter(a,i);var u=r._size=uy(r,i),c=Object.assign({},s,u),l=ly(r._chart,i,c),h=hy(i,c,l,r._chart);r.xAlign=l.xAlign,r.yAlign=l.yAlign,n={opacity:1,x:h.x,y:h.y,width:u.width,height:u.height,caretX:s.x,caretY:s.y}}else 0!==r.opacity&&(n={opacity:0});r._tooltipItems=a,r.$context=void 0,n&&r._resolveAnimations().update(r,n),t&&i.external&&i.external.call(r,{chart:r._chart,tooltip:r,replay:e})}},{key:"drawCaret",value:function(t,e,n,r){var i=this.getCaretPosition(t,n,r);e.lineTo(i.x1,i.y1),e.lineTo(i.x2,i.y2),e.lineTo(i.x3,i.y3)}},{key:"getCaretPosition",value:function(t,e,n){var r,i,o,a,s,u,c=this.xAlign,l=this.yAlign,h=n.cornerRadius,f=n.caretSize,d=t.x,p=t.y,m=e.width,v=e.height;return"center"===l?(s=p+v/2,"left"===c?(i=(r=d)-f,a=s+f,u=s-f):(i=(r=d+m)+f,a=s-f,u=s+f),o=r):(i="left"===c?d+h+f:"right"===c?d+m-h-f:this.caretX,"top"===l?(s=(a=p)-f,r=i-f,o=i+f):(s=(a=p+v)+f,r=i+f,o=i-f),u=a),{x1:r,x2:i,x3:o,y1:a,y2:s,y3:u}}},{key:"drawTitle",value:function(t,e,n){var r,i,o,a=this,s=a.title,u=s.length;if(u){var c=Cp(n.rtl,a.x,a.width);for(t.x=fy(a,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",r=Dd(n.titleFont),i=n.titleSpacing,e.fillStyle=n.titleColor,e.font=r.string,o=0;o<u;++o)e.fillText(s[o],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i,o+1===u&&(t.y+=n.titleMarginBottom-i)}}},{key:"_drawColorBox",value:function(t,e,n,r,i){var o=this,a=o.labelColors[n],s=o.labelPointStyles[n],u=i.boxHeight,c=i.boxWidth,l=Dd(i.bodyFont),h=fy(o,"left",i),f=r.x(h),d=u<l.lineHeight?(l.lineHeight-u)/2:0,p=e.y+d;if(i.usePointStyle){var m={radius:Math.min(c,u)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},v=r.leftForLtr(f,c)+c/2,g=p+u/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,vd(t,m,v,g),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,vd(t,m,v,g)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;var y=r.leftForLtr(f,c),b=r.leftForLtr(r.xPlus(f,1),c-2),_=Pd(a.borderRadius);Object.values(_).some((function(t){return 0!==t}))?(t.beginPath(),t.fillStyle=i.multiKeyBackground,Cd(t,{x:y,y:p,w:c,h:u,radius:_}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Cd(t,{x:b,y:p+1,w:c-2,h:u-2,radius:_}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(y,p,c,u),t.strokeRect(y,p,c,u),t.fillStyle=a.backgroundColor,t.fillRect(b,p+1,c-2,u-2))}t.fillStyle=o.labelTextColors[n]}},{key:"drawBody",value:function(t,e,n){var r,i,o,a,s,u,c,l=this,h=l.body,f=n.bodySpacing,d=n.bodyAlign,p=n.displayColors,m=n.boxHeight,v=n.boxWidth,g=Dd(n.bodyFont),y=g.lineHeight,b=0,_=Cp(n.rtl,l.x,l.width),w=function(n){e.fillText(n,_.x(t.x+b),t.y+y/2),t.y+=y+f},x=_.textAlign(d);for(e.textAlign=d,e.textBaseline="middle",e.font=g.string,t.x=fy(l,x,n),e.fillStyle=n.bodyColor,Fh(l.beforeBody,w),b=p&&"right"!==x?"center"===d?v/2+1:v+2:0,a=0,u=h.length;a<u;++a){for(r=h[a],i=l.labelTextColors[a],e.fillStyle=i,Fh(r.before,w),o=r.lines,p&&o.length&&(l._drawColorBox(e,t,a,_,n),y=Math.max(g.lineHeight,m)),s=0,c=o.length;s<c;++s)w(o[s]),y=g.lineHeight;Fh(r.after,w)}b=0,y=g.lineHeight,Fh(l.afterBody,w),t.y-=f}},{key:"drawFooter",value:function(t,e,n){var r,i,o=this,a=o.footer,s=a.length;if(s){var u=Cp(n.rtl,o.x,o.width);for(t.x=fy(o,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=u.textAlign(n.footerAlign),e.textBaseline="middle",r=Dd(n.footerFont),e.fillStyle=n.footerColor,e.font=r.string,i=0;i<s;++i)e.fillText(a[i],u.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n.footerSpacing}}},{key:"drawBackground",value:function(t,e,n,r){var i=this.xAlign,o=this.yAlign,a=t.x,s=t.y,u=n.width,c=n.height,l=r.cornerRadius;e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+l,s),"top"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+u-l,s),e.quadraticCurveTo(a+u,s,a+u,s+l),"center"===o&&"right"===i&&this.drawCaret(t,e,n,r),e.lineTo(a+u,s+c-l),e.quadraticCurveTo(a+u,s+c,a+u-l,s+c),"bottom"===o&&this.drawCaret(t,e,n,r),e.lineTo(a+l,s+c),e.quadraticCurveTo(a,s+c,a,s+c-l),"center"===o&&"left"===i&&this.drawCaret(t,e,n,r),e.lineTo(a,s+l),e.quadraticCurveTo(a,s,a+l,s),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}},{key:"_updateAnimationTarget",value:function(t){var e=this,n=e._chart,r=e.$animations,i=r&&r.x,o=r&&r.y;if(i||o){var a=oy[t.position].call(e,e._active,e._eventPosition);if(!a)return;var s=e._size=uy(e,t),u=Object.assign({},a,e._size),c=ly(n,t,u),l=hy(t,u,c,n);i._to===l.x&&o._to===l.y||(e.xAlign=c.xAlign,e.yAlign=c.yAlign,e.width=s.width,e.height=s.height,e.caretX=a.x,e.caretY=a.y,e._resolveAnimations().update(e,l))}}},{key:"draw",value:function(t){var e=this,n=e.options.setContext(e.getContext()),r=e.opacity;if(r){e._updateAnimationTarget(n);var i={width:e.width,height:e.height},o={x:e.x,y:e.y};r=Math.abs(r)<.001?0:r;var a=Ld(n.padding),s=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,e.drawBackground(o,t,i,n),Mp(t,n.textDirection),o.y+=a.top,e.drawTitle(o,t,n),e.drawBody(o,t,n),e.drawFooter(o,t,n),Ep(t,n.textDirection),t.restore())}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(t,e){var n=this,r=n._active,i=t.map((function(t){var e=t.datasetIndex,r=t.index,i=n._chart.getDatasetMeta(e);if(!i)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:i.data[r],index:r}})),o=!qh(r,i),a=n._positionChanged(i,e);(o||a)&&(n._active=i,n._eventPosition=e,n.update(!0))}},{key:"handleEvent",value:function(t,e){var n,r=this,i=r.options,o=r._active||[],a=[];"mouseout"!==t.type&&(a=r._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&a.reverse());var s=r._positionChanged(a,t);return(n=e||!qh(a,o)||s)&&(r._active=a,(i.enabled||i.external)&&(r._eventPosition={x:t.x,y:t.y},r.update(!0,e))),n}},{key:"_positionChanged",value:function(t,e){var n=this.caretX,r=this.caretY,i=this.options,o=oy[i.position].call(this,t,e);return!1!==o&&(n!==o.x||r!==o.y)}}]),n}(wv);my.positioners=oy;var vy={id:"tooltip",_element:my,positioners:oy,afterInit:function(t,e,n){n&&(t.tooltip=new my({_chart:t,options:n}))},beforeUpdate:function(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset:function(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw:function(t){var e=t.tooltip,n={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",n)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n))},afterEvent:function(t,e){if(t.tooltip){var n=e.replay;t.tooltip.handleEvent(e.event,n)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:function(t,e){return e.bodyFont.size},boxWidth:function(t,e){return e.bodyFont.size},multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Ah,title:function(t){if(t.length>0){var e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Ah,beforeBody:Ah,beforeLabel:Ah,label:function(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;var e=t.dataset.label||"";e&&(e+=": ");var n=t.formattedValue;return Lh(n)||(e+=n),e},labelColor:function(t){var e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor:function(){return this.options.bodyColor},labelPointStyle:function(t){var e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Ah,afterBody:Ah,beforeFooter:Ah,footer:Ah,afterFooter:Ah}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:function(t){return"filter"!==t&&"itemSort"!==t&&"external"!==t},_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},gy=Object.freeze({__proto__:null,Decimation:Dg,Filler:Jg,Legend:ty,SubTitle:iy,Title:ny,Tooltip:vy});function yy(t,e,n){var r=t.indexOf(e);return-1===r?function(t,e,n){return"string"===typeof e?t.push(e)-1:isNaN(e)?null:n}(t,e,n):r!==t.lastIndexOf(e)?n:r}var by=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this,t))._startValue=void 0,r._valueRange=0,r}return Qp(n,[{key:"parse",value:function(t,e){if(Lh(t))return null;var n=this.getLabels();return function(t,e){return null===t?null:wf(Math.round(t),0,e)}(e=isFinite(e)&&n[e]===t?e:yy(n,t,zh(e,t)),n.length-1)}},{key:"determineDataLimits",value:function(){var t=this,e=t.getUserBounds(),n=e.minDefined,r=e.maxDefined,i=t.getMinMax(!0),o=i.min,a=i.max;"ticks"===t.options.bounds&&(n||(o=0),r||(a=t.getLabels().length-1)),t.min=o,t.max=a}},{key:"buildTicks",value:function(){var t=this,e=t.min,n=t.max,r=t.options.offset,i=[],o=t.getLabels();o=0===e&&n===o.length-1?o:o.slice(e,n+1),t._valueRange=Math.max(o.length-(r?0:1),1),t._startValue=t.min-(r?.5:0);for(var a=e;a<=n;a++)i.push({value:a});return i}},{key:"getLabelForValue",value:function(t){var e=this.getLabels();return t>=0&&t<e.length?e[t]:t}},{key:"configure",value:function(){var t=this;zp(Up(n.prototype),"configure",this).call(this),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}},{key:"getPixelForValue",value:function(t){var e=this;return"number"!==typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}},{key:"getPixelForTick",value:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getValueForPixel",value:function(t){var e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}},{key:"getBasePixel",value:function(){return this.bottom}}]),n}(Lv);function _y(t,e){var n,r,i,o,a,s,u,c=[],l=t.bounds,h=t.step,f=t.min,d=t.max,p=t.precision,m=t.count,v=t.maxTicks,g=t.maxDigits,y=t.includeBounds,b=h||1,_=v-1,w=e.min,x=e.max,k=!Lh(f),S=!Lh(d),C=!Lh(m),M=(x-w)/(g+1),E=lf((x-w)/_/b)*b;if(E<1e-14&&!k&&!S)return[{value:w},{value:x}];(o=Math.ceil(x/E)-Math.floor(w/E))>_&&(E=lf(o*E/_/b)*b),Lh(p)||(n=Math.pow(10,p),E=Math.ceil(E*n)/n),"ticks"===l?(r=Math.floor(w/E)*E,i=Math.ceil(x/E)*E):(r=w,i=x),k&&S&&h&&(a=(d-f)/h,s=E/1e3,(u=Math.round(a))-s<=a&&u+s>=a)?(E=(d-f)/(o=Math.round(Math.min((d-f)/E,v))),r=f,i=d):C?E=((i=S?d:i)-(r=k?f:r))/(o=m-1):o=ff(o=(i-r)/E,Math.round(o),E/1e3)?Math.round(o):Math.ceil(o);var T=Math.max(vf(E),vf(r));n=Math.pow(10,Lh(p)?T:p),r=Math.round(r*n)/n,i=Math.round(i*n)/n;var A=0;for(k&&(y&&r!==f?(c.push({value:f}),r<f&&A++,ff(Math.round((r+A*E)*n)/n,f,wy(f,M,t))&&A++):r<f&&A++);A<o;++A)c.push({value:Math.round((r+A*E)*n)/n});return S&&y&&i!==d?ff(c[c.length-1].value,d,wy(d,M,t))?c[c.length-1].value=d:c.push({value:d}):S&&i!==d||c.push({value:i}),c}function wy(t,e,n){var r=n.horizontal,i=pf(n.minRotation),o=(r?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}by.id="category",by.defaults={ticks:{callback:by.prototype.getLabelForValue}};var xy=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this,t)).start=void 0,r.end=void 0,r._startValue=void 0,r._endValue=void 0,r._valueRange=0,r}return Qp(n,[{key:"parse",value:function(t,e){return Lh(t)||("number"===typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}},{key:"handleTickRangeOptions",value:function(){var t=this,e=t.options.beginAtZero,n=t.getUserBounds(),r=n.minDefined,i=n.maxDefined,o=t.min,a=t.max,s=function(t){return o=r?o:t},u=function(t){return a=i?a:t};if(e){var c=cf(o),l=cf(a);c<0&&l<0?u(0):c>0&&l>0&&s(0)}if(o===a){var h=1;(a>=Number.MAX_SAFE_INTEGER||o<=Number.MIN_SAFE_INTEGER)&&(h=Math.abs(.05*a)),u(a+h),e||s(o-h)}t.min=o,t.max=a}},{key:"getTickLimit",value:function(){var t,e=this,n=e.options.ticks,r=n.maxTicksLimit,i=n.stepSize;return i?t=Math.ceil(e.max/i)-Math.floor(e.min/i)+1:(t=e.computeTickLimit(),r=r||11),r&&(t=Math.min(r,t)),t}},{key:"computeTickLimit",value:function(){return Number.POSITIVE_INFINITY}},{key:"buildTicks",value:function(){var t=this,e=t.options,n=e.ticks,r=t.getTickLimit(),i=_y({maxTicks:r=Math.max(2,r),bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:t._maxDigits(),horizontal:t.isHorizontal(),minRotation:n.minRotation||0,includeBounds:!1!==n.includeBounds},t._range||t);return"ticks"===e.bounds&&df(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}},{key:"configure",value:function(){var t=this,e=t.ticks,r=t.min,i=t.max;if(zp(Up(n.prototype),"configure",this).call(this),t.options.offset&&e.length){var o=(i-r)/Math.max(e.length-1,1)/2;r-=o,i+=o}t._startValue=r,t._endValue=i,t._valueRange=i-r}},{key:"getLabelForValue",value:function(t){return Sp(t,this.chart.options.locale)}}]),n}(Lv),ky=function(t){jp(n,t);var e=Fp(n);function n(){return Jp(this,n),e.apply(this,arguments)}return Qp(n,[{key:"determineDataLimits",value:function(){var t=this,e=t.getMinMax(!0),n=e.min,r=e.max;t.min=Rh(n)?n:0,t.max=Rh(r)?r:1,t.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){var t=this,e=t.isHorizontal(),n=e?t.width:t.height,r=pf(t.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,o=t._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}},{key:"getPixelForValue",value:function(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}]),n}(xy);function Sy(t){return 1===t/Math.pow(10,Math.floor(uf(t)))}ky.id="linear",ky.defaults={ticks:{callback:kv.formatters.numeric}};var Cy=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this,t)).start=void 0,r.end=void 0,r._startValue=void 0,r._valueRange=0,r}return Qp(n,[{key:"parse",value:function(t,e){var n=xy.prototype.parse.apply(this,[t,e]);if(0!==n)return Rh(n)&&n>0?n:null;this._zero=!0}},{key:"determineDataLimits",value:function(){var t=this,e=t.getMinMax(!0),n=e.min,r=e.max;t.min=Rh(n)?Math.max(0,n):null,t.max=Rh(r)?Math.max(0,r):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}},{key:"handleTickRangeOptions",value:function(){var t=this,e=t.getUserBounds(),n=e.minDefined,r=e.maxDefined,i=t.min,o=t.max,a=function(t){return i=n?i:t},s=function(t){return o=r?o:t},u=function(t,e){return Math.pow(10,Math.floor(uf(t))+e)};i===o&&(i<=0?(a(1),s(10)):(a(u(i,-1)),s(u(o,1)))),i<=0&&a(u(o,-1)),o<=0&&s(u(i,1)),t._zero&&t.min!==t._suggestedMin&&i===u(t.min,0)&&a(u(i,-1)),t.min=i,t.max=o}},{key:"buildTicks",value:function(){var t=this,e=t.options,n=function(t,e){var n=Math.floor(uf(e.max)),r=Math.ceil(e.max/Math.pow(10,n)),i=[],o=Nh(t.min,Math.pow(10,Math.floor(uf(e.min)))),a=Math.floor(uf(o)),s=Math.floor(o/Math.pow(10,a)),u=a<0?Math.pow(10,Math.abs(a)):1;do{i.push({value:o,major:Sy(o)}),10===++s&&(s=1,u=++a>=0?1:u),o=Math.round(s*Math.pow(10,a)*u)/u}while(a<n||a===n&&s<r);var c=Nh(t.max,o);return i.push({value:c,major:Sy(o)}),i}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&df(n,t,"value"),e.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n}},{key:"getLabelForValue",value:function(t){return void 0===t?"0":Sp(t,this.chart.options.locale)}},{key:"configure",value:function(){var t=this,e=t.min;zp(Up(n.prototype),"configure",this).call(this),t._startValue=uf(e),t._valueRange=uf(t.max)-uf(e)}},{key:"getPixelForValue",value:function(t){var e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(uf(t)-e._startValue)/e._valueRange)}},{key:"getValueForPixel",value:function(t){var e=this,n=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+n*e._valueRange)}}]),n}(Lv);function My(t){var e=t.ticks;if(e.display&&t.display){var n=Ld(e.backdropPadding);return zh(e.font&&e.font.size,hd.font.size)+n.height}return 0}function Ey(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:t<r||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function Ty(t){for(var e,n,r,i={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={},a=[],s=[],u=t.getLabels().length,c=0;c<u;c++){var l=t.options.pointLabels.setContext(t.getPointLabelContext(c));s[c]=l.padding;var h=t.getPointPosition(c,t.drawingArea+s[c]),f=Dd(l.font),d=(e=t.ctx,n=f,r=Dh(r=t._pointLabels[c])?r:[r],{w:dd(e,n.string,r),h:r.length*n.lineHeight});a[c]=d;var p=t.getIndexAngle(c),m=mf(p),v=Ey(m,h.x,d.w,0,180),g=Ey(m,h.y,d.h,90,270);v.start<i.l&&(i.l=v.start,o.l=p),v.end>i.r&&(i.r=v.end,o.r=p),g.start<i.t&&(i.t=g.start,o.t=p),g.end>i.b&&(i.b=g.end,o.b=p)}t._setReductions(t.drawingArea,i,o),t._pointLabelItems=function(t,e,n){for(var r=[],i=t.getLabels().length,o=t.options,a=My(o),s=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max),u=0;u<i;u++){var c=0===u?a/2:0,l=t.getPointPosition(u,s+c+n[u]),h=mf(t.getIndexAngle(u)),f=e[u],d=Py(l.y,f.h,h),p=Ay(h),m=Oy(l.x,f.w,p);r.push({x:l.x,y:d,textAlign:p,left:m,top:d,right:m+f.w,bottom:d+f.h})}return r}(t,a,s)}function Ay(t){return 0===t||180===t?"center":t<180?"left":"right"}function Oy(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Py(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}function Ly(t,e,n,r){var i=t.ctx;if(n)i.arc(t.xCenter,t.yCenter,e,0,tf);else{var o=t.getPointPosition(0,e);i.moveTo(o.x,o.y);for(var a=1;a<r;a++)o=t.getPointPosition(a,e),i.lineTo(o.x,o.y)}}function Dy(t){return hf(t)?t:0}Cy.id="logarithmic",Cy.defaults={ticks:{callback:kv.formatters.logarithmic,major:{enabled:!0}}};var Iy=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this,t)).xCenter=void 0,r.yCenter=void 0,r.drawingArea=void 0,r._pointLabels=[],r._pointLabelItems=[],r}return Qp(n,[{key:"setDimensions",value:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=My(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}},{key:"determineDataLimits",value:function(){var t=this,e=t.getMinMax(!1),n=e.min,r=e.max;t.min=Rh(n)&&!isNaN(n)?n:0,t.max=Rh(r)&&!isNaN(r)?r:0,t.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){return Math.ceil(this.drawingArea/My(this.options))}},{key:"generateTickLabels",value:function(t){var e=this;xy.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map((function(t,n){var r=Bh(e.options.pointLabels.callback,[t,n],e);return r||0===r?r:""}))}},{key:"fit",value:function(){var t=this,e=t.options;e.display&&e.pointLabels.display?Ty(t):t.setCenterPoint(0,0,0,0)}},{key:"_setReductions",value:function(t,e,n){var r=this,i=e.l/Math.sin(n.l),o=Math.max(e.r-r.width,0)/Math.sin(n.r),a=-e.t/Math.cos(n.t),s=-Math.max(e.b-(r.height-r.paddingTop),0)/Math.cos(n.b);i=Dy(i),o=Dy(o),a=Dy(a),s=Dy(s),r.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(i+o)/2),Math.floor(t-(a+s)/2))),r.setCenterPoint(i,o,a,s)}},{key:"setCenterPoint",value:function(t,e,n,r){var i=this,o=i.width-e-i.drawingArea,a=t+i.drawingArea,s=n+i.drawingArea,u=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((a+o)/2+i.left),i.yCenter=Math.floor((s+u)/2+i.top+i.paddingTop)}},{key:"getIndexAngle",value:function(t){return bf(t*(tf/this.getLabels().length)+pf(this.options.startAngle||0))}},{key:"getDistanceFromCenterForValue",value:function(t){var e=this;if(Lh(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*n:(t-e.min)*n}},{key:"getValueForDistanceFromCenter",value:function(t){if(Lh(t))return NaN;var e=this,n=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-n:e.min+n}},{key:"getPointLabelContext",value:function(t){var e=this._pointLabels||[];if(t>=0&&t<e.length){var n=e[t];return function(t,e,n){return Object.assign(Object.create(t),{label:n,index:e,type:"pointLabel"})}(this.getContext(),t,n)}}},{key:"getPointPosition",value:function(t,e){var n=this,r=n.getIndexAngle(t)-of;return{x:Math.cos(r)*e+n.xCenter,y:Math.sin(r)*e+n.yCenter,angle:r}}},{key:"getPointPositionForValue",value:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}},{key:"getBasePosition",value:function(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}},{key:"getPointLabelPosition",value:function(t){var e=this._pointLabelItems[t];return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}},{key:"drawBackground",value:function(){var t=this,e=t.options,n=e.backgroundColor,r=e.grid.circular;if(n){var i=t.ctx;i.save(),i.beginPath(),Ly(t,t.getDistanceFromCenterForValue(t._endValue),r,t.getLabels().length),i.closePath(),i.fillStyle=n,i.fill(),i.restore()}}},{key:"drawGrid",value:function(){var t,e,n,r=this,i=r.ctx,o=r.options,a=o.angleLines,s=o.grid,u=r.getLabels().length;if(o.pointLabels.display&&function(t,e){for(var n=t.ctx,r=t.options.pointLabels,i=e-1;i>=0;i--){var o=r.setContext(t.getPointLabelContext(i)),a=Dd(o.font),s=t._pointLabelItems[i],u=s.x,c=s.y,l=s.textAlign,h=s.left,f=s.top,d=s.right,p=s.bottom,m=o.backdropColor;if(!Lh(m)){var v=Ld(o.backdropPadding);n.fillStyle=m,n.fillRect(h-v.left,f-v.top,d-h+v.width,p-f+v.height)}xd(n,t._pointLabels[i],u,c+a.lineHeight/2,a,{color:o.color,textAlign:l,textBaseline:"middle"})}}(r,u),s.display&&r.ticks.forEach((function(t,n){if(0!==n){e=r.getDistanceFromCenterForValue(t.value);var i=s.setContext(r.getContext(n-1));!function(t,e,n,r){var i=t.ctx,o=e.circular,a=e.color,s=e.lineWidth;!o&&!r||!a||!s||n<0||(i.save(),i.strokeStyle=a,i.lineWidth=s,i.setLineDash(e.borderDash),i.lineDashOffset=e.borderDashOffset,i.beginPath(),Ly(t,n,o,r),i.closePath(),i.stroke(),i.restore())}(r,i,e,u)}})),a.display){for(i.save(),t=r.getLabels().length-1;t>=0;t--){var c=a.setContext(r.getPointLabelContext(t)),l=c.color,h=c.lineWidth;h&&l&&(i.lineWidth=h,i.strokeStyle=l,i.setLineDash(c.borderDash),i.lineDashOffset=c.borderDashOffset,e=r.getDistanceFromCenterForValue(o.ticks.reverse?r.min:r.max),n=r.getPointPosition(t,e),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(n.x,n.y),i.stroke())}i.restore()}}},{key:"drawBorder",value:function(){}},{key:"drawLabels",value:function(){var t=this,e=t.ctx,n=t.options,r=n.ticks;if(r.display){var i,o,a=t.getIndexAngle(0);e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(a),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach((function(a,s){if(0!==s||n.reverse){var u=r.setContext(t.getContext(s)),c=Dd(u.font);if(i=t.getDistanceFromCenterForValue(t.ticks[s].value),u.showLabelBackdrop){e.font=c.string,o=e.measureText(a.label).width,e.fillStyle=u.backdropColor;var l=Ld(u.backdropPadding);e.fillRect(-o/2-l.left,-i-c.size/2-l.top,o+l.width,c.size+l.height)}xd(e,a.label,0,-i,c,{color:u.color})}})),e.restore()}}},{key:"drawTitle",value:function(){}}]),n}(xy);Iy.id="radialLinear",Iy.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:kv.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:function(t){return t},padding:5}},Iy.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Iy.descriptors={angleLines:{_fallback:"grid"}};var Ry={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ny=Object.keys(Ry);function zy(t,e){return t-e}function jy(t,e){if(Lh(e))return null;var n=t._adapter,r=t._parseOpts,i=r.parser,o=r.round,a=r.isoWeekday,s=e;return"function"===typeof i&&(s=i(s)),Rh(s)||(s="string"===typeof i?n.parse(s,i):n.parse(s)),null===s?null:(o&&(s="week"!==o||!hf(a)&&!0!==a?n.startOf(s,o):n.startOf(s,"isoWeek",a)),+s)}function By(t,e,n,r){for(var i=Ny.length,o=Ny.indexOf(t);o<i-1;++o){var a=Ry[Ny[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(s*a.size))<=r)return Ny[o]}return Ny[i-1]}function Fy(t,e,n){if(n){if(n.length){var r=Rd(n,e),i=r.lo,o=r.hi;t[n[i]>=e?n[i]:n[o]]=!0}}else t[e]=!0}function qy(t,e,n){var r,i,o=[],a={},s=e.length;for(r=0;r<s;++r)a[i=e[r]]=r,o.push({value:i,major:!1});return 0!==s&&n?function(t,e,n,r){var i,o,a=t._adapter,s=+a.startOf(e[0].value,r),u=e[e.length-1].value;for(i=s;i<=u;i=+a.add(i,1,r))(o=n[i])>=0&&(e[o].major=!0);return e}(t,o,a,n):o}var Vy=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this,t))._cache={data:[],labels:[],all:[]},r._unit="day",r._majorUnit=void 0,r._offsets={},r._normalized=!1,r._parseOpts=void 0,r}return Qp(n,[{key:"init",value:function(t,e){var r=t.time||(t.time={}),i=this._adapter=new Nm._date(t.adapters.date);$h(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},zp(Up(n.prototype),"init",this).call(this,t),this._normalized=e.normalized}},{key:"parse",value:function(t,e){return void 0===t?null:jy(this,t)}},{key:"beforeLayout",value:function(){zp(Up(n.prototype),"beforeLayout",this).call(this),this._cache={data:[],labels:[],all:[]}}},{key:"determineDataLimits",value:function(){var t=this,e=t.options,n=t._adapter,r=e.time.unit||"day",i=t.getUserBounds(),o=i.min,a=i.max,s=i.minDefined,u=i.maxDefined;function c(t){s||isNaN(t.min)||(o=Math.min(o,t.min)),u||isNaN(t.max)||(a=Math.max(a,t.max))}s&&u||(c(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||c(t.getMinMax(!1))),o=Rh(o)&&!isNaN(o)?o:+n.startOf(Date.now(),r),a=Rh(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,t.min=Math.min(o,a-1),t.max=Math.max(o+1,a)}},{key:"_getLabelBounds",value:function(){var t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}},{key:"buildTicks",value:function(){var t=this,e=t.options,n=e.time,r=e.ticks,i="labels"===r.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&i.length&&(t.min=t._userMin||i[0],t.max=t._userMax||i[i.length-1]);var o=t.min,a=function(t,e,n){for(var r=0,i=t.length;r<i&&t[r]<e;)r++;for(;i>r&&t[i-1]>n;)i--;return r>0||i<t.length?t.slice(r,i):t}(i,o,t.max);return t._unit=n.unit||(r.autoSkip?By(n.minUnit,t.min,t.max,t._getLabelCapacity(o)):function(t,e,n,r,i){for(var o=Ny.length-1;o>=Ny.indexOf(n);o--){var a=Ny[o];if(Ry[a].common&&t._adapter.diff(i,r,a)>=e-1)return a}return Ny[n?Ny.indexOf(n):0]}(t,a.length,n.minUnit,t.min,t.max)),t._majorUnit=r.major.enabled&&"year"!==t._unit?function(t){for(var e=Ny.indexOf(t)+1,n=Ny.length;e<n;++e)if(Ry[Ny[e]].common)return Ny[e]}(t._unit):void 0,t.initOffsets(i),e.reverse&&a.reverse(),qy(t,a,t._majorUnit)}},{key:"initOffsets",value:function(t){var e,n,r=this,i=0,o=0;r.options.offset&&t.length&&(e=r.getDecimalForValue(t[0]),i=1===t.length?1-e:(r.getDecimalForValue(t[1])-e)/2,n=r.getDecimalForValue(t[t.length-1]),o=1===t.length?n:(n-r.getDecimalForValue(t[t.length-2]))/2);var a=t.length<3?.5:.25;i=wf(i,0,a),o=wf(o,0,a),r._offsets={start:i,end:o,factor:1/(i+1+o)}}},{key:"_generate",value:function(){var t,e,n=this,r=n._adapter,i=n.min,o=n.max,a=n.options,s=a.time,u=s.unit||By(s.minUnit,i,o,n._getLabelCapacity(i)),c=zh(s.stepSize,1),l="week"===u&&s.isoWeekday,h=hf(l)||!0===l,f={},d=i;if(h&&(d=+r.startOf(d,"isoWeek",l)),d=+r.startOf(d,h?"day":u),r.diff(o,i,u)>1e5*c)throw new Error(i+" and "+o+" are too far apart with stepSize of "+c+" "+u);var p="data"===a.ticks.source&&n.getDataTimestamps();for(t=d,e=0;t<o;t=+r.add(t,c,u),e++)Fy(f,t,p);return t!==o&&"ticks"!==a.bounds&&1!==e||Fy(f,t,p),Object.keys(f).sort((function(t,e){return t-e})).map((function(t){return+t}))}},{key:"getLabelForValue",value:function(t){var e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}},{key:"_tickFormatFunction",value:function(t,e,n,r){var i=this,o=i.options,a=o.time.displayFormats,s=i._unit,u=i._majorUnit,c=s&&a[s],l=u&&a[u],h=n[e],f=u&&l&&h&&h.major,d=i._adapter.format(t,r||(f?l:c)),p=o.ticks.callback;return p?Bh(p,[d,e,n],i):d}},{key:"generateTickLabels",value:function(t){var e,n,r;for(e=0,n=t.length;e<n;++e)(r=t[e]).label=this._tickFormatFunction(r.value,e,t)}},{key:"getDecimalForValue",value:function(t){var e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}},{key:"getPixelForValue",value:function(t){var e=this,n=e._offsets,r=e.getDecimalForValue(t);return e.getPixelForDecimal((n.start+r)*n.factor)}},{key:"getValueForPixel",value:function(t){var e=this,n=e._offsets,r=e.getDecimalForPixel(t)/n.factor-n.end;return e.min+r*(e.max-e.min)}},{key:"_getLabelSize",value:function(t){var e=this,n=e.options.ticks,r=e.ctx.measureText(t).width,i=pf(e.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=e._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}},{key:"_getLabelCapacity",value:function(t){var e=this,n=e.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=e._tickFormatFunction(t,0,qy(e,[t],e._majorUnit),i),a=e._getLabelSize(o),s=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h)-1;return s>0?s:1}},{key:"getDataTimestamps",value:function(){var t,e,n=this,r=n._cache.data||[];if(r.length)return r;var i=n.getMatchingVisibleMetas();if(n._normalized&&i.length)return n._cache.data=i[0].controller.getAllParsedValues(n);for(t=0,e=i.length;t<e;++t)r=r.concat(i[t].controller.getAllParsedValues(n));return n._cache.data=n.normalize(r)}},{key:"getLabelTimestamps",value:function(){var t,e,n=this,r=n._cache.labels||[];if(r.length)return r;var i=n.getLabels();for(t=0,e=i.length;t<e;++t)r.push(jy(n,i[t]));return n._cache.labels=n._normalized?r:n.normalize(r)}},{key:"normalize",value:function(t){return Fd(t.sort(zy))}}]),n}(Lv);function Uy(t,e,n){var r,i,o,a,s=0,u=t.length-1;if(n){if(e>=t[s].pos&&e<=t[u].pos){var c=Nd(t,"pos",e);s=c.lo,u=c.hi}var l=t[s];r=l.pos,o=l.time;var h=t[u];i=h.pos,a=h.time}else{if(e>=t[s].time&&e<=t[u].time){var f=Nd(t,"time",e);s=f.lo,u=f.hi}var d=t[s];r=d.time,o=d.pos;var p=t[u];i=p.time,a=p.pos}var m=i-r;return m?o+(a-o)*(e-r)/m:o}Vy.id="time",Vy.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};var Hy=function(t){jp(n,t);var e=Fp(n);function n(t){var r;return Jp(this,n),(r=e.call(this,t))._table=[],r._minPos=void 0,r._tableRange=void 0,r}return Qp(n,[{key:"initOffsets",value:function(){var t=this,e=t._getTimestampsForTable(),r=t._table=t.buildLookupTable(e);t._minPos=Uy(r,t.min),t._tableRange=Uy(r,t.max)-t._minPos,zp(Up(n.prototype),"initOffsets",this).call(this,e)}},{key:"buildLookupTable",value:function(t){var e,n,r,i,o,a=this.min,s=this.max,u=[],c=[];for(e=0,n=t.length;e<n;++e)(i=t[e])>=a&&i<=s&&u.push(i);if(u.length<2)return[{time:a,pos:0},{time:s,pos:1}];for(e=0,n=u.length;e<n;++e)o=u[e+1],r=u[e-1],i=u[e],Math.round((o+r)/2)!==i&&c.push({time:i,pos:e/(n-1)});return c}},{key:"_getTimestampsForTable",value:function(){var t=this,e=t._cache.all||[];if(e.length)return e;var n=t.getDataTimestamps(),r=t.getLabelTimestamps();return e=n.length&&r.length?t.normalize(n.concat(r)):n.length?n:r,e=t._cache.all=e}},{key:"getDecimalForValue",value:function(t){return(Uy(this._table,t)-this._minPos)/this._tableRange}},{key:"getValueForPixel",value:function(t){var e=this,n=e._offsets,r=e.getDecimalForPixel(t)/n.factor-n.end;return Uy(e._table,r*e._tableRange+e._minPos,!0)}}]),n}(Vy);Hy.id="timeseries",Hy.defaults=Vy.defaults;var Wy=[Dm,Og,gy,Object.freeze({__proto__:null,CategoryScale:by,LinearScale:ky,LogarithmicScale:Cy,RadialLinearScale:Iy,TimeScale:Vy,TimeSeriesScale:Hy})];function $y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}rg.register.apply(rg,function(t){return function(t){if(Array.isArray(t))return $y(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return $y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $y(t,e)}(t)||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.")}()}(Wy));var Zy=rg;function Yy(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Gy(t){return(Gy="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ky(t){Yy(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Gy(t)&&"[object Date]"===e?new Date(t.getTime()):"number"===typeof t||"[object Number]"===e?new Date(t):("string"!==typeof t&&"[object String]"!==e||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}var Jy={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Xy=function(t,e,n){var r,i=Jy[t];return r="string"===typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Qy(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var tb={date:Qy({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Qy({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Qy({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},eb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function nb(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,u=i.width?String(i.width):t.defaultWidth;r=t.values[u]||t.values[s]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function rb(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;var a,s=o[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(u)?ob(u,(function(t){return t.test(s)})):ib(u,(function(t){return t.test(s)}));a=t.valueCallback?t.valueCallback(c):c,a=n.valueCallback?n.valueCallback(a):a;var l=e.slice(s.length);return{value:a,rest:l}}}function ib(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function ob(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}var ab,sb={code:"en-US",formatDistance:Xy,formatLong:tb,formatRelative:function(t,e,n,r){return eb[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:nb({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:nb({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:nb({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:nb({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:nb({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ab={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(ab.matchPattern);if(!n)return null;var r=n[0],i=t.match(ab.parsePattern);if(!i)return null;var o=ab.valueCallback?ab.valueCallback(i[0]):i[0];o=e.valueCallback?e.valueCallback(o):o;var a=t.slice(r.length);return{value:o,rest:a}}),era:rb({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:rb({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:rb({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:rb({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:rb({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function ub(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function cb(t,e){Yy(2,arguments);var n=Ky(t).getTime(),r=ub(e);return new Date(n+r)}function lb(t,e){Yy(2,arguments);var n=ub(e);return cb(t,-n)}function hb(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e=e||{})Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function fb(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function db(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var pb={p:db,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return fb(t,e);switch(i){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",fb(i,e)).replace("{{time}}",db(o,e))}};function mb(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var vb=["D","DD"],gb=["YY","YYYY"];function yb(t){return-1!==vb.indexOf(t)}function bb(t){return-1!==gb.indexOf(t)}function _b(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}function wb(t,e){Yy(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:ub(i),a=null==n.weekStartsOn?o:ub(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Ky(t),u=s.getUTCDay(),c=(u<a?7:0)+u-a;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function xb(t,e){Yy(1,arguments);var n=Ky(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:ub(a),u=null==i.firstWeekContainsDate?s:ub(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=wb(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=wb(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function kb(t,e,n){Yy(2,arguments);var r=n||{},i=r.locale,o=i&&i.options&&i.options.weekStartsOn,a=null==o?0:ub(o),s=null==r.weekStartsOn?a:ub(r.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Ky(t),c=ub(e),l=u.getUTCDay(),h=c%7,f=(h+7)%7,d=(f<s?7:0)+c-l;return u.setUTCDate(u.getUTCDate()+d),u}function Sb(t){Yy(1,arguments);var e=1,n=Ky(t),r=n.getUTCDay(),i=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function Cb(t){Yy(1,arguments);var e=Ky(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Sb(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=Sb(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Mb(t){Yy(1,arguments);var e=Cb(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Sb(n);return r}var Eb=6048e5;function Tb(t){Yy(1,arguments);var e=Ky(t),n=Sb(e).getTime()-Mb(e).getTime();return Math.round(n/Eb)+1}function Ab(t,e){Yy(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,o=null==i?1:ub(i),a=null==n.firstWeekContainsDate?o:ub(n.firstWeekContainsDate),s=xb(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var c=wb(u,e);return c}var Ob=6048e5;function Pb(t,e){Yy(1,arguments);var n=Ky(t),r=wb(n,e).getTime()-Ab(n,e).getTime();return Math.round(r/Ob)+1}var Lb=/^(1[0-2]|0?\d)/,Db=/^(3[0-1]|[0-2]?\d)/,Ib=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Rb=/^(5[0-3]|[0-4]?\d)/,Nb=/^(2[0-3]|[0-1]?\d)/,zb=/^(2[0-4]|[0-1]?\d)/,jb=/^(1[0-1]|0?\d)/,Bb=/^(1[0-2]|0?\d)/,Fb=/^[0-5]?\d/,qb=/^[0-5]?\d/,Vb=/^\d/,Ub=/^\d{1,2}/,Hb=/^\d{1,3}/,Wb=/^\d{1,4}/,$b=/^-?\d+/,Zb=/^-?\d/,Yb=/^-?\d{1,2}/,Gb=/^-?\d{1,3}/,Kb=/^-?\d{1,4}/,Jb=/^([+-])(\d{2})(\d{2})?|Z/,Xb=/^([+-])(\d{2})(\d{2})|Z/,Qb=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,t_=/^([+-])(\d{2}):(\d{2})|Z/,e_=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function n_(t,e,n){var r=e.match(t);if(!r)return null;var i=parseInt(r[0],10);return{value:n?n(i):i,rest:e.slice(r[0].length)}}function r_(t,e){var n=e.match(t);return n?"Z"===n[0]?{value:0,rest:e.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:e.slice(n[0].length)}:null}function i_(t,e){return n_($b,t,e)}function o_(t,e,n){switch(t){case 1:return n_(Vb,e,n);case 2:return n_(Ub,e,n);case 3:return n_(Hb,e,n);case 4:return n_(Wb,e,n);default:return n_(new RegExp("^\\d{1,"+t+"}"),e,n)}}function a_(t,e,n){switch(t){case 1:return n_(Zb,e,n);case 2:return n_(Yb,e,n);case 3:return n_(Gb,e,n);case 4:return n_(Kb,e,n);default:return n_(new RegExp("^-?\\d{1,"+t+"}"),e,n)}}function s_(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function u_(t,e){var n,r=e>0,i=r?e:1-e;if(i<=50)n=t||100;else{var o=i+50;n=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return r?n:1-n}var c_=[31,28,31,30,31,30,31,31,30,31,30,31],l_=[31,29,31,30,31,30,31,31,30,31,30,31];function h_(t){return t%400===0||t%4===0&&t%100!==0}var f_={G:{priority:140,parse:function(t,e,n,r){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}},set:function(t,e,n,r){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(t,e,n,r){var i=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return o_(4,t,i);case"yo":return n.ordinalNumber(t,{unit:"year",valueCallback:i});default:return o_(e.length,t,i)}},validate:function(t,e,n){return e.isTwoDigitYear||e.year>0},set:function(t,e,n,r){var i=t.getUTCFullYear();if(n.isTwoDigitYear){var o=u_(n.year,i);return t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t}var a="era"in e&&1!==e.era?1-n.year:n.year;return t.setUTCFullYear(a,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(t,e,n,r){var i=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return o_(4,t,i);case"Yo":return n.ordinalNumber(t,{unit:"year",valueCallback:i});default:return o_(e.length,t,i)}},validate:function(t,e,n){return e.isTwoDigitYear||e.year>0},set:function(t,e,n,r){var i=xb(t,r);if(n.isTwoDigitYear){var o=u_(n.year,i);return t.setUTCFullYear(o,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),wb(t,r)}var a="era"in e&&1!==e.era?1-n.year:n.year;return t.setUTCFullYear(a,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),wb(t,r)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(t,e,n,r){return a_("R"===e?4:e.length,t)},set:function(t,e,n,r){var i=new Date(0);return i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),Sb(i)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(t,e,n,r){return a_("u"===e?4:e.length,t)},set:function(t,e,n,r){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(t,e,n,r){switch(e){case"Q":case"QQ":return o_(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=1&&e<=4},set:function(t,e,n,r){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(t,e,n,r){switch(e){case"q":case"qq":return o_(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=1&&e<=4},set:function(t,e,n,r){return t.setUTCMonth(3*(n-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(t,e,n,r){var i=function(t){return t-1};switch(e){case"M":return n_(Lb,t,i);case"MM":return o_(2,t,i);case"Mo":return n.ordinalNumber(t,{unit:"month",valueCallback:i});case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n,r){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(t,e,n,r){var i=function(t){return t-1};switch(e){case"L":return n_(Lb,t,i);case"LL":return o_(2,t,i);case"Lo":return n.ordinalNumber(t,{unit:"month",valueCallback:i});case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n,r){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(t,e,n,r){switch(e){case"w":return n_(Rb,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return o_(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=53},set:function(t,e,n,r){return wb(function(t,e,n){Yy(2,arguments);var r=Ky(t),i=ub(e),o=Pb(r,n)-i;return r.setUTCDate(r.getUTCDate()-7*o),r}(t,n,r),r)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(t,e,n,r){switch(e){case"I":return n_(Rb,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return o_(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=53},set:function(t,e,n,r){return Sb(function(t,e){Yy(2,arguments);var n=Ky(t),r=ub(e),i=Tb(n)-r;return n.setUTCDate(n.getUTCDate()-7*i),n}(t,n,r),r)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(t,e,n,r){switch(e){case"d":return n_(Db,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return o_(e.length,t)}},validate:function(t,e,n){var r=h_(t.getUTCFullYear()),i=t.getUTCMonth();return r?e>=1&&e<=l_[i]:e>=1&&e<=c_[i]},set:function(t,e,n,r){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(t,e,n,r){switch(e){case"D":case"DD":return n_(Ib,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return o_(e.length,t)}},validate:function(t,e,n){return h_(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365},set:function(t,e,n,r){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(t,e,n,r){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n,r){return(t=kb(t,n,r)).setUTCHours(0,0,0,0),t},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(t,e,n,r){var i=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return o_(e.length,t,i);case"eo":return n.ordinalNumber(t,{unit:"day",valueCallback:i});case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n,r){return(t=kb(t,n,r)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(t,e,n,r){var i=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return o_(e.length,t,i);case"co":return n.ordinalNumber(t,{unit:"day",valueCallback:i});case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n,r){return(t=kb(t,n,r)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(t,e,n,r){var i=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return o_(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return n.day(t,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiiii":return n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiiiii":return n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiii":default:return n.day(t,{width:"wide",context:"formatting",valueCallback:i})||n.day(t,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i})}},validate:function(t,e,n){return e>=1&&e<=7},set:function(t,e,n,r){return(t=function(t,e){Yy(2,arguments);var n=ub(e);n%7===0&&(n-=7);var r=1,i=Ky(t),o=i.getUTCDay(),a=((n%7+7)%7<r?7:0)+n-o;return i.setUTCDate(i.getUTCDate()+a),i}(t,n,r)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(t,e,n,r){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,r){return t.setUTCHours(s_(n),0,0,0),t},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(t,e,n,r){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,r){return t.setUTCHours(s_(n),0,0,0),t},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(t,e,n,r){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,r){return t.setUTCHours(s_(n),0,0,0),t},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(t,e,n,r){switch(e){case"h":return n_(Bb,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return o_(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=12},set:function(t,e,n,r){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):i||12!==n?t.setUTCHours(n,0,0,0):t.setUTCHours(0,0,0,0),t},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(t,e,n,r){switch(e){case"H":return n_(Nb,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return o_(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=23},set:function(t,e,n,r){return t.setUTCHours(n,0,0,0),t},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(t,e,n,r){switch(e){case"K":return n_(jb,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return o_(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n,r){return t.getUTCHours()>=12&&n<12?t.setUTCHours(n+12,0,0,0):t.setUTCHours(n,0,0,0),t},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(t,e,n,r){switch(e){case"k":return n_(zb,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return o_(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=24},set:function(t,e,n,r){var i=n<=24?n%24:n;return t.setUTCHours(i,0,0,0),t},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(t,e,n,r){switch(e){case"m":return n_(Fb,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return o_(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=59},set:function(t,e,n,r){return t.setUTCMinutes(n,0,0),t},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(t,e,n,r){switch(e){case"s":return n_(qb,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return o_(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=59},set:function(t,e,n,r){return t.setUTCSeconds(n,0),t},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(t,e,n,r){return o_(e.length,t,(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))},set:function(t,e,n,r){return t.setUTCMilliseconds(n),t},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(t,e,n,r){switch(e){case"X":return r_(Jb,t);case"XX":return r_(Xb,t);case"XXXX":return r_(Qb,t);case"XXXXX":return r_(e_,t);case"XXX":default:return r_(t_,t)}},set:function(t,e,n,r){return e.timestampIsSet?t:new Date(t.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(t,e,n,r){switch(e){case"x":return r_(Jb,t);case"xx":return r_(Xb,t);case"xxxx":return r_(Qb,t);case"xxxxx":return r_(e_,t);case"xxx":default:return r_(t_,t)}},set:function(t,e,n,r){return e.timestampIsSet?t:new Date(t.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(t,e,n,r){return i_(t)},set:function(t,e,n,r){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(t,e,n,r){return i_(t)},set:function(t,e,n,r){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},d_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,p_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m_=/^'([^]*?)'?$/,v_=/''/g,g_=/\S/,y_=/[a-zA-Z]/;function b_(t,e){if(e.timestampIsSet)return t;var n=new Date(0);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}function __(t){return t.match(m_)[1].replace(v_,"'")}var w_=36e5,x_={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},k_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,S_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,C_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function M_(t){var e,n={},r=t.split(x_.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?(n.date=null,e=r[0]):(n.date=r[0],e=r[1],x_.timeZoneDelimiter.test(n.date)&&(n.date=t.split(x_.timeZoneDelimiter)[0],e=t.substr(n.date.length,t.length))),e){var i=x_.timezone.exec(e);i?(n.time=e.replace(i[1],""),n.timezone=i[1]):n.time=e}return n}function E_(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:null};var i=r[1]&&parseInt(r[1]),o=r[2]&&parseInt(r[2]);return{year:null==o?i:100*o,restDateString:t.slice((r[1]||r[2]).length)}}function T_(t,e){if(null===e)return null;var n=t.match(k_);if(!n)return null;var r=!!n[4],i=A_(n[1]),o=A_(n[2])-1,a=A_(n[3]),s=A_(n[4]),u=A_(n[5])-1;if(r)return function(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}(0,s,u)?function(t,e,n){var r=new Date(0);r.setUTCFullYear(t,0,4);var i=r.getUTCDay()||7,o=7*(e-1)+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}(e,s,u):new Date(NaN);var c=new Date(0);return function(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(D_[e]||(I_(t)?29:28))}(e,o,a)&&function(t,e){return e>=1&&e<=(I_(t)?366:365)}(e,i)?(c.setUTCFullYear(e,o,Math.max(i,a)),c):new Date(NaN)}function A_(t){return t?parseInt(t):1}function O_(t){var e=t.match(S_);if(!e)return null;var n=P_(e[1]),r=P_(e[2]),i=P_(e[3]);return function(t,e,n){if(24===t)return 0===e&&0===n;return n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}(n,r,i)?n*w_+6e4*r+1e3*i:NaN}function P_(t){return t&&parseFloat(t.replace(",","."))||0}function L_(t){if("Z"===t)return 0;var e=t.match(C_);if(!e)return 0;var n="+"===e[1]?-1:1,r=parseInt(e[2]),i=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,i)?n*(r*w_+6e4*i):NaN}var D_=[31,null,31,30,31,30,31,31,30,31,30,31];function I_(t){return t%400===0||t%4===0&&t%100}function R_(t){return(R_="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function N_(t){return Yy(1,arguments),t instanceof Date||"object"===R_(t)&&"[object Date]"===Object.prototype.toString.call(t)}function z_(t){if(Yy(1,arguments),!N_(t)&&"number"!==typeof t)return!1;var e=Ky(t);return!isNaN(Number(e))}function j_(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var B_={y:function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return j_("yy"===e?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):j_(n+1,2)},d:function(t,e){return j_(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return j_(t.getUTCHours()%12||12,e.length)},H:function(t,e){return j_(t.getUTCHours(),e.length)},m:function(t,e){return j_(t.getUTCMinutes(),e.length)},s:function(t,e){return j_(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds();return j_(Math.floor(r*Math.pow(10,n-3)),e.length)}},F_=864e5;var q_="midnight",V_="noon",U_="morning",H_="afternoon",W_="evening",$_="night";function Z_(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+j_(o,2)}function Y_(t,e){return t%60===0?(t>0?"-":"+")+j_(Math.abs(t)/60,2):G_(t,e)}function G_(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+j_(Math.floor(i/60),2)+n+j_(i%60,2)}var K_={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return B_.y(t,e)},Y:function(t,e,n,r){var i=xb(t,r),o=i>0?i:1-i;return"YY"===e?j_(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):j_(o,e.length)},R:function(t,e){return j_(Cb(t),e.length)},u:function(t,e){return j_(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return j_(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return j_(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return B_.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return j_(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=Pb(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):j_(i,e.length)},I:function(t,e,n){var r=Tb(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):j_(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):B_.d(t,e)},D:function(t,e,n){var r=function(t){Yy(1,arguments);var e=Ky(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/F_)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):j_(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return j_(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return j_(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return j_(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?V_:0===i?q_:i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?W_:i>=12?H_:i>=4?U_:$_,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return B_.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):B_.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):j_(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):j_(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):B_.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):B_.s(t,e)},S:function(t,e){return B_.S(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Y_(i);case"XXXX":case"XX":return G_(i);case"XXXXX":case"XXX":default:return G_(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Y_(i);case"xxxx":case"xx":return G_(i);case"xxxxx":case"xxx":default:return G_(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Z_(i,":");case"OOOO":default:return"GMT"+G_(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Z_(i,":");case"zzzz":default:return"GMT"+G_(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return j_(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return j_((r._originalDate||t).getTime(),e.length)}},J_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,X_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Q_=/^'([^]*?)'?$/,tw=/''/g,ew=/[a-zA-Z]/;function nw(t){return t.match(Q_)[1].replace(tw,"'")}var rw=36e5;function iw(t,e){Yy(2,arguments);var n=Ky(t),r=ub(e);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function ow(t,e){Yy(2,arguments);var n=Ky(t),r=ub(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var a=o.getDate();return i>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function aw(t,e){return Yy(2,arguments),Ky(t).getTime()-Ky(e).getTime()}var sw={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}};function uw(t){return t?sw[t]:sw.trunc}Math.pow(10,8);var cw=36e5;function lw(t){Yy(1,arguments);var e=Ky(t);return e.setHours(0,0,0,0),e}var hw=864e5;function fw(t,e){Yy(2,arguments);var n=lw(t),r=lw(e),i=n.getTime()-mb(n),o=r.getTime()-mb(r);return Math.round((i-o)/hw)}function dw(t,e){var n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function pw(t,e){Yy(2,arguments);var n=Ky(t),r=Ky(e),i=dw(n,r),o=Math.abs(fw(n,r));n.setDate(n.getDate()-i*o);var a=Number(dw(n,r)===-i),s=i*(o-a);return 0===s?0:s}function mw(t,e){Yy(2,arguments);var n=Ky(t),r=Ky(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function vw(t,e){Yy(2,arguments);var n=Ky(t),r=Ky(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function gw(t){Yy(1,arguments);var e=Ky(t);return e.setHours(23,59,59,999),e}function yw(t){Yy(1,arguments);var e=Ky(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function bw(t){Yy(1,arguments);var e=Ky(t);return gw(e).getTime()===yw(e).getTime()}function _w(t,e){Yy(2,arguments);var n,r=Ky(t),i=Ky(e),o=vw(r,i),a=Math.abs(mw(r,i));if(a<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*a);var s=vw(r,i)===-o;bw(Ky(t))&&1===a&&1===vw(t,i)&&(s=!1),n=o*(a-Number(s))}return 0===n?0:n}function ww(t,e){Yy(2,arguments);var n=Ky(t),r=Ky(e);return n.getFullYear()-r.getFullYear()}function xw(t,e){Yy(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:ub(i),a=null==n.weekStartsOn?o:ub(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Ky(t),u=s.getDay(),c=(u<a?7:0)+u-a;return s.setDate(s.getDate()-c),s.setHours(0,0,0,0),s}function kw(t){return(kw="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Sw={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Nm._date.override({_id:"date-fns",formats:function(){return Sw},parse:function(t,e){if(null===t||"undefined"===typeof t)return null;var n=kw(t);return"number"===n||t instanceof Date?t=Ky(t):"string"===n&&(t="string"===typeof e?function(t,e,n,r){Yy(3,arguments);var i=String(t),o=String(e),a=r||{},s=a.locale||sb;if(!s.match)throw new RangeError("locale must contain match property");var u=s.options&&s.options.firstWeekContainsDate,c=null==u?1:ub(u),l=null==a.firstWeekContainsDate?c:ub(a.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=s.options&&s.options.weekStartsOn,f=null==h?0:ub(h),d=null==a.weekStartsOn?f:ub(a.weekStartsOn);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===o)return""===i?Ky(n):new Date(NaN);var p,m={firstWeekContainsDate:l,weekStartsOn:d,locale:s},v=[{priority:10,subPriority:-1,set:b_,index:0}],g=o.match(p_).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,pb[e])(t,s.formatLong,m):t})).join("").match(d_),y=[];for(p=0;p<g.length;p++){var b=g[p];!a.useAdditionalWeekYearTokens&&bb(b)&&_b(b,o,t),!a.useAdditionalDayOfYearTokens&&yb(b)&&_b(b,o,t);var _=b[0],w=f_[_];if(w){var x=w.incompatibleTokens;if(Array.isArray(x)){for(var k=void 0,S=0;S<y.length;S++){var C=y[S].token;if(-1!==x.indexOf(C)||C===_){k=y[S];break}}if(k)throw new RangeError("The format string mustn't contain `".concat(k.fullToken,"` and `").concat(b,"` at the same time"))}else if("*"===w.incompatibleTokens&&y.length)throw new RangeError("The format string mustn't contain `".concat(b,"` and any other token at the same time"));y.push({token:_,fullToken:b});var M=w.parse(i,b,s.match,m);if(!M)return new Date(NaN);v.push({priority:w.priority,subPriority:w.subPriority||0,set:w.set,validate:w.validate,value:M.value,index:v.length}),i=M.rest}else{if(_.match(y_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if("''"===b?b="'":"'"===_&&(b=__(b)),0!==i.indexOf(b))return new Date(NaN);i=i.slice(b.length)}}if(i.length>0&&g_.test(i))return new Date(NaN);var E=v.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,n){return n.indexOf(t)===e})).map((function(t){return v.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),T=Ky(n);if(isNaN(T))return new Date(NaN);var A=lb(T,mb(T)),O={};for(p=0;p<E.length;p++){var P=E[p];if(P.validate&&!P.validate(A,P.value,m))return new Date(NaN);var L=P.set(A,O,P.value,m);L[0]?(A=L[0],hb(O,L[1])):A=L}return A}(t,e,new Date,this.options):function(t,e){Yy(1,arguments);var n=e||{},r=null==n.additionalDigits?2:ub(n.additionalDigits);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var i,o=M_(t);if(o.date){var a=E_(o.date,r);i=T_(a.restDateString,a.year)}if(isNaN(i)||!i)return new Date(NaN);var s,u=i.getTime(),c=0;if(o.time&&(c=O_(o.time),isNaN(c)||null===c))return new Date(NaN);if(!o.timezone){var l=new Date(u+c),h=new Date(0);return h.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),h.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),h}return s=L_(o.timezone),isNaN(s)?new Date(NaN):new Date(u+c+s)}(t,this.options)),z_(t)?t.getTime():null},format:function(t,e){return function(t,e,n){Yy(2,arguments);var r=String(e),i=n||{},o=i.locale||sb,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:ub(a),u=null==i.firstWeekContainsDate?s:ub(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=o.options&&o.options.weekStartsOn,l=null==c?0:ub(c),h=null==i.weekStartsOn?l:ub(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var f=Ky(t);if(!z_(f))throw new RangeError("Invalid time value");var d=mb(f),p=lb(f,d),m={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f};return r.match(X_).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,pb[e])(t,o.formatLong,m):t})).join("").match(J_).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return nw(n);var a=K_[r];if(a)return!i.useAdditionalWeekYearTokens&&bb(n)&&_b(n,e,t),!i.useAdditionalDayOfYearTokens&&yb(n)&&_b(n,e,t),a(p,n,o.localize,m);if(r.match(ew))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("")}(t,e,this.options)},add:function(t,e,n){switch(n){case"millisecond":return cb(t,e);case"second":return function(t,e){Yy(2,arguments);var n=ub(e);return cb(t,1e3*n)}(t,e);case"minute":return function(t,e){Yy(2,arguments);var n=ub(e);return cb(t,6e4*n)}(t,e);case"hour":return function(t,e){Yy(2,arguments);var n=ub(e);return cb(t,n*rw)}(t,e);case"day":return iw(t,e);case"week":return function(t,e){Yy(2,arguments);var n=ub(e);return iw(t,7*n)}(t,e);case"month":return ow(t,e);case"quarter":return function(t,e){Yy(2,arguments);var n=ub(e);return ow(t,3*n)}(t,e);case"year":return function(t,e){Yy(2,arguments);var n=ub(e);return ow(t,12*n)}(t,e);default:return t}},diff:function(t,e,n){switch(n){case"millisecond":return aw(t,e);case"second":return function(t,e,n){Yy(2,arguments);var r=aw(t,e)/1e3;return uw(null===n||void 0===n?void 0:n.roundingMethod)(r)}(t,e);case"minute":return function(t,e,n){Yy(2,arguments);var r=aw(t,e)/6e4;return uw(null===n||void 0===n?void 0:n.roundingMethod)(r)}(t,e);case"hour":return function(t,e,n){Yy(2,arguments);var r=aw(t,e)/cw;return uw(null===n||void 0===n?void 0:n.roundingMethod)(r)}(t,e);case"day":return pw(t,e);case"week":return function(t,e,n){Yy(2,arguments);var r=pw(t,e)/7;return uw(null===n||void 0===n?void 0:n.roundingMethod)(r)}(t,e);case"month":return _w(t,e);case"quarter":return function(t,e,n){Yy(2,arguments);var r=_w(t,e)/3;return uw(null===n||void 0===n?void 0:n.roundingMethod)(r)}(t,e);case"year":return function(t,e){Yy(2,arguments);var n=Ky(t),r=Ky(e),i=vw(n,r),o=Math.abs(ww(n,r));n.setFullYear(1584),r.setFullYear(1584);var a=vw(n,r)===-i,s=i*(o-Number(a));return 0===s?0:s}(t,e);default:return 0}},startOf:function(t,e,n){switch(e){case"second":return function(t){Yy(1,arguments);var e=Ky(t);return e.setMilliseconds(0),e}(t);case"minute":return function(t){Yy(1,arguments);var e=Ky(t);return e.setSeconds(0,0),e}(t);case"hour":return function(t){Yy(1,arguments);var e=Ky(t);return e.setMinutes(0,0,0),e}(t);case"day":return lw(t);case"week":return xw(t);case"isoWeek":return xw(t,{weekStartsOn:+n});case"month":return function(t){Yy(1,arguments);var e=Ky(t);return e.setDate(1),e.setHours(0,0,0,0),e}(t);case"quarter":return function(t){Yy(1,arguments);var e=Ky(t),n=e.getMonth(),r=n-n%3;return e.setMonth(r,1),e.setHours(0,0,0,0),e}(t);case"year":return function(t){Yy(1,arguments);var e=Ky(t),n=new Date(0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){Yy(1,arguments);var e=Ky(t);return e.setMilliseconds(999),e}(t);case"minute":return function(t){Yy(1,arguments);var e=Ky(t);return e.setSeconds(59,999),e}(t);case"hour":return function(t){Yy(1,arguments);var e=Ky(t);return e.setMinutes(59,59,999),e}(t);case"day":return gw(t);case"week":return function(t,e){Yy(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,o=null==i?0:ub(i),a=null==n.weekStartsOn?o:ub(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Ky(t),u=s.getDay(),c=6+(u<a?-7:0)-(u-a);return s.setDate(s.getDate()+c),s.setHours(23,59,59,999),s}(t);case"month":return yw(t);case"quarter":return function(t){Yy(1,arguments);var e=Ky(t),n=e.getMonth(),r=n-n%3+3;return e.setMonth(r,0),e.setHours(23,59,59,999),e}(t);case"year":return function(t){Yy(1,arguments);var e=Ky(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}(t);default:return t}}}),mh.a.use(Zy);try{window.airbrake=new yt({projectId:window.env.AIRBRAKE_PROJECT_ID,projectKey:window.env.AIRBRAKE_PROJECT_KEY,host:window.env.PANEL_URL}),console.originalError=console.error,console.error=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return window.airbrake.notify(n.join(" ")),(t=console).originalError.apply(t,n)}}catch(Mw){console.error(Mw)}hh.a.start(),dh.a.start(),le.start()}]);
//# sourceMappingURL=application-fd20cd4c95f90c1a3ecd.js.map