@shelf/global-renderer 0.14.13 → 0.14.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see renderStaticDTDiagram.js.LICENSE.txt */
2
- (()=>{var t={8948:function(t,e,n){var r,i,o,a;function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}(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 u(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 l(t){return(l="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)}t=n.nmd(t),"undefined"!=typeof self&&self,a=function(){return function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{compare:function(){return N},orderBy:function(){return C}});var n=function(t,e){return t<e?-1:t>e?1:0},r=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,i=/^\s+|\s+$/g,o=/\s+/g,a=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=/^0+[1-9]{1}[0-9]*$/,f=/[^\x00-\x80]/,h=function(t,e){var n=t.localeCompare(e);return n?n/Math.abs(n):0},d=function(t,e){return t<e?-1:t>e?1:0},p=function(t,e){return t.value===e.value?0:void 0!==t.parsedNumber&&void 0!==e.parsedNumber?n(t.parsedNumber,e.parsedNumber):t.chunks&&e.chunks?function(t,e){for(var r=t.length,i=e.length,o=Math.min(r,i),a=0;a<o;a++){var s=t[a],u=e[a];if(s.normalizedString!==u.normalizedString){if(""===s.normalizedString!=(""===u.normalizedString))return""===s.normalizedString?-1:1;if(void 0!==s.parsedNumber&&void 0!==u.parsedNumber){var l=n(s.parsedNumber,u.parsedNumber);return 0===l?d(s.normalizedString,u.normalizedString):l}return void 0!==s.parsedNumber||void 0!==u.parsedNumber?void 0!==s.parsedNumber?-1:1:f.test(s.normalizedString+u.normalizedString)&&s.normalizedString.localeCompare?h(s.normalizedString,u.normalizedString):d(s.normalizedString,u.normalizedString)}}return r>o||i>o?r<=o?-1:1:0}(t.chunks,e.chunks):function(t,e){return(t.chunks?!e.chunks:e.chunks)?t.chunks?-1:1:(t.isNaN?!e.isNaN:e.isNaN)?t.isNaN?-1:1:(t.isSymbol?!e.isSymbol:e.isSymbol)?t.isSymbol?-1:1:(t.isObject?!e.isObject:e.isObject)?t.isObject?-1:1:(t.isArray?!e.isArray:e.isArray)?t.isArray?-1:1:(t.isFunction?!e.isFunction:e.isFunction)?t.isFunction?-1:1:(t.isNull?!e.isNull:e.isNull)?t.isNull?-1:1:0}(t,e)},g=function(t){return"function"==typeof t?t:function(e){if(Array.isArray(e)){var n=Number(t);if(Number.isInteger(n))return e[n]}else if(e&&"object"==l(e)&&"function"!=typeof t)return e[t];return e}},v=function(t){if(0!==t.length){var e=Number(t);if(!Number.isNaN(e))return e}},m=function(t){return t.replace(o," ").replace(i,"")},y=function(t,e,n){if(a.test(t)&&(!c.test(t)||0===e||"."!==n[e-1]))return v(t)||0},b=function(t,e,n){return{parsedNumber:y(t,e,n),normalizedString:m(t)}},w=function(t){return function(t){return t.replace(r,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}(t).map(b)},x=function(t){return"function"==typeof t},S=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},k=function(t){return null===t},_=function(t){return!(null===t||"object"!=l(t)||Array.isArray(t)||t instanceof Number||t instanceof String||t instanceof Boolean||t instanceof Date)},E=function(t){return"symbol"==l(t)},A=function(t){return void 0===t},P=function(t){if("string"==typeof t||t instanceof String||("number"==typeof t||t instanceof Number)&&!S(t)||"boolean"==typeof t||t instanceof Boolean||t instanceof Date){var e=function(t){return"boolean"==typeof t||t instanceof Boolean?Number(t).toString():"number"==typeof t||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():"string"==typeof t||t instanceof String?t.toLowerCase().replace(i,""):""}(t),n=function(t){var e=v(t);return void 0!==e?e:function(t){try{var e=Date.parse(t);return!Number.isNaN(e)&&u.test(t)?e:void 0}catch(t){return}}(t)}(e);return{parsedNumber:n,chunks:w(n?"".concat(n):e),value:t}}return{isArray:Array.isArray(t),isFunction:x(t),isNaN:S(t),isNull:k(t),isObject:_(t),isSymbol:E(t),isUndefined:A(t),value:t}},C=function(t,e,n){return t&&Array.isArray(t)?function(t,e,n){var r=e.length?e.map(g):[function(t){return t}],i=t.map((function(t,e){return{index:e,values:r.map((function(e){return e(t)})).map(P)}}));return i.sort((function(t,e){return function(t,e,n){for(var r=t.index,i=t.values,o=e.index,a=e.values,s=i.length,u=n.length,l=0;l<s;l++){var c=l<u?n[l]:null;if(c&&"function"==typeof c){var f=c(i[l].value,a[l].value);if(f)return f}else{var h=p(i[l],a[l]);if(h)return h*("desc"===c?-1:1)}}return r-o}(t,e,n)})),i.map((function(e){return function(t,e){return t[e]}(t,e.index)}))}(t,function(t){if(!t)return[];var e=Array.isArray(t)?s(t):[t];return e.some((function(t){return"string"!=typeof t&&"number"!=typeof t&&"function"!=typeof t}))?[]:e}(e),function(t){if(!t)return[];var e=Array.isArray(t)?s(t):[t];return e.some((function(t){return"asc"!==t&&"desc"!==t&&"function"!=typeof t}))?[]:e}(n)):[]},T=function(t){return"string"==typeof t&&("asc"===t||"desc"===t)},N=function(t){return function(t){return function(e,n){var r=P(e),i=P(n);return p(r,i)*("desc"===t.order?-1:1)}}(function(t){var e="asc";return"string"==typeof t&&T(t)?e=t:t&&"object"==l(t)&&t.order&&T(t.order)&&(e=t.order),{order:e}}(t))};return e}()},"object"==l(e)&&"object"==l(t)?t.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},9276:(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="object"==("undefined"==typeof self?"undefined":a(self))&&self.self===self&&self||"object"==(void 0===n.g?"undefined":a(n.g))&&n.g.global===n.g&&n.g,r=[n(6388),n(5550),e],void 0===(i=function(t,e,n){o.Backbone=function(t,e,n,r){var i=t.Backbone,o=Array.prototype.slice;e.VERSION="1.4.1",e.$=r,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s,u=e.Events={},l=/\s+/,c=function t(e,r,i,o,s){var u,c=0;if(i&&"object"===a(i)){void 0!==o&&"context"in s&&void 0===s.context&&(s.context=o);for(u=n.keys(i);c<u.length;c++)r=t(e,r,u[c],i[u[c]],s)}else if(i&&l.test(i))for(u=i.split(l);c<u.length;c++)r=e(r,u[c],o,s);else r=e(r,i,o,s);return r};u.on=function(t,e,n){return this._events=c(f,this._events||{},t,e,{context:n,ctx:this,listening:s}),s&&((this._listeners||(this._listeners={}))[s.id]=s,s.interop=!1),this},u.listenTo=function(t,e,r){if(!t)return this;var i=t._listenId||(t._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=s=o[i];a||(this._listenId||(this._listenId=n.uniqueId("l")),a=s=o[i]=new m(this,t));var u=h(t,e,r,this);if(s=void 0,u)throw u;return a.interop&&a.on(e,r),this};var f=function(t,e,n,r){if(n){var i=t[e]||(t[e]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return t},h=function(t,e,n,r){try{t.on(e,n,r)}catch(t){return t}};u.off=function(t,e,n){return this._events?(this._events=c(d,this._events,t,e,{context:n,listeners:this._listeners}),this):this},u.stopListening=function(t,e,r){var i=this._listeningTo;if(!i)return this;for(var o=t?[t._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(e,r,this),s.interop&&s.off(e,r)}return n.isEmpty(i)&&(this._listeningTo=void 0),this};var d=function(t,e,r,i){if(t){var o,a=i.context,s=i.listeners,u=0;if(e||a||r){for(o=e?[e]:n.keys(t);u<o.length;u++){var l=t[e=o[u]];if(!l)break;for(var c=[],f=0;f<l.length;f++){var h=l[f];if(r&&r!==h.callback&&r!==h.callback._callback||a&&a!==h.context)c.push(h);else{var d=h.listening;d&&d.off(e,r)}}c.length?t[e]=c:delete t[e]}return t}for(o=n.keys(s);u<o.length;u++)s[o[u]].cleanup()}};u.once=function(t,e,n){var r=c(p,{},t,e,this.off.bind(this));return"string"==typeof t&&null==n&&(e=void 0),this.on(r,e,n)},u.listenToOnce=function(t,e,n){var r=c(p,{},e,n,this.stopListening.bind(this,t));return this.listenTo(t,r)};var p=function(t,e,r,i){if(r){var o=t[e]=n.once((function(){i(e,o),r.apply(this,arguments)}));o._callback=r}return t};u.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),r=0;r<e;r++)n[r]=arguments[r+1];return c(g,this._events,t,void 0,n),this};var g=function(t,e,n,r){if(t){var i=t[e],o=t.all;i&&o&&(o=o.slice()),i&&v(i,r),o&&v(o,[e].concat(r))}return t},v=function(t,e){var n,r=-1,i=t.length,o=e[0],a=e[1],s=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e);return}},m=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0};m.prototype.on=u.on,m.prototype.off=function(t,e){var n;this.interop?(this._events=c(d,this._events,t,e,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},m.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},u.bind=u.on,u.unbind=u.off,n.extend(e,u);var y=e.Model=function(t,e){var r=t||{};e||(e={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(r=this.parse(r,e)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(y.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(null==t)return this;var i;if("object"===a(t)?(i=t,r=e):(i={})[t]=e,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,s=r.silent,u=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var c=this.attributes,f=this.changed,h=this._previousAttributes;for(var d in i)e=i[d],n.isEqual(c[d],e)||u.push(d),n.isEqual(h[d],e)?delete f[d]:f[d]=e,o?delete c[d]:c[d]=e;if(this.idAttribute in i){var p=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,p,r)}if(!s){u.length&&(this._pending=r);for(var g=0;g<u.length;g++)this.trigger("change:"+u[g],this,c[u[g]],r)}if(l)return this;if(!s)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&n.clone(this.changed);var e,r=this._changing?this._previousAttributes:this.attributes,i={};for(var o in t){var a=t[o];n.isEqual(r[o],a)||(i[o]=a,e=!0)}return!!e&&i},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,r=t.success;return t.success=function(n){var i=t.parse?e.parse(n,t):n;if(!e.set(i,t))return!1;r&&r.call(t.context,e,n,t),e.trigger("sync",e,n,t)},H(this,t),this.sync("read",this,t)},save:function(t,e,r){var i;null==t||"object"===a(t)?(i=t,r=e):(i={})[t]=e;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var s=this,u=r.success,l=this.attributes;r.success=function(t){s.attributes=l;var e=r.parse?s.parse(t,r):t;if(o&&(e=n.extend({},i,e)),e&&!s.set(e,r))return!1;u&&u.call(r.context,s,t,r),s.trigger("sync",s,t,r)},H(this,r),i&&o&&(this.attributes=n.extend({},l,i));var c=this.isNew()?"create":r.patch?"patch":"update";"patch"!==c||r.attrs||(r.attrs=i);var f=this.sync(c,this,r);return this.attributes=l,f},destroy:function(t){t=t?n.clone(t):{};var e=this,r=t.success,i=t.wait,o=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){i&&o(),r&&r.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var a=!1;return this.isNew()?n.defer(t.success):(H(this,t),a=this.sync("delete",this,t)),i||o(),a},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||q();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;return!r||(this.trigger("invalid",this,r,n.extend(e,{validationError:r})),!1)}});var b=e.Collection=function(t,e){e||(e={}),this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},x={add:!0,remove:!1},S=function(t,e,n){n=Math.min(Math.max(n,0),t.length);var r,i=Array(t.length-n),o=e.length;for(r=0;r<i.length;r++)i[r]=t[r+n];for(r=0;r<o;r++)t[r+n]=e[r];for(r=0;r<i.length;r++)t[r+o+n]=i[r]};n.extend(b.prototype,u,{model:y,preinitialize:function(){},initialize:function(){},toJSON:function(t){return this.map((function(e){return e.toJSON(t)}))},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,x))},remove:function(t,e){e=n.extend({},e);var r=!n.isArray(t);t=r?[t]:t.slice();var i=this._removeModels(t,e);return!e.silent&&i.length&&(e.changes={added:[],merged:[],removed:i},this.trigger("update",this,e)),r?i[0]:i},set:function(t,e){if(null!=t){(e=n.extend({},w,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var r=!n.isArray(t);t=r?[t]:t.slice();var i=e.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],u=[],l=[],c=[],f={},h=e.add,d=e.merge,p=e.remove,g=!1,v=this.comparator&&null==i&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){o=t[a];var y=this.get(o);if(y){if(d&&o!==y){var b=this._isModel(o)?o.attributes:o;e.parse&&(b=y.parse(b,e)),y.set(b,e),l.push(y),v&&!g&&(g=y.hasChanged(m))}f[y.cid]||(f[y.cid]=!0,s.push(y)),t[a]=y}else h&&(o=t[a]=this._prepareModel(o,e))&&(u.push(o),this._addReference(o,e),f[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)f[(o=this.models[a]).cid]||c.push(o);c.length&&this._removeModels(c,e)}var x=!1,k=!v&&h&&p;if(s.length&&k?(x=this.length!==s.length||n.some(this.models,(function(t,e){return t!==s[e]})),this.models.length=0,S(this.models,s,0),this.length=this.models.length):u.length&&(v&&(g=!0),S(this.models,u,null==i?this.length:i),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<u.length;a++)null!=i&&(e.index=i+a),(o=u[a]).trigger("add",o,this,e);(g||x)&&this.trigger("sort",this,e),(u.length||c.length||l.length)&&(e.changes={added:u,removed:c,merged:l},this.trigger("update",this,e))}return r?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;return n.isFunction(e)&&(e=e.bind(this)),1===r||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=n.extend({parse:!0},t)).success,r=this;return t.success=function(n){var i=t.reset?"reset":"set";r[i](n,t),e&&e.call(t.context,r,n,t),r.trigger("sync",r,n,t)},H(this,t),this.sync("read",this,t)},create:function(t,e){var r=(e=e?n.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;r||this.add(t,e);var i=this,o=e.success;return e.success=function(t,e,n){r&&i.add(t,n),o&&o.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new _(this,E)},keys:function(){return new _(this,A)},entries:function(){return new _(this,P)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):((e=e?n.clone(e):{}).collection=this,(r=this.model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,r.validationError,e),!1):r);var r},_removeModels:function(t,e){for(var n=[],r=0;r<t.length;r++){var i=this.get(t[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes,i.idAttribute);null!=a&&delete this._byId[a],e.silent||(e.index=o,i.trigger("remove",i,this,e)),n.push(i),this._removeReference(i,e)}}return n},_isModel:function(t){return t instanceof y},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes,t.idAttribute);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes,t.idAttribute);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if(e){if(("add"===t||"remove"===t)&&n!==this)return;if("destroy"===t&&this.remove(e,r),"changeId"===t){var i=this.modelId(e.previousAttributes(),e.idAttribute),o=this.modelId(e.attributes,e.idAttribute);null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=e)}}this.trigger.apply(this,arguments)}});var k="function"==typeof Symbol&&Symbol.iterator;k&&(b.prototype[k]=b.prototype.values);var _=function(t,e){this._collection=t,this._kind=e,this._index=0},E=1,A=2,P=3;k&&(_.prototype[k]=function(){return this}),_.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var t,e=this._collection.at(this._index);if(this._index++,this._kind===E)t=e;else{var n=this._collection.modelId(e.attributes,e.idAttribute);t=this._kind===A?n:[n,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var C=e.View=function(t){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(t,N)),this._ensureElement(),this.initialize.apply(this,arguments)},T=/^(\S+)\s*(.*)$/,N=["model","collection","el","id","attributes","className","tagName","events"];n.extend(C.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;for(var e in this.undelegateEvents(),t){var r=t[e];if(n.isFunction(r)||(r=this[r]),r){var i=e.match(T);this.delegate(i[1],i[2],r.bind(this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}});var L=function(t,e,r,i){n.each(r,(function(n,r){e[r]&&(t.prototype[r]=function(t,e,n,r){switch(e){case 1:return function(){return t[n](this[r])};case 2:return function(e){return t[n](this[r],e)};case 3:return function(e,i){return t[n](this[r],M(e,this),i)};case 4:return function(e,i,o){return t[n](this[r],M(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),t[n].apply(t,e)}}}(e,n,r,i))}))},M=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?O(t):n.isString(t)?function(e){return e.get(t)}:t},O=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}};n.each([[b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[y,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],(function(t){var e=t[0],r=t[1],i=t[2];e.mixin=function(t){var r=n.reduce(n.functions(t),(function(t,e){return t[e]=0,t}),{});L(e,t,r,i)},L(e,n,r,i)})),e.sync=function(t,r,i){var o=R[t];n.defaults(i||(i={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||q()),null!=i.data||!r||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var u=i.error;i.error=function(t,e,n){i.textStatus=e,i.errorThrown=n,u&&u.call(i.context,t,e,n)};var l=i.xhr=e.ajax(n.extend(a,i));return r.trigger("request",r,l,i),l};var R={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var F=e.Router=function(t){t||(t={}),this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},D=/\((.*?)\)/g,j=/(\(\?)?:\w+/g,I=/\*\w+/g,B=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(F.prototype,u,{preinitialize:function(){},initialize:function(){},route:function(t,r,i){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return e.history.route(t,(function(n){var a=o._extractParameters(t,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),e.history.trigger("route",o,r,a))})),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(B,"\\$&").replace(D,"(?:$1)?").replace(j,(function(t,e){return e?t:"([^/?]+)"})).replace(I,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return n.map(r,(function(t,e){return e===r.length-1?t||null:t?decodeURIComponent(t):null}))}});var z=e.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},V=/^[#\/]|\s+$/g,$=/^\/+|\/+$/g,U=/#.*$/;z.started=!1,n.extend(z.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(V,"")},start:function(t){if(z.started)throw new Error("Backbone.history has already been started");if(z.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace($,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),z.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!z.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+t;t=t.replace(U,"");var i=this.decodeFragment(t);if(this.fragment!==i){if(this.fragment=i,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var o=this.iframe.contentWindow;e.replace||(o.document.open(),o.document.close()),this._updateHash(o.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new z;y.extend=b.extend=F.extend=C.extend=z.extend=function(t,e){var r,i=this;return r=t&&n.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e),r.prototype=n.create(i.prototype,t),r.prototype.constructor=r,r.__super__=i.prototype,r};var q=function(){throw new Error('A "url" property or function must be specified')},H=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e}(o,n,t,e)}.apply(e,r))||(t.exports=i)},3423: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)}t=n.nmd(t),a=function(){return 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}return 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"==s(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="",n(n.s=90)}({17:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r=n(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var n=e.match(t);return n&&n.length>0&&n[1]||""},t.getSecondMatch=function(t,e){var n=e.match(t);return n&&n.length>1&&n[2]||""},t.matchAndReturnConst=function(t,e,n){if(t.test(e))return n},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,n,r){void 0===r&&(r=!1);var i=t.getVersionPrecision(e),o=t.getVersionPrecision(n),a=Math.max(i,o),s=0,u=t.map([e,n],(function(e){var n=a-t.getVersionPrecision(e),r=e+new Array(n+1).join(".0");return t.map(r.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},t.map=function(t,e){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(n=0;n<t.length;n+=1)r.push(e(t[n]));return r},t.find=function(t,e){var n,r;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(n=0,r=t.length;n<r;n+=1){var i=t[n];if(e(i,n))return i}},t.assign=function(t){for(var e,n,r=t,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[t].concat(o));var u=function(){var t=o[e];"object"==s(t)&&null!==t&&Object.keys(t).forEach((function(e){r[e]=t[e]}))};for(e=0,n=o.length;e<n;e+=1)u();return t},t.getBrowserAlias=function(t){return r.BROWSER_ALIASES_MAP[t]},t.getBrowserTypeByAlias=function(t){return r.BROWSER_MAP[t]||""},t}();e.default=i,t.exports=e.default},18:function(t,e,n){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},e.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);var a=function(){function t(){}var e;return t.getParser=function(t,e){if(void 0===e&&(e=!1),"string"!=typeof t)throw new Error("UserAgent should be a string");return new i.default(t,e)},t.parse=function(t){return new i.default(t).getResult()},(e=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}])&&function(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)}}(t,e),t}();e.default=a,t.exports=e.default},91:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r=l(n(92)),i=l(n(93)),o=l(n(94)),a=l(n(95)),u=l(n(17));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(t,e){if(void 0===e&&(e=!1),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}var e=t.prototype;return e.getUA=function(){return this._ua},e.test=function(t){return t.test(this._ua)},e.parseBrowser=function(){var t=this;this.parsedResult.browser={};var e=u.default.find(r.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser},e.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},e.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},e.getBrowserVersion=function(){return this.getBrowser().version},e.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},e.parseOS=function(){var t=this;this.parsedResult.os={};var e=u.default.find(i.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os},e.getOSName=function(t){var e=this.getOS().name;return t?String(e).toLowerCase()||"":e||""},e.getOSVersion=function(){return this.getOS().version},e.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},e.getPlatformType=function(t){void 0===t&&(t=!1);var e=this.getPlatform().type;return t?String(e).toLowerCase()||"":e||""},e.parsePlatform=function(){var t=this;this.parsedResult.platform={};var e=u.default.find(o.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform},e.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},e.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},e.parseEngine=function(){var t=this;this.parsedResult.engine={};var e=u.default.find(a.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine},e.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},e.getResult=function(){return u.default.assign({},this.parsedResult)},e.satisfies=function(t){var e=this,n={},r=0,i={},o=0;if(Object.keys(t).forEach((function(e){var a=t[e];"string"==typeof a?(i[e]=a,o+=1):"object"==s(a)&&(n[e]=a,r+=1)})),r>0){var a=Object.keys(n),l=u.default.find(a,(function(t){return e.isOS(t)}));if(l){var c=this.satisfies(n[l]);if(void 0!==c)return c}var f=u.default.find(a,(function(t){return e.isPlatform(t)}));if(f){var h=this.satisfies(n[f]);if(void 0!==h)return h}}if(o>0){var d=Object.keys(i),p=u.default.find(d,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),i=u.default.getBrowserTypeByAlias(r);return e&&i&&(r=i.toLowerCase()),r===n},e.compareVersion=function(t){var e=[0],n=t,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(n=t.substr(1),"="===t[1]?(r=!0,n=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?n=t.substr(1):"~"===t[0]&&(r=!0,n=t.substr(1)),e.indexOf(u.default.compareVersions(i,n,r))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=c,t.exports=e.default},92:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){var e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe:function(t){var e={name:"Android Browser"},n=i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},n=i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},n=i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=a,t.exports=e.default},93:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:o.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=i.default.getWindowsVersionName(e);return{name:o.OS_MAP.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(e),r={name:o.OS_MAP.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=i.default.getAndroidVersionName(e),r={name:o.OS_MAP.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:o.OS_MAP.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:o.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.PlayStation4,version:e}}}];e.default=a,t.exports=e.default},94:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];e.default=a,t.exports=e.default},95:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:o.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){var e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe:function(t){var e={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}];e.default=a,t.exports=e.default}})},"object"==s(e)&&"object"==s(t)?t.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},1699:(t,e,n)=>{"use strict";var r=n(1889),i={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var n,o,a,s,u,l,c=!1;e||(e={}),n=e.debug||!1;try{if(a=r(),s=document.createRange(),u=document.getSelection(),(l=document.createElement("span")).textContent=t,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),e.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[e.format]||i.default;window.clipboardData.setData(o,t)}else r.clipboardData.clearData(),r.clipboardData.setData(e.format,t);e.onCopy&&(r.preventDefault(),e.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,t)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),l&&document.body.removeChild(l),a()}return c}},4959:(t,e,n)=>{t.exports={graphlib:n(7591),layout:n(6393),debug:n(7623),util:{time:n(7355).time,notime:n(7355).notime},version:n(5730)}},5062:(t,e,n)=>{"use strict";var r=n(4948),i=n(6842);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),(function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(t.outEdges(a),(function(t){r.has(n,t.w)?e.push(t):o(t.w)})),delete n[a])})),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},8746:(t,e,n)=>{var r=n(4948),i=n(7355);function o(t,e,n,r,o,a){var s={width:0,height:0,rank:a,borderType:e},u=o[e][a-1],l=i.addDummyNode(t,"border",s,n);o[e][a]=l,t.setParent(l,r),u&&t.setEdge(u,l,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),a=t.node(n);if(i.length&&r.forEach(i,e),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,u=a.maxRank+1;s<u;++s)o(t,"borderLeft","_bl",n,a,s),o(t,"borderRight","_br",n,a,s)}}))}},5391:(t,e,n)=>{"use strict";var r=n(4948);function i(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){o(t.edge(e))}))}function o(t){var e=t.width;t.width=t.height,t.height=e}function a(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(t),"lr"!==e&&"rl"!==e||(function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},3647:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},7623:(t,e,n)=>{var r=n(4948),i=n(7355),o=n(7591).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},7591:(t,e,n)=>{var r;try{r=n(6370)}catch(t){}r||(r=window.graphlib),t.exports=r},6842:(t,e,n)=>{var r=n(4948),i=n(7591).Graph,o=n(3647);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,a=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),o=r+i;n.setEdge(t.v,t.w,o),s=Math.max(s,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w).in+=i)}));var l=r.range(s+a+3).map((function(){return new o})),c=a+1;return r.forEach(n.nodes(),(function(t){u(l,c,n.node(t))})),{graph:n,buckets:l,zeroIdx:c}}(t,e||a),l=function(t,e,n){for(var r,i=[],o=e[e.length-1],a=e[0];t.nodeCount();){for(;r=a.dequeue();)s(t,e,n,r);for(;r=o.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var u=e.length-2;u>0;--u)if(r=e[u].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(l,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function s(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,u(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,u(e,n,a)})),t.removeNode(i.v),a}function u(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},6393:(t,e,n)=>{"use strict";var r=n(4948),i=n(5062),o=n(5479),a=n(1311),s=n(7355).normalizeRanks,u=n(3393),l=n(7355).removeEmptyRanks,c=n(6821),f=n(8746),h=n(5391),d=n(240),p=n(5552),g=n(7355),v=n(7591).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new v({multigraph:!0,compound:!0}),n=A(t.graph());return e.setGraph(r.merge({},y,E(n,m),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=A(t.node(n));e.setNode(n,r.defaults(E(i,w),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=A(t.edge(n));e.setEdge(n,r.merge({},k,E(i,S),r.pick(i,_)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){c.run(t)})),e(" rank",(function(){a(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){l(t)})),e(" nestingGraph.cleanup",(function(){c.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){u(t)})),e(" addBorderSegments",(function(){f(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){h.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){o.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){h.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),s=a.marginx||0,u=a.marginy||0;function l(t){var r=t.x,a=t.y,s=t.width,u=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-u/2),o=Math.max(o,a+u/2)}r.forEach(t.nodes(),(function(e){l(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&l(n)})),e-=s,i-=u,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(o.points,(function(t){t.x-=e,t.y-=i})),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)})),a.width=n-e+s,a.height=o-i+u}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(g.intersectRect(o,n)),i.points.push(g.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],w=["width","height"],x={width:0,height:0},S=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},_=["labelpos"];function E(t,e){return r.mapValues(r.pick(t,e),Number)}function A(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},4948:(t,e,n)=>{var r;try{r={cloneDeep:n(9825),constant:n(8567),defaults:n(9638),each:n(3812),filter:n(8319),find:n(6726),flatten:n(1247),forEach:n(3695),forIn:n(548),has:n(5373),isUndefined:n(5082),last:n(6496),map:n(6712),mapValues:n(1301),max:n(7365),merge:n(5797),min:n(4757),minBy:n(4105),now:n(9238),pick:n(2356),range:n(7932),reduce:n(781),sortBy:n(4206),uniqueId:n(6062),values:n(6163),zipObject:n(8437)}}catch(t){}r||(r=window._),t.exports=r},6821:(t,e,n)=>{var r=n(4948),i=n(7355);function o(t,e,n,a,s,u,l){var c=t.children(l);if(c.length){var f=i.addBorderNode(t,"_bt"),h=i.addBorderNode(t,"_bb"),d=t.node(l);t.setParent(f,l),d.borderTop=f,t.setParent(h,l),d.borderBottom=h,r.forEach(c,(function(r){o(t,e,n,a,s,u,r);var i=t.node(r),c=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,g=c!==d?1:s-u[l]+1;t.setEdge(f,c,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,h,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(l)||t.setEdge(e,f,{weight:0,minlen:s+u[l]})}else l!==e&&t.setEdge(e,l,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,(function(t){n(t,o+1)})),e[i]=o}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),a=r.max(r.values(n))-1,s=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s}));var u=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){o(t,e,s,u,a,n,r)})),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},5479:(t,e,n)=>{"use strict";var r=n(4948),i=n(7355);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,s=t.node(a).rank,u=e.w,l=t.node(u).rank,c=e.name,f=t.edge(e),h=f.labelRank;if(l!==s+1){for(t.removeEdge(e),o=0,++s;s<l;++o,++s)f.points=[],r={width:0,height:0,edgeLabel:f,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===h&&(r.width=f.width,r.height=f.height,r.dummy="edge-label",r.labelpos=f.labelpos),t.setEdge(a,n,{weight:f.weight},c),0===o&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,u,{weight:f.weight},c)}}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},1386:(t,e,n)=>{var r=n(4948);t.exports=function(t,e,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=t.parent(n);s;){if((r=t.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void e.setEdge(a,s);s=r}}))}},5540:(t,e,n)=>{var r=n(4948);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},3182:(t,e,n)=>{var r=n(4948),i=n(7591).Graph;t.exports=function(t,e,n){var o=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),u=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(i),a.setParent(i,u||o),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),a}},3057:(t,e,n)=>{"use strict";var r=n(4948);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),o=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),l=0;return r.forEach(o.forEach((function(t){var e=t.pos+a;u[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=u[e+1]),u[e=e-1>>1]+=t.weight;l+=t.weight*n}))),l}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},240:(t,e,n)=>{"use strict";var r=n(4948),i=n(8843),o=n(3057),a=n(2363),s=n(3182),u=n(1386),l=n(7591).Graph,c=n(7355);function f(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function h(t,e){var n=new l;r.forEach(t,(function(t){var i=t.graph().root,o=a(t,i,n,e);r.forEach(o.vs,(function(e,n){t.node(e).order=n})),u(t,n,o.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=c.maxRank(t),n=f(t,r.range(1,e+1),"inEdges"),a=f(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var u,l=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){h(p%2?n:a,p%4>=2),s=c.buildLayerMatrix(t);var v=o(t,s);v<l&&(g=0,u=r.cloneDeep(s),l=v)}d(t,u)}},8843:(t,e,n)=>{"use strict";var r=n(4948);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),o=r.map(r.range(i+1),(function(){return[]})),a=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(a,(function n(i){if(!r.has(e,i)){e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.forEach(t.successors(i),n)}})),o}},7447:(t,e,n)=>{"use strict";var r=n(4948);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){var n,i,o,a;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,o=0,a=0,(n=t).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},2363:(t,e,n)=>{var r=n(4948),i=n(5540),o=n(7447),a=n(9953);t.exports=function t(e,n,s,u){var l=e.children(n),c=e.node(n),f=c?c.borderLeft:void 0,h=c?c.borderRight:void 0,d={};f&&(l=r.filter(l,(function(t){return t!==f&&t!==h})));var p=i(e,l);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,u);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var g=o(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var v=a(g,u);if(f&&(v.vs=r.flatten([f,v.vs,h],!0),e.predecessors(f).length)){var m=e.node(e.predecessors(f)[0]),y=e.node(e.predecessors(h)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+m.order+y.order)/(v.weight+2),v.weight+=2}return v}},9953:(t,e,n)=>{var r=n(4948),i=n(7355);function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,a=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=a.lhs,u=r.sortBy(a.rhs,(function(t){return-t.i})),l=[],c=0,f=0,h=0;s.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),h=o(l,u,h),r.forEach(s,(function(t){h+=t.vs.length,l.push(t.vs),c+=t.barycenter*t.weight,f+=t.weight,h=o(l,u,h)}));var d={vs:r.flatten(l,!0)};return f&&(d.barycenter=c/f,d.weight=f),d}},3393:(t,e,n)=>{var r=n(4948);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],s=[],u=Math.min(e[n].low,e[r].low),l=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>u||l>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,u=0,l=a[u],c=!0;n!==i.w;){if(r=t.node(n),c){for(;(l=a[u])!==s&&t.node(l).maxRank<r.rank;)u++;l===s&&(c=!1)}if(!c){for(;u<a.length-1&&t.node(l=a[u+1]).minRank<=r.rank;)u++;l=a[u]}t.setParent(n,l),n=t.successors(n)[0]}}))}},46:(t,e,n)=>{"use strict";var r=n(4948),i=n(7591).Graph,o=n(7355);function a(t,e){var n={};return r.reduce(e,(function(e,i){var o=0,a=0,s=e.length,l=r.last(i);return r.forEach(i,(function(e,c){var f=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),h=f?t.node(f).order:s;(f||e===l)&&(r.forEach(i.slice(a,c+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),a=i.order;!(a<o||h<a)||i.dummy&&t.node(e).dummy||u(n,r,e)}))})),a=c+1,o=h)})),i})),n}function s(t,e){var n={};function i(e,i,o,a,s){var l;r.forEach(r.range(i,o),(function(i){l=e[i],t.node(l).dummy&&r.forEach(t.predecessors(l),(function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>s)&&u(n,e,l)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===t.node(r).dummy){var l=t.predecessors(r);l.length&&(o=t.node(l[0]).order,i(n,s,u,a,o),s=u,a=o)}i(n,s,n.length,o,e.length)})),n})),n}function u(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function l(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function c(t,e,n,i){var o={},a={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var u=i(t);if(u.length)for(var c=((u=r.sortBy(u,(function(t){return s[t]}))).length-1)/2,f=Math.floor(c),h=Math.ceil(c);f<=h;++f){var d=u[f];a[t]===t&&e<s[d]&&!l(n,t,d)&&(a[d]=t,a[t]=o[t]=o[d],e=s[d])}}))})),{root:o,align:a}}function f(t,e,n,o,a){var s={},u=function(t,e,n,o){var a=new i,s=t.graph(),u=function(t,e,n){return function(i,o,a){var s,u=i.node(o),l=i.node(a),c=0;if(c+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(c+=n?s:-s),s=0,c+=(u.dummy?e:t)/2,c+=(l.dummy?e:t)/2,c+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=l.width/2;break;case"r":s=-l.width/2}return s&&(c+=n?s:-s),s=0,c}}(s.nodesep,s.edgesep,o);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(a.setNode(r),i){var o=n[i],s=a.edge(o,r);a.setEdge(o,r,Math.max(u(t,e,i),s||0))}i=e}))})),a}(t,e,n,a),l=a?"borderLeft":"borderRight";function c(t,e){for(var n=u.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return c((function(t){s[t]=u.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+u.edge(e))}),0)}),u.predecessors.bind(u)),c((function(e){var n=u.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-u.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==l&&(s[e]=Math.max(s[e],n))}),u.successors.bind(u)),r.forEach(o,(function(t){s[t]=s[n[t]]})),s}function h(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var o=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+o,n),i=Math.min(e-o,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),o=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,l=t[u];if(l!==e){var c=r.values(l);(s="l"===a?i-r.min(c):o-r.max(c))&&(t[u]=r.mapValues(l,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var o=r.sortBy(r.map(t,i));return(o[1]+o[2])/2}))}t.exports={positionX:function(t){var e,n=o.buildLayerMatrix(t),i=r.merge(a(t,n),s(t,n)),u={};r.forEach(["u","d"],(function(o){e="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var a=("u"===o?t.predecessors:t.successors).bind(t),s=c(0,e,i,a),l=f(t,e,s.root,s.align,"r"===n);"r"===n&&(l=r.mapValues(l,(function(t){return-t}))),u[o+n]=l}))}));var l=h(t,u);return d(u,l),p(u,t.graph().align)},findType1Conflicts:a,findType2Conflicts:s,addConflict:u,hasConflict:l,verticalAlignment:c,horizontalCompaction:f,alignCoordinates:d,findSmallestWidthAlignment:h,balance:p}},5552:(t,e,n)=>{"use strict";var r=n(4948),i=n(7355),o=n(46).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=o+i/2})),o+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(o(t),(function(e,n){t.node(n).x=e}))}},4135:(t,e,n)=>{"use strict";var r=n(4948),i=n(7591).Graph,o=n(5596).slack;function a(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var a=r.v,s=i===a?r.w:a;t.hasNode(s)||o(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return o(e,n)}))}function u(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),l=t.nodes()[0],c=t.nodeCount();for(r.setNode(l,{});a(r,t)<c;)e=s(r,t),n=r.hasNode(e.v)?o(t,e):-o(t,e),u(r,t,n);return r}},1311:(t,e,n)=>{"use strict";var r=n(5596).longestPath,i=n(4135),o=n(9526);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t);break;default:s(t)}};var a=r;function s(t){o(t)}},9526:(t,e,n)=>{"use strict";var r=n(4948),i=n(4135),o=n(5596).slack,a=n(5596).longestPath,s=n(7591).alg.preorder,u=n(7591).alg.postorder,l=n(7355).simplify;function c(t){t=l(t),a(t);var e,n=i(t);for(d(n),f(n,t);e=g(n);)m(n,t,e,v(n,t,e))}function f(t,e){var n=u(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=h(t,e,n)}(t,e,n)}))}function h(t,e,n){var i=t.node(n).parent,o=!0,a=e.edge(n,i),s=0;return a||(o=!1,a=e.edge(i,n)),s=a.weight,r.forEach(e.nodeEdges(n),(function(r){var a,u,l=r.v===n,c=l?r.w:r.v;if(c!==i){var f=l===o,h=e.edge(r).weight;if(s+=f?h:-h,a=n,u=c,t.hasEdge(a,u)){var d=t.edge(n,c).cutvalue;s+=f?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,o){var a=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(o){r.has(e,o)||(n=p(t,e,n,o,i))})),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function v(t,e,n){var i=n.v,a=n.w;e.hasEdge(i,a)||(i=n.w,a=n.v);var s=t.node(i),u=t.node(a),l=s,c=!1;s.lim>u.lim&&(l=u,c=!0);var f=r.filter(e.edges(),(function(e){return c===y(0,t.node(e.v),l)&&c!==y(0,t.node(e.w),l)}));return r.minBy(f,(function(t){return o(e,t)}))}function m(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),f(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function y(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=c,c.initLowLimValues=d,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=g,c.enterEdge=v,c.exchangeEdges=m},5596:(t,e,n)=>{"use strict";var r=n(4948);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},7355:(t,e,n)=>{"use strict";var r=n(4948),i=n(7591).Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,u=t.width/2,l=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*l?(s<0&&(l=-l),n=l*a/s,r=l):(a<0&&(u=-u),n=u,r=u*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},5730:t=>{t.exports="0.8.5"},6370:(t,e,n)=>{var r=n(3814);t.exports={Graph:r.Graph,json:n(8985),alg:n(8276),version:r.version}},875:(t,e,n)=>{var r=n(142);t.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),(function(t){e=[],o(t),e.length&&i.push(e)})),i}},5203:(t,e,n)=>{var r=n(142);function i(t,e,n,o,a,s){r.has(o,e)||(o[e]=!0,n||s.push(e),r.each(a(e),(function(e){i(t,e,n,o,a,s)})),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var o=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,o,a)})),a}},9882:(t,e,n)=>{var r=n(2167),i=n(142);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,o){i[o]=r(t,o,e,n)}),{})}},2167:(t,e,n)=>{var r=n(142),i=n(2859);t.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,s={},u=new i,l=function(t){var e=t.v!==o?t.v:t.w,r=s[e],i=n(t),l=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);l<r.distance&&(r.distance=l,r.predecessor=o,u.decrease(e,l))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},u.add(t,n)}));u.size()>0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(l);return s}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},2678:(t,e,n)=>{var r=n(142),i=n(4666);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},494:(t,e,n)=>{var r=n(142);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},8276:(t,e,n)=>{t.exports={components:n(875),dijkstra:n(2167),dijkstraAll:n(9882),findCycles:n(2678),floydWarshall:n(494),isAcyclic:n(9155),postorder:n(1387),preorder:n(3887),prim:n(9143),tarjan:n(4666),topsort:n(3534)}},9155:(t,e,n)=>{var r=n(3534);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},1387:(t,e,n)=>{var r=n(5203);t.exports=function(t,e){return r(t,e,"post")}},3887:(t,e,n)=>{var r=n(5203);t.exports=function(t,e){return r(t,e,"pre")}},9143:(t,e,n)=>{var r=n(142),i=n(5266),o=n(2859);t.exports=function(t,e){var n,a=new i,s={},u=new o;function l(t){var r=t.v===n?t.w:t.v,i=u.priority(r);if(void 0!==i){var o=e(t);o<i&&(s[r]=n,u.decrease(r,o))}}if(0===t.nodeCount())return a;r.each(t.nodes(),(function(t){u.add(t,Number.POSITIVE_INFINITY),a.setNode(t)})),u.decrease(t.nodes()[0],0);for(var c=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+t);c=!0}t.nodeEdges(n).forEach(l)}return a}},4666:(t,e,n)=>{var r=n(142);t.exports=function(t){var e=0,n=[],i={},o=[];function a(s){var u=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(u.lowlink=Math.min(u.lowlink,i[t].index)):(a(t),u.lowlink=Math.min(u.lowlink,i[t].lowlink))})),u.lowlink===u.index){var l,c=[];do{l=n.pop(),i[l].onStack=!1,c.push(l)}while(s!==l);o.push(c)}}return t.nodes().forEach((function(t){r.has(i,t)||a(t)})),o}},3534:(t,e,n)=>{var r=n(142);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),a),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=new Error},2859:(t,e,n)=>{var r=n(142);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],o=n[e];n[t]=o,n[e]=i,r[o.key]=t,r[i.key]=e}},5266:(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=n(142);t.exports=a;var o="\0";function a(t){this._isDirected=!i.has(t,"directed")||t.directed,this._isMultigraph=!!i.has(t,"multigraph")&&t.multigraph,this._isCompound=!!i.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function s(t,e){t[e]?t[e]++:t[e]=1}function u(t,e){--t[e]||delete t[e]}function l(t,e,n,r){var o=""+e,a=""+n;if(!t&&o>a){var s=o;o=a,a=s}return o+""+a+""+(i.isUndefined(r)?"\0":r)}function c(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function f(t,e){return l(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,r=this;return i.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},a.prototype.setNode=function(t,e){return i.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=o,this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return i.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(i.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],i.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),i.each(i.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],i.each(i.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(e))e=o;else{for(var n=e+="";!i.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==o)return e}},a.prototype.children=function(t){if(i.isUndefined(t)&&(t=o),this._isCompound){var e=this._children[t];if(e)return i.keys(e)}else{if(t===o)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return i.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return i.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return i.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),i.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function o(t){var i=n.parent(t);return void 0===i||e.hasNode(i)?(r[t]=i,i):i in r?r[i]:o(i)}return this._isCompound&&i.each(e.nodes(),(function(t){e.setParent(t,o(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,r=arguments;return i.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},a.prototype.setEdge=function(){var t,e,n,o,a=!1,u=arguments[0];"object"===r(u)&&null!==u&&"v"in u?(t=u.v,e=u.w,n=u.name,2===arguments.length&&(o=arguments[1],a=!0)):(t=u,e=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),t=""+t,e=""+e,i.isUndefined(n)||(n=""+n);var f=l(this._isDirected,t,e,n);if(i.has(this._edgeLabels,f))return a&&(this._edgeLabels[f]=o),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[f]=a?o:this._defaultEdgeLabelFn(t,e,n);var h=c(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[f]=h,s(this._preds[e],t),s(this._sucs[t],e),this._in[e][f]=h,this._out[t][f]=h,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?f(this._isDirected,arguments[0]):l(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?f(this._isDirected,arguments[0]):l(this._isDirected,t,e,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?f(this._isDirected,arguments[0]):l(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],u(this._preds[e],t),u(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.v===e})):r}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.w===e})):r}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},3814:(t,e,n)=>{t.exports={Graph:n(5266),version:n(2364)}},8985:(t,e,n)=>{var r=n(142),i=n(5266);function o(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},142:(t,e,n)=>{var r;try{r={clone:n(7141),constant:n(8567),each:n(3812),filter:n(8319),has:n(5373),isArray:n(1030),isEmpty:n(490),isFunction:n(6681),isUndefined:n(5082),keys:n(599),map:n(6712),reduce:n(781),size:n(7704),transform:n(3536),union:n(5588),values:n(6163)}}catch(t){}r||(r=window._),t.exports=r},2364:t=>{t.exports="2.1.8"},5550:function(t,e,n){var r;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)}t=n.nmd(t),function(e,n){"use strict";"object"===i(t)&&"object"===i(t.exports)?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,o){"use strict";var a=[],s=Object.getPrototypeOf,u=a.slice,l=a.flat?function(t){return a.flat.call(t)}:function(t){return a.concat.apply([],t)},c=a.push,f=a.indexOf,h={},d=h.toString,p=h.hasOwnProperty,g=p.toString,v=g.call(Object),m={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},b=function(t){return null!=t&&t===t.window},w=n.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function S(t,e,n){var r,i,o=(n=n||w).createElement("script");if(o.text=t,e)for(r in x)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function k(t){return null==t?t+"":"object"===i(t)||"function"==typeof t?h[d.call(t)]||"object":i(t)}var _="3.6.0",E=function t(e,n){return new t.fn.init(e,n)};function A(t){var e=!!t&&"length"in t&&t.length,n=k(t);return!y(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}E.fn=E.prototype={jquery:_,constructor:E,length:0,toArray:function(){return u.call(this)},get:function(t){return null==t?u.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=E.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return E.each(this,t)},map:function(t){return this.pushStack(E.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:a.sort,splice:a.splice},E.extend=E.fn.extend=function(){var t,e,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===i(s)||y(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(t=arguments[u]))for(e in t)r=t[e],"__proto__"!==e&&s!==r&&(c&&r&&(E.isPlainObject(r)||(o=Array.isArray(r)))?(n=s[e],a=o&&!Array.isArray(n)?[]:o||E.isPlainObject(n)?n:{},o=!1,s[e]=E.extend(c,a,r)):void 0!==r&&(s[e]=r));return s},E.extend({expando:"jQuery"+(_+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==d.call(t)||(e=s(t))&&("function"!=typeof(n=p.call(e,"constructor")&&e.constructor)||g.call(n)!==v))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){S(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(A(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(A(Object(t))?E.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:f.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,a=[];if(A(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&a.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&a.push(i);return l(a)},guid:1,support:m}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=a[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){h["[object "+e+"]"]=e.toLowerCase()}));var P=function(t){var e,n,r,i,o,a,s,u,l,c,f,h,d,p,g,v,m,y,b,w="sizzle"+1*new Date,x=t.document,S=0,k=0,_=ut(),E=ut(),A=ut(),P=ut(),C=function(t,e){return t===e&&(f=!0),0},T={}.hasOwnProperty,N=[],L=N.pop,M=N.push,O=N.push,R=N.slice,F=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},D="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\[[\\x20\\t\\r\\n\\f]*("+I+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+j+"*\\]",z=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",V=new RegExp(j+"+","g"),$=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),U=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),q=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),H=new RegExp(j+"|>"),G=new RegExp(z),W=new RegExp("^"+I+"$"),Y={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+D+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){h()},at=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(N=R.call(x.childNodes),x.childNodes),N[x.childNodes.length].nodeType}catch(t){O={apply:N.length?function(t,e){M.apply(t,R.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,l,c,f,p,m,y=e&&e.ownerDocument,x=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return r;if(!i&&(h(e),e=e||d,g)){if(11!==x&&(f=Z.exec(t)))if(o=f[1]){if(9===x){if(!(l=e.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&b(e,l)&&l.id===o)return r.push(l),r}else{if(f[2])return O.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return O.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!P[t+" "]&&(!v||!v.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(m=t,y=e,1===x&&(H.test(t)||q.test(t))){for((y=tt.test(t)&&mt(e.parentNode)||e)===e&&n.scope||((c=e.getAttribute("id"))?c=c.replace(rt,it):e.setAttribute("id",c=w)),s=(p=a(t)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+bt(p[s]);m=p.join(",")}try{return O.apply(r,y.querySelectorAll(m)),r}catch(e){P(t,!0)}finally{c===w&&e.removeAttribute("id")}}}return u(t.replace($,"$1"),e,r,i)}function ut(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function lt(t){return t[w]=!0,t}function ct(t){var e=d.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ft(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function ht(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function dt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function gt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return lt((function(e){return e=+e,lt((function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function mt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!X.test(e||n&&n.nodeName||"HTML")},h=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:x;return a!=d&&9===a.nodeType&&a.documentElement?(p=(d=a).documentElement,g=!o(d),x!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.scope=ct((function(t){return p.appendChild(t).appendChild(d.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ct((function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(d.getElementsByClassName),n.getById=ct((function(t){return p.appendChild(t).id=w,!d.getElementsByName||!d.getElementsByName(w).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},m=[],v=[],(n.qsa=J.test(d.querySelectorAll))&&(ct((function(t){var e;p.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+D+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(e=d.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=d.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=J.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ct((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),m.push("!=",z)})),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),e=J.test(p.compareDocumentPosition),b=e||J.test(p.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},C=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==d||t.ownerDocument==x&&b(x,t)?-1:e==d||e.ownerDocument==x&&b(x,e)?1:c?F(c,t)-F(c,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t==d?-1:e==d?1:i?-1:o?1:c?F(c,t)-F(c,e):0;if(i===o)return ht(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ht(a[r],s[r]):a[r]==x?-1:s[r]==x?1:0},d):d},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&g&&!P[e+" "]&&(!m||!m.test(e))&&(!v||!v.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){P(e,!0)}return st(e,d,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=d&&h(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=d&&h(t);var i=r.attrHandle[e.toLowerCase()],o=i&&T.call(r.attrHandle,e.toLowerCase())?i(t,e,!g):void 0;return void 0!==o?o:n.attributes||!g?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(C),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return c=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},(r=st.selectors={cacheLength:50,createPseudo:lt,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&G.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=_[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+j+"|$)"))&&_(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(V," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,f,h,d,p,g=o!==a?"nextSibling":"previousSibling",v=e.parentNode,m=s&&e.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(v){if(o){for(;g;){for(h=e;h=h[g];)if(s?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?v.firstChild:v.lastChild],a&&y){for(b=(d=(l=(c=(f=(h=v)[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===S&&l[1])&&l[2],h=d&&v.childNodes[d];h=++d&&h&&h[g]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[S,d,b];break}}else if(y&&(b=d=(l=(c=(f=(h=e)[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===S&&l[1]),!1===b)for(;(h=++d&&h&&h[g]||(b=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++b||(y&&((c=(f=h[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]=[S,b]),h!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[w]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?lt((function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=F(t,o[a])]=!(n[r]=o[a])})):function(t){return i(t,0,n)}):i}},pseudos:{not:lt((function(t){var e=[],n=[],r=s(t.replace($,"$1"));return r[w]?lt((function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:lt((function(t){return function(e){return st(t,e).length>0}})),contains:lt((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:lt((function(t){return W.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:gt(!1),disabled:gt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return Q.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:vt((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=dt(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=pt(e);function yt(){}function bt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function wt(t,e,n){var r=e.dir,i=e.next,o=i||r,a=n&&"parentNode"===o,s=k++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,i);return!1}:function(e,n,u){var l,c,f,h=[S,s];if(u){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(c=(f=e[w]||(e[w]={}))[e.uniqueID]||(f[e.uniqueID]={}),i&&i===e.nodeName.toLowerCase())e=e[r]||e;else{if((l=c[o])&&l[0]===S&&l[1]===s)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function xt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function St(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,l=null!=e;s<u;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),l&&e.push(s)));return a}function kt(t,e,n,r,i,o){return r&&!r[w]&&(r=kt(r)),i&&!i[w]&&(i=kt(i,o)),lt((function(o,a,s,u){var l,c,f,h=[],d=[],p=a.length,g=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)st(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),v=!t||!o&&e?g:St(g,h,t,s,u),m=n?i||(o?t:p||r)?[]:a:v;if(n&&n(v,m,s,u),r)for(l=St(m,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(m[d[c]]=!(v[d[c]]=f));if(o){if(i||t){if(i){for(l=[],c=m.length;c--;)(f=m[c])&&l.push(v[c]=f);i(null,m=[],l,u)}for(c=m.length;c--;)(f=m[c])&&(l=i?F(o,f):h[c])>-1&&(o[l]=!(a[l]=f))}}else m=St(m===a?m.splice(p,m.length):m),i?i(null,a,m,u):O.apply(a,m)}))}function _t(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],u=a?1:0,c=wt((function(t){return t===e}),s,!0),f=wt((function(t){return F(e,t)>-1}),s,!0),h=[function(t,n,r){var i=!a&&(r||n!==l)||((e=n).nodeType?c(t,n,r):f(t,n,r));return e=null,i}];u<o;u++)if(n=r.relative[t[u].type])h=[wt(xt(h),n)];else{if((n=r.filter[t[u].type].apply(null,t[u].matches))[w]){for(i=++u;i<o&&!r.relative[t[i].type];i++);return kt(u>1&&xt(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace($,"$1"),n,u<i&&_t(t.slice(u,i)),i<o&&_t(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return xt(h)}return yt.prototype=r.filters=r.pseudos,r.setFilters=new yt,a=st.tokenize=function(t,e){var n,i,o,a,s,u,l,c=E[t+" "];if(c)return e?0:c.slice(0);for(s=t,u=[],l=r.preFilter;s;){for(a in n&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=q.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace($," ")}),s=s.slice(n.length)),r.filter)!(i=Y[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return e?s.length:s?st.error(t):E(t,u).slice(0)},s=st.compile=function(t,e){var n,i=[],o=[],s=A[t+" "];if(!s){for(e||(e=a(t)),n=e.length;n--;)(s=_t(e[n]))[w]?i.push(s):o.push(s);(s=A(t,function(t,e){var n=e.length>0,i=t.length>0,o=function(o,a,s,u,c){var f,p,v,m=0,y="0",b=o&&[],w=[],x=l,k=o||i&&r.find.TAG("*",c),_=S+=null==x?1:Math.random()||.1,E=k.length;for(c&&(l=a==d||a||c);y!==E&&null!=(f=k[y]);y++){if(i&&f){for(p=0,a||f.ownerDocument==d||(h(f),s=!g);v=t[p++];)if(v(f,a||d,s)){u.push(f);break}c&&(S=_)}n&&((f=!v&&f)&&m--,o&&b.push(f))}if(m+=y,n&&y!==m){for(p=0;v=e[p++];)v(b,w,a,s);if(o){if(m>0)for(;y--;)b[y]||w[y]||(w[y]=L.call(u));w=St(w)}O.apply(u,w),c&&!o&&w.length>0&&m+e.length>1&&st.uniqueSort(u)}return c&&(S=_,l=x),b};return n?lt(o):o}(o,i))).selector=t}return s},u=st.select=function(t,e,n,i){var o,u,l,c,f,h="function"==typeof t&&t,d=!i&&a(t=h.selector||t);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===e.nodeType&&g&&r.relative[u[1].type]){if(!(e=(r.find.ID(l.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(o=Y.needsContext.test(t)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(et,nt),tt.test(u[0].type)&&mt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return O.apply(n,i),n;break}}return(h||s(t,d))(i,e,!g,n,!e||tt.test(t)&&mt(e.parentNode)||e),n},n.sortStable=w.split("").sort(C).join("")===w,n.detectDuplicates=!!f,h(),n.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))})),ct((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ft("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ct((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ft("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ct((function(t){return null==t.getAttribute("disabled")}))||ft(D,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),st}(n);E.find=P,(E.expr=P.selectors)[":"]=E.expr.pseudos,E.uniqueSort=E.unique=P.uniqueSort,E.text=P.getText,E.isXMLDoc=P.isXML,E.contains=P.contains,E.escapeSelector=P.escape;var C=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&E(t).is(n))break;r.push(t)}return r},T=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},N=E.expr.match.needsContext;function L(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,e,n){return y(e)?E.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?E.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?E.grep(t,(function(t){return f.call(e,t)>-1!==n})):E.filter(e,t,n)}E.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?E.find.matchesSelector(r,t)?[r]:[]:E.find.matches(t,E.grep(e,(function(t){return 1===t.nodeType})))},E.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(E(t).filter((function(){for(e=0;e<r;e++)if(E.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)E.find(t,i[e],n);return r>1?E.uniqueSort(n):n},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&N.test(t)?E(t):t||[],!1).length}});var R,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||R,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:F.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof E?e[0]:e,E.merge(this,E.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:w,!0)),M.test(r[1])&&E.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=w.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(E):E.makeArray(t,this)}).prototype=E.fn,R=E(w);var D=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function I(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}E.fn.extend({has:function(t){var e=E(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(E.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],a="string"!=typeof t&&E(t);if(!N.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?f.call(E(t),this[0]):f.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),E.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return C(t,"parentNode")},parentsUntil:function(t,e,n){return C(t,"parentNode",n)},next:function(t){return I(t,"nextSibling")},prev:function(t){return I(t,"previousSibling")},nextAll:function(t){return C(t,"nextSibling")},prevAll:function(t){return C(t,"previousSibling")},nextUntil:function(t,e,n){return C(t,"nextSibling",n)},prevUntil:function(t,e,n){return C(t,"previousSibling",n)},siblings:function(t){return T((t.parentNode||{}).firstChild,t)},children:function(t){return T(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(L(t,"template")&&(t=t.content||t),E.merge([],t.childNodes))}},(function(t,e){E.fn[t]=function(n,r){var i=E.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(j[t]||E.uniqueSort(i),D.test(t)&&i.reverse()),this.pushStack(i)}}));var B=/[^\x20\t\r\n\f]+/g;function z(t){return t}function V(t){throw t}function $(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}E.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return E.each(t.match(B)||[],(function(t,n){e[n]=!0})),e}(t):E.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){E.each(n,(function(n,r){y(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==k(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return E.each(arguments,(function(t,e){for(var n;(n=E.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(t){return t?E.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},E.extend({Deferred:function(t){var e=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return E.Deferred((function(n){E.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];a[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,r,o){var a=0;function s(t,e,r,o){return function(){var u=this,l=arguments,c=function(){var n,c;if(!(t<a)){if((n=r.apply(u,l))===e.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"===i(n)||"function"==typeof n)&&n.then,y(c)?o?c.call(n,s(a,e,z,o),s(a,e,V,o)):(a++,c.call(n,s(a,e,z,o),s(a,e,V,o),s(a,e,z,e.notifyWith))):(r!==z&&(u=void 0,l=[n]),(o||e.resolveWith)(u,l))}},f=o?c:function(){try{c()}catch(n){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(n,f.stackTrace),t+1>=a&&(r!==V&&(u=void 0,l=[n]),e.rejectWith(u,l))}};t?f():(E.Deferred.getStackHook&&(f.stackTrace=E.Deferred.getStackHook()),n.setTimeout(f))}}return E.Deferred((function(n){e[0][3].add(s(0,n,y(o)?o:z,n.notifyWith)),e[1][3].add(s(0,n,y(t)?t:z)),e[2][3].add(s(0,n,y(r)?r:V))})).promise()},promise:function(t){return null!=t?E.extend(t,o):o}},a={};return E.each(e,(function(t,n){var i=n[2],s=n[5];o[n[1]]=i.add,s&&i.add((function(){r=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),i.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=i.fireWith})),o.promise(a),t&&t.call(a,a),a},when:function(t){var e=arguments.length,n=e,r=Array(n),i=u.call(arguments),o=E.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?u.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&($(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)$(i[n],a(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&U.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},E.readyException=function(t){n.setTimeout((function(){throw t}))};var q=E.Deferred();function H(){w.removeEventListener("DOMContentLoaded",H),n.removeEventListener("load",H),E.ready()}E.fn.ready=function(t){return q.then(t).catch((function(t){E.readyException(t)})),this},E.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==t&&--E.readyWait>0||q.resolveWith(w,[E]))}}),E.ready.then=q.then,"complete"===w.readyState||"loading"!==w.readyState&&!w.documentElement.doScroll?n.setTimeout(E.ready):(w.addEventListener("DOMContentLoaded",H),n.addEventListener("load",H));var G=function t(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===k(r))for(u in o=!0,r)t(e,n,u,r[u],!0,a,s);else if(void 0!==i&&(o=!0,y(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(t,e,n){return c.call(E(t),n)})),n))for(;u<l;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},W=/^-ms-/,Y=/-([a-z])/g;function X(t,e){return e.toUpperCase()}function Q(t){return t.replace(W,"ms-").replace(Y,X)}var K=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=E.expando+J.uid++}J.uid=1,J.prototype={cache:function(t){var e=t[this.expando];return e||(e={},K(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[Q(e)]=n;else for(r in e)i[Q(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][Q(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(Q):(e=Q(e))in r?[e]:e.match(B)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||E.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!E.isEmptyObject(e)}};var Z=new J,tt=new J,et=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,nt=/[A-Z]/g;function rt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(nt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:et.test(t)?JSON.parse(t):t)}(n)}catch(t){}tt.set(t,e,n)}else n=void 0;return n}E.extend({hasData:function(t){return tt.hasData(t)||Z.hasData(t)},data:function(t,e,n){return tt.access(t,e,n)},removeData:function(t,e){tt.remove(t,e)},_data:function(t,e,n){return Z.access(t,e,n)},_removeData:function(t,e){Z.remove(t,e)}}),E.fn.extend({data:function(t,e){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===t){if(this.length&&(o=tt.get(a),1===a.nodeType&&!Z.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=Q(r.slice(5)),rt(a,r,o[r]));Z.set(a,"hasDataAttrs",!0)}return o}return"object"===i(t)?this.each((function(){tt.set(this,t)})):G(this,(function(e){var n;if(a&&void 0===e)return void 0!==(n=tt.get(a,t))||void 0!==(n=rt(a,t))?n:void 0;this.each((function(){tt.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){tt.remove(this,t)}))}}),E.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Z.get(t,e),n&&(!r||Array.isArray(n)?r=Z.access(t,e,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=E.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=E._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){E.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Z.get(t,n)||Z.access(t,n,{empty:E.Callbacks("once memory").add((function(){Z.remove(t,[e+"queue",n])}))})}}),E.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?E.queue(this[0],t):void 0===e?this:this.each((function(){var n=E.queue(this,t,e);E._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&E.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){E.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=E.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=Z.get(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var it=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ot=new RegExp("^(?:([+-])=|)("+it+")([a-z%]*)$","i"),at=["Top","Right","Bottom","Left"],st=w.documentElement,ut=function(t){return E.contains(t.ownerDocument,t)},lt={composed:!0};st.getRootNode&&(ut=function(t){return E.contains(t.ownerDocument,t)||t.getRootNode(lt)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ut(t)&&"none"===E.css(t,"display")};function ft(t,e,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(t,e,"")},u=s(),l=n&&n[3]||(E.cssNumber[e]?"":"px"),c=t.nodeType&&(E.cssNumber[e]||"px"!==l&&+u)&&ot.exec(E.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)E.style(t,e,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;E.style(t,e,(c*=2)+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ht={};function dt(t){var e,n=t.ownerDocument,r=t.nodeName,i=ht[r];return i||(e=n.body.appendChild(n.createElement(r)),i=E.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),ht[r]=i,i)}function pt(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=Z.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ct(r)&&(i[o]=dt(r))):"none"!==n&&(i[o]="none",Z.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}E.fn.extend({show:function(){return pt(this,!0)},hide:function(){return pt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?E(this).show():E(this).hide()}))}});var gt,vt,mt=/^(?:checkbox|radio)$/i,yt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,bt=/^$|^module$|\/(?:java|ecma)script/i;gt=w.createDocumentFragment().appendChild(w.createElement("div")),(vt=w.createElement("input")).setAttribute("type","radio"),vt.setAttribute("checked","checked"),vt.setAttribute("name","t"),gt.appendChild(vt),m.checkClone=gt.cloneNode(!0).cloneNode(!0).lastChild.checked,gt.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!gt.cloneNode(!0).lastChild.defaultValue,gt.innerHTML="<option></option>",m.option=!!gt.lastChild;var wt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function xt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&L(t,e)?E.merge([t],n):n}function St(t,e){for(var n=0,r=t.length;n<r;n++)Z.set(t[n],"globalEval",!e||Z.get(e[n],"globalEval"))}wt.tbody=wt.tfoot=wt.colgroup=wt.caption=wt.thead,wt.th=wt.td,m.option||(wt.optgroup=wt.option=[1,"<select multiple='multiple'>","</select>"]);var kt=/<|&#?\w+;/;function _t(t,e,n,r,i){for(var o,a,s,u,l,c,f=e.createDocumentFragment(),h=[],d=0,p=t.length;d<p;d++)if((o=t[d])||0===o)if("object"===k(o))E.merge(h,o.nodeType?[o]:o);else if(kt.test(o)){for(a=a||f.appendChild(e.createElement("div")),s=(yt.exec(o)||["",""])[1].toLowerCase(),u=wt[s]||wt._default,a.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;E.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(e.createTextNode(o));for(f.textContent="",d=0;o=h[d++];)if(r&&E.inArray(o,r)>-1)i&&i.push(o);else if(l=ut(o),a=xt(f.appendChild(o),"script"),l&&St(a),n)for(c=0;o=a[c++];)bt.test(o.type||"")&&n.push(o);return f}var Et=/^([^.]*)(?:\.(.+)|)/;function At(){return!0}function Pt(){return!1}function Ct(t,e){return t===function(){try{return w.activeElement}catch(t){}}()==("focus"===e)}function Tt(t,e,n,r,o,a){var s,u;if("object"===i(e)){for(u in"string"!=typeof n&&(r=r||n,n=void 0),e)Tt(t,u,n,r,e[u],a);return t}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=Pt;else if(!o)return t;return 1===a&&(s=o,(o=function(t){return E().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=E.guid++)),t.each((function(){E.event.add(this,e,o,r,n)}))}function Nt(t,e,n){n?(Z.set(t,e,!1),E.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Z.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(E.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=u.call(arguments),Z.set(this,e,o),r=n(this,e),this[e](),o!==(i=Z.get(this,e))||r?Z.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i&&i.value}else o.length&&(Z.set(this,e,{value:E.event.trigger(E.extend(o[0],E.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Z.get(t,e)&&E.event.add(t,e,At)}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,h,d,p,g,v=Z.get(t);if(K(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(st,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(B)||[""]).length;l--;)d=g=(s=Et.exec(e[l])||[])[1],p=(s[2]||"").split(".").sort(),d&&(f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[d])||((h=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,p,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),E.event.global[d]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,l,c,f,h,d,p,g,v=Z.hasData(t)&&Z.get(t);if(v&&(u=v.events)){for(l=(e=(e||"").match(B)||[""]).length;l--;)if(d=g=(s=Et.exec(e[l])||[])[1],p=(s[2]||"").split(".").sort(),d){for(f=E.event.special[d]||{},h=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(t,c));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(t,p,v.handle)||E.removeEvent(t,d,v.handle),delete u[d])}else for(d in u)E.event.remove(t,d+e[l],n,r,!0);E.isEmptyObject(u)&&Z.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(t),l=(Z.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(s[0]=u,e=1;e<arguments.length;e++)s[e]=arguments[e];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(a=E.event.handlers.call(this,u,l),e=0;(i=a[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,a,s=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=e[n]).selector+" "]&&(a[i]=r.needsContext?E(i,this).index(l)>-1:E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<e.length&&s.push({elem:l,handlers:e.slice(u)}),s},addProp:function(t,e){Object.defineProperty(E.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[E.expando]?t:new E.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return mt.test(e.type)&&e.click&&L(e,"input")&&Nt(e,"click",At),!1},trigger:function(t){var e=this||t;return mt.test(e.type)&&e.click&&L(e,"input")&&Nt(e,"click"),!0},_default:function(t){var e=t.target;return mt.test(e.type)&&e.click&&L(e,"input")&&Z.get(e,"click")||L(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},E.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(E.Event=function(t,e){if(!(this instanceof E.Event))return new E.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?At:Pt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&E.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[E.expando]=!0}).prototype={constructor:E.Event,isDefaultPrevented:Pt,isPropagationStopped:Pt,isImmediatePropagationStopped:Pt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=At,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=At,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=At,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(t,e){E.event.special[t]={setup:function(){return Nt(this,t,Ct),!1},trigger:function(){return Nt(this,t),!0},_default:function(){return!0},delegateType:e}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){E.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||E.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),E.fn.extend({on:function(t,e,n,r){return Tt(this,t,e,n,r)},one:function(t,e,n,r){return Tt(this,t,e,n,r,1)},off:function(t,e,n){var r,o;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,E(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===i(t)){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Pt),this.each((function(){E.event.remove(this,t,n,e)}))}});var Lt=/<script|<style|<link/i,Mt=/checked\s*(?:[^=]|=\s*.checked.)/i,Ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Rt(t,e){return L(t,"table")&&L(11!==e.nodeType?e:e.firstChild,"tr")&&E(t).children("tbody")[0]||t}function Ft(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Dt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function jt(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if(Z.hasData(t)&&(s=Z.get(t).events))for(i in Z.remove(e,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)E.event.add(e,i,s[i][n]);tt.hasData(t)&&(o=tt.access(t),a=E.extend({},o),tt.set(e,a))}}function It(t,e){var n=e.nodeName.toLowerCase();"input"===n&&mt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Bt(t,e,n,r){e=l(e);var i,o,a,s,u,c,f=0,h=t.length,d=h-1,p=e[0],g=y(p);if(g||h>1&&"string"==typeof p&&!m.checkClone&&Mt.test(p))return t.each((function(i){var o=t.eq(i);g&&(e[0]=p.call(this,i,o.html())),Bt(o,e,n,r)}));if(h&&(o=(i=_t(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=E.map(xt(i,"script"),Ft)).length;f<h;f++)u=i,f!==d&&(u=E.clone(u,!0,!0),s&&E.merge(a,xt(u,"script"))),n.call(t[f],u,f);if(s)for(c=a[a.length-1].ownerDocument,E.map(a,Dt),f=0;f<s;f++)u=a[f],bt.test(u.type||"")&&!Z.access(u,"globalEval")&&E.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?E._evalUrl&&!u.noModule&&E._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):S(u.textContent.replace(Ot,""),u,c))}return t}function zt(t,e,n){for(var r,i=e?E.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(xt(r)),r.parentNode&&(n&&ut(r)&&St(xt(r,"script")),r.parentNode.removeChild(r));return t}E.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=ut(t);if(!(m.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||E.isXMLDoc(t)))for(a=xt(s),r=0,i=(o=xt(t)).length;r<i;r++)It(o[r],a[r]);if(e)if(n)for(o=o||xt(t),a=a||xt(s),r=0,i=o.length;r<i;r++)jt(o[r],a[r]);else jt(t,s);return(a=xt(s,"script")).length>0&&St(a,!u&&xt(t,"script")),s},cleanData:function(t){for(var e,n,r,i=E.event.special,o=0;void 0!==(n=t[o]);o++)if(K(n)){if(e=n[Z.expando]){if(e.events)for(r in e.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,e.handle);n[Z.expando]=void 0}n[tt.expando]&&(n[tt.expando]=void 0)}}}),E.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return G(this,(function(t){return void 0===t?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Bt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Rt(this,t).appendChild(t)}))},prepend:function(){return Bt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Rt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(E.cleanData(xt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return E.clone(this,t,e)}))},html:function(t){return G(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Lt.test(t)&&!wt[(yt.exec(t)||["",""])[1].toLowerCase()]){t=E.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(E.cleanData(xt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Bt(this,arguments,(function(e){var n=this.parentNode;E.inArray(this,t)<0&&(E.cleanData(xt(this)),n&&n.replaceChild(e,this))}),t)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){E.fn[t]=function(t){for(var n,r=[],i=E(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),E(i[a])[e](n),c.apply(r,n.get());return this.pushStack(r)}}));var Vt=new RegExp("^("+it+")(?!px)[a-z%]+$","i"),$t=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Ut=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},qt=new RegExp(at.join("|"),"i");function Ht(t,e,n){var r,i,o,a,s=t.style;return(n=n||$t(t))&&(""!==(a=n.getPropertyValue(e)||n[e])||ut(t)||(a=E.style(t,e)),!m.pixelBoxStyles()&&Vt.test(a)&&qt.test(e)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Gt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",st.appendChild(l).appendChild(c);var t=n.getComputedStyle(c);r="1%"!==t.top,u=12===e(t.marginLeft),c.style.right="60%",a=36===e(t.right),i=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),st.removeChild(l),c=null}}function e(t){return Math.round(parseFloat(t))}var r,i,o,a,s,u,l=w.createElement("div"),c=w.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===c.style.backgroundClip,E.extend(m,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,r,i;return null==s&&(t=w.createElement("table"),e=w.createElement("tr"),r=w.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",r.style.height="9px",r.style.display="block",st.appendChild(t).appendChild(e).appendChild(r),i=n.getComputedStyle(e),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,st.removeChild(t)),s}}))}();var Wt=["Webkit","Moz","ms"],Yt=w.createElement("div").style,Xt={};function Qt(t){return E.cssProps[t]||Xt[t]||(t in Yt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Wt.length;n--;)if((t=Wt[n]+e)in Yt)return t}(t)||t)}var Kt=/^(none|table(?!-c[ea]).+)/,Jt=/^--/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=ot.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=E.css(t,n+at[a],!0,i)),r?("content"===n&&(u-=E.css(t,"padding"+at[a],!0,i)),"margin"!==n&&(u-=E.css(t,"border"+at[a]+"Width",!0,i))):(u+=E.css(t,"padding"+at[a],!0,i),"padding"!==n?u+=E.css(t,"border"+at[a]+"Width",!0,i):s+=E.css(t,"border"+at[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u}function re(t,e,n){var r=$t(t),i=(!m.boxSizingReliable()||n)&&"border-box"===E.css(t,"boxSizing",!1,r),o=i,a=Ht(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Vt.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&L(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===E.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ne(t,e,n||(i?"border":"content"),o,r,a)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}E.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ht(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,a,s,u=Q(e),l=Jt.test(e),c=t.style;if(l||(e=Qt(u)),s=E.cssHooks[e]||E.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,r))?o:c[e];"string"===(a=i(n))&&(o=ot.exec(n))&&o[1]&&(n=ft(t,e,o),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=o&&o[3]||(E.cssNumber[u]?"":"px")),m.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,r))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,o,a,s=Q(e);return Jt.test(e)||(e=Qt(s)),(a=E.cssHooks[e]||E.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Ht(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(t,e){E.cssHooks[e]={get:function(t,n,r){if(n)return!Kt.test(E.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):Ut(t,Zt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=$t(t),a=!m.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===E.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,s,o):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=ot.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=E.css(t,e)),ee(0,n,u)}}})),E.cssHooks.marginLeft=Gt(m.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Ht(t,"marginLeft"))||t.getBoundingClientRect().left-Ut(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(t,e){E.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+at[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(E.cssHooks[t+e].set=ee)})),E.fn.extend({css:function(t,e){return G(this,(function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=$t(t),i=e.length;a<i;a++)o[e[a]]=E.css(t,e[a],!1,r);return o}return void 0!==n?E.style(t,e,n):E.css(t,e)}),t,e,arguments.length>1)}}),E.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||E.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=E.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=E.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){E.fx.step[t.prop]?E.fx.step[t.prop](t):1!==t.elem.nodeType||!E.cssHooks[t.prop]&&null==t.elem.style[Qt(t.prop)]?t.elem[t.prop]=t.now:E.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},E.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(E.fx=ie.prototype.init).step={};var oe,ae,se=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){ae&&(!1===w.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(le):n.setTimeout(le,E.fx.interval),E.fx.tick())}function ce(){return n.setTimeout((function(){oe=void 0})),oe=Date.now()}function fe(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=at[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function he(t,e,n){for(var r,i=(de.tweeners[e]||[]).concat(de.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function de(t,e,n){var r,i,o=0,a=de.prefilters.length,s=E.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=oe||ce(),n=Math.max(0,l.startTime+l.duration-e),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(t,[l,r,n]),r<1&&a?n:(a||s.notifyWith(t,[l,1,0]),s.resolveWith(t,[l]),!1)},l=s.promise({elem:t,props:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var r=E.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return e?(s.notifyWith(t,[l,1,0]),s.resolveWith(t,[l,e])):s.rejectWith(t,[l,e]),this}}),c=l.props;for(function(t,e){var n,r,i,o,a;for(n in t)if(i=e[r=Q(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=E.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=de.prefilters[o].call(l,t,c,l.opts))return y(r.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return E.map(c,he,l),y(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),E.fx.timer(E.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(de,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ft(n.elem,t,ot.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(B);for(var n,r=0,i=t.length;r<i;r++)n=t[r],de.tweeners[n]=de.tweeners[n]||[],de.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,a,s,u,l,c,f="width"in e||"height"in e,h=this,d={},p=t.style,g=t.nodeType&&ct(t),v=Z.get(t,"fxshow");for(r in n.queue||(null==(a=E._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,E.queue(t,"fx").length||a.empty.fire()}))}))),e)if(i=e[r],se.test(i)){if(delete e[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||E.style(t,r)}if((u=!E.isEmptyObject(e))||!E.isEmptyObject(d))for(r in f&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=v&&v.display)&&(l=Z.get(t,"display")),"none"===(c=E.css(t,"display"))&&(l?c=l:(pt([t],!0),l=t.style.display||l,c=E.css(t,"display"),pt([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===E.css(t,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Z.access(t,"fxshow",{display:l}),o&&(v.hidden=!g),g&&pt([t],!0),h.done((function(){for(r in g||pt([t]),Z.remove(t,"fxshow"),d)E.style(t,r,d[r])}))),u=he(g?v[r]:0,r,h),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?de.prefilters.unshift(t):de.prefilters.push(t)}}),E.speed=function(t,e,n){var r=t&&"object"===i(t)?E.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return E.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(t,e,n,r){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=E.isEmptyObject(t),o=E.speed(e,n,r),a=function(){var e=de(this,E.extend({},t),o);(i||Z.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=E.timers,a=Z.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ue.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||E.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Z.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=E.timers,a=r?r.length:0;for(n.finish=!0,E.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(t,e){var n=E.fn[e];E.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(fe(e,!0),t,r,i)}})),E.each({slideDown:fe("show"),slideUp:fe("hide"),slideToggle:fe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){E.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),E.timers=[],E.fx.tick=function(){var t,e=0,n=E.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||E.fx.stop(),oe=void 0},E.fx.timer=function(t){E.timers.push(t),E.fx.start()},E.fx.interval=13,E.fx.start=function(){ae||(ae=!0,le())},E.fx.stop=function(){ae=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(t,e){return t=E.fx&&E.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,r){var i=n.setTimeout(e,t);r.stop=function(){n.clearTimeout(i)}}))},function(){var t=w.createElement("input"),e=w.createElement("select").appendChild(w.createElement("option"));t.type="checkbox",m.checkOn=""!==t.value,m.optSelected=e.selected,(t=w.createElement("input")).value="t",t.type="radio",m.radioValue="t"===t.value}();var pe,ge=E.expr.attrHandle;E.fn.extend({attr:function(t,e){return G(this,E.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){E.removeAttr(this,t)}))}}),E.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?E.prop(t,e,n):(1===o&&E.isXMLDoc(t)||(i=E.attrHooks[e.toLowerCase()]||(E.expr.match.bool.test(e)?pe:void 0)),void 0!==n?null===n?void E.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=E.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!m.radioValue&&"radio"===e&&L(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(B);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),pe={set:function(t,e,n){return!1===e?E.removeAttr(t,n):t.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ge[e]||E.find.attr;ge[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=ge[a],ge[a]=i,i=null!=n(t,e,r)?a:null,ge[a]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,me=/^(?:a|area)$/i;function ye(t){return(t.match(B)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(B)||[]}E.fn.extend({prop:function(t,e){return G(this,E.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[E.propFix[t]||t]}))}}),E.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(t)||(e=E.propFix[e]||e,i=E.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=E.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(E.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(y(t))return this.each((function(e){E(this).addClass(t.call(this,e,be(this)))}));if((e=we(t)).length)for(;n=this[u++];)if(i=be(n),r=1===n.nodeType&&" "+ye(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ye(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(y(t))return this.each((function(e){E(this).removeClass(t.call(this,e,be(this)))}));if(!arguments.length)return this.attr("class","");if((e=we(t)).length)for(;n=this[u++];)if(i=be(n),r=1===n.nodeType&&" "+ye(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=ye(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=i(t),r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):y(t)?this.each((function(n){E(this).toggleClass(t.call(this,n,be(this),e),e)})):this.each((function(){var e,i,o,a;if(r)for(i=0,o=E(this),a=we(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=be(this))&&Z.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Z.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ye(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;E.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,E(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(t){return null==t?"":t+""}))),(e=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xe,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(t){var e=E.find.attr(t,"value");return null!=e?e:ye(E.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!L(n.parentNode,"optgroup"))){if(e=E(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=E.makeArray(e),a=i.length;a--;)((r=i[a]).selected=E.inArray(E.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=E.inArray(E(t).val(),e)>-1}},m.checkOn||(E.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),m.focusin="onfocusin"in n;var Se=/^(?:focusinfocus|focusoutblur)$/,ke=function(t){t.stopPropagation()};E.extend(E.event,{trigger:function(t,e,r,o){var a,s,u,l,c,f,h,d,g=[r||w],v=p.call(t,"type")?t.type:t,m=p.call(t,"namespace")?t.namespace.split("."):[];if(s=d=u=r=r||w,3!==r.nodeType&&8!==r.nodeType&&!Se.test(v+E.event.triggered)&&(v.indexOf(".")>-1&&(m=v.split("."),v=m.shift(),m.sort()),c=v.indexOf(":")<0&&"on"+v,(t=t[E.expando]?t:new E.Event(v,"object"===i(t)&&t)).isTrigger=o?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:E.makeArray(e,[t]),h=E.event.special[v]||{},o||!h.trigger||!1!==h.trigger.apply(r,e))){if(!o&&!h.noBubble&&!b(r)){for(l=h.delegateType||v,Se.test(l+v)||(s=s.parentNode);s;s=s.parentNode)g.push(s),u=s;u===(r.ownerDocument||w)&&g.push(u.defaultView||u.parentWindow||n)}for(a=0;(s=g[a++])&&!t.isPropagationStopped();)d=s,t.type=a>1?l:h.bindType||v,(f=(Z.get(s,"events")||Object.create(null))[t.type]&&Z.get(s,"handle"))&&f.apply(s,e),(f=c&&s[c])&&f.apply&&K(s)&&(t.result=f.apply(s,e),!1===t.result&&t.preventDefault());return t.type=v,o||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(g.pop(),e)||!K(r)||c&&y(r[v])&&!b(r)&&((u=r[c])&&(r[c]=null),E.event.triggered=v,t.isPropagationStopped()&&d.addEventListener(v,ke),r[v](),t.isPropagationStopped()&&d.removeEventListener(v,ke),E.event.triggered=void 0,u&&(r[c]=u)),t.result}},simulate:function(t,e,n){var r=E.extend(new E.Event,n,{type:t,isSimulated:!0});E.event.trigger(r,null,e)}}),E.fn.extend({trigger:function(t,e){return this.each((function(){E.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return E.event.trigger(t,e,n,!0)}}),m.focusin||E.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){E.event.simulate(e,t.target,E.event.fix(t))};E.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=Z.access(r,e);i||r.addEventListener(t,n,!0),Z.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Z.access(r,e)-1;i?Z.access(r,e,i):(r.removeEventListener(t,n,!0),Z.remove(r,e))}}}));var _e=n.location,Ee={guid:Date.now()},Ae=/\?/;E.parseXML=function(t){var e,r;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){}return r=e&&e.getElementsByTagName("parsererror")[0],e&&!r||E.error("Invalid XML: "+(r?E.map(r.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Pe=/\[\]$/,Ce=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Ne=/^(?:input|select|textarea|keygen)/i;function Le(t,e,n,r){var o;if(Array.isArray(e))E.each(e,(function(e,o){n||Pe.test(t)?r(t,o):Le(t+"["+("object"===i(o)&&null!=o?e:"")+"]",o,n,r)}));else if(n||"object"!==k(e))r(t,e);else for(o in e)Le(t+"["+o+"]",e[o],n,r)}E.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!E.isPlainObject(t))E.each(t,(function(){i(this.name,this.value)}));else for(n in t)Le(n,t[n],e,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=E.prop(this,"elements");return t?E.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!E(this).is(":disabled")&&Ne.test(this.nodeName)&&!Te.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}})):{name:e.name,value:n.replace(Ce,"\r\n")}})).get()}});var Me=/%20/g,Oe=/#.*$/,Re=/([?&])_=[^&]*/,Fe=/^(.*?):[ \t]*([^\r\n]*)$/gm,De=/^(?:GET|HEAD)$/,je=/^\/\//,Ie={},Be={},ze="*/".concat("*"),Ve=w.createElement("a");function $e(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(B)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Ue(t,e,n,r){var i={},o=t===Be;function a(s){var u;return i[s]=!0,E.each(t[s]||[],(function(t,s){var l=s(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)})),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function qe(t,e){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&E.extend(!0,t,r),t}Ve.href=_e.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_e.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_e.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?qe(qe(t,E.ajaxSettings),e):qe(E.ajaxSettings,t)},ajaxPrefilter:$e(Ie),ajaxTransport:$e(Be),ajax:function(t,e){"object"===i(t)&&(e=t,t=void 0);var r,o,a,s,u,l,c,f,h,d,p=E.ajaxSetup({},e=e||{}),g=p.context||p,v=p.context&&(g.nodeType||g.jquery)?E(g):E.event,m=E.Deferred(),y=E.Callbacks("once memory"),b=p.statusCode||{},x={},S={},k="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(c){if(!s)for(s={};e=Fe.exec(a);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(t,e){return null==c&&(t=S[t.toLowerCase()]=S[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==c&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)_.always(t[_.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||k;return r&&r.abort(e),A(0,e),this}};if(m.promise(_),p.url=((t||p.url||_e.href)+"").replace(je,_e.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(B)||[""],null==p.crossDomain){l=w.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Ve.protocol+"//"+Ve.host!=l.protocol+"//"+l.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=E.param(p.data,p.traditional)),Ue(Ie,p,e,_),c)return _;for(h in(f=E.event&&p.global)&&0==E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!De.test(p.type),o=p.url.replace(Oe,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Me,"+")):(d=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(Ae.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Re,"$1"),d=(Ae.test(o)?"&":"?")+"_="+Ee.guid+++d),p.url=o+d),p.ifModified&&(E.lastModified[o]&&_.setRequestHeader("If-Modified-Since",E.lastModified[o]),E.etag[o]&&_.setRequestHeader("If-None-Match",E.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&_.setRequestHeader("Content-Type",p.contentType),_.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+ze+"; q=0.01":""):p.accepts["*"]),p.headers)_.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(g,_,p)||c))return _.abort();if(k="abort",y.add(p.complete),_.done(p.success),_.fail(p.error),r=Ue(Be,p,e,_)){if(_.readyState=1,f&&v.trigger("ajaxSend",[_,p]),c)return _;p.async&&p.timeout>0&&(u=n.setTimeout((function(){_.abort("timeout")}),p.timeout));try{c=!1,r.send(x,A)}catch(t){if(c)throw t;A(-1,t)}}else A(-1,"No Transport");function A(t,e,i,s){var l,h,d,w,x,S=e;c||(c=!0,u&&n.clearTimeout(u),r=void 0,a=s||"",_.readyState=t>0?4:0,l=t>=200&&t<300||304===t,i&&(w=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,_,i)),!l&&E.inArray("script",p.dataTypes)>-1&&E.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(p,w,_,l),l?(p.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(E.lastModified[o]=x),(x=_.getResponseHeader("etag"))&&(E.etag[o]=x)),204===t||"HEAD"===p.type?S="nocontent":304===t?S="notmodified":(S=w.state,h=w.data,l=!(d=w.error))):(d=S,!t&&S||(S="error",t<0&&(t=0))),_.status=t,_.statusText=(e||S)+"",l?m.resolveWith(g,[h,S,_]):m.rejectWith(g,[_,S,d]),_.statusCode(b),b=void 0,f&&v.trigger(l?"ajaxSuccess":"ajaxError",[_,p,l?h:d]),y.fireWith(g,[_,S]),f&&(v.trigger("ajaxComplete",[_,p]),--E.active||E.event.trigger("ajaxStop")))}return _},getJSON:function(t,e,n){return E.get(t,e,n,"json")},getScript:function(t,e){return E.get(t,void 0,e,"script")}}),E.each(["get","post"],(function(t,e){E[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:t,type:e,dataType:i,data:n,success:r},E.isPlainObject(t)&&t))}})),E.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),E._evalUrl=function(t,e,n){return E.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){E.globalEval(t,e,n)}})},E.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=E(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){E(this).wrapInner(t.call(this,e))})):this.each((function(){var e=E(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){E(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(t){return!E.expr.pseudos.visible(t)},E.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var He={0:200,1223:204},Ge=E.ajaxSettings.xhr();m.cors=!!Ge&&"withCredentials"in Ge,m.ajax=Ge=!!Ge,E.ajaxTransport((function(t){var e,r;if(m.cors||Ge&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(He[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){e&&r()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),E.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return E.globalEval(t),t}}}),E.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),E.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=E("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),w.head.appendChild(e[0])},abort:function(){n&&n()}}}));var We,Ye=[],Xe=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||E.expando+"_"+Ee.guid++;return this[t]=!0,t}}),E.ajaxPrefilter("json jsonp",(function(t,e,r){var i,o,a,s=!1!==t.jsonp&&(Xe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xe.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xe,"$1"+i):!1!==t.jsonp&&(t.url+=(Ae.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||E.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always((function(){void 0===o?E(n).removeProp(i):n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(i)),a&&y(o)&&o(a[0]),a=o=void 0})),"script"})),m.createHTMLDocument=((We=w.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===We.childNodes.length),E.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(m.createHTMLDocument?((r=(e=w.implementation.createHTMLDocument("")).createElement("base")).href=w.location.href,e.head.appendChild(r)):e=w),o=!n&&[],(i=M.exec(t))?[e.createElement(i[1])]:(i=_t([t],e,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(t,e,n){var r,o,a,s=this,u=t.indexOf(" ");return u>-1&&(r=ye(t.slice(u)),t=t.slice(0,u)),y(e)?(n=e,e=void 0):e&&"object"===i(e)&&(o="POST"),s.length>0&&E.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done((function(t){a=arguments,s.html(r?E("<div>").append(E.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,a||[t.responseText,e,t])}))}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,(function(e){return t===e.elem})).length},E.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,l=E.css(t,"position"),c=E(t),f={};"static"===l&&(t.style.position="relative"),s=c.offset(),o=E.css(t,"top"),u=E.css(t,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,E.extend({},s))),null!=e.top&&(f.top=e.top-s.top+a),null!=e.left&&(f.left=e.left-s.left+i),"using"in e?e.using.call(t,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){E.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===E.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=E(t).offset()).top+=E.css(t,"borderTopWidth",!0),i.left+=E.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-E.css(r,"marginTop",!0),left:e.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===E.css(t,"position");)t=t.offsetParent;return t||st}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;E.fn[t]=function(r){return G(this,(function(t,r,i){var o;if(b(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),E.each(["top","left"],(function(t,e){E.cssHooks[e]=Gt(m.pixelPosition,(function(t,n){if(n)return n=Ht(t,e),Vt.test(n)?E(t).position()[e]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(t,e){E.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){E.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return G(this,(function(e,n,i){var o;return b(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?E.css(e,n,s):E.style(e,n,i,s)}),e,a?i:void 0,a)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){E.fn[e]=function(t){return this.on(e,t)}})),E.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){E.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Qe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;E.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return r=u.call(arguments,2),(i=function(){return t.apply(e||this,r.concat(u.call(arguments)))}).guid=t.guid=t.guid||E.guid++,i},E.holdReady=function(t){t?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=L,E.isFunction=y,E.isWindow=b,E.camelCase=Q,E.type=k,E.now=Date.now,E.isNumeric=function(t){var e=E.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},E.trim=function(t){return null==t?"":(t+"").replace(Qe,"")},void 0===(r=function(){return E}.apply(e,[]))||(t.exports=r);var Ke=n.jQuery,Je=n.$;return E.noConflict=function(t){return n.$===E&&(n.$=Je),t&&n.jQuery===E&&(n.jQuery=Ke),E},void 0===o&&(n.jQuery=n.$=E),E}))},7108:(t,e,n)=>{var r=n(1263)(n(8403),"DataView");t.exports=r},2649:(t,e,n)=>{var r=n(1423),i=n(1087),o=n(4175),a=n(8215),s=n(7893);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},8140:(t,e,n)=>{var r=n(6589),i=n(5721),o=n(9537),a=n(1227),s=n(9304);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},8461:(t,e,n)=>{var r=n(1263)(n(8403),"Map");t.exports=r},1779:(t,e,n)=>{var r=n(4111),i=n(6312),o=n(303),a=n(7029),s=n(3789);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},6341:(t,e,n)=>{var r=n(1263)(n(8403),"Promise");t.exports=r},9740:(t,e,n)=>{var r=n(1263)(n(8403),"Set");t.exports=r},1571:(t,e,n)=>{var r=n(1779),i=n(8312),o=n(3830);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},8831:(t,e,n)=>{var r=n(8140),i=n(6557),o=n(4061),a=n(2580),s=n(6805),u=n(6661);function l(t){var e=this.__data__=new r(t);this.size=e.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=s,l.prototype.set=u,t.exports=l},1804:(t,e,n)=>{var r=n(8403).Symbol;t.exports=r},7012:(t,e,n)=>{var r=n(8403).Uint8Array;t.exports=r},3782:(t,e,n)=>{var r=n(1263)(n(8403),"WeakMap");t.exports=r},4442:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},414:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},5925:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},6303:(t,e,n)=>{var r=n(791);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},47:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},8863:(t,e,n)=>{var r=n(2386),i=n(2665),o=n(1030),a=n(4493),s=n(4344),u=n(1605),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),c=!n&&i(t),f=!n&&!c&&a(t),h=!n&&!c&&!f&&u(t),d=n||c||f||h,p=d?r(t.length,String):[],g=p.length;for(var v in t)!e&&!l.call(t,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||p.push(v);return p}},7620:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},6840:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},8963:t=>{t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},9317:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},3766:(t,e,n)=>{var r=n(2972)("length");t.exports=r},8145:(t,e,n)=>{var r=n(5055),i=n(3689);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},7140:(t,e,n)=>{var r=n(5055),i=n(3689),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},5345:(t,e,n)=>{var r=n(3689);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},9542:(t,e,n)=>{var r=n(8872),i=n(599);t.exports=function(t,e){return t&&r(e,i(e),t)}},436:(t,e,n)=>{var r=n(8872),i=n(5859);t.exports=function(t,e){return t&&r(e,i(e),t)}},5055:(t,e,n)=>{var r=n(8964);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},1719:(t,e,n)=>{var r=n(8831),i=n(414),o=n(7140),a=n(9542),s=n(436),u=n(2737),l=n(1808),c=n(7627),f=n(8135),h=n(1703),d=n(3960),p=n(5188),g=n(2551),v=n(2763),m=n(718),y=n(1030),b=n(4493),w=n(1534),x=n(1310),S=n(5897),k=n(599),_=n(5859),E="[object Arguments]",A="[object Function]",P="[object Object]",C={};C[E]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[P]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[A]=C["[object WeakMap]"]=!1,t.exports=function t(e,n,T,N,L,M){var O,R=1&n,F=2&n,D=4&n;if(T&&(O=L?T(e,N,L,M):T(e)),void 0!==O)return O;if(!x(e))return e;var j=y(e);if(j){if(O=g(e),!R)return l(e,O)}else{var I=p(e),B=I==A||"[object GeneratorFunction]"==I;if(b(e))return u(e,R);if(I==P||I==E||B&&!L){if(O=F||B?{}:m(e),!R)return F?f(e,s(O,e)):c(e,a(O,e))}else{if(!C[I])return L?e:{};O=v(e,I,R)}}M||(M=new r);var z=M.get(e);if(z)return z;M.set(e,O),S(e)?e.forEach((function(r){O.add(t(r,n,T,r,e,M))})):w(e)&&e.forEach((function(r,i){O.set(i,t(r,n,T,i,e,M))}));var V=j?void 0:(D?F?d:h:F?_:k)(e);return i(V||e,(function(r,i){V&&(r=e[i=r]),o(O,i,t(r,n,T,i,e,M))})),O}},3877:(t,e,n)=>{var r=n(1310),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},7136:(t,e,n)=>{var r=n(3810),i=n(5446)(r);t.exports=i},7348:(t,e,n)=>{var r=n(6137);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,l=a}return l}},5876:(t,e,n)=>{var r=n(7136);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},5059:t=>{t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},9035:(t,e,n)=>{var r=n(6840),i=n(3973);t.exports=function t(e,n,o,a,s){var u=-1,l=e.length;for(o||(o=i),s||(s=[]);++u<l;){var c=e[u];n>0&&o(c)?n>1?t(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},4099:(t,e,n)=>{var r=n(9423)();t.exports=r},3810:(t,e,n)=>{var r=n(4099),i=n(599);t.exports=function(t,e){return t&&r(t,e,i)}},9395:(t,e,n)=>{var r=n(543),i=n(1366);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},6767:(t,e,n)=>{var r=n(6840),i=n(1030);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},140:(t,e,n)=>{var r=n(1804),i=n(2054),o=n(5326),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},3453:t=>{t.exports=function(t,e){return t>e}},6253:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},8697:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},791:(t,e,n)=>{var r=n(5059),i=n(6007),o=n(9158);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},5098:(t,e,n)=>{var r=n(140),i=n(7415);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},582:(t,e,n)=>{var r=n(6040),i=n(7415);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},6040:(t,e,n)=>{var r=n(8831),i=n(6566),o=n(4665),a=n(2166),s=n(5188),u=n(1030),l=n(4493),c=n(1605),f="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,v,m){var y=u(t),b=u(e),w=y?h:s(t),x=b?h:s(e),S=(w=w==f?d:w)==d,k=(x=x==f?d:x)==d,_=w==x;if(_&&l(t)){if(!l(e))return!1;y=!0,S=!1}if(_&&!S)return m||(m=new r),y||c(t)?i(t,e,n,g,v,m):o(t,e,w,n,g,v,m);if(!(1&n)){var E=S&&p.call(t,"__wrapped__"),A=k&&p.call(e,"__wrapped__");if(E||A){var P=E?t.value():t,C=A?e.value():e;return m||(m=new r),v(P,C,n,g,m)}}return!!_&&(m||(m=new r),a(t,e,n,g,v,m))}},5255:(t,e,n)=>{var r=n(5188),i=n(7415);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},9042:(t,e,n)=>{var r=n(8831),i=n(582);t.exports=function(t,e,n,o){var a=n.length,s=a,u=!o;if(null==t)return!s;for(t=Object(t);a--;){var l=n[a];if(u&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++a<s;){var c=(l=n[a])[0],f=t[c],h=l[1];if(u&&l[2]){if(void 0===f&&!(c in t))return!1}else{var d=new r;if(o)var p=o(f,h,c,t,e,d);if(!(void 0===p?i(h,f,3,o,d):p))return!1}}return!0}},6007:t=>{t.exports=function(t){return t!=t}},37:(t,e,n)=>{var r=n(6681),i=n(5246),o=n(1310),a=n(6817),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:s).test(a(t))}},5239:(t,e,n)=>{var r=n(5188),i=n(7415);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},2473:(t,e,n)=>{var r=n(140),i=n(2596),o=n(7415),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},7859:(t,e,n)=>{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=n(4170),o=n(4101),a=n(9019),s=n(1030),u=n(1052);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==r(t)?s(t)?o(t[0],t[1]):i(t):u(t)}},4586:(t,e,n)=>{var r=n(1977),i=n(8848),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},2642:(t,e,n)=>{var r=n(1310),i=n(1977),o=n(4354),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},1737:t=>{t.exports=function(t,e){return t<e}},6500:(t,e,n)=>{var r=n(7136),i=n(5855);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}},4170:(t,e,n)=>{var r=n(9042),i=n(8308),o=n(6652);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},4101:(t,e,n)=>{var r=n(582),i=n(6550),o=n(3261),a=n(9169),s=n(9576),u=n(6652),l=n(1366);t.exports=function(t,e){return a(t)&&s(e)?u(l(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,3)}}},3497:(t,e,n)=>{var r=n(8831),i=n(8145),o=n(4099),a=n(276),s=n(1310),u=n(5859),l=n(6998);t.exports=function t(e,n,c,f,h){e!==n&&o(n,(function(o,u){if(h||(h=new r),s(o))a(e,n,u,c,t,f,h);else{var d=f?f(l(e,u),o,u+"",e,n,h):void 0;void 0===d&&(d=o),i(e,u,d)}}),u)}},276:(t,e,n)=>{var r=n(8145),i=n(2737),o=n(2343),a=n(1808),s=n(718),u=n(2665),l=n(1030),c=n(4521),f=n(4493),h=n(6681),d=n(1310),p=n(4730),g=n(1605),v=n(6998),m=n(4357);t.exports=function(t,e,n,y,b,w,x){var S=v(t,n),k=v(e,n),_=x.get(k);if(_)r(t,n,_);else{var E=w?w(S,k,n+"",t,e,x):void 0,A=void 0===E;if(A){var P=l(k),C=!P&&f(k),T=!P&&!C&&g(k);E=k,P||C||T?l(S)?E=S:c(S)?E=a(S):C?(A=!1,E=i(k,!0)):T?(A=!1,E=o(k,!0)):E=[]:p(k)||u(k)?(E=S,u(S)?E=m(S):d(S)&&!h(S)||(E=s(k))):A=!1}A&&(x.set(k,E),b(E,k,y,w,x),x.delete(k)),r(t,n,E)}}},4429:(t,e,n)=>{var r=n(7620),i=n(9395),o=n(7859),a=n(6500),s=n(9612),u=n(1811),l=n(2090),c=n(9019),f=n(1030);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return f(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[c];var h=-1;e=r(e,u(o));var d=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++h,value:t}}));return s(d,(function(t,e){return l(t,e,n)}))}},6880:(t,e,n)=>{var r=n(4866),i=n(3261);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},4866:(t,e,n)=>{var r=n(9395),i=n(6391),o=n(543);t.exports=function(t,e,n){for(var a=-1,s=e.length,u={};++a<s;){var l=e[a],c=r(t,l);n(c,l)&&i(u,o(l,t),c)}return u}},2972:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},4205:(t,e,n)=>{var r=n(9395);t.exports=function(t){return function(e){return r(e,t)}}},1514:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,o){for(var a=-1,s=n(e((r-t)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=t,t+=i;return u}},4806:t=>{t.exports=function(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}},6368:(t,e,n)=>{var r=n(9019),i=n(9388),o=n(2349);t.exports=function(t,e){return o(i(t,e,r),t+"")}},6391:(t,e,n)=>{var r=n(7140),i=n(543),o=n(4344),a=n(1310),s=n(1366);t.exports=function(t,e,n,u){if(!a(t))return t;for(var l=-1,c=(e=i(e,t)).length,f=c-1,h=t;null!=h&&++l<c;){var d=s(e[l]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(l!=f){var g=h[d];void 0===(p=u?u(g,d,h):void 0)&&(p=a(g)?g:o(e[l+1])?[]:{})}r(h,d,p),h=h[d]}return t}},3104:(t,e,n)=>{var r=n(8567),i=n(8964),o=n(9019),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},9092:(t,e,n)=>{var r=n(7136);t.exports=function(t,e){var n;return r(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}},9612:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},2386:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},5601:(t,e,n)=>{var r=n(1804),i=n(7620),o=n(1030),a=n(6137),s=r?r.prototype:void 0,u=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},8131:(t,e,n)=>{var r=n(7714),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},1811:t=>{t.exports=function(t){return function(e){return t(e)}}},1080:(t,e,n)=>{var r=n(1571),i=n(6303),o=n(47),a=n(5518),s=n(5728),u=n(5559);t.exports=function(t,e,n){var l=-1,c=i,f=t.length,h=!0,d=[],p=d;if(n)h=!1,c=o;else if(f>=200){var g=e?null:s(t);if(g)return u(g);h=!1,c=a,p=new r}else p=e?[]:d;t:for(;++l<f;){var v=t[l],m=e?e(v):v;if(v=n||0!==v?v:0,h&&m==m){for(var y=p.length;y--;)if(p[y]===m)continue t;e&&p.push(m),d.push(v)}else c(p,m,n)||(p!==d&&p.push(m),d.push(v))}return d}},9670:(t,e,n)=>{var r=n(7620);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},2818:t=>{t.exports=function(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:void 0;n(a,t[r],s)}return a}},5518:t=>{t.exports=function(t,e){return t.has(e)}},7291:(t,e,n)=>{var r=n(9019);t.exports=function(t){return"function"==typeof t?t:r}},543:(t,e,n)=>{var r=n(1030),i=n(9169),o=n(3029),a=n(7417);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},8297:(t,e,n)=>{var r=n(7012);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},2737:(t,e,n)=>{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)}t=n.nmd(t);var i=n(8403),o="object"==r(e)&&e&&!e.nodeType&&e,a=o&&"object"==r(t)&&t&&!t.nodeType&&t,s=a&&a.exports===o?i.Buffer:void 0,u=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}},1108:(t,e,n)=>{var r=n(8297);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},6488:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},6666:(t,e,n)=>{var r=n(1804),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},2343:(t,e,n)=>{var r=n(8297);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},221:(t,e,n)=>{var r=n(6137);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,u=null===e,l=e==e,c=r(e);if(!u&&!c&&!a&&t>e||a&&s&&l&&!u&&!c||i&&s&&l||!n&&l||!o)return 1;if(!i&&!a&&!c&&t<e||c&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!l)return-1}return 0}},2090:(t,e,n)=>{var r=n(221);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,u=n.length;++i<s;){var l=r(o[i],a[i]);if(l)return i>=u?l:l*("desc"==n[i]?-1:1)}return t.index-e.index}},1808:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},8872:(t,e,n)=>{var r=n(7140),i=n(5055);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var l=e[s],c=o?o(n[l],t[l],l,n,t):void 0;void 0===c&&(c=t[l]),a?i(n,l,c):r(n,l,c)}return n}},7627:(t,e,n)=>{var r=n(8872),i=n(3751);t.exports=function(t,e){return r(t,i(t),e)}},8135:(t,e,n)=>{var r=n(8872),i=n(7446);t.exports=function(t,e){return r(t,i(t),e)}},7437:(t,e,n)=>{var r=n(8403)["__core-js_shared__"];t.exports=r},8084:(t,e,n)=>{var r=n(6368),i=n(603);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e}))}},5446:(t,e,n)=>{var r=n(5855);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},9423:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},6632:(t,e,n)=>{var r=n(7859),i=n(5855),o=n(599);t.exports=function(t){return function(e,n,a){var s=Object(e);if(!i(e)){var u=r(n,3);e=o(e),n=function(t){return u(s[t],t,s)}}var l=t(e,n,a);return l>-1?s[u?e[l]:l]:void 0}}},8538:(t,e,n)=>{var r=n(1514),i=n(603),o=n(5571);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e<n?1:-1:o(a),r(e,n,a,t)}}},5728:(t,e,n)=>{var r=n(9740),i=n(6628),o=n(5559),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},8964:(t,e,n)=>{var r=n(1263),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},6566:(t,e,n)=>{var r=n(1571),i=n(9317),o=n(5518);t.exports=function(t,e,n,a,s,u){var l=1&n,c=t.length,f=e.length;if(c!=f&&!(l&&f>c))return!1;var h=u.get(t),d=u.get(e);if(h&&d)return h==e&&d==t;var p=-1,g=!0,v=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++p<c;){var m=t[p],y=e[p];if(a)var b=l?a(y,m,p,e,t,u):a(m,y,p,t,e,u);if(void 0!==b){if(b)continue;g=!1;break}if(v){if(!i(e,(function(t,e){if(!o(v,e)&&(m===t||s(m,t,n,a,u)))return v.push(e)}))){g=!1;break}}else if(m!==y&&!s(m,y,n,a,u)){g=!1;break}}return u.delete(t),u.delete(e),g}},4665:(t,e,n)=>{var r=n(1804),i=n(7012),o=n(3689),a=n(6566),s=n(9578),u=n(5559),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;t.exports=function(t,e,n,r,l,f,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),t.size!=e.size&&!p)return!1;var g=h.get(t);if(g)return g==e;r|=2,h.set(t,e);var v=a(d(t),d(e),r,l,f,h);return h.delete(t),v;case"[object Symbol]":if(c)return c.call(t)==c.call(e)}return!1}},2166:(t,e,n)=>{var r=n(1703),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var u=1&n,l=r(t),c=l.length;if(c!=r(e).length&&!u)return!1;for(var f=c;f--;){var h=l[f];if(!(u?h in e:i.call(e,h)))return!1}var d=s.get(t),p=s.get(e);if(d&&p)return d==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);for(var v=u;++f<c;){var m=t[h=l[f]],y=e[h];if(o)var b=u?o(y,m,h,e,t,s):o(m,y,h,t,e,s);if(!(void 0===b?m===y||a(m,y,n,o,s):b)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(e),g}},1841:(t,e,n)=>{var r=n(1247),i=n(9388),o=n(2349);t.exports=function(t){return o(i(t,void 0,r),t+"")}},7882:(t,e,n)=>{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"==(void 0===n.g?"undefined":r(n.g))&&n.g&&n.g.Object===Object&&n.g;t.exports=i},1703:(t,e,n)=>{var r=n(6767),i=n(3751),o=n(599);t.exports=function(t){return r(t,o,i)}},3960:(t,e,n)=>{var r=n(6767),i=n(7446),o=n(5859);t.exports=function(t){return r(t,o,i)}},6186:(t,e,n)=>{var r=n(710);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},8308:(t,e,n)=>{var r=n(9576),i=n(599);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},1263:(t,e,n)=>{var r=n(37),i=n(403);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},885:(t,e,n)=>{var r=n(8112)(Object.getPrototypeOf,Object);t.exports=r},2054:(t,e,n)=>{var r=n(1804),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},3751:(t,e,n)=>{var r=n(5925),i=n(854),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},7446:(t,e,n)=>{var r=n(6840),i=n(885),o=n(3751),a=n(854),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},5188:(t,e,n)=>{var r=n(7108),i=n(8461),o=n(6341),a=n(9740),s=n(3782),u=n(140),l=n(6817),c="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",g=l(r),v=l(i),m=l(o),y=l(a),b=l(s),w=u;(r&&w(new r(new ArrayBuffer(1)))!=p||i&&w(new i)!=c||o&&w(o.resolve())!=f||a&&w(new a)!=h||s&&w(new s)!=d)&&(w=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?l(n):"";if(r)switch(r){case g:return p;case v:return c;case m:return f;case y:return h;case b:return d}return e}),t.exports=w},403:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1277:(t,e,n)=>{var r=n(543),i=n(2665),o=n(1030),a=n(4344),s=n(2596),u=n(1366);t.exports=function(t,e,n){for(var l=-1,c=(e=r(e,t)).length,f=!1;++l<c;){var h=u(e[l]);if(!(f=null!=t&&n(t,h)))break;t=t[h]}return f||++l!=c?f:!!(c=null==t?0:t.length)&&s(c)&&a(h,c)&&(o(t)||i(t))}},7858:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},1423:(t,e,n)=>{var r=n(6574);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},1087:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},4175:(t,e,n)=>{var r=n(6574),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},8215:(t,e,n)=>{var r=n(6574),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},7893:(t,e,n)=>{var r=n(6574);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},2551:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},2763:(t,e,n)=>{var r=n(8297),i=n(1108),o=n(6488),a=n(6666),s=n(2343);t.exports=function(t,e,n){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return o(t);case"[object Set]":return new u;case"[object Symbol]":return a(t)}}},718:(t,e,n)=>{var r=n(3877),i=n(885),o=n(1977);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},3973:(t,e,n)=>{var r=n(1804),i=n(2665),o=n(1030),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},4344:t=>{function e(t){return(e="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 n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var i=e(t);return!!(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&n.test(t))&&t>-1&&t%1==0&&t<r}},603:(t,e,n)=>{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=n(3689),o=n(5855),a=n(4344),s=n(1310);t.exports=function(t,e,n){if(!s(n))return!1;var u=r(e);return!!("number"==u?o(n)&&a(e,n.length):"string"==u&&e in n)&&i(n[e],t)}},9169:(t,e,n)=>{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=n(1030),o=n(6137),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(i(t))return!1;var n=r(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||s.test(t)||!a.test(t)||null!=e&&t in Object(e)}},710:t=>{function e(t){return(e="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)}t.exports=function(t){var n=e(t);return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},5246:(t,e,n)=>{var r,i=n(7437),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},1977:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},9576:(t,e,n)=>{var r=n(1310);t.exports=function(t){return t==t&&!r(t)}},6589:t=>{t.exports=function(){this.__data__=[],this.size=0}},5721:(t,e,n)=>{var r=n(5345),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},9537:(t,e,n)=>{var r=n(5345);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},1227:(t,e,n)=>{var r=n(5345);t.exports=function(t){return r(this.__data__,t)>-1}},9304:(t,e,n)=>{var r=n(5345);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},4111:(t,e,n)=>{var r=n(2649),i=n(8140),o=n(8461);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},6312:(t,e,n)=>{var r=n(6186);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},303:(t,e,n)=>{var r=n(6186);t.exports=function(t){return r(this,t).get(t)}},7029:(t,e,n)=>{var r=n(6186);t.exports=function(t){return r(this,t).has(t)}},3789:(t,e,n)=>{var r=n(6186);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},9578:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},6652:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},7928:(t,e,n)=>{var r=n(2094);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},6574:(t,e,n)=>{var r=n(1263)(Object,"create");t.exports=r},8848:(t,e,n)=>{var r=n(8112)(Object.keys,Object);t.exports=r},4354:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},3051:(t,e,n)=>{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)}t=n.nmd(t);var i=n(7882),o="object"==r(e)&&e&&!e.nodeType&&e,a=o&&"object"==r(t)&&t&&!t.nodeType&&t,s=a&&a.exports===o&&i.process,u=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u},5326:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},8112:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},9388:(t,e,n)=>{var r=n(4442),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=o[a];return l[e]=n(u),r(t,this,l)}}},8403:(t,e,n)=>{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=n(7882),o="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=i||o||Function("return this")();t.exports=a},6998:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},8312:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},3830:t=>{t.exports=function(t){return this.__data__.has(t)}},5559:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},2349:(t,e,n)=>{var r=n(3104),i=n(2151)(r);t.exports=i},2151:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},6557:(t,e,n)=>{var r=n(8140);t.exports=function(){this.__data__=new r,this.size=0}},4061:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},2580:t=>{t.exports=function(t){return this.__data__.get(t)}},6805:t=>{t.exports=function(t){return this.__data__.has(t)}},6661:(t,e,n)=>{var r=n(8140),i=n(8461),o=n(1779);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},9158:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},3358:(t,e,n)=>{var r=n(3766),i=n(7858),o=n(9459);t.exports=function(t){return i(t)?o(t):r(t)}},3029:(t,e,n)=>{var r=n(7928),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=a},1366:(t,e,n)=>{var r=n(6137);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},6817:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7714:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},9459:t=>{var e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+e+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",u=s+a+"(?:\\u200d(?:"+[r,i,o].join("|")+")"+s+a+")*",l="(?:"+[r+e+"?",e,i,o,"[\\ud800-\\udfff]"].join("|")+")",c=RegExp(n+"(?="+n+")|"+l+u,"g");t.exports=function(t){for(var e=c.lastIndex=0;c.test(t);)++e;return e}},7141:(t,e,n)=>{var r=n(1719);t.exports=function(t){return r(t,4)}},9825:(t,e,n)=>{var r=n(1719);t.exports=function(t){return r(t,5)}},8567:t=>{t.exports=function(t){return function(){return t}}},9638:(t,e,n)=>{var r=n(6368),i=n(3689),o=n(603),a=n(5859),s=Object.prototype,u=s.hasOwnProperty,l=r((function(t,e){t=Object(t);var n=-1,r=e.length,l=r>2?e[2]:void 0;for(l&&o(e[0],e[1],l)&&(r=1);++n<r;)for(var c=e[n],f=a(c),h=-1,d=f.length;++h<d;){var p=f[h],g=t[p];(void 0===g||i(g,s[p])&&!u.call(t,p))&&(t[p]=c[p])}return t}));t.exports=l},3812:(t,e,n)=>{t.exports=n(3695)},3689:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},8319:(t,e,n)=>{var r=n(5925),i=n(5876),o=n(7859),a=n(1030);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},6726:(t,e,n)=>{var r=n(6632)(n(2203));t.exports=r},2203:(t,e,n)=>{var r=n(5059),i=n(7859),o=n(5700),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(t,i(e,3),u)}},1247:(t,e,n)=>{var r=n(9035);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},3695:(t,e,n)=>{var r=n(414),i=n(7136),o=n(7291),a=n(1030);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},548:(t,e,n)=>{var r=n(4099),i=n(7291),o=n(5859);t.exports=function(t,e){return null==t?t:r(t,i(e),o)}},6550:(t,e,n)=>{var r=n(9395);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},5373:(t,e,n)=>{var r=n(6253),i=n(1277);t.exports=function(t,e){return null!=t&&i(t,e,r)}},3261:(t,e,n)=>{var r=n(8697),i=n(1277);t.exports=function(t,e){return null!=t&&i(t,e,r)}},9019:t=>{t.exports=function(t){return t}},2665:(t,e,n)=>{var r=n(5098),i=n(7415),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},1030:t=>{var e=Array.isArray;t.exports=e},5855:(t,e,n)=>{var r=n(6681),i=n(2596);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},4521:(t,e,n)=>{var r=n(5855),i=n(7415);t.exports=function(t){return i(t)&&r(t)}},4493:(t,e,n)=>{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)}t=n.nmd(t);var i=n(8403),o=n(9701),a="object"==r(e)&&e&&!e.nodeType&&e,s=a&&"object"==r(t)&&t&&!t.nodeType&&t,u=s&&s.exports===a?i.Buffer:void 0,l=(u?u.isBuffer:void 0)||o;t.exports=l},490:(t,e,n)=>{var r=n(4586),i=n(5188),o=n(2665),a=n(1030),s=n(5855),u=n(4493),l=n(1977),c=n(1605),f=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||c(t)||o(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(l(t))return!r(t).length;for(var n in t)if(f.call(t,n))return!1;return!0}},8954:(t,e,n)=>{var r=n(582);t.exports=function(t,e){return r(t,e)}},6681:(t,e,n)=>{var r=n(140),i=n(1310);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},2596:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},1534:(t,e,n)=>{var r=n(5255),i=n(1811),o=n(3051),a=o&&o.isMap,s=a?i(a):r;t.exports=s},1310:t=>{function e(t){return(e="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)}t.exports=function(t){var n=e(t);return null!=t&&("object"==n||"function"==n)}},7415:t=>{function e(t){return(e="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)}t.exports=function(t){return null!=t&&"object"==e(t)}},4730:(t,e,n)=>{var r=n(140),i=n(885),o=n(7415),a=Function.prototype,s=Object.prototype,u=a.toString,l=s.hasOwnProperty,c=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},5897:(t,e,n)=>{var r=n(5239),i=n(1811),o=n(3051),a=o&&o.isSet,s=a?i(a):r;t.exports=s},7458:(t,e,n)=>{var r=n(140),i=n(1030),o=n(7415);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},6137:(t,e,n)=>{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=n(140),o=n(7415);t.exports=function(t){return"symbol"==r(t)||o(t)&&"[object Symbol]"==i(t)}},1605:(t,e,n)=>{var r=n(2473),i=n(1811),o=n(3051),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},5082:t=>{t.exports=function(t){return void 0===t}},599:(t,e,n)=>{var r=n(8863),i=n(4586),o=n(5855);t.exports=function(t){return o(t)?r(t):i(t)}},5859:(t,e,n)=>{var r=n(8863),i=n(2642),o=n(5855);t.exports=function(t){return o(t)?r(t,!0):i(t)}},6496:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},3153:function(t,e,n){var r;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)}t=n.nmd(t),function(){var o,a="Expected a function",s="__lodash_hash_undefined__",u="__lodash_placeholder__",l=32,c=128,f=1/0,h=9007199254740991,d=NaN,p=4294967295,g=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],v="[object Arguments]",m="[object Array]",y="[object Boolean]",b="[object Date]",w="[object Error]",x="[object Function]",S="[object GeneratorFunction]",k="[object Map]",_="[object Number]",E="[object Object]",A="[object Promise]",P="[object RegExp]",C="[object Set]",T="[object String]",N="[object Symbol]",L="[object WeakMap]",M="[object ArrayBuffer]",O="[object DataView]",R="[object Float32Array]",F="[object Float64Array]",D="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",B="[object Uint8Array]",z="[object Uint8ClampedArray]",V="[object Uint16Array]",$="[object Uint32Array]",U=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,Y=RegExp(G.source),X=RegExp(W.source),Q=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tt=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(nt.source),it=/^\s+/,ot=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="a-z\\xdf-\\xf6\\xf8-\\xff",_t="A-Z\\xc0-\\xd6\\xd8-\\xde",Et="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",At="["+Et+"]",Pt="["+St+"]",Ct="\\d+",Tt="["+kt+"]",Nt="[^\\ud800-\\udfff"+Et+Ct+"\\u2700-\\u27bf"+kt+_t+"]",Lt="\\ud83c[\\udffb-\\udfff]",Mt="[^\\ud800-\\udfff]",Ot="(?:\\ud83c[\\udde6-\\uddff]){2}",Rt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+_t+"]",Dt="(?:"+Tt+"|"+Nt+")",jt="(?:"+Ft+"|"+Nt+")",It="(?:['’](?:d|ll|m|re|s|t|ve))?",Bt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Pt+"|"+Lt+")?",Vt="[\\ufe0e\\ufe0f]?",$t=Vt+zt+"(?:\\u200d(?:"+[Mt,Ot,Rt].join("|")+")"+Vt+zt+")*",Ut="(?:"+["[\\u2700-\\u27bf]",Ot,Rt].join("|")+")"+$t,qt="(?:"+[Mt+Pt+"?",Pt,Ot,Rt,"[\\ud800-\\udfff]"].join("|")+")",Ht=RegExp("['’]","g"),Gt=RegExp(Pt,"g"),Wt=RegExp(Lt+"(?="+Lt+")|"+qt+$t,"g"),Yt=RegExp([Ft+"?"+Tt+"+"+It+"(?="+[At,Ft,"$"].join("|")+")",jt+"+"+Bt+"(?="+[At,Ft+Dt,"$"].join("|")+")",Ft+"?"+Dt+"+"+It,Ft+"+"+Bt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,Ut].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+St+"\\ufe0e\\ufe0f]"),Qt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Kt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Jt=-1,Zt={};Zt[R]=Zt[F]=Zt[D]=Zt[j]=Zt[I]=Zt[B]=Zt[z]=Zt[V]=Zt[$]=!0,Zt[v]=Zt[m]=Zt[M]=Zt[y]=Zt[O]=Zt[b]=Zt[w]=Zt[x]=Zt[k]=Zt[_]=Zt[E]=Zt[P]=Zt[C]=Zt[T]=Zt[L]=!1;var te={};te[v]=te[m]=te[M]=te[O]=te[y]=te[b]=te[R]=te[F]=te[D]=te[j]=te[I]=te[k]=te[_]=te[E]=te[P]=te[C]=te[T]=te[N]=te[B]=te[z]=te[V]=te[$]=!0,te[w]=te[x]=te[L]=!1;var ee={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ne=parseFloat,re=parseInt,ie="object"==(void 0===n.g?"undefined":i(n.g))&&n.g&&n.g.Object===Object&&n.g,oe="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,ae=ie||oe||Function("return this")(),se="object"==i(e)&&e&&!e.nodeType&&e,ue=se&&"object"==i(t)&&t&&!t.nodeType&&t,le=ue&&ue.exports===se,ce=le&&ie.process,fe=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),he=fe&&fe.isArrayBuffer,de=fe&&fe.isDate,pe=fe&&fe.isMap,ge=fe&&fe.isRegExp,ve=fe&&fe.isSet,me=fe&&fe.isTypedArray;function ye(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function be(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function we(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function xe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Se(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function ke(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function _e(t,e){return!(null==t||!t.length)&&Re(t,e,0)>-1}function Ee(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ae(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Pe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Ce(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Te(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Ne(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Le=Ie("length");function Me(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Oe(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Re(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Oe(t,De,n)}function Fe(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function De(t){return t!=t}function je(t,e){var n=null==t?0:t.length;return n?Ve(t,e)/n:d}function Ie(t){return function(e){return null==e?o:e[t]}}function Be(t){return function(e){return null==t?o:t[e]}}function ze(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ve(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function $e(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ue(t){return t?t.slice(0,un(t)+1).replace(it,""):t}function qe(t){return function(e){return t(e)}}function He(t,e){return Ae(e,(function(e){return t[e]}))}function Ge(t,e){return t.has(e)}function We(t,e){for(var n=-1,r=t.length;++n<r&&Re(e,t[n],0)>-1;);return n}function Ye(t,e){for(var n=t.length;n--&&Re(e,t[n],0)>-1;);return n}function Xe(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Qe=Be({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Ke=Be({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Je(t){return"\\"+ee[t]}function Ze(t){return Xt.test(t)}function tn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function en(t,e){return function(n){return t(e(n))}}function nn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==u||(t[n]=u,o[i++]=n)}return o}function rn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function an(t){return Ze(t)?function(t){for(var e=Wt.lastIndex=0;Wt.test(t);)++e;return e}(t):Le(t)}function sn(t){return Ze(t)?function(t){return t.match(Wt)||[]}(t):function(t){return t.split("")}(t)}function un(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var ln=Be({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function t(e){var n,r=(e=null==e?ae:cn.defaults(ae.Object(),e,cn.pick(ae,Kt))).Array,ot=e.Date,St=e.Error,kt=e.Function,_t=e.Math,Et=e.Object,At=e.RegExp,Pt=e.String,Ct=e.TypeError,Tt=r.prototype,Nt=kt.prototype,Lt=Et.prototype,Mt=e["__core-js_shared__"],Ot=Nt.toString,Rt=Lt.hasOwnProperty,Ft=0,Dt=(n=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",jt=Lt.toString,It=Ot.call(Et),Bt=ae._,zt=At("^"+Ot.call(Rt).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=le?e.Buffer:o,$t=e.Symbol,Ut=e.Uint8Array,qt=Vt?Vt.allocUnsafe:o,Wt=en(Et.getPrototypeOf,Et),Xt=Et.create,ee=Lt.propertyIsEnumerable,ie=Tt.splice,oe=$t?$t.isConcatSpreadable:o,se=$t?$t.iterator:o,ue=$t?$t.toStringTag:o,ce=function(){try{var t=co(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),fe=e.clearTimeout!==ae.clearTimeout&&e.clearTimeout,Le=ot&&ot.now!==ae.Date.now&&ot.now,Be=e.setTimeout!==ae.setTimeout&&e.setTimeout,fn=_t.ceil,hn=_t.floor,dn=Et.getOwnPropertySymbols,pn=Vt?Vt.isBuffer:o,gn=e.isFinite,vn=Tt.join,mn=en(Et.keys,Et),yn=_t.max,bn=_t.min,wn=ot.now,xn=e.parseInt,Sn=_t.random,kn=Tt.reverse,_n=co(e,"DataView"),En=co(e,"Map"),An=co(e,"Promise"),Pn=co(e,"Set"),Cn=co(e,"WeakMap"),Tn=co(Et,"create"),Nn=Cn&&new Cn,Ln={},Mn=zo(_n),On=zo(En),Rn=zo(An),Fn=zo(Pn),Dn=zo(Cn),jn=$t?$t.prototype:o,In=jn?jn.valueOf:o,Bn=jn?jn.toString:o;function zn(t){if(rs(t)&&!Ga(t)&&!(t instanceof qn)){if(t instanceof Un)return t;if(Rt.call(t,"__wrapped__"))return Vo(t)}return new Un(t)}var Vn=function(){function t(){}return function(e){if(!ns(e))return{};if(Xt)return Xt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function $n(){}function Un(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function qn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Wn;++e<n;)this.add(t[e])}function Xn(t){var e=this.__data__=new Gn(t);this.size=e.size}function Qn(t,e){var n=Ga(t),r=!n&&Ha(t),i=!n&&!r&&Qa(t),o=!n&&!r&&!i&&fs(t),a=n||r||i||o,s=a?$e(t.length,Pt):[],u=s.length;for(var l in t)!e&&!Rt.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||yo(l,u))||s.push(l);return s}function Kn(t){var e=t.length;return e?t[Wr(0,e-1)]:o}function Jn(t,e){return Fo(Ci(t),sr(e,0,t.length))}function Zn(t){return Fo(Ci(t))}function tr(t,e,n){(n!==o&&!$a(t[e],n)||n===o&&!(e in t))&&or(t,e,n)}function er(t,e,n){var r=t[e];Rt.call(t,e)&&$a(r,n)&&(n!==o||e in t)||or(t,e,n)}function nr(t,e){for(var n=t.length;n--;)if($a(t[n][0],e))return n;return-1}function rr(t,e,n,r){return hr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function ir(t,e){return t&&Ti(e,Os(e),t)}function or(t,e,n){"__proto__"==e&&ce?ce(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ar(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:Cs(t,e[n]);return a}function sr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function ur(t,e,n,r,i,a){var s,u=1&e,l=2&e,c=4&e;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!ns(t))return t;var f=Ga(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Ci(t,s)}else{var h=po(t),d=h==x||h==S;if(Qa(t))return Si(t,u);if(h==E||h==v||d&&!i){if(s=l||d?{}:vo(t),!u)return l?function(t,e){return Ti(t,ho(t),e)}(t,function(t,e){return t&&Ti(e,Rs(e),t)}(s,t)):function(t,e){return Ti(t,fo(t),e)}(t,ir(s,t))}else{if(!te[h])return i?t:{};s=function(t,e,n){var r,i=t.constructor;switch(e){case M:return ki(t);case y:case b:return new i(+t);case O:return function(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case F:case D:case j:case I:case B:case z:case V:case $:return _i(t,n);case k:return new i;case _:case T:return new i(t);case P:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new i;case N:return r=t,In?Et(In.call(r)):{}}}(t,h,u)}}a||(a=new Xn);var p=a.get(t);if(p)return p;a.set(t,s),us(t)?t.forEach((function(r){s.add(ur(r,e,n,r,t,a))})):is(t)&&t.forEach((function(r,i){s.set(i,ur(r,e,n,i,t,a))}));var g=f?o:(c?l?ro:no:l?Rs:Os)(t);return we(g||t,(function(r,i){g&&(r=t[i=r]),er(s,i,ur(r,e,n,i,t,a))})),s}function lr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function cr(t,e,n){if("function"!=typeof t)throw new Ct(a);return Lo((function(){t.apply(o,n)}),e)}function fr(t,e,n,r){var i=-1,o=_e,a=!0,s=t.length,u=[],l=e.length;if(!s)return u;n&&(e=Ae(e,qe(n))),r?(o=Ee,a=!1):e.length>=200&&(o=Ge,a=!1,e=new Yn(e));t:for(;++i<s;){var c=t[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f==f){for(var h=l;h--;)if(e[h]===f)continue t;u.push(c)}else o(e,f,r)||u.push(c)}return u}zn.templateSettings={escape:Q,evaluate:K,interpolate:J,variable:"",imports:{_:zn}},zn.prototype=$n.prototype,zn.prototype.constructor=zn,Un.prototype=Vn($n.prototype),Un.prototype.constructor=Un,qn.prototype=Vn($n.prototype),qn.prototype.constructor=qn,Hn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Hn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hn.prototype.get=function(t){var e=this.__data__;if(Tn){var n=e[t];return n===s?o:n}return Rt.call(e,t)?e[t]:o},Hn.prototype.has=function(t){var e=this.__data__;return Tn?e[t]!==o:Rt.call(e,t)},Hn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tn&&e===o?s:e,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(t){var e=this.__data__,n=nr(e,t);return!(n<0||(n==e.length-1?e.pop():ie.call(e,n,1),--this.size,0))},Gn.prototype.get=function(t){var e=this.__data__,n=nr(e,t);return n<0?o:e[n][1]},Gn.prototype.has=function(t){return nr(this.__data__,t)>-1},Gn.prototype.set=function(t,e){var n=this.__data__,r=nr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(En||Gn),string:new Hn}},Wn.prototype.delete=function(t){var e=uo(this,t).delete(t);return this.size-=e?1:0,e},Wn.prototype.get=function(t){return uo(this,t).get(t)},Wn.prototype.has=function(t){return uo(this,t).has(t)},Wn.prototype.set=function(t,e){var n=uo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(t){return this.__data__.set(t,s),this},Yn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!En||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(t,e),this.size=n.size,this};var hr=Mi(wr),dr=Mi(xr,!0);function pr(t,e){var n=!0;return hr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(u===o?s==s&&!cs(s):n(s,u)))var u=s,l=a}return l}function vr(t,e){var n=[];return hr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function mr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=mo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?mr(s,e-1,n,r,i):Pe(i,s):r||(i[i.length]=s)}return i}var yr=Oi(),br=Oi(!0);function wr(t,e){return t&&yr(t,e,Os)}function xr(t,e){return t&&br(t,e,Os)}function Sr(t,e){return ke(e,(function(e){return Za(t[e])}))}function kr(t,e){for(var n=0,r=(e=yi(e,t)).length;null!=t&&n<r;)t=t[Bo(e[n++])];return n&&n==r?t:o}function _r(t,e,n){var r=e(t);return Ga(t)?r:Pe(r,n(t))}function Er(t){return null==t?t===o?"[object Undefined]":"[object Null]":ue&&ue in Et(t)?function(t){var e=Rt.call(t,ue),n=t[ue];try{t[ue]=o;var r=!0}catch(t){}var i=jt.call(t);return r&&(e?t[ue]=n:delete t[ue]),i}(t):function(t){return jt.call(t)}(t)}function Ar(t,e){return t>e}function Pr(t,e){return null!=t&&Rt.call(t,e)}function Cr(t,e){return null!=t&&e in Et(t)}function Tr(t,e,n){for(var i=n?Ee:_e,a=t[0].length,s=t.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Ae(h,qe(e))),c=bn(h.length,c),l[u]=!n&&(e||a>=120&&h.length>=120)?new Yn(u&&h):o}h=t[0];var d=-1,p=l[0];t:for(;++d<a&&f.length<c;){var g=h[d],v=e?e(g):g;if(g=n||0!==g?g:0,!(p?Ge(p,v):i(f,v,n))){for(u=s;--u;){var m=l[u];if(!(m?Ge(m,v):i(t[u],v,n)))continue t}p&&p.push(v),f.push(g)}}return f}function Nr(t,e,n){var r=null==(t=Po(t,e=yi(e,t)))?t:t[Bo(Jo(e))];return null==r?o:ye(r,t,n)}function Lr(t){return rs(t)&&Er(t)==v}function Mr(t,e,n,r,i){return t===e||(null==t||null==e||!rs(t)&&!rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=Ga(t),u=Ga(e),l=s?m:po(t),c=u?m:po(e),f=(l=l==v?E:l)==E,h=(c=c==v?E:c)==E,d=l==c;if(d&&Qa(t)){if(!Qa(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Xn),s||fs(t)?to(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!o(new Ut(t),new Ut(e)));case y:case b:case _:return $a(+t,+e);case w:return t.name==e.name&&t.message==e.message;case P:case T:return t==e+"";case k:var s=tn;case C:var u=1&r;if(s||(s=rn),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=to(s(t),s(e),r,i,o,a);return a.delete(t),c;case N:if(In)return In.call(t)==In.call(e)}return!1}(t,e,l,n,r,i,a);if(!(1&n)){var p=f&&Rt.call(t,"__wrapped__"),g=h&&Rt.call(e,"__wrapped__");if(p||g){var x=p?t.value():t,S=g?e.value():e;return a||(a=new Xn),i(x,S,n,r,a)}}return!!d&&(a||(a=new Xn),function(t,e,n,r,i,a){var s=1&n,u=no(t),l=u.length;if(l!=no(e).length&&!s)return!1;for(var c=l;c--;){var f=u[c];if(!(s?f in e:Rt.call(e,f)))return!1}var h=a.get(t),d=a.get(e);if(h&&d)return h==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c<l;){var v=t[f=u[c]],m=e[f];if(r)var y=s?r(m,v,f,e,t,a):r(v,m,f,t,e,a);if(!(y===o?v===m||i(v,m,n,r,a):y)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return a.delete(t),a.delete(e),p}(t,e,n,r,i,a))}(t,e,n,r,Mr,i))}function Or(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=Et(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){var l=(u=n[i])[0],c=t[l],f=u[1];if(s&&u[2]){if(c===o&&!(l in t))return!1}else{var h=new Xn;if(r)var d=r(c,f,l,t,e,h);if(!(d===o?Mr(f,c,3,r,h):d))return!1}}return!0}function Rr(t){return!(!ns(t)||(e=t,Dt&&Dt in e))&&(Za(t)?zt:vt).test(zo(t));var e}function Fr(t){return"function"==typeof t?t:null==t?ou:"object"==i(t)?Ga(t)?zr(t[0],t[1]):Br(t):pu(t)}function Dr(t){if(!ko(t))return mn(t);var e=[];for(var n in Et(t))Rt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function jr(t,e){return t<e}function Ir(t,e){var n=-1,i=Ya(t)?r(t.length):[];return hr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Br(t){var e=lo(t);return 1==e.length&&e[0][2]?Eo(e[0][0],e[0][1]):function(n){return n===t||Or(n,t,e)}}function zr(t,e){return wo(t)&&_o(e)?Eo(Bo(t),e):function(n){var r=Cs(n,t);return r===o&&r===e?Ts(n,t):Mr(e,r,3)}}function Vr(t,e,n,r,i){t!==e&&yr(e,(function(a,s){if(i||(i=new Xn),ns(a))!function(t,e,n,r,i,a,s){var u=To(t,n),l=To(e,n),c=s.get(l);if(c)tr(t,n,c);else{var f=a?a(u,l,n+"",t,e,s):o,h=f===o;if(h){var d=Ga(l),p=!d&&Qa(l),g=!d&&!p&&fs(l);f=l,d||p||g?Ga(u)?f=u:Xa(u)?f=Ci(u):p?(h=!1,f=Si(l,!0)):g?(h=!1,f=_i(l,!0)):f=[]:as(l)||Ha(l)?(f=u,Ha(u)?f=bs(u):ns(u)&&!Za(u)||(f=vo(l))):h=!1}h&&(s.set(l,f),i(f,l,r,a,s),s.delete(l)),tr(t,n,f)}}(t,e,s,n,Vr,r,i);else{var u=r?r(To(t,s),a,s+"",t,e,i):o;u===o&&(u=a),tr(t,s,u)}}),Rs)}function $r(t,e){var n=t.length;if(n)return yo(e+=e<0?n:0,n)?t[e]:o}function Ur(t,e,n){e=e.length?Ae(e,(function(t){return Ga(t)?function(e){return kr(e,1===t.length?t[0]:t)}:t})):[ou];var r=-1;return e=Ae(e,qe(so())),function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var u=Ei(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(Ir(t,(function(t,n,i){return{criteria:Ae(e,(function(e){return e(t)})),index:++r,value:t}})))}function qr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=kr(t,a);n(s,a)&&Jr(o,yi(a,t),s)}return o}function Hr(t,e,n,r){var i=r?Fe:Re,o=-1,a=e.length,s=t;for(t===e&&(e=Ci(e)),n&&(s=Ae(t,qe(n)));++o<a;)for(var u=0,l=e[o],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==t&&ie.call(s,u,1),ie.call(t,u,1);return t}function Gr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;yo(i)?ie.call(t,i,1):ci(t,i)}}return t}function Wr(t,e){return t+hn(Sn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=hn(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Mo(Ao(t,e,ou),t+"")}function Qr(t){return Kn($s(t))}function Kr(t,e){var n=$s(t);return Fo(n,sr(e,0,n.length))}function Jr(t,e,n,r){if(!ns(t))return t;for(var i=-1,a=(e=yi(e,t)).length,s=a-1,u=t;null!=u&&++i<a;){var l=Bo(e[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=s){var f=u[l];(c=r?r(f,l,u):o)===o&&(c=ns(f)?f:yo(e[i+1])?[]:{})}er(u,l,c),u=u[l]}return t}var Zr=Nn?function(t,e){return Nn.set(t,e),t}:ou,ti=ce?function(t,e){return ce(t,"toString",{configurable:!0,enumerable:!1,value:nu(e),writable:!0})}:ou;function ei(t){return Fo($s(t))}function ni(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function ri(t,e){var n;return hr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ii(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return oi(t,e,ou,n)}function oi(t,e,n,r){var i=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,u=null===e,l=cs(e),c=e===o;i<a;){var f=hn((i+a)/2),h=n(t[f]),d=h!==o,p=null===h,g=h==h,v=cs(h);if(s)var m=r||g;else m=c?g&&(r||d):u?g&&d&&(r||!p):l?g&&d&&!p&&(r||!v):!p&&!v&&(r?h<=e:h<e);m?i=f+1:a=f}return bn(a,4294967294)}function ai(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!$a(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function si(t){return"number"==typeof t?t:cs(t)?d:+t}function ui(t){if("string"==typeof t)return t;if(Ga(t))return Ae(t,ui)+"";if(cs(t))return Bn?Bn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function li(t,e,n){var r=-1,i=_e,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ee;else if(o>=200){var l=e?null:Yi(t);if(l)return rn(l);a=!1,i=Ge,u=new Yn}else u=e?[]:s;t:for(;++r<o;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue t;e&&u.push(f),s.push(c)}else i(u,f,n)||(u!==s&&u.push(f),s.push(c))}return s}function ci(t,e){return null==(t=Po(t,e=yi(e,t)))||delete t[Bo(Jo(e))]}function fi(t,e,n,r){return Jr(t,e,n(kr(t,e)),r)}function hi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ni(t,r?0:o,r?o+1:i):ni(t,r?o+1:0,r?i:o)}function di(t,e){var n=t;return n instanceof qn&&(n=n.value()),Ce(e,(function(t,e){return e.func.apply(e.thisArg,Pe([t],e.args))}),n)}function pi(t,e,n){var i=t.length;if(i<2)return i?li(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=fr(a[o]||s,t[u],e,n));return li(mr(a,1),e,n)}function gi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var u=r<a?e[r]:o;n(s,t[r],u)}return s}function vi(t){return Xa(t)?t:[]}function mi(t){return"function"==typeof t?t:ou}function yi(t,e){return Ga(t)?t:wo(t,e)?[t]:Io(ws(t))}var bi=Xr;function wi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:ni(t,e,n)}var xi=fe||function(t){return ae.clearTimeout(t)};function Si(t,e){if(e)return t.slice();var n=t.length,r=qt?qt(n):new t.constructor(n);return t.copy(r),r}function ki(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function _i(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ei(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=cs(t),s=e!==o,u=null===e,l=e==e,c=cs(e);if(!u&&!c&&!a&&t>e||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&t<e||c&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!l)return-1}return 0}function Ai(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,l=e.length,c=yn(a-s,0),f=r(l+c),h=!i;++u<l;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;c--;)f[u++]=t[o++];return f}function Pi(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,l=-1,c=e.length,f=yn(a-u,0),h=r(f+c),d=!i;++o<f;)h[o]=t[o];for(var p=o;++l<c;)h[p+l]=e[l];for(;++s<u;)(d||o<a)&&(h[p+n[s]]=t[o++]);return h}function Ci(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ti(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],l=r?r(n[u],t[u],u,n,t):o;l===o&&(l=t[u]),i?or(n,u,l):er(n,u,l)}return n}function Ni(t,e){return function(n,r){var i=Ga(n)?be:rr,o=e?e():{};return i(n,t,so(r,2),o)}}function Li(t){return Xr((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&bo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=Et(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e}))}function Mi(t,e){return function(n,r){if(null==n)return n;if(!Ya(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Et(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(t){return function(e,n,r){for(var i=-1,o=Et(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Ri(t){return function(e){var n=Ze(e=ws(e))?sn(e):o,r=n?n[0]:e.charAt(0),i=n?wi(n,1).join(""):e.slice(1);return r[t]()+i}}function Fi(t){return function(e){return Ce(Zs(Hs(e).replace(Ht,"")),t,"")}}function Di(t){return function(){var e=arguments;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]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return ns(r)?r:n}}function ji(t){return function(e,n,r){var i=Et(e);if(!Ya(e)){var a=so(n,3);e=Os(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function Ii(t){return eo((function(e){var n=e.length,r=n,i=Un.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Ct(a);if(i&&!u&&"wrapper"==oo(s))var u=new Un([],!0)}for(r=u?r:n;++r<n;){var l=oo(s=e[r]),c="wrapper"==l?io(s):o;u=c&&xo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[oo(c[0])].apply(u,c[3]):1==s.length&&xo(s)?u[l]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ga(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Bi(t,e,n,i,a,s,u,l,f,h){var d=e&c,p=1&e,g=2&e,v=24&e,m=512&e,y=g?o:Di(t);return function o(){for(var c=arguments.length,b=r(c),w=c;w--;)b[w]=arguments[w];if(v)var x=ao(o),S=Xe(b,x);if(i&&(b=Ai(b,i,a,v)),s&&(b=Pi(b,s,u,v)),c-=S,v&&c<h){var k=nn(b,x);return Gi(t,e,Bi,o.placeholder,n,b,k,l,f,h-c)}var _=p?n:this,E=g?_[t]:t;return c=b.length,l?b=Co(b,l):m&&c>1&&b.reverse(),d&&f<c&&(b.length=f),this&&this!==ae&&this instanceof o&&(E=y||Di(E)),E.apply(_,b)}}function zi(t,e){return function(n,r){return function(t,e,n,r){return wr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Vi(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ui(n),r=ui(r)):(n=si(n),r=si(r)),i=t(n,r)}return i}}function $i(t){return eo((function(e){return e=Ae(e,qe(so())),Xr((function(n){var r=this;return t(e,(function(t){return ye(t,r,n)}))}))}))}function Ui(t,e){var n=(e=e===o?" ":ui(e)).length;if(n<2)return n?Yr(e,t):e;var r=Yr(e,fn(t/an(e)));return Ze(e)?wi(sn(r),0,t).join(""):r.slice(0,t)}function qi(t){return function(e,n,i){return i&&"number"!=typeof i&&bo(e,n,i)&&(n=i=o),e=gs(e),n===o?(n=e,e=0):n=gs(n),function(t,e,n,i){for(var o=-1,a=yn(fn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:gs(i),t)}}function Hi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ys(e),n=ys(n)),t(e,n)}}function Gi(t,e,n,r,i,a,s,u,c,f){var h=8&e;e|=h?l:64,4&(e&=~(h?64:l))||(e&=-4);var d=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,u,c,f],p=n.apply(o,d);return xo(t)&&No(p,d),p.placeholder=r,Oo(p,t,e)}function Wi(t){var e=_t[t];return function(t,n){if(t=ys(t),(n=null==n?0:bn(vs(n),292))&&gn(t)){var r=(ws(t)+"e").split("e");return+((r=(ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Yi=Pn&&1/rn(new Pn([,-0]))[1]==f?function(t){return new Pn(t)}:cu;function Xi(t){return function(e){var n=po(e);return n==k?tn(e):n==C?on(e):function(t,e){return Ae(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qi(t,e,n,i,s,f,h,d){var p=2&e;if(!p&&"function"!=typeof t)throw new Ct(a);var g=i?i.length:0;if(g||(e&=-97,i=s=o),h=h===o?h:yn(vs(h),0),d=d===o?d:vs(d),g-=s?s.length:0,64&e){var v=i,m=s;i=s=o}var y=p?o:io(t),b=[t,e,n,i,s,v,m,f,h,d];if(y&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var s=e[3];if(s){var l=t[3];t[3]=l?Ai(l,s,e[4]):s,t[4]=l?nn(t[3],u):e[4]}(s=e[5])&&(l=t[5],t[5]=l?Pi(l,s,e[6]):s,t[6]=l?nn(t[5],u):e[6]),(s=e[7])&&(t[7]=s),r&c&&(t[8]=null==t[8]?e[8]:bn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(b,y),t=b[0],e=b[1],n=b[2],i=b[3],s=b[4],!(d=b[9]=b[9]===o?p?0:t.length:yn(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,n){var i=Di(t);return function a(){for(var s=arguments.length,u=r(s),l=s,c=ao(a);l--;)u[l]=arguments[l];var f=s<3&&u[0]!==c&&u[s-1]!==c?[]:nn(u,c);return(s-=f.length)<n?Gi(t,e,Bi,a.placeholder,o,u,f,o,o,n-s):ye(this&&this!==ae&&this instanceof a?i:t,this,u)}}(t,e,d):e!=l&&33!=e||s.length?Bi.apply(o,b):function(t,e,n,i){var o=1&e,a=Di(t);return function e(){for(var s=-1,u=arguments.length,l=-1,c=i.length,f=r(c+u),h=this&&this!==ae&&this instanceof e?a:t;++l<c;)f[l]=i[l];for(;u--;)f[l++]=arguments[++s];return ye(h,o?n:this,f)}}(t,e,n,i);else var w=function(t,e,n){var r=1&e,i=Di(t);return function e(){return(this&&this!==ae&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Oo((y?Zr:No)(w,b),t,e)}function Ki(t,e,n,r){return t===o||$a(t,Lt[n])&&!Rt.call(r,n)?e:t}function Ji(t,e,n,r,i,a){return ns(t)&&ns(e)&&(a.set(e,t),Vr(t,e,o,Ji,a),a.delete(e)),t}function Zi(t){return as(t)?o:t}function to(t,e,n,r,i,a){var s=1&n,u=t.length,l=e.length;if(u!=l&&!(s&&l>u))return!1;var c=a.get(t),f=a.get(e);if(c&&f)return c==e&&f==t;var h=-1,d=!0,p=2&n?new Yn:o;for(a.set(t,e),a.set(e,t);++h<u;){var g=t[h],v=e[h];if(r)var m=s?r(v,g,h,e,t,a):r(g,v,h,t,e,a);if(m!==o){if(m)continue;d=!1;break}if(p){if(!Ne(e,(function(t,e){if(!Ge(p,e)&&(g===t||i(g,t,n,r,a)))return p.push(e)}))){d=!1;break}}else if(g!==v&&!i(g,v,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function eo(t){return Mo(Ao(t,o,Wo),t+"")}function no(t){return _r(t,Os,fo)}function ro(t){return _r(t,Rs,ho)}var io=Nn?function(t){return Nn.get(t)}:cu;function oo(t){for(var e=t.name+"",n=Ln[e],r=Rt.call(Ln,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function ao(t){return(Rt.call(zn,"placeholder")?zn:t).placeholder}function so(){var t=zn.iteratee||au;return t=t===au?Fr:t,arguments.length?t(arguments[0],arguments[1]):t}function uo(t,e){var n,r,o=t.__data__;return("string"==(r=i(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function lo(t){for(var e=Os(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,_o(i)]}return e}function co(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Rr(n)?n:o}var fo=dn?function(t){return null==t?[]:(t=Et(t),ke(dn(t),(function(e){return ee.call(t,e)})))}:mu,ho=dn?function(t){for(var e=[];t;)Pe(e,fo(t)),t=Wt(t);return e}:mu,po=Er;function go(t,e,n){for(var r=-1,i=(e=yi(e,t)).length,o=!1;++r<i;){var a=Bo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&es(i)&&yo(a,i)&&(Ga(t)||Ha(t))}function vo(t){return"function"!=typeof t.constructor||ko(t)?{}:Vn(Wt(t))}function mo(t){return Ga(t)||Ha(t)||!!(oe&&t&&t[oe])}function yo(t,e){var n=i(t);return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function bo(t,e,n){if(!ns(n))return!1;var r=i(e);return!!("number"==r?Ya(n)&&yo(e,n.length):"string"==r&&e in n)&&$a(n[e],t)}function wo(t,e){if(Ga(t))return!1;var n=i(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||tt.test(t)||!Z.test(t)||null!=e&&t in Et(e)}function xo(t){var e=oo(t),n=zn[e];if("function"!=typeof n||!(e in qn.prototype))return!1;if(t===n)return!0;var r=io(n);return!!r&&t===r[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=O||En&&po(new En)!=k||An&&po(An.resolve())!=A||Pn&&po(new Pn)!=C||Cn&&po(new Cn)!=L)&&(po=function(t){var e=Er(t),n=e==E?t.constructor:o,r=n?zo(n):"";if(r)switch(r){case Mn:return O;case On:return k;case Rn:return A;case Fn:return C;case Dn:return L}return e});var So=Mt?Za:yu;function ko(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function _o(t){return t==t&&!ns(t)}function Eo(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in Et(n))}}function Ao(t,e,n){return e=yn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=yn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),ye(t,this,u)}}function Po(t,e){return e.length<2?t:kr(t,ni(e,0,-1))}function Co(t,e){for(var n=t.length,r=bn(e.length,n),i=Ci(t);r--;){var a=e[r];t[r]=yo(a,n)?i[a]:o}return t}function To(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var No=Ro(Zr),Lo=Be||function(t,e){return ae.setTimeout(t,e)},Mo=Ro(ti);function Oo(t,e,n){var r=e+"";return Mo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return we(g,(function(n){var r="_."+n[0];e&n[1]&&!_e(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(ut):[]}(r),n)))}function Ro(t){var e=0,n=0;return function(){var r=wn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Fo(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=Wr(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Do,jo,Io=(Do=Da((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(et,(function(t,n,r,i){e.push(r?i.replace(ft,"$1"):n||t)})),e}),(function(t){return 500===jo.size&&jo.clear(),t})),jo=Do.cache,Do);function Bo(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zo(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Vo(t){if(t instanceof qn)return t.clone();var e=new Un(t.__wrapped__,t.__chain__);return e.__actions__=Ci(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var $o=Xr((function(t,e){return Xa(t)?fr(t,mr(e,1,Xa,!0)):[]})),Uo=Xr((function(t,e){var n=Jo(e);return Xa(n)&&(n=o),Xa(t)?fr(t,mr(e,1,Xa,!0),so(n,2)):[]})),qo=Xr((function(t,e){var n=Jo(e);return Xa(n)&&(n=o),Xa(t)?fr(t,mr(e,1,Xa,!0),o,n):[]}));function Ho(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=yn(r+i,0)),Oe(t,so(e,3),i)}function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=vs(n),i=n<0?yn(r+i,0):bn(i,r-1)),Oe(t,so(e,3),i,!0)}function Wo(t){return null!=t&&t.length?mr(t,1):[]}function Yo(t){return t&&t.length?t[0]:o}var Xo=Xr((function(t){var e=Ae(t,vi);return e.length&&e[0]===t[0]?Tr(e):[]})),Qo=Xr((function(t){var e=Jo(t),n=Ae(t,vi);return e===Jo(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Tr(n,so(e,2)):[]})),Ko=Xr((function(t){var e=Jo(t),n=Ae(t,vi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Tr(n,o,e):[]}));function Jo(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Zo=Xr(ta);function ta(t,e){return t&&t.length&&e&&e.length?Hr(t,e):t}var ea=eo((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Gr(t,Ae(e,(function(t){return yo(t,n)?+t:t})).sort(Ei)),r}));function na(t){return null==t?t:kn.call(t)}var ra=Xr((function(t){return li(mr(t,1,Xa,!0))})),ia=Xr((function(t){var e=Jo(t);return Xa(e)&&(e=o),li(mr(t,1,Xa,!0),so(e,2))})),oa=Xr((function(t){var e=Jo(t);return e="function"==typeof e?e:o,li(mr(t,1,Xa,!0),o,e)}));function aa(t){if(!t||!t.length)return[];var e=0;return t=ke(t,(function(t){if(Xa(t))return e=yn(t.length,e),!0})),$e(e,(function(e){return Ae(t,Ie(e))}))}function sa(t,e){if(!t||!t.length)return[];var n=aa(t);return null==e?n:Ae(n,(function(t){return ye(e,o,t)}))}var ua=Xr((function(t,e){return Xa(t)?fr(t,e):[]})),la=Xr((function(t){return pi(ke(t,Xa))})),ca=Xr((function(t){var e=Jo(t);return Xa(e)&&(e=o),pi(ke(t,Xa),so(e,2))})),fa=Xr((function(t){var e=Jo(t);return e="function"==typeof e?e:o,pi(ke(t,Xa),o,e)})),ha=Xr(aa),da=Xr((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,sa(t,n)}));function pa(t){var e=zn(t);return e.__chain__=!0,e}function ga(t,e){return e(t)}var va=eo((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return ar(e,t)};return!(e>1||this.__actions__.length)&&r instanceof qn&&yo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ga,args:[i],thisArg:o}),new Un(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)})),ma=Ni((function(t,e,n){Rt.call(t,n)?++t[n]:or(t,n,1)})),ya=ji(Ho),ba=ji(Go);function wa(t,e){return(Ga(t)?we:hr)(t,so(e,3))}function xa(t,e){return(Ga(t)?xe:dr)(t,so(e,3))}var Sa=Ni((function(t,e,n){Rt.call(t,n)?t[n].push(e):or(t,n,[e])})),ka=Xr((function(t,e,n){var i=-1,o="function"==typeof e,a=Ya(t)?r(t.length):[];return hr(t,(function(t){a[++i]=o?ye(e,t,n):Nr(t,e,n)})),a})),_a=Ni((function(t,e,n){or(t,n,e)}));function Ea(t,e){return(Ga(t)?Ae:Ir)(t,so(e,3))}var Aa=Ni((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Pa=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&bo(t,e[0],e[1])?e=[]:n>2&&bo(e[0],e[1],e[2])&&(e=[e[0]]),Ur(t,mr(e,1),[])})),Ca=Le||function(){return ae.Date.now()};function Ta(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Qi(t,c,o,o,o,o,e)}function Na(t,e){var n;if("function"!=typeof e)throw new Ct(a);return t=vs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var La=Xr((function(t,e,n){var r=1;if(n.length){var i=nn(n,ao(La));r|=l}return Qi(t,r,e,n,i)})),Ma=Xr((function(t,e,n){var r=3;if(n.length){var i=nn(n,ao(Ma));r|=l}return Qi(e,r,t,n,i)}));function Oa(t,e,n){var r,i,s,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Ct(a);function g(e){var n=r,a=i;return r=i=o,f=e,u=t.apply(a,n)}function v(t){return f=t,l=Lo(y,e),h?g(t):u}function m(t){var n=t-c;return c===o||n>=e||n<0||d&&t-f>=s}function y(){var t=Ca();if(m(t))return b(t);l=Lo(y,function(t){var n=e-(t-c);return d?bn(n,s-(t-f)):n}(t))}function b(t){return l=o,p&&r?g(t):(r=i=o,u)}function w(){var t=Ca(),n=m(t);if(r=arguments,i=this,c=t,n){if(l===o)return v(c);if(d)return xi(l),l=Lo(y,e),g(c)}return l===o&&(l=Lo(y,e)),u}return e=ys(e)||0,ns(n)&&(h=!!n.leading,s=(d="maxWait"in n)?yn(ys(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),w.cancel=function(){l!==o&&xi(l),f=0,r=c=i=l=o},w.flush=function(){return l===o?u:b(Ca())},w}var Ra=Xr((function(t,e){return cr(t,1,e)})),Fa=Xr((function(t,e,n){return cr(t,ys(e)||0,n)}));function Da(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ct(a);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Da.Cache||Wn),n}function ja(t){if("function"!=typeof t)throw new Ct(a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Da.Cache=Wn;var Ia=bi((function(t,e){var n=(e=1==e.length&&Ga(e[0])?Ae(e[0],qe(so())):Ae(mr(e,1),qe(so()))).length;return Xr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return ye(t,this,r)}))})),Ba=Xr((function(t,e){var n=nn(e,ao(Ba));return Qi(t,l,o,e,n)})),za=Xr((function(t,e){var n=nn(e,ao(za));return Qi(t,64,o,e,n)})),Va=eo((function(t,e){return Qi(t,256,o,o,o,e)}));function $a(t,e){return t===e||t!=t&&e!=e}var Ua=Hi(Ar),qa=Hi((function(t,e){return t>=e})),Ha=Lr(function(){return arguments}())?Lr:function(t){return rs(t)&&Rt.call(t,"callee")&&!ee.call(t,"callee")},Ga=r.isArray,Wa=he?qe(he):function(t){return rs(t)&&Er(t)==M};function Ya(t){return null!=t&&es(t.length)&&!Za(t)}function Xa(t){return rs(t)&&Ya(t)}var Qa=pn||yu,Ka=de?qe(de):function(t){return rs(t)&&Er(t)==b};function Ja(t){if(!rs(t))return!1;var e=Er(t);return e==w||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!as(t)}function Za(t){if(!ns(t))return!1;var e=Er(t);return e==x||e==S||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ts(t){return"number"==typeof t&&t==vs(t)}function es(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ns(t){var e=i(t);return null!=t&&("object"==e||"function"==e)}function rs(t){return null!=t&&"object"==i(t)}var is=pe?qe(pe):function(t){return rs(t)&&po(t)==k};function os(t){return"number"==typeof t||rs(t)&&Er(t)==_}function as(t){if(!rs(t)||Er(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ot.call(n)==It}var ss=ge?qe(ge):function(t){return rs(t)&&Er(t)==P},us=ve?qe(ve):function(t){return rs(t)&&po(t)==C};function ls(t){return"string"==typeof t||!Ga(t)&&rs(t)&&Er(t)==T}function cs(t){return"symbol"==i(t)||rs(t)&&Er(t)==N}var fs=me?qe(me):function(t){return rs(t)&&es(t.length)&&!!Zt[Er(t)]},hs=Hi(jr),ds=Hi((function(t,e){return t<=e}));function ps(t){if(!t)return[];if(Ya(t))return ls(t)?sn(t):Ci(t);if(se&&t[se])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[se]());var e=po(t);return(e==k?tn:e==C?rn:$s)(t)}function gs(t){return t?(t=ys(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function vs(t){var e=gs(t),n=e%1;return e==e?n?e-n:e:0}function ms(t){return t?sr(vs(t),0,p):0}function ys(t){if("number"==typeof t)return t;if(cs(t))return d;if(ns(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ns(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ue(t);var n=gt.test(t);return n||mt.test(t)?re(t.slice(2),n?2:8):pt.test(t)?d:+t}function bs(t){return Ti(t,Rs(t))}function ws(t){return null==t?"":ui(t)}var xs=Li((function(t,e){if(ko(e)||Ya(e))Ti(e,Os(e),t);else for(var n in e)Rt.call(e,n)&&er(t,n,e[n])})),Ss=Li((function(t,e){Ti(e,Rs(e),t)})),ks=Li((function(t,e,n,r){Ti(e,Rs(e),t,r)})),_s=Li((function(t,e,n,r){Ti(e,Os(e),t,r)})),Es=eo(ar),As=Xr((function(t,e){t=Et(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&bo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=Rs(a),u=-1,l=s.length;++u<l;){var c=s[u],f=t[c];(f===o||$a(f,Lt[c])&&!Rt.call(t,c))&&(t[c]=a[c])}return t})),Ps=Xr((function(t){return t.push(o,Ji),ye(Ds,o,t)}));function Cs(t,e,n){var r=null==t?o:kr(t,e);return r===o?n:r}function Ts(t,e){return null!=t&&go(t,e,Cr)}var Ns=zi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),nu(ou)),Ls=zi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Rt.call(t,e)?t[e].push(n):t[e]=[n]}),so),Ms=Xr(Nr);function Os(t){return Ya(t)?Qn(t):Dr(t)}function Rs(t){return Ya(t)?Qn(t,!0):function(t){if(!ns(t))return function(t){var e=[];if(null!=t)for(var n in Et(t))e.push(n);return e}(t);var e=ko(t),n=[];for(var r in t)("constructor"!=r||!e&&Rt.call(t,r))&&n.push(r);return n}(t)}var Fs=Li((function(t,e,n){Vr(t,e,n)})),Ds=Li((function(t,e,n,r){Vr(t,e,n,r)})),js=eo((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ae(e,(function(e){return e=yi(e,t),r||(r=e.length>1),e})),Ti(t,ro(t),n),r&&(n=ur(n,7,Zi));for(var i=e.length;i--;)ci(n,e[i]);return n})),Is=eo((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return Ts(t,n)}))}(t,e)}));function Bs(t,e){if(null==t)return{};var n=Ae(ro(t),(function(t){return[t]}));return e=so(e),qr(t,n,(function(t,n){return e(t,n[0])}))}var zs=Xi(Os),Vs=Xi(Rs);function $s(t){return null==t?[]:He(t,Os(t))}var Us=Fi((function(t,e,n){return e=e.toLowerCase(),t+(n?qs(e):e)}));function qs(t){return Js(ws(t).toLowerCase())}function Hs(t){return(t=ws(t))&&t.replace(bt,Qe).replace(Gt,"")}var Gs=Fi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ws=Fi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ys=Ri("toLowerCase"),Xs=Fi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Qs=Fi((function(t,e,n){return t+(n?" ":"")+Js(e)})),Ks=Fi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Js=Ri("toUpperCase");function Zs(t,e,n){return t=ws(t),(e=n?o:e)===o?function(t){return Qt.test(t)}(t)?function(t){return t.match(Yt)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var tu=Xr((function(t,e){try{return ye(t,o,e)}catch(t){return Ja(t)?t:new St(t)}})),eu=eo((function(t,e){return we(e,(function(e){e=Bo(e),or(t,e,La(t[e],t))})),t}));function nu(t){return function(){return t}}var ru=Ii(),iu=Ii(!0);function ou(t){return t}function au(t){return Fr("function"==typeof t?t:ur(t,1))}var su=Xr((function(t,e){return function(n){return Nr(n,t,e)}})),uu=Xr((function(t,e){return function(n){return Nr(t,n,e)}}));function lu(t,e,n){var r=Os(e),i=Sr(e,r);null!=n||ns(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Sr(e,Os(e)));var o=!(ns(n)&&"chain"in n&&!n.chain),a=Za(t);return we(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Ci(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Pe([this.value()],arguments))})})),t}function cu(){}var fu=$i(Ae),hu=$i(Se),du=$i(Ne);function pu(t){return wo(t)?Ie(Bo(t)):function(t){return function(e){return kr(e,t)}}(t)}var gu=qi(),vu=qi(!0);function mu(){return[]}function yu(){return!1}var bu,wu=Vi((function(t,e){return t+e}),0),xu=Wi("ceil"),Su=Vi((function(t,e){return t/e}),1),ku=Wi("floor"),_u=Vi((function(t,e){return t*e}),1),Eu=Wi("round"),Au=Vi((function(t,e){return t-e}),0);return zn.after=function(t,e){if("function"!=typeof e)throw new Ct(a);return t=vs(t),function(){if(--t<1)return e.apply(this,arguments)}},zn.ary=Ta,zn.assign=xs,zn.assignIn=Ss,zn.assignInWith=ks,zn.assignWith=_s,zn.at=Es,zn.before=Na,zn.bind=La,zn.bindAll=eu,zn.bindKey=Ma,zn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},zn.chain=pa,zn.chunk=function(t,e,n){e=(n?bo(t,e,n):e===o)?1:yn(vs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(fn(i/e));a<i;)u[s++]=ni(t,a,a+=e);return u},zn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},zn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Pe(Ga(n)?Ci(n):[n],mr(e,1))},zn.cond=function(t){var e=null==t?0:t.length,n=so();return t=e?Ae(t,(function(t){if("function"!=typeof t[1])throw new Ct(a);return[n(t[0]),t[1]]})):[],Xr((function(n){for(var r=-1;++r<e;){var i=t[r];if(ye(i[0],this,n))return ye(i[1],this,n)}}))},zn.conforms=function(t){return function(t){var e=Os(t);return function(n){return lr(n,t,e)}}(ur(t,1))},zn.constant=nu,zn.countBy=ma,zn.create=function(t,e){var n=Vn(t);return null==e?n:ir(n,e)},zn.curry=function t(e,n,r){var i=Qi(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},zn.curryRight=function t(e,n,r){var i=Qi(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},zn.debounce=Oa,zn.defaults=As,zn.defaultsDeep=Ps,zn.defer=Ra,zn.delay=Fa,zn.difference=$o,zn.differenceBy=Uo,zn.differenceWith=qo,zn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ni(t,(e=n||e===o?1:vs(e))<0?0:e,r):[]},zn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ni(t,0,(e=r-(e=n||e===o?1:vs(e)))<0?0:e):[]},zn.dropRightWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!0,!0):[]},zn.dropWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!0):[]},zn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&bo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=vs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:vs(r))<0&&(r+=i),r=n>r?0:ms(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},zn.filter=function(t,e){return(Ga(t)?ke:vr)(t,so(e,3))},zn.flatMap=function(t,e){return mr(Ea(t,e),1)},zn.flatMapDeep=function(t,e){return mr(Ea(t,e),f)},zn.flatMapDepth=function(t,e,n){return n=n===o?1:vs(n),mr(Ea(t,e),n)},zn.flatten=Wo,zn.flattenDeep=function(t){return null!=t&&t.length?mr(t,f):[]},zn.flattenDepth=function(t,e){return null!=t&&t.length?mr(t,e=e===o?1:vs(e)):[]},zn.flip=function(t){return Qi(t,512)},zn.flow=ru,zn.flowRight=iu,zn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},zn.functions=function(t){return null==t?[]:Sr(t,Os(t))},zn.functionsIn=function(t){return null==t?[]:Sr(t,Rs(t))},zn.groupBy=Sa,zn.initial=function(t){return null!=t&&t.length?ni(t,0,-1):[]},zn.intersection=Xo,zn.intersectionBy=Qo,zn.intersectionWith=Ko,zn.invert=Ns,zn.invertBy=Ls,zn.invokeMap=ka,zn.iteratee=au,zn.keyBy=_a,zn.keys=Os,zn.keysIn=Rs,zn.map=Ea,zn.mapKeys=function(t,e){var n={};return e=so(e,3),wr(t,(function(t,r,i){or(n,e(t,r,i),t)})),n},zn.mapValues=function(t,e){var n={};return e=so(e,3),wr(t,(function(t,r,i){or(n,r,e(t,r,i))})),n},zn.matches=function(t){return Br(ur(t,1))},zn.matchesProperty=function(t,e){return zr(t,ur(e,1))},zn.memoize=Da,zn.merge=Fs,zn.mergeWith=Ds,zn.method=su,zn.methodOf=uu,zn.mixin=lu,zn.negate=ja,zn.nthArg=function(t){return t=vs(t),Xr((function(e){return $r(e,t)}))},zn.omit=js,zn.omitBy=function(t,e){return Bs(t,ja(so(e)))},zn.once=function(t){return Na(2,t)},zn.orderBy=function(t,e,n,r){return null==t?[]:(Ga(e)||(e=null==e?[]:[e]),Ga(n=r?o:n)||(n=null==n?[]:[n]),Ur(t,e,n))},zn.over=fu,zn.overArgs=Ia,zn.overEvery=hu,zn.overSome=du,zn.partial=Ba,zn.partialRight=za,zn.partition=Aa,zn.pick=Is,zn.pickBy=Bs,zn.property=pu,zn.propertyOf=function(t){return function(e){return null==t?o:kr(t,e)}},zn.pull=Zo,zn.pullAll=ta,zn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Hr(t,e,so(n,2)):t},zn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Hr(t,e,o,n):t},zn.pullAt=ea,zn.range=gu,zn.rangeRight=vu,zn.rearg=Va,zn.reject=function(t,e){return(Ga(t)?ke:vr)(t,ja(so(e,3)))},zn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=so(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Gr(t,i),n},zn.rest=function(t,e){if("function"!=typeof t)throw new Ct(a);return Xr(t,e=e===o?e:vs(e))},zn.reverse=na,zn.sampleSize=function(t,e,n){return e=(n?bo(t,e,n):e===o)?1:vs(e),(Ga(t)?Jn:Kr)(t,e)},zn.set=function(t,e,n){return null==t?t:Jr(t,e,n)},zn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Jr(t,e,n,r)},zn.shuffle=function(t){return(Ga(t)?Zn:ei)(t)},zn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&bo(t,e,n)?(e=0,n=r):(e=null==e?0:vs(e),n=n===o?r:vs(n)),ni(t,e,n)):[]},zn.sortBy=Pa,zn.sortedUniq=function(t){return t&&t.length?ai(t):[]},zn.sortedUniqBy=function(t,e){return t&&t.length?ai(t,so(e,2)):[]},zn.split=function(t,e,n){return n&&"number"!=typeof n&&bo(t,e,n)&&(e=n=o),(n=n===o?p:n>>>0)?(t=ws(t))&&("string"==typeof e||null!=e&&!ss(e))&&!(e=ui(e))&&Ze(t)?wi(sn(t),0,n):t.split(e,n):[]},zn.spread=function(t,e){if("function"!=typeof t)throw new Ct(a);return e=null==e?0:yn(vs(e),0),Xr((function(n){var r=n[e],i=wi(n,0,e);return r&&Pe(i,r),ye(t,this,i)}))},zn.tail=function(t){var e=null==t?0:t.length;return e?ni(t,1,e):[]},zn.take=function(t,e,n){return t&&t.length?ni(t,0,(e=n||e===o?1:vs(e))<0?0:e):[]},zn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ni(t,(e=r-(e=n||e===o?1:vs(e)))<0?0:e,r):[]},zn.takeRightWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!1,!0):[]},zn.takeWhile=function(t,e){return t&&t.length?hi(t,so(e,3)):[]},zn.tap=function(t,e){return e(t),t},zn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Ct(a);return ns(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Oa(t,e,{leading:r,maxWait:e,trailing:i})},zn.thru=ga,zn.toArray=ps,zn.toPairs=zs,zn.toPairsIn=Vs,zn.toPath=function(t){return Ga(t)?Ae(t,Bo):cs(t)?[t]:Ci(Io(ws(t)))},zn.toPlainObject=bs,zn.transform=function(t,e,n){var r=Ga(t),i=r||Qa(t)||fs(t);if(e=so(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:ns(t)&&Za(o)?Vn(Wt(t)):{}}return(i?we:wr)(t,(function(t,r,i){return e(n,t,r,i)})),n},zn.unary=function(t){return Ta(t,1)},zn.union=ra,zn.unionBy=ia,zn.unionWith=oa,zn.uniq=function(t){return t&&t.length?li(t):[]},zn.uniqBy=function(t,e){return t&&t.length?li(t,so(e,2)):[]},zn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?li(t,o,e):[]},zn.unset=function(t,e){return null==t||ci(t,e)},zn.unzip=aa,zn.unzipWith=sa,zn.update=function(t,e,n){return null==t?t:fi(t,e,mi(n))},zn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:fi(t,e,mi(n),r)},zn.values=$s,zn.valuesIn=function(t){return null==t?[]:He(t,Rs(t))},zn.without=ua,zn.words=Zs,zn.wrap=function(t,e){return Ba(mi(e),t)},zn.xor=la,zn.xorBy=ca,zn.xorWith=fa,zn.zip=ha,zn.zipObject=function(t,e){return gi(t||[],e||[],er)},zn.zipObjectDeep=function(t,e){return gi(t||[],e||[],Jr)},zn.zipWith=da,zn.entries=zs,zn.entriesIn=Vs,zn.extend=Ss,zn.extendWith=ks,lu(zn,zn),zn.add=wu,zn.attempt=tu,zn.camelCase=Us,zn.capitalize=qs,zn.ceil=xu,zn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=ys(n))==n?n:0),e!==o&&(e=(e=ys(e))==e?e:0),sr(ys(t),e,n)},zn.clone=function(t){return ur(t,4)},zn.cloneDeep=function(t){return ur(t,5)},zn.cloneDeepWith=function(t,e){return ur(t,5,e="function"==typeof e?e:o)},zn.cloneWith=function(t,e){return ur(t,4,e="function"==typeof e?e:o)},zn.conformsTo=function(t,e){return null==e||lr(t,e,Os(e))},zn.deburr=Hs,zn.defaultTo=function(t,e){return null==t||t!=t?e:t},zn.divide=Su,zn.endsWith=function(t,e,n){t=ws(t),e=ui(e);var r=t.length,i=n=n===o?r:sr(vs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},zn.eq=$a,zn.escape=function(t){return(t=ws(t))&&X.test(t)?t.replace(W,Ke):t},zn.escapeRegExp=function(t){return(t=ws(t))&&rt.test(t)?t.replace(nt,"\\$&"):t},zn.every=function(t,e,n){var r=Ga(t)?Se:pr;return n&&bo(t,e,n)&&(e=o),r(t,so(e,3))},zn.find=ya,zn.findIndex=Ho,zn.findKey=function(t,e){return Me(t,so(e,3),wr)},zn.findLast=ba,zn.findLastIndex=Go,zn.findLastKey=function(t,e){return Me(t,so(e,3),xr)},zn.floor=ku,zn.forEach=wa,zn.forEachRight=xa,zn.forIn=function(t,e){return null==t?t:yr(t,so(e,3),Rs)},zn.forInRight=function(t,e){return null==t?t:br(t,so(e,3),Rs)},zn.forOwn=function(t,e){return t&&wr(t,so(e,3))},zn.forOwnRight=function(t,e){return t&&xr(t,so(e,3))},zn.get=Cs,zn.gt=Ua,zn.gte=qa,zn.has=function(t,e){return null!=t&&go(t,e,Pr)},zn.hasIn=Ts,zn.head=Yo,zn.identity=ou,zn.includes=function(t,e,n,r){t=Ya(t)?t:$s(t),n=n&&!r?vs(n):0;var i=t.length;return n<0&&(n=yn(i+n,0)),ls(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Re(t,e,n)>-1},zn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=yn(r+i,0)),Re(t,e,i)},zn.inRange=function(t,e,n){return e=gs(e),n===o?(n=e,e=0):n=gs(n),function(t,e,n){return t>=bn(e,n)&&t<yn(e,n)}(t=ys(t),e,n)},zn.invoke=Ms,zn.isArguments=Ha,zn.isArray=Ga,zn.isArrayBuffer=Wa,zn.isArrayLike=Ya,zn.isArrayLikeObject=Xa,zn.isBoolean=function(t){return!0===t||!1===t||rs(t)&&Er(t)==y},zn.isBuffer=Qa,zn.isDate=Ka,zn.isElement=function(t){return rs(t)&&1===t.nodeType&&!as(t)},zn.isEmpty=function(t){if(null==t)return!0;if(Ya(t)&&(Ga(t)||"string"==typeof t||"function"==typeof t.splice||Qa(t)||fs(t)||Ha(t)))return!t.length;var e=po(t);if(e==k||e==C)return!t.size;if(ko(t))return!Dr(t).length;for(var n in t)if(Rt.call(t,n))return!1;return!0},zn.isEqual=function(t,e){return Mr(t,e)},zn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?Mr(t,e,o,n):!!r},zn.isError=Ja,zn.isFinite=function(t){return"number"==typeof t&&gn(t)},zn.isFunction=Za,zn.isInteger=ts,zn.isLength=es,zn.isMap=is,zn.isMatch=function(t,e){return t===e||Or(t,e,lo(e))},zn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Or(t,e,lo(e),n)},zn.isNaN=function(t){return os(t)&&t!=+t},zn.isNative=function(t){if(So(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(t)},zn.isNil=function(t){return null==t},zn.isNull=function(t){return null===t},zn.isNumber=os,zn.isObject=ns,zn.isObjectLike=rs,zn.isPlainObject=as,zn.isRegExp=ss,zn.isSafeInteger=function(t){return ts(t)&&t>=-9007199254740991&&t<=h},zn.isSet=us,zn.isString=ls,zn.isSymbol=cs,zn.isTypedArray=fs,zn.isUndefined=function(t){return t===o},zn.isWeakMap=function(t){return rs(t)&&po(t)==L},zn.isWeakSet=function(t){return rs(t)&&"[object WeakSet]"==Er(t)},zn.join=function(t,e){return null==t?"":vn.call(t,e)},zn.kebabCase=Gs,zn.last=Jo,zn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=vs(n))<0?yn(r+i,0):bn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Oe(t,De,i,!0)},zn.lowerCase=Ws,zn.lowerFirst=Ys,zn.lt=hs,zn.lte=ds,zn.max=function(t){return t&&t.length?gr(t,ou,Ar):o},zn.maxBy=function(t,e){return t&&t.length?gr(t,so(e,2),Ar):o},zn.mean=function(t){return je(t,ou)},zn.meanBy=function(t,e){return je(t,so(e,2))},zn.min=function(t){return t&&t.length?gr(t,ou,jr):o},zn.minBy=function(t,e){return t&&t.length?gr(t,so(e,2),jr):o},zn.stubArray=mu,zn.stubFalse=yu,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=_u,zn.nth=function(t,e){return t&&t.length?$r(t,vs(e)):o},zn.noConflict=function(){return ae._===this&&(ae._=Bt),this},zn.noop=cu,zn.now=Ca,zn.pad=function(t,e,n){t=ws(t);var r=(e=vs(e))?an(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ui(hn(i),n)+t+Ui(fn(i),n)},zn.padEnd=function(t,e,n){t=ws(t);var r=(e=vs(e))?an(t):0;return e&&r<e?t+Ui(e-r,n):t},zn.padStart=function(t,e,n){t=ws(t);var r=(e=vs(e))?an(t):0;return e&&r<e?Ui(e-r,n)+t:t},zn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),xn(ws(t).replace(it,""),e||0)},zn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&bo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=gs(t),e===o?(e=t,t=0):e=gs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Sn();return bn(t+i*(e-t+ne("1e-"+((i+"").length-1))),e)}return Wr(t,e)},zn.reduce=function(t,e,n){var r=Ga(t)?Ce:ze,i=arguments.length<3;return r(t,so(e,4),n,i,hr)},zn.reduceRight=function(t,e,n){var r=Ga(t)?Te:ze,i=arguments.length<3;return r(t,so(e,4),n,i,dr)},zn.repeat=function(t,e,n){return e=(n?bo(t,e,n):e===o)?1:vs(e),Yr(ws(t),e)},zn.replace=function(){var t=arguments,e=ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},zn.result=function(t,e,n){var r=-1,i=(e=yi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[Bo(e[r])];a===o&&(r=i,a=n),t=Za(a)?a.call(t):a}return t},zn.round=Eu,zn.runInContext=t,zn.sample=function(t){return(Ga(t)?Kn:Qr)(t)},zn.size=function(t){if(null==t)return 0;if(Ya(t))return ls(t)?an(t):t.length;var e=po(t);return e==k||e==C?t.size:Dr(t).length},zn.snakeCase=Xs,zn.some=function(t,e,n){var r=Ga(t)?Ne:ri;return n&&bo(t,e,n)&&(e=o),r(t,so(e,3))},zn.sortedIndex=function(t,e){return ii(t,e)},zn.sortedIndexBy=function(t,e,n){return oi(t,e,so(n,2))},zn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ii(t,e);if(r<n&&$a(t[r],e))return r}return-1},zn.sortedLastIndex=function(t,e){return ii(t,e,!0)},zn.sortedLastIndexBy=function(t,e,n){return oi(t,e,so(n,2),!0)},zn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ii(t,e,!0)-1;if($a(t[n],e))return n}return-1},zn.startCase=Qs,zn.startsWith=function(t,e,n){return t=ws(t),n=null==n?0:sr(vs(n),0,t.length),e=ui(e),t.slice(n,n+e.length)==e},zn.subtract=Au,zn.sum=function(t){return t&&t.length?Ve(t,ou):0},zn.sumBy=function(t,e){return t&&t.length?Ve(t,so(e,2)):0},zn.template=function(t,e,n){var r=zn.templateSettings;n&&bo(t,e,n)&&(e=o),t=ws(t),e=ks({},e,r,Ki);var i,a,s=ks({},e.imports,r.imports,Ki),u=Os(s),l=He(s,u),c=0,f=e.interpolate||wt,h="__p += '",d=At((e.escape||wt).source+"|"+f.source+"|"+(f===J?ht:wt).source+"|"+(e.evaluate||wt).source+"|$","g"),p="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Jt+"]")+"\n";t.replace(d,(function(e,n,r,o,s,u){return r||(r=o),h+=t.slice(c,u).replace(xt,Je),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var g=Rt.call(e,"variable")&&e.variable;if(g){if(ct.test(g))throw new St("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(U,""):h).replace(q,"$1").replace(H,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=tu((function(){return kt(u,p+"return "+h).apply(o,l)}));if(v.source=h,Ja(v))throw v;return v},zn.times=function(t,e){if((t=vs(t))<1||t>h)return[];var n=p,r=bn(t,p);e=so(e),t-=p;for(var i=$e(r,e);++n<t;)e(n);return i},zn.toFinite=gs,zn.toInteger=vs,zn.toLength=ms,zn.toLower=function(t){return ws(t).toLowerCase()},zn.toNumber=ys,zn.toSafeInteger=function(t){return t?sr(vs(t),-9007199254740991,h):0===t?t:0},zn.toString=ws,zn.toUpper=function(t){return ws(t).toUpperCase()},zn.trim=function(t,e,n){if((t=ws(t))&&(n||e===o))return Ue(t);if(!t||!(e=ui(e)))return t;var r=sn(t),i=sn(e);return wi(r,We(r,i),Ye(r,i)+1).join("")},zn.trimEnd=function(t,e,n){if((t=ws(t))&&(n||e===o))return t.slice(0,un(t)+1);if(!t||!(e=ui(e)))return t;var r=sn(t);return wi(r,0,Ye(r,sn(e))+1).join("")},zn.trimStart=function(t,e,n){if((t=ws(t))&&(n||e===o))return t.replace(it,"");if(!t||!(e=ui(e)))return t;var r=sn(t);return wi(r,We(r,sn(e))).join("")},zn.truncate=function(t,e){var n=30,r="...";if(ns(e)){var i="separator"in e?e.separator:i;n="length"in e?vs(e.length):n,r="omission"in e?ui(e.omission):r}var a=(t=ws(t)).length;if(Ze(t)){var s=sn(t);a=s.length}if(n>=a)return t;var u=n-an(r);if(u<1)return r;var l=s?wi(s,0,u).join(""):t.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),ss(i)){if(t.slice(u).search(i)){var c,f=l;for(i.global||(i=At(i.source,ws(dt.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(t.indexOf(ui(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},zn.unescape=function(t){return(t=ws(t))&&Y.test(t)?t.replace(G,ln):t},zn.uniqueId=function(t){var e=++Ft;return ws(t)+e},zn.upperCase=Ks,zn.upperFirst=Js,zn.each=wa,zn.eachRight=xa,zn.first=Yo,lu(zn,(bu={},wr(zn,(function(t,e){Rt.call(zn.prototype,e)||(bu[e]=t)})),bu),{chain:!1}),zn.VERSION="4.17.21",we(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){zn[t].placeholder=zn})),we(["drop","take"],(function(t,e){qn.prototype[t]=function(n){n=n===o?1:yn(vs(n),0);var r=this.__filtered__&&!e?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,p),type:t+(r.__dir__<0?"Right":"")}),r},qn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),we(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;qn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:so(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),we(["head","last"],(function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}})),we(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");qn.prototype[t]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(ou)},qn.prototype.find=function(t){return this.filter(t).head()},qn.prototype.findLast=function(t){return this.reverse().find(t)},qn.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new qn(this):this.map((function(n){return Nr(n,t,e)}))})),qn.prototype.reject=function(t){return this.filter(ja(so(t)))},qn.prototype.slice=function(t,e){t=vs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new qn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=vs(e))<0?n.dropRight(-e):n.take(e-t)),n)},qn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qn.prototype.toArray=function(){return this.take(p)},wr(qn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=zn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(zn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof qn,l=s[0],c=u||Ga(e),f=function(t){var e=i.apply(zn,Pe([t],s));return r&&h?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,g=u&&!d;if(!a&&c){e=g?e:new qn(this);var v=t.apply(e,s);return v.__actions__.push({func:ga,args:[f],thisArg:o}),new Un(v,h)}return p&&g?t.apply(this,s):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),we(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);zn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n]((function(n){return e.apply(Ga(n)?n:[],t)}))}})),wr(qn.prototype,(function(t,e){var n=zn[e];if(n){var r=n.name+"";Rt.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:e,func:n})}})),Ln[Bi(o,2).name]=[{name:"wrapper",func:o}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=Ci(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ci(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ci(this.__views__),t},qn.prototype.reverse=function(){if(this.__filtered__){var t=new qn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=bn(e,t+a);break;case"takeRight":t=yn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,f=c.length,h=0,d=bn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return di(t,this.__actions__);var p=[];t:for(;u--&&h<d;){for(var g=-1,v=t[l+=e];++g<f;){var m=c[g],y=m.iteratee,b=m.type,w=y(v);if(2==b)v=w;else if(!w){if(1==b)continue t;break t}}p[h++]=v}return p},zn.prototype.at=va,zn.prototype.chain=function(){return pa(this)},zn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===o&&(this.__values__=ps(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},zn.prototype.plant=function(t){for(var e,n=this;n instanceof $n;){var r=Vo(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},zn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qn){var e=t;return this.__actions__.length&&(e=new qn(this)),(e=e.reverse()).__actions__.push({func:ga,args:[na],thisArg:o}),new Un(e,this.__chain__)}return this.thru(na)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,se&&(zn.prototype[se]=function(){return this}),zn}();"object"==i(n.amdO)&&n.amdO?(ae._=cn,(r=function(){return cn}.call(e,n,e,t))===o||(t.exports=r)):ue?((ue.exports=cn)._=cn,se._=cn):ae._=cn}.call(this)},6712:(t,e,n)=>{var r=n(7620),i=n(7859),o=n(6500),a=n(1030);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},1301:(t,e,n)=>{var r=n(5055),i=n(3810),o=n(7859);t.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},7365:(t,e,n)=>{var r=n(7348),i=n(3453),o=n(9019);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},2094:(t,e,n)=>{var r=n(1779);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},5797:(t,e,n)=>{var r=n(3497),i=n(8084)((function(t,e,n){r(t,e,n)}));t.exports=i},4757:(t,e,n)=>{var r=n(7348),i=n(1737),o=n(9019);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},4105:(t,e,n)=>{var r=n(7348),i=n(7859),o=n(1737);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},6628:t=>{t.exports=function(){}},9238:(t,e,n)=>{var r=n(8403);t.exports=function(){return r.Date.now()}},2356:(t,e,n)=>{var r=n(6880),i=n(1841)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},1052:(t,e,n)=>{var r=n(2972),i=n(4205),o=n(9169),a=n(1366);t.exports=function(t){return o(t)?r(a(t)):i(t)}},7932:(t,e,n)=>{var r=n(8538)();t.exports=r},781:(t,e,n)=>{var r=n(8963),i=n(7136),o=n(7859),a=n(4806),s=n(1030);t.exports=function(t,e,n){var u=s(t)?r:a,l=arguments.length<3;return u(t,o(e,4),n,l,i)}},7704:(t,e,n)=>{var r=n(4586),i=n(5188),o=n(5855),a=n(7458),s=n(3358);t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},937:(t,e,n)=>{var r=n(9317),i=n(7859),o=n(9092),a=n(1030),s=n(603);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&s(t,e,n)&&(e=void 0),u(t,i(e,3))}},4206:(t,e,n)=>{var r=n(9035),i=n(4429),o=n(6368),a=n(603),s=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},854:t=>{t.exports=function(){return[]}},9701:t=>{t.exports=function(){return!1}},5571:(t,e,n)=>{var r=n(6548);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},5700:(t,e,n)=>{var r=n(5571);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},6548:(t,e,n)=>{var r=n(8131),i=n(1310),o=n(6137),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||u.test(t)?l(t.slice(2),n?2:8):a.test(t)?NaN:+t}},4357:(t,e,n)=>{var r=n(8872),i=n(5859);t.exports=function(t){return r(t,i(t))}},7417:(t,e,n)=>{var r=n(5601);t.exports=function(t){return null==t?"":r(t)}},3536:(t,e,n)=>{var r=n(414),i=n(3877),o=n(3810),a=n(7859),s=n(885),u=n(1030),l=n(4493),c=n(6681),f=n(1310),h=n(1605);t.exports=function(t,e,n){var d=u(t),p=d||l(t)||h(t);if(e=a(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:f(t)&&c(g)?i(s(t)):{}}return(p?r:o)(t,(function(t,r,i){return e(n,t,r,i)})),n}},5588:(t,e,n)=>{var r=n(9035),i=n(6368),o=n(1080),a=n(4521),s=i((function(t){return o(r(t,1,a,!0))}));t.exports=s},6062:(t,e,n)=>{var r=n(7417),i=0;t.exports=function(t){var e=++i;return r(t)+e}},6163:(t,e,n)=>{var r=n(9670),i=n(599);t.exports=function(t){return null==t?[]:r(t,i(t))}},8437:(t,e,n)=>{var r=n(7140),i=n(2818);t.exports=function(t,e){return i(t||[],e||[],r)}},491:(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)}function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(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 s(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}function u(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 l(){l=function(t,e){return new n(t,void 0,e)};var t=RegExp.prototype,e=new WeakMap;function n(t,r,i){var o=new RegExp(t,r);return e.set(o,i||e.get(t)),f(o,n.prototype)}function i(t,n){var r=e.get(n);return Object.keys(r).reduce((function(e,n){return e[n]=t[r[n]],e}),Object.create(null))}return c(n,RegExp),n.prototype.exec=function(e){var n=t.exec.call(this,e);return n&&(n.groups=i(n,this)),n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var a=e.get(this);return t[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(t,e){return"$"+a[e]})))}if("function"==typeof o){var s=this;return t[Symbol.replace].call(this,n,(function(){var t=arguments;return"object"!=r(t[t.length-1])&&(t=[].slice.call(t)).push(i(t,s)),o.apply(this,t)}))}return t[Symbol.replace].call(this,n,o)},l.apply(this,arguments)}function c(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}n.r(e),n.d(e,{default:()=>d});var h=function(t,e){return e.some((function(e){return e instanceof RegExp?e.test(t):e===t}))};function d(t,e){if(e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0},e),t=t.trim(),/^data:/i.test(t))return function(t,e){var n=e.stripHash,r=l(/^data:((?:(?!,)[\s\S])*?),((?:(?!#)[\s\S])*?)(?:#(.*))?$/,{type:1,data:2,hash:3}).exec(t);if(!r)throw new Error("Invalid URL: ".concat(t));var i=r.groups,o=i.type,u=i.data,c=i.hash,f=o.split(";");c=n?"":c;var h=!1;"base64"===f[f.length-1]&&(f.pop(),h=!0);var d=(f.shift()||"").toLowerCase(),p=a(f.map((function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||s(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.")}()}(t.split("=").map((function(t){return t.trim()})),2),n=e[0],r=e[1],i=void 0===r?"":r;return"charset"===n&&"us-ascii"===(i=i.toLowerCase())?"":"".concat(n).concat(i?"=".concat(i):"")})).filter(Boolean));return h&&p.push("base64"),(p.length>0||d&&"text/plain"!==d)&&p.unshift(d),"data:".concat(p.join(";"),",").concat(h?u.trim():u).concat(c?"#".concat(c):"")}(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");var n=t.startsWith("//");!n&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));var r=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&"https:"===r.protocol&&(r.protocol="http:"),e.forceHttps&&"http:"===r.protocol&&(r.protocol="https:"),e.stripAuthentication&&(r.username="",r.password=""),e.stripHash?r.hash="":e.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,"")),r.pathname){for(var u=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,c=0,f="";;){var d=u.exec(r.pathname);if(!d)break;var p=d[0],g=d.index;f+=r.pathname.slice(c,g).replace(/\/{2,}/g,"/"),f+=p,c=g+p.length}f+=r.pathname.slice(c,r.pathname.length).replace(/\/{2,}/g,"/"),r.pathname=f}if(r.pathname)try{r.pathname=decodeURI(r.pathname)}catch(t){}if(!0===e.removeDirectoryIndex&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){var v=r.pathname.split("/"),m=v[v.length-1];h(m,e.removeDirectoryIndex)&&(v=v.slice(0,-1),r.pathname=v.slice(1).join("/")+"/")}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(var y=0,b=a(r.searchParams.keys());y<b.length;y++){var w=b[y];h(w,e.removeQueryParameters)&&r.searchParams.delete(w)}!0===e.removeQueryParameters&&(r.search=""),e.sortQueryParameters&&r.searchParams.sort(),e.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,""));var x=t;return t=r.toString(),e.removeSingleSlash||"/"!==r.pathname||x.endsWith("/")||""!==r.hash||(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||"/"===r.pathname)&&""===r.hash&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),n&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}},3230:(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=n(1591),o=n(4104);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,u={};function l(t,e){c(t,e),c(t+"Capture",e)}function c(t,e){for(u[t]=e,t=0;t<e.length;t++)s.add(e[t])}var f=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),h=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function v(t,e,n,r,i,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){m[t]=new v(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];m[e]=new v(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){m[t]=new v(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){m[t]=new v(t,2,!1,t,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){m[t]=new v(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){m[t]=new v(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){m[t]=new v(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){m[t]=new v(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){m[t]=new v(t,5,!1,t.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(t){return t[1].toUpperCase()}function w(t,e,n,i){var o=m.hasOwnProperty(e)?m[e]:null;(null!==o?0!==o.type:i||!(2<e.length)||"o"!==e[0]&&"O"!==e[0]||"n"!==e[1]&&"N"!==e[1])&&(function(t,e,n,i){if(null==e||function(t,e,n,i){if(null!==n&&0===n.type)return!1;switch(r(e)){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,o,i)&&(n=null),i||null===o?function(t){return!!h.call(g,t)||!h.call(p,t)&&(d.test(t)?g[t]=!0:(p[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):o.mustUseProperty?t[o.propertyName]=null===n?3!==o.type&&"":n:(e=o.attributeName,i=o.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(y,b);m[e]=new v(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(y,b);m[e]=new v(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(y,b);m[e]=new v(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){m[t]=new v(t,1,!1,t.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){m[t]=new v(t,1,!1,t.toLowerCase(),null,!0,!0)}));var x=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for("react.element"),k=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),C=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var F=Symbol.iterator;function D(t){return null===t||"object"!==r(t)?null:"function"==typeof(t=F&&t[F]||t["@@iterator"])?t:null}var j,I=Object.assign;function B(t){if(void 0===j)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);j=e&&e[1]||""}return"\n"+j+t}var z=!1;function V(t,e){if(!t||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var i=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){i=t}t.call(e.prototype)}else{try{throw Error()}catch(t){i=t}t()}}catch(e){if(e&&i&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),a=i.stack.split("\n"),s=o.length-1,u=a.length-1;1<=s&&0<=u&&o[s]!==a[u];)u--;for(;1<=s&&0<=u;s--,u--)if(o[s]!==a[u]){if(1!==s||1!==u)do{if(s--,0>--u||o[s]!==a[u]){var l="\n"+o[s].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}}while(1<=s&&0<=u);break}}}finally{z=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?B(t):""}function $(t){switch(t.tag){case 5:return B(t.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return V(t.type,!1);case 11:return V(t.type.render,!1);case 1:return V(t.type,!0);default:return""}}function U(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case _:return"Fragment";case k:return"Portal";case A:return"Profiler";case E:return"StrictMode";case N:return"Suspense";case L:return"SuspenseList"}if("object"===r(t))switch(t.$$typeof){case C:return(t.displayName||"Context")+".Consumer";case P:return(t._context.displayName||"Context")+".Provider";case T:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case M:return null!==(e=t.displayName||null)?e:U(t.type)||"Memo";case O:e=t._payload,t=t._init;try{return U(t(e))}catch(t){}}return null}function q(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=e.render).displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(e);case 8:return e===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e}return null}function H(t){switch(r(t)){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function G(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function W(t){t._valueTracker||(t._valueTracker=function(t){var e=G(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function Y(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=G(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function X(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Q(t,e){var n=e.checked;return I({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function K(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=H(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function J(t,e){null!=(e=e.checked)&&w(t,"checked",e,!1)}function Z(t,e){J(t,e);var n=H(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?et(t,e.type,n):e.hasOwnProperty("defaultValue")&&et(t,e.type,H(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function tt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function et(t,e,n){"number"===e&&X(t.ownerDocument)===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var nt=Array.isArray;function rt(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+H(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function it(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return I({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ot(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(nt(n)){if(1<n.length)throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:H(n)}}function at(t,e){var n=H(e.value),r=H(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function st(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}function ut(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function lt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?ut(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var ct,ft,ht=(ft=function(t,e){if("http://www.w3.org/2000/svg"!==t.namespaceURI||"innerHTML"in t)t.innerHTML=e;else{for((ct=ct||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=ct.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return ft(t,e)}))}:ft);function dt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var pt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gt=["Webkit","ms","Moz","O"];function vt(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||pt.hasOwnProperty(t)&&pt[t]?(""+e).trim():e+"px"}function mt(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=vt(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(pt).forEach((function(t){gt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),pt[e]=pt[t]}))}));var yt=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bt(t,e){if(e){if(yt[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if("object"!==r(e.dangerouslySetInnerHTML)||!("__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!==r(e.style))throw Error(a(62))}}function wt(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xt=null;function St(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var kt=null,_t=null,Et=null;function At(t){if(t=mi(t)){if("function"!=typeof kt)throw Error(a(280));var e=t.stateNode;e&&(e=bi(e),kt(t.stateNode,t.type,e))}}function Pt(t){_t?Et?Et.push(t):Et=[t]:_t=t}function Ct(){if(_t){var t=_t,e=Et;if(Et=_t=null,At(t),e)for(t=0;t<e.length;t++)At(e[t])}}function Tt(t,e){return t(e)}function Nt(){}var Lt=!1;function Mt(t,e,n){if(Lt)return t(e,n);Lt=!0;try{return Tt(t,e,n)}finally{Lt=!1,(null!==_t||null!==Et)&&(Nt(),Ct())}}function Ot(t,e){var n=t.stateNode;if(null===n)return null;var i=bi(n);if(null===i)return null;n=i[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!i;break t;default:t=!1}if(t)return null;if(n&&"function"!=typeof n)throw Error(a(231,e,r(n)));return n}var Rt=!1;if(f)try{var Ft={};Object.defineProperty(Ft,"passive",{get:function(){Rt=!0}}),window.addEventListener("test",Ft,Ft),window.removeEventListener("test",Ft,Ft)}catch(ft){Rt=!1}function Dt(t,e,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{e.apply(n,l)}catch(t){this.onError(t)}}var jt=!1,It=null,Bt=!1,zt=null,Vt={onError:function(t){jt=!0,It=t}};function $t(t,e,n,r,i,o,a,s,u){jt=!1,It=null,Dt.apply(Vt,arguments)}function Ut(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!=(4098&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function qt(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&null!==(t=t.alternate)&&(e=t.memoizedState),null!==e)return e.dehydrated}return null}function Ht(t){if(Ut(t)!==t)throw Error(a(188))}function Gt(t){return null!==(t=function(t){var e=t.alternate;if(!e){if(null===(e=Ut(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Ht(i),t;if(o===r)return Ht(i),e;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t))?Wt(t):null}function Wt(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var e=Wt(t);if(null!==e)return e;t=t.sibling}return null}var Yt=o.unstable_scheduleCallback,Xt=o.unstable_cancelCallback,Qt=o.unstable_shouldYield,Kt=o.unstable_requestPaint,Jt=o.unstable_now,Zt=o.unstable_getCurrentPriorityLevel,te=o.unstable_ImmediatePriority,ee=o.unstable_UserBlockingPriority,ne=o.unstable_NormalPriority,re=o.unstable_LowPriority,ie=o.unstable_IdlePriority,oe=null,ae=null,se=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(ue(t)/le|0)|0},ue=Math.log,le=Math.LN2,ce=64,fe=4194304;function he(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function de(t,e){var n=t.pendingLanes;if(0===n)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=he(s):0!=(o&=a)&&(r=he(o))}else 0!=(a=n&~i)?r=he(a):0!==o&&(r=he(o));if(0===r)return 0;if(0!==e&&e!==r&&0==(e&i)&&((i=r&-r)>=(o=e&-e)||16===i&&0!=(4194240&o)))return e;if(0!=(4&r)&&(r|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0<e;)i=1<<(n=31-se(e)),r|=t[n],e&=~i;return r}function pe(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:default:return-1}}function ge(t){return 0!=(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function ve(){var t=ce;return 0==(4194240&(ce<<=1))&&(ce=64),t}function me(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ye(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-se(e)]=n}function be(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-se(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var we=0;function xe(t){return 1<(t&=-t)?4<t?0!=(268435455&t)?16:536870912:4:1}var Se,ke,_e,Ee,Ae,Pe=!1,Ce=[],Te=null,Ne=null,Le=null,Me=new Map,Oe=new Map,Re=[],Fe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function De(t,e){switch(t){case"focusin":case"focusout":Te=null;break;case"dragenter":case"dragleave":Ne=null;break;case"mouseover":case"mouseout":Le=null;break;case"pointerover":case"pointerout":Me.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oe.delete(e.pointerId)}}function je(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==e&&null!==(e=mi(e))&&ke(e),t):(t.eventSystemFlags|=r,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i),t)}function Ie(t){var e=vi(t.target);if(null!==e){var n=Ut(e);if(null!==n)if(13===(e=n.tag)){if(null!==(e=qt(n)))return t.blockedOn=e,void Ae(t.priority,(function(){_e(n)}))}else if(3===e&&n.stateNode.current.memoizedState.isDehydrated)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function Be(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var n=Qe(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n)return null!==(e=mi(n))&&ke(e),t.blockedOn=n,!1;var r=new(n=t.nativeEvent).constructor(n.type,n);xt=r,n.target.dispatchEvent(r),xt=null,e.shift()}return!0}function ze(t,e,n){Be(t)&&n.delete(e)}function Ve(){Pe=!1,null!==Te&&Be(Te)&&(Te=null),null!==Ne&&Be(Ne)&&(Ne=null),null!==Le&&Be(Le)&&(Le=null),Me.forEach(ze),Oe.forEach(ze)}function $e(t,e){t.blockedOn===e&&(t.blockedOn=null,Pe||(Pe=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ve)))}function Ue(t){function e(e){return $e(e,t)}if(0<Ce.length){$e(Ce[0],t);for(var n=1;n<Ce.length;n++){var r=Ce[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==Te&&$e(Te,t),null!==Ne&&$e(Ne,t),null!==Le&&$e(Le,t),Me.forEach(e),Oe.forEach(e),n=0;n<Re.length;n++)(r=Re[n]).blockedOn===t&&(r.blockedOn=null);for(;0<Re.length&&null===(n=Re[0]).blockedOn;)Ie(n),null===n.blockedOn&&Re.shift()}var qe=x.ReactCurrentBatchConfig,He=!0;function Ge(t,e,n,r){var i=we,o=qe.transition;qe.transition=null;try{we=1,Ye(t,e,n,r)}finally{we=i,qe.transition=o}}function We(t,e,n,r){var i=we,o=qe.transition;qe.transition=null;try{we=4,Ye(t,e,n,r)}finally{we=i,qe.transition=o}}function Ye(t,e,n,r){if(He){var i=Qe(t,e,n,r);if(null===i)$r(t,e,r,Xe,n),De(t,r);else if(function(t,e,n,r,i){switch(e){case"focusin":return Te=je(Te,t,e,n,r,i),!0;case"dragenter":return Ne=je(Ne,t,e,n,r,i),!0;case"mouseover":return Le=je(Le,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return Me.set(o,je(Me.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Oe.set(o,je(Oe.get(o)||null,t,e,n,r,i)),!0}return!1}(i,t,e,n,r))r.stopPropagation();else if(De(t,r),4&e&&-1<Fe.indexOf(t)){for(;null!==i;){var o=mi(i);if(null!==o&&Se(o),null===(o=Qe(t,e,n,r))&&$r(t,e,r,Xe,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else $r(t,e,r,null,n)}}var Xe=null;function Qe(t,e,n,r){if(Xe=null,null!==(t=vi(t=St(r))))if(null===(e=Ut(t)))t=null;else if(13===(n=e.tag)){if(null!==(t=qt(e)))return t;t=null}else if(3===n){if(e.stateNode.current.memoizedState.isDehydrated)return 3===e.tag?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Xe=t,null}function Ke(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Zt()){case te:return 1;case ee:return 4;case ne:case re:return 16;case ie:return 536870912;default:return 16}default:return 16}}var Je=null,Ze=null,tn=null;function en(){if(tn)return tn;var t,e,n=Ze,r=n.length,i="value"in Je?Je.value:Je.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return tn=i.slice(t,1<e?1-e:void 0)}function nn(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function rn(){return!0}function on(){return!1}function an(t){function e(e,n,r,i,o){for(var a in this._reactName=e,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,t)t.hasOwnProperty(a)&&(e=t[a],this[a]=e?e(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rn:on,this.isPropagationStopped=on,this}return I(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),e}var sn,un,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=an(cn),hn=I({},cn,{view:0,detail:0}),dn=an(hn),pn=I({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ln&&(ln&&"mousemove"===t.type?(sn=t.screenX-ln.screenX,un=t.screenY-ln.screenY):un=sn=0,ln=t),sn)},movementY:function(t){return"movementY"in t?t.movementY:un}}),gn=an(pn),vn=an(I({},pn,{dataTransfer:0})),mn=an(I({},hn,{relatedTarget:0})),yn=an(I({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=an(I({},cn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),wn=an(I({},cn,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _n(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=kn[t])&&!!e[t]}function En(){return _n}var An=an(I({},hn,{key:function(t){if(t.key){var e=xn[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=nn(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?Sn[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(t){return"keypress"===t.type?nn(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?nn(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),Pn=an(I({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=an(I({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Tn=an(I({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=an(I({},pn,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=[9,13,27,32],Mn=f&&"CompositionEvent"in window,On=null;f&&"documentMode"in document&&(On=document.documentMode);var Rn=f&&"TextEvent"in window&&!On,Fn=f&&(!Mn||On&&8<On&&11>=On),Dn=String.fromCharCode(32),jn=!1;function In(t,e){switch(t){case"keyup":return-1!==Ln.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(t){return"object"===r(t=t.detail)&&"data"in t?t.data:null}var zn=!1,Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!Vn[t.type]:"textarea"===e}function Un(t,e,n,r){Pt(r),0<(e=qr(e,"onChange")).length&&(n=new fn("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var qn=null,Hn=null;function Gn(t){Dr(t,0)}function Wn(t){if(Y(yi(t)))return t}function Yn(t,e){if("change"===t)return e}var Xn=!1;if(f){var Qn;if(f){var Kn="oninput"in document;if(!Kn){var Jn=document.createElement("div");Jn.setAttribute("oninput","return;"),Kn="function"==typeof Jn.oninput}Qn=Kn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function Zn(){qn&&(qn.detachEvent("onpropertychange",tr),Hn=qn=null)}function tr(t){if("value"===t.propertyName&&Wn(Hn)){var e=[];Un(e,Hn,t,St(t)),Mt(Gn,e)}}function er(t,e,n){"focusin"===t?(Zn(),Hn=n,(qn=e).attachEvent("onpropertychange",tr)):"focusout"===t&&Zn()}function nr(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return Wn(Hn)}function rr(t,e){if("click"===t)return Wn(e)}function ir(t,e){if("input"===t||"change"===t)return Wn(e)}var or="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e};function ar(t,e){if(or(t,e))return!0;if("object"!==r(t)||null===t||"object"!==r(e)||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var o=n[i];if(!h.call(e,o)||!or(t[o],e[o]))return!1}return!0}function sr(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ur(t,e){var n,r=sr(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=sr(r)}}function lr(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?lr(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function cr(){for(var t=window,e=X();e instanceof t.HTMLIFrameElement;){try{var n="string"==typeof e.contentWindow.location.href}catch(t){n=!1}if(!n)break;e=X((t=e.contentWindow).document)}return e}function fr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}function hr(t){var e=cr(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&lr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(e=r.start,void 0===(t=r.end)&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if((t=(e=n.ownerDocument||document)&&e.defaultView||window).getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var a=ur(n,r);i&&a&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&((e=e.createRange()).setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}for(e=[],t=n;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<e.length;n++)(t=e[n]).element.scrollLeft=t.left,t.element.scrollTop=t.top}}var dr=f&&"documentMode"in document&&11>=document.documentMode,pr=null,gr=null,vr=null,mr=!1;function yr(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;mr||null==pr||pr!==X(r)||(r="selectionStart"in(r=pr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&ar(vr,r)||(vr=r,0<(r=qr(gr,"onSelect")).length&&(e=new fn("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=pr)))}function br(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var wr={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},xr={},Sr={};function kr(t){if(xr[t])return xr[t];if(!wr[t])return t;var e,n=wr[t];for(e in n)if(n.hasOwnProperty(e)&&e in Sr)return xr[t]=n[e];return t}f&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var _r=kr("animationend"),Er=kr("animationiteration"),Ar=kr("animationstart"),Pr=kr("transitionend"),Cr=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(t,e){Cr.set(t,e),l(e,[t])}for(var Lr=0;Lr<Tr.length;Lr++){var Mr=Tr[Lr];Nr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Nr(_r,"onAnimationEnd"),Nr(Er,"onAnimationIteration"),Nr(Ar,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(Pr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Fr(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,function(t,e,n,r,i,o,s,u,l){if($t.apply(this,arguments),jt){if(!jt)throw Error(a(198));var c=It;jt=!1,It=null,Bt||(Bt=!0,zt=c)}}(r,e,void 0,t),t.currentTarget=null}function Dr(t,e){e=0!=(4&e);for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;t:{var o=void 0;if(e)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break t;Fr(i,s,l),o=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,l=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break t;Fr(i,s,l),o=u}}}if(Bt)throw t=zt,Bt=!1,zt=null,t}function jr(t,e){var n=e[di];void 0===n&&(n=e[di]=new Set);var r=t+"__bubble";n.has(r)||(Vr(e,t,2,!1),n.add(r))}function Ir(t,e,n){var r=0;e&&(r|=4),Vr(n,t,r,e)}var Br="_reactListening"+Math.random().toString(36).slice(2);function zr(t){if(!t[Br]){t[Br]=!0,s.forEach((function(e){"selectionchange"!==e&&(Rr.has(e)||Ir(e,!1,t),Ir(e,!0,t))}));var e=9===t.nodeType?t:t.ownerDocument;null===e||e[Br]||(e[Br]=!0,Ir("selectionchange",!1,e))}}function Vr(t,e,n,r){switch(Ke(e)){case 1:var i=Ge;break;case 4:i=We;break;default:i=Ye}n=i.bind(null,e,n,t),i=void 0,!Rt||"touchstart"!==e&&"touchmove"!==e&&"wheel"!==e||(i=!0),r?void 0!==i?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):void 0!==i?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function $r(t,e,n,r,i){var o=r;if(0==(1&e)&&0==(2&e)&&null!==r)t:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=vi(s)))return;if(5===(u=a.tag)||6===u){r=o=a;continue t}s=s.parentNode}}r=r.return}Mt((function(){var r=o,i=St(n),a=[];t:{var s=Cr.get(t);if(void 0!==s){var u=fn,l=t;switch(t){case"keypress":if(0===nn(n))break t;case"keydown":case"keyup":u=An;break;case"focusin":l="focus",u=mn;break;case"focusout":l="blur",u=mn;break;case"beforeblur":case"afterblur":u=mn;break;case"click":if(2===n.button)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Cn;break;case _r:case Er:case Ar:u=yn;break;case Pr:u=Tn;break;case"scroll":u=dn;break;case"wheel":u=Nn;break;case"copy":case"cut":case"paste":u=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Pn}var c=0!=(4&e),f=!c&&"scroll"===t,h=c?null!==s?s+"Capture":null:s;c=[];for(var d,p=r;null!==p;){var g=(d=p).stateNode;if(5===d.tag&&null!==g&&(d=g,null!==h&&null!=(g=Ot(p,h))&&c.push(Ur(p,g,d))),f)break;p=p.return}0<c.length&&(s=new u(s,l,null,n,i),a.push({event:s,listeners:c}))}}if(0==(7&e)){if(u="mouseout"===t||"pointerout"===t,(!(s="mouseover"===t||"pointerover"===t)||n===xt||!(l=n.relatedTarget||n.fromElement)||!vi(l)&&!l[hi])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(l=(l=n.relatedTarget||n.toElement)?vi(l):null)&&(l!==(f=Ut(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(u=null,l=r),u!==l)){if(c=gn,g="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==t&&"pointerover"!==t||(c=Pn,g="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?s:yi(u),d=null==l?s:yi(l),(s=new c(g,p+"leave",u,n,i)).target=f,s.relatedTarget=d,g=null,vi(i)===r&&((c=new c(h,p+"enter",l,n,i)).target=d,c.relatedTarget=f,g=c),f=g,u&&l)t:{for(h=l,p=0,d=c=u;d;d=Hr(d))p++;for(d=0,g=h;g;g=Hr(g))d++;for(;0<p-d;)c=Hr(c),p--;for(;0<d-p;)h=Hr(h),d--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break t;c=Hr(c),h=Hr(h)}c=null}else c=null;null!==u&&Gr(a,s,u,c,!1),null!==l&&null!==f&&Gr(a,f,l,c,!0)}if("select"===(u=(s=r?yi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var v=Yn;else if($n(s))if(Xn)v=ir;else{v=nr;var m=er}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=rr);switch(v&&(v=v(t,r))?Un(a,v,n,i):(m&&m(t,s,r),"focusout"===t&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&et(s,"number",s.value)),m=r?yi(r):window,t){case"focusin":($n(m)||"true"===m.contentEditable)&&(pr=m,gr=r,vr=null);break;case"focusout":vr=gr=pr=null;break;case"mousedown":mr=!0;break;case"contextmenu":case"mouseup":case"dragend":mr=!1,yr(a,n,i);break;case"selectionchange":if(dr)break;case"keydown":case"keyup":yr(a,n,i)}var y;if(Mn)t:{switch(t){case"compositionstart":var b="onCompositionStart";break t;case"compositionend":b="onCompositionEnd";break t;case"compositionupdate":b="onCompositionUpdate";break t}b=void 0}else zn?In(t,n)&&(b="onCompositionEnd"):"keydown"===t&&229===n.keyCode&&(b="onCompositionStart");b&&(Fn&&"ko"!==n.locale&&(zn||"onCompositionStart"!==b?"onCompositionEnd"===b&&zn&&(y=en()):(Ze="value"in(Je=i)?Je.value:Je.textContent,zn=!0)),0<(m=qr(r,b)).length&&(b=new wn(b,t,null,n,i),a.push({event:b,listeners:m}),(y||null!==(y=Bn(n)))&&(b.data=y))),(y=Rn?function(t,e){switch(t){case"compositionend":return Bn(e);case"keypress":return 32!==e.which?null:(jn=!0,Dn);case"textInput":return(t=e.data)===Dn&&jn?null:t;default:return null}}(t,n):function(t,e){if(zn)return"compositionend"===t||!Mn&&In(t,e)?(t=en(),tn=Ze=Je=null,zn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Fn&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))&&0<(r=qr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y)}Dr(a,e)}))}function Ur(t,e,n){return{instance:t,listener:e,currentTarget:n}}function qr(t,e){for(var n=e+"Capture",r=[];null!==t;){var i=t,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ot(t,n))&&r.unshift(Ur(t,o,i)),null!=(o=Ot(t,e))&&r.push(Ur(t,o,i))),t=t.return}return r}function Hr(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Gr(t,e,n,r,i){for(var o=e._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==l&&(s=l,i?null!=(u=Ot(n,o))&&a.unshift(Ur(n,u,s)):i||null!=(u=Ot(n,o))&&a.push(Ur(n,u,s))),n=n.return}0!==a.length&&t.push({event:e,listeners:a})}var Wr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Xr(t){return("string"==typeof t?t:""+t).replace(Wr,"\n").replace(Yr,"")}function Qr(t,e,n){if(e=Xr(e),Xr(t)!==e&&n)throw Error(a(425))}function Kr(){}var Jr=null,Zr=null;function ti(t,e){return"textarea"===t||"noscript"===t||"string"==typeof e.children||"number"==typeof e.children||"object"===r(e.dangerouslySetInnerHTML)&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var ei="function"==typeof setTimeout?setTimeout:void 0,ni="function"==typeof clearTimeout?clearTimeout:void 0,ri="function"==typeof Promise?Promise:void 0,ii="function"==typeof queueMicrotask?queueMicrotask:void 0!==ri?function(t){return ri.resolve(null).then(t).catch(oi)}:ei;function oi(t){setTimeout((function(){throw t}))}function ai(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return t.removeChild(i),void Ue(e);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ue(e)}function si(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break;if(8===e){if("$"===(e=t.data)||"$!"===e||"$?"===e)break;if("/$"===e)return null}}return t}function ui(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var li=Math.random().toString(36).slice(2),ci="__reactFiber$"+li,fi="__reactProps$"+li,hi="__reactContainer$"+li,di="__reactEvents$"+li,pi="__reactListeners$"+li,gi="__reactHandles$"+li;function vi(t){var e=t[ci];if(e)return e;for(var n=t.parentNode;n;){if(e=n[hi]||n[ci]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=ui(t);null!==t;){if(n=t[ci])return n;t=ui(t)}return e}n=(t=n).parentNode}return null}function mi(t){return!(t=t[ci]||t[hi])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function yi(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function bi(t){return t[fi]||null}var wi=[],xi=-1;function Si(t){return{current:t}}function ki(t){0>xi||(t.current=wi[xi],wi[xi]=null,xi--)}function _i(t,e){xi++,wi[xi]=t.current,t.current=e}var Ei={},Ai=Si(Ei),Pi=Si(!1),Ci=Ei;function Ti(t,e){var n=t.type.contextTypes;if(!n)return Ei;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Ni(t){return null!=t.childContextTypes}function Li(){ki(Pi),ki(Ai)}function Mi(t,e,n){if(Ai.current!==Ei)throw Error(a(168));_i(Ai,e),_i(Pi,n)}function Oi(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,q(t)||"Unknown",i));return I({},n,r)}function Ri(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ei,Ci=Ai.current,_i(Ai,t),_i(Pi,Pi.current),!0}function Fi(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=Oi(t,e,Ci),r.__reactInternalMemoizedMergedChildContext=t,ki(Pi),ki(Ai),_i(Ai,t)):ki(Pi),_i(Pi,n)}var Di=null,ji=!1,Ii=!1;function Bi(t){null===Di?Di=[t]:Di.push(t)}function zi(){if(!Ii&&null!==Di){Ii=!0;var t=0,e=we;try{var n=Di;for(we=1;t<n.length;t++){var r=n[t];do{r=r(!0)}while(null!==r)}Di=null,ji=!1}catch(e){throw null!==Di&&(Di=Di.slice(t+1)),Yt(te,zi),e}finally{we=e,Ii=!1}}return null}var Vi=[],$i=0,Ui=null,qi=0,Hi=[],Gi=0,Wi=null,Yi=1,Xi="";function Qi(t,e){Vi[$i++]=qi,Vi[$i++]=Ui,Ui=t,qi=e}function Ki(t,e,n){Hi[Gi++]=Yi,Hi[Gi++]=Xi,Hi[Gi++]=Wi,Wi=t;var r=Yi;t=Xi;var i=32-se(r)-1;r&=~(1<<i),n+=1;var o=32-se(e)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Yi=1<<32-se(e)+i|n<<i|r,Xi=o+t}else Yi=1<<o|n<<i|r,Xi=t}function Ji(t){null!==t.return&&(Qi(t,1),Ki(t,1,0))}function Zi(t){for(;t===Ui;)Ui=Vi[--$i],Vi[$i]=null,qi=Vi[--$i],Vi[$i]=null;for(;t===Wi;)Wi=Hi[--Gi],Hi[Gi]=null,Xi=Hi[--Gi],Hi[Gi]=null,Yi=Hi[--Gi],Hi[Gi]=null}var to=null,eo=null,no=!1,ro=null;function io(t,e){var n=Tl(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,null===(e=t.deletions)?(t.deletions=[n],t.flags|=16):e.push(n)}function oo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,to=t,eo=si(e.firstChild),!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,to=t,eo=null,!0);case 13:return null!==(e=8!==e.nodeType?null:e)&&(n=null!==Wi?{id:Yi,overflow:Xi}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},(n=Tl(18,null,null,0)).stateNode=e,n.return=t,t.child=n,to=t,eo=null,!0);default:return!1}}function ao(t){return 0!=(1&t.mode)&&0==(128&t.flags)}function so(t){if(no){var e=eo;if(e){var n=e;if(!oo(t,e)){if(ao(t))throw Error(a(418));e=si(n.nextSibling);var r=to;e&&oo(t,e)?io(r,n):(t.flags=-4097&t.flags|2,no=!1,to=t)}}else{if(ao(t))throw Error(a(418));t.flags=-4097&t.flags|2,no=!1,to=t}}}function uo(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;to=t}function lo(t){if(t!==to)return!1;if(!no)return uo(t),no=!0,!1;var e;if((e=3!==t.tag)&&!(e=5!==t.tag)&&(e="head"!==(e=t.type)&&"body"!==e&&!ti(t.type,t.memoizedProps)),e&&(e=eo)){if(ao(t))throw co(),Error(a(418));for(;e;)io(t,e),e=si(e.nextSibling)}if(uo(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){eo=si(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}eo=null}}else eo=to?si(t.stateNode.nextSibling):null;return!0}function co(){for(var t=eo;t;)t=si(t.nextSibling)}function fo(){eo=to=null,no=!1}function ho(t){null===ro?ro=[t]:ro.push(t)}var po=x.ReactCurrentBatchConfig;function go(t,e){if(t&&t.defaultProps){for(var n in e=I({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}var vo=Si(null),mo=null,yo=null,bo=null;function wo(){bo=yo=mo=null}function xo(t){var e=vo.current;ki(vo),t._currentValue=e}function So(t,e,n){for(;null!==t;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,null!==r&&(r.childLanes|=e)):null!==r&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ko(t,e){mo=t,bo=yo=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&e)&&(ys=!0),t.firstContext=null)}function _o(t){var e=t._currentValue;if(bo!==t)if(t={context:t,memoizedValue:e,next:null},null===yo){if(null===mo)throw Error(a(308));yo=t,mo.dependencies={lanes:0,firstContext:t}}else yo=yo.next=t;return e}var Eo=null;function Ao(t){null===Eo?Eo=[t]:Eo.push(t)}function Po(t,e,n,r){var i=e.interleaved;return null===i?(n.next=n,Ao(e)):(n.next=i.next,i.next=n),e.interleaved=n,Co(t,r)}function Co(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}var To=!1;function No(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lo(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Mo(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Oo(t,e,n){var r=t.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Au)){var i=r.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Co(t,n)}return null===(i=r.interleaved)?(e.next=e,Ao(r)):(e.next=i.next,i.next=e),r.interleaved=e,Co(t,n)}function Ro(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,0!=(4194240&n))){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,be(t,n)}}function Fo(t,e){var n=t.updateQueue,r=t.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=e:o=o.next=e}else i=o=e;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Do(t,e,n,r){var i=t.updateQueue;To=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,l=u.next;u.next=null,null===a?o=l:a.next=l,a=u;var c=t.alternate;null!==c&&(s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u)}if(null!==o){var f=i.baseState;for(a=0,c=l=u=null,s=o;;){var h=s.lane,d=s.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});t:{var p=t,g=s;switch(h=e,d=n,g.tag){case 1:if("function"==typeof(p=g.payload)){f=p.call(d,f,h);break t}f=p;break t;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=g.payload)?p.call(d,f,h):p))break t;f=I({},f,h);break t;case 2:To=!0}}null!==s.callback&&0!==s.lane&&(t.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(l=c=d,u=f):c=c.next=d,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===c&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,null!==(e=i.shared.interleaved)){i=e;do{a|=i.lane,i=i.next}while(i!==e)}else null===o&&(i.shared.lanes=0);Ru|=a,t.lanes=a,t.memoizedState=f}}function jo(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Io=(new i.Component).refs;function Bo(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:I({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var zo={isMounted:function(t){return!!(t=t._reactInternals)&&Ut(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Ju(),i=Zu(t),o=Mo(r,i);o.payload=e,null!=n&&(o.callback=n),null!==(e=Oo(t,o,i))&&(tl(e,t,i,r),Ro(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Ju(),i=Zu(t),o=Mo(r,i);o.tag=1,o.payload=e,null!=n&&(o.callback=n),null!==(e=Oo(t,o,i))&&(tl(e,t,i,r),Ro(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Ju(),r=Zu(t),i=Mo(n,r);i.tag=2,null!=e&&(i.callback=e),null!==(e=Oo(t,i,r))&&(tl(e,t,r,n),Ro(e,t,r))}};function Vo(t,e,n,r,i,o,a){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!(e.prototype&&e.prototype.isPureReactComponent&&ar(n,r)&&ar(i,o))}function $o(t,e,n){var i=!1,o=Ei,a=e.contextType;return"object"===r(a)&&null!==a?a=_o(a):(o=Ni(e)?Ci:Ai.current,a=(i=null!=(i=e.contextTypes))?Ti(t,o):Ei),e=new e(n,a),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=zo,t.stateNode=e,e._reactInternals=t,i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,t.__reactInternalMemoizedMaskedChildContext=a),e}function Uo(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&zo.enqueueReplaceState(e,e.state,null)}function qo(t,e,n,i){var o=t.stateNode;o.props=n,o.state=t.memoizedState,o.refs=Io,No(t);var a=e.contextType;"object"===r(a)&&null!==a?o.context=_o(a):(a=Ni(e)?Ci:Ai.current,o.context=Ti(t,a)),o.state=t.memoizedState,"function"==typeof(a=e.getDerivedStateFromProps)&&(Bo(t,e,a,n),o.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(e=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),e!==o.state&&zo.enqueueReplaceState(o,o.state,null),Do(t,n,o,i),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308)}function Ho(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!==r(t)){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var i=n.stateNode}if(!i)throw Error(a(147,t));var o=i,s=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===s?e.ref:((e=function(t){var e=o.refs;e===Io&&(e=o.refs={}),null===t?delete e[s]:e[s]=t})._stringRef=s,e)}if("string"!=typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function Go(t,e){throw t=Object.prototype.toString.call(e),Error(a(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Wo(t){return(0,t._init)(t._payload)}function Yo(t){function e(e,n){if(t){var r=e.deletions;null===r?(e.deletions=[n],e.flags|=16):r.push(n)}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function i(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function o(t,e){return(t=Ll(t,e)).index=0,t.sibling=null,t}function s(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.flags|=2,n):r:(e.flags|=2,n):(e.flags|=1048576,n)}function u(e){return t&&null===e.alternate&&(e.flags|=2),e}function l(t,e,n,r){return null===e||6!==e.tag?((e=Fl(n,t.mode,r)).return=t,e):((e=o(e,n)).return=t,e)}function c(t,e,n,i){var a=n.type;return a===_?h(t,e,n.props.children,i,n.key):null!==e&&(e.elementType===a||"object"===r(a)&&null!==a&&a.$$typeof===O&&Wo(a)===e.type)?((i=o(e,n.props)).ref=Ho(t,e,n),i.return=t,i):((i=Ml(n.type,n.key,n.props,null,t.mode,i)).ref=Ho(t,e,n),i.return=t,i)}function f(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Dl(n,t.mode,r)).return=t,e):((e=o(e,n.children||[])).return=t,e)}function h(t,e,n,r,i){return null===e||7!==e.tag?((e=Ol(n,t.mode,r,i)).return=t,e):((e=o(e,n)).return=t,e)}function d(t,e,n){if("string"==typeof e&&""!==e||"number"==typeof e)return(e=Fl(""+e,t.mode,n)).return=t,e;if("object"===r(e)&&null!==e){switch(e.$$typeof){case S:return(n=Ml(e.type,e.key,e.props,null,t.mode,n)).ref=Ho(t,null,e),n.return=t,n;case k:return(e=Dl(e,t.mode,n)).return=t,e;case O:return d(t,(0,e._init)(e._payload),n)}if(nt(e)||D(e))return(e=Ol(e,t.mode,n,null)).return=t,e;Go(t,e)}return null}function p(t,e,n,i){var o=null!==e?e.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:l(t,e,""+n,i);if("object"===r(n)&&null!==n){switch(n.$$typeof){case S:return n.key===o?c(t,e,n,i):null;case k:return n.key===o?f(t,e,n,i):null;case O:return p(t,e,(o=n._init)(n._payload),i)}if(nt(n)||D(n))return null!==o?null:h(t,e,n,i,null);Go(t,n)}return null}function g(t,e,n,i,o){if("string"==typeof i&&""!==i||"number"==typeof i)return l(e,t=t.get(n)||null,""+i,o);if("object"===r(i)&&null!==i){switch(i.$$typeof){case S:return c(e,t=t.get(null===i.key?n:i.key)||null,i,o);case k:return f(e,t=t.get(null===i.key?n:i.key)||null,i,o);case O:return g(t,e,n,(0,i._init)(i._payload),o)}if(nt(i)||D(i))return h(e,t=t.get(n)||null,i,o,null);Go(e,i)}return null}function v(r,o,a,u){for(var l=null,c=null,f=o,h=o=0,v=null;null!==f&&h<a.length;h++){f.index>h?(v=f,f=null):v=f.sibling;var m=p(r,f,a[h],u);if(null===m){null===f&&(f=v);break}t&&f&&null===m.alternate&&e(r,f),o=s(m,o,h),null===c?l=m:c.sibling=m,c=m,f=v}if(h===a.length)return n(r,f),no&&Qi(r,h),l;if(null===f){for(;h<a.length;h++)null!==(f=d(r,a[h],u))&&(o=s(f,o,h),null===c?l=f:c.sibling=f,c=f);return no&&Qi(r,h),l}for(f=i(r,f);h<a.length;h++)null!==(v=g(f,r,h,a[h],u))&&(t&&null!==v.alternate&&f.delete(null===v.key?h:v.key),o=s(v,o,h),null===c?l=v:c.sibling=v,c=v);return t&&f.forEach((function(t){return e(r,t)})),no&&Qi(r,h),l}function m(r,o,u,l){var c=D(u);if("function"!=typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var f=c=null,h=o,v=o=0,m=null,y=u.next();null!==h&&!y.done;v++,y=u.next()){h.index>v?(m=h,h=null):m=h.sibling;var b=p(r,h,y.value,l);if(null===b){null===h&&(h=m);break}t&&h&&null===b.alternate&&e(r,h),o=s(b,o,v),null===f?c=b:f.sibling=b,f=b,h=m}if(y.done)return n(r,h),no&&Qi(r,v),c;if(null===h){for(;!y.done;v++,y=u.next())null!==(y=d(r,y.value,l))&&(o=s(y,o,v),null===f?c=y:f.sibling=y,f=y);return no&&Qi(r,v),c}for(h=i(r,h);!y.done;v++,y=u.next())null!==(y=g(h,r,v,y.value,l))&&(t&&null!==y.alternate&&h.delete(null===y.key?v:y.key),o=s(y,o,v),null===f?c=y:f.sibling=y,f=y);return t&&h.forEach((function(t){return e(r,t)})),no&&Qi(r,v),c}return function t(i,a,s,l){if("object"===r(s)&&null!==s&&s.type===_&&null===s.key&&(s=s.props.children),"object"===r(s)&&null!==s){switch(s.$$typeof){case S:t:{for(var c=s.key,f=a;null!==f;){if(f.key===c){if((c=s.type)===_){if(7===f.tag){n(i,f.sibling),(a=o(f,s.props.children)).return=i,i=a;break t}}else if(f.elementType===c||"object"===r(c)&&null!==c&&c.$$typeof===O&&Wo(c)===f.type){n(i,f.sibling),(a=o(f,s.props)).ref=Ho(i,f,s),a.return=i,i=a;break t}n(i,f);break}e(i,f),f=f.sibling}s.type===_?((a=Ol(s.props.children,i.mode,l,s.key)).return=i,i=a):((l=Ml(s.type,s.key,s.props,null,i.mode,l)).ref=Ho(i,a,s),l.return=i,i=l)}return u(i);case k:t:{for(f=s.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(i,a.sibling),(a=o(a,s.children||[])).return=i,i=a;break t}n(i,a);break}e(i,a),a=a.sibling}(a=Dl(s,i.mode,l)).return=i,i=a}return u(i);case O:return t(i,a,(f=s._init)(s._payload),l)}if(nt(s))return v(i,a,s,l);if(D(s))return m(i,a,s,l);Go(i,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(i,a.sibling),(a=o(a,s)).return=i,i=a):(n(i,a),(a=Fl(s,i.mode,l)).return=i,i=a),u(i)):n(i,a)}}var Xo=Yo(!0),Qo=Yo(!1),Ko={},Jo=Si(Ko),Zo=Si(Ko),ta=Si(Ko);function ea(t){if(t===Ko)throw Error(a(174));return t}function na(t,e){switch(_i(ta,e),_i(Zo,t),_i(Jo,Ko),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:lt(null,"");break;default:e=lt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}ki(Jo),_i(Jo,e)}function ra(){ki(Jo),ki(Zo),ki(ta)}function ia(t){ea(ta.current);var e=ea(Jo.current),n=lt(e,t.type);e!==n&&(_i(Zo,t),_i(Jo,n))}function oa(t){Zo.current===t&&(ki(Jo),ki(Zo))}var aa=Si(0);function sa(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ua=[];function la(){for(var t=0;t<ua.length;t++)ua[t]._workInProgressVersionPrimary=null;ua.length=0}var ca=x.ReactCurrentDispatcher,fa=x.ReactCurrentBatchConfig,ha=0,da=null,pa=null,ga=null,va=!1,ma=!1,ya=0,ba=0;function wa(){throw Error(a(321))}function xa(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!or(t[n],e[n]))return!1;return!0}function Sa(t,e,n,r,i,o){if(ha=o,da=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ca.current=null===t||null===t.memoizedState?os:as,t=n(r,i),ma){o=0;do{if(ma=!1,ya=0,25<=o)throw Error(a(301));o+=1,ga=pa=null,e.updateQueue=null,ca.current=ss,t=n(r,i)}while(ma)}if(ca.current=is,e=null!==pa&&null!==pa.next,ha=0,ga=pa=da=null,va=!1,e)throw Error(a(300));return t}function ka(){var t=0!==ya;return ya=0,t}function _a(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ga?da.memoizedState=ga=t:ga=ga.next=t,ga}function Ea(){if(null===pa){var t=da.alternate;t=null!==t?t.memoizedState:null}else t=pa.next;var e=null===ga?da.memoizedState:ga.next;if(null!==e)ga=e,pa=t;else{if(null===t)throw Error(a(310));t={memoizedState:(pa=t).memoizedState,baseState:pa.baseState,baseQueue:pa.baseQueue,queue:pa.queue,next:null},null===ga?da.memoizedState=ga=t:ga=ga.next=t}return ga}function Aa(t,e){return"function"==typeof e?e(t):e}function Pa(t){var e=Ea(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=pa,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var u=s=null,l=null,c=o;do{var f=c.lane;if((ha&f)===f)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(u=l=h,s=r):l=l.next=h,da.lanes|=f,Ru|=f}c=c.next}while(null!==c&&c!==o);null===l?s=r:l.next=u,or(r,e.memoizedState)||(ys=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=l,n.lastRenderedState=r}if(null!==(t=n.interleaved)){i=t;do{o=i.lane,da.lanes|=o,Ru|=o,i=i.next}while(i!==t)}else null===i&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Ca(t){var e=Ea(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);or(o,e.memoizedState)||(ys=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function Ta(){}function Na(t,e){var n=da,r=Ea(),i=e(),o=!or(r.memoizedState,i);if(o&&(r.memoizedState=i,ys=!0),r=r.queue,$a(Oa.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||null!==ga&&1&ga.memoizedState.tag){if(n.flags|=2048,ja(9,Ma.bind(null,n,r,i,e),void 0,null),null===Pu)throw Error(a(349));0!=(30&ha)||La(n,e,i)}return i}function La(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=da.updateQueue)?(e={lastEffect:null,stores:null},da.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function Ma(t,e,n,r){e.value=n,e.getSnapshot=r,Ra(e)&&Fa(t)}function Oa(t,e,n){return n((function(){Ra(e)&&Fa(t)}))}function Ra(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!or(t,n)}catch(t){return!0}}function Fa(t){var e=Co(t,1);null!==e&&tl(e,t,1,-1)}function Da(t){var e=_a();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Aa,lastRenderedState:t},e.queue=t,t=t.dispatch=ts.bind(null,da,t),[e.memoizedState,t]}function ja(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=da.updateQueue)?(e={lastEffect:null,stores:null},da.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function Ia(){return Ea().memoizedState}function Ba(t,e,n,r){var i=_a();da.flags|=t,i.memoizedState=ja(1|e,n,void 0,void 0===r?null:r)}function za(t,e,n,r){var i=Ea();r=void 0===r?null:r;var o=void 0;if(null!==pa){var a=pa.memoizedState;if(o=a.destroy,null!==r&&xa(r,a.deps))return void(i.memoizedState=ja(e,n,o,r))}da.flags|=t,i.memoizedState=ja(1|e,n,o,r)}function Va(t,e){return Ba(8390656,8,t,e)}function $a(t,e){return za(2048,8,t,e)}function Ua(t,e){return za(4,2,t,e)}function qa(t,e){return za(4,4,t,e)}function Ha(t,e){return"function"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Ga(t,e,n){return n=null!=n?n.concat([t]):null,za(4,4,Ha.bind(null,e,t),n)}function Wa(){}function Ya(t,e){var n=Ea();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&xa(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Xa(t,e){var n=Ea();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&xa(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Qa(t,e,n){return 0==(21&ha)?(t.baseState&&(t.baseState=!1,ys=!0),t.memoizedState=n):(or(n,e)||(n=ve(),da.lanes|=n,Ru|=n,t.baseState=!0),e)}function Ka(t,e){var n=we;we=0!==n&&4>n?n:4,t(!0);var r=fa.transition;fa.transition={};try{t(!1),e()}finally{we=n,fa.transition=r}}function Ja(){return Ea().memoizedState}function Za(t,e,n){var r=Zu(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},es(t)?ns(e,n):null!==(n=Po(t,e,n,r))&&(tl(n,t,r,Ju()),rs(n,e,r))}function ts(t,e,n){var r=Zu(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(es(t))ns(e,i);else{var o=t.alternate;if(0===t.lanes&&(null===o||0===o.lanes)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,or(s,a)){var u=e.interleaved;return null===u?(i.next=i,Ao(e)):(i.next=u.next,u.next=i),void(e.interleaved=i)}}catch(t){}null!==(n=Po(t,e,i,r))&&(tl(n,t,r,i=Ju()),rs(n,e,r))}}function es(t){var e=t.alternate;return t===da||null!==e&&e===da}function ns(t,e){ma=va=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function rs(t,e,n){if(0!=(4194240&n)){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,be(t,n)}}var is={readContext:_o,useCallback:wa,useContext:wa,useEffect:wa,useImperativeHandle:wa,useInsertionEffect:wa,useLayoutEffect:wa,useMemo:wa,useReducer:wa,useRef:wa,useState:wa,useDebugValue:wa,useDeferredValue:wa,useTransition:wa,useMutableSource:wa,useSyncExternalStore:wa,useId:wa,unstable_isNewReconciler:!1},os={readContext:_o,useCallback:function(t,e){return _a().memoizedState=[t,void 0===e?null:e],t},useContext:_o,useEffect:Va,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,Ba(4194308,4,Ha.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ba(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ba(4,2,t,e)},useMemo:function(t,e){var n=_a();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=_a();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Za.bind(null,da,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},_a().memoizedState=t},useState:Da,useDebugValue:Wa,useDeferredValue:function(t){return _a().memoizedState=t},useTransition:function(){var t=Da(!1),e=t[0];return t=Ka.bind(null,t[1]),_a().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=da,i=_a();if(no){if(void 0===n)throw Error(a(407));n=n()}else{if(n=e(),null===Pu)throw Error(a(349));0!=(30&ha)||La(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,Va(Oa.bind(null,r,o,t),[t]),r.flags|=2048,ja(9,Ma.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=_a(),e=Pu.identifierPrefix;if(no){var n=Xi;e=":"+e+"R"+(n=(Yi&~(1<<32-se(Yi)-1)).toString(32)+n),0<(n=ya++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=ba++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},as={readContext:_o,useCallback:Ya,useContext:_o,useEffect:$a,useImperativeHandle:Ga,useInsertionEffect:Ua,useLayoutEffect:qa,useMemo:Xa,useReducer:Pa,useRef:Ia,useState:function(){return Pa(Aa)},useDebugValue:Wa,useDeferredValue:function(t){return Qa(Ea(),pa.memoizedState,t)},useTransition:function(){return[Pa(Aa)[0],Ea().memoizedState]},useMutableSource:Ta,useSyncExternalStore:Na,useId:Ja,unstable_isNewReconciler:!1},ss={readContext:_o,useCallback:Ya,useContext:_o,useEffect:$a,useImperativeHandle:Ga,useInsertionEffect:Ua,useLayoutEffect:qa,useMemo:Xa,useReducer:Ca,useRef:Ia,useState:function(){return Ca(Aa)},useDebugValue:Wa,useDeferredValue:function(t){var e=Ea();return null===pa?e.memoizedState=t:Qa(e,pa.memoizedState,t)},useTransition:function(){return[Ca(Aa)[0],Ea().memoizedState]},useMutableSource:Ta,useSyncExternalStore:Na,useId:Ja,unstable_isNewReconciler:!1};function us(t,e){try{var n="",r=e;do{n+=$(r),r=r.return}while(r);var i=n}catch(t){i="\nError generating stack: "+t.message+"\n"+t.stack}return{value:t,source:e,stack:i,digest:null}}function ls(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}function cs(t,e){try{console.error(e.value)}catch(t){setTimeout((function(){throw t}))}}var fs="function"==typeof WeakMap?WeakMap:Map;function hs(t,e,n){(n=Mo(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){$u||($u=!0,Uu=r),cs(0,e)},n}function ds(t,e,n){(n=Mo(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){cs(0,e)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){cs(0,e),"function"!=typeof r&&(null===qu?qu=new Set([this]):qu.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function ps(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new fs;var i=new Set;r.set(e,i)}else void 0===(i=r.get(e))&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=kl.bind(null,t,e,n),e.then(t,t))}function gs(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function vs(t,e,n,r,i){return 0==(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=Mo(-1,1)).tag=2,Oo(n,e,1))),n.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}var ms=x.ReactCurrentOwner,ys=!1;function bs(t,e,n,r){e.child=null===t?Qo(e,null,n,r):Xo(e,t.child,n,r)}function ws(t,e,n,r,i){n=n.render;var o=e.ref;return ko(e,i),r=Sa(t,e,n,r,o,i),n=ka(),null===t||ys?(no&&n&&Ji(e),e.flags|=1,bs(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,$s(t,e,i))}function xs(t,e,n,r,i){if(null===t){var o=n.type;return"function"!=typeof o||Nl(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Ml(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=o,Ss(t,e,o,r,i))}if(o=t.child,0==(t.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:ar)(a,r)&&t.ref===e.ref)return $s(t,e,i)}return e.flags|=1,(t=Ll(o,r)).ref=e.ref,t.return=e,e.child=t}function Ss(t,e,n,r,i){if(null!==t){var o=t.memoizedProps;if(ar(o,r)&&t.ref===e.ref){if(ys=!1,e.pendingProps=r=o,0==(t.lanes&i))return e.lanes=t.lanes,$s(t,e,i);0!=(131072&t.flags)&&(ys=!0)}}return Es(t,e,n,r,i)}function ks(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode)if(0==(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},_i(Lu,Nu),Nu|=n;else{if(0==(1073741824&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,_i(Lu,Nu),Nu|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,_i(Lu,Nu),Nu|=r}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,_i(Lu,Nu),Nu|=r;return bs(t,e,i,n),e.child}function _s(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Es(t,e,n,r,i){var o=Ni(n)?Ci:Ai.current;return o=Ti(e,o),ko(e,i),n=Sa(t,e,n,r,o,i),r=ka(),null===t||ys?(no&&r&&Ji(e),e.flags|=1,bs(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,$s(t,e,i))}function As(t,e,n,i,o){if(Ni(n)){var a=!0;Ri(e)}else a=!1;if(ko(e,o),null===e.stateNode)Vs(t,e),$o(e,n,i),qo(e,n,i,o),i=!0;else if(null===t){var s=e.stateNode,u=e.memoizedProps;s.props=u;var l=s.context,c=n.contextType;c="object"===r(c)&&null!==c?_o(c):Ti(e,c=Ni(n)?Ci:Ai.current);var f=n.getDerivedStateFromProps,h="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(u!==i||l!==c)&&Uo(e,s,i,c),To=!1;var d=e.memoizedState;s.state=d,Do(e,i,s,o),l=e.memoizedState,u!==i||d!==l||Pi.current||To?("function"==typeof f&&(Bo(e,n,f,i),l=e.memoizedState),(u=To||Vo(e,n,u,i,d,l,c))?(h||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(e.flags|=4194308)):("function"==typeof s.componentDidMount&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),s.props=i,s.state=l,s.context=c,i=u):("function"==typeof s.componentDidMount&&(e.flags|=4194308),i=!1)}else{s=e.stateNode,Lo(t,e),u=e.memoizedProps,c=e.type===e.elementType?u:go(e.type,u),s.props=c,h=e.pendingProps,d=s.context,l="object"===r(l=n.contextType)&&null!==l?_o(l):Ti(e,l=Ni(n)?Ci:Ai.current);var p=n.getDerivedStateFromProps;(f="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(u!==h||d!==l)&&Uo(e,s,i,l),To=!1,d=e.memoizedState,s.state=d,Do(e,i,s,o);var g=e.memoizedState;u!==h||d!==g||Pi.current||To?("function"==typeof p&&(Bo(e,n,p,i),g=e.memoizedState),(c=To||Vo(e,n,c,i,d,g,l)||!1)?(f||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(i,g,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(i,g,l)),"function"==typeof s.componentDidUpdate&&(e.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof s.componentDidUpdate||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=g),s.props=i,s.state=g,s.context=l,i=c):("function"!=typeof s.componentDidUpdate||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),i=!1)}return Ps(t,e,n,i,a,o)}function Ps(t,e,n,r,i,o){_s(t,e);var a=0!=(128&e.flags);if(!r&&!a)return i&&Fi(e,n,!1),$s(t,e,o);r=e.stateNode,ms.current=e;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=Xo(e,t.child,null,o),e.child=Xo(e,null,s,o)):bs(t,e,s,o),e.memoizedState=r.state,i&&Fi(e,n,!0),e.child}function Cs(t){var e=t.stateNode;e.pendingContext?Mi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&Mi(0,e.context,!1),na(t,e.containerInfo)}function Ts(t,e,n,r,i){return fo(),ho(i),e.flags|=256,bs(t,e,n,r),e.child}var Ns,Ls,Ms,Os={dehydrated:null,treeContext:null,retryLane:0};function Rs(t){return{baseLanes:t,cachePool:null,transitions:null}}function Fs(t,e,n){var r,i=e.pendingProps,o=aa.current,s=!1,u=0!=(128&e.flags);if((r=u)||(r=(null===t||null!==t.memoizedState)&&0!=(2&o)),r?(s=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(o|=1),_i(aa,1&o),null===t)return so(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0==(1&e.mode)?e.lanes=1:"$!"===t.data?e.lanes=8:e.lanes=1073741824,null):(u=i.children,t=i.fallback,s?(i=e.mode,s=e.child,u={mode:"hidden",children:u},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=u):s=Rl(u,i,0,null),t=Ol(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Rs(n),e.memoizedState=Os,t):Ds(e,u));if(null!==(o=t.memoizedState)&&null!==(r=o.dehydrated))return function(t,e,n,r,i,o,s){if(n)return 256&e.flags?(e.flags&=-257,js(t,e,s,r=ls(Error(a(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=Rl({mode:"visible",children:r.children},i,0,null),(o=Ol(o,i,s,null)).flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,0!=(1&e.mode)&&Xo(e,t.child,null,s),e.child.memoizedState=Rs(s),e.memoizedState=Os,o);if(0==(1&e.mode))return js(t,e,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var u=r.dgst;return r=u,js(t,e,s,r=ls(o=Error(a(419)),r,void 0))}if(u=0!=(s&t.childLanes),ys||u){if(null!==(r=Pu)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Co(t,i),tl(r,t,i,-1))}return dl(),js(t,e,s,r=ls(Error(a(421))))}return"$?"===i.data?(e.flags|=128,e.child=t.child,e=El.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,eo=si(i.nextSibling),to=e,no=!0,ro=null,null!==t&&(Hi[Gi++]=Yi,Hi[Gi++]=Xi,Hi[Gi++]=Wi,Yi=t.id,Xi=t.overflow,Wi=e),(e=Ds(e,r.children)).flags|=4096,e)}(t,e,u,i,r,o,n);if(s){s=i.fallback,u=e.mode,r=(o=t.child).sibling;var l={mode:"hidden",children:i.children};return 0==(1&u)&&e.child!==o?((i=e.child).childLanes=0,i.pendingProps=l,e.deletions=null):(i=Ll(o,l)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Ll(r,s):(s=Ol(s,u,n,null)).flags|=2,s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,u=null===(u=t.child.memoizedState)?Rs(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},s.memoizedState=u,s.childLanes=t.childLanes&~n,e.memoizedState=Os,i}return t=(s=t.child).sibling,i=Ll(s,{mode:"visible",children:i.children}),0==(1&e.mode)&&(i.lanes=n),i.return=e,i.sibling=null,null!==t&&(null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function Ds(t,e){return(e=Rl({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function js(t,e,n,r){return null!==r&&ho(r),Xo(e,t.child,null,n),(t=Ds(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function Is(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),So(t.return,e,n)}function Bs(t,e,n,r,i){var o=t.memoizedState;null===o?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function zs(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(bs(t,e,r.children,n),0!=(2&(r=aa.current)))r=1&r|2,e.flags|=128;else{if(null!==t&&0!=(128&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Is(t,n,e);else if(19===t.tag)Is(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(_i(aa,r),0==(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===sa(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Bs(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===sa(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Bs(e,!0,n,null,o);break;case"together":Bs(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Vs(t,e){0==(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function $s(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),Ru|=e.lanes,0==(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=Ll(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Ll(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function Us(t,e){if(!no)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function qs(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=t,i=i.sibling;else for(i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Hs(t,e,n){var r=e.pendingProps;switch(Zi(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(e),null;case 1:return Ni(e.type)&&Li(),qs(e),null;case 3:return r=e.stateNode,ra(),ki(Pi),ki(Ai),la(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(lo(e)?e.flags|=4:null===t||t.memoizedState.isDehydrated&&0==(256&e.flags)||(e.flags|=1024,null!==ro&&(il(ro),ro=null))),qs(e),null;case 5:oa(e);var i=ea(ta.current);if(n=e.type,null!==t&&null!=e.stateNode)Ls(t,e,n,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(null===e.stateNode)throw Error(a(166));return qs(e),null}if(t=ea(Jo.current),lo(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[ci]=e,r[fi]=o,t=0!=(1&e.mode),n){case"dialog":jr("cancel",r),jr("close",r);break;case"iframe":case"object":case"embed":jr("load",r);break;case"video":case"audio":for(i=0;i<Or.length;i++)jr(Or[i],r);break;case"source":jr("error",r);break;case"img":case"image":case"link":jr("error",r),jr("load",r);break;case"details":jr("toggle",r);break;case"input":K(r,o),jr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},jr("invalid",r);break;case"textarea":ot(r,o),jr("invalid",r)}for(var s in bt(n,o),i=null,o)if(o.hasOwnProperty(s)){var l=o[s];"children"===s?"string"==typeof l?r.textContent!==l&&(!0!==o.suppressHydrationWarning&&Qr(r.textContent,l,t),i=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(!0!==o.suppressHydrationWarning&&Qr(r.textContent,l,t),i=["children",""+l]):u.hasOwnProperty(s)&&null!=l&&"onScroll"===s&&jr("scroll",r)}switch(n){case"input":W(r),tt(r,o,!0);break;case"textarea":W(r),st(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Kr)}r=i,e.updateQueue=r,null!==r&&(e.flags|=4)}else{s=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===t&&(t=ut(n)),"http://www.w3.org/1999/xhtml"===t?"script"===n?((t=s.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"==typeof r.is?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),"select"===n&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ci]=e,t[fi]=r,Ns(t,e),e.stateNode=t;t:{switch(s=wt(n,r),n){case"dialog":jr("cancel",t),jr("close",t),i=r;break;case"iframe":case"object":case"embed":jr("load",t),i=r;break;case"video":case"audio":for(i=0;i<Or.length;i++)jr(Or[i],t);i=r;break;case"source":jr("error",t),i=r;break;case"img":case"image":case"link":jr("error",t),jr("load",t),i=r;break;case"details":jr("toggle",t),i=r;break;case"input":K(t,r),i=Q(t,r),jr("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=I({},r,{value:void 0}),jr("invalid",t);break;case"textarea":ot(t,r),i=it(t,r),jr("invalid",t);break;default:i=r}for(o in bt(n,i),l=i)if(l.hasOwnProperty(o)){var c=l[o];"style"===o?mt(t,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&ht(t,c):"children"===o?"string"==typeof c?("textarea"!==n||""!==c)&&dt(t,c):"number"==typeof c&&dt(t,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(u.hasOwnProperty(o)?null!=c&&"onScroll"===o&&jr("scroll",t):null!=c&&w(t,o,c,s))}switch(n){case"input":W(t),tt(t,r,!1);break;case"textarea":W(t),st(t);break;case"option":null!=r.value&&t.setAttribute("value",""+H(r.value));break;case"select":t.multiple=!!r.multiple,null!=(o=r.value)?rt(t,!!r.multiple,o,!1):null!=r.defaultValue&&rt(t,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(t.onclick=Kr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break t;case"img":r=!0;break t;default:r=!1}}r&&(e.flags|=4)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return qs(e),null;case 6:if(t&&null!=e.stateNode)Ms(0,e,t.memoizedProps,r);else{if("string"!=typeof r&&null===e.stateNode)throw Error(a(166));if(n=ea(ta.current),ea(Jo.current),lo(e)){if(r=e.stateNode,n=e.memoizedProps,r[ci]=e,(o=r.nodeValue!==n)&&null!==(t=to))switch(t.tag){case 3:Qr(r.nodeValue,n,0!=(1&t.mode));break;case 5:!0!==t.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!=(1&t.mode))}o&&(e.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ci]=e,e.stateNode=r}return qs(e),null;case 13:if(ki(aa),r=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(no&&null!==eo&&0!=(1&e.mode)&&0==(128&e.flags))co(),fo(),e.flags|=98560,o=!1;else if(o=lo(e),null!==r&&null!==r.dehydrated){if(null===t){if(!o)throw Error(a(318));if(!(o=null!==(o=e.memoizedState)?o.dehydrated:null))throw Error(a(317));o[ci]=e}else fo(),0==(128&e.flags)&&(e.memoizedState=null),e.flags|=4;qs(e),o=!1}else null!==ro&&(il(ro),ro=null),o=!0;if(!o)return 65536&e.flags?e:null}return 0!=(128&e.flags)?(e.lanes=n,e):((r=null!==r)!=(null!==t&&null!==t.memoizedState)&&r&&(e.child.flags|=8192,0!=(1&e.mode)&&(null===t||0!=(1&aa.current)?0===Mu&&(Mu=3):dl())),null!==e.updateQueue&&(e.flags|=4),qs(e),null);case 4:return ra(),null===t&&zr(e.stateNode.containerInfo),qs(e),null;case 10:return xo(e.type._context),qs(e),null;case 17:return Ni(e.type)&&Li(),qs(e),null;case 19:if(ki(aa),null===(o=e.memoizedState))return qs(e),null;if(r=0!=(128&e.flags),null===(s=o.rendering))if(r)Us(o,!1);else{if(0!==Mu||null!==t&&0!=(128&t.flags))for(t=e.child;null!==t;){if(null!==(s=sa(t))){for(e.flags|=128,Us(o,!1),null!==(r=s.updateQueue)&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;null!==n;)t=r,(o=n).flags&=14680066,null===(s=o.alternate)?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,t=s.dependencies,o.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return _i(aa,1&aa.current|2),e.child}t=t.sibling}null!==o.tail&&Jt()>zu&&(e.flags|=128,r=!0,Us(o,!1),e.lanes=4194304)}else{if(!r)if(null!==(t=sa(s))){if(e.flags|=128,r=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),Us(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!no)return qs(e),null}else 2*Jt()-o.renderingStartTime>zu&&1073741824!==n&&(e.flags|=128,r=!0,Us(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(null!==(n=o.last)?n.sibling=s:e.child=s,o.last=s)}return null!==o.tail?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Jt(),e.sibling=null,n=aa.current,_i(aa,r?1&n|2:1&n),e):(qs(e),null);case 22:case 23:return ll(),r=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==r&&(e.flags|=8192),r&&0!=(1&e.mode)?0!=(1073741824&Nu)&&(qs(e),6&e.subtreeFlags&&(e.flags|=8192)):qs(e),null;case 24:case 25:return null}throw Error(a(156,e.tag))}function Gs(t,e){switch(Zi(e),e.tag){case 1:return Ni(e.type)&&Li(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return ra(),ki(Pi),ki(Ai),la(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return oa(e),null;case 13:if(ki(aa),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(a(340));fo()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return ki(aa),null;case 4:return ra(),null;case 10:return xo(e.type._context),null;case 22:case 23:return ll(),null;case 24:default:return null}}Ns=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ls=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,ea(Jo.current);var o,a=null;switch(n){case"input":i=Q(t,i),r=Q(t,r),a=[];break;case"select":i=I({},i,{value:void 0}),r=I({},r,{value:void 0}),a=[];break;case"textarea":i=it(t,i),r=it(t,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(t.onclick=Kr)}for(c in bt(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(u.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(u.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&jr("scroll",t),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(e.updateQueue=c)&&(e.flags|=4)}},Ms=function(t,e,n,r){n!==r&&(e.flags|=4)};var Ws=!1,Ys=!1,Xs="function"==typeof WeakSet?WeakSet:Set,Qs=null;function Ks(t,e){var n=t.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sl(t,e,n)}else n.current=null}function Js(t,e,n){try{n()}catch(n){Sl(t,e,n)}}var Zs=!1;function tu(t,e,n){var r=e.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,void 0!==o&&Js(e,n,o)}i=i.next}while(i!==r)}}function eu(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function nu(t){var e=t.ref;if(null!==e){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}"function"==typeof e?e(t):e.current=t}}function ru(t){var e=t.alternate;null!==e&&(t.alternate=null,ru(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(e=t.stateNode)&&(delete e[ci],delete e[fi],delete e[di],delete e[pi],delete e[gi]),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function iu(t){return 5===t.tag||3===t.tag||4===t.tag}function ou(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||iu(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function au(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!=(n=n._reactRootContainer)||null!==e.onclick||(e.onclick=Kr));else if(4!==r&&null!==(t=t.child))for(au(t,e,n),t=t.sibling;null!==t;)au(t,e,n),t=t.sibling}function su(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(su(t,e,n),t=t.sibling;null!==t;)su(t,e,n),t=t.sibling}var uu=null,lu=!1;function cu(t,e,n){for(n=n.child;null!==n;)fu(t,e,n),n=n.sibling}function fu(t,e,n){if(ae&&"function"==typeof ae.onCommitFiberUnmount)try{ae.onCommitFiberUnmount(oe,n)}catch(t){}switch(n.tag){case 5:Ys||Ks(n,e);case 6:var r=uu,i=lu;uu=null,cu(t,e,n),lu=i,null!==(uu=r)&&(lu?(t=uu,n=n.stateNode,8===t.nodeType?t.parentNode.removeChild(n):t.removeChild(n)):uu.removeChild(n.stateNode));break;case 18:null!==uu&&(lu?(t=uu,n=n.stateNode,8===t.nodeType?ai(t.parentNode,n):1===t.nodeType&&ai(t,n),Ue(t)):ai(uu,n.stateNode));break;case 4:r=uu,i=lu,uu=n.stateNode.containerInfo,lu=!0,cu(t,e,n),uu=r,lu=i;break;case 0:case 11:case 14:case 15:if(!Ys&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&Js(n,e,a),i=i.next}while(i!==r)}cu(t,e,n);break;case 1:if(!Ys&&(Ks(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){Sl(n,e,t)}cu(t,e,n);break;case 21:cu(t,e,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,cu(t,e,n),Ys=r):cu(t,e,n);break;default:cu(t,e,n)}}function hu(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new Xs),e.forEach((function(e){var r=Al.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}function du(t,e){var n=e.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=t,s=e,u=s;t:for(;null!==u;){switch(u.tag){case 5:uu=u.stateNode,lu=!1;break t;case 3:case 4:uu=u.stateNode.containerInfo,lu=!0;break t}u=u.return}if(null===uu)throw Error(a(160));fu(o,s,i),uu=null,lu=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(t){Sl(i,e,t)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)pu(e,t),e=e.sibling}function pu(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(du(e,t),gu(t),4&r){try{tu(3,t,t.return),eu(3,t)}catch(e){Sl(t,t.return,e)}try{tu(5,t,t.return)}catch(e){Sl(t,t.return,e)}}break;case 1:du(e,t),gu(t),512&r&&null!==n&&Ks(n,n.return);break;case 5:if(du(e,t),gu(t),512&r&&null!==n&&Ks(n,n.return),32&t.flags){var i=t.stateNode;try{dt(i,"")}catch(e){Sl(t,t.return,e)}}if(4&r&&null!=(i=t.stateNode)){var o=t.memoizedProps,s=null!==n?n.memoizedProps:o,u=t.type,l=t.updateQueue;if(t.updateQueue=null,null!==l)try{"input"===u&&"radio"===o.type&&null!=o.name&&J(i,o),wt(u,s);var c=wt(u,o);for(s=0;s<l.length;s+=2){var f=l[s],h=l[s+1];"style"===f?mt(i,h):"dangerouslySetInnerHTML"===f?ht(i,h):"children"===f?dt(i,h):w(i,f,h,c)}switch(u){case"input":Z(i,o);break;case"textarea":at(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?rt(i,!!o.multiple,p,!1):d!==!!o.multiple&&(null!=o.defaultValue?rt(i,!!o.multiple,o.defaultValue,!0):rt(i,!!o.multiple,o.multiple?[]:"",!1))}i[fi]=o}catch(e){Sl(t,t.return,e)}}break;case 6:if(du(e,t),gu(t),4&r){if(null===t.stateNode)throw Error(a(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(e){Sl(t,t.return,e)}}break;case 3:if(du(e,t),gu(t),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ue(e.containerInfo)}catch(e){Sl(t,t.return,e)}break;case 4:du(e,t),gu(t);break;case 13:du(e,t),gu(t),8192&(i=t.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Bu=Jt())),4&r&&hu(t);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&t.mode?(Ys=(c=Ys)||f,du(e,t),Ys=c):du(e,t),gu(t),8192&r){if(c=null!==t.memoizedState,(t.stateNode.isHidden=c)&&!f&&0!=(1&t.mode))for(Qs=t,f=t.child;null!==f;){for(h=Qs=f;null!==Qs;){switch(p=(d=Qs).child,d.tag){case 0:case 11:case 14:case 15:tu(4,d,d.return);break;case 1:Ks(d,d.return);var g=d.stateNode;if("function"==typeof g.componentWillUnmount){r=d,n=d.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(t){Sl(r,n,t)}}break;case 5:Ks(d,d.return);break;case 22:if(null!==d.memoizedState){bu(h);continue}}null!==p?(p.return=d,Qs=p):bu(h)}f=f.sibling}t:for(f=null,h=t;;){if(5===h.tag){if(null===f){f=h;try{i=h.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(u=h.stateNode,s=null!=(l=h.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,u.style.display=vt("display",s))}catch(e){Sl(t,t.return,e)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(e){Sl(t,t.return,e)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===t)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===t)break t;for(;null===h.sibling;){if(null===h.return||h.return===t)break t;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:du(e,t),gu(t),4&r&&hu(t);break;case 21:break;default:du(e,t),gu(t)}}function gu(t){var e=t.flags;if(2&e){try{t:{for(var n=t.return;null!==n;){if(iu(n)){var r=n;break t}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(dt(i,""),r.flags&=-33),su(t,ou(t),i);break;case 3:case 4:var o=r.stateNode.containerInfo;au(t,ou(t),o);break;default:throw Error(a(161))}}catch(e){Sl(t,t.return,e)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function vu(t,e,n){Qs=t,mu(t,e,n)}function mu(t,e,n){for(var r=0!=(1&t.mode);null!==Qs;){var i=Qs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Ws;if(!a){var s=i.alternate,u=null!==s&&null!==s.memoizedState||Ys;s=Ws;var l=Ys;if(Ws=a,(Ys=u)&&!l)for(Qs=i;null!==Qs;)u=(a=Qs).child,22===a.tag&&null!==a.memoizedState?wu(i):null!==u?(u.return=a,Qs=u):wu(i);for(;null!==o;)Qs=o,mu(o,e,n),o=o.sibling;Qs=i,Ws=s,Ys=l}yu(t)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Qs=o):yu(t)}}function yu(t){for(;null!==Qs;){var e=Qs;if(0!=(8772&e.flags)){var n=e.alternate;try{if(0!=(8772&e.flags))switch(e.tag){case 0:case 11:case 15:Ys||eu(5,e);break;case 1:var r=e.stateNode;if(4&e.flags&&!Ys)if(null===n)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:go(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;null!==o&&jo(e,o,r);break;case 3:var s=e.updateQueue;if(null!==s){if(n=null,null!==e.child)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}jo(e,s,n)}break;case 5:var u=e.stateNode;if(null===n&&4&e.flags){n=u;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:break;case 13:if(null===e.memoizedState){var c=e.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&Ue(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}Ys||512&e.flags&&nu(e)}catch(t){Sl(e,e.return,t)}}if(e===t){Qs=null;break}if(null!==(n=e.sibling)){n.return=e.return,Qs=n;break}Qs=e.return}}function bu(t){for(;null!==Qs;){var e=Qs;if(e===t){Qs=null;break}var n=e.sibling;if(null!==n){n.return=e.return,Qs=n;break}Qs=e.return}}function wu(t){for(;null!==Qs;){var e=Qs;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{eu(4,e)}catch(t){Sl(e,n,t)}break;case 1:var r=e.stateNode;if("function"==typeof r.componentDidMount){var i=e.return;try{r.componentDidMount()}catch(t){Sl(e,i,t)}}var o=e.return;try{nu(e)}catch(t){Sl(e,o,t)}break;case 5:var a=e.return;try{nu(e)}catch(t){Sl(e,a,t)}}}catch(t){Sl(e,e.return,t)}if(e===t){Qs=null;break}var s=e.sibling;if(null!==s){s.return=e.return,Qs=s;break}Qs=e.return}}var xu,Su=Math.ceil,ku=x.ReactCurrentDispatcher,_u=x.ReactCurrentOwner,Eu=x.ReactCurrentBatchConfig,Au=0,Pu=null,Cu=null,Tu=0,Nu=0,Lu=Si(0),Mu=0,Ou=null,Ru=0,Fu=0,Du=0,ju=null,Iu=null,Bu=0,zu=1/0,Vu=null,$u=!1,Uu=null,qu=null,Hu=!1,Gu=null,Wu=0,Yu=0,Xu=null,Qu=-1,Ku=0;function Ju(){return 0!=(6&Au)?Jt():-1!==Qu?Qu:Qu=Jt()}function Zu(t){return 0==(1&t.mode)?1:0!=(2&Au)&&0!==Tu?Tu&-Tu:null!==po.transition?(0===Ku&&(Ku=ve()),Ku):0!==(t=we)?t:t=void 0===(t=window.event)?16:Ke(t.type)}function tl(t,e,n,r){if(50<Yu)throw Yu=0,Xu=null,Error(a(185));ye(t,n,r),0!=(2&Au)&&t===Pu||(t===Pu&&(0==(2&Au)&&(Fu|=n),4===Mu&&ol(t,Tu)),el(t,r),1===n&&0===Au&&0==(1&e.mode)&&(zu=Jt()+500,ji&&zi()))}function el(t,e){var n=t.callbackNode;!function(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var a=31-se(o),s=1<<a,u=i[a];-1===u?0!=(s&n)&&0==(s&r)||(i[a]=pe(s,e)):u<=e&&(t.expiredLanes|=s),o&=~s}}(t,e);var r=de(t,t===Pu?Tu:0);if(0===r)null!==n&&Xt(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(null!=n&&Xt(n),1===e)0===t.tag?function(t){ji=!0,Bi(t)}(al.bind(null,t)):Bi(al.bind(null,t)),ii((function(){0==(6&Au)&&zi()})),n=null;else{switch(xe(r)){case 1:n=te;break;case 4:n=ee;break;case 16:n=ne;break;case 536870912:n=ie;break;default:n=ne}n=Pl(n,nl.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function nl(t,e){if(Qu=-1,Ku=0,0!=(6&Au))throw Error(a(327));var n=t.callbackNode;if(wl()&&t.callbackNode!==n)return null;var r=de(t,t===Pu?Tu:0);if(0===r)return null;if(0!=(30&r)||0!=(r&t.expiredLanes)||e)e=pl(t,r);else{e=r;var i=Au;Au|=2;var o=hl();for(Pu===t&&Tu===e||(Vu=null,zu=Jt()+500,cl(t,e));;)try{vl();break}catch(e){fl(t,e)}wo(),ku.current=o,Au=i,null!==Cu?e=0:(Pu=null,Tu=0,e=Mu)}if(0!==e){if(2===e&&0!==(i=ge(t))&&(r=i,e=rl(t,i)),1===e)throw n=Ou,cl(t,0),ol(t,r),el(t,Jt()),n;if(6===e)ol(t,r);else{if(i=t.current.alternate,0==(30&r)&&!function(t){for(var e=t;;){if(16384&e.flags){var n=e.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!or(o(),i))return!1}catch(t){return!1}}}if(n=e.child,16384&e.subtreeFlags&&null!==n)n.return=e,e=n;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}(i)&&(2===(e=pl(t,r))&&0!==(o=ge(t))&&(r=o,e=rl(t,o)),1===e))throw n=Ou,cl(t,0),ol(t,r),el(t,Jt()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(a(345));case 2:bl(t,Iu,Vu);break;case 3:if(ol(t,r),(130023424&r)===r&&10<(e=Bu+500-Jt())){if(0!==de(t,0))break;if(((i=t.suspendedLanes)&r)!==r){Ju(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=ei(bl.bind(null,t,Iu,Vu),e);break}bl(t,Iu,Vu);break;case 4:if(ol(t,r),(4194240&r)===r)break;for(e=t.eventTimes,i=-1;0<r;){var s=31-se(r);o=1<<s,(s=e[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Jt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Su(r/1960))-r)){t.timeoutHandle=ei(bl.bind(null,t,Iu,Vu),r);break}bl(t,Iu,Vu);break;case 5:bl(t,Iu,Vu);break;default:throw Error(a(329))}}}return el(t,Jt()),t.callbackNode===n?nl.bind(null,t):null}function rl(t,e){var n=ju;return t.current.memoizedState.isDehydrated&&(cl(t,e).flags|=256),2!==(t=pl(t,e))&&(e=Iu,Iu=n,null!==e&&il(e)),t}function il(t){null===Iu?Iu=t:Iu.push.apply(Iu,t)}function ol(t,e){for(e&=~Du,e&=~Fu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-se(e),r=1<<n;t[n]=-1,e&=~r}}function al(t){if(0!=(6&Au))throw Error(a(327));wl();var e=de(t,0);if(0==(1&e))return el(t,Jt()),null;var n=pl(t,e);if(0!==t.tag&&2===n){var r=ge(t);0!==r&&(e=r,n=rl(t,r))}if(1===n)throw n=Ou,cl(t,0),ol(t,e),el(t,Jt()),n;if(6===n)throw Error(a(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,bl(t,Iu,Vu),el(t,Jt()),null}function sl(t,e){var n=Au;Au|=1;try{return t(e)}finally{0===(Au=n)&&(zu=Jt()+500,ji&&zi())}}function ul(t){null!==Gu&&0===Gu.tag&&0==(6&Au)&&wl();var e=Au;Au|=1;var n=Eu.transition,r=we;try{if(Eu.transition=null,we=1,t)return t()}finally{we=r,Eu.transition=n,0==(6&(Au=e))&&zi()}}function ll(){Nu=Lu.current,ki(Lu)}function cl(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,ni(n)),null!==Cu)for(n=Cu.return;null!==n;){var r=n;switch(Zi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Li();break;case 3:ra(),ki(Pi),ki(Ai),la();break;case 5:oa(r);break;case 4:ra();break;case 13:case 19:ki(aa);break;case 10:xo(r.type._context);break;case 22:case 23:ll()}n=n.return}if(Pu=t,Cu=t=Ll(t.current,null),Tu=Nu=e,Mu=0,Ou=null,Du=Fu=Ru=0,Iu=ju=null,null!==Eo){for(e=0;e<Eo.length;e++)if(null!==(r=(n=Eo[e]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Eo=null}return t}function fl(t,e){for(;;){var n=Cu;try{if(wo(),ca.current=is,va){for(var i=da.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}va=!1}if(ha=0,ga=pa=da=null,ma=!1,ya=0,_u.current=null,null===n||null===n.return){Mu=1,Ou=e,Cu=null;break}t:{var s=t,u=n.return,l=n,c=e;if(e=Tu,l.flags|=32768,null!==c&&"object"===r(c)&&"function"==typeof c.then){var f=c,h=l,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var g=gs(u);if(null!==g){g.flags&=-257,vs(g,u,l,0,e),1&g.mode&&ps(s,f,e),c=f;var v=(e=g).updateQueue;if(null===v){var m=new Set;m.add(c),e.updateQueue=m}else v.add(c);break t}if(0==(1&e)){ps(s,f,e),dl();break t}c=Error(a(426))}else if(no&&1&l.mode){var y=gs(u);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),vs(y,u,l,0,e),ho(us(c,l));break t}}s=c=us(c,l),4!==Mu&&(Mu=2),null===ju?ju=[s]:ju.push(s),s=u;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e,Fo(s,hs(0,c,e));break t;case 1:l=c;var b=s.type,w=s.stateNode;if(0==(128&s.flags)&&("function"==typeof b.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===qu||!qu.has(w)))){s.flags|=65536,e&=-e,s.lanes|=e,Fo(s,ds(s,l,e));break t}}s=s.return}while(null!==s)}yl(n)}catch(t){e=t,Cu===n&&null!==n&&(Cu=n=n.return);continue}break}}function hl(){var t=ku.current;return ku.current=is,null===t?is:t}function dl(){0!==Mu&&3!==Mu&&2!==Mu||(Mu=4),null===Pu||0==(268435455&Ru)&&0==(268435455&Fu)||ol(Pu,Tu)}function pl(t,e){var n=Au;Au|=2;var r=hl();for(Pu===t&&Tu===e||(Vu=null,cl(t,e));;)try{gl();break}catch(e){fl(t,e)}if(wo(),Au=n,ku.current=r,null!==Cu)throw Error(a(261));return Pu=null,Tu=0,Mu}function gl(){for(;null!==Cu;)ml(Cu)}function vl(){for(;null!==Cu&&!Qt();)ml(Cu)}function ml(t){var e=xu(t.alternate,t,Nu);t.memoizedProps=t.pendingProps,null===e?yl(t):Cu=e,_u.current=null}function yl(t){var e=t;do{var n=e.alternate;if(t=e.return,0==(32768&e.flags)){if(null!==(n=Hs(n,e,Nu)))return void(Cu=n)}else{if(null!==(n=Gs(n,e)))return n.flags&=32767,void(Cu=n);if(null===t)return Mu=6,void(Cu=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}if(null!==(e=e.sibling))return void(Cu=e);Cu=e=t}while(null!==e);0===Mu&&(Mu=5)}function bl(t,e,n){var r=we,i=Eu.transition;try{Eu.transition=null,we=1,function(t,e,n,r){do{wl()}while(null!==Gu);if(0!=(6&Au))throw Error(a(327));n=t.finishedWork;var i=t.finishedLanes;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(a(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-se(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}(t,o),t===Pu&&(Cu=Pu=null,Tu=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Hu||(Hu=!0,Pl(ne,(function(){return wl(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=Eu.transition,Eu.transition=null;var s=we;we=1;var u=Au;Au|=4,_u.current=null,function(t,e){if(Jr=He,fr(t=cr())){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{var r=(n=(n=t.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(t){n=null;break t}var s=0,u=-1,l=-1,c=0,f=0,h=t,d=null;e:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(u=s+i),h!==o||0!==r&&3!==h.nodeType||(l=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===t)break e;if(d===n&&++c===i&&(u=s),d===o&&++f===r&&(l=s),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===u||-1===l?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zr={focusedElem:t,selectionRange:n},He=!1,Qs=e;null!==Qs;)if(t=(e=Qs).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,Qs=t;else for(;null!==Qs;){e=Qs;try{var g=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:break;case 1:if(null!==g){var v=g.memoizedProps,m=g.memoizedState,y=e.stateNode,b=y.getSnapshotBeforeUpdate(e.elementType===e.type?v:go(e.type,v),m);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=e.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(t){Sl(e,e.return,t)}if(null!==(t=e.sibling)){t.return=e.return,Qs=t;break}Qs=e.return}g=Zs,Zs=!1}(t,n),pu(n,t),hr(Zr),He=!!Jr,Zr=Jr=null,t.current=n,vu(n,t,i),Kt(),Au=u,we=s,Eu.transition=o}else t.current=n;if(Hu&&(Hu=!1,Gu=t,Wu=i),0===(o=t.pendingLanes)&&(qu=null),function(t){if(ae&&"function"==typeof ae.onCommitFiberRoot)try{ae.onCommitFiberRoot(oe,t,void 0,128==(128&t.current.flags))}catch(t){}}(n.stateNode),el(t,Jt()),null!==e)for(r=t.onRecoverableError,n=0;n<e.length;n++)r((i=e[n]).value,{componentStack:i.stack,digest:i.digest});if($u)throw $u=!1,t=Uu,Uu=null,t;0!=(1&Wu)&&0!==t.tag&&wl(),0!=(1&(o=t.pendingLanes))?t===Xu?Yu++:(Yu=0,Xu=t):Yu=0,zi()}(t,e,n,r)}finally{Eu.transition=i,we=r}return null}function wl(){if(null!==Gu){var t=xe(Wu),e=Eu.transition,n=we;try{if(Eu.transition=null,we=16>t?16:t,null===Gu)var r=!1;else{if(t=Gu,Gu=null,Wu=0,0!=(6&Au))throw Error(a(331));var i=Au;for(Au|=4,Qs=t.current;null!==Qs;){var o=Qs,s=o.child;if(0!=(16&Qs.flags)){var u=o.deletions;if(null!==u){for(var l=0;l<u.length;l++){var c=u[l];for(Qs=c;null!==Qs;){var f=Qs;switch(f.tag){case 0:case 11:case 15:tu(8,f,o)}var h=f.child;if(null!==h)h.return=f,Qs=h;else for(;null!==Qs;){var d=(f=Qs).sibling,p=f.return;if(ru(f),f===c){Qs=null;break}if(null!==d){d.return=p,Qs=d;break}Qs=p}}}var g=o.alternate;if(null!==g){var v=g.child;if(null!==v){g.child=null;do{var m=v.sibling;v.sibling=null,v=m}while(null!==v)}}Qs=o}}if(0!=(2064&o.subtreeFlags)&&null!==s)s.return=o,Qs=s;else t:for(;null!==Qs;){if(0!=(2048&(o=Qs).flags))switch(o.tag){case 0:case 11:case 15:tu(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Qs=y;break t}Qs=o.return}}var b=t.current;for(Qs=b;null!==Qs;){var w=(s=Qs).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,Qs=w;else t:for(s=b;null!==Qs;){if(0!=(2048&(u=Qs).flags))try{switch(u.tag){case 0:case 11:case 15:eu(9,u)}}catch(t){Sl(u,u.return,t)}if(u===s){Qs=null;break t}var x=u.sibling;if(null!==x){x.return=u.return,Qs=x;break t}Qs=u.return}}if(Au=i,zi(),ae&&"function"==typeof ae.onPostCommitFiberRoot)try{ae.onPostCommitFiberRoot(oe,t)}catch(t){}r=!0}return r}finally{we=n,Eu.transition=e}}return!1}function xl(t,e,n){t=Oo(t,e=hs(0,e=us(n,e),1),1),e=Ju(),null!==t&&(ye(t,1,e),el(t,e))}function Sl(t,e,n){if(3===t.tag)xl(t,t,n);else for(;null!==e;){if(3===e.tag){xl(e,t,n);break}if(1===e.tag){var r=e.stateNode;if("function"==typeof e.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===qu||!qu.has(r))){e=Oo(e,t=ds(e,t=us(n,t),1),1),t=Ju(),null!==e&&(ye(e,1,t),el(e,t));break}}e=e.return}}function kl(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=Ju(),t.pingedLanes|=t.suspendedLanes&n,Pu===t&&(Tu&n)===n&&(4===Mu||3===Mu&&(130023424&Tu)===Tu&&500>Jt()-Bu?cl(t,0):Du|=n),el(t,e)}function _l(t,e){0===e&&(0==(1&t.mode)?e=1:(e=fe,0==(130023424&(fe<<=1))&&(fe=4194304)));var n=Ju();null!==(t=Co(t,e))&&(ye(t,e,n),el(t,n))}function El(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),_l(t,n)}function Al(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(e),_l(t,n)}function Pl(t,e){return Yt(t,e)}function Cl(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tl(t,e,n,r){return new Cl(t,e,n,r)}function Nl(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Ll(t,e){var n=t.alternate;return null===n?((n=Tl(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&t.flags,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ml(t,e,n,i,o,s){var u=2;if(i=t,"function"==typeof t)Nl(t)&&(u=1);else if("string"==typeof t)u=5;else t:switch(t){case _:return Ol(n.children,o,s,e);case E:u=8,o|=8;break;case A:return(t=Tl(12,n,e,2|o)).elementType=A,t.lanes=s,t;case N:return(t=Tl(13,n,e,o)).elementType=N,t.lanes=s,t;case L:return(t=Tl(19,n,e,o)).elementType=L,t.lanes=s,t;case R:return Rl(n,o,s,e);default:if("object"===r(t)&&null!==t)switch(t.$$typeof){case P:u=10;break t;case C:u=9;break t;case T:u=11;break t;case M:u=14;break t;case O:u=16,i=null;break t}throw Error(a(130,null==t?t:r(t),""))}return(e=Tl(u,n,e,o)).elementType=t,e.type=i,e.lanes=s,e}function Ol(t,e,n,r){return(t=Tl(7,t,r,e)).lanes=n,t}function Rl(t,e,n,r){return(t=Tl(22,t,r,e)).elementType=R,t.lanes=n,t.stateNode={isHidden:!1},t}function Fl(t,e,n){return(t=Tl(6,t,null,e)).lanes=n,t}function Dl(t,e,n){return(e=Tl(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function jl(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=me(0),this.expirationTimes=me(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=me(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Il(t,e,n,r,i,o,a,s,u){return t=new jl(t,e,n,s,u),1===e?(e=1,!0===o&&(e|=8)):e=0,o=Tl(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},No(o),t}function Bl(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function zl(t){if(!t)return Ei;t:{if(Ut(t=t._reactInternals)!==t||1!==t.tag)throw Error(a(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break t;case 1:if(Ni(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);throw Error(a(171))}if(1===t.tag){var n=t.type;if(Ni(n))return Oi(t,n,e)}return e}function Vl(t,e,n,r,i,o,a,s,u){return(t=Il(n,r,!0,t,0,o,0,s,u)).context=zl(null),n=t.current,(o=Mo(r=Ju(),i=Zu(n))).callback=null!=e?e:null,Oo(n,o,i),t.current.lanes=i,ye(t,i,r),el(t,r),t}function $l(t,e,n,r){var i=e.current,o=Ju(),a=Zu(i);return n=zl(n),null===e.context?e.context=n:e.pendingContext=n,(e=Mo(o,a)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),null!==(t=Oo(i,e,a))&&(tl(t,i,a,o),Ro(t,i,a)),a}function Ul(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function ql(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function Hl(t,e){ql(t,e),(t=t.alternate)&&ql(t,e)}xu=function(t,e,n){if(null!==t)if(t.memoizedProps!==e.pendingProps||Pi.current)ys=!0;else{if(0==(t.lanes&n)&&0==(128&e.flags))return ys=!1,function(t,e,n){switch(e.tag){case 3:Cs(e),fo();break;case 5:ia(e);break;case 1:Ni(e.type)&&Ri(e);break;case 4:na(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;_i(vo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=e.memoizedState))return null!==r.dehydrated?(_i(aa,1&aa.current),e.flags|=128,null):0!=(n&e.child.childLanes)?Fs(t,e,n):(_i(aa,1&aa.current),null!==(t=$s(t,e,n))?t.sibling:null);_i(aa,1&aa.current);break;case 19:if(r=0!=(n&e.childLanes),0!=(128&t.flags)){if(r)return zs(t,e,n);e.flags|=128}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),_i(aa,aa.current),r)break;return null;case 22:case 23:return e.lanes=0,ks(t,e,n)}return $s(t,e,n)}(t,e,n);ys=0!=(131072&t.flags)}else ys=!1,no&&0!=(1048576&e.flags)&&Ki(e,qi,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Vs(t,e),t=e.pendingProps;var o=Ti(e,Ai.current);ko(e,n),o=Sa(null,e,i,t,o,n);var s=ka();return e.flags|=1,"object"===r(o)&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ni(i)?(s=!0,Ri(e)):s=!1,e.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,No(e),o.updater=zo,e.stateNode=o,o._reactInternals=e,qo(e,i,t,n),e=Ps(null,e,i,!0,s,n)):(e.tag=0,no&&s&&Ji(e),bs(null,e,o,n),e=e.child),e;case 16:i=e.elementType;t:{switch(Vs(t,e),t=e.pendingProps,i=(o=i._init)(i._payload),e.type=i,o=e.tag=function(t){if("function"==typeof t)return Nl(t)?1:0;if(null!=t){if((t=t.$$typeof)===T)return 11;if(t===M)return 14}return 2}(i),t=go(i,t),o){case 0:e=Es(null,e,i,t,n);break t;case 1:e=As(null,e,i,t,n);break t;case 11:e=ws(null,e,i,t,n);break t;case 14:e=xs(null,e,i,go(i.type,t),n);break t}throw Error(a(306,i,""))}return e;case 0:return i=e.type,o=e.pendingProps,Es(t,e,i,o=e.elementType===i?o:go(i,o),n);case 1:return i=e.type,o=e.pendingProps,As(t,e,i,o=e.elementType===i?o:go(i,o),n);case 3:t:{if(Cs(e),null===t)throw Error(a(387));i=e.pendingProps,o=(s=e.memoizedState).element,Lo(t,e),Do(e,i,null,n);var u=e.memoizedState;if(i=u.element,s.isDehydrated){if(s={element:i,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},e.updateQueue.baseState=s,e.memoizedState=s,256&e.flags){e=Ts(t,e,i,n,o=us(Error(a(423)),e));break t}if(i!==o){e=Ts(t,e,i,n,o=us(Error(a(424)),e));break t}for(eo=si(e.stateNode.containerInfo.firstChild),to=e,no=!0,ro=null,n=Qo(e,null,i,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),i===o){e=$s(t,e,n);break t}bs(t,e,i,n)}e=e.child}return e;case 5:return ia(e),null===t&&so(e),i=e.type,o=e.pendingProps,s=null!==t?t.memoizedProps:null,u=o.children,ti(i,o)?u=null:null!==s&&ti(i,s)&&(e.flags|=32),_s(t,e),bs(t,e,u,n),e.child;case 6:return null===t&&so(e),null;case 13:return Fs(t,e,n);case 4:return na(e,e.stateNode.containerInfo),i=e.pendingProps,null===t?e.child=Xo(e,null,i,n):bs(t,e,i,n),e.child;case 11:return i=e.type,o=e.pendingProps,ws(t,e,i,o=e.elementType===i?o:go(i,o),n);case 7:return bs(t,e,e.pendingProps,n),e.child;case 8:case 12:return bs(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(i=e.type._context,o=e.pendingProps,s=e.memoizedProps,u=o.value,_i(vo,i._currentValue),i._currentValue=u,null!==s)if(or(s.value,u)){if(s.children===o.children&&!Pi.current){e=$s(t,e,n);break t}}else for(null!==(s=e.child)&&(s.return=e);null!==s;){var l=s.dependencies;if(null!==l){u=s.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===s.tag){(c=Mo(-1,n&-n)).tag=2;var f=s.updateQueue;if(null!==f){var h=(f=f.shared).pending;null===h?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),So(s.return,n,e),l.lanes|=n;break}c=c.next}}else if(10===s.tag)u=s.type===e.type?null:s.child;else if(18===s.tag){if(null===(u=s.return))throw Error(a(341));u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),So(u,n,e),u=s.sibling}else u=s.child;if(null!==u)u.return=s;else for(u=s;null!==u;){if(u===e){u=null;break}if(null!==(s=u.sibling)){s.return=u.return,u=s;break}u=u.return}s=u}bs(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,i=e.pendingProps.children,ko(e,n),i=i(o=_o(o)),e.flags|=1,bs(t,e,i,n),e.child;case 14:return o=go(i=e.type,e.pendingProps),xs(t,e,i,o=go(i.type,o),n);case 15:return Ss(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,o=e.pendingProps,o=e.elementType===i?o:go(i,o),Vs(t,e),e.tag=1,Ni(i)?(t=!0,Ri(e)):t=!1,ko(e,n),$o(e,i,o),qo(e,i,o,n),Ps(null,e,i,!0,t,n);case 19:return zs(t,e,n);case 22:return ks(t,e,n)}throw Error(a(156,e.tag))};var Gl="function"==typeof reportError?reportError:function(t){console.error(t)};function Wl(t){this._internalRoot=t}function Yl(t){this._internalRoot=t}function Xl(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)}function Ql(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Kl(){}function Jl(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var t=Ul(a);s.call(t)}}$l(e,a,t,i)}else a=function(t,e,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var t=Ul(a);o.call(t)}}var a=Vl(e,r,t,0,null,!1,0,"",Kl);return t._reactRootContainer=a,t[hi]=a.current,zr(8===t.nodeType?t.parentNode:t),ul(),a}for(;i=t.lastChild;)t.removeChild(i);if("function"==typeof r){var s=r;r=function(){var t=Ul(u);s.call(t)}}var u=Il(t,0,!1,null,0,!1,0,"",Kl);return t._reactRootContainer=u,t[hi]=u.current,zr(8===t.nodeType?t.parentNode:t),ul((function(){$l(e,u,n,r)})),u}(n,e,t,i,r);return Ul(a)}Yl.prototype.render=Wl.prototype.render=function(t){var e=this._internalRoot;if(null===e)throw Error(a(409));$l(t,e,null,null)},Yl.prototype.unmount=Wl.prototype.unmount=function(){var t=this._internalRoot;if(null!==t){this._internalRoot=null;var e=t.containerInfo;ul((function(){$l(null,t,null,null)})),e[hi]=null}},Yl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Ee();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Re.length&&0!==e&&e<Re[n].priority;n++);Re.splice(n,0,t),0===n&&Ie(t)}},Se=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=he(e.pendingLanes);0!==n&&(be(e,1|n),el(e,Jt()),0==(6&Au)&&(zu=Jt()+500,zi()))}break;case 13:ul((function(){var e=Co(t,1);if(null!==e){var n=Ju();tl(e,t,1,n)}})),Hl(t,1)}},ke=function(t){if(13===t.tag){var e=Co(t,134217728);null!==e&&tl(e,t,134217728,Ju()),Hl(t,134217728)}},_e=function(t){if(13===t.tag){var e=Zu(t),n=Co(t,e);null!==n&&tl(n,t,e,Ju()),Hl(t,e)}},Ee=function(){return we},Ae=function(t,e){var n=we;try{return we=t,e()}finally{we=n}},kt=function(t,e,n){switch(e){case"input":if(Z(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=bi(r);if(!i)throw Error(a(90));Y(r),Z(r,i)}}}break;case"textarea":at(t,n);break;case"select":null!=(e=n.value)&&rt(t,!!n.multiple,e,!1)}},Tt=sl,Nt=ul;var Zl={usingClientEntryPoint:!1,Events:[mi,yi,bi,Pt,Ct,sl]},tc={findFiberByHostInstance:vi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ec={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=Gt(t))?null:t.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nc.isDisabled&&nc.supportsFiber)try{oe=nc.inject(ec),ae=nc}catch(ft){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zl,e.createPortal=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xl(e))throw Error(a(200));return Bl(t,e,null,n)},e.createRoot=function(t,e){if(!Xl(t))throw Error(a(299));var n=!1,r="",i=Gl;return null!=e&&(!0===e.unstable_strictMode&&(n=!0),void 0!==e.identifierPrefix&&(r=e.identifierPrefix),void 0!==e.onRecoverableError&&(i=e.onRecoverableError)),e=Il(t,1,!1,null,0,n,0,r,i),t[hi]=e.current,zr(8===t.nodeType?t.parentNode:t),new Wl(e)},e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if("function"==typeof t.render)throw Error(a(188));throw t=Object.keys(t).join(","),Error(a(268,t))}return null===(t=Gt(e))?null:t.stateNode},e.flushSync=function(t){return ul(t)},e.hydrate=function(t,e,n){if(!Ql(e))throw Error(a(200));return Jl(null,t,e,!0,n)},e.hydrateRoot=function(t,e,n){if(!Xl(t))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Gl;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),e=Vl(e,null,t,1,null!=n?n:null,i,0,o,s),t[hi]=e.current,zr(t),r)for(t=0;t<r.length;t++)i=(i=(n=r[t])._getVersion)(n._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Yl(e)},e.render=function(t,e,n){if(!Ql(e))throw Error(a(200));return Jl(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!Ql(t))throw Error(a(40));return!!t._reactRootContainer&&(ul((function(){Jl(null,null,t,!1,(function(){t._reactRootContainer=null,t[hi]=null}))})),!0)},e.unstable_batchedUpdates=sl,e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Ql(n))throw Error(a(200));if(null==t||void 0===t._reactInternals)throw Error(a(38));return Jl(t,e,n,!1,r)},e.version="18.2.0-next-9e3b772b8-20220608"},2609:(t,e,n)=>{"use strict";var r=n(6027);e.createRoot=r.createRoot,e.hydrateRoot=r.hydrateRoot},6027:(t,e,n)=>{"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=n(3230)},7856:(t,e)=>{"use strict";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=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function y(t,e,n){this.props=t,this.context=e,this.refs=m,this.updater=n||g}function b(){}function w(t,e,n){this.props=t,this.context=e,this.refs=m,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(t,e){if("object"!==n(t)&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},y.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},b.prototype=y.prototype;var x=w.prototype=new b;x.constructor=w,v(x,y.prototype),x.isPureReactComponent=!0;var S=Array.isArray,k=Object.prototype.hasOwnProperty,_={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function A(t,e,n){var i,o={},a=null,s=null;if(null!=e)for(i in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)k.call(e,i)&&!E.hasOwnProperty(i)&&(o[i]=e[i]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}if(t&&t.defaultProps)for(i in u=t.defaultProps)void 0===o[i]&&(o[i]=u[i]);return{$$typeof:r,type:t,key:a,ref:s,props:o,_owner:_.current}}function P(t){return"object"===n(t)&&null!==t&&t.$$typeof===r}var C=/\/+/g;function T(t,e){return"object"===n(t)&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function N(t,e,o,a,s){var u=n(t);"undefined"!==u&&"boolean"!==u||(t=null);var l=!1;if(null===t)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case r:case i:l=!0}}if(l)return s=s(l=t),t=""===a?"."+T(l,0):a,S(s)?(o="",null!=t&&(o=t.replace(C,"$&/")+"/"),N(s,e,o,"",(function(t){return t}))):null!=s&&(P(s)&&(s=function(t,e){return{$$typeof:r,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(s,o+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(C,"$&/")+"/")+t)),e.push(s)),1;if(l=0,a=""===a?".":a+":",S(t))for(var c=0;c<t.length;c++){var f=a+T(u=t[c],c);l+=N(u,e,o,f,s)}else if("function"==typeof(f=function(t){return null===t||"object"!==n(t)?null:"function"==typeof(t=p&&t[p]||t["@@iterator"])?t:null}(t)))for(t=f.call(t),c=0;!(u=t.next()).done;)l+=N(u=u.value,e,o,f=a+T(u,c++),s);else if("object"===u)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return l}function L(t,e,n){if(null==t)return t;var r=[],i=0;return N(t,r,"","",(function(t){return e.call(n,t,i++)})),r}function M(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var O={current:null},R={transition:null},F={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:R,ReactCurrentOwner:_};e.Children={map:L,forEach:function(t,e,n){L(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return L(t,(function(){e++})),e},toArray:function(t){return L(t,(function(t){return t}))||[]},only:function(t){if(!P(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=y,e.Fragment=o,e.Profiler=s,e.PureComponent=w,e.StrictMode=a,e.Suspense=f,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,e.cloneElement=function(t,e,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=v({},t.props),o=t.key,a=t.ref,s=t._owner;if(null!=e){if(void 0!==e.ref&&(a=e.ref,s=_.current),void 0!==e.key&&(o=""+e.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(l in e)k.call(e,l)&&!E.hasOwnProperty(l)&&(i[l]=void 0===e[l]&&void 0!==u?u[l]:e[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){u=Array(l);for(var c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}return{$$typeof:r,type:t.type,key:o,ref:a,props:i,_owner:s}},e.createContext=function(t){return(t={$$typeof:l,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:u,_context:t},t.Consumer=t},e.createElement=A,e.createFactory=function(t){var e=A.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:c,render:t}},e.isValidElement=P,e.lazy=function(t){return{$$typeof:d,_payload:{_status:-1,_result:t},_init:M}},e.memo=function(t,e){return{$$typeof:h,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=R.transition;R.transition={};try{t()}finally{R.transition=e}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(t,e){return O.current.useCallback(t,e)},e.useContext=function(t){return O.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return O.current.useDeferredValue(t)},e.useEffect=function(t,e){return O.current.useEffect(t,e)},e.useId=function(){return O.current.useId()},e.useImperativeHandle=function(t,e,n){return O.current.useImperativeHandle(t,e,n)},e.useInsertionEffect=function(t,e){return O.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return O.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return O.current.useMemo(t,e)},e.useReducer=function(t,e,n){return O.current.useReducer(t,e,n)},e.useRef=function(t){return O.current.useRef(t)},e.useState=function(t){return O.current.useState(t)},e.useSyncExternalStore=function(t,e,n){return O.current.useSyncExternalStore(t,e,n)},e.useTransition=function(){return O.current.useTransition()},e.version="18.2.0"},1591:(t,e,n)=>{"use strict";t.exports=n(7856)},1374:(t,e)=>{"use strict";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)}function r(t,e){var n=t.length;t.push(e);t:for(;0<n;){var r=n-1>>>1,i=t[r];if(!(0<a(i,e)))break t;t[r]=e,t[n]=i,n=r}}function i(t){return 0===t.length?null:t[0]}function o(t){if(0===t.length)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length,o=i>>>1;r<o;){var s=2*(r+1)-1,u=t[s],l=s+1,c=t[l];if(0>a(u,n))l<i&&0>a(c,u)?(t[r]=c,t[l]=n,r=l):(t[r]=u,t[s]=n,r=s);else{if(!(l<i&&0>a(c,n)))break t;t[r]=c,t[l]=n,r=l}}}return e}function a(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"===("undefined"==typeof performance?"undefined":n(performance))&&"function"==typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var c=[],f=[],h=1,d=null,p=3,g=!1,v=!1,m=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function x(t){for(var e=i(f);null!==e;){if(null===e.callback)o(f);else{if(!(e.startTime<=t))break;o(f),e.sortIndex=e.expirationTime,r(c,e)}e=i(f)}}function S(t){if(m=!1,x(t),!v)if(null!==i(c))v=!0,R(k);else{var e=i(f);null!==e&&F(S,e.startTime-t)}}function k(t,n){v=!1,m&&(m=!1,b(P),P=-1),g=!0;var r=p;try{for(x(n),d=i(c);null!==d&&(!(d.expirationTime>n)||t&&!N());){var a=d.callback;if("function"==typeof a){d.callback=null,p=d.priorityLevel;var s=a(d.expirationTime<=n);n=e.unstable_now(),"function"==typeof s?d.callback=s:d===i(c)&&o(c),x(n)}else o(c);d=i(c)}if(null!==d)var u=!0;else{var l=i(f);null!==l&&F(S,l.startTime-n),u=!1}return u}finally{d=null,p=r,g=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,E=!1,A=null,P=-1,C=5,T=-1;function N(){return!(e.unstable_now()-T<C)}function L(){if(null!==A){var t=e.unstable_now();T=t;var n=!0;try{n=A(!0,t)}finally{n?_():(E=!1,A=null)}}else E=!1}if("function"==typeof w)_=function(){w(L)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,O=M.port2;M.port1.onmessage=L,_=function(){O.postMessage(null)}}else _=function(){y(L,0)};function R(t){A=t,E||(E=!0,_())}function F(t,n){P=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,R(k))},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<t?Math.floor(1e3/t):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(c)},e.unstable_next=function(t){switch(p){case 1:case 2:case 3:var e=3;break;default:e=p}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_scheduleCallback=function(t,o,a){var s=e.unstable_now();switch(a="object"===n(a)&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,t){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return t={id:h++,callback:o,priorityLevel:t,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(t.sortIndex=a,r(f,t),null===i(c)&&t===i(f)&&(m?(b(P),P=-1):m=!0,F(S,a-s))):(t.sortIndex=u,r(c,t),v||g||(v=!0,R(k))),t},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(t){var e=p;return function(){var n=p;p=e;try{return t.apply(this,arguments)}finally{p=n}}}},4104:(t,e,n)=>{"use strict";t.exports=n(1374)},1617:function(t,e,n){"use strict";var r;!function(i){if("function"!=typeof o){var o=function(t){return t};o.nonNative=!0}var a=o("plaintext"),s=o("html"),u=o("comment"),l=/<(\w*)>/g,c=/<\/?([^\s\/>]+)/;function f(t,e,n){return d(t=t||"",h(e=e||[],n=n||""))}function h(t,e){return{allowable_tags:t=function(t){var e,n=new Set;if("string"==typeof t)for(;e=l.exec(t);)n.add(e[1]);else o.nonNative||"function"!=typeof t[o.iterator]?"function"==typeof t.forEach&&t.forEach(n.add,n):n=new Set(t);return n}(t),tag_replacement:e,state:a,tag_buffer:"",depth:0,in_quote_char:""}}function d(t,e){if("string"!=typeof t)throw new TypeError("'html' parameter must be a string");for(var n=e.allowable_tags,r=e.tag_replacement,i=e.state,o=e.tag_buffer,l=e.depth,c=e.in_quote_char,f="",h=0,d=t.length;h<d;h++){var g=t[h];if(i===a)switch(g){case"<":i=s,o+=g;break;default:f+=g}else if(i===s)switch(g){case"<":if(c)break;l++;break;case">":if(c)break;if(l){l--;break}c="",i=a,o+=">",n.has(p(o))?f+=o:f+=r,o="";break;case'"':case"'":c=g===c?"":c||g,o+=g;break;case"-":"<!-"===o&&(i=u),o+=g;break;case" ":case"\n":if("<"===o){i=a,f+="< ",o="";break}o+=g;break;default:o+=g}else if(i===u)switch(g){case">":"--"==o.slice(-2)&&(i=a),o="";break;default:o+=g}}return e.state=i,e.tag_buffer=o,e.depth=l,e.in_quote_char=c,f}function p(t){var e=c.exec(t);return e?e[1].toLowerCase():null}f.init_streaming_mode=function(t,e){var n=h(t=t||[],e=e||"");return function(t){return d(t||"",n)}},void 0===(r=function(){return f}.call(e,n,e,t))||(t.exports=r)}()},1889:t=>{t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r<t.rangeCount;r++)n.push(t.getRangeAt(r));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||n.forEach((function(e){t.addRange(e)})),e&&e.focus()}}},6388: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(){var t="1.13.1",e="object"==("undefined"==typeof self?"undefined":a(self))&&self.self===self&&self||"object"==(void 0===n.g?"undefined":a(n.g))&&n.g.global===n.g&&n.g||Function("return this")()||{},r=Array.prototype,i=Object.prototype,o="undefined"!=typeof Symbol?Symbol.prototype:null,s=r.push,u=r.slice,l=i.toString,c=i.hasOwnProperty,f="undefined"!=typeof ArrayBuffer,h="undefined"!=typeof DataView,d=Array.isArray,p=Object.keys,g=Object.create,v=f&&ArrayBuffer.isView,m=isNaN,y=isFinite,b=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=Math.pow(2,53)-1;function S(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}}function k(t){var e=a(t);return"function"===e||"object"===e&&!!t}function _(t){return void 0===t}function E(t){return!0===t||!1===t||"[object Boolean]"===l.call(t)}function A(t){var e="[object "+t+"]";return function(t){return l.call(t)===e}}var P=A("String"),C=A("Number"),T=A("Date"),N=A("RegExp"),L=A("Error"),M=A("Symbol"),O=A("ArrayBuffer"),R=A("Function"),F=e.document&&e.document.childNodes;"object"!=("undefined"==typeof Int8Array?"undefined":a(Int8Array))&&"function"!=typeof F&&(R=function(t){return"function"==typeof t||!1});var D=R,j=A("Object"),I=h&&j(new DataView(new ArrayBuffer(8))),B="undefined"!=typeof Map&&j(new Map),z=A("DataView"),V=I?function(t){return null!=t&&D(t.getInt8)&&O(t.buffer)}:z,$=d||A("Array");function U(t,e){return null!=t&&c.call(t,e)}var q=A("Arguments");!function(){q(arguments)||(q=function(t){return U(t,"callee")})}();var H=q;function G(t){return C(t)&&m(t)}function W(t){return function(){return t}}function Y(t){return function(e){var n=t(e);return"number"==typeof n&&n>=0&&n<=x}}function X(t){return function(e){return null==e?void 0:e[t]}}var Q=X("byteLength"),K=Y(Q),J=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,Z=f?function(t){return v?v(t)&&!V(t):K(t)&&J.test(l.call(t))}:W(!1),tt=X("length");function et(t,e){e=function(t){for(var e={},n=t.length,r=0;r<n;++r)e[t[r]]=!0;return{contains:function(t){return e[t]},push:function(n){return e[n]=!0,t.push(n)}}}(e);var n=w.length,r=t.constructor,o=D(r)&&r.prototype||i,a="constructor";for(U(t,a)&&!e.contains(a)&&e.push(a);n--;)(a=w[n])in t&&t[a]!==o[a]&&!e.contains(a)&&e.push(a)}function nt(t){if(!k(t))return[];if(p)return p(t);var e=[];for(var n in t)U(t,n)&&e.push(n);return b&&et(t,e),e}function rt(t,e){var n=nt(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0}function it(t){return t instanceof it?t:this instanceof it?void(this._wrapped=t):new it(t)}function ot(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,Q(t))}it.VERSION=t,it.prototype.value=function(){return this._wrapped},it.prototype.valueOf=it.prototype.toJSON=it.prototype.value,it.prototype.toString=function(){return String(this._wrapped)};var at="[object DataView]";function st(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=a(t);return("function"===i||"object"===i||"object"==a(e))&&function t(e,n,r,i){e instanceof it&&(e=e._wrapped),n instanceof it&&(n=n._wrapped);var s=l.call(e);if(s!==l.call(n))return!1;if(I&&"[object Object]"==s&&V(e)){if(!V(n))return!1;s=at}switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(n);case"[object ArrayBuffer]":case at:return t(ot(e),ot(n),r,i)}var u="[object Array]"===s;if(!u&&Z(e)){if(Q(e)!==Q(n))return!1;if(e.buffer===n.buffer&&e.byteOffset===n.byteOffset)return!0;u=!0}if(!u){if("object"!=a(e)||"object"!=a(n))return!1;var c=e.constructor,f=n.constructor;if(c!==f&&!(D(c)&&c instanceof c&&D(f)&&f instanceof f)&&"constructor"in e&&"constructor"in n)return!1}i=i||[];for(var h=(r=r||[]).length;h--;)if(r[h]===e)return i[h]===n;if(r.push(e),i.push(n),u){if((h=e.length)!==n.length)return!1;for(;h--;)if(!st(e[h],n[h],r,i))return!1}else{var d,p=nt(e);if(h=p.length,nt(n).length!==h)return!1;for(;h--;)if(!U(n,d=p[h])||!st(e[d],n[d],r,i))return!1}return r.pop(),i.pop(),!0}(t,e,n,r)}function ut(t){if(!k(t))return[];var e=[];for(var n in t)e.push(n);return b&&et(t,e),e}function lt(t){var e=tt(t);return function(n){if(null==n)return!1;var r=ut(n);if(tt(r))return!1;for(var i=0;i<e;i++)if(!D(n[t[i]]))return!1;return t!==pt||!D(n[ct])}}var ct="forEach",ft=["clear","delete"],ht=["get","has","set"],dt=ft.concat(ct,ht),pt=ft.concat(ht),gt=["add"].concat(ft,ct,"has"),vt=B?lt(dt):A("Map"),mt=B?lt(pt):A("WeakMap"),yt=B?lt(gt):A("Set"),bt=A("WeakSet");function wt(t){for(var e=nt(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r}function xt(t){for(var e={},n=nt(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e}function St(t){var e=[];for(var n in t)D(t[n])&&e.push(n);return e.sort()}function kt(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;u<s;u++){var l=a[u];e&&void 0!==n[l]||(n[l]=o[l])}return n}}var _t=kt(ut),Et=kt(nt),At=kt(ut,!0);function Pt(t){if(!k(t))return{};if(g)return g(t);var e=function(){};e.prototype=t;var n=new e;return e.prototype=null,n}function Ct(t){return k(t)?$(t)?t.slice():_t({},t):t}function Tt(t){return $(t)?t:[t]}function Nt(t){return it.toPath(t)}function Lt(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0}function Mt(t,e,n){var r=Lt(t,Nt(e));return _(r)?n:r}function Ot(t){return t}function Rt(t){return t=Et({},t),function(e){return rt(e,t)}}function Ft(t){return t=Nt(t),function(e){return Lt(e,t)}}function Dt(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}}function jt(t,e,n){return null==t?Ot:D(t)?Dt(t,e,n):k(t)&&!$(t)?Rt(t):Ft(t)}function It(t,e){return jt(t,e,1/0)}function Bt(t,e,n){return it.iteratee!==It?it.iteratee(t,e):jt(t,e,n)}function zt(){}function Vt(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}it.toPath=Tt,it.iteratee=It;var $t=Date.now||function(){return(new Date).getTime()};function Ut(t){var e=function(e){return t[e]},n="(?:"+nt(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}}var qt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Ht=Ut(qt),Gt=Ut(xt(qt)),Wt=it.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Yt=/(.)^/,Xt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qt=/\\|'|\r|\n|\u2028|\u2029/g;function Kt(t){return"\\"+Xt[t]}var Jt=/^\s*(\w|\$)+\s*$/,Zt=0;function te(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=Pt(t.prototype),a=t.apply(o,i);return k(a)?a:o}var ee=S((function(t,e){var n=ee.placeholder;return function r(){for(var i=0,o=e.length,a=Array(o),s=0;s<o;s++)a[s]=e[s]===n?arguments[i++]:e[s];for(;i<arguments.length;)a.push(arguments[i++]);return te(t,r,this,this,a)}}));ee.placeholder=it;var ne=S((function(t,e,n){if(!D(t))throw new TypeError("Bind must be called on a function");var r=S((function(i){return te(t,r,e,this,n.concat(i))}));return r})),re=Y(tt);function ie(t,e,n,r){if(r=r||[],e||0===e){if(e<=0)return r.concat(t)}else e=1/0;for(var i=r.length,o=0,a=tt(t);o<a;o++){var s=t[o];if(re(s)&&($(s)||H(s)))if(e>1)ie(s,e-1,n,r),i=r.length;else for(var u=0,l=s.length;u<l;)r[i++]=s[u++];else n||(r[i++]=s)}return r}var oe=S((function(t,e){var n=(e=ie(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=ne(t[r],t)}return t})),ae=S((function(t,e,n){return setTimeout((function(){return t.apply(null,n)}),e)})),se=ee(ae,it,1);function ue(t){return function(){return!t.apply(this,arguments)}}function le(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}var ce=ee(le,2);function fe(t,e,n){e=Bt(e,n);for(var r,i=nt(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r}function he(t){return function(e,n,r){n=Bt(n,r);for(var i=tt(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}var de=he(1),pe=he(-1);function ge(t,e,n,r){for(var i=(n=Bt(n,r,1))(e),o=0,a=tt(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o}function ve(t,e,n){return function(r,i,o){var a=0,s=tt(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(u.call(r,a,s),G))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o<s;o+=t)if(r[o]===i)return o;return-1}}var me=ve(1,de,ge),ye=ve(-1,pe);function be(t,e,n){var r=(re(t)?de:fe)(t,e,n);if(void 0!==r&&-1!==r)return t[r]}function we(t,e,n){var r,i;if(e=Dt(e,n),re(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=nt(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t}function xe(t,e,n){e=Bt(e,n);for(var r=!re(t)&&nt(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o}function Se(t){var e=function(e,n,r,i){var o=!re(e)&&nt(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s<a;s+=t){var u=o?o[s]:s;r=n(r,e[u],u,e)}return r};return function(t,n,r,i){var o=arguments.length>=3;return e(t,Dt(n,i,4),r,o)}}var ke=Se(1),_e=Se(-1);function Ee(t,e,n){var r=[];return e=Bt(e,n),we(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function Ae(t,e,n){e=Bt(e,n);for(var r=!re(t)&&nt(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0}function Pe(t,e,n){e=Bt(e,n);for(var r=!re(t)&&nt(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1}function Ce(t,e,n,r){return re(t)||(t=wt(t)),("number"!=typeof n||r)&&(n=0),me(t,e,n)>=0}var Te=S((function(t,e,n){var r,i;return D(e)?i=e:(e=Nt(e),r=e.slice(0,-1),e=e[e.length-1]),xe(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=Lt(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))}));function Ne(t,e){return xe(t,Ft(e))}function Le(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e||"number"==typeof e&&"object"!=a(t[0])&&null!=t)for(var u=0,l=(t=re(t)?t:wt(t)).length;u<l;u++)null!=(r=t[u])&&r>o&&(o=r);else e=Bt(e,n),we(t,(function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)}));return o}function Me(t,e,n){if(null==e||n)return re(t)||(t=wt(t)),t[Vt(t.length-1)];var r=re(t)?Ct(t):wt(t),i=tt(r);e=Math.max(Math.min(e,i),0);for(var o=i-1,a=0;a<e;a++){var s=Vt(a,o),u=r[a];r[a]=r[s],r[s]=u}return r.slice(0,e)}function Oe(t,e){return function(n,r,i){var o=e?[[],[]]:{};return r=Bt(r,i),we(n,(function(e,i){var a=r(e,i,n);t(o,e,a)})),o}}var Re=Oe((function(t,e,n){U(t,n)?t[n].push(e):t[n]=[e]})),Fe=Oe((function(t,e,n){t[n]=e})),De=Oe((function(t,e,n){U(t,n)?t[n]++:t[n]=1})),je=Oe((function(t,e,n){t[n?0:1].push(e)}),!0),Ie=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Be(t,e,n){return e in n}var ze=S((function(t,e){var n={},r=e[0];if(null==t)return n;D(r)?(e.length>1&&(r=Dt(r,e[1])),e=ut(t)):(r=Be,e=ie(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var a=e[i],s=t[a];r(s,a,t)&&(n[a]=s)}return n})),Ve=S((function(t,e){var n,r=e[0];return D(r)?(r=ue(r),e.length>1&&(n=e[1])):(e=xe(ie(e,!1,!1),String),r=function(t,n){return!Ce(e,n)}),ze(t,r,n)}));function $e(t,e,n){return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function Ue(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:$e(t,t.length-e)}function qe(t,e,n){return u.call(t,null==e||n?1:e)}var He=S((function(t,e){return e=ie(e,!0,!0),Ee(t,(function(t){return!Ce(e,t)}))})),Ge=S((function(t,e){return He(t,e)}));function We(t,e,n,r){E(e)||(r=n,n=e,e=!1),null!=n&&(n=Bt(n,r));for(var i=[],o=[],a=0,s=tt(t);a<s;a++){var u=t[a],l=n?n(u,a,t):u;e&&!n?(a&&o===l||i.push(u),o=l):n?Ce(o,l)||(o.push(l),i.push(u)):Ce(i,u)||i.push(u)}return i}var Ye=S((function(t){return We(ie(t,!0,!0))}));function Xe(t){for(var e=t&&Le(t,tt).length||0,n=Array(e),r=0;r<e;r++)n[r]=Ne(t,r);return n}var Qe=S(Xe);function Ke(t,e){return t._chain?it(e).chain():e}function Je(t){return we(St(t),(function(e){var n=it[e]=t[e];it.prototype[e]=function(){var t=[this._wrapped];return s.apply(t,arguments),Ke(this,n.apply(it,t))}})),it}we(["pop","push","reverse","shift","sort","splice","unshift"],(function(t){var e=r[t];it.prototype[t]=function(){var n=this._wrapped;return null!=n&&(e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Ke(this,n)}})),we(["concat","join","slice"],(function(t){var e=r[t];it.prototype[t]=function(){var t=this._wrapped;return null!=t&&(t=e.apply(t,arguments)),Ke(this,t)}}));var Ze=Je({__proto__:null,VERSION:t,restArguments:S,isObject:k,isNull:function(t){return null===t},isUndefined:_,isBoolean:E,isElement:function(t){return!(!t||1!==t.nodeType)},isString:P,isNumber:C,isDate:T,isRegExp:N,isError:L,isSymbol:M,isArrayBuffer:O,isDataView:V,isArray:$,isFunction:D,isArguments:H,isFinite:function(t){return!M(t)&&y(t)&&!isNaN(parseFloat(t))},isNaN:G,isTypedArray:Z,isEmpty:function(t){if(null==t)return!0;var e=tt(t);return"number"==typeof e&&($(t)||P(t)||H(t))?0===e:0===tt(nt(t))},isMatch:rt,isEqual:function(t,e){return st(t,e)},isMap:vt,isWeakMap:mt,isSet:yt,isWeakSet:bt,keys:nt,allKeys:ut,values:wt,pairs:function(t){for(var e=nt(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},invert:xt,functions:St,methods:St,extend:_t,extendOwn:Et,assign:Et,defaults:At,create:function(t,e){var n=Pt(t);return e&&Et(n,e),n},clone:Ct,tap:function(t,e){return e(t),t},get:Mt,has:function(t,e){for(var n=(e=Nt(e)).length,r=0;r<n;r++){var i=e[r];if(!U(t,i))return!1;t=t[i]}return!!n},mapObject:function(t,e,n){e=Bt(e,n);for(var r=nt(t),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=e(t[s],s,t)}return o},identity:Ot,constant:W,noop:zt,toPath:Tt,property:Ft,propertyOf:function(t){return null==t?zt:function(e){return Mt(t,e)}},matcher:Rt,matches:Rt,times:function(t,e,n){var r=Array(Math.max(0,t));e=Dt(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},random:Vt,now:$t,escape:Ht,unescape:Gt,templateSettings:Wt,template:function(t,e,n){!e&&n&&(e=n),e=At({},e,it.templateSettings);var r=RegExp([(e.escape||Yt).source,(e.interpolate||Yt).source,(e.evaluate||Yt).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,(function(e,n,r,a,s){return o+=t.slice(i,s).replace(Qt,Kt),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e})),o+="';\n";var a,s=e.variable;if(s){if(!Jt.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(t){throw t.source=o,t}var u=function(t){return a.call(this,t,it)};return u.source="function("+s+"){\n"+o+"}",u},result:function(t,e,n){var r=(e=Nt(e)).length;if(!r)return D(n)?n.call(t):n;for(var i=0;i<r;i++){var o=null==t?void 0:t[e[i]];void 0===o&&(o=n,i=r),t=D(o)?o.call(t):o}return t},uniqueId:function(t){var e=++Zt+"";return t?t+e:e},chain:function(t){var e=it(t);return e._chain=!0,e},iteratee:It,partial:ee,bind:ne,bindAll:oe,memoize:function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return U(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},delay:ae,defer:se,throttle:function(t,e,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!1===n.leading?0:$t(),r=null,a=t.apply(i,o),r||(i=o=null)},l=function(){var l=$t();s||!1!==n.leading||(s=l);var c=e-(l-s);return i=this,o=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,c)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l},debounce:function(t,e,n){var r,i,o,a,s,u=function u(){var l=$t()-i;e>l?r=setTimeout(u,e-l):(r=null,n||(a=t.apply(s,o)),r||(o=s=null))},l=S((function(l){return s=this,o=l,i=$t(),r||(r=setTimeout(u,e),n&&(a=t.apply(s,o))),a}));return l.cancel=function(){clearTimeout(r),r=o=s=null},l},wrap:function(t,e){return ee(e,t)},negate:ue,compose:function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},after:function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},before:le,once:ce,findKey:fe,findIndex:de,findLastIndex:pe,sortedIndex:ge,indexOf:me,lastIndexOf:ye,find:be,detect:be,findWhere:function(t,e){return be(t,Rt(e))},each:we,forEach:we,map:xe,collect:xe,reduce:ke,foldl:ke,inject:ke,reduceRight:_e,foldr:_e,filter:Ee,select:Ee,reject:function(t,e,n){return Ee(t,ue(Bt(e)),n)},every:Ae,all:Ae,some:Pe,any:Pe,contains:Ce,includes:Ce,include:Ce,invoke:Te,pluck:Ne,where:function(t,e){return Ee(t,Rt(e))},max:Le,min:function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e||"number"==typeof e&&"object"!=a(t[0])&&null!=t)for(var u=0,l=(t=re(t)?t:wt(t)).length;u<l;u++)null!=(r=t[u])&&r<o&&(o=r);else e=Bt(e,n),we(t,(function(t,n,r){((i=e(t,n,r))<s||i===1/0&&o===1/0)&&(o=t,s=i)}));return o},shuffle:function(t){return Me(t,1/0)},sample:Me,sortBy:function(t,e,n){var r=0;return e=Bt(e,n),Ne(xe(t,(function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}})).sort((function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index})),"value")},groupBy:Re,indexBy:Fe,countBy:De,partition:je,toArray:function(t){return t?$(t)?u.call(t):P(t)?t.match(Ie):re(t)?xe(t,Ot):wt(t):[]},size:function(t){return null==t?0:re(t)?t.length:nt(t).length},pick:ze,omit:Ve,first:Ue,head:Ue,take:Ue,initial:$e,last:function(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:qe(t,Math.max(0,t.length-e))},rest:qe,tail:qe,drop:qe,compact:function(t){return Ee(t,Boolean)},flatten:function(t,e){return ie(t,e,!1)},without:Ge,uniq:We,unique:We,union:Ye,intersection:function(t){for(var e=[],n=arguments.length,r=0,i=tt(t);r<i;r++){var o=t[r];if(!Ce(e,o)){var a;for(a=1;a<n&&Ce(arguments[a],o);a++);a===n&&e.push(o)}}return e},difference:He,unzip:Xe,transpose:Xe,zip:Qe,object:function(t,e){for(var n={},r=0,i=tt(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},range:function(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i},chunk:function(t,e){if(null==e||e<1)return[];for(var n=[],r=0,i=t.length;r<i;)n.push(u.call(t,r,r+=e));return n},mixin:Je,default:it});return Ze._=Ze,Ze},"object"==a(e)?t.exports=o():void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)},672: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)}t=n.nmd(t),"undefined"!=typeof self&&self,a=function(){return function(){"use strict";var t={401:function(t,e,r){r.r(e),r.d(e,{Bowser:function(){return i},isDesktop:function(){return s},isMSEDGE:function(){return a},isMSIE:function(){return o},isMobile:function(){return u}});var i=n(3423);function o(){if("undefined"==typeof window)return!1;var t=i.getParser(window.navigator.userAgent);return Boolean(t.satisfies({windows:{"internet explorer":">=11"},edge:"18"}))}function a(){if("undefined"==typeof window)return!1;var t=i.getParser(window.navigator.userAgent);return Boolean(t.satisfies({edge:">=18"}))}function s(){return"undefined"!=typeof window&&"desktop"===i.parse(window.navigator.userAgent).platform.type}function u(){return"undefined"!=typeof window&&"mobile"===i.parse(window.navigator.userAgent).platform.type}},750:function(t,e,n){n.d(e,{default:function(){return r}});var r={$yellow:"#fe9b00",$gsOrange:"#fa6b30",$orangish:"#fa6b30",$gsOrangeDarker1:"#E46132",$orangeDisable:"#f8d4c6",$red:"#fd3229",$skyBlue:"#41a5e4",$catchyBlue:"#00a5ff",$brightBlue:"#0a83cf",$linkBlue:"#407ff3",$deepBlue:"#2b5797",$paleBlue:"#606d84",$chartDarkBlue:"#220087",$chartNavyBlue:"#0f00a0",$chartSaturatedBlue:"#000eb8",$chartBlue:"#0031cd",$chartSkyBlue:"#0757dd",$chartLapisBlue:"#195acf",$chartRoyalBlue:"#2382e9",$chartCadetBlue:"#49a7f2",$chartLightBlue:"#7ac7f9",$chartAquaBlue:"#b5e3fd",$chartWhiteBlue:"#ccebf8",$greyBlue:"#f3f6f9",$chartRose:"#f45b5b",$chartDarkRed:"#aa3f3f",$chartLightGreen:"#90ee7e",$cpwChartLightGreen:"#dcedc8",$cpwChartDarkGreen:"#c5e1a5",$chartDarkGreen:"#64a657",$chartCyanLight:"#2b908f",$chartCyanDark:"#1e6463",$chartFireBreak:"#ba2222",$chartPeach:"#ffb773",$chartLightPurple:"#ece7f5",$chartDeepPurple:"#412b98",$almostBlack:"#21232b",$deepDark:"#20232a",$dark:"#2a303b",$slate:"#414c5f",$greenCheck:"#4eaf52",$cyan:"#30c6b9",$darkViolet:"#a31dc2",$white:"#ffffff",$headerGrey:"#fafafa",$bgColor2:"#f5f5f5",$bgColor:"#f4f4f4",$slightGrey:"#e4e4e4",$popularGrey:"#eee",$greyTheme:"#DFDFDF",$lightChipColor:"#d5d5d5",$lightGrey:"#dddddd",$greyThemeText:"#939393",$grey5:"#757575",$outlineIcon:"#818181",$chipColor:"#5d5d5d",$gemOverlay:"rgba(32, 35, 42, 0.7)",$colorImage:"#7e57c2",$colorAudio:"#b83a75",$colorVideo:"#ca3e37",$errorNotification:"#c32929",$colorEmail:"#D44639",$colorDirectory:"#606d84",$warningNotification:"#f7ae46",$colorLink:"#ffa000",$colorBookmark:"#ffa000",$colorGSlides:"#F4B400",$colorProject:"#789359",$colorNote:"#4caf50",$successNotification:"#3ca741",$colorGSheets:"#0F9D58",$colorPerson:"#1d8abb",$colorGDoc:"#4285F4",$colorDropbox:"#3498d8",$colorPost:"#e2854a",$colorGroup:"#3f51b5",$colorSelfService:"#3f51b5","$colorSelf-Service":"#3f51b5","$colorSelf-Service Library":"#3f51b5",$colorDocument:"#2b5797",$colorOnedrive:"#094ab2",$colorArticle:"#8D6E63",$colorBulkUpload:"#707a7f",$colorOrganization:"#4a4a4a",$colorDecisionTree:"#7358a2","$colorDecision Tree":"#7358a2",$colorFAQ:"#2b5797"}},516:function(t,e,n){function r(t,e,n){var r=document.createElement("a");if(r.style.visibility="hidden",r.setAttribute("href",t),r.setAttribute("download",e||""),document.body.appendChild(r),!n&&window.navigator.msSaveBlob){var o=i(t);return fetch(t).then((function(t){return t.blob().then((function(t){return window.navigator.msSaveBlob(t,o)}))})),void document.body.removeChild(r)}if(window.navigator.msSaveBlob)return window.navigator.msSaveBlob(n,e||""),void document.body.removeChild(r);r.click(),document.body.removeChild(r)}n.r(e),n.d(e,{triggerDownload:function(){return r},getFilenameFromURL:function(){return i}});var i=function(t){var e;if(t.includes("shelf-download"))return t.slice(t.indexOf("shelf-download"),t.indexOf(".zip")+4).split("%").join(" ");var n=new URL(t).search,r=null===(e=new URLSearchParams(n).get("response-content-disposition"))||void 0===e?void 0:e.split("=")[1];return null==r?void 0:r.replace(/["]+/g,"")}},886:function(t,e,n){n.r(e),n.d(e,{VIEW_PORTS:function(){return r},VIEW_PORTS_MEDIAS:function(){return i},FONT_WEIGHTS:function(){return o}});var r={"$laptop-xl":2560,"$laptop-l":1900,"$laptop-m":1601,$laptop:1440,"$laptop-s":1280,"$tablet-large":1178,$tablet:1024,$mobile:768,"$mobile-l":420,"$mobile-m":380,"$mobile-s":320},i={"$break-on-mobile-width":"screen and (max-width: ".concat(r.$mobile,"px)"),"$break-on-almost-mobile-width":"screen and (max-width: ".concat(r.$mobile-1,"px)"),"$break-on-small-mobile-width":"screen and (max-width: ".concat(r["$mobile-l"],"px)"),"$break-on-tablet-width":"screen and (max-width: ".concat(r["$tablet-large"],"px)"),"$break-on-tablet-small-width":"screen and (max-width: ".concat(r.$tablet,"px)"),"$break-on-laptop-width":"screen and (max-width: ".concat(r["$laptop-s"],"px)"),"$break-on-laptop-l-width":"screen and (max-width: ".concat(r.$laptop,"px)"),"$break-on-mobile-height":"screen and (max-height: ".concat(r["$mobile-l"],"px)"),"$break-on-small-mobile-height":"screen and (max-height: ".concat(r["$mobile-m"],"px)")},o={$semiBoldFontWeight:600,$boldFontWeight:700}},934:function(t,e,n){n.r(e),n.d(e,{setEmbedded:function(){return o},getEmbedded:function(){return a}});var r="embeddedSource",i=function(){return window.location!==window.parent.location},o=function(){if(i()){var t=new URLSearchParams(window.location.search).get("embedded");t&&window.sessionStorage.setItem(r,t)}},a=function(){return i()?window.sessionStorage.getItem(r):"shelf"}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){r.r(i),r.d(i,{browserHelpers:function(){return w},clientHelpers:function(){return t},colors:function(){return d.default},config:function(){return u},contentTypesHelpers:function(){return e},copyToClipboard:function(){return N},defaultAvatarURL:function(){return h},downloadHelpers:function(){return x},naturalCollectionSort:function(){return R},naturalSort:function(){return O},staticCDNIconFont:function(){return f},staticCDNProvider:function(){return l},staticCDNSVG:function(){return c},staticHost:function(){return a},styleVariables:function(){return S},trackingHelpers:function(){return P}});var t={};r.r(t),r.d(t,{formatNumber:function(){return m},getFilenameFromURL:function(){return b},normalizeKey:function(){return y},stripHtml:function(){return v}});var e={};r.r(e),r.d(e,{getContentTypeIconURL:function(){return A},getDefaultContentTypeIcon:function(){return E}});var o=n(3153),a="static.shelf.io",u={staticHost:"static.shelf.io",localSVGHost:""},l=function(){return"https://".concat(u.staticHost)},c=function(){return(0,o.isString)(u.localSVGHost)&&Boolean(u.localSVGHost)?u.localSVGHost:"".concat(l(),"/icon-font/assets/fonts/svg-defs.svg")},f=function(){return(0,o.isString)(u.localIconFont)&&Boolean(u.localIconFont)?u.localIconFont:"".concat(l(),"/icon-font/styles.min.css")},h="".concat(l(),"/images/backgrounds/avatar.svg"),d=r(750),p=n(1617),g=r.n(p);function v(t){return g()(t)}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.maximumFractionDigits,r=void 0===n?3:n,i=Number(t);return i.toLocaleString("en-US",{maximumFractionDigits:r})}var y=function(t){return decodeURIComponent((null==t?void 0:t.replace(/\+/g," "))||"")},b=function(t){var e=(0,o.last)((0,o.split)(t,"/"))||"",n=(0,o.first)((0,o.split)(decodeURIComponent(e),"?"));return y(n)},w=r(401),x=r(516),S=r(886),k=n(490),_=r.n(k),E=function(t){var e=t.staticURL;return"".concat(void 0===e?"https://static.shelf.io":e,"/images/content-types/default_type_icon.svg")},A=function(t){var e=t.iconURL,n=t.cacheTimeoutInMinutes,r=void 0===n?1:n,i=t.staticURL,o=60*r*1e3,a=Math.floor(Date.now()/o);return _()(e)?E({staticURL:i}):"".concat(e,"?time=").concat(a)},P=r(934),C=n(1699),T=r.n(C),N=function(t,e){t&&T()(t,e)},L=n(8948);function M(t){return(M="function"==typeof Symbol&&"symbol"==s(Symbol.iterator)?function(t){return s(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":s(t)})(t)}var O=function(t,e){return(0,L.compare)()(String(t).toLocaleLowerCase(),String(e).toLocaleLowerCase())},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc",r=t.length>0&&"object"===M(t[0]);return r?(0,L.orderBy)(t,[e],[n]):(0,L.orderBy)(t,[],[n])}}(),i}()},"object"==s(e)&&"object"==s(t)?t.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},9867:function(t,e,n){var r,i,o,a;function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(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 l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||c(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 c(t,e){if(t){if("string"==typeof t)return f(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)?f(t,e):void 0}}function f(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 h(t){return(h="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)}t=n.nmd(t),"undefined"!=typeof self&&self,a=function(t,e,n,r,i,o,a,c,f,d,p,g,v){return function(){var m={4287:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var u=[].concat(t[s]);r&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),e.push(u))}},e}},5082:function(t){t.exports=function(t){return void 0===t}},5799:function(t,e,n){var r,i,o,a;function s(t){return(s="function"==typeof Symbol&&"symbol"==h(Symbol.iterator)?function(t){return h(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":h(t)})(t)}t=n.nmd(t),"undefined"!=typeof self&&self,a=function(){return function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:function(){return n}});var n={$yellow:"#fe9b00",$gsOrange:"#fa6b30",$orangish:"#fa6b30",$gsOrangeDarker1:"#E46132",$orangeDisable:"#f8d4c6",$red:"#fd3229",$skyBlue:"#41a5e4",$catchyBlue:"#00a5ff",$brightBlue:"#0a83cf",$linkBlue:"#407ff3",$deepBlue:"#2b5797",$paleBlue:"#606d84",$chartDarkBlue:"#220087",$chartNavyBlue:"#0f00a0",$chartSaturatedBlue:"#000eb8",$chartBlue:"#0031cd",$chartSkyBlue:"#0757dd",$chartLapisBlue:"#195acf",$chartRoyalBlue:"#2382e9",$chartCadetBlue:"#49a7f2",$chartLightBlue:"#7ac7f9",$chartAquaBlue:"#b5e3fd",$chartWhiteBlue:"#ccebf8",$greyBlue:"#f3f6f9",$chartRose:"#f45b5b",$chartDarkRed:"#aa3f3f",$chartLightGreen:"#90ee7e",$cpwChartLightGreen:"#dcedc8",$cpwChartDarkGreen:"#c5e1a5",$chartDarkGreen:"#64a657",$chartCyanLight:"#2b908f",$chartCyanDark:"#1e6463",$chartFireBreak:"#ba2222",$chartPeach:"#ffb773",$chartLightPurple:"#ece7f5",$chartDeepPurple:"#412b98",$almostBlack:"#21232b",$deepDark:"#20232a",$dark:"#2a303b",$slate:"#414c5f",$greenCheck:"#4eaf52",$cyan:"#30c6b9",$darkViolet:"#a31dc2",$white:"#ffffff",$headerGrey:"#fafafa",$bgColor2:"#f5f5f5",$bgColor:"#f4f4f4",$slightGrey:"#e4e4e4",$popularGrey:"#eee",$greyTheme:"#DFDFDF",$lightChipColor:"#d5d5d5",$lightGrey:"#dddddd",$greyThemeText:"#939393",$grey5:"#757575",$outlineIcon:"#818181",$chipColor:"#5d5d5d",$gemOverlay:"rgba(32, 35, 42, 0.7)",$colorImage:"#7e57c2",$colorAudio:"#b83a75",$colorVideo:"#ca3e37",$errorNotification:"#c32929",$colorEmail:"#D44639",$colorDirectory:"#606d84",$warningNotification:"#f7ae46",$colorLink:"#ffa000",$colorBookmark:"#ffa000",$colorGSlides:"#F4B400",$colorProject:"#789359",$colorNote:"#4caf50",$successNotification:"#3ca741",$colorGSheets:"#0F9D58",$colorPerson:"#1d8abb",$colorGDoc:"#4285F4",$colorDropbox:"#3498d8",$colorPost:"#e2854a",$colorGroup:"#3f51b5",$colorSelfService:"#3f51b5","$colorSelf-Service":"#3f51b5","$colorSelf-Service Library":"#3f51b5",$colorDocument:"#2b5797",$colorOnedrive:"#094ab2",$colorArticle:"#8D6E63",$colorBulkUpload:"#707a7f",$colorOrganization:"#4a4a4a",$colorDecisionTree:"#7358a2","$colorDecision Tree":"#7358a2",$colorFAQ:"#2b5797"};return e}()},"object"==s(e)&&"object"==s(t)?t.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},2780:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(4287),i=n.n(r)()((function(t){return t[1]}));i.push([t.id,".joint-link:hover path[joint-selector=line]{stroke-width:4px}.joint-port-body:hover{fill:#ddd}.joint-cell{cursor:default}.joint-cell .edit-button{opacity:0;-webkit-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.joint-cell:hover .edit-button{opacity:1}.Graph{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative}.Graph__graph-holder{padding:30px;overflow:hidden}.Graph__graph-holder svg{overflow:visible!important;cursor:move}.Graph__graph-holder[data-interactive=false] .joint-cell .edit-button{display:none}.Graph__graph-holder[data-interactive=false] .joint-port circle{cursor:default}.Graph__reorganize{position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;bottom:0;left:0;margin:20px;padding:6.5px 10px;color:#fff;background-color:hsla(0,0%,57.6%,.9);text-transform:uppercase;text-align:center;font-weight:600;font-size:14px;line-height:14px;cursor:pointer;-webkit-transition:background-color .25s ease;-o-transition:background-color .25s ease;transition:background-color .25s ease}.Graph__reorganize:hover{background-color:#939393}",""]);var o=i},6062:function(t,e,n){"use strict";var r,i=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function a(t){for(var e=-1,n=0;n<o.length;n++)if(o[n].identifier===t){e=n;break}return e}function s(t,e){for(var n={},r=[],i=0;i<t.length;i++){var s=t[i],u=e.base?s[0]+e.base:s[0],l=n[u]||0,c="".concat(u," ").concat(l);n[u]=l+1;var f=a(c),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(o[f].references++,o[f].updater(h)):o.push({identifier:c,updater:g(h,e),references:1}),r.push(c)}return r}function u(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var a=i(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var l,c=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function f(t,e,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=c(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var d=null,p=0;function g(t,e){var n,r,i;if(e.singleton){var o=p++;n=d||(d=u(e)),r=f.bind(null,n,o,!1),i=f.bind(null,n,o,!0)}else n=u(e),r=h.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<n.length;r++){var i=a(n[r]);o[i].references--}for(var u=s(t,e),l=0;l<n.length;l++){var c=a(n[l]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}n=u}}}},1723:function(t){"use strict";t.exports=r},9240:function(t){"use strict";t.exports=f},4179:function(t){"use strict";t.exports=e},4459:function(t){"use strict";t.exports=n},1273:function(t){"use strict";t.exports=c},3804:function(t){"use strict";t.exports=a},2566:function(t){"use strict";t.exports=p},6985:function(t){"use strict";t.exports=g},8718:function(t){"use strict";t.exports=i},6414:function(t){"use strict";t.exports=d},5935:function(t){"use strict";t.exports=v},9876:function(t){"use strict";t.exports=o},9297:function(e){"use strict";e.exports=t}},y={};function b(t){var e=y[t];if(void 0!==e)return e.exports;var n=y[t]={id:t,loaded:!1,exports:{}};return m[t].call(n.exports,n,n.exports,b),n.loaded=!0,n.exports}b.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return b.d(e,{a:e}),e},b.d=function(t,e){for(var n in e)b.o(e,n)&&!b.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},b.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},b.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},b.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var w={};return function(){"use strict";var t;b.r(w),b.d(w,{StaticTree:function(){return $a}});var e={};b.r(e),b.d(e,{ellipseWithEllipse:function(){return $t},ellipseWithLine:function(){return Vt},exists:function(){return Bt},lineWithLine:function(){return zt},pathWithEllipse:function(){return ne},pathWithLine:function(){return ee},pathWithPath:function(){return ae},pathWithPolygon:function(){return oe},pathWithPolyline:function(){return ie},pathWithRect:function(){return re},polygonWithEllipse:function(){return Kt},polygonWithLine:function(){return Qt},polygonWithPolygon:function(){return te},polygonWithPolyline:function(){return Zt},polygonWithRect:function(){return Jt},polylineWithEllipse:function(){return Wt},polylineWithLine:function(){return Gt},polylineWithPolyline:function(){return Xt},polylineWithRect:function(){return Yt},rectWithEllipse:function(){return qt},rectWithLine:function(){return Ut},rectWithRect:function(){return Ht}});var n={};b.r(n),b.d(n,{Curve:function(){return kt},Ellipse:function(){return Z},Line:function(){return ht},Path:function(){return Et},Point:function(){return Y},Polygon:function(){return It},Polyline:function(){return mt},Rect:function(){return ut},bezier:function(){return jt},ellipse:function(){return tt},intersection:function(){return me},line:function(){return dt},normalizeAngle:function(){return A},point:function(){return X},random:function(){return N},rect:function(){return lt},scale:function(){return E},snapToGrid:function(){return P},toDeg:function(){return C},toRad:function(){return T},types:function(){return j}});var r={};b.r(r),b.d(r,{absolute:function(){return gr},bottom:function(){return xr},ellipse:function(){return kr},ellipseSpread:function(){return Sr},fn:function(){return vr},left:function(){return yr},line:function(){return mr},right:function(){return br},top:function(){return wr}});var i={};b.r(i),b.d(i,{bottom:function(){return Or},inside:function(){return jr},insideOriented:function(){return Dr},left:function(){return Nr},manual:function(){return Tr},outside:function(){return Fr},outsideOriented:function(){return Rr},radial:function(){return Ir},radialOriented:function(){return Br},right:function(){return Lr},top:function(){return Mr}});var o={};b.r(o),b.d(o,{BorderedImage:function(){return Zr},Circle:function(){return Wr},Cylinder:function(){return ri},DoubleLink:function(){return si},Ellipse:function(){return Yr},EmbeddedImage:function(){return ti},HeaderedRectangle:function(){return ni},Image:function(){return Jr},InscribedImage:function(){return ei},Link:function(){return ai},Path:function(){return Xr},Polygon:function(){return Qr},Polyline:function(){return Kr},Rectangle:function(){return Gr},ShadowLink:function(){return ui},TextBlock:function(){return oi}});var a={};b.r(a),b.d(a,{manhattan:function(){return Zi},metro:function(){return eo},normal:function(){return bi},oneSide:function(){return wi},orthogonal:function(){return Fi}});var c={};b.r(c),b.d(c,{curve:function(){return vo},jumpover:function(){return lo},normal:function(){return co},rounded:function(){return fo},smooth:function(){return ho}});var f={};b.r(f),b.d(f,{addClass:function(){return Ro},mask:function(){return Lo},opacity:function(){return Mo},stroke:function(){return No}});var d={};b.r(d),b.d(d,{connectionClosest:function(){return zo},connectionLength:function(){return Do},connectionPerpendicular:function(){return Bo},connectionRatio:function(){return Fo},resolveRef:function(){return jo}});var p={};b.r(p),b.d(p,{anchor:function(){return qo},bbox:function(){return Ho},boundary:function(){return Wo},rectangle:function(){return Go}});var g={};b.r(g),b.d(g,{bottom:function(){return Ko},bottomLeft:function(){return na},bottomRight:function(){return ra},center:function(){return Xo},left:function(){return Jo},midSide:function(){return oa},modelCenter:function(){return aa},perpendicular:function(){return ia},right:function(){return Zo},top:function(){return Qo},topLeft:function(){return ta},topRight:function(){return ea}});var v=b(9297),m=b.n(v),y=b(5799),x=b.n(y),S=Math.round,k=Math.floor,_=Math.PI,E={linear:function(t,e,n){var r=t[1]-t[0],i=e[1]-e[0];return(n-t[0])/r*i+e[0]||0}},A=function(t){return t%360+(t<0?360:0)},P=function(t,e){return e*S(t/e)},C=function(t){return 180*t/_%360},T=function(t,e){return(t=(e=e||!1)?t:t%360)*_/180},N=function(t,e){if(void 0===e)e=void 0===t?1:t,t=0;else if(e<t){var n=t;t=e,e=n}return k(Math.random()*(e-t+1)+t)},L=Math.cos,M=Math.sin,O=Math.atan2,R=function(t,e){var n=T(t.y),r=T(e.y),i=t.x,o=e.x,a=T(o-i),s=M(a)*L(r),u=L(n)*M(r)-M(n)*L(r)*L(a),l=C(O(s,u))-22.5;return l<0&&(l+=360),["NE","E","SE","S","SW","W","NW","N"][l=parseInt(l/45)]},F=function(t,e){var n=t.x,r=t.y;return(n-=e.x)*n+(r-=e.y)*r},D=function(t,e){return Math.sqrt(F(t,e))},j={Point:1,Line:2,Ellipse:3,Rect:4,Polyline:5,Polygon:6,Curve:7,Path:8},I=Math.abs,B=Math.cos,z=Math.sin,V=Math.sqrt,$=Math.min,U=Math.max,q=Math.atan2,H=Math.round,G=Math.pow,W=Math.PI,Y=function t(e,n){if(!(this instanceof t))return new t(e,n);if("string"==typeof e){var r=e.split(-1===e.indexOf("@")?" ":"@");e=parseFloat(r[0]),n=parseFloat(r[1])}else Object(e)===e&&(n=e.y,e=e.x);this.x=void 0===e?0:e,this.y=void 0===n?0:n};Y.fromPolar=function(t,e,n){n=new Y(n);var r=I(t*B(e)),i=I(t*z(e)),o=A(C(e));return o<90?i=-i:o<180?(r=-r,i=-i):o<270&&(r=-r),new Y(n.x+r,n.y+i)},Y.random=function(t,e,n,r){return new Y(N(t,e),N(n,r))},Y.prototype={type:j.Point,chooseClosest:function(t){var e=t.length;if(1===e)return new Y(t[0]);for(var n=null,r=1/0,i=0;i<e;i++){var o=new Y(t[i]),a=this.squaredDistance(o);a<r&&(n=o,r=a)}return n},adhereToRect:function(t){return t.containsPoint(this)||(this.x=$(U(this.x,t.x),t.x+t.width),this.y=$(U(this.y,t.y),t.y+t.height)),this},angleBetween:function(t,e){var n=this.equals(t)||this.equals(e)?NaN:this.theta(e)-this.theta(t);return n<0&&(n+=360),n},bearing:function(t){return R(this,t)},changeInAngle:function(t,e,n){return this.clone().offset(-t,-e).theta(n)-this.theta(n)},clone:function(){return new Y(this)},cross:function(t,e){return t&&e?(e.x-this.x)*(t.y-this.y)-(e.y-this.y)*(t.x-this.x):NaN},difference:function(t,e){return Object(t)===t&&(e=t.y,t=t.x),new Y(this.x-(t||0),this.y-(e||0))},distance:function(t){return D(this,t)},dot:function(t){return t?this.x*t.x+this.y*t.y:NaN},equals:function(t){return!!t&&this.x===t.x&&this.y===t.y},lerp:function(t,e){var n=this.x,r=this.y;return new Y((1-e)*n+e*t.x,(1-e)*r+e*t.y)},magnitude:function(){return V(this.x*this.x+this.y*this.y)||.01},manhattanDistance:function(t){return I(t.x-this.x)+I(t.y-this.y)},move:function(t,e){var n=T(new Y(t).theta(this));return this.offset(B(n)*e,-z(n)*e)},normalize:function(t){var e=(t||1)/this.magnitude();return this.scale(e,e)},offset:function(t,e){return Object(t)===t&&(e=t.y,t=t.x),this.x+=t||0,this.y+=e||0,this},reflection:function(t){return new Y(t).move(this,this.distance(t))},rotate:function(t,e){if(0===e)return this;t=t||new Y(0,0),e=T(A(-e));var n=B(e),r=z(e),i=n*(this.x-t.x)-r*(this.y-t.y)+t.x,o=r*(this.x-t.x)+n*(this.y-t.y)+t.y;return this.x=i,this.y=o,this},round:function(t){var e=1;if(t)switch(t){case 1:e=10;break;case 2:e=100;break;case 3:e=1e3;break;default:e=G(10,t)}return this.x=H(this.x*e)/e,this.y=H(this.y*e)/e,this},scale:function(t,e,n){return n=n&&new Y(n)||new Y(0,0),this.x=n.x+t*(this.x-n.x),this.y=n.y+e*(this.y-n.y),this},snapToGrid:function(t,e){return this.x=P(this.x,t),this.y=P(this.y,e||t),this},squaredDistance:function(t){return F(this,t)},theta:function(t){var e=-((t=new Y(t)).y-this.y),n=t.x-this.x,r=q(e,n);return r<0&&(r=2*W+r),180*r/W},toJSON:function(){return{x:this.x,y:this.y}},toPolar:function(t){t=t&&new Y(t)||new Y(0,0);var e=this.x,n=this.y;return this.x=V((e-t.x)*(e-t.x)+(n-t.y)*(n-t.y)),this.y=T(t.theta(new Y(e,n))),this},toString:function(){return this.x+"@"+this.y},serialize:function(){return this.x+","+this.y},update:function(t,e){return Object(t)===t&&(e=t.y,t=t.x),this.x=t||0,this.y=e||0,this},vectorAngle:function(t){return new Y(0,0).angleBetween(this,t)}},Y.prototype.translate=Y.prototype.offset;var X=Y,Q=Math.sqrt,K=Math.round,J=Math.pow,Z=function t(e,n,r){return this instanceof t?e instanceof t?new t(new Y(e.x,e.y),e.a,e.b):(e=new Y(e),this.x=e.x,this.y=e.y,this.a=n,void(this.b=r)):new t(e,n,r)};Z.fromRect=function(t){return t=new ut(t),new Z(t.center(),t.width/2,t.height/2)},Z.prototype={type:j.Ellipse,bbox:function(){return new ut(this.x-this.a,this.y-this.b,2*this.a,2*this.b)},center:function(){return new Y(this.x,this.y)},clone:function(){return new Z(this)},containsPoint:function(t){return this.normalizedDistance(t)<=1},equals:function(t){return!!t&&t.x===this.x&&t.y===this.y&&t.a===this.a&&t.b===this.b},inflate:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.a+=2*t,this.b+=2*e,this},intersectionWithLine:function(t){var e=[],n=t.start,r=t.end,i=this.a,o=this.b,a=t.vector(),s=n.difference(new Y(this)),u=new Y(a.x/(i*i),a.y/(o*o)),l=new Y(s.x/(i*i),s.y/(o*o)),c=a.dot(u),f=a.dot(l),h=f*f-c*(s.dot(l)-1);if(h<0)return null;if(h>0){var d=Q(h),p=(-f-d)/c,g=(-f+d)/c;if((p<0||1<p)&&(g<0||1<g))return null;0<=p&&p<=1&&e.push(n.lerp(r,p)),0<=g&&g<=1&&e.push(n.lerp(r,g))}else{var v=-f/c;if(!(0<=v&&v<=1))return null;e.push(n.lerp(r,v))}return e},intersectionWithLineFromCenterToPoint:function(t,e){t=new Y(t),e&&t.rotate(new Y(this.x,this.y),e);var n,r=t.x-this.x,i=t.y-this.y;if(0===r)return n=this.bbox().pointNearestToPoint(t),e?n.rotate(new Y(this.x,this.y),-e):n;var o=i/r,a=o*o,s=this.a*this.a,u=this.b*this.b,l=Q(1/(1/s+a/u)),c=o*(l=r<0?-l:l);return n=new Y(this.x+l,this.y+c),e?n.rotate(new Y(this.x,this.y),-e):n},normalizedDistance:function(t){var e=t.x,n=t.y,r=this.a,i=this.b,o=this.x,a=this.y;return(e-o)*(e-o)/(r*r)+(n-a)*(n-a)/(i*i)},round:function(t){var e=1;if(t)switch(t){case 1:e=10;break;case 2:e=100;break;case 3:e=1e3;break;default:e=J(10,t)}return this.x=K(this.x*e)/e,this.y=K(this.y*e)/e,this.a=K(this.a*e)/e,this.b=K(this.b*e)/e,this},tangentTheta:function(t){var e,n,r=t.x,i=t.y,o=this.a,a=this.b,s=this.bbox().center(),u=s.x,l=s.y,c=r>s.x+o/2,f=r<s.x-o/2;return c||f?n=o*o/(r-u)-o*o*(i-l)*((e=r>s.x?i-30:i+30)-l)/(a*a*(r-u))+u:e=a*a/(i-l)-a*a*(r-u)*((n=i>s.y?r+30:r-30)-u)/(o*o*(i-l))+l,new Y(n,e).theta(t)},toString:function(){return new Y(this.x,this.y).toString()+" "+this.a+" "+this.b}};var tt=Z,et=Math.abs,nt=Math.cos,rt=Math.sin,it=Math.min,ot=Math.max,at=Math.round,st=Math.pow,ut=function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);Object(e)===e&&(n=e.y,r=e.width,i=e.height,e=e.x),this.x=void 0===e?0:e,this.y=void 0===n?0:n,this.width=void 0===r?0:r,this.height=void 0===i?0:i};ut.fromEllipse=function(t){return t=new Z(t),new ut(t.x-t.a,t.y-t.b,2*t.a,2*t.b)},ut.fromPointUnion=function(){if(0===arguments.length)return null;var t,e,n,r,i=new Y;t=e=1/0,n=r=-1/0;for(var o=0;o<arguments.length;o++){i.update(o<0||arguments.length<=o?void 0:arguments[o]);var a=i.x,s=i.y;a<t&&(t=a),a>n&&(n=a),s<e&&(e=s),s>r&&(r=s)}return new ut(t,e,n-t,r-e)},ut.fromRectUnion=function(){if(0===arguments.length)return null;var t,e,n,r,i=new ut;t=e=1/0,n=r=-1/0;for(var o=0;o<arguments.length;o++){i.update(o<0||arguments.length<=o?void 0:arguments[o]);var a=i.x,s=i.y,u=a+i.width,l=s+i.height;a<t&&(t=a),u>n&&(n=u),s<e&&(e=s),l>r&&(r=l)}return new ut(t,e,n-t,r-e)},ut.prototype={type:j.Rect,bbox:function(t){return this.clone().rotateAroundCenter(t)},rotateAroundCenter:function(t){if(!t)return this;var e=this.width,n=this.height,r=T(t),i=et(rt(r)),o=et(nt(r)),a=e*o+n*i,s=e*i+n*o;return this.x+=(e-a)/2,this.y+=(n-s)/2,this.width=a,this.height=s,this},bottomLeft:function(){return new Y(this.x,this.y+this.height)},bottomLine:function(){return new ht(this.bottomLeft(),this.bottomRight())},bottomMiddle:function(){return new Y(this.x+this.width/2,this.y+this.height)},center:function(){return new Y(this.x+this.width/2,this.y+this.height/2)},clone:function(){return new ut(this)},containsPoint:function(t){return(t=new Y(t)).x>=this.x&&t.x<=this.x+this.width&&t.y>=this.y&&t.y<=this.y+this.height},containsRect:function(t){var e=new ut(this).normalize(),n=new ut(t).normalize(),r=e.width,i=e.height,o=n.width,a=n.height;if(!(r&&i&&o&&a))return!1;var s=e.x,u=e.y,l=n.x,c=n.y;return o+=l,r+=s,a+=c,i+=u,s<=l&&o<=r&&u<=c&&a<=i},corner:function(){return new Y(this.x+this.width,this.y+this.height)},equals:function(t){var e=new ut(this).normalize(),n=new ut(t).normalize();return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height},inflate:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this},intersect:function(t){var e=this.origin(),n=this.corner(),r=t.origin(),i=t.corner();if(i.x<=e.x||i.y<=e.y||r.x>=n.x||r.y>=n.y)return null;var o=ot(e.x,r.x),a=ot(e.y,r.y);return new ut(o,a,it(n.x,i.x)-o,it(n.y,i.y)-a)},intersectionWithLine:function(t){var e,n,r=this,i=[r.topLine(),r.rightLine(),r.bottomLine(),r.leftLine()],o=[],a=[],s=i.length;for(n=0;n<s;n++)null!==(e=t.intersect(i[n]))&&a.indexOf(e.toString())<0&&(o.push(e),a.push(e.toString()));return o.length>0?o:null},intersectionWithLineFromCenterToPoint:function(t,e){t=new Y(t);var n,r=new Y(this.x+this.width/2,this.y+this.height/2);e&&t.rotate(r,e);for(var i=[this.topLine(),this.rightLine(),this.bottomLine(),this.leftLine()],o=new ht(r,t),a=i.length-1;a>=0;--a){var s=i[a].intersection(o);if(null!==s){n=s;break}}return n&&e&&n.rotate(r,-e),n},leftLine:function(){return new ht(this.topLeft(),this.bottomLeft())},leftMiddle:function(){return new Y(this.x,this.y+this.height/2)},maxRectScaleToFit:function(t,e){var n,r,i,o,a,s,u,l;t=new ut(t),e||(e=t.center());var c=e.x,f=e.y;n=r=i=o=a=s=u=l=1/0;var h=t.topLeft();h.x<c&&(n=(this.x-c)/(h.x-c)),h.y<f&&(a=(this.y-f)/(h.y-f));var d=t.bottomRight();d.x>c&&(r=(this.x+this.width-c)/(d.x-c)),d.y>f&&(s=(this.y+this.height-f)/(d.y-f));var p=t.topRight();p.x>c&&(i=(this.x+this.width-c)/(p.x-c)),p.y<f&&(u=(this.y-f)/(p.y-f));var g=t.bottomLeft();return g.x<c&&(o=(this.x-c)/(g.x-c)),g.y>f&&(l=(this.y+this.height-f)/(g.y-f)),{sx:it(n,r,i,o),sy:it(a,s,u,l)}},maxRectUniformScaleToFit:function(t,e){var n=this.maxRectScaleToFit(t,e);return it(n.sx,n.sy)},moveAndExpand:function(t){return this.x+=t.x||0,this.y+=t.y||0,this.width+=t.width||0,this.height+=t.height||0,this},normalize:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return this.width<0&&(t=this.x+this.width,n=-this.width),this.height<0&&(e=this.y+this.height,r=-this.height),this.x=t,this.y=e,this.width=n,this.height=r,this},offset:function(t,e){return Y.prototype.offset.call(this,t,e)},origin:function(){return new Y(this.x,this.y)},pointNearestToPoint:function(t){if(t=new Y(t),this.containsPoint(t))switch(this.sideNearestToPoint(t)){case"right":return new Y(this.x+this.width,t.y);case"left":return new Y(this.x,t.y);case"bottom":return new Y(t.x,this.y+this.height);case"top":return new Y(t.x,this.y)}return t.adhereToRect(this)},rightLine:function(){return new ht(this.topRight(),this.bottomRight())},rightMiddle:function(){return new Y(this.x+this.width,this.y+this.height/2)},round:function(t){var e=1;if(t)switch(t){case 1:e=10;break;case 2:e=100;break;case 3:e=1e3;break;default:e=st(10,t)}return this.x=at(this.x*e)/e,this.y=at(this.y*e)/e,this.width=at(this.width*e)/e,this.height=at(this.height*e)/e,this},scale:function(t,e,n){return n=this.origin().scale(t,e,n),this.x=n.x,this.y=n.y,this.width*=t,this.height*=e,this},sideNearestToPoint:function(t){var e=(t=new Y(t)).x-this.x,n=this.x+this.width-t.x,r=t.y-this.y,i=e,o="left";return n<i&&(i=n,o="right"),r<i&&(i=r,o="top"),this.y+this.height-t.y<i&&(o="bottom"),o},snapToGrid:function(t,e){var n=this.origin().snapToGrid(t,e),r=this.corner().snapToGrid(t,e);return this.x=n.x,this.y=n.y,this.width=r.x-n.x,this.height=r.y-n.y,this},toJSON:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},topLine:function(){return new ht(this.topLeft(),this.topRight())},topMiddle:function(){return new Y(this.x+this.width/2,this.y)},topRight:function(){return new Y(this.x+this.width,this.y)},toString:function(){return this.origin().toString()+" "+this.corner().toString()},union:function(t){return ut.fromRectUnion(this,t)},update:function(t,e,n,r){return Object(t)===t&&(e=t.y,n=t.width,r=t.height,t=t.x),this.x=t||0,this.y=e||0,this.width=n||0,this.height=r||0,this}},ut.prototype.bottomRight=ut.prototype.corner,ut.prototype.topLeft=ut.prototype.origin,ut.prototype.translate=ut.prototype.offset;var lt=ut,ct=Math.max,ft=Math.min,ht=function t(e,n){return this instanceof t?e instanceof t?new t(e.start,e.end):(this.start=new Y(e),void(this.end=new Y(n))):new t(e,n)};ht.prototype={type:j.Line,angle:function(){var t=new Y(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,t)},bbox:function(){var t=ft(this.start.x,this.end.x),e=ft(this.start.y,this.end.y),n=ct(this.start.x,this.end.x),r=ct(this.start.y,this.end.y);return new ut(t,e,n-t,r-e)},bearing:function(){return R(this.start,this.end)},clone:function(){return new ht(this.start,this.end)},closestPoint:function(t){return this.pointAt(this.closestPointNormalizedLength(t))},closestPointLength:function(t){return this.closestPointNormalizedLength(t)*this.length()},closestPointNormalizedLength:function(t){var e=this.vector().dot(new ht(this.start,t).vector()),n=ft(1,ct(0,e/this.squaredLength()));return n!=n?0:n},closestPointTangent:function(t){return this.tangentAt(this.closestPointNormalizedLength(t))},containsPoint:function(t){var e=this.start,n=this.end;if(0!==e.cross(t,n))return!1;var r=this.length();return!(new ht(e,t).length()>r||new ht(t,n).length()>r)},divideAt:function(t){var e=this.pointAt(t);return[new ht(this.start,e),new ht(e,this.end)]},divideAtLength:function(t){var e=this.pointAtLength(t);return[new ht(this.start,e),new ht(e,this.end)]},equals:function(t){return!!t&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.end.x===t.end.x&&this.end.y===t.end.y},intersect:function(t,e){if(t&&t.intersectionWithLine){var n=t.intersectionWithLine(this,e);return n&&t instanceof ht&&(n=n[0]),n}return null},intersectionWithLine:function(t){var e=new Y(this.end.x-this.start.x,this.end.y-this.start.y),n=new Y(t.end.x-t.start.x,t.end.y-t.start.y),r=e.x*n.y-e.y*n.x,i=new Y(t.start.x-this.start.x,t.start.y-this.start.y),o=i.x*n.y-i.y*n.x,a=i.x*e.y-i.y*e.x;if(0===r||o*r<0||a*r<0)return null;if(r>0){if(o>r||a>r)return null}else if(o<r||a<r)return null;return[new Y(this.start.x+o*e.x/r,this.start.y+o*e.y/r)]},isDifferentiable:function(){return!this.start.equals(this.end)},length:function(){return D(this.start,this.end)},midpoint:function(){return new Y((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)},parallel:function(t){var e=this.clone();if(!this.isDifferentiable())return e;var n=e.start,r=e.end,i=n.clone().rotate(r,270),o=r.clone().rotate(n,90);return n.move(o,t),r.move(i,t),e},pointAt:function(t){var e=this.start,n=this.end;return t<=0?e.clone():t>=1?n.clone():e.lerp(n,t)},pointAtLength:function(t){var e=this.start,n=this.end,r=!0;t<0&&(r=!1,t=-t);var i=this.length();return t>=i?r?n.clone():e.clone():this.pointAt((r?t:i-t)/i)},pointOffset:function(t){t=new Y(t);var e=this.start,n=this.end;return((n.x-e.x)*(t.y-e.y)-(n.y-e.y)*(t.x-e.x))/this.length()},rotate:function(t,e){return this.start.rotate(t,e),this.end.rotate(t,e),this},round:function(t){return this.start.round(t),this.end.round(t),this},scale:function(t,e,n){return this.start.scale(t,e,n),this.end.scale(t,e,n),this},setLength:function(t){var e=this.length();if(!e)return this;var n=t/e;return this.scale(n,n,this.start)},squaredLength:function(){return F(this.start,this.end)},tangentAt:function(t){if(!this.isDifferentiable())return null;var e=this.start,n=this.end,r=this.pointAt(t),i=new ht(e,n);return i.translate(r.x-e.x,r.y-e.y),i},tangentAtLength:function(t){if(!this.isDifferentiable())return null;var e=this.start,n=this.end,r=this.pointAtLength(t),i=new ht(e,n);return i.translate(r.x-e.x,r.y-e.y),i},toString:function(){return this.start.toString()+" "+this.end.toString()},serialize:function(){return this.start.serialize()+" "+this.end.serialize()},translate:function(t,e){return this.start.translate(t,e),this.end.translate(t,e),this},vector:function(){return new Y(this.end.x-this.start.x,this.end.y-this.start.y)}},ht.prototype.intersection=ht.prototype.intersect;var dt=ht;function pt(t){if(""===(t=t.trim()))return[];for(var e=[],n=t.split(/\s*,\s*|\s+/),r=n.length,i=0;i<r;i+=2)e.push({x:+n[i],y:+n[i+1]});return e}function gt(t){var e=t.length;if(0===e)return[];for(var n=[],r=0;r<e;r++){var i=t[r].clone();n.push(i)}return n}function vt(t){var e,n,r,i=Math.abs,o=t.length;if(0===o)return[];for(e=0;e<o;e++)(void 0===r||t[e].y<r.y||t[e].y===r.y&&t[e].x>r.x)&&(r=t[e]);var a=[];for(e=0;e<o;e++){var s=r.theta(t[e]);0===s&&(s=360);var u=[t[e],e,s];a.push(u)}if(a.sort((function(t,e){var n=t[2]-e[2];return 0===n&&(n=e[1]-t[1]),n})),a.length>2){var l=a[a.length-1];a.unshift(l)}for(var c,f,h,d,p,g,v,m={},y=[];0!==a.length;)if(f=(c=a.pop())[0],!m.hasOwnProperty(c[0]+"@@"+c[1]))for(var b=!1;!b;)if(y.length<2)y.push(c),b=!0;else{d=(h=y.pop())[0];var w=(g=(p=y.pop())[0]).cross(d,f);if(w<0)y.push(p),y.push(h),y.push(c),b=!0;else if(0===w){var x=d.angleBetween(g,f);i(x-180)<1e-10||d.equals(f)||g.equals(d)?(m[h[0]+"@@"+h[1]]=d,y.push(p)):i((x+1)%360-1)<1e-10&&(y.push(p),a.push(h))}else m[h[0]+"@@"+h[1]]=d,y.push(p)}y.length>2&&y.pop();var S=-1;for(n=y.length,e=0;e<n;e++){var k=y[e][1];(void 0===v||k<v)&&(v=k,S=e)}var _=[];if(S>0){var E=y.slice(S),A=y.slice(0,S);_=E.concat(A)}else _=y;var P=[];for(n=_.length,e=0;e<n;e++)P.push(_[e][0]);return P}var mt=function t(e){return this instanceof t?"string"==typeof e?new t.parse(e):void(this.points=Array.isArray(e)?e.map(Y):[]):new t(e)};mt.parse=function(t){return new mt(pt(t))},mt.fromRect=function(t){return new mt([t.topLeft(),t.topRight(),t.bottomRight(),t.bottomLeft(),t.topLeft()])},mt.prototype={type:j.Polyline,bbox:function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=this.points,o=i.length;if(0===o)return null;for(var a=0;a<o;a++){var s=i[a],u=s.x,l=s.y;u<t&&(t=u),u>e&&(e=u),l<n&&(n=l),l>r&&(r=l)}return new ut(t,n,e-t,r-n)},clone:function(){return new mt(gt(this.points))},closestPoint:function(t){var e=this.closestPointLength(t);return this.pointAtLength(e)},closestPointLength:function(t){var e,n=this.lengthPoints(),r=n.length;if(0===r)return 0;if(1===r)return 0;for(var i=1/0,o=0,a=r-1,s=0;s<a;s++){var u=new ht(n[s],n[s+1]),l=u.length(),c=u.closestPointNormalizedLength(t),f=u.pointAt(c).squaredDistance(t);f<i&&(i=f,e=o+c*l),o+=l}return e},closestPointNormalizedLength:function(t){var e=this.closestPointLength(t);if(0===e)return 0;var n=this.length();return 0===n?0:e/n},closestPointTangent:function(t){var e=this.closestPointLength(t);return this.tangentAtLength(e)},containsPoint:function(t){var e=this.points,n=e.length;if(0===n)return!1;for(var r=t.x,i=t.y,o=n-1,a=0,s=0,u=new ht,l=new ht,c=new Y;a<n;a++){var f=e[o],h=e[a];if(t.equals(f))return!0;if(u.start=f,u.end=h,u.containsPoint(t))return!0;if(i<=f.y&&i>h.y||i>f.y&&i<=h.y){var d=f.x-r>h.x-r?f.x-r:h.x-r;d>=0&&(c.x=r+d,c.y=i,l.start=t,l.end=c,u.intersect(l)&&s++)}o=a}return s%2==1},close:function(){var t=this.start,e=this.end,n=this.points;return t&&e&&!t.equals(e)&&n.push(t.clone()),this},lengthPoints:function(){return this.points},convexHull:function(){return new mt(vt(this.points))},equals:function(t){if(!t)return!1;var e=this.points,n=t.points,r=e.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=e[i],a=t.points[i];if(!o.equals(a))return!1}return!0},intersectionWithLine:function(t){for(var e=new ht(t),n=[],r=this.lengthPoints(),i=new ht,o=0,a=r.length-1;o<a;o++){i.start=r[o],i.end=r[o+1];var s=e.intersectionWithLine(i);s&&n.push(s[0])}return n.length>0?n:null},isDifferentiable:function(){var t=this.points,e=t.length;if(0===e)return!1;for(var n=new ht,r=e-1,i=0;i<r;i++)if(n.start=t[i],n.end=t[i+1],n.isDifferentiable())return!0;return!1},length:function(){var t=this.lengthPoints(),e=t.length;if(0===e)return 0;for(var n=0,r=e-1,i=0;i<r;i++)n+=t[i].distance(t[i+1]);return n},pointAt:function(t){var e=this.lengthPoints(),n=e.length;if(0===n)return null;if(1===n)return e[0].clone();if(t<=0)return e[0].clone();if(t>=1)return e[n-1].clone();var r=this.length()*t;return this.pointAtLength(r)},pointAtLength:function(t){var e=this.lengthPoints(),n=e.length;if(0===n)return null;if(1===n)return e[0].clone();var r=!0;t<0&&(r=!1,t=-t);for(var i=0,o=n-1,a=0;a<o;a++){var s=r?a:o-1-a,u=e[s],l=e[s+1],c=new ht(u,l),f=u.distance(l);if(t<=i+f)return c.pointAtLength((r?1:-1)*(t-i));i+=f}return(r?e[n-1]:e[0]).clone()},round:function(t){for(var e=this.points,n=e.length,r=0;r<n;r++)e[r].round(t);return this},scale:function(t,e,n){for(var r=this.points,i=r.length,o=0;o<i;o++)r[o].scale(t,e,n);return this},simplify:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.points;if(e.length<3)return this;for(var n=t.threshold||0,r=0;e[r+2];){var i=r+1,o=r+2,a=e[r],s=e[i],u=e[o];new ht(a,u).closestPoint(s).distance(s)<=n?e.splice(i,1):r+=1}return this},tangentAt:function(t){var e=this.lengthPoints().length;if(0===e)return null;if(1===e)return null;t<0&&(t=0),t>1&&(t=1);var n=this.length()*t;return this.tangentAtLength(n)},tangentAtLength:function(t){var e=this.lengthPoints(),n=e.length;if(0===n)return null;if(1===n)return null;var r,i=!0;t<0&&(i=!1,t=-t);for(var o=0,a=n-1,s=0;s<a;s++){var u=i?s:a-1-s,l=e[u],c=e[u+1],f=new ht(l,c),h=l.distance(c);if(f.isDifferentiable()){if(t<=o+h)return f.tangentAtLength((i?1:-1)*(t-o));r=f}o+=h}if(r){var d=i?1:0;return r.tangentAt(d)}return null},toString:function(){return this.points+""},translate:function(t,e){for(var n=this.points,r=n.length,i=0;i<r;i++)n[i].translate(t,e);return this},serialize:function(){var t=this.points,e=t.length;if(0===e)return"";for(var n="",r=0;r<e;r++){var i=t[r];n+=i.x+","+i.y+" "}return n.trim()}},Object.defineProperty(mt.prototype,"start",{configurable:!0,enumerable:!0,get:function(){return 0===this.points.length?null:this.points[0]}}),Object.defineProperty(mt.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var t=this.points.length;return 0===t?null:this.points[t-1]}});var yt=Math.abs,bt=Math.sqrt,wt=Math.min,xt=Math.max,St=Math.pow,kt=function t(e,n,r,i){return this instanceof t?e instanceof t?new t(e.start,e.controlPoint1,e.controlPoint2,e.end):(this.start=new Y(e),this.controlPoint1=new Y(n),this.controlPoint2=new Y(r),void(this.end=new Y(i))):new t(e,n,r,i)};function _t(t){var e,n,r=[];for(n=arguments.length,e=1;e<n;e++)r.push(arguments[e]);if(!t)throw new Error("Missing a parent object.");var i=Object.create(t);for(n=r.length,e=0;e<n;e++){var o,a,s=r[e];for(a in s)s.hasOwnProperty(a)&&(delete i[a],o=Object.getOwnPropertyDescriptor(s,a),Object.defineProperty(i,a,o))}return i}kt.throughPoints=function(){function t(t){var e=t.length,n=[],r=[],i=2;n[0]=t[0]/i;for(var o=1;o<e;o++)r[o]=1/i,i=(o<e-1?4:3.5)-r[o],n[o]=(t[o]-n[o-1])/i;for(o=1;o<e;o++)n[e-o-1]-=r[e-o]*n[e-o];return n}return function(e){if(!e||Array.isArray(e)&&e.length<2)throw new Error("At least 2 points are required");for(var n=function(e){var n,r=[],i=[],o=e.length-1;if(1==o)return r[0]=new Y((2*e[0].x+e[1].x)/3,(2*e[0].y+e[1].y)/3),i[0]=new Y(2*r[0].x-e[0].x,2*r[0].y-e[0].y),[r,i];var a=[];for(n=1;n<o-1;n++)a[n]=4*e[n].x+2*e[n+1].x;a[0]=e[0].x+2*e[1].x,a[o-1]=(8*e[o-1].x+e[o].x)/2;var s=t(a);for(n=1;n<o-1;++n)a[n]=4*e[n].y+2*e[n+1].y;a[0]=e[0].y+2*e[1].y,a[o-1]=(8*e[o-1].y+e[o].y)/2;var u=t(a);for(n=0;n<o;n++)r.push(new Y(s[n],u[n])),n<o-1?i.push(new Y(2*e[n+1].x-s[n+1],2*e[n+1].y-u[n+1])):i.push(new Y((e[o].x+s[o-1])/2,(e[o].y+u[o-1])/2));return[r,i]}(e),r=[],i=n[0].length,o=0;o<i;o++){var a=new Y(n[0][o].x,n[0][o].y),s=new Y(n[1][o].x,n[1][o].y);r.push(new kt(e[o],a,s,e[o+1]))}return r}}(),kt.prototype={type:j.Curve,bbox:function(){for(var t,e,n,r,i,o,a,s,u=this.start,l=this.controlPoint1,c=this.controlPoint2,f=this.end,h=u.x,d=u.y,p=l.x,g=l.y,v=c.x,m=c.y,y=f.x,b=f.y,w=new Array,x=new Array,S=[new Array,new Array],k=0;k<2;++k)if(0===k?(e=6*h-12*p+6*v,t=-3*h+9*p-9*v+3*y,n=3*p-3*h):(e=6*d-12*g+6*m,t=-3*d+9*g-9*m+3*b,n=3*g-3*d),yt(t)<1e-12){if(yt(e)<1e-12)continue;0<(r=-n/e)&&r<1&&x.push(r)}else s=bt(a=e*e-4*n*t),a<0||(0<(i=(-e+s)/(2*t))&&i<1&&x.push(i),0<(o=(-e-s)/(2*t))&&o<1&&x.push(o));for(var _,E,A,P=x.length,C=P;P--;)E=(_=1-(r=x[P]))*_*_*h+3*_*_*r*p+3*_*r*r*v+r*r*r*y,S[0][P]=E,A=_*_*_*d+3*_*_*r*g+3*_*r*r*m+r*r*r*b,S[1][P]=A,w[P]={X:E,Y:A};x[C]=0,x[C+1]=1,w[C]={X:h,Y:d},w[C+1]={X:y,Y:b},S[0][C]=h,S[1][C]=d,S[0][C+1]=y,S[1][C+1]=b,x.length=C+2,S[0].length=C+2,S[1].length=C+2,w.length=C+2;var T=wt.apply(null,S[0]),N=wt.apply(null,S[1]),L=xt.apply(null,S[0]),M=xt.apply(null,S[1]);return new ut(T,N,L-T,M-N)},clone:function(){return new kt(this.start,this.controlPoint1,this.controlPoint2,this.end)},closestPoint:function(t,e){return this.pointAtT(this.closestPointT(t,e))},closestPointLength:function(t,e){var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,subdivisions:void 0===e.subdivisions?this.getSubdivisions({precision:n}):e.subdivisions};return this.lengthAtT(this.closestPointT(t,r),r)},closestPointNormalizedLength:function(t,e){var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,subdivisions:void 0===e.subdivisions?this.getSubdivisions({precision:n}):e.subdivisions},i=this.closestPointLength(t,r);if(!i)return 0;var o=this.length(r);return 0===o?0:i/o},closestPointT:function(t,e){for(var n,r,i,o,a,s,u,l=void 0===(e=e||{}).precision?this.PRECISION:e.precision,c=void 0===e.subdivisions?this.getSubdivisions({precision:l}):e.subdivisions,f=c.length,h=f?1/f:0,d=0;d<f;d++){var p=c[d],g=p.start.distance(t),v=p.end.distance(t),m=g+v;(!u||m<u)&&(n=p,r=d*h,i=(d+1)*h,o=g,a=v,s=p.start.distance(p.end),u=m)}for(var y=St(10,-l);;){var b=o?yt(o-a)/o:0,w=a?yt(o-a)/a:0;if(b<y||w<y||!o||o<s*y||!a||a<s*y)return o<=a?r:i;var x=n.divide(.5);h/=2;var S=x[0].start.distance(t),k=x[0].end.distance(t),_=S+k,E=x[1].start.distance(t),A=x[1].end.distance(t);_<=E+A?(n=x[0],i-=h,o=S,a=k):(n=x[1],r+=h,o=E,a=A)}},closestPointTangent:function(t,e){return this.tangentAtT(this.closestPointT(t,e))},containsPoint:function(t,e){return this.toPolyline(e).containsPoint(t)},divideAt:function(t,e){if(t<=0)return this.divideAtT(0);if(t>=1)return this.divideAtT(1);var n=this.tAt(t,e);return this.divideAtT(n)},divideAtLength:function(t,e){var n=this.tAtLength(t,e);return this.divideAtT(n)},divideAtT:function(t){var e=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return[new kt(e,e,e,e),new kt(e,n,r,i)];if(t>=1)return[new kt(e,n,r,i),new kt(i,i,i,i)];var o=this.getSkeletonPoints(t),a=o.startControlPoint1,s=o.startControlPoint2,u=o.divider,l=o.dividerControlPoint1,c=o.dividerControlPoint2;return[new kt(e,a,s,u),new kt(u,l,c,i)]},endpointDistance:function(){return this.start.distance(this.end)},equals:function(t){return!!t&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.controlPoint1.x===t.controlPoint1.x&&this.controlPoint1.y===t.controlPoint1.y&&this.controlPoint2.x===t.controlPoint2.x&&this.controlPoint2.y===t.controlPoint2.y&&this.end.x===t.end.x&&this.end.y===t.end.y},getSkeletonPoints:function(t){var e=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return{startControlPoint1:e.clone(),startControlPoint2:e.clone(),divider:e.clone(),dividerControlPoint1:n.clone(),dividerControlPoint2:r.clone()};if(t>=1)return{startControlPoint1:n.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};var o=new ht(e,n).pointAt(t),a=new ht(n,r).pointAt(t),s=new ht(r,i).pointAt(t),u=new ht(o,a).pointAt(t),l=new ht(a,s).pointAt(t);return{startControlPoint1:o,startControlPoint2:u,divider:new ht(u,l).pointAt(t),dividerControlPoint1:l,dividerControlPoint2:s}},getSubdivisions:function(t){var e=void 0===(t=t||{}).precision?this.PRECISION:t.precision,n=[new kt(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(0===e)return n;for(var r=this.endpointDistance(),i=St(10,-e),o=0;;){o+=1;for(var a=[],s=n.length,u=0;u<s;u++){var l=n[u].divide(.5);a.push(l[0],l[1])}for(var c=0,f=a.length,h=0;h<f;h++)c+=a[h].endpointDistance();if(o>1&&(0!==c?(c-r)/c:0)<i)return a;n=a,r=c}},isDifferentiable:function(){var t=this.start,e=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(n)&&n.equals(r))},length:function(t){for(var e=void 0===(t=t||{}).precision?this.PRECISION:t.precision,n=void 0===t.subdivisions?this.getSubdivisions({precision:e}):t.subdivisions,r=0,i=n.length,o=0;o<i;o++)r+=n[o].endpointDistance();return r},lengthAtT:function(t,e){if(t<=0)return 0;var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision;return this.divide(t)[0].length({precision:n})},pointAt:function(t,e){if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();var n=this.tAt(t,e);return this.pointAtT(n)},pointAtLength:function(t,e){var n=this.tAtLength(t,e);return this.pointAtT(n)},pointAtT:function(t){return t<=0?this.start.clone():t>=1?this.end.clone():this.getSkeletonPoints(t).divider},PRECISION:3,round:function(t){return this.start.round(t),this.controlPoint1.round(t),this.controlPoint2.round(t),this.end.round(t),this},scale:function(t,e,n){return this.start.scale(t,e,n),this.controlPoint1.scale(t,e,n),this.controlPoint2.scale(t,e,n),this.end.scale(t,e,n),this},tangentAt:function(t,e){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);var n=this.tAt(t,e);return this.tangentAtT(n)},tangentAtLength:function(t,e){if(!this.isDifferentiable())return null;var n=this.tAtLength(t,e);return this.tangentAtT(n)},tangentAtT:function(t){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);var e=this.getSkeletonPoints(t),n=e.startControlPoint2,r=e.dividerControlPoint1,i=e.divider,o=new ht(n,r);return o.translate(i.x-n.x,i.y-n.y),o},tAt:function(t,e){if(t<=0)return 0;if(t>=1)return 1;var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,subdivisions:void 0===e.subdivisions?this.getSubdivisions({precision:n}):e.subdivisions},i=this.length(r)*t;return this.tAtLength(i,r)},tAtLength:function(t,e){var n=!0;t<0&&(n=!1,t=-t);for(var r,i,o,a,s,u=void 0===(e=e||{}).precision?this.PRECISION:e.precision,l=void 0===e.subdivisions?this.getSubdivisions({precision:u}):e.subdivisions,c={precision:u,subdivisions:l},f=0,h=l.length,d=1/h,p=0;p<h;p++){var g=n?p:h-1-p,v=l[p],m=v.endpointDistance();if(t<=f+m){r=v,i=g*d,o=(g+1)*d,a=n?t-f:m+f-t,s=n?m+f-t:t-f;break}f+=m}if(!r)return n?1:0;for(var y=this.length(c),b=St(10,-u);;){var w,x;if((0!==y?a/y:0)<b)return i;if((0!==y?s/y:0)<b)return o;var S=r.divide(.5);d/=2;var k=S[0].endpointDistance(),_=S[1].endpointDistance();a<=k?(r=S[0],o-=d,x=k-(w=a)):(r=S[1],i+=d,x=_-(w=a-k)),a=w,s=x}},toPoints:function(t){for(var e=void 0===(t=t||{}).precision?this.PRECISION:t.precision,n=void 0===t.subdivisions?this.getSubdivisions({precision:e}):t.subdivisions,r=[n[0].start.clone()],i=n.length,o=0;o<i;o++){var a=n[o];r.push(a.end.clone())}return r},toPolyline:function(t){return new mt(this.toPoints(t))},toString:function(){return this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(t,e){return this.start.translate(t,e),this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e),this}},kt.prototype.divide=kt.prototype.divideAtT;var Et=function t(e){if(!(this instanceof t))return new t(e);if("string"==typeof e)return new t.parse(e);var n,r;if(this.segments=[],e)if(Array.isArray(e)&&0!==e.length)if(r=(e=e.reduce((function(t,e){return t.concat(e)}),[])).length,e[0].isSegment)for(n=0;n<r;n++){var i=e[n];this.appendSegment(i)}else{var o=null;for(n=0;n<r;n++){var a=e[n];if(!(a instanceof ht||a instanceof kt))throw new Error("Cannot construct a path segment from the provided object.");0===n&&this.appendSegment(t.createSegment("M",a.start)),o&&!o.end.equals(a.start)&&this.appendSegment(t.createSegment("M",a.start)),a instanceof ht?this.appendSegment(t.createSegment("L",a.end)):a instanceof kt&&this.appendSegment(t.createSegment("C",a.controlPoint1,a.controlPoint2,a.end)),o=a}}else if(e.isSegment)this.appendSegment(e);else if(e instanceof ht)this.appendSegment(t.createSegment("M",e.start)),this.appendSegment(t.createSegment("L",e.end));else if(e instanceof kt)this.appendSegment(t.createSegment("M",e.start)),this.appendSegment(t.createSegment("C",e.controlPoint1,e.controlPoint2,e.end));else{if(!(e instanceof mt))throw new Error("Cannot construct a path from the provided object.");if(!e.points||0===e.points.length)return;for(r=e.points.length,n=0;n<r;n++){var s=e.points[n];0===n?this.appendSegment(t.createSegment("M",s)):this.appendSegment(t.createSegment("L",s))}}};function At(t,e){return e.unshift(null),new(Function.prototype.bind.apply(t,e))}Et.parse=function(t){if(!t)return new Et;for(var e=new Et,n=t.match(/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g),r=n.length,i=0;i<r;i++){var o=n[i].match(/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g),a=Et.createSegment.apply(this,o);e.appendSegment(a)}return e},Et.createSegment=function(t){if(!t)throw new Error("Type must be provided.");var e=Et.segmentTypes[t];if(!e)throw new Error(t+" is not a recognized path segment type.");for(var n=[],r=arguments.length,i=1;i<r;i++)n.push(arguments[i]);return At(e,n)},Et.prototype={type:j.Path,appendSegment:function(t){var e,n=this.segments,r=n.length,i=0!==r?n[r-1]:null;if(Array.isArray(t)){if(!(t=t.reduce((function(t,e){return t.concat(e)}),[]))[0].isSegment)throw new Error("Segments required.");for(var o=t.length,a=0;a<o;a++){var s=t[a];e=this.prepareSegment(s,i,null),n.push(e),i=e}}else{if(!t||!t.isSegment)throw new Error("Segment required.");e=this.prepareSegment(t,i,null),n.push(e)}},bbox:function(){var t,e=this.segments,n=e.length;if(0===n)return null;for(var r=0;r<n;r++){var i=e[r];if(i.isVisible){var o=i.bbox();t=t?t.union(o):o}}if(t)return t;var a=e[n-1];return new ut(a.end.x,a.end.y,0,0)},clone:function(){for(var t=this.segments,e=t.length,n=new Et,r=0;r<e;r++){var i=t[r].clone();n.appendSegment(i)}return n},closestPoint:function(t,e){var n=this.closestPointT(t,e);return n?this.pointAtT(n):null},closestPointLength:function(t,e){var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.closestPointT(t,r);return i?this.lengthAtT(i,r):0},closestPointNormalizedLength:function(t,e){var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.closestPointLength(t,r);if(0===i)return 0;var o=this.length(r);return 0===o?0:i/o},closestPointT:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;for(var i,o=void 0===(e=e||{}).precision?this.PRECISION:e.precision,a=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):e.segmentSubdivisions,s=1/0,u=0;u<r;u++){var l=n[u],c=a[u];if(l.isVisible){var f=l.closestPointT(t,{precision:o,subdivisions:c}),h=l.pointAtT(f),d=new ht(h,t).squaredLength();d<s&&(i={segmentIndex:u,value:f},s=d)}}return i||{segmentIndex:r-1,value:1}},closestPointTangent:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;for(var i,o=void 0===(e=e||{}).precision?this.PRECISION:e.precision,a=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):e.segmentSubdivisions,s=1/0,u=0;u<r;u++){var l=n[u],c=a[u];if(l.isDifferentiable()){var f=l.closestPointT(t,{precision:o,subdivisions:c}),h=l.pointAtT(f),d=new ht(h,t).squaredLength();d<s&&(i=l.tangentAtT(f),s=d)}}return i||null},containsPoint:function(t,e){var n=this.toPolylines(e);if(!n)return!1;for(var r=n.length,i=0,o=0;o<r;o++)n[o].containsPoint(t)&&i++;return i%2==1},divideAt:function(t,e){if(0===this.segments.length)return null;t<0&&(t=0),t>1&&(t=1);var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.length(r)*t;return this.divideAtLength(i,r)},divideAtLength:function(t,e){var n=this.segments.length;if(0===n)return null;var r=!0;t<0&&(r=!1,t=-t);var i,o,a,s,u,l,c,f=void 0===(e=e||{}).precision?this.PRECISION:e.precision,h=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:f}):e.segmentSubdivisions,d=0;for(i=0;i<n;i++){var p=r?i:n-1-i;o=this.getSegment(p);var g=h[p],v=o.length({precision:f,subdivisions:g});if(o.isDifferentiable()&&(u=o,l=p,t<=d+v)){s=p,a=o.divideAtLength((r?1:-1)*(t-d),{precision:f,subdivisions:g});break}d+=v}if(!u)return null;a||(s=l,c=r?1:0,a=u.divideAtT(c));var m=this.clone();m.replaceSegment(s,a);var y=s,b=s+1,w=s+2;a[0].isDifferentiable()||(m.removeSegment(y),b-=1,w-=1);var x=m.getSegment(b).start;m.insertSegment(b,Et.createSegment("M",x)),w+=1,a[1].isDifferentiable()||(m.removeSegment(w-1),w-=1);var S=w-y-1;for(i=w;i<m.segments.length;i++){var k=this.getSegment(i-S);if("Z"===(o=m.getSegment(i)).type&&!k.subpathStartSegment.end.equals(o.subpathStartSegment.end)){var _=Et.createSegment("L",k.end);m.replaceSegment(i,_)}}return[new Et(m.segments.slice(0,b)),new Et(m.segments.slice(b))]},equals:function(t){if(!t)return!1;var e=this.segments,n=t.segments,r=e.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=e[i],a=n[i];if(o.type!==a.type||!o.equals(a))return!1}return!0},getSegment:function(t){var e=this.segments,n=e.length;if(0===n)throw new Error("Path has no segments.");if(t<0&&(t=n+t),t>=n||t<0)throw new Error("Index out of range.");return e[t]},getSegmentSubdivisions:function(t){for(var e=this.segments,n=e.length,r=void 0===(t=t||{}).precision?this.PRECISION:t.precision,i=[],o=0;o<n;o++){var a=e[o].getSubdivisions({precision:r});i.push(a)}return i},getSubpaths:function(){for(var t=this.clone().validate().segments,e=t.length,n=[],r=0;r<e;r++){var i=t[r];i.isSubpathStart?n.push(new Et(i)):n[n.length-1].appendSegment(i)}return n},insertSegment:function(t,e){var n,r=this.segments,i=r.length;if(t<0&&(t=i+t+1),t>i||t<0)throw new Error("Index out of range.");var o=null,a=null;if(0!==i&&(a=t>=1?(o=r[t-1]).nextSegment:r[0]),Array.isArray(e)){if(!(e=e.reduce((function(t,e){return t.concat(e)}),[]))[0].isSegment)throw new Error("Segments required.");for(var s=e.length,u=0;u<s;u++){var l=e[u];n=this.prepareSegment(l,o,a),r.splice(t+u,0,n),o=n}}else{if(!e||!e.isSegment)throw new Error("Segment required.");n=this.prepareSegment(e,o,a),r.splice(t,0,n)}},intersectionWithLine:function(t,e){var n=null,r=this.toPolylines(e);if(!r)return null;for(var i=0,o=r.length;i<o;i++){var a=r[i],s=t.intersect(a);s&&(n||(n=[]),Array.isArray(s)?Array.prototype.push.apply(n,s):n.push(s))}return n},isDifferentiable:function(){for(var t=this.segments,e=t.length,n=0;n<e;n++)if(t[n].isDifferentiable())return!0;return!1},isValid:function(){var t=this.segments;return 0===t.length||"M"===t[0].type},length:function(t){var e=this.segments,n=e.length;if(0===n)return 0;for(var r=void 0===(t=t||{}).precision?this.PRECISION:t.precision,i=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:r}):t.segmentSubdivisions,o=0,a=0;a<n;a++){var s=e[a],u=i[a];o+=s.length({subdivisions:u})}return o},lengthAtT:function(t,e){var n=this.segments,r=n.length;if(0===r)return 0;var i=t.segmentIndex;if(i<0)return 0;var o=t.value;i>=r?(i=r-1,o=1):o<0?o=0:o>1&&(o=1);for(var a,s=void 0===(e=e||{}).precision?this.PRECISION:e.precision,u=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:s}):e.segmentSubdivisions,l=0,c=0;c<i;c++){var f=n[c];a=u[c],l+=f.length({precisison:s,subdivisions:a})}return f=n[i],a=u[i],l+f.lengthAtT(o,{precisison:s,subdivisions:a})},pointAt:function(t,e){if(0===this.segments.length)return null;if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.length(r)*t;return this.pointAtLength(i,r)},pointAtLength:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;if(0===t)return this.start.clone();var i=!0;t<0&&(i=!1,t=-t);for(var o,a=void 0===(e=e||{}).precision?this.PRECISION:e.precision,s=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:a}):e.segmentSubdivisions,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=s[c],d=f.length({precision:a,subdivisions:h});if(f.isVisible){if(t<=u+d)return f.pointAtLength((i?1:-1)*(t-u),{precision:a,subdivisions:h});o=f}u+=d}return o?i?o.end:o.start:n[r-1].end.clone()},pointAtT:function(t){var e=this.segments,n=e.length;if(0===n)return null;var r=t.segmentIndex;if(r<0)return e[0].pointAtT(0);if(r>=n)return e[n-1].pointAtT(1);var i=t.value;return i<0?i=0:i>1&&(i=1),e[r].pointAtT(i)},PRECISION:3,prepareSegment:function(t,e,n){t.previousSegment=e,t.nextSegment=n,e&&(e.nextSegment=t),n&&(n.previousSegment=t);var r=t;return t.isSubpathStart&&(t.subpathStartSegment=t,r=n),r&&this.updateSubpathStartSegment(r),t},removeSegment:function(t){var e=this.segments,n=e.length;if(0===n)throw new Error("Path has no segments.");if(t<0&&(t=n+t),t>=n||t<0)throw new Error("Index out of range.");var r=e.splice(t,1)[0],i=r.previousSegment,o=r.nextSegment;i&&(i.nextSegment=o),o&&(o.previousSegment=i),r.isSubpathStart&&o&&this.updateSubpathStartSegment(o)},replaceSegment:function(t,e){var n,r=this.segments,i=r.length;if(0===i)throw new Error("Path has no segments.");if(t<0&&(t=i+t),t>=i||t<0)throw new Error("Index out of range.");var o=r[t],a=o.previousSegment,s=o.nextSegment,u=o.isSubpathStart;if(Array.isArray(e)){if(!(e=e.reduce((function(t,e){return t.concat(e)}),[]))[0].isSegment)throw new Error("Segments required.");r.splice(t,1);for(var l=e.length,c=0;c<l;c++){var f=e[c];n=this.prepareSegment(f,a,s),r.splice(t+c,0,n),a=n,u&&n.isSubpathStart&&(u=!1)}}else{if(!e||!e.isSegment)throw new Error("Segment required.");n=this.prepareSegment(e,a,s),r.splice(t,1,n),u&&n.isSubpathStart&&(u=!1)}u&&s&&this.updateSubpathStartSegment(s)},round:function(t){for(var e=this.segments,n=e.length,r=0;r<n;r++)e[r].round(t);return this},scale:function(t,e,n){for(var r=this.segments,i=r.length,o=0;o<i;o++)r[o].scale(t,e,n);return this},segmentAt:function(t,e){var n=this.segmentIndexAt(t,e);return n?this.getSegment(n):null},segmentAtLength:function(t,e){var n=this.segmentIndexAtLength(t,e);return n?this.getSegment(n):null},segmentIndexAt:function(t,e){if(0===this.segments.length)return null;t<0&&(t=0),t>1&&(t=1);var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.length(r)*t;return this.segmentIndexAtLength(i,r)},segmentIndexAtLength:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;var i=!0;t<0&&(i=!1,t=-t);for(var o=void 0===(e=e||{}).precision?this.PRECISION:e.precision,a=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):e.segmentSubdivisions,s=null,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=a[c],d=f.length({precision:o,subdivisions:h});if(f.isVisible){if(t<=u+d)return c;s=c}u+=d}return s},serialize:function(){if(!this.isValid())throw new Error("Invalid path segments.");return this.toString()},tangentAt:function(t,e){if(0===this.segments.length)return null;t<0&&(t=0),t>1&&(t=1);var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.length(r)*t;return this.tangentAtLength(i,r)},tangentAtLength:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;var i=!0;t<0&&(i=!1,t=-t);for(var o,a=void 0===(e=e||{}).precision?this.PRECISION:e.precision,s=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:a}):e.segmentSubdivisions,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=s[c],d=f.length({precision:a,subdivisions:h});if(f.isDifferentiable()){if(t<=u+d)return f.tangentAtLength((i?1:-1)*(t-u),{precision:a,subdivisions:h});o=f}u+=d}if(o){var p=i?1:0;return o.tangentAtT(p)}return null},tangentAtT:function(t){var e=this.segments,n=e.length;if(0===n)return null;var r=t.segmentIndex;if(r<0)return e[0].tangentAtT(0);if(r>=n)return e[n-1].tangentAtT(1);var i=t.value;return i<0?i=0:i>1&&(i=1),e[r].tangentAtT(i)},toPoints:function(t){var e=this.segments,n=e.length;if(0===n)return null;for(var r=void 0===(t=t||{}).precision?this.PRECISION:t.precision,i=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:r}):t.segmentSubdivisions,o=[],a=[],s=0;s<n;s++){var u=e[s];if(u.isVisible){var l=i[s];if(l.length>0){var c=l.map((function(t){return t.start}));Array.prototype.push.apply(a,c)}else a.push(u.start)}else a.length>0&&(a.push(e[s-1].end),o.push(a),a=[])}return a.length>0&&(a.push(this.end),o.push(a)),o},toPolylines:function(t){var e=[],n=this.toPoints(t);if(!n)return null;for(var r=0,i=n.length;r<i;r++)e.push(new mt(n[r]));return e},toString:function(){for(var t=this.segments,e=t.length,n="",r=0;r<e;r++)n+=t[r].serialize()+" ";return n.trim()},translate:function(t,e){for(var n=this.segments,r=n.length,i=0;i<r;i++)n[i].translate(t,e);return this},updateSubpathStartSegment:function(t){for(var e=t.previousSegment;t&&!t.isSubpathStart;)t.subpathStartSegment=e?e.subpathStartSegment:null,e=t,t=t.nextSegment},validate:function(){return this.isValid()||this.insertSegment(0,Et.createSegment("M",0,0)),this}},Object.defineProperty(Et.prototype,"start",{configurable:!0,enumerable:!0,get:function(){var t=this.segments,e=t.length;if(0===e)return null;for(var n=0;n<e;n++){var r=t[n];if(r.isVisible)return r.start}return t[e-1].end}}),Object.defineProperty(Et.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var t=this.segments,e=t.length;if(0===e)return null;for(var n=e-1;n>=0;n--){var r=t[n];if(r.isVisible)return r.end}return t[e-1].end}});var Pt={bbox:function(){throw new Error("Declaration missing for virtual function.")},clone:function(){throw new Error("Declaration missing for virtual function.")},closestPoint:function(){throw new Error("Declaration missing for virtual function.")},closestPointLength:function(){throw new Error("Declaration missing for virtual function.")},closestPointNormalizedLength:function(){throw new Error("Declaration missing for virtual function.")},closestPointT:function(t){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(t);throw new Error("Neither closestPointT() nor closestPointNormalizedLength() function is implemented.")},closestPointTangent:function(){throw new Error("Declaration missing for virtual function.")},divideAt:function(){throw new Error("Declaration missing for virtual function.")},divideAtLength:function(){throw new Error("Declaration missing for virtual function.")},divideAtT:function(t){if(this.divideAt)return this.divideAt(t);throw new Error("Neither divideAtT() nor divideAt() function is implemented.")},equals:function(){throw new Error("Declaration missing for virtual function.")},getSubdivisions:function(){throw new Error("Declaration missing for virtual function.")},isDifferentiable:function(){throw new Error("Declaration missing for virtual function.")},isSegment:!0,isSubpathStart:!1,isVisible:!0,length:function(){throw new Error("Declaration missing for virtual function.")},lengthAtT:function(t){if(t<=0)return 0;var e=this.length();return t>=1?e:e*t},nextSegment:null,pointAt:function(){throw new Error("Declaration missing for virtual function.")},pointAtLength:function(){throw new Error("Declaration missing for virtual function.")},pointAtT:function(t){if(this.pointAt)return this.pointAt(t);throw new Error("Neither pointAtT() nor pointAt() function is implemented.")},previousSegment:null,round:function(){throw new Error("Declaration missing for virtual function.")},subpathStartSegment:null,scale:function(){throw new Error("Declaration missing for virtual function.")},serialize:function(){throw new Error("Declaration missing for virtual function.")},tangentAt:function(){throw new Error("Declaration missing for virtual function.")},tangentAtLength:function(){throw new Error("Declaration missing for virtual function.")},tangentAtT:function(t){if(this.tangentAt)return this.tangentAt(t);throw new Error("Neither tangentAtT() nor tangentAt() function is implemented.")},toString:function(){throw new Error("Declaration missing for virtual function.")},translate:function(){throw new Error("Declaration missing for virtual function.")}};Object.defineProperty(Pt,"end",{configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(Pt,"start",{configurable:!0,enumerable:!0,get:function(){if(!this.previousSegment)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path; OR segment has not yet been added to a path.)");return this.previousSegment.end}}),Object.defineProperty(Pt,"type",{configurable:!0,enumerable:!0,get:function(){throw new Error("Bad segment declaration. No type specified.")}});var Ct=function t(){for(var e,n,r=[],i=arguments.length,o=0;o<i;o++)r.push(arguments[o]);if(!(this instanceof t))return At(t,r);if(0===i)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates (none provided).");if(r[0]instanceof ht){if(1===i)return this.end=r[0].end.clone(),this;throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+i+" lines provided).")}if("string"==typeof r[0]||"number"==typeof r[0]){if(2===i)return this.end=new Y(+r[0],+r[1]),this;if(i<2)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+i+" coordinates provided).");var a;for(e=[],o=0;o<i;o+=2)a=r.slice(o,o+2),e.push(At(t,a));return e}if(1===i)return this.end=new Y(r[0]),this;for(e=[],o=0;o<i;o+=1)n=r[o],e.push(new t(n));return e},Tt={clone:function(){return new Ct(this.end)},divideAt:function(t){var e=new ht(this.start,this.end).divideAt(t);return[new Ct(e[0]),new Ct(e[1])]},divideAtLength:function(t){var e=new ht(this.start,this.end).divideAtLength(t);return[new Ct(e[0]),new Ct(e[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return!!this.previousSegment&&!this.start.equals(this.end)},round:function(t){return this.end.round(t),this},scale:function(t,e,n){return this.end.scale(t,e,n),this},serialize:function(){var t=this.end;return this.type+" "+t.x+" "+t.y},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(t,e){return this.end.translate(t,e),this}};Object.defineProperty(Tt,"type",{configurable:!0,enumerable:!0,value:"L"}),Ct.prototype=_t(Pt,ht.prototype,Tt);var Nt=function t(){for(var e,n,r=[],i=arguments.length,o=0;o<i;o++)r.push(arguments[o]);if(!(this instanceof t))return At(t,r);if(0===i)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates (none provided).");if(r[0]instanceof kt){if(1===i)return this.controlPoint1=r[0].controlPoint1.clone(),this.controlPoint2=r[0].controlPoint2.clone(),this.end=r[0].end.clone(),this;throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+i+" curves provided).")}if("string"==typeof r[0]||"number"==typeof r[0]){if(6===i)return this.controlPoint1=new Y(+r[0],+r[1]),this.controlPoint2=new Y(+r[2],+r[3]),this.end=new Y(+r[4],+r[5]),this;if(i<6)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+i+" coordinates provided).");var a;for(e=[],o=0;o<i;o+=6)a=r.slice(o,o+6),e.push(At(t,a));return e}if(3===i)return this.controlPoint1=new Y(r[0]),this.controlPoint2=new Y(r[1]),this.end=new Y(r[2]),this;if(i<3)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+i+" points provided).");for(e=[],o=0;o<i;o+=3)n=r.slice(o,o+3),e.push(At(t,n));return e},Lt={clone:function(){return new Nt(this.controlPoint1,this.controlPoint2,this.end)},divideAt:function(t,e){var n=new kt(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAt(t,e);return[new Nt(n[0]),new Nt(n[1])]},divideAtLength:function(t,e){var n=new kt(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAtLength(t,e);return[new Nt(n[0]),new Nt(n[1])]},divideAtT:function(t){var e=new kt(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAtT(t);return[new Nt(e[0]),new Nt(e[1])]},isDifferentiable:function(){if(!this.previousSegment)return!1;var t=this.start,e=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(n)&&n.equals(r))},round:function(t){return this.controlPoint1.round(t),this.controlPoint2.round(t),this.end.round(t),this},scale:function(t,e,n){return this.controlPoint1.scale(t,e,n),this.controlPoint2.scale(t,e,n),this.end.scale(t,e,n),this},serialize:function(){var t=this.controlPoint1,e=this.controlPoint2,n=this.end;return this.type+" "+t.x+" "+t.y+" "+e.x+" "+e.y+" "+n.x+" "+n.y},toString:function(){return this.type+" "+this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(t,e){return this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e),this}};Object.defineProperty(Lt,"type",{configurable:!0,enumerable:!0,value:"C"}),Nt.prototype=_t(Pt,kt.prototype,Lt);var Mt=function t(){for(var e,n,r=[],i=arguments.length,o=0;o<i;o++)r.push(arguments[o]);if(!(this instanceof t))return At(t,r);if(0===i)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates (none provided).");if(r[0]instanceof ht){if(1===i)return this.end=r[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+i+" lines provided).")}if(r[0]instanceof kt){if(1===i)return this.end=r[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+i+" curves provided).")}if("string"==typeof r[0]||"number"==typeof r[0]){if(2===i)return this.end=new Y(+r[0],+r[1]),this;if(i<2)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+i+" coordinates provided).");var a;for(e=[],o=0;o<i;o+=2)a=r.slice(o,o+2),0===o?e.push(At(t,a)):e.push(At(Ct,a));return e}if(1===i)return this.end=new Y(r[0]),this;for(e=[],o=0;o<i;o+=1)n=r[o],0===o?e.push(new t(n)):e.push(new Ct(n));return e},Ot={bbox:function(){return null},clone:function(){return new Mt(this.end)},closestPoint:function(){return this.end.clone()},closestPointNormalizedLength:function(){return 0},closestPointLength:function(){return 0},closestPointT:function(){return 1},closestPointTangent:function(){return null},divideAt:function(){return[this.clone(),this.clone()]},divideAtLength:function(){return[this.clone(),this.clone()]},equals:function(t){return this.end.equals(t.end)},getSubdivisions:function(){return[]},isDifferentiable:function(){return!1},isSubpathStart:!0,isVisible:!1,length:function(){return 0},lengthAtT:function(){return 0},pointAt:function(){return this.end.clone()},pointAtLength:function(){return this.end.clone()},pointAtT:function(){return this.end.clone()},round:function(t){return this.end.round(t),this},scale:function(t,e,n){return this.end.scale(t,e,n),this},serialize:function(){var t=this.end;return this.type+" "+t.x+" "+t.y},tangentAt:function(){return null},tangentAtLength:function(){return null},tangentAtT:function(){return null},toString:function(){return this.type+" "+this.end},translate:function(t,e){return this.end.translate(t,e),this}};Object.defineProperty(Ot,"start",{configurable:!0,enumerable:!0,get:function(){throw new Error("Illegal access. Moveto segments should not need a start property.")}}),Object.defineProperty(Ot,"type",{configurable:!0,enumerable:!0,value:"M"}),Mt.prototype=_t(Pt,Ot);var Rt=function t(){for(var e=[],n=arguments.length,r=0;r<n;r++)e.push(arguments[r]);if(!(this instanceof t))return At(t,e);if(n>0)throw new Error("Closepath constructor expects no arguments.");return this},Ft={clone:function(){return new Rt},divideAt:function(t){var e=new ht(this.start,this.end).divideAt(t);return[e[1].isDifferentiable()?new Ct(e[0]):this.clone(),new Ct(e[1])]},divideAtLength:function(t){var e=new ht(this.start,this.end).divideAtLength(t);return[e[1].isDifferentiable()?new Ct(e[0]):this.clone(),new Ct(e[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return!(!this.previousSegment||!this.subpathStartSegment||this.start.equals(this.end))},round:function(){return this},scale:function(){return this},serialize:function(){return this.type},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(){return this}};Object.defineProperty(Ft,"end",{configurable:!0,enumerable:!0,get:function(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. Moveto); OR segment has not yet been added to a path.)");return this.subpathStartSegment.end}}),Object.defineProperty(Ft,"type",{configurable:!0,enumerable:!0,value:"Z"}),Rt.prototype=_t(Pt,ht.prototype,Ft);var Dt=Et.segmentTypes={L:Ct,C:Nt,M:Mt,Z:Rt,z:Rt};Et.regexSupportedData=new RegExp("^[\\s\\d"+Object.keys(Dt).join("")+",.]*$"),Et.isDataSupported=function(t){return"string"==typeof t&&this.regexSupportedData.test(t)};var jt={curveThroughPoints:function(t){return console.warn("deprecated"),new Et(kt.throughPoints(t)).serialize()},getCurveControlPoints:function(t){console.warn("deprecated");var e,n=[],r=[],i=t.length-1;if(1==i)return n[0]=new Y((2*t[0].x+t[1].x)/3,(2*t[0].y+t[1].y)/3),r[0]=new Y(2*n[0].x-t[0].x,2*n[0].y-t[0].y),[n,r];var o=[];for(e=1;e<i-1;e++)o[e]=4*t[e].x+2*t[e+1].x;o[0]=t[0].x+2*t[1].x,o[i-1]=(8*t[i-1].x+t[i].x)/2;var a=this.getFirstControlPoints(o);for(e=1;e<i-1;++e)o[e]=4*t[e].y+2*t[e+1].y;o[0]=t[0].y+2*t[1].y,o[i-1]=(8*t[i-1].y+t[i].y)/2;var s=this.getFirstControlPoints(o);for(e=0;e<i;e++)n.push(new Y(a[e],s[e])),e<i-1?r.push(new Y(2*t[e+1].x-a[e+1],2*t[e+1].y-s[e+1])):r.push(new Y((t[i].x+a[i-1])/2,(t[i].y+s[i-1])/2));return[n,r]},getCurveDivider:function(t,e,n,r){console.warn("deprecated");var i=new kt(t,e,n,r);return function(t){var e=i.divide(t);return[{p0:e[0].start,p1:e[0].controlPoint1,p2:e[0].controlPoint2,p3:e[0].end},{p0:e[1].start,p1:e[1].controlPoint1,p2:e[1].controlPoint2,p3:e[1].end}]}},getFirstControlPoints:function(t){console.warn("deprecated");var e=t.length,n=[],r=[],i=2;n[0]=t[0]/i;for(var o=1;o<e;o++)r[o]=1/i,i=(o<e-1?4:3.5)-r[o],n[o]=(t[o]-n[o-1])/i;for(o=1;o<e;o++)n[e-o-1]-=r[e-o]*n[e-o];return n},getInversionSolver:function(t,e,n,r){console.warn("deprecated");var i=new kt(t,e,n,r);return function(t){return i.closestPointT(t)}}},It=function t(e){return this instanceof t?"string"==typeof e?new t.parse(e):void(this.points=Array.isArray(e)?e.map(Y):[]):new t(e)};function Bt(t,e,n,r){switch(t.type){case j.Line:switch(e.type){case j.Line:return zt(t,e)}break;case j.Ellipse:switch(e.type){case j.Line:return Vt(t,e);case j.Ellipse:return $t(t,e)}break;case j.Rect:switch(e.type){case j.Line:return Ut(t,e);case j.Ellipse:return qt(t,e);case j.Rect:return Ht(t,e)}break;case j.Polyline:switch(e.type){case j.Line:return Gt(t,e);case j.Ellipse:return Wt(t,e);case j.Rect:return Yt(t,e);case j.Polyline:return Xt(t,e)}break;case j.Polygon:switch(e.type){case j.Line:return Qt(t,e);case j.Ellipse:return Kt(t,e);case j.Rect:return Jt(t,e);case j.Polyline:return Zt(t,e);case j.Polygon:return te(t,e)}break;case j.Path:switch(e.type){case j.Line:return ee(t,e,n);case j.Ellipse:return ne(t,e,n);case j.Rect:return re(t,e,n);case j.Polyline:return ie(t,e,n);case j.Polygon:return oe(t,e,n);case j.Path:return ae(t,e,n,r)}}switch(e.type){case j.Ellipse:case j.Rect:case j.Polyline:case j.Polygon:case j.Path:return Bt(e,t,r,n);default:throw Error("The intersection for ".concat(t," and ").concat(e," could not be found."))}}function zt(t,e){var n=t.start.x,r=t.start.y,i=t.end.x,o=t.end.y,a=e.start.x,s=e.start.y,u=i-n,l=o-r,c=e.end.x-a,f=e.end.y-s,h=n-a,d=r-s,p=u*f-c*l,g=(u*d-l*h)/p,v=(c*d-f*h)/p;return g>=0&&g<=1&&v>=0&&v<=1}function Vt(t,e){var n=t.a,r=t.b,i=t.x,o=t.y,a=e.start.x-i,s=e.end.x-i,u=e.start.y-o,l=n*n,c=r*r,f=s-a,h=e.end.y-o-u,d=f*f/l+h*h/c,p=2*a*f/l+2*u*h/c,g=p*p-4*d*(a*a/l+u*u/c-1);if(0===g){var v=-p/2/d;return v>=0&&v<=1}if(g>0){var m=Math.sqrt(g),y=(-p+m)/2/d,b=(-p-m)/2/d;return y>=0&&y<=1||b>=0&&b<=1}return!1}function $t(t,e){return function(t,e,n,r){var i=Math.cos,o=Math.sin,a=o(0),s=i(0),u=o(0),l=i(0),c=a*a,f=s*s,h=a*s,d=u*u,p=l*l,g=u*l,v=t.a*t.a,m=t.b*t.b,y=n.a*n.a,b=n.b*n.b,w=v*c+m*f,x=y*d+b*p,S=v*f+m*c,k=y*p+b*d,_=2*(m-v)*h,E=2*(b-y)*g,A=-2*w*t.x-_*t.y,P=-2*x*n.x-E*n.y,C=-_*t.x-2*S*t.y,T=-E*n.x-2*k*n.y,N=w*t.x*t.x+S*t.y*t.y+_*t.x*t.y-v*m,L=x*n.x*n.x+k*n.y*n.y+E*n.x*n.y-y*b;E/=2,P/=2,T/=2;var M=pe([[w,_/=2,A/=2],[_,S,C/=2],[A,C,N]]),O=pe([[x,E,P],[E,k,T],[P,T,L]]),R=.33333333*(pe([[x,_,A],[E,S,C],[P,C,N]])+pe([[w,E,A],[_,k,C],[A,T,N]])+pe([[w,_,P],[_,S,T],[A,C,L]])),F=.33333333*(pe([[w,E,P],[_,k,T],[A,T,L]])+pe([[x,_,P],[E,S,T],[P,C,L]])+pe([[x,E,A],[E,k,C],[P,T,N]])),D=de([[M,R],[R,F]]),j=de([[M,F],[R,O]]),I=de([[R,F],[F,O]]);return!(de([[2*D,j],[j,2*I]])>0&&(F>0||R>0))}(t,0,e)}function Ut(t,e){var n=e.start,r=e.end,i=t.x,o=t.y,a=t.width,s=t.height;return!(n.x>i+a&&r.x>i+a||n.x<i&&r.x<i||n.y>o+s&&r.y>o+s||n.y<o&&r.y<o)&&(!(!t.containsPoint(e.start)&&!t.containsPoint(e.end))||zt(t.topLine(),e)||zt(t.rightLine(),e)||zt(t.bottomLine(),e)||zt(t.leftLine(),e))}function qt(t,e){return!!Ht(t,ut.fromEllipse(e))&&Kt(It.fromRect(t),e)}function Ht(t,e){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Gt(t,e){return se(t,e,{interior:!1})}function Wt(t,e){return ue(t,e,{interior:!1})}function Yt(t,e){return le(t,e,{interior:!1})}function Xt(t,e){return fe(t,e,{interior:!1})}function Qt(t,e){return se(t,e,{interior:!0})}function Kt(t,e){return ue(t,e,{interior:!0})}function Jt(t,e){return le(t,e,{interior:!0})}function Zt(t,e){return fe(t,e,{interior:!0})}function te(t,e){return he(t,e,{interior:!0})}function ee(t,e,n){return t.getSubpaths().some((function(t){var r=l(t.toPolylines(n),1)[0];return"Z"===t.getSegment(-1).type?Qt(r,e):Gt(r,e)}))}function ne(t,e,n){return t.getSubpaths().some((function(t){var r=l(t.toPolylines(n),1)[0];return"Z"===t.getSegment(-1).type?Kt(r,e):Wt(r,e)}))}function re(t,e,n){return oe(t,It.fromRect(e),n)}function ie(t,e,n){return ce(t,e,n,{interior:!1})}function oe(t,e,n){return ce(t,e,n,{interior:!0})}function ae(t,e,n,r){return t.getSubpaths().some((function(t){var i=l(t.toPolylines(n),1)[0];return"Z"===t.getSegment(-1).type?oe(e,i,r):ie(e,i,r)}))}function se(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.interior,o=void 0!==i&&i;if(o){if(t.containsPoint(e.start))return!0;var a=t.start,s=t.end,l=t.points;n=s.equals(a)?l:[].concat(u(l),[a])}else n=t.points;for(var c=n,f=c.length,h=new ht,d=0;d<f-1;d++)if(h.start=n[d],h.end=n[d+1],zt(e,h))return!0;return!1}function ue(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.start,o=t.end,a=t.points;if(e.containsPoint(i))return!0;var s=r.interior,l=void 0!==s&&s;if(l){if(t.containsPoint(e.center()))return!0;n=o.equals(i)?a:[].concat(u(a),[i])}else n=a;for(var c=n,f=c.length,h=new ht,d=0;d<f-1;d++)if(h.start=n[d],h.end=n[d+1],Vt(e,h))return!0;return!1}function le(t,e,n){return he(t,It.fromRect(e),n)}function ce(t,e,n,r){return t.getSubpaths().some((function(t){var i=l(t.toPolylines(n),1)[0];return"Z"===t.getSegment(-1).type?he(e,i,r):fe(e,i,r)}))}function fe(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.interior,o=void 0!==i&&i;if(o){var a=e.start;if(t.containsPoint(a))return!0;n=t.clone().close()}else n=t;for(var s=e.points,u=s.length,l=new ht,c=0;c<u-1;c++)if(l.start=s[c],l.end=s[c+1],Gt(n,l))return!0;return!1}function he(t,e,n){return e.containsPoint(t.start)||fe(t,e.clone().close(),n)}function de(t){return t[0][0]*t[1][1]-t[0][1]*t[1][0]}function pe(t){return t[0][0]*t[1][1]*t[2][2]-t[0][0]*t[1][2]*t[2][1]-t[0][1]*t[1][0]*t[2][2]+t[0][1]*t[1][2]*t[2][0]+t[0][2]*t[1][0]*t[2][1]-t[0][2]*t[1][1]*t[2][0]}It.parse=function(t){return new It(pt(t))},It.fromRect=function(t){return new It([t.topLeft(),t.topRight(),t.bottomRight(),t.bottomLeft()])},It.prototype=_t(mt.prototype,{type:j.Polygon,clone:function(){return new It(gt(this.points))},convexHull:function(){return new It(vt(this.points))},lengthPoints:function(){var t=this.start,e=this.end,n=this.points;return n.length<=1||t.equals(e)?n:[].concat(u(n),[t.clone()])}});var ge,ve,me=e,ye=function(){if("object"!=("undefined"==typeof window?"undefined":h(window))||!window.SVGAngle&&!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"))return function(){throw new Error("SVG is required to use Vectorizer.")};var t={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},e=Math,r=e.PI,i=e.atan2,o=e.sqrt,a=e.min,s=e.max,u=e.cos,l=e.sin,c=function e(n,r,i){if(!(this instanceof e))return e.apply(Object.create(e.prototype),arguments);if(n){if(e.isV(n)&&(n=n.node),r=r||{},e.isString(n)){if("svg"===(n=n.trim()).toLowerCase())n=e.createSvgDocument();else if("<"===n[0]){var o=e.createSvgDocument(n);if(o.childNodes.length>1){var a,s,u=[];for(a=0,s=o.childNodes.length;a<s;a++){var l=o.childNodes[a];u.push(new e(document.importNode(l,!0)))}return u}n=document.importNode(o.firstChild,!0)}else n=document.createElementNS(t.svg,n);e.ensureId(n)}return this.node=n,this.setAttributes(r),i&&this.append(i),this}},f=c.prototype;function d(t,e,n){n||(n={});for(var r=n.includeAnnotationIndices,i=n.eol,o=n.lineHeight,a=n.baseSize,s=0,u={},l=e.length-1,f=0;f<=l;f++){var h=e[f],d=null;if(c.isObject(h)){var p=h.attrs,g=c("tspan",p),v=g.node,m=h.t;i&&f===l&&(m+=i),v.textContent=m;var y=p.class;y&&g.addClass(y),r&&g.attr("annotations",h.annotations),d=parseFloat(p["font-size"]),isFinite(d)||(d=a),d&&d>s&&(s=d)}else i&&f===l&&(h+=i),v=document.createTextNode(h||" "),a&&a>s&&(s=a);t.appendChild(v)}return s&&(u.maxFontSize=s),o?u.lineHeight=o:s&&(u.lineHeight=1.2*s),u}Object.defineProperty(f,"id",{enumerable:!0,get:function(){return this.node.id},set:function(t){this.node.id=t}}),f.getTransformToElement=function(t){var e=this.node;if(c.isSVGGraphicsElement(t)&&c.isSVGGraphicsElement(e)){var n=c.toNode(t).getScreenCTM(),r=e.getScreenCTM();if(n&&r)return n.inverse().multiply(r)}return c.createSVGMatrix()},f.transform=function(t,e){var n=this.node;if(c.isUndefined(t))return c.transformStringToMatrix(this.attr("transform"));if(e&&e.absolute)return this.attr("transform",c.matrixToTransformString(t));var r=c.createSVGTransform(t);return n.transform.baseVal.appendItem(r),this},f.translate=function(t,e,n){n=n||{},e=e||0;var r=this.attr("transform")||"",i=c.parseTransformString(r);if(r=i.value,c.isUndefined(t))return i.translate;r=r.replace(/translate\([^)]*\)/g,"").trim();var o="translate("+(n.absolute?t:i.translate.tx+t)+","+(n.absolute?e:i.translate.ty+e)+")";return this.attr("transform",(o+" "+r).trim()),this},f.rotate=function(t,e,n,r){r=r||{};var i=this.attr("transform")||"",o=c.parseTransformString(i);if(i=o.value,c.isUndefined(t))return o.rotate;i=i.replace(/rotate\([^)]*\)/g,"").trim(),t%=360;var a="rotate("+(r.absolute?t:o.rotate.angle+t)+(void 0!==e&&void 0!==n?","+e+","+n:"")+")";return this.attr("transform",(i+" "+a).trim()),this},f.scale=function(t,e){e=c.isUndefined(e)?t:e;var n=this.attr("transform")||"",r=c.parseTransformString(n);if(n=r.value,c.isUndefined(t))return r.scale;n=n.replace(/scale\([^)]*\)/g,"").trim();var i="scale("+t+","+e+")";return this.attr("transform",(n+" "+i).trim()),this},f.bbox=function(t,e){var n,r=this.node,i=r.ownerSVGElement;if(!i)return new ut(0,0,0,0);try{n=r.getBBox()}catch(t){n={x:r.clientLeft,y:r.clientTop,width:r.clientWidth,height:r.clientHeight}}if(t)return new ut(n);var o=this.getTransformToElement(e||i);return c.transformRect(n,o)},f.getBBox=function(t){var e,n={},r=this.node;if(!r.ownerSVGElement||!c.isSVGGraphicsElement(r))return new ut(0,0,0,0);if(t&&(t.target&&(n.target=c.toNode(t.target)),t.recursive&&(n.recursive=t.recursive)),n.recursive){var i=this.children(),o=i.length;if(0===o)return this.getBBox({target:n.target,recursive:!1});n.target||(n.target=this);for(var a=0;a<o;a++){var s,u=i[a];s=0===u.children().length?u.getBBox({target:n.target,recursive:!1}):u.getBBox({target:n.target,recursive:!0}),e=e?e.union(s):s}return e}try{e=r.getBBox()}catch(t){e={x:r.clientLeft,y:r.clientTop,width:r.clientWidth,height:r.clientHeight}}if(n.target){var l=this.getTransformToElement(n.target);return c.transformRect(e,l)}return new ut(e)};var p=/em$/;function g(t,e){var n=parseFloat(t);return p.test(t)?n*e:n}f.text=function(e,n){if(e&&"string"!=typeof e)throw new Error("Vectorizer: text() expects the first argument to be a string.");e=c.sanitizeText(e),n||(n={});var r=n.displayEmpty,i=n.eol,o=n.textPath,a=n.textVerticalAnchor,s="middle"===a||"bottom"===a||"top"===a,u=n.x;void 0===u&&(u=this.attr("x")||0);var l=n.includeAnnotationIndices,f=n.annotations;f&&!c.isArray(f)&&(f=[f]);var h=n.lineHeight,v="auto"===h,m=v?"1.5em":h||"1em";this.empty(),this.attr({"xml:space":"preserve",display:e||r?null:"none"});var y=parseFloat(this.attr("font-size"));y||(y=16,(s||f)&&this.attr("font-size",y));var b,w=document;o?("string"==typeof o&&(o={d:o}),b=function(t,e){t||(t={});var n=c("textPath"),r=t.d;if(r&&void 0===t["xlink:href"]){var i=c("path").attr("d",r).appendTo(e.defs());n.attr("xlink:href","#"+i.id)}return c.isObject(t)&&n.attr(t),n.node}(o,this)):b=w.createDocumentFragment();for(var x,S=0,k=e.split("\n"),_=[],E=0,A=k.length-1;E<=A;E++){var P,C=m,T="v-line",N=w.createElementNS(t.svg,"tspan"),L=k[E];if(L)if(f){var M=(P=d(N,c.annotateString(L,f,{offset:-S,includeAnnotationIndices:l}),{includeAnnotationIndices:l,eol:E!==A&&i,lineHeight:v?null:m,baseSize:y})).lineHeight;M&&v&&0!==E&&(C=M),0===E&&(x=.8*P.maxFontSize)}else i&&E!==A&&(L+=i),N.textContent=L;else{N.textContent="-",T+=" v-empty-line";var O=N.style;O.fillOpacity=0,O.strokeOpacity=0,f&&(P={})}P&&_.push(P),E>0&&N.setAttribute("dy",C),(E>0||o)&&N.setAttribute("x",u),N.className.baseVal=T,b.appendChild(N),S+=L.length+1}if(s)if(f)C=function(t,e,n,r){if(!Array.isArray(e))return 0;var i=e.length;if(!i)return 0;for(var o=e[0],a=g(o.maxFontSize,n)||n,s=0,u=g(r,n),l=1;l<i;l++)s+=g((o=e[l]).lineHeight,n)||u;var c,f=g(o.maxFontSize,n)||n;switch(t){case"middle":c=a/2-.15*f-s/2;break;case"bottom":c=-.25*f-s;break;default:case"top":c=.8*a}return c}(a,_,y,m);else if("top"===a)C="0.8em";else{var R;switch(A>0?(R=parseFloat(m)||1,R*=A,p.test(m)||(R/=y)):R=0,a){case"middle":C=.3-R/2+"em";break;case"bottom":C=-R-.3+"em"}}else 0===a?C="0em":a?C=a:(C=0,null===this.attr("y")&&this.attr("y",x||"0.8em"));return b.firstChild.setAttribute("dy",C),this.append(b),this},f.removeAttr=function(t){var e=c.qualifyAttr(t),n=this.node;return e.ns?n.hasAttributeNS(e.ns,e.local)&&n.removeAttributeNS(e.ns,e.local):n.hasAttribute(t)&&n.removeAttribute(t),this},f.attr=function(t,e){if(c.isUndefined(t)){for(var n=this.node.attributes,r={},i=0;i<n.length;i++)r[n[i].name]=n[i].value;return r}if(c.isString(t)&&c.isUndefined(e))return this.node.getAttribute(t);if("object"==h(t))for(var o in t)t.hasOwnProperty(o)&&this.setAttribute(o,t[o]);else this.setAttribute(t,e);return this},f.normalizePath=function(){return"PATH"===this.tagName()&&this.attr("d",c.normalizePathData(this.attr("d"))),this},f.remove=function(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this},f.empty=function(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this},f.setAttributes=function(t){for(var e in t)t.hasOwnProperty(e)&&this.setAttribute(e,t[e]);return this},f.append=function(t){c.isArray(t)||(t=[t]);for(var e=0,n=t.length;e<n;e++)this.node.appendChild(c.toNode(t[e]));return this},f.prepend=function(t){var e=this.node.firstChild;return e?c(e).before(t):this.append(t)},f.before=function(t){var e=this.node,n=e.parentNode;if(n){c.isArray(t)||(t=[t]);for(var r=0,i=t.length;r<i;r++)n.insertBefore(c.toNode(t[r]),e)}return this},f.appendTo=function(t){return c.toNode(t).appendChild(this.node),this},f.svg=function(){return this.node instanceof window.SVGSVGElement?this:c(this.node.ownerSVGElement)},f.tagName=function(){return this.node.tagName.toUpperCase()},f.defs=function(){var t=this.svg()||this,e=t.node.getElementsByTagName("defs")[0];return e?c(e):c("defs").appendTo(t)},f.clone=function(){var t=c(this.node.cloneNode(!0));return t.node.id=c.uniqueId(),t},f.findOne=function(t){var e=this.node.querySelector(t);return e?c(e):void 0},f.find=function(t){var e=[],n=this.node.querySelectorAll(t);if(n)for(var r=0;r<n.length;r++)e.push(c(n[r]));return e},f.children=function(){for(var t=this.node.childNodes,e=[],n=0;n<t.length;n++)1===t[n].nodeType&&e.push(c(t[n]));return e},f.parent=function(){return c(this.node.parentNode)||null},f.index=function(){for(var t=0,e=this.node.previousSibling;e;)1===e.nodeType&&t++,e=e.previousSibling;return t},f.findParentByClass=function(t,e){for(var n=this.node.ownerSVGElement,r=this.node.parentNode;r&&r!==e&&r!==n;){var i=c(r);if(i.hasClass(t))return i;r=r.parentNode}return null},f.contains=function(t){var e=this.node,n=c.toNode(t),r=n&&n.parentNode;return e===r||!!(r&&1===r.nodeType&&16&e.compareDocumentPosition(r))},f.toLocalPoint=function(t,e){var n=this.svg().node,r=n.createSVGPoint();r.x=t,r.y=e;try{var i=r.matrixTransform(n.getScreenCTM().inverse()),o=this.getTransformToElement(n).inverse()}catch(t){return r}return i.matrixTransform(o)},f.translateCenterToPoint=function(t){var e=this.getBBox({target:this.svg()}).center();return this.translate(t.x-e.x,t.y-e.y),this},f.translateAndAutoOrient=function(t,e,n){t=new Y(t),e=new Y(e),n||(n=this.svg());var r=this.scale();this.attr("transform","");var i=this.getBBox({target:n}).scale(r.sx,r.sy),o=c.createSVGTransform();o.setTranslate(-i.x-i.width/2,-i.y-i.height/2);var a=c.createSVGTransform(),s=t.angleBetween(e,t.clone().offset(1,0));s&&a.setRotate(s,0,0);var u=c.createSVGTransform(),l=t.clone().move(e,i.width/2);u.setTranslate(2*t.x-l.x,2*t.y-l.y);var f=this.getTransformToElement(n),h=c.createSVGTransform();return h.setMatrix(u.matrix.multiply(a.matrix.multiply(o.matrix.multiply(f.scale(r.sx,r.sy))))),this.attr("transform",c.matrixToTransformString(h.matrix)),this},f.animateAlongPath=function(t,e){e=c.toNode(e);var n=c.ensureId(e),r=c("animateMotion",t),i=c("mpath",{"xlink:href":"#"+n});r.append(i),this.append(r);try{r.node.beginElement()}catch(t){if("fake"===document.documentElement.getAttribute("smiling")){var o=r.node;o.animators=[];var a=o.getAttribute("id");a&&(id2anim[a]=o);for(var s=getTargets(o),u=0,l=s.length;u<l;u++){var f=s[u],h=new Animator(o,f,u);animators.push(h),o.animators[u]=h,h.register()}}}return this},f.hasClass=function(t){return new RegExp("(\\s|^)"+t+"(\\s|$)").test(this.node.getAttribute("class"))},f.addClass=function(t){if(t&&!this.hasClass(t)){var e=this.node.getAttribute("class")||"";this.node.setAttribute("class",(e+" "+t).trim())}return this},f.removeClass=function(t){if(t&&this.hasClass(t)){var e=this.node.getAttribute("class").replace(new RegExp("(\\s|^)"+t+"(\\s|$)","g"),"$2");this.node.setAttribute("class",e)}return this},f.toggleClass=function(t,e){return(c.isUndefined(e)?this.hasClass(t):!e)?this.removeClass(t):this.addClass(t),this},f.sample=function(t){t=t||1;for(var e,n=this.node,r=n.getTotalLength(),i=[],o=0;o<r;)e=n.getPointAtLength(o),i.push({x:e.x,y:e.y,distance:o}),o+=t;return i},f.convertToPath=function(){var t=c("path");t.attr(this.attr());var e=this.convertToPathData();return e&&t.attr("d",e),t},f.convertToPathData=function(){var t=this.tagName();switch(t){case"PATH":return this.attr("d");case"LINE":return c.convertLineToPathData(this.node);case"POLYGON":return c.convertPolygonToPathData(this.node);case"POLYLINE":return c.convertPolylineToPathData(this.node);case"ELLIPSE":return c.convertEllipseToPathData(this.node);case"CIRCLE":return c.convertCircleToPathData(this.node);case"RECT":return c.convertRectToPathData(this.node)}throw new Error(t+" cannot be converted to PATH.")},c.prototype.toGeometryShape=function(){var t,e,n,r,i,o,a,s,u,l,f,h,d,p,g;switch(this.tagName()){case"RECT":return t=parseFloat(this.attr("x"))||0,e=parseFloat(this.attr("y"))||0,n=parseFloat(this.attr("width"))||0,r=parseFloat(this.attr("height"))||0,new ut(t,e,n,r);case"CIRCLE":return i=parseFloat(this.attr("cx"))||0,o=parseFloat(this.attr("cy"))||0,a=parseFloat(this.attr("r"))||0,new Z({x:i,y:o},a,a);case"ELLIPSE":return i=parseFloat(this.attr("cx"))||0,o=parseFloat(this.attr("cy"))||0,s=parseFloat(this.attr("rx"))||0,u=parseFloat(this.attr("ry"))||0,new Z({x:i,y:o},s,u);case"POLYLINE":return l=c.getPointsFromSvgNode(this),new mt(l);case"POLYGON":return(l=c.getPointsFromSvgNode(this)).length>1&&l.push(l[0]),new mt(l);case"PATH":return f=this.attr("d"),Et.isDataSupported(f)||(f=c.normalizePathData(f)),new Et(f);case"LINE":return h=parseFloat(this.attr("x1"))||0,p=parseFloat(this.attr("y1"))||0,d=parseFloat(this.attr("x2"))||0,g=parseFloat(this.attr("y2"))||0,new ht({x:h,y:p},{x:d,y:g})}return this.getBBox()},f.findIntersection=function(t,e){var n=this.svg().node;e=e||n;var r=this.getBBox({target:e}),i=r.center();if(r.intersectionWithLineFromCenterToPoint(t)){var o,a=this.tagName();if("RECT"===a){var s=new ut(parseFloat(this.attr("x")||0),parseFloat(this.attr("y")||0),parseFloat(this.attr("width")),parseFloat(this.attr("height"))),u=this.getTransformToElement(e),l=c.decomposeMatrix(u),f=n.createSVGTransform();f.setRotate(-l.rotation,i.x,i.y);var h=c.transformRect(s,f.matrix.multiply(u));o=new ut(h).intersectionWithLineFromCenterToPoint(t,l.rotation)}else if("PATH"===a||"POLYGON"===a||"POLYLINE"===a||"CIRCLE"===a||"ELLIPSE"===a){var d,p,g,v,m,y=("PATH"===a?this:this.convertToPath()).sample(),b=1/0,w=[];for(d=0;d<y.length;d++)p=y[d],g=(g=c.createSVGPoint(p.x,p.y)).matrixTransform(this.getTransformToElement(e)),(m=(p=new Y(g)).distance(i)+(v=1.1*p.distance(t)))<b?(b=m,w=[{sample:p,refDistance:v}]):m<b+1&&w.push({sample:p,refDistance:v});w.sort((function(t,e){return t.refDistance-e.refDistance})),w[0]&&(o=w[0].sample)}return o}},f.setAttribute=function(t,e){var n=this.node;if(null===e)return this.removeAttr(t),this;var r=c.qualifyAttr(t);return r.ns?n.setAttributeNS(r.ns,t,e):"id"===t?n.id=e:n.setAttribute(t,e),this},c.createSvgDocument=function(e){if(e){var n='<svg xmlns="'.concat(t.svg,'" xmlns:xlink="').concat(t.xlink,'" version="1.1">').concat(e,"</svg>");return c.parseXML(n,{async:!1}).documentElement}var r=document.createElementNS(t.svg,"svg");return r.setAttributeNS(t.xmlns,"xmlns:xlink",t.xlink),r.setAttribute("version","1.1"),r},c.createSVGStyle=function(t){return c("style",{type:"text/css"},[c.createCDATASection(t)]).node},c.createCDATASection=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return document.implementation.createDocument(null,"xml",null).createCDATASection(t)},c.idCounter=0,c.uniqueId=function(){return"v-"+ ++c.idCounter},c.toNode=function(t){return c.isV(t)?t.node:t.nodeName&&t||t[0]},c.ensureId=function(t){return(t=c.toNode(t)).id||(t.id=c.uniqueId())},c.sanitizeText=function(t){return(t||"").replace(/ /g," ")},c.isUndefined=function(t){return void 0===t},c.isString=function(t){return"string"==typeof t},c.isObject=function(t){return t&&"object"==h(t)},c.isArray=Array.isArray,c.parseXML=function(t,e){var n;e=e||{};try{var r=new DOMParser;c.isUndefined(e.async)||(r.async=e.async),n=r.parseFromString(t,"text/xml")}catch(t){n=void 0}if(!n||n.getElementsByTagName("parsererror").length)throw new Error("Invalid XML: "+t);return n},c.qualifyAttr=function(e){if(-1!==e.indexOf(":")){var n=e.split(":");return{ns:t[n[0]],local:n[1]}}return{ns:null,local:e}},c.transformRegex=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,c.transformSeparatorRegex=/[ ,]+/,c.transformationListRegex=/^(\w+)\((.*)\)/,c.transformStringToMatrix=function(t){var e=c.createSVGMatrix(),n=t&&t.match(c.transformRegex);if(!n)return e;for(var r=0,i=n.length;r<i;r++){var o=n[r].match(c.transformationListRegex);if(o){var a,s,u,l,f,h=c.createSVGMatrix(),d=o[2].split(c.transformSeparatorRegex);switch(o[1].toLowerCase()){case"scale":a=parseFloat(d[0]),s=void 0===d[1]?a:parseFloat(d[1]),h=h.scaleNonUniform(a,s);break;case"translate":u=parseFloat(d[0]),l=parseFloat(d[1]),h=h.translate(u,l);break;case"rotate":f=parseFloat(d[0]),u=parseFloat(d[1])||0,l=parseFloat(d[2])||0,h=0!==u||0!==l?h.translate(u,l).rotate(f).translate(-u,-l):h.rotate(f);break;case"skewx":f=parseFloat(d[0]),h=h.skewX(f);break;case"skewy":f=parseFloat(d[0]),h=h.skewY(f);break;case"matrix":h.a=parseFloat(d[0]),h.b=parseFloat(d[1]),h.c=parseFloat(d[2]),h.d=parseFloat(d[3]),h.e=parseFloat(d[4]),h.f=parseFloat(d[5]);break;default:continue}e=e.multiply(h)}}return e},c.matrixToTransformString=function(t){return t||(t=!0),"matrix("+(void 0!==t.a?t.a:1)+","+(void 0!==t.b?t.b:0)+","+(void 0!==t.c?t.c:0)+","+(void 0!==t.d?t.d:1)+","+(void 0!==t.e?t.e:0)+","+(void 0!==t.f?t.f:0)+")"},c.parseTransformString=function(t){var e,n,r;if(t){var i=c.transformSeparatorRegex;if(t.trim().indexOf("matrix")>=0){var o=c.transformStringToMatrix(t),a=c.decomposeMatrix(o);e=[a.translateX,a.translateY],r=[a.scaleX,a.scaleY],n=[a.rotation];var s=[];0===e[0]&&0===e[1]||s.push("translate("+e+")"),1===r[0]&&1===r[1]||s.push("scale("+r+")"),0!==n[0]&&s.push("rotate("+n+")"),t=s.join(" ")}else{var u=t.match(/translate\((.*?)\)/);u&&(e=u[1].split(i));var l=t.match(/rotate\((.*?)\)/);l&&(n=l[1].split(i));var f=t.match(/scale\((.*?)\)/);f&&(r=f[1].split(i))}}var h=r&&r[0]?parseFloat(r[0]):1;return{value:t,translate:{tx:e&&e[0]?parseInt(e[0],10):0,ty:e&&e[1]?parseInt(e[1],10):0},rotate:{angle:n&&n[0]?parseInt(n[0],10):0,cx:n&&n[1]?parseInt(n[1],10):void 0,cy:n&&n[2]?parseInt(n[2],10):void 0},scale:{sx:h,sy:r&&r[1]?parseFloat(r[1]):h}}},c.deltaTransformPoint=function(t,e){return{x:e.x*t.a+e.y*t.c+0,y:e.x*t.b+e.y*t.d+0}},c.decomposeMatrix=function(t){var e=c.deltaTransformPoint(t,{x:0,y:1}),n=c.deltaTransformPoint(t,{x:1,y:0}),a=180/r*i(e.y,e.x)-90,s=180/r*i(n.y,n.x);return{translateX:t.e,translateY:t.f,scaleX:o(t.a*t.a+t.b*t.b),scaleY:o(t.c*t.c+t.d*t.d),skewX:a,skewY:s,rotation:a}},c.matrixToScale=function(t){var e,n,r,i;return t?(e=c.isUndefined(t.a)?1:t.a,i=c.isUndefined(t.d)?1:t.d,n=t.b,r=t.c):e=i=1,{sx:n?o(e*e+n*n):e,sy:r?o(r*r+i*i):i}},c.matrixToRotate=function(t){var e={x:0,y:1};return t&&(e=c.deltaTransformPoint(t,e)),{angle:A(C(i(e.y,e.x))-90)}},c.matrixToTranslate=function(t){return{tx:t&&t.e||0,ty:t&&t.f||0}},c.isVElement=c.isV=function(t){return t instanceof c},c.isSVGGraphicsElement=function(t){return!!t&&(t=c.toNode(t))instanceof SVGElement&&"function"==typeof t.getScreenCTM};var v=c("svg").node;return c.createSVGMatrix=function(t){var e=v.createSVGMatrix();for(var n in t)e[n]=t[n];return e},c.createSVGTransform=function(t){return c.isUndefined(t)?v.createSVGTransform():(t instanceof SVGMatrix||(t=c.createSVGMatrix(t)),v.createSVGTransformFromMatrix(t))},c.createSVGPoint=function(t,e){var n=v.createSVGPoint();return n.x=t,n.y=e,n},c.transformRect=function(t,e){var n=v.createSVGPoint();n.x=t.x,n.y=t.y;var r=n.matrixTransform(e);n.x=t.x+t.width,n.y=t.y;var i=n.matrixTransform(e);n.x=t.x+t.width,n.y=t.y+t.height;var o=n.matrixTransform(e);n.x=t.x,n.y=t.y+t.height;var u=n.matrixTransform(e),l=a(r.x,i.x,o.x,u.x),c=s(r.x,i.x,o.x,u.x),f=a(r.y,i.y,o.y,u.y),h=s(r.y,i.y,o.y,u.y);return new ut(l,f,c-l,h-f)},c.transformPoint=function(t,e){return new Y(c.createSVGPoint(t.x,t.y).matrixTransform(e))},c.transformLine=function(t,e){return new ht(c.transformPoint(t.start,e),c.transformPoint(t.end,e))},c.transformPolyline=function(t,e){var n=t instanceof mt?t.points:t;c.isArray(n)||(n=[]);for(var r=[],i=0,o=n.length;i<o;i++)r[i]=c.transformPoint(n[i],e);return new mt(r)},c.styleToObject=function(t){for(var e={},n=t.split(";"),r=0;r<n.length;r++){var i=n[r].split("=");e[i[0].trim()]=i[1].trim()}return e},c.createSlicePathData=function(t,e,n,i){var o=2*r-1e-6,a=t,s=e,c=n,f=i,h=(f<c&&(h=c,c=f,f=h),f-c),d=h<r?"0":"1",p=u(c),g=l(c),v=u(f),m=l(f);return h>=o?a?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+-s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+a+"A"+a+","+a+" 0 1,0 0,"+-a+"A"+a+","+a+" 0 1,0 0,"+a+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+-s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":a?"M"+s*p+","+s*g+"A"+s+","+s+" 0 "+d+",1 "+s*v+","+s*m+"L"+a*v+","+a*m+"A"+a+","+a+" 0 "+d+",0 "+a*p+","+a*g+"Z":"M"+s*p+","+s*g+"A"+s+","+s+" 0 "+d+",1 "+s*v+","+s*m+"L0,0Z"},c.mergeAttrs=function(t,e){for(var n in e)"class"===n?t[n]=t[n]?t[n]+" "+e[n]:e[n]:"style"===n?c.isObject(t[n])&&c.isObject(e[n])?t[n]=c.mergeAttrs(t[n],e[n]):c.isObject(t[n])?t[n]=c.mergeAttrs(t[n],c.styleToObject(e[n])):c.isObject(e[n])?t[n]=c.mergeAttrs(c.styleToObject(t[n]),e[n]):t[n]=c.mergeAttrs(c.styleToObject(t[n]),c.styleToObject(e[n])):t[n]=e[n];return t},c.annotateString=function(t,e,n){e=e||[];for(var r,i,o,a=(n=n||{}).offset||0,s=[],u=[],l=0;l<t.length;l++){i=u[l]=t[l];for(var f=0;f<e.length;f++){var h=e[f],d=h.start+a,p=h.end+a;l>=d&&l<p&&(c.isObject(i)?i.attrs=c.mergeAttrs(c.mergeAttrs({},i.attrs),h.attrs):i=u[l]={t:t[l],attrs:h.attrs},n.includeAnnotationIndices&&(i.annotations||(i.annotations=[])).push(f))}(o=u[l-1])?c.isObject(i)&&c.isObject(o)?JSON.stringify(i.attrs)===JSON.stringify(o.attrs)?r.t+=i.t:(s.push(r),r=i):c.isObject(i)||c.isObject(o)?(s.push(r),r=i):r=(r||"")+i:r=i}return r&&s.push(r),s},c.findAnnotationsAtIndex=function(t,e){var n=[];return t&&t.forEach((function(t){t.start<e&&e<=t.end&&n.push(t)})),n},c.findAnnotationsBetweenIndexes=function(t,e,n){var r=[];return t&&t.forEach((function(t){(e>=t.start&&e<t.end||n>t.start&&n<=t.end||t.start>=e&&t.end<n)&&r.push(t)})),r},c.shiftAnnotations=function(t,e,n){return t&&t.forEach((function(t){t.start<e&&t.end>=e?t.end+=n:t.start>=e&&(t.start+=n,t.end+=n)})),t},c.convertLineToPathData=function(t){return["M",(t=c(t)).attr("x1"),t.attr("y1"),"L",t.attr("x2"),t.attr("y2")].join(" ")},c.convertPolygonToPathData=function(t){var e=c.getPointsFromSvgNode(t);return 0===e.length?null:c.svgPointsToPath(e)+" Z"},c.convertPolylineToPathData=function(t){var e=c.getPointsFromSvgNode(t);return 0===e.length?null:c.svgPointsToPath(e)},c.svgPointsToPath=function(t){for(var e=0,n=t.length;e<n;e++)t[e]=t[e].x+" "+t[e].y;return"M "+t.join(" L")},c.getPointsFromSvgNode=function(t){var e=[],n=(t=c.toNode(t)).points;if(n)for(var r=0,i=n.numberOfItems;r<i;r++)e.push(n.getItem(r));return e},c.KAPPA=.551784,c.convertCircleToPathData=function(t){t=c(t);var e=parseFloat(t.attr("cx"))||0,n=parseFloat(t.attr("cy"))||0,r=parseFloat(t.attr("r")),i=r*c.KAPPA;return["M",e,n-r,"C",e+i,n-r,e+r,n-i,e+r,n,"C",e+r,n+i,e+i,n+r,e,n+r,"C",e-i,n+r,e-r,n+i,e-r,n,"C",e-r,n-i,e-i,n-r,e,n-r,"Z"].join(" ")},c.convertEllipseToPathData=function(t){t=c(t);var e=parseFloat(t.attr("cx"))||0,n=parseFloat(t.attr("cy"))||0,r=parseFloat(t.attr("rx")),i=parseFloat(t.attr("ry"))||r,o=r*c.KAPPA,a=i*c.KAPPA;return["M",e,n-i,"C",e+o,n-i,e+r,n-a,e+r,n,"C",e+r,n+a,e+o,n+i,e,n+i,"C",e-o,n+i,e-r,n+a,e-r,n,"C",e-r,n-a,e-o,n-i,e,n-i,"Z"].join(" ")},c.convertRectToPathData=function(t){return t=c(t),c.rectToPath({x:parseFloat(t.attr("x"))||0,y:parseFloat(t.attr("y"))||0,width:parseFloat(t.attr("width"))||0,height:parseFloat(t.attr("height"))||0,rx:parseFloat(t.attr("rx"))||0,ry:parseFloat(t.attr("ry"))||0})},c.rectToPath=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=a(t.rx||t["top-rx"]||0,r/2),s=a(t.rx||t["bottom-rx"]||0,r/2),u=a(t.ry||t["top-ry"]||0,i/2),l=a(t.ry||t["bottom-ry"]||0,i/2);return(o||s||u||l?["M",e,n+u,"v",i-u-l,"a",s,l,0,0,0,s,l,"h",r-2*s,"a",s,l,0,0,0,s,-l,"v",-(i-l-u),"a",o,u,0,0,0,-o,-u,"h",-(r-2*o),"a",o,u,0,0,0,-o,u,"Z"]:["M",e,n,"H",e+r,"V",n+i,"H",e,"V",n,"Z"]).join(" ")},c.normalizePathData=function(){var t="\t\n\v\f\r   ᠎              \u2028\u2029",e=new RegExp("([a-z])["+t+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+t+"]*,?["+t+"]*)+)","ig"),n=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+t+"]*,?["+t+"]*","ig"),r=Math,i=r.PI,o=r.sin,a=r.cos,s=r.tan,u=r.asin,l=r.sqrt,c=r.abs;function f(t,e,n,r,i,o){var a=1/3,s=2/3;return[a*t+s*n,a*e+s*r,a*i+s*n,a*o+s*r,i,o]}function h(t,e,n){return{x:t*a(n)-e*o(n),y:t*o(n)+e*a(n)}}function d(t,e,n,r,f,p,g,v,m,y){var b,w=120*i/180,x=i/180*(+f||0),S=[];if(y)L=y[0],M=y[1],T=y[2],N=y[3];else{t=(b=h(t,e,-x)).x,e=b.y;var k=(t-(v=(b=h(v,m,-x)).x))/2,_=(e-(m=b.y))/2,E=k*k/(n*n)+_*_/(r*r);E>1&&(n*=E=l(E),r*=E);var A=n*n,P=r*r,C=(p==g?-1:1)*l(c((A*P-A*_*_-P*k*k)/(A*_*_+P*k*k))),T=C*n*_/r+(t+v)/2,N=C*-r*k/n+(e+m)/2,L=u(((e-N)/r).toFixed(9)),M=u(((m-N)/r).toFixed(9));(L=t<T?i-L:L)<0&&(L=2*i+L),(M=v<T?i-M:M)<0&&(M=2*i+M),g&&L>M&&(L-=2*i),!g&&M>L&&(M-=2*i)}var O=M-L;if(c(O)>w){var R=M,F=v,D=m;S=d(v=T+n*a(M=L+w*(g&&M>L?1:-1)),m=N+r*o(M),n,r,f,0,g,F,D,[M,R,T,N])}O=M-L;var j=a(L),I=o(L),B=a(M),z=o(M),V=s(O/4),$=4/3*(n*V),U=4/3*(r*V),q=[t,e],H=[t+$*I,e-U*j],G=[v+$*z,m-U*B],W=[v,m];if(H[0]=2*q[0]-H[0],H[1]=2*q[1]-H[1],y)return[H,G,W].concat(S);for(var Y=[],X=(S=[H,G,W].concat(S).join().split(",")).length,Q=0;Q<X;Q++)Y[Q]=Q%2?h(S[Q-1],S[Q],x).y:h(S[Q],S[Q+1],x).x;return Y}return function(t){return function(t){var r=function(t){if(Array.isArray(t)&&Array.isArray(t&&t[0])||(t=function(t){if(!t)return null;var r={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return String(t).replace(e,(function(t,e,o){var a=[],s=e.toLowerCase();for(o.replace(n,(function(t,e){e&&a.push(+e)})),"m"===s&&a.length>2&&(i.push([e].concat(a.splice(0,2))),s="l",e="m"===e?"l":"L");a.length>=r[s]&&(i.push([e].concat(a.splice(0,r[s]))),r[s]););})),i}(t)),!t||!t.length)return[["M",0,0]];for(var r,i=[],o=0,a=0,s=0,u=0,l=t.length,c=0;c<l;c++){var f=[];i.push(f);var h,d,p=t[c];if((r=p[0])!=r.toUpperCase())switch(f[0]=r.toUpperCase(),f[0]){case"A":f[1]=p[1],f[2]=p[2],f[3]=p[3],f[4]=p[4],f[5]=p[5],f[6]=+p[6]+o,f[7]=+p[7]+a;break;case"V":f[1]=+p[1]+a;break;case"H":f[1]=+p[1]+o;break;case"M":for(s=+p[1]+o,u=+p[2]+a,h=p.length,d=1;d<h;d++)f[d]=+p[d]+(d%2?o:a);break;default:for(h=p.length,d=1;d<h;d++)f[d]=+p[d]+(d%2?o:a)}else for(var g=p.length,v=0;v<g;v++)f[v]=p[v];switch(f[0]){case"Z":o=+s,a=+u;break;case"H":o=f[1];break;case"V":a=f[1];break;case"M":s=f[f.length-2],u=f[f.length-1],o=f[f.length-2],a=f[f.length-1];break;default:o=f[f.length-2],a=f[f.length-1]}}return i}(t),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function o(t,e,n){var r,i;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(t[0]in{T:1,Q:1}||(e.qx=null,e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=0===parseFloat(t[1])||0===parseFloat(t[2])?["L",t[6],t[7]]:["C"].concat(d.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"===n||"S"===n?(r=2*e.x-e.bx,i=2*e.y-e.by):(r=e.x,i=e.y),t=["C",r,i].concat(t.slice(1));break;case"T":"Q"===n||"T"===n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(f(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(f(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"H":t=["L"].concat(t[1],e.y);break;case"V":t=["L"].concat(e.x,t[1])}return t}function a(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)s[e]="A",t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),c=r.length}}for(var s=[],u="",l="",c=r.length,h=0;h<c;h++){r[h]&&(u=r[h][0]),"C"!==u&&(s[h]=u,h>0&&(l=s[h-1])),r[h]=o(r[h],i,l),"A"!==s[h]&&"C"===u&&(s[h]="C"),a(r,h);var p=r[h],g=p.length;i.x=p[g-2],i.y=p[g-1],i.bx=parseFloat(p[g-4])||i.x,i.by=parseFloat(p[g-3])||i.y}return r[0][0]&&"M"===r[0][0]||r.unshift(["M",0,0]),r}(t).join(",").split(",").join(" ")}}(),c.namespace=t,c.g=n,c}(),be=b(3804),we=b(1273),xe="joint-",Se=function(t){return t?t.toString().split(" ").map((function(t){return t.substr(0,xe.length)!==xe&&(t=xe+t),t})).join(" "):t},ke=function(t){return t?t.toString().split(" ").map((function(t){return t.substr(0,xe.length)===xe&&(t=t.substr(xe.length)),t})).join(" "):t},_e=function(t,e){for(var n={},r={},i=ye.namespace.svg,o=e||i,a=document.createDocumentFragment(),s=[t,a,o];s.length>0;){o=s.pop();for(var u=s.pop(),l=s.pop(),c=0,f=l.length;c<f;c++){var h=l[c];if(!h.hasOwnProperty("tagName"))throw new Error("json-dom-parser: missing tagName");var d=h.tagName;h.hasOwnProperty("namespaceURI")&&(o=h.namespaceURI);var p=document.createElementNS(o,d),g=o===i,v=g?ye:we,m=h.attributes;m&&v(p).attr(m);var y=h.style;if(y&&we(p).css(y),h.hasOwnProperty("className")){var b=h.className;g?p.className.baseVal=b:p.className=b}if(h.hasOwnProperty("textContent")&&(p.textContent=h.textContent),h.hasOwnProperty("selector")){var w=h.selector;if(n[w])throw new Error("json-dom-parser: selector must be unique");n[w]=p,v(p).attr("joint-selector",w)}if(h.hasOwnProperty("groupSelector")){var x=h.groupSelector;Array.isArray(x)||(x=[x]);for(var S=0,k=x.length;S<k;S++){var _=x[S],E=r[_];E||(E=r[_]=[]),E.push(p)}}u.appendChild(p);var A=h.children;Array.isArray(A)&&s.push(A,p,o)}}return{fragment:a,selectors:n,groupSelectors:r}},Ee=function(t){var e=0;if(0===t.length)return e;for(var n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e&=e;return e},Ae=function(t,e,n){for(var r,i=Array.isArray(e)?e:e.split(n||"/"),o=0,a=i.length;o<a;){if(r=i[o++],Object(t)!==t||!(r in t))return;t=t[r]}return t},Pe=function(t,e){return"string"!=typeof e&&"number"!=typeof e&&(e=String(e)),("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!==e},Ce=function(t,e,n,r){for(var i=Array.isArray(e)?e:e.split(r||"/"),o=i.length-1,a=t,s=0;s<o;s++){var u=i[s];if(!Pe(a,u))return t;a=a[u]||(a[u]={})}return a[i[o]]=n,t},Te=function(t,e,n){for(var r=Array.isArray(e)?e:e.split(n||"/"),i=r.length-1,o=t,a=0;a<i;a++){var s=r[a];if(!Pe(o,s))return t;var u=o[s];if(!u)return t;o=u}return delete o[r[i]],t},Ne=function t(e){return t.id=t.id||1,e.id=void 0===e.id?"j_"+t.id++:e.id,e.id},Le=function(t){var e=t,n=t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0];if(n){for(var r in t)void 0===n[r]&&(n[r]=t[r]);e=n}var i=e.target;if(i){var o=i.correspondingUseElement;o&&(e.target=o)}return e},Me=function(){var t;if("undefined"!=typeof window&&(t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame),!t){var e=0;t=function(t){var n=(new Date).getTime(),r=Math.max(0,16-(n-e)),i=setTimeout((function(){t(n+r)}),r);return e=n+r,i}}return function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t(void 0!==n?e.bind.apply(e,[n].concat(i)):e)}}(),Oe=((ve="undefined"!=typeof window)&&(ge=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelAnimationFrame||window.oCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelRequestAnimationFrame),ge=ge||clearTimeout,ve?ge.bind(window):ge),Re=function(t){return mn(t)&&"%"===t.slice(-1)},Fe=function(t,e){var n=parseFloat(t);if(Number.isNaN(n))return null;var r,i={};if(i.value=n,null==e)r="[A-Za-z]*";else if(Array.isArray(e)){if(0===e.length)return null;r=e.join("|")}else mn(e)&&(r=e);var o=function(e){var n=new RegExp("(?:\\d+(?:\\.\\d+)*)("+e+")$").exec(t);return n?n[1]:null}(r);return null===o?null:(i.unit=o,i)},De=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.width,o=e.height,a=r.svgDocument||ye("svg").node,s=ye("tspan").node,l=ye("text").attr(n).append(s).node,c=document.createTextNode("");l.style.opacity=0,l.style.display="block",s.style.display="block",s.appendChild(c),a.appendChild(l),r.svgDocument||document.body.appendChild(a);var f=r.separator||" ",h=r.eol||"\n",d=r.hyphen?new RegExp(r.hyphen):/[^\w\d]/,p=r.maxLineCount;vn(p)||(p=1/0);for(var g,v,m,y=t.split(f),b=[],w=[],x=0,S=0,k=y.length;x<k;x++){var _=y[x];if(_){var E=!1;if(h&&_.indexOf(h)>=0){if(_.length>1){for(var A=_.split(h),P=0,C=A.length-1;P<C;P++)A.splice(2*P+1,0,h);y.splice.apply(y,[x,1].concat(u(A.filter((function(t){return""!==t}))))),x--,k=y.length;continue}w[++S]="",E=!0}if(!E)if(c.data=w[S]?w[S]+" "+_:_,s.getComputedTextLength()<=i)w[S]=c.data,(g||v)&&(b[S++]=!0,g=0,v=0);else{if(!w[S]||g){var T=!!g;if(g=_.length-1,T||!g){if(!g){if(!w[S]){w=[];break}y.splice(x,2,_+y[x+1]),k--,b[S++]=!0,x--;continue}y[x]=_.substring(0,g),y[x+1]=_.substring(g)+(void 0===y[x+1]?"":y[x+1])}else{if(v)y.splice(x,2,y[x]+y[x+1]),v=0;else{var N=_.search(d);N>-1&&N!==_.length-1&&0!==N&&(v=N+1,g=0),y.splice(x,1,_.substring(0,v||g),_.substring(v||g)),k++}S&&!b[S-1]&&S--}x--;continue}S++,x--}var L=null;if(w.length>p)L=p-1;else if(void 0!==o){var M;void 0===m&&(m=(M="auto"===n.lineHeight?{value:1.5,unit:"em"}:Fe(n.lineHeight,["em"])||{value:1,unit:"em"}).value,"em"===M.unit&&(m*=l.getBBox().height)),m*w.length>o&&(L=Math.floor(o/m)-1)}if(null!==L){w.splice(L+1);var O=r.ellipsis;if(!O||L<0)break;"string"!=typeof O&&(O="…");var R=w[L];if(!R&&!E)break;var F,D,j=R.length;do{if(D=R[j],F=R.substring(0,j),D?D.match(f)&&(F+=D):F+="string"==typeof f?f:" ",F+=O,c.data=F,s.getComputedTextLength()<=i){w[L]=F;break}j--}while(j>=0);break}}}return r.svgDocument?a.removeChild(l):document.body.removeChild(a),w.join(h)},je=function(t){if(Object(t)!==t){var e=0;return isFinite(t)&&(e=+t),{top:e,right:e,bottom:e,left:e}}var n,r,i,o;return n=r=i=o=0,isFinite(t.vertical)&&(n=i=+t.vertical),isFinite(t.horizontal)&&(r=o=+t.horizontal),isFinite(t.top)&&(n=+t.top),isFinite(t.right)&&(r=+t.right),isFinite(t.bottom)&&(i=+t.bottom),isFinite(t.left)&&(o=+t.left),{top:n,right:r,bottom:i,left:o}},Ie={linear:function(t){return t},quad:function(t){return t*t},cubic:function(t){return t*t*t},inout:function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)},exponential:function(t){return Math.pow(2,10*(t-1))},bounce:function(t){for(var e=0,n=1;;e+=n,n/=2)if(t>=(7-4*e)/11){var r=(11-6*e-11*t)/4;return-r*r+n*n}},reverse:function(t){return function(e){return 1-t(1-e)}},reflect:function(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}},clamp:function(t,e,n){return e=e||0,n=n||1,function(r){var i=t(r);return i<e?e:i>n?n:i}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},elastic:function(t){return t||(t=1.5),function(e){return Math.pow(2,10*(e-1))*Math.cos(20*Math.PI*t/3*e)}}},Be={number:function(t,e){var n=e-t;return function(e){return t+n*e}},object:function(t,e){var n=Object.keys(t);return function(r){var i,o,a={};for(i=n.length-1;-1!=i;i--)a[o=n[i]]=t[o]+(e[o]-t[o])*r;return a}},hexColor:function(t,e){var n=parseInt(t.slice(1),16),r=parseInt(e.slice(1),16),i=255&n,o=(255&r)-i,a=65280&n,s=(65280&r)-a,u=16711680&n,l=(16711680&r)-u;return function(t){return"#"+(1<<24|i+o*t&255|a+s*t&65280|u+l*t&16711680).toString(16).slice(1)}},unit:function(t,e){var n=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=n.exec(t),i=n.exec(e),o=i[1].indexOf("."),a=o>0?i[1].length-o-1:0;t=+r[1];var s=+i[1]-t,u=r[2];return function(e){return(t+s*e).toFixed(a)+u}}},ze={outline:function(t){var e=Number.isFinite(t.margin)?t.margin:2,n=Number.isFinite(t.width)?t.width:1;return Ve('<filter><feFlood flood-color="${color}" flood-opacity="${opacity}" result="colored"/><feMorphology in="SourceAlpha" result="morphedOuter" operator="dilate" radius="${outerRadius}" /><feMorphology in="SourceAlpha" result="morphedInner" operator="dilate" radius="${innerRadius}" /><feComposite result="morphedOuterColored" in="colored" in2="morphedOuter" operator="in"/><feComposite operator="xor" in="morphedOuterColored" in2="morphedInner" result="outline"/><feMerge><feMergeNode in="outline"/><feMergeNode in="SourceGraphic"/></feMerge></filter>')({color:t.color||"blue",opacity:Number.isFinite(t.opacity)?t.opacity:1,outerRadius:e+n,innerRadius:e})},highlight:function(t){return Ve('<filter><feFlood flood-color="${color}" flood-opacity="${opacity}" result="colored"/><feMorphology result="morphed" in="SourceGraphic" operator="dilate" radius="${width}"/><feComposite result="composed" in="colored" in2="morphed" operator="in"/><feGaussianBlur result="blured" in="composed" stdDeviation="${blur}"/><feBlend in="SourceGraphic" in2="blured" mode="normal"/></filter>')({color:t.color||"red",width:Number.isFinite(t.width)?t.width:1,blur:Number.isFinite(t.blur)?t.blur:0,opacity:Number.isFinite(t.opacity)?t.opacity:1})},blur:function(t){var e=Number.isFinite(t.x)?t.x:2;return Ve('<filter><feGaussianBlur stdDeviation="${stdDeviation}"/></filter>')({stdDeviation:Number.isFinite(t.y)?[e,t.y]:e})},dropShadow:function(t){var e="SVGFEDropShadowElement"in window?'<filter><feDropShadow stdDeviation="${blur}" dx="${dx}" dy="${dy}" flood-color="${color}" flood-opacity="${opacity}"/></filter>':'<filter><feGaussianBlur in="SourceAlpha" stdDeviation="${blur}"/><feOffset dx="${dx}" dy="${dy}" result="offsetblur"/><feFlood flood-color="${color}"/><feComposite in2="offsetblur" operator="in"/><feComponentTransfer><feFuncA type="linear" slope="${opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';return Ve(e)({dx:t.dx||0,dy:t.dy||0,opacity:Number.isFinite(t.opacity)?t.opacity:1,color:t.color||"black",blur:Number.isFinite(t.blur)?t.blur:4})},grayscale:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${b} ${h} 0 0 0 0 0 1 0"/></filter>')({a:.2126+.7874*(1-e),b:.7152-.7152*(1-e),c:.0722-.0722*(1-e),d:.2126-.2126*(1-e),e:.7152+.2848*(1-e),f:.0722-.0722*(1-e),g:.2126-.2126*(1-e),h:.0722+.9278*(1-e)})},sepia:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${h} ${i} 0 0 0 0 0 1 0"/></filter>')({a:.393+.607*(1-e),b:.769-.769*(1-e),c:.189-.189*(1-e),d:.349-.349*(1-e),e:.686+.314*(1-e),f:.168-.168*(1-e),g:.272-.272*(1-e),h:.534-.534*(1-e),i:.131+.869*(1-e)})},saturate:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feColorMatrix type="saturate" values="${amount}"/></filter>')({amount:1-e})},hueRotate:function(t){return Ve('<filter><feColorMatrix type="hueRotate" values="${angle}"/></filter>')({angle:t.angle||0})},invert:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feComponentTransfer><feFuncR type="table" tableValues="${amount} ${amount2}"/><feFuncG type="table" tableValues="${amount} ${amount2}"/><feFuncB type="table" tableValues="${amount} ${amount2}"/></feComponentTransfer></filter>')({amount:e,amount2:1-e})},brightness:function(t){return Ve('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}"/><feFuncG type="linear" slope="${amount}"/><feFuncB type="linear" slope="${amount}"/></feComponentTransfer></filter>')({amount:Number.isFinite(t.amount)?t.amount:1})},contrast:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}" intercept="${amount2}"/><feFuncG type="linear" slope="${amount}" intercept="${amount2}"/><feFuncB type="linear" slope="${amount}" intercept="${amount2}"/></feComponentTransfer></filter>')({amount:e,amount2:.5-e/2})}},Ve=function(t){var e=/<%= ([^ ]+) %>|\$\{ ?([^{} ]+) ?\}|\{\{([^{} ]+)\}\}/g;return function(n){return n=n||{},t.replace(e,(function(t){for(var e=Array.from(arguments),r=e.slice(1,4).find((function(t){return!!t})),i=r.split("."),o=n[i.shift()];void 0!==o&&i.length;)o=o[i.shift()];return void 0!==o?o:""}))}},$e=(be.assign,be.defaults,be.defaultsDeep,be.assign),Ue=be.defaults,qe=be.defaultsDeep,He=be.invokeMap||be.invoke,Ge=be.sortedIndexBy||be.sortedIndex,We=be.uniqBy||be.uniq,Ye=be.clone,Xe=be.cloneDeep,Qe=be.isEmpty,Ke=be.isEqual,Je=be.isFunction,Ze=be.isPlainObject,tn=be.toArray,en=(be.debounce,be.groupBy),nn=(be.sortBy,be.flattenDeep),rn=be.without,on=be.difference,an=(be.intersection,be.union),sn=be.has,un=be.result,ln=be.omit,cn=be.pick,fn=(be.bindAll,be.forIn),hn=be.camelCase,dn=be.uniqueId,pn=function(){if(be.mergeWith){var t=Array.from(arguments),e=t[t.length-1],n=Je(e)?e:yn;return t.push((function(t,e){var r=n(t,e);return void 0!==r?r:Array.isArray(t)&&!Array.isArray(e)?e:void 0})),be.mergeWith.apply(this,t)}return be.merge.apply(this,arguments)},gn=function(t){return!!t&&("object"==h(t)||"function"==typeof t)},vn=function(t){var e=Object.prototype.toString;return"number"==typeof t||!!t&&"object"==h(t)&&"[object Number]"===e.call(t)},mn=function(t){var e=Object.prototype.toString;return"string"==typeof t||!!t&&"object"==h(t)&&"[object String]"===e.call(t)},yn=function(){};function bn(t,e){return 0===e?"0%":Math.round(t/e*100*1e3)/1e3+"%"}function wn(t){return function(e,n,r,i){return(n.isNodeConnection(r)?Sn:xn)(t,e,n,r,i)}}function xn(t,e,n,r,i){var o=n.model.angle(),a=n.getNodeUnrotatedBBox(r),s=n.model.getBBox().center();i.rotate(s,o);var u=i.x-a.x,l=i.y-a.y;return t&&(u=bn(u,a.width),l=bn(l,a.height)),e.anchor={name:"topLeft",args:{dx:u,dy:l,rotate:!0}},e}function Sn(t,e,n,r,i){var o=n.getConnection();if(!o)return e;var a=o.closestPointLength(i);if(t){var s=o.length();e.anchor={name:"connectionRatio",args:{ratio:a/s}}}else e.anchor={name:"connectionLength",args:{length:a}};return e}wn(!1);var kn=wn(!0),_n=b(9240),En={},An=_n.View.extend({options:{},theme:null,themeClassNamePrefix:Se("theme-"),requireSetThemeOverride:!1,defaultTheme:"default",children:null,childNodes:null,DETACHABLE:!0,UPDATE_PRIORITY:2,FLAG_INSERT:1<<30,FLAG_REMOVE:1<<29,constructor:function(t){this.requireSetThemeOverride=t&&!!t.theme,this.options=$e({},this.options,t),_n.View.call(this,t)},initialize:function(){En[this.cid]=this,this.setTheme(this.options.theme||this.defaultTheme),this.init()},unmount:function(){this.svgElement?this.vel.remove():this.$el.remove()},renderChildren:function(t){if(t||(t=un(this,"children")),t){var e=this.svgElement,n=ye.namespace[e?"svg":"xhtml"],r=_e(t,n);(e?this.vel:this.$el).empty().append(r.fragment),this.childNodes=r.selectors}return this},findAttribute:function(t,e){for(var n=e;n&&1===n.nodeType;){var r=n.getAttribute(t);if(r)return r;if(n===this.el)return null;n=n.parentNode}return null},_ensureElement:function(){if(this.el)this.setElement(un(this,"el"));else{var t=un(this,"tagName"),e=$e({},un(this,"attributes")),n=$e({},un(this,"style"));this.id&&(e.id=un(this,"id")),this.setElement(this._createElement(t)),this._setAttributes(e),this._setStyle(n)}this._ensureElClassName()},_setAttributes:function(t){this.svgElement?this.vel.attr(t):this.$el.attr(t)},_setStyle:function(t){this.$el.css(t)},_createElement:function(t){return this.svgElement?document.createElementNS(ye.namespace.svg,t):document.createElement(t)},_setElement:function(t){this.$el=t instanceof _n.$?t:_n.$(t),this.el=this.$el[0],this.svgElement&&(this.vel=ye(this.el))},_ensureElClassName:function(){var t=un(this,"className");if(t){var e=Se(t);this.svgElement?this.vel.removeClass(t).addClass(e):this.$el.removeClass(t).addClass(e)}},init:function(){},onRender:function(){},confirmUpdate:function(){return 0},setTheme:function(t,e){return e=e||{},this.theme&&this.requireSetThemeOverride&&!e.override||(this.removeThemeClassName(),this.addThemeClassName(t),this.onSetTheme(this.theme,t),this.theme=t),this},addThemeClassName:function(t){if(!(t=t||this.theme))return this;var e=this.themeClassNamePrefix+t;return this.svgElement?this.vel.addClass(e):this.$el.addClass(e),this},removeThemeClassName:function(t){t=t||this.theme;var e=this.themeClassNamePrefix+t;return this.svgElement?this.vel.removeClass(e):this.$el.removeClass(e),this},onSetTheme:function(t,e){},remove:function(){return this.onRemove(),this.undelegateDocumentEvents(),En[this.cid]=null,_n.View.prototype.remove.apply(this,arguments),this},onRemove:function(){},getEventNamespace:function(){return".joint-event-ns-"+this.cid},delegateElementEvents:function(t,e,n){if(!e)return this;n||(n={});var r=this.getEventNamespace();for(var i in e){var o=e[i];"function"!=typeof o&&(o=this[o]),o&&we(t).on(i+r,n,o.bind(this))}return this},undelegateElementEvents:function(t){return we(t).off(this.getEventNamespace()),this},delegateDocumentEvents:function(t,e){return t||(t=un(this,"documentEvents")),this.delegateElementEvents(document,t,e)},undelegateDocumentEvents:function(){return this.undelegateElementEvents(document)},eventData:function(t,e){if(!t)throw new Error("eventData(): event object required.");var n=t.data,r="__"+this.cid+"__";return void 0===e?n&&n[r]||{}:(n||(n=t.data={}),n[r]||(n[r]={}),$e(n[r],e),this)},stopPropagation:function(t){return this.eventData(t,{propagationStopped:!0}),this},isPropagationStopped:function(t){return!!this.eventData(t).propagationStopped}},{extend:function(){var t=Array.from(arguments),e=t[0]&&$e({},t[0])||{},n=t[1]&&$e({},t[1])||{},r=e.render||this.prototype&&this.prototype.render||null;return e.render=function(){return"function"==typeof r&&r.apply(this,arguments),this.render.__render__===r&&this.onRender(),this},e.render.__render__=r,_n.View.extend.call(this,e,n)}});if(we.event&&!("dbltap"in we.event.special)){we.event.special.dbltap={bindType:"touchend",delegateType:"touchend",handle:function(t){for(var e,n=t.handleObj,r=t.target,i=we.data(r),o=(new Date).getTime(),a=("lastTouch"in i?o-i.lastTouch:0),s=arguments.length,u=new Array(s>1?s-1:0),l=1;l<s;l++)u[l-1]=arguments[l];a<300&&a>30?(i.lastTouch=null,t.type=n.origType,(e=n.handler).call.apply(e,[this,t].concat(u))):i.lastTouch=o}}}var Pn=An.extend({name:null,tagName:"g",className:"tool",svgElement:!0,_visible:!0,init:function(){var t=this.name;t&&this.vel.attr("data-tool-name",t)},configure:function(t,e){return this.relatedView=t,this.paper=t.paper,this.parentView=e,this.simulateRelatedView(this.el),this.delegateEvents(),this},simulateRelatedView:function(t){t&&t.setAttribute("model-id",this.relatedView.model.id)},getName:function(){return this.name},show:function(){this.el.style.display="",this._visible=!0},hide:function(){this.el.style.display="none",this._visible=!1},isVisible:function(){return!!this._visible},focus:function(){var t=this.options.focusOpacity;isFinite(t)&&(this.el.style.opacity=t),this.parentView.focusTool(this)},blur:function(){this.el.style.opacity="",this.parentView.blurTool(this)},update:function(){},guard:function(t){var e=this.paper,n=this.relatedView;return!e||!n||e.guard(t,n)}});function Cn(t,e,n){return kn.call(this.paper,{},e,n,t,this.model).anchor}function Tn(t,e){var n=t.model;return e?n.getBBox():n.isLink()?t.getConnection().bbox():t.getNodeUnrotatedBBox(t.el)}var Nn=An.extend({tagName:"circle",svgElement:!0,className:"marker-vertex",events:{mousedown:"onPointerDown",touchstart:"onPointerDown",dblclick:"onDoubleClick",dbltap:"onDoubleClick"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},attributes:{r:6,fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move"},position:function(t,e){this.vel.attr({cx:t,cy:e})},onPointerDown:function(t){this.options.guard(t)||(t.stopPropagation(),t.preventDefault(),this.options.paper.undelegateEvents(),this.delegateDocumentEvents(null,t.data),this.trigger("will-change",this,t))},onPointerMove:function(t){this.trigger("changing",this,t)},onDoubleClick:function(t){this.trigger("remove",this,t)},onPointerUp:function(t){this.trigger("changed",this,t),this.undelegateDocumentEvents(),this.options.paper.delegateEvents()}}),Ln=(Pn.extend({name:"vertices",options:{handleClass:Nn,snapRadius:20,redundancyRemoval:!0,vertexAdding:!0,stopPropagation:!0},children:[{tagName:"path",selector:"connection",className:"joint-vertices-path",attributes:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"cell"}}],handles:null,events:{"mousedown .joint-vertices-path":"onPathPointerDown","touchstart .joint-vertices-path":"onPathPointerDown"},onRender:function(){return this.options.vertexAdding&&(this.renderChildren(),this.updatePath()),this.resetHandles(),this.renderHandles(),this},update:function(){return this.relatedView.model.vertices().length===this.handles.length?this.updateHandles():(this.resetHandles(),this.renderHandles()),this.options.vertexAdding&&this.updatePath(),this},resetHandles:function(){var t=this.handles;if(this.handles=[],this.stopListening(),Array.isArray(t))for(var e=0,n=t.length;e<n;e++)t[e].remove()},renderHandles:function(){for(var t=this,e=this.relatedView.model.vertices(),n=0,r=e.length;n<r;n++){var i=e[n],o=new this.options.handleClass({index:n,paper:this.paper,guard:function(e){return t.guard(e)}});o.render(),o.position(i.x,i.y),this.simulateRelatedView(o.el),o.vel.appendTo(this.el),this.handles.push(o),this.startHandleListening(o)}},updateHandles:function(){for(var t=this.relatedView.model.vertices(),e=0,n=t.length;e<n;e++){var r=t[e],i=this.handles[e];if(!i)return;i.position(r.x,r.y)}},updatePath:function(){var t=this.childNodes.connection;t&&t.setAttribute("d",this.relatedView.getSerializedConnection())},startHandleListening:function(t){var e=this.relatedView;e.can("vertexMove")&&(this.listenTo(t,"will-change",this.onHandleWillChange),this.listenTo(t,"changing",this.onHandleChanging),this.listenTo(t,"changed",this.onHandleChanged)),e.can("vertexRemove")&&this.listenTo(t,"remove",this.onHandleRemove)},getNeighborPoints:function(t){var e=this.relatedView,n=e.model.vertices(),r=t>0?n[t-1]:e.sourceAnchor,i=t<n.length-1?n[t+1]:e.targetAnchor;return{prev:new Y(r),next:new Y(i)}},onHandleWillChange:function(t,e){this.focus();var n=this.relatedView,r=this.options;n.model.startBatch("vertex-move",{ui:!0,tool:this.cid}),r.stopPropagation||n.notifyPointerdown.apply(n,u(n.paper.getPointerArgs(e)))},onHandleChanging:function(t,e){var n=this.options,r=this.relatedView,i=t.options.index,o=l(r.paper.getPointerArgs(e),3),a=o[0],s=o[1],u=o[2],c={x:s,y:u};this.snapVertex(c,i),r.model.vertex(i,c,{ui:!0,tool:this.cid}),t.position(c.x,c.y),n.stopPropagation||r.notifyPointermove(a,s,u)},onHandleChanged:function(t,e){var n=this.options,r=this.relatedView;if(n.vertexAdding&&this.updatePath(),n.redundancyRemoval){r.removeRedundantLinearVertices({ui:!0,tool:this.cid})&&this.render(),this.blur(),r.model.stopBatch("vertex-move",{ui:!0,tool:this.cid}),this.eventData(e).vertexAdded&&r.model.stopBatch("vertex-add",{ui:!0,tool:this.cid});var i=l(r.paper.getPointerArgs(e),3),o=i[0],a=i[1],s=i[2];n.stopPropagation||r.notifyPointerup(o,a,s),r.checkMouseleave(o)}},snapVertex:function(t,e){var n=this.options.snapRadius;if(n>0){var r=this.getNeighborPoints(e),i=r.prev,o=r.next;Math.abs(t.x-i.x)<n?t.x=i.x:Math.abs(t.x-o.x)<n&&(t.x=o.x),Math.abs(t.y-i.y)<n?t.y=r.prev.y:Math.abs(t.y-o.y)<n&&(t.y=o.y)}},onHandleRemove:function(t,e){var n=t.options.index,r=this.relatedView;r.model.removeVertex(n,{ui:!0}),this.options.vertexAdding&&this.updatePath(),r.checkMouseleave(Le(e))},onPathPointerDown:function(t){if(!this.guard(t)){t.stopPropagation(),t.preventDefault();var e=Le(t),n=this.paper.snapToGrid(e.clientX,e.clientY).toJSON(),r=this.relatedView;r.model.startBatch("vertex-add",{ui:!0,tool:this.cid});var i=r.getVertexIndex(n.x,n.y);this.snapVertex(n,i),r.model.insertVertex(i,n,{ui:!0,tool:this.cid}),this.update();var o=this.handles[i];this.eventData(e,{vertexAdded:!0}),o.onPointerDown(e)}},onRemove:function(){this.resetHandles()}},{VertexHandle:Nn}),An.extend({tagName:"g",svgElement:!0,className:"marker-segment",events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},children:[{tagName:"line",selector:"line",attributes:{stroke:"#33334F","stroke-width":2,fill:"none","pointer-events":"none"}},{tagName:"rect",selector:"handle",attributes:{width:20,height:8,x:-10,y:-4,rx:4,ry:4,fill:"#33334F",stroke:"#FFFFFF","stroke-width":2}}],onRender:function(){this.renderChildren()},position:function(t,e,n,r){var i=ye.createSVGMatrix().translate(t,e).rotate(n),o=this.childNodes.handle;o.setAttribute("transform",ye.matrixToTransformString(i)),o.setAttribute("cursor",n%180==0?"row-resize":"col-resize");var a=r.getClosestPoint(new Y(t,e)),s=this.childNodes.line;s.setAttribute("x1",t),s.setAttribute("y1",e),s.setAttribute("x2",a.x),s.setAttribute("y2",a.y)},onPointerDown:function(t){this.options.guard(t)||(this.trigger("change:start",this,t),t.stopPropagation(),t.preventDefault(),this.options.paper.undelegateEvents(),this.delegateDocumentEvents(null,t.data))},onPointerMove:function(t){this.trigger("changing",this,t)},onPointerUp:function(t){this.undelegateDocumentEvents(),this.options.paper.delegateEvents(),this.trigger("change:end",this,t)},show:function(){this.el.style.display=""},hide:function(){this.el.style.display="none"}})),Mn=(Pn.extend({name:"segments",precision:.5,options:{handleClass:Ln,segmentLengthThreshold:40,redundancyRemoval:!0,anchor:Cn,snapRadius:10,snapHandle:!0,stopPropagation:!0},handles:null,onRender:function(){this.resetHandles();var t=this.relatedView,e=t.model.vertices();e.unshift(t.sourcePoint),e.push(t.targetPoint);for(var n=0,r=e.length;n<r-1;n++){var i=e[n],o=e[n+1],a=this.renderHandle(i,o);this.simulateRelatedView(a.el),this.handles.push(a),a.options.index=n}return this},renderHandle:function(t,e){var n=this,r=new this.options.handleClass({paper:this.paper,guard:function(t){return n.guard(t)}});return r.render(),this.updateHandle(r,t,e),r.vel.appendTo(this.el),this.startHandleListening(r),r},update:function(){return this.render(),this},startHandleListening:function(t){this.listenTo(t,"change:start",this.onHandleChangeStart),this.listenTo(t,"changing",this.onHandleChanging),this.listenTo(t,"change:end",this.onHandleChangeEnd)},resetHandles:function(){var t=this.handles;if(this.handles=[],this.stopListening(),Array.isArray(t))for(var e=0,n=t.length;e<n;e++)t[e].remove()},shiftHandleIndexes:function(t){for(var e=this.handles,n=0,r=e.length;n<r;n++)e[n].options.index+=t},resetAnchor:function(t,e){var n=this.relatedView.model;e?n.prop([t,"anchor"],e,{rewrite:!0,ui:!0,tool:this.cid}):n.removeProp([t,"anchor"],{ui:!0,tool:this.cid})},snapHandle:function(t,e,n){var r=t.options.index,i=this.relatedView.model.vertices(),o=t.options.axis,a=i[r-2]||n.sourceAnchor,s=i[r+1]||n.targetAnchor,u=this.options.snapRadius;return Math.abs(e[o]-a[o])<u?e[o]=a[o]:Math.abs(e[o]-s[o])<u&&(e[o]=s[o]),e},onHandleChanging:function(t,e){var n=this.options,r=this.eventData(e),i=this.relatedView,o=i.paper,a=t.options.index-1,s=Le(e),u=o.snapToGrid(s.clientX,s.clientY),l=this.snapHandle(t,u.clone(),r),c=t.options.axis,f=this.options.snapHandle?0:u[c]-l[c],h=i.model,d=Xe(h.vertices()),p=d[a],g=d[a+1],v=this.options.anchor;"function"!=typeof v&&(v=null);var m=i.sourceView,y=i.sourceBBox,b=!1,w=!1;if(p?0===a?y.containsPoint(p)?(d.shift(),this.shiftHandleIndexes(-1),b=!0):(p[c]=l[c],w=!0):p[c]=l[c]:((p=i.sourceAnchor.toJSON())[c]=l[c],y.containsPoint(p)?(p[c]=l[c],b=!0):(d.unshift(p),this.shiftHandleIndexes(1),w=!0)),v&&m){if(b){var x=r.sourceAnchor.clone();x[c]=l[c];var S=v.call(i,x,m,i.sourceMagnet||m.el,"source",i);this.resetAnchor("source",S)}w&&this.resetAnchor("source",r.sourceAnchorDef)}var k=i.targetView,_=i.targetBBox,E=!1,A=!1;if(g?a===d.length-2?_.containsPoint(g)?(d.pop(),E=!0):(g[c]=l[c],A=!0):g[c]=l[c]:((g=i.targetAnchor.toJSON())[c]=l[c],_.containsPoint(g)?E=!0:(d.push(g),A=!0)),v&&k){if(E){var P=r.targetAnchor.clone();P[c]=l[c];var C=v.call(i,P,k,i.targetMagnet||k.el,"target",i);this.resetAnchor("target",C)}A&&this.resetAnchor("target",r.targetAnchorDef)}h.vertices(d,{ui:!0,tool:this.cid}),this.updateHandle(t,p,g,f),n.stopPropagation||i.notifyPointermove(s,u.x,u.y)},onHandleChangeStart:function(t,e){var n=this.options,r=this.handles,i=this.relatedView,o=i.model,a=i.paper,s=t.options.index;if(Array.isArray(r)){for(var l=0,c=r.length;l<c;l++)l!==s&&r[l].hide();this.focus(),this.eventData(e,{sourceAnchor:i.sourceAnchor.clone(),targetAnchor:i.targetAnchor.clone(),sourceAnchorDef:Ye(o.prop(["source","anchor"])),targetAnchorDef:Ye(o.prop(["target","anchor"]))}),o.startBatch("segment-move",{ui:!0,tool:this.cid}),n.stopPropagation||i.notifyPointerdown.apply(i,u(a.getPointerArgs(e)))}},onHandleChangeEnd:function(t,e){var n=this.options,r=this.relatedView,i=r.paper,o=r.model;n.redundancyRemoval&&r.removeRedundantLinearVertices({ui:!0,tool:this.cid});var a=Le(e),s=i.snapToGrid(a.clientX,a.clientY);this.render(),this.blur(),o.stopBatch("segment-move",{ui:!0,tool:this.cid}),n.stopPropagation||r.notifyPointerup(a,s.x,s.y),r.checkMouseleave(a)},updateHandle:function(t,e,n,r){var i=Math.abs(e.x-n.x)<this.precision,o=Math.abs(e.y-n.y)<this.precision;if(i||o){var a=new ht(e,n);if(a.length()<this.options.segmentLengthThreshold)t.hide();else{var s=a.midpoint(),u=i?"x":"y";s[u]+=r||0;var l=a.vector().vectorAngle(new Y(1,0));t.position(s.x,s.y,l,this.relatedView),t.show(),t.options.axis=u}}else t.hide()},onRemove:function(){this.resetHandles()}},{SegmentHandle:Ln}),Pn.extend({tagName:"path",xAxisVector:new Y(1,0),events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},onRender:function(){this.update()},update:function(){var t,e,n=this.ratio,r=this.relatedView,i=r.getTangentAtRatio(n);if(i?(t=i.start,e=i.vector().vectorAngle(this.xAxisVector)||0):(t=r.getPointAtRatio(n),e=0),!t)return this;var o=ye.createSVGMatrix().translate(t.x,t.y).rotate(e);return this.vel.transform(o,{absolute:!0}),this},onPointerDown:function(t){if(!this.guard(t)){t.stopPropagation(),t.preventDefault();var e=this.relatedView;e.model.startBatch("arrowhead-move",{ui:!0,tool:this.cid}),e.can("arrowheadMove")&&(e.startArrowheadMove(this.arrowheadType),this.delegateDocumentEvents(),e.paper.undelegateEvents()),this.focus(),this.el.style.pointerEvents="none"}},onPointerMove:function(t){var e=Le(t),n=this.paper.snapToGrid(e.clientX,e.clientY);this.relatedView.pointermove(e,n.x,n.y)},onPointerUp:function(t){this.undelegateDocumentEvents();var e=this.relatedView,n=e.paper,r=Le(t),i=n.snapToGrid(r.clientX,r.clientY);e.pointerup(r,i.x,i.y),n.delegateEvents(),this.blur(),this.el.style.pointerEvents="",e.model.stopBatch("arrowhead-move",{ui:!0,tool:this.cid})}})),On=(Mn.extend({name:"target-arrowhead",ratio:1,arrowheadType:"target",attributes:{d:"M -10 -8 10 0 -10 8 Z",fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move",class:"target-arrowhead"}}),Mn.extend({name:"source-arrowhead",ratio:0,arrowheadType:"source",attributes:{d:"M 10 -8 -10 0 10 8 Z",fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move",class:"source-arrowhead"}}),Pn.extend({name:"button",events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},options:{distance:0,offset:0,rotate:!1},onRender:function(){this.renderChildren(this.options.markup),this.update()},update:function(){return this.position(),this},position:function(){var t=this.relatedView,e=this.vel,n=t.model.isLink()?this.getLinkMatrix():this.getElementMatrix();e.transform(n,{absolute:!0})},getElementMatrix:function(){var t=this.relatedView,e=this.options,n=e.x,r=void 0===n?0:n,i=e.y,o=void 0===i?0:i,a=e.offset,s=void 0===a?{}:a,u=e.useModelGeometry,l=e.rotate,c=Tn(t,u),f=t.model.angle();l||(c=c.bbox(f));var h=s.x,d=void 0===h?0:h,p=s.y,g=void 0===p?0:p;Re(r)&&(r=parseFloat(r)/100*c.width),Re(o)&&(o=parseFloat(o)/100*c.height);var v=ye.createSVGMatrix().translate(c.x+c.width/2,c.y+c.height/2);return l&&(v=v.rotate(f)),v.translate(r+d-c.width/2,o+g-c.height/2)},getLinkMatrix:function(){var t,e,n,r=this.relatedView,i=this.options,o=i.offset,a=void 0===o?0:o,s=i.distance,u=void 0===s?0:s,l=i.rotate;(t=Re(u)?r.getTangentAtRatio(parseFloat(u)/100):r.getTangentAtLength(u))?(e=t.start,n=t.vector().vectorAngle(new Y(1,0))||0):(e=r.getConnection().start,n=0);var c=ye.createSVGMatrix().translate(e.x,e.y).rotate(n).translate(0,a);return l||(c=c.rotate(-n)),c},onPointerDown:function(t){if(!this.guard(t)){t.stopPropagation(),t.preventDefault();var e=this.options.action;"function"==typeof e&&e.call(this.relatedView,t,this.relatedView,this)}}})),Rn=On.extend({children:[{tagName:"circle",selector:"button",attributes:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attributes:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],options:{distance:60,offset:0,action:function(t,e,n){e.model.remove({ui:!0,tool:n.cid})}}});On.extend({name:"connect",documentEvents:{mousemove:"drag",touchmove:"drag",mouseup:"dragend",touchend:"dragend",touchcancel:"dragend"},children:[{tagName:"circle",selector:"button",attributes:{r:7,fill:"#333333",cursor:"pointer"}},{tagName:"path",selector:"icon",attributes:{d:"M -4 -1 L 0 -1 L 0 -4 L 4 0 L 0 4 0 1 -4 1 z",fill:"#FFFFFF",stroke:"none","stroke-width":2,"pointer-events":"none"}}],options:{distance:80,offset:0,magnet:function(t){return t.el},action:function(t,e,n){return n.dragstart(t)}},getMagnetNode:function(){var t,e=this.options,n=this.relatedView,r=e.magnet;switch(h(r)){case"function":t=r.call(this,n,this);break;case"string":t=l(n.findBySelector(r),1)[0];break;default:t=r}if(t||(t=n.el),t instanceof SVGElement)return t;throw new Error("Connect: magnet must be an SVGElement")},dragstart:function(t){var e=this.paper,n=this.relatedView,r=Le(t),i=e.clientToLocalPoint(r.clientX,r.clientY),o=i.x,a=i.y;n.dragLinkStart(r,this.getMagnetNode(),o,a),e.undelegateEvents(),this.delegateDocumentEvents(null,t.data),this.focus()},drag:function(t){var e=this.paper,n=this.relatedView,r=Le(t),i=e.snapToGrid(r.clientX,r.clientY),o=i.x,a=i.y;n.dragLink(r,o,a)},dragend:function(t){var e=this.paper,n=this.relatedView,r=Le(t),i=e.snapToGrid(r.clientX,r.clientY),o=i.x,a=i.y;n.dragLinkEnd(r,o,a),this.undelegateDocumentEvents(),e.delegateEvents(),this.blur(),n.checkMouseleave(r)}}),Pn.extend({name:"boundary",tagName:"rect",options:{padding:10,useModelGeometry:!1},attributes:{fill:"none",stroke:"#33334F","stroke-width":.5,"stroke-dasharray":"5, 5","pointer-events":"none"},onRender:function(){this.update()},update:function(){var t=this.relatedView,e=this.options,n=this.vel,r=e.useModelGeometry,i=e.rotate,o=je(e.padding),a=Tn(t,r).moveAndExpand({x:-o.left,y:-o.top,width:o.left+o.right,height:o.top+o.bottom}),s=t.model;if(s.isElement()){var u=s.angle();if(u)if(i){var l=s.getBBox().center();n.rotate(u,l.x,l.y,{absolute:!0})}else a=a.bbox(u)}return n.attr(a.toJSON()),this}});var Fn=Pn.extend({tagName:"g",type:null,children:[{tagName:"circle",selector:"anchor",attributes:{cursor:"pointer"}},{tagName:"rect",selector:"area",attributes:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onPointerDown",touchstart:"onPointerDown",dblclick:"onPointerDblClick",dbltap:"onPointerDblClick"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},options:{snap:function(t,e,n,r,i,o){var a=o.options.snapRadius,s="source"===r,u=s?0:-1,l=this.model.vertex(u)||this.getEndAnchor(s?"target":"source");return l&&(Math.abs(l.x-t.x)<a&&(t.x=l.x),Math.abs(l.y-t.y)<a&&(t.y=l.y)),t},anchor:Cn,resetAnchor:!0,customAnchorAttributes:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttributes:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,restrictArea:!0,redundancyRemoval:!0},onRender:function(){this.renderChildren(),this.toggleArea(!1),this.update()},update:function(){var t=this.type;return this.relatedView.getEndView(t)?(this.updateAnchor(),this.updateArea(),this.el.style.display=""):this.el.style.display="none",this},updateAnchor:function(){var t=this.childNodes;if(t){var e=t.anchor;if(e){var n=this.relatedView,r=this.type,i=n.getEndAnchor(r),o=this.options,a=n.model.prop([r,"anchor"]);e.setAttribute("transform","translate("+i.x+","+i.y+")");var s=a?o.customAnchorAttributes:o.defaultAnchorAttributes;for(var u in s)e.setAttribute(u,s[u])}}},updateArea:function(){var t=this.childNodes;if(t){var e=t.area;if(e){var n,r,i,o=this.relatedView,a=this.type,s=o.getEndView(a),u=s.model,l=o.getEndMagnet(a),c=this.options.areaPadding;isFinite(c)||(c=0),s.isNodeConnection(l)?(r=0,i=(n=s.getBBox()).center()):(n=s.getNodeUnrotatedBBox(l),r=u.angle(),i=n.center(),r&&i.rotate(u.getBBox().center(),-r)),n.inflate(c),e.setAttribute("x",-n.width/2),e.setAttribute("y",-n.height/2),e.setAttribute("width",n.width),e.setAttribute("height",n.height),e.setAttribute("transform","translate("+i.x+","+i.y+") rotate("+r+")")}}},toggleArea:function(t){this.childNodes.area.style.display=t?"":"none"},onPointerDown:function(t){this.guard(t)||(t.stopPropagation(),t.preventDefault(),this.paper.undelegateEvents(),this.delegateDocumentEvents(),this.focus(),this.toggleArea(this.options.restrictArea),this.relatedView.model.startBatch("anchor-move",{ui:!0,tool:this.cid}))},resetAnchor:function(t){var e=this.type,n=this.relatedView.model;t?n.prop([e,"anchor"],t,{rewrite:!0,ui:!0,tool:this.cid}):n.removeProp([e,"anchor"],{ui:!0,tool:this.cid})},onPointerMove:function(t){var e,n=this.relatedView,r=this.type,i=n.getEndView(r),o=i.model,a=n.getEndMagnet(r),s=Le(t),u=this.paper.clientToLocalPoint(s.clientX,s.clientY),l=this.options.snap;if("function"==typeof l&&(u=l.call(n,u,i,a,r,n,this),u=new Y(u)),this.options.restrictArea)if(i.isNodeConnection(a)){var c=i.getClosestPoint(u);c&&(u=c)}else{var f=i.getNodeUnrotatedBBox(a),h=o.angle(),d=o.getBBox().center(),p=u.clone().rotate(d,h);f.containsPoint(p)||(u=f.pointNearestToPoint(p).rotate(d,-h))}var g=this.options.anchor;"function"==typeof g&&(e=g.call(n,u,i,a,r,n)),this.resetAnchor(e),this.update()},onPointerUp:function(t){this.paper.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);var e=this.relatedView;this.options.redundancyRemoval&&e.removeRedundantLinearVertices({ui:!0,tool:this.cid}),e.model.stopBatch("anchor-move",{ui:!0,tool:this.cid})},onPointerDblClick:function(){var t=this.options.resetAnchor;!1!==t&&(!0===t&&(t=null),this.resetAnchor(Xe(t)),this.update())}});function Dn(t){t=We(t);var e=tn(t).reduce((function(t,e){return t[e.id]=e.clone(),t}),{});return tn(t).forEach((function(t){var n=e[t.id];if(n.isLink()){var r=n.source(),i=n.target();r.id&&e[r.id]&&n.prop("source/id",e[r.id].id),i.id&&e[i.id]&&n.prop("target/id",e[i.id].id)}var o=t.get("parent");o&&e[o]&&n.set("parent",e[o].id);var a=tn(t.get("embeds")).reduce((function(t,n){return e[n]&&t.push(e[n].id),t}),[]);Qe(a)||n.set("embeds",a)})),e}Fn.extend({name:"source-anchor",type:"source"}),Fn.extend({name:"target-anchor",type:"target"});var jn={x:"x",y:"y",width:"w",height:"h",minimum:"s",maximum:"l",diagonal:"d"},In=Object.keys(jn).map((function(t){return jn[t]})).join(""),Bn="[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?",zn=/\s/g,Vn=new RegExp("^(".concat(Bn,"\\*)?([").concat(In,"])([-+]{1,2}").concat(Bn,")?$"),"g");function $n(t){throw new Error("Invalid calc() expression: ".concat(t))}function Un(t,e){var n=Vn.exec(t.replace(zn,""));n||$n(t),Vn.lastIndex=0;var r=l(n,4),i=r[1],o=void 0===i?1:i,a=r[2],s=r[3],u=void 0===s?0:s,c=e.x,f=e.y,h=e.width,d=e.height,p=0;switch(a){case jn.width:p=h;break;case jn.height:p=d;break;case jn.x:p=c;break;case jn.y:p=f;break;case jn.minimum:p=Math.min(d,h);break;case jn.maximum:p=Math.max(d,h);break;case jn.diagonal:p=Math.sqrt(d*d+h*h)}return parseFloat(o)*p+function(t){if(!t)return 0;switch(l(t,1)[0]){case"+":return parseFloat(t.substr(1));case"-":return-parseFloat(t.substr(1))}return parseFloat(t)}(u)}function qn(t){return"string"==typeof t&&t.includes("calc")}var Hn="calc(",Gn=Hn.length;function Wn(t,e){for(var n=t,r=0;;){var i=n.indexOf(Hn,r);if(-1===i)return n;var o=i+Gn,a=1;t:for(;;){switch(n[o]){case"(":a++;break;case")":if(0==--a)break t;break;case void 0:$n(n)}o++}var s=n.slice(i+Gn,o);qn(s)&&(s=Wn(s,e));var u=String(Un(s,e));n=n.slice(0,i)+u+n.slice(o+1),r=i+u.length}}function Yn(t,e){return function(n,r){var i=Re(n);n=parseFloat(n),i&&(n/=100);var o={};if(isFinite(n)){var a=i||n>=0&&n<=1?n*r[e]:Math.max(n+r[e],0);o[t]=a}return o}}function Xn(t,e,n){return function(r,i){var o,a=Re(r);if(r=parseFloat(r),a&&(r/=100),isFinite(r)){var s=i[n]();o=a||r>0&&r<1?s[t]+i[e]*r:s[t]+r}var u=Y();return u[t]=o||0,u}}function Qn(t,e,n){return function(r,i){var o;o="middle"===r?i[e]/2:r===n?i[e]:isFinite(r)?r>-1&&r<1?-i[e]*r:-r:Re(r)?i[e]*parseFloat(r)/100:0;var a=Y();return a[t]=-(i[t]+o),a}}function Kn(t,e){var n="joint-shape",r=e&&e.resetOffset;return function(e,i,o){var a=we(o),s=a.data(n);if(!s||s.value!==e){var u=t(e);s={value:e,shape:u,shapeBBox:u.bbox()},a.data(n,s)}var l=s.shape.clone(),c=s.shapeBBox.clone(),f=c.origin(),h=i.origin();c.x=h.x,c.y=h.y;var d=i.maxRectScaleToFit(c,h),p=0===c.width||0===i.width?1:d.sx,g=0===c.height||0===i.height?1:d.sy;return l.scale(p,g,f),r&&l.translate(-f.x,-f.y),l}}function Jn(t){var e=Kn((function(t){return new Et(ye.normalizePathData(t))}),t);return function(t,n,r){return{d:e(t,n,r).serialize()}}}function Zn(t){var e=Kn(mt,t);return function(t,n,r){return{points:e(t,n,r).serialize()}}}function tr(t,e){var n=new Y(1,0);return function(r){var i,o,a=this[t](r);return a?(o=e.rotate?a.vector().vectorAngle(n):0,i=a.start):(i=this.path.start,o=0),0===o?{transform:"translate("+i.x+","+i.y+")"}:{transform:"translate("+i.x+","+i.y+") rotate("+o+")"}}}function er(t){return function(e,n,r){var i=ye(r);i.attr(t)!==e&&i.attr(t,e)}}function nr(t,e,n){return void 0!==n.text}function rr(){return this.model.isLink()}function ir(t){var e={},n=t.stroke;"string"==typeof n&&(e.stroke=n,e.fill=n);var r=t.strokeOpacity;return void 0===r&&(r=t["stroke-opacity"]),void 0===r&&(r=t.opacity),void 0!==r&&(e["stroke-opacity"]=r,e["fill-opacity"]=r),e}function or(t){var e=this.paper;return"url(#".concat("pattern"===t.type?e.definePattern(t):e.defineGradient(t),")")}var ar,sr,ur={xlinkShow:{set:"xlink:show"},xlinkRole:{set:"xlink:role"},xlinkType:{set:"xlink:type"},xlinkArcrole:{set:"xlink:arcrole"},xlinkTitle:{set:"xlink:title"},xlinkActuate:{set:"xlink:actuate"},xmlSpace:{set:"xml:space"},xmlBase:{set:"xml:base"},xmlLang:{set:"xml:lang"},preserveAspectRatio:{set:"preserveAspectRatio"},requiredExtension:{set:"requiredExtension"},requiredFeatures:{set:"requiredFeatures"},systemLanguage:{set:"systemLanguage"},externalResourcesRequired:{set:"externalResourceRequired"},href:{set:er("href")},xlinkHref:{set:er("xlink:href")},filter:{qualify:Ze,set:function(t){return"url(#"+this.paper.defineFilter(t)+")"}},fill:{qualify:Ze,set:or},stroke:{qualify:Ze,set:or},sourceMarker:{qualify:Ze,set:function(t,e,n,r){return t=$e(ir(r),t),{"marker-start":"url(#"+this.paper.defineMarker(t)+")"}}},targetMarker:{qualify:Ze,set:function(t,e,n,r){return t=$e(ir(r),{transform:"rotate(180)"},t),{"marker-end":"url(#"+this.paper.defineMarker(t)+")"}}},vertexMarker:{qualify:Ze,set:function(t,e,n,r){return t=$e(ir(r),t),{"marker-mid":"url(#"+this.paper.defineMarker(t)+")"}}},text:{qualify:function(t,e,n){return!n.textWrap||!Ze(n.textWrap)},set:function(t,e,n,r){var i=we(n),o="joint-text",a=i.data(o),s=cn(r,"lineHeight","annotations","textPath","x","textVerticalAnchor","eol","displayEmpty"),u=s.x;qn(u)&&(s.x=Wn(u,e));var l=s.fontSize=r["font-size"]||r.fontSize,c=JSON.stringify([t,s]);if(void 0===a||a!==c){l&&n.setAttribute("font-size",l);var f=s.textPath;if(gn(f)){var h=f.selector;if("string"==typeof h){var d=this.findBySelector(h)[0];d instanceof SVGPathElement&&(s.textPath=$e({"xlink:href":"#"+d.id},f))}}ye(n).text(""+t,s),i.data(o,c)}}},textWrap:{qualify:Ze,set:function(t,e,n,r){var i=t.width||0,o={};Re(i)?o.width=e.width*parseFloat(i)/100:o.width=i<=0?e.width+i:i;var a,s=t.height||0;Re(s)?o.height=e.height*parseFloat(s)/100:o.height=s<=0?e.height+s:s;var u=t.text;void 0===u&&(u=r.text),a=void 0!==u?De(""+u,o,{"font-weight":r["font-weight"]||r.fontWeight,"font-size":r["font-size"]||r.fontSize,"font-family":r["font-family"]||r.fontFamily,lineHeight:r.lineHeight,"letter-spacing":"letter-spacing"in r?r["letter-spacing"]:r.letterSpacing},{svgDocument:this.paper.svg,ellipsis:t.ellipsis,hyphen:t.hyphen,maxLineCount:t.maxLineCount}):"",ur.text.set.call(this,a,e,n,r)}},title:{qualify:function(t,e){return e instanceof SVGElement},set:function(t,e,n){var r=we(n),i="joint-title",o=r.data(i);if(void 0===o||o!==t){r.data(i,t);var a=n.firstChild;if(a&&"TITLE"===a.tagName.toUpperCase())a.textContent=t;else{var s=document.createElementNS(n.namespaceURI,"title");s.textContent=t,n.insertBefore(s,a)}}}},lineHeight:{qualify:nr},textVerticalAnchor:{qualify:nr},textPath:{qualify:nr},annotations:{qualify:nr},eol:{qualify:nr},displayEmpty:{qualify:nr},port:{set:function(t){return null===t||void 0===t.id?t:t.id}},style:{qualify:Ze,set:function(t,e,n){we(n).css(t)}},html:{set:function(t,e,n){we(n).html(t+"")}},ref:{},refX:{position:Xn("x","width","origin")},refY:{position:Xn("y","height","origin")},refDx:{position:Xn("x","width","corner")},refDy:{position:Xn("y","height","corner")},refWidth:{set:Yn("width","width")},refHeight:{set:Yn("height","height")},refRx:{set:Yn("rx","width")},refRy:{set:Yn("ry","height")},refRInscribed:{set:(ar=Yn("r","width"),sr=Yn("r","height"),function(t,e){return(e.height>e.width?ar:sr)(t,e)})},refRCircumscribed:{set:function(t,e){var n=Re(t);t=parseFloat(t),n&&(t/=100);var r,i=Math.sqrt(e.height*e.height+e.width*e.width);return isFinite(t)&&(r=n||t>=0&&t<=1?t*i:Math.max(t+i,0)),{r}}},refCx:{set:Yn("cx","width")},refCy:{set:Yn("cy","height")},xAlignment:{offset:Qn("x","width","right")},yAlignment:{offset:Qn("y","height","bottom")},resetOffset:{offset:function(t,e){return t?{x:-e.x,y:-e.y}:{x:0,y:0}}},refDResetOffset:{set:Jn({resetOffset:!0})},refDKeepOffset:{set:Jn({resetOffset:!1})},refPointsResetOffset:{set:Zn({resetOffset:!0})},refPointsKeepOffset:{set:Zn({resetOffset:!1})},connection:{qualify:rr,set:function(t){var e,n=t.stubs,r=void 0===n?0:n;if(isFinite(r)&&0!==r){var i;i=r<0?(this.getConnectionLength()+r)/2:r;var o=this.getConnection(),a=o.divideAtLength(i),s=o.divideAtLength(-i);a&&s&&(e="".concat(a[0].serialize()," ").concat(s[1].serialize()))}return{d:e||this.getSerializedConnection()}}},atConnectionLengthKeepGradient:{qualify:rr,set:tr("getTangentAtLength",{rotate:!0})},atConnectionLengthIgnoreGradient:{qualify:rr,set:tr("getTangentAtLength",{rotate:!1})},atConnectionRatioKeepGradient:{qualify:rr,set:tr("getTangentAtRatio",{rotate:!0})},atConnectionRatioIgnoreGradient:{qualify:rr,set:tr("getTangentAtRatio",{rotate:!1})}};ur["xlink:href"]=ur.xlinkHref,["transform","d","points","width","height","cx","cy","r","rx","ry","x1","x2","y1","y2","x","y","dx","dy"].forEach((function(t){ur[t]={qualify:qn,set:function(e,n){return s({},t,Wn(e,n))}}})),ur.refR=ur.refRInscribed,ur.refD=ur.refDResetOffset,ur.refPoints=ur.refPointsResetOffset,ur.atConnectionLength=ur.atConnectionLengthKeepGradient,ur.atConnectionRatio=ur.atConnectionRatioKeepGradient,ur.refX2=ur.refX,ur.refY2=ur.refY,ur.refWidth2=ur.refWidth,ur.refHeight2=ur.refHeight,ur["ref-x"]=ur.refX,ur["ref-y"]=ur.refY,ur["ref-dy"]=ur.refDy,ur["ref-dx"]=ur.refDx,ur["ref-width"]=ur.refWidth,ur["ref-height"]=ur.refHeight,ur["x-alignment"]=ur.xAlignment,ur["y-alignment"]=ur.yAlignment;var lr=ur,cr=_n.Model.extend({constructor:function(t,e){var n,r=t||{};"function"==typeof this.preinitialize&&this.preinitialize.apply(this,arguments),this.cid=dn("c"),this.attributes={},e&&e.collection&&(this.collection=e.collection),e&&e.parse&&(r=this.parse(r,e)||{}),(n=un(this,"defaults"))&&(r=pn({},n,r)),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)},translate:function(t,e,n){throw new Error("Must define a translate() method.")},toJSON:function(){var t=un(this.constructor.prototype,"defaults").attrs||{},e=this.attributes.attrs,n={};fn(e,(function(e,r){var i=t[r];fn(e,(function(t,e){gn(t)&&!Array.isArray(t)?fn(t,(function(t,o){i&&i[e]&&Ke(i[e][o],t)||(n[r]=n[r]||{},(n[r][e]||(n[r][e]={}))[o]=t)})):i&&Ke(i[e],t)||(n[r]=n[r]||{},n[r][e]=t)}))}));var r=Xe(ln(this.attributes,"attrs"));return r.attrs=n,r},initialize:function(t){var e=this.getIdAttribute();t&&e in t||this.set(e,this.generateId(),{silent:!0}),this._transitionIds={},this._scheduledTransitionIds={},this.processPorts(),this.on("change:attrs",this.processPorts,this)},getIdAttribute:function(){return this.idAttribute||"id"},generateId:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},processPorts:function(){var t=this.ports,e={};fn(this.get("attrs"),(function(t,n){t&&t.port&&(void 0!==t.port.id?e[t.port.id]=t.port:e[t.port]={id:t.port})}));var n={};fn(t,(function(t,r){e[r]||(n[r]=!0)})),this.graph&&!Qe(n)&&(this.graph.getConnectedLinks(this,{inbound:!0}).forEach((function(t){n[t.get("target").port]&&t.remove()})),this.graph.getConnectedLinks(this,{outbound:!0}).forEach((function(t){n[t.get("source").port]&&t.remove()}))),this.ports=e},remove:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.graph,n=this.collection;if(!e)return n&&n.remove(this,t),this;e.startBatch("remove");var r=this.getParentCell();r&&r.unembed(this,t);for(var i=this.getEmbeddedCells(),o=0,a=i.length;o<a;o++){var s=i[o];s&&s.remove(t)}return this.trigger("remove",this,e.attributes.cells,t),e.stopBatch("remove"),this},toFront:function(t){var e=this.graph;if(e){t=t||{};var n,r=e.maxZIndex();t.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:!1!==t.breadthFirst})).unshift(this):n=[this],r=r-n.length+1;var i=e.get("cells"),o=i.indexOf(this)!==i.length-n.length;o||(o=n.some((function(t,e){return t.get("z")!==r+e}))),o&&(this.startBatch("to-front"),r+=n.length,n.forEach((function(e,n){e.set("z",r+n,t)})),this.stopBatch("to-front"))}return this},toBack:function(t){var e=this.graph;if(e){t=t||{};var n,r=e.minZIndex();t.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:!1!==t.breadthFirst})).unshift(this):n=[this];var i=0!==e.get("cells").indexOf(this);i||(i=n.some((function(t,e){return t.get("z")!==r+e}))),i&&(this.startBatch("to-back"),r-=n.length,n.forEach((function(e,n){e.set("z",r+n,t)})),this.stopBatch("to-back"))}return this},parent:function(t,e){return void 0===t?this.get("parent"):this.set("parent",t,e)},embed:function(t,e){var n=Array.isArray(t)?t:[t];if(!this.canEmbed(n))throw new Error("Recursive embedding not allowed.");return this._embedCells(n,e),this},unembed:function(t,e){var n=Array.isArray(t)?t:[t];return this._unembedCells(n,e),this},canEmbed:function(t){var e=this;return(Array.isArray(t)?t:[t]).every((function(t){return e!==t&&!e.isEmbeddedIn(t)}))},_embedCells:function(t,e){var n=this,r="embed";this.startBatch(r);var i=$e([],this.get("embeds"));t.forEach((function(t){i[t.isLink()?"unshift":"push"](t.id),t.parent(n.id,e)})),this.set("embeds",We(i),e),this.stopBatch(r)},_unembedCells:function(t,e){var n="unembed";this.startBatch(n),t.forEach((function(t){return t.unset("parent",e)})),this.set("embeds",rn.apply(void 0,[this.get("embeds")].concat(u(t.map((function(t){return t.id}))))),e),this.stopBatch(n)},getParentCell:function(){var t=this.parent(),e=this.graph;return t&&e&&e.getCell(t)||null},getAncestors:function(){var t=[];if(!this.graph)return t;for(var e=this.getParentCell();e;)t.push(e),e=e.getParentCell();return t},getEmbeddedCells:function(t){if(t=t||{},this.graph){var e;if(t.deep)if(t.breadthFirst){e=[];for(var n=this.getEmbeddedCells();n.length>0;){var r=n.shift();e.push(r),n.push.apply(n,r.getEmbeddedCells())}}else(e=this.getEmbeddedCells()).forEach((function(n){e.push.apply(e,n.getEmbeddedCells(t))}));else e=tn(this.get("embeds")).map(this.graph.getCell,this.graph);return e}return[]},isEmbeddedIn:function(t,e){var n=mn(t)?t:t.id,r=this.parent();if(e=Ue({deep:!0},e),this.graph&&e.deep){for(;r;){if(r===n)return!0;r=this.graph.getCell(r).parent()}return!1}return r===n},isEmbedded:function(){return!!this.parent()},clone:function(t){if((t=t||{}).deep)return tn(Dn([this].concat(this.getEmbeddedCells({deep:!0}))));var e=_n.Model.prototype.clone.apply(this,arguments);return e.set(this.getIdAttribute(),this.generateId()),e.unset("embeds"),e.unset("parent"),e},prop:function(t,e,n){var r="/",i=mn(t);if(i||Array.isArray(t)){if(arguments.length>1){var o,a;i?a=(o=t).split("/"):(o=t.join(r),a=t.slice());var s=a[0],u=a.length;if((n=n||{}).propertyPath=o,n.propertyValue=e,n.propertyPathArray=a,1===u)return this.set(s,e,n);for(var l={},c=l,f=s,h=1;h<u;h++){var d=a[h],p=Number.isFinite(i?Number(d):d);c=c[f]=p?[]:{},f=d}l=Ce(l,a,e,"/");var g=pn({},this.attributes);n.rewrite&&Te(g,o,"/");var v=pn(g,l);return this.set(s,v[s],n)}return Ae(this.attributes,t,r)}return this.set(pn({},this.attributes,t),e)},removeProp:function(t,e){e=e||{};var n=Array.isArray(t)?t:t.split("/"),r=n[0];if("attrs"===r&&(e.dirty=!0),1===n.length)return this.unset(t,e);var i=n.slice(1),o=Xe(this.get(r));return Te(o,i,"/"),this.set(r,o,e)},attr:function(t,e,n){var r=Array.from(arguments);return 0===r.length?this.get("attrs"):(Array.isArray(t)?r[0]=["attrs"].concat(t):mn(t)?r[0]="attrs/"+t:r[0]={attrs:t},this.prop.apply(this,r))},removeAttr:function(t,e){return Array.isArray(t)?this.removeProp(["attrs"].concat(t)):this.removeProp("attrs/"+t,e)},transition:function(t,e,n,r){var i=this;r=r||"/",n=$e({duration:100,delay:10,timingFunction:Ie.linear,valueFunction:Be.number},n);var o,a,s=0,u=function(e){var r,i,a;(i=(e-=s=s||e)/n.duration)<1?this._transitionIds[t]=r=Me(u):(i=1,delete this._transitionIds[t]),a=o(n.timingFunction(i)),n.transitionId=r,this.prop(t,a,n),r||this.trigger("transition:end",this,t)}.bind(this),l=this._scheduledTransitionIds;return a=setTimeout((function(s){l[t]&&(l[t]=rn(l[t],a),0===l[t].length&&delete l[t]),i.stopPendingTransitions(t,r),o=n.valueFunction(Ae(i.attributes,t,r),e),i._transitionIds[t]=Me(s),i.trigger("transition:start",i,t)}),n.delay,u),l[t]||(l[t]=[]),l[t].push(a),a},getTransitions:function(){return an(Object.keys(this._transitionIds),Object.keys(this._scheduledTransitionIds))},stopScheduledTransitions:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=this._scheduledTransitionIds,r=void 0===n?{}:n,i=Object.keys(r);if(t){var o=t.split(e);i=i.filter((function(t){return Ke(o,t.split(e).slice(0,o.length))}))}return i.forEach((function(t){r[t].forEach((function(t){return clearTimeout(t)})),delete r[t]})),this},stopPendingTransitions:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",r=this._transitionIds,i=void 0===r?{}:r,o=Object.keys(i);if(t){var a=t.split(n);o=o.filter((function(t){return Ke(a,t.split(n).slice(0,a.length))}))}o.forEach((function(t){var n=i[t];Oe(n),delete i[t],e.trigger("transition:end",e,t)}))},stopTransitions:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";return this.stopScheduledTransitions(t,e),this.stopPendingTransitions(t,e),this},addTo:function(t,e){return t.addCell(this,e),this},findView:function(t){return t.findViewByModel(this)},isElement:function(){return!1},isLink:function(){return!1},startBatch:function(t,e){return this.graph&&this.graph.startBatch(t,$e({},e,{cell:this})),this},stopBatch:function(t,e){return this.graph&&this.graph.stopBatch(t,$e({},e,{cell:this})),this},getChangeFlag:function(t){var e=0;if(!t)return e;for(var n in t)t.hasOwnProperty(n)&&this.hasChanged(n)&&(e|=t[n]);return e},angle:function(){return 0},position:function(){return new Y(0,0)},getPointFromConnectedLink:function(){return new Y},getBBox:function(){return new ut(0,0,0,0)},getPointRotatedAroundCenter:function(t,e,n){var r=new Y(e,n);return t&&r.rotate(this.getBBox().center(),t),r},getAbsolutePointFromRelative:function(t,e){return this.getPointRotatedAroundCenter(-this.angle(),this.position().offset(t,e))},getRelativePointFromAbsolute:function(t,e){return this.getPointRotatedAroundCenter(this.angle(),t,e).difference(this.position())}},{getAttributeDefinition:function(t){var e=this.attributes,n=lr;return e&&e[t]||n[t]},define:function(t,e,n,r){n=$e({defaults:qe({type:t},e,this.prototype.defaults)},n);var i=this.extend(n,r);return"undefined"!=typeof joint&&sn(joint,"shapes")&&Ce(joint.shapes,t,i,"."),i}});function fr(t,e,n){var r=t.toJSON();return r.angle=e||0,Ue({},n,r)}function hr(t,e,n){return t.map((function(t,e,n){var r=this.pointAt((e+.5)/n.length);return(t.dx||t.dy)&&r.offset(t.dx||0,t.dy||0),fr(r.round(),0,t)}),dt(e,n))}function dr(t,e,n,r){var i=e.center(),o=e.width/e.height,a=e.topMiddle(),s=Z.fromRect(e);return t.map((function(t,e,u){var l=n+r(e,u.length),c=a.clone().rotate(i,-l).scale(o,1,i),f=t.compensateRotation?-s.tangentTheta(c):0;return(t.dx||t.dy)&&c.offset(t.dx||0,t.dy||0),t.dr&&c.move(i,t.dr),fr(c.round(),f,t)}))}function pr(t,e){var n=e.x;mn(n)&&(n=parseFloat(n)/100*t.width);var r=e.y;return mn(r)&&(r=parseFloat(r)/100*t.height),X(n||0,r||0)}var gr=function(t,e,n){return t.map(pr.bind(null,e))},vr=function(t,e,n){return n.fn(t,e,n)},mr=function(t,e,n){return hr(t,pr(e,n.start||e.origin()),pr(e,n.end||e.corner()))},yr=function(t,e,n){return hr(t,e.origin(),e.bottomLeft())},br=function(t,e,n){return hr(t,e.topRight(),e.corner())},wr=function(t,e,n){return hr(t,e.origin(),e.topRight())},xr=function(t,e,n){return hr(t,e.bottomLeft(),e.corner())},Sr=function(t,e,n){var r=n.startAngle||0,i=n.step||360/t.length;return dr(t,e,r,(function(t){return t*i}))},kr=function(t,e,n){var r=n.startAngle||0,i=n.step||20;return dr(t,e,r,(function(t,e){return(t+.5-e/2)*i}))};function _r(t,e){return qe({},t,e,{x:0,y:0,angle:0,attrs:{".":{y:"0","text-anchor":"start"}}})}function Er(t,e,n,r){r=Ue({},r,{offset:15});var i,o,a,s,u=e.center().theta(t),l=Ar(e),c=r.offset,f=0;u<l[1]||u>l[2]?(a=".3em",i=c,o=0,s="start"):u<l[0]?(a="0",i=0,o=-c,n?(f=-90,s="start"):s="middle"):u<l[3]?(a=".3em",i=-c,o=0,s="end"):(a=".6em",i=0,o=c,n?(f=90,s="start"):s="middle");var h=Math.round;return _r({x:h(i),y:h(o),angle:f,attrs:{".":{y:a,"text-anchor":s}}})}function Ar(t){var e=t.center(),n=e.theta(t.origin()),r=e.theta(t.bottomLeft()),i=e.theta(t.corner());return[n,e.theta(t.topRight()),i,r]}function Pr(t,e,n,r){var i,o,a,s,u=e.center().theta(t),l=(r=Ue({},r,{offset:15})).offset,c=0,f=Ar(e);u<f[1]||u>f[2]?(a=".3em",i=-l,o=0,s="end"):u<f[0]?(a=".6em",i=0,o=l,n?(c=90,s="start"):s="middle"):u<f[3]?(a=".3em",i=l,o=0,s="start"):(a="0em",i=0,o=-l,n?(c=-90,s="start"):s="middle");var h=Math.round;return _r({x:h(i),y:h(o),angle:c,attrs:{".":{y:a,"text-anchor":s}}})}function Cr(t,e,n){n=Ue({},n,{offset:20});var r,i=X(0,0),o=-t.theta(i),a=o,s=t.clone().move(i,n.offset).difference(t).round(),u=".3em";(o+90)%180==0?(r=e?"end":"middle",e||-270!==o||(u="0em")):o>-270&&o<-90?(r="start",a=o-180):r="end";var l=Math.round;return _r({x:l(s.x),y:l(s.y),angle:e?a:0,attrs:{".":{y:u,"text-anchor":r}}})}var Tr=function(t,e,n){return _r(n,e)},Nr=function(t,e,n){return _r(n,{x:-15,attrs:{".":{y:".3em","text-anchor":"end"}}})},Lr=function(t,e,n){return _r(n,{x:15,attrs:{".":{y:".3em","text-anchor":"start"}}})},Mr=function(t,e,n){return _r(n,{y:-15,attrs:{".":{"text-anchor":"middle"}}})},Or=function(t,e,n){return _r(n,{y:15,attrs:{".":{y:".6em","text-anchor":"middle"}}})},Rr=function(t,e,n){return Er(t,e,!0,n)},Fr=function(t,e,n){return Er(t,e,!1,n)},Dr=function(t,e,n){return Pr(t,e,!0,n)},jr=function(t,e,n){return Pr(t,e,!1,n)},Ir=function(t,e,n){return Cr(t.difference(e.center()),!1,n)},Br=function(t,e,n){return Cr(t.difference(e.center()),!0,n)},zr=function(t){var e=Xe(t)||{};this.ports=[],this.groups={},this.portLayoutNamespace=r,this.portLabelLayoutNamespace=i,this._init(e)};zr.prototype={getPorts:function(){return this.ports},getGroup:function(t){return this.groups[t]||{}},getPortsByGroup:function(t){return this.ports.filter((function(e){return e.group===t}))},getGroupPortsMetrics:function(t,e){var n=this.getGroup(t),r=this.getPortsByGroup(t),i=n.position||{},o=i.name,a=this.portLayoutNamespace;a[o]||(o="left");var s=i.args||{},u=r.map((function(t){return t&&t.position&&t.position.args})),l=a[o](u,e,s),c={ports:r,result:[]};return tn(l).reduce(function(t,n,r){var i=t.ports[r];return t.result.push({portId:i.id,portTransformation:n,labelTransformation:this._getPortLabelLayout(i,Y(n),e),portAttrs:i.attrs,portSize:i.size,labelSize:i.label.size}),t}.bind(this),c),c.result},_getPortLabelLayout:function(t,e,n){var r=this.portLabelLayoutNamespace,i=t.label.position.name||"left";return r[i]?r[i](e,n,t.label.position.args):null},_init:function(t){if(gn(t.groups))for(var e=Object.keys(t.groups),n=0,r=e.length;n<r;n++){var i=e[n];this.groups[i]=this._evaluateGroup(t.groups[i])}for(var o=tn(t.items),a=0,s=o.length;a<s;a++)this.ports.push(this._evaluatePort(o[a]))},_evaluateGroup:function(t){return pn(t,{position:this._getPosition(t.position,!0),label:this._getLabel(t,!0)})},_evaluatePort:function(t){var e=$e({},t),n=this.getGroup(t.group);return e.markup=e.markup||n.markup,e.attrs=pn({},n.attrs,e.attrs),e.position=this._createPositionNode(n,e),e.label=pn({},n.label,this._getLabel(e)),e.z=this._getZIndex(n,e),e.size=$e({},n.size,e.size),e},_getZIndex:function(t,e){return vn(e.z)?e.z:vn(t.z)||"auto"===t.z?t.z:"auto"},_createPositionNode:function(t,e){return pn({name:"left",args:{}},t.position,{args:e.args})},_getPosition:function(t,e){var n,r={};Je(t)?(n="fn",r.fn=t):mn(t)?n=t:void 0===t?n=e?"left":null:Array.isArray(t)?(n="absolute",r.x=t[0],r.y=t[1]):gn(t)&&(n=t.name,$e(r,t.args));var i={args:r};return n&&(i.name=n),i},_getLabel:function(t,e){var n=t.label||{},r=n;return r.position=this._getPosition(n.position,e),r}};var Vr={_initializePorts:function(){this._createPortData(),this.on("change:ports",(function(){this._processRemovedPort(),this._createPortData()}),this)},_processRemovedPort:function(){var t=this.get("ports")||{},e={};tn(t.items).forEach((function(t){e[t.id]=!0}));var n=this.previous("ports")||{},r={};tn(n.items).forEach((function(t){e[t.id]||(r[t.id]=!0)}));var i=this.graph;i&&!Qe(r)&&(i.getConnectedLinks(this,{inbound:!0}).forEach((function(t){r[t.get("target").port]&&t.remove()})),i.getConnectedLinks(this,{outbound:!0}).forEach((function(t){r[t.get("source").port]&&t.remove()})))},hasPorts:function(){var t=this.prop("ports/items");return Array.isArray(t)&&t.length>0},hasPort:function(t){return-1!==this.getPortIndex(t)},getPorts:function(){return Xe(this.prop("ports/items"))||[]},getGroupPorts:function(t){var e=tn(this.prop(["ports","items"])).filter((function(e){return e.group===t}));return Xe(e)},getPort:function(t){return Xe(tn(this.prop("ports/items")).find((function(e){return e.id&&e.id===t})))},getPortsPositions:function(t){return this._portSettingsData.getGroupPortsMetrics(t,ut(this.size())).reduce((function(t,e){var n=e.portTransformation;return t[e.portId]={x:n.x,y:n.y,angle:n.angle},t}),{})},getPortIndex:function(t){var e=gn(t)?t.id:t;return this._isValidPortId(e)?tn(this.prop("ports/items")).findIndex((function(t){return t.id===e})):-1},addPort:function(t,e){if(!gn(t)||Array.isArray(t))throw new Error("Element: addPort requires an object.");var n=$e([],this.prop("ports/items"));return n.push(t),this.prop("ports/items",n,e),this},insertPort:function(t,e,n){var r="number"==typeof t?t:this.getPortIndex(t);if(!gn(e)||Array.isArray(e))throw new Error("dia.Element: insertPort requires an object.");var i=$e([],this.prop("ports/items"));return i.splice(r,0,e),this.prop("ports/items",i,n),this},portProp:function(t,e,n,r){var i=this.getPortIndex(t);if(-1===i)throw new Error("Element: unable to find port with id "+t);var o=Array.prototype.slice.call(arguments,1);return Array.isArray(e)?o[0]=["ports","items",i].concat(e):mn(e)?o[0]=["ports/items/",i,"/",e].join(""):(o=["ports/items/"+i],Ze(e)&&(o.push(e),o.push(n))),this.prop.apply(this,o)},_validatePorts:function(){var t=this.get("ports")||{},e=[],n=tn((t=t||{}).items);return n.forEach((function(t){"object"!=h(t)&&e.push("Element: invalid port ",t),this._isValidPortId(t.id)||(t.id=this.generatePortId())}),this),We(n,"id").length!==n.length&&e.push("Element: found id duplicities in ports."),e},generatePortId:function(){return this.generateId()},_isValidPortId:function(t){return null!=t&&!gn(t)},addPorts:function(t,e){return t.length&&this.prop("ports/items",$e([],this.prop("ports/items")).concat(t),e),this},removePort:function(t,e){var n=e||{},r=this.getPortIndex(t);if(-1!==r){var i=$e([],this.prop(["ports","items"]));i.splice(r,1),n.rewrite=!0,this.startBatch("port-remove"),this.prop(["ports","items"],i,n),this.stopBatch("port-remove")}return this},removePorts:function(t,e){var n,r;if(Array.isArray(t)){if(n=e||{},0===t.length)return this.this;r=$e([],this.prop(["ports","items"])).filter((function(e){return!t.some((function(t){var n=gn(t)?t.id:t;return e.id===n}))}))}else n=t||{},r=[];return this.startBatch("port-remove"),n.rewrite=!0,this.prop(["ports","items"],r,n),this.stopBatch("port-remove"),this},_createPortData:function(){var t,e=this._validatePorts();if(e.length>0)throw this.set("ports",this.previous("ports")),new Error(e.join(" "));this._portSettingsData&&(t=this._portSettingsData.getPorts()),this._portSettingsData=new zr(this.get("ports"));var n=this._portSettingsData.getPorts();if(t){var r=n.filter((function(e){if(!t.find((function(t){return t.id===e.id})))return e})),i=t.filter((function(t){if(!n.find((function(e){return e.id===t.id})))return t}));i.length>0&&this.trigger("ports:remove",this,i),r.length>0&&this.trigger("ports:add",this,r)}}},$r={portContainerMarkup:"g",portMarkup:[{tagName:"circle",selector:"circle",attributes:{r:10,fill:"#FFFFFF",stroke:"#000000"}}],portLabelMarkup:[{tagName:"text",selector:"text",attributes:{fill:"#000000"}}],_portElementsCache:null,_initializePorts:function(){this._cleanPortsCache()},_refreshPorts:function(){this._removePorts(),this._cleanPortsCache(),this._renderPorts()},_cleanPortsCache:function(){this._portElementsCache={}},_renderPorts:function(){for(var t=[],e=this._getContainerElement(),n=0,r=e.node.childNodes.length;n<r;n++)t.push(e.node.childNodes[n]);var i=en(this.model._portSettingsData.getPorts(),"z");tn(i.auto).forEach((function(n){var r=this._getPortElement(n);e.append(r),t.push(r)}),this);for(var o=Object.keys(i),a=0;a<o.length;a++){var s=o[a];if("auto"!==s){var u=parseInt(s,10);this._appendPorts(i[s],u,t)}}this._updatePorts()},_getContainerElement:function(){return this.rotatableNode||this.vel},_appendPorts:function(t,e,n){var r=this._getContainerElement(),i=tn(t).map(this._getPortElement,this);n[e]||e<0?ye(n[Math.max(e,0)]).before(i):r.append(i)},_getPortElement:function(t){return this._portElementsCache[t.id]?this._portElementsCache[t.id].portElement:this._createPortElement(t)},findPortNode:function(t,e){var n=this._portElementsCache[t];if(!n)return null;var r=n.portContentElement.node,i=n.portContentSelectors,o=l(this.findBySelector(e,r,i),1)[0];return void 0===o?null:o},_updatePorts:function(){this._updatePortGroup(void 0),Object.keys(this.model._portSettingsData.groups).forEach(this._updatePortGroup,this)},_removePorts:function(){He(this._portElementsCache,"portElement.remove")},_createPortElement:function(t){var e,n,r,i,o=ye(this.portContainerMarkup).addClass("joint-port"),a=this._getPortMarkup(t);if(Array.isArray(a)){var s=this.parseDOMJSON(a,o.node),u=s.fragment;e=u.childNodes.length>1?ye("g").append(u):ye(u.firstChild),i=s.selectors}else e=ye(a),Array.isArray(e)&&(e=ye("g").append(e));if(!e)throw new Error("ElementView: Invalid port markup.");e.attr({port:t.id,"port-group":t.group});var l,c=this._getPortLabelMarkup(t.label);if(Array.isArray(c)){var f=this.parseDOMJSON(c,o.node),h=f.fragment,d=f.selectors,p=h.childNodes.length;p>0&&(r=d,n=1===p?ye(h.firstChild):ye("g").append(h))}else n=ye(c),Array.isArray(n)&&(n=ye("g").append(n));if(i&&r){for(var g in r)if(i[g]&&g!==this.selector)throw new Error("ElementView: selectors within port must be unique.");l=$e({},i,r)}else l=i||r;return o.append(e.addClass("joint-port-body")),n&&o.append(n.addClass("joint-port-label")),this._portElementsCache[t.id]={portElement:o,portLabelElement:n,portSelectors:l,portLabelSelectors:r,portContentElement:e,portContentSelectors:i},o},_updatePortGroup:function(t){for(var e=ut(this.model.size()),n=this.model._portSettingsData.getGroupPortsMetrics(t,e),r=0,i=n.length;r<i;r++){var o=n[r],a=o.portId,s=this._portElementsCache[a]||{},u=o.portTransformation;this.applyPortTransform(s.portElement,u),this.updateDOMSubtreeAttributes(s.portElement.node,o.portAttrs,{rootBBox:new ut(o.portSize),selectors:s.portSelectors});var l=o.labelTransformation;l&&s.portLabelElement&&(this.applyPortTransform(s.portLabelElement,l,-u.angle||0),this.updateDOMSubtreeAttributes(s.portLabelElement.node,l.attrs,{rootBBox:new ut(o.labelSize),selectors:s.portLabelSelectors}))}},applyPortTransform:function(t,e,n){var r=ye.createSVGMatrix().rotate(n||0).translate(e.x||0,e.y||0).rotate(e.angle||0);t.transform(r,{absolute:!0})},_getPortMarkup:function(t){return t.markup||this.model.get("portMarkup")||this.model.portMarkup||this.portMarkup},_getPortLabelMarkup:function(t){return t.markup||this.model.get("portLabelMarkup")||this.model.portLabelMarkup||this.portLabelMarkup}},Ur=cr.extend({defaults:{position:{x:0,y:0},size:{width:1,height:1},angle:0},initialize:function(){this._initializePorts(),cr.prototype.initialize.apply(this,arguments)},_initializePorts:function(){},_refreshPorts:function(){},isElement:function(){return!0},position:function(t,e,n){var r,i=vn(e),o=n=(i?n:t)||{},a=o.parentRelative,s=o.deep,u=o.restrictedArea;if(a){if(!this.graph)throw new Error("Element must be part of a graph.");var l=this.getParentCell();l&&!l.isLink()&&(r=l.get("position"))}if(i){if(r&&(t+=r.x,e+=r.y),s||u){var c=this.get("position"),f=c.x,h=c.y;this.translate(t-f,e-h,n)}else this.set("position",{x:t,y:e},n);return this}var d=Y(this.get("position"));return a?d.difference(r):d},translate:function(t,e,n){if(e=e||0,0===(t=t||0)&&0===e)return this;(n=n||{}).translateBy=n.translateBy||this.id;var r=this.get("position")||{x:0,y:0},i=n.restrictedArea;if(i&&n.translateBy===this.id)if("function"==typeof i){var o=i.call(this,r.x+t,r.y+e,n);t=o.x-r.x,e=o.y-r.y}else{var a=this.getBBox({deep:!0}),s=r.x-a.x,u=r.y-a.y,l=Math.max(i.x+s,Math.min(i.x+i.width+s-a.width,r.x+t)),c=Math.max(i.y+u,Math.min(i.y+i.height+u-a.height,r.y+e));t=l-r.x,e=c-r.y}var f={x:r.x+t,y:r.y+e};return n.tx=t,n.ty=e,n.transition?(gn(n.transition)||(n.transition={}),this.transition("position",f,$e({},n.transition,{valueFunction:Be.object})),He(this.getEmbeddedCells(),"translate",t,e,n)):(this.startBatch("translate",n),this.set("position",f,n),He(this.getEmbeddedCells(),"translate",t,e,n),this.stopBatch("translate",n)),this},size:function(t,e,n){var r=this.get("size");return void 0===t?{width:r.width,height:r.height}:(gn(t)&&(n=e,e=vn(t.height)?t.height:r.height,t=vn(t.width)?t.width:r.width),this.resize(t,e,n))},resize:function(t,e,n){if(n=n||{},this.startBatch("resize",n),n.direction){var r=this.get("size");switch(n.direction){case"left":case"right":e=r.height;break;case"top":case"bottom":t=r.width}var i,o=A(this.get("angle")||0),a=this.getBBox();if(o){var s={"top-right":0,right:0,"top-left":1,top:1,"bottom-left":2,left:2,"bottom-right":3,bottom:3}[n.direction];n.absolute&&(s+=Math.floor((o+45)/90),s%=4);var u=a[["bottomLeft","corner","topRight","origin"][s]](),l=Y(u).rotate(a.center(),-o),c=Math.sqrt(t*t+e*e)/2,f=s*Math.PI/2;f+=Math.atan(s%2==0?e/t:t/e),f-=T(o);var h=Y.fromPolar(c,f,l);i=Y(h).offset(t/-2,e/-2)}else switch(i=a.topLeft(),n.direction){case"top":case"top-right":i.offset(0,a.height-e);break;case"left":case"bottom-left":i.offset(a.width-t,0);break;case"top-left":i.offset(a.width-t,a.height-e)}this.set("size",{width:t,height:e},n),this.position(i.x,i.y,n)}else this.set("size",{width:t,height:e},n);return this.stopBatch("resize",n),this},scale:function(t,e,n,r){var i=this.getBBox().scale(t,e,n);return this.startBatch("scale",r),this.position(i.x,i.y,r),this.resize(i.width,i.height,r),this.stopBatch("scale"),this},fitEmbeds:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.graph;if(!e)throw new Error("Element must be part of a graph.");var n=this.getEmbeddedCells().filter((function(t){return t.isElement()}));if(0===n.length)return this;this.startBatch("fit-embeds",t),t.deep&&He(n,"fitEmbeds",t);var r=je(t.padding),i=r.left,o=r.right,a=r.top,s=r.bottom,u=e.getCellsBBox(n),l=u.x,c=u.y,f=u.width,h=u.height;return l-=i,c-=a,f+=i+o,h+=s+a,this.set({position:{x:l,y:c},size:{width:f,height:h}},t),this.stopBatch("fit-embeds"),this},rotate:function(t,e,n,r){if(n){var i=this.getBBox().center(),o=this.get("size"),a=this.get("position");i.rotate(n,this.get("angle")-t);var s=i.x-o.width/2-a.x,u=i.y-o.height/2-a.y;this.startBatch("rotate",{angle:t,absolute:e,origin:n}),this.position(a.x+s,a.y+u,r),this.rotate(t,e,null,r),this.stopBatch("rotate")}else this.set("angle",e?t:(this.get("angle")+t)%360,r);return this},angle:function(){return A(this.get("angle")||0)},getBBox:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.graph,n=this.attributes,r=t.deep,i=t.rotate;if(r&&e){var o=this.getEmbeddedCells({deep:!0,breadthFirst:!0});return o.push(this),e.getCellsBBox(o,t)}var a=n.angle,s=void 0===a?0:a,u=n.position,l=u.x,c=u.y,f=n.size,h=f.width,d=f.height,p=new ut(l,c,h,d);return i&&p.rotateAroundCenter(s),p},getPointFromConnectedLink:function(t,e){var n=this.getBBox(),r=n.center(),i=t.get(e);if(!i)return r;var o=i.port;if(!o||!this.hasPort(o))return r;var a=this.portProp(o,["group"]),s=this.getPortsPositions(a),u=new Y(s[o]).offset(n.origin()),l=this.angle();return l&&u.rotate(r,-l),u}});$e(Ur.prototype,Vr);var qr=cr.extend({markup:['<path class="connection" stroke="black" d="M 0 0 0 0"/>','<path class="marker-source" fill="black" stroke="black" d="M 0 0 0 0"/>','<path class="marker-target" fill="black" stroke="black" d="M 0 0 0 0"/>','<path class="connection-wrap" d="M 0 0 0 0"/>','<g class="labels"/>','<g class="marker-vertices"/>','<g class="marker-arrowheads"/>','<g class="link-tools"/>'].join(""),toolMarkup:['<g class="link-tool">','<g class="tool-remove" event="remove">','<circle r="11" />','<path transform="scale(.8) translate(-16, -16)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z" />',"<title>Remove link.</title>","</g>",'<g class="tool-options" event="link:options">','<circle r="11" transform="translate(25)"/>','<path fill="white" transform="scale(.55) translate(29, -16)" d="M31.229,17.736c0.064-0.571,0.104-1.148,0.104-1.736s-0.04-1.166-0.104-1.737l-4.377-1.557c-0.218-0.716-0.504-1.401-0.851-2.05l1.993-4.192c-0.725-0.91-1.549-1.734-2.458-2.459l-4.193,1.994c-0.647-0.347-1.334-0.632-2.049-0.849l-1.558-4.378C17.165,0.708,16.588,0.667,16,0.667s-1.166,0.041-1.737,0.105L12.707,5.15c-0.716,0.217-1.401,0.502-2.05,0.849L6.464,4.005C5.554,4.73,4.73,5.554,4.005,6.464l1.994,4.192c-0.347,0.648-0.632,1.334-0.849,2.05l-4.378,1.557C0.708,14.834,0.667,15.412,0.667,16s0.041,1.165,0.105,1.736l4.378,1.558c0.217,0.715,0.502,1.401,0.849,2.049l-1.994,4.193c0.725,0.909,1.549,1.733,2.459,2.458l4.192-1.993c0.648,0.347,1.334,0.633,2.05,0.851l1.557,4.377c0.571,0.064,1.148,0.104,1.737,0.104c0.588,0,1.165-0.04,1.736-0.104l1.558-4.377c0.715-0.218,1.399-0.504,2.049-0.851l4.193,1.993c0.909-0.725,1.733-1.549,2.458-2.458l-1.993-4.193c0.347-0.647,0.633-1.334,0.851-2.049L31.229,17.736zM16,20.871c-2.69,0-4.872-2.182-4.872-4.871c0-2.69,2.182-4.872,4.872-4.872c2.689,0,4.871,2.182,4.871,4.872C20.871,18.689,18.689,20.871,16,20.871z"/>',"<title>Link options.</title>","</g>","</g>"].join(""),doubleToolMarkup:void 0,vertexMarkup:['<g class="marker-vertex-group" transform="translate(<%= x %>, <%= y %>)">','<circle class="marker-vertex" idx="<%= idx %>" r="10" />','<path class="marker-vertex-remove-area" idx="<%= idx %>" d="M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z" transform="translate(5, -33)"/>','<path class="marker-vertex-remove" idx="<%= idx %>" transform="scale(.8) translate(9.5, -37)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z">',"<title>Remove vertex.</title>","</path>","</g>"].join(""),arrowheadMarkup:['<g class="marker-arrowhead-group marker-arrowhead-group-<%= end %>">','<path class="marker-arrowhead" end="<%= end %>" d="M 26 0 L 0 13 L 26 26 z" />',"</g>"].join(""),defaultLabel:void 0,labelMarkup:void 0,_builtins:{defaultLabel:{markup:[{tagName:"rect",selector:"rect"},{tagName:"text",selector:"text"}],attrs:{text:{fill:"#000000",fontSize:14,textAnchor:"middle",yAlignment:"middle",pointerEvents:"none"},rect:{ref:"text",fill:"#ffffff",rx:3,ry:3,refWidth:1,refHeight:1,refX:0,refY:0}},position:{distance:.5}}},defaults:{type:"link",source:{},target:{}},isLink:function(){return!0},disconnect:function(t){return this.set({source:{x:0,y:0},target:{x:0,y:0}},t)},source:function(t,e,n){return void 0===t?Ye(this.get("source")):t instanceof cr?((r=Ye(e)||{}).id=t.id,i=n,this.set("source",r,i)):Ze(t)?(r=t,i=e,this.set("source",r,i)):((r=Ye(e)||{}).x=t.x,r.y=t.y,i=n,this.set("source",r,i));var r,i},target:function(t,e,n){return void 0===t?Ye(this.get("target")):t instanceof cr?((r=Ye(e)||{}).id=t.id,i=n,this.set("target",r,i)):Ze(t)?(r=t,i=e,this.set("target",r,i)):((r=Ye(e)||{}).x=t.x,r.y=t.y,i=n,this.set("target",r,i));var r,i},router:function(t,e,n){if(void 0===t){var r=this.get("router");return r?"object"==h(r)?Ye(r):r:this.get("manhattan")?{name:"orthogonal"}:null}var i="object"==h(t)||"function"==typeof t,o=i?t:{name:t,args:e},a=i?e:n;return this.set("router",o,a)},connector:function(t,e,n){if(void 0===t){var r=this.get("connector");return r?"object"==h(r)?Ye(r):r:this.get("smooth")?{name:"smooth"}:null}var i="object"==h(t)||"function"==typeof t,o=i?t:{name:t,args:e},a=i?e:n;return this.set("connector",o,a)},label:function(t,e,n){var r=this.labels();return(t=isFinite(t)&&null!==t?0|t:0)<0&&(t=r.length+t),arguments.length<=1?this.prop(["labels",t]):this.prop(["labels",t],e,n)},labels:function(t,e){return 0===arguments.length?(t=this.get("labels"),Array.isArray(t)?t.slice():[]):(Array.isArray(t)||(t=[]),this.set("labels",t,e))},hasLabels:function(){var t=this.attributes.labels;return Array.isArray(t)&&t.length>0},insertLabel:function(t,e,n){if(!e)throw new Error("dia.Link: no label provided");var r=this.labels(),i=r.length;return(t=isFinite(t)&&null!==t?0|t:i)<0&&(t=i+t+1),r.splice(t,0,e),this.labels(r,n)},appendLabel:function(t,e){return this.insertLabel(-1,t,e)},removeLabel:function(t,e){var n=this.labels();return t=isFinite(t)&&null!==t?0|t:-1,n.splice(t,1),this.labels(n,e)},vertex:function(t,e,n){var r=this.vertices();if((t=isFinite(t)&&null!==t?0|t:0)<0&&(t=r.length+t),arguments.length<=1)return this.prop(["vertices",t]);var i=this._normalizeVertex(e);return this.prop(["vertices",t],i,n)},vertices:function(t,e){if(0===arguments.length)return t=this.get("vertices"),Array.isArray(t)?t.slice():[];Array.isArray(t)||(t=[]);for(var n=[],r=0;r<t.length;r++){var i=t[r],o=this._normalizeVertex(i);n.push(o)}return this.set("vertices",n,e)},insertVertex:function(t,e,n){if(!e)throw new Error("dia.Link: no vertex provided");var r=this.vertices(),i=r.length;(t=isFinite(t)&&null!==t?0|t:i)<0&&(t=i+t+1);var o=this._normalizeVertex(e);return r.splice(t,0,o),this.vertices(r,n)},removeVertex:function(t,e){var n=this.vertices();return t=isFinite(t)&&null!==t?0|t:-1,n.splice(t,1),this.vertices(n,e)},_normalizeVertex:function(t){return Ze(t)?t:{x:t.x,y:t.y}},translate:function(t,e,n){return(n=n||{}).translateBy=n.translateBy||this.id,n.tx=t,n.ty=e,this.applyToPoints((function(n){return{x:(n.x||0)+t,y:(n.y||0)+e}}),n)},scale:function(t,e,n,r){return this.applyToPoints((function(r){return Y(r).scale(t,e,n).toJSON()}),r)},applyToPoints:function(t,e){if(!Je(t))throw new TypeError("dia.Link: applyToPoints expects its first parameter to be a function.");var n={},r=this.attributes,i=r.source,o=r.target;i.id||(n.source=t(i)),o.id||(n.target=t(o));var a=this.vertices();return a.length>0&&(n.vertices=a.map(t)),this.set(n,e)},getSourcePoint:function(){var t=this.getSourceCell();return t?t.getPointFromConnectedLink(this,"source"):new Y(this.source())},getTargetPoint:function(){var t=this.getTargetCell();return t?t.getPointFromConnectedLink(this,"target"):new Y(this.target())},getPointFromConnectedLink:function(){return this.getPolyline().pointAt(.5)},getPolyline:function(){var t=[this.getSourcePoint()].concat(u(this.vertices().map(Y)),[this.getTargetPoint()]);return new mt(t)},getBBox:function(){return this.getPolyline().bbox()},reparent:function(t){var e;if(this.graph){var n=this.getSourceElement(),r=this.getTargetElement(),i=this.getParentCell();n&&r&&(e=n===r||n.isEmbeddedIn(r)?r:r.isEmbeddedIn(n)?n:this.graph.getCommonAncestor(n,r)),!i||e&&e.id===i.id||i.unembed(this,t),e&&e.embed(this,t)}return e},hasLoop:function(t){t=t||{};var e=this.attributes,n=e.source,r=e.target,i=n.id,o=r.id;if(!i||!o)return!1;var a=i===o;if(!a&&t.deep&&this.graph){var s=this.getSourceCell(),u=this.getTargetCell();a=s.isEmbeddedIn(u)||u.isEmbeddedIn(s)}return a},getSourceCell:function(){var t=this.graph,e=this.attributes.source;return e&&e.id&&t&&t.getCell(e.id)||null},getSourceElement:function(){var t=this,e={};do{if(e[t.id])return null;e[t.id]=!0,t=t.getSourceCell()}while(t&&t.isLink());return t},getTargetCell:function(){var t=this.graph,e=this.attributes.target;return e&&e.id&&t&&t.getCell(e.id)||null},getTargetElement:function(){var t=this,e={};do{if(e[t.id])return null;e[t.id]=!0,t=t.getTargetCell()}while(t&&t.isLink());return t},getRelationshipAncestor:function(){var t;if(this.graph){var e=[this,this.getSourceElement(),this.getTargetElement()].filter((function(t){return!!t}));t=this.graph.getCommonAncestor.apply(this.graph,e)}return t||null},isRelationshipEmbeddedIn:function(t){var e=mn(t)||vn(t)?t:t.id,n=this.getRelationshipAncestor();return!!n&&(n.id===e||n.isEmbeddedIn(e))},_getDefaultLabel:function(){var t=this.get("defaultLabel")||this.defaultLabel||{},e={};return e.markup=t.markup||this.get("labelMarkup")||this.labelMarkup,e.position=t.position,e.attrs=t.attrs,e.size=t.size,e}},{endsEqual:function(t,e){var n=t.port===e.port||!t.port&&!e.port;return t.id===e.id&&n}}),Hr={_results:{},_tests:{svgforeignobject:function(){return!!document.createElementNS&&/SVGForeignObject/.test({}.toString.call(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")))}},addTest:function(t,e){return this._tests[t]=e},test:function(t){var e=this._tests[t];if(!e)throw new Error('Test not defined ("'+t+'"). Use `joint.env.addTest(name, fn) to add a new test.`');var n=this._results[t];if(void 0!==n)return n;try{n=e()}catch(t){n=!1}return this._results[t]=n,n}},Gr=Ur.define("standard.Rectangle",{attrs:{body:{refWidth:"100%",refHeight:"100%",strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}]}),Wr=Ur.define("standard.Circle",{attrs:{body:{refCx:"50%",refCy:"50%",refR:"50%",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"}]}),Yr=Ur.define("standard.Ellipse",{attrs:{body:{refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"ellipse",selector:"body"},{tagName:"text",selector:"label"}]}),Xr=Ur.define("standard.Path",{attrs:{body:{refD:"M 0 0 L 10 0 10 10 0 10 Z",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"path",selector:"body"},{tagName:"text",selector:"label"}]}),Qr=Ur.define("standard.Polygon",{attrs:{body:{refPoints:"0 0 10 0 10 10 0 10",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"polygon",selector:"body"},{tagName:"text",selector:"label"}]}),Kr=Ur.define("standard.Polyline",{attrs:{body:{refPoints:"0 0 10 0 10 10 0 10 0 0",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"polyline",selector:"body"},{tagName:"text",selector:"label"}]}),Jr=Ur.define("standard.Image",{attrs:{image:{refWidth:"100%",refHeight:"100%"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"image",selector:"image"},{tagName:"text",selector:"label"}]}),Zr=Ur.define("standard.BorderedImage",{attrs:{border:{refWidth:"100%",refHeight:"100%",stroke:"#333333",strokeWidth:2},background:{refWidth:-1,refHeight:-1,x:.5,y:.5,fill:"#FFFFFF"},image:{refWidth:-1,refHeight:-1,x:.5,y:.5},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"background",attributes:{stroke:"none"}},{tagName:"image",selector:"image"},{tagName:"rect",selector:"border",attributes:{fill:"none"}},{tagName:"text",selector:"label"}]}),ti=Ur.define("standard.EmbeddedImage",{attrs:{body:{refWidth:"100%",refHeight:"100%",stroke:"#333333",fill:"#FFFFFF",strokeWidth:2},image:{refWidth:"30%",refHeight:-20,x:10,y:10,preserveAspectRatio:"xMidYMin"},label:{textVerticalAnchor:"top",textAnchor:"left",refX:"30%",refX2:20,refY:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"image",selector:"image"},{tagName:"text",selector:"label"}]}),ei=Ur.define("standard.InscribedImage",{attrs:{border:{refRx:"50%",refRy:"50%",refCx:"50%",refCy:"50%",stroke:"#333333",strokeWidth:2},background:{refRx:"50%",refRy:"50%",refCx:"50%",refCy:"50%",fill:"#FFFFFF"},image:{refWidth:"68%",refHeight:"68%",refX:"16%",refY:"16%",preserveAspectRatio:"xMidYMid"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"ellipse",selector:"background"},{tagName:"image",selector:"image"},{tagName:"ellipse",selector:"border",attributes:{fill:"none"}},{tagName:"text",selector:"label"}]}),ni=Ur.define("standard.HeaderedRectangle",{attrs:{body:{refWidth:"100%",refHeight:"100%",strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},header:{refWidth:"100%",height:30,strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},headerText:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:15,fontSize:16,fill:"#333333"},bodyText:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",refY2:15,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"header"},{tagName:"text",selector:"headerText"},{tagName:"text",selector:"bodyText"}]}),ri=Ur.define("standard.Cylinder",{attrs:{body:{lateralArea:10,fill:"#FFFFFF",stroke:"#333333",strokeWidth:2},top:{refCx:"50%",cy:10,refRx:"50%",ry:10,fill:"#FFFFFF",stroke:"#333333",strokeWidth:2},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"100%",refY2:15,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"path",selector:"body"},{tagName:"ellipse",selector:"top"},{tagName:"text",selector:"label"}],topRy:function(t,e){if(void 0===t)return this.attr("body/lateralArea");var n={lateralArea:t},r=Re(t)?{refCy:t,refRy:t,cy:null,ry:null}:{refCy:null,refRy:null,cy:t,ry:t};return this.attr({body:n,top:r},e)}},{attributes:{lateralArea:{set:function(t,e){var n=Re(t);n&&(t=parseFloat(t)/100);var r=e.x,i=e.y,o=e.width,a=e.height,s=o/2,u=n?a*t:t,l=ye.KAPPA,c=l*s,f=l*(n?a*t:t),h=r+o/2,d=r+o,p=i+u,g=p-u,v=i+a-u,m=i+a;return{d:["M",r,p,"L",r,v,"C",r,v+f,h-c,m,h,m,"C",h+c,m,d,v+f,d,v,"L",d,p,"C",d,p-f,h+c,g,h,g,"C",h-c,g,r,p-f,r,p,"Z"].join(" ")}}}}}),ii=Hr.test("svgforeignobject")?{tagName:"foreignObject",selector:"foreignObject",attributes:{overflow:"hidden"},children:[{tagName:"div",namespaceURI:"http://www.w3.org/1999/xhtml",selector:"label",style:{width:"100%",height:"100%",position:"static",backgroundColor:"transparent",textAlign:"center",margin:0,padding:"0px 5px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}]}:{tagName:"text",selector:"label",attributes:{"text-anchor":"middle"}},oi=Ur.define("standard.TextBlock",{attrs:{body:{refWidth:"100%",refHeight:"100%",stroke:"#333333",fill:"#ffffff",strokeWidth:2},foreignObject:{refWidth:"100%",refHeight:"100%"},label:{style:{fontSize:14}}}},{markup:[{tagName:"rect",selector:"body"},ii]},{attributes:{text:{set:function(t,e,n,r){if(!(n instanceof HTMLElement)){var i=r.style||{},o={text:t,width:-5,height:"100%"},a=$e({textVerticalAnchor:"middle"},i);return lr.textWrap.set.call(this,o,e,n,a),{fill:i.color||null}}n.textContent=t},position:function(t,e,n){if(n instanceof SVGElement)return e.center()}}}}),ai=qr.define("standard.Link",{attrs:{line:{connection:!0,stroke:"#333333",strokeWidth:2,strokeLinejoin:"round",targetMarker:{type:"path",d:"M 10 -5 0 0 10 5 z"}},wrapper:{connection:!0,strokeWidth:10,strokeLinejoin:"round"}}},{markup:[{tagName:"path",selector:"wrapper",attributes:{fill:"none",cursor:"pointer",stroke:"transparent","stroke-linecap":"round"}},{tagName:"path",selector:"line",attributes:{fill:"none","pointer-events":"none"}}]}),si=qr.define("standard.DoubleLink",{attrs:{line:{connection:!0,stroke:"#DDDDDD",strokeWidth:4,strokeLinejoin:"round",targetMarker:{type:"path",stroke:"#000000",d:"M 10 -3 10 -10 -2 0 10 10 10 3"}},outline:{connection:!0,stroke:"#000000",strokeWidth:6,strokeLinejoin:"round"}}},{markup:[{tagName:"path",selector:"outline",attributes:{fill:"none"}},{tagName:"path",selector:"line",attributes:{fill:"none"}}]}),ui=qr.define("standard.ShadowLink",{attrs:{line:{connection:!0,stroke:"#FF0000",strokeWidth:20,strokeLinejoin:"round",targetMarker:{type:"path",stroke:"none",d:"M 0 -10 -10 0 0 10 z"},sourceMarker:{type:"path",stroke:"none",d:"M -10 -10 0 0 -10 10 0 10 0 -10 z"}},shadow:{connection:!0,refX:3,refY:6,stroke:"#000000",strokeOpacity:.2,strokeWidth:20,strokeLinejoin:"round",targetMarker:{type:"path",d:"M 0 -10 -10 0 0 10 z",stroke:"none"},sourceMarker:{type:"path",stroke:"none",d:"M -10 -10 0 0 -10 10 0 10 0 -10 z"}}}},{markup:[{tagName:"path",selector:"shadow",attributes:{fill:"none"}},{tagName:"path",selector:"line",attributes:{fill:"none"}}]}),li={cells:function(t){return function(){var e=Array.from(arguments),n=e.length,r=n>0&&e[0]||[],i=n>1&&e[n-1]||{};return Array.isArray(r)||(i instanceof cr?r=e:r instanceof cr&&(e.length>1&&e.pop(),r=e)),i instanceof cr&&(i={}),t.call(this,r,i)}}},ci=_n.Collection.extend({initialize:function(t,e){e.cellNamespace?this.cellNamespace=e.cellNamespace:this.cellNamespace="undefined"!=typeof joint&&sn(joint,"shapes")?joint.shapes:null,this.graph=e.graph},model:function(t,e){var n=e.collection,r=n.cellNamespace,i=new("link"===t.type?qr:Ae(r,t.type,".")||Ur)(t,e);return e.dry||(i.graph=n.graph),i},comparator:function(t){return t.get("z")||0}}),fi=_n.Model.extend({initialize:function(t,e){var n=new ci([],{model:(e=e||{}).cellModel,cellNamespace:e.cellNamespace,graph:this});_n.Model.prototype.set.call(this,"cells",n),n.on("all",this.trigger,this),this.on("change:z",this._sortOnChangeZ,this),this._out={},this._in={},this._nodes={},this._edges={},this._batches={},n.on("add",this._restructureOnAdd,this),n.on("remove",this._restructureOnRemove,this),n.on("reset",this._restructureOnReset,this),n.on("change:source",this._restructureOnChangeSource,this),n.on("change:target",this._restructureOnChangeTarget,this),n.on("remove",this._removeCell,this)},_sortOnChangeZ:function(){this.get("cells").sort()},_restructureOnAdd:function(t){if(t.isLink()){this._edges[t.id]=!0;var e=t.attributes,n=e.source,r=e.target;n.id&&((this._out[n.id]||(this._out[n.id]={}))[t.id]=!0),r.id&&((this._in[r.id]||(this._in[r.id]={}))[t.id]=!0)}else this._nodes[t.id]=!0},_restructureOnRemove:function(t){if(t.isLink()){delete this._edges[t.id];var e=t.attributes,n=e.source,r=e.target;n.id&&this._out[n.id]&&this._out[n.id][t.id]&&delete this._out[n.id][t.id],r.id&&this._in[r.id]&&this._in[r.id][t.id]&&delete this._in[r.id][t.id]}else delete this._nodes[t.id]},_restructureOnReset:function(t){t=t.models,this._out={},this._in={},this._nodes={},this._edges={},t.forEach(this._restructureOnAdd,this)},_restructureOnChangeSource:function(t){var e=t.previous("source");e.id&&this._out[e.id]&&delete this._out[e.id][t.id];var n=t.attributes.source;n.id&&((this._out[n.id]||(this._out[n.id]={}))[t.id]=!0)},_restructureOnChangeTarget:function(t){var e=t.previous("target");e.id&&this._in[e.id]&&delete this._in[e.id][t.id];var n=t.get("target");n.id&&((this._in[n.id]||(this._in[n.id]={}))[t.id]=!0)},getOutboundEdges:function(t){return this._out&&this._out[t]||{}},getInboundEdges:function(t){return this._in&&this._in[t]||{}},toJSON:function(){var t=_n.Model.prototype.toJSON.apply(this,arguments);return t.cells=this.get("cells").toJSON(),t},fromJSON:function(t,e){if(!t.cells)throw new Error("Graph JSON must contain cells array.");return this.set(t,e)},set:function(t,e,n){var r;return"object"==h(t)?(r=t,n=e):(r={})[t]=e,r.hasOwnProperty("cells")&&(this.resetCells(r.cells,n),r=ln(r,"cells")),_n.Model.prototype.set.call(this,r,n)},clear:function(t){t=$e({},t,{clear:!0});var e=this.get("cells");if(0===e.length)return this;this.startBatch("clear",t);var n=e.sortBy((function(t){return t.isLink()?1:2}));do{n.shift().remove(t)}while(n.length>0);return this.stopBatch("clear"),this},_prepareCell:function(t,e){var n;if(t instanceof _n.Model?(n=t.attributes,t.graph||e&&e.dry||(t.graph=this)):n=t,!mn(n.type))throw new TypeError("dia.Graph: cell type must be a string.");return t},minZIndex:function(){var t=this.get("cells").first();return t&&t.get("z")||0},maxZIndex:function(){var t=this.get("cells").last();return t&&t.get("z")||0},addCell:function(t,e){return Array.isArray(t)?this.addCells(t,e):(t instanceof _n.Model?t.has("z")||t.set("z",this.maxZIndex()+1):void 0===t.z&&(t.z=this.maxZIndex()+1),this.get("cells").add(this._prepareCell(t,e),e||{}),this)},addCells:function(t,e){return 0===t.length||(t=nn(t),e.maxPosition=e.position=t.length-1,this.startBatch("add",e),t.forEach((function(t){this.addCell(t,e),e.position--}),this),this.stopBatch("add",e)),this},resetCells:function(t,e){var n=tn(t).map((function(t){return this._prepareCell(t,e)}),this);return this.get("cells").reset(n,e),this},removeCells:function(t,e){return t.length&&(this.startBatch("remove"),He(t,"remove",e),this.stopBatch("remove")),this},_removeCell:function(t,e,n){(n=n||{}).clear||(n.disconnectLinks?this.disconnectLinks(t,n):this.removeLinks(t,n)),this.get("cells").remove(t,{silent:!0}),t.graph===this&&(t.graph=null)},getCell:function(t){return this.get("cells").get(t)},getCells:function(){return this.get("cells").toArray()},getElements:function(){return this.get("cells").filter((function(t){return t.isElement()}))},getLinks:function(){return this.get("cells").filter((function(t){return t.isLink()}))},getFirstCell:function(){return this.get("cells").first()},getLastCell:function(){return this.get("cells").last()},getConnectedLinks:function(t,e){var n=(e=e||{}).indirect,r=e.inbound,i=e.outbound;void 0===r&&void 0===i&&(r=i=!0);var o=[],a={};function s(t,e){if(fn(t.getOutboundEdges(e.id),function(e,l){if(!a[l]){var c=t.getCell(l);o.push(c),a[l]=!0,n&&(r&&u(t,c),i&&s(t,c))}}.bind(t)),n&&e.isLink()){var l=e.getTargetCell();l&&l.isLink()&&(a[l.id]||(o.push(l),s(t,l)))}}function u(t,e){if(fn(t.getInboundEdges(e.id),function(e,l){if(!a[l]){var c=t.getCell(l);o.push(c),a[l]=!0,n&&(r&&u(t,c),i&&s(t,c))}}.bind(t)),n&&e.isLink()){var l=e.getSourceCell();l&&l.isLink()&&(a[l.id]||(o.push(l),u(t,l)))}}if(i&&s(this,t),r&&u(this,t),e.deep){var l=t.getEmbeddedCells({deep:!0}),c={};l.forEach((function(t){t.isElement()&&(c[t.id]=!0)})),l.forEach((function(t){t.isLink()||(i&&fn(this.getOutboundEdges(t.id),function(t,n){if(!a[n]){var r=this.getCell(n).attributes,i=r.source,s=r.target,u=i.id,l=s.id;if(!e.includeEnclosed&&u&&c[u]&&l&&c[l])return;o.push(this.getCell(n)),a[n]=!0}}.bind(this)),r&&fn(this.getInboundEdges(t.id),function(t,n){if(!a[n]){var r=this.getCell(n).attributes,i=r.source,s=r.target,u=i.id,l=s.id;if(!e.includeEnclosed&&u&&c[u]&&l&&c[l])return;o.push(this.getCell(n)),a[n]=!0}}.bind(this)))}),this)}return o},getNeighbors:function(t,e){e||(e={});var n=e.inbound,r=e.outbound;void 0===n&&void 0===r&&(n=r=!0);var i=this.getConnectedLinks(t,e).reduce(function(i,o){var a=o.attributes,s=a.source,u=a.target,l=o.hasLoop(e);if(n&&sn(s,"id")&&!i[s.id]){var c=this.getCell(s.id);c.isElement()&&(!l&&(!c||c===t||e.deep&&c.isEmbeddedIn(t))||(i[s.id]=c))}if(r&&sn(u,"id")&&!i[u.id]){var f=this.getCell(u.id);f.isElement()&&(!l&&(!f||f===t||e.deep&&f.isEmbeddedIn(t))||(i[u.id]=f))}return i}.bind(this),{});if(t.isLink()){if(n){var o=t.getSourceCell();o&&o.isElement()&&!i[o.id]&&(i[o.id]=o)}if(r){var a=t.getTargetCell();a&&a.isElement()&&!i[a.id]&&(i[a.id]=a)}}return tn(i)},getCommonAncestor:function(){var t=Array.from(arguments).map((function(t){for(var e=[],n=t.get("parent");n;)e.push(n),n=this.getCell(n).get("parent");return e}),this);t=t.sort((function(t,e){return t.length-e.length}));var e=tn(t.shift()).find((function(e){return t.every((function(t){return t.includes(e)}))}));return this.getCell(e)},getSuccessors:function(t,e){e=e||{};var n=[];return this.search(t,(function(e){e!==t&&n.push(e)}),$e({},e,{outbound:!0})),n},cloneCells:Dn,cloneSubgraph:function(t,e){var n=this.getSubgraph(t,e);return this.cloneCells(n)},getSubgraph:function(t,e){e=e||{};var n=[],r={},i=[],o=[];return tn(t).forEach((function(t){r[t.id]||(n.push(t),r[t.id]=t,t.isLink()?o.push(t):i.push(t)),e.deep&&t.getEmbeddedCells({deep:!0}).forEach((function(t){r[t.id]||(n.push(t),r[t.id]=t,t.isLink()?o.push(t):i.push(t))}))})),o.forEach((function(t){var e=t.attributes,o=e.source,a=e.target;if(o.id&&!r[o.id]){var s=this.getCell(o.id);n.push(s),r[s.id]=s,i.push(s)}if(a.id&&!r[a.id]){var u=this.getCell(a.id);n.push(this.getCell(a.id)),r[u.id]=u,i.push(u)}}),this),i.forEach((function(t){this.getConnectedLinks(t,e).forEach((function(t){var e=t.attributes,i=e.source,o=e.target;!r[t.id]&&i.id&&r[i.id]&&o.id&&r[o.id]&&(n.push(t),r[t.id]=t)}))}),this),n},getPredecessors:function(t,e){e=e||{};var n=[];return this.search(t,(function(e){e!==t&&n.push(e)}),$e({},e,{inbound:!0})),n},search:function(t,e,n){(n=n||{}).breadthFirst?this.bfs(t,e,n):this.dfs(t,e,n)},bfs:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},o=[];for(o.push(t),i[t.id]=0;o.length>0;){var a=o.shift();if(!r[a.id]&&(r[a.id]=!0,!1!==e.call(this,a,i[a.id])))for(var s=this.getNeighbors(a,n),u=0,l=s.length;u<l;u++){var c=s[u];i[c.id]=i[a.id]+1,o.push(c)}}},dfs:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},o=[];for(o.push(t),i[t.id]=0;o.length>0;){var a=o.pop();if(!r[a.id]&&(r[a.id]=!0,!1!==e.call(this,a,i[a.id])))for(var s=this.getNeighbors(a,n),u=o.length,l=0,c=s.length;l<c;l++){var f=s[l];i[f.id]=i[a.id]+1,o.splice(u,0,f)}}},getSources:function(){var t=[];return fn(this._nodes,function(e,n){this._in[n]&&!Qe(this._in[n])||t.push(this.getCell(n))}.bind(this)),t},getSinks:function(){var t=[];return fn(this._nodes,function(e,n){this._out[n]&&!Qe(this._out[n])||t.push(this.getCell(n))}.bind(this)),t},isSource:function(t){return!this._in[t.id]||Qe(this._in[t.id])},isSink:function(t){return!this._out[t.id]||Qe(this._out[t.id])},isSuccessor:function(t,e){var n=!1;return this.search(t,(function(r){if(r===e&&r!==t)return n=!0,!1}),{outbound:!0}),n},isPredecessor:function(t,e){var n=!1;return this.search(t,(function(r){if(r===e&&r!==t)return n=!0,!1}),{inbound:!0}),n},isNeighbor:function(t,e,n){var r=(n=n||{}).inbound,i=n.outbound;void 0===r&&void 0===i&&(r=i=!0);var o=!1;return this.getConnectedLinks(t,n).forEach((function(t){var n=t.attributes,a=n.source,s=n.target;return r&&sn(a,"id")&&a.id===e.id||i&&sn(s,"id")&&s.id===e.id?(o=!0,!1):void 0})),o},disconnectLinks:function(t,e){this.getConnectedLinks(t).forEach((function(n){n.set(n.attributes.source.id===t.id?"source":"target",{x:0,y:0},e)}))},removeLinks:function(t,e){He(this.getConnectedLinks(t),"remove",e)},findModelsFromPoint:function(t){return this.getElements().filter((function(e){return e.getBBox({rotate:!0}).containsPoint(t)}))},findModelsInArea:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ut(t),r=e.strict,i=void 0!==r&&r,o=i?"containsRect":"intersect";return this.getElements().filter((function(t){return n[o](t.getBBox({rotate:!0}))}))},findModelsUnderElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.searchBy,r=void 0===n?"bbox":n,i=t.getBBox().rotateAroundCenter(t.angle());return("bbox"===r?this.findModelsInArea(i):this.findModelsFromPoint(i[r]())).filter((function(e){return t.id!==e.id&&!e.isEmbeddedIn(t)}))},getBBox:function(){return this.getCellsBBox(this.getCells())},getCellsBBox:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.rotate,r=void 0===n||n;return tn(t).reduce((function(t,e){var n=e.getBBox({rotate:r});return n?t?t.union(n):n:t}),null)},translate:function(t,e,n){var r=this.getCells().filter((function(t){return!t.isEmbedded()}));return He(r,"translate",t,e,n),this},resize:function(t,e,n){return this.resizeCells(t,e,this.getCells(),n)},resizeCells:function(t,e,n,r){var i=this.getCellsBBox(n);if(i){var o=Math.max(t/i.width,0),a=Math.max(e/i.height,0);He(n,"scale",o,a,i.origin(),r)}return this},startBatch:function(t,e){return e=e||{},this._batches[t]=(this._batches[t]||0)+1,this.trigger("batch:start",$e({},e,{batchName:t}))},stopBatch:function(t,e){return e=e||{},this._batches[t]=(this._batches[t]||0)-1,this.trigger("batch:stop",$e({},e,{batchName:t}))},hasActiveBatch:function(t){var e=this._batches;return(0===arguments.length?Object.keys(e):Array.isArray(t)?t:[t]).some((function(t){return e[t]>0}))}},{validations:{multiLinks:function(t,e){var n=e.attributes,r=n.source,i=n.target;if(r.id&&i.id){var o=e.getSourceCell();if(o&&t.getConnectedLinks(o,{outbound:!0}).filter((function(t){var e=t.attributes,n=e.source,o=e.target;return n&&n.id===r.id&&(!n.port||n.port===r.port)&&o&&o.id===i.id&&(!o.port||o.port===i.port)})).length>1)return!1}return!0},linkPinning:function(t,e){var n=e.attributes,r=n.source,i=n.target;return r.id&&i.id}}});!function(t,e,n){if(mn(n)){if(!li[n])throw new Error('Unknown wrapper: "'+n+'"');n=li[n]}if(!Je(n))throw new Error("Wrapper must be a function.");tn(["resetCells","addCells","removeCells"]).forEach((function(e){t[e]=n(t[e])}))}(fi.prototype,0,li.cells);var hi={exportElement:function(t){return t.size()},exportLink:function(t){var e=t.get("labelSize")||{};return{minLen:t.get("minLen")||1,weight:t.get("weight")||1,labelpos:t.get("labelPosition")||"c",labeloffset:t.get("labelOffset")||0,width:e.width||0,height:e.height||0}},importElement:function(t,e,n){var r=this.getCell(e),i=n.node(e);t.setPosition?t.setPosition(r,i):r.set("position",{x:i.x-i.width/2,y:i.y-i.height/2})},importLink:function(t,e,n){var r=this.getCell(e.name),i=n.edge(e),o=i.points||[],a=new mt(o);if(t.setVertices||t.setLinkVertices)if(Je(t.setVertices))t.setVertices(r,o);else{a.simplify({threshold:.001});var s=a.points.map((function(t){return t.toJSON()})),u=s.length;r.set("vertices",s.slice(1,u-1))}if(t.setLabels&&"x"in i&&"y"in i){var l={x:i.x,y:i.y};if(Je(t.setLabels))t.setLabels(r,l,o);else{var c=a.closestPointLength(l),f=a.pointAtLength(c),h=c/a.length(),d=new Y(l).difference(f).toJSON();r.label(0,{position:{distance:h,offset:d}})}}},layout:function(t,e){var n;n=t instanceof fi?t:(new fi).resetCells(t,{dry:!0,sort:!1}),t=null;var r=(e=Ue(e||{},{resizeClusters:!0,clusterPadding:10,exportElement:this.exportElement,exportLink:this.exportLink})).dagre||("undefined"!=typeof dagre?dagre:void 0);if(void 0===r)throw new Error('The the "dagre" utility is a mandatory dependency.');var i=hi.toGraphLib(n,{graphlib:e.graphlib,directed:!0,multigraph:!0,compound:!0,setNodeLabel:e.exportElement,setEdgeLabel:e.exportLink,setEdgeName:function(t){return t.id}}),o={},a=e.marginX||0,s=e.marginY||0;if(e.rankDir&&(o.rankdir=e.rankDir),e.align&&(o.align=e.align),e.nodeSep&&(o.nodesep=e.nodeSep),e.edgeSep&&(o.edgesep=e.edgeSep),e.rankSep&&(o.ranksep=e.rankSep),e.ranker&&(o.ranker=e.ranker),a&&(o.marginx=a),s&&(o.marginy=s),i.setGraph(o),r.layout(i,{debugTiming:!!e.debugTiming}),n.startBatch("layout"),hi.fromGraphLib(i,{importNode:this.importElement.bind(n,e),importEdge:this.importLink.bind(n,e)}),e.resizeClusters){var u=i.nodes().filter((function(t){return i.children(t).length>0})).map(n.getCell.bind(n)).sort((function(t,e){return e.getAncestors().length-t.getAncestors().length}));He(u,"fitEmbeds",{padding:e.clusterPadding})}n.stopBatch("layout");var l=i.graph();return new ut(a,s,Math.abs(l.width-2*a),Math.abs(l.height-2*s))},fromGraphLib:function(t,e){var n=(e=e||{}).importNode||yn,r=e.importEdge||yn,i=this instanceof fi?this:new fi;return t.nodes().forEach((function(r){n.call(i,r,t,i,e)})),t.edges().forEach((function(n){r.call(i,n,t,i,e)})),i},toGraphLib:function(t,e){var n=(e=e||{}).graphlib||("undefined"!=typeof graphlib?graphlib:void 0);if(void 0===n)throw new Error('The the "graphlib" utility is a mandatory dependency.');for(var r=cn(e,"directed","compound","multigraph"),i=new n.Graph(r),o=e.setNodeLabel||yn,a=e.setEdgeLabel||yn,s=e.setEdgeName||yn,u=t.get("cells"),l=0,c=u.length;l<c;l++){var f=u.at(l);if(f.isLink()){var h=f.get("source"),d=f.get("target");if(!h.id||!d.id)break;i.setEdge(h.id,d.id,a(f),s(f))}else if(i.setNode(f.id,o(f)),i.isCompound()&&f.has("parent")){var p=f.get("parent");u.has(p)&&i.setParent(f.id,p)}}return i}};function di(t){return t?Array.isArray(t)?t:[t]:[]}fi.prototype.toGraphLib=function(t){return hi.toGraphLib(this,t)},fi.prototype.fromGraphLib=function(t,e){return hi.fromGraphLib.call(this,t,e)};var pi=An.extend({tagName:"g",svgElement:!0,className:"highlight",HIGHLIGHT_FLAG:1,UPDATE_PRIORITY:3,DETACHABLE:!1,UPDATABLE:!0,MOUNTABLE:!0,cellView:null,nodeSelector:null,node:null,updateRequested:!1,transformGroup:null,requestUpdate:function(t,e){var n=t.paper;this.cellView=t,this.nodeSelector=e,n&&(this.updateRequested=!0,n.requestViewUpdate(this,this.HIGHLIGHT_FLAG,this.UPDATE_PRIORITY))},confirmUpdate:function(){this.updateRequested=!1;var t=this.cellView,e=this.nodeSelector;return this.update(t,e),this.mount(),this.transform(),0},findNode:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof n){var r=t.findBySelector(n),i=l(r,1);e=i[0]}else if(Ze(n)){var o=t.model.isLink(),a=n.label,s=void 0===a?null:a,u=n.port,c=n.selector;e=o&&null!==s?t.findLabelNode(s,c):!o&&u?t.findPortNode(u,c):l(t.findBySelector(c),1)[0]}else n&&((e=ye.toNode(n))instanceof SVGElement||(e=null));return e||null},mount:function(){var t=this.MOUNTABLE,e=this.cellView,n=this.el,r=this.options,i=this.transformGroup;if(t&&!i){var o=e.vel,a=e.paper,s=r.layer;if(s){var u=this.transformGroup=ye("g").addClass("highlight-transform").append(n);a.getLayerView(s).insertSortedNode(u.node,r.z)}else n.parentNode&&!n.nextSibling||o.append(n)}},unmount:function(){var t=this.MOUNTABLE,e=this.transformGroup,n=this.vel;t&&(e?(this.transformGroup=null,e.remove()):n.remove())},transform:function(){var t=this.transformGroup,e=this.cellView,n=this.updateRequested;if(t&&!e.model.isLink()&&!n){var r=e.getRootTranslateMatrix(),i=e.getRootRotateMatrix(),o=r.multiply(i);t.attr("transform",ye.matrixToTransformString(o))}},update:function(){var t=this.node,e=this.cellView,n=this.nodeSelector,r=this.updateRequested,i=this.id;if(!r){var o=this.node=this.findNode(e,n);t&&this.unhighlight(e,t),o?(this.highlight(e,o),this.mount()):(this.unmount(),e.notify("cell:highlight:invalid",i,this))}},onRemove:function(){var t=this.node,e=this.cellView,n=this.id,r=this.constructor;t&&this.unhighlight(e,t),this.unmount(),r._removeRef(e,n)},highlight:function(t,e){},unhighlight:function(t,e){}},{_views:{},highlight:function(t,e,n){var r=this.uniqueId(e,n);this.add(t,e,r,n)},unhighlight:function(t,e,n){var r=this.uniqueId(e,n);this.remove(t,r)},get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.cid,r=this._views,i=r[n];if(null===e){var o=[];if(!i)return o;for(var a in i){var s=i[a];s instanceof this&&o.push(s)}return o}if(!i)return null;if(e in i){var u=i[e];if(u instanceof this)return u}return null},add:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)throw new Error("dia.HighlighterView: An ID required.");var i=pi.get(t,n);i&&i.remove();var o=new this(r);return o.id=n,this._addRef(t,n,o),o.requestUpdate(t,e),o},_addRef:function(t,e,n){var r=t.cid,i=this._views,o=i[r];o||(o=i[r]={}),o[e]=n},_removeRef:function(t,e){var n=t.cid,r=this._views,i=r[n];if(i){for(var o in e&&delete i[e],i)return;delete r[n]}},remove:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;di(this.get(t,e)).forEach((function(t){t.remove()}))},update:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];di(this.get(t,e)).forEach((function(t){(n||t.UPDATABLE)&&t.update()}))},transform:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;di(this.get(t,e)).forEach((function(t){t.UPDATABLE&&t.transform()}))},uniqueId:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return ye.ensureId(t)+JSON.stringify(e)}}),gi={DEFAULT:"default",EMBEDDING:"embedding",CONNECTING:"connecting",MAGNET_AVAILABILITY:"magnetAvailability",ELEMENT_AVAILABILITY:"elementAvailability"},vi=An.extend({tagName:"g",svgElement:!0,selector:"root",metrics:null,className:function(){var t=["cell"],e=this.model.get("type");return e&&e.toLowerCase().split(".").forEach((function(e,n,r){t.push("type-"+r.slice(0,n+1).join("-"))})),t.join(" ")},_presentationAttributes:null,_flags:null,setFlags:function(){var t,e,n,r={},i={},o=0,a=un(this,"presentationAttributes");for(var s in a)if(a.hasOwnProperty(s)){var u=a[s];for(Array.isArray(u)||(u=[u]),t=0,e=u.length;t<e;t++){var l=r[n=u[t]];l||(l=r[n]=1<<o++),i[s]|=l}}var c=un(this,"initFlag");for(Array.isArray(c)||(c=[c]),t=0,e=c.length;t<e;t++)r[n=c[t]]||(r[n]=1<<o++);if(o>25)throw new Error("dia.CellView: Maximum number of flags exceeded.");this._flags=r,this._presentationAttributes=i},hasFlag:function(t,e){return t&this.getFlag(e)},removeFlag:function(t,e){return t^t&this.getFlag(e)},getFlag:function(t){var e=this._flags;if(!e)return 0;var n=0;if(Array.isArray(t))for(var r=0,i=t.length;r<i;r++)n|=e[t[r]];else n|=e[t];return n},attributes:function(){var t=this.model;return{"model-id":t.id,"data-type":t.attributes.type}},constructor:function(t){t.id=t.id||Ne(this),An.call(this,t)},initialize:function(){this.setFlags(),An.prototype.initialize.apply(this,arguments),this.cleanNodesCache(),this.$el.data("view",this),this.startListening()},onMount:function(){},startListening:function(){this.listenTo(this.model,"change",this.onAttributesChange)},onAttributesChange:function(t,e){var n=t.getChangeFlag(this._presentationAttributes);!e.updateHandled&&n&&(e.dirty&&this.hasFlag(n,"UPDATE")&&(n|=this.getFlag("RENDER")),e.tool&&(e.async=!1),this.requestUpdate(n,e))},requestUpdate:function(t,e){var n=this.paper;n&&t>0&&n.requestViewUpdate(this,t,this.UPDATE_PRIORITY,e)},parseDOMJSON:function(t,e){var n=_e(t),r=n.selectors,i=n.groupSelectors;for(var o in i){if(r[o])throw new Error("dia.CellView: ambiguous group selector");r[o]=i[o]}if(e){var a=this.selector;if(r[a])throw new Error("dia.CellView: ambiguous root selector.");r[a]=e}return{fragment:n.fragment,selectors:r}},can:function(t){var e,n,r=Je(this.options.interactive)?this.options.interactive(this):this.options.interactive;return gn(r)&&!1!==r[t]||(e=r,n=Object.prototype.toString,(!0===e||!1===e||!!e&&"object"==h(e)&&"[object Boolean]"===n.call(e))&&!1!==r)},findBySelector:function(t,e,n){if(e||(e=this.el),n||(n=this.selectors),!t||"."===t)return[e];if(n){var r=n[t];if(r)return Array.isArray(r)?r:[r]}return we(e).find(t).toArray()},notify:function(t){if(this.paper){var e=Array.prototype.slice.call(arguments,1);this.trigger.apply(this,[t].concat(e)),this.paper.trigger.apply(this.paper,[t,this].concat(e))}},getBBox:function(t){var e;if(t&&t.useModelGeometry){var n=this.model;e=n.getBBox().bbox(n.angle())}else e=this.getNodeBBox(this.el);return this.paper.localToPaperRect(e)},getNodeBBox:function(t){var e=this.getNodeBoundingRect(t),n=this.getNodeMatrix(t),r=this.getRootTranslateMatrix(),i=this.getRootRotateMatrix();return ye.transformRect(e,r.multiply(i).multiply(n))},getNodeUnrotatedBBox:function(t){var e=this.getNodeBoundingRect(t),n=this.getNodeMatrix(t),r=this.getRootTranslateMatrix();return ye.transformRect(e,r.multiply(n))},getRootTranslateMatrix:function(){var t=this.model.position();return ye.createSVGMatrix().translate(t.x,t.y)},getRootRotateMatrix:function(){var t=ye.createSVGMatrix(),e=this.model,n=e.angle();if(n){var r=e.getBBox(),i=r.width/2,o=r.height/2;t=t.translate(i,o).rotate(n).translate(-i,-o)}return t},_notifyHighlight:function(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.el;if(r=void 0===(n=l("string"==typeof e?this.findBySelector(e):this.$(e),1)[0])?o:n,i.partial=r!==o,void 0===i.type){var a;switch(!0){case i.embedding:a=gi.EMBEDDING;break;case i.connecting:a=gi.CONNECTING;break;case i.magnetAvailability:a=gi.MAGNET_AVAILABILITY;break;case i.elementAvailability:a=gi.ELEMENT_AVAILABILITY;break;default:a=gi.DEFAULT}i.type=a}return this.notify(t,r,i),this},highlight:function(t,e){return this._notifyHighlight("cell:highlight",t,e)},unhighlight:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._notifyHighlight("cell:unhighlight",t,e)},findMagnet:function(t){var e=this.el,n=this.$(t)[0];n||(n=e);do{var r=n.getAttribute("magnet"),i=n===e;if((r||i)&&"false"!==r)return n;if(i)return;n=n.parentNode}while(n)},findProxyNode:function(t,e){t||(t=this.el);var n=t.getAttribute("".concat(e,"-selector"));if(n){var r=l(this.findBySelector(n),1)[0];if(r)return r}return t},getSelector:function(t,e){var n;if(t===this.el)return"string"==typeof e&&(n="> "+e),n;if(t){var r=ye(t).index()+1;n=t.tagName+":nth-child("+r+")",e&&(n+=" > "+e),n=this.getSelector(t.parentNode,n)}return n},addLinkFromMagnet:function(t,e,n){var r=this.paper,i=r.model,o=r.getDefaultLink(this,t);return o.set({source:this.getLinkEnd(t,e,n,o,"source"),target:{x:e,y:n}}).addTo(i,{async:!1,ui:!0}),o.findView(r)},getLinkEnd:function(t){for(var e=this.model,n=e.id,r=this.findAttribute("port",t),i=t.getAttribute("joint-selector"),o={id:n},a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];return null!=i&&(o.magnet=i),null!=r?(o.port=r,e.hasPort(r)||i||(o.selector=this.getSelector(t))):null==i&&this.el!==t&&(o.selector=this.getSelector(t)),this.customizeLinkEnd.apply(this,[o,t].concat(s))},customizeLinkEnd:function(t,e,n,r,i,o){var a=this.paper,s=a.options.connectionStrategy;if("function"==typeof s){var u=s.call(a,t,this,e,new Y(n,r),i,o,a);if(u)return u}return t},getMagnetFromLinkEnd:function(t){var e,n=this.el,r=t.port,i=t.magnet,o=this.model;return null!=r&&o.isElement()&&o.hasPort(r)?e=this.findPortNode(r,i)||n:(i||(i=t.selector),i||null==r||(i='[port="'+r+'"]'),e=this.findBySelector(i,n,this.selectors)[0]),this.findProxyNode(e,"magnet")},dragLinkStart:function(t,e,n,r){this.model.startBatch("add-link");var i=this.addLinkFromMagnet(e,n,r);i.notifyPointerdown(t,n,r),i.eventData(t,i.startArrowheadMove("target",{whenNotAllowed:"remove"})),this.eventData(t,{linkView:i})},dragLink:function(t,e,n){var r=this.eventData(t),i=r.linkView;if(i)i.pointermove(t,e,n);else{var o=this.paper,a=o.options.magnetThreshold,s=this.getEventTarget(t),u=r.targetMagnet;if("onleave"===a){if(u===s||ye(u).contains(s))return}else if(o.eventData(t).mousemoved<=a)return;this.dragLinkStart(t,u,e,n)}},dragLinkEnd:function(t,e,n){var r=this.eventData(t).linkView;r&&(r.pointerup(t,e,n),this.model.stopBatch("add-link"))},getAttributeDefinition:function(t){return this.model.constructor.getAttributeDefinition(t)},setNodeAttributes:function(t,e){Qe(e)||(t instanceof SVGElement?ye(t).attr(e):we(t).attr(e))},processNodeAttributes:function(t,e){var n,r,i,o,a,s,u,l,c,f,h=[];for(n in e)e.hasOwnProperty(n)&&(r=e[n],!(i=this.getAttributeDefinition(n))||Je(i.qualify)&&!i.qualify.call(this,r,t,e)?(s||(s={}),s[(f=n,f.replace(/[A-Z]/g,"-$&").toLowerCase())]=r):(mn(i.set)&&(s||(s={}),s[i.set]=r),null!==r&&h.push(n,i)));for(o=0,a=h.length;o<a;o+=2)n=h[o],i=h[o+1],r=e[n],Je(i.set)&&(u||(u={}),u[n]=r),Je(i.position)&&(l||(l={}),l[n]=r),Je(i.offset)&&(c||(c={}),c[n]=r);return{raw:e,normal:s,set:u,position:l,offset:c}},updateRelativeAttributes:function(t,e,n,r){var i,o;r||(r={});var a=e.raw||{},s=e.normal||{},u=e.set,l=e.position,c=e.offset;for(i in u){o=u[i];var f=this.getAttributeDefinition(i).set.call(this,o,n.clone(),t,a);gn(f)?$e(s,f):void 0!==f&&(s[i]=f)}if(t instanceof HTMLElement)this.setNodeAttributes(t,s);else{var h,d,p,g=s.transform,v=ye.transformStringToMatrix(g),m=Y(v.e,v.f);if(g&&(s=ln(s,"transform"),v.e=v.f=0),l||c){var y=this.getNodeScale(t,r.scalableNode);h=y.sx,d=y.sy}var b=!1;for(i in l)o=l[i],(p=this.getAttributeDefinition(i).position.call(this,o,n.clone(),t,a))&&(m.offset(Y(p).scale(h,d)),b||(b=!0));this.setNodeAttributes(t,s);var w=!1;if(c){var x=this.getNodeBoundingRect(t);if(x.width>0&&x.height>0){var S=ye.transformRect(x,v).scale(1/h,1/d);for(i in c)o=c[i],(p=this.getAttributeDefinition(i).offset.call(this,o,S,t,a))&&(m.offset(Y(p).scale(h,d)),w||(w=!0))}}(void 0!==g||b||w)&&(m.round(1),v.e=m.x,v.f=m.y,t.setAttribute("transform",ye.matrixToTransformString(v)))}},getNodeScale:function(t,e){var n,r;if(e&&e.contains(t)){var i=e.scale();n=1/i.sx,r=1/i.sy}else n=1,r=1;return{sx:n,sy:r}},cleanNodesCache:function(){this.metrics={}},nodeCache:function(t){var e=this.metrics;if(!e)return{};var n=ye.ensureId(t),r=e[n];return r||(r=e[n]={}),r},getNodeData:function(t){var e=this.nodeCache(t);return e.data||(e.data={}),e.data},getNodeBoundingRect:function(t){var e=this.nodeCache(t);return void 0===e.boundingRect&&(e.boundingRect=ye(t).getBBox()),new ut(e.boundingRect)},getNodeMatrix:function(t){var e=this.nodeCache(t);if(void 0===e.magnetMatrix){var n=this.rotatableNode||this.el;e.magnetMatrix=ye(t).getTransformToElement(n)}return ye.createSVGMatrix(e.magnetMatrix)},getNodeShape:function(t){var e=this.nodeCache(t);return void 0===e.geometryShape&&(e.geometryShape=ye(t).toGeometryShape()),e.geometryShape.clone()},isNodeConnection:function(t){return this.model.isLink()&&(!t||t===this.el)},findNodesAttributes:function(t,e,n,r){var i,o,a,s,l={},c=[];for(var f in t)if(t.hasOwnProperty(f)&&(a=t[f],Ze(a))){var h=n[f]=this.findBySelector(f,e,r);for(i=0,o=h.length;i<o;i++){var d=h[i];s=ye.ensureId(d);var p=r&&r[f]===d,g=l[s];if(g){g.array||(c.push(s),g.array=!0,g.attributes=[g.attributes],g.selectedLength=[g.selectedLength]);var v=g.attributes,m=g.selectedLength;if(p)v.unshift(a),m.unshift(-1);else{var y=Ge(m,o);v.splice(y,0,a),m.splice(y,0,o)}}else l[s]={attributes:a,selectedLength:p?-1:o,node:d,array:!1}}}for(i=0,o=c.length;i<o;i++)(a=l[s=c[i]]).attributes=pn.apply(void 0,[{}].concat(u(a.attributes.reverse())));return l},getEventTarget:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.target,r=t.type,i=t.clientX,o=void 0===i?0:i,a=t.clientY,s=void 0===a?0:a;return e.fromPoint||"touchmove"===r||"touchend"===r?document.elementFromPoint(o,s):n},updateDOMSubtreeAttributes:function(t,e,n){n||(n={}),n.rootBBox||(n.rootBBox=ut()),n.selectors||(n.selectors=this.selectors);var r,i,o,a,s,u,l={},c={},f=[],h=[],d=n.roAttributes,p=this.findNodesAttributes(d||e,t,l,n.selectors),g=d?this.findNodesAttributes(e,t,l,n.selectors):p;for(var v in p)if(o=(a=p[v]).attributes,i=a.node,(s=this.processNodeAttributes(i,o)).set||s.position||s.offset){var m,y=g[v]&&g[v].attributes,b=y&&void 0===o.ref?y.ref:o.ref;if(b){if(!(m=(l[b]||this.findBySelector(b,t,n.selectors))[0]))throw new Error('dia.CellView: "'+b+'" reference does not exist.')}else m=null;if(r={node:i,refNode:m,processedAttributes:s,allAttributes:y},m){var w=h.findIndex((function(t){return t.refNode===i}));w>-1?h.splice(w,0,r):h.push(r)}else f.push(r)}else this.setNodeAttributes(i,s.normal);f.push.apply(f,h);for(var x=0,S=f.length;x<S;x++){r=f[x],i=r.node,m=r.refNode;var k=ye(n.rotatableNode),_=m?ye.ensureId(m):"",E=!!k&&!!m&&k.contains(m),A=c[_];if(!A){var P=E?k:t;A=c[_]=m?ye(m).getBBox({target:P}):n.rootBBox}d?(s=this.processNodeAttributes(i,r.allAttributes),this.mergeProcessedAttributes(s,r.processedAttributes)):s=r.processedAttributes;var C=A;E&&!k.contains(i)&&(u||(u=ye.transformStringToMatrix(k.attr("transform"))),C=ye.transformRect(A,u)),this.updateRelativeAttributes(i,s,C,n)}},mergeProcessedAttributes:function(t,e){t.set||(t.set={}),t.position||(t.position={}),t.offset||(t.offset={}),$e(t.set,e.set),$e(t.position,e.position),$e(t.offset,e.offset);var n=t.normal&&t.normal.transform;void 0!==n&&e.normal&&(e.normal.transform=n),t.normal=e.normal},onRemove:function(){this.removeTools(),this.removeHighlighters()},_toolsView:null,hasTools:function(t){var e=this._toolsView;return!(!e||t&&e.getName()!==t)},addTools:function(t){return this.removeTools(),t&&(this._toolsView=t,t.configure({relatedView:this}),t.listenTo(this.paper,"tools:event",this.onToolEvent.bind(this))),this},updateTools:function(t){var e=this._toolsView;return e&&e.update(t),this},removeTools:function(){var t=this._toolsView;return t&&(t.remove(),this._toolsView=null),this},hideTools:function(){var t=this._toolsView;return t&&t.hide(),this},showTools:function(){var t=this._toolsView;return t&&t.show(),this},onToolEvent:function(t){switch(t){case"remove":this.removeTools();break;case"hide":this.hideTools();break;case"show":this.showTools()}},removeHighlighters:function(){pi.remove(this)},updateHighlighters:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];pi.update(this,null,t)},transformHighlighters:function(){pi.transform(this)},pointerdblclick:function(t,e,n){this.notify("cell:pointerdblclick",t,e,n)},pointerclick:function(t,e,n){this.notify("cell:pointerclick",t,e,n)},contextmenu:function(t,e,n){this.notify("cell:contextmenu",t,e,n)},pointerdown:function(t,e,n){var r=this.model,i=r.graph;i&&(r.startBatch("pointer"),this.eventData(t,{graph:i})),this.notify("cell:pointerdown",t,e,n)},pointermove:function(t,e,n){this.notify("cell:pointermove",t,e,n)},pointerup:function(t,e,n){var r=this.eventData(t).graph;this.notify("cell:pointerup",t,e,n),r&&r.stopBatch("pointer",{cell:this.model})},mouseover:function(t){this.notify("cell:mouseover",t)},mouseout:function(t){this.notify("cell:mouseout",t)},mouseenter:function(t){this.notify("cell:mouseenter",t)},mouseleave:function(t){this.notify("cell:mouseleave",t)},mousewheel:function(t,e,n,r){this.notify("cell:mousewheel",t,e,n,r)},onevent:function(t,e,n,r){this.notify(e,t,n,r)},onmagnet:function(){},magnetpointerdblclick:function(){},magnetcontextmenu:function(){},checkMouseleave:function(t){var e=this.paper;e.isAsync()&&e.dumpView(this);var n=this.getEventTarget(t,{fromPoint:!0}),r=e.findView(n);r!==this&&(this.mouseleave(t),r&&r.mouseenter(t))},setInteractivity:function(t){this.options.interactive=t}},{Highlighting:gi,addPresentationAttributes:function(t){return pn({},un(this.prototype,"presentationAttributes"),t,(function(t,e){if(t&&e)return"string"==typeof t&&(t=[t]),"string"==typeof e&&(e=[e]),Array.isArray(t)&&Array.isArray(e)?We(t.concat(e)):void 0}))}}),mi={UPDATE:"UPDATE",TRANSLATE:"TRANSLATE",TOOLS:"TOOLS",RESIZE:"RESIZE",PORTS:"PORTS",ROTATE:"ROTATE",RENDER:"RENDER"},yi=vi.extend({_removePorts:function(){},_renderPorts:function(){},className:function(){var t=vi.prototype.className.apply(this).split(" ");return t.push("element"),t.join(" ")},initialize:function(){vi.prototype.initialize.apply(this,arguments),this._initializePorts()},presentationAttributes:{attrs:[mi.UPDATE],position:[mi.TRANSLATE,mi.TOOLS],size:[mi.RESIZE,mi.PORTS,mi.TOOLS],angle:[mi.ROTATE,mi.TOOLS],markup:[mi.RENDER],ports:[mi.PORTS]},initFlag:[mi.RENDER],UPDATE_PRIORITY:0,confirmUpdate:function(t,e){this.hasFlag(t,mi.PORTS)&&(this._removePorts(),this._cleanPortsCache());var n=!1;if(this.hasFlag(t,mi.RENDER))this.render(),this.updateTools(e),this.updateHighlighters(!0),n=!0,t=this.removeFlag(t,[mi.RENDER,mi.UPDATE,mi.RESIZE,mi.TRANSLATE,mi.ROTATE,mi.PORTS,mi.TOOLS]);else{var r=!1;this.hasFlag(t,mi.RESIZE)&&(this.resize(e),r=!0,t=this.removeFlag(t,[mi.RESIZE,mi.UPDATE])),this.hasFlag(t,mi.UPDATE)&&(this.update(this.model,null,e),t=this.removeFlag(t,mi.UPDATE),r=!0,t=this.removeFlag(t,mi.PORTS)),this.hasFlag(t,mi.TRANSLATE)&&(this.translate(),t=this.removeFlag(t,mi.TRANSLATE),n=!0),this.hasFlag(t,mi.ROTATE)&&(this.rotate(),t=this.removeFlag(t,mi.ROTATE),n=!0),this.hasFlag(t,mi.PORTS)&&(this._renderPorts(),r=!0,t=this.removeFlag(t,mi.PORTS)),r&&this.updateHighlighters(!1)}return n&&this.transformHighlighters(),this.hasFlag(t,mi.TOOLS)&&(this.updateTools(e),t=this.removeFlag(t,mi.TOOLS)),t},_initializePorts:function(){},update:function(t,e){this.cleanNodesCache();this._removePorts();var n=this.model,r=n.attr();this.updateDOMSubtreeAttributes(this.el,r,{rootBBox:new ut(n.size()),selectors:this.selectors,scalableNode:this.scalableNode,rotatableNode:this.rotatableNode,roAttributes:e===r?null:e}),this._renderPorts()},rotatableSelector:"rotatable",scalableSelector:"scalable",scalableNode:null,rotatableNode:null,renderMarkup:function(){var t=this.model,e=t.get("markup")||t.markup;if(!e)throw new Error("dia.ElementView: markup required");if(Array.isArray(e))return this.renderJSONMarkup(e);if("string"==typeof e)return this.renderStringMarkup(e);throw new Error("dia.ElementView: invalid markup")},renderJSONMarkup:function(t){var e=this.parseDOMJSON(t,this.el),n=this.selectors=e.selectors;this.rotatableNode=ye(n[this.rotatableSelector])||null,this.scalableNode=ye(n[this.scalableSelector])||null,this.vel.append(e.fragment)},renderStringMarkup:function(t){var e=this.vel;e.append(ye(t)),this.rotatableNode=e.findOne(".rotatable"),this.scalableNode=e.findOne(".scalable"),(this.selectors={})[this.selector]=this.el},render:function(){return this.vel.empty(),this.renderMarkup(),this.scalableNode&&this.update(),this.resize(),this.rotatableNode?(this.rotate(),this.translate()):this.updateTransformation(),this},resize:function(t){if(this.scalableNode)return this.sgResize(t);this.model.attributes.angle&&this.rotate(),this.update()},translate:function(){if(this.rotatableNode)return this.rgTranslate();this.updateTransformation()},rotate:function(){if(this.rotatableNode)return this.rgRotate(),void this.update();this.updateTransformation()},updateTransformation:function(){var t=this.getTranslateString(),e=this.getRotateString();e&&(t+=" "+e),this.vel.attr("transform",t)},getTranslateString:function(){var t=this.model.attributes.position;return"translate("+t.x+","+t.y+")"},getRotateString:function(){var t=this.model.attributes,e=t.angle;if(!e)return null;var n=t.size;return"rotate("+e+","+n.width/2+","+n.height/2+")"},rgRotate:function(){this.rotatableNode.attr("transform",this.getRotateString())},rgTranslate:function(){this.vel.attr("transform",this.getTranslateString())},sgResize:function(t){var e=this.model,n=e.angle(),r=e.size(),i=this.scalableNode,o=!1;i.node.getElementsByTagName("path").length>0&&(o=!0);var a=i.getBBox({recursive:o}),s=r.width/(a.width||1),u=r.height/(a.height||1);i.attr("transform","scale("+s+","+u+")");var l=this.rotatableNode,c=l&&l.attr("transform");if(c){l.attr("transform",c+" rotate("+-n+","+r.width/2+","+r.height/2+")");var f=i.getBBox({target:this.paper.cells});e.set("position",{x:f.x,y:f.y},$e({updateHandled:!0},t)),this.translate(),this.rotate()}this.update()},prepareEmbedding:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.model||this.model,n=(t.paper||this.paper).model,r=t.initialZIndices={},i=e.getEmbeddedCells({deep:!0}),o=n.getConnectedLinks(e,{deep:!0,includeEnclosed:!0});[e].concat(u(i),u(o)).forEach((function(t){return r[t.id]=t.attributes.z})),e.startBatch("to-front"),e.toFront({deep:!0,ui:!0});var a=n.getElements().reduce((function(t,e){return Math.max(t,e.attributes.z||0)}),0);o.forEach((function(t){t.attributes.z<=a&&t.set("z",a+1,{ui:!0})})),e.stopBatch("to-front");var s=e.parent();s?(n.getCell(s).unembed(e,{ui:!0}),t.initialParentId=s):t.initialParentId=null},processEmbedding:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=e.model||this.model,a=e.paper||this.paper,s=a.model,u=a.options,l=u.findParentBy,c=u.frontParentOnly,f=u.validateEmbedding;t=(t=Je(l)?tn(l.call(s,this,n,r,i)):"pointer"===l?tn(s.findModelsFromPoint({x:r,y:i})):s.findModelsUnderElement(o,{searchBy:l})).filter((function(t){return t instanceof cr&&o.id!==t.id&&!t.isEmbeddedIn(o)})),c&&(t=t.slice(-1));for(var h=null,d=e.candidateEmbedView,p=t.length-1;p>=0;p--){var g=t[p];if(d&&d.model.id==g.id){h=d;break}var v=g.findView(a);if(!Je(f)||f.call(a,this,v)){h=v;break}}h&&h!=d&&(this.clearEmbedding(e),e.candidateEmbedView=h.highlight(h.findProxyNode(null,"container"),{embedding:!0})),!h&&d&&this.clearEmbedding(e)},clearEmbedding:function(t){t||(t={});var e=t.candidateEmbedView;e&&(e.unhighlight(e.findProxyNode(null,"container"),{embedding:!0}),t.candidateEmbedView=null)},finalizeEmbedding:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.candidateEmbedView,n=t.model||this.model,r=t.paper||this.paper;if(e)e.model.embed(n,{ui:!0}),e.unhighlight(e.findProxyNode(null,"container"),{embedding:!0}),t.candidateEmbedView=null;else{var i=r.options.validateUnembedding,o=t.initialParentId;if(o&&"function"==typeof i&&!i.call(r,this))return void this._disallowUnembed(t)}r.model.getConnectedLinks(n,{deep:!0}).forEach((function(t){t.reparent({ui:!0})}))},_disallowUnembed:function(t){var e=t.model,n=t.whenNotAllowed,r=void 0===n?"revert":n,i=e||this.model,o=(t.paper||this.paper).model;switch(r){case"remove":i.remove({ui:!0});break;case"revert":var a=t.initialParentId,s=t.initialPosition,u=t.initialZIndices;if(s){var l=s.x,c=s.y;i.position(l,c,{deep:!0,ui:!0})}u&&Object.keys(u).forEach((function(t){var e=o.getCell(t);e&&e.set("z",u[t],{ui:!0})}));var f=o.getCell(a);f&&f.embed(i,{ui:!0})}},getDelegatedView:function(){for(var t=this,e=t.model,n=t.paper;t&&!e.isLink();){if(!e.isEmbedded()||t.can("stopDelegation"))return t;e=e.getParentCell(),t=n.findViewByModel(e)}return null},findProxyNode:function(t,e){t||(t=this.el);var n=t.getAttribute("".concat(e,"-selector"));if(n){var r=this.findAttribute("port",t);if(r){var i=this.findPortNode(r,n);if(i)return i}else{var o=l(this.findBySelector(n),1)[0];if(o)return o}}return t},notifyPointerdown:function(t,e,n){vi.prototype.pointerdown.call(this,t,e,n),this.notify("element:pointerdown",t,e,n)},notifyPointermove:function(t,e,n){vi.prototype.pointermove.call(this,t,e,n),this.notify("element:pointermove",t,e,n)},notifyPointerup:function(t,e,n){this.notify("element:pointerup",t,e,n),vi.prototype.pointerup.call(this,t,e,n)},pointerdblclick:function(t,e,n){vi.prototype.pointerdblclick.apply(this,arguments),this.notify("element:pointerdblclick",t,e,n)},pointerclick:function(t,e,n){vi.prototype.pointerclick.apply(this,arguments),this.notify("element:pointerclick",t,e,n)},contextmenu:function(t,e,n){vi.prototype.contextmenu.apply(this,arguments),this.notify("element:contextmenu",t,e,n)},pointerdown:function(t,e,n){this.isPropagationStopped(t)||(this.notifyPointerdown(t,e,n),this.dragStart(t,e,n))},pointermove:function(t,e,n){var r=this.eventData(t);switch(r.action){case"magnet":this.dragMagnet(t,e,n);break;case"move":(r.delegatedView||this).drag(t,e,n);default:this.notifyPointermove(t,e,n)}this.eventData(t,r)},pointerup:function(t,e,n){var r=this.eventData(t);switch(r.action){case"magnet":this.dragMagnetEnd(t,e,n);break;case"move":(r.delegatedView||this).dragEnd(t,e,n);default:this.notifyPointerup(t,e,n)}var i=r.targetMagnet;i&&this.magnetpointerclick(t,i,e,n),this.checkMouseleave(t)},mouseover:function(t){vi.prototype.mouseover.apply(this,arguments),this.notify("element:mouseover",t)},mouseout:function(t){vi.prototype.mouseout.apply(this,arguments),this.notify("element:mouseout",t)},mouseenter:function(t){vi.prototype.mouseenter.apply(this,arguments),this.notify("element:mouseenter",t)},mouseleave:function(t){vi.prototype.mouseleave.apply(this,arguments),this.notify("element:mouseleave",t)},mousewheel:function(t,e,n,r){vi.prototype.mousewheel.apply(this,arguments),this.notify("element:mousewheel",t,e,n,r)},onmagnet:function(t,e,n){this.dragMagnetStart(t,e,n)},magnetpointerdblclick:function(t,e,n,r){this.notify("element:magnet:pointerdblclick",t,e,n,r)},magnetcontextmenu:function(t,e,n,r){this.notify("element:magnet:contextmenu",t,e,n,r)},dragStart:function(t,e,n){var r=this.getDelegatedView();if(r&&r.can("elementMove")){this.eventData(t,{action:"move",delegatedView:r});var i=r.model.position();r.eventData(t,{initialPosition:i,pointerOffset:i.difference(e,n),restrictedArea:this.paper.getRestrictedArea(r,e,n)})}},dragMagnetStart:function(t,e,n){if(this.can("addLinkFromMagnet")){var r=t.currentTarget,i=this.paper;this.eventData(t,{targetMagnet:r}),t.stopPropagation(),i.options.validateMagnet(this,r,t)?(i.options.magnetThreshold<=0&&this.dragLinkStart(t,r,e,n),this.eventData(t,{action:"magnet"}),this.stopPropagation(t)):this.pointerdown(t,e,n),i.delegateDragEvents(this,t.data)}},drag:function(t,e,n){var r=this.paper,i=r.options.gridSize,o=this.model,a=this.eventData(t),s=a.pointerOffset,u=a.restrictedArea,l=a.embedding,c=P(e+s.x,i),f=P(n+s.y,i);o.position(c,f,{restrictedArea:u,deep:!0,ui:!0}),r.options.embeddingMode&&(l||(this.prepareEmbedding(a),l=!0),this.processEmbedding(a,t,e,n)),this.eventData(t,{embedding:l})},dragMagnet:function(t,e,n){this.dragLink(t,e,n)},dragEnd:function(t,e,n){var r=this.eventData(t);r.embedding&&this.finalizeEmbedding(r)},dragMagnetEnd:function(t,e,n){this.dragLinkEnd(t,e,n)},magnetpointerclick:function(t,e,n,r){var i=this.paper;i.eventData(t).mousemoved>i.options.clickThreshold||this.notify("element:magnet:pointerclick",t,e,n,r)}},{Flags:mi});$e(yi.prototype,$r);var bi=function(t,e,n){return t},wi=function(t,e,n){var r,i,o,a=e.side||"bottom",s=je(e.padding||40),u=n.sourceBBox,l=n.targetBBox,c=u.center(),f=l.center();switch(a){case"bottom":o=1,r="y",i="height";break;case"top":o=-1,r="y",i="height";break;case"left":o=-1,r="x",i="width";break;case"right":o=1,r="x",i="width";break;default:throw new Error("Router: invalid side")}return c[r]+=o*(u[i]/2+s[a]),f[r]+=o*(l[i]/2+s[a]),o*(c[r]-f[r])>0?f[r]=c[r]:c[r]=f[r],[c].concat(t,f)},xi={N:"S",S:"N",E:"W",W:"E"},Si={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function ki(t,e,n){var r=new Y(t.x,e.y);return n.containsPoint(r)&&(r=new Y(e.x,t.y)),r}function _i(t,e){return t["W"===e||"E"===e?"width":"height"]}function Ei(t,e){return t.x===e.x?t.y>e.y?"N":"S":t.y===e.y?t.x>e.x?"W":"E":null}function Ai(t){return new ut(t.x,t.y,0,0)}function Pi(t){var e=je(t.padding||t.elementPadding||20);return{x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}function Ci(t,e){return t.sourceBBox.clone().moveAndExpand(Pi(e))}function Ti(t,e){return t.targetBBox.clone().moveAndExpand(Pi(e))}function Ni(t,e,n){var r=new Y(t.x,e.y),i=new Y(e.x,t.y),o=Ei(t,r),a=Ei(t,i),s=xi[n],u=o===n||o!==s&&(a===s||a!==n)?r:i;return{points:[u],direction:Ei(u,e)}}function Li(t,e,n){var r=ki(t,e,n);return{points:[r],direction:Ei(r,e)}}function Mi(t,e,n,r){var i,o={},a=[new Y(t.x,e.y),new Y(e.x,t.y)],s=a.filter((function(t){return!n.containsPoint(t)})),u=s.filter((function(e){return Ei(e,t)!==r}));if(u.length>0)i=(i=u.filter((function(e){return Ei(t,e)===r})).pop())||u[0],o.points=[i],o.direction=Ei(i,e);else{i=on(a,s)[0];var l=new Y(e).move(i,-_i(n,r)/2),c=ki(l,t,n);o.points=[c,l],o.direction=Ei(l,e)}return o}function Oi(t,e,n,r){var i=Li(e,t,r),o=i.points[0];if(n.containsPoint(o)){var a=(i=Li(t,e,n)).points[0];if(r.containsPoint(a)){var s=new Y(t).move(a,-_i(n,Ei(t,a))/2),u=new Y(e).move(o,-_i(r,Ei(e,o))/2),l=new ht(s,u).midpoint(),c=Li(t,l,n),f=Ni(l,e,c.direction);i.points=[c.points[0],f.points[0]],i.direction=f.direction}}return i}function Ri(t,e,n,r,i){var o,a,s,u={},l=n.union(r).inflate(1),c=l.center().distance(e)>l.center().distance(t),f=c?e:t,h=c?t:e;return i?(o=Y.fromPolar(l.width+l.height,Si[i],f),o=l.pointNearestToPoint(o).move(o,-1)):o=l.pointNearestToPoint(f).move(f,1),a=ki(o,h,l),o.round().equals(a.round())?(a=Y.fromPolar(l.width+l.height,T(o.theta(f))+Math.PI/2,h),s=ki(o,a=l.pointNearestToPoint(a).move(h,1).round(),l),u.points=c?[a,s,o]:[o,s,a]):u.points=c?[a,o]:[o,a],u.direction=Ei(c?o:a,e),u}function Fi(t,e,n){var r,i=Ci(n,e),o=Ti(n,e),a=function(t,e){return t.sourceAnchor?t.sourceAnchor:Ci(t,e).center()}(n,e),s=function(t,e){return t.targetAnchor?t.targetAnchor:Ti(t,e).center()}(n,e);i=i.union(Ai(a)),o=o.union(Ai(s)),(t=tn(t).map(Y)).unshift(a),t.push(s);for(var u=[],l=0,c=t.length-1;l<c;l++){var f=null,h=t[l],d=t[l+1],p=!!Ei(h,d);if(0===l)l+1===c?i.intersect(o.clone().inflate(1))?f=Ri(h,d,i,o):p||(f=Oi(h,d,i,o)):i.containsPoint(d)?f=Ri(h,d,i,Ai(d).moveAndExpand(Pi(e))):p||(f=Li(h,d,i));else if(l+1===c){var g=p&&Ei(d,h)===r;o.containsPoint(h)||g?f=Ri(h,d,Ai(h).moveAndExpand(Pi(e)),o,r):p||(f=Mi(h,d,o,r))}else p||(f=Ni(h,d,r));f?(Array.prototype.push.apply(u,f.points),r=f.direction):r=Ei(h,d),l+1<c&&u.push(d)}return u}var Di={step:10,maximumLoops:2e3,precision:1,maxAllowedDirectionChange:90,perpendicular:!0,excludeEnds:[],excludeTypes:["basic.Text"],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost:function(){return this.step},directions:function(){var t=this.step,e=this.cost();return[{offsetX:t,offsetY:0,cost:e},{offsetX:-t,offsetY:0,cost:e},{offsetX:0,offsetY:t,cost:e},{offsetX:0,offsetY:-t,cost:e}]},penalties:function(){return{0:0,45:this.step/2,90:this.step/2}},paddingBox:function(){var t=this.step;return{x:-t,y:-t,width:2*t,height:2*t}},isPointObstacle:null,fallbackRouter:function(t,e,n){if(!Je(Fi))throw new Error("Manhattan requires the orthogonal router as default fallback.");return Fi(t,$e({},Di,e),n)},fallbackRoute:function(t,e,n){return null},draggingRoute:null};function ji(t){this.map={},this.options=t,this.mapGridSize=100}function Ii(){this.items=[],this.hash={},this.values={},this.OPEN=1,this.CLOSE=2}function Bi(t,e){return e&&e.paddingBox?t.sourceBBox.clone().moveAndExpand(e.paddingBox):t.sourceBBox.clone()}function zi(t,e){return e&&e.paddingBox?t.targetBBox.clone().moveAndExpand(e.paddingBox):t.targetBBox.clone()}function Vi(t,e){return t.sourceAnchor?t.sourceAnchor:Bi(t,e).center()}function $i(t,e,n,r,i){var o=360/n,a=t.theta(function(t,e,n,r){var i=r.step,o=e.x-t.x,a=e.y-t.y,s=o/n.x*i,u=a/n.y*i;return new Y(t.x+s,t.y+u)}(t,e,r,i)),s=A(a+o/2);return o*Math.floor(s/o)}function Ui(t,e){var n=Math.abs(t-e);return n>180?360-n:n}function qi(t,e){if(!t)return e;var n=Math.abs(t),r=Math.round(n/e);return r?e+(n-r*e)/r:n}function Hi(t,e){return t.round(e)}function Gi(t,e,n){return Hi(function(t,e){var n=e.source,r=P(t.x-n.x,e.x)+n.x,i=P(t.y-n.y,e.y)+n.y;return new Y(r,i)}(t.clone(),e),n)}function Wi(t){return t.clone().toString()}function Yi(t){return new Y(0===t.x?0:Math.abs(t.x)/t.x,0===t.y?0:Math.abs(t.y)/t.y)}function Xi(t,e,n,r,i,o,a){for(var s,u=[],l=Yi(i.difference(n)),c=Wi(n),f=t[c];f;){var h=Yi((s=e[c]).difference(f));h.equals(l)||(u.unshift(s),l=h),f=t[c=Wi(f)]}var d=e[c];return Yi(d.difference(r)).equals(l)||u.unshift(d),u}function Qi(t,e){for(var n=1/0,r=0,i=e.length;r<i;r++){var o=t.manhattanDistance(e[r]);o<n&&(n=o)}return n}function Ki(t,e,n,r,i){var o=i.precision,a=i.directionMap,s=t.difference(e.center()),u=gn(a)?Object.keys(a):[],l=tn(n),c=u.reduce((function(n,i){if(l.includes(i)){for(var u,c=a[i],f=new Y(t.x+c.x*(Math.abs(s.x)+e.width),t.y+c.y*(Math.abs(s.y)+e.height)),h=new ht(t,f).intersect(e)||[],d=h.length,p=null,g=0;g<d;g++){var v=h[g],m=t.squaredDistance(v);(void 0===u||m>u)&&(u=m,p=v)}if(p){var y=Gi(p,r,o);e.containsPoint(y)&&(y=Gi(y.offset(c.x*r.x,c.y*r.y),r,o)),n.push(y)}}return n}),[]);return e.containsPoint(t)||c.push(Gi(t,r,o)),c}function Ji(t,e,n,r){var i,o,a=r.precision;i=Hi(t instanceof ut?Vi(this,r).clone():t.clone(),a),o=Hi(e instanceof ut?function(t,e){return t.targetAnchor?t.targetAnchor:zi(t,e).center()}(this,r).clone():e.clone(),a);var s,u,l,c,f,h,d,p=(s=r.step,l=o,{source:(u=i).clone(),x:qi(l.x-u.x,s),y:qi(l.y-u.y,s)});if(h=t instanceof ut?Ki(c=i,t,r.startDirections,p,r):[c=i],e instanceof ut?(f=o,d=Ki(o,e,r.endDirections,p,r)):d=[f=o],h=h.filter((function(t){return!n(t)})),d=d.filter((function(t){return!n(t)})),h.length>0&&d.length>0){for(var g=new Ii,v={},m={},y={},b=0,w=h.length;b<w;b++){var x=h[b],S=Wi(x);g.add(S,Qi(x,d)),v[S]=x,y[S]=0}var k,_,E=r.previousDirectionAngle,A=void 0===E,P=r.directions;!function(t,e,n){var r=n.step;tn(n.directions).forEach((function(t){t.gridOffsetX=t.offsetX/r*e.x,t.gridOffsetY=t.offsetY/r*e.y}))}(0,p,r);for(var C=P.length,T=tn(d).reduce((function(t,e){var n=Wi(e);return t.push(n),t}),[]),N=r.maximumLoops;!g.isEmpty()&&N>0;){var L,M=g.pop(),O=v[M],R=m[M],F=y[M],D=void 0===R,j=O.equals(c);L=D?A?j?null:$i(c,O,C,p,r):E:$i(R,O,C,p,r);var I=h.length===d.length;if(I)for(var B=0;B<h.length;B++)if(!h[B].equals(d[B])){I=!1;break}if((!D||!I)&&T.indexOf(M)>=0)return r.previousDirectionAngle=L,Xi(m,v,O,c,f);for(b=0;b<C;b++){var z=(k=P[b]).angle;if(_=Ui(L,z),A&&j||!(_>r.maxAllowedDirectionChange)){var V=Gi(O.clone().offset(k.gridOffsetX,k.gridOffsetY),p,a),$=Wi(V);if(!g.isClose($)&&!n(V)){if(T.indexOf($)>=0&&!V.equals(f)&&Ui(z,$i(V,f,C,p,r))>r.maxAllowedDirectionChange)continue;var U=F+k.cost+(j?0:r.penalties[_]);(!g.isOpen($)||U<y[$])&&(v[$]=V,m[$]=O,y[$]=U,g.add($,U+Qi(V,d)))}}}N--}}return r.fallbackRoute.call(this,c,f,r)}ji.prototype.build=function(t,e){var n=this.options,r=tn(n.excludeEnds).reduce((function(n,r){var i=e.get(r);if(i){var o=t.getCell(i.id);o&&n.push(o)}return n}),[]),i=[],o=t.getCell(e.get("source").id);o&&(i=an(i,o.getAncestors().map((function(t){return t.id}))));var a=t.getCell(e.get("target").id);a&&(i=an(i,a.getAncestors().map((function(t){return t.id}))));var s=this.mapGridSize;return t.getElements().reduce((function(t,e){var o=tn(n.excludeTypes).includes(e.get("type")),a=r.find((function(t){return t.id===e.id})),u=i.includes(e.id);if(!(o||a||u))for(var l=e.getBBox().moveAndExpand(n.paddingBox),c=l.origin().snapToGrid(s),f=l.corner().snapToGrid(s),h=c.x;h<=f.x;h+=s)for(var d=c.y;d<=f.y;d+=s){var p=h+"@"+d;t[p]=t[p]||[],t[p].push(l)}return t}),this.map),this},ji.prototype.isPointAccessible=function(t){var e=t.clone().snapToGrid(this.mapGridSize).toString();return tn(this.map[e]).every((function(e){return!e.containsPoint(t)}))},Ii.prototype.add=function(t,e){this.hash[t]?this.items.splice(this.items.indexOf(t),1):this.hash[t]=this.OPEN,this.values[t]=e;var n=Ge(this.items,t,function(t){return this.values[t]}.bind(this));this.items.splice(n,0,t)},Ii.prototype.remove=function(t){this.hash[t]=this.CLOSE},Ii.prototype.isOpen=function(t){return this.hash[t]===this.OPEN},Ii.prototype.isClose=function(t){return this.hash[t]===this.CLOSE},Ii.prototype.isEmpty=function(){return 0===this.items.length},Ii.prototype.pop=function(){var t=this.items.shift();return this.remove(t),t};var Zi=function(t,e,n){return function(t,e,n){!function(t){if(t.directions=un(t,"directions"),t.penalties=un(t,"penalties"),t.paddingBox=un(t,"paddingBox"),t.padding=un(t,"padding"),t.padding){var e=je(t.padding);t.paddingBox={x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}tn(t.directions).forEach((function(t){var e=new Y(0,0),n=new Y(t.offsetX,t.offsetY);t.angle=A(e.theta(n))}))}(e),n.options.perpendicular=!!e.perpendicular;var r,i=Bi(n,e),o=zi(n,e),a=Vi(n,e);if("function"==typeof e.isPointObstacle)r=e.isPointObstacle;else{var s=new ji(e);s.build(n.paper.model,n.model),r=function(t){return!s.isPointAccessible(t)}}for(var u,l,c=tn(t).map(Y),f=[],h=a,d=0,p=c.length;d<=p;d++){var g=null;if(l=u||i,!(u=c[d])&&(u=o,(!n.model.get("source").id||!n.model.get("target").id)&&Je(e.draggingRoute))){var v=l===i?a:l,m=u.origin();g=e.draggingRoute.call(n,v,m,e)}if(null===(g=g||Ji.call(n,l,u,r,e)))return e.fallbackRouter(t,e,n);var y=g[0];y&&y.equals(h)&&g.shift(),h=g[g.length-1]||h,Array.prototype.push.apply(f,g)}return f}(t,$e({},Di,e),n)},to={maxAllowedDirectionChange:45,diagonalCost:function(){var t=this.step;return Math.ceil(Math.sqrt(t*t<<1))},directions:function(){var t=this.step,e=this.cost(),n=this.diagonalCost();return[{offsetX:t,offsetY:0,cost:e},{offsetX:t,offsetY:t,cost:n},{offsetX:0,offsetY:t,cost:e},{offsetX:-t,offsetY:t,cost:n},{offsetX:-t,offsetY:0,cost:e},{offsetX:-t,offsetY:-t,cost:n},{offsetX:0,offsetY:-t,cost:e},{offsetX:t,offsetY:-t,cost:n}]},fallbackRoute:function(t,e,n){var r=t.theta(e),i=[],o={x:e.x,y:t.y},a={x:t.x,y:e.y};if(r%180>90){var s=o;o=a,a=s}var u=r%90<45?o:a,l=new ht(t,u),c=90*Math.ceil(r/90),f=Y.fromPolar(l.squaredLength(),T(c+135),u),h=new ht(e,f),d=l.intersection(h),p=d||e,g=d?p:t,v=360/n.directions.length,m=g.theta(e),y=A(m+v/2),b=v*Math.floor(y/v);return n.previousDirectionAngle=b,p&&i.push(p.round()),i.push(e),i}},eo=function(t,e,n){if(!Je(Zi))throw new Error("Metro requires the manhattan router.");return Zi(t,$e({},to,e),n)},no=["arc","gap","cubic"],ro=["smooth"],io=1/3,oo=2/3;function ao(t,e,n){var r=[].concat(t,n,e);return r.reduce((function(t,e,n){var i=r[n+1];return null!=i&&(t[n]=dt(e,i)),t}),[])}function so(t,e){return dt(t,e).squaredLength()}function uo(t,e,n,r){var i,o=new Et;return i=Et.createSegment("M",t[0].start),o.appendSegment(i),tn(t).forEach((function(a,s){if(a.isJump){var u,l,c,f;if("arc"===n){u=-90,l=a.start.difference(a.end);var h=Number(l.x<0||0===l.x&&l.y<0);h&&(u+=180);var d,p=a.midpoint(),g=new ht(p,a.end).rotate(p,u);c=(d=new ht(a.start,p)).pointAt(2/3).rotate(a.start,u),f=g.pointAt(1/3).rotate(g.end,-u),i=Et.createSegment("C",c,f,g.end),o.appendSegment(i),d=new ht(p,a.end),c=g.pointAt(1/3).rotate(g.end,u),f=d.pointAt(1/3).rotate(a.end,-u),i=Et.createSegment("C",c,f,a.end),o.appendSegment(i)}else if("gap"===n)i=Et.createSegment("M",a.end),o.appendSegment(i);else if("cubic"===n){u=a.start.theta(a.end);var v=.6*e,m=1.35*e;l=a.start.difference(a.end),(h=Number(l.x<0||0===l.x&&l.y<0))&&(m*=-1),c=Y(a.start.x+v,a.start.y+m).rotate(a.start,u),f=Y(a.end.x-v,a.end.y+m).rotate(a.end,u),i=Et.createSegment("C",c,f,a.end),o.appendSegment(i)}}else{var y=t[s+1];0==r||!y||y.isJump?(i=Et.createSegment("L",a.end),o.appendSegment(i)):function(t,e,n,r,i){var o,a=n.distance(r)/2,s=n.distance(i)/2,u=-Math.min(t,a),l=-Math.min(t,s),c=n.clone().move(r,u).round(),f=n.clone().move(i,l).round(),h=new Y(io*c.x+oo*n.x,oo*n.y+io*c.y),d=new Y(io*f.x+oo*n.x,oo*n.y+io*f.y);o=Et.createSegment("L",c),e.appendSegment(o),o=Et.createSegment("C",h,d,f),e.appendSegment(o)}(r,o,a.end,a.start,y.end)}})),o}var lo=function(t,e,n,r){!function(t){var e=t.paper,n=e._jumpOverUpdateList;if(null==n){n=e._jumpOverUpdateList=[];var r=e.model;r.on("batch:stop",(function(){this.hasActiveBatch()||function(t){for(var e=t._jumpOverUpdateList,n=0;n<e.length;n++){var r=e[n],i=r.getFlag(r.constructor.Flags.CONNECTOR);r.requestUpdate(i)}}(e)})),r.on("reset",(function(){n=e._jumpOverUpdateList=[]}))}n.indexOf(t)<0&&(n.push(t),t.listenToOnce(t.model,"change:connector remove",(function(){n.splice(n.indexOf(t),1)})))}(this);var i=r.raw,o=r.size||5,a=r.jump&&(""+r.jump).toLowerCase(),s=r.radius||0,u=r.ignoreConnectors||ro;-1===no.indexOf(a)&&(a=no[0]);var l=this.paper,c=l.model.getLinks();if(1===c.length)return uo(ao(t,e,n),o,a,s);var f=this.model,h=c.indexOf(f),d=l.options.defaultConnector||{},p=c.filter((function(t,e){var n=t.get("connector")||d;return!(tn(u).includes(n.name)||e>h&&"jumpover"===n.name)})),g=p.map((function(t){return l.findViewByModel(t)})),v=ao(t,e,n),m=g.map((function(t){return null==t?[]:t===this?v:ao(t.sourcePoint,t.targetPoint,t.route)}),this),y=uo(v.reduce((function(t,e){var n=p.reduce((function(t,n,r){if(n!==f){var i=function(t,e){return tn(e).reduce((function(e,n){var r=t.intersection(n);return r&&e.push(r),e}),[])}(e,m[r]);t.push.apply(t,i)}return t}),[]).sort((function(t,n){return so(e.start,t)-so(e.start,n)}));return n.length>0?t.push.apply(t,function(t,e,n){return e.reduce((function(r,i,o){if(!0===i.skip)return r;var a=r.pop()||t,s=X(i).move(a.start,-n),u=X(i).move(a.start,+n),l=e[o+1];if(null!=l){var c=u.distance(l);c<=n&&(u=l.move(a.start,c),l.skip=!0)}else if(s.distance(a.end)<2*n+1)return r.push(a),r;if(u.distance(a.start)<2*n+1)return r.push(a),r;var f=dt(s,u);return f.isJump=!0,r.push(dt(a.start,s),f,dt(u,a.end)),r}),[])}(e,n,o)):t.push(e),t}),[]),o,a,s);return i?y:y.serialize()},co=function(t,e,n,r){var i=r&&r.raw,o=[t].concat(n).concat([e]),a=new mt(o),s=new Et(a);return i?s:s.serialize()},fo=function(t,e,n,r){r||(r={});var i,o=r.radius||10,a=r.raw,s=new Et;i=Et.createSegment("M",t),s.appendSegment(i);for(var u,l,c,f,h,d,p,g,v,m,y,b=1/3,w=2/3,x=0,S=n.length;x<S;x++)u=new Y(n[x]),l=n[x-1]||t,c=n[x+1]||e,f=h||u.distance(l)/2,h=u.distance(c)/2,d=-Math.min(o,f),p=-Math.min(o,h),g=u.clone().move(l,d).round(),v=u.clone().move(c,p).round(),m=new Y(b*g.x+w*u.x,w*u.y+b*g.y),y=new Y(b*v.x+w*u.x,w*u.y+b*v.y),i=Et.createSegment("L",g),s.appendSegment(i),i=Et.createSegment("C",m,y,v),s.appendSegment(i);return i=Et.createSegment("L",e),s.appendSegment(i),a?s:s.serialize()},ho=function(t,e,n,r){var i,o=r&&r.raw;if(n&&0!==n.length){var a=[t].concat(n).concat([e]),s=kt.throughPoints(a);i=new Et(s)}else{var u;if(i=new Et,u=Et.createSegment("M",t),i.appendSegment(u),Math.abs(t.x-e.x)>=Math.abs(t.y-e.y)){var l=(t.x+e.x)/2;u=Et.createSegment("C",l,t.y,l,e.y,e.x,e.y),i.appendSegment(u)}else{var c=(t.y+e.y)/2;u=Et.createSegment("C",t.x,c,e.x,c,e.x,e.y),i.appendSegment(u)}}return o?i:i.serialize()},po={AUTO:"auto",HORIZONTAL:"horizontal",VERTICAL:"vertical",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},go={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",AUTO:"auto",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},vo=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0,o=Boolean(r.raw),a=r.direction,s=void 0===a?po.AUTO:a,l=r.precision,c=void 0===l?3:l,f={coeff:r.distanceCoefficient||.6,angleTangentCoefficient:r.angleTangentCoefficient||80,tau:r.tension||.5,sourceTangent:r.sourceTangent?new Y(r.sourceTangent):null,targetTangent:r.targetTangent?new Y(r.targetTangent):null};"string"==typeof r.sourceDirection?f.sourceDirection=r.sourceDirection:"number"==typeof r.sourceDirection?f.sourceDirection=new Y(1,0).rotate(null,r.sourceDirection):f.sourceDirection=r.sourceDirection?new Y(r.sourceDirection).normalize():null,"string"==typeof r.targetDirection?f.targetDirection=r.targetDirection:"number"==typeof r.targetDirection?f.targetDirection=new Y(1,0).rotate(null,r.targetDirection):f.targetDirection=r.targetDirection?new Y(r.targetDirection).normalize():null;var h,d,p=[t].concat(u(n.map((function(t){return new Y(t)}))),[e]);if(f.sourceTangent)h=f.sourceTangent;else{var g=function(t,e,n,r){if(r.sourceDirection)switch(r.sourceDirection){case go.UP:return new Y(0,-1);case go.DOWN:return new Y(0,1);case go.LEFT:return new Y(-1,0);case go.RIGHT:return new Y(1,0);case go.AUTO:return mo(t,e);case go.CLOSEST_POINT:return bo(0,e);case go.OUTWARDS:return xo(t,e);default:return r.sourceDirection}switch(n){case po.HORIZONTAL:return function(t,e,n){var r=t.sourceBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[0]):r.x>e[1].x?"right":"left"){case"left":return new Y(-1,0);case"right":default:return new Y(1,0)}}(t,e);case po.VERTICAL:return function(t,e,n){var r=t.sourceBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[0]):r.y>e[1].y?"bottom":"top"){case"top":return new Y(0,-1);case"bottom":default:return new Y(0,1)}}(t,e);case po.CLOSEST_POINT:return bo(0,e);case po.OUTWARDS:return xo(t,e);case po.AUTO:default:return mo(t,e)}}(i,p,s,f),v=p[0].distance(p[1])*f.coeff,m=_o(g,p[1].difference(p[0]).normalize());if(m>Math.PI/4){var y=v+(m-Math.PI/4)*f.angleTangentCoefficient;h=g.clone().scale(y,y)}else h=g.clone().scale(v,v)}if(f.targetTangent)d=f.targetTangent;else{var b=function(t,e,n,r){if(r.targetDirection)switch(r.targetDirection){case go.UP:return new Y(0,-1);case go.DOWN:return new Y(0,1);case go.LEFT:return new Y(-1,0);case go.RIGHT:return new Y(0,1);case go.AUTO:return yo(t,e);case go.CLOSEST_POINT:return wo(0,e);case go.OUTWARDS:return So(t,e);default:return r.targetDirection}switch(n){case po.HORIZONTAL:return function(t,e,n){var r=t.targetBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[e.length-1]):r.x>e[e.length-2].x?"left":"right"){case"left":return new Y(-1,0);case"right":default:return new Y(1,0)}}(t,e);case po.VERTICAL:return function(t,e,n){var r=t.targetBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[e.length-1]):r.y>e[e.length-2].y?"top":"bottom"){case"top":return new Y(0,-1);case"bottom":default:return new Y(0,1)}}(t,e);case po.CLOSEST_POINT:return wo(0,e);case po.OUTWARDS:return So(t,e);case po.AUTO:default:return yo(t,e)}}(i,p,s,f),w=p.length-1,x=p[w-1].distance(p[w])*f.coeff,S=_o(b,p[w-1].difference(p[w]).normalize());if(S>Math.PI/4){var k=x+(S-Math.PI/4)*f.angleTangentCoefficient;d=b.clone().scale(k,k)}else d=b.clone().scale(x,x)}var _=function(t,e,n,r){for(var i=r.tau,o=r.coeff,a=[],s=[],u=[],l=t.length-1,c=0;c<l;c++)a[c]=t[c].distance(t[c+1]);s[0]=e,s[l]=n;for(var f=1;f<l;f++){var h=void 0,d=void 0;h=1===f?t[f-1].clone().offset(s[f-1].x,s[f-1].y):t[f-1].clone(),d=f===l-1?t[f+1].clone().offset(s[f+1].x,s[f+1].y):t[f+1].clone();var p,g=h.difference(t[f]).normalize(),v=d.difference(t[f]).normalize(),m=_o(g,v),y=void 0,b=(Math.PI-m)/2,w=Eo(g,v);p=Eo(t[f].difference(t[f+1]),t[f].difference(t[f-1])),w<0&&(b=-b),m<Math.PI/2&&(b<0&&p<0||b>0&&p>0)&&(b-=Math.PI),ko(y=v.clone(),b);var x=y.clone(),S=y.clone(),k=a[f-1]*o,_=a[f]*o;x.scale(k,k),S.scale(_,_),s[f]=[x,S]}for(var E=0;E<l;E++){var A,P;A=0===E?t[E+1].difference(s[E].x/i,s[E].y/i):t[E+1].difference(s[E][1].x/i,s[E][1].y/i),P=E===l-1?t[E].clone().offset(s[E+1].x/i,s[E+1].y/i):t[E].difference(s[E+1][0].x/i,s[E+1][0].y/i),u[E]=[A,t[E],t[E+1],P]}return u}(p,h,d,f).map((function(t){return function(t,e){var n=e.tau,r=new Y;r.x=t[1].x+(t[2].x-t[0].x)/(6*n),r.y=t[1].y+(t[2].y-t[0].y)/(6*n);var i=new Y;return i.x=t[2].x+(t[3].x-t[1].x)/(6*n),i.y=t[2].y+(t[3].y-t[1].y)/(6*n),new kt(t[1],r,i,t[2])}(t,f)})),E=new Et(_).round(c);return o?E:E.serialize()};function mo(t,e,n){var r=t.sourceBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[0]):r.sideNearestToPoint(e[1])){case"top":return new Y(0,-1);case"bottom":return new Y(0,1);case"right":return new Y(1,0);case"left":return new Y(-1,0)}}function yo(t,e,n){var r=t.targetBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[e.length-1]):r.sideNearestToPoint(e[e.length-2])){case"top":return new Y(0,-1);case"bottom":return new Y(0,1);case"right":return new Y(1,0);case"left":return new Y(-1,0)}}function bo(t,e,n){return e[1].difference(e[0]).normalize()}function wo(t,e,n){var r=e.length-1;return e[r-1].difference(e[r]).normalize()}function xo(t,e,n){var r=t.sourceBBox.center();return e[0].difference(r).normalize()}function So(t,e,n){var r=t.targetBBox.center();return e[e.length-1].difference(r).normalize()}function ko(t,e){var n=Math.cos(e),r=Math.sin(e),i=n*t.x-r*t.y,o=r*t.x+n*t.y;t.x=i,t.y=o}function _o(t,e){var n=t.dot(e)/(t.magnitude()*e.magnitude());return n<-1&&(n=-1),n>1&&(n=1),Math.acos(n)}function Eo(t,e){return t.x*e.y-t.y*e.x}vo.Directions=po,vo.TangentDirections=go;var Ao={RENDER:"RENDER",UPDATE:"UPDATE",TOOLS:"TOOLS",LEGACY_TOOLS:"LEGACY_TOOLS",LABELS:"LABELS",VERTICES:"VERTICES",SOURCE:"SOURCE",TARGET:"TARGET",CONNECTOR:"CONNECTOR"},Po=vi.extend({className:function(){var t=vi.prototype.className.apply(this).split(" ");return t.push("link"),t.join(" ")},options:{shortLinkLength:105,doubleLinkTools:!1,longLinkLength:155,linkToolsOffset:40,doubleLinkToolsOffset:65,sampleInterval:50},_labelCache:null,_labelSelectors:null,_markerCache:null,_V:null,_dragData:null,metrics:null,decimalsRounding:2,initialize:function(){vi.prototype.initialize.apply(this,arguments),this._labelCache={},this._labelSelectors={},this._markerCache={},this._V={},this.cleanNodesCache()},presentationAttributes:{markup:[Ao.RENDER],attrs:[Ao.UPDATE],router:[Ao.UPDATE],connector:[Ao.CONNECTOR],smooth:[Ao.UPDATE],manhattan:[Ao.UPDATE],toolMarkup:[Ao.LEGACY_TOOLS],labels:[Ao.LABELS],labelMarkup:[Ao.LABELS],vertices:[Ao.VERTICES,Ao.UPDATE],vertexMarkup:[Ao.VERTICES],source:[Ao.SOURCE,Ao.UPDATE],target:[Ao.TARGET,Ao.UPDATE]},initFlag:[Ao.RENDER,Ao.SOURCE,Ao.TARGET,Ao.TOOLS],UPDATE_PRIORITY:1,confirmUpdate:function(t,e){if(e||(e={}),this.hasFlag(t,Ao.SOURCE)){if(!this.updateEndProperties("source"))return t;t=this.removeFlag(t,Ao.SOURCE)}if(this.hasFlag(t,Ao.TARGET)){if(!this.updateEndProperties("target"))return t;t=this.removeFlag(t,Ao.TARGET)}var n=this.paper,r=this.sourceView,i=this.targetView;if(n&&(r&&!n.isViewMounted(r)||i&&!n.isViewMounted(i)))return t;if(this.hasFlag(t,Ao.RENDER))return this.render(),this.updateHighlighters(!0),this.updateTools(e),this.removeFlag(t,[Ao.RENDER,Ao.UPDATE,Ao.VERTICES,Ao.LABELS,Ao.TOOLS,Ao.LEGACY_TOOLS,Ao.CONNECTOR]);var o=!1;this.hasFlag(t,Ao.VERTICES)&&(this.renderVertexMarkers(),t=this.removeFlag(t,Ao.VERTICES));var a=this.model,s=a.attributes,u=this.hasFlag(t,Ao.LABELS),l=this.hasFlag(t,Ao.LEGACY_TOOLS);u&&(this.onLabelsChange(a,s.labels,e),t=this.removeFlag(t,Ao.LABELS),o=!0),l&&(this.renderTools(),t=this.removeFlag(t,Ao.LEGACY_TOOLS));var c=this.hasFlag(t,Ao.UPDATE),f=this.hasFlag(t,Ao.CONNECTOR);return(c||f)&&(c?e.translateBy&&a.isRelationshipEmbeddedIn(e.translateBy)?this.translate(e.tx,e.ty):this.update():(this.updatePath(),this.updateDOM()),this.updateTools(e),t=this.removeFlag(t,[Ao.UPDATE,Ao.TOOLS,Ao.CONNECTOR]),u=!1,l=!1,o=!0),u&&this.updateLabelPositions(),l&&this.updateToolsPosition(),o&&this.updateHighlighters(),this.hasFlag(t,Ao.TOOLS)&&(this.updateTools(e),t=this.removeFlag(t,Ao.TOOLS)),t},requestConnectionUpdate:function(t){this.requestUpdate(this.getFlag(Ao.UPDATE),t)},isLabelsRenderRequired:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model.previous("labels");if(!e)return!0;if("propertyPathArray"in t&&"propertyValue"in t){var n=t.propertyPathArray||[],r=n.length;if(r>1&&e[n[1]]){if(2===r)return"markup"in Object(t.propertyValue);if("markup"!==n[2])return!1}}return!0},onLabelsChange:function(t,e,n){this.isLabelsRenderRequired(n)?this.renderLabels():this.updateLabels()},render:function(){return this.vel.empty(),this.unmountLabels(),this._V={},this.renderMarkup(),this.renderLabels(),this.update(),this},renderMarkup:function(){var t=this.model,e=t.get("markup")||t.markup;if(!e)throw new Error("dia.LinkView: markup required");if(Array.isArray(e))return this.renderJSONMarkup(e);if("string"==typeof e)return this.renderStringMarkup(e);throw new Error("dia.LinkView: invalid markup")},renderJSONMarkup:function(t){var e=this.parseDOMJSON(t,this.el);this.selectors=e.selectors,this.vel.append(e.fragment)},renderStringMarkup:function(t){var e=ye(t);Array.isArray(e)||(e=[e]);for(var n=this._V,r=0,i=e.length;r<i;r++){var o=e[r],a=o.attr("class");a&&(a=ke(a),n[we.camelCase(a)]=o)}this.renderTools(),this.renderVertexMarkers(),this.renderArrowheadMarkers(),this.vel.append(e)},_getLabelMarkup:function(t){if(t){if(Array.isArray(t))return this.parseDOMJSON(t,null);if("string"==typeof t)return this._getLabelStringMarkup(t);throw new Error("dia.linkView: invalid label markup")}},_getLabelStringMarkup:function(t){var e=ye(t),n=document.createDocumentFragment();if(Array.isArray(e))for(var r=0,i=e.length;r<i;r++){var o=e[r].node;n.appendChild(o)}else n.appendChild(e.node);return{fragment:n,selectors:{}}},_normalizeLabelMarkup:function(t){if(t){var e,n=t.fragment;if(!(t.fragment instanceof DocumentFragment&&t.fragment.hasChildNodes()))throw new Error("dia.LinkView: invalid label markup.");var r=n.childNodes;return(e=r.length>1||"G"!==r[0].nodeName.toUpperCase()?ye("g").append(n):ye(r[0])).addClass("label"),{node:e.node,selectors:t.selectors}}},renderLabels:function(){var t=this._V,e=t.labels,n=this._labelCache={},r=this._labelSelectors={},i=this.model,o=i.attributes.labels||[],a=o.length;if(0===a)return e&&e.remove(),this;e?e.empty():(e=t.labels=ye("g").addClass("labels"),this.options.labelsLayer&&(e.addClass(Se(un(this,"className"))),e.attr("model-id",i.id)));for(var s=0;s<a;s++){var u,l,c=o[s],f=this._normalizeLabelMarkup(this._getLabelMarkup(c.markup));if(f)u=f.node,l=f.selectors;else{var h=i._builtins.defaultLabel,d=this._normalizeLabelMarkup(this._getLabelMarkup(h.markup)),p=i._getDefaultLabel(),g=this._normalizeLabelMarkup(this._getLabelMarkup(p.markup))||d;u=g.node,l=g.selectors}u.setAttribute("label-idx",s),e.append(u),n[s]=u;var v=this.selector;if(l[v])throw new Error("dia.LinkView: ambiguous label root selector.");l[v]=u,r[s]=l}return e.parent()||this.mountLabels(),this.updateLabels(),this},mountLabels:function(){var t=this.el,e=this.paper,n=this.model,r=this._V,i=this.options,o=r.labels;if(o&&n.hasLabels()){var a=o.node;i.labelsLayer?e.getLayerView(i.labelsLayer).insertSortedNode(a,n.get("z")):a.parentNode!==t&&t.appendChild(a)}},unmountLabels:function(){var t=this.options,e=this._V;if(e){var n=e.labels;n&&t.labelsLayer&&n.remove()}},onMount:function(){this.mountLabels()},unmount:function(){vi.prototype.unmount.apply(this,arguments),this.unmountLabels()},findLabelNode:function(t,e){var n=this._labelCache[t];if(!n)return null;var r=this._labelSelectors[t],i=l(this.findBySelector(e,n,r),1)[0];return void 0===i?null:i},_mergeLabelAttrs:function(t,e,n,r){if(null===e)return null;if(void 0===e){if(null===n)return null;if(void 0===n){if(t)return;return r}return t?n:pn({},r,n)}return t?pn({},n,e):pn({},r,n,e)},updateLabels:function(){if(!this._V.labels)return this;for(var t=this.model,e=t.get("labels")||[],n=this.can("labelMove"),r=t._builtins.defaultLabel.attrs,i=t._getDefaultLabel(),o=i.markup,a=i.attrs,s=0,u=e.length;s<u;s++){var l=this._labelCache[s];l.setAttribute("cursor",n?"move":"default");var c=this._labelSelectors[s],f=e[s],h=f.markup,d=f.attrs,p=this._mergeLabelAttrs(h||o,d,a,r);this.updateDOMSubtreeAttributes(l,p,{rootBBox:new ut(f.size),selectors:c})}return this},renderTools:function(){if(!this._V.linkTools)return this;var t,e=we(this._V.linkTools.node).empty(),n=Ve(this.model.get("toolMarkup")||this.model.toolMarkup),r=ye(n());return e.append(r.node),this._toolCache=r,this.options.doubleLinkTools&&(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup?(n=Ve(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup),t=ye(n())):t=r.clone(),e.append(t.node),this._tool2Cache=t),this},renderVertexMarkers:function(){if(!this._V.markerVertices)return this;var t=we(this._V.markerVertices.node).empty(),e=Ve(this.model.get("vertexMarkup")||this.model.vertexMarkup);return this.model.vertices().forEach((function(n,r){t.append(ye(e($e({idx:r},n))).node)})),this},renderArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;var t=we(this._V.markerArrowheads.node);t.empty();var e=Ve(this.model.get("arrowheadMarkup")||this.model.arrowheadMarkup);return this._V.sourceArrowhead=ye(e({end:"source"})),this._V.targetArrowhead=ye(e({end:"target"})),t.append(this._V.sourceArrowhead.node,this._V.targetArrowhead.node),this},removeRedundantLinearVertices:function(t){var e=this.model,n=e.vertices(),r=[this.sourceAnchor].concat(u(n),[this.targetAnchor]),i=r.length,o=new mt(r);o.simplify({threshold:.001});var a=o.points.map((function(t){return t.toJSON()})),s=a.length;return i===s?0:(e.vertices(a.slice(1,s-1),t),i-s)},updateDefaultConnectionPath:function(){var t=this._V;t.connection&&t.connection.attr("d",this.getSerializedConnection()),t.connectionWrap&&t.connectionWrap.attr("d",this.getSerializedConnection()),t.markerSource&&t.markerTarget&&this._translateAndAutoOrientArrows(t.markerSource,t.markerTarget)},getEndView:function(t){switch(t){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error("dia.LinkView: type parameter required.")}},getEndAnchor:function(t){switch(t){case"source":return new Y(this.sourceAnchor);case"target":return new Y(this.targetAnchor);default:throw new Error("dia.LinkView: type parameter required.")}},getEndConnectionPoint:function(t){switch(t){case"source":return new Y(this.sourcePoint);case"target":return new Y(this.targetPoint);default:throw new Error("dia.LinkView: type parameter required.")}},getEndMagnet:function(t){switch(t){case"source":var e=this.sourceView;if(!e)break;return this.sourceMagnet||e.el;case"target":var n=this.targetView;if(!n)break;return this.targetMagnet||n.el;default:throw new Error("dia.LinkView: type parameter required.")}return null},update:function(){return this.updateRoute(),this.updatePath(),this.updateDOM(),this},translate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.route,r=this.path;if(n&&r){var i=new mt(n);i.translate(t,e),this.route=i.points,this._translateConnectionPoints(t,e),r.translate(t,e),this.updateDOM()}},updateDOM:function(){var t=this.el,e=this.model,n=this.selectors;this.cleanNodesCache(),this.updateDOMSubtreeAttributes(t,e.attr(),{selectors:n}),this.updateDefaultConnectionPath(),this.updateLabelPositions(),this.updateToolsPosition(),this.updateArrowheadMarkers(),this.options.perpendicular=null},updateRoute:function(){var t=this.model.vertices(),e=this.findAnchors(t),n=this.sourceAnchor=e.source,r=this.targetAnchor=e.target,i=this.findRoute(t);this.route=i;var o=this.findConnectionPoints(i,n,r);this.sourcePoint=o.source,this.targetPoint=o.target},updatePath:function(){var t=this.route,e=this.sourcePoint,n=this.targetPoint,r=this.findMarkerPoints(t,e,n),i=this.findPath(t,r.source||e,r.target||n);this.path=i},findMarkerPoints:function(t,e,n){var r,i,o=t[0],a=t[t.length-1],s=this._markerCache;return this._V.markerSource&&(s.sourceBBox=s.sourceBBox||this._V.markerSource.getBBox(),r=Y(e).move(o||n,s.sourceBBox.width*this._V.markerSource.scale().sx*-1).round()),this._V.markerTarget&&(s.targetBBox=s.targetBBox||this._V.markerTarget.getBBox(),i=Y(n).move(a||e,s.targetBBox.width*this._V.markerTarget.scale().sx*-1).round()),s.sourcePoint=r||e.clone(),s.targetPoint=i||n.clone(),{source:r,target:i}},findAnchorsOrdered:function(t,e,n,r){var i,o,a,s,u=this.model,l=u.get(t),c=u.get(n),f=this.getEndView(t),h=this.getEndView(n),d=this.getEndMagnet(t),p=this.getEndMagnet(n);f?(a=e?new Y(e):h?p:new Y(c),i=this.getAnchor(l.anchor,f,d,a,t)):i=new Y(l),h?(s=new Y(r||i),o=this.getAnchor(c.anchor,h,p,s,n)):o=new Y(c);var g={};return g[t]=i,g[n]=o,g},findAnchors:function(t){var e=this.model,n=t[0],r=t[t.length-1];return e.target().priority&&!e.source().priority?this.findAnchorsOrdered("target",r,"source",n):this.findAnchorsOrdered("source",n,"target",r)},findConnectionPoints:function(t,e,n){var r,i,o,a,s=t[0],u=t[t.length-1],l=this.model,c=l.get("source"),f=l.get("target"),h=this.sourceView,d=this.targetView,p=this.paper.options;if(h&&!h.isNodeConnection(this.sourceMagnet)){r=this.sourceMagnet||h.el;var g=c.connectionPoint||p.defaultConnectionPoint,v=new ht(s||n,e);o=this.getConnectionPoint(g,h,r,v,"source")}else o=e;if(d&&!d.isNodeConnection(this.targetMagnet)){i=this.targetMagnet||d.el;var m=f.connectionPoint||p.defaultConnectionPoint,y=new ht(u||e,n);a=this.getConnectionPoint(m,d,i,y,"target")}else a=n;return{source:o,target:a}},getAnchor:function(t,e,n,r,i){var o,a=e.isNodeConnection(n),s=this.paper.options;if(t||(t=a?s.defaultLinkAnchor:s.perpendicularLinks||this.options.perpendicular?{name:"perpendicular"}:s.defaultAnchor),!t)throw new Error("Anchor required.");if("function"==typeof t)o=t;else{var u=t.name;if("function"!=typeof(o=s[a?"linkAnchorNamespace":"anchorNamespace"][u]))throw new Error("Unknown anchor: "+u)}var l=o.call(this,e,n,r,t.args||{},i,this);return l?l.round(this.decimalsRounding):new Y},getConnectionPoint:function(t,e,n,r,i){var o,a,s=r.end,u=this.paper.options;if("function"==typeof u.linkConnectionPoint){var l=n===e.el?void 0:n;if(o=u.linkConnectionPoint(this,e,l,r.start,i))return o}if(!t)return s;if("function"==typeof t)a=t;else{var c=t.name;if("function"!=typeof(a=u.connectionPointNamespace[c]))throw new Error("Unknown connection point: "+c)}return(o=a.call(this,r,e,n,t.args||{},i,this))?o.round(this.decimalsRounding):s},_translateConnectionPoints:function(t,e){var n=this._markerCache;n.sourcePoint.offset(t,e),n.targetPoint.offset(t,e),this.sourcePoint.offset(t,e),this.targetPoint.offset(t,e),this.sourceAnchor.offset(t,e),this.targetAnchor.offset(t,e)},_normalizeLabelPosition:function(t){return"number"==typeof t?{distance:t,offset:null,angle:0,args:null}:t},updateLabelPositions:function(){if(!this._V.labels)return this;if(!this.path)return this;var t=this.model,e=t.get("labels")||[];if(!e.length)return this;for(var n=t._builtins.defaultLabel.position,r=t._getDefaultLabel(),i=this._normalizeLabelPosition(r.position),o=pn({},n,i),a=0,s=e.length;a<s;a++){var u=this._labelCache[a];if(u){var l=e[a],c=this._normalizeLabelPosition(l.position),f=pn({},o,c),h=this._getLabelTransformationMatrix(f);u.setAttribute("transform",ye.matrixToTransformString(h)),this._cleanLabelMatrices(a)}}return this},_cleanLabelMatrices:function(t){var e=this.metrics,n=this._labelSelectors[t];if(n)for(var r in n){var i=n[r].id;i&&i in e&&delete e[i].magnetMatrix}},updateToolsPosition:function(){if(!this._V.linkTools)return this;var t="",e=this.options.linkToolsOffset,n=this.getConnectionLength();if(!Number.isNaN(n)){n<this.options.shortLinkLength&&(t="scale(.5)",e/=2);var r=this.getPointAtLength(e);if(this._toolCache.attr("transform","translate("+r.x+", "+r.y+") "+t),this.options.doubleLinkTools&&n>=this.options.longLinkLength){var i=this.options.doubleLinkToolsOffset||e;r=this.getPointAtLength(n-i),this._tool2Cache.attr("transform","translate("+r.x+", "+r.y+") "+t),this._tool2Cache.attr("visibility","visible")}else this.options.doubleLinkTools&&this._tool2Cache.attr("visibility","hidden")}return this},updateArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;if("none"===we.css(this._V.markerArrowheads.node,"display"))return this;var t=this.getConnectionLength()<this.options.shortLinkLength?.5:1;return this._V.sourceArrowhead.scale(t),this._V.targetArrowhead.scale(t),this._translateAndAutoOrientArrows(this._V.sourceArrowhead,this._V.targetArrowhead),this},updateEndProperties:function(t){var e=this.model,n=this.paper,r="".concat(t,"View"),i=e.get(t),o=i&&i.id;if(!o)return this[r]=null,this.updateEndMagnet(t),!0;var a=n.getModelById(o);if(!a)throw new Error("LinkView: invalid "+t+" cell.");var s=a.findView(n);return!!s&&(this[r]=s,this.updateEndMagnet(t),!0)},updateEndMagnet:function(t){var e="".concat(t,"Magnet"),n=this.getEndView(t);if(n){var r=n.getMagnetFromLinkEnd(this.model.get(t));r===n.el&&(r=null),this[e]=r}else this[e]=null},_translateAndAutoOrientArrows:function(t,e){var n=tn(this.route);t&&t.translateAndAutoOrient(this.sourcePoint,n[0]||this.targetPoint,this.paper.cells),e&&e.translateAndAutoOrient(this.targetPoint,n[n.length-1]||this.sourcePoint,this.paper.cells)},_getLabelPositionAngle:function(t){return(this.model.label(t).position||{}).angle||0},_getLabelPositionArgs:function(t){return(this.model.label(t).position||{}).args},_getDefaultLabelPositionArgs:function(){return(this.model._getDefaultLabel().position||{}).args},_mergeLabelPositionArgs:function(t,e){return null===t?null:void 0===t?null===e?null:e:pn({},e,t)},addLabel:function(t,e,n,r){var i,o,a,s=0;"number"!=typeof t?(i=t.x,o=t.y,"number"==typeof e?(s=e,a=n):a=e):(i=t,o=e,"number"==typeof n?(s=n,a=r):a=n);var u=this._getDefaultLabelPositionArgs(),l=a,c=this._mergeLabelPositionArgs(l,u),f={position:this.getLabelPosition(i,o,s,c)};return this.model.insertLabel(-1,f,a),-1},addVertex:function(t,e,n){var r="number"!=typeof t,i=r?t.x:t,o=r?t.y:e,a=r?e:n,s={x:i,y:o},u=this.getVertexIndex(i,o);return this.model.insertVertex(u,s,a),u},sendToken:function(t,e,n){var r,i,o;gn(e)?(r=e.duration,i="reverse"===e.direction,o=e.connection):(r=e,i=!1,o=null);var a={dur:(r=r||1e3)+"ms",repeatCount:1,calcMode:"linear",fill:"freeze"};i&&(a.keyPoints="1;0",a.keyTimes="0;1");var s,u=ye(t);if("string"==typeof o)s=this.findBySelector(o,this.el,this.selectors)[0];else{var l=this._V;s=l.connection?l.connection.node:this.el.querySelector("path")}if(!(s instanceof SVGPathElement))throw new Error("dia.LinkView: token animation requires a valid connection path.");u.appendTo(this.paper.cells).animateAlongPath(a,s),setTimeout(function(t,e){return function(){t.remove(),"function"==typeof e&&e()}}(u,n),r)},findRoute:function(t){t||(t=[]);var e=this.paper.options.routerNamespace||a,n=this.model.router(),r=this.paper.options.defaultRouter;if(!n){if(!r)return t.map(Y);n=r}var i=Je(n)?n:e[n.name];if(!Je(i))throw new Error('dia.LinkView: unknown router: "'+n.name+'".');var o=n.args||{};return i.call(this,t,o,this)||t.map(Y)},findPath:function(t,e,n){var r=this.paper.options.connectorNamespace||c,i=this.model.connector(),o=this.paper.options.defaultConnector;i||(i=o||{});var a=Je(i)?i:r[i.name];if(!Je(a))throw new Error('dia.LinkView: unknown connector: "'+i.name+'".');var s=Ye(i.args||{});s.raw=!0;var u=a.call(this,e,n,t,s,this);return"string"==typeof u&&(u=new Et(ye.normalizePathData(u))),u},getConnection:function(){var t=this.path;return t?t.clone():null},getSerializedConnection:function(){var t=this.path;if(!t)return null;var e=this.metrics;if(e.hasOwnProperty("data"))return e.data;var n=t.serialize();return e.data=n,n},getConnectionSubdivisions:function(){var t=this.path;if(!t)return null;var e=this.metrics;if(e.hasOwnProperty("segmentSubdivisions"))return e.segmentSubdivisions;var n=t.getSegmentSubdivisions();return e.segmentSubdivisions=n,n},getConnectionLength:function(){var t=this.path;if(!t)return 0;var e=this.metrics;if(e.hasOwnProperty("length"))return e.length;var n=t.length({segmentSubdivisions:this.getConnectionSubdivisions()});return e.length=n,n},getPointAtLength:function(t){var e=this.path;return e?e.pointAtLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getPointAtRatio:function(t){var e=this.path;return e?(Re(t)&&(t=parseFloat(t)/100),e.pointAt(t,{segmentSubdivisions:this.getConnectionSubdivisions()})):null},getTangentAtLength:function(t){var e=this.path;return e?e.tangentAtLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getTangentAtRatio:function(t){var e=this.path;return e?e.tangentAt(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPoint:function(t){var e=this.path;return e?e.closestPoint(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointLength:function(t){var e=this.path;return e?e.closestPointLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointRatio:function(t){var e=this.path;return e?e.closestPointNormalizedLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getLabelPosition:function(t,e,n,r){var i,o={},a=0;"number"==typeof n?(a=n,i=r):i=n,i&&(o.args=i);var s,u,l=!(i&&i.absoluteDistance),c=i&&i.absoluteDistance&&i.reverseDistance,f=i&&i.absoluteOffset,h=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},p=new Y(t,e),g=h.closestPointT(p,d),v=h.lengthAtT(g,d);if(l&&(v=v/this.getConnectionLength()||0),c&&(v=-1*(this.getConnectionLength()-v)||1),o.distance=v,f||(s=h.tangentAtT(g)),s)u=s.pointOffset(p);else{var m=h.pointAtT(g),y=p.difference(m);u={x:y.x,y:y.y}}return o.offset=u,o.angle=a,o},_getLabelTransformationMatrix:function(t){var e,n=0,r={};if("number"==typeof t)e=t;else{if("number"!=typeof t.distance)throw new Error("dia.LinkView: invalid label position distance.");r=t.args||{},e=t.distance,n=t.angle||0}var i=e>0&&e<=1,o=0,a={x:0,y:0};if(t.offset){var s=t.offset;"number"==typeof s&&(o=s),s.x&&(a.x=s.x),s.y&&(a.y=s.y)}var u,l=0!==a.x||0!==a.y||0===o,c=r.keepGradient,f=r.ensureLegibility,h=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},p=i?e*this.getConnectionLength():e,g=h.tangentAtLength(p,d),v=n;if(g){if(l)(u=g.start).offset(a);else{var m=g.clone();m.rotate(g.start,-90),m.setLength(o),u=m.end}c&&(v=g.angle()+n,f&&(v=A((v+90)%180-90)))}else u=h.start,l&&u.offset(a);return ye.createSVGMatrix().translate(u.x,u.y).rotate(v)},getLabelCoordinates:function(t){var e=this._getLabelTransformationMatrix(t);return new Y(e.e,e.f)},getVertexIndex:function(t,e){for(var n=this.model.vertices(),r=this.getClosestPointLength(new Y(t,e)),i=0,o=n.length;i<o;i++){var a=n[i];if(r<this.getClosestPointLength(a))break}return i},notifyPointerdown:function(t,e,n){vi.prototype.pointerdown.call(this,t,e,n),this.notify("link:pointerdown",t,e,n)},notifyPointermove:function(t,e,n){vi.prototype.pointermove.call(this,t,e,n),this.notify("link:pointermove",t,e,n)},notifyPointerup:function(t,e,n){this.notify("link:pointerup",t,e,n),vi.prototype.pointerup.call(this,t,e,n)},pointerdblclick:function(t,e,n){vi.prototype.pointerdblclick.apply(this,arguments),this.notify("link:pointerdblclick",t,e,n)},pointerclick:function(t,e,n){vi.prototype.pointerclick.apply(this,arguments),this.notify("link:pointerclick",t,e,n)},contextmenu:function(t,e,n){vi.prototype.contextmenu.apply(this,arguments),this.notify("link:contextmenu",t,e,n)},pointerdown:function(t,e,n){switch(this.notifyPointerdown(t,e,n),t.target.getAttribute("class")){case"marker-vertex":return void this.dragVertexStart(t,e,n);case"marker-vertex-remove":case"marker-vertex-remove-area":return void this.dragVertexRemoveStart(t,e,n);case"marker-arrowhead":return void this.dragArrowheadStart(t,e,n);case"connection":case"connection-wrap":return void this.dragConnectionStart(t,e,n);case"marker-source":case"marker-target":return}this.dragStart(t,e,n)},pointermove:function(t,e,n){var r=this._dragData;switch(r&&this.eventData(t,r),this.eventData(t).action){case"vertex-move":this.dragVertex(t,e,n);break;case"label-move":this.dragLabel(t,e,n);break;case"arrowhead-move":this.dragArrowhead(t,e,n);break;case"move":this.drag(t,e,n)}r&&$e(r,this.eventData(t)),this.notifyPointermove(t,e,n)},pointerup:function(t,e,n){var r=this._dragData;switch(r&&(this.eventData(t,r),this._dragData=null),this.eventData(t).action){case"vertex-move":this.dragVertexEnd(t,e,n);break;case"label-move":this.dragLabelEnd(t,e,n);break;case"arrowhead-move":this.dragArrowheadEnd(t,e,n);break;case"move":this.dragEnd(t,e,n)}this.notifyPointerup(t,e,n),this.checkMouseleave(t)},mouseover:function(t){vi.prototype.mouseover.apply(this,arguments),this.notify("link:mouseover",t)},mouseout:function(t){vi.prototype.mouseout.apply(this,arguments),this.notify("link:mouseout",t)},mouseenter:function(t){vi.prototype.mouseenter.apply(this,arguments),this.notify("link:mouseenter",t)},mouseleave:function(t){vi.prototype.mouseleave.apply(this,arguments),this.notify("link:mouseleave",t)},mousewheel:function(t,e,n,r){vi.prototype.mousewheel.apply(this,arguments),this.notify("link:mousewheel",t,e,n,r)},onevent:function(t,e,n,r){var i=ye(t.target).findParentByClass("link-tool",this.el);if(i){if(t.stopPropagation(),this.can("useLinkTools")){if("remove"===e)return void this.model.remove({ui:!0});this.notify(e,t,n,r)}this.notifyPointerdown(t,n,r),this.paper.delegateDragEvents(this,t.data)}else vi.prototype.onevent.apply(this,arguments)},onlabel:function(t,e,n){this.notifyPointerdown(t,e,n),this.dragLabelStart(t,e,n),this.eventData(t).stopPropagation&&t.stopPropagation()},dragConnectionStart:function(t,e,n){if(this.can("vertexAdd")){var r=this.addVertex({x:e,y:n},{ui:!0});this.eventData(t,{action:"vertex-move",vertexIdx:r})}},dragLabelStart:function(t,e,n){if(this.can("labelMove")){var r=t.currentTarget,i=parseInt(r.getAttribute("label-idx"),10),o=this._getLabelPositionAngle(i),a=this._getLabelPositionArgs(i),s=this._getDefaultLabelPositionArgs(),u=this._mergeLabelPositionArgs(a,s);this.eventData(t,{action:"label-move",labelIdx:i,positionAngle:o,positionArgs:u,stopPropagation:!0})}else this.eventData(t,{stopPropagation:!0});this.paper.delegateDragEvents(this,t.data)},dragVertexStart:function(t,e,n){if(this.can("vertexMove")){var r=t.target,i=parseInt(r.getAttribute("idx"),10);this.eventData(t,{action:"vertex-move",vertexIdx:i})}},dragVertexRemoveStart:function(t,e,n){if(this.can("vertexRemove")){var r=t.target,i=parseInt(r.getAttribute("idx"),10);this.model.removeVertex(i)}},dragArrowheadStart:function(t,e,n){if(this.can("arrowheadMove")){var r=t.target.getAttribute("end"),i=this.startArrowheadMove(r,{ignoreBackwardsCompatibility:!0});this.eventData(t,i)}},dragStart:function(t,e,n){this.can("linkMove")&&this.eventData(t,{action:"move",dx:e,dy:n})},dragLabel:function(t,e,n){var r=this.eventData(t),i={position:this.getLabelPosition(e,n,r.positionAngle,r.positionArgs)};this.paper.options.snapLabels&&delete i.position.offset,this.model.label(r.labelIdx,i)},dragVertex:function(t,e,n){var r=this.eventData(t);this.model.vertex(r.vertexIdx,{x:e,y:n},{ui:!0})},dragArrowhead:function(t,e,n){this.paper.options.snapLinks?this._snapArrowhead(t,e,n):this._connectArrowhead(this.getEventTarget(t),e,n,this.eventData(t))},drag:function(t,e,n){var r=this.eventData(t);this.model.translate(e-r.dx,n-r.dy,{ui:!0}),this.eventData(t,{dx:e,dy:n})},dragLabelEnd:function(){},dragVertexEnd:function(){},dragArrowheadEnd:function(t,e,n){var r=this.eventData(t),i=this.paper;i.options.snapLinks?this._snapArrowheadEnd(r):this._connectArrowheadEnd(r,e,n),i.linkAllowed(this)?(this._finishEmbedding(r),this._notifyConnectEvent(r,t)):this._disallow(r),this._afterArrowheadMove(r)},dragEnd:function(){},_disallow:function(t){switch(t.whenNotAllowed){case"remove":this.model.remove({ui:!0});break;case"revert":default:this.model.set(t.arrowhead,t.initialEnd,{ui:!0})}},_finishEmbedding:function(t){this.paper.options.embeddingMode&&this.model.reparent()&&(t.z=null)},_notifyConnectEvent:function(t,e){var n=t.arrowhead,r=t.initialEnd,i=this.model.prop(n);if(i&&!qr.endsEqual(r,i)){var o=this.paper;r.id&&this.notify("link:disconnect",e,o.findViewByModel(r.id),t.initialMagnet,n),i.id&&this.notify("link:connect",e,o.findViewByModel(i.id),t.magnetUnderPointer,n)}},_snapArrowhead:function(t,e,n){var r=this.paper,i=r.options,o=i.snapLinks,a=i.connectionStrategy,s=this.eventData(t),u=o.radius||50,l=r.findViewsInArea({x:e-u,y:n-u,width:2*u,height:2*u}),c=s.closestView||null,f=s.closestMagnet||null,h=s.magnetProxy||null;s.closestView=s.closestMagnet=s.magnetProxy=null;var d,p=Number.MAX_VALUE,g=new Y(e,n);l.forEach((function(t){var e=[];"false"!==t.el.getAttribute("magnet")&&e.push({bbox:t.model.getBBox(),magnet:t.el}),t.$("[magnet]").toArray().forEach((function(n){e.push({bbox:t.getNodeBBox(n),magnet:n})})),e.forEach((function(e){var n=e.magnet,i=e.bbox.center().squaredDistance(g);i<p&&(f===n||r.options.validateConnection.apply(r,s.validateConnectionArgs(t,t.el===n?null:n)))&&(p=i,s.closestView=t,s.closestMagnet=n)}))}),this);var v=null,m=s.closestView,y=s.closestMagnet;y&&(v=s.magnetProxy=m.findProxyNode(y,"highlighter"));var b=s.arrowhead,w=f!==y;if(c&&w&&c.unhighlight(h,{connecting:!0,snapping:!0}),m){var x=s.prevEnd,S=s.prevX,k=s.prevY;if(s.prevX=e,s.prevY=n,!w&&("function"!=typeof a||S===e&&k===n))return;if(d=m.getLinkEnd(y,e,n,this.model,b),!w&&Ke(x,d))return;s.prevEnd=d,w&&m.highlight(v,{connecting:!0,snapping:!0})}else d={x:e,y:n};this.model.set(b,d||{x:e,y:n},{ui:!0}),c&&this.notify("link:snap:disconnect",t,c,f,b),m&&this.notify("link:snap:connect",t,m,y,b)},_snapArrowheadEnd:function(t){var e=t.closestView,n=t.closestMagnet;e&&n&&(e.unhighlight(t.magnetProxy,{connecting:!0,snapping:!0}),t.magnetUnderPointer=e.findMagnet(n)),t.closestView=t.closestMagnet=null},_connectArrowhead:function(t,e,n,r){var i=this.paper,o=this.model;if(r.eventTarget!==t){r.magnetProxy&&r.viewUnderPointer.unhighlight(r.magnetProxy,{connecting:!0});var a=r.viewUnderPointer=i.findView(t);if(a){var s=r.magnetUnderPointer=a.findMagnet(t),u=r.magnetProxy=a.findProxyNode(s,"highlighter");s&&this.paper.options.validateConnection.apply(i,r.validateConnectionArgs(a,s))?u&&a.highlight(u,{connecting:!0}):(r.magnetUnderPointer=null,r.magnetProxy=null)}else r.magnetUnderPointer=null,r.magnetProxy=null}r.eventTarget=t,o.set(r.arrowhead,{x:e,y:n},{ui:!0})},_connectArrowheadEnd:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=this.model,i=t.viewUnderPointer,o=t.magnetUnderPointer,a=t.magnetProxy,s=t.arrowhead;if(o&&a&&i){i.unhighlight(a,{connecting:!0});var u=i.getLinkEnd(o,e,n,r,s);r.set(s,u,{ui:!0})}},_beforeArrowheadMove:function(t){t.z=this.model.get("z"),this.model.toFront();var e=this.el.style;t.pointerEvents=e.pointerEvents,e.pointerEvents="none",this.paper.options.markAvailable&&this._markAvailableMagnets(t)},_afterArrowheadMove:function(t){null!==t.z&&(this.model.set("z",t.z,{ui:!0}),t.z=null),this.el.style.pointerEvents=t.pointerEvents,this.paper.options.markAvailable&&this._unmarkAvailableMagnets(t)},_createValidateConnectionArgs:function(t){var e,n=[];n[4]=t,n[5]=this;var r=0,i=0;"source"===t?(r=2,e="target"):(i=2,e="source");var o=this.model.get(e);if(o.id){var a=n[r]=this.paper.findViewByModel(o.id),s=a.getMagnetFromLinkEnd(o);s===a.el&&(s=void 0),n[r+1]=s}return function(t,e){return n[i]=t,n[i+1]=t.el===e?void 0:e,n}},_markAvailableMagnets:function(t){function e(t,e){var n=t.paper;return n.options.validateConnection.apply(n,this.validateConnectionArgs(t,e))}var n=this.paper,r=n.model.getCells();t.marked={};for(var i=0,o=r.length;i<o;i++){var a=r[i].findView(n);if(a){var s=Array.prototype.slice.call(a.el.querySelectorAll("[magnet]"));"false"!==a.el.getAttribute("magnet")&&s.push(a.el);var u=s.filter(e.bind(t,a));if(u.length>0){for(var l=0,c=u.length;l<c;l++)a.highlight(u[l],{magnetAvailability:!0});a.highlight(null,{elementAvailability:!0}),t.marked[a.model.id]=u}}}},_unmarkAvailableMagnets:function(t){for(var e,n,r=Object.keys(t.marked),i=0,o=r.length;i<o;i++){e=r[i],n=t.marked[e];var a=this.paper.findViewByModel(e);if(a){for(var s=0,u=n.length;s<u;s++)a.unhighlight(n[s],{magnetAvailability:!0});a.unhighlight(null,{elementAvailability:!0})}}t.marked=null},startArrowheadMove:function(t,e){e||(e={});var n={action:"arrowhead-move",arrowhead:t,whenNotAllowed:e.whenNotAllowed||"revert",initialMagnet:this[t+"Magnet"]||(this[t+"View"]?this[t+"View"].el:null),initialEnd:Ye(this.model.get(t)),validateConnectionArgs:this._createValidateConnectionArgs(t)};return this._beforeArrowheadMove(n),!0!==e.ignoreBackwardsCompatibility&&(this._dragData=n),n},onRemove:function(){vi.prototype.onRemove.apply(this,arguments),this.unmountLabels()}},{Flags:Ao});Object.defineProperty(Po.prototype,"sourceBBox",{enumerable:!0,get:function(){var t=this.sourceView;if(!t){var e=this.model.source();return new ut(e.x,e.y)}var n=this.sourceMagnet;return t.isNodeConnection(n)?new ut(this.sourceAnchor):t.getNodeBBox(n||t.el)}}),Object.defineProperty(Po.prototype,"targetBBox",{enumerable:!0,get:function(){var t=this.targetView;if(!t){var e=this.model.target();return new ut(e.x,e.y)}var n=this.targetMagnet;return t.isNodeConnection(n)?new ut(this.targetAnchor):t.getNodeBBox(n||t.el)}});var Co={CELLS:"cells",BACK:"back",FRONT:"front",TOOLS:"tools",LABELS:"labels"},To=An.extend({tagName:"g",svgElement:!0,pivotNodes:null,defaultTheme:null,options:{name:""},className:function(){return Se("".concat(this.options.name,"-layer"))},init:function(){this.pivotNodes={}},insertSortedNode:function(t,e){this.el.insertBefore(t,this.insertPivot(e))},insertNode:function(t){var e=this.el;t.parentNode!==e&&e.appendChild(t)},insertPivot:function(t){var e=this.el,n=this.pivotNodes;(t=+t)||(t=0);var r=n[t];if(r)return r;r=n[t]=document.createComment("z-index:"+(t+1));var i=-1/0;for(var o in n)(o=+o)<t&&o>i&&(i=o);if(i!==-1/0){var a=n[i];e.insertBefore(r,a.nextSibling)}else e.insertBefore(r,e.firstChild);return r},removePivots:function(){var t=this.el,e=this.pivotNodes;for(var n in e)t.removeChild(e[n]);this.pivotNodes={}}}),No=pi.extend({tagName:"path",className:"highlight-stroke",attributes:{"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},options:{padding:3,rx:0,ry:0,useFirstSubpath:!1,attrs:{"stroke-width":3,stroke:"#FEB663"}},getPathData:function(t,e){var n,r=this.options,i=r.useFirstSubpath;try{var o=ye(e);if(n=o.convertToPathData().trim(),"PATH"===o.tagName()&&i){var a=n.search(/.M/i)+1;a>0&&(n=n.substr(0,a))}}catch(i){var s=t.getNodeBoundingRect(e);n=ye.rectToPath($e({},r,s.toJSON()))}return n},highlightConnection:function(t){this.vel.attr("d",t.getSerializedConnection())},highlightNode:function(t,e){var n=this.vel,r=this.options,i=r.padding,o=r.layer,a=t.getNodeMatrix(e);if(i){o||e!==t.el||n.remove();var s=t.getNodeBoundingRect(e),u=s.x+s.width/2,l=s.y+s.height/2;s=ye.transformRect(s,a);var c=Math.max(s.width,1),f=Math.max(s.height,1),h=(c+i)/c,d=(f+i)/f,p=ye.createSVGMatrix({a:h,b:0,c:0,d,e:u-h*u,f:l-d*l});a=a.multiply(p)}n.attr({d:this.getPathData(t,e),transform:ye.matrixToTransformString(a)})},highlight:function(t,e){var n=this.vel,r=this.options;n.attr(r.attrs),t.isNodeConnection(e)?this.highlightConnection(t):this.highlightNode(t,e)}}),Lo=pi.extend({tagName:"rect",className:"highlight-mask",attributes:{"pointer-events":"none"},options:{padding:3,maskClip:20,deep:!1,attrs:{stroke:"#FEB663","stroke-width":3,"stroke-linecap":"butt","stroke-linejoin":"miter"}},VISIBLE:"white",INVISIBLE:"black",MASK_ROOT_ATTRIBUTE_BLACKLIST:["marker-start","marker-end","marker-mid","transform","stroke-dasharray"],MASK_CHILD_ATTRIBUTE_BLACKLIST:["stroke","fill","stroke-width","stroke-opacity","stroke-dasharray","fill-opacity","marker-start","marker-end","marker-mid"],MASK_REPLACE_TAGS:["FOREIGNOBJECT","IMAGE","USE","TEXT","TSPAN","TEXTPATH"],MASK_REMOVE_TAGS:["TEXT","TSPAN","TEXTPATH"],transformMaskChild:function(t,e){var n=this.MASK_CHILD_ATTRIBUTE_BLACKLIST,r=this.MASK_REPLACE_TAGS,i=this.MASK_REMOVE_TAGS,o=e.tagName();if(!ye.isSVGGraphicsElement(e)||i.includes(o))return e.remove(),!1;if(r.includes(o)){var a=t.vel.findOne("#".concat(e.id));if(a){var s=a.node,u=t.getNodeBoundingRect(s);t.model.isElement()&&(u=ye.transformRect(u,t.getNodeMatrix(s)));var l=ye("rect",u.toJSON()),c=u.center(),f=c.x,h=c.y,d=a.rotate(),p=d.angle,g=d.cx,v=void 0===g?f:g,m=d.cy,y=void 0===m?h:m;p&&l.rotate(p,v,y),e.parent().append(l)}return e.remove(),!1}return n.forEach((function(t){"fill"===t&&"none"===e.attr("fill")||e.removeAttr(t)})),!0},transformMaskRoot:function(t,e){this.MASK_ROOT_ATTRIBUTE_BLACKLIST.forEach((function(t){e.removeAttr(t)}))},getMaskShape:function(t,e){var n,r=this,i=this.options,o=this.MASK_REPLACE_TAGS,a=i.deep,s=e.tagName();if("G"===s){if(!a)return null;!function(t,e){for(var n=t.children();n.length>0;){var r=n.shift();e(r)&&n.push.apply(n,u(r.children()))}}(n=e.clone(),(function(e){return r.transformMaskChild(t,e)}))}else{if(o.includes(s))return null;n=e.clone()}return this.transformMaskRoot(t,n),n},getMaskId:function(){return"highlight-mask-".concat(this.cid)},getMask:function(t,e){var n=this.VISIBLE,r=this.INVISIBLE,i=this.options,o=i.padding,a=i.attrs,s="stroke-width"in a?a["stroke-width"]:1,u="none"!==e.attr("fill"),l=parseFloat(e.attr("stroke-width"));isNaN(l)&&(l=1);var c=l+2*o,f=c+2*s,h=this.getMaskShape(t,e);if(!h){var d=t.getNodeBoundingRect(e.node);d.inflate(d.width?0:.5,d.height?0:.5),h=ye("rect",d.toJSON())}return h.attr(a),ye("mask",{id:this.getMaskId()}).append([h.clone().attr({fill:u?n:"none",stroke:n,"stroke-width":f}),h.clone().attr({fill:u?r:"none",stroke:r,"stroke-width":c})])},removeMask:function(t){var e=t.svg.getElementById(this.getMaskId());e&&t.defs.removeChild(e)},addMask:function(t,e){t.defs.appendChild(e.node)},highlight:function(t,e){var n=this.options,r=this.vel,i=n.padding,o=n.attrs,a=n.maskClip,s=void 0===a?20:a,u=n.layer,l="stroke"in o?o.stroke:"#000000";u||e!==t.el||r.remove();var c=t.getNodeBoundingRect(e).inflate(i+s),f=this.getMask(t,ye(e));this.addMask(t.paper,f),r.attr(c.toJSON()),r.attr({transform:ye.matrixToTransformString(t.getNodeMatrix(e)),mask:"url(#".concat(f.id,")"),fill:l})},unhighlight:function(t){this.removeMask(t.paper)}}),Mo=pi.extend({UPDATABLE:!1,MOUNTABLE:!1,opacityClassName:Se("highlight-opacity"),highlight:function(t,e){ye(e).addClass(this.opacityClassName)},unhighlight:function(t,e){ye(e).removeClass(this.opacityClassName)}}),Oo=Se("highlighted"),Ro=pi.extend({UPDATABLE:!1,MOUNTABLE:!1,options:{className:Oo},highlight:function(t,e){ye(e).addClass(this.options.className)},unhighlight:function(t,e){ye(e).removeClass(this.options.className)}},{className:Oo});function Fo(t,e,n,r){var i="ratio"in r?r.ratio:.5;return t.getPointAtRatio(i)}function Do(t,e,n,r){var i="length"in r?r.length:20;return t.getPointAtLength(i)}function jo(t){return function(e,n,r,i){if(r instanceof Element){var o,a=this.paper.findView(r);if(a)if(a.isNodeConnection(r)){var s="fixedAt"in i?i.fixedAt:"50%";o=Io(a,s)}else o=a.getNodeBBox(r).center();else o=new Y;return t.call(this,e,n,o,i)}return t.apply(this,arguments)}}function Io(t,e){var n=parseFloat(e);return Re(e)?t.getPointAtRatio(n/100):t.getPointAtLength(n)}var Bo=jo((function(t,e,n,r){var i=1e6,o=t.getConnection(),a=t.getConnectionSubdivisions(),s=new ht(n.clone().offset(0,i),n.clone().offset(0,-i)),u=new ht(n.clone().offset(i,0),n.clone().offset(-i,0)),l=s.intersect(o,{segmentSubdivisions:a}),c=u.intersect(o,{segmentSubdivisions:a}),f=[];return l&&Array.prototype.push.apply(f,l),c&&Array.prototype.push.apply(f,c),f.length>0?n.chooseClosest(f):"fallbackAt"in r?Io(t,r.fallbackAt):zo(t,e,n,r)})),zo=jo((function(t,e,n,r){return t.getClosestPoint(n)||new Y}));function Vo(t,e,n){if(Ze(n)){var r=n,i=r.x,o=r.y;if(isFinite(o)){var a=new ht(e,t).parallel(o);e=a.start,t=a.end}n=i}if(!isFinite(n))return t;var s=t.distance(e);return 0===n&&s>0?t:t.move(e,-Math.min(n,s-1))}function $o(t){var e=t.getAttribute("stroke-width");return null===e?0:parseFloat(e)||0}function Uo(t,e,n,r){var i=e.getNodeBBox(n);r.stroke&&i.inflate($o(n)/2);var o=t.intersect(i);return Vo(o?t.start.chooseClosest(o):t.end,t.start,r.offset)}var qo=function(t,e,n,r){var i=r.offset,o=r.alignOffset,a=r.align;return a&&function(t,e){var n,r,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=t.start,u=t.end;switch(e){case"left":n="x",r=u,i=s,o=-1;break;case"right":n="x",r=s,i=u,o=1;break;case"top":n="y",r=u,i=s,o=-1;break;case"bottom":n="y",r=s,i=u,o=1;break;default:return}s[n]<u[n]?r[n]=i[n]:i[n]=r[n],isFinite(a)&&(r[n]+=o*a,i[n]+=o*a)}(t,a,o),Vo(t.end,t.start,i)},Ho=Uo,Go=function(t,e,n,r){var i=e.model.angle();if(0===i)return Uo(t,e,n,r);var o=e.getNodeUnrotatedBBox(n);r.stroke&&o.inflate($o(n)/2);var a=o.center(),s=t.clone().rotate(a,i),u=s.setLength(1e6).intersect(o);return Vo(u?s.start.chooseClosest(u).rotate(a,-i):t.end,t.start,r.offset)},Wo=function(t,e,n,r){var i,o,a=r.selector,s=t.end;if(i="string"==typeof a?e.findBySelector(a)[0]:Array.isArray(a)?Ae(n,a):function(t){if(!t)return null;var e=t;do{var n=e.tagName;if("string"!=typeof n)return null;if("G"===(n=n.toUpperCase()))e=e.firstElementChild;else{if("TITLE"!==n)break;e=e.nextElementSibling}}while(e);return e}(n),!ye.isSVGGraphicsElement(i)){if(i===n||!ye.isSVGGraphicsElement(n))return s;i=n}var u,l=e.getNodeShape(i),c=e.getNodeMatrix(i),f=e.getRootTranslateMatrix(),h=e.getRootRotateMatrix(),d=f.multiply(h).multiply(c),p=d.inverse(),g=ye.transformLine(t,p),v=g.start.clone(),m=e.getNodeData(i);if(!1===r.insideout&&(m.shapeBBox||(m.shapeBBox=l.bbox()),m.shapeBBox.containsPoint(v)))return s;if(l instanceof Et){var y=r.precision||2;m.segmentSubdivisons||(m.segmentSubdivisons=l.getSegmentSubdivisions({precision:y})),u={precision:y,segmentSubdivisions:m.segmentSubdivisons}}!0===r.extrapolate&&g.setLength(1e6),(o=g.intersect(l,u))?ye.isArray(o)&&(o=v.chooseClosest(o)):!0===r.sticky&&(o=l instanceof ut?l.pointNearestToPoint(v):l instanceof Z?l.intersectionWithLineFromCenterToPoint(v):l.closestPoint(v,u));var b=o?ye.transformPoint(o,d):s,w=r.offset||0;return r.stroke&&(w+=$o(i)/2),Vo(b,t.start,w)};function Yo(t){return function(e,n,r,i){var o=!!i.rotate,a=o?e.getNodeUnrotatedBBox(n):e.getNodeBBox(n),s=a[t](),u=i.dx;if(u){var l=Re(u);u=parseFloat(u),isFinite(u)&&(l&&(u/=100,u*=a.width),s.x+=u)}var c=i.dy;if(c){var f=Re(c);c=parseFloat(c),isFinite(c)&&(f&&(c/=100,c*=a.height),s.y+=c)}return o?s.rotate(e.model.getBBox().center(),-e.model.angle()):s}}var Xo=Yo("center"),Qo=Yo("topMiddle"),Ko=Yo("bottomMiddle"),Jo=Yo("leftMiddle"),Zo=Yo("rightMiddle"),ta=Yo("origin"),ea=Yo("topRight"),na=Yo("bottomLeft"),ra=Yo("corner"),ia=jo((function(t,e,n,r){var i=t.model.angle(),o=t.getNodeBBox(e),a=o.center(),s=o.origin(),u=o.corner(),l=r.padding;if(isFinite(l)||(l=0),s.y+l<=n.y&&n.y<=u.y-l){var c=n.y-a.y;a.x+=0===i||180===i?0:1*c/Math.tan(T(i)),a.y+=c}else if(s.x+l<=n.x&&n.x<=u.x-l){var f=n.x-a.x;a.y+=90===i||270===i?0:f*Math.tan(T(i)),a.x+=f}return a})),oa=jo((function(t,e,n,r){var i,o,a,s=!!r.rotate;s?(i=t.getNodeUnrotatedBBox(e),a=t.model.getBBox().center(),o=t.model.angle()):i=t.getNodeBBox(e);var u,l=r.padding;switch(isFinite(l)&&i.inflate(l),s&&n.rotate(a,o),i.sideNearestToPoint(n)){case"left":u=i.leftMiddle();break;case"right":u=i.rightMiddle();break;case"top":u=i.topMiddle();break;case"bottom":u=i.bottomMiddle()}return s?u.rotate(a,-o):u})),aa=function(t,e,n,r,i){return t.model.getPointFromConnectedLink(this.model,i).offset(r.dx,r.dy)},sa={NONE:"sorting-none",APPROX:"sorting-approximate",EXACT:"sorting-exact"},ua=9007199254740991,la=vi.Highlighting,ca=(s(t={},la.DEFAULT,{name:"stroke",options:{padding:3}}),s(t,la.MAGNET_AVAILABILITY,{name:"addClass",options:{className:"available-magnet"}}),s(t,la.ELEMENT_AVAILABILITY,{name:"addClass",options:{className:"available-cell"}}),t),fa=[{name:Co.BACK},{name:Co.CELLS},{name:Co.LABELS},{name:Co.FRONT},{name:Co.TOOLS}],ha=An.extend({className:"paper",options:{width:800,height:600,origin:{x:0,y:0},gridSize:1,drawGrid:!1,background:!1,perpendicularLinks:!1,elementView:yi,linkView:Po,snapLabels:!1,snapLinks:!1,labelsLayer:!1,multiLinks:!0,guard:function(t,e){return!1},highlighting:ca,preventContextMenu:!0,preventDefaultBlankAction:!0,restrictTranslate:!1,markAvailable:!1,defaultLink:new qr,defaultConnector:{name:"normal"},defaultRouter:{name:"normal"},defaultAnchor:{name:"center"},defaultLinkAnchor:{name:"connectionRatio"},defaultConnectionPoint:{name:"bbox"},connectionStrategy:null,validateMagnet:function(t,e,n){return"passive"!==e.getAttribute("magnet")},validateConnection:function(t,e,n,r,i,o){return("target"===i?n:t)instanceof yi},embeddingMode:!1,validateEmbedding:function(t,e){return!0},validateUnembedding:function(t){return!0},findParentBy:"bbox",frontParentOnly:!0,interactive:{labelMove:!1},linkPinning:!0,allowLink:null,clickThreshold:0,moveThreshold:0,magnetThreshold:0,sorting:sa.EXACT,frozen:!1,onViewUpdate:function(t,e,n,r,i){e&(t.FLAG_INSERT|t.FLAG_REMOVE)||r.mounting||r.isolate||i.requestConnectedLinksUpdate(t,n,r)},onViewPostponed:function(t,e,n){return n.forcePostponedViewUpdate(t,e)},beforeRender:null,afterRender:null,viewport:null,cellViewNamespace:null,routerNamespace:null,connectorNamespace:null,highlighterNamespace:f,anchorNamespace:g,linkAnchorNamespace:d,connectionPointNamespace:p},events:{dblclick:"pointerdblclick",contextmenu:"contextmenu",mousedown:"pointerdown",touchstart:"pointerdown",mouseover:"mouseover",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",wheel:"mousewheel","mouseenter .joint-cell":"mouseenter","mouseleave .joint-cell":"mouseleave","mouseenter .joint-tools":"mouseenter","mouseleave .joint-tools":"mouseleave","mousedown .joint-cell [event]":"onevent","touchstart .joint-cell [event]":"onevent","mousedown .joint-cell [magnet]":"onmagnet","touchstart .joint-cell [magnet]":"onmagnet","dblclick .joint-cell [magnet]":"magnetpointerdblclick","contextmenu .joint-cell [magnet]":"magnetcontextmenu","mousedown .joint-link .label":"onlabel","touchstart .joint-link .label":"onlabel","dragstart .joint-cell image":"onImageDragStart"},documentEvents:{mousemove:"pointermove",touchmove:"pointermove",mouseup:"pointerup",touchend:"pointerup",touchcancel:"pointerup"},svg:null,viewport:null,defs:null,tools:null,$background:null,layers:null,$grid:null,$document:null,_viewportMatrix:null,_viewportTransformString:null,_updates:null,_layers:null,SORT_DELAYING_BATCHES:["add","to-front","to-back"],UPDATE_DELAYING_BATCHES:["translate"],MIN_SCALE:1e-6,init:function(){var t=this.options,e=this.el;t.cellViewNamespace||(t.cellViewNamespace="undefined"!=typeof joint&&sn(joint,"shapes")?joint.shapes:null);var n=this.model=t.model||new fi;this._layers={},this.setGrid(t.drawGrid),this.cloneOptions(),this.render(),this._setDimensions(),this.startListening(),this._views={},this.$document=we(e.ownerDocument),this.resetViews(n.attributes.cells.models),!this.isFrozen()&&this.isAsync()&&this.updateViewsAsync()},_resetUpdates:function(){return this._updates={id:null,priorities:[{},{},{}],unmountedCids:[],mountedCids:[],unmounted:{},mounted:{},count:0,keyFrozen:!1,freezeKey:null,sort:!1}},startListening:function(){var t=this.model;this.listenTo(t,"add",this.onCellAdded).listenTo(t,"remove",this.onCellRemoved).listenTo(t,"change",this.onCellChange).listenTo(t,"reset",this.onGraphReset).listenTo(t,"sort",this.onGraphSort).listenTo(t,"batch:stop",this.onGraphBatchStop),this.on("cell:highlight",this.onCellHighlight).on("cell:unhighlight",this.onCellUnhighlight).on("scale translate",this.update)},onCellAdded:function(t,e,n){var r=n.position;this.isAsync()||!vn(r)?this.renderView(t,n):(n.maxPosition===r&&this.freeze({key:"addCells"}),this.renderView(t,n),0===r&&this.unfreeze({key:"addCells"}))},onCellRemoved:function(t,e,n){var r=this.findViewByModel(t);r&&this.requestViewUpdate(r,r.FLAG_REMOVE,r.UPDATE_PRIORITY,n)},onCellChange:function(t,e){if(t!==this.model.attributes.cells&&t.hasChanged("z")&&this.options.sorting===sa.APPROX){var n=this.findViewByModel(t);n&&this.requestViewUpdate(n,n.FLAG_INSERT,n.UPDATE_PRIORITY,e)}},onGraphReset:function(t,e){this.resetLayers(),this.resetViews(t.models,e)},onGraphSort:function(){this.model.hasActiveBatch(this.SORT_DELAYING_BATCHES)||this.sortViews()},onGraphBatchStop:function(t){if(!this.isFrozen()){var e=t&&t.batchName,n=this.model;if(!this.isAsync()){var r=this.UPDATE_DELAYING_BATCHES;r.includes(e)&&!n.hasActiveBatch(r)&&this.updateViews(t)}var i=this.SORT_DELAYING_BATCHES;i.includes(e)&&!n.hasActiveBatch(i)&&this.sortViews()}},cloneOptions:function(){var t=this.options,e=t.defaultConnector,n=t.defaultRouter,r=t.defaultConnectionPoint,i=t.defaultAnchor,o=t.defaultLinkAnchor,a=t.origin,s=t.highlighting,u=t.cellViewNamespace,l=t.interactive;!u&&"undefined"!=typeof joint&&sn(joint,"shapes")&&(t.cellViewNamespace=joint.shapes),Je(e)||(t.defaultConnector=Xe(e)),Je(n)||(t.defaultRouter=Xe(n)),Je(r)||(t.defaultConnectionPoint=Xe(r)),Je(i)||(t.defaultAnchor=Xe(i)),Je(o)||(t.defaultLinkAnchor=Xe(o)),Ze(l)&&(t.interactive=$e({},l)),Ze(s)&&(t.highlighting=qe({},s,ca)),t.origin=$e({},a)},children:function(){var t=ye.namespace;return[{namespaceURI:t.xhtml,tagName:"div",className:Se("paper-background"),selector:"background"},{namespaceURI:t.xhtml,tagName:"div",className:Se("paper-grid"),selector:"grid"},{namespaceURI:t.svg,tagName:"svg",attributes:{width:"100%",height:"100%","xmlns:xlink":t.xlink},selector:"svg",children:[{tagName:"defs",selector:"defs"},{tagName:"g",className:Se("layers"),selector:"layers"}]}]},hasLayerView:function(t){return t in this._layers},getLayerView:function(t){var e=this._layers;if(t in e)return e[t];throw new Error('dia.Paper: Unknown layer "'.concat(t,'"'))},getLayerNode:function(t){return this.getLayerView(t).el},render:function(){this.renderChildren();var t=this.childNodes,e=this.options,n=t.svg,r=t.defs,i=t.layers,o=t.background,a=t.grid;return this.svg=n,this.defs=r,this.layers=i,this.$background=we(o),this.$grid=we(a),this.renderLayers(),ye.ensureId(n),e.background&&this.drawBackground(e.background),e.drawGrid&&this.drawGrid(),this},renderLayers:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fa;this.removeLayers(),e.forEach((function(e){var n=e.name,r=(e.sorted,new To({name:n}));t.layers.appendChild(r.el),t._layers[n]=r}));var n=this.getLayerView(Co.CELLS),r=this.getLayerView(Co.TOOLS),i=this.getLayerView(Co.LABELS);this.tools=r.el,this.cells=this.viewport=n.el,n.vel.addClass(Se("viewport")),i.vel.addClass(Se("viewport"))},removeLayers:function(){var t=this._layers;Object.keys(t,(function(e){t[e].remove(),delete t[e]}))},resetLayers:function(){var t=this._layers;Object.keys(t,(function(e){t[e].removePivots()}))},update:function(){return this.options.drawGrid&&this.drawGrid(),this._background&&this.updateBackgroundImage(this._background),this},matrix:function(t){var e=this.layers;if(void 0===t){var n=e.getAttribute("transform");return(this._viewportTransformString||null)===n?t=this._viewportMatrix:(t=e.getCTM(),this._viewportMatrix=t,this._viewportTransformString=n),ye.createSVGMatrix(t)}t=ye.createSVGMatrix(t);var r=ye.matrixToTransformString(t);return e.setAttribute("transform",r),this._viewportMatrix=t,this._viewportTransformString=e.getAttribute("transform"),this},clientMatrix:function(){return ye.createSVGMatrix(this.cells.getScreenCTM())},requestConnectedLinksUpdate:function(t,e,n){if(t instanceof vi)for(var r=t.model,i=this.model.getConnectedLinks(r),o=0,a=i.length;o<a;o++){var s=i[o],u=this.findViewByModel(s);if(u){var l=["UPDATE"];s.getTargetCell()===r&&l.push("TARGET"),s.getSourceCell()===r&&l.push("SOURCE");var c=Math.max(e+1,u.UPDATE_PRIORITY);this.scheduleViewUpdate(u,u.getFlag(l),c,n)}}},forcePostponedViewUpdate:function(t,e){if(!(t&&t instanceof vi))return!1;var n=t.model;if(n.isElement())return!1;if(0==(e&t.getFlag(["SOURCE","TARGET"]))){var r=0,i=this.findViewByModel(n.getSourceCell());i&&!this.isViewMounted(i)&&(r=this.dumpView(i),t.updateEndMagnet("source"));var o=0,a=this.findViewByModel(n.getTargetCell());if(a&&!this.isViewMounted(a)&&(o=this.dumpView(a),t.updateEndMagnet("target")),0===r&&0===o)return!this.dumpView(t)}return!1},requestViewUpdate:function(t,e,n,r){r||(r={}),this.scheduleViewUpdate(t,e,n,r);var i=this.isAsync();if(!(this.isFrozen()||i&&!1!==r.async||this.model.hasActiveBatch(this.UPDATE_DELAYING_BATCHES))){var o=this.updateViews(r);i&&this.notifyAfterRender(o,r)}},scheduleViewUpdate:function(t,e,n,r){var i=this._updates,o=this.options,a=t.FLAG_REMOVE,s=t.FLAG_INSERT,u=t.UPDATE_PRIORITY,l=t.cid,c=i.priorities[n];if(c||(c=i.priorities[n]={}),n>u)for(var f=n-1;f>=u;f--){var h=i.priorities[f];h&&l in h&&(c[l]|=h[l],delete h[l])}var d=c[l]||0;if((d&e)!==e){d||i.count++,e&a&&d&s?c[l]^=s:e&s&&d&a&&(c[l]^=a),c[l]|=e;var p=o.onViewUpdate;"function"==typeof p&&p.call(this,t,e,n,r||{},this)}},dumpViewUpdate:function(t){if(!t)return 0;var e=this._updates,n=t.cid,r=e.priorities[t.UPDATE_PRIORITY],i=this.registerMountedView(t)|r[n];return delete r[n],i},dumpView:function(t,e){var n=this.dumpViewUpdate(t);return n?this.updateView(t,n,e):0},updateView:function(t,e,n){if(!t)return 0;var r=t.FLAG_REMOVE,i=t.FLAG_INSERT,o=t.model;if(t instanceof vi){if(e&r)return this.removeView(o),0;e&i&&(this.insertView(t),e^=i)}return e?t.confirmUpdate(e,n||{}):0},requireView:function(t,e){var n=this.findViewByModel(t);return n?(this.dumpView(n,e),n):null},registerUnmountedView:function(t){var e=t.cid,n=this._updates;if(e in n.unmounted)return 0;var r=n.unmounted[e]|=t.FLAG_INSERT;return n.unmountedCids.push(e),delete n.mounted[e],r},registerMountedView:function(t){var e=t.cid,n=this._updates;if(e in n.mounted)return 0;n.mounted[e]=!0,n.mountedCids.push(e);var r=n.unmounted[e]||0;return delete n.unmounted[e],r},isViewMounted:function(t){return!!t&&t.cid in this._updates.mounted},dumpViews:function(t){var e=Ue({},t,{viewport:null});this.checkViewport(e),this.updateViews(e)},updateViews:function(t){var e;this.notifyBeforeRender(t);var n=0,r=0,i=ua;do{r++,n+=(e=this.updateViewsBatch(t)).updated,i=Math.min(e.priority,i)}while(!e.empty);var o={updated:n,batches:r,priority:i};return this.notifyAfterRender(o,t),o},hasScheduledUpdates:function(){for(var t=this._updates.priorities,e=Object.keys(t),n=e.length;n>0&&n--;)for(var r in t[e[n]])return!0;return!1},updateViewsAsync:function(t,e){t||(t={}),e||(e={processed:0,priority:ua});var n=this._updates,r=n.id;if(r){Oe(r),0===e.processed&&this.hasScheduledUpdates()&&this.notifyBeforeRender(t);var i=this.updateViewsBatch(t),o=Ue({},t,{mountBatchSize:1e3-i.mounted,unmountBatchSize:1e3-i.unmounted}),a=this.checkViewport(o),s=a.unmounted,u=a.mounted,l=e.processed,c=n.count;i.updated>0&&(l+=i.updated+i.unmounted,i.processed=l,e.priority=Math.min(i.priority,e.priority),i.empty&&0===u?(i.unmounted+=s,i.mounted+=u,i.priority=e.priority,this.notifyAfterRender(i,t),e.processed=0,e.priority=ua,n.count=0):e.processed=l);var f=t.progress;if(c&&"function"==typeof f&&f.call(this,i.empty,l,c,i,this),n.id!==r)return}n.id=Me(this.updateViewsAsync,this,t,e)},notifyBeforeRender:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.beforeRender;"function"!=typeof e&&"function"!=typeof(e=this.options.beforeRender)||e.call(this,t,this)},notifyAfterRender:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.afterRender;"function"!=typeof n&&(n=this.options.afterRender),"function"==typeof n&&n.call(this,t,e,this),this.trigger("render:done",t,e)},updateViewsBatch:function(t){t||(t={});var e=t.batchSize||1/0,n=this._updates,r=0,i=0,o=0,a=0,s=ua,u=!0,l=this.options,c=n.priorities,f="viewport"in t?t.viewport:l.viewport;"function"!=typeof f&&(f=null);var h=l.onViewPostponed;"function"!=typeof h&&(h=null);var d=Object.keys(c);t:for(var p=0,g=d.length;p<g;p++){var v=+d[p],m=c[v];for(var y in m){if(r>=e){u=!1;break t}var b=En[y];if(b){var w=m[y];if(0==(w&b.FLAG_REMOVE)){var x=y in n.unmounted;if(b.DETACHABLE&&f&&!f.call(this,b,!x,this)){x||(this.registerUnmountedView(b),b.unmount()),n.unmounted[y]|=w,delete m[y],o++;continue}x&&(w|=b.FLAG_INSERT,a++),w|=this.registerMountedView(b)}var S=this.updateView(b,w,t);S>0&&(m[y]=S,!h||!h.call(this,b,S,this)||m[y])?(i++,u=!1):(s>v&&(s=v),r++,delete m[y])}else delete m[y]}}return{priority:s,updated:r,postponed:i,unmounted:o,mounted:a,empty:u}},getUnmountedViews:function(){for(var t=this._updates,e=Object.keys(t.unmounted),n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=En[e[i]];return r},getMountedViews:function(){for(var t=this._updates,e=Object.keys(t.mounted),n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=En[e[i]];return r},checkUnmountedViews:function(t,e){e||(e={});var n=0;"function"!=typeof t&&(t=null);for(var r=("mountBatchSize"in e?e.mountBatchSize:1/0),i=this._updates,o=i.unmountedCids,a=i.unmounted,s=0,u=Math.min(o.length,r);s<u;s++){var l=o[s];if(l in a){var c=En[l];if(c)if(c.DETACHABLE&&t&&!t.call(this,c,!1,this))o.push(l);else{n++;var f=this.registerMountedView(c);f&&this.scheduleViewUpdate(c,f,c.UPDATE_PRIORITY,{mounting:!0})}}}return o.splice(0,s),n},checkMountedViews:function(t,e){e||(e={});var n=0;if("function"!=typeof t)return n;for(var r=("unmountBatchSize"in e?e.unmountBatchSize:1/0),i=this._updates,o=i.mountedCids,a=i.mounted,s=0,u=Math.min(o.length,r);s<u;s++){var l=o[s];if(l in a){var c=En[l];c&&(c.DETACHABLE&&!t.call(this,c,!0,this)?(n++,this.registerUnmountedView(c)&&c.unmount()):o.push(l))}}return o.splice(0,s),n},checkViewport:function(t){var e=Ue({},t,{mountBatchSize:1/0,unmountBatchSize:1/0}),n="viewport"in e?e.viewport:this.options.viewport,r=this.checkMountedViews(n,e);if(r>0){var i=this._updates.unmountedCids;e.mountBatchSize=Math.min(i.length-r,e.mountBatchSize)}return{mounted:this.checkUnmountedViews(n,e),unmounted:r}},freeze:function(t){t||(t={});var e=this._updates,n=t.key,r=this.options.frozen,i=e.freezeKey;if(n&&n!==i){if(r&&i)return;e.freezeKey=n,e.keyFrozen=r}this.options.frozen=!0;var o=e.id;e.id=null,this.isAsync()&&o&&Oe(o)},unfreeze:function(t){t||(t={});var e=this._updates,n=t.key,r=e.freezeKey;n&&r&&n!==r||(e.freezeKey=null,n&&n===r&&e.keyFrozen||(this.isAsync()?(this.freeze(),this.updateViewsAsync(t)):this.updateViews(t),this.options.frozen=e.keyFrozen=!1,e.sort&&(this.sortViews(),e.sort=!1)))},isAsync:function(){return!!this.options.async},isFrozen:function(){return!!this.options.frozen},isExactSorting:function(){return this.options.sorting===sa.EXACT},onRemove:function(){this.freeze(),this.removeLayers(),this.removeViews()},getComputedSize:function(){var t=this.options,e=t.width,n=t.height;return vn(e)||(e=this.el.clientWidth),vn(n)||(n=this.el.clientHeight),{width:e,height:n}},setDimensions:function(t,e){var n=this.options,r=n.width,i=n.height,o=void 0===t?r:t,a=void 0===e?i:e;if(r!==o||i!==a){n.width=o,n.height=a,this._setDimensions();var s=this.getComputedSize();this.trigger("resize",s.width,s.height)}},_setDimensions:function(){var t=this.options,e=t.width,n=t.height;vn(e)&&(e=Math.round(e)),vn(n)&&(n=Math.round(n)),this.$el.css({width:null===e?"":e,height:null===n?"":n})},setOrigin:function(t,e){return this.translate(t||0,e||0)},fitToContent:function(t,e,n,r){r=gn(t)?t:$e({gridWidth:t,gridHeight:e,padding:n},r);var i=this.getFitToContentArea(r),o=i.x,a=i.y,s=i.width,u=i.height,l=this.scale(),c=l.sx,f=l.sy;return this.setOrigin(-o*c,-a*f),this.setDimensions(s*c,u*f),new ut(o,a,s,u)},getFitToContentArea:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.gridWidth||1,n=t.gridHeight||1,r=je(t.padding||0),i=Math.max(t.minWidth||0,e),o=Math.max(t.minHeight||0,n),a=t.maxWidth||Number.MAX_VALUE,s=t.maxHeight||Number.MAX_VALUE,u=t.allowNewOrigin,l="contentArea"in t?new ut(t.contentArea):this.getContentArea(t),c=this.scale(),f=c.sx,h=c.sy;l.x*=f,l.y*=h,l.width*=f,l.height*=h;var d=Math.ceil((l.width+l.x)/e),p=Math.ceil((l.height+l.y)/n);t.allowNegativeBottomRight||(d=Math.max(d,1),p=Math.max(p,1)),d*=e,p*=n;var g=0;("negative"===u&&l.x<0||"positive"===u&&l.x>=0||"any"===u)&&(g=Math.ceil(-l.x/e)*e,d+=g+=r.left);var v=0;return("negative"===u&&l.y<0||"positive"===u&&l.y>=0||"any"===u)&&(v=Math.ceil(-l.y/n)*n,p+=v+=r.top),d+=r.right,p+=r.bottom,d=Math.max(d,i),p=Math.max(p,o),d=Math.min(d,a),p=Math.min(p,s),new ut(-g/f,-v/h,d/f,p/h)},scaleContentToFit:function(t){var e,n;if(t||(t={}),"contentArea"in t){var r=t.contentArea;e=this.localToPaperRect(r),n=new Y(r)}else e=this.getContentBBox(t),n=this.paperToLocalPoint(e);if(e.width&&e.height){Ue(t,{padding:0,preserveAspectRatio:!0,scaleGrid:null,minScale:0,maxScale:Number.MAX_VALUE});var i,o=je(t.padding),a=t.minScaleX||t.minScale,s=t.maxScaleX||t.maxScale,u=t.minScaleY||t.minScale,l=t.maxScaleY||t.maxScale;if(t.fittingBBox)i=t.fittingBBox;else{var c=this.translate(),f=this.getComputedSize();i={x:c.tx,y:c.ty,width:f.width,height:f.height}}i=new ut(i).moveAndExpand({x:o.left,y:o.top,width:-o.left-o.right,height:-o.top-o.bottom});var h=this.scale(),d=i.width/e.width*h.sx,p=i.height/e.height*h.sy;if(t.preserveAspectRatio&&(d=p=Math.min(d,p)),t.scaleGrid){var g=t.scaleGrid;d=g*Math.floor(d/g),p=g*Math.floor(p/g)}d=Math.min(s,Math.max(a,d)),p=Math.min(l,Math.max(u,p));var v=this.options.origin,m=i.x-n.x*d-v.x,y=i.y-n.y*p-v.y;this.scale(d,p),this.translate(m,y)}},getContentArea:function(t){return t&&t.useModelGeometry?this.model.getBBox()||new ut:ye(this.cells).getBBox()},getContentBBox:function(t){return this.localToPaperRect(this.getContentArea(t))},getArea:function(){return this.paperToLocalRect(this.getComputedSize())},getRestrictedArea:function(){for(var t=this.options.restrictTranslate,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Je(t)?t.apply(this,n):!0===t?this.getArea():t?new ut(t):null},createViewForModel:function(t){var e,n,r=this.options,i=r.cellViewNamespace,o=t.get("type")+"View",a=Ae(i,o,".");return t.isLink()?(e=r.linkView,n=Po):(e=r.elementView,n=yi),new(e.prototype instanceof _n.View?a||e:e.call(this,t)||a||n)({model:t,interactive:r.interactive,labelsLayer:!0===r.labelsLayer?Co.LABELS:r.labelsLayer})},removeView:function(t){var e=t.id,n=this._views,r=this._updates,i=n[e];if(i){var o=i.cid,a=r.mounted,s=r.unmounted;i.remove(),delete n[e],delete a[o],delete s[o]}return i},renderView:function(t,e){var n,r,i=t.id,o=this._views,a=!0;return i in o&&((n=o[i]).model===t?(r=n.FLAG_INSERT,a=!1):this.removeView(t)),a&&((n=o[i]=this.createViewForModel(t)).paper=this,r=this.registerUnmountedView(n)|n.getFlag(un(n,"initFlag"))),this.requestViewUpdate(n,r,n.UPDATE_PRIORITY,e),n},onImageDragStart:function(){return!1},resetViews:function(t,e){e||(e={}),t||(t=[]),this._resetUpdates(),this.removeViews(),this.freeze({key:"reset"});for(var n=0,r=t.length;n<r;n++)this.renderView(t[n],e);this.unfreeze({key:"reset"}),this.sortViews()},removeViews:function(){He(this._views,"remove"),this._views={}},sortViews:function(){this.isExactSorting()&&(this.isFrozen()?this._updates.sort=!0:this.sortViewsExact())},sortViewsExact:function(){var t,e,n,r=we(this.cells).children("[model-id]"),i=this.model.get("cells");t=function(t,e){var n=i.get(t.getAttribute("model-id")),r=i.get(e.getAttribute("model-id")),o=n.attributes.z||0,a=r.attributes.z||0;return o===a?0:o<a?-1:1},e=we(r),n=e.map((function(){var t=this.parentNode,e=t.insertBefore(document.createTextNode(""),this.nextSibling);return function(){if(t===this)throw new Error("You can't sort elements if any one is a descendant of another.");t.insertBefore(this,e),t.removeChild(e)}})),Array.prototype.sort.call(e,t).each((function(t){n[t].call(this)}))},insertView:function(t){var e=this.getLayerView(Co.CELLS),n=t.el,r=t.model;switch(this.options.sorting){case sa.APPROX:e.insertSortedNode(n,r.get("z"));break;case sa.EXACT:default:e.insertNode(n)}t.onMount()},scale:function(t,e,n,r){if(void 0===t)return ye.matrixToScale(this.matrix());void 0===e&&(e=t),void 0===n&&(n=0,r=0);var i=this.translate();if(n||r||i.tx||i.ty){var o=i.tx-n*(t-1),a=i.ty-r*(e-1);this.translate(o,a)}t=Math.max(t||0,this.MIN_SCALE),e=Math.max(e||0,this.MIN_SCALE);var s=this.matrix();return s.a=t,s.d=e,this.matrix(s),this.trigger("scale",t,e,n,r),this},rotate:function(t,e,n){if(void 0===t)return ye.matrixToRotate(this.matrix());if(void 0===e){var r=this.cells.getBBox();e=r.width/2,n=r.height/2}var i=this.matrix().translate(e,n).rotate(t).translate(-e,-n);return this.matrix(i),this},translate:function(t,e){if(void 0===t)return ye.matrixToTranslate(this.matrix());var n=this.options,r=n.origin,i=n.drawGrid;t||(t=0),e||(e=0);var o=this.matrix();if(o.e===t&&o.f===e)return this;o.e=t,o.f=e,this.matrix(o);var a=this.translate(),s=a.tx,u=a.ty;return r.x=s,r.y=u,this.trigger("translate",s,u),i&&this.drawGrid(),this},findView:function(t){var e=mn(t)?this.cells.querySelector(t):t instanceof we?t[0]:t,n=this.findAttribute("model-id",e);if(n)return this._views[n]},findViewByModel:function(t){var e=mn(t)||vn(t)?t:t&&t.id;return this._views[e]},findViewsFromPoint:function(t){return t=new Y(t),this.model.getElements().map(this.findViewByModel,this).filter((function(e){return e&&e.vel.getBBox({target:this.cells}).containsPoint(t)}),this)},findViewsInArea:function(t,e){e=Ue(e||{},{strict:!1}),t=new ut(t);var n=this.model.getElements().map(this.findViewByModel,this),r=e.strict?"containsRect":"intersect";return n.filter((function(e){return e&&t[r](e.vel.getBBox({target:this.cells}))}),this)},removeTools:function(){return this.dispatchToolsEvent("remove"),this},hideTools:function(){return this.dispatchToolsEvent("hide"),this},showTools:function(){return this.dispatchToolsEvent("show"),this},dispatchToolsEvent:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];"string"==typeof t&&this.trigger.apply(this,["tools:event",t].concat(n))},getModelById:function(t){return this.model.getCell(t)},snapToGrid:function(t,e){return this.clientToLocalPoint(t,e).snapToGrid(this.options.gridSize)},localToPaperPoint:function(t,e){var n=new Y(t,e);return ye.transformPoint(n,this.matrix())},localToPaperRect:function(t,e,n,r){var i=new ut(t,e,n,r);return ye.transformRect(i,this.matrix())},paperToLocalPoint:function(t,e){var n=new Y(t,e);return ye.transformPoint(n,this.matrix().inverse())},paperToLocalRect:function(t,e,n,r){var i=new ut(t,e,n,r);return ye.transformRect(i,this.matrix().inverse())},localToClientPoint:function(t,e){var n=new Y(t,e);return ye.transformPoint(n,this.clientMatrix())},localToClientRect:function(t,e,n,r){var i=new ut(t,e,n,r);return ye.transformRect(i,this.clientMatrix())},clientToLocalPoint:function(t,e){var n=new Y(t,e);return ye.transformPoint(n,this.clientMatrix().inverse())},clientToLocalRect:function(t,e,n,r){var i=new ut(t,e,n,r);return ye.transformRect(i,this.clientMatrix().inverse())},localToPagePoint:function(t,e){return this.localToPaperPoint(t,e).offset(this.pageOffset())},localToPageRect:function(t,e,n,r){return this.localToPaperRect(t,e,n,r).offset(this.pageOffset())},pageToLocalPoint:function(t,e){var n=new Y(t,e).difference(this.pageOffset());return this.paperToLocalPoint(n)},pageToLocalRect:function(t,e,n,r){var i=this.pageOffset(),o=new ut(t,e,n,r);return o.x-=i.x,o.y-=i.y,this.paperToLocalRect(o)},clientOffset:function(){var t=this.svg.getBoundingClientRect();return new Y(t.left,t.top)},pageOffset:function(){return this.clientOffset().offset(window.scrollX,window.scrollY)},linkAllowed:function(t){if(!(t instanceof Po))throw new Error("Must provide a linkView.");var e=t.model,n=this.options,r=this.model,i=r.constructor.validations;return!(!n.multiLinks&&!i.multiLinks.call(this,r,e)||!n.linkPinning&&!i.linkPinning.call(this,r,e)||"function"==typeof n.allowLink&&!n.allowLink.call(this,t,this))},getDefaultLink:function(t,e){return Je(this.options.defaultLink)?this.options.defaultLink.call(this,t,e):this.options.defaultLink.clone()},resolveHighlighter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.highlighter,n=t.type,r=this.options,i=r.highlighting,o=r.highlighterNamespace;if(void 0===e){if(!i)return!1;if(n&&!1===(e=i[n]))return!1;e||(e=i.default)}if(!e)return!1;mn(e)&&(e={name:e});var a=e.name,s=o[a];if(!s)throw new Error('Unknown highlighter ("'+a+'")');if("function"!=typeof s.highlight)throw new Error('Highlighter ("'+a+'") is missing required highlight() method');if("function"!=typeof s.unhighlight)throw new Error('Highlighter ("'+a+'") is missing required unhighlight() method');return{highlighter:s,options:e.options||{},name:a}},onCellHighlight:function(t,e,n){var r=this.resolveHighlighter(n);if(r){var i=r.highlighter,o=r.options;i.highlight(t,e,o)}},onCellUnhighlight:function(t,e,n){var r=this.resolveHighlighter(n);if(r){var i=r.highlighter,o=r.options;i.unhighlight(t,e,o)}},pointerdblclick:function(t){t.preventDefault(),t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e)){var n=this.snapToGrid(t.clientX,t.clientY);e?e.pointerdblclick(t,n.x,n.y):this.trigger("blank:pointerdblclick",t,n.x,n.y)}},pointerclick:function(t){if(this.eventData(t).mousemoved<=this.options.clickThreshold){t=Le(t);var e=this.findView(t.target);if(this.guard(t,e))return;var n=this.snapToGrid(t.clientX,t.clientY);e?e.pointerclick(t,n.x,n.y):this.trigger("blank:pointerclick",t,n.x,n.y)}},contextmenu:function(t){this.options.preventContextMenu&&t.preventDefault(),t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e)){var n=this.snapToGrid(t.clientX,t.clientY);e?e.contextmenu(t,n.x,n.y):this.trigger("blank:contextmenu",t,n.x,n.y)}},pointerdown:function(t){t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e)){var n=this.snapToGrid(t.clientX,t.clientY);e?(t.preventDefault(),e.pointerdown(t,n.x,n.y)):(this.options.preventDefaultBlankAction&&t.preventDefault(),this.trigger("blank:pointerdown",t,n.x,n.y)),this.delegateDragEvents(e,t.data)}},pointermove:function(t){var e=this.eventData(t);if(e.mousemoved||(e.mousemoved=0),!(++e.mousemoved<=this.options.moveThreshold)){t=Le(t);var n=this.snapToGrid(t.clientX,t.clientY),r=e.sourceView;r?r.pointermove(t,n.x,n.y):this.trigger("blank:pointermove",t,n.x,n.y),this.eventData(t,e)}},pointerup:function(t){this.undelegateDocumentEvents();var e=Le(t),n=this.snapToGrid(e.clientX,e.clientY),r=this.eventData(t).sourceView;r?r.pointerup(e,n.x,n.y):this.trigger("blank:pointerup",e,n.x,n.y),e.isPropagationStopped()||this.pointerclick(we.Event(t,{type:"click",data:t.data})),t.stopImmediatePropagation(),this.delegateEvents()},mouseover:function(t){t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e))if(e)e.mouseover(t);else{if(this.el===t.target)return;this.trigger("blank:mouseover",t)}},mouseout:function(t){t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e))if(e)e.mouseout(t);else{if(this.el===t.target)return;this.trigger("blank:mouseout",t)}},mouseenter:function(t){var e=t=Le(t),n=e.target,r=e.relatedTarget,i=e.currentTarget,o=this.findView(n);if(!this.guard(t,o)){var a=this.findView(r);if(o){if(a===o)return;if(o.mouseenter(t),this.el.contains(r))return}a||i===this.el&&this.trigger("paper:mouseenter",t)}},mouseleave:function(t){var e=t=Le(t),n=e.target,r=e.relatedTarget,i=e.currentTarget,o=this.findView(n);if(!this.guard(t,o)){var a=this.findView(r);if(o){if(a===o)return;if(o.mouseleave(t),this.el.contains(r))return}a||i===this.el&&this.trigger("paper:mouseleave",t)}},mousewheel:function(t){t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e)){var n=t.originalEvent,r=this.snapToGrid(n.clientX,n.clientY),i=Math.max(-1,Math.min(1,n.wheelDelta));e?e.mousewheel(t,r.x,r.y,i):this.trigger("blank:mousewheel",t,r.x,r.y,i)}},onevent:function(t){var e=t.currentTarget,n=e.getAttribute("event");if(n){var r=this.findView(e);if(r){if(t=Le(t),this.guard(t,r))return;var i=this.snapToGrid(t.clientX,t.clientY);r.onevent(t,n,i.x,i.y)}}},magnetEvent:function(t,e){var n=t.currentTarget;if(n.getAttribute("magnet")){var r=this.findView(n);if(r){if(t=Le(t),this.guard(t,r))return;var i=this.snapToGrid(t.clientX,t.clientY);e.call(this,r,t,n,i.x,i.y)}}},onmagnet:function(t){this.magnetEvent(t,(function(t,e,n,r,i){t.onmagnet(e,r,i)}))},magnetpointerdblclick:function(t){this.magnetEvent(t,(function(t,e,n,r,i){t.magnetpointerdblclick(e,n,r,i)}))},magnetcontextmenu:function(t){this.options.preventContextMenu&&t.preventDefault(),this.magnetEvent(t,(function(t,e,n,r,i){t.magnetcontextmenu(e,n,r,i)}))},onlabel:function(t){var e=t.currentTarget,n=this.findView(e);if(n){if(t=Le(t),this.guard(t,n))return;var r=this.snapToGrid(t.clientX,t.clientY);n.onlabel(t,r.x,r.y)}},getPointerArgs:function(t){var e=Le(t),n=this.snapToGrid(e.clientX,e.clientY);return[e,n.x,n.y]},delegateDragEvents:function(t,e){e||(e={}),this.eventData({data:e},{sourceView:t||null,mousemoved:0}),this.delegateDocumentEvents(null,e),this.undelegateEvents()},guard:function(t,e){return"mousedown"===t.type&&2===t.button||!(!this.options.guard||!this.options.guard(t,e))||(t.data&&void 0!==t.data.guarded?t.data.guarded:!(e&&e.model&&e.model instanceof cr||this.svg===t.target||this.el===t.target||we.contains(this.svg,t.target)))},setGridSize:function(t){return this.options.gridSize=t,this.options.drawGrid&&this.drawGrid(),this},clearGrid:function(){return this.$grid&&this.$grid.css("backgroundImage","none"),this},_getGridRefs:function(){return this._gridCache||(this._gridCache={root:ye("svg",{width:"100%",height:"100%"},ye("defs")),patterns:{},add:function(t,e){ye(this.root.node.childNodes[0]).append(e),this.patterns[t]=e,this.root.append(ye("rect",{width:"100%",height:"100%",fill:"url(#"+t+")"}))},get:function(t){return this.patterns[t]},exist:function(t){return void 0!==this.patterns[t]}}),this._gridCache},setGrid:function(t){return this.clearGrid(),this._gridCache=null,this._gridSettings=[],(Array.isArray(t)?t:[t||{}]).forEach((function(t){this._gridSettings.push.apply(this._gridSettings,this._resolveDrawGridOption(t))}),this),this},_resolveDrawGridOption:function(t){var e=this.constructor.gridPatterns;if(mn(t)&&Array.isArray(e[t]))return e[t].map((function(t){return $e({},t)}));var n=t||{args:[{}]},r=Array.isArray(n),i=n.name;if(r||i||n.markup||(i="dot"),i&&Array.isArray(e[i])){var o=e[i].map((function(t){return $e({},t)})),a=Array.isArray(n.args)?n.args:[n.args||{}];Ue(a[0],ln(t,"args"));for(var s=0;s<a.length;s++)o[s]&&$e(o[s],a[s]);return o}return r?n:[n]},drawGrid:function(t){var e=this.options.gridSize;if(e<=1)return this.clearGrid();var n=Array.isArray(t)?t:[t],r=this.matrix(),i=this._getGridRefs();this._gridSettings.forEach((function(t,o){var a="pattern_"+o,s=pn(t,n[o],{sx:r.a||1,sy:r.d||1,ox:r.e||0,oy:r.f||0});s.width=e*(r.a||1)*(s.scaleFactor||1),s.height=e*(r.d||1)*(s.scaleFactor||1),i.exist(a)||i.add(a,ye("pattern",{id:a,patternUnits:"userSpaceOnUse"},ye(s.markup)));var u=i.get(a);Je(s.update)&&s.update(u.node.childNodes[0],s);var l=s.ox%s.width;l<0&&(l+=s.width);var c=s.oy%s.height;c<0&&(c+=s.height),u.attr({x:l,y:c,width:s.width,height:s.height})}));var o=(new XMLSerializer).serializeToString(i.root.node);return o="url(data:image/svg+xml;base64,"+btoa(o)+")",this.$grid.css("backgroundImage",o),this},updateBackgroundImage:function(t){var e=(t=t||{}).position||"center",n=t.size||"auto auto",r=this.scale(),i=this.translate();gn(e)&&(e=i.tx+r.sx*(e.x||0)+"px "+(i.ty+r.sy*(e.y||0))+"px"),gn(n)&&(n=(n=new ut(n).scale(r.sx,r.sy)).width+"px "+n.height+"px"),this.$background.css({backgroundSize:n,backgroundPosition:e})},drawBackgroundImage:function(t,e){if(t instanceof HTMLImageElement){if(this._background&&this._background.id===e.id){var n,r=(e=e||{}).size,i=e.repeat||"no-repeat",o=e.opacity||1,a=Math.abs(e.quality)||1,s=this.constructor.backgroundPatterns[hn(i)];if(Je(s)){t.width*=a,t.height*=a;var u=s(t,e);if(!(u instanceof HTMLCanvasElement))throw new Error("dia.Paper: background pattern must return an HTML Canvas instance");n=u.toDataURL("image/png"),i="repeat",gn(r)?(r.width*=u.width/t.width,r.height*=u.height/t.height):void 0===r&&(e.size={width:u.width/a,height:u.height/a})}else n=t.src,void 0===r&&(e.size={width:t.width,height:t.height});this.$background.css({opacity:o,backgroundRepeat:i,backgroundImage:"url("+n+")"}),this.updateBackgroundImage(e)}}else this.$background.css("backgroundImage","")},updateBackgroundColor:function(t){this.$el.css("backgroundColor",t||"")},drawBackground:function(t){if(t=t||{},this.updateBackgroundColor(t.color),t.image){t=this._background=Xe(t),Ne(t);var e=document.createElement("img");e.onload=this.drawBackgroundImage.bind(this,e,t),e.src=t.image}else this.drawBackgroundImage(null),this._background=null;return this},setInteractivity:function(t){this.options.interactive=t,He(this._views,"setInteractivity",t)},isDefined:function(t){return!!this.svg.getElementById(t)},defineFilter:function(t){if(!gn(t))throw new TypeError("dia.Paper: defineFilter() requires 1. argument to be an object.");var e=t.id,n=t.name;if(e||(e=n+this.svg.id+Ee(JSON.stringify(t))),!this.isDefined(e)){var r=ze,i=r[n]&&r[n](t.args||{});if(!i)throw new Error("Non-existing filter "+n);var o=$e({filterUnits:"objectBoundingBox",x:-1,y:-1,width:3,height:3},t.attrs,{id:e});ye(i,o).appendTo(this.defs)}return e},defineGradient:function(t){if(!gn(t))throw new TypeError("dia.Paper: defineGradient() requires 1. argument to be an object.");var e=this.svg,n=this.defs,r=t.type,i=t.id,o=void 0===i?r+e.id+Ee(JSON.stringify(t)):i,a=t.stops,s=t.attrs,u=void 0===s?{}:s;if(this.isDefined(o))return o;var l=tn(a).map((function(t){var e=t.offset,n=t.color,r=t.opacity;return ye("stop").attr({offset:e,"stop-color":n,"stop-opacity":Number.isFinite(r)?r:1})})),c=ye(r,u,l);return c.id=o,c.appendTo(n),o},definePattern:function(t){if(!gn(t))throw new TypeError("dia.Paper: definePattern() requires 1. argument to be an object.");var e=this.svg,n=this.defs,r=t.id,i=void 0===r?e.id+Ee(JSON.stringify(t)):r,o=t.markup,a=t.attrs,s=void 0===a?{}:a;if(!o)throw new TypeError("dia.Paper: definePattern() requires markup.");if(this.isDefined(i))return i;var u=ye("pattern",{patternUnits:"userSpaceOnUse"});if(u.id=i,u.attr(s),"string"==typeof o)u.append(ye(o));else{var l=_e(o).fragment;u.append(l)}return u.appendTo(n),i},defineMarker:function(t){if(!gn(t))throw new TypeError("dia.Paper: defineMarker() requires 1. argument to be an object.");var e=this.svg,n=this.defs,r=t.id,i=void 0===r?e.id+Ee(JSON.stringify(t)):r,o=t.markup,a=t.attrs,s=void 0===a?{}:a,u=t.markerUnits,l=void 0===u?"userSpaceOnUse":u;if(this.isDefined(i))return i;var c=ye("marker",{orient:"auto",overflow:"visible",markerUnits:l});if(c.id=i,c.attr(s),o)if("string"==typeof o)c.append(ye(o));else{var f=_e(o).fragment;c.append(f)}else{var h=t.type,d=ye(void 0===h?"path":h,ln(t,"type","id","markup","attrs","markerUnits"));c.append(d)}return c.appendTo(n),i}},{sorting:sa,Layers:Co,backgroundPatterns:{flipXy:function(t){var e=document.createElement("canvas"),n=t.width,r=t.height;e.width=2*n,e.height=2*r;var i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.setTransform(-1,0,0,-1,e.width,e.height),i.drawImage(t,0,0,n,r),i.setTransform(-1,0,0,1,e.width,0),i.drawImage(t,0,0,n,r),i.setTransform(1,0,0,-1,0,e.height),i.drawImage(t,0,0,n,r),e},flipX:function(t){var e=document.createElement("canvas"),n=t.width,r=t.height;e.width=2*n,e.height=r;var i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.translate(2*n,0),i.scale(-1,1),i.drawImage(t,0,0,n,r),e},flipY:function(t){var e=document.createElement("canvas"),n=t.width,r=t.height;e.width=n,e.height=2*r;var i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.translate(0,2*r),i.scale(1,-1),i.drawImage(t,0,0,n,r),e},watermark:function(t,e){e=e||{};var n=t.width,r=t.height,i=document.createElement("canvas");i.width=3*n,i.height=3*r;for(var o=i.getContext("2d"),a=vn(e.watermarkAngle)?-e.watermarkAngle:-20,s=T(a),u=i.width/4,l=i.height/4,c=0;c<4;c++)for(var f=0;f<4;f++)(c+f)%2>0&&(o.setTransform(1,0,0,1,(2*c-1)*u,(2*f-1)*l),o.rotate(s),o.drawImage(t,-n/2,-r/2,n,r));return i}},gridPatterns:{dot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(t,e){ye(t).attr({width:e.thickness*e.sx,height:e.thickness*e.sy,fill:e.color})}}],fixedDot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(t,e){var n=e.sx<=1?e.thickness*e.sx:e.thickness;ye(t).attr({width:n,height:n,fill:e.color})}}],mesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(t,e){var n,r=e.width,i=e.height,o=e.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",ye(t).attr({d:n,stroke:e.color,"stroke-width":e.thickness})}}],doubleMesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(t,e){var n,r=e.width,i=e.height,o=e.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",ye(t).attr({d:n,stroke:e.color,"stroke-width":e.thickness})}},{color:"#000000",thickness:3,scaleFactor:4,markup:"path",update:function(t,e){var n,r=e.width,i=e.height,o=e.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",ye(t).attr({d:n,stroke:e.color,"stroke-width":e.thickness})}}]}}),da=An.extend({tagName:"g",className:"tools",svgElement:!0,tools:null,isRendered:!1,options:{tools:null,relatedView:null,name:null},configure:function(t){var e=(t=$e(this.options,t)).tools;if(!Array.isArray(e))return this;var n=t.relatedView;if(!(n instanceof vi))return this;for(var r=this.tools=[],i=0,o=e.length;i<o;i++){var a=e[i];a instanceof Pn&&(a.configure(n,this),this.vel.append(a.el),r.push(a))}return this.isRendered=!1,n.requestUpdate(n.getFlag("TOOLS")),this},getName:function(){return this.options.name},update:function(t){t||(t={});var e=this.tools;if(!e)return this;for(var n=this.isRendered,r=0,i=e.length;r<i;r++){var o=e[r];n?t.tool!==o.cid&&o.isVisible()&&o.update():o.render()}return n||(this.mount(),this.blurTool(),this.isRendered=!0),this},focusTool:function(t){var e=this.tools;if(!e)return this;for(var n=0,r=e.length;n<r;n++){var i=e[n];t===i?i.show():i.hide()}return this},blurTool:function(t){var e=this.tools;if(!e)return this;for(var n=0,r=e.length;n<r;n++){var i=e[n];i===t||i.isVisible()||(i.show(),i.update())}return this},hide:function(){return this.focusTool(null)},show:function(){return this.blurTool(null)},onRemove:function(){var t=this.tools;if(!t)return this;for(var e=0,n=t.length;e<n;e++)t[e].remove();this.tools=null},mount:function(){var t=this.options,e=this.el,n=t.relatedView,r=t.layer,i=void 0===r?Co.TOOLS:r,o=t.z;return n&&(i?n.paper.getLayerView(i).insertSortedNode(e,o):n.el.appendChild(e)),this}}),pa=b(4179),ga=b.n(pa),va=b(4459),ma=b.n(va),ya=b(1723),ba=b(8718),wa=b.n(ba);b(9876);var xa=function(t,e){var n=e.width,r=e.lineHeight,i=De(t,{width:n},{wordWrap:"break-word"}),o=i.split("\n").length;return{brokenText:i,textHeight:(o-1)*r}},Sa=function(t,e){return null!=e&&e.includes(t)?.3:1},ka=function(t,e){switch(t){case"N":return{bodyColor:"rgba(78, 175, 82, 0.1)",strokeColor:x().$greenCheck,label:"green",opacity:Sa("added",e)};case"E":return{bodyColor:"rgba(43, 87, 151, 0.1)",strokeColor:x().$colorDocument,label:"blue",opacity:Sa("changed",e)};case"D":return{bodyColor:"rgba(202, 62, 55, 0.1)",strokeColor:x().$colorVideo,label:"red",opacity:Sa("removed",e)};default:return{bodyColor:x().$white,strokeColor:"#757575",label:"grey",opacity:Sa("no changes",e)}}},_a="Step#1",Ea={},Aa=Ur.define("qad.Question",{ports:{groups:{outWithLink:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$lightGrey,r:10}}},outWithoutLink:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$popularGrey,r:10}}},red:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$colorVideo,r:10}}},green:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$greenCheck,r:10}}},blue:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$colorDocument,r:10}}},grey:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:"#757575",r:10}}}}},attrs:{".body":{magnet:"passive",refWidth:"100%",refHeight:"100%",rx:5,stroke:ya.colors.$dark,fill:"white",cursor:"pointer"},text:{fontSize:14,lineHeight:20,fontFamily:"Open Sans, Arial, sans-serif",fill:ya.colors.$dark,fontWeight:700,cursor:"default"},".question-text":{xAlignment:"start",refX:50,refY:20},".edit-button":{fill:ya.colors.$paleBlue,event:"step:edit",width:20,height:20,refX:"100%",refX2:-5,refY:5,xAlignment:"right",cursor:"pointer",title:"Click to edit"},".option-rect":{rx:3,ry:3,stroke:"none",fill:"none",height:30,refWidth:"100%"},".option-order-number":{fill:ya.colors.$paleBlue,xAlignment:"middle",refX:32,yAlignment:"middle",refY:15},".option-order-box":{fill:ya.colors.$bgColor,width:24,height:24,xAlignment:20,yAlignment:"middle",refY:15,rx:5},".option-text":{fontSize:14,lineHeight:20,fill:ya.colors.$paleBlue,refX:50,yAlignment:-10},".question-icon":{x:20,y:18}}},{markup:'<rect class="body"/><text class="question-text"/><g class="edit-button"><path fill-opacity="0" d="M0 0h15v15H0z"/><path d="M0 11.873l9.22-9.22 3.126 3.124-9.221 9.22H0v-3.124zM14.754 2.19a.835.835 0 0 1 0 1.179L13.23 4.894l-3.125-3.125L11.63.244a.835.835 0 0 1 1.18 0l1.945 1.946z"/></g><g class="options" />',optionMarkup:'<g class="option"><rect class="option-rect"/><rect class="option-order-box" /><text class="option-order-number"/><text class="option-text"/></g>',questionMarkup:'<svg class="question-icon" width="14px" height="14px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Page-1" stroke="none" stroke-width="1" fill-rule="evenodd">\n <g id="question" fill-rule="nonzero">\n <path d="M25,0 C11.215,0 0,11.215 0,25 C0,38.785 11.215,50 25,50 C38.785,50 50,38.785 50,25 C50,11.215 38.785,0 25,0 Z M25,45.455\n C13.721,45.455 4.545,36.279 4.545,25 C4.545,13.722 13.721,4.545 25,4.545 C36.279,4.545 45.455,13.722 45.455,25 C45.455,36.279 36.279,45.455 25,45.455 Z"/>\n <path d="M26.975,35.296 C27.041,34.44 26.795,33.716 26.235,33.123 C25.675,32.531 24.967,32.235 24.111,32.235 C23.321,32.235 22.63,32.498\n 22.037,33.025 C21.444,33.551 21.148,34.243 21.148,35.099 C21.148,35.955 21.412,36.663 21.938,37.222 C22.465,37.782 23.123,38.062 23.914,38.062\n C24.77,38.062 25.494,37.815 26.086,37.321 C26.679,36.827 26.976,36.152 26.976,35.296 L26.975,35.296 Z M31.815,22.654 C32.605,21.535 33,20.35\n 33,19.1 C33,16.927 32.177,15.215 30.53,13.964 C28.95,12.779 26.91,12.186 24.407,12.186 C22.564,12.186 21.017,12.614 19.765,13.47 C17.922,14.72\n 17,16.96 17,20.185 L21.84,20.185 C21.84,18.802 21.971,17.914 22.235,17.519 C22.827,16.531 23.683,16.037 24.802,16.037 C25.922,16.037 26.745,16.399\n 27.272,17.123 C27.798,17.848 28.062,18.605 28.062,19.395 C28.062,19.922 27.798,20.58 27.272,21.37 C27.14,21.634 26.811,21.963 26.284,22.358\n C24.572,23.346 23.42,24.333 22.827,25.321 C22.3,26.177 21.971,27.527 21.84,29.371 C21.84,29.634 21.971,29.765 22.235,29.765 L26.086,29.765\n C26.416,29.765 26.58,29.634 26.58,29.37 C26.58,28.646 26.646,28.02 26.778,27.494 C26.975,26.901 27.37,26.342 27.963,25.814 L29.346,24.926\n C30.596,24.004 31.42,23.246 31.815,22.654 Z"/>\n </g>\n </g>\n</svg>',solutionMarkup:'<svg class="question-icon" viewBox="0 0 14 14" width="14" height="14" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 0c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.14-7-7 3.14-7 7-7zm0 1.273A5.734 5.734 0 0 0 1.273 7 5.734 5.734 0 0 0 7 12.727 5.734 5.734 0 0 0 12.727 7 5.734 5.734 0 0 0 7 1.273zm2.748 3.111a.61.61 0 1 1 .862.863L6.244 9.613a.61.61 0 0 1-.863 0L3.387 7.62a.61.61 0 1 1 .863-.862l1.563 1.562z" fill-rule="evenodd"/>\n</svg>',linkMarkup:'<svg class="question-icon" width="14px" height="14px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" xml:space="preserve">\n <g id="Symbols">\n <g id="menu_x2F_open_x5F_link" transform="translate(-21.000000, -12.000000)">\n <path id="Link-Icon" d="M29.4,13.1c0.7-0.7,1.6-1.1,2.7-1.1c1,0,1.9,0.4,2.7,1.1l1.1,1.1c0.7,0.7,1.1,1.6,1.1,2.7\n s-0.4,1.9-1.1,2.7l-3.6,3.6c-1.1,1.1-2.5,1.4-3.9,0.8c-0.5-0.2-1-0.5-1.3-0.8L25.9,22l1.6-1.6l1.1,1.1c0.3,0.3,0.7,0.5,1.1,0.5\n s0.8-0.2,1.1-0.5l3.6-3.6c0.3-0.3,0.5-0.7,0.5-1.1s-0.2-0.8-0.5-1.1l-1.1-1.1c-0.3-0.3-0.7-0.5-1.1-0.5c-0.4,0-0.8,0.2-1.1,0.5\n l-0.5,0.5c-0.4-0.2-0.8-0.4-1.2-0.5s-0.8-0.1-1.1-0.1H28L29.4,13.1z M29.8,15.9c0.5,0.2,0.9,0.5,1.3,0.9l1.1,1.1l-1.6,1.6\n l-1.1-1.1c-0.3-0.3-0.7-0.5-1.1-0.5s-0.8,0.2-1.1,0.5L23.7,22c-0.3,0.3-0.5,0.7-0.5,1.1s0.2,0.8,0.5,1.1l1.1,1.1\n c0.3,0.3,0.7,0.5,1.1,0.5s0.8-0.2,1.1-0.5l0.5-0.5c0.4,0.2,0.8,0.4,1.2,0.5s0.8,0.1,1.1,0.1h0.4l-1.6,1.6C27.9,27.6,27,28,25.9,28\n c-1.1,0-1.9-0.4-2.7-1.1l-1.1-1.1c-0.7-0.7-1.1-1.6-1.1-2.7c0-1.1,0.4-1.9,1.1-2.7l3.6-3.6c0.5-0.5,1.2-0.9,1.9-1\n C28.5,15.5,29.1,15.6,29.8,15.9z"/>\n </g>\n </g>\n</svg>',initialStepMarkup:function(t){return'<svg class="first-step-icon" height="22px" width="22px" xmlns="http://www.w3.org/2000/svg" >\n <circle class="first-step-icon__part" r="12" fill="#606d87" />\n <g id="Symbols">\n <svg viewBox="11 13 28 28">\n <path title="aaffaa" class="first-step-icon__part" d="m12.36 6 .4 2H18v6h-3.36l-.4-2H7V6h5.36M14 4H5v17h2v-7h5.6l.4 2h7V6h-5.6L14 4z" fill="#fff"/>\n </svg>\n </g>\n <title class="first-step-icon__text">'.concat(t,"</title>\n</svg>")},labelMarkup:'<g><rect class="label" /><text class="label-text" /></g>',initialize:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];Ur.prototype.initialize.apply(this,e);var r=this.get("question")||"",i=this.get("url"),o=this.get("id"),a=this.get("isSolution"),s=this.get("isLink"),u=this.get("interactive"),l=this.get("color"),c=this.get("position"),f=this.get("boxColors"),h=this.get("isReadOnly"),d=this.get("isCompare"),p=this.get("labelText"),g=xa(r,{width:230,lineHeight:20}),v=g.brokenText,m=g.textHeight,y=this.get("bodyTitle")||"Double click to edit";wa()(i)&&s&&this.attr(".body",{fill:ya.colors.$red,opacity:.1}),(o===_a||a)&&this.attr(".body",{stroke:ya.colors.$catchyBlue,strokeWidth:2}),(a||s)&&(this.attr(".question-text",{refX:55,refY:25}),this.attr(".question-icon",{x:25,y:23})),l&&(this.attr(".body",{stroke:l,strokeWidth:2}),this.attr(".question-icon",{fill:l})),this.attr(".first-step-icon__part",{cursor:"pointer"}),f.bodyColor&&d&&(this.attr(".body",{stroke:f.strokeColor,strokeWidth:2,fill:f.bodyColor,opacity:f.opacity}),this.attr(".label-text",{text:p,y:-8,x:5,fill:"#fff"}),this.attr(".label",{fill:f.strokeColor,width:8.4*p.length+10,height:20,opacity:f.opacity,y:-22,rx:3}),this.attr(".question-icon",{fill:f.strokeColor,opacity:f.opacity}),this.attr(".question-text",{opacity:f.opacity}),this.attr(".options",{opacity:f.opacity})),c&&this.moveBox(c),this.attr(".body",{title:u||h?y:"",cursor:u||h?"pointer":"default"}),this.attr({".question-text":{text:v,title:r}}),this.attr(".options/refY",45+m),this.adjustSize(m),this.renderOptions(m)},renderOptions:function(t){var e=0,n=0,r={};this.get("options").forEach(function(i,o){var a=".option-".concat(i.id),s=i.text||"",u=xa(s,{width:200,lineHeight:20}),l=u.brokenText,c=u.textHeight;r[a]={transform:"translate(0, ".concat(e,")")},r["".concat(a," .option-order-number")]={text:o+1},r["".concat(a," .option-text")]={text:l,title:i.text,refY:15},e+=30+c;var f=45+t+20;this.addPort({group:i.group,id:i.id,args:{y:f+n-5,x:280},attrs:{circle:{opacity:i.opacity}}}),n+=c+30}.bind(this)),this.attr(r)},adjustSize:function(t){var e=this.get("isLink"),n=this.get("isSolution"),r=this.get("options")||[],i=0;r.forEach((function(t){var e=t.text||"",n=xa(e,{width:200,lineHeight:20}).textHeight;i+=n}));var o=30*r.length+(e||n?35:45)+(e||n?25:20)+t+i;this.resize(300,o)},moveBox:function(t){this.position(t.x,t.y)}}),Pa=yi.extend({renderMarkup:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];yi.prototype.renderMarkup.apply(this,e),this.renderOptions(),this.renderIcons(),this.renderLabels()},renderOptions:function(){this.model.get("options").forEach(function(t){var e="option-".concat(t.id),n=ye(this.model.optionMarkup).addClass(e);n.attr("option-id",t.id),this.$(".options").append(n.node)}.bind(this))},renderIcons:function(){var t=this.model.get("isLink"),e=this.model.get("isSolution"),n="Step#1"===this.model.get("id"),r=this.model.get("highlightFirstStep"),i=this.model.get("firstStepTitle");t?this.$(".body").parent().append(ye(this.model.linkMarkup).node):e?this.$(".body").parent().append(ye(this.model.solutionMarkup).node):this.$(".body").parent().append(ye(this.model.questionMarkup).node),r&&n&&this.$(".body").parent().append(ye(this.model.initialStepMarkup(i)).node)},renderLabels:function(){this.$(".body").parent().append(ye(this.model.labelMarkup).node)}});Object.assign(Ea,{qad:{Question:Aa,QuestionView:Pa},standard:o});var Ca=b(5082),Ta=b.n(Ca),Na=b(6414),La=b.n(Na),Ma=b(2566),Oa=b.n(Ma),Ra=b(6985),Fa=b.n(Ra),Da=b(5935),ja=b.n(Da),Ia=function(){},Ba=b(6062),za=b.n(Ba),Va=b(2780);za()(Va.Z,{insert:"head",singleton:!1}),Va.Z.locals;var $a=function(t){var e=t.tree,n=(0,v.useRef)(),r=(0,v.useRef)(),i=(0,v.useRef)(e);return(0,v.useEffect)((function(){n.current&&(r.current=function(t){var e=t.el,n=t.selectedLink,r=t.asyncRender,i=void 0!==r&&r,o=t.onLinkConnect,a=void 0===o?Ia:o,s=t.onLinkDisconnect,u=void 0===s?Ia:s,l=t.onStepEdit,c=void 0===l?Ia:l,f=t.onPaperClick,h=void 0===f?Ia:f,d=t.onCellMousedDown,p=void 0===d?Ia:d,g=t.onCellMousedUp,v=void 0===g?Ia:g,m=t.interactive,y=t.isReadOnly,b=void 0!==y&&y,w=t.isStatic,S=void 0!==w&&w,k=t.isCompare,_=void 0!==k&&k,E=t.uncheckedChanges,A=t.labelsText,P=void 0===A?{addedLabel:"Added",removedLabel:"Removed",changedLabel:"Changed",noChangesLabel:"No changes"}:A,C=t.onPan,T=void 0===C?Ia:C,N=t.highlightFirstStep,L=void 0!==N&&N,M=t.firstStepTitle,O=new fi({},{cellNamespace:Ea}),R=new ha({el:e,interactive:m,async:i,model:O,height:"auto",width:"100%",linkPinning:!1,multiLinks:!1,clickThreshold:1,cellViewNamespace:Ea,defaultRouter:{name:"manhattan",args:{side:"right",step:10,maximumLoops:5e3,paddingBox:{top:0,left:0,right:0,bottom:0},padding:{top:10,left:20,right:10,bottom:20},startDirections:["right"],endDirections:["top","bottom","left"],excludeTypes:["qad.Question"]}},defaultConnector:{name:"rounded",args:{radius:20}},defaultLink:new ai({attrs:{line:{stroke:x().$lightGrey,strokeWidth:2,targetMarker:{d:"M 13 -7.5 0 0 13 7.5"}}}}),validateConnection:function(t,e,n){return t!==n&&!n.model.isLink()}});function F(){O.getLinks().forEach((function(t){t.toFront()}))}function D(t){var e=x().$lightGrey,n=x().$dark,r=t.model.attr("line/stroke")===n;t.model.attr("line/stroke",r?e:n),t.model.attr("line/stroke-width",r?2:4),t.sourceMagnet.setAttribute("fill",r?e:n),t.targetView.model.attr(".body/stroke",r?t.targetView.model.attributes.color||e:n)}function j(){n&&(n=null)}return S||function(){function t(t,e){e.stopPropagation();var n=t.model.id;c(n.toString())}R.on("blank:pointerclick",h),m&&(R.on("link:connect",(function(t){var e=t.model,n=e.source(),r=e.target();t.sourceMagnet.setAttribute("fill",x().$lightGrey),a({source:n,target:r})})),R.on("link:disconnect",(function(t){var e=t.model.source();t.sourceMagnet.setAttribute("fill",x().$popularGrey),u({source:e})})),R.on("cell:pointermove",(function(t){t.model.toFront()})),R.on("cell:pointerdown",(function(t){p(t,O)})),R.on("cell:pointerup",(function(t,e,n,r){v(t,O,e,n,r)})),R.on("link:mouseenter",(function(t){!function(t){var e=new Rn({distance:30,action:function(t){this.model.remove({ui:!0}),this.sourceView&&this.notify("link:disconnect",t,this.sourceView,this.sourceMagnet,"source")}}),n=new da({tools:[e]});t.addTools(n)}(t),t.model.toFront()})),R.on("link:mouseleave",(function(t){t.removeTools(),n&&n.model.toFront()})),R.on("link:pointerclick",(function(t){var e;if(!Ta()(n)){if(n&&D(n),(null===(e=n)||void 0===e?void 0:e.model.id)!==t.model.id)return D(t),void(n=t);j()}})),R.on("link:pointerdblclick",(function(t){T(t)}))),R.on("cell:pointerdblclick",t),R.on("cell:pointerclick",t)}(),Object.freeze({scaleContentToFit:function(){R.scaleContentToFit({padding:30})},autoLayoutNodes:function(){hi.layout(O,{setLinkVertices:!1,dagre:ga(),graphlib:ma(),nodeSep:0,edgeSep:0,rankSep:0,marginX:0,rankDir:"LR",ranker:"network-simplex"})},nodesToJSON:function(t,e){var n=[];return t.forEach((function(r){var i,o,a,s,u,l,c,f=Oa()(r,"question.answers")||[],h=Fa()(r,"url")&&La()(r.type,"Link"),d=!Fa()(r,"question.answers")&&!h,p=ka(r.diffType||(null===(i=r.settings)||void 0===i||null===(o=i.position)||void 0===o?void 0:o.diffType),E),g=function(t,e){switch(t){case"N":return(null==e?void 0:e.addedLabel)||"Added";case"E":return(null==e?void 0:e.changedLabel)||"Changed";case"D":return(null==e?void 0:e.removedLabel)||"Removed";default:return(null==e?void 0:e.noChangesLabel)||"No changes"}}(r.diffType,P),v=f.map((function(e,i){var o=e.nextStep,a=e.title,s=e.id,u=e.diffType,l=ka((null==o?void 0:o.diffType)||u,E),c=l.label||p.label;return o&&ja()(t,{id:o.id})&&r.id&&n.push({id:"".concat(r.id,"-").concat(o.id,"-").concat(i),type:"standard.Link",source:{id:r.id,port:s},target:{id:o.id},attrs:{line:{stroke:_&&(l.strokeColor||p.strokeColor)||x().$lightGrey,targetMarker:{d:"M 13 -7.5 0 0 13 7.5"},opacity:l.opacity||1}}}),{id:s,text:a,group:_&&c?c:o?"outWithLink":"outWithoutLink",opacity:l.opacity||p.opacity}}));n.push({id:r.id,url:r.url,type:"qad.Question",question:Oa()(r,"question.title",r.title),isSolution:d,isLink:h,options:v,interactive:m,color:(null===(a=r.settings)||void 0===a?void 0:a.borderColor)||(d?x().$dark:h?x().$yellow:x().$catchyBlue),boxColors:p,isReadOnly:null!=b?b:S,isCompare:_,highlightFirstStep:L,labelText:g,firstStepTitle:M,position:{x:(null===(s=r.settings)||void 0===s||null===(u=s.position)||void 0===u?void 0:u.x)||0,y:(null===(l=r.settings)||void 0===l||null===(c=l.position)||void 0===c?void 0:c.y)||0},bodyTitle:Oa()(e,"bodyTitle")||"Double click to edit",attrs:{".edit-button":{title:Oa()(e,"editButtonTitle")||"Click to edit"}}})})),{cells:n}},fromJSON:function(t,e){O.fromJSON(t),e||F()},resetSelectedLink:j,pushLinksToFront:F,paper:R,graph:O})}({el:n.current,isStatic:!0,highlightFirstStep:!0,interactive:!1}),setTimeout((function(){var t,e,n,o,a,s,u,l;t=i.current,u=null==r||null===(e=r.current)||void 0===e?void 0:e.nodesToJSON(t),l=null===(n=0===(null===(o=i.current)||void 0===o?void 0:o.filter((function(t){var e;return null===(e=t.settings)||void 0===e?void 0:e.position})).length))||void 0===n||n,null==r||null===(a=r.current)||void 0===a||a.fromJSON(u),l&&(null==r||null===(s=r.current)||void 0===s||s.autoLayoutNodes())}),0))}),[]),m().createElement("div",{"data-interactive":!1,className:"Graph__graph-holder",id:"graph-holder",style:{padding:12},ref:n})}}(),w}()},"object"==h(e)&&"object"==h(t)?t.exports=a(n(1591),n(4959),n(6370),n(672),n(490),n(491),n(3153),n(5550),n(9276),n(8954),n(6550),n(5373),n(937)):(i=[n(1591),n(4959),n(6370),n(672),n(490),n(491),n(3153),n(5550),n(9276),n(8954),n(6550),n(5373),n(937)],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.amdO={},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n.r(r),n.d(r,{renderStaticDTDiagram:()=>o});var t=n(1591),e=n(2609),i=n(9867),o=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#diagram-container",o=document.querySelector(r);e.createRoot(o).render(t.createElement(i.StaticTree,{tree:n},null))}})();var i=window;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
2
+ (()=>{var t={8948:function(t,e,n){var r,i,o,a;function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}(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 u(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 l(t){return(l="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)}t=n.nmd(t),"undefined"!=typeof self&&self,a=function(){return function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{compare:function(){return N},orderBy:function(){return C}});var n=function(t,e){return t<e?-1:t>e?1:0},r=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,i=/^\s+|\s+$/g,o=/\s+/g,a=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=/^0+[1-9]{1}[0-9]*$/,f=/[^\x00-\x80]/,h=function(t,e){var n=t.localeCompare(e);return n?n/Math.abs(n):0},d=function(t,e){return t<e?-1:t>e?1:0},p=function(t,e){return t.value===e.value?0:void 0!==t.parsedNumber&&void 0!==e.parsedNumber?n(t.parsedNumber,e.parsedNumber):t.chunks&&e.chunks?function(t,e){for(var r=t.length,i=e.length,o=Math.min(r,i),a=0;a<o;a++){var s=t[a],u=e[a];if(s.normalizedString!==u.normalizedString){if(""===s.normalizedString!=(""===u.normalizedString))return""===s.normalizedString?-1:1;if(void 0!==s.parsedNumber&&void 0!==u.parsedNumber){var l=n(s.parsedNumber,u.parsedNumber);return 0===l?d(s.normalizedString,u.normalizedString):l}return void 0!==s.parsedNumber||void 0!==u.parsedNumber?void 0!==s.parsedNumber?-1:1:f.test(s.normalizedString+u.normalizedString)&&s.normalizedString.localeCompare?h(s.normalizedString,u.normalizedString):d(s.normalizedString,u.normalizedString)}}return r>o||i>o?r<=o?-1:1:0}(t.chunks,e.chunks):function(t,e){return(t.chunks?!e.chunks:e.chunks)?t.chunks?-1:1:(t.isNaN?!e.isNaN:e.isNaN)?t.isNaN?-1:1:(t.isSymbol?!e.isSymbol:e.isSymbol)?t.isSymbol?-1:1:(t.isObject?!e.isObject:e.isObject)?t.isObject?-1:1:(t.isArray?!e.isArray:e.isArray)?t.isArray?-1:1:(t.isFunction?!e.isFunction:e.isFunction)?t.isFunction?-1:1:(t.isNull?!e.isNull:e.isNull)?t.isNull?-1:1:0}(t,e)},g=function(t){return"function"==typeof t?t:function(e){if(Array.isArray(e)){var n=Number(t);if(Number.isInteger(n))return e[n]}else if(e&&"object"==l(e)&&"function"!=typeof t)return e[t];return e}},v=function(t){if(0!==t.length){var e=Number(t);if(!Number.isNaN(e))return e}},m=function(t){return t.replace(o," ").replace(i,"")},y=function(t,e,n){if(a.test(t)&&(!c.test(t)||0===e||"."!==n[e-1]))return v(t)||0},b=function(t,e,n){return{parsedNumber:y(t,e,n),normalizedString:m(t)}},w=function(t){return function(t){return t.replace(r,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}(t).map(b)},x=function(t){return"function"==typeof t},S=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},k=function(t){return null===t},_=function(t){return!(null===t||"object"!=l(t)||Array.isArray(t)||t instanceof Number||t instanceof String||t instanceof Boolean||t instanceof Date)},E=function(t){return"symbol"==l(t)},A=function(t){return void 0===t},P=function(t){if("string"==typeof t||t instanceof String||("number"==typeof t||t instanceof Number)&&!S(t)||"boolean"==typeof t||t instanceof Boolean||t instanceof Date){var e=function(t){return"boolean"==typeof t||t instanceof Boolean?Number(t).toString():"number"==typeof t||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():"string"==typeof t||t instanceof String?t.toLowerCase().replace(i,""):""}(t),n=function(t){var e=v(t);return void 0!==e?e:function(t){try{var e=Date.parse(t);return!Number.isNaN(e)&&u.test(t)?e:void 0}catch(t){return}}(t)}(e);return{parsedNumber:n,chunks:w(n?"".concat(n):e),value:t}}return{isArray:Array.isArray(t),isFunction:x(t),isNaN:S(t),isNull:k(t),isObject:_(t),isSymbol:E(t),isUndefined:A(t),value:t}},C=function(t,e,n){return t&&Array.isArray(t)?function(t,e,n){var r=e.length?e.map(g):[function(t){return t}],i=t.map((function(t,e){return{index:e,values:r.map((function(e){return e(t)})).map(P)}}));return i.sort((function(t,e){return function(t,e,n){for(var r=t.index,i=t.values,o=e.index,a=e.values,s=i.length,u=n.length,l=0;l<s;l++){var c=l<u?n[l]:null;if(c&&"function"==typeof c){var f=c(i[l].value,a[l].value);if(f)return f}else{var h=p(i[l],a[l]);if(h)return h*("desc"===c?-1:1)}}return r-o}(t,e,n)})),i.map((function(e){return function(t,e){return t[e]}(t,e.index)}))}(t,function(t){if(!t)return[];var e=Array.isArray(t)?s(t):[t];return e.some((function(t){return"string"!=typeof t&&"number"!=typeof t&&"function"!=typeof t}))?[]:e}(e),function(t){if(!t)return[];var e=Array.isArray(t)?s(t):[t];return e.some((function(t){return"asc"!==t&&"desc"!==t&&"function"!=typeof t}))?[]:e}(n)):[]},T=function(t){return"string"==typeof t&&("asc"===t||"desc"===t)},N=function(t){return function(t){return function(e,n){var r=P(e),i=P(n);return p(r,i)*("desc"===t.order?-1:1)}}(function(t){var e="asc";return"string"==typeof t&&T(t)?e=t:t&&"object"==l(t)&&t.order&&T(t.order)&&(e=t.order),{order:e}}(t))};return e}()},"object"==l(e)&&"object"==l(t)?t.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},9276:(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="object"==("undefined"==typeof self?"undefined":a(self))&&self.self===self&&self||"object"==(void 0===n.g?"undefined":a(n.g))&&n.g.global===n.g&&n.g,r=[n(6388),n(5550),e],void 0===(i=function(t,e,n){o.Backbone=function(t,e,n,r){var i=t.Backbone,o=Array.prototype.slice;e.VERSION="1.4.1",e.$=r,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s,u=e.Events={},l=/\s+/,c=function t(e,r,i,o,s){var u,c=0;if(i&&"object"===a(i)){void 0!==o&&"context"in s&&void 0===s.context&&(s.context=o);for(u=n.keys(i);c<u.length;c++)r=t(e,r,u[c],i[u[c]],s)}else if(i&&l.test(i))for(u=i.split(l);c<u.length;c++)r=e(r,u[c],o,s);else r=e(r,i,o,s);return r};u.on=function(t,e,n){return this._events=c(f,this._events||{},t,e,{context:n,ctx:this,listening:s}),s&&((this._listeners||(this._listeners={}))[s.id]=s,s.interop=!1),this},u.listenTo=function(t,e,r){if(!t)return this;var i=t._listenId||(t._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=s=o[i];a||(this._listenId||(this._listenId=n.uniqueId("l")),a=s=o[i]=new m(this,t));var u=h(t,e,r,this);if(s=void 0,u)throw u;return a.interop&&a.on(e,r),this};var f=function(t,e,n,r){if(n){var i=t[e]||(t[e]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return t},h=function(t,e,n,r){try{t.on(e,n,r)}catch(t){return t}};u.off=function(t,e,n){return this._events?(this._events=c(d,this._events,t,e,{context:n,listeners:this._listeners}),this):this},u.stopListening=function(t,e,r){var i=this._listeningTo;if(!i)return this;for(var o=t?[t._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(e,r,this),s.interop&&s.off(e,r)}return n.isEmpty(i)&&(this._listeningTo=void 0),this};var d=function(t,e,r,i){if(t){var o,a=i.context,s=i.listeners,u=0;if(e||a||r){for(o=e?[e]:n.keys(t);u<o.length;u++){var l=t[e=o[u]];if(!l)break;for(var c=[],f=0;f<l.length;f++){var h=l[f];if(r&&r!==h.callback&&r!==h.callback._callback||a&&a!==h.context)c.push(h);else{var d=h.listening;d&&d.off(e,r)}}c.length?t[e]=c:delete t[e]}return t}for(o=n.keys(s);u<o.length;u++)s[o[u]].cleanup()}};u.once=function(t,e,n){var r=c(p,{},t,e,this.off.bind(this));return"string"==typeof t&&null==n&&(e=void 0),this.on(r,e,n)},u.listenToOnce=function(t,e,n){var r=c(p,{},e,n,this.stopListening.bind(this,t));return this.listenTo(t,r)};var p=function(t,e,r,i){if(r){var o=t[e]=n.once((function(){i(e,o),r.apply(this,arguments)}));o._callback=r}return t};u.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),r=0;r<e;r++)n[r]=arguments[r+1];return c(g,this._events,t,void 0,n),this};var g=function(t,e,n,r){if(t){var i=t[e],o=t.all;i&&o&&(o=o.slice()),i&&v(i,r),o&&v(o,[e].concat(r))}return t},v=function(t,e){var n,r=-1,i=t.length,o=e[0],a=e[1],s=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e);return}},m=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0};m.prototype.on=u.on,m.prototype.off=function(t,e){var n;this.interop?(this._events=c(d,this._events,t,e,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},m.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},u.bind=u.on,u.unbind=u.off,n.extend(e,u);var y=e.Model=function(t,e){var r=t||{};e||(e={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(r=this.parse(r,e)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(y.prototype,u,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(null==t)return this;var i;if("object"===a(t)?(i=t,r=e):(i={})[t]=e,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,s=r.silent,u=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var c=this.attributes,f=this.changed,h=this._previousAttributes;for(var d in i)e=i[d],n.isEqual(c[d],e)||u.push(d),n.isEqual(h[d],e)?delete f[d]:f[d]=e,o?delete c[d]:c[d]=e;if(this.idAttribute in i){var p=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,p,r)}if(!s){u.length&&(this._pending=r);for(var g=0;g<u.length;g++)this.trigger("change:"+u[g],this,c[u[g]],r)}if(l)return this;if(!s)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&n.clone(this.changed);var e,r=this._changing?this._previousAttributes:this.attributes,i={};for(var o in t){var a=t[o];n.isEqual(r[o],a)||(i[o]=a,e=!0)}return!!e&&i},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,r=t.success;return t.success=function(n){var i=t.parse?e.parse(n,t):n;if(!e.set(i,t))return!1;r&&r.call(t.context,e,n,t),e.trigger("sync",e,n,t)},H(this,t),this.sync("read",this,t)},save:function(t,e,r){var i;null==t||"object"===a(t)?(i=t,r=e):(i={})[t]=e;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var s=this,u=r.success,l=this.attributes;r.success=function(t){s.attributes=l;var e=r.parse?s.parse(t,r):t;if(o&&(e=n.extend({},i,e)),e&&!s.set(e,r))return!1;u&&u.call(r.context,s,t,r),s.trigger("sync",s,t,r)},H(this,r),i&&o&&(this.attributes=n.extend({},l,i));var c=this.isNew()?"create":r.patch?"patch":"update";"patch"!==c||r.attrs||(r.attrs=i);var f=this.sync(c,this,r);return this.attributes=l,f},destroy:function(t){t=t?n.clone(t):{};var e=this,r=t.success,i=t.wait,o=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){i&&o(),r&&r.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var a=!1;return this.isNew()?n.defer(t.success):(H(this,t),a=this.sync("delete",this,t)),i||o(),a},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||q();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;return!r||(this.trigger("invalid",this,r,n.extend(e,{validationError:r})),!1)}});var b=e.Collection=function(t,e){e||(e={}),this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},x={add:!0,remove:!1},S=function(t,e,n){n=Math.min(Math.max(n,0),t.length);var r,i=Array(t.length-n),o=e.length;for(r=0;r<i.length;r++)i[r]=t[r+n];for(r=0;r<o;r++)t[r+n]=e[r];for(r=0;r<i.length;r++)t[r+o+n]=i[r]};n.extend(b.prototype,u,{model:y,preinitialize:function(){},initialize:function(){},toJSON:function(t){return this.map((function(e){return e.toJSON(t)}))},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,x))},remove:function(t,e){e=n.extend({},e);var r=!n.isArray(t);t=r?[t]:t.slice();var i=this._removeModels(t,e);return!e.silent&&i.length&&(e.changes={added:[],merged:[],removed:i},this.trigger("update",this,e)),r?i[0]:i},set:function(t,e){if(null!=t){(e=n.extend({},w,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var r=!n.isArray(t);t=r?[t]:t.slice();var i=e.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],u=[],l=[],c=[],f={},h=e.add,d=e.merge,p=e.remove,g=!1,v=this.comparator&&null==i&&!1!==e.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){o=t[a];var y=this.get(o);if(y){if(d&&o!==y){var b=this._isModel(o)?o.attributes:o;e.parse&&(b=y.parse(b,e)),y.set(b,e),l.push(y),v&&!g&&(g=y.hasChanged(m))}f[y.cid]||(f[y.cid]=!0,s.push(y)),t[a]=y}else h&&(o=t[a]=this._prepareModel(o,e))&&(u.push(o),this._addReference(o,e),f[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)f[(o=this.models[a]).cid]||c.push(o);c.length&&this._removeModels(c,e)}var x=!1,k=!v&&h&&p;if(s.length&&k?(x=this.length!==s.length||n.some(this.models,(function(t,e){return t!==s[e]})),this.models.length=0,S(this.models,s,0),this.length=this.models.length):u.length&&(v&&(g=!0),S(this.models,u,null==i?this.length:i),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<u.length;a++)null!=i&&(e.index=i+a),(o=u[a]).trigger("add",o,this,e);(g||x)&&this.trigger("sort",this,e),(u.length||c.length||l.length)&&(e.changes={added:u,removed:c,merged:l},this.trigger("update",this,e))}return r?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;return n.isFunction(e)&&(e=e.bind(this)),1===r||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=n.extend({parse:!0},t)).success,r=this;return t.success=function(n){var i=t.reset?"reset":"set";r[i](n,t),e&&e.call(t.context,r,n,t),r.trigger("sync",r,n,t)},H(this,t),this.sync("read",this,t)},create:function(t,e){var r=(e=e?n.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;r||this.add(t,e);var i=this,o=e.success;return e.success=function(t,e,n){r&&i.add(t,n),o&&o.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new _(this,E)},keys:function(){return new _(this,A)},entries:function(){return new _(this,P)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):((e=e?n.clone(e):{}).collection=this,(r=this.model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,r.validationError,e),!1):r);var r},_removeModels:function(t,e){for(var n=[],r=0;r<t.length;r++){var i=this.get(t[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes,i.idAttribute);null!=a&&delete this._byId[a],e.silent||(e.index=o,i.trigger("remove",i,this,e)),n.push(i),this._removeReference(i,e)}}return n},_isModel:function(t){return t instanceof y},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes,t.idAttribute);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes,t.idAttribute);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if(e){if(("add"===t||"remove"===t)&&n!==this)return;if("destroy"===t&&this.remove(e,r),"changeId"===t){var i=this.modelId(e.previousAttributes(),e.idAttribute),o=this.modelId(e.attributes,e.idAttribute);null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=e)}}this.trigger.apply(this,arguments)}});var k="function"==typeof Symbol&&Symbol.iterator;k&&(b.prototype[k]=b.prototype.values);var _=function(t,e){this._collection=t,this._kind=e,this._index=0},E=1,A=2,P=3;k&&(_.prototype[k]=function(){return this}),_.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var t,e=this._collection.at(this._index);if(this._index++,this._kind===E)t=e;else{var n=this._collection.modelId(e.attributes,e.idAttribute);t=this._kind===A?n:[n,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var C=e.View=function(t){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(t,N)),this._ensureElement(),this.initialize.apply(this,arguments)},T=/^(\S+)\s*(.*)$/,N=["model","collection","el","id","attributes","className","tagName","events"];n.extend(C.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;for(var e in this.undelegateEvents(),t){var r=t[e];if(n.isFunction(r)||(r=this[r]),r){var i=e.match(T);this.delegate(i[1],i[2],r.bind(this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}});var L=function(t,e,r,i){n.each(r,(function(n,r){e[r]&&(t.prototype[r]=function(t,e,n,r){switch(e){case 1:return function(){return t[n](this[r])};case 2:return function(e){return t[n](this[r],e)};case 3:return function(e,i){return t[n](this[r],M(e,this),i)};case 4:return function(e,i,o){return t[n](this[r],M(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),t[n].apply(t,e)}}}(e,n,r,i))}))},M=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?O(t):n.isString(t)?function(e){return e.get(t)}:t},O=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}};n.each([[b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[y,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],(function(t){var e=t[0],r=t[1],i=t[2];e.mixin=function(t){var r=n.reduce(n.functions(t),(function(t,e){return t[e]=0,t}),{});L(e,t,r,i)},L(e,n,r,i)})),e.sync=function(t,r,i){var o=R[t];n.defaults(i||(i={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||q()),null!=i.data||!r||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var u=i.error;i.error=function(t,e,n){i.textStatus=e,i.errorThrown=n,u&&u.call(i.context,t,e,n)};var l=i.xhr=e.ajax(n.extend(a,i));return r.trigger("request",r,l,i),l};var R={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var F=e.Router=function(t){t||(t={}),this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},D=/\((.*?)\)/g,j=/(\(\?)?:\w+/g,I=/\*\w+/g,B=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(F.prototype,u,{preinitialize:function(){},initialize:function(){},route:function(t,r,i){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return e.history.route(t,(function(n){var a=o._extractParameters(t,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),e.history.trigger("route",o,r,a))})),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(B,"\\$&").replace(D,"(?:$1)?").replace(j,(function(t,e){return e?t:"([^/?]+)"})).replace(I,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return n.map(r,(function(t,e){return e===r.length-1?t||null:t?decodeURIComponent(t):null}))}});var z=e.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},V=/^[#\/]|\s+$/g,$=/^\/+|\/+$/g,U=/#.*$/;z.started=!1,n.extend(z.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(V,"")},start:function(t){if(z.started)throw new Error("Backbone.history has already been started");if(z.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace($,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),z.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!z.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+t;t=t.replace(U,"");var i=this.decodeFragment(t);if(this.fragment!==i){if(this.fragment=i,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var o=this.iframe.contentWindow;e.replace||(o.document.open(),o.document.close()),this._updateHash(o.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new z;y.extend=b.extend=F.extend=C.extend=z.extend=function(t,e){var r,i=this;return r=t&&n.has(t,"constructor")?t.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,e),r.prototype=n.create(i.prototype,t),r.prototype.constructor=r,r.__super__=i.prototype,r};var q=function(){throw new Error('A "url" property or function must be specified')},H=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e}(o,n,t,e)}.apply(e,r))||(t.exports=i)},3423: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)}t=n.nmd(t),a=function(){return 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}return 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"==s(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="",n(n.s=90)}({17:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r=n(18),i=function(){function t(){}return t.getFirstMatch=function(t,e){var n=e.match(t);return n&&n.length>0&&n[1]||""},t.getSecondMatch=function(t,e){var n=e.match(t);return n&&n.length>1&&n[2]||""},t.matchAndReturnConst=function(t,e,n){if(t.test(e))return n},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,n,r){void 0===r&&(r=!1);var i=t.getVersionPrecision(e),o=t.getVersionPrecision(n),a=Math.max(i,o),s=0,u=t.map([e,n],(function(e){var n=a-t.getVersionPrecision(e),r=e+new Array(n+1).join(".0");return t.map(r.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},t.map=function(t,e){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(n=0;n<t.length;n+=1)r.push(e(t[n]));return r},t.find=function(t,e){var n,r;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(n=0,r=t.length;n<r;n+=1){var i=t[n];if(e(i,n))return i}},t.assign=function(t){for(var e,n,r=t,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[t].concat(o));var u=function(){var t=o[e];"object"==s(t)&&null!==t&&Object.keys(t).forEach((function(e){r[e]=t[e]}))};for(e=0,n=o.length;e<n;e+=1)u();return t},t.getBrowserAlias=function(t){return r.BROWSER_ALIASES_MAP[t]},t.getBrowserTypeByAlias=function(t){return r.BROWSER_MAP[t]||""},t}();e.default=i,t.exports=e.default},18:function(t,e,n){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},e.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);var a=function(){function t(){}var e;return t.getParser=function(t,e){if(void 0===e&&(e=!1),"string"!=typeof t)throw new Error("UserAgent should be a string");return new i.default(t,e)},t.parse=function(t){return new i.default(t).getResult()},(e=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}])&&function(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)}}(t,e),t}();e.default=a,t.exports=e.default},91:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r=l(n(92)),i=l(n(93)),o=l(n(94)),a=l(n(95)),u=l(n(17));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(t,e){if(void 0===e&&(e=!1),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}var e=t.prototype;return e.getUA=function(){return this._ua},e.test=function(t){return t.test(this._ua)},e.parseBrowser=function(){var t=this;this.parsedResult.browser={};var e=u.default.find(r.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser},e.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},e.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},e.getBrowserVersion=function(){return this.getBrowser().version},e.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},e.parseOS=function(){var t=this;this.parsedResult.os={};var e=u.default.find(i.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os},e.getOSName=function(t){var e=this.getOS().name;return t?String(e).toLowerCase()||"":e||""},e.getOSVersion=function(){return this.getOS().version},e.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},e.getPlatformType=function(t){void 0===t&&(t=!1);var e=this.getPlatform().type;return t?String(e).toLowerCase()||"":e||""},e.parsePlatform=function(){var t=this;this.parsedResult.platform={};var e=u.default.find(o.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform},e.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},e.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},e.parseEngine=function(){var t=this;this.parsedResult.engine={};var e=u.default.find(a.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine},e.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},e.getResult=function(){return u.default.assign({},this.parsedResult)},e.satisfies=function(t){var e=this,n={},r=0,i={},o=0;if(Object.keys(t).forEach((function(e){var a=t[e];"string"==typeof a?(i[e]=a,o+=1):"object"==s(a)&&(n[e]=a,r+=1)})),r>0){var a=Object.keys(n),l=u.default.find(a,(function(t){return e.isOS(t)}));if(l){var c=this.satisfies(n[l]);if(void 0!==c)return c}var f=u.default.find(a,(function(t){return e.isPlatform(t)}));if(f){var h=this.satisfies(n[f]);if(void 0!==h)return h}}if(o>0){var d=Object.keys(i),p=u.default.find(d,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),i=u.default.getBrowserTypeByAlias(r);return e&&i&&(r=i.toLowerCase()),r===n},e.compareVersion=function(t){var e=[0],n=t,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(n=t.substr(1),"="===t[1]?(r=!0,n=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?n=t.substr(1):"~"===t[0]&&(r=!0,n=t.substr(1)),e.indexOf(u.default.compareVersions(i,n,r))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=c,t.exports=e.default},92:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},n=i.default.getFirstMatch(o,t)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){var e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe:function(t){var e={name:"Android Browser"},n=i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},n=i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},n=i.default.getFirstMatch(o,t);return n&&(e.version=n),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(e,t),version:i.default.getSecondMatch(e,t)}}}];e.default=a,t.exports=e.default},93:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:[/Roku\/DVP/],describe:function(t){var e=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:o.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=i.default.getWindowsVersionName(e);return{name:o.OS_MAP.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe:function(t){var e=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(e),r={name:o.OS_MAP.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe:function(t){var e=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=i.default.getAndroidVersionName(e),r={name:o.OS_MAP.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:o.OS_MAP.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||i.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:o.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:o.OS_MAP.PlayStation4,version:e}}}];e.default=a,t.exports=e.default},94:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=i.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe:function(t){var e=i.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];e.default=a,t.exports=e.default},95:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),a=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:o.ENGINE_MAP.Blink};var e=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){var e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe:function(t){var e={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}];e.default=a,t.exports=e.default}})},"object"==s(e)&&"object"==s(t)?t.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},1699:(t,e,n)=>{"use strict";var r=n(1889),i={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var n,o,a,s,u,l,c=!1;e||(e={}),n=e.debug||!1;try{if(a=r(),s=document.createRange(),u=document.getSelection(),(l=document.createElement("span")).textContent=t,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),e.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[e.format]||i.default;window.clipboardData.setData(o,t)}else r.clipboardData.clearData(),r.clipboardData.setData(e.format,t);e.onCopy&&(r.preventDefault(),e.onCopy(r.clipboardData))})),document.body.appendChild(l),s.selectNodeContents(l),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,t)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),l&&document.body.removeChild(l),a()}return c}},4959:(t,e,n)=>{t.exports={graphlib:n(7591),layout:n(6393),debug:n(7623),util:{time:n(7355).time,notime:n(7355).notime},version:n(5730)}},5062:(t,e,n)=>{"use strict";var r=n(4948),i=n(6842);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),(function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(t.outEdges(a),(function(t){r.has(n,t.w)?e.push(t):o(t.w)})),delete n[a])})),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},8746:(t,e,n)=>{var r=n(4948),i=n(7355);function o(t,e,n,r,o,a){var s={width:0,height:0,rank:a,borderType:e},u=o[e][a-1],l=i.addDummyNode(t,"border",s,n);o[e][a]=l,t.setParent(l,r),u&&t.setEdge(u,l,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),a=t.node(n);if(i.length&&r.forEach(i,e),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,u=a.maxRank+1;s<u;++s)o(t,"borderLeft","_bl",n,a,s),o(t,"borderRight","_br",n,a,s)}}))}},5391:(t,e,n)=>{"use strict";var r=n(4948);function i(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){o(t.edge(e))}))}function o(t){var e=t.width;t.width=t.height,t.height=e}function a(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(t),"lr"!==e&&"rl"!==e||(function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},3647:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},7623:(t,e,n)=>{var r=n(4948),i=n(7355),o=n(7591).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},7591:(t,e,n)=>{var r;try{r=n(6370)}catch(t){}r||(r=window.graphlib),t.exports=r},6842:(t,e,n)=>{var r=n(4948),i=n(7591).Graph,o=n(3647);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,a=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),o=r+i;n.setEdge(t.v,t.w,o),s=Math.max(s,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w).in+=i)}));var l=r.range(s+a+3).map((function(){return new o})),c=a+1;return r.forEach(n.nodes(),(function(t){u(l,c,n.node(t))})),{graph:n,buckets:l,zeroIdx:c}}(t,e||a),l=function(t,e,n){for(var r,i=[],o=e[e.length-1],a=e[0];t.nodeCount();){for(;r=a.dequeue();)s(t,e,n,r);for(;r=o.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var u=e.length-2;u>0;--u)if(r=e[u].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(l,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function s(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,u(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,u(e,n,a)})),t.removeNode(i.v),a}function u(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},6393:(t,e,n)=>{"use strict";var r=n(4948),i=n(5062),o=n(5479),a=n(1311),s=n(7355).normalizeRanks,u=n(3393),l=n(7355).removeEmptyRanks,c=n(6821),f=n(8746),h=n(5391),d=n(240),p=n(5552),g=n(7355),v=n(7591).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new v({multigraph:!0,compound:!0}),n=A(t.graph());return e.setGraph(r.merge({},y,E(n,m),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=A(t.node(n));e.setNode(n,r.defaults(E(i,w),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=A(t.edge(n));e.setEdge(n,r.merge({},k,E(i,S),r.pick(i,_)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){c.run(t)})),e(" rank",(function(){a(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){l(t)})),e(" nestingGraph.cleanup",(function(){c.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){u(t)})),e(" addBorderSegments",(function(){f(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){h.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){o.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){h.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),s=a.marginx||0,u=a.marginy||0;function l(t){var r=t.x,a=t.y,s=t.width,u=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-u/2),o=Math.max(o,a+u/2)}r.forEach(t.nodes(),(function(e){l(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&l(n)})),e-=s,i-=u,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(o.points,(function(t){t.x-=e,t.y-=i})),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)})),a.width=n-e+s,a.height=o-i+u}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(g.intersectRect(o,n)),i.points.push(g.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],w=["width","height"],x={width:0,height:0},S=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},_=["labelpos"];function E(t,e){return r.mapValues(r.pick(t,e),Number)}function A(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},4948:(t,e,n)=>{var r;try{r={cloneDeep:n(9825),constant:n(8567),defaults:n(9638),each:n(3812),filter:n(8319),find:n(6726),flatten:n(1247),forEach:n(3695),forIn:n(548),has:n(5373),isUndefined:n(5082),last:n(6496),map:n(6712),mapValues:n(1301),max:n(7365),merge:n(5797),min:n(4757),minBy:n(4105),now:n(9238),pick:n(2356),range:n(7932),reduce:n(781),sortBy:n(4206),uniqueId:n(6062),values:n(6163),zipObject:n(8437)}}catch(t){}r||(r=window._),t.exports=r},6821:(t,e,n)=>{var r=n(4948),i=n(7355);function o(t,e,n,a,s,u,l){var c=t.children(l);if(c.length){var f=i.addBorderNode(t,"_bt"),h=i.addBorderNode(t,"_bb"),d=t.node(l);t.setParent(f,l),d.borderTop=f,t.setParent(h,l),d.borderBottom=h,r.forEach(c,(function(r){o(t,e,n,a,s,u,r);var i=t.node(r),c=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,g=c!==d?1:s-u[l]+1;t.setEdge(f,c,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,h,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(l)||t.setEdge(e,f,{weight:0,minlen:s+u[l]})}else l!==e&&t.setEdge(e,l,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,(function(t){n(t,o+1)})),e[i]=o}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),a=r.max(r.values(n))-1,s=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s}));var u=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){o(t,e,s,u,a,n,r)})),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},5479:(t,e,n)=>{"use strict";var r=n(4948),i=n(7355);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,s=t.node(a).rank,u=e.w,l=t.node(u).rank,c=e.name,f=t.edge(e),h=f.labelRank;if(l!==s+1){for(t.removeEdge(e),o=0,++s;s<l;++o,++s)f.points=[],r={width:0,height:0,edgeLabel:f,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===h&&(r.width=f.width,r.height=f.height,r.dummy="edge-label",r.labelpos=f.labelpos),t.setEdge(a,n,{weight:f.weight},c),0===o&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,u,{weight:f.weight},c)}}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},1386:(t,e,n)=>{var r=n(4948);t.exports=function(t,e,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=t.parent(n);s;){if((r=t.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void e.setEdge(a,s);s=r}}))}},5540:(t,e,n)=>{var r=n(4948);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},3182:(t,e,n)=>{var r=n(4948),i=n(7591).Graph;t.exports=function(t,e,n){var o=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),u=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(i),a.setParent(i,u||o),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),a}},3057:(t,e,n)=>{"use strict";var r=n(4948);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),o=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),l=0;return r.forEach(o.forEach((function(t){var e=t.pos+a;u[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=u[e+1]),u[e=e-1>>1]+=t.weight;l+=t.weight*n}))),l}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},240:(t,e,n)=>{"use strict";var r=n(4948),i=n(8843),o=n(3057),a=n(2363),s=n(3182),u=n(1386),l=n(7591).Graph,c=n(7355);function f(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function h(t,e){var n=new l;r.forEach(t,(function(t){var i=t.graph().root,o=a(t,i,n,e);r.forEach(o.vs,(function(e,n){t.node(e).order=n})),u(t,n,o.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=c.maxRank(t),n=f(t,r.range(1,e+1),"inEdges"),a=f(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var u,l=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){h(p%2?n:a,p%4>=2),s=c.buildLayerMatrix(t);var v=o(t,s);v<l&&(g=0,u=r.cloneDeep(s),l=v)}d(t,u)}},8843:(t,e,n)=>{"use strict";var r=n(4948);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),o=r.map(r.range(i+1),(function(){return[]})),a=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(a,(function n(i){if(!r.has(e,i)){e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.forEach(t.successors(i),n)}})),o}},7447:(t,e,n)=>{"use strict";var r=n(4948);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){var n,i,o,a;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,o=0,a=0,(n=t).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},2363:(t,e,n)=>{var r=n(4948),i=n(5540),o=n(7447),a=n(9953);t.exports=function t(e,n,s,u){var l=e.children(n),c=e.node(n),f=c?c.borderLeft:void 0,h=c?c.borderRight:void 0,d={};f&&(l=r.filter(l,(function(t){return t!==f&&t!==h})));var p=i(e,l);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,u);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var g=o(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var v=a(g,u);if(f&&(v.vs=r.flatten([f,v.vs,h],!0),e.predecessors(f).length)){var m=e.node(e.predecessors(f)[0]),y=e.node(e.predecessors(h)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+m.order+y.order)/(v.weight+2),v.weight+=2}return v}},9953:(t,e,n)=>{var r=n(4948),i=n(7355);function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,a=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=a.lhs,u=r.sortBy(a.rhs,(function(t){return-t.i})),l=[],c=0,f=0,h=0;s.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),h=o(l,u,h),r.forEach(s,(function(t){h+=t.vs.length,l.push(t.vs),c+=t.barycenter*t.weight,f+=t.weight,h=o(l,u,h)}));var d={vs:r.flatten(l,!0)};return f&&(d.barycenter=c/f,d.weight=f),d}},3393:(t,e,n)=>{var r=n(4948);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],s=[],u=Math.min(e[n].low,e[r].low),l=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>u||l>e[i].lim));for(o=i,i=r;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,u=0,l=a[u],c=!0;n!==i.w;){if(r=t.node(n),c){for(;(l=a[u])!==s&&t.node(l).maxRank<r.rank;)u++;l===s&&(c=!1)}if(!c){for(;u<a.length-1&&t.node(l=a[u+1]).minRank<=r.rank;)u++;l=a[u]}t.setParent(n,l),n=t.successors(n)[0]}}))}},46:(t,e,n)=>{"use strict";var r=n(4948),i=n(7591).Graph,o=n(7355);function a(t,e){var n={};return r.reduce(e,(function(e,i){var o=0,a=0,s=e.length,l=r.last(i);return r.forEach(i,(function(e,c){var f=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),h=f?t.node(f).order:s;(f||e===l)&&(r.forEach(i.slice(a,c+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),a=i.order;!(a<o||h<a)||i.dummy&&t.node(e).dummy||u(n,r,e)}))})),a=c+1,o=h)})),i})),n}function s(t,e){var n={};function i(e,i,o,a,s){var l;r.forEach(r.range(i,o),(function(i){l=e[i],t.node(l).dummy&&r.forEach(t.predecessors(l),(function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>s)&&u(n,e,l)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===t.node(r).dummy){var l=t.predecessors(r);l.length&&(o=t.node(l[0]).order,i(n,s,u,a,o),s=u,a=o)}i(n,s,n.length,o,e.length)})),n})),n}function u(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function l(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function c(t,e,n,i){var o={},a={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var u=i(t);if(u.length)for(var c=((u=r.sortBy(u,(function(t){return s[t]}))).length-1)/2,f=Math.floor(c),h=Math.ceil(c);f<=h;++f){var d=u[f];a[t]===t&&e<s[d]&&!l(n,t,d)&&(a[d]=t,a[t]=o[t]=o[d],e=s[d])}}))})),{root:o,align:a}}function f(t,e,n,o,a){var s={},u=function(t,e,n,o){var a=new i,s=t.graph(),u=function(t,e,n){return function(i,o,a){var s,u=i.node(o),l=i.node(a),c=0;if(c+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(c+=n?s:-s),s=0,c+=(u.dummy?e:t)/2,c+=(l.dummy?e:t)/2,c+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=l.width/2;break;case"r":s=-l.width/2}return s&&(c+=n?s:-s),s=0,c}}(s.nodesep,s.edgesep,o);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(a.setNode(r),i){var o=n[i],s=a.edge(o,r);a.setEdge(o,r,Math.max(u(t,e,i),s||0))}i=e}))})),a}(t,e,n,a),l=a?"borderLeft":"borderRight";function c(t,e){for(var n=u.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return c((function(t){s[t]=u.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+u.edge(e))}),0)}),u.predecessors.bind(u)),c((function(e){var n=u.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-u.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==l&&(s[e]=Math.max(s[e],n))}),u.successors.bind(u)),r.forEach(o,(function(t){s[t]=s[n[t]]})),s}function h(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var o=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+o,n),i=Math.min(e-o,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),o=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,l=t[u];if(l!==e){var c=r.values(l);(s="l"===a?i-r.min(c):o-r.max(c))&&(t[u]=r.mapValues(l,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var o=r.sortBy(r.map(t,i));return(o[1]+o[2])/2}))}t.exports={positionX:function(t){var e,n=o.buildLayerMatrix(t),i=r.merge(a(t,n),s(t,n)),u={};r.forEach(["u","d"],(function(o){e="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var a=("u"===o?t.predecessors:t.successors).bind(t),s=c(0,e,i,a),l=f(t,e,s.root,s.align,"r"===n);"r"===n&&(l=r.mapValues(l,(function(t){return-t}))),u[o+n]=l}))}));var l=h(t,u);return d(u,l),p(u,t.graph().align)},findType1Conflicts:a,findType2Conflicts:s,addConflict:u,hasConflict:l,verticalAlignment:c,horizontalCompaction:f,alignCoordinates:d,findSmallestWidthAlignment:h,balance:p}},5552:(t,e,n)=>{"use strict";var r=n(4948),i=n(7355),o=n(46).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=o+i/2})),o+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(o(t),(function(e,n){t.node(n).x=e}))}},4135:(t,e,n)=>{"use strict";var r=n(4948),i=n(7591).Graph,o=n(5596).slack;function a(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var a=r.v,s=i===a?r.w:a;t.hasNode(s)||o(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return o(e,n)}))}function u(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),l=t.nodes()[0],c=t.nodeCount();for(r.setNode(l,{});a(r,t)<c;)e=s(r,t),n=r.hasNode(e.v)?o(t,e):-o(t,e),u(r,t,n);return r}},1311:(t,e,n)=>{"use strict";var r=n(5596).longestPath,i=n(4135),o=n(9526);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t);break;default:s(t)}};var a=r;function s(t){o(t)}},9526:(t,e,n)=>{"use strict";var r=n(4948),i=n(4135),o=n(5596).slack,a=n(5596).longestPath,s=n(7591).alg.preorder,u=n(7591).alg.postorder,l=n(7355).simplify;function c(t){t=l(t),a(t);var e,n=i(t);for(d(n),f(n,t);e=g(n);)m(n,t,e,v(n,t,e))}function f(t,e){var n=u(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=h(t,e,n)}(t,e,n)}))}function h(t,e,n){var i=t.node(n).parent,o=!0,a=e.edge(n,i),s=0;return a||(o=!1,a=e.edge(i,n)),s=a.weight,r.forEach(e.nodeEdges(n),(function(r){var a,u,l=r.v===n,c=l?r.w:r.v;if(c!==i){var f=l===o,h=e.edge(r).weight;if(s+=f?h:-h,a=n,u=c,t.hasEdge(a,u)){var d=t.edge(n,c).cutvalue;s+=f?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,o){var a=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(o){r.has(e,o)||(n=p(t,e,n,o,i))})),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function v(t,e,n){var i=n.v,a=n.w;e.hasEdge(i,a)||(i=n.w,a=n.v);var s=t.node(i),u=t.node(a),l=s,c=!1;s.lim>u.lim&&(l=u,c=!0);var f=r.filter(e.edges(),(function(e){return c===y(0,t.node(e.v),l)&&c!==y(0,t.node(e.w),l)}));return r.minBy(f,(function(t){return o(e,t)}))}function m(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),f(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function y(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=c,c.initLowLimValues=d,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=g,c.enterEdge=v,c.exchangeEdges=m},5596:(t,e,n)=>{"use strict";var r=n(4948);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},7355:(t,e,n)=>{"use strict";var r=n(4948),i=n(7591).Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,u=t.width/2,l=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*l?(s<0&&(l=-l),n=l*a/s,r=l):(a<0&&(u=-u),n=u,r=u*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},5730:t=>{t.exports="0.8.5"},6370:(t,e,n)=>{var r=n(3814);t.exports={Graph:r.Graph,json:n(8985),alg:n(8276),version:r.version}},875:(t,e,n)=>{var r=n(142);t.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),(function(t){e=[],o(t),e.length&&i.push(e)})),i}},5203:(t,e,n)=>{var r=n(142);function i(t,e,n,o,a,s){r.has(o,e)||(o[e]=!0,n||s.push(e),r.each(a(e),(function(e){i(t,e,n,o,a,s)})),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var o=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,o,a)})),a}},9882:(t,e,n)=>{var r=n(2167),i=n(142);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,o){i[o]=r(t,o,e,n)}),{})}},2167:(t,e,n)=>{var r=n(142),i=n(2859);t.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,s={},u=new i,l=function(t){var e=t.v!==o?t.v:t.w,r=s[e],i=n(t),l=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);l<r.distance&&(r.distance=l,r.predecessor=o,u.decrease(e,l))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},u.add(t,n)}));u.size()>0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(l);return s}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},2678:(t,e,n)=>{var r=n(142),i=n(4666);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},494:(t,e,n)=>{var r=n(142);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},8276:(t,e,n)=>{t.exports={components:n(875),dijkstra:n(2167),dijkstraAll:n(9882),findCycles:n(2678),floydWarshall:n(494),isAcyclic:n(9155),postorder:n(1387),preorder:n(3887),prim:n(9143),tarjan:n(4666),topsort:n(3534)}},9155:(t,e,n)=>{var r=n(3534);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},1387:(t,e,n)=>{var r=n(5203);t.exports=function(t,e){return r(t,e,"post")}},3887:(t,e,n)=>{var r=n(5203);t.exports=function(t,e){return r(t,e,"pre")}},9143:(t,e,n)=>{var r=n(142),i=n(5266),o=n(2859);t.exports=function(t,e){var n,a=new i,s={},u=new o;function l(t){var r=t.v===n?t.w:t.v,i=u.priority(r);if(void 0!==i){var o=e(t);o<i&&(s[r]=n,u.decrease(r,o))}}if(0===t.nodeCount())return a;r.each(t.nodes(),(function(t){u.add(t,Number.POSITIVE_INFINITY),a.setNode(t)})),u.decrease(t.nodes()[0],0);for(var c=!1;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+t);c=!0}t.nodeEdges(n).forEach(l)}return a}},4666:(t,e,n)=>{var r=n(142);t.exports=function(t){var e=0,n=[],i={},o=[];function a(s){var u=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(u.lowlink=Math.min(u.lowlink,i[t].index)):(a(t),u.lowlink=Math.min(u.lowlink,i[t].lowlink))})),u.lowlink===u.index){var l,c=[];do{l=n.pop(),i[l].onStack=!1,c.push(l)}while(s!==l);o.push(c)}}return t.nodes().forEach((function(t){r.has(i,t)||a(t)})),o}},3534:(t,e,n)=>{var r=n(142);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),a),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=new Error},2859:(t,e,n)=>{var r=n(142);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],o=n[e];n[t]=o,n[e]=i,r[o.key]=t,r[i.key]=e}},5266:(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=n(142);t.exports=a;var o="\0";function a(t){this._isDirected=!i.has(t,"directed")||t.directed,this._isMultigraph=!!i.has(t,"multigraph")&&t.multigraph,this._isCompound=!!i.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function s(t,e){t[e]?t[e]++:t[e]=1}function u(t,e){--t[e]||delete t[e]}function l(t,e,n,r){var o=""+e,a=""+n;if(!t&&o>a){var s=o;o=a,a=s}return o+""+a+""+(i.isUndefined(r)?"\0":r)}function c(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function f(t,e){return l(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,r=this;return i.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},a.prototype.setNode=function(t,e){return i.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=o,this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return i.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(i.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],i.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),i.each(i.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],i.each(i.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(e))e=o;else{for(var n=e+="";!i.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==o)return e}},a.prototype.children=function(t){if(i.isUndefined(t)&&(t=o),this._isCompound){var e=this._children[t];if(e)return i.keys(e)}else{if(t===o)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return i.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return i.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return i.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),i.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};function o(t){var i=n.parent(t);return void 0===i||e.hasNode(i)?(r[t]=i,i):i in r?r[i]:o(i)}return this._isCompound&&i.each(e.nodes(),(function(t){e.setParent(t,o(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,r=arguments;return i.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},a.prototype.setEdge=function(){var t,e,n,o,a=!1,u=arguments[0];"object"===r(u)&&null!==u&&"v"in u?(t=u.v,e=u.w,n=u.name,2===arguments.length&&(o=arguments[1],a=!0)):(t=u,e=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),t=""+t,e=""+e,i.isUndefined(n)||(n=""+n);var f=l(this._isDirected,t,e,n);if(i.has(this._edgeLabels,f))return a&&(this._edgeLabels[f]=o),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[f]=a?o:this._defaultEdgeLabelFn(t,e,n);var h=c(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[f]=h,s(this._preds[e],t),s(this._sucs[t],e),this._in[e][f]=h,this._out[t][f]=h,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?f(this._isDirected,arguments[0]):l(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?f(this._isDirected,arguments[0]):l(this._isDirected,t,e,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?f(this._isDirected,arguments[0]):l(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],u(this._preds[e],t),u(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.v===e})):r}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.w===e})):r}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},3814:(t,e,n)=>{t.exports={Graph:n(5266),version:n(2364)}},8985:(t,e,n)=>{var r=n(142),i=n(5266);function o(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},142:(t,e,n)=>{var r;try{r={clone:n(7141),constant:n(8567),each:n(3812),filter:n(8319),has:n(5373),isArray:n(1030),isEmpty:n(490),isFunction:n(6681),isUndefined:n(5082),keys:n(599),map:n(6712),reduce:n(781),size:n(7704),transform:n(3536),union:n(5588),values:n(6163)}}catch(t){}r||(r=window._),t.exports=r},2364:t=>{t.exports="2.1.8"},5550:function(t,e,n){var r;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)}t=n.nmd(t),function(e,n){"use strict";"object"===i(t)&&"object"===i(t.exports)?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,o){"use strict";var a=[],s=Object.getPrototypeOf,u=a.slice,l=a.flat?function(t){return a.flat.call(t)}:function(t){return a.concat.apply([],t)},c=a.push,f=a.indexOf,h={},d=h.toString,p=h.hasOwnProperty,g=p.toString,v=g.call(Object),m={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},b=function(t){return null!=t&&t===t.window},w=n.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function S(t,e,n){var r,i,o=(n=n||w).createElement("script");if(o.text=t,e)for(r in x)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function k(t){return null==t?t+"":"object"===i(t)||"function"==typeof t?h[d.call(t)]||"object":i(t)}var _="3.6.0",E=function t(e,n){return new t.fn.init(e,n)};function A(t){var e=!!t&&"length"in t&&t.length,n=k(t);return!y(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}E.fn=E.prototype={jquery:_,constructor:E,length:0,toArray:function(){return u.call(this)},get:function(t){return null==t?u.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=E.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return E.each(this,t)},map:function(t){return this.pushStack(E.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:a.sort,splice:a.splice},E.extend=E.fn.extend=function(){var t,e,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===i(s)||y(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(t=arguments[u]))for(e in t)r=t[e],"__proto__"!==e&&s!==r&&(c&&r&&(E.isPlainObject(r)||(o=Array.isArray(r)))?(n=s[e],a=o&&!Array.isArray(n)?[]:o||E.isPlainObject(n)?n:{},o=!1,s[e]=E.extend(c,a,r)):void 0!==r&&(s[e]=r));return s},E.extend({expando:"jQuery"+(_+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==d.call(t)||(e=s(t))&&("function"!=typeof(n=p.call(e,"constructor")&&e.constructor)||g.call(n)!==v))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){S(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(A(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(A(Object(t))?E.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:f.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,a=[];if(A(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&a.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&a.push(i);return l(a)},guid:1,support:m}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=a[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){h["[object "+e+"]"]=e.toLowerCase()}));var P=function(t){var e,n,r,i,o,a,s,u,l,c,f,h,d,p,g,v,m,y,b,w="sizzle"+1*new Date,x=t.document,S=0,k=0,_=ut(),E=ut(),A=ut(),P=ut(),C=function(t,e){return t===e&&(f=!0),0},T={}.hasOwnProperty,N=[],L=N.pop,M=N.push,O=N.push,R=N.slice,F=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},D="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\[[\\x20\\t\\r\\n\\f]*("+I+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+j+"*\\]",z=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",V=new RegExp(j+"+","g"),$=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),U=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),q=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),H=new RegExp(j+"|>"),G=new RegExp(z),W=new RegExp("^"+I+"$"),Y={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+D+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){h()},at=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(N=R.call(x.childNodes),x.childNodes),N[x.childNodes.length].nodeType}catch(t){O={apply:N.length?function(t,e){M.apply(t,R.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,l,c,f,p,m,y=e&&e.ownerDocument,x=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return r;if(!i&&(h(e),e=e||d,g)){if(11!==x&&(f=Z.exec(t)))if(o=f[1]){if(9===x){if(!(l=e.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&b(e,l)&&l.id===o)return r.push(l),r}else{if(f[2])return O.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return O.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!P[t+" "]&&(!v||!v.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(m=t,y=e,1===x&&(H.test(t)||q.test(t))){for((y=tt.test(t)&&mt(e.parentNode)||e)===e&&n.scope||((c=e.getAttribute("id"))?c=c.replace(rt,it):e.setAttribute("id",c=w)),s=(p=a(t)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+bt(p[s]);m=p.join(",")}try{return O.apply(r,y.querySelectorAll(m)),r}catch(e){P(t,!0)}finally{c===w&&e.removeAttribute("id")}}}return u(t.replace($,"$1"),e,r,i)}function ut(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function lt(t){return t[w]=!0,t}function ct(t){var e=d.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ft(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function ht(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function dt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function gt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return lt((function(e){return e=+e,lt((function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function mt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!X.test(e||n&&n.nodeName||"HTML")},h=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:x;return a!=d&&9===a.nodeType&&a.documentElement?(p=(d=a).documentElement,g=!o(d),x!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.scope=ct((function(t){return p.appendChild(t).appendChild(d.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ct((function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(d.getElementsByClassName),n.getById=ct((function(t){return p.appendChild(t).id=w,!d.getElementsByName||!d.getElementsByName(w).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},m=[],v=[],(n.qsa=J.test(d.querySelectorAll))&&(ct((function(t){var e;p.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+D+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(e=d.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=d.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=J.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ct((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),m.push("!=",z)})),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),e=J.test(p.compareDocumentPosition),b=e||J.test(p.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},C=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==d||t.ownerDocument==x&&b(x,t)?-1:e==d||e.ownerDocument==x&&b(x,e)?1:c?F(c,t)-F(c,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t==d?-1:e==d?1:i?-1:o?1:c?F(c,t)-F(c,e):0;if(i===o)return ht(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ht(a[r],s[r]):a[r]==x?-1:s[r]==x?1:0},d):d},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&g&&!P[e+" "]&&(!m||!m.test(e))&&(!v||!v.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){P(e,!0)}return st(e,d,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=d&&h(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=d&&h(t);var i=r.attrHandle[e.toLowerCase()],o=i&&T.call(r.attrHandle,e.toLowerCase())?i(t,e,!g):void 0;return void 0!==o?o:n.attributes||!g?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(C),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return c=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},(r=st.selectors={cacheLength:50,createPseudo:lt,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&G.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=_[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+j+"|$)"))&&_(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(V," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,f,h,d,p,g=o!==a?"nextSibling":"previousSibling",v=e.parentNode,m=s&&e.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(v){if(o){for(;g;){for(h=e;h=h[g];)if(s?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?v.firstChild:v.lastChild],a&&y){for(b=(d=(l=(c=(f=(h=v)[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===S&&l[1])&&l[2],h=d&&v.childNodes[d];h=++d&&h&&h[g]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[S,d,b];break}}else if(y&&(b=d=(l=(c=(f=(h=e)[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===S&&l[1]),!1===b)for(;(h=++d&&h&&h[g]||(b=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++b||(y&&((c=(f=h[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]=[S,b]),h!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[w]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?lt((function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=F(t,o[a])]=!(n[r]=o[a])})):function(t){return i(t,0,n)}):i}},pseudos:{not:lt((function(t){var e=[],n=[],r=s(t.replace($,"$1"));return r[w]?lt((function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:lt((function(t){return function(e){return st(t,e).length>0}})),contains:lt((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:lt((function(t){return W.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:gt(!1),disabled:gt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return Q.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:vt((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=dt(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=pt(e);function yt(){}function bt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function wt(t,e,n){var r=e.dir,i=e.next,o=i||r,a=n&&"parentNode"===o,s=k++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,i);return!1}:function(e,n,u){var l,c,f,h=[S,s];if(u){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(c=(f=e[w]||(e[w]={}))[e.uniqueID]||(f[e.uniqueID]={}),i&&i===e.nodeName.toLowerCase())e=e[r]||e;else{if((l=c[o])&&l[0]===S&&l[1]===s)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function xt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function St(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,l=null!=e;s<u;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),l&&e.push(s)));return a}function kt(t,e,n,r,i,o){return r&&!r[w]&&(r=kt(r)),i&&!i[w]&&(i=kt(i,o)),lt((function(o,a,s,u){var l,c,f,h=[],d=[],p=a.length,g=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)st(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),v=!t||!o&&e?g:St(g,h,t,s,u),m=n?i||(o?t:p||r)?[]:a:v;if(n&&n(v,m,s,u),r)for(l=St(m,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(m[d[c]]=!(v[d[c]]=f));if(o){if(i||t){if(i){for(l=[],c=m.length;c--;)(f=m[c])&&l.push(v[c]=f);i(null,m=[],l,u)}for(c=m.length;c--;)(f=m[c])&&(l=i?F(o,f):h[c])>-1&&(o[l]=!(a[l]=f))}}else m=St(m===a?m.splice(p,m.length):m),i?i(null,a,m,u):O.apply(a,m)}))}function _t(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],u=a?1:0,c=wt((function(t){return t===e}),s,!0),f=wt((function(t){return F(e,t)>-1}),s,!0),h=[function(t,n,r){var i=!a&&(r||n!==l)||((e=n).nodeType?c(t,n,r):f(t,n,r));return e=null,i}];u<o;u++)if(n=r.relative[t[u].type])h=[wt(xt(h),n)];else{if((n=r.filter[t[u].type].apply(null,t[u].matches))[w]){for(i=++u;i<o&&!r.relative[t[i].type];i++);return kt(u>1&&xt(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace($,"$1"),n,u<i&&_t(t.slice(u,i)),i<o&&_t(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return xt(h)}return yt.prototype=r.filters=r.pseudos,r.setFilters=new yt,a=st.tokenize=function(t,e){var n,i,o,a,s,u,l,c=E[t+" "];if(c)return e?0:c.slice(0);for(s=t,u=[],l=r.preFilter;s;){for(a in n&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=q.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace($," ")}),s=s.slice(n.length)),r.filter)!(i=Y[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return e?s.length:s?st.error(t):E(t,u).slice(0)},s=st.compile=function(t,e){var n,i=[],o=[],s=A[t+" "];if(!s){for(e||(e=a(t)),n=e.length;n--;)(s=_t(e[n]))[w]?i.push(s):o.push(s);(s=A(t,function(t,e){var n=e.length>0,i=t.length>0,o=function(o,a,s,u,c){var f,p,v,m=0,y="0",b=o&&[],w=[],x=l,k=o||i&&r.find.TAG("*",c),_=S+=null==x?1:Math.random()||.1,E=k.length;for(c&&(l=a==d||a||c);y!==E&&null!=(f=k[y]);y++){if(i&&f){for(p=0,a||f.ownerDocument==d||(h(f),s=!g);v=t[p++];)if(v(f,a||d,s)){u.push(f);break}c&&(S=_)}n&&((f=!v&&f)&&m--,o&&b.push(f))}if(m+=y,n&&y!==m){for(p=0;v=e[p++];)v(b,w,a,s);if(o){if(m>0)for(;y--;)b[y]||w[y]||(w[y]=L.call(u));w=St(w)}O.apply(u,w),c&&!o&&w.length>0&&m+e.length>1&&st.uniqueSort(u)}return c&&(S=_,l=x),b};return n?lt(o):o}(o,i))).selector=t}return s},u=st.select=function(t,e,n,i){var o,u,l,c,f,h="function"==typeof t&&t,d=!i&&a(t=h.selector||t);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===e.nodeType&&g&&r.relative[u[1].type]){if(!(e=(r.find.ID(l.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(o=Y.needsContext.test(t)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(et,nt),tt.test(u[0].type)&&mt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return O.apply(n,i),n;break}}return(h||s(t,d))(i,e,!g,n,!e||tt.test(t)&&mt(e.parentNode)||e),n},n.sortStable=w.split("").sort(C).join("")===w,n.detectDuplicates=!!f,h(),n.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))})),ct((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ft("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ct((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ft("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ct((function(t){return null==t.getAttribute("disabled")}))||ft(D,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),st}(n);E.find=P,(E.expr=P.selectors)[":"]=E.expr.pseudos,E.uniqueSort=E.unique=P.uniqueSort,E.text=P.getText,E.isXMLDoc=P.isXML,E.contains=P.contains,E.escapeSelector=P.escape;var C=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&E(t).is(n))break;r.push(t)}return r},T=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},N=E.expr.match.needsContext;function L(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,e,n){return y(e)?E.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?E.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?E.grep(t,(function(t){return f.call(e,t)>-1!==n})):E.filter(e,t,n)}E.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?E.find.matchesSelector(r,t)?[r]:[]:E.find.matches(t,E.grep(e,(function(t){return 1===t.nodeType})))},E.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(E(t).filter((function(){for(e=0;e<r;e++)if(E.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)E.find(t,i[e],n);return r>1?E.uniqueSort(n):n},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&N.test(t)?E(t):t||[],!1).length}});var R,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||R,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:F.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof E?e[0]:e,E.merge(this,E.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:w,!0)),M.test(r[1])&&E.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=w.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(E):E.makeArray(t,this)}).prototype=E.fn,R=E(w);var D=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function I(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}E.fn.extend({has:function(t){var e=E(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(E.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],a="string"!=typeof t&&E(t);if(!N.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?f.call(E(t),this[0]):f.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),E.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return C(t,"parentNode")},parentsUntil:function(t,e,n){return C(t,"parentNode",n)},next:function(t){return I(t,"nextSibling")},prev:function(t){return I(t,"previousSibling")},nextAll:function(t){return C(t,"nextSibling")},prevAll:function(t){return C(t,"previousSibling")},nextUntil:function(t,e,n){return C(t,"nextSibling",n)},prevUntil:function(t,e,n){return C(t,"previousSibling",n)},siblings:function(t){return T((t.parentNode||{}).firstChild,t)},children:function(t){return T(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(L(t,"template")&&(t=t.content||t),E.merge([],t.childNodes))}},(function(t,e){E.fn[t]=function(n,r){var i=E.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(j[t]||E.uniqueSort(i),D.test(t)&&i.reverse()),this.pushStack(i)}}));var B=/[^\x20\t\r\n\f]+/g;function z(t){return t}function V(t){throw t}function $(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}E.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return E.each(t.match(B)||[],(function(t,n){e[n]=!0})),e}(t):E.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){E.each(n,(function(n,r){y(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==k(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return E.each(arguments,(function(t,e){for(var n;(n=E.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(t){return t?E.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},E.extend({Deferred:function(t){var e=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return E.Deferred((function(n){E.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];a[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,r,o){var a=0;function s(t,e,r,o){return function(){var u=this,l=arguments,c=function(){var n,c;if(!(t<a)){if((n=r.apply(u,l))===e.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"===i(n)||"function"==typeof n)&&n.then,y(c)?o?c.call(n,s(a,e,z,o),s(a,e,V,o)):(a++,c.call(n,s(a,e,z,o),s(a,e,V,o),s(a,e,z,e.notifyWith))):(r!==z&&(u=void 0,l=[n]),(o||e.resolveWith)(u,l))}},f=o?c:function(){try{c()}catch(n){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(n,f.stackTrace),t+1>=a&&(r!==V&&(u=void 0,l=[n]),e.rejectWith(u,l))}};t?f():(E.Deferred.getStackHook&&(f.stackTrace=E.Deferred.getStackHook()),n.setTimeout(f))}}return E.Deferred((function(n){e[0][3].add(s(0,n,y(o)?o:z,n.notifyWith)),e[1][3].add(s(0,n,y(t)?t:z)),e[2][3].add(s(0,n,y(r)?r:V))})).promise()},promise:function(t){return null!=t?E.extend(t,o):o}},a={};return E.each(e,(function(t,n){var i=n[2],s=n[5];o[n[1]]=i.add,s&&i.add((function(){r=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),i.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=i.fireWith})),o.promise(a),t&&t.call(a,a),a},when:function(t){var e=arguments.length,n=e,r=Array(n),i=u.call(arguments),o=E.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?u.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&($(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)$(i[n],a(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&U.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},E.readyException=function(t){n.setTimeout((function(){throw t}))};var q=E.Deferred();function H(){w.removeEventListener("DOMContentLoaded",H),n.removeEventListener("load",H),E.ready()}E.fn.ready=function(t){return q.then(t).catch((function(t){E.readyException(t)})),this},E.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==t&&--E.readyWait>0||q.resolveWith(w,[E]))}}),E.ready.then=q.then,"complete"===w.readyState||"loading"!==w.readyState&&!w.documentElement.doScroll?n.setTimeout(E.ready):(w.addEventListener("DOMContentLoaded",H),n.addEventListener("load",H));var G=function t(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===k(r))for(u in o=!0,r)t(e,n,u,r[u],!0,a,s);else if(void 0!==i&&(o=!0,y(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(t,e,n){return c.call(E(t),n)})),n))for(;u<l;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},W=/^-ms-/,Y=/-([a-z])/g;function X(t,e){return e.toUpperCase()}function Q(t){return t.replace(W,"ms-").replace(Y,X)}var K=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=E.expando+J.uid++}J.uid=1,J.prototype={cache:function(t){var e=t[this.expando];return e||(e={},K(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[Q(e)]=n;else for(r in e)i[Q(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][Q(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(Q):(e=Q(e))in r?[e]:e.match(B)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||E.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!E.isEmptyObject(e)}};var Z=new J,tt=new J,et=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,nt=/[A-Z]/g;function rt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(nt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:et.test(t)?JSON.parse(t):t)}(n)}catch(t){}tt.set(t,e,n)}else n=void 0;return n}E.extend({hasData:function(t){return tt.hasData(t)||Z.hasData(t)},data:function(t,e,n){return tt.access(t,e,n)},removeData:function(t,e){tt.remove(t,e)},_data:function(t,e,n){return Z.access(t,e,n)},_removeData:function(t,e){Z.remove(t,e)}}),E.fn.extend({data:function(t,e){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===t){if(this.length&&(o=tt.get(a),1===a.nodeType&&!Z.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=Q(r.slice(5)),rt(a,r,o[r]));Z.set(a,"hasDataAttrs",!0)}return o}return"object"===i(t)?this.each((function(){tt.set(this,t)})):G(this,(function(e){var n;if(a&&void 0===e)return void 0!==(n=tt.get(a,t))||void 0!==(n=rt(a,t))?n:void 0;this.each((function(){tt.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){tt.remove(this,t)}))}}),E.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Z.get(t,e),n&&(!r||Array.isArray(n)?r=Z.access(t,e,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=E.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=E._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){E.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Z.get(t,n)||Z.access(t,n,{empty:E.Callbacks("once memory").add((function(){Z.remove(t,[e+"queue",n])}))})}}),E.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?E.queue(this[0],t):void 0===e?this:this.each((function(){var n=E.queue(this,t,e);E._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&E.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){E.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=E.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=Z.get(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var it=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ot=new RegExp("^(?:([+-])=|)("+it+")([a-z%]*)$","i"),at=["Top","Right","Bottom","Left"],st=w.documentElement,ut=function(t){return E.contains(t.ownerDocument,t)},lt={composed:!0};st.getRootNode&&(ut=function(t){return E.contains(t.ownerDocument,t)||t.getRootNode(lt)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ut(t)&&"none"===E.css(t,"display")};function ft(t,e,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(t,e,"")},u=s(),l=n&&n[3]||(E.cssNumber[e]?"":"px"),c=t.nodeType&&(E.cssNumber[e]||"px"!==l&&+u)&&ot.exec(E.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)E.style(t,e,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;E.style(t,e,(c*=2)+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ht={};function dt(t){var e,n=t.ownerDocument,r=t.nodeName,i=ht[r];return i||(e=n.body.appendChild(n.createElement(r)),i=E.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),ht[r]=i,i)}function pt(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=Z.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ct(r)&&(i[o]=dt(r))):"none"!==n&&(i[o]="none",Z.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}E.fn.extend({show:function(){return pt(this,!0)},hide:function(){return pt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?E(this).show():E(this).hide()}))}});var gt,vt,mt=/^(?:checkbox|radio)$/i,yt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,bt=/^$|^module$|\/(?:java|ecma)script/i;gt=w.createDocumentFragment().appendChild(w.createElement("div")),(vt=w.createElement("input")).setAttribute("type","radio"),vt.setAttribute("checked","checked"),vt.setAttribute("name","t"),gt.appendChild(vt),m.checkClone=gt.cloneNode(!0).cloneNode(!0).lastChild.checked,gt.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!gt.cloneNode(!0).lastChild.defaultValue,gt.innerHTML="<option></option>",m.option=!!gt.lastChild;var wt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function xt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&L(t,e)?E.merge([t],n):n}function St(t,e){for(var n=0,r=t.length;n<r;n++)Z.set(t[n],"globalEval",!e||Z.get(e[n],"globalEval"))}wt.tbody=wt.tfoot=wt.colgroup=wt.caption=wt.thead,wt.th=wt.td,m.option||(wt.optgroup=wt.option=[1,"<select multiple='multiple'>","</select>"]);var kt=/<|&#?\w+;/;function _t(t,e,n,r,i){for(var o,a,s,u,l,c,f=e.createDocumentFragment(),h=[],d=0,p=t.length;d<p;d++)if((o=t[d])||0===o)if("object"===k(o))E.merge(h,o.nodeType?[o]:o);else if(kt.test(o)){for(a=a||f.appendChild(e.createElement("div")),s=(yt.exec(o)||["",""])[1].toLowerCase(),u=wt[s]||wt._default,a.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;E.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(e.createTextNode(o));for(f.textContent="",d=0;o=h[d++];)if(r&&E.inArray(o,r)>-1)i&&i.push(o);else if(l=ut(o),a=xt(f.appendChild(o),"script"),l&&St(a),n)for(c=0;o=a[c++];)bt.test(o.type||"")&&n.push(o);return f}var Et=/^([^.]*)(?:\.(.+)|)/;function At(){return!0}function Pt(){return!1}function Ct(t,e){return t===function(){try{return w.activeElement}catch(t){}}()==("focus"===e)}function Tt(t,e,n,r,o,a){var s,u;if("object"===i(e)){for(u in"string"!=typeof n&&(r=r||n,n=void 0),e)Tt(t,u,n,r,e[u],a);return t}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=Pt;else if(!o)return t;return 1===a&&(s=o,(o=function(t){return E().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=E.guid++)),t.each((function(){E.event.add(this,e,o,r,n)}))}function Nt(t,e,n){n?(Z.set(t,e,!1),E.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Z.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(E.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=u.call(arguments),Z.set(this,e,o),r=n(this,e),this[e](),o!==(i=Z.get(this,e))||r?Z.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i&&i.value}else o.length&&(Z.set(this,e,{value:E.event.trigger(E.extend(o[0],E.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Z.get(t,e)&&E.event.add(t,e,At)}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,h,d,p,g,v=Z.get(t);if(K(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(st,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(B)||[""]).length;l--;)d=g=(s=Et.exec(e[l])||[])[1],p=(s[2]||"").split(".").sort(),d&&(f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[d])||((h=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,p,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),E.event.global[d]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,l,c,f,h,d,p,g,v=Z.hasData(t)&&Z.get(t);if(v&&(u=v.events)){for(l=(e=(e||"").match(B)||[""]).length;l--;)if(d=g=(s=Et.exec(e[l])||[])[1],p=(s[2]||"").split(".").sort(),d){for(f=E.event.special[d]||{},h=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(t,c));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(t,p,v.handle)||E.removeEvent(t,d,v.handle),delete u[d])}else for(d in u)E.event.remove(t,d+e[l],n,r,!0);E.isEmptyObject(u)&&Z.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(t),l=(Z.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(s[0]=u,e=1;e<arguments.length;e++)s[e]=arguments[e];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(a=E.event.handlers.call(this,u,l),e=0;(i=a[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,a,s=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=e[n]).selector+" "]&&(a[i]=r.needsContext?E(i,this).index(l)>-1:E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<e.length&&s.push({elem:l,handlers:e.slice(u)}),s},addProp:function(t,e){Object.defineProperty(E.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[E.expando]?t:new E.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return mt.test(e.type)&&e.click&&L(e,"input")&&Nt(e,"click",At),!1},trigger:function(t){var e=this||t;return mt.test(e.type)&&e.click&&L(e,"input")&&Nt(e,"click"),!0},_default:function(t){var e=t.target;return mt.test(e.type)&&e.click&&L(e,"input")&&Z.get(e,"click")||L(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},E.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(E.Event=function(t,e){if(!(this instanceof E.Event))return new E.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?At:Pt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&E.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[E.expando]=!0}).prototype={constructor:E.Event,isDefaultPrevented:Pt,isPropagationStopped:Pt,isImmediatePropagationStopped:Pt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=At,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=At,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=At,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(t,e){E.event.special[t]={setup:function(){return Nt(this,t,Ct),!1},trigger:function(){return Nt(this,t),!0},_default:function(){return!0},delegateType:e}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){E.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||E.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),E.fn.extend({on:function(t,e,n,r){return Tt(this,t,e,n,r)},one:function(t,e,n,r){return Tt(this,t,e,n,r,1)},off:function(t,e,n){var r,o;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,E(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===i(t)){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Pt),this.each((function(){E.event.remove(this,t,n,e)}))}});var Lt=/<script|<style|<link/i,Mt=/checked\s*(?:[^=]|=\s*.checked.)/i,Ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Rt(t,e){return L(t,"table")&&L(11!==e.nodeType?e:e.firstChild,"tr")&&E(t).children("tbody")[0]||t}function Ft(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Dt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function jt(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if(Z.hasData(t)&&(s=Z.get(t).events))for(i in Z.remove(e,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)E.event.add(e,i,s[i][n]);tt.hasData(t)&&(o=tt.access(t),a=E.extend({},o),tt.set(e,a))}}function It(t,e){var n=e.nodeName.toLowerCase();"input"===n&&mt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Bt(t,e,n,r){e=l(e);var i,o,a,s,u,c,f=0,h=t.length,d=h-1,p=e[0],g=y(p);if(g||h>1&&"string"==typeof p&&!m.checkClone&&Mt.test(p))return t.each((function(i){var o=t.eq(i);g&&(e[0]=p.call(this,i,o.html())),Bt(o,e,n,r)}));if(h&&(o=(i=_t(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=E.map(xt(i,"script"),Ft)).length;f<h;f++)u=i,f!==d&&(u=E.clone(u,!0,!0),s&&E.merge(a,xt(u,"script"))),n.call(t[f],u,f);if(s)for(c=a[a.length-1].ownerDocument,E.map(a,Dt),f=0;f<s;f++)u=a[f],bt.test(u.type||"")&&!Z.access(u,"globalEval")&&E.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?E._evalUrl&&!u.noModule&&E._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):S(u.textContent.replace(Ot,""),u,c))}return t}function zt(t,e,n){for(var r,i=e?E.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(xt(r)),r.parentNode&&(n&&ut(r)&&St(xt(r,"script")),r.parentNode.removeChild(r));return t}E.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=ut(t);if(!(m.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||E.isXMLDoc(t)))for(a=xt(s),r=0,i=(o=xt(t)).length;r<i;r++)It(o[r],a[r]);if(e)if(n)for(o=o||xt(t),a=a||xt(s),r=0,i=o.length;r<i;r++)jt(o[r],a[r]);else jt(t,s);return(a=xt(s,"script")).length>0&&St(a,!u&&xt(t,"script")),s},cleanData:function(t){for(var e,n,r,i=E.event.special,o=0;void 0!==(n=t[o]);o++)if(K(n)){if(e=n[Z.expando]){if(e.events)for(r in e.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,e.handle);n[Z.expando]=void 0}n[tt.expando]&&(n[tt.expando]=void 0)}}}),E.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return G(this,(function(t){return void 0===t?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Bt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Rt(this,t).appendChild(t)}))},prepend:function(){return Bt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Rt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(E.cleanData(xt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return E.clone(this,t,e)}))},html:function(t){return G(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Lt.test(t)&&!wt[(yt.exec(t)||["",""])[1].toLowerCase()]){t=E.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(E.cleanData(xt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Bt(this,arguments,(function(e){var n=this.parentNode;E.inArray(this,t)<0&&(E.cleanData(xt(this)),n&&n.replaceChild(e,this))}),t)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){E.fn[t]=function(t){for(var n,r=[],i=E(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),E(i[a])[e](n),c.apply(r,n.get());return this.pushStack(r)}}));var Vt=new RegExp("^("+it+")(?!px)[a-z%]+$","i"),$t=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Ut=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},qt=new RegExp(at.join("|"),"i");function Ht(t,e,n){var r,i,o,a,s=t.style;return(n=n||$t(t))&&(""!==(a=n.getPropertyValue(e)||n[e])||ut(t)||(a=E.style(t,e)),!m.pixelBoxStyles()&&Vt.test(a)&&qt.test(e)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Gt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",st.appendChild(l).appendChild(c);var t=n.getComputedStyle(c);r="1%"!==t.top,u=12===e(t.marginLeft),c.style.right="60%",a=36===e(t.right),i=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),st.removeChild(l),c=null}}function e(t){return Math.round(parseFloat(t))}var r,i,o,a,s,u,l=w.createElement("div"),c=w.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===c.style.backgroundClip,E.extend(m,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,r,i;return null==s&&(t=w.createElement("table"),e=w.createElement("tr"),r=w.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",r.style.height="9px",r.style.display="block",st.appendChild(t).appendChild(e).appendChild(r),i=n.getComputedStyle(e),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,st.removeChild(t)),s}}))}();var Wt=["Webkit","Moz","ms"],Yt=w.createElement("div").style,Xt={};function Qt(t){return E.cssProps[t]||Xt[t]||(t in Yt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Wt.length;n--;)if((t=Wt[n]+e)in Yt)return t}(t)||t)}var Kt=/^(none|table(?!-c[ea]).+)/,Jt=/^--/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=ot.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=E.css(t,n+at[a],!0,i)),r?("content"===n&&(u-=E.css(t,"padding"+at[a],!0,i)),"margin"!==n&&(u-=E.css(t,"border"+at[a]+"Width",!0,i))):(u+=E.css(t,"padding"+at[a],!0,i),"padding"!==n?u+=E.css(t,"border"+at[a]+"Width",!0,i):s+=E.css(t,"border"+at[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u}function re(t,e,n){var r=$t(t),i=(!m.boxSizingReliable()||n)&&"border-box"===E.css(t,"boxSizing",!1,r),o=i,a=Ht(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Vt.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&L(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===E.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ne(t,e,n||(i?"border":"content"),o,r,a)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}E.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ht(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,a,s,u=Q(e),l=Jt.test(e),c=t.style;if(l||(e=Qt(u)),s=E.cssHooks[e]||E.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,r))?o:c[e];"string"===(a=i(n))&&(o=ot.exec(n))&&o[1]&&(n=ft(t,e,o),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=o&&o[3]||(E.cssNumber[u]?"":"px")),m.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,r))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,o,a,s=Q(e);return Jt.test(e)||(e=Qt(s)),(a=E.cssHooks[e]||E.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Ht(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(t,e){E.cssHooks[e]={get:function(t,n,r){if(n)return!Kt.test(E.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):Ut(t,Zt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=$t(t),a=!m.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===E.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,s,o):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=ot.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=E.css(t,e)),ee(0,n,u)}}})),E.cssHooks.marginLeft=Gt(m.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Ht(t,"marginLeft"))||t.getBoundingClientRect().left-Ut(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(t,e){E.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+at[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(E.cssHooks[t+e].set=ee)})),E.fn.extend({css:function(t,e){return G(this,(function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=$t(t),i=e.length;a<i;a++)o[e[a]]=E.css(t,e[a],!1,r);return o}return void 0!==n?E.style(t,e,n):E.css(t,e)}),t,e,arguments.length>1)}}),E.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||E.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=E.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=E.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){E.fx.step[t.prop]?E.fx.step[t.prop](t):1!==t.elem.nodeType||!E.cssHooks[t.prop]&&null==t.elem.style[Qt(t.prop)]?t.elem[t.prop]=t.now:E.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},E.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(E.fx=ie.prototype.init).step={};var oe,ae,se=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){ae&&(!1===w.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(le):n.setTimeout(le,E.fx.interval),E.fx.tick())}function ce(){return n.setTimeout((function(){oe=void 0})),oe=Date.now()}function fe(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=at[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function he(t,e,n){for(var r,i=(de.tweeners[e]||[]).concat(de.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function de(t,e,n){var r,i,o=0,a=de.prefilters.length,s=E.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=oe||ce(),n=Math.max(0,l.startTime+l.duration-e),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(t,[l,r,n]),r<1&&a?n:(a||s.notifyWith(t,[l,1,0]),s.resolveWith(t,[l]),!1)},l=s.promise({elem:t,props:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var r=E.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return e?(s.notifyWith(t,[l,1,0]),s.resolveWith(t,[l,e])):s.rejectWith(t,[l,e]),this}}),c=l.props;for(function(t,e){var n,r,i,o,a;for(n in t)if(i=e[r=Q(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=E.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=de.prefilters[o].call(l,t,c,l.opts))return y(r.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return E.map(c,he,l),y(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),E.fx.timer(E.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(de,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ft(n.elem,t,ot.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(B);for(var n,r=0,i=t.length;r<i;r++)n=t[r],de.tweeners[n]=de.tweeners[n]||[],de.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,a,s,u,l,c,f="width"in e||"height"in e,h=this,d={},p=t.style,g=t.nodeType&&ct(t),v=Z.get(t,"fxshow");for(r in n.queue||(null==(a=E._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,E.queue(t,"fx").length||a.empty.fire()}))}))),e)if(i=e[r],se.test(i)){if(delete e[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||E.style(t,r)}if((u=!E.isEmptyObject(e))||!E.isEmptyObject(d))for(r in f&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=v&&v.display)&&(l=Z.get(t,"display")),"none"===(c=E.css(t,"display"))&&(l?c=l:(pt([t],!0),l=t.style.display||l,c=E.css(t,"display"),pt([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===E.css(t,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Z.access(t,"fxshow",{display:l}),o&&(v.hidden=!g),g&&pt([t],!0),h.done((function(){for(r in g||pt([t]),Z.remove(t,"fxshow"),d)E.style(t,r,d[r])}))),u=he(g?v[r]:0,r,h),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?de.prefilters.unshift(t):de.prefilters.push(t)}}),E.speed=function(t,e,n){var r=t&&"object"===i(t)?E.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return E.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(t,e,n,r){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=E.isEmptyObject(t),o=E.speed(e,n,r),a=function(){var e=de(this,E.extend({},t),o);(i||Z.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=E.timers,a=Z.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ue.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||E.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Z.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=E.timers,a=r?r.length:0;for(n.finish=!0,E.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(t,e){var n=E.fn[e];E.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(fe(e,!0),t,r,i)}})),E.each({slideDown:fe("show"),slideUp:fe("hide"),slideToggle:fe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){E.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),E.timers=[],E.fx.tick=function(){var t,e=0,n=E.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||E.fx.stop(),oe=void 0},E.fx.timer=function(t){E.timers.push(t),E.fx.start()},E.fx.interval=13,E.fx.start=function(){ae||(ae=!0,le())},E.fx.stop=function(){ae=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(t,e){return t=E.fx&&E.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,r){var i=n.setTimeout(e,t);r.stop=function(){n.clearTimeout(i)}}))},function(){var t=w.createElement("input"),e=w.createElement("select").appendChild(w.createElement("option"));t.type="checkbox",m.checkOn=""!==t.value,m.optSelected=e.selected,(t=w.createElement("input")).value="t",t.type="radio",m.radioValue="t"===t.value}();var pe,ge=E.expr.attrHandle;E.fn.extend({attr:function(t,e){return G(this,E.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){E.removeAttr(this,t)}))}}),E.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?E.prop(t,e,n):(1===o&&E.isXMLDoc(t)||(i=E.attrHooks[e.toLowerCase()]||(E.expr.match.bool.test(e)?pe:void 0)),void 0!==n?null===n?void E.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=E.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!m.radioValue&&"radio"===e&&L(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(B);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),pe={set:function(t,e,n){return!1===e?E.removeAttr(t,n):t.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ge[e]||E.find.attr;ge[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=ge[a],ge[a]=i,i=null!=n(t,e,r)?a:null,ge[a]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,me=/^(?:a|area)$/i;function ye(t){return(t.match(B)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(B)||[]}E.fn.extend({prop:function(t,e){return G(this,E.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[E.propFix[t]||t]}))}}),E.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(t)||(e=E.propFix[e]||e,i=E.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=E.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(E.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(y(t))return this.each((function(e){E(this).addClass(t.call(this,e,be(this)))}));if((e=we(t)).length)for(;n=this[u++];)if(i=be(n),r=1===n.nodeType&&" "+ye(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ye(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(y(t))return this.each((function(e){E(this).removeClass(t.call(this,e,be(this)))}));if(!arguments.length)return this.attr("class","");if((e=we(t)).length)for(;n=this[u++];)if(i=be(n),r=1===n.nodeType&&" "+ye(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=ye(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=i(t),r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):y(t)?this.each((function(n){E(this).toggleClass(t.call(this,n,be(this),e),e)})):this.each((function(){var e,i,o,a;if(r)for(i=0,o=E(this),a=we(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=be(this))&&Z.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Z.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ye(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;E.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,E(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(t){return null==t?"":t+""}))),(e=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xe,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(t){var e=E.find.attr(t,"value");return null!=e?e:ye(E.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!L(n.parentNode,"optgroup"))){if(e=E(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=E.makeArray(e),a=i.length;a--;)((r=i[a]).selected=E.inArray(E.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=E.inArray(E(t).val(),e)>-1}},m.checkOn||(E.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),m.focusin="onfocusin"in n;var Se=/^(?:focusinfocus|focusoutblur)$/,ke=function(t){t.stopPropagation()};E.extend(E.event,{trigger:function(t,e,r,o){var a,s,u,l,c,f,h,d,g=[r||w],v=p.call(t,"type")?t.type:t,m=p.call(t,"namespace")?t.namespace.split("."):[];if(s=d=u=r=r||w,3!==r.nodeType&&8!==r.nodeType&&!Se.test(v+E.event.triggered)&&(v.indexOf(".")>-1&&(m=v.split("."),v=m.shift(),m.sort()),c=v.indexOf(":")<0&&"on"+v,(t=t[E.expando]?t:new E.Event(v,"object"===i(t)&&t)).isTrigger=o?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:E.makeArray(e,[t]),h=E.event.special[v]||{},o||!h.trigger||!1!==h.trigger.apply(r,e))){if(!o&&!h.noBubble&&!b(r)){for(l=h.delegateType||v,Se.test(l+v)||(s=s.parentNode);s;s=s.parentNode)g.push(s),u=s;u===(r.ownerDocument||w)&&g.push(u.defaultView||u.parentWindow||n)}for(a=0;(s=g[a++])&&!t.isPropagationStopped();)d=s,t.type=a>1?l:h.bindType||v,(f=(Z.get(s,"events")||Object.create(null))[t.type]&&Z.get(s,"handle"))&&f.apply(s,e),(f=c&&s[c])&&f.apply&&K(s)&&(t.result=f.apply(s,e),!1===t.result&&t.preventDefault());return t.type=v,o||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(g.pop(),e)||!K(r)||c&&y(r[v])&&!b(r)&&((u=r[c])&&(r[c]=null),E.event.triggered=v,t.isPropagationStopped()&&d.addEventListener(v,ke),r[v](),t.isPropagationStopped()&&d.removeEventListener(v,ke),E.event.triggered=void 0,u&&(r[c]=u)),t.result}},simulate:function(t,e,n){var r=E.extend(new E.Event,n,{type:t,isSimulated:!0});E.event.trigger(r,null,e)}}),E.fn.extend({trigger:function(t,e){return this.each((function(){E.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return E.event.trigger(t,e,n,!0)}}),m.focusin||E.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){E.event.simulate(e,t.target,E.event.fix(t))};E.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=Z.access(r,e);i||r.addEventListener(t,n,!0),Z.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Z.access(r,e)-1;i?Z.access(r,e,i):(r.removeEventListener(t,n,!0),Z.remove(r,e))}}}));var _e=n.location,Ee={guid:Date.now()},Ae=/\?/;E.parseXML=function(t){var e,r;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){}return r=e&&e.getElementsByTagName("parsererror")[0],e&&!r||E.error("Invalid XML: "+(r?E.map(r.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Pe=/\[\]$/,Ce=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Ne=/^(?:input|select|textarea|keygen)/i;function Le(t,e,n,r){var o;if(Array.isArray(e))E.each(e,(function(e,o){n||Pe.test(t)?r(t,o):Le(t+"["+("object"===i(o)&&null!=o?e:"")+"]",o,n,r)}));else if(n||"object"!==k(e))r(t,e);else for(o in e)Le(t+"["+o+"]",e[o],n,r)}E.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!E.isPlainObject(t))E.each(t,(function(){i(this.name,this.value)}));else for(n in t)Le(n,t[n],e,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=E.prop(this,"elements");return t?E.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!E(this).is(":disabled")&&Ne.test(this.nodeName)&&!Te.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}})):{name:e.name,value:n.replace(Ce,"\r\n")}})).get()}});var Me=/%20/g,Oe=/#.*$/,Re=/([?&])_=[^&]*/,Fe=/^(.*?):[ \t]*([^\r\n]*)$/gm,De=/^(?:GET|HEAD)$/,je=/^\/\//,Ie={},Be={},ze="*/".concat("*"),Ve=w.createElement("a");function $e(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(B)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Ue(t,e,n,r){var i={},o=t===Be;function a(s){var u;return i[s]=!0,E.each(t[s]||[],(function(t,s){var l=s(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)})),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function qe(t,e){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&E.extend(!0,t,r),t}Ve.href=_e.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_e.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_e.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?qe(qe(t,E.ajaxSettings),e):qe(E.ajaxSettings,t)},ajaxPrefilter:$e(Ie),ajaxTransport:$e(Be),ajax:function(t,e){"object"===i(t)&&(e=t,t=void 0);var r,o,a,s,u,l,c,f,h,d,p=E.ajaxSetup({},e=e||{}),g=p.context||p,v=p.context&&(g.nodeType||g.jquery)?E(g):E.event,m=E.Deferred(),y=E.Callbacks("once memory"),b=p.statusCode||{},x={},S={},k="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(c){if(!s)for(s={};e=Fe.exec(a);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(t,e){return null==c&&(t=S[t.toLowerCase()]=S[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==c&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)_.always(t[_.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||k;return r&&r.abort(e),A(0,e),this}};if(m.promise(_),p.url=((t||p.url||_e.href)+"").replace(je,_e.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(B)||[""],null==p.crossDomain){l=w.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Ve.protocol+"//"+Ve.host!=l.protocol+"//"+l.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=E.param(p.data,p.traditional)),Ue(Ie,p,e,_),c)return _;for(h in(f=E.event&&p.global)&&0==E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!De.test(p.type),o=p.url.replace(Oe,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Me,"+")):(d=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(Ae.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Re,"$1"),d=(Ae.test(o)?"&":"?")+"_="+Ee.guid+++d),p.url=o+d),p.ifModified&&(E.lastModified[o]&&_.setRequestHeader("If-Modified-Since",E.lastModified[o]),E.etag[o]&&_.setRequestHeader("If-None-Match",E.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&_.setRequestHeader("Content-Type",p.contentType),_.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+ze+"; q=0.01":""):p.accepts["*"]),p.headers)_.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(g,_,p)||c))return _.abort();if(k="abort",y.add(p.complete),_.done(p.success),_.fail(p.error),r=Ue(Be,p,e,_)){if(_.readyState=1,f&&v.trigger("ajaxSend",[_,p]),c)return _;p.async&&p.timeout>0&&(u=n.setTimeout((function(){_.abort("timeout")}),p.timeout));try{c=!1,r.send(x,A)}catch(t){if(c)throw t;A(-1,t)}}else A(-1,"No Transport");function A(t,e,i,s){var l,h,d,w,x,S=e;c||(c=!0,u&&n.clearTimeout(u),r=void 0,a=s||"",_.readyState=t>0?4:0,l=t>=200&&t<300||304===t,i&&(w=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,_,i)),!l&&E.inArray("script",p.dataTypes)>-1&&E.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(p,w,_,l),l?(p.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(E.lastModified[o]=x),(x=_.getResponseHeader("etag"))&&(E.etag[o]=x)),204===t||"HEAD"===p.type?S="nocontent":304===t?S="notmodified":(S=w.state,h=w.data,l=!(d=w.error))):(d=S,!t&&S||(S="error",t<0&&(t=0))),_.status=t,_.statusText=(e||S)+"",l?m.resolveWith(g,[h,S,_]):m.rejectWith(g,[_,S,d]),_.statusCode(b),b=void 0,f&&v.trigger(l?"ajaxSuccess":"ajaxError",[_,p,l?h:d]),y.fireWith(g,[_,S]),f&&(v.trigger("ajaxComplete",[_,p]),--E.active||E.event.trigger("ajaxStop")))}return _},getJSON:function(t,e,n){return E.get(t,e,n,"json")},getScript:function(t,e){return E.get(t,void 0,e,"script")}}),E.each(["get","post"],(function(t,e){E[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:t,type:e,dataType:i,data:n,success:r},E.isPlainObject(t)&&t))}})),E.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),E._evalUrl=function(t,e,n){return E.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){E.globalEval(t,e,n)}})},E.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=E(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){E(this).wrapInner(t.call(this,e))})):this.each((function(){var e=E(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){E(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(t){return!E.expr.pseudos.visible(t)},E.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var He={0:200,1223:204},Ge=E.ajaxSettings.xhr();m.cors=!!Ge&&"withCredentials"in Ge,m.ajax=Ge=!!Ge,E.ajaxTransport((function(t){var e,r;if(m.cors||Ge&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(He[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){e&&r()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),E.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return E.globalEval(t),t}}}),E.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),E.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=E("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),w.head.appendChild(e[0])},abort:function(){n&&n()}}}));var We,Ye=[],Xe=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||E.expando+"_"+Ee.guid++;return this[t]=!0,t}}),E.ajaxPrefilter("json jsonp",(function(t,e,r){var i,o,a,s=!1!==t.jsonp&&(Xe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xe.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xe,"$1"+i):!1!==t.jsonp&&(t.url+=(Ae.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||E.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always((function(){void 0===o?E(n).removeProp(i):n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(i)),a&&y(o)&&o(a[0]),a=o=void 0})),"script"})),m.createHTMLDocument=((We=w.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===We.childNodes.length),E.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(m.createHTMLDocument?((r=(e=w.implementation.createHTMLDocument("")).createElement("base")).href=w.location.href,e.head.appendChild(r)):e=w),o=!n&&[],(i=M.exec(t))?[e.createElement(i[1])]:(i=_t([t],e,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(t,e,n){var r,o,a,s=this,u=t.indexOf(" ");return u>-1&&(r=ye(t.slice(u)),t=t.slice(0,u)),y(e)?(n=e,e=void 0):e&&"object"===i(e)&&(o="POST"),s.length>0&&E.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done((function(t){a=arguments,s.html(r?E("<div>").append(E.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,a||[t.responseText,e,t])}))}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,(function(e){return t===e.elem})).length},E.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,l=E.css(t,"position"),c=E(t),f={};"static"===l&&(t.style.position="relative"),s=c.offset(),o=E.css(t,"top"),u=E.css(t,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,E.extend({},s))),null!=e.top&&(f.top=e.top-s.top+a),null!=e.left&&(f.left=e.left-s.left+i),"using"in e?e.using.call(t,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){E.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===E.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=E(t).offset()).top+=E.css(t,"borderTopWidth",!0),i.left+=E.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-E.css(r,"marginTop",!0),left:e.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===E.css(t,"position");)t=t.offsetParent;return t||st}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;E.fn[t]=function(r){return G(this,(function(t,r,i){var o;if(b(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),E.each(["top","left"],(function(t,e){E.cssHooks[e]=Gt(m.pixelPosition,(function(t,n){if(n)return n=Ht(t,e),Vt.test(n)?E(t).position()[e]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(t,e){E.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){E.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return G(this,(function(e,n,i){var o;return b(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?E.css(e,n,s):E.style(e,n,i,s)}),e,a?i:void 0,a)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){E.fn[e]=function(t){return this.on(e,t)}})),E.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){E.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Qe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;E.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return r=u.call(arguments,2),(i=function(){return t.apply(e||this,r.concat(u.call(arguments)))}).guid=t.guid=t.guid||E.guid++,i},E.holdReady=function(t){t?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=L,E.isFunction=y,E.isWindow=b,E.camelCase=Q,E.type=k,E.now=Date.now,E.isNumeric=function(t){var e=E.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},E.trim=function(t){return null==t?"":(t+"").replace(Qe,"")},void 0===(r=function(){return E}.apply(e,[]))||(t.exports=r);var Ke=n.jQuery,Je=n.$;return E.noConflict=function(t){return n.$===E&&(n.$=Je),t&&n.jQuery===E&&(n.jQuery=Ke),E},void 0===o&&(n.jQuery=n.$=E),E}))},7108:(t,e,n)=>{var r=n(1263)(n(8403),"DataView");t.exports=r},2649:(t,e,n)=>{var r=n(1423),i=n(1087),o=n(4175),a=n(8215),s=n(7893);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},8140:(t,e,n)=>{var r=n(6589),i=n(5721),o=n(9537),a=n(1227),s=n(9304);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},8461:(t,e,n)=>{var r=n(1263)(n(8403),"Map");t.exports=r},1779:(t,e,n)=>{var r=n(4111),i=n(6312),o=n(303),a=n(7029),s=n(3789);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},6341:(t,e,n)=>{var r=n(1263)(n(8403),"Promise");t.exports=r},9740:(t,e,n)=>{var r=n(1263)(n(8403),"Set");t.exports=r},1571:(t,e,n)=>{var r=n(1779),i=n(8312),o=n(3830);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},8831:(t,e,n)=>{var r=n(8140),i=n(6557),o=n(4061),a=n(2580),s=n(6805),u=n(6661);function l(t){var e=this.__data__=new r(t);this.size=e.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=s,l.prototype.set=u,t.exports=l},1804:(t,e,n)=>{var r=n(8403).Symbol;t.exports=r},7012:(t,e,n)=>{var r=n(8403).Uint8Array;t.exports=r},3782:(t,e,n)=>{var r=n(1263)(n(8403),"WeakMap");t.exports=r},4442:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},414:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},5925:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},6303:(t,e,n)=>{var r=n(791);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},47:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},8863:(t,e,n)=>{var r=n(2386),i=n(2665),o=n(1030),a=n(4493),s=n(4344),u=n(1605),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),c=!n&&i(t),f=!n&&!c&&a(t),h=!n&&!c&&!f&&u(t),d=n||c||f||h,p=d?r(t.length,String):[],g=p.length;for(var v in t)!e&&!l.call(t,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||p.push(v);return p}},7620:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},6840:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},8963:t=>{t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},9317:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},3766:(t,e,n)=>{var r=n(2972)("length");t.exports=r},8145:(t,e,n)=>{var r=n(5055),i=n(3689);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},7140:(t,e,n)=>{var r=n(5055),i=n(3689),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},5345:(t,e,n)=>{var r=n(3689);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},9542:(t,e,n)=>{var r=n(8872),i=n(599);t.exports=function(t,e){return t&&r(e,i(e),t)}},436:(t,e,n)=>{var r=n(8872),i=n(5859);t.exports=function(t,e){return t&&r(e,i(e),t)}},5055:(t,e,n)=>{var r=n(8964);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},1719:(t,e,n)=>{var r=n(8831),i=n(414),o=n(7140),a=n(9542),s=n(436),u=n(2737),l=n(1808),c=n(7627),f=n(8135),h=n(1703),d=n(3960),p=n(5188),g=n(2551),v=n(2763),m=n(718),y=n(1030),b=n(4493),w=n(1534),x=n(1310),S=n(5897),k=n(599),_=n(5859),E="[object Arguments]",A="[object Function]",P="[object Object]",C={};C[E]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[P]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[A]=C["[object WeakMap]"]=!1,t.exports=function t(e,n,T,N,L,M){var O,R=1&n,F=2&n,D=4&n;if(T&&(O=L?T(e,N,L,M):T(e)),void 0!==O)return O;if(!x(e))return e;var j=y(e);if(j){if(O=g(e),!R)return l(e,O)}else{var I=p(e),B=I==A||"[object GeneratorFunction]"==I;if(b(e))return u(e,R);if(I==P||I==E||B&&!L){if(O=F||B?{}:m(e),!R)return F?f(e,s(O,e)):c(e,a(O,e))}else{if(!C[I])return L?e:{};O=v(e,I,R)}}M||(M=new r);var z=M.get(e);if(z)return z;M.set(e,O),S(e)?e.forEach((function(r){O.add(t(r,n,T,r,e,M))})):w(e)&&e.forEach((function(r,i){O.set(i,t(r,n,T,i,e,M))}));var V=j?void 0:(D?F?d:h:F?_:k)(e);return i(V||e,(function(r,i){V&&(r=e[i=r]),o(O,i,t(r,n,T,i,e,M))})),O}},3877:(t,e,n)=>{var r=n(1310),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},7136:(t,e,n)=>{var r=n(3810),i=n(5446)(r);t.exports=i},7348:(t,e,n)=>{var r=n(6137);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,l=a}return l}},5876:(t,e,n)=>{var r=n(7136);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},5059:t=>{t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},9035:(t,e,n)=>{var r=n(6840),i=n(3973);t.exports=function t(e,n,o,a,s){var u=-1,l=e.length;for(o||(o=i),s||(s=[]);++u<l;){var c=e[u];n>0&&o(c)?n>1?t(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},4099:(t,e,n)=>{var r=n(9423)();t.exports=r},3810:(t,e,n)=>{var r=n(4099),i=n(599);t.exports=function(t,e){return t&&r(t,e,i)}},9395:(t,e,n)=>{var r=n(543),i=n(1366);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},6767:(t,e,n)=>{var r=n(6840),i=n(1030);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},140:(t,e,n)=>{var r=n(1804),i=n(2054),o=n(5326),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},3453:t=>{t.exports=function(t,e){return t>e}},6253:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},8697:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},791:(t,e,n)=>{var r=n(5059),i=n(6007),o=n(9158);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},5098:(t,e,n)=>{var r=n(140),i=n(7415);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},582:(t,e,n)=>{var r=n(6040),i=n(7415);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},6040:(t,e,n)=>{var r=n(8831),i=n(6566),o=n(4665),a=n(2166),s=n(5188),u=n(1030),l=n(4493),c=n(1605),f="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,v,m){var y=u(t),b=u(e),w=y?h:s(t),x=b?h:s(e),S=(w=w==f?d:w)==d,k=(x=x==f?d:x)==d,_=w==x;if(_&&l(t)){if(!l(e))return!1;y=!0,S=!1}if(_&&!S)return m||(m=new r),y||c(t)?i(t,e,n,g,v,m):o(t,e,w,n,g,v,m);if(!(1&n)){var E=S&&p.call(t,"__wrapped__"),A=k&&p.call(e,"__wrapped__");if(E||A){var P=E?t.value():t,C=A?e.value():e;return m||(m=new r),v(P,C,n,g,m)}}return!!_&&(m||(m=new r),a(t,e,n,g,v,m))}},5255:(t,e,n)=>{var r=n(5188),i=n(7415);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},9042:(t,e,n)=>{var r=n(8831),i=n(582);t.exports=function(t,e,n,o){var a=n.length,s=a,u=!o;if(null==t)return!s;for(t=Object(t);a--;){var l=n[a];if(u&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++a<s;){var c=(l=n[a])[0],f=t[c],h=l[1];if(u&&l[2]){if(void 0===f&&!(c in t))return!1}else{var d=new r;if(o)var p=o(f,h,c,t,e,d);if(!(void 0===p?i(h,f,3,o,d):p))return!1}}return!0}},6007:t=>{t.exports=function(t){return t!=t}},37:(t,e,n)=>{var r=n(6681),i=n(5246),o=n(1310),a=n(6817),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:s).test(a(t))}},5239:(t,e,n)=>{var r=n(5188),i=n(7415);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},2473:(t,e,n)=>{var r=n(140),i=n(2596),o=n(7415),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},7859:(t,e,n)=>{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=n(4170),o=n(4101),a=n(9019),s=n(1030),u=n(1052);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==r(t)?s(t)?o(t[0],t[1]):i(t):u(t)}},4586:(t,e,n)=>{var r=n(1977),i=n(8848),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},2642:(t,e,n)=>{var r=n(1310),i=n(1977),o=n(4354),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},1737:t=>{t.exports=function(t,e){return t<e}},6500:(t,e,n)=>{var r=n(7136),i=n(5855);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}},4170:(t,e,n)=>{var r=n(9042),i=n(8308),o=n(6652);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},4101:(t,e,n)=>{var r=n(582),i=n(6550),o=n(3261),a=n(9169),s=n(9576),u=n(6652),l=n(1366);t.exports=function(t,e){return a(t)&&s(e)?u(l(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,3)}}},3497:(t,e,n)=>{var r=n(8831),i=n(8145),o=n(4099),a=n(276),s=n(1310),u=n(5859),l=n(6998);t.exports=function t(e,n,c,f,h){e!==n&&o(n,(function(o,u){if(h||(h=new r),s(o))a(e,n,u,c,t,f,h);else{var d=f?f(l(e,u),o,u+"",e,n,h):void 0;void 0===d&&(d=o),i(e,u,d)}}),u)}},276:(t,e,n)=>{var r=n(8145),i=n(2737),o=n(2343),a=n(1808),s=n(718),u=n(2665),l=n(1030),c=n(4521),f=n(4493),h=n(6681),d=n(1310),p=n(4730),g=n(1605),v=n(6998),m=n(4357);t.exports=function(t,e,n,y,b,w,x){var S=v(t,n),k=v(e,n),_=x.get(k);if(_)r(t,n,_);else{var E=w?w(S,k,n+"",t,e,x):void 0,A=void 0===E;if(A){var P=l(k),C=!P&&f(k),T=!P&&!C&&g(k);E=k,P||C||T?l(S)?E=S:c(S)?E=a(S):C?(A=!1,E=i(k,!0)):T?(A=!1,E=o(k,!0)):E=[]:p(k)||u(k)?(E=S,u(S)?E=m(S):d(S)&&!h(S)||(E=s(k))):A=!1}A&&(x.set(k,E),b(E,k,y,w,x),x.delete(k)),r(t,n,E)}}},4429:(t,e,n)=>{var r=n(7620),i=n(9395),o=n(7859),a=n(6500),s=n(9612),u=n(1811),l=n(2090),c=n(9019),f=n(1030);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return f(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[c];var h=-1;e=r(e,u(o));var d=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++h,value:t}}));return s(d,(function(t,e){return l(t,e,n)}))}},6880:(t,e,n)=>{var r=n(4866),i=n(3261);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},4866:(t,e,n)=>{var r=n(9395),i=n(6391),o=n(543);t.exports=function(t,e,n){for(var a=-1,s=e.length,u={};++a<s;){var l=e[a],c=r(t,l);n(c,l)&&i(u,o(l,t),c)}return u}},2972:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},4205:(t,e,n)=>{var r=n(9395);t.exports=function(t){return function(e){return r(e,t)}}},1514:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,o){for(var a=-1,s=n(e((r-t)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=t,t+=i;return u}},4806:t=>{t.exports=function(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}},6368:(t,e,n)=>{var r=n(9019),i=n(9388),o=n(2349);t.exports=function(t,e){return o(i(t,e,r),t+"")}},6391:(t,e,n)=>{var r=n(7140),i=n(543),o=n(4344),a=n(1310),s=n(1366);t.exports=function(t,e,n,u){if(!a(t))return t;for(var l=-1,c=(e=i(e,t)).length,f=c-1,h=t;null!=h&&++l<c;){var d=s(e[l]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(l!=f){var g=h[d];void 0===(p=u?u(g,d,h):void 0)&&(p=a(g)?g:o(e[l+1])?[]:{})}r(h,d,p),h=h[d]}return t}},3104:(t,e,n)=>{var r=n(8567),i=n(8964),o=n(9019),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},9092:(t,e,n)=>{var r=n(7136);t.exports=function(t,e){var n;return r(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}},9612:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},2386:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},5601:(t,e,n)=>{var r=n(1804),i=n(7620),o=n(1030),a=n(6137),s=r?r.prototype:void 0,u=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},8131:(t,e,n)=>{var r=n(7714),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},1811:t=>{t.exports=function(t){return function(e){return t(e)}}},1080:(t,e,n)=>{var r=n(1571),i=n(6303),o=n(47),a=n(5518),s=n(5728),u=n(5559);t.exports=function(t,e,n){var l=-1,c=i,f=t.length,h=!0,d=[],p=d;if(n)h=!1,c=o;else if(f>=200){var g=e?null:s(t);if(g)return u(g);h=!1,c=a,p=new r}else p=e?[]:d;t:for(;++l<f;){var v=t[l],m=e?e(v):v;if(v=n||0!==v?v:0,h&&m==m){for(var y=p.length;y--;)if(p[y]===m)continue t;e&&p.push(m),d.push(v)}else c(p,m,n)||(p!==d&&p.push(m),d.push(v))}return d}},9670:(t,e,n)=>{var r=n(7620);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},2818:t=>{t.exports=function(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:void 0;n(a,t[r],s)}return a}},5518:t=>{t.exports=function(t,e){return t.has(e)}},7291:(t,e,n)=>{var r=n(9019);t.exports=function(t){return"function"==typeof t?t:r}},543:(t,e,n)=>{var r=n(1030),i=n(9169),o=n(3029),a=n(7417);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},8297:(t,e,n)=>{var r=n(7012);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},2737:(t,e,n)=>{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)}t=n.nmd(t);var i=n(8403),o="object"==r(e)&&e&&!e.nodeType&&e,a=o&&"object"==r(t)&&t&&!t.nodeType&&t,s=a&&a.exports===o?i.Buffer:void 0,u=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}},1108:(t,e,n)=>{var r=n(8297);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},6488:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},6666:(t,e,n)=>{var r=n(1804),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},2343:(t,e,n)=>{var r=n(8297);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},221:(t,e,n)=>{var r=n(6137);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,u=null===e,l=e==e,c=r(e);if(!u&&!c&&!a&&t>e||a&&s&&l&&!u&&!c||i&&s&&l||!n&&l||!o)return 1;if(!i&&!a&&!c&&t<e||c&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!l)return-1}return 0}},2090:(t,e,n)=>{var r=n(221);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,u=n.length;++i<s;){var l=r(o[i],a[i]);if(l)return i>=u?l:l*("desc"==n[i]?-1:1)}return t.index-e.index}},1808:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},8872:(t,e,n)=>{var r=n(7140),i=n(5055);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var l=e[s],c=o?o(n[l],t[l],l,n,t):void 0;void 0===c&&(c=t[l]),a?i(n,l,c):r(n,l,c)}return n}},7627:(t,e,n)=>{var r=n(8872),i=n(3751);t.exports=function(t,e){return r(t,i(t),e)}},8135:(t,e,n)=>{var r=n(8872),i=n(7446);t.exports=function(t,e){return r(t,i(t),e)}},7437:(t,e,n)=>{var r=n(8403)["__core-js_shared__"];t.exports=r},8084:(t,e,n)=>{var r=n(6368),i=n(603);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e}))}},5446:(t,e,n)=>{var r=n(5855);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},9423:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},6632:(t,e,n)=>{var r=n(7859),i=n(5855),o=n(599);t.exports=function(t){return function(e,n,a){var s=Object(e);if(!i(e)){var u=r(n,3);e=o(e),n=function(t){return u(s[t],t,s)}}var l=t(e,n,a);return l>-1?s[u?e[l]:l]:void 0}}},8538:(t,e,n)=>{var r=n(1514),i=n(603),o=n(5571);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e<n?1:-1:o(a),r(e,n,a,t)}}},5728:(t,e,n)=>{var r=n(9740),i=n(6628),o=n(5559),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},8964:(t,e,n)=>{var r=n(1263),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},6566:(t,e,n)=>{var r=n(1571),i=n(9317),o=n(5518);t.exports=function(t,e,n,a,s,u){var l=1&n,c=t.length,f=e.length;if(c!=f&&!(l&&f>c))return!1;var h=u.get(t),d=u.get(e);if(h&&d)return h==e&&d==t;var p=-1,g=!0,v=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++p<c;){var m=t[p],y=e[p];if(a)var b=l?a(y,m,p,e,t,u):a(m,y,p,t,e,u);if(void 0!==b){if(b)continue;g=!1;break}if(v){if(!i(e,(function(t,e){if(!o(v,e)&&(m===t||s(m,t,n,a,u)))return v.push(e)}))){g=!1;break}}else if(m!==y&&!s(m,y,n,a,u)){g=!1;break}}return u.delete(t),u.delete(e),g}},4665:(t,e,n)=>{var r=n(1804),i=n(7012),o=n(3689),a=n(6566),s=n(9578),u=n(5559),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;t.exports=function(t,e,n,r,l,f,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),t.size!=e.size&&!p)return!1;var g=h.get(t);if(g)return g==e;r|=2,h.set(t,e);var v=a(d(t),d(e),r,l,f,h);return h.delete(t),v;case"[object Symbol]":if(c)return c.call(t)==c.call(e)}return!1}},2166:(t,e,n)=>{var r=n(1703),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var u=1&n,l=r(t),c=l.length;if(c!=r(e).length&&!u)return!1;for(var f=c;f--;){var h=l[f];if(!(u?h in e:i.call(e,h)))return!1}var d=s.get(t),p=s.get(e);if(d&&p)return d==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);for(var v=u;++f<c;){var m=t[h=l[f]],y=e[h];if(o)var b=u?o(y,m,h,e,t,s):o(m,y,h,t,e,s);if(!(void 0===b?m===y||a(m,y,n,o,s):b)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(e),g}},1841:(t,e,n)=>{var r=n(1247),i=n(9388),o=n(2349);t.exports=function(t){return o(i(t,void 0,r),t+"")}},7882:(t,e,n)=>{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"==(void 0===n.g?"undefined":r(n.g))&&n.g&&n.g.Object===Object&&n.g;t.exports=i},1703:(t,e,n)=>{var r=n(6767),i=n(3751),o=n(599);t.exports=function(t){return r(t,o,i)}},3960:(t,e,n)=>{var r=n(6767),i=n(7446),o=n(5859);t.exports=function(t){return r(t,o,i)}},6186:(t,e,n)=>{var r=n(710);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},8308:(t,e,n)=>{var r=n(9576),i=n(599);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},1263:(t,e,n)=>{var r=n(37),i=n(403);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},885:(t,e,n)=>{var r=n(8112)(Object.getPrototypeOf,Object);t.exports=r},2054:(t,e,n)=>{var r=n(1804),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},3751:(t,e,n)=>{var r=n(5925),i=n(854),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},7446:(t,e,n)=>{var r=n(6840),i=n(885),o=n(3751),a=n(854),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},5188:(t,e,n)=>{var r=n(7108),i=n(8461),o=n(6341),a=n(9740),s=n(3782),u=n(140),l=n(6817),c="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",g=l(r),v=l(i),m=l(o),y=l(a),b=l(s),w=u;(r&&w(new r(new ArrayBuffer(1)))!=p||i&&w(new i)!=c||o&&w(o.resolve())!=f||a&&w(new a)!=h||s&&w(new s)!=d)&&(w=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?l(n):"";if(r)switch(r){case g:return p;case v:return c;case m:return f;case y:return h;case b:return d}return e}),t.exports=w},403:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1277:(t,e,n)=>{var r=n(543),i=n(2665),o=n(1030),a=n(4344),s=n(2596),u=n(1366);t.exports=function(t,e,n){for(var l=-1,c=(e=r(e,t)).length,f=!1;++l<c;){var h=u(e[l]);if(!(f=null!=t&&n(t,h)))break;t=t[h]}return f||++l!=c?f:!!(c=null==t?0:t.length)&&s(c)&&a(h,c)&&(o(t)||i(t))}},7858:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},1423:(t,e,n)=>{var r=n(6574);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},1087:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},4175:(t,e,n)=>{var r=n(6574),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},8215:(t,e,n)=>{var r=n(6574),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},7893:(t,e,n)=>{var r=n(6574);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},2551:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},2763:(t,e,n)=>{var r=n(8297),i=n(1108),o=n(6488),a=n(6666),s=n(2343);t.exports=function(t,e,n){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return o(t);case"[object Set]":return new u;case"[object Symbol]":return a(t)}}},718:(t,e,n)=>{var r=n(3877),i=n(885),o=n(1977);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},3973:(t,e,n)=>{var r=n(1804),i=n(2665),o=n(1030),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},4344:t=>{function e(t){return(e="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 n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var i=e(t);return!!(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&n.test(t))&&t>-1&&t%1==0&&t<r}},603:(t,e,n)=>{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=n(3689),o=n(5855),a=n(4344),s=n(1310);t.exports=function(t,e,n){if(!s(n))return!1;var u=r(e);return!!("number"==u?o(n)&&a(e,n.length):"string"==u&&e in n)&&i(n[e],t)}},9169:(t,e,n)=>{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=n(1030),o=n(6137),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(i(t))return!1;var n=r(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||s.test(t)||!a.test(t)||null!=e&&t in Object(e)}},710:t=>{function e(t){return(e="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)}t.exports=function(t){var n=e(t);return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},5246:(t,e,n)=>{var r,i=n(7437),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},1977:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},9576:(t,e,n)=>{var r=n(1310);t.exports=function(t){return t==t&&!r(t)}},6589:t=>{t.exports=function(){this.__data__=[],this.size=0}},5721:(t,e,n)=>{var r=n(5345),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},9537:(t,e,n)=>{var r=n(5345);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},1227:(t,e,n)=>{var r=n(5345);t.exports=function(t){return r(this.__data__,t)>-1}},9304:(t,e,n)=>{var r=n(5345);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},4111:(t,e,n)=>{var r=n(2649),i=n(8140),o=n(8461);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},6312:(t,e,n)=>{var r=n(6186);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},303:(t,e,n)=>{var r=n(6186);t.exports=function(t){return r(this,t).get(t)}},7029:(t,e,n)=>{var r=n(6186);t.exports=function(t){return r(this,t).has(t)}},3789:(t,e,n)=>{var r=n(6186);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},9578:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},6652:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},7928:(t,e,n)=>{var r=n(2094);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},6574:(t,e,n)=>{var r=n(1263)(Object,"create");t.exports=r},8848:(t,e,n)=>{var r=n(8112)(Object.keys,Object);t.exports=r},4354:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},3051:(t,e,n)=>{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)}t=n.nmd(t);var i=n(7882),o="object"==r(e)&&e&&!e.nodeType&&e,a=o&&"object"==r(t)&&t&&!t.nodeType&&t,s=a&&a.exports===o&&i.process,u=function(){try{return a&&a.require&&a.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u},5326:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},8112:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},9388:(t,e,n)=>{var r=n(4442),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=o[a];return l[e]=n(u),r(t,this,l)}}},8403:(t,e,n)=>{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=n(7882),o="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=i||o||Function("return this")();t.exports=a},6998:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},8312:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},3830:t=>{t.exports=function(t){return this.__data__.has(t)}},5559:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},2349:(t,e,n)=>{var r=n(3104),i=n(2151)(r);t.exports=i},2151:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},6557:(t,e,n)=>{var r=n(8140);t.exports=function(){this.__data__=new r,this.size=0}},4061:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},2580:t=>{t.exports=function(t){return this.__data__.get(t)}},6805:t=>{t.exports=function(t){return this.__data__.has(t)}},6661:(t,e,n)=>{var r=n(8140),i=n(8461),o=n(1779);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},9158:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},3358:(t,e,n)=>{var r=n(3766),i=n(7858),o=n(9459);t.exports=function(t){return i(t)?o(t):r(t)}},3029:(t,e,n)=>{var r=n(7928),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=a},1366:(t,e,n)=>{var r=n(6137);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},6817:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7714:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},9459:t=>{var e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+e+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",u=s+a+"(?:\\u200d(?:"+[r,i,o].join("|")+")"+s+a+")*",l="(?:"+[r+e+"?",e,i,o,"[\\ud800-\\udfff]"].join("|")+")",c=RegExp(n+"(?="+n+")|"+l+u,"g");t.exports=function(t){for(var e=c.lastIndex=0;c.test(t);)++e;return e}},7141:(t,e,n)=>{var r=n(1719);t.exports=function(t){return r(t,4)}},9825:(t,e,n)=>{var r=n(1719);t.exports=function(t){return r(t,5)}},8567:t=>{t.exports=function(t){return function(){return t}}},9638:(t,e,n)=>{var r=n(6368),i=n(3689),o=n(603),a=n(5859),s=Object.prototype,u=s.hasOwnProperty,l=r((function(t,e){t=Object(t);var n=-1,r=e.length,l=r>2?e[2]:void 0;for(l&&o(e[0],e[1],l)&&(r=1);++n<r;)for(var c=e[n],f=a(c),h=-1,d=f.length;++h<d;){var p=f[h],g=t[p];(void 0===g||i(g,s[p])&&!u.call(t,p))&&(t[p]=c[p])}return t}));t.exports=l},3812:(t,e,n)=>{t.exports=n(3695)},3689:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},8319:(t,e,n)=>{var r=n(5925),i=n(5876),o=n(7859),a=n(1030);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},6726:(t,e,n)=>{var r=n(6632)(n(2203));t.exports=r},2203:(t,e,n)=>{var r=n(5059),i=n(7859),o=n(5700),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(t,i(e,3),u)}},1247:(t,e,n)=>{var r=n(9035);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},3695:(t,e,n)=>{var r=n(414),i=n(7136),o=n(7291),a=n(1030);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},548:(t,e,n)=>{var r=n(4099),i=n(7291),o=n(5859);t.exports=function(t,e){return null==t?t:r(t,i(e),o)}},6550:(t,e,n)=>{var r=n(9395);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},5373:(t,e,n)=>{var r=n(6253),i=n(1277);t.exports=function(t,e){return null!=t&&i(t,e,r)}},3261:(t,e,n)=>{var r=n(8697),i=n(1277);t.exports=function(t,e){return null!=t&&i(t,e,r)}},9019:t=>{t.exports=function(t){return t}},2665:(t,e,n)=>{var r=n(5098),i=n(7415),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},1030:t=>{var e=Array.isArray;t.exports=e},5855:(t,e,n)=>{var r=n(6681),i=n(2596);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},4521:(t,e,n)=>{var r=n(5855),i=n(7415);t.exports=function(t){return i(t)&&r(t)}},4493:(t,e,n)=>{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)}t=n.nmd(t);var i=n(8403),o=n(9701),a="object"==r(e)&&e&&!e.nodeType&&e,s=a&&"object"==r(t)&&t&&!t.nodeType&&t,u=s&&s.exports===a?i.Buffer:void 0,l=(u?u.isBuffer:void 0)||o;t.exports=l},490:(t,e,n)=>{var r=n(4586),i=n(5188),o=n(2665),a=n(1030),s=n(5855),u=n(4493),l=n(1977),c=n(1605),f=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||c(t)||o(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(l(t))return!r(t).length;for(var n in t)if(f.call(t,n))return!1;return!0}},8954:(t,e,n)=>{var r=n(582);t.exports=function(t,e){return r(t,e)}},6681:(t,e,n)=>{var r=n(140),i=n(1310);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},2596:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},1534:(t,e,n)=>{var r=n(5255),i=n(1811),o=n(3051),a=o&&o.isMap,s=a?i(a):r;t.exports=s},1310:t=>{function e(t){return(e="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)}t.exports=function(t){var n=e(t);return null!=t&&("object"==n||"function"==n)}},7415:t=>{function e(t){return(e="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)}t.exports=function(t){return null!=t&&"object"==e(t)}},4730:(t,e,n)=>{var r=n(140),i=n(885),o=n(7415),a=Function.prototype,s=Object.prototype,u=a.toString,l=s.hasOwnProperty,c=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},5897:(t,e,n)=>{var r=n(5239),i=n(1811),o=n(3051),a=o&&o.isSet,s=a?i(a):r;t.exports=s},7458:(t,e,n)=>{var r=n(140),i=n(1030),o=n(7415);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},6137:(t,e,n)=>{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=n(140),o=n(7415);t.exports=function(t){return"symbol"==r(t)||o(t)&&"[object Symbol]"==i(t)}},1605:(t,e,n)=>{var r=n(2473),i=n(1811),o=n(3051),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},5082:t=>{t.exports=function(t){return void 0===t}},599:(t,e,n)=>{var r=n(8863),i=n(4586),o=n(5855);t.exports=function(t){return o(t)?r(t):i(t)}},5859:(t,e,n)=>{var r=n(8863),i=n(2642),o=n(5855);t.exports=function(t){return o(t)?r(t,!0):i(t)}},6496:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},3153:function(t,e,n){var r;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)}t=n.nmd(t),function(){var o,a="Expected a function",s="__lodash_hash_undefined__",u="__lodash_placeholder__",l=32,c=128,f=1/0,h=9007199254740991,d=NaN,p=4294967295,g=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],v="[object Arguments]",m="[object Array]",y="[object Boolean]",b="[object Date]",w="[object Error]",x="[object Function]",S="[object GeneratorFunction]",k="[object Map]",_="[object Number]",E="[object Object]",A="[object Promise]",P="[object RegExp]",C="[object Set]",T="[object String]",N="[object Symbol]",L="[object WeakMap]",M="[object ArrayBuffer]",O="[object DataView]",R="[object Float32Array]",F="[object Float64Array]",D="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",B="[object Uint8Array]",z="[object Uint8ClampedArray]",V="[object Uint16Array]",$="[object Uint32Array]",U=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,Y=RegExp(G.source),X=RegExp(W.source),Q=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tt=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(nt.source),it=/^\s+/,ot=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="a-z\\xdf-\\xf6\\xf8-\\xff",_t="A-Z\\xc0-\\xd6\\xd8-\\xde",Et="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",At="["+Et+"]",Pt="["+St+"]",Ct="\\d+",Tt="["+kt+"]",Nt="[^\\ud800-\\udfff"+Et+Ct+"\\u2700-\\u27bf"+kt+_t+"]",Lt="\\ud83c[\\udffb-\\udfff]",Mt="[^\\ud800-\\udfff]",Ot="(?:\\ud83c[\\udde6-\\uddff]){2}",Rt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+_t+"]",Dt="(?:"+Tt+"|"+Nt+")",jt="(?:"+Ft+"|"+Nt+")",It="(?:['’](?:d|ll|m|re|s|t|ve))?",Bt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Pt+"|"+Lt+")?",Vt="[\\ufe0e\\ufe0f]?",$t=Vt+zt+"(?:\\u200d(?:"+[Mt,Ot,Rt].join("|")+")"+Vt+zt+")*",Ut="(?:"+["[\\u2700-\\u27bf]",Ot,Rt].join("|")+")"+$t,qt="(?:"+[Mt+Pt+"?",Pt,Ot,Rt,"[\\ud800-\\udfff]"].join("|")+")",Ht=RegExp("['’]","g"),Gt=RegExp(Pt,"g"),Wt=RegExp(Lt+"(?="+Lt+")|"+qt+$t,"g"),Yt=RegExp([Ft+"?"+Tt+"+"+It+"(?="+[At,Ft,"$"].join("|")+")",jt+"+"+Bt+"(?="+[At,Ft+Dt,"$"].join("|")+")",Ft+"?"+Dt+"+"+It,Ft+"+"+Bt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,Ut].join("|"),"g"),Xt=RegExp("[\\u200d\\ud800-\\udfff"+St+"\\ufe0e\\ufe0f]"),Qt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Kt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Jt=-1,Zt={};Zt[R]=Zt[F]=Zt[D]=Zt[j]=Zt[I]=Zt[B]=Zt[z]=Zt[V]=Zt[$]=!0,Zt[v]=Zt[m]=Zt[M]=Zt[y]=Zt[O]=Zt[b]=Zt[w]=Zt[x]=Zt[k]=Zt[_]=Zt[E]=Zt[P]=Zt[C]=Zt[T]=Zt[L]=!1;var te={};te[v]=te[m]=te[M]=te[O]=te[y]=te[b]=te[R]=te[F]=te[D]=te[j]=te[I]=te[k]=te[_]=te[E]=te[P]=te[C]=te[T]=te[N]=te[B]=te[z]=te[V]=te[$]=!0,te[w]=te[x]=te[L]=!1;var ee={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ne=parseFloat,re=parseInt,ie="object"==(void 0===n.g?"undefined":i(n.g))&&n.g&&n.g.Object===Object&&n.g,oe="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,ae=ie||oe||Function("return this")(),se="object"==i(e)&&e&&!e.nodeType&&e,ue=se&&"object"==i(t)&&t&&!t.nodeType&&t,le=ue&&ue.exports===se,ce=le&&ie.process,fe=function(){try{return ue&&ue.require&&ue.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),he=fe&&fe.isArrayBuffer,de=fe&&fe.isDate,pe=fe&&fe.isMap,ge=fe&&fe.isRegExp,ve=fe&&fe.isSet,me=fe&&fe.isTypedArray;function ye(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function be(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function we(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function xe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Se(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function ke(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function _e(t,e){return!(null==t||!t.length)&&Re(t,e,0)>-1}function Ee(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ae(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Pe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Ce(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Te(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Ne(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Le=Ie("length");function Me(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Oe(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Re(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Oe(t,De,n)}function Fe(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function De(t){return t!=t}function je(t,e){var n=null==t?0:t.length;return n?Ve(t,e)/n:d}function Ie(t){return function(e){return null==e?o:e[t]}}function Be(t){return function(e){return null==t?o:t[e]}}function ze(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ve(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);a!==o&&(n=n===o?a:n+a)}return n}function $e(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ue(t){return t?t.slice(0,un(t)+1).replace(it,""):t}function qe(t){return function(e){return t(e)}}function He(t,e){return Ae(e,(function(e){return t[e]}))}function Ge(t,e){return t.has(e)}function We(t,e){for(var n=-1,r=t.length;++n<r&&Re(e,t[n],0)>-1;);return n}function Ye(t,e){for(var n=t.length;n--&&Re(e,t[n],0)>-1;);return n}function Xe(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Qe=Be({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Ke=Be({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Je(t){return"\\"+ee[t]}function Ze(t){return Xt.test(t)}function tn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function en(t,e){return function(n){return t(e(n))}}function nn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==u||(t[n]=u,o[i++]=n)}return o}function rn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function an(t){return Ze(t)?function(t){for(var e=Wt.lastIndex=0;Wt.test(t);)++e;return e}(t):Le(t)}function sn(t){return Ze(t)?function(t){return t.match(Wt)||[]}(t):function(t){return t.split("")}(t)}function un(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var ln=Be({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),cn=function t(e){var n,r=(e=null==e?ae:cn.defaults(ae.Object(),e,cn.pick(ae,Kt))).Array,ot=e.Date,St=e.Error,kt=e.Function,_t=e.Math,Et=e.Object,At=e.RegExp,Pt=e.String,Ct=e.TypeError,Tt=r.prototype,Nt=kt.prototype,Lt=Et.prototype,Mt=e["__core-js_shared__"],Ot=Nt.toString,Rt=Lt.hasOwnProperty,Ft=0,Dt=(n=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",jt=Lt.toString,It=Ot.call(Et),Bt=ae._,zt=At("^"+Ot.call(Rt).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=le?e.Buffer:o,$t=e.Symbol,Ut=e.Uint8Array,qt=Vt?Vt.allocUnsafe:o,Wt=en(Et.getPrototypeOf,Et),Xt=Et.create,ee=Lt.propertyIsEnumerable,ie=Tt.splice,oe=$t?$t.isConcatSpreadable:o,se=$t?$t.iterator:o,ue=$t?$t.toStringTag:o,ce=function(){try{var t=co(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),fe=e.clearTimeout!==ae.clearTimeout&&e.clearTimeout,Le=ot&&ot.now!==ae.Date.now&&ot.now,Be=e.setTimeout!==ae.setTimeout&&e.setTimeout,fn=_t.ceil,hn=_t.floor,dn=Et.getOwnPropertySymbols,pn=Vt?Vt.isBuffer:o,gn=e.isFinite,vn=Tt.join,mn=en(Et.keys,Et),yn=_t.max,bn=_t.min,wn=ot.now,xn=e.parseInt,Sn=_t.random,kn=Tt.reverse,_n=co(e,"DataView"),En=co(e,"Map"),An=co(e,"Promise"),Pn=co(e,"Set"),Cn=co(e,"WeakMap"),Tn=co(Et,"create"),Nn=Cn&&new Cn,Ln={},Mn=zo(_n),On=zo(En),Rn=zo(An),Fn=zo(Pn),Dn=zo(Cn),jn=$t?$t.prototype:o,In=jn?jn.valueOf:o,Bn=jn?jn.toString:o;function zn(t){if(rs(t)&&!Ga(t)&&!(t instanceof qn)){if(t instanceof Un)return t;if(Rt.call(t,"__wrapped__"))return Vo(t)}return new Un(t)}var Vn=function(){function t(){}return function(e){if(!ns(e))return{};if(Xt)return Xt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function $n(){}function Un(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function qn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Wn;++e<n;)this.add(t[e])}function Xn(t){var e=this.__data__=new Gn(t);this.size=e.size}function Qn(t,e){var n=Ga(t),r=!n&&Ha(t),i=!n&&!r&&Qa(t),o=!n&&!r&&!i&&fs(t),a=n||r||i||o,s=a?$e(t.length,Pt):[],u=s.length;for(var l in t)!e&&!Rt.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||yo(l,u))||s.push(l);return s}function Kn(t){var e=t.length;return e?t[Wr(0,e-1)]:o}function Jn(t,e){return Fo(Ci(t),sr(e,0,t.length))}function Zn(t){return Fo(Ci(t))}function tr(t,e,n){(n!==o&&!$a(t[e],n)||n===o&&!(e in t))&&or(t,e,n)}function er(t,e,n){var r=t[e];Rt.call(t,e)&&$a(r,n)&&(n!==o||e in t)||or(t,e,n)}function nr(t,e){for(var n=t.length;n--;)if($a(t[n][0],e))return n;return-1}function rr(t,e,n,r){return hr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function ir(t,e){return t&&Ti(e,Os(e),t)}function or(t,e,n){"__proto__"==e&&ce?ce(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ar(t,e){for(var n=-1,i=e.length,a=r(i),s=null==t;++n<i;)a[n]=s?o:Cs(t,e[n]);return a}function sr(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function ur(t,e,n,r,i,a){var s,u=1&e,l=2&e,c=4&e;if(n&&(s=i?n(t,r,i,a):n(t)),s!==o)return s;if(!ns(t))return t;var f=Ga(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Ci(t,s)}else{var h=po(t),d=h==x||h==S;if(Qa(t))return Si(t,u);if(h==E||h==v||d&&!i){if(s=l||d?{}:vo(t),!u)return l?function(t,e){return Ti(t,ho(t),e)}(t,function(t,e){return t&&Ti(e,Rs(e),t)}(s,t)):function(t,e){return Ti(t,fo(t),e)}(t,ir(s,t))}else{if(!te[h])return i?t:{};s=function(t,e,n){var r,i=t.constructor;switch(e){case M:return ki(t);case y:case b:return new i(+t);case O:return function(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case F:case D:case j:case I:case B:case z:case V:case $:return _i(t,n);case k:return new i;case _:case T:return new i(t);case P:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new i;case N:return r=t,In?Et(In.call(r)):{}}}(t,h,u)}}a||(a=new Xn);var p=a.get(t);if(p)return p;a.set(t,s),us(t)?t.forEach((function(r){s.add(ur(r,e,n,r,t,a))})):is(t)&&t.forEach((function(r,i){s.set(i,ur(r,e,n,i,t,a))}));var g=f?o:(c?l?ro:no:l?Rs:Os)(t);return we(g||t,(function(r,i){g&&(r=t[i=r]),er(s,i,ur(r,e,n,i,t,a))})),s}function lr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var i=n[r],a=e[i],s=t[i];if(s===o&&!(i in t)||!a(s))return!1}return!0}function cr(t,e,n){if("function"!=typeof t)throw new Ct(a);return Lo((function(){t.apply(o,n)}),e)}function fr(t,e,n,r){var i=-1,o=_e,a=!0,s=t.length,u=[],l=e.length;if(!s)return u;n&&(e=Ae(e,qe(n))),r?(o=Ee,a=!1):e.length>=200&&(o=Ge,a=!1,e=new Yn(e));t:for(;++i<s;){var c=t[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f==f){for(var h=l;h--;)if(e[h]===f)continue t;u.push(c)}else o(e,f,r)||u.push(c)}return u}zn.templateSettings={escape:Q,evaluate:K,interpolate:J,variable:"",imports:{_:zn}},zn.prototype=$n.prototype,zn.prototype.constructor=zn,Un.prototype=Vn($n.prototype),Un.prototype.constructor=Un,qn.prototype=Vn($n.prototype),qn.prototype.constructor=qn,Hn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Hn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hn.prototype.get=function(t){var e=this.__data__;if(Tn){var n=e[t];return n===s?o:n}return Rt.call(e,t)?e[t]:o},Hn.prototype.has=function(t){var e=this.__data__;return Tn?e[t]!==o:Rt.call(e,t)},Hn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tn&&e===o?s:e,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(t){var e=this.__data__,n=nr(e,t);return!(n<0||(n==e.length-1?e.pop():ie.call(e,n,1),--this.size,0))},Gn.prototype.get=function(t){var e=this.__data__,n=nr(e,t);return n<0?o:e[n][1]},Gn.prototype.has=function(t){return nr(this.__data__,t)>-1},Gn.prototype.set=function(t,e){var n=this.__data__,r=nr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(En||Gn),string:new Hn}},Wn.prototype.delete=function(t){var e=uo(this,t).delete(t);return this.size-=e?1:0,e},Wn.prototype.get=function(t){return uo(this,t).get(t)},Wn.prototype.has=function(t){return uo(this,t).has(t)},Wn.prototype.set=function(t,e){var n=uo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(t){return this.__data__.set(t,s),this},Yn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Gn){var r=n.__data__;if(!En||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(t,e),this.size=n.size,this};var hr=Mi(wr),dr=Mi(xr,!0);function pr(t,e){var n=!0;return hr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],s=e(a);if(null!=s&&(u===o?s==s&&!cs(s):n(s,u)))var u=s,l=a}return l}function vr(t,e){var n=[];return hr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function mr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=mo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?mr(s,e-1,n,r,i):Pe(i,s):r||(i[i.length]=s)}return i}var yr=Oi(),br=Oi(!0);function wr(t,e){return t&&yr(t,e,Os)}function xr(t,e){return t&&br(t,e,Os)}function Sr(t,e){return ke(e,(function(e){return Za(t[e])}))}function kr(t,e){for(var n=0,r=(e=yi(e,t)).length;null!=t&&n<r;)t=t[Bo(e[n++])];return n&&n==r?t:o}function _r(t,e,n){var r=e(t);return Ga(t)?r:Pe(r,n(t))}function Er(t){return null==t?t===o?"[object Undefined]":"[object Null]":ue&&ue in Et(t)?function(t){var e=Rt.call(t,ue),n=t[ue];try{t[ue]=o;var r=!0}catch(t){}var i=jt.call(t);return r&&(e?t[ue]=n:delete t[ue]),i}(t):function(t){return jt.call(t)}(t)}function Ar(t,e){return t>e}function Pr(t,e){return null!=t&&Rt.call(t,e)}function Cr(t,e){return null!=t&&e in Et(t)}function Tr(t,e,n){for(var i=n?Ee:_e,a=t[0].length,s=t.length,u=s,l=r(s),c=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Ae(h,qe(e))),c=bn(h.length,c),l[u]=!n&&(e||a>=120&&h.length>=120)?new Yn(u&&h):o}h=t[0];var d=-1,p=l[0];t:for(;++d<a&&f.length<c;){var g=h[d],v=e?e(g):g;if(g=n||0!==g?g:0,!(p?Ge(p,v):i(f,v,n))){for(u=s;--u;){var m=l[u];if(!(m?Ge(m,v):i(t[u],v,n)))continue t}p&&p.push(v),f.push(g)}}return f}function Nr(t,e,n){var r=null==(t=Po(t,e=yi(e,t)))?t:t[Bo(Jo(e))];return null==r?o:ye(r,t,n)}function Lr(t){return rs(t)&&Er(t)==v}function Mr(t,e,n,r,i){return t===e||(null==t||null==e||!rs(t)&&!rs(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var s=Ga(t),u=Ga(e),l=s?m:po(t),c=u?m:po(e),f=(l=l==v?E:l)==E,h=(c=c==v?E:c)==E,d=l==c;if(d&&Qa(t)){if(!Qa(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Xn),s||fs(t)?to(t,e,n,r,i,a):function(t,e,n,r,i,o,a){switch(n){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!o(new Ut(t),new Ut(e)));case y:case b:case _:return $a(+t,+e);case w:return t.name==e.name&&t.message==e.message;case P:case T:return t==e+"";case k:var s=tn;case C:var u=1&r;if(s||(s=rn),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=to(s(t),s(e),r,i,o,a);return a.delete(t),c;case N:if(In)return In.call(t)==In.call(e)}return!1}(t,e,l,n,r,i,a);if(!(1&n)){var p=f&&Rt.call(t,"__wrapped__"),g=h&&Rt.call(e,"__wrapped__");if(p||g){var x=p?t.value():t,S=g?e.value():e;return a||(a=new Xn),i(x,S,n,r,a)}}return!!d&&(a||(a=new Xn),function(t,e,n,r,i,a){var s=1&n,u=no(t),l=u.length;if(l!=no(e).length&&!s)return!1;for(var c=l;c--;){var f=u[c];if(!(s?f in e:Rt.call(e,f)))return!1}var h=a.get(t),d=a.get(e);if(h&&d)return h==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c<l;){var v=t[f=u[c]],m=e[f];if(r)var y=s?r(m,v,f,e,t,a):r(v,m,f,t,e,a);if(!(y===o?v===m||i(v,m,n,r,a):y)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return a.delete(t),a.delete(e),p}(t,e,n,r,i,a))}(t,e,n,r,Mr,i))}function Or(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=Et(t);i--;){var u=n[i];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){var l=(u=n[i])[0],c=t[l],f=u[1];if(s&&u[2]){if(c===o&&!(l in t))return!1}else{var h=new Xn;if(r)var d=r(c,f,l,t,e,h);if(!(d===o?Mr(f,c,3,r,h):d))return!1}}return!0}function Rr(t){return!(!ns(t)||(e=t,Dt&&Dt in e))&&(Za(t)?zt:vt).test(zo(t));var e}function Fr(t){return"function"==typeof t?t:null==t?ou:"object"==i(t)?Ga(t)?zr(t[0],t[1]):Br(t):pu(t)}function Dr(t){if(!ko(t))return mn(t);var e=[];for(var n in Et(t))Rt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function jr(t,e){return t<e}function Ir(t,e){var n=-1,i=Ya(t)?r(t.length):[];return hr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Br(t){var e=lo(t);return 1==e.length&&e[0][2]?Eo(e[0][0],e[0][1]):function(n){return n===t||Or(n,t,e)}}function zr(t,e){return wo(t)&&_o(e)?Eo(Bo(t),e):function(n){var r=Cs(n,t);return r===o&&r===e?Ts(n,t):Mr(e,r,3)}}function Vr(t,e,n,r,i){t!==e&&yr(e,(function(a,s){if(i||(i=new Xn),ns(a))!function(t,e,n,r,i,a,s){var u=To(t,n),l=To(e,n),c=s.get(l);if(c)tr(t,n,c);else{var f=a?a(u,l,n+"",t,e,s):o,h=f===o;if(h){var d=Ga(l),p=!d&&Qa(l),g=!d&&!p&&fs(l);f=l,d||p||g?Ga(u)?f=u:Xa(u)?f=Ci(u):p?(h=!1,f=Si(l,!0)):g?(h=!1,f=_i(l,!0)):f=[]:as(l)||Ha(l)?(f=u,Ha(u)?f=bs(u):ns(u)&&!Za(u)||(f=vo(l))):h=!1}h&&(s.set(l,f),i(f,l,r,a,s),s.delete(l)),tr(t,n,f)}}(t,e,s,n,Vr,r,i);else{var u=r?r(To(t,s),a,s+"",t,e,i):o;u===o&&(u=a),tr(t,s,u)}}),Rs)}function $r(t,e){var n=t.length;if(n)return yo(e+=e<0?n:0,n)?t[e]:o}function Ur(t,e,n){e=e.length?Ae(e,(function(t){return Ga(t)?function(e){return kr(e,1===t.length?t[0]:t)}:t})):[ou];var r=-1;return e=Ae(e,qe(so())),function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;++r<a;){var u=Ei(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(Ir(t,(function(t,n,i){return{criteria:Ae(e,(function(e){return e(t)})),index:++r,value:t}})))}function qr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=kr(t,a);n(s,a)&&Jr(o,yi(a,t),s)}return o}function Hr(t,e,n,r){var i=r?Fe:Re,o=-1,a=e.length,s=t;for(t===e&&(e=Ci(e)),n&&(s=Ae(t,qe(n)));++o<a;)for(var u=0,l=e[o],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==t&&ie.call(s,u,1),ie.call(t,u,1);return t}function Gr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;yo(i)?ie.call(t,i,1):ci(t,i)}}return t}function Wr(t,e){return t+hn(Sn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=hn(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Mo(Ao(t,e,ou),t+"")}function Qr(t){return Kn($s(t))}function Kr(t,e){var n=$s(t);return Fo(n,sr(e,0,n.length))}function Jr(t,e,n,r){if(!ns(t))return t;for(var i=-1,a=(e=yi(e,t)).length,s=a-1,u=t;null!=u&&++i<a;){var l=Bo(e[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=s){var f=u[l];(c=r?r(f,l,u):o)===o&&(c=ns(f)?f:yo(e[i+1])?[]:{})}er(u,l,c),u=u[l]}return t}var Zr=Nn?function(t,e){return Nn.set(t,e),t}:ou,ti=ce?function(t,e){return ce(t,"toString",{configurable:!0,enumerable:!1,value:nu(e),writable:!0})}:ou;function ei(t){return Fo($s(t))}function ni(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function ri(t,e){var n;return hr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ii(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return oi(t,e,ou,n)}function oi(t,e,n,r){var i=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,u=null===e,l=cs(e),c=e===o;i<a;){var f=hn((i+a)/2),h=n(t[f]),d=h!==o,p=null===h,g=h==h,v=cs(h);if(s)var m=r||g;else m=c?g&&(r||d):u?g&&d&&(r||!p):l?g&&d&&!p&&(r||!v):!p&&!v&&(r?h<=e:h<e);m?i=f+1:a=f}return bn(a,4294967294)}function ai(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!$a(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function si(t){return"number"==typeof t?t:cs(t)?d:+t}function ui(t){if("string"==typeof t)return t;if(Ga(t))return Ae(t,ui)+"";if(cs(t))return Bn?Bn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function li(t,e,n){var r=-1,i=_e,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ee;else if(o>=200){var l=e?null:Yi(t);if(l)return rn(l);a=!1,i=Ge,u=new Yn}else u=e?[]:s;t:for(;++r<o;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue t;e&&u.push(f),s.push(c)}else i(u,f,n)||(u!==s&&u.push(f),s.push(c))}return s}function ci(t,e){return null==(t=Po(t,e=yi(e,t)))||delete t[Bo(Jo(e))]}function fi(t,e,n,r){return Jr(t,e,n(kr(t,e)),r)}function hi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ni(t,r?0:o,r?o+1:i):ni(t,r?o+1:0,r?i:o)}function di(t,e){var n=t;return n instanceof qn&&(n=n.value()),Ce(e,(function(t,e){return e.func.apply(e.thisArg,Pe([t],e.args))}),n)}function pi(t,e,n){var i=t.length;if(i<2)return i?li(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=fr(a[o]||s,t[u],e,n));return li(mr(a,1),e,n)}function gi(t,e,n){for(var r=-1,i=t.length,a=e.length,s={};++r<i;){var u=r<a?e[r]:o;n(s,t[r],u)}return s}function vi(t){return Xa(t)?t:[]}function mi(t){return"function"==typeof t?t:ou}function yi(t,e){return Ga(t)?t:wo(t,e)?[t]:Io(ws(t))}var bi=Xr;function wi(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:ni(t,e,n)}var xi=fe||function(t){return ae.clearTimeout(t)};function Si(t,e){if(e)return t.slice();var n=t.length,r=qt?qt(n):new t.constructor(n);return t.copy(r),r}function ki(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function _i(t,e){var n=e?ki(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ei(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,a=cs(t),s=e!==o,u=null===e,l=e==e,c=cs(e);if(!u&&!c&&!a&&t>e||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&t<e||c&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!l)return-1}return 0}function Ai(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,l=e.length,c=yn(a-s,0),f=r(l+c),h=!i;++u<l;)f[u]=e[u];for(;++o<s;)(h||o<a)&&(f[n[o]]=t[o]);for(;c--;)f[u++]=t[o++];return f}function Pi(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,l=-1,c=e.length,f=yn(a-u,0),h=r(f+c),d=!i;++o<f;)h[o]=t[o];for(var p=o;++l<c;)h[p+l]=e[l];for(;++s<u;)(d||o<a)&&(h[p+n[s]]=t[o++]);return h}function Ci(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ti(t,e,n,r){var i=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],l=r?r(n[u],t[u],u,n,t):o;l===o&&(l=t[u]),i?or(n,u,l):er(n,u,l)}return n}function Ni(t,e){return function(n,r){var i=Ga(n)?be:rr,o=e?e():{};return i(n,t,so(r,2),o)}}function Li(t){return Xr((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,s&&bo(n[0],n[1],s)&&(a=i<3?o:a,i=1),e=Et(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e}))}function Mi(t,e){return function(n,r){if(null==n)return n;if(!Ya(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Et(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(t){return function(e,n,r){for(var i=-1,o=Et(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Ri(t){return function(e){var n=Ze(e=ws(e))?sn(e):o,r=n?n[0]:e.charAt(0),i=n?wi(n,1).join(""):e.slice(1);return r[t]()+i}}function Fi(t){return function(e){return Ce(Zs(Hs(e).replace(Ht,"")),t,"")}}function Di(t){return function(){var e=arguments;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]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return ns(r)?r:n}}function ji(t){return function(e,n,r){var i=Et(e);if(!Ya(e)){var a=so(n,3);e=Os(e),n=function(t){return a(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[a?e[s]:s]:o}}function Ii(t){return eo((function(e){var n=e.length,r=n,i=Un.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Ct(a);if(i&&!u&&"wrapper"==oo(s))var u=new Un([],!0)}for(r=u?r:n;++r<n;){var l=oo(s=e[r]),c="wrapper"==l?io(s):o;u=c&&xo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[oo(c[0])].apply(u,c[3]):1==s.length&&xo(s)?u[l]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ga(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Bi(t,e,n,i,a,s,u,l,f,h){var d=e&c,p=1&e,g=2&e,v=24&e,m=512&e,y=g?o:Di(t);return function o(){for(var c=arguments.length,b=r(c),w=c;w--;)b[w]=arguments[w];if(v)var x=ao(o),S=Xe(b,x);if(i&&(b=Ai(b,i,a,v)),s&&(b=Pi(b,s,u,v)),c-=S,v&&c<h){var k=nn(b,x);return Gi(t,e,Bi,o.placeholder,n,b,k,l,f,h-c)}var _=p?n:this,E=g?_[t]:t;return c=b.length,l?b=Co(b,l):m&&c>1&&b.reverse(),d&&f<c&&(b.length=f),this&&this!==ae&&this instanceof o&&(E=y||Di(E)),E.apply(_,b)}}function zi(t,e){return function(n,r){return function(t,e,n,r){return wr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Vi(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ui(n),r=ui(r)):(n=si(n),r=si(r)),i=t(n,r)}return i}}function $i(t){return eo((function(e){return e=Ae(e,qe(so())),Xr((function(n){var r=this;return t(e,(function(t){return ye(t,r,n)}))}))}))}function Ui(t,e){var n=(e=e===o?" ":ui(e)).length;if(n<2)return n?Yr(e,t):e;var r=Yr(e,fn(t/an(e)));return Ze(e)?wi(sn(r),0,t).join(""):r.slice(0,t)}function qi(t){return function(e,n,i){return i&&"number"!=typeof i&&bo(e,n,i)&&(n=i=o),e=gs(e),n===o?(n=e,e=0):n=gs(n),function(t,e,n,i){for(var o=-1,a=yn(fn((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,i=i===o?e<n?1:-1:gs(i),t)}}function Hi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ys(e),n=ys(n)),t(e,n)}}function Gi(t,e,n,r,i,a,s,u,c,f){var h=8&e;e|=h?l:64,4&(e&=~(h?64:l))||(e&=-4);var d=[t,e,i,h?a:o,h?s:o,h?o:a,h?o:s,u,c,f],p=n.apply(o,d);return xo(t)&&No(p,d),p.placeholder=r,Oo(p,t,e)}function Wi(t){var e=_t[t];return function(t,n){if(t=ys(t),(n=null==n?0:bn(vs(n),292))&&gn(t)){var r=(ws(t)+"e").split("e");return+((r=(ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Yi=Pn&&1/rn(new Pn([,-0]))[1]==f?function(t){return new Pn(t)}:cu;function Xi(t){return function(e){var n=po(e);return n==k?tn(e):n==C?on(e):function(t,e){return Ae(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qi(t,e,n,i,s,f,h,d){var p=2&e;if(!p&&"function"!=typeof t)throw new Ct(a);var g=i?i.length:0;if(g||(e&=-97,i=s=o),h=h===o?h:yn(vs(h),0),d=d===o?d:vs(d),g-=s?s.length:0,64&e){var v=i,m=s;i=s=o}var y=p?o:io(t),b=[t,e,n,i,s,v,m,f,h,d];if(y&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var s=e[3];if(s){var l=t[3];t[3]=l?Ai(l,s,e[4]):s,t[4]=l?nn(t[3],u):e[4]}(s=e[5])&&(l=t[5],t[5]=l?Pi(l,s,e[6]):s,t[6]=l?nn(t[5],u):e[6]),(s=e[7])&&(t[7]=s),r&c&&(t[8]=null==t[8]?e[8]:bn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(b,y),t=b[0],e=b[1],n=b[2],i=b[3],s=b[4],!(d=b[9]=b[9]===o?p?0:t.length:yn(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,n){var i=Di(t);return function a(){for(var s=arguments.length,u=r(s),l=s,c=ao(a);l--;)u[l]=arguments[l];var f=s<3&&u[0]!==c&&u[s-1]!==c?[]:nn(u,c);return(s-=f.length)<n?Gi(t,e,Bi,a.placeholder,o,u,f,o,o,n-s):ye(this&&this!==ae&&this instanceof a?i:t,this,u)}}(t,e,d):e!=l&&33!=e||s.length?Bi.apply(o,b):function(t,e,n,i){var o=1&e,a=Di(t);return function e(){for(var s=-1,u=arguments.length,l=-1,c=i.length,f=r(c+u),h=this&&this!==ae&&this instanceof e?a:t;++l<c;)f[l]=i[l];for(;u--;)f[l++]=arguments[++s];return ye(h,o?n:this,f)}}(t,e,n,i);else var w=function(t,e,n){var r=1&e,i=Di(t);return function e(){return(this&&this!==ae&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Oo((y?Zr:No)(w,b),t,e)}function Ki(t,e,n,r){return t===o||$a(t,Lt[n])&&!Rt.call(r,n)?e:t}function Ji(t,e,n,r,i,a){return ns(t)&&ns(e)&&(a.set(e,t),Vr(t,e,o,Ji,a),a.delete(e)),t}function Zi(t){return as(t)?o:t}function to(t,e,n,r,i,a){var s=1&n,u=t.length,l=e.length;if(u!=l&&!(s&&l>u))return!1;var c=a.get(t),f=a.get(e);if(c&&f)return c==e&&f==t;var h=-1,d=!0,p=2&n?new Yn:o;for(a.set(t,e),a.set(e,t);++h<u;){var g=t[h],v=e[h];if(r)var m=s?r(v,g,h,e,t,a):r(g,v,h,t,e,a);if(m!==o){if(m)continue;d=!1;break}if(p){if(!Ne(e,(function(t,e){if(!Ge(p,e)&&(g===t||i(g,t,n,r,a)))return p.push(e)}))){d=!1;break}}else if(g!==v&&!i(g,v,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function eo(t){return Mo(Ao(t,o,Wo),t+"")}function no(t){return _r(t,Os,fo)}function ro(t){return _r(t,Rs,ho)}var io=Nn?function(t){return Nn.get(t)}:cu;function oo(t){for(var e=t.name+"",n=Ln[e],r=Rt.call(Ln,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function ao(t){return(Rt.call(zn,"placeholder")?zn:t).placeholder}function so(){var t=zn.iteratee||au;return t=t===au?Fr:t,arguments.length?t(arguments[0],arguments[1]):t}function uo(t,e){var n,r,o=t.__data__;return("string"==(r=i(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function lo(t){for(var e=Os(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,_o(i)]}return e}function co(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Rr(n)?n:o}var fo=dn?function(t){return null==t?[]:(t=Et(t),ke(dn(t),(function(e){return ee.call(t,e)})))}:mu,ho=dn?function(t){for(var e=[];t;)Pe(e,fo(t)),t=Wt(t);return e}:mu,po=Er;function go(t,e,n){for(var r=-1,i=(e=yi(e,t)).length,o=!1;++r<i;){var a=Bo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&es(i)&&yo(a,i)&&(Ga(t)||Ha(t))}function vo(t){return"function"!=typeof t.constructor||ko(t)?{}:Vn(Wt(t))}function mo(t){return Ga(t)||Ha(t)||!!(oe&&t&&t[oe])}function yo(t,e){var n=i(t);return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function bo(t,e,n){if(!ns(n))return!1;var r=i(e);return!!("number"==r?Ya(n)&&yo(e,n.length):"string"==r&&e in n)&&$a(n[e],t)}function wo(t,e){if(Ga(t))return!1;var n=i(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||tt.test(t)||!Z.test(t)||null!=e&&t in Et(e)}function xo(t){var e=oo(t),n=zn[e];if("function"!=typeof n||!(e in qn.prototype))return!1;if(t===n)return!0;var r=io(n);return!!r&&t===r[0]}(_n&&po(new _n(new ArrayBuffer(1)))!=O||En&&po(new En)!=k||An&&po(An.resolve())!=A||Pn&&po(new Pn)!=C||Cn&&po(new Cn)!=L)&&(po=function(t){var e=Er(t),n=e==E?t.constructor:o,r=n?zo(n):"";if(r)switch(r){case Mn:return O;case On:return k;case Rn:return A;case Fn:return C;case Dn:return L}return e});var So=Mt?Za:yu;function ko(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function _o(t){return t==t&&!ns(t)}function Eo(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in Et(n))}}function Ao(t,e,n){return e=yn(e===o?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=yn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),ye(t,this,u)}}function Po(t,e){return e.length<2?t:kr(t,ni(e,0,-1))}function Co(t,e){for(var n=t.length,r=bn(e.length,n),i=Ci(t);r--;){var a=e[r];t[r]=yo(a,n)?i[a]:o}return t}function To(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var No=Ro(Zr),Lo=Be||function(t,e){return ae.setTimeout(t,e)},Mo=Ro(ti);function Oo(t,e,n){var r=e+"";return Mo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return we(g,(function(n){var r="_."+n[0];e&n[1]&&!_e(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(ut):[]}(r),n)))}function Ro(t){var e=0,n=0;return function(){var r=wn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Fo(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var a=Wr(n,i),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Do,jo,Io=(Do=Da((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(et,(function(t,n,r,i){e.push(r?i.replace(ft,"$1"):n||t)})),e}),(function(t){return 500===jo.size&&jo.clear(),t})),jo=Do.cache,Do);function Bo(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zo(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Vo(t){if(t instanceof qn)return t.clone();var e=new Un(t.__wrapped__,t.__chain__);return e.__actions__=Ci(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var $o=Xr((function(t,e){return Xa(t)?fr(t,mr(e,1,Xa,!0)):[]})),Uo=Xr((function(t,e){var n=Jo(e);return Xa(n)&&(n=o),Xa(t)?fr(t,mr(e,1,Xa,!0),so(n,2)):[]})),qo=Xr((function(t,e){var n=Jo(e);return Xa(n)&&(n=o),Xa(t)?fr(t,mr(e,1,Xa,!0),o,n):[]}));function Ho(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=yn(r+i,0)),Oe(t,so(e,3),i)}function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=vs(n),i=n<0?yn(r+i,0):bn(i,r-1)),Oe(t,so(e,3),i,!0)}function Wo(t){return null!=t&&t.length?mr(t,1):[]}function Yo(t){return t&&t.length?t[0]:o}var Xo=Xr((function(t){var e=Ae(t,vi);return e.length&&e[0]===t[0]?Tr(e):[]})),Qo=Xr((function(t){var e=Jo(t),n=Ae(t,vi);return e===Jo(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Tr(n,so(e,2)):[]})),Ko=Xr((function(t){var e=Jo(t),n=Ae(t,vi);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Tr(n,o,e):[]}));function Jo(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Zo=Xr(ta);function ta(t,e){return t&&t.length&&e&&e.length?Hr(t,e):t}var ea=eo((function(t,e){var n=null==t?0:t.length,r=ar(t,e);return Gr(t,Ae(e,(function(t){return yo(t,n)?+t:t})).sort(Ei)),r}));function na(t){return null==t?t:kn.call(t)}var ra=Xr((function(t){return li(mr(t,1,Xa,!0))})),ia=Xr((function(t){var e=Jo(t);return Xa(e)&&(e=o),li(mr(t,1,Xa,!0),so(e,2))})),oa=Xr((function(t){var e=Jo(t);return e="function"==typeof e?e:o,li(mr(t,1,Xa,!0),o,e)}));function aa(t){if(!t||!t.length)return[];var e=0;return t=ke(t,(function(t){if(Xa(t))return e=yn(t.length,e),!0})),$e(e,(function(e){return Ae(t,Ie(e))}))}function sa(t,e){if(!t||!t.length)return[];var n=aa(t);return null==e?n:Ae(n,(function(t){return ye(e,o,t)}))}var ua=Xr((function(t,e){return Xa(t)?fr(t,e):[]})),la=Xr((function(t){return pi(ke(t,Xa))})),ca=Xr((function(t){var e=Jo(t);return Xa(e)&&(e=o),pi(ke(t,Xa),so(e,2))})),fa=Xr((function(t){var e=Jo(t);return e="function"==typeof e?e:o,pi(ke(t,Xa),o,e)})),ha=Xr(aa),da=Xr((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,sa(t,n)}));function pa(t){var e=zn(t);return e.__chain__=!0,e}function ga(t,e){return e(t)}var va=eo((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return ar(e,t)};return!(e>1||this.__actions__.length)&&r instanceof qn&&yo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ga,args:[i],thisArg:o}),new Un(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)})),ma=Ni((function(t,e,n){Rt.call(t,n)?++t[n]:or(t,n,1)})),ya=ji(Ho),ba=ji(Go);function wa(t,e){return(Ga(t)?we:hr)(t,so(e,3))}function xa(t,e){return(Ga(t)?xe:dr)(t,so(e,3))}var Sa=Ni((function(t,e,n){Rt.call(t,n)?t[n].push(e):or(t,n,[e])})),ka=Xr((function(t,e,n){var i=-1,o="function"==typeof e,a=Ya(t)?r(t.length):[];return hr(t,(function(t){a[++i]=o?ye(e,t,n):Nr(t,e,n)})),a})),_a=Ni((function(t,e,n){or(t,n,e)}));function Ea(t,e){return(Ga(t)?Ae:Ir)(t,so(e,3))}var Aa=Ni((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Pa=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&bo(t,e[0],e[1])?e=[]:n>2&&bo(e[0],e[1],e[2])&&(e=[e[0]]),Ur(t,mr(e,1),[])})),Ca=Le||function(){return ae.Date.now()};function Ta(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Qi(t,c,o,o,o,o,e)}function Na(t,e){var n;if("function"!=typeof e)throw new Ct(a);return t=vs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var La=Xr((function(t,e,n){var r=1;if(n.length){var i=nn(n,ao(La));r|=l}return Qi(t,r,e,n,i)})),Ma=Xr((function(t,e,n){var r=3;if(n.length){var i=nn(n,ao(Ma));r|=l}return Qi(e,r,t,n,i)}));function Oa(t,e,n){var r,i,s,u,l,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Ct(a);function g(e){var n=r,a=i;return r=i=o,f=e,u=t.apply(a,n)}function v(t){return f=t,l=Lo(y,e),h?g(t):u}function m(t){var n=t-c;return c===o||n>=e||n<0||d&&t-f>=s}function y(){var t=Ca();if(m(t))return b(t);l=Lo(y,function(t){var n=e-(t-c);return d?bn(n,s-(t-f)):n}(t))}function b(t){return l=o,p&&r?g(t):(r=i=o,u)}function w(){var t=Ca(),n=m(t);if(r=arguments,i=this,c=t,n){if(l===o)return v(c);if(d)return xi(l),l=Lo(y,e),g(c)}return l===o&&(l=Lo(y,e)),u}return e=ys(e)||0,ns(n)&&(h=!!n.leading,s=(d="maxWait"in n)?yn(ys(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),w.cancel=function(){l!==o&&xi(l),f=0,r=c=i=l=o},w.flush=function(){return l===o?u:b(Ca())},w}var Ra=Xr((function(t,e){return cr(t,1,e)})),Fa=Xr((function(t,e,n){return cr(t,ys(e)||0,n)}));function Da(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ct(a);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Da.Cache||Wn),n}function ja(t){if("function"!=typeof t)throw new Ct(a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Da.Cache=Wn;var Ia=bi((function(t,e){var n=(e=1==e.length&&Ga(e[0])?Ae(e[0],qe(so())):Ae(mr(e,1),qe(so()))).length;return Xr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return ye(t,this,r)}))})),Ba=Xr((function(t,e){var n=nn(e,ao(Ba));return Qi(t,l,o,e,n)})),za=Xr((function(t,e){var n=nn(e,ao(za));return Qi(t,64,o,e,n)})),Va=eo((function(t,e){return Qi(t,256,o,o,o,e)}));function $a(t,e){return t===e||t!=t&&e!=e}var Ua=Hi(Ar),qa=Hi((function(t,e){return t>=e})),Ha=Lr(function(){return arguments}())?Lr:function(t){return rs(t)&&Rt.call(t,"callee")&&!ee.call(t,"callee")},Ga=r.isArray,Wa=he?qe(he):function(t){return rs(t)&&Er(t)==M};function Ya(t){return null!=t&&es(t.length)&&!Za(t)}function Xa(t){return rs(t)&&Ya(t)}var Qa=pn||yu,Ka=de?qe(de):function(t){return rs(t)&&Er(t)==b};function Ja(t){if(!rs(t))return!1;var e=Er(t);return e==w||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!as(t)}function Za(t){if(!ns(t))return!1;var e=Er(t);return e==x||e==S||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ts(t){return"number"==typeof t&&t==vs(t)}function es(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ns(t){var e=i(t);return null!=t&&("object"==e||"function"==e)}function rs(t){return null!=t&&"object"==i(t)}var is=pe?qe(pe):function(t){return rs(t)&&po(t)==k};function os(t){return"number"==typeof t||rs(t)&&Er(t)==_}function as(t){if(!rs(t)||Er(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ot.call(n)==It}var ss=ge?qe(ge):function(t){return rs(t)&&Er(t)==P},us=ve?qe(ve):function(t){return rs(t)&&po(t)==C};function ls(t){return"string"==typeof t||!Ga(t)&&rs(t)&&Er(t)==T}function cs(t){return"symbol"==i(t)||rs(t)&&Er(t)==N}var fs=me?qe(me):function(t){return rs(t)&&es(t.length)&&!!Zt[Er(t)]},hs=Hi(jr),ds=Hi((function(t,e){return t<=e}));function ps(t){if(!t)return[];if(Ya(t))return ls(t)?sn(t):Ci(t);if(se&&t[se])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[se]());var e=po(t);return(e==k?tn:e==C?rn:$s)(t)}function gs(t){return t?(t=ys(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function vs(t){var e=gs(t),n=e%1;return e==e?n?e-n:e:0}function ms(t){return t?sr(vs(t),0,p):0}function ys(t){if("number"==typeof t)return t;if(cs(t))return d;if(ns(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ns(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ue(t);var n=gt.test(t);return n||mt.test(t)?re(t.slice(2),n?2:8):pt.test(t)?d:+t}function bs(t){return Ti(t,Rs(t))}function ws(t){return null==t?"":ui(t)}var xs=Li((function(t,e){if(ko(e)||Ya(e))Ti(e,Os(e),t);else for(var n in e)Rt.call(e,n)&&er(t,n,e[n])})),Ss=Li((function(t,e){Ti(e,Rs(e),t)})),ks=Li((function(t,e,n,r){Ti(e,Rs(e),t,r)})),_s=Li((function(t,e,n,r){Ti(e,Os(e),t,r)})),Es=eo(ar),As=Xr((function(t,e){t=Et(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&bo(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],s=Rs(a),u=-1,l=s.length;++u<l;){var c=s[u],f=t[c];(f===o||$a(f,Lt[c])&&!Rt.call(t,c))&&(t[c]=a[c])}return t})),Ps=Xr((function(t){return t.push(o,Ji),ye(Ds,o,t)}));function Cs(t,e,n){var r=null==t?o:kr(t,e);return r===o?n:r}function Ts(t,e){return null!=t&&go(t,e,Cr)}var Ns=zi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),nu(ou)),Ls=zi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),Rt.call(t,e)?t[e].push(n):t[e]=[n]}),so),Ms=Xr(Nr);function Os(t){return Ya(t)?Qn(t):Dr(t)}function Rs(t){return Ya(t)?Qn(t,!0):function(t){if(!ns(t))return function(t){var e=[];if(null!=t)for(var n in Et(t))e.push(n);return e}(t);var e=ko(t),n=[];for(var r in t)("constructor"!=r||!e&&Rt.call(t,r))&&n.push(r);return n}(t)}var Fs=Li((function(t,e,n){Vr(t,e,n)})),Ds=Li((function(t,e,n,r){Vr(t,e,n,r)})),js=eo((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ae(e,(function(e){return e=yi(e,t),r||(r=e.length>1),e})),Ti(t,ro(t),n),r&&(n=ur(n,7,Zi));for(var i=e.length;i--;)ci(n,e[i]);return n})),Is=eo((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return Ts(t,n)}))}(t,e)}));function Bs(t,e){if(null==t)return{};var n=Ae(ro(t),(function(t){return[t]}));return e=so(e),qr(t,n,(function(t,n){return e(t,n[0])}))}var zs=Xi(Os),Vs=Xi(Rs);function $s(t){return null==t?[]:He(t,Os(t))}var Us=Fi((function(t,e,n){return e=e.toLowerCase(),t+(n?qs(e):e)}));function qs(t){return Js(ws(t).toLowerCase())}function Hs(t){return(t=ws(t))&&t.replace(bt,Qe).replace(Gt,"")}var Gs=Fi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ws=Fi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ys=Ri("toLowerCase"),Xs=Fi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Qs=Fi((function(t,e,n){return t+(n?" ":"")+Js(e)})),Ks=Fi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Js=Ri("toUpperCase");function Zs(t,e,n){return t=ws(t),(e=n?o:e)===o?function(t){return Qt.test(t)}(t)?function(t){return t.match(Yt)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var tu=Xr((function(t,e){try{return ye(t,o,e)}catch(t){return Ja(t)?t:new St(t)}})),eu=eo((function(t,e){return we(e,(function(e){e=Bo(e),or(t,e,La(t[e],t))})),t}));function nu(t){return function(){return t}}var ru=Ii(),iu=Ii(!0);function ou(t){return t}function au(t){return Fr("function"==typeof t?t:ur(t,1))}var su=Xr((function(t,e){return function(n){return Nr(n,t,e)}})),uu=Xr((function(t,e){return function(n){return Nr(t,n,e)}}));function lu(t,e,n){var r=Os(e),i=Sr(e,r);null!=n||ns(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Sr(e,Os(e)));var o=!(ns(n)&&"chain"in n&&!n.chain),a=Za(t);return we(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Ci(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Pe([this.value()],arguments))})})),t}function cu(){}var fu=$i(Ae),hu=$i(Se),du=$i(Ne);function pu(t){return wo(t)?Ie(Bo(t)):function(t){return function(e){return kr(e,t)}}(t)}var gu=qi(),vu=qi(!0);function mu(){return[]}function yu(){return!1}var bu,wu=Vi((function(t,e){return t+e}),0),xu=Wi("ceil"),Su=Vi((function(t,e){return t/e}),1),ku=Wi("floor"),_u=Vi((function(t,e){return t*e}),1),Eu=Wi("round"),Au=Vi((function(t,e){return t-e}),0);return zn.after=function(t,e){if("function"!=typeof e)throw new Ct(a);return t=vs(t),function(){if(--t<1)return e.apply(this,arguments)}},zn.ary=Ta,zn.assign=xs,zn.assignIn=Ss,zn.assignInWith=ks,zn.assignWith=_s,zn.at=Es,zn.before=Na,zn.bind=La,zn.bindAll=eu,zn.bindKey=Ma,zn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},zn.chain=pa,zn.chunk=function(t,e,n){e=(n?bo(t,e,n):e===o)?1:yn(vs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,s=0,u=r(fn(i/e));a<i;)u[s++]=ni(t,a,a+=e);return u},zn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},zn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Pe(Ga(n)?Ci(n):[n],mr(e,1))},zn.cond=function(t){var e=null==t?0:t.length,n=so();return t=e?Ae(t,(function(t){if("function"!=typeof t[1])throw new Ct(a);return[n(t[0]),t[1]]})):[],Xr((function(n){for(var r=-1;++r<e;){var i=t[r];if(ye(i[0],this,n))return ye(i[1],this,n)}}))},zn.conforms=function(t){return function(t){var e=Os(t);return function(n){return lr(n,t,e)}}(ur(t,1))},zn.constant=nu,zn.countBy=ma,zn.create=function(t,e){var n=Vn(t);return null==e?n:ir(n,e)},zn.curry=function t(e,n,r){var i=Qi(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},zn.curryRight=function t(e,n,r){var i=Qi(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},zn.debounce=Oa,zn.defaults=As,zn.defaultsDeep=Ps,zn.defer=Ra,zn.delay=Fa,zn.difference=$o,zn.differenceBy=Uo,zn.differenceWith=qo,zn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ni(t,(e=n||e===o?1:vs(e))<0?0:e,r):[]},zn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ni(t,0,(e=r-(e=n||e===o?1:vs(e)))<0?0:e):[]},zn.dropRightWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!0,!0):[]},zn.dropWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!0):[]},zn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&bo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=vs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:vs(r))<0&&(r+=i),r=n>r?0:ms(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},zn.filter=function(t,e){return(Ga(t)?ke:vr)(t,so(e,3))},zn.flatMap=function(t,e){return mr(Ea(t,e),1)},zn.flatMapDeep=function(t,e){return mr(Ea(t,e),f)},zn.flatMapDepth=function(t,e,n){return n=n===o?1:vs(n),mr(Ea(t,e),n)},zn.flatten=Wo,zn.flattenDeep=function(t){return null!=t&&t.length?mr(t,f):[]},zn.flattenDepth=function(t,e){return null!=t&&t.length?mr(t,e=e===o?1:vs(e)):[]},zn.flip=function(t){return Qi(t,512)},zn.flow=ru,zn.flowRight=iu,zn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},zn.functions=function(t){return null==t?[]:Sr(t,Os(t))},zn.functionsIn=function(t){return null==t?[]:Sr(t,Rs(t))},zn.groupBy=Sa,zn.initial=function(t){return null!=t&&t.length?ni(t,0,-1):[]},zn.intersection=Xo,zn.intersectionBy=Qo,zn.intersectionWith=Ko,zn.invert=Ns,zn.invertBy=Ls,zn.invokeMap=ka,zn.iteratee=au,zn.keyBy=_a,zn.keys=Os,zn.keysIn=Rs,zn.map=Ea,zn.mapKeys=function(t,e){var n={};return e=so(e,3),wr(t,(function(t,r,i){or(n,e(t,r,i),t)})),n},zn.mapValues=function(t,e){var n={};return e=so(e,3),wr(t,(function(t,r,i){or(n,r,e(t,r,i))})),n},zn.matches=function(t){return Br(ur(t,1))},zn.matchesProperty=function(t,e){return zr(t,ur(e,1))},zn.memoize=Da,zn.merge=Fs,zn.mergeWith=Ds,zn.method=su,zn.methodOf=uu,zn.mixin=lu,zn.negate=ja,zn.nthArg=function(t){return t=vs(t),Xr((function(e){return $r(e,t)}))},zn.omit=js,zn.omitBy=function(t,e){return Bs(t,ja(so(e)))},zn.once=function(t){return Na(2,t)},zn.orderBy=function(t,e,n,r){return null==t?[]:(Ga(e)||(e=null==e?[]:[e]),Ga(n=r?o:n)||(n=null==n?[]:[n]),Ur(t,e,n))},zn.over=fu,zn.overArgs=Ia,zn.overEvery=hu,zn.overSome=du,zn.partial=Ba,zn.partialRight=za,zn.partition=Aa,zn.pick=Is,zn.pickBy=Bs,zn.property=pu,zn.propertyOf=function(t){return function(e){return null==t?o:kr(t,e)}},zn.pull=Zo,zn.pullAll=ta,zn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Hr(t,e,so(n,2)):t},zn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Hr(t,e,o,n):t},zn.pullAt=ea,zn.range=gu,zn.rangeRight=vu,zn.rearg=Va,zn.reject=function(t,e){return(Ga(t)?ke:vr)(t,ja(so(e,3)))},zn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=so(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Gr(t,i),n},zn.rest=function(t,e){if("function"!=typeof t)throw new Ct(a);return Xr(t,e=e===o?e:vs(e))},zn.reverse=na,zn.sampleSize=function(t,e,n){return e=(n?bo(t,e,n):e===o)?1:vs(e),(Ga(t)?Jn:Kr)(t,e)},zn.set=function(t,e,n){return null==t?t:Jr(t,e,n)},zn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Jr(t,e,n,r)},zn.shuffle=function(t){return(Ga(t)?Zn:ei)(t)},zn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&bo(t,e,n)?(e=0,n=r):(e=null==e?0:vs(e),n=n===o?r:vs(n)),ni(t,e,n)):[]},zn.sortBy=Pa,zn.sortedUniq=function(t){return t&&t.length?ai(t):[]},zn.sortedUniqBy=function(t,e){return t&&t.length?ai(t,so(e,2)):[]},zn.split=function(t,e,n){return n&&"number"!=typeof n&&bo(t,e,n)&&(e=n=o),(n=n===o?p:n>>>0)?(t=ws(t))&&("string"==typeof e||null!=e&&!ss(e))&&!(e=ui(e))&&Ze(t)?wi(sn(t),0,n):t.split(e,n):[]},zn.spread=function(t,e){if("function"!=typeof t)throw new Ct(a);return e=null==e?0:yn(vs(e),0),Xr((function(n){var r=n[e],i=wi(n,0,e);return r&&Pe(i,r),ye(t,this,i)}))},zn.tail=function(t){var e=null==t?0:t.length;return e?ni(t,1,e):[]},zn.take=function(t,e,n){return t&&t.length?ni(t,0,(e=n||e===o?1:vs(e))<0?0:e):[]},zn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ni(t,(e=r-(e=n||e===o?1:vs(e)))<0?0:e,r):[]},zn.takeRightWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!1,!0):[]},zn.takeWhile=function(t,e){return t&&t.length?hi(t,so(e,3)):[]},zn.tap=function(t,e){return e(t),t},zn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Ct(a);return ns(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Oa(t,e,{leading:r,maxWait:e,trailing:i})},zn.thru=ga,zn.toArray=ps,zn.toPairs=zs,zn.toPairsIn=Vs,zn.toPath=function(t){return Ga(t)?Ae(t,Bo):cs(t)?[t]:Ci(Io(ws(t)))},zn.toPlainObject=bs,zn.transform=function(t,e,n){var r=Ga(t),i=r||Qa(t)||fs(t);if(e=so(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:ns(t)&&Za(o)?Vn(Wt(t)):{}}return(i?we:wr)(t,(function(t,r,i){return e(n,t,r,i)})),n},zn.unary=function(t){return Ta(t,1)},zn.union=ra,zn.unionBy=ia,zn.unionWith=oa,zn.uniq=function(t){return t&&t.length?li(t):[]},zn.uniqBy=function(t,e){return t&&t.length?li(t,so(e,2)):[]},zn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?li(t,o,e):[]},zn.unset=function(t,e){return null==t||ci(t,e)},zn.unzip=aa,zn.unzipWith=sa,zn.update=function(t,e,n){return null==t?t:fi(t,e,mi(n))},zn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:fi(t,e,mi(n),r)},zn.values=$s,zn.valuesIn=function(t){return null==t?[]:He(t,Rs(t))},zn.without=ua,zn.words=Zs,zn.wrap=function(t,e){return Ba(mi(e),t)},zn.xor=la,zn.xorBy=ca,zn.xorWith=fa,zn.zip=ha,zn.zipObject=function(t,e){return gi(t||[],e||[],er)},zn.zipObjectDeep=function(t,e){return gi(t||[],e||[],Jr)},zn.zipWith=da,zn.entries=zs,zn.entriesIn=Vs,zn.extend=Ss,zn.extendWith=ks,lu(zn,zn),zn.add=wu,zn.attempt=tu,zn.camelCase=Us,zn.capitalize=qs,zn.ceil=xu,zn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=ys(n))==n?n:0),e!==o&&(e=(e=ys(e))==e?e:0),sr(ys(t),e,n)},zn.clone=function(t){return ur(t,4)},zn.cloneDeep=function(t){return ur(t,5)},zn.cloneDeepWith=function(t,e){return ur(t,5,e="function"==typeof e?e:o)},zn.cloneWith=function(t,e){return ur(t,4,e="function"==typeof e?e:o)},zn.conformsTo=function(t,e){return null==e||lr(t,e,Os(e))},zn.deburr=Hs,zn.defaultTo=function(t,e){return null==t||t!=t?e:t},zn.divide=Su,zn.endsWith=function(t,e,n){t=ws(t),e=ui(e);var r=t.length,i=n=n===o?r:sr(vs(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},zn.eq=$a,zn.escape=function(t){return(t=ws(t))&&X.test(t)?t.replace(W,Ke):t},zn.escapeRegExp=function(t){return(t=ws(t))&&rt.test(t)?t.replace(nt,"\\$&"):t},zn.every=function(t,e,n){var r=Ga(t)?Se:pr;return n&&bo(t,e,n)&&(e=o),r(t,so(e,3))},zn.find=ya,zn.findIndex=Ho,zn.findKey=function(t,e){return Me(t,so(e,3),wr)},zn.findLast=ba,zn.findLastIndex=Go,zn.findLastKey=function(t,e){return Me(t,so(e,3),xr)},zn.floor=ku,zn.forEach=wa,zn.forEachRight=xa,zn.forIn=function(t,e){return null==t?t:yr(t,so(e,3),Rs)},zn.forInRight=function(t,e){return null==t?t:br(t,so(e,3),Rs)},zn.forOwn=function(t,e){return t&&wr(t,so(e,3))},zn.forOwnRight=function(t,e){return t&&xr(t,so(e,3))},zn.get=Cs,zn.gt=Ua,zn.gte=qa,zn.has=function(t,e){return null!=t&&go(t,e,Pr)},zn.hasIn=Ts,zn.head=Yo,zn.identity=ou,zn.includes=function(t,e,n,r){t=Ya(t)?t:$s(t),n=n&&!r?vs(n):0;var i=t.length;return n<0&&(n=yn(i+n,0)),ls(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Re(t,e,n)>-1},zn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=yn(r+i,0)),Re(t,e,i)},zn.inRange=function(t,e,n){return e=gs(e),n===o?(n=e,e=0):n=gs(n),function(t,e,n){return t>=bn(e,n)&&t<yn(e,n)}(t=ys(t),e,n)},zn.invoke=Ms,zn.isArguments=Ha,zn.isArray=Ga,zn.isArrayBuffer=Wa,zn.isArrayLike=Ya,zn.isArrayLikeObject=Xa,zn.isBoolean=function(t){return!0===t||!1===t||rs(t)&&Er(t)==y},zn.isBuffer=Qa,zn.isDate=Ka,zn.isElement=function(t){return rs(t)&&1===t.nodeType&&!as(t)},zn.isEmpty=function(t){if(null==t)return!0;if(Ya(t)&&(Ga(t)||"string"==typeof t||"function"==typeof t.splice||Qa(t)||fs(t)||Ha(t)))return!t.length;var e=po(t);if(e==k||e==C)return!t.size;if(ko(t))return!Dr(t).length;for(var n in t)if(Rt.call(t,n))return!1;return!0},zn.isEqual=function(t,e){return Mr(t,e)},zn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?Mr(t,e,o,n):!!r},zn.isError=Ja,zn.isFinite=function(t){return"number"==typeof t&&gn(t)},zn.isFunction=Za,zn.isInteger=ts,zn.isLength=es,zn.isMap=is,zn.isMatch=function(t,e){return t===e||Or(t,e,lo(e))},zn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Or(t,e,lo(e),n)},zn.isNaN=function(t){return os(t)&&t!=+t},zn.isNative=function(t){if(So(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(t)},zn.isNil=function(t){return null==t},zn.isNull=function(t){return null===t},zn.isNumber=os,zn.isObject=ns,zn.isObjectLike=rs,zn.isPlainObject=as,zn.isRegExp=ss,zn.isSafeInteger=function(t){return ts(t)&&t>=-9007199254740991&&t<=h},zn.isSet=us,zn.isString=ls,zn.isSymbol=cs,zn.isTypedArray=fs,zn.isUndefined=function(t){return t===o},zn.isWeakMap=function(t){return rs(t)&&po(t)==L},zn.isWeakSet=function(t){return rs(t)&&"[object WeakSet]"==Er(t)},zn.join=function(t,e){return null==t?"":vn.call(t,e)},zn.kebabCase=Gs,zn.last=Jo,zn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=vs(n))<0?yn(r+i,0):bn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Oe(t,De,i,!0)},zn.lowerCase=Ws,zn.lowerFirst=Ys,zn.lt=hs,zn.lte=ds,zn.max=function(t){return t&&t.length?gr(t,ou,Ar):o},zn.maxBy=function(t,e){return t&&t.length?gr(t,so(e,2),Ar):o},zn.mean=function(t){return je(t,ou)},zn.meanBy=function(t,e){return je(t,so(e,2))},zn.min=function(t){return t&&t.length?gr(t,ou,jr):o},zn.minBy=function(t,e){return t&&t.length?gr(t,so(e,2),jr):o},zn.stubArray=mu,zn.stubFalse=yu,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=_u,zn.nth=function(t,e){return t&&t.length?$r(t,vs(e)):o},zn.noConflict=function(){return ae._===this&&(ae._=Bt),this},zn.noop=cu,zn.now=Ca,zn.pad=function(t,e,n){t=ws(t);var r=(e=vs(e))?an(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ui(hn(i),n)+t+Ui(fn(i),n)},zn.padEnd=function(t,e,n){t=ws(t);var r=(e=vs(e))?an(t):0;return e&&r<e?t+Ui(e-r,n):t},zn.padStart=function(t,e,n){t=ws(t);var r=(e=vs(e))?an(t):0;return e&&r<e?Ui(e-r,n)+t:t},zn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),xn(ws(t).replace(it,""),e||0)},zn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&bo(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=gs(t),e===o?(e=t,t=0):e=gs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Sn();return bn(t+i*(e-t+ne("1e-"+((i+"").length-1))),e)}return Wr(t,e)},zn.reduce=function(t,e,n){var r=Ga(t)?Ce:ze,i=arguments.length<3;return r(t,so(e,4),n,i,hr)},zn.reduceRight=function(t,e,n){var r=Ga(t)?Te:ze,i=arguments.length<3;return r(t,so(e,4),n,i,dr)},zn.repeat=function(t,e,n){return e=(n?bo(t,e,n):e===o)?1:vs(e),Yr(ws(t),e)},zn.replace=function(){var t=arguments,e=ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},zn.result=function(t,e,n){var r=-1,i=(e=yi(e,t)).length;for(i||(i=1,t=o);++r<i;){var a=null==t?o:t[Bo(e[r])];a===o&&(r=i,a=n),t=Za(a)?a.call(t):a}return t},zn.round=Eu,zn.runInContext=t,zn.sample=function(t){return(Ga(t)?Kn:Qr)(t)},zn.size=function(t){if(null==t)return 0;if(Ya(t))return ls(t)?an(t):t.length;var e=po(t);return e==k||e==C?t.size:Dr(t).length},zn.snakeCase=Xs,zn.some=function(t,e,n){var r=Ga(t)?Ne:ri;return n&&bo(t,e,n)&&(e=o),r(t,so(e,3))},zn.sortedIndex=function(t,e){return ii(t,e)},zn.sortedIndexBy=function(t,e,n){return oi(t,e,so(n,2))},zn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ii(t,e);if(r<n&&$a(t[r],e))return r}return-1},zn.sortedLastIndex=function(t,e){return ii(t,e,!0)},zn.sortedLastIndexBy=function(t,e,n){return oi(t,e,so(n,2),!0)},zn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ii(t,e,!0)-1;if($a(t[n],e))return n}return-1},zn.startCase=Qs,zn.startsWith=function(t,e,n){return t=ws(t),n=null==n?0:sr(vs(n),0,t.length),e=ui(e),t.slice(n,n+e.length)==e},zn.subtract=Au,zn.sum=function(t){return t&&t.length?Ve(t,ou):0},zn.sumBy=function(t,e){return t&&t.length?Ve(t,so(e,2)):0},zn.template=function(t,e,n){var r=zn.templateSettings;n&&bo(t,e,n)&&(e=o),t=ws(t),e=ks({},e,r,Ki);var i,a,s=ks({},e.imports,r.imports,Ki),u=Os(s),l=He(s,u),c=0,f=e.interpolate||wt,h="__p += '",d=At((e.escape||wt).source+"|"+f.source+"|"+(f===J?ht:wt).source+"|"+(e.evaluate||wt).source+"|$","g"),p="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Jt+"]")+"\n";t.replace(d,(function(e,n,r,o,s,u){return r||(r=o),h+=t.slice(c,u).replace(xt,Je),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var g=Rt.call(e,"variable")&&e.variable;if(g){if(ct.test(g))throw new St("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(U,""):h).replace(q,"$1").replace(H,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=tu((function(){return kt(u,p+"return "+h).apply(o,l)}));if(v.source=h,Ja(v))throw v;return v},zn.times=function(t,e){if((t=vs(t))<1||t>h)return[];var n=p,r=bn(t,p);e=so(e),t-=p;for(var i=$e(r,e);++n<t;)e(n);return i},zn.toFinite=gs,zn.toInteger=vs,zn.toLength=ms,zn.toLower=function(t){return ws(t).toLowerCase()},zn.toNumber=ys,zn.toSafeInteger=function(t){return t?sr(vs(t),-9007199254740991,h):0===t?t:0},zn.toString=ws,zn.toUpper=function(t){return ws(t).toUpperCase()},zn.trim=function(t,e,n){if((t=ws(t))&&(n||e===o))return Ue(t);if(!t||!(e=ui(e)))return t;var r=sn(t),i=sn(e);return wi(r,We(r,i),Ye(r,i)+1).join("")},zn.trimEnd=function(t,e,n){if((t=ws(t))&&(n||e===o))return t.slice(0,un(t)+1);if(!t||!(e=ui(e)))return t;var r=sn(t);return wi(r,0,Ye(r,sn(e))+1).join("")},zn.trimStart=function(t,e,n){if((t=ws(t))&&(n||e===o))return t.replace(it,"");if(!t||!(e=ui(e)))return t;var r=sn(t);return wi(r,We(r,sn(e))).join("")},zn.truncate=function(t,e){var n=30,r="...";if(ns(e)){var i="separator"in e?e.separator:i;n="length"in e?vs(e.length):n,r="omission"in e?ui(e.omission):r}var a=(t=ws(t)).length;if(Ze(t)){var s=sn(t);a=s.length}if(n>=a)return t;var u=n-an(r);if(u<1)return r;var l=s?wi(s,0,u).join(""):t.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),ss(i)){if(t.slice(u).search(i)){var c,f=l;for(i.global||(i=At(i.source,ws(dt.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(t.indexOf(ui(i),u)!=u){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},zn.unescape=function(t){return(t=ws(t))&&Y.test(t)?t.replace(G,ln):t},zn.uniqueId=function(t){var e=++Ft;return ws(t)+e},zn.upperCase=Ks,zn.upperFirst=Js,zn.each=wa,zn.eachRight=xa,zn.first=Yo,lu(zn,(bu={},wr(zn,(function(t,e){Rt.call(zn.prototype,e)||(bu[e]=t)})),bu),{chain:!1}),zn.VERSION="4.17.21",we(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){zn[t].placeholder=zn})),we(["drop","take"],(function(t,e){qn.prototype[t]=function(n){n=n===o?1:yn(vs(n),0);var r=this.__filtered__&&!e?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,p),type:t+(r.__dir__<0?"Right":"")}),r},qn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),we(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;qn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:so(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),we(["head","last"],(function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}})),we(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");qn.prototype[t]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(ou)},qn.prototype.find=function(t){return this.filter(t).head()},qn.prototype.findLast=function(t){return this.reverse().find(t)},qn.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new qn(this):this.map((function(n){return Nr(n,t,e)}))})),qn.prototype.reject=function(t){return this.filter(ja(so(t)))},qn.prototype.slice=function(t,e){t=vs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new qn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=vs(e))<0?n.dropRight(-e):n.take(e-t)),n)},qn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qn.prototype.toArray=function(){return this.take(p)},wr(qn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=zn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(zn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof qn,l=s[0],c=u||Ga(e),f=function(t){var e=i.apply(zn,Pe([t],s));return r&&h?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,g=u&&!d;if(!a&&c){e=g?e:new qn(this);var v=t.apply(e,s);return v.__actions__.push({func:ga,args:[f],thisArg:o}),new Un(v,h)}return p&&g?t.apply(this,s):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),we(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);zn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n]((function(n){return e.apply(Ga(n)?n:[],t)}))}})),wr(qn.prototype,(function(t,e){var n=zn[e];if(n){var r=n.name+"";Rt.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:e,func:n})}})),Ln[Bi(o,2).name]=[{name:"wrapper",func:o}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=Ci(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ci(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ci(this.__views__),t},qn.prototype.reverse=function(){if(this.__filtered__){var t=new qn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=bn(e,t+a);break;case"takeRight":t=yn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,f=c.length,h=0,d=bn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return di(t,this.__actions__);var p=[];t:for(;u--&&h<d;){for(var g=-1,v=t[l+=e];++g<f;){var m=c[g],y=m.iteratee,b=m.type,w=y(v);if(2==b)v=w;else if(!w){if(1==b)continue t;break t}}p[h++]=v}return p},zn.prototype.at=va,zn.prototype.chain=function(){return pa(this)},zn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===o&&(this.__values__=ps(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},zn.prototype.plant=function(t){for(var e,n=this;n instanceof $n;){var r=Vo(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},zn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qn){var e=t;return this.__actions__.length&&(e=new qn(this)),(e=e.reverse()).__actions__.push({func:ga,args:[na],thisArg:o}),new Un(e,this.__chain__)}return this.thru(na)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,se&&(zn.prototype[se]=function(){return this}),zn}();"object"==i(n.amdO)&&n.amdO?(ae._=cn,(r=function(){return cn}.call(e,n,e,t))===o||(t.exports=r)):ue?((ue.exports=cn)._=cn,se._=cn):ae._=cn}.call(this)},6712:(t,e,n)=>{var r=n(7620),i=n(7859),o=n(6500),a=n(1030);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},1301:(t,e,n)=>{var r=n(5055),i=n(3810),o=n(7859);t.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},7365:(t,e,n)=>{var r=n(7348),i=n(3453),o=n(9019);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},2094:(t,e,n)=>{var r=n(1779);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},5797:(t,e,n)=>{var r=n(3497),i=n(8084)((function(t,e,n){r(t,e,n)}));t.exports=i},4757:(t,e,n)=>{var r=n(7348),i=n(1737),o=n(9019);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},4105:(t,e,n)=>{var r=n(7348),i=n(7859),o=n(1737);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},6628:t=>{t.exports=function(){}},9238:(t,e,n)=>{var r=n(8403);t.exports=function(){return r.Date.now()}},2356:(t,e,n)=>{var r=n(6880),i=n(1841)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},1052:(t,e,n)=>{var r=n(2972),i=n(4205),o=n(9169),a=n(1366);t.exports=function(t){return o(t)?r(a(t)):i(t)}},7932:(t,e,n)=>{var r=n(8538)();t.exports=r},781:(t,e,n)=>{var r=n(8963),i=n(7136),o=n(7859),a=n(4806),s=n(1030);t.exports=function(t,e,n){var u=s(t)?r:a,l=arguments.length<3;return u(t,o(e,4),n,l,i)}},7704:(t,e,n)=>{var r=n(4586),i=n(5188),o=n(5855),a=n(7458),s=n(3358);t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},937:(t,e,n)=>{var r=n(9317),i=n(7859),o=n(9092),a=n(1030),s=n(603);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&s(t,e,n)&&(e=void 0),u(t,i(e,3))}},4206:(t,e,n)=>{var r=n(9035),i=n(4429),o=n(6368),a=n(603),s=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},854:t=>{t.exports=function(){return[]}},9701:t=>{t.exports=function(){return!1}},5571:(t,e,n)=>{var r=n(6548);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},5700:(t,e,n)=>{var r=n(5571);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},6548:(t,e,n)=>{var r=n(8131),i=n(1310),o=n(6137),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||u.test(t)?l(t.slice(2),n?2:8):a.test(t)?NaN:+t}},4357:(t,e,n)=>{var r=n(8872),i=n(5859);t.exports=function(t){return r(t,i(t))}},7417:(t,e,n)=>{var r=n(5601);t.exports=function(t){return null==t?"":r(t)}},3536:(t,e,n)=>{var r=n(414),i=n(3877),o=n(3810),a=n(7859),s=n(885),u=n(1030),l=n(4493),c=n(6681),f=n(1310),h=n(1605);t.exports=function(t,e,n){var d=u(t),p=d||l(t)||h(t);if(e=a(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:f(t)&&c(g)?i(s(t)):{}}return(p?r:o)(t,(function(t,r,i){return e(n,t,r,i)})),n}},5588:(t,e,n)=>{var r=n(9035),i=n(6368),o=n(1080),a=n(4521),s=i((function(t){return o(r(t,1,a,!0))}));t.exports=s},6062:(t,e,n)=>{var r=n(7417),i=0;t.exports=function(t){var e=++i;return r(t)+e}},6163:(t,e,n)=>{var r=n(9670),i=n(599);t.exports=function(t){return null==t?[]:r(t,i(t))}},8437:(t,e,n)=>{var r=n(7140),i=n(2818);t.exports=function(t,e){return i(t||[],e||[],r)}},491:(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)}function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(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 s(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}function u(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 l(){l=function(t,e){return new n(t,void 0,e)};var t=RegExp.prototype,e=new WeakMap;function n(t,r,i){var o=new RegExp(t,r);return e.set(o,i||e.get(t)),f(o,n.prototype)}function i(t,n){var r=e.get(n);return Object.keys(r).reduce((function(e,n){return e[n]=t[r[n]],e}),Object.create(null))}return c(n,RegExp),n.prototype.exec=function(e){var n=t.exec.call(this,e);return n&&(n.groups=i(n,this)),n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var a=e.get(this);return t[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(t,e){return"$"+a[e]})))}if("function"==typeof o){var s=this;return t[Symbol.replace].call(this,n,(function(){var t=arguments;return"object"!=r(t[t.length-1])&&(t=[].slice.call(t)).push(i(t,s)),o.apply(this,t)}))}return t[Symbol.replace].call(this,n,o)},l.apply(this,arguments)}function c(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function f(t,e){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}n.r(e),n.d(e,{default:()=>d});var h=function(t,e){return e.some((function(e){return e instanceof RegExp?e.test(t):e===t}))};function d(t,e){if(e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0},e),t=t.trim(),/^data:/i.test(t))return function(t,e){var n=e.stripHash,r=l(/^data:((?:(?!,)[\s\S])*?),((?:(?!#)[\s\S])*?)(?:#(.*))?$/,{type:1,data:2,hash:3}).exec(t);if(!r)throw new Error("Invalid URL: ".concat(t));var i=r.groups,o=i.type,u=i.data,c=i.hash,f=o.split(";");c=n?"":c;var h=!1;"base64"===f[f.length-1]&&(f.pop(),h=!0);var d=(f.shift()||"").toLowerCase(),p=a(f.map((function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||s(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.")}()}(t.split("=").map((function(t){return t.trim()})),2),n=e[0],r=e[1],i=void 0===r?"":r;return"charset"===n&&"us-ascii"===(i=i.toLowerCase())?"":"".concat(n).concat(i?"=".concat(i):"")})).filter(Boolean));return h&&p.push("base64"),(p.length>0||d&&"text/plain"!==d)&&p.unshift(d),"data:".concat(p.join(";"),",").concat(h?u.trim():u).concat(c?"#".concat(c):"")}(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");var n=t.startsWith("//");!n&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));var r=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&"https:"===r.protocol&&(r.protocol="http:"),e.forceHttps&&"http:"===r.protocol&&(r.protocol="https:"),e.stripAuthentication&&(r.username="",r.password=""),e.stripHash?r.hash="":e.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,"")),r.pathname){for(var u=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,c=0,f="";;){var d=u.exec(r.pathname);if(!d)break;var p=d[0],g=d.index;f+=r.pathname.slice(c,g).replace(/\/{2,}/g,"/"),f+=p,c=g+p.length}f+=r.pathname.slice(c,r.pathname.length).replace(/\/{2,}/g,"/"),r.pathname=f}if(r.pathname)try{r.pathname=decodeURI(r.pathname)}catch(t){}if(!0===e.removeDirectoryIndex&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){var v=r.pathname.split("/"),m=v[v.length-1];h(m,e.removeDirectoryIndex)&&(v=v.slice(0,-1),r.pathname=v.slice(1).join("/")+"/")}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(var y=0,b=a(r.searchParams.keys());y<b.length;y++){var w=b[y];h(w,e.removeQueryParameters)&&r.searchParams.delete(w)}!0===e.removeQueryParameters&&(r.search=""),e.sortQueryParameters&&r.searchParams.sort(),e.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,""));var x=t;return t=r.toString(),e.removeSingleSlash||"/"!==r.pathname||x.endsWith("/")||""!==r.hash||(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||"/"===r.pathname)&&""===r.hash&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),n&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}},3230:(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=n(1591),o=n(4104);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,u={};function l(t,e){c(t,e),c(t+"Capture",e)}function c(t,e){for(u[t]=e,t=0;t<e.length;t++)s.add(e[t])}var f=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),h=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function v(t,e,n,r,i,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){m[t]=new v(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];m[e]=new v(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){m[t]=new v(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){m[t]=new v(t,2,!1,t,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){m[t]=new v(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){m[t]=new v(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){m[t]=new v(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){m[t]=new v(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){m[t]=new v(t,5,!1,t.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(t){return t[1].toUpperCase()}function w(t,e,n,i){var o=m.hasOwnProperty(e)?m[e]:null;(null!==o?0!==o.type:i||!(2<e.length)||"o"!==e[0]&&"O"!==e[0]||"n"!==e[1]&&"N"!==e[1])&&(function(t,e,n,i){if(null==e||function(t,e,n,i){if(null!==n&&0===n.type)return!1;switch(r(e)){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,o,i)&&(n=null),i||null===o?function(t){return!!h.call(g,t)||!h.call(p,t)&&(d.test(t)?g[t]=!0:(p[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):o.mustUseProperty?t[o.propertyName]=null===n?3!==o.type&&"":n:(e=o.attributeName,i=o.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(y,b);m[e]=new v(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(y,b);m[e]=new v(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(y,b);m[e]=new v(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){m[t]=new v(t,1,!1,t.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){m[t]=new v(t,1,!1,t.toLowerCase(),null,!0,!0)}));var x=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for("react.element"),k=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),C=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var F=Symbol.iterator;function D(t){return null===t||"object"!==r(t)?null:"function"==typeof(t=F&&t[F]||t["@@iterator"])?t:null}var j,I=Object.assign;function B(t){if(void 0===j)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);j=e&&e[1]||""}return"\n"+j+t}var z=!1;function V(t,e){if(!t||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var i=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){i=t}t.call(e.prototype)}else{try{throw Error()}catch(t){i=t}t()}}catch(e){if(e&&i&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),a=i.stack.split("\n"),s=o.length-1,u=a.length-1;1<=s&&0<=u&&o[s]!==a[u];)u--;for(;1<=s&&0<=u;s--,u--)if(o[s]!==a[u]){if(1!==s||1!==u)do{if(s--,0>--u||o[s]!==a[u]){var l="\n"+o[s].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}}while(1<=s&&0<=u);break}}}finally{z=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?B(t):""}function $(t){switch(t.tag){case 5:return B(t.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return V(t.type,!1);case 11:return V(t.type.render,!1);case 1:return V(t.type,!0);default:return""}}function U(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case _:return"Fragment";case k:return"Portal";case A:return"Profiler";case E:return"StrictMode";case N:return"Suspense";case L:return"SuspenseList"}if("object"===r(t))switch(t.$$typeof){case C:return(t.displayName||"Context")+".Consumer";case P:return(t._context.displayName||"Context")+".Provider";case T:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case M:return null!==(e=t.displayName||null)?e:U(t.type)||"Memo";case O:e=t._payload,t=t._init;try{return U(t(e))}catch(t){}}return null}function q(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=e.render).displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(e);case 8:return e===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e}return null}function H(t){switch(r(t)){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function G(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function W(t){t._valueTracker||(t._valueTracker=function(t){var e=G(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function Y(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=G(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function X(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Q(t,e){var n=e.checked;return I({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function K(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=H(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function J(t,e){null!=(e=e.checked)&&w(t,"checked",e,!1)}function Z(t,e){J(t,e);var n=H(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?et(t,e.type,n):e.hasOwnProperty("defaultValue")&&et(t,e.type,H(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function tt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function et(t,e,n){"number"===e&&X(t.ownerDocument)===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var nt=Array.isArray;function rt(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+H(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function it(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return I({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ot(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(nt(n)){if(1<n.length)throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:H(n)}}function at(t,e){var n=H(e.value),r=H(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function st(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}function ut(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function lt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?ut(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var ct,ft,ht=(ft=function(t,e){if("http://www.w3.org/2000/svg"!==t.namespaceURI||"innerHTML"in t)t.innerHTML=e;else{for((ct=ct||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=ct.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return ft(t,e)}))}:ft);function dt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var pt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gt=["Webkit","ms","Moz","O"];function vt(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||pt.hasOwnProperty(t)&&pt[t]?(""+e).trim():e+"px"}function mt(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=vt(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(pt).forEach((function(t){gt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),pt[e]=pt[t]}))}));var yt=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bt(t,e){if(e){if(yt[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if("object"!==r(e.dangerouslySetInnerHTML)||!("__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!==r(e.style))throw Error(a(62))}}function wt(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xt=null;function St(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var kt=null,_t=null,Et=null;function At(t){if(t=mi(t)){if("function"!=typeof kt)throw Error(a(280));var e=t.stateNode;e&&(e=bi(e),kt(t.stateNode,t.type,e))}}function Pt(t){_t?Et?Et.push(t):Et=[t]:_t=t}function Ct(){if(_t){var t=_t,e=Et;if(Et=_t=null,At(t),e)for(t=0;t<e.length;t++)At(e[t])}}function Tt(t,e){return t(e)}function Nt(){}var Lt=!1;function Mt(t,e,n){if(Lt)return t(e,n);Lt=!0;try{return Tt(t,e,n)}finally{Lt=!1,(null!==_t||null!==Et)&&(Nt(),Ct())}}function Ot(t,e){var n=t.stateNode;if(null===n)return null;var i=bi(n);if(null===i)return null;n=i[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!i;break t;default:t=!1}if(t)return null;if(n&&"function"!=typeof n)throw Error(a(231,e,r(n)));return n}var Rt=!1;if(f)try{var Ft={};Object.defineProperty(Ft,"passive",{get:function(){Rt=!0}}),window.addEventListener("test",Ft,Ft),window.removeEventListener("test",Ft,Ft)}catch(ft){Rt=!1}function Dt(t,e,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{e.apply(n,l)}catch(t){this.onError(t)}}var jt=!1,It=null,Bt=!1,zt=null,Vt={onError:function(t){jt=!0,It=t}};function $t(t,e,n,r,i,o,a,s,u){jt=!1,It=null,Dt.apply(Vt,arguments)}function Ut(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!=(4098&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function qt(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&null!==(t=t.alternate)&&(e=t.memoizedState),null!==e)return e.dehydrated}return null}function Ht(t){if(Ut(t)!==t)throw Error(a(188))}function Gt(t){return null!==(t=function(t){var e=t.alternate;if(!e){if(null===(e=Ut(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Ht(i),t;if(o===r)return Ht(i),e;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t))?Wt(t):null}function Wt(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var e=Wt(t);if(null!==e)return e;t=t.sibling}return null}var Yt=o.unstable_scheduleCallback,Xt=o.unstable_cancelCallback,Qt=o.unstable_shouldYield,Kt=o.unstable_requestPaint,Jt=o.unstable_now,Zt=o.unstable_getCurrentPriorityLevel,te=o.unstable_ImmediatePriority,ee=o.unstable_UserBlockingPriority,ne=o.unstable_NormalPriority,re=o.unstable_LowPriority,ie=o.unstable_IdlePriority,oe=null,ae=null,se=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(ue(t)/le|0)|0},ue=Math.log,le=Math.LN2,ce=64,fe=4194304;function he(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function de(t,e){var n=t.pendingLanes;if(0===n)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=he(s):0!=(o&=a)&&(r=he(o))}else 0!=(a=n&~i)?r=he(a):0!==o&&(r=he(o));if(0===r)return 0;if(0!==e&&e!==r&&0==(e&i)&&((i=r&-r)>=(o=e&-e)||16===i&&0!=(4194240&o)))return e;if(0!=(4&r)&&(r|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0<e;)i=1<<(n=31-se(e)),r|=t[n],e&=~i;return r}function pe(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:default:return-1}}function ge(t){return 0!=(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function ve(){var t=ce;return 0==(4194240&(ce<<=1))&&(ce=64),t}function me(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ye(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-se(e)]=n}function be(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-se(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var we=0;function xe(t){return 1<(t&=-t)?4<t?0!=(268435455&t)?16:536870912:4:1}var Se,ke,_e,Ee,Ae,Pe=!1,Ce=[],Te=null,Ne=null,Le=null,Me=new Map,Oe=new Map,Re=[],Fe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function De(t,e){switch(t){case"focusin":case"focusout":Te=null;break;case"dragenter":case"dragleave":Ne=null;break;case"mouseover":case"mouseout":Le=null;break;case"pointerover":case"pointerout":Me.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oe.delete(e.pointerId)}}function je(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==e&&null!==(e=mi(e))&&ke(e),t):(t.eventSystemFlags|=r,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i),t)}function Ie(t){var e=vi(t.target);if(null!==e){var n=Ut(e);if(null!==n)if(13===(e=n.tag)){if(null!==(e=qt(n)))return t.blockedOn=e,void Ae(t.priority,(function(){_e(n)}))}else if(3===e&&n.stateNode.current.memoizedState.isDehydrated)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function Be(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var n=Qe(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n)return null!==(e=mi(n))&&ke(e),t.blockedOn=n,!1;var r=new(n=t.nativeEvent).constructor(n.type,n);xt=r,n.target.dispatchEvent(r),xt=null,e.shift()}return!0}function ze(t,e,n){Be(t)&&n.delete(e)}function Ve(){Pe=!1,null!==Te&&Be(Te)&&(Te=null),null!==Ne&&Be(Ne)&&(Ne=null),null!==Le&&Be(Le)&&(Le=null),Me.forEach(ze),Oe.forEach(ze)}function $e(t,e){t.blockedOn===e&&(t.blockedOn=null,Pe||(Pe=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ve)))}function Ue(t){function e(e){return $e(e,t)}if(0<Ce.length){$e(Ce[0],t);for(var n=1;n<Ce.length;n++){var r=Ce[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==Te&&$e(Te,t),null!==Ne&&$e(Ne,t),null!==Le&&$e(Le,t),Me.forEach(e),Oe.forEach(e),n=0;n<Re.length;n++)(r=Re[n]).blockedOn===t&&(r.blockedOn=null);for(;0<Re.length&&null===(n=Re[0]).blockedOn;)Ie(n),null===n.blockedOn&&Re.shift()}var qe=x.ReactCurrentBatchConfig,He=!0;function Ge(t,e,n,r){var i=we,o=qe.transition;qe.transition=null;try{we=1,Ye(t,e,n,r)}finally{we=i,qe.transition=o}}function We(t,e,n,r){var i=we,o=qe.transition;qe.transition=null;try{we=4,Ye(t,e,n,r)}finally{we=i,qe.transition=o}}function Ye(t,e,n,r){if(He){var i=Qe(t,e,n,r);if(null===i)$r(t,e,r,Xe,n),De(t,r);else if(function(t,e,n,r,i){switch(e){case"focusin":return Te=je(Te,t,e,n,r,i),!0;case"dragenter":return Ne=je(Ne,t,e,n,r,i),!0;case"mouseover":return Le=je(Le,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return Me.set(o,je(Me.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Oe.set(o,je(Oe.get(o)||null,t,e,n,r,i)),!0}return!1}(i,t,e,n,r))r.stopPropagation();else if(De(t,r),4&e&&-1<Fe.indexOf(t)){for(;null!==i;){var o=mi(i);if(null!==o&&Se(o),null===(o=Qe(t,e,n,r))&&$r(t,e,r,Xe,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else $r(t,e,r,null,n)}}var Xe=null;function Qe(t,e,n,r){if(Xe=null,null!==(t=vi(t=St(r))))if(null===(e=Ut(t)))t=null;else if(13===(n=e.tag)){if(null!==(t=qt(e)))return t;t=null}else if(3===n){if(e.stateNode.current.memoizedState.isDehydrated)return 3===e.tag?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Xe=t,null}function Ke(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Zt()){case te:return 1;case ee:return 4;case ne:case re:return 16;case ie:return 536870912;default:return 16}default:return 16}}var Je=null,Ze=null,tn=null;function en(){if(tn)return tn;var t,e,n=Ze,r=n.length,i="value"in Je?Je.value:Je.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return tn=i.slice(t,1<e?1-e:void 0)}function nn(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function rn(){return!0}function on(){return!1}function an(t){function e(e,n,r,i,o){for(var a in this._reactName=e,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,t)t.hasOwnProperty(a)&&(e=t[a],this[a]=e?e(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rn:on,this.isPropagationStopped=on,this}return I(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),e}var sn,un,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=an(cn),hn=I({},cn,{view:0,detail:0}),dn=an(hn),pn=I({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ln&&(ln&&"mousemove"===t.type?(sn=t.screenX-ln.screenX,un=t.screenY-ln.screenY):un=sn=0,ln=t),sn)},movementY:function(t){return"movementY"in t?t.movementY:un}}),gn=an(pn),vn=an(I({},pn,{dataTransfer:0})),mn=an(I({},hn,{relatedTarget:0})),yn=an(I({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=an(I({},cn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),wn=an(I({},cn,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _n(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=kn[t])&&!!e[t]}function En(){return _n}var An=an(I({},hn,{key:function(t){if(t.key){var e=xn[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=nn(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?Sn[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(t){return"keypress"===t.type?nn(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?nn(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),Pn=an(I({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=an(I({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Tn=an(I({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=an(I({},pn,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=[9,13,27,32],Mn=f&&"CompositionEvent"in window,On=null;f&&"documentMode"in document&&(On=document.documentMode);var Rn=f&&"TextEvent"in window&&!On,Fn=f&&(!Mn||On&&8<On&&11>=On),Dn=String.fromCharCode(32),jn=!1;function In(t,e){switch(t){case"keyup":return-1!==Ln.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(t){return"object"===r(t=t.detail)&&"data"in t?t.data:null}var zn=!1,Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $n(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!Vn[t.type]:"textarea"===e}function Un(t,e,n,r){Pt(r),0<(e=qr(e,"onChange")).length&&(n=new fn("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var qn=null,Hn=null;function Gn(t){Dr(t,0)}function Wn(t){if(Y(yi(t)))return t}function Yn(t,e){if("change"===t)return e}var Xn=!1;if(f){var Qn;if(f){var Kn="oninput"in document;if(!Kn){var Jn=document.createElement("div");Jn.setAttribute("oninput","return;"),Kn="function"==typeof Jn.oninput}Qn=Kn}else Qn=!1;Xn=Qn&&(!document.documentMode||9<document.documentMode)}function Zn(){qn&&(qn.detachEvent("onpropertychange",tr),Hn=qn=null)}function tr(t){if("value"===t.propertyName&&Wn(Hn)){var e=[];Un(e,Hn,t,St(t)),Mt(Gn,e)}}function er(t,e,n){"focusin"===t?(Zn(),Hn=n,(qn=e).attachEvent("onpropertychange",tr)):"focusout"===t&&Zn()}function nr(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return Wn(Hn)}function rr(t,e){if("click"===t)return Wn(e)}function ir(t,e){if("input"===t||"change"===t)return Wn(e)}var or="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e};function ar(t,e){if(or(t,e))return!0;if("object"!==r(t)||null===t||"object"!==r(e)||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var o=n[i];if(!h.call(e,o)||!or(t[o],e[o]))return!1}return!0}function sr(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ur(t,e){var n,r=sr(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=sr(r)}}function lr(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?lr(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function cr(){for(var t=window,e=X();e instanceof t.HTMLIFrameElement;){try{var n="string"==typeof e.contentWindow.location.href}catch(t){n=!1}if(!n)break;e=X((t=e.contentWindow).document)}return e}function fr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}function hr(t){var e=cr(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&lr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(e=r.start,void 0===(t=r.end)&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if((t=(e=n.ownerDocument||document)&&e.defaultView||window).getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var a=ur(n,r);i&&a&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&((e=e.createRange()).setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}for(e=[],t=n;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<e.length;n++)(t=e[n]).element.scrollLeft=t.left,t.element.scrollTop=t.top}}var dr=f&&"documentMode"in document&&11>=document.documentMode,pr=null,gr=null,vr=null,mr=!1;function yr(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;mr||null==pr||pr!==X(r)||(r="selectionStart"in(r=pr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&ar(vr,r)||(vr=r,0<(r=qr(gr,"onSelect")).length&&(e=new fn("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=pr)))}function br(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var wr={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},xr={},Sr={};function kr(t){if(xr[t])return xr[t];if(!wr[t])return t;var e,n=wr[t];for(e in n)if(n.hasOwnProperty(e)&&e in Sr)return xr[t]=n[e];return t}f&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var _r=kr("animationend"),Er=kr("animationiteration"),Ar=kr("animationstart"),Pr=kr("transitionend"),Cr=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(t,e){Cr.set(t,e),l(e,[t])}for(var Lr=0;Lr<Tr.length;Lr++){var Mr=Tr[Lr];Nr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Nr(_r,"onAnimationEnd"),Nr(Er,"onAnimationIteration"),Nr(Ar,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(Pr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Fr(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,function(t,e,n,r,i,o,s,u,l){if($t.apply(this,arguments),jt){if(!jt)throw Error(a(198));var c=It;jt=!1,It=null,Bt||(Bt=!0,zt=c)}}(r,e,void 0,t),t.currentTarget=null}function Dr(t,e){e=0!=(4&e);for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;t:{var o=void 0;if(e)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break t;Fr(i,s,l),o=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,l=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break t;Fr(i,s,l),o=u}}}if(Bt)throw t=zt,Bt=!1,zt=null,t}function jr(t,e){var n=e[di];void 0===n&&(n=e[di]=new Set);var r=t+"__bubble";n.has(r)||(Vr(e,t,2,!1),n.add(r))}function Ir(t,e,n){var r=0;e&&(r|=4),Vr(n,t,r,e)}var Br="_reactListening"+Math.random().toString(36).slice(2);function zr(t){if(!t[Br]){t[Br]=!0,s.forEach((function(e){"selectionchange"!==e&&(Rr.has(e)||Ir(e,!1,t),Ir(e,!0,t))}));var e=9===t.nodeType?t:t.ownerDocument;null===e||e[Br]||(e[Br]=!0,Ir("selectionchange",!1,e))}}function Vr(t,e,n,r){switch(Ke(e)){case 1:var i=Ge;break;case 4:i=We;break;default:i=Ye}n=i.bind(null,e,n,t),i=void 0,!Rt||"touchstart"!==e&&"touchmove"!==e&&"wheel"!==e||(i=!0),r?void 0!==i?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):void 0!==i?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function $r(t,e,n,r,i){var o=r;if(0==(1&e)&&0==(2&e)&&null!==r)t:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=vi(s)))return;if(5===(u=a.tag)||6===u){r=o=a;continue t}s=s.parentNode}}r=r.return}Mt((function(){var r=o,i=St(n),a=[];t:{var s=Cr.get(t);if(void 0!==s){var u=fn,l=t;switch(t){case"keypress":if(0===nn(n))break t;case"keydown":case"keyup":u=An;break;case"focusin":l="focus",u=mn;break;case"focusout":l="blur",u=mn;break;case"beforeblur":case"afterblur":u=mn;break;case"click":if(2===n.button)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Cn;break;case _r:case Er:case Ar:u=yn;break;case Pr:u=Tn;break;case"scroll":u=dn;break;case"wheel":u=Nn;break;case"copy":case"cut":case"paste":u=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Pn}var c=0!=(4&e),f=!c&&"scroll"===t,h=c?null!==s?s+"Capture":null:s;c=[];for(var d,p=r;null!==p;){var g=(d=p).stateNode;if(5===d.tag&&null!==g&&(d=g,null!==h&&null!=(g=Ot(p,h))&&c.push(Ur(p,g,d))),f)break;p=p.return}0<c.length&&(s=new u(s,l,null,n,i),a.push({event:s,listeners:c}))}}if(0==(7&e)){if(u="mouseout"===t||"pointerout"===t,(!(s="mouseover"===t||"pointerover"===t)||n===xt||!(l=n.relatedTarget||n.fromElement)||!vi(l)&&!l[hi])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(l=(l=n.relatedTarget||n.toElement)?vi(l):null)&&(l!==(f=Ut(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(u=null,l=r),u!==l)){if(c=gn,g="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==t&&"pointerover"!==t||(c=Pn,g="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?s:yi(u),d=null==l?s:yi(l),(s=new c(g,p+"leave",u,n,i)).target=f,s.relatedTarget=d,g=null,vi(i)===r&&((c=new c(h,p+"enter",l,n,i)).target=d,c.relatedTarget=f,g=c),f=g,u&&l)t:{for(h=l,p=0,d=c=u;d;d=Hr(d))p++;for(d=0,g=h;g;g=Hr(g))d++;for(;0<p-d;)c=Hr(c),p--;for(;0<d-p;)h=Hr(h),d--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break t;c=Hr(c),h=Hr(h)}c=null}else c=null;null!==u&&Gr(a,s,u,c,!1),null!==l&&null!==f&&Gr(a,f,l,c,!0)}if("select"===(u=(s=r?yi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var v=Yn;else if($n(s))if(Xn)v=ir;else{v=nr;var m=er}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=rr);switch(v&&(v=v(t,r))?Un(a,v,n,i):(m&&m(t,s,r),"focusout"===t&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&et(s,"number",s.value)),m=r?yi(r):window,t){case"focusin":($n(m)||"true"===m.contentEditable)&&(pr=m,gr=r,vr=null);break;case"focusout":vr=gr=pr=null;break;case"mousedown":mr=!0;break;case"contextmenu":case"mouseup":case"dragend":mr=!1,yr(a,n,i);break;case"selectionchange":if(dr)break;case"keydown":case"keyup":yr(a,n,i)}var y;if(Mn)t:{switch(t){case"compositionstart":var b="onCompositionStart";break t;case"compositionend":b="onCompositionEnd";break t;case"compositionupdate":b="onCompositionUpdate";break t}b=void 0}else zn?In(t,n)&&(b="onCompositionEnd"):"keydown"===t&&229===n.keyCode&&(b="onCompositionStart");b&&(Fn&&"ko"!==n.locale&&(zn||"onCompositionStart"!==b?"onCompositionEnd"===b&&zn&&(y=en()):(Ze="value"in(Je=i)?Je.value:Je.textContent,zn=!0)),0<(m=qr(r,b)).length&&(b=new wn(b,t,null,n,i),a.push({event:b,listeners:m}),(y||null!==(y=Bn(n)))&&(b.data=y))),(y=Rn?function(t,e){switch(t){case"compositionend":return Bn(e);case"keypress":return 32!==e.which?null:(jn=!0,Dn);case"textInput":return(t=e.data)===Dn&&jn?null:t;default:return null}}(t,n):function(t,e){if(zn)return"compositionend"===t||!Mn&&In(t,e)?(t=en(),tn=Ze=Je=null,zn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Fn&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))&&0<(r=qr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y)}Dr(a,e)}))}function Ur(t,e,n){return{instance:t,listener:e,currentTarget:n}}function qr(t,e){for(var n=e+"Capture",r=[];null!==t;){var i=t,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ot(t,n))&&r.unshift(Ur(t,o,i)),null!=(o=Ot(t,e))&&r.push(Ur(t,o,i))),t=t.return}return r}function Hr(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Gr(t,e,n,r,i){for(var o=e._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==l&&(s=l,i?null!=(u=Ot(n,o))&&a.unshift(Ur(n,u,s)):i||null!=(u=Ot(n,o))&&a.push(Ur(n,u,s))),n=n.return}0!==a.length&&t.push({event:e,listeners:a})}var Wr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Xr(t){return("string"==typeof t?t:""+t).replace(Wr,"\n").replace(Yr,"")}function Qr(t,e,n){if(e=Xr(e),Xr(t)!==e&&n)throw Error(a(425))}function Kr(){}var Jr=null,Zr=null;function ti(t,e){return"textarea"===t||"noscript"===t||"string"==typeof e.children||"number"==typeof e.children||"object"===r(e.dangerouslySetInnerHTML)&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var ei="function"==typeof setTimeout?setTimeout:void 0,ni="function"==typeof clearTimeout?clearTimeout:void 0,ri="function"==typeof Promise?Promise:void 0,ii="function"==typeof queueMicrotask?queueMicrotask:void 0!==ri?function(t){return ri.resolve(null).then(t).catch(oi)}:ei;function oi(t){setTimeout((function(){throw t}))}function ai(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return t.removeChild(i),void Ue(e);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ue(e)}function si(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break;if(8===e){if("$"===(e=t.data)||"$!"===e||"$?"===e)break;if("/$"===e)return null}}return t}function ui(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var li=Math.random().toString(36).slice(2),ci="__reactFiber$"+li,fi="__reactProps$"+li,hi="__reactContainer$"+li,di="__reactEvents$"+li,pi="__reactListeners$"+li,gi="__reactHandles$"+li;function vi(t){var e=t[ci];if(e)return e;for(var n=t.parentNode;n;){if(e=n[hi]||n[ci]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=ui(t);null!==t;){if(n=t[ci])return n;t=ui(t)}return e}n=(t=n).parentNode}return null}function mi(t){return!(t=t[ci]||t[hi])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function yi(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function bi(t){return t[fi]||null}var wi=[],xi=-1;function Si(t){return{current:t}}function ki(t){0>xi||(t.current=wi[xi],wi[xi]=null,xi--)}function _i(t,e){xi++,wi[xi]=t.current,t.current=e}var Ei={},Ai=Si(Ei),Pi=Si(!1),Ci=Ei;function Ti(t,e){var n=t.type.contextTypes;if(!n)return Ei;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Ni(t){return null!=t.childContextTypes}function Li(){ki(Pi),ki(Ai)}function Mi(t,e,n){if(Ai.current!==Ei)throw Error(a(168));_i(Ai,e),_i(Pi,n)}function Oi(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,q(t)||"Unknown",i));return I({},n,r)}function Ri(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ei,Ci=Ai.current,_i(Ai,t),_i(Pi,Pi.current),!0}function Fi(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=Oi(t,e,Ci),r.__reactInternalMemoizedMergedChildContext=t,ki(Pi),ki(Ai),_i(Ai,t)):ki(Pi),_i(Pi,n)}var Di=null,ji=!1,Ii=!1;function Bi(t){null===Di?Di=[t]:Di.push(t)}function zi(){if(!Ii&&null!==Di){Ii=!0;var t=0,e=we;try{var n=Di;for(we=1;t<n.length;t++){var r=n[t];do{r=r(!0)}while(null!==r)}Di=null,ji=!1}catch(e){throw null!==Di&&(Di=Di.slice(t+1)),Yt(te,zi),e}finally{we=e,Ii=!1}}return null}var Vi=[],$i=0,Ui=null,qi=0,Hi=[],Gi=0,Wi=null,Yi=1,Xi="";function Qi(t,e){Vi[$i++]=qi,Vi[$i++]=Ui,Ui=t,qi=e}function Ki(t,e,n){Hi[Gi++]=Yi,Hi[Gi++]=Xi,Hi[Gi++]=Wi,Wi=t;var r=Yi;t=Xi;var i=32-se(r)-1;r&=~(1<<i),n+=1;var o=32-se(e)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Yi=1<<32-se(e)+i|n<<i|r,Xi=o+t}else Yi=1<<o|n<<i|r,Xi=t}function Ji(t){null!==t.return&&(Qi(t,1),Ki(t,1,0))}function Zi(t){for(;t===Ui;)Ui=Vi[--$i],Vi[$i]=null,qi=Vi[--$i],Vi[$i]=null;for(;t===Wi;)Wi=Hi[--Gi],Hi[Gi]=null,Xi=Hi[--Gi],Hi[Gi]=null,Yi=Hi[--Gi],Hi[Gi]=null}var to=null,eo=null,no=!1,ro=null;function io(t,e){var n=Tl(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,null===(e=t.deletions)?(t.deletions=[n],t.flags|=16):e.push(n)}function oo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,to=t,eo=si(e.firstChild),!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,to=t,eo=null,!0);case 13:return null!==(e=8!==e.nodeType?null:e)&&(n=null!==Wi?{id:Yi,overflow:Xi}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},(n=Tl(18,null,null,0)).stateNode=e,n.return=t,t.child=n,to=t,eo=null,!0);default:return!1}}function ao(t){return 0!=(1&t.mode)&&0==(128&t.flags)}function so(t){if(no){var e=eo;if(e){var n=e;if(!oo(t,e)){if(ao(t))throw Error(a(418));e=si(n.nextSibling);var r=to;e&&oo(t,e)?io(r,n):(t.flags=-4097&t.flags|2,no=!1,to=t)}}else{if(ao(t))throw Error(a(418));t.flags=-4097&t.flags|2,no=!1,to=t}}}function uo(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;to=t}function lo(t){if(t!==to)return!1;if(!no)return uo(t),no=!0,!1;var e;if((e=3!==t.tag)&&!(e=5!==t.tag)&&(e="head"!==(e=t.type)&&"body"!==e&&!ti(t.type,t.memoizedProps)),e&&(e=eo)){if(ao(t))throw co(),Error(a(418));for(;e;)io(t,e),e=si(e.nextSibling)}if(uo(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){eo=si(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}eo=null}}else eo=to?si(t.stateNode.nextSibling):null;return!0}function co(){for(var t=eo;t;)t=si(t.nextSibling)}function fo(){eo=to=null,no=!1}function ho(t){null===ro?ro=[t]:ro.push(t)}var po=x.ReactCurrentBatchConfig;function go(t,e){if(t&&t.defaultProps){for(var n in e=I({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}var vo=Si(null),mo=null,yo=null,bo=null;function wo(){bo=yo=mo=null}function xo(t){var e=vo.current;ki(vo),t._currentValue=e}function So(t,e,n){for(;null!==t;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,null!==r&&(r.childLanes|=e)):null!==r&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ko(t,e){mo=t,bo=yo=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&e)&&(ys=!0),t.firstContext=null)}function _o(t){var e=t._currentValue;if(bo!==t)if(t={context:t,memoizedValue:e,next:null},null===yo){if(null===mo)throw Error(a(308));yo=t,mo.dependencies={lanes:0,firstContext:t}}else yo=yo.next=t;return e}var Eo=null;function Ao(t){null===Eo?Eo=[t]:Eo.push(t)}function Po(t,e,n,r){var i=e.interleaved;return null===i?(n.next=n,Ao(e)):(n.next=i.next,i.next=n),e.interleaved=n,Co(t,r)}function Co(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}var To=!1;function No(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lo(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Mo(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Oo(t,e,n){var r=t.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Au)){var i=r.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Co(t,n)}return null===(i=r.interleaved)?(e.next=e,Ao(r)):(e.next=i.next,i.next=e),r.interleaved=e,Co(t,n)}function Ro(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,0!=(4194240&n))){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,be(t,n)}}function Fo(t,e){var n=t.updateQueue,r=t.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=e:o=o.next=e}else i=o=e;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Do(t,e,n,r){var i=t.updateQueue;To=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,l=u.next;u.next=null,null===a?o=l:a.next=l,a=u;var c=t.alternate;null!==c&&(s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u)}if(null!==o){var f=i.baseState;for(a=0,c=l=u=null,s=o;;){var h=s.lane,d=s.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});t:{var p=t,g=s;switch(h=e,d=n,g.tag){case 1:if("function"==typeof(p=g.payload)){f=p.call(d,f,h);break t}f=p;break t;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=g.payload)?p.call(d,f,h):p))break t;f=I({},f,h);break t;case 2:To=!0}}null!==s.callback&&0!==s.lane&&(t.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(l=c=d,u=f):c=c.next=d,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===c&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,null!==(e=i.shared.interleaved)){i=e;do{a|=i.lane,i=i.next}while(i!==e)}else null===o&&(i.shared.lanes=0);Ru|=a,t.lanes=a,t.memoizedState=f}}function jo(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Io=(new i.Component).refs;function Bo(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:I({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var zo={isMounted:function(t){return!!(t=t._reactInternals)&&Ut(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Ju(),i=Zu(t),o=Mo(r,i);o.payload=e,null!=n&&(o.callback=n),null!==(e=Oo(t,o,i))&&(tl(e,t,i,r),Ro(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Ju(),i=Zu(t),o=Mo(r,i);o.tag=1,o.payload=e,null!=n&&(o.callback=n),null!==(e=Oo(t,o,i))&&(tl(e,t,i,r),Ro(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Ju(),r=Zu(t),i=Mo(n,r);i.tag=2,null!=e&&(i.callback=e),null!==(e=Oo(t,i,r))&&(tl(e,t,r,n),Ro(e,t,r))}};function Vo(t,e,n,r,i,o,a){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!(e.prototype&&e.prototype.isPureReactComponent&&ar(n,r)&&ar(i,o))}function $o(t,e,n){var i=!1,o=Ei,a=e.contextType;return"object"===r(a)&&null!==a?a=_o(a):(o=Ni(e)?Ci:Ai.current,a=(i=null!=(i=e.contextTypes))?Ti(t,o):Ei),e=new e(n,a),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=zo,t.stateNode=e,e._reactInternals=t,i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,t.__reactInternalMemoizedMaskedChildContext=a),e}function Uo(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&zo.enqueueReplaceState(e,e.state,null)}function qo(t,e,n,i){var o=t.stateNode;o.props=n,o.state=t.memoizedState,o.refs=Io,No(t);var a=e.contextType;"object"===r(a)&&null!==a?o.context=_o(a):(a=Ni(e)?Ci:Ai.current,o.context=Ti(t,a)),o.state=t.memoizedState,"function"==typeof(a=e.getDerivedStateFromProps)&&(Bo(t,e,a,n),o.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(e=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),e!==o.state&&zo.enqueueReplaceState(o,o.state,null),Do(t,n,o,i),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308)}function Ho(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!==r(t)){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var i=n.stateNode}if(!i)throw Error(a(147,t));var o=i,s=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===s?e.ref:((e=function(t){var e=o.refs;e===Io&&(e=o.refs={}),null===t?delete e[s]:e[s]=t})._stringRef=s,e)}if("string"!=typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function Go(t,e){throw t=Object.prototype.toString.call(e),Error(a(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Wo(t){return(0,t._init)(t._payload)}function Yo(t){function e(e,n){if(t){var r=e.deletions;null===r?(e.deletions=[n],e.flags|=16):r.push(n)}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function i(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function o(t,e){return(t=Ll(t,e)).index=0,t.sibling=null,t}function s(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.flags|=2,n):r:(e.flags|=2,n):(e.flags|=1048576,n)}function u(e){return t&&null===e.alternate&&(e.flags|=2),e}function l(t,e,n,r){return null===e||6!==e.tag?((e=Fl(n,t.mode,r)).return=t,e):((e=o(e,n)).return=t,e)}function c(t,e,n,i){var a=n.type;return a===_?h(t,e,n.props.children,i,n.key):null!==e&&(e.elementType===a||"object"===r(a)&&null!==a&&a.$$typeof===O&&Wo(a)===e.type)?((i=o(e,n.props)).ref=Ho(t,e,n),i.return=t,i):((i=Ml(n.type,n.key,n.props,null,t.mode,i)).ref=Ho(t,e,n),i.return=t,i)}function f(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Dl(n,t.mode,r)).return=t,e):((e=o(e,n.children||[])).return=t,e)}function h(t,e,n,r,i){return null===e||7!==e.tag?((e=Ol(n,t.mode,r,i)).return=t,e):((e=o(e,n)).return=t,e)}function d(t,e,n){if("string"==typeof e&&""!==e||"number"==typeof e)return(e=Fl(""+e,t.mode,n)).return=t,e;if("object"===r(e)&&null!==e){switch(e.$$typeof){case S:return(n=Ml(e.type,e.key,e.props,null,t.mode,n)).ref=Ho(t,null,e),n.return=t,n;case k:return(e=Dl(e,t.mode,n)).return=t,e;case O:return d(t,(0,e._init)(e._payload),n)}if(nt(e)||D(e))return(e=Ol(e,t.mode,n,null)).return=t,e;Go(t,e)}return null}function p(t,e,n,i){var o=null!==e?e.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:l(t,e,""+n,i);if("object"===r(n)&&null!==n){switch(n.$$typeof){case S:return n.key===o?c(t,e,n,i):null;case k:return n.key===o?f(t,e,n,i):null;case O:return p(t,e,(o=n._init)(n._payload),i)}if(nt(n)||D(n))return null!==o?null:h(t,e,n,i,null);Go(t,n)}return null}function g(t,e,n,i,o){if("string"==typeof i&&""!==i||"number"==typeof i)return l(e,t=t.get(n)||null,""+i,o);if("object"===r(i)&&null!==i){switch(i.$$typeof){case S:return c(e,t=t.get(null===i.key?n:i.key)||null,i,o);case k:return f(e,t=t.get(null===i.key?n:i.key)||null,i,o);case O:return g(t,e,n,(0,i._init)(i._payload),o)}if(nt(i)||D(i))return h(e,t=t.get(n)||null,i,o,null);Go(e,i)}return null}function v(r,o,a,u){for(var l=null,c=null,f=o,h=o=0,v=null;null!==f&&h<a.length;h++){f.index>h?(v=f,f=null):v=f.sibling;var m=p(r,f,a[h],u);if(null===m){null===f&&(f=v);break}t&&f&&null===m.alternate&&e(r,f),o=s(m,o,h),null===c?l=m:c.sibling=m,c=m,f=v}if(h===a.length)return n(r,f),no&&Qi(r,h),l;if(null===f){for(;h<a.length;h++)null!==(f=d(r,a[h],u))&&(o=s(f,o,h),null===c?l=f:c.sibling=f,c=f);return no&&Qi(r,h),l}for(f=i(r,f);h<a.length;h++)null!==(v=g(f,r,h,a[h],u))&&(t&&null!==v.alternate&&f.delete(null===v.key?h:v.key),o=s(v,o,h),null===c?l=v:c.sibling=v,c=v);return t&&f.forEach((function(t){return e(r,t)})),no&&Qi(r,h),l}function m(r,o,u,l){var c=D(u);if("function"!=typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var f=c=null,h=o,v=o=0,m=null,y=u.next();null!==h&&!y.done;v++,y=u.next()){h.index>v?(m=h,h=null):m=h.sibling;var b=p(r,h,y.value,l);if(null===b){null===h&&(h=m);break}t&&h&&null===b.alternate&&e(r,h),o=s(b,o,v),null===f?c=b:f.sibling=b,f=b,h=m}if(y.done)return n(r,h),no&&Qi(r,v),c;if(null===h){for(;!y.done;v++,y=u.next())null!==(y=d(r,y.value,l))&&(o=s(y,o,v),null===f?c=y:f.sibling=y,f=y);return no&&Qi(r,v),c}for(h=i(r,h);!y.done;v++,y=u.next())null!==(y=g(h,r,v,y.value,l))&&(t&&null!==y.alternate&&h.delete(null===y.key?v:y.key),o=s(y,o,v),null===f?c=y:f.sibling=y,f=y);return t&&h.forEach((function(t){return e(r,t)})),no&&Qi(r,v),c}return function t(i,a,s,l){if("object"===r(s)&&null!==s&&s.type===_&&null===s.key&&(s=s.props.children),"object"===r(s)&&null!==s){switch(s.$$typeof){case S:t:{for(var c=s.key,f=a;null!==f;){if(f.key===c){if((c=s.type)===_){if(7===f.tag){n(i,f.sibling),(a=o(f,s.props.children)).return=i,i=a;break t}}else if(f.elementType===c||"object"===r(c)&&null!==c&&c.$$typeof===O&&Wo(c)===f.type){n(i,f.sibling),(a=o(f,s.props)).ref=Ho(i,f,s),a.return=i,i=a;break t}n(i,f);break}e(i,f),f=f.sibling}s.type===_?((a=Ol(s.props.children,i.mode,l,s.key)).return=i,i=a):((l=Ml(s.type,s.key,s.props,null,i.mode,l)).ref=Ho(i,a,s),l.return=i,i=l)}return u(i);case k:t:{for(f=s.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(i,a.sibling),(a=o(a,s.children||[])).return=i,i=a;break t}n(i,a);break}e(i,a),a=a.sibling}(a=Dl(s,i.mode,l)).return=i,i=a}return u(i);case O:return t(i,a,(f=s._init)(s._payload),l)}if(nt(s))return v(i,a,s,l);if(D(s))return m(i,a,s,l);Go(i,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(i,a.sibling),(a=o(a,s)).return=i,i=a):(n(i,a),(a=Fl(s,i.mode,l)).return=i,i=a),u(i)):n(i,a)}}var Xo=Yo(!0),Qo=Yo(!1),Ko={},Jo=Si(Ko),Zo=Si(Ko),ta=Si(Ko);function ea(t){if(t===Ko)throw Error(a(174));return t}function na(t,e){switch(_i(ta,e),_i(Zo,t),_i(Jo,Ko),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:lt(null,"");break;default:e=lt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}ki(Jo),_i(Jo,e)}function ra(){ki(Jo),ki(Zo),ki(ta)}function ia(t){ea(ta.current);var e=ea(Jo.current),n=lt(e,t.type);e!==n&&(_i(Zo,t),_i(Jo,n))}function oa(t){Zo.current===t&&(ki(Jo),ki(Zo))}var aa=Si(0);function sa(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ua=[];function la(){for(var t=0;t<ua.length;t++)ua[t]._workInProgressVersionPrimary=null;ua.length=0}var ca=x.ReactCurrentDispatcher,fa=x.ReactCurrentBatchConfig,ha=0,da=null,pa=null,ga=null,va=!1,ma=!1,ya=0,ba=0;function wa(){throw Error(a(321))}function xa(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!or(t[n],e[n]))return!1;return!0}function Sa(t,e,n,r,i,o){if(ha=o,da=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ca.current=null===t||null===t.memoizedState?os:as,t=n(r,i),ma){o=0;do{if(ma=!1,ya=0,25<=o)throw Error(a(301));o+=1,ga=pa=null,e.updateQueue=null,ca.current=ss,t=n(r,i)}while(ma)}if(ca.current=is,e=null!==pa&&null!==pa.next,ha=0,ga=pa=da=null,va=!1,e)throw Error(a(300));return t}function ka(){var t=0!==ya;return ya=0,t}function _a(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ga?da.memoizedState=ga=t:ga=ga.next=t,ga}function Ea(){if(null===pa){var t=da.alternate;t=null!==t?t.memoizedState:null}else t=pa.next;var e=null===ga?da.memoizedState:ga.next;if(null!==e)ga=e,pa=t;else{if(null===t)throw Error(a(310));t={memoizedState:(pa=t).memoizedState,baseState:pa.baseState,baseQueue:pa.baseQueue,queue:pa.queue,next:null},null===ga?da.memoizedState=ga=t:ga=ga.next=t}return ga}function Aa(t,e){return"function"==typeof e?e(t):e}function Pa(t){var e=Ea(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=pa,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var u=s=null,l=null,c=o;do{var f=c.lane;if((ha&f)===f)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(u=l=h,s=r):l=l.next=h,da.lanes|=f,Ru|=f}c=c.next}while(null!==c&&c!==o);null===l?s=r:l.next=u,or(r,e.memoizedState)||(ys=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=l,n.lastRenderedState=r}if(null!==(t=n.interleaved)){i=t;do{o=i.lane,da.lanes|=o,Ru|=o,i=i.next}while(i!==t)}else null===i&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Ca(t){var e=Ea(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);or(o,e.memoizedState)||(ys=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function Ta(){}function Na(t,e){var n=da,r=Ea(),i=e(),o=!or(r.memoizedState,i);if(o&&(r.memoizedState=i,ys=!0),r=r.queue,$a(Oa.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||null!==ga&&1&ga.memoizedState.tag){if(n.flags|=2048,ja(9,Ma.bind(null,n,r,i,e),void 0,null),null===Pu)throw Error(a(349));0!=(30&ha)||La(n,e,i)}return i}function La(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=da.updateQueue)?(e={lastEffect:null,stores:null},da.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function Ma(t,e,n,r){e.value=n,e.getSnapshot=r,Ra(e)&&Fa(t)}function Oa(t,e,n){return n((function(){Ra(e)&&Fa(t)}))}function Ra(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!or(t,n)}catch(t){return!0}}function Fa(t){var e=Co(t,1);null!==e&&tl(e,t,1,-1)}function Da(t){var e=_a();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Aa,lastRenderedState:t},e.queue=t,t=t.dispatch=ts.bind(null,da,t),[e.memoizedState,t]}function ja(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=da.updateQueue)?(e={lastEffect:null,stores:null},da.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function Ia(){return Ea().memoizedState}function Ba(t,e,n,r){var i=_a();da.flags|=t,i.memoizedState=ja(1|e,n,void 0,void 0===r?null:r)}function za(t,e,n,r){var i=Ea();r=void 0===r?null:r;var o=void 0;if(null!==pa){var a=pa.memoizedState;if(o=a.destroy,null!==r&&xa(r,a.deps))return void(i.memoizedState=ja(e,n,o,r))}da.flags|=t,i.memoizedState=ja(1|e,n,o,r)}function Va(t,e){return Ba(8390656,8,t,e)}function $a(t,e){return za(2048,8,t,e)}function Ua(t,e){return za(4,2,t,e)}function qa(t,e){return za(4,4,t,e)}function Ha(t,e){return"function"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Ga(t,e,n){return n=null!=n?n.concat([t]):null,za(4,4,Ha.bind(null,e,t),n)}function Wa(){}function Ya(t,e){var n=Ea();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&xa(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Xa(t,e){var n=Ea();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&xa(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Qa(t,e,n){return 0==(21&ha)?(t.baseState&&(t.baseState=!1,ys=!0),t.memoizedState=n):(or(n,e)||(n=ve(),da.lanes|=n,Ru|=n,t.baseState=!0),e)}function Ka(t,e){var n=we;we=0!==n&&4>n?n:4,t(!0);var r=fa.transition;fa.transition={};try{t(!1),e()}finally{we=n,fa.transition=r}}function Ja(){return Ea().memoizedState}function Za(t,e,n){var r=Zu(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},es(t)?ns(e,n):null!==(n=Po(t,e,n,r))&&(tl(n,t,r,Ju()),rs(n,e,r))}function ts(t,e,n){var r=Zu(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(es(t))ns(e,i);else{var o=t.alternate;if(0===t.lanes&&(null===o||0===o.lanes)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,or(s,a)){var u=e.interleaved;return null===u?(i.next=i,Ao(e)):(i.next=u.next,u.next=i),void(e.interleaved=i)}}catch(t){}null!==(n=Po(t,e,i,r))&&(tl(n,t,r,i=Ju()),rs(n,e,r))}}function es(t){var e=t.alternate;return t===da||null!==e&&e===da}function ns(t,e){ma=va=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function rs(t,e,n){if(0!=(4194240&n)){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,be(t,n)}}var is={readContext:_o,useCallback:wa,useContext:wa,useEffect:wa,useImperativeHandle:wa,useInsertionEffect:wa,useLayoutEffect:wa,useMemo:wa,useReducer:wa,useRef:wa,useState:wa,useDebugValue:wa,useDeferredValue:wa,useTransition:wa,useMutableSource:wa,useSyncExternalStore:wa,useId:wa,unstable_isNewReconciler:!1},os={readContext:_o,useCallback:function(t,e){return _a().memoizedState=[t,void 0===e?null:e],t},useContext:_o,useEffect:Va,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,Ba(4194308,4,Ha.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ba(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ba(4,2,t,e)},useMemo:function(t,e){var n=_a();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=_a();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Za.bind(null,da,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},_a().memoizedState=t},useState:Da,useDebugValue:Wa,useDeferredValue:function(t){return _a().memoizedState=t},useTransition:function(){var t=Da(!1),e=t[0];return t=Ka.bind(null,t[1]),_a().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=da,i=_a();if(no){if(void 0===n)throw Error(a(407));n=n()}else{if(n=e(),null===Pu)throw Error(a(349));0!=(30&ha)||La(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,Va(Oa.bind(null,r,o,t),[t]),r.flags|=2048,ja(9,Ma.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=_a(),e=Pu.identifierPrefix;if(no){var n=Xi;e=":"+e+"R"+(n=(Yi&~(1<<32-se(Yi)-1)).toString(32)+n),0<(n=ya++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=ba++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},as={readContext:_o,useCallback:Ya,useContext:_o,useEffect:$a,useImperativeHandle:Ga,useInsertionEffect:Ua,useLayoutEffect:qa,useMemo:Xa,useReducer:Pa,useRef:Ia,useState:function(){return Pa(Aa)},useDebugValue:Wa,useDeferredValue:function(t){return Qa(Ea(),pa.memoizedState,t)},useTransition:function(){return[Pa(Aa)[0],Ea().memoizedState]},useMutableSource:Ta,useSyncExternalStore:Na,useId:Ja,unstable_isNewReconciler:!1},ss={readContext:_o,useCallback:Ya,useContext:_o,useEffect:$a,useImperativeHandle:Ga,useInsertionEffect:Ua,useLayoutEffect:qa,useMemo:Xa,useReducer:Ca,useRef:Ia,useState:function(){return Ca(Aa)},useDebugValue:Wa,useDeferredValue:function(t){var e=Ea();return null===pa?e.memoizedState=t:Qa(e,pa.memoizedState,t)},useTransition:function(){return[Ca(Aa)[0],Ea().memoizedState]},useMutableSource:Ta,useSyncExternalStore:Na,useId:Ja,unstable_isNewReconciler:!1};function us(t,e){try{var n="",r=e;do{n+=$(r),r=r.return}while(r);var i=n}catch(t){i="\nError generating stack: "+t.message+"\n"+t.stack}return{value:t,source:e,stack:i,digest:null}}function ls(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}function cs(t,e){try{console.error(e.value)}catch(t){setTimeout((function(){throw t}))}}var fs="function"==typeof WeakMap?WeakMap:Map;function hs(t,e,n){(n=Mo(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){$u||($u=!0,Uu=r),cs(0,e)},n}function ds(t,e,n){(n=Mo(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){cs(0,e)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){cs(0,e),"function"!=typeof r&&(null===qu?qu=new Set([this]):qu.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function ps(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new fs;var i=new Set;r.set(e,i)}else void 0===(i=r.get(e))&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=kl.bind(null,t,e,n),e.then(t,t))}function gs(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function vs(t,e,n,r,i){return 0==(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=Mo(-1,1)).tag=2,Oo(n,e,1))),n.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}var ms=x.ReactCurrentOwner,ys=!1;function bs(t,e,n,r){e.child=null===t?Qo(e,null,n,r):Xo(e,t.child,n,r)}function ws(t,e,n,r,i){n=n.render;var o=e.ref;return ko(e,i),r=Sa(t,e,n,r,o,i),n=ka(),null===t||ys?(no&&n&&Ji(e),e.flags|=1,bs(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,$s(t,e,i))}function xs(t,e,n,r,i){if(null===t){var o=n.type;return"function"!=typeof o||Nl(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Ml(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=o,Ss(t,e,o,r,i))}if(o=t.child,0==(t.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:ar)(a,r)&&t.ref===e.ref)return $s(t,e,i)}return e.flags|=1,(t=Ll(o,r)).ref=e.ref,t.return=e,e.child=t}function Ss(t,e,n,r,i){if(null!==t){var o=t.memoizedProps;if(ar(o,r)&&t.ref===e.ref){if(ys=!1,e.pendingProps=r=o,0==(t.lanes&i))return e.lanes=t.lanes,$s(t,e,i);0!=(131072&t.flags)&&(ys=!0)}}return Es(t,e,n,r,i)}function ks(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode)if(0==(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},_i(Lu,Nu),Nu|=n;else{if(0==(1073741824&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,_i(Lu,Nu),Nu|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,_i(Lu,Nu),Nu|=r}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,_i(Lu,Nu),Nu|=r;return bs(t,e,i,n),e.child}function _s(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Es(t,e,n,r,i){var o=Ni(n)?Ci:Ai.current;return o=Ti(e,o),ko(e,i),n=Sa(t,e,n,r,o,i),r=ka(),null===t||ys?(no&&r&&Ji(e),e.flags|=1,bs(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,$s(t,e,i))}function As(t,e,n,i,o){if(Ni(n)){var a=!0;Ri(e)}else a=!1;if(ko(e,o),null===e.stateNode)Vs(t,e),$o(e,n,i),qo(e,n,i,o),i=!0;else if(null===t){var s=e.stateNode,u=e.memoizedProps;s.props=u;var l=s.context,c=n.contextType;c="object"===r(c)&&null!==c?_o(c):Ti(e,c=Ni(n)?Ci:Ai.current);var f=n.getDerivedStateFromProps,h="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(u!==i||l!==c)&&Uo(e,s,i,c),To=!1;var d=e.memoizedState;s.state=d,Do(e,i,s,o),l=e.memoizedState,u!==i||d!==l||Pi.current||To?("function"==typeof f&&(Bo(e,n,f,i),l=e.memoizedState),(u=To||Vo(e,n,u,i,d,l,c))?(h||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(e.flags|=4194308)):("function"==typeof s.componentDidMount&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),s.props=i,s.state=l,s.context=c,i=u):("function"==typeof s.componentDidMount&&(e.flags|=4194308),i=!1)}else{s=e.stateNode,Lo(t,e),u=e.memoizedProps,c=e.type===e.elementType?u:go(e.type,u),s.props=c,h=e.pendingProps,d=s.context,l="object"===r(l=n.contextType)&&null!==l?_o(l):Ti(e,l=Ni(n)?Ci:Ai.current);var p=n.getDerivedStateFromProps;(f="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(u!==h||d!==l)&&Uo(e,s,i,l),To=!1,d=e.memoizedState,s.state=d,Do(e,i,s,o);var g=e.memoizedState;u!==h||d!==g||Pi.current||To?("function"==typeof p&&(Bo(e,n,p,i),g=e.memoizedState),(c=To||Vo(e,n,c,i,d,g,l)||!1)?(f||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(i,g,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(i,g,l)),"function"==typeof s.componentDidUpdate&&(e.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof s.componentDidUpdate||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=g),s.props=i,s.state=g,s.context=l,i=c):("function"!=typeof s.componentDidUpdate||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),i=!1)}return Ps(t,e,n,i,a,o)}function Ps(t,e,n,r,i,o){_s(t,e);var a=0!=(128&e.flags);if(!r&&!a)return i&&Fi(e,n,!1),$s(t,e,o);r=e.stateNode,ms.current=e;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=Xo(e,t.child,null,o),e.child=Xo(e,null,s,o)):bs(t,e,s,o),e.memoizedState=r.state,i&&Fi(e,n,!0),e.child}function Cs(t){var e=t.stateNode;e.pendingContext?Mi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&Mi(0,e.context,!1),na(t,e.containerInfo)}function Ts(t,e,n,r,i){return fo(),ho(i),e.flags|=256,bs(t,e,n,r),e.child}var Ns,Ls,Ms,Os={dehydrated:null,treeContext:null,retryLane:0};function Rs(t){return{baseLanes:t,cachePool:null,transitions:null}}function Fs(t,e,n){var r,i=e.pendingProps,o=aa.current,s=!1,u=0!=(128&e.flags);if((r=u)||(r=(null===t||null!==t.memoizedState)&&0!=(2&o)),r?(s=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(o|=1),_i(aa,1&o),null===t)return so(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0==(1&e.mode)?e.lanes=1:"$!"===t.data?e.lanes=8:e.lanes=1073741824,null):(u=i.children,t=i.fallback,s?(i=e.mode,s=e.child,u={mode:"hidden",children:u},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=u):s=Rl(u,i,0,null),t=Ol(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Rs(n),e.memoizedState=Os,t):Ds(e,u));if(null!==(o=t.memoizedState)&&null!==(r=o.dehydrated))return function(t,e,n,r,i,o,s){if(n)return 256&e.flags?(e.flags&=-257,js(t,e,s,r=ls(Error(a(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=Rl({mode:"visible",children:r.children},i,0,null),(o=Ol(o,i,s,null)).flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,0!=(1&e.mode)&&Xo(e,t.child,null,s),e.child.memoizedState=Rs(s),e.memoizedState=Os,o);if(0==(1&e.mode))return js(t,e,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var u=r.dgst;return r=u,js(t,e,s,r=ls(o=Error(a(419)),r,void 0))}if(u=0!=(s&t.childLanes),ys||u){if(null!==(r=Pu)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Co(t,i),tl(r,t,i,-1))}return dl(),js(t,e,s,r=ls(Error(a(421))))}return"$?"===i.data?(e.flags|=128,e.child=t.child,e=El.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,eo=si(i.nextSibling),to=e,no=!0,ro=null,null!==t&&(Hi[Gi++]=Yi,Hi[Gi++]=Xi,Hi[Gi++]=Wi,Yi=t.id,Xi=t.overflow,Wi=e),(e=Ds(e,r.children)).flags|=4096,e)}(t,e,u,i,r,o,n);if(s){s=i.fallback,u=e.mode,r=(o=t.child).sibling;var l={mode:"hidden",children:i.children};return 0==(1&u)&&e.child!==o?((i=e.child).childLanes=0,i.pendingProps=l,e.deletions=null):(i=Ll(o,l)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Ll(r,s):(s=Ol(s,u,n,null)).flags|=2,s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,u=null===(u=t.child.memoizedState)?Rs(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},s.memoizedState=u,s.childLanes=t.childLanes&~n,e.memoizedState=Os,i}return t=(s=t.child).sibling,i=Ll(s,{mode:"visible",children:i.children}),0==(1&e.mode)&&(i.lanes=n),i.return=e,i.sibling=null,null!==t&&(null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function Ds(t,e){return(e=Rl({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function js(t,e,n,r){return null!==r&&ho(r),Xo(e,t.child,null,n),(t=Ds(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function Is(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),So(t.return,e,n)}function Bs(t,e,n,r,i){var o=t.memoizedState;null===o?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function zs(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(bs(t,e,r.children,n),0!=(2&(r=aa.current)))r=1&r|2,e.flags|=128;else{if(null!==t&&0!=(128&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Is(t,n,e);else if(19===t.tag)Is(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(_i(aa,r),0==(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===sa(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Bs(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===sa(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Bs(e,!0,n,null,o);break;case"together":Bs(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Vs(t,e){0==(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function $s(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),Ru|=e.lanes,0==(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=Ll(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Ll(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function Us(t,e){if(!no)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function qs(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=t,i=i.sibling;else for(i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Hs(t,e,n){var r=e.pendingProps;switch(Zi(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(e),null;case 1:return Ni(e.type)&&Li(),qs(e),null;case 3:return r=e.stateNode,ra(),ki(Pi),ki(Ai),la(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(lo(e)?e.flags|=4:null===t||t.memoizedState.isDehydrated&&0==(256&e.flags)||(e.flags|=1024,null!==ro&&(il(ro),ro=null))),qs(e),null;case 5:oa(e);var i=ea(ta.current);if(n=e.type,null!==t&&null!=e.stateNode)Ls(t,e,n,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(null===e.stateNode)throw Error(a(166));return qs(e),null}if(t=ea(Jo.current),lo(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[ci]=e,r[fi]=o,t=0!=(1&e.mode),n){case"dialog":jr("cancel",r),jr("close",r);break;case"iframe":case"object":case"embed":jr("load",r);break;case"video":case"audio":for(i=0;i<Or.length;i++)jr(Or[i],r);break;case"source":jr("error",r);break;case"img":case"image":case"link":jr("error",r),jr("load",r);break;case"details":jr("toggle",r);break;case"input":K(r,o),jr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},jr("invalid",r);break;case"textarea":ot(r,o),jr("invalid",r)}for(var s in bt(n,o),i=null,o)if(o.hasOwnProperty(s)){var l=o[s];"children"===s?"string"==typeof l?r.textContent!==l&&(!0!==o.suppressHydrationWarning&&Qr(r.textContent,l,t),i=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(!0!==o.suppressHydrationWarning&&Qr(r.textContent,l,t),i=["children",""+l]):u.hasOwnProperty(s)&&null!=l&&"onScroll"===s&&jr("scroll",r)}switch(n){case"input":W(r),tt(r,o,!0);break;case"textarea":W(r),st(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Kr)}r=i,e.updateQueue=r,null!==r&&(e.flags|=4)}else{s=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===t&&(t=ut(n)),"http://www.w3.org/1999/xhtml"===t?"script"===n?((t=s.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"==typeof r.is?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),"select"===n&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[ci]=e,t[fi]=r,Ns(t,e),e.stateNode=t;t:{switch(s=wt(n,r),n){case"dialog":jr("cancel",t),jr("close",t),i=r;break;case"iframe":case"object":case"embed":jr("load",t),i=r;break;case"video":case"audio":for(i=0;i<Or.length;i++)jr(Or[i],t);i=r;break;case"source":jr("error",t),i=r;break;case"img":case"image":case"link":jr("error",t),jr("load",t),i=r;break;case"details":jr("toggle",t),i=r;break;case"input":K(t,r),i=Q(t,r),jr("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=I({},r,{value:void 0}),jr("invalid",t);break;case"textarea":ot(t,r),i=it(t,r),jr("invalid",t);break;default:i=r}for(o in bt(n,i),l=i)if(l.hasOwnProperty(o)){var c=l[o];"style"===o?mt(t,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&ht(t,c):"children"===o?"string"==typeof c?("textarea"!==n||""!==c)&&dt(t,c):"number"==typeof c&&dt(t,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(u.hasOwnProperty(o)?null!=c&&"onScroll"===o&&jr("scroll",t):null!=c&&w(t,o,c,s))}switch(n){case"input":W(t),tt(t,r,!1);break;case"textarea":W(t),st(t);break;case"option":null!=r.value&&t.setAttribute("value",""+H(r.value));break;case"select":t.multiple=!!r.multiple,null!=(o=r.value)?rt(t,!!r.multiple,o,!1):null!=r.defaultValue&&rt(t,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(t.onclick=Kr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break t;case"img":r=!0;break t;default:r=!1}}r&&(e.flags|=4)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return qs(e),null;case 6:if(t&&null!=e.stateNode)Ms(0,e,t.memoizedProps,r);else{if("string"!=typeof r&&null===e.stateNode)throw Error(a(166));if(n=ea(ta.current),ea(Jo.current),lo(e)){if(r=e.stateNode,n=e.memoizedProps,r[ci]=e,(o=r.nodeValue!==n)&&null!==(t=to))switch(t.tag){case 3:Qr(r.nodeValue,n,0!=(1&t.mode));break;case 5:!0!==t.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!=(1&t.mode))}o&&(e.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ci]=e,e.stateNode=r}return qs(e),null;case 13:if(ki(aa),r=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(no&&null!==eo&&0!=(1&e.mode)&&0==(128&e.flags))co(),fo(),e.flags|=98560,o=!1;else if(o=lo(e),null!==r&&null!==r.dehydrated){if(null===t){if(!o)throw Error(a(318));if(!(o=null!==(o=e.memoizedState)?o.dehydrated:null))throw Error(a(317));o[ci]=e}else fo(),0==(128&e.flags)&&(e.memoizedState=null),e.flags|=4;qs(e),o=!1}else null!==ro&&(il(ro),ro=null),o=!0;if(!o)return 65536&e.flags?e:null}return 0!=(128&e.flags)?(e.lanes=n,e):((r=null!==r)!=(null!==t&&null!==t.memoizedState)&&r&&(e.child.flags|=8192,0!=(1&e.mode)&&(null===t||0!=(1&aa.current)?0===Mu&&(Mu=3):dl())),null!==e.updateQueue&&(e.flags|=4),qs(e),null);case 4:return ra(),null===t&&zr(e.stateNode.containerInfo),qs(e),null;case 10:return xo(e.type._context),qs(e),null;case 17:return Ni(e.type)&&Li(),qs(e),null;case 19:if(ki(aa),null===(o=e.memoizedState))return qs(e),null;if(r=0!=(128&e.flags),null===(s=o.rendering))if(r)Us(o,!1);else{if(0!==Mu||null!==t&&0!=(128&t.flags))for(t=e.child;null!==t;){if(null!==(s=sa(t))){for(e.flags|=128,Us(o,!1),null!==(r=s.updateQueue)&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;null!==n;)t=r,(o=n).flags&=14680066,null===(s=o.alternate)?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,t=s.dependencies,o.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return _i(aa,1&aa.current|2),e.child}t=t.sibling}null!==o.tail&&Jt()>zu&&(e.flags|=128,r=!0,Us(o,!1),e.lanes=4194304)}else{if(!r)if(null!==(t=sa(s))){if(e.flags|=128,r=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),Us(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!no)return qs(e),null}else 2*Jt()-o.renderingStartTime>zu&&1073741824!==n&&(e.flags|=128,r=!0,Us(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(null!==(n=o.last)?n.sibling=s:e.child=s,o.last=s)}return null!==o.tail?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Jt(),e.sibling=null,n=aa.current,_i(aa,r?1&n|2:1&n),e):(qs(e),null);case 22:case 23:return ll(),r=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==r&&(e.flags|=8192),r&&0!=(1&e.mode)?0!=(1073741824&Nu)&&(qs(e),6&e.subtreeFlags&&(e.flags|=8192)):qs(e),null;case 24:case 25:return null}throw Error(a(156,e.tag))}function Gs(t,e){switch(Zi(e),e.tag){case 1:return Ni(e.type)&&Li(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return ra(),ki(Pi),ki(Ai),la(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return oa(e),null;case 13:if(ki(aa),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(a(340));fo()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return ki(aa),null;case 4:return ra(),null;case 10:return xo(e.type._context),null;case 22:case 23:return ll(),null;case 24:default:return null}}Ns=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ls=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,ea(Jo.current);var o,a=null;switch(n){case"input":i=Q(t,i),r=Q(t,r),a=[];break;case"select":i=I({},i,{value:void 0}),r=I({},r,{value:void 0}),a=[];break;case"textarea":i=it(t,i),r=it(t,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(t.onclick=Kr)}for(c in bt(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(u.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(u.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&jr("scroll",t),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(e.updateQueue=c)&&(e.flags|=4)}},Ms=function(t,e,n,r){n!==r&&(e.flags|=4)};var Ws=!1,Ys=!1,Xs="function"==typeof WeakSet?WeakSet:Set,Qs=null;function Ks(t,e){var n=t.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sl(t,e,n)}else n.current=null}function Js(t,e,n){try{n()}catch(n){Sl(t,e,n)}}var Zs=!1;function tu(t,e,n){var r=e.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,void 0!==o&&Js(e,n,o)}i=i.next}while(i!==r)}}function eu(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function nu(t){var e=t.ref;if(null!==e){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}"function"==typeof e?e(t):e.current=t}}function ru(t){var e=t.alternate;null!==e&&(t.alternate=null,ru(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(e=t.stateNode)&&(delete e[ci],delete e[fi],delete e[di],delete e[pi],delete e[gi]),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function iu(t){return 5===t.tag||3===t.tag||4===t.tag}function ou(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||iu(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function au(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!=(n=n._reactRootContainer)||null!==e.onclick||(e.onclick=Kr));else if(4!==r&&null!==(t=t.child))for(au(t,e,n),t=t.sibling;null!==t;)au(t,e,n),t=t.sibling}function su(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(su(t,e,n),t=t.sibling;null!==t;)su(t,e,n),t=t.sibling}var uu=null,lu=!1;function cu(t,e,n){for(n=n.child;null!==n;)fu(t,e,n),n=n.sibling}function fu(t,e,n){if(ae&&"function"==typeof ae.onCommitFiberUnmount)try{ae.onCommitFiberUnmount(oe,n)}catch(t){}switch(n.tag){case 5:Ys||Ks(n,e);case 6:var r=uu,i=lu;uu=null,cu(t,e,n),lu=i,null!==(uu=r)&&(lu?(t=uu,n=n.stateNode,8===t.nodeType?t.parentNode.removeChild(n):t.removeChild(n)):uu.removeChild(n.stateNode));break;case 18:null!==uu&&(lu?(t=uu,n=n.stateNode,8===t.nodeType?ai(t.parentNode,n):1===t.nodeType&&ai(t,n),Ue(t)):ai(uu,n.stateNode));break;case 4:r=uu,i=lu,uu=n.stateNode.containerInfo,lu=!0,cu(t,e,n),uu=r,lu=i;break;case 0:case 11:case 14:case 15:if(!Ys&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&Js(n,e,a),i=i.next}while(i!==r)}cu(t,e,n);break;case 1:if(!Ys&&(Ks(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){Sl(n,e,t)}cu(t,e,n);break;case 21:cu(t,e,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,cu(t,e,n),Ys=r):cu(t,e,n);break;default:cu(t,e,n)}}function hu(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new Xs),e.forEach((function(e){var r=Al.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}function du(t,e){var n=e.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=t,s=e,u=s;t:for(;null!==u;){switch(u.tag){case 5:uu=u.stateNode,lu=!1;break t;case 3:case 4:uu=u.stateNode.containerInfo,lu=!0;break t}u=u.return}if(null===uu)throw Error(a(160));fu(o,s,i),uu=null,lu=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(t){Sl(i,e,t)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)pu(e,t),e=e.sibling}function pu(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(du(e,t),gu(t),4&r){try{tu(3,t,t.return),eu(3,t)}catch(e){Sl(t,t.return,e)}try{tu(5,t,t.return)}catch(e){Sl(t,t.return,e)}}break;case 1:du(e,t),gu(t),512&r&&null!==n&&Ks(n,n.return);break;case 5:if(du(e,t),gu(t),512&r&&null!==n&&Ks(n,n.return),32&t.flags){var i=t.stateNode;try{dt(i,"")}catch(e){Sl(t,t.return,e)}}if(4&r&&null!=(i=t.stateNode)){var o=t.memoizedProps,s=null!==n?n.memoizedProps:o,u=t.type,l=t.updateQueue;if(t.updateQueue=null,null!==l)try{"input"===u&&"radio"===o.type&&null!=o.name&&J(i,o),wt(u,s);var c=wt(u,o);for(s=0;s<l.length;s+=2){var f=l[s],h=l[s+1];"style"===f?mt(i,h):"dangerouslySetInnerHTML"===f?ht(i,h):"children"===f?dt(i,h):w(i,f,h,c)}switch(u){case"input":Z(i,o);break;case"textarea":at(i,o);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?rt(i,!!o.multiple,p,!1):d!==!!o.multiple&&(null!=o.defaultValue?rt(i,!!o.multiple,o.defaultValue,!0):rt(i,!!o.multiple,o.multiple?[]:"",!1))}i[fi]=o}catch(e){Sl(t,t.return,e)}}break;case 6:if(du(e,t),gu(t),4&r){if(null===t.stateNode)throw Error(a(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(e){Sl(t,t.return,e)}}break;case 3:if(du(e,t),gu(t),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ue(e.containerInfo)}catch(e){Sl(t,t.return,e)}break;case 4:du(e,t),gu(t);break;case 13:du(e,t),gu(t),8192&(i=t.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Bu=Jt())),4&r&&hu(t);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&t.mode?(Ys=(c=Ys)||f,du(e,t),Ys=c):du(e,t),gu(t),8192&r){if(c=null!==t.memoizedState,(t.stateNode.isHidden=c)&&!f&&0!=(1&t.mode))for(Qs=t,f=t.child;null!==f;){for(h=Qs=f;null!==Qs;){switch(p=(d=Qs).child,d.tag){case 0:case 11:case 14:case 15:tu(4,d,d.return);break;case 1:Ks(d,d.return);var g=d.stateNode;if("function"==typeof g.componentWillUnmount){r=d,n=d.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(t){Sl(r,n,t)}}break;case 5:Ks(d,d.return);break;case 22:if(null!==d.memoizedState){bu(h);continue}}null!==p?(p.return=d,Qs=p):bu(h)}f=f.sibling}t:for(f=null,h=t;;){if(5===h.tag){if(null===f){f=h;try{i=h.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(u=h.stateNode,s=null!=(l=h.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,u.style.display=vt("display",s))}catch(e){Sl(t,t.return,e)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(e){Sl(t,t.return,e)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===t)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===t)break t;for(;null===h.sibling;){if(null===h.return||h.return===t)break t;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:du(e,t),gu(t),4&r&&hu(t);break;case 21:break;default:du(e,t),gu(t)}}function gu(t){var e=t.flags;if(2&e){try{t:{for(var n=t.return;null!==n;){if(iu(n)){var r=n;break t}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(dt(i,""),r.flags&=-33),su(t,ou(t),i);break;case 3:case 4:var o=r.stateNode.containerInfo;au(t,ou(t),o);break;default:throw Error(a(161))}}catch(e){Sl(t,t.return,e)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function vu(t,e,n){Qs=t,mu(t,e,n)}function mu(t,e,n){for(var r=0!=(1&t.mode);null!==Qs;){var i=Qs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Ws;if(!a){var s=i.alternate,u=null!==s&&null!==s.memoizedState||Ys;s=Ws;var l=Ys;if(Ws=a,(Ys=u)&&!l)for(Qs=i;null!==Qs;)u=(a=Qs).child,22===a.tag&&null!==a.memoizedState?wu(i):null!==u?(u.return=a,Qs=u):wu(i);for(;null!==o;)Qs=o,mu(o,e,n),o=o.sibling;Qs=i,Ws=s,Ys=l}yu(t)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Qs=o):yu(t)}}function yu(t){for(;null!==Qs;){var e=Qs;if(0!=(8772&e.flags)){var n=e.alternate;try{if(0!=(8772&e.flags))switch(e.tag){case 0:case 11:case 15:Ys||eu(5,e);break;case 1:var r=e.stateNode;if(4&e.flags&&!Ys)if(null===n)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:go(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;null!==o&&jo(e,o,r);break;case 3:var s=e.updateQueue;if(null!==s){if(n=null,null!==e.child)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}jo(e,s,n)}break;case 5:var u=e.stateNode;if(null===n&&4&e.flags){n=u;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:break;case 13:if(null===e.memoizedState){var c=e.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&Ue(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}Ys||512&e.flags&&nu(e)}catch(t){Sl(e,e.return,t)}}if(e===t){Qs=null;break}if(null!==(n=e.sibling)){n.return=e.return,Qs=n;break}Qs=e.return}}function bu(t){for(;null!==Qs;){var e=Qs;if(e===t){Qs=null;break}var n=e.sibling;if(null!==n){n.return=e.return,Qs=n;break}Qs=e.return}}function wu(t){for(;null!==Qs;){var e=Qs;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{eu(4,e)}catch(t){Sl(e,n,t)}break;case 1:var r=e.stateNode;if("function"==typeof r.componentDidMount){var i=e.return;try{r.componentDidMount()}catch(t){Sl(e,i,t)}}var o=e.return;try{nu(e)}catch(t){Sl(e,o,t)}break;case 5:var a=e.return;try{nu(e)}catch(t){Sl(e,a,t)}}}catch(t){Sl(e,e.return,t)}if(e===t){Qs=null;break}var s=e.sibling;if(null!==s){s.return=e.return,Qs=s;break}Qs=e.return}}var xu,Su=Math.ceil,ku=x.ReactCurrentDispatcher,_u=x.ReactCurrentOwner,Eu=x.ReactCurrentBatchConfig,Au=0,Pu=null,Cu=null,Tu=0,Nu=0,Lu=Si(0),Mu=0,Ou=null,Ru=0,Fu=0,Du=0,ju=null,Iu=null,Bu=0,zu=1/0,Vu=null,$u=!1,Uu=null,qu=null,Hu=!1,Gu=null,Wu=0,Yu=0,Xu=null,Qu=-1,Ku=0;function Ju(){return 0!=(6&Au)?Jt():-1!==Qu?Qu:Qu=Jt()}function Zu(t){return 0==(1&t.mode)?1:0!=(2&Au)&&0!==Tu?Tu&-Tu:null!==po.transition?(0===Ku&&(Ku=ve()),Ku):0!==(t=we)?t:t=void 0===(t=window.event)?16:Ke(t.type)}function tl(t,e,n,r){if(50<Yu)throw Yu=0,Xu=null,Error(a(185));ye(t,n,r),0!=(2&Au)&&t===Pu||(t===Pu&&(0==(2&Au)&&(Fu|=n),4===Mu&&ol(t,Tu)),el(t,r),1===n&&0===Au&&0==(1&e.mode)&&(zu=Jt()+500,ji&&zi()))}function el(t,e){var n=t.callbackNode;!function(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var a=31-se(o),s=1<<a,u=i[a];-1===u?0!=(s&n)&&0==(s&r)||(i[a]=pe(s,e)):u<=e&&(t.expiredLanes|=s),o&=~s}}(t,e);var r=de(t,t===Pu?Tu:0);if(0===r)null!==n&&Xt(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(null!=n&&Xt(n),1===e)0===t.tag?function(t){ji=!0,Bi(t)}(al.bind(null,t)):Bi(al.bind(null,t)),ii((function(){0==(6&Au)&&zi()})),n=null;else{switch(xe(r)){case 1:n=te;break;case 4:n=ee;break;case 16:n=ne;break;case 536870912:n=ie;break;default:n=ne}n=Pl(n,nl.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function nl(t,e){if(Qu=-1,Ku=0,0!=(6&Au))throw Error(a(327));var n=t.callbackNode;if(wl()&&t.callbackNode!==n)return null;var r=de(t,t===Pu?Tu:0);if(0===r)return null;if(0!=(30&r)||0!=(r&t.expiredLanes)||e)e=pl(t,r);else{e=r;var i=Au;Au|=2;var o=hl();for(Pu===t&&Tu===e||(Vu=null,zu=Jt()+500,cl(t,e));;)try{vl();break}catch(e){fl(t,e)}wo(),ku.current=o,Au=i,null!==Cu?e=0:(Pu=null,Tu=0,e=Mu)}if(0!==e){if(2===e&&0!==(i=ge(t))&&(r=i,e=rl(t,i)),1===e)throw n=Ou,cl(t,0),ol(t,r),el(t,Jt()),n;if(6===e)ol(t,r);else{if(i=t.current.alternate,0==(30&r)&&!function(t){for(var e=t;;){if(16384&e.flags){var n=e.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!or(o(),i))return!1}catch(t){return!1}}}if(n=e.child,16384&e.subtreeFlags&&null!==n)n.return=e,e=n;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}(i)&&(2===(e=pl(t,r))&&0!==(o=ge(t))&&(r=o,e=rl(t,o)),1===e))throw n=Ou,cl(t,0),ol(t,r),el(t,Jt()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(a(345));case 2:bl(t,Iu,Vu);break;case 3:if(ol(t,r),(130023424&r)===r&&10<(e=Bu+500-Jt())){if(0!==de(t,0))break;if(((i=t.suspendedLanes)&r)!==r){Ju(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=ei(bl.bind(null,t,Iu,Vu),e);break}bl(t,Iu,Vu);break;case 4:if(ol(t,r),(4194240&r)===r)break;for(e=t.eventTimes,i=-1;0<r;){var s=31-se(r);o=1<<s,(s=e[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Jt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Su(r/1960))-r)){t.timeoutHandle=ei(bl.bind(null,t,Iu,Vu),r);break}bl(t,Iu,Vu);break;case 5:bl(t,Iu,Vu);break;default:throw Error(a(329))}}}return el(t,Jt()),t.callbackNode===n?nl.bind(null,t):null}function rl(t,e){var n=ju;return t.current.memoizedState.isDehydrated&&(cl(t,e).flags|=256),2!==(t=pl(t,e))&&(e=Iu,Iu=n,null!==e&&il(e)),t}function il(t){null===Iu?Iu=t:Iu.push.apply(Iu,t)}function ol(t,e){for(e&=~Du,e&=~Fu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-se(e),r=1<<n;t[n]=-1,e&=~r}}function al(t){if(0!=(6&Au))throw Error(a(327));wl();var e=de(t,0);if(0==(1&e))return el(t,Jt()),null;var n=pl(t,e);if(0!==t.tag&&2===n){var r=ge(t);0!==r&&(e=r,n=rl(t,r))}if(1===n)throw n=Ou,cl(t,0),ol(t,e),el(t,Jt()),n;if(6===n)throw Error(a(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,bl(t,Iu,Vu),el(t,Jt()),null}function sl(t,e){var n=Au;Au|=1;try{return t(e)}finally{0===(Au=n)&&(zu=Jt()+500,ji&&zi())}}function ul(t){null!==Gu&&0===Gu.tag&&0==(6&Au)&&wl();var e=Au;Au|=1;var n=Eu.transition,r=we;try{if(Eu.transition=null,we=1,t)return t()}finally{we=r,Eu.transition=n,0==(6&(Au=e))&&zi()}}function ll(){Nu=Lu.current,ki(Lu)}function cl(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,ni(n)),null!==Cu)for(n=Cu.return;null!==n;){var r=n;switch(Zi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Li();break;case 3:ra(),ki(Pi),ki(Ai),la();break;case 5:oa(r);break;case 4:ra();break;case 13:case 19:ki(aa);break;case 10:xo(r.type._context);break;case 22:case 23:ll()}n=n.return}if(Pu=t,Cu=t=Ll(t.current,null),Tu=Nu=e,Mu=0,Ou=null,Du=Fu=Ru=0,Iu=ju=null,null!==Eo){for(e=0;e<Eo.length;e++)if(null!==(r=(n=Eo[e]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Eo=null}return t}function fl(t,e){for(;;){var n=Cu;try{if(wo(),ca.current=is,va){for(var i=da.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}va=!1}if(ha=0,ga=pa=da=null,ma=!1,ya=0,_u.current=null,null===n||null===n.return){Mu=1,Ou=e,Cu=null;break}t:{var s=t,u=n.return,l=n,c=e;if(e=Tu,l.flags|=32768,null!==c&&"object"===r(c)&&"function"==typeof c.then){var f=c,h=l,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var g=gs(u);if(null!==g){g.flags&=-257,vs(g,u,l,0,e),1&g.mode&&ps(s,f,e),c=f;var v=(e=g).updateQueue;if(null===v){var m=new Set;m.add(c),e.updateQueue=m}else v.add(c);break t}if(0==(1&e)){ps(s,f,e),dl();break t}c=Error(a(426))}else if(no&&1&l.mode){var y=gs(u);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),vs(y,u,l,0,e),ho(us(c,l));break t}}s=c=us(c,l),4!==Mu&&(Mu=2),null===ju?ju=[s]:ju.push(s),s=u;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e,Fo(s,hs(0,c,e));break t;case 1:l=c;var b=s.type,w=s.stateNode;if(0==(128&s.flags)&&("function"==typeof b.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===qu||!qu.has(w)))){s.flags|=65536,e&=-e,s.lanes|=e,Fo(s,ds(s,l,e));break t}}s=s.return}while(null!==s)}yl(n)}catch(t){e=t,Cu===n&&null!==n&&(Cu=n=n.return);continue}break}}function hl(){var t=ku.current;return ku.current=is,null===t?is:t}function dl(){0!==Mu&&3!==Mu&&2!==Mu||(Mu=4),null===Pu||0==(268435455&Ru)&&0==(268435455&Fu)||ol(Pu,Tu)}function pl(t,e){var n=Au;Au|=2;var r=hl();for(Pu===t&&Tu===e||(Vu=null,cl(t,e));;)try{gl();break}catch(e){fl(t,e)}if(wo(),Au=n,ku.current=r,null!==Cu)throw Error(a(261));return Pu=null,Tu=0,Mu}function gl(){for(;null!==Cu;)ml(Cu)}function vl(){for(;null!==Cu&&!Qt();)ml(Cu)}function ml(t){var e=xu(t.alternate,t,Nu);t.memoizedProps=t.pendingProps,null===e?yl(t):Cu=e,_u.current=null}function yl(t){var e=t;do{var n=e.alternate;if(t=e.return,0==(32768&e.flags)){if(null!==(n=Hs(n,e,Nu)))return void(Cu=n)}else{if(null!==(n=Gs(n,e)))return n.flags&=32767,void(Cu=n);if(null===t)return Mu=6,void(Cu=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}if(null!==(e=e.sibling))return void(Cu=e);Cu=e=t}while(null!==e);0===Mu&&(Mu=5)}function bl(t,e,n){var r=we,i=Eu.transition;try{Eu.transition=null,we=1,function(t,e,n,r){do{wl()}while(null!==Gu);if(0!=(6&Au))throw Error(a(327));n=t.finishedWork;var i=t.finishedLanes;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(a(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-se(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}(t,o),t===Pu&&(Cu=Pu=null,Tu=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Hu||(Hu=!0,Pl(ne,(function(){return wl(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=Eu.transition,Eu.transition=null;var s=we;we=1;var u=Au;Au|=4,_u.current=null,function(t,e){if(Jr=He,fr(t=cr())){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{var r=(n=(n=t.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(t){n=null;break t}var s=0,u=-1,l=-1,c=0,f=0,h=t,d=null;e:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(u=s+i),h!==o||0!==r&&3!==h.nodeType||(l=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===t)break e;if(d===n&&++c===i&&(u=s),d===o&&++f===r&&(l=s),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===u||-1===l?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zr={focusedElem:t,selectionRange:n},He=!1,Qs=e;null!==Qs;)if(t=(e=Qs).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,Qs=t;else for(;null!==Qs;){e=Qs;try{var g=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:break;case 1:if(null!==g){var v=g.memoizedProps,m=g.memoizedState,y=e.stateNode,b=y.getSnapshotBeforeUpdate(e.elementType===e.type?v:go(e.type,v),m);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=e.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(t){Sl(e,e.return,t)}if(null!==(t=e.sibling)){t.return=e.return,Qs=t;break}Qs=e.return}g=Zs,Zs=!1}(t,n),pu(n,t),hr(Zr),He=!!Jr,Zr=Jr=null,t.current=n,vu(n,t,i),Kt(),Au=u,we=s,Eu.transition=o}else t.current=n;if(Hu&&(Hu=!1,Gu=t,Wu=i),0===(o=t.pendingLanes)&&(qu=null),function(t){if(ae&&"function"==typeof ae.onCommitFiberRoot)try{ae.onCommitFiberRoot(oe,t,void 0,128==(128&t.current.flags))}catch(t){}}(n.stateNode),el(t,Jt()),null!==e)for(r=t.onRecoverableError,n=0;n<e.length;n++)r((i=e[n]).value,{componentStack:i.stack,digest:i.digest});if($u)throw $u=!1,t=Uu,Uu=null,t;0!=(1&Wu)&&0!==t.tag&&wl(),0!=(1&(o=t.pendingLanes))?t===Xu?Yu++:(Yu=0,Xu=t):Yu=0,zi()}(t,e,n,r)}finally{Eu.transition=i,we=r}return null}function wl(){if(null!==Gu){var t=xe(Wu),e=Eu.transition,n=we;try{if(Eu.transition=null,we=16>t?16:t,null===Gu)var r=!1;else{if(t=Gu,Gu=null,Wu=0,0!=(6&Au))throw Error(a(331));var i=Au;for(Au|=4,Qs=t.current;null!==Qs;){var o=Qs,s=o.child;if(0!=(16&Qs.flags)){var u=o.deletions;if(null!==u){for(var l=0;l<u.length;l++){var c=u[l];for(Qs=c;null!==Qs;){var f=Qs;switch(f.tag){case 0:case 11:case 15:tu(8,f,o)}var h=f.child;if(null!==h)h.return=f,Qs=h;else for(;null!==Qs;){var d=(f=Qs).sibling,p=f.return;if(ru(f),f===c){Qs=null;break}if(null!==d){d.return=p,Qs=d;break}Qs=p}}}var g=o.alternate;if(null!==g){var v=g.child;if(null!==v){g.child=null;do{var m=v.sibling;v.sibling=null,v=m}while(null!==v)}}Qs=o}}if(0!=(2064&o.subtreeFlags)&&null!==s)s.return=o,Qs=s;else t:for(;null!==Qs;){if(0!=(2048&(o=Qs).flags))switch(o.tag){case 0:case 11:case 15:tu(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,Qs=y;break t}Qs=o.return}}var b=t.current;for(Qs=b;null!==Qs;){var w=(s=Qs).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,Qs=w;else t:for(s=b;null!==Qs;){if(0!=(2048&(u=Qs).flags))try{switch(u.tag){case 0:case 11:case 15:eu(9,u)}}catch(t){Sl(u,u.return,t)}if(u===s){Qs=null;break t}var x=u.sibling;if(null!==x){x.return=u.return,Qs=x;break t}Qs=u.return}}if(Au=i,zi(),ae&&"function"==typeof ae.onPostCommitFiberRoot)try{ae.onPostCommitFiberRoot(oe,t)}catch(t){}r=!0}return r}finally{we=n,Eu.transition=e}}return!1}function xl(t,e,n){t=Oo(t,e=hs(0,e=us(n,e),1),1),e=Ju(),null!==t&&(ye(t,1,e),el(t,e))}function Sl(t,e,n){if(3===t.tag)xl(t,t,n);else for(;null!==e;){if(3===e.tag){xl(e,t,n);break}if(1===e.tag){var r=e.stateNode;if("function"==typeof e.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===qu||!qu.has(r))){e=Oo(e,t=ds(e,t=us(n,t),1),1),t=Ju(),null!==e&&(ye(e,1,t),el(e,t));break}}e=e.return}}function kl(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=Ju(),t.pingedLanes|=t.suspendedLanes&n,Pu===t&&(Tu&n)===n&&(4===Mu||3===Mu&&(130023424&Tu)===Tu&&500>Jt()-Bu?cl(t,0):Du|=n),el(t,e)}function _l(t,e){0===e&&(0==(1&t.mode)?e=1:(e=fe,0==(130023424&(fe<<=1))&&(fe=4194304)));var n=Ju();null!==(t=Co(t,e))&&(ye(t,e,n),el(t,n))}function El(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),_l(t,n)}function Al(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(e),_l(t,n)}function Pl(t,e){return Yt(t,e)}function Cl(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tl(t,e,n,r){return new Cl(t,e,n,r)}function Nl(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Ll(t,e){var n=t.alternate;return null===n?((n=Tl(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&t.flags,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ml(t,e,n,i,o,s){var u=2;if(i=t,"function"==typeof t)Nl(t)&&(u=1);else if("string"==typeof t)u=5;else t:switch(t){case _:return Ol(n.children,o,s,e);case E:u=8,o|=8;break;case A:return(t=Tl(12,n,e,2|o)).elementType=A,t.lanes=s,t;case N:return(t=Tl(13,n,e,o)).elementType=N,t.lanes=s,t;case L:return(t=Tl(19,n,e,o)).elementType=L,t.lanes=s,t;case R:return Rl(n,o,s,e);default:if("object"===r(t)&&null!==t)switch(t.$$typeof){case P:u=10;break t;case C:u=9;break t;case T:u=11;break t;case M:u=14;break t;case O:u=16,i=null;break t}throw Error(a(130,null==t?t:r(t),""))}return(e=Tl(u,n,e,o)).elementType=t,e.type=i,e.lanes=s,e}function Ol(t,e,n,r){return(t=Tl(7,t,r,e)).lanes=n,t}function Rl(t,e,n,r){return(t=Tl(22,t,r,e)).elementType=R,t.lanes=n,t.stateNode={isHidden:!1},t}function Fl(t,e,n){return(t=Tl(6,t,null,e)).lanes=n,t}function Dl(t,e,n){return(e=Tl(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function jl(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=me(0),this.expirationTimes=me(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=me(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Il(t,e,n,r,i,o,a,s,u){return t=new jl(t,e,n,s,u),1===e?(e=1,!0===o&&(e|=8)):e=0,o=Tl(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},No(o),t}function Bl(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function zl(t){if(!t)return Ei;t:{if(Ut(t=t._reactInternals)!==t||1!==t.tag)throw Error(a(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break t;case 1:if(Ni(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);throw Error(a(171))}if(1===t.tag){var n=t.type;if(Ni(n))return Oi(t,n,e)}return e}function Vl(t,e,n,r,i,o,a,s,u){return(t=Il(n,r,!0,t,0,o,0,s,u)).context=zl(null),n=t.current,(o=Mo(r=Ju(),i=Zu(n))).callback=null!=e?e:null,Oo(n,o,i),t.current.lanes=i,ye(t,i,r),el(t,r),t}function $l(t,e,n,r){var i=e.current,o=Ju(),a=Zu(i);return n=zl(n),null===e.context?e.context=n:e.pendingContext=n,(e=Mo(o,a)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),null!==(t=Oo(i,e,a))&&(tl(t,i,a,o),Ro(t,i,a)),a}function Ul(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function ql(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function Hl(t,e){ql(t,e),(t=t.alternate)&&ql(t,e)}xu=function(t,e,n){if(null!==t)if(t.memoizedProps!==e.pendingProps||Pi.current)ys=!0;else{if(0==(t.lanes&n)&&0==(128&e.flags))return ys=!1,function(t,e,n){switch(e.tag){case 3:Cs(e),fo();break;case 5:ia(e);break;case 1:Ni(e.type)&&Ri(e);break;case 4:na(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;_i(vo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=e.memoizedState))return null!==r.dehydrated?(_i(aa,1&aa.current),e.flags|=128,null):0!=(n&e.child.childLanes)?Fs(t,e,n):(_i(aa,1&aa.current),null!==(t=$s(t,e,n))?t.sibling:null);_i(aa,1&aa.current);break;case 19:if(r=0!=(n&e.childLanes),0!=(128&t.flags)){if(r)return zs(t,e,n);e.flags|=128}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),_i(aa,aa.current),r)break;return null;case 22:case 23:return e.lanes=0,ks(t,e,n)}return $s(t,e,n)}(t,e,n);ys=0!=(131072&t.flags)}else ys=!1,no&&0!=(1048576&e.flags)&&Ki(e,qi,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Vs(t,e),t=e.pendingProps;var o=Ti(e,Ai.current);ko(e,n),o=Sa(null,e,i,t,o,n);var s=ka();return e.flags|=1,"object"===r(o)&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ni(i)?(s=!0,Ri(e)):s=!1,e.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,No(e),o.updater=zo,e.stateNode=o,o._reactInternals=e,qo(e,i,t,n),e=Ps(null,e,i,!0,s,n)):(e.tag=0,no&&s&&Ji(e),bs(null,e,o,n),e=e.child),e;case 16:i=e.elementType;t:{switch(Vs(t,e),t=e.pendingProps,i=(o=i._init)(i._payload),e.type=i,o=e.tag=function(t){if("function"==typeof t)return Nl(t)?1:0;if(null!=t){if((t=t.$$typeof)===T)return 11;if(t===M)return 14}return 2}(i),t=go(i,t),o){case 0:e=Es(null,e,i,t,n);break t;case 1:e=As(null,e,i,t,n);break t;case 11:e=ws(null,e,i,t,n);break t;case 14:e=xs(null,e,i,go(i.type,t),n);break t}throw Error(a(306,i,""))}return e;case 0:return i=e.type,o=e.pendingProps,Es(t,e,i,o=e.elementType===i?o:go(i,o),n);case 1:return i=e.type,o=e.pendingProps,As(t,e,i,o=e.elementType===i?o:go(i,o),n);case 3:t:{if(Cs(e),null===t)throw Error(a(387));i=e.pendingProps,o=(s=e.memoizedState).element,Lo(t,e),Do(e,i,null,n);var u=e.memoizedState;if(i=u.element,s.isDehydrated){if(s={element:i,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},e.updateQueue.baseState=s,e.memoizedState=s,256&e.flags){e=Ts(t,e,i,n,o=us(Error(a(423)),e));break t}if(i!==o){e=Ts(t,e,i,n,o=us(Error(a(424)),e));break t}for(eo=si(e.stateNode.containerInfo.firstChild),to=e,no=!0,ro=null,n=Qo(e,null,i,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),i===o){e=$s(t,e,n);break t}bs(t,e,i,n)}e=e.child}return e;case 5:return ia(e),null===t&&so(e),i=e.type,o=e.pendingProps,s=null!==t?t.memoizedProps:null,u=o.children,ti(i,o)?u=null:null!==s&&ti(i,s)&&(e.flags|=32),_s(t,e),bs(t,e,u,n),e.child;case 6:return null===t&&so(e),null;case 13:return Fs(t,e,n);case 4:return na(e,e.stateNode.containerInfo),i=e.pendingProps,null===t?e.child=Xo(e,null,i,n):bs(t,e,i,n),e.child;case 11:return i=e.type,o=e.pendingProps,ws(t,e,i,o=e.elementType===i?o:go(i,o),n);case 7:return bs(t,e,e.pendingProps,n),e.child;case 8:case 12:return bs(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(i=e.type._context,o=e.pendingProps,s=e.memoizedProps,u=o.value,_i(vo,i._currentValue),i._currentValue=u,null!==s)if(or(s.value,u)){if(s.children===o.children&&!Pi.current){e=$s(t,e,n);break t}}else for(null!==(s=e.child)&&(s.return=e);null!==s;){var l=s.dependencies;if(null!==l){u=s.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===s.tag){(c=Mo(-1,n&-n)).tag=2;var f=s.updateQueue;if(null!==f){var h=(f=f.shared).pending;null===h?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),So(s.return,n,e),l.lanes|=n;break}c=c.next}}else if(10===s.tag)u=s.type===e.type?null:s.child;else if(18===s.tag){if(null===(u=s.return))throw Error(a(341));u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),So(u,n,e),u=s.sibling}else u=s.child;if(null!==u)u.return=s;else for(u=s;null!==u;){if(u===e){u=null;break}if(null!==(s=u.sibling)){s.return=u.return,u=s;break}u=u.return}s=u}bs(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,i=e.pendingProps.children,ko(e,n),i=i(o=_o(o)),e.flags|=1,bs(t,e,i,n),e.child;case 14:return o=go(i=e.type,e.pendingProps),xs(t,e,i,o=go(i.type,o),n);case 15:return Ss(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,o=e.pendingProps,o=e.elementType===i?o:go(i,o),Vs(t,e),e.tag=1,Ni(i)?(t=!0,Ri(e)):t=!1,ko(e,n),$o(e,i,o),qo(e,i,o,n),Ps(null,e,i,!0,t,n);case 19:return zs(t,e,n);case 22:return ks(t,e,n)}throw Error(a(156,e.tag))};var Gl="function"==typeof reportError?reportError:function(t){console.error(t)};function Wl(t){this._internalRoot=t}function Yl(t){this._internalRoot=t}function Xl(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)}function Ql(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Kl(){}function Jl(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var t=Ul(a);s.call(t)}}$l(e,a,t,i)}else a=function(t,e,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var t=Ul(a);o.call(t)}}var a=Vl(e,r,t,0,null,!1,0,"",Kl);return t._reactRootContainer=a,t[hi]=a.current,zr(8===t.nodeType?t.parentNode:t),ul(),a}for(;i=t.lastChild;)t.removeChild(i);if("function"==typeof r){var s=r;r=function(){var t=Ul(u);s.call(t)}}var u=Il(t,0,!1,null,0,!1,0,"",Kl);return t._reactRootContainer=u,t[hi]=u.current,zr(8===t.nodeType?t.parentNode:t),ul((function(){$l(e,u,n,r)})),u}(n,e,t,i,r);return Ul(a)}Yl.prototype.render=Wl.prototype.render=function(t){var e=this._internalRoot;if(null===e)throw Error(a(409));$l(t,e,null,null)},Yl.prototype.unmount=Wl.prototype.unmount=function(){var t=this._internalRoot;if(null!==t){this._internalRoot=null;var e=t.containerInfo;ul((function(){$l(null,t,null,null)})),e[hi]=null}},Yl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Ee();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Re.length&&0!==e&&e<Re[n].priority;n++);Re.splice(n,0,t),0===n&&Ie(t)}},Se=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=he(e.pendingLanes);0!==n&&(be(e,1|n),el(e,Jt()),0==(6&Au)&&(zu=Jt()+500,zi()))}break;case 13:ul((function(){var e=Co(t,1);if(null!==e){var n=Ju();tl(e,t,1,n)}})),Hl(t,1)}},ke=function(t){if(13===t.tag){var e=Co(t,134217728);null!==e&&tl(e,t,134217728,Ju()),Hl(t,134217728)}},_e=function(t){if(13===t.tag){var e=Zu(t),n=Co(t,e);null!==n&&tl(n,t,e,Ju()),Hl(t,e)}},Ee=function(){return we},Ae=function(t,e){var n=we;try{return we=t,e()}finally{we=n}},kt=function(t,e,n){switch(e){case"input":if(Z(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=bi(r);if(!i)throw Error(a(90));Y(r),Z(r,i)}}}break;case"textarea":at(t,n);break;case"select":null!=(e=n.value)&&rt(t,!!n.multiple,e,!1)}},Tt=sl,Nt=ul;var Zl={usingClientEntryPoint:!1,Events:[mi,yi,bi,Pt,Ct,sl]},tc={findFiberByHostInstance:vi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ec={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=Gt(t))?null:t.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nc.isDisabled&&nc.supportsFiber)try{oe=nc.inject(ec),ae=nc}catch(ft){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zl,e.createPortal=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xl(e))throw Error(a(200));return Bl(t,e,null,n)},e.createRoot=function(t,e){if(!Xl(t))throw Error(a(299));var n=!1,r="",i=Gl;return null!=e&&(!0===e.unstable_strictMode&&(n=!0),void 0!==e.identifierPrefix&&(r=e.identifierPrefix),void 0!==e.onRecoverableError&&(i=e.onRecoverableError)),e=Il(t,1,!1,null,0,n,0,r,i),t[hi]=e.current,zr(8===t.nodeType?t.parentNode:t),new Wl(e)},e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if("function"==typeof t.render)throw Error(a(188));throw t=Object.keys(t).join(","),Error(a(268,t))}return null===(t=Gt(e))?null:t.stateNode},e.flushSync=function(t){return ul(t)},e.hydrate=function(t,e,n){if(!Ql(e))throw Error(a(200));return Jl(null,t,e,!0,n)},e.hydrateRoot=function(t,e,n){if(!Xl(t))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Gl;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),e=Vl(e,null,t,1,null!=n?n:null,i,0,o,s),t[hi]=e.current,zr(t),r)for(t=0;t<r.length;t++)i=(i=(n=r[t])._getVersion)(n._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Yl(e)},e.render=function(t,e,n){if(!Ql(e))throw Error(a(200));return Jl(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!Ql(t))throw Error(a(40));return!!t._reactRootContainer&&(ul((function(){Jl(null,null,t,!1,(function(){t._reactRootContainer=null,t[hi]=null}))})),!0)},e.unstable_batchedUpdates=sl,e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Ql(n))throw Error(a(200));if(null==t||void 0===t._reactInternals)throw Error(a(38));return Jl(t,e,n,!1,r)},e.version="18.2.0-next-9e3b772b8-20220608"},2609:(t,e,n)=>{"use strict";var r=n(6027);e.createRoot=r.createRoot,e.hydrateRoot=r.hydrateRoot},6027:(t,e,n)=>{"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=n(3230)},7856:(t,e)=>{"use strict";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=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function y(t,e,n){this.props=t,this.context=e,this.refs=m,this.updater=n||g}function b(){}function w(t,e,n){this.props=t,this.context=e,this.refs=m,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(t,e){if("object"!==n(t)&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},y.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},b.prototype=y.prototype;var x=w.prototype=new b;x.constructor=w,v(x,y.prototype),x.isPureReactComponent=!0;var S=Array.isArray,k=Object.prototype.hasOwnProperty,_={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function A(t,e,n){var i,o={},a=null,s=null;if(null!=e)for(i in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)k.call(e,i)&&!E.hasOwnProperty(i)&&(o[i]=e[i]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}if(t&&t.defaultProps)for(i in u=t.defaultProps)void 0===o[i]&&(o[i]=u[i]);return{$$typeof:r,type:t,key:a,ref:s,props:o,_owner:_.current}}function P(t){return"object"===n(t)&&null!==t&&t.$$typeof===r}var C=/\/+/g;function T(t,e){return"object"===n(t)&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function N(t,e,o,a,s){var u=n(t);"undefined"!==u&&"boolean"!==u||(t=null);var l=!1;if(null===t)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case r:case i:l=!0}}if(l)return s=s(l=t),t=""===a?"."+T(l,0):a,S(s)?(o="",null!=t&&(o=t.replace(C,"$&/")+"/"),N(s,e,o,"",(function(t){return t}))):null!=s&&(P(s)&&(s=function(t,e){return{$$typeof:r,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(s,o+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(C,"$&/")+"/")+t)),e.push(s)),1;if(l=0,a=""===a?".":a+":",S(t))for(var c=0;c<t.length;c++){var f=a+T(u=t[c],c);l+=N(u,e,o,f,s)}else if("function"==typeof(f=function(t){return null===t||"object"!==n(t)?null:"function"==typeof(t=p&&t[p]||t["@@iterator"])?t:null}(t)))for(t=f.call(t),c=0;!(u=t.next()).done;)l+=N(u=u.value,e,o,f=a+T(u,c++),s);else if("object"===u)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return l}function L(t,e,n){if(null==t)return t;var r=[],i=0;return N(t,r,"","",(function(t){return e.call(n,t,i++)})),r}function M(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var O={current:null},R={transition:null},F={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:R,ReactCurrentOwner:_};e.Children={map:L,forEach:function(t,e,n){L(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return L(t,(function(){e++})),e},toArray:function(t){return L(t,(function(t){return t}))||[]},only:function(t){if(!P(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=y,e.Fragment=o,e.Profiler=s,e.PureComponent=w,e.StrictMode=a,e.Suspense=f,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,e.cloneElement=function(t,e,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=v({},t.props),o=t.key,a=t.ref,s=t._owner;if(null!=e){if(void 0!==e.ref&&(a=e.ref,s=_.current),void 0!==e.key&&(o=""+e.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(l in e)k.call(e,l)&&!E.hasOwnProperty(l)&&(i[l]=void 0===e[l]&&void 0!==u?u[l]:e[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){u=Array(l);for(var c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}return{$$typeof:r,type:t.type,key:o,ref:a,props:i,_owner:s}},e.createContext=function(t){return(t={$$typeof:l,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:u,_context:t},t.Consumer=t},e.createElement=A,e.createFactory=function(t){var e=A.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:c,render:t}},e.isValidElement=P,e.lazy=function(t){return{$$typeof:d,_payload:{_status:-1,_result:t},_init:M}},e.memo=function(t,e){return{$$typeof:h,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=R.transition;R.transition={};try{t()}finally{R.transition=e}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(t,e){return O.current.useCallback(t,e)},e.useContext=function(t){return O.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return O.current.useDeferredValue(t)},e.useEffect=function(t,e){return O.current.useEffect(t,e)},e.useId=function(){return O.current.useId()},e.useImperativeHandle=function(t,e,n){return O.current.useImperativeHandle(t,e,n)},e.useInsertionEffect=function(t,e){return O.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return O.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return O.current.useMemo(t,e)},e.useReducer=function(t,e,n){return O.current.useReducer(t,e,n)},e.useRef=function(t){return O.current.useRef(t)},e.useState=function(t){return O.current.useState(t)},e.useSyncExternalStore=function(t,e,n){return O.current.useSyncExternalStore(t,e,n)},e.useTransition=function(){return O.current.useTransition()},e.version="18.2.0"},1591:(t,e,n)=>{"use strict";t.exports=n(7856)},1374:(t,e)=>{"use strict";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)}function r(t,e){var n=t.length;t.push(e);t:for(;0<n;){var r=n-1>>>1,i=t[r];if(!(0<a(i,e)))break t;t[r]=e,t[n]=i,n=r}}function i(t){return 0===t.length?null:t[0]}function o(t){if(0===t.length)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length,o=i>>>1;r<o;){var s=2*(r+1)-1,u=t[s],l=s+1,c=t[l];if(0>a(u,n))l<i&&0>a(c,u)?(t[r]=c,t[l]=n,r=l):(t[r]=u,t[s]=n,r=s);else{if(!(l<i&&0>a(c,n)))break t;t[r]=c,t[l]=n,r=l}}}return e}function a(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"===("undefined"==typeof performance?"undefined":n(performance))&&"function"==typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var c=[],f=[],h=1,d=null,p=3,g=!1,v=!1,m=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function x(t){for(var e=i(f);null!==e;){if(null===e.callback)o(f);else{if(!(e.startTime<=t))break;o(f),e.sortIndex=e.expirationTime,r(c,e)}e=i(f)}}function S(t){if(m=!1,x(t),!v)if(null!==i(c))v=!0,R(k);else{var e=i(f);null!==e&&F(S,e.startTime-t)}}function k(t,n){v=!1,m&&(m=!1,b(P),P=-1),g=!0;var r=p;try{for(x(n),d=i(c);null!==d&&(!(d.expirationTime>n)||t&&!N());){var a=d.callback;if("function"==typeof a){d.callback=null,p=d.priorityLevel;var s=a(d.expirationTime<=n);n=e.unstable_now(),"function"==typeof s?d.callback=s:d===i(c)&&o(c),x(n)}else o(c);d=i(c)}if(null!==d)var u=!0;else{var l=i(f);null!==l&&F(S,l.startTime-n),u=!1}return u}finally{d=null,p=r,g=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,E=!1,A=null,P=-1,C=5,T=-1;function N(){return!(e.unstable_now()-T<C)}function L(){if(null!==A){var t=e.unstable_now();T=t;var n=!0;try{n=A(!0,t)}finally{n?_():(E=!1,A=null)}}else E=!1}if("function"==typeof w)_=function(){w(L)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,O=M.port2;M.port1.onmessage=L,_=function(){O.postMessage(null)}}else _=function(){y(L,0)};function R(t){A=t,E||(E=!0,_())}function F(t,n){P=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,R(k))},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<t?Math.floor(1e3/t):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(c)},e.unstable_next=function(t){switch(p){case 1:case 2:case 3:var e=3;break;default:e=p}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_scheduleCallback=function(t,o,a){var s=e.unstable_now();switch(a="object"===n(a)&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,t){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return t={id:h++,callback:o,priorityLevel:t,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(t.sortIndex=a,r(f,t),null===i(c)&&t===i(f)&&(m?(b(P),P=-1):m=!0,F(S,a-s))):(t.sortIndex=u,r(c,t),v||g||(v=!0,R(k))),t},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(t){var e=p;return function(){var n=p;p=e;try{return t.apply(this,arguments)}finally{p=n}}}},4104:(t,e,n)=>{"use strict";t.exports=n(1374)},1617:function(t,e,n){"use strict";var r;!function(i){if("function"!=typeof o){var o=function(t){return t};o.nonNative=!0}var a=o("plaintext"),s=o("html"),u=o("comment"),l=/<(\w*)>/g,c=/<\/?([^\s\/>]+)/;function f(t,e,n){return d(t=t||"",h(e=e||[],n=n||""))}function h(t,e){return{allowable_tags:t=function(t){var e,n=new Set;if("string"==typeof t)for(;e=l.exec(t);)n.add(e[1]);else o.nonNative||"function"!=typeof t[o.iterator]?"function"==typeof t.forEach&&t.forEach(n.add,n):n=new Set(t);return n}(t),tag_replacement:e,state:a,tag_buffer:"",depth:0,in_quote_char:""}}function d(t,e){if("string"!=typeof t)throw new TypeError("'html' parameter must be a string");for(var n=e.allowable_tags,r=e.tag_replacement,i=e.state,o=e.tag_buffer,l=e.depth,c=e.in_quote_char,f="",h=0,d=t.length;h<d;h++){var g=t[h];if(i===a)switch(g){case"<":i=s,o+=g;break;default:f+=g}else if(i===s)switch(g){case"<":if(c)break;l++;break;case">":if(c)break;if(l){l--;break}c="",i=a,o+=">",n.has(p(o))?f+=o:f+=r,o="";break;case'"':case"'":c=g===c?"":c||g,o+=g;break;case"-":"<!-"===o&&(i=u),o+=g;break;case" ":case"\n":if("<"===o){i=a,f+="< ",o="";break}o+=g;break;default:o+=g}else if(i===u)switch(g){case">":"--"==o.slice(-2)&&(i=a),o="";break;default:o+=g}}return e.state=i,e.tag_buffer=o,e.depth=l,e.in_quote_char=c,f}function p(t){var e=c.exec(t);return e?e[1].toLowerCase():null}f.init_streaming_mode=function(t,e){var n=h(t=t||[],e=e||"");return function(t){return d(t||"",n)}},void 0===(r=function(){return f}.call(e,n,e,t))||(t.exports=r)}()},1889:t=>{t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r<t.rangeCount;r++)n.push(t.getRangeAt(r));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||n.forEach((function(e){t.addRange(e)})),e&&e.focus()}}},6388: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(){var t="1.13.1",e="object"==("undefined"==typeof self?"undefined":a(self))&&self.self===self&&self||"object"==(void 0===n.g?"undefined":a(n.g))&&n.g.global===n.g&&n.g||Function("return this")()||{},r=Array.prototype,i=Object.prototype,o="undefined"!=typeof Symbol?Symbol.prototype:null,s=r.push,u=r.slice,l=i.toString,c=i.hasOwnProperty,f="undefined"!=typeof ArrayBuffer,h="undefined"!=typeof DataView,d=Array.isArray,p=Object.keys,g=Object.create,v=f&&ArrayBuffer.isView,m=isNaN,y=isFinite,b=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],x=Math.pow(2,53)-1;function S(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}}function k(t){var e=a(t);return"function"===e||"object"===e&&!!t}function _(t){return void 0===t}function E(t){return!0===t||!1===t||"[object Boolean]"===l.call(t)}function A(t){var e="[object "+t+"]";return function(t){return l.call(t)===e}}var P=A("String"),C=A("Number"),T=A("Date"),N=A("RegExp"),L=A("Error"),M=A("Symbol"),O=A("ArrayBuffer"),R=A("Function"),F=e.document&&e.document.childNodes;"object"!=("undefined"==typeof Int8Array?"undefined":a(Int8Array))&&"function"!=typeof F&&(R=function(t){return"function"==typeof t||!1});var D=R,j=A("Object"),I=h&&j(new DataView(new ArrayBuffer(8))),B="undefined"!=typeof Map&&j(new Map),z=A("DataView"),V=I?function(t){return null!=t&&D(t.getInt8)&&O(t.buffer)}:z,$=d||A("Array");function U(t,e){return null!=t&&c.call(t,e)}var q=A("Arguments");!function(){q(arguments)||(q=function(t){return U(t,"callee")})}();var H=q;function G(t){return C(t)&&m(t)}function W(t){return function(){return t}}function Y(t){return function(e){var n=t(e);return"number"==typeof n&&n>=0&&n<=x}}function X(t){return function(e){return null==e?void 0:e[t]}}var Q=X("byteLength"),K=Y(Q),J=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,Z=f?function(t){return v?v(t)&&!V(t):K(t)&&J.test(l.call(t))}:W(!1),tt=X("length");function et(t,e){e=function(t){for(var e={},n=t.length,r=0;r<n;++r)e[t[r]]=!0;return{contains:function(t){return e[t]},push:function(n){return e[n]=!0,t.push(n)}}}(e);var n=w.length,r=t.constructor,o=D(r)&&r.prototype||i,a="constructor";for(U(t,a)&&!e.contains(a)&&e.push(a);n--;)(a=w[n])in t&&t[a]!==o[a]&&!e.contains(a)&&e.push(a)}function nt(t){if(!k(t))return[];if(p)return p(t);var e=[];for(var n in t)U(t,n)&&e.push(n);return b&&et(t,e),e}function rt(t,e){var n=nt(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0}function it(t){return t instanceof it?t:this instanceof it?void(this._wrapped=t):new it(t)}function ot(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,Q(t))}it.VERSION=t,it.prototype.value=function(){return this._wrapped},it.prototype.valueOf=it.prototype.toJSON=it.prototype.value,it.prototype.toString=function(){return String(this._wrapped)};var at="[object DataView]";function st(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=a(t);return("function"===i||"object"===i||"object"==a(e))&&function t(e,n,r,i){e instanceof it&&(e=e._wrapped),n instanceof it&&(n=n._wrapped);var s=l.call(e);if(s!==l.call(n))return!1;if(I&&"[object Object]"==s&&V(e)){if(!V(n))return!1;s=at}switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(n);case"[object ArrayBuffer]":case at:return t(ot(e),ot(n),r,i)}var u="[object Array]"===s;if(!u&&Z(e)){if(Q(e)!==Q(n))return!1;if(e.buffer===n.buffer&&e.byteOffset===n.byteOffset)return!0;u=!0}if(!u){if("object"!=a(e)||"object"!=a(n))return!1;var c=e.constructor,f=n.constructor;if(c!==f&&!(D(c)&&c instanceof c&&D(f)&&f instanceof f)&&"constructor"in e&&"constructor"in n)return!1}i=i||[];for(var h=(r=r||[]).length;h--;)if(r[h]===e)return i[h]===n;if(r.push(e),i.push(n),u){if((h=e.length)!==n.length)return!1;for(;h--;)if(!st(e[h],n[h],r,i))return!1}else{var d,p=nt(e);if(h=p.length,nt(n).length!==h)return!1;for(;h--;)if(!U(n,d=p[h])||!st(e[d],n[d],r,i))return!1}return r.pop(),i.pop(),!0}(t,e,n,r)}function ut(t){if(!k(t))return[];var e=[];for(var n in t)e.push(n);return b&&et(t,e),e}function lt(t){var e=tt(t);return function(n){if(null==n)return!1;var r=ut(n);if(tt(r))return!1;for(var i=0;i<e;i++)if(!D(n[t[i]]))return!1;return t!==pt||!D(n[ct])}}var ct="forEach",ft=["clear","delete"],ht=["get","has","set"],dt=ft.concat(ct,ht),pt=ft.concat(ht),gt=["add"].concat(ft,ct,"has"),vt=B?lt(dt):A("Map"),mt=B?lt(pt):A("WeakMap"),yt=B?lt(gt):A("Set"),bt=A("WeakSet");function wt(t){for(var e=nt(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r}function xt(t){for(var e={},n=nt(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e}function St(t){var e=[];for(var n in t)D(t[n])&&e.push(n);return e.sort()}function kt(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;u<s;u++){var l=a[u];e&&void 0!==n[l]||(n[l]=o[l])}return n}}var _t=kt(ut),Et=kt(nt),At=kt(ut,!0);function Pt(t){if(!k(t))return{};if(g)return g(t);var e=function(){};e.prototype=t;var n=new e;return e.prototype=null,n}function Ct(t){return k(t)?$(t)?t.slice():_t({},t):t}function Tt(t){return $(t)?t:[t]}function Nt(t){return it.toPath(t)}function Lt(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0}function Mt(t,e,n){var r=Lt(t,Nt(e));return _(r)?n:r}function Ot(t){return t}function Rt(t){return t=Et({},t),function(e){return rt(e,t)}}function Ft(t){return t=Nt(t),function(e){return Lt(e,t)}}function Dt(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}}function jt(t,e,n){return null==t?Ot:D(t)?Dt(t,e,n):k(t)&&!$(t)?Rt(t):Ft(t)}function It(t,e){return jt(t,e,1/0)}function Bt(t,e,n){return it.iteratee!==It?it.iteratee(t,e):jt(t,e,n)}function zt(){}function Vt(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}it.toPath=Tt,it.iteratee=It;var $t=Date.now||function(){return(new Date).getTime()};function Ut(t){var e=function(e){return t[e]},n="(?:"+nt(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}}var qt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Ht=Ut(qt),Gt=Ut(xt(qt)),Wt=it.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Yt=/(.)^/,Xt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qt=/\\|'|\r|\n|\u2028|\u2029/g;function Kt(t){return"\\"+Xt[t]}var Jt=/^\s*(\w|\$)+\s*$/,Zt=0;function te(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=Pt(t.prototype),a=t.apply(o,i);return k(a)?a:o}var ee=S((function(t,e){var n=ee.placeholder;return function r(){for(var i=0,o=e.length,a=Array(o),s=0;s<o;s++)a[s]=e[s]===n?arguments[i++]:e[s];for(;i<arguments.length;)a.push(arguments[i++]);return te(t,r,this,this,a)}}));ee.placeholder=it;var ne=S((function(t,e,n){if(!D(t))throw new TypeError("Bind must be called on a function");var r=S((function(i){return te(t,r,e,this,n.concat(i))}));return r})),re=Y(tt);function ie(t,e,n,r){if(r=r||[],e||0===e){if(e<=0)return r.concat(t)}else e=1/0;for(var i=r.length,o=0,a=tt(t);o<a;o++){var s=t[o];if(re(s)&&($(s)||H(s)))if(e>1)ie(s,e-1,n,r),i=r.length;else for(var u=0,l=s.length;u<l;)r[i++]=s[u++];else n||(r[i++]=s)}return r}var oe=S((function(t,e){var n=(e=ie(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=ne(t[r],t)}return t})),ae=S((function(t,e,n){return setTimeout((function(){return t.apply(null,n)}),e)})),se=ee(ae,it,1);function ue(t){return function(){return!t.apply(this,arguments)}}function le(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}var ce=ee(le,2);function fe(t,e,n){e=Bt(e,n);for(var r,i=nt(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r}function he(t){return function(e,n,r){n=Bt(n,r);for(var i=tt(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}var de=he(1),pe=he(-1);function ge(t,e,n,r){for(var i=(n=Bt(n,r,1))(e),o=0,a=tt(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o}function ve(t,e,n){return function(r,i,o){var a=0,s=tt(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(u.call(r,a,s),G))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o<s;o+=t)if(r[o]===i)return o;return-1}}var me=ve(1,de,ge),ye=ve(-1,pe);function be(t,e,n){var r=(re(t)?de:fe)(t,e,n);if(void 0!==r&&-1!==r)return t[r]}function we(t,e,n){var r,i;if(e=Dt(e,n),re(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=nt(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t}function xe(t,e,n){e=Bt(e,n);for(var r=!re(t)&&nt(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o}function Se(t){var e=function(e,n,r,i){var o=!re(e)&&nt(e),a=(o||e).length,s=t>0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s<a;s+=t){var u=o?o[s]:s;r=n(r,e[u],u,e)}return r};return function(t,n,r,i){var o=arguments.length>=3;return e(t,Dt(n,i,4),r,o)}}var ke=Se(1),_e=Se(-1);function Ee(t,e,n){var r=[];return e=Bt(e,n),we(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function Ae(t,e,n){e=Bt(e,n);for(var r=!re(t)&&nt(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0}function Pe(t,e,n){e=Bt(e,n);for(var r=!re(t)&&nt(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1}function Ce(t,e,n,r){return re(t)||(t=wt(t)),("number"!=typeof n||r)&&(n=0),me(t,e,n)>=0}var Te=S((function(t,e,n){var r,i;return D(e)?i=e:(e=Nt(e),r=e.slice(0,-1),e=e[e.length-1]),xe(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=Lt(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))}));function Ne(t,e){return xe(t,Ft(e))}function Le(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e||"number"==typeof e&&"object"!=a(t[0])&&null!=t)for(var u=0,l=(t=re(t)?t:wt(t)).length;u<l;u++)null!=(r=t[u])&&r>o&&(o=r);else e=Bt(e,n),we(t,(function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)}));return o}function Me(t,e,n){if(null==e||n)return re(t)||(t=wt(t)),t[Vt(t.length-1)];var r=re(t)?Ct(t):wt(t),i=tt(r);e=Math.max(Math.min(e,i),0);for(var o=i-1,a=0;a<e;a++){var s=Vt(a,o),u=r[a];r[a]=r[s],r[s]=u}return r.slice(0,e)}function Oe(t,e){return function(n,r,i){var o=e?[[],[]]:{};return r=Bt(r,i),we(n,(function(e,i){var a=r(e,i,n);t(o,e,a)})),o}}var Re=Oe((function(t,e,n){U(t,n)?t[n].push(e):t[n]=[e]})),Fe=Oe((function(t,e,n){t[n]=e})),De=Oe((function(t,e,n){U(t,n)?t[n]++:t[n]=1})),je=Oe((function(t,e,n){t[n?0:1].push(e)}),!0),Ie=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Be(t,e,n){return e in n}var ze=S((function(t,e){var n={},r=e[0];if(null==t)return n;D(r)?(e.length>1&&(r=Dt(r,e[1])),e=ut(t)):(r=Be,e=ie(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var a=e[i],s=t[a];r(s,a,t)&&(n[a]=s)}return n})),Ve=S((function(t,e){var n,r=e[0];return D(r)?(r=ue(r),e.length>1&&(n=e[1])):(e=xe(ie(e,!1,!1),String),r=function(t,n){return!Ce(e,n)}),ze(t,r,n)}));function $e(t,e,n){return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function Ue(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:$e(t,t.length-e)}function qe(t,e,n){return u.call(t,null==e||n?1:e)}var He=S((function(t,e){return e=ie(e,!0,!0),Ee(t,(function(t){return!Ce(e,t)}))})),Ge=S((function(t,e){return He(t,e)}));function We(t,e,n,r){E(e)||(r=n,n=e,e=!1),null!=n&&(n=Bt(n,r));for(var i=[],o=[],a=0,s=tt(t);a<s;a++){var u=t[a],l=n?n(u,a,t):u;e&&!n?(a&&o===l||i.push(u),o=l):n?Ce(o,l)||(o.push(l),i.push(u)):Ce(i,u)||i.push(u)}return i}var Ye=S((function(t){return We(ie(t,!0,!0))}));function Xe(t){for(var e=t&&Le(t,tt).length||0,n=Array(e),r=0;r<e;r++)n[r]=Ne(t,r);return n}var Qe=S(Xe);function Ke(t,e){return t._chain?it(e).chain():e}function Je(t){return we(St(t),(function(e){var n=it[e]=t[e];it.prototype[e]=function(){var t=[this._wrapped];return s.apply(t,arguments),Ke(this,n.apply(it,t))}})),it}we(["pop","push","reverse","shift","sort","splice","unshift"],(function(t){var e=r[t];it.prototype[t]=function(){var n=this._wrapped;return null!=n&&(e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Ke(this,n)}})),we(["concat","join","slice"],(function(t){var e=r[t];it.prototype[t]=function(){var t=this._wrapped;return null!=t&&(t=e.apply(t,arguments)),Ke(this,t)}}));var Ze=Je({__proto__:null,VERSION:t,restArguments:S,isObject:k,isNull:function(t){return null===t},isUndefined:_,isBoolean:E,isElement:function(t){return!(!t||1!==t.nodeType)},isString:P,isNumber:C,isDate:T,isRegExp:N,isError:L,isSymbol:M,isArrayBuffer:O,isDataView:V,isArray:$,isFunction:D,isArguments:H,isFinite:function(t){return!M(t)&&y(t)&&!isNaN(parseFloat(t))},isNaN:G,isTypedArray:Z,isEmpty:function(t){if(null==t)return!0;var e=tt(t);return"number"==typeof e&&($(t)||P(t)||H(t))?0===e:0===tt(nt(t))},isMatch:rt,isEqual:function(t,e){return st(t,e)},isMap:vt,isWeakMap:mt,isSet:yt,isWeakSet:bt,keys:nt,allKeys:ut,values:wt,pairs:function(t){for(var e=nt(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},invert:xt,functions:St,methods:St,extend:_t,extendOwn:Et,assign:Et,defaults:At,create:function(t,e){var n=Pt(t);return e&&Et(n,e),n},clone:Ct,tap:function(t,e){return e(t),t},get:Mt,has:function(t,e){for(var n=(e=Nt(e)).length,r=0;r<n;r++){var i=e[r];if(!U(t,i))return!1;t=t[i]}return!!n},mapObject:function(t,e,n){e=Bt(e,n);for(var r=nt(t),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=e(t[s],s,t)}return o},identity:Ot,constant:W,noop:zt,toPath:Tt,property:Ft,propertyOf:function(t){return null==t?zt:function(e){return Mt(t,e)}},matcher:Rt,matches:Rt,times:function(t,e,n){var r=Array(Math.max(0,t));e=Dt(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},random:Vt,now:$t,escape:Ht,unescape:Gt,templateSettings:Wt,template:function(t,e,n){!e&&n&&(e=n),e=At({},e,it.templateSettings);var r=RegExp([(e.escape||Yt).source,(e.interpolate||Yt).source,(e.evaluate||Yt).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,(function(e,n,r,a,s){return o+=t.slice(i,s).replace(Qt,Kt),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e})),o+="';\n";var a,s=e.variable;if(s){if(!Jt.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(t){throw t.source=o,t}var u=function(t){return a.call(this,t,it)};return u.source="function("+s+"){\n"+o+"}",u},result:function(t,e,n){var r=(e=Nt(e)).length;if(!r)return D(n)?n.call(t):n;for(var i=0;i<r;i++){var o=null==t?void 0:t[e[i]];void 0===o&&(o=n,i=r),t=D(o)?o.call(t):o}return t},uniqueId:function(t){var e=++Zt+"";return t?t+e:e},chain:function(t){var e=it(t);return e._chain=!0,e},iteratee:It,partial:ee,bind:ne,bindAll:oe,memoize:function(t,e){var n=function n(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return U(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},delay:ae,defer:se,throttle:function(t,e,n){var r,i,o,a,s=0;n||(n={});var u=function(){s=!1===n.leading?0:$t(),r=null,a=t.apply(i,o),r||(i=o=null)},l=function(){var l=$t();s||!1!==n.leading||(s=l);var c=e-(l-s);return i=this,o=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,c)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l},debounce:function(t,e,n){var r,i,o,a,s,u=function u(){var l=$t()-i;e>l?r=setTimeout(u,e-l):(r=null,n||(a=t.apply(s,o)),r||(o=s=null))},l=S((function(l){return s=this,o=l,i=$t(),r||(r=setTimeout(u,e),n&&(a=t.apply(s,o))),a}));return l.cancel=function(){clearTimeout(r),r=o=s=null},l},wrap:function(t,e){return ee(e,t)},negate:ue,compose:function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},after:function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},before:le,once:ce,findKey:fe,findIndex:de,findLastIndex:pe,sortedIndex:ge,indexOf:me,lastIndexOf:ye,find:be,detect:be,findWhere:function(t,e){return be(t,Rt(e))},each:we,forEach:we,map:xe,collect:xe,reduce:ke,foldl:ke,inject:ke,reduceRight:_e,foldr:_e,filter:Ee,select:Ee,reject:function(t,e,n){return Ee(t,ue(Bt(e)),n)},every:Ae,all:Ae,some:Pe,any:Pe,contains:Ce,includes:Ce,include:Ce,invoke:Te,pluck:Ne,where:function(t,e){return Ee(t,Rt(e))},max:Le,min:function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e||"number"==typeof e&&"object"!=a(t[0])&&null!=t)for(var u=0,l=(t=re(t)?t:wt(t)).length;u<l;u++)null!=(r=t[u])&&r<o&&(o=r);else e=Bt(e,n),we(t,(function(t,n,r){((i=e(t,n,r))<s||i===1/0&&o===1/0)&&(o=t,s=i)}));return o},shuffle:function(t){return Me(t,1/0)},sample:Me,sortBy:function(t,e,n){var r=0;return e=Bt(e,n),Ne(xe(t,(function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}})).sort((function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index})),"value")},groupBy:Re,indexBy:Fe,countBy:De,partition:je,toArray:function(t){return t?$(t)?u.call(t):P(t)?t.match(Ie):re(t)?xe(t,Ot):wt(t):[]},size:function(t){return null==t?0:re(t)?t.length:nt(t).length},pick:ze,omit:Ve,first:Ue,head:Ue,take:Ue,initial:$e,last:function(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:qe(t,Math.max(0,t.length-e))},rest:qe,tail:qe,drop:qe,compact:function(t){return Ee(t,Boolean)},flatten:function(t,e){return ie(t,e,!1)},without:Ge,uniq:We,unique:We,union:Ye,intersection:function(t){for(var e=[],n=arguments.length,r=0,i=tt(t);r<i;r++){var o=t[r];if(!Ce(e,o)){var a;for(a=1;a<n&&Ce(arguments[a],o);a++);a===n&&e.push(o)}}return e},difference:He,unzip:Xe,transpose:Xe,zip:Qe,object:function(t,e){for(var n={},r=0,i=tt(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},range:function(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i},chunk:function(t,e){if(null==e||e<1)return[];for(var n=[],r=0,i=t.length;r<i;)n.push(u.call(t,r,r+=e));return n},mixin:Je,default:it});return Ze._=Ze,Ze},"object"==a(e)?t.exports=o():void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)},672: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)}t=n.nmd(t),"undefined"!=typeof self&&self,a=function(){return function(){"use strict";var t={401:function(t,e,r){r.r(e),r.d(e,{Bowser:function(){return i},isDesktop:function(){return s},isMSEDGE:function(){return a},isMSIE:function(){return o},isMobile:function(){return u}});var i=n(3423);function o(){if("undefined"==typeof window)return!1;var t=i.getParser(window.navigator.userAgent);return Boolean(t.satisfies({windows:{"internet explorer":">=11"},edge:"18"}))}function a(){if("undefined"==typeof window)return!1;var t=i.getParser(window.navigator.userAgent);return Boolean(t.satisfies({edge:">=18"}))}function s(){return"undefined"!=typeof window&&"desktop"===i.parse(window.navigator.userAgent).platform.type}function u(){return"undefined"!=typeof window&&"mobile"===i.parse(window.navigator.userAgent).platform.type}},750:function(t,e,n){n.d(e,{default:function(){return r}});var r={$yellow:"#fe9b00",$gsOrange:"#fa6b30",$orangish:"#fa6b30",$gsOrangeDarker1:"#E46132",$orangeDisable:"#f8d4c6",$red:"#fd3229",$skyBlue:"#41a5e4",$catchyBlue:"#00a5ff",$brightBlue:"#0a83cf",$linkBlue:"#407ff3",$deepBlue:"#2b5797",$paleBlue:"#606d84",$chartDarkBlue:"#220087",$chartNavyBlue:"#0f00a0",$chartSaturatedBlue:"#000eb8",$chartBlue:"#0031cd",$chartSkyBlue:"#0757dd",$chartLapisBlue:"#195acf",$chartRoyalBlue:"#2382e9",$chartCadetBlue:"#49a7f2",$chartLightBlue:"#7ac7f9",$chartAquaBlue:"#b5e3fd",$chartWhiteBlue:"#ccebf8",$greyBlue:"#f3f6f9",$chartRose:"#f45b5b",$chartDarkRed:"#aa3f3f",$chartLightGreen:"#90ee7e",$cpwChartLightGreen:"#dcedc8",$cpwChartDarkGreen:"#c5e1a5",$chartDarkGreen:"#64a657",$chartCyanLight:"#2b908f",$chartCyanDark:"#1e6463",$chartFireBreak:"#ba2222",$chartPeach:"#ffb773",$chartLightPurple:"#ece7f5",$chartDeepPurple:"#412b98",$almostBlack:"#21232b",$deepDark:"#20232a",$dark:"#2a303b",$slate:"#414c5f",$greenCheck:"#4eaf52",$cyan:"#30c6b9",$darkViolet:"#a31dc2",$white:"#ffffff",$headerGrey:"#fafafa",$bgColor2:"#f5f5f5",$bgColor:"#f4f4f4",$slightGrey:"#e4e4e4",$popularGrey:"#eee",$greyTheme:"#DFDFDF",$lightChipColor:"#d5d5d5",$lightGrey:"#dddddd",$greyThemeText:"#939393",$grey5:"#757575",$outlineIcon:"#818181",$chipColor:"#5d5d5d",$gemOverlay:"rgba(32, 35, 42, 0.7)",$colorImage:"#7e57c2",$colorAudio:"#b83a75",$colorVideo:"#ca3e37",$errorNotification:"#c32929",$colorEmail:"#D44639",$colorDirectory:"#606d84",$warningNotification:"#f7ae46",$colorLink:"#ffa000",$colorBookmark:"#ffa000",$colorGSlides:"#F4B400",$colorProject:"#789359",$colorNote:"#4caf50",$successNotification:"#3ca741",$colorGSheets:"#0F9D58",$colorPerson:"#1d8abb",$colorGDoc:"#4285F4",$colorDropbox:"#3498d8",$colorPost:"#e2854a",$colorGroup:"#3f51b5",$colorSelfService:"#3f51b5","$colorSelf-Service":"#3f51b5","$colorSelf-Service Library":"#3f51b5",$colorDocument:"#2b5797",$colorOnedrive:"#094ab2",$colorArticle:"#8D6E63",$colorBulkUpload:"#707a7f",$colorOrganization:"#4a4a4a",$colorDecisionTree:"#7358a2","$colorDecision Tree":"#7358a2",$colorFAQ:"#2b5797"}},516:function(t,e,n){function r(t,e,n){var r=document.createElement("a");if(r.style.visibility="hidden",r.setAttribute("href",t),r.setAttribute("download",e||""),document.body.appendChild(r),!n&&window.navigator.msSaveBlob){var o=i(t);return fetch(t).then((function(t){return t.blob().then((function(t){return window.navigator.msSaveBlob(t,o)}))})),void document.body.removeChild(r)}if(window.navigator.msSaveBlob)return window.navigator.msSaveBlob(n,e||""),void document.body.removeChild(r);r.click(),document.body.removeChild(r)}n.r(e),n.d(e,{triggerDownload:function(){return r},getFilenameFromURL:function(){return i}});var i=function(t){var e;if(t.includes("shelf-download"))return t.slice(t.indexOf("shelf-download"),t.indexOf(".zip")+4).split("%").join(" ");var n=new URL(t).search,r=null===(e=new URLSearchParams(n).get("response-content-disposition"))||void 0===e?void 0:e.split("=")[1];return null==r?void 0:r.replace(/["]+/g,"")}},886:function(t,e,n){n.r(e),n.d(e,{VIEW_PORTS:function(){return r},VIEW_PORTS_MEDIAS:function(){return i},FONT_WEIGHTS:function(){return o}});var r={"$laptop-xl":2560,"$laptop-l":1900,"$laptop-m":1601,$laptop:1440,"$laptop-s":1280,"$tablet-large":1178,$tablet:1024,$mobile:768,"$mobile-l":420,"$mobile-m":380,"$mobile-s":320},i={"$break-on-mobile-width":"screen and (max-width: ".concat(r.$mobile,"px)"),"$break-on-almost-mobile-width":"screen and (max-width: ".concat(r.$mobile-1,"px)"),"$break-on-small-mobile-width":"screen and (max-width: ".concat(r["$mobile-l"],"px)"),"$break-on-tablet-width":"screen and (max-width: ".concat(r["$tablet-large"],"px)"),"$break-on-tablet-small-width":"screen and (max-width: ".concat(r.$tablet,"px)"),"$break-on-laptop-width":"screen and (max-width: ".concat(r["$laptop-s"],"px)"),"$break-on-laptop-l-width":"screen and (max-width: ".concat(r.$laptop,"px)"),"$break-on-mobile-height":"screen and (max-height: ".concat(r["$mobile-l"],"px)"),"$break-on-small-mobile-height":"screen and (max-height: ".concat(r["$mobile-m"],"px)")},o={$semiBoldFontWeight:600,$boldFontWeight:700}},934:function(t,e,n){n.r(e),n.d(e,{setEmbedded:function(){return o},getEmbedded:function(){return a}});var r="embeddedSource",i=function(){return window.location!==window.parent.location},o=function(){if(i()){var t=new URLSearchParams(window.location.search).get("embedded");t&&window.sessionStorage.setItem(r,t)}},a=function(){return i()?window.sessionStorage.getItem(r):"shelf"}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return function(){r.r(i),r.d(i,{browserHelpers:function(){return w},clientHelpers:function(){return t},colors:function(){return d.default},config:function(){return u},contentTypesHelpers:function(){return e},copyToClipboard:function(){return N},defaultAvatarURL:function(){return h},downloadHelpers:function(){return x},naturalCollectionSort:function(){return R},naturalSort:function(){return O},staticCDNIconFont:function(){return f},staticCDNProvider:function(){return l},staticCDNSVG:function(){return c},staticHost:function(){return a},styleVariables:function(){return S},trackingHelpers:function(){return P}});var t={};r.r(t),r.d(t,{formatNumber:function(){return m},getFilenameFromURL:function(){return b},normalizeKey:function(){return y},stripHtml:function(){return v}});var e={};r.r(e),r.d(e,{getContentTypeIconURL:function(){return A},getDefaultContentTypeIcon:function(){return E}});var o=n(3153),a="static.shelf.io",u={staticHost:"static.shelf.io",localSVGHost:""},l=function(){return"https://".concat(u.staticHost)},c=function(){return(0,o.isString)(u.localSVGHost)&&Boolean(u.localSVGHost)?u.localSVGHost:"".concat(l(),"/icon-font/assets/fonts/svg-defs.svg")},f=function(){return(0,o.isString)(u.localIconFont)&&Boolean(u.localIconFont)?u.localIconFont:"".concat(l(),"/icon-font/styles.min.css")},h="".concat(l(),"/images/backgrounds/avatar.svg"),d=r(750),p=n(1617),g=r.n(p);function v(t){return g()(t)}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.maximumFractionDigits,r=void 0===n?3:n,i=Number(t);return i.toLocaleString("en-US",{maximumFractionDigits:r})}var y=function(t){return decodeURIComponent((null==t?void 0:t.replace(/\+/g," "))||"")},b=function(t){var e=(0,o.last)((0,o.split)(t,"/"))||"",n=(0,o.first)((0,o.split)(decodeURIComponent(e),"?"));return y(n)},w=r(401),x=r(516),S=r(886),k=n(490),_=r.n(k),E=function(t){var e=t.staticURL;return"".concat(void 0===e?"https://static.shelf.io":e,"/images/content-types/default_type_icon.svg")},A=function(t){var e=t.iconURL,n=t.cacheTimeoutInMinutes,r=void 0===n?1:n,i=t.staticURL,o=60*r*1e3,a=Math.floor(Date.now()/o);return _()(e)?E({staticURL:i}):"".concat(e,"?time=").concat(a)},P=r(934),C=n(1699),T=r.n(C),N=function(t,e){t&&T()(t,e)},L=n(8948);function M(t){return(M="function"==typeof Symbol&&"symbol"==s(Symbol.iterator)?function(t){return s(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":s(t)})(t)}var O=function(t,e){return(0,L.compare)()(String(t).toLocaleLowerCase(),String(e).toLocaleLowerCase())},R=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc",r=t.length>0&&"object"===M(t[0]);return r?(0,L.orderBy)(t,[e],[n]):(0,L.orderBy)(t,[],[n])}}(),i}()},"object"==s(e)&&"object"==s(t)?t.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},9867:function(t,e,n){var r,i,o,a;function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(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 l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||c(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 c(t,e){if(t){if("string"==typeof t)return f(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)?f(t,e):void 0}}function f(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 h(t){return(h="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)}t=n.nmd(t),"undefined"!=typeof self&&self,a=function(t,e,n,r,i,o,a,c,f,d,p,g,v){return function(){var m={4287:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var u=[].concat(t[s]);r&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),e.push(u))}},e}},5082:function(t){t.exports=function(t){return void 0===t}},5799:function(t,e,n){var r,i,o,a;function s(t){return(s="function"==typeof Symbol&&"symbol"==h(Symbol.iterator)?function(t){return h(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":h(t)})(t)}t=n.nmd(t),"undefined"!=typeof self&&self,a=function(){return function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:function(){return n}});var n={$yellow:"#fe9b00",$gsOrange:"#fa6b30",$orangish:"#fa6b30",$gsOrangeDarker1:"#E46132",$orangeDisable:"#f8d4c6",$red:"#fd3229",$skyBlue:"#41a5e4",$catchyBlue:"#00a5ff",$brightBlue:"#0a83cf",$linkBlue:"#407ff3",$deepBlue:"#2b5797",$paleBlue:"#606d84",$chartDarkBlue:"#220087",$chartNavyBlue:"#0f00a0",$chartSaturatedBlue:"#000eb8",$chartBlue:"#0031cd",$chartSkyBlue:"#0757dd",$chartLapisBlue:"#195acf",$chartRoyalBlue:"#2382e9",$chartCadetBlue:"#49a7f2",$chartLightBlue:"#7ac7f9",$chartAquaBlue:"#b5e3fd",$chartWhiteBlue:"#ccebf8",$greyBlue:"#f3f6f9",$chartRose:"#f45b5b",$chartDarkRed:"#aa3f3f",$chartLightGreen:"#90ee7e",$cpwChartLightGreen:"#dcedc8",$cpwChartDarkGreen:"#c5e1a5",$chartDarkGreen:"#64a657",$chartCyanLight:"#2b908f",$chartCyanDark:"#1e6463",$chartFireBreak:"#ba2222",$chartPeach:"#ffb773",$chartLightPurple:"#ece7f5",$chartDeepPurple:"#412b98",$almostBlack:"#21232b",$deepDark:"#20232a",$dark:"#2a303b",$slate:"#414c5f",$greenCheck:"#4eaf52",$cyan:"#30c6b9",$darkViolet:"#a31dc2",$white:"#ffffff",$headerGrey:"#fafafa",$bgColor2:"#f5f5f5",$bgColor:"#f4f4f4",$slightGrey:"#e4e4e4",$popularGrey:"#eee",$greyTheme:"#DFDFDF",$lightChipColor:"#d5d5d5",$lightGrey:"#dddddd",$greyThemeText:"#939393",$grey5:"#757575",$outlineIcon:"#818181",$chipColor:"#5d5d5d",$gemOverlay:"rgba(32, 35, 42, 0.7)",$colorImage:"#7e57c2",$colorAudio:"#b83a75",$colorVideo:"#ca3e37",$errorNotification:"#c32929",$colorEmail:"#D44639",$colorDirectory:"#606d84",$warningNotification:"#f7ae46",$colorLink:"#ffa000",$colorBookmark:"#ffa000",$colorGSlides:"#F4B400",$colorProject:"#789359",$colorNote:"#4caf50",$successNotification:"#3ca741",$colorGSheets:"#0F9D58",$colorPerson:"#1d8abb",$colorGDoc:"#4285F4",$colorDropbox:"#3498d8",$colorPost:"#e2854a",$colorGroup:"#3f51b5",$colorSelfService:"#3f51b5","$colorSelf-Service":"#3f51b5","$colorSelf-Service Library":"#3f51b5",$colorDocument:"#2b5797",$colorOnedrive:"#094ab2",$colorArticle:"#8D6E63",$colorBulkUpload:"#707a7f",$colorOrganization:"#4a4a4a",$colorDecisionTree:"#7358a2","$colorDecision Tree":"#7358a2",$colorFAQ:"#2b5797"};return e}()},"object"==s(e)&&"object"==s(t)?t.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))},2780:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(4287),i=n.n(r)()((function(t){return t[1]}));i.push([t.id,".joint-link:hover path[joint-selector=line]{stroke-width:4px}.joint-port-body:hover{fill:#ddd}.joint-cell{cursor:default}.joint-cell .edit-button{opacity:0;-webkit-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.joint-cell:hover .edit-button{opacity:1}.Graph{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative}.Graph__graph-holder{padding:30px;overflow:hidden}.Graph__graph-holder svg{overflow:visible!important;cursor:move}.Graph__graph-holder[data-interactive=false] .joint-cell .edit-button{display:none}.Graph__graph-holder[data-interactive=false] .joint-port circle{cursor:default}.Graph__reorganize{position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;bottom:0;left:0;margin:20px;padding:6.5px 10px;color:#fff;background-color:hsla(0,0%,57.6%,.9);text-transform:uppercase;text-align:center;font-weight:600;font-size:14px;line-height:14px;cursor:pointer;-webkit-transition:background-color .25s ease;-o-transition:background-color .25s ease;transition:background-color .25s ease}.Graph__reorganize:hover{background-color:#939393}",""]);var o=i},6062:function(t,e,n){"use strict";var r,i=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function a(t){for(var e=-1,n=0;n<o.length;n++)if(o[n].identifier===t){e=n;break}return e}function s(t,e){for(var n={},r=[],i=0;i<t.length;i++){var s=t[i],u=e.base?s[0]+e.base:s[0],l=n[u]||0,c="".concat(u," ").concat(l);n[u]=l+1;var f=a(c),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(o[f].references++,o[f].updater(h)):o.push({identifier:c,updater:g(h,e),references:1}),r.push(c)}return r}function u(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var a=i(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var l,c=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function f(t,e,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=c(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var d=null,p=0;function g(t,e){var n,r,i;if(e.singleton){var o=p++;n=d||(d=u(e)),r=f.bind(null,n,o,!1),i=f.bind(null,n,o,!0)}else n=u(e),r=h.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<n.length;r++){var i=a(n[r]);o[i].references--}for(var u=s(t,e),l=0;l<n.length;l++){var c=a(n[l]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}n=u}}}},1723:function(t){"use strict";t.exports=r},9240:function(t){"use strict";t.exports=f},4179:function(t){"use strict";t.exports=e},4459:function(t){"use strict";t.exports=n},1273:function(t){"use strict";t.exports=c},3804:function(t){"use strict";t.exports=a},2566:function(t){"use strict";t.exports=p},6985:function(t){"use strict";t.exports=g},8718:function(t){"use strict";t.exports=i},6414:function(t){"use strict";t.exports=d},5935:function(t){"use strict";t.exports=v},9876:function(t){"use strict";t.exports=o},9297:function(e){"use strict";e.exports=t}},y={};function b(t){var e=y[t];if(void 0!==e)return e.exports;var n=y[t]={id:t,loaded:!1,exports:{}};return m[t].call(n.exports,n,n.exports,b),n.loaded=!0,n.exports}b.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return b.d(e,{a:e}),e},b.d=function(t,e){for(var n in e)b.o(e,n)&&!b.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},b.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},b.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},b.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var w={};return function(){"use strict";var t;b.r(w),b.d(w,{StaticTree:function(){return $a}});var e={};b.r(e),b.d(e,{ellipseWithEllipse:function(){return $t},ellipseWithLine:function(){return Vt},exists:function(){return Bt},lineWithLine:function(){return zt},pathWithEllipse:function(){return ne},pathWithLine:function(){return ee},pathWithPath:function(){return ae},pathWithPolygon:function(){return oe},pathWithPolyline:function(){return ie},pathWithRect:function(){return re},polygonWithEllipse:function(){return Kt},polygonWithLine:function(){return Qt},polygonWithPolygon:function(){return te},polygonWithPolyline:function(){return Zt},polygonWithRect:function(){return Jt},polylineWithEllipse:function(){return Wt},polylineWithLine:function(){return Gt},polylineWithPolyline:function(){return Xt},polylineWithRect:function(){return Yt},rectWithEllipse:function(){return qt},rectWithLine:function(){return Ut},rectWithRect:function(){return Ht}});var n={};b.r(n),b.d(n,{Curve:function(){return kt},Ellipse:function(){return Z},Line:function(){return ht},Path:function(){return Et},Point:function(){return Y},Polygon:function(){return It},Polyline:function(){return mt},Rect:function(){return ut},bezier:function(){return jt},ellipse:function(){return tt},intersection:function(){return me},line:function(){return dt},normalizeAngle:function(){return A},point:function(){return X},random:function(){return N},rect:function(){return lt},scale:function(){return E},snapToGrid:function(){return P},toDeg:function(){return C},toRad:function(){return T},types:function(){return j}});var r={};b.r(r),b.d(r,{absolute:function(){return vr},bottom:function(){return Sr},ellipse:function(){return _r},ellipseSpread:function(){return kr},fn:function(){return mr},left:function(){return br},line:function(){return yr},right:function(){return wr},top:function(){return xr}});var i={};b.r(i),b.d(i,{bottom:function(){return Rr},inside:function(){return Ir},insideOriented:function(){return jr},left:function(){return Lr},manual:function(){return Nr},outside:function(){return Dr},outsideOriented:function(){return Fr},radial:function(){return Br},radialOriented:function(){return zr},right:function(){return Mr},top:function(){return Or}});var o={};b.r(o),b.d(o,{BorderedImage:function(){return ri},Circle:function(){return Kr},Cylinder:function(){return si},DoubleLink:function(){return fi},Ellipse:function(){return Jr},EmbeddedImage:function(){return ii},HeaderedRectangle:function(){return ai},Image:function(){return ni},InscribedImage:function(){return oi},Link:function(){return ci},Path:function(){return Zr},Polygon:function(){return ti},Polyline:function(){return ei},Rectangle:function(){return Qr},ShadowLink:function(){return hi},TextBlock:function(){return li}});var a={};b.r(a),b.d(a,{manhattan:function(){return Zi},metro:function(){return eo},normal:function(){return bi},oneSide:function(){return wi},orthogonal:function(){return Fi}});var c={};b.r(c),b.d(c,{curve:function(){return vo},jumpover:function(){return lo},normal:function(){return co},rounded:function(){return fo},smooth:function(){return ho}});var f={};b.r(f),b.d(f,{addClass:function(){return Ro},mask:function(){return Lo},opacity:function(){return Mo},stroke:function(){return No}});var d={};b.r(d),b.d(d,{connectionClosest:function(){return zo},connectionLength:function(){return Do},connectionPerpendicular:function(){return Bo},connectionRatio:function(){return Fo},resolveRef:function(){return jo}});var p={};b.r(p),b.d(p,{anchor:function(){return qo},bbox:function(){return Ho},boundary:function(){return Wo},rectangle:function(){return Go}});var g={};b.r(g),b.d(g,{bottom:function(){return Ko},bottomLeft:function(){return na},bottomRight:function(){return ra},center:function(){return Xo},left:function(){return Jo},midSide:function(){return oa},modelCenter:function(){return aa},perpendicular:function(){return ia},right:function(){return Zo},top:function(){return Qo},topLeft:function(){return ta},topRight:function(){return ea}});var v=b(9297),m=b.n(v),y=b(5799),x=b.n(y),S=Math.round,k=Math.floor,_=Math.PI,E={linear:function(t,e,n){var r=t[1]-t[0],i=e[1]-e[0];return(n-t[0])/r*i+e[0]||0}},A=function(t){return t%360+(t<0?360:0)},P=function(t,e){return e*S(t/e)},C=function(t){return 180*t/_%360},T=function(t,e){return(t=(e=e||!1)?t:t%360)*_/180},N=function(t,e){if(void 0===e)e=void 0===t?1:t,t=0;else if(e<t){var n=t;t=e,e=n}return k(Math.random()*(e-t+1)+t)},L=Math.cos,M=Math.sin,O=Math.atan2,R=function(t,e){var n=T(t.y),r=T(e.y),i=t.x,o=e.x,a=T(o-i),s=M(a)*L(r),u=L(n)*M(r)-M(n)*L(r)*L(a),l=C(O(s,u))-22.5;return l<0&&(l+=360),["NE","E","SE","S","SW","W","NW","N"][l=parseInt(l/45)]},F=function(t,e){var n=t.x,r=t.y;return(n-=e.x)*n+(r-=e.y)*r},D=function(t,e){return Math.sqrt(F(t,e))},j={Point:1,Line:2,Ellipse:3,Rect:4,Polyline:5,Polygon:6,Curve:7,Path:8},I=Math.abs,B=Math.cos,z=Math.sin,V=Math.sqrt,$=Math.min,U=Math.max,q=Math.atan2,H=Math.round,G=Math.pow,W=Math.PI,Y=function t(e,n){if(!(this instanceof t))return new t(e,n);if("string"==typeof e){var r=e.split(-1===e.indexOf("@")?" ":"@");e=parseFloat(r[0]),n=parseFloat(r[1])}else Object(e)===e&&(n=e.y,e=e.x);this.x=void 0===e?0:e,this.y=void 0===n?0:n};Y.fromPolar=function(t,e,n){n=new Y(n);var r=I(t*B(e)),i=I(t*z(e)),o=A(C(e));return o<90?i=-i:o<180?(r=-r,i=-i):o<270&&(r=-r),new Y(n.x+r,n.y+i)},Y.random=function(t,e,n,r){return new Y(N(t,e),N(n,r))},Y.prototype={type:j.Point,chooseClosest:function(t){var e=t.length;if(1===e)return new Y(t[0]);for(var n=null,r=1/0,i=0;i<e;i++){var o=new Y(t[i]),a=this.squaredDistance(o);a<r&&(n=o,r=a)}return n},adhereToRect:function(t){return t.containsPoint(this)||(this.x=$(U(this.x,t.x),t.x+t.width),this.y=$(U(this.y,t.y),t.y+t.height)),this},angleBetween:function(t,e){var n=this.equals(t)||this.equals(e)?NaN:this.theta(e)-this.theta(t);return n<0&&(n+=360),n},bearing:function(t){return R(this,t)},changeInAngle:function(t,e,n){return this.clone().offset(-t,-e).theta(n)-this.theta(n)},clone:function(){return new Y(this)},cross:function(t,e){return t&&e?(e.x-this.x)*(t.y-this.y)-(e.y-this.y)*(t.x-this.x):NaN},difference:function(t,e){return Object(t)===t&&(e=t.y,t=t.x),new Y(this.x-(t||0),this.y-(e||0))},distance:function(t){return D(this,t)},dot:function(t){return t?this.x*t.x+this.y*t.y:NaN},equals:function(t){return!!t&&this.x===t.x&&this.y===t.y},lerp:function(t,e){var n=this.x,r=this.y;return new Y((1-e)*n+e*t.x,(1-e)*r+e*t.y)},magnitude:function(){return V(this.x*this.x+this.y*this.y)||.01},manhattanDistance:function(t){return I(t.x-this.x)+I(t.y-this.y)},move:function(t,e){var n=T(new Y(t).theta(this));return this.offset(B(n)*e,-z(n)*e)},normalize:function(t){var e=(t||1)/this.magnitude();return this.scale(e,e)},offset:function(t,e){return Object(t)===t&&(e=t.y,t=t.x),this.x+=t||0,this.y+=e||0,this},reflection:function(t){return new Y(t).move(this,this.distance(t))},rotate:function(t,e){if(0===e)return this;t=t||new Y(0,0),e=T(A(-e));var n=B(e),r=z(e),i=n*(this.x-t.x)-r*(this.y-t.y)+t.x,o=r*(this.x-t.x)+n*(this.y-t.y)+t.y;return this.x=i,this.y=o,this},round:function(t){var e=1;if(t)switch(t){case 1:e=10;break;case 2:e=100;break;case 3:e=1e3;break;default:e=G(10,t)}return this.x=H(this.x*e)/e,this.y=H(this.y*e)/e,this},scale:function(t,e,n){return n=n&&new Y(n)||new Y(0,0),this.x=n.x+t*(this.x-n.x),this.y=n.y+e*(this.y-n.y),this},snapToGrid:function(t,e){return this.x=P(this.x,t),this.y=P(this.y,e||t),this},squaredDistance:function(t){return F(this,t)},theta:function(t){var e=-((t=new Y(t)).y-this.y),n=t.x-this.x,r=q(e,n);return r<0&&(r=2*W+r),180*r/W},toJSON:function(){return{x:this.x,y:this.y}},toPolar:function(t){t=t&&new Y(t)||new Y(0,0);var e=this.x,n=this.y;return this.x=V((e-t.x)*(e-t.x)+(n-t.y)*(n-t.y)),this.y=T(t.theta(new Y(e,n))),this},toString:function(){return this.x+"@"+this.y},serialize:function(){return this.x+","+this.y},update:function(t,e){return Object(t)===t&&(e=t.y,t=t.x),this.x=t||0,this.y=e||0,this},vectorAngle:function(t){return new Y(0,0).angleBetween(this,t)}},Y.prototype.translate=Y.prototype.offset;var X=Y,Q=Math.sqrt,K=Math.round,J=Math.pow,Z=function t(e,n,r){return this instanceof t?e instanceof t?new t(new Y(e.x,e.y),e.a,e.b):(e=new Y(e),this.x=e.x,this.y=e.y,this.a=n,void(this.b=r)):new t(e,n,r)};Z.fromRect=function(t){return t=new ut(t),new Z(t.center(),t.width/2,t.height/2)},Z.prototype={type:j.Ellipse,bbox:function(){return new ut(this.x-this.a,this.y-this.b,2*this.a,2*this.b)},center:function(){return new Y(this.x,this.y)},clone:function(){return new Z(this)},containsPoint:function(t){return this.normalizedDistance(t)<=1},equals:function(t){return!!t&&t.x===this.x&&t.y===this.y&&t.a===this.a&&t.b===this.b},inflate:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.a+=2*t,this.b+=2*e,this},intersectionWithLine:function(t){var e=[],n=t.start,r=t.end,i=this.a,o=this.b,a=t.vector(),s=n.difference(new Y(this)),u=new Y(a.x/(i*i),a.y/(o*o)),l=new Y(s.x/(i*i),s.y/(o*o)),c=a.dot(u),f=a.dot(l),h=f*f-c*(s.dot(l)-1);if(h<0)return null;if(h>0){var d=Q(h),p=(-f-d)/c,g=(-f+d)/c;if((p<0||1<p)&&(g<0||1<g))return null;0<=p&&p<=1&&e.push(n.lerp(r,p)),0<=g&&g<=1&&e.push(n.lerp(r,g))}else{var v=-f/c;if(!(0<=v&&v<=1))return null;e.push(n.lerp(r,v))}return e},intersectionWithLineFromCenterToPoint:function(t,e){t=new Y(t),e&&t.rotate(new Y(this.x,this.y),e);var n,r=t.x-this.x,i=t.y-this.y;if(0===r)return n=this.bbox().pointNearestToPoint(t),e?n.rotate(new Y(this.x,this.y),-e):n;var o=i/r,a=o*o,s=this.a*this.a,u=this.b*this.b,l=Q(1/(1/s+a/u)),c=o*(l=r<0?-l:l);return n=new Y(this.x+l,this.y+c),e?n.rotate(new Y(this.x,this.y),-e):n},normalizedDistance:function(t){var e=t.x,n=t.y,r=this.a,i=this.b,o=this.x,a=this.y;return(e-o)*(e-o)/(r*r)+(n-a)*(n-a)/(i*i)},round:function(t){var e=1;if(t)switch(t){case 1:e=10;break;case 2:e=100;break;case 3:e=1e3;break;default:e=J(10,t)}return this.x=K(this.x*e)/e,this.y=K(this.y*e)/e,this.a=K(this.a*e)/e,this.b=K(this.b*e)/e,this},tangentTheta:function(t){var e,n,r=t.x,i=t.y,o=this.a,a=this.b,s=this.bbox().center(),u=s.x,l=s.y,c=r>s.x+o/2,f=r<s.x-o/2;return c||f?n=o*o/(r-u)-o*o*(i-l)*((e=r>s.x?i-30:i+30)-l)/(a*a*(r-u))+u:e=a*a/(i-l)-a*a*(r-u)*((n=i>s.y?r+30:r-30)-u)/(o*o*(i-l))+l,new Y(n,e).theta(t)},toString:function(){return new Y(this.x,this.y).toString()+" "+this.a+" "+this.b}};var tt=Z,et=Math.abs,nt=Math.cos,rt=Math.sin,it=Math.min,ot=Math.max,at=Math.round,st=Math.pow,ut=function t(e,n,r,i){if(!(this instanceof t))return new t(e,n,r,i);Object(e)===e&&(n=e.y,r=e.width,i=e.height,e=e.x),this.x=void 0===e?0:e,this.y=void 0===n?0:n,this.width=void 0===r?0:r,this.height=void 0===i?0:i};ut.fromEllipse=function(t){return t=new Z(t),new ut(t.x-t.a,t.y-t.b,2*t.a,2*t.b)},ut.fromPointUnion=function(){if(0===arguments.length)return null;var t,e,n,r,i=new Y;t=e=1/0,n=r=-1/0;for(var o=0;o<arguments.length;o++){i.update(o<0||arguments.length<=o?void 0:arguments[o]);var a=i.x,s=i.y;a<t&&(t=a),a>n&&(n=a),s<e&&(e=s),s>r&&(r=s)}return new ut(t,e,n-t,r-e)},ut.fromRectUnion=function(){if(0===arguments.length)return null;var t,e,n,r,i=new ut;t=e=1/0,n=r=-1/0;for(var o=0;o<arguments.length;o++){i.update(o<0||arguments.length<=o?void 0:arguments[o]);var a=i.x,s=i.y,u=a+i.width,l=s+i.height;a<t&&(t=a),u>n&&(n=u),s<e&&(e=s),l>r&&(r=l)}return new ut(t,e,n-t,r-e)},ut.prototype={type:j.Rect,bbox:function(t){return this.clone().rotateAroundCenter(t)},rotateAroundCenter:function(t){if(!t)return this;var e=this.width,n=this.height,r=T(t),i=et(rt(r)),o=et(nt(r)),a=e*o+n*i,s=e*i+n*o;return this.x+=(e-a)/2,this.y+=(n-s)/2,this.width=a,this.height=s,this},bottomLeft:function(){return new Y(this.x,this.y+this.height)},bottomLine:function(){return new ht(this.bottomLeft(),this.bottomRight())},bottomMiddle:function(){return new Y(this.x+this.width/2,this.y+this.height)},center:function(){return new Y(this.x+this.width/2,this.y+this.height/2)},clone:function(){return new ut(this)},containsPoint:function(t){return(t=new Y(t)).x>=this.x&&t.x<=this.x+this.width&&t.y>=this.y&&t.y<=this.y+this.height},containsRect:function(t){var e=new ut(this).normalize(),n=new ut(t).normalize(),r=e.width,i=e.height,o=n.width,a=n.height;if(!(r&&i&&o&&a))return!1;var s=e.x,u=e.y,l=n.x,c=n.y;return o+=l,r+=s,a+=c,i+=u,s<=l&&o<=r&&u<=c&&a<=i},corner:function(){return new Y(this.x+this.width,this.y+this.height)},equals:function(t){var e=new ut(this).normalize(),n=new ut(t).normalize();return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height},inflate:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this},intersect:function(t){var e=this.origin(),n=this.corner(),r=t.origin(),i=t.corner();if(i.x<=e.x||i.y<=e.y||r.x>=n.x||r.y>=n.y)return null;var o=ot(e.x,r.x),a=ot(e.y,r.y);return new ut(o,a,it(n.x,i.x)-o,it(n.y,i.y)-a)},intersectionWithLine:function(t){var e,n,r=this,i=[r.topLine(),r.rightLine(),r.bottomLine(),r.leftLine()],o=[],a=[],s=i.length;for(n=0;n<s;n++)null!==(e=t.intersect(i[n]))&&a.indexOf(e.toString())<0&&(o.push(e),a.push(e.toString()));return o.length>0?o:null},intersectionWithLineFromCenterToPoint:function(t,e){t=new Y(t);var n,r=new Y(this.x+this.width/2,this.y+this.height/2);e&&t.rotate(r,e);for(var i=[this.topLine(),this.rightLine(),this.bottomLine(),this.leftLine()],o=new ht(r,t),a=i.length-1;a>=0;--a){var s=i[a].intersection(o);if(null!==s){n=s;break}}return n&&e&&n.rotate(r,-e),n},leftLine:function(){return new ht(this.topLeft(),this.bottomLeft())},leftMiddle:function(){return new Y(this.x,this.y+this.height/2)},maxRectScaleToFit:function(t,e){var n,r,i,o,a,s,u,l;t=new ut(t),e||(e=t.center());var c=e.x,f=e.y;n=r=i=o=a=s=u=l=1/0;var h=t.topLeft();h.x<c&&(n=(this.x-c)/(h.x-c)),h.y<f&&(a=(this.y-f)/(h.y-f));var d=t.bottomRight();d.x>c&&(r=(this.x+this.width-c)/(d.x-c)),d.y>f&&(s=(this.y+this.height-f)/(d.y-f));var p=t.topRight();p.x>c&&(i=(this.x+this.width-c)/(p.x-c)),p.y<f&&(u=(this.y-f)/(p.y-f));var g=t.bottomLeft();return g.x<c&&(o=(this.x-c)/(g.x-c)),g.y>f&&(l=(this.y+this.height-f)/(g.y-f)),{sx:it(n,r,i,o),sy:it(a,s,u,l)}},maxRectUniformScaleToFit:function(t,e){var n=this.maxRectScaleToFit(t,e);return it(n.sx,n.sy)},moveAndExpand:function(t){return this.x+=t.x||0,this.y+=t.y||0,this.width+=t.width||0,this.height+=t.height||0,this},normalize:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return this.width<0&&(t=this.x+this.width,n=-this.width),this.height<0&&(e=this.y+this.height,r=-this.height),this.x=t,this.y=e,this.width=n,this.height=r,this},offset:function(t,e){return Y.prototype.offset.call(this,t,e)},origin:function(){return new Y(this.x,this.y)},pointNearestToPoint:function(t){if(t=new Y(t),this.containsPoint(t))switch(this.sideNearestToPoint(t)){case"right":return new Y(this.x+this.width,t.y);case"left":return new Y(this.x,t.y);case"bottom":return new Y(t.x,this.y+this.height);case"top":return new Y(t.x,this.y)}return t.adhereToRect(this)},rightLine:function(){return new ht(this.topRight(),this.bottomRight())},rightMiddle:function(){return new Y(this.x+this.width,this.y+this.height/2)},round:function(t){var e=1;if(t)switch(t){case 1:e=10;break;case 2:e=100;break;case 3:e=1e3;break;default:e=st(10,t)}return this.x=at(this.x*e)/e,this.y=at(this.y*e)/e,this.width=at(this.width*e)/e,this.height=at(this.height*e)/e,this},scale:function(t,e,n){return n=this.origin().scale(t,e,n),this.x=n.x,this.y=n.y,this.width*=t,this.height*=e,this},sideNearestToPoint:function(t){var e=(t=new Y(t)).x-this.x,n=this.x+this.width-t.x,r=t.y-this.y,i=e,o="left";return n<i&&(i=n,o="right"),r<i&&(i=r,o="top"),this.y+this.height-t.y<i&&(o="bottom"),o},snapToGrid:function(t,e){var n=this.origin().snapToGrid(t,e),r=this.corner().snapToGrid(t,e);return this.x=n.x,this.y=n.y,this.width=r.x-n.x,this.height=r.y-n.y,this},toJSON:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},topLine:function(){return new ht(this.topLeft(),this.topRight())},topMiddle:function(){return new Y(this.x+this.width/2,this.y)},topRight:function(){return new Y(this.x+this.width,this.y)},toString:function(){return this.origin().toString()+" "+this.corner().toString()},union:function(t){return ut.fromRectUnion(this,t)},update:function(t,e,n,r){return Object(t)===t&&(e=t.y,n=t.width,r=t.height,t=t.x),this.x=t||0,this.y=e||0,this.width=n||0,this.height=r||0,this}},ut.prototype.bottomRight=ut.prototype.corner,ut.prototype.topLeft=ut.prototype.origin,ut.prototype.translate=ut.prototype.offset;var lt=ut,ct=Math.max,ft=Math.min,ht=function t(e,n){return this instanceof t?e instanceof t?new t(e.start,e.end):(this.start=new Y(e),void(this.end=new Y(n))):new t(e,n)};ht.prototype={type:j.Line,angle:function(){var t=new Y(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,t)},bbox:function(){var t=ft(this.start.x,this.end.x),e=ft(this.start.y,this.end.y),n=ct(this.start.x,this.end.x),r=ct(this.start.y,this.end.y);return new ut(t,e,n-t,r-e)},bearing:function(){return R(this.start,this.end)},clone:function(){return new ht(this.start,this.end)},closestPoint:function(t){return this.pointAt(this.closestPointNormalizedLength(t))},closestPointLength:function(t){return this.closestPointNormalizedLength(t)*this.length()},closestPointNormalizedLength:function(t){var e=this.vector().dot(new ht(this.start,t).vector()),n=ft(1,ct(0,e/this.squaredLength()));return n!=n?0:n},closestPointTangent:function(t){return this.tangentAt(this.closestPointNormalizedLength(t))},containsPoint:function(t){var e=this.start,n=this.end;if(0!==e.cross(t,n))return!1;var r=this.length();return!(new ht(e,t).length()>r||new ht(t,n).length()>r)},divideAt:function(t){var e=this.pointAt(t);return[new ht(this.start,e),new ht(e,this.end)]},divideAtLength:function(t){var e=this.pointAtLength(t);return[new ht(this.start,e),new ht(e,this.end)]},equals:function(t){return!!t&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.end.x===t.end.x&&this.end.y===t.end.y},intersect:function(t,e){if(t&&t.intersectionWithLine){var n=t.intersectionWithLine(this,e);return n&&t instanceof ht&&(n=n[0]),n}return null},intersectionWithLine:function(t){var e=new Y(this.end.x-this.start.x,this.end.y-this.start.y),n=new Y(t.end.x-t.start.x,t.end.y-t.start.y),r=e.x*n.y-e.y*n.x,i=new Y(t.start.x-this.start.x,t.start.y-this.start.y),o=i.x*n.y-i.y*n.x,a=i.x*e.y-i.y*e.x;if(0===r||o*r<0||a*r<0)return null;if(r>0){if(o>r||a>r)return null}else if(o<r||a<r)return null;return[new Y(this.start.x+o*e.x/r,this.start.y+o*e.y/r)]},isDifferentiable:function(){return!this.start.equals(this.end)},length:function(){return D(this.start,this.end)},midpoint:function(){return new Y((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)},parallel:function(t){var e=this.clone();if(!this.isDifferentiable())return e;var n=e.start,r=e.end,i=n.clone().rotate(r,270),o=r.clone().rotate(n,90);return n.move(o,t),r.move(i,t),e},pointAt:function(t){var e=this.start,n=this.end;return t<=0?e.clone():t>=1?n.clone():e.lerp(n,t)},pointAtLength:function(t){var e=this.start,n=this.end,r=!0;t<0&&(r=!1,t=-t);var i=this.length();return t>=i?r?n.clone():e.clone():this.pointAt((r?t:i-t)/i)},pointOffset:function(t){t=new Y(t);var e=this.start,n=this.end;return((n.x-e.x)*(t.y-e.y)-(n.y-e.y)*(t.x-e.x))/this.length()},rotate:function(t,e){return this.start.rotate(t,e),this.end.rotate(t,e),this},round:function(t){return this.start.round(t),this.end.round(t),this},scale:function(t,e,n){return this.start.scale(t,e,n),this.end.scale(t,e,n),this},setLength:function(t){var e=this.length();if(!e)return this;var n=t/e;return this.scale(n,n,this.start)},squaredLength:function(){return F(this.start,this.end)},tangentAt:function(t){if(!this.isDifferentiable())return null;var e=this.start,n=this.end,r=this.pointAt(t),i=new ht(e,n);return i.translate(r.x-e.x,r.y-e.y),i},tangentAtLength:function(t){if(!this.isDifferentiable())return null;var e=this.start,n=this.end,r=this.pointAtLength(t),i=new ht(e,n);return i.translate(r.x-e.x,r.y-e.y),i},toString:function(){return this.start.toString()+" "+this.end.toString()},serialize:function(){return this.start.serialize()+" "+this.end.serialize()},translate:function(t,e){return this.start.translate(t,e),this.end.translate(t,e),this},vector:function(){return new Y(this.end.x-this.start.x,this.end.y-this.start.y)}},ht.prototype.intersection=ht.prototype.intersect;var dt=ht;function pt(t){if(""===(t=t.trim()))return[];for(var e=[],n=t.split(/\s*,\s*|\s+/),r=n.length,i=0;i<r;i+=2)e.push({x:+n[i],y:+n[i+1]});return e}function gt(t){var e=t.length;if(0===e)return[];for(var n=[],r=0;r<e;r++){var i=t[r].clone();n.push(i)}return n}function vt(t){var e,n,r,i=Math.abs,o=t.length;if(0===o)return[];for(e=0;e<o;e++)(void 0===r||t[e].y<r.y||t[e].y===r.y&&t[e].x>r.x)&&(r=t[e]);var a=[];for(e=0;e<o;e++){var s=r.theta(t[e]);0===s&&(s=360);var u=[t[e],e,s];a.push(u)}if(a.sort((function(t,e){var n=t[2]-e[2];return 0===n&&(n=e[1]-t[1]),n})),a.length>2){var l=a[a.length-1];a.unshift(l)}for(var c,f,h,d,p,g,v,m={},y=[];0!==a.length;)if(f=(c=a.pop())[0],!m.hasOwnProperty(c[0]+"@@"+c[1]))for(var b=!1;!b;)if(y.length<2)y.push(c),b=!0;else{d=(h=y.pop())[0];var w=(g=(p=y.pop())[0]).cross(d,f);if(w<0)y.push(p),y.push(h),y.push(c),b=!0;else if(0===w){var x=d.angleBetween(g,f);i(x-180)<1e-10||d.equals(f)||g.equals(d)?(m[h[0]+"@@"+h[1]]=d,y.push(p)):i((x+1)%360-1)<1e-10&&(y.push(p),a.push(h))}else m[h[0]+"@@"+h[1]]=d,y.push(p)}y.length>2&&y.pop();var S=-1;for(n=y.length,e=0;e<n;e++){var k=y[e][1];(void 0===v||k<v)&&(v=k,S=e)}var _=[];if(S>0){var E=y.slice(S),A=y.slice(0,S);_=E.concat(A)}else _=y;var P=[];for(n=_.length,e=0;e<n;e++)P.push(_[e][0]);return P}var mt=function t(e){return this instanceof t?"string"==typeof e?new t.parse(e):void(this.points=Array.isArray(e)?e.map(Y):[]):new t(e)};mt.parse=function(t){return new mt(pt(t))},mt.fromRect=function(t){return new mt([t.topLeft(),t.topRight(),t.bottomRight(),t.bottomLeft(),t.topLeft()])},mt.prototype={type:j.Polyline,bbox:function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=this.points,o=i.length;if(0===o)return null;for(var a=0;a<o;a++){var s=i[a],u=s.x,l=s.y;u<t&&(t=u),u>e&&(e=u),l<n&&(n=l),l>r&&(r=l)}return new ut(t,n,e-t,r-n)},clone:function(){return new mt(gt(this.points))},closestPoint:function(t){var e=this.closestPointLength(t);return this.pointAtLength(e)},closestPointLength:function(t){var e,n=this.lengthPoints(),r=n.length;if(0===r)return 0;if(1===r)return 0;for(var i=1/0,o=0,a=r-1,s=0;s<a;s++){var u=new ht(n[s],n[s+1]),l=u.length(),c=u.closestPointNormalizedLength(t),f=u.pointAt(c).squaredDistance(t);f<i&&(i=f,e=o+c*l),o+=l}return e},closestPointNormalizedLength:function(t){var e=this.closestPointLength(t);if(0===e)return 0;var n=this.length();return 0===n?0:e/n},closestPointTangent:function(t){var e=this.closestPointLength(t);return this.tangentAtLength(e)},containsPoint:function(t){var e=this.points,n=e.length;if(0===n)return!1;for(var r=t.x,i=t.y,o=n-1,a=0,s=0,u=new ht,l=new ht,c=new Y;a<n;a++){var f=e[o],h=e[a];if(t.equals(f))return!0;if(u.start=f,u.end=h,u.containsPoint(t))return!0;if(i<=f.y&&i>h.y||i>f.y&&i<=h.y){var d=f.x-r>h.x-r?f.x-r:h.x-r;d>=0&&(c.x=r+d,c.y=i,l.start=t,l.end=c,u.intersect(l)&&s++)}o=a}return s%2==1},close:function(){var t=this.start,e=this.end,n=this.points;return t&&e&&!t.equals(e)&&n.push(t.clone()),this},lengthPoints:function(){return this.points},convexHull:function(){return new mt(vt(this.points))},equals:function(t){if(!t)return!1;var e=this.points,n=t.points,r=e.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=e[i],a=t.points[i];if(!o.equals(a))return!1}return!0},intersectionWithLine:function(t){for(var e=new ht(t),n=[],r=this.lengthPoints(),i=new ht,o=0,a=r.length-1;o<a;o++){i.start=r[o],i.end=r[o+1];var s=e.intersectionWithLine(i);s&&n.push(s[0])}return n.length>0?n:null},isDifferentiable:function(){var t=this.points,e=t.length;if(0===e)return!1;for(var n=new ht,r=e-1,i=0;i<r;i++)if(n.start=t[i],n.end=t[i+1],n.isDifferentiable())return!0;return!1},length:function(){var t=this.lengthPoints(),e=t.length;if(0===e)return 0;for(var n=0,r=e-1,i=0;i<r;i++)n+=t[i].distance(t[i+1]);return n},pointAt:function(t){var e=this.lengthPoints(),n=e.length;if(0===n)return null;if(1===n)return e[0].clone();if(t<=0)return e[0].clone();if(t>=1)return e[n-1].clone();var r=this.length()*t;return this.pointAtLength(r)},pointAtLength:function(t){var e=this.lengthPoints(),n=e.length;if(0===n)return null;if(1===n)return e[0].clone();var r=!0;t<0&&(r=!1,t=-t);for(var i=0,o=n-1,a=0;a<o;a++){var s=r?a:o-1-a,u=e[s],l=e[s+1],c=new ht(u,l),f=u.distance(l);if(t<=i+f)return c.pointAtLength((r?1:-1)*(t-i));i+=f}return(r?e[n-1]:e[0]).clone()},round:function(t){for(var e=this.points,n=e.length,r=0;r<n;r++)e[r].round(t);return this},scale:function(t,e,n){for(var r=this.points,i=r.length,o=0;o<i;o++)r[o].scale(t,e,n);return this},simplify:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.points;if(e.length<3)return this;for(var n=t.threshold||0,r=0;e[r+2];){var i=r+1,o=r+2,a=e[r],s=e[i],u=e[o];new ht(a,u).closestPoint(s).distance(s)<=n?e.splice(i,1):r+=1}return this},tangentAt:function(t){var e=this.lengthPoints().length;if(0===e)return null;if(1===e)return null;t<0&&(t=0),t>1&&(t=1);var n=this.length()*t;return this.tangentAtLength(n)},tangentAtLength:function(t){var e=this.lengthPoints(),n=e.length;if(0===n)return null;if(1===n)return null;var r,i=!0;t<0&&(i=!1,t=-t);for(var o=0,a=n-1,s=0;s<a;s++){var u=i?s:a-1-s,l=e[u],c=e[u+1],f=new ht(l,c),h=l.distance(c);if(f.isDifferentiable()){if(t<=o+h)return f.tangentAtLength((i?1:-1)*(t-o));r=f}o+=h}if(r){var d=i?1:0;return r.tangentAt(d)}return null},toString:function(){return this.points+""},translate:function(t,e){for(var n=this.points,r=n.length,i=0;i<r;i++)n[i].translate(t,e);return this},serialize:function(){var t=this.points,e=t.length;if(0===e)return"";for(var n="",r=0;r<e;r++){var i=t[r];n+=i.x+","+i.y+" "}return n.trim()}},Object.defineProperty(mt.prototype,"start",{configurable:!0,enumerable:!0,get:function(){return 0===this.points.length?null:this.points[0]}}),Object.defineProperty(mt.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var t=this.points.length;return 0===t?null:this.points[t-1]}});var yt=Math.abs,bt=Math.sqrt,wt=Math.min,xt=Math.max,St=Math.pow,kt=function t(e,n,r,i){return this instanceof t?e instanceof t?new t(e.start,e.controlPoint1,e.controlPoint2,e.end):(this.start=new Y(e),this.controlPoint1=new Y(n),this.controlPoint2=new Y(r),void(this.end=new Y(i))):new t(e,n,r,i)};function _t(t){var e,n,r=[];for(n=arguments.length,e=1;e<n;e++)r.push(arguments[e]);if(!t)throw new Error("Missing a parent object.");var i=Object.create(t);for(n=r.length,e=0;e<n;e++){var o,a,s=r[e];for(a in s)s.hasOwnProperty(a)&&(delete i[a],o=Object.getOwnPropertyDescriptor(s,a),Object.defineProperty(i,a,o))}return i}kt.throughPoints=function(){function t(t){var e=t.length,n=[],r=[],i=2;n[0]=t[0]/i;for(var o=1;o<e;o++)r[o]=1/i,i=(o<e-1?4:3.5)-r[o],n[o]=(t[o]-n[o-1])/i;for(o=1;o<e;o++)n[e-o-1]-=r[e-o]*n[e-o];return n}return function(e){if(!e||Array.isArray(e)&&e.length<2)throw new Error("At least 2 points are required");for(var n=function(e){var n,r=[],i=[],o=e.length-1;if(1==o)return r[0]=new Y((2*e[0].x+e[1].x)/3,(2*e[0].y+e[1].y)/3),i[0]=new Y(2*r[0].x-e[0].x,2*r[0].y-e[0].y),[r,i];var a=[];for(n=1;n<o-1;n++)a[n]=4*e[n].x+2*e[n+1].x;a[0]=e[0].x+2*e[1].x,a[o-1]=(8*e[o-1].x+e[o].x)/2;var s=t(a);for(n=1;n<o-1;++n)a[n]=4*e[n].y+2*e[n+1].y;a[0]=e[0].y+2*e[1].y,a[o-1]=(8*e[o-1].y+e[o].y)/2;var u=t(a);for(n=0;n<o;n++)r.push(new Y(s[n],u[n])),n<o-1?i.push(new Y(2*e[n+1].x-s[n+1],2*e[n+1].y-u[n+1])):i.push(new Y((e[o].x+s[o-1])/2,(e[o].y+u[o-1])/2));return[r,i]}(e),r=[],i=n[0].length,o=0;o<i;o++){var a=new Y(n[0][o].x,n[0][o].y),s=new Y(n[1][o].x,n[1][o].y);r.push(new kt(e[o],a,s,e[o+1]))}return r}}(),kt.prototype={type:j.Curve,bbox:function(){for(var t,e,n,r,i,o,a,s,u=this.start,l=this.controlPoint1,c=this.controlPoint2,f=this.end,h=u.x,d=u.y,p=l.x,g=l.y,v=c.x,m=c.y,y=f.x,b=f.y,w=new Array,x=new Array,S=[new Array,new Array],k=0;k<2;++k)if(0===k?(e=6*h-12*p+6*v,t=-3*h+9*p-9*v+3*y,n=3*p-3*h):(e=6*d-12*g+6*m,t=-3*d+9*g-9*m+3*b,n=3*g-3*d),yt(t)<1e-12){if(yt(e)<1e-12)continue;0<(r=-n/e)&&r<1&&x.push(r)}else s=bt(a=e*e-4*n*t),a<0||(0<(i=(-e+s)/(2*t))&&i<1&&x.push(i),0<(o=(-e-s)/(2*t))&&o<1&&x.push(o));for(var _,E,A,P=x.length,C=P;P--;)E=(_=1-(r=x[P]))*_*_*h+3*_*_*r*p+3*_*r*r*v+r*r*r*y,S[0][P]=E,A=_*_*_*d+3*_*_*r*g+3*_*r*r*m+r*r*r*b,S[1][P]=A,w[P]={X:E,Y:A};x[C]=0,x[C+1]=1,w[C]={X:h,Y:d},w[C+1]={X:y,Y:b},S[0][C]=h,S[1][C]=d,S[0][C+1]=y,S[1][C+1]=b,x.length=C+2,S[0].length=C+2,S[1].length=C+2,w.length=C+2;var T=wt.apply(null,S[0]),N=wt.apply(null,S[1]),L=xt.apply(null,S[0]),M=xt.apply(null,S[1]);return new ut(T,N,L-T,M-N)},clone:function(){return new kt(this.start,this.controlPoint1,this.controlPoint2,this.end)},closestPoint:function(t,e){return this.pointAtT(this.closestPointT(t,e))},closestPointLength:function(t,e){var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,subdivisions:void 0===e.subdivisions?this.getSubdivisions({precision:n}):e.subdivisions};return this.lengthAtT(this.closestPointT(t,r),r)},closestPointNormalizedLength:function(t,e){var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,subdivisions:void 0===e.subdivisions?this.getSubdivisions({precision:n}):e.subdivisions},i=this.closestPointLength(t,r);if(!i)return 0;var o=this.length(r);return 0===o?0:i/o},closestPointT:function(t,e){for(var n,r,i,o,a,s,u,l=void 0===(e=e||{}).precision?this.PRECISION:e.precision,c=void 0===e.subdivisions?this.getSubdivisions({precision:l}):e.subdivisions,f=c.length,h=f?1/f:0,d=0;d<f;d++){var p=c[d],g=p.start.distance(t),v=p.end.distance(t),m=g+v;(!u||m<u)&&(n=p,r=d*h,i=(d+1)*h,o=g,a=v,s=p.start.distance(p.end),u=m)}for(var y=St(10,-l);;){var b=o?yt(o-a)/o:0,w=a?yt(o-a)/a:0;if(b<y||w<y||!o||o<s*y||!a||a<s*y)return o<=a?r:i;var x=n.divide(.5);h/=2;var S=x[0].start.distance(t),k=x[0].end.distance(t),_=S+k,E=x[1].start.distance(t),A=x[1].end.distance(t);_<=E+A?(n=x[0],i-=h,o=S,a=k):(n=x[1],r+=h,o=E,a=A)}},closestPointTangent:function(t,e){return this.tangentAtT(this.closestPointT(t,e))},containsPoint:function(t,e){return this.toPolyline(e).containsPoint(t)},divideAt:function(t,e){if(t<=0)return this.divideAtT(0);if(t>=1)return this.divideAtT(1);var n=this.tAt(t,e);return this.divideAtT(n)},divideAtLength:function(t,e){var n=this.tAtLength(t,e);return this.divideAtT(n)},divideAtT:function(t){var e=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return[new kt(e,e,e,e),new kt(e,n,r,i)];if(t>=1)return[new kt(e,n,r,i),new kt(i,i,i,i)];var o=this.getSkeletonPoints(t),a=o.startControlPoint1,s=o.startControlPoint2,u=o.divider,l=o.dividerControlPoint1,c=o.dividerControlPoint2;return[new kt(e,a,s,u),new kt(u,l,c,i)]},endpointDistance:function(){return this.start.distance(this.end)},equals:function(t){return!!t&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.controlPoint1.x===t.controlPoint1.x&&this.controlPoint1.y===t.controlPoint1.y&&this.controlPoint2.x===t.controlPoint2.x&&this.controlPoint2.y===t.controlPoint2.y&&this.end.x===t.end.x&&this.end.y===t.end.y},getSkeletonPoints:function(t){var e=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(t<=0)return{startControlPoint1:e.clone(),startControlPoint2:e.clone(),divider:e.clone(),dividerControlPoint1:n.clone(),dividerControlPoint2:r.clone()};if(t>=1)return{startControlPoint1:n.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};var o=new ht(e,n).pointAt(t),a=new ht(n,r).pointAt(t),s=new ht(r,i).pointAt(t),u=new ht(o,a).pointAt(t),l=new ht(a,s).pointAt(t);return{startControlPoint1:o,startControlPoint2:u,divider:new ht(u,l).pointAt(t),dividerControlPoint1:l,dividerControlPoint2:s}},getSubdivisions:function(t){var e=void 0===(t=t||{}).precision?this.PRECISION:t.precision,n=[new kt(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(0===e)return n;for(var r=this.endpointDistance(),i=St(10,-e),o=0;;){o+=1;for(var a=[],s=n.length,u=0;u<s;u++){var l=n[u].divide(.5);a.push(l[0],l[1])}for(var c=0,f=a.length,h=0;h<f;h++)c+=a[h].endpointDistance();if(o>1&&(0!==c?(c-r)/c:0)<i)return a;n=a,r=c}},isDifferentiable:function(){var t=this.start,e=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(n)&&n.equals(r))},length:function(t){for(var e=void 0===(t=t||{}).precision?this.PRECISION:t.precision,n=void 0===t.subdivisions?this.getSubdivisions({precision:e}):t.subdivisions,r=0,i=n.length,o=0;o<i;o++)r+=n[o].endpointDistance();return r},lengthAtT:function(t,e){if(t<=0)return 0;var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision;return this.divide(t)[0].length({precision:n})},pointAt:function(t,e){if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();var n=this.tAt(t,e);return this.pointAtT(n)},pointAtLength:function(t,e){var n=this.tAtLength(t,e);return this.pointAtT(n)},pointAtT:function(t){return t<=0?this.start.clone():t>=1?this.end.clone():this.getSkeletonPoints(t).divider},PRECISION:3,round:function(t){return this.start.round(t),this.controlPoint1.round(t),this.controlPoint2.round(t),this.end.round(t),this},scale:function(t,e,n){return this.start.scale(t,e,n),this.controlPoint1.scale(t,e,n),this.controlPoint2.scale(t,e,n),this.end.scale(t,e,n),this},tangentAt:function(t,e){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);var n=this.tAt(t,e);return this.tangentAtT(n)},tangentAtLength:function(t,e){if(!this.isDifferentiable())return null;var n=this.tAtLength(t,e);return this.tangentAtT(n)},tangentAtT:function(t){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);var e=this.getSkeletonPoints(t),n=e.startControlPoint2,r=e.dividerControlPoint1,i=e.divider,o=new ht(n,r);return o.translate(i.x-n.x,i.y-n.y),o},tAt:function(t,e){if(t<=0)return 0;if(t>=1)return 1;var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,subdivisions:void 0===e.subdivisions?this.getSubdivisions({precision:n}):e.subdivisions},i=this.length(r)*t;return this.tAtLength(i,r)},tAtLength:function(t,e){var n=!0;t<0&&(n=!1,t=-t);for(var r,i,o,a,s,u=void 0===(e=e||{}).precision?this.PRECISION:e.precision,l=void 0===e.subdivisions?this.getSubdivisions({precision:u}):e.subdivisions,c={precision:u,subdivisions:l},f=0,h=l.length,d=1/h,p=0;p<h;p++){var g=n?p:h-1-p,v=l[p],m=v.endpointDistance();if(t<=f+m){r=v,i=g*d,o=(g+1)*d,a=n?t-f:m+f-t,s=n?m+f-t:t-f;break}f+=m}if(!r)return n?1:0;for(var y=this.length(c),b=St(10,-u);;){var w,x;if((0!==y?a/y:0)<b)return i;if((0!==y?s/y:0)<b)return o;var S=r.divide(.5);d/=2;var k=S[0].endpointDistance(),_=S[1].endpointDistance();a<=k?(r=S[0],o-=d,x=k-(w=a)):(r=S[1],i+=d,x=_-(w=a-k)),a=w,s=x}},toPoints:function(t){for(var e=void 0===(t=t||{}).precision?this.PRECISION:t.precision,n=void 0===t.subdivisions?this.getSubdivisions({precision:e}):t.subdivisions,r=[n[0].start.clone()],i=n.length,o=0;o<i;o++){var a=n[o];r.push(a.end.clone())}return r},toPolyline:function(t){return new mt(this.toPoints(t))},toString:function(){return this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(t,e){return this.start.translate(t,e),this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e),this}},kt.prototype.divide=kt.prototype.divideAtT;var Et=function t(e){if(!(this instanceof t))return new t(e);if("string"==typeof e)return new t.parse(e);var n,r;if(this.segments=[],e)if(Array.isArray(e)&&0!==e.length)if(r=(e=e.reduce((function(t,e){return t.concat(e)}),[])).length,e[0].isSegment)for(n=0;n<r;n++){var i=e[n];this.appendSegment(i)}else{var o=null;for(n=0;n<r;n++){var a=e[n];if(!(a instanceof ht||a instanceof kt))throw new Error("Cannot construct a path segment from the provided object.");0===n&&this.appendSegment(t.createSegment("M",a.start)),o&&!o.end.equals(a.start)&&this.appendSegment(t.createSegment("M",a.start)),a instanceof ht?this.appendSegment(t.createSegment("L",a.end)):a instanceof kt&&this.appendSegment(t.createSegment("C",a.controlPoint1,a.controlPoint2,a.end)),o=a}}else if(e.isSegment)this.appendSegment(e);else if(e instanceof ht)this.appendSegment(t.createSegment("M",e.start)),this.appendSegment(t.createSegment("L",e.end));else if(e instanceof kt)this.appendSegment(t.createSegment("M",e.start)),this.appendSegment(t.createSegment("C",e.controlPoint1,e.controlPoint2,e.end));else{if(!(e instanceof mt))throw new Error("Cannot construct a path from the provided object.");if(!e.points||0===e.points.length)return;for(r=e.points.length,n=0;n<r;n++){var s=e.points[n];0===n?this.appendSegment(t.createSegment("M",s)):this.appendSegment(t.createSegment("L",s))}}};function At(t,e){return e.unshift(null),new(Function.prototype.bind.apply(t,e))}Et.parse=function(t){if(!t)return new Et;for(var e=new Et,n=t.match(/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g),r=n.length,i=0;i<r;i++){var o=n[i].match(/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g),a=Et.createSegment.apply(this,o);e.appendSegment(a)}return e},Et.createSegment=function(t){if(!t)throw new Error("Type must be provided.");var e=Et.segmentTypes[t];if(!e)throw new Error(t+" is not a recognized path segment type.");for(var n=[],r=arguments.length,i=1;i<r;i++)n.push(arguments[i]);return At(e,n)},Et.prototype={type:j.Path,appendSegment:function(t){var e,n=this.segments,r=n.length,i=0!==r?n[r-1]:null;if(Array.isArray(t)){if(!(t=t.reduce((function(t,e){return t.concat(e)}),[]))[0].isSegment)throw new Error("Segments required.");for(var o=t.length,a=0;a<o;a++){var s=t[a];e=this.prepareSegment(s,i,null),n.push(e),i=e}}else{if(!t||!t.isSegment)throw new Error("Segment required.");e=this.prepareSegment(t,i,null),n.push(e)}},bbox:function(){var t,e=this.segments,n=e.length;if(0===n)return null;for(var r=0;r<n;r++){var i=e[r];if(i.isVisible){var o=i.bbox();t=t?t.union(o):o}}if(t)return t;var a=e[n-1];return new ut(a.end.x,a.end.y,0,0)},clone:function(){for(var t=this.segments,e=t.length,n=new Et,r=0;r<e;r++){var i=t[r].clone();n.appendSegment(i)}return n},closestPoint:function(t,e){var n=this.closestPointT(t,e);return n?this.pointAtT(n):null},closestPointLength:function(t,e){var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.closestPointT(t,r);return i?this.lengthAtT(i,r):0},closestPointNormalizedLength:function(t,e){var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.closestPointLength(t,r);if(0===i)return 0;var o=this.length(r);return 0===o?0:i/o},closestPointT:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;for(var i,o=void 0===(e=e||{}).precision?this.PRECISION:e.precision,a=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):e.segmentSubdivisions,s=1/0,u=0;u<r;u++){var l=n[u],c=a[u];if(l.isVisible){var f=l.closestPointT(t,{precision:o,subdivisions:c}),h=l.pointAtT(f),d=new ht(h,t).squaredLength();d<s&&(i={segmentIndex:u,value:f},s=d)}}return i||{segmentIndex:r-1,value:1}},closestPointTangent:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;for(var i,o=void 0===(e=e||{}).precision?this.PRECISION:e.precision,a=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):e.segmentSubdivisions,s=1/0,u=0;u<r;u++){var l=n[u],c=a[u];if(l.isDifferentiable()){var f=l.closestPointT(t,{precision:o,subdivisions:c}),h=l.pointAtT(f),d=new ht(h,t).squaredLength();d<s&&(i=l.tangentAtT(f),s=d)}}return i||null},containsPoint:function(t,e){var n=this.toPolylines(e);if(!n)return!1;for(var r=n.length,i=0,o=0;o<r;o++)n[o].containsPoint(t)&&i++;return i%2==1},divideAt:function(t,e){if(0===this.segments.length)return null;t<0&&(t=0),t>1&&(t=1);var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.length(r)*t;return this.divideAtLength(i,r)},divideAtLength:function(t,e){var n=this.segments.length;if(0===n)return null;var r=!0;t<0&&(r=!1,t=-t);var i,o,a,s,u,l,c,f=void 0===(e=e||{}).precision?this.PRECISION:e.precision,h=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:f}):e.segmentSubdivisions,d=0;for(i=0;i<n;i++){var p=r?i:n-1-i;o=this.getSegment(p);var g=h[p],v=o.length({precision:f,subdivisions:g});if(o.isDifferentiable()&&(u=o,l=p,t<=d+v)){s=p,a=o.divideAtLength((r?1:-1)*(t-d),{precision:f,subdivisions:g});break}d+=v}if(!u)return null;a||(s=l,c=r?1:0,a=u.divideAtT(c));var m=this.clone();m.replaceSegment(s,a);var y=s,b=s+1,w=s+2;a[0].isDifferentiable()||(m.removeSegment(y),b-=1,w-=1);var x=m.getSegment(b).start;m.insertSegment(b,Et.createSegment("M",x)),w+=1,a[1].isDifferentiable()||(m.removeSegment(w-1),w-=1);var S=w-y-1;for(i=w;i<m.segments.length;i++){var k=this.getSegment(i-S);if("Z"===(o=m.getSegment(i)).type&&!k.subpathStartSegment.end.equals(o.subpathStartSegment.end)){var _=Et.createSegment("L",k.end);m.replaceSegment(i,_)}}return[new Et(m.segments.slice(0,b)),new Et(m.segments.slice(b))]},equals:function(t){if(!t)return!1;var e=this.segments,n=t.segments,r=e.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=e[i],a=n[i];if(o.type!==a.type||!o.equals(a))return!1}return!0},getSegment:function(t){var e=this.segments,n=e.length;if(0===n)throw new Error("Path has no segments.");if(t<0&&(t=n+t),t>=n||t<0)throw new Error("Index out of range.");return e[t]},getSegmentSubdivisions:function(t){for(var e=this.segments,n=e.length,r=void 0===(t=t||{}).precision?this.PRECISION:t.precision,i=[],o=0;o<n;o++){var a=e[o].getSubdivisions({precision:r});i.push(a)}return i},getSubpaths:function(){for(var t=this.clone().validate().segments,e=t.length,n=[],r=0;r<e;r++){var i=t[r];i.isSubpathStart?n.push(new Et(i)):n[n.length-1].appendSegment(i)}return n},insertSegment:function(t,e){var n,r=this.segments,i=r.length;if(t<0&&(t=i+t+1),t>i||t<0)throw new Error("Index out of range.");var o=null,a=null;if(0!==i&&(a=t>=1?(o=r[t-1]).nextSegment:r[0]),Array.isArray(e)){if(!(e=e.reduce((function(t,e){return t.concat(e)}),[]))[0].isSegment)throw new Error("Segments required.");for(var s=e.length,u=0;u<s;u++){var l=e[u];n=this.prepareSegment(l,o,a),r.splice(t+u,0,n),o=n}}else{if(!e||!e.isSegment)throw new Error("Segment required.");n=this.prepareSegment(e,o,a),r.splice(t,0,n)}},intersectionWithLine:function(t,e){var n=null,r=this.toPolylines(e);if(!r)return null;for(var i=0,o=r.length;i<o;i++){var a=r[i],s=t.intersect(a);s&&(n||(n=[]),Array.isArray(s)?Array.prototype.push.apply(n,s):n.push(s))}return n},isDifferentiable:function(){for(var t=this.segments,e=t.length,n=0;n<e;n++)if(t[n].isDifferentiable())return!0;return!1},isValid:function(){var t=this.segments;return 0===t.length||"M"===t[0].type},length:function(t){var e=this.segments,n=e.length;if(0===n)return 0;for(var r=void 0===(t=t||{}).precision?this.PRECISION:t.precision,i=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:r}):t.segmentSubdivisions,o=0,a=0;a<n;a++){var s=e[a],u=i[a];o+=s.length({subdivisions:u})}return o},lengthAtT:function(t,e){var n=this.segments,r=n.length;if(0===r)return 0;var i=t.segmentIndex;if(i<0)return 0;var o=t.value;i>=r?(i=r-1,o=1):o<0?o=0:o>1&&(o=1);for(var a,s=void 0===(e=e||{}).precision?this.PRECISION:e.precision,u=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:s}):e.segmentSubdivisions,l=0,c=0;c<i;c++){var f=n[c];a=u[c],l+=f.length({precisison:s,subdivisions:a})}return f=n[i],a=u[i],l+f.lengthAtT(o,{precisison:s,subdivisions:a})},pointAt:function(t,e){if(0===this.segments.length)return null;if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.length(r)*t;return this.pointAtLength(i,r)},pointAtLength:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;if(0===t)return this.start.clone();var i=!0;t<0&&(i=!1,t=-t);for(var o,a=void 0===(e=e||{}).precision?this.PRECISION:e.precision,s=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:a}):e.segmentSubdivisions,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=s[c],d=f.length({precision:a,subdivisions:h});if(f.isVisible){if(t<=u+d)return f.pointAtLength((i?1:-1)*(t-u),{precision:a,subdivisions:h});o=f}u+=d}return o?i?o.end:o.start:n[r-1].end.clone()},pointAtT:function(t){var e=this.segments,n=e.length;if(0===n)return null;var r=t.segmentIndex;if(r<0)return e[0].pointAtT(0);if(r>=n)return e[n-1].pointAtT(1);var i=t.value;return i<0?i=0:i>1&&(i=1),e[r].pointAtT(i)},PRECISION:3,prepareSegment:function(t,e,n){t.previousSegment=e,t.nextSegment=n,e&&(e.nextSegment=t),n&&(n.previousSegment=t);var r=t;return t.isSubpathStart&&(t.subpathStartSegment=t,r=n),r&&this.updateSubpathStartSegment(r),t},removeSegment:function(t){var e=this.segments,n=e.length;if(0===n)throw new Error("Path has no segments.");if(t<0&&(t=n+t),t>=n||t<0)throw new Error("Index out of range.");var r=e.splice(t,1)[0],i=r.previousSegment,o=r.nextSegment;i&&(i.nextSegment=o),o&&(o.previousSegment=i),r.isSubpathStart&&o&&this.updateSubpathStartSegment(o)},replaceSegment:function(t,e){var n,r=this.segments,i=r.length;if(0===i)throw new Error("Path has no segments.");if(t<0&&(t=i+t),t>=i||t<0)throw new Error("Index out of range.");var o=r[t],a=o.previousSegment,s=o.nextSegment,u=o.isSubpathStart;if(Array.isArray(e)){if(!(e=e.reduce((function(t,e){return t.concat(e)}),[]))[0].isSegment)throw new Error("Segments required.");r.splice(t,1);for(var l=e.length,c=0;c<l;c++){var f=e[c];n=this.prepareSegment(f,a,s),r.splice(t+c,0,n),a=n,u&&n.isSubpathStart&&(u=!1)}}else{if(!e||!e.isSegment)throw new Error("Segment required.");n=this.prepareSegment(e,a,s),r.splice(t,1,n),u&&n.isSubpathStart&&(u=!1)}u&&s&&this.updateSubpathStartSegment(s)},round:function(t){for(var e=this.segments,n=e.length,r=0;r<n;r++)e[r].round(t);return this},scale:function(t,e,n){for(var r=this.segments,i=r.length,o=0;o<i;o++)r[o].scale(t,e,n);return this},segmentAt:function(t,e){var n=this.segmentIndexAt(t,e);return n?this.getSegment(n):null},segmentAtLength:function(t,e){var n=this.segmentIndexAtLength(t,e);return n?this.getSegment(n):null},segmentIndexAt:function(t,e){if(0===this.segments.length)return null;t<0&&(t=0),t>1&&(t=1);var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.length(r)*t;return this.segmentIndexAtLength(i,r)},segmentIndexAtLength:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;var i=!0;t<0&&(i=!1,t=-t);for(var o=void 0===(e=e||{}).precision?this.PRECISION:e.precision,a=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):e.segmentSubdivisions,s=null,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=a[c],d=f.length({precision:o,subdivisions:h});if(f.isVisible){if(t<=u+d)return c;s=c}u+=d}return s},serialize:function(){if(!this.isValid())throw new Error("Invalid path segments.");return this.toString()},tangentAt:function(t,e){if(0===this.segments.length)return null;t<0&&(t=0),t>1&&(t=1);var n=void 0===(e=e||{}).precision?this.PRECISION:e.precision,r={precision:n,segmentSubdivisions:void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):e.segmentSubdivisions},i=this.length(r)*t;return this.tangentAtLength(i,r)},tangentAtLength:function(t,e){var n=this.segments,r=n.length;if(0===r)return null;var i=!0;t<0&&(i=!1,t=-t);for(var o,a=void 0===(e=e||{}).precision?this.PRECISION:e.precision,s=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:a}):e.segmentSubdivisions,u=0,l=0;l<r;l++){var c=i?l:r-1-l,f=n[c],h=s[c],d=f.length({precision:a,subdivisions:h});if(f.isDifferentiable()){if(t<=u+d)return f.tangentAtLength((i?1:-1)*(t-u),{precision:a,subdivisions:h});o=f}u+=d}if(o){var p=i?1:0;return o.tangentAtT(p)}return null},tangentAtT:function(t){var e=this.segments,n=e.length;if(0===n)return null;var r=t.segmentIndex;if(r<0)return e[0].tangentAtT(0);if(r>=n)return e[n-1].tangentAtT(1);var i=t.value;return i<0?i=0:i>1&&(i=1),e[r].tangentAtT(i)},toPoints:function(t){var e=this.segments,n=e.length;if(0===n)return null;for(var r=void 0===(t=t||{}).precision?this.PRECISION:t.precision,i=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:r}):t.segmentSubdivisions,o=[],a=[],s=0;s<n;s++){var u=e[s];if(u.isVisible){var l=i[s];if(l.length>0){var c=l.map((function(t){return t.start}));Array.prototype.push.apply(a,c)}else a.push(u.start)}else a.length>0&&(a.push(e[s-1].end),o.push(a),a=[])}return a.length>0&&(a.push(this.end),o.push(a)),o},toPolylines:function(t){var e=[],n=this.toPoints(t);if(!n)return null;for(var r=0,i=n.length;r<i;r++)e.push(new mt(n[r]));return e},toString:function(){for(var t=this.segments,e=t.length,n="",r=0;r<e;r++)n+=t[r].serialize()+" ";return n.trim()},translate:function(t,e){for(var n=this.segments,r=n.length,i=0;i<r;i++)n[i].translate(t,e);return this},updateSubpathStartSegment:function(t){for(var e=t.previousSegment;t&&!t.isSubpathStart;)t.subpathStartSegment=e?e.subpathStartSegment:null,e=t,t=t.nextSegment},validate:function(){return this.isValid()||this.insertSegment(0,Et.createSegment("M",0,0)),this}},Object.defineProperty(Et.prototype,"start",{configurable:!0,enumerable:!0,get:function(){var t=this.segments,e=t.length;if(0===e)return null;for(var n=0;n<e;n++){var r=t[n];if(r.isVisible)return r.start}return t[e-1].end}}),Object.defineProperty(Et.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var t=this.segments,e=t.length;if(0===e)return null;for(var n=e-1;n>=0;n--){var r=t[n];if(r.isVisible)return r.end}return t[e-1].end}});var Pt={bbox:function(){throw new Error("Declaration missing for virtual function.")},clone:function(){throw new Error("Declaration missing for virtual function.")},closestPoint:function(){throw new Error("Declaration missing for virtual function.")},closestPointLength:function(){throw new Error("Declaration missing for virtual function.")},closestPointNormalizedLength:function(){throw new Error("Declaration missing for virtual function.")},closestPointT:function(t){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(t);throw new Error("Neither closestPointT() nor closestPointNormalizedLength() function is implemented.")},closestPointTangent:function(){throw new Error("Declaration missing for virtual function.")},divideAt:function(){throw new Error("Declaration missing for virtual function.")},divideAtLength:function(){throw new Error("Declaration missing for virtual function.")},divideAtT:function(t){if(this.divideAt)return this.divideAt(t);throw new Error("Neither divideAtT() nor divideAt() function is implemented.")},equals:function(){throw new Error("Declaration missing for virtual function.")},getSubdivisions:function(){throw new Error("Declaration missing for virtual function.")},isDifferentiable:function(){throw new Error("Declaration missing for virtual function.")},isSegment:!0,isSubpathStart:!1,isVisible:!0,length:function(){throw new Error("Declaration missing for virtual function.")},lengthAtT:function(t){if(t<=0)return 0;var e=this.length();return t>=1?e:e*t},nextSegment:null,pointAt:function(){throw new Error("Declaration missing for virtual function.")},pointAtLength:function(){throw new Error("Declaration missing for virtual function.")},pointAtT:function(t){if(this.pointAt)return this.pointAt(t);throw new Error("Neither pointAtT() nor pointAt() function is implemented.")},previousSegment:null,round:function(){throw new Error("Declaration missing for virtual function.")},subpathStartSegment:null,scale:function(){throw new Error("Declaration missing for virtual function.")},serialize:function(){throw new Error("Declaration missing for virtual function.")},tangentAt:function(){throw new Error("Declaration missing for virtual function.")},tangentAtLength:function(){throw new Error("Declaration missing for virtual function.")},tangentAtT:function(t){if(this.tangentAt)return this.tangentAt(t);throw new Error("Neither tangentAtT() nor tangentAt() function is implemented.")},toString:function(){throw new Error("Declaration missing for virtual function.")},translate:function(){throw new Error("Declaration missing for virtual function.")}};Object.defineProperty(Pt,"end",{configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(Pt,"start",{configurable:!0,enumerable:!0,get:function(){if(!this.previousSegment)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path; OR segment has not yet been added to a path.)");return this.previousSegment.end}}),Object.defineProperty(Pt,"type",{configurable:!0,enumerable:!0,get:function(){throw new Error("Bad segment declaration. No type specified.")}});var Ct=function t(){for(var e,n,r=[],i=arguments.length,o=0;o<i;o++)r.push(arguments[o]);if(!(this instanceof t))return At(t,r);if(0===i)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates (none provided).");if(r[0]instanceof ht){if(1===i)return this.end=r[0].end.clone(),this;throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+i+" lines provided).")}if("string"==typeof r[0]||"number"==typeof r[0]){if(2===i)return this.end=new Y(+r[0],+r[1]),this;if(i<2)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+i+" coordinates provided).");var a;for(e=[],o=0;o<i;o+=2)a=r.slice(o,o+2),e.push(At(t,a));return e}if(1===i)return this.end=new Y(r[0]),this;for(e=[],o=0;o<i;o+=1)n=r[o],e.push(new t(n));return e},Tt={clone:function(){return new Ct(this.end)},divideAt:function(t){var e=new ht(this.start,this.end).divideAt(t);return[new Ct(e[0]),new Ct(e[1])]},divideAtLength:function(t){var e=new ht(this.start,this.end).divideAtLength(t);return[new Ct(e[0]),new Ct(e[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return!!this.previousSegment&&!this.start.equals(this.end)},round:function(t){return this.end.round(t),this},scale:function(t,e,n){return this.end.scale(t,e,n),this},serialize:function(){var t=this.end;return this.type+" "+t.x+" "+t.y},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(t,e){return this.end.translate(t,e),this}};Object.defineProperty(Tt,"type",{configurable:!0,enumerable:!0,value:"L"}),Ct.prototype=_t(Pt,ht.prototype,Tt);var Nt=function t(){for(var e,n,r=[],i=arguments.length,o=0;o<i;o++)r.push(arguments[o]);if(!(this instanceof t))return At(t,r);if(0===i)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates (none provided).");if(r[0]instanceof kt){if(1===i)return this.controlPoint1=r[0].controlPoint1.clone(),this.controlPoint2=r[0].controlPoint2.clone(),this.end=r[0].end.clone(),this;throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+i+" curves provided).")}if("string"==typeof r[0]||"number"==typeof r[0]){if(6===i)return this.controlPoint1=new Y(+r[0],+r[1]),this.controlPoint2=new Y(+r[2],+r[3]),this.end=new Y(+r[4],+r[5]),this;if(i<6)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+i+" coordinates provided).");var a;for(e=[],o=0;o<i;o+=6)a=r.slice(o,o+6),e.push(At(t,a));return e}if(3===i)return this.controlPoint1=new Y(r[0]),this.controlPoint2=new Y(r[1]),this.end=new Y(r[2]),this;if(i<3)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+i+" points provided).");for(e=[],o=0;o<i;o+=3)n=r.slice(o,o+3),e.push(At(t,n));return e},Lt={clone:function(){return new Nt(this.controlPoint1,this.controlPoint2,this.end)},divideAt:function(t,e){var n=new kt(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAt(t,e);return[new Nt(n[0]),new Nt(n[1])]},divideAtLength:function(t,e){var n=new kt(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAtLength(t,e);return[new Nt(n[0]),new Nt(n[1])]},divideAtT:function(t){var e=new kt(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAtT(t);return[new Nt(e[0]),new Nt(e[1])]},isDifferentiable:function(){if(!this.previousSegment)return!1;var t=this.start,e=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(t.equals(e)&&e.equals(n)&&n.equals(r))},round:function(t){return this.controlPoint1.round(t),this.controlPoint2.round(t),this.end.round(t),this},scale:function(t,e,n){return this.controlPoint1.scale(t,e,n),this.controlPoint2.scale(t,e,n),this.end.scale(t,e,n),this},serialize:function(){var t=this.controlPoint1,e=this.controlPoint2,n=this.end;return this.type+" "+t.x+" "+t.y+" "+e.x+" "+e.y+" "+n.x+" "+n.y},toString:function(){return this.type+" "+this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(t,e){return this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e),this}};Object.defineProperty(Lt,"type",{configurable:!0,enumerable:!0,value:"C"}),Nt.prototype=_t(Pt,kt.prototype,Lt);var Mt=function t(){for(var e,n,r=[],i=arguments.length,o=0;o<i;o++)r.push(arguments[o]);if(!(this instanceof t))return At(t,r);if(0===i)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates (none provided).");if(r[0]instanceof ht){if(1===i)return this.end=r[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+i+" lines provided).")}if(r[0]instanceof kt){if(1===i)return this.end=r[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+i+" curves provided).")}if("string"==typeof r[0]||"number"==typeof r[0]){if(2===i)return this.end=new Y(+r[0],+r[1]),this;if(i<2)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+i+" coordinates provided).");var a;for(e=[],o=0;o<i;o+=2)a=r.slice(o,o+2),0===o?e.push(At(t,a)):e.push(At(Ct,a));return e}if(1===i)return this.end=new Y(r[0]),this;for(e=[],o=0;o<i;o+=1)n=r[o],0===o?e.push(new t(n)):e.push(new Ct(n));return e},Ot={bbox:function(){return null},clone:function(){return new Mt(this.end)},closestPoint:function(){return this.end.clone()},closestPointNormalizedLength:function(){return 0},closestPointLength:function(){return 0},closestPointT:function(){return 1},closestPointTangent:function(){return null},divideAt:function(){return[this.clone(),this.clone()]},divideAtLength:function(){return[this.clone(),this.clone()]},equals:function(t){return this.end.equals(t.end)},getSubdivisions:function(){return[]},isDifferentiable:function(){return!1},isSubpathStart:!0,isVisible:!1,length:function(){return 0},lengthAtT:function(){return 0},pointAt:function(){return this.end.clone()},pointAtLength:function(){return this.end.clone()},pointAtT:function(){return this.end.clone()},round:function(t){return this.end.round(t),this},scale:function(t,e,n){return this.end.scale(t,e,n),this},serialize:function(){var t=this.end;return this.type+" "+t.x+" "+t.y},tangentAt:function(){return null},tangentAtLength:function(){return null},tangentAtT:function(){return null},toString:function(){return this.type+" "+this.end},translate:function(t,e){return this.end.translate(t,e),this}};Object.defineProperty(Ot,"start",{configurable:!0,enumerable:!0,get:function(){throw new Error("Illegal access. Moveto segments should not need a start property.")}}),Object.defineProperty(Ot,"type",{configurable:!0,enumerable:!0,value:"M"}),Mt.prototype=_t(Pt,Ot);var Rt=function t(){for(var e=[],n=arguments.length,r=0;r<n;r++)e.push(arguments[r]);if(!(this instanceof t))return At(t,e);if(n>0)throw new Error("Closepath constructor expects no arguments.");return this},Ft={clone:function(){return new Rt},divideAt:function(t){var e=new ht(this.start,this.end).divideAt(t);return[e[1].isDifferentiable()?new Ct(e[0]):this.clone(),new Ct(e[1])]},divideAtLength:function(t){var e=new ht(this.start,this.end).divideAtLength(t);return[e[1].isDifferentiable()?new Ct(e[0]):this.clone(),new Ct(e[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return!(!this.previousSegment||!this.subpathStartSegment||this.start.equals(this.end))},round:function(){return this},scale:function(){return this},serialize:function(){return this.type},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(){return this}};Object.defineProperty(Ft,"end",{configurable:!0,enumerable:!0,get:function(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. Moveto); OR segment has not yet been added to a path.)");return this.subpathStartSegment.end}}),Object.defineProperty(Ft,"type",{configurable:!0,enumerable:!0,value:"Z"}),Rt.prototype=_t(Pt,ht.prototype,Ft);var Dt=Et.segmentTypes={L:Ct,C:Nt,M:Mt,Z:Rt,z:Rt};Et.regexSupportedData=new RegExp("^[\\s\\d"+Object.keys(Dt).join("")+",.]*$"),Et.isDataSupported=function(t){return"string"==typeof t&&this.regexSupportedData.test(t)};var jt={curveThroughPoints:function(t){return console.warn("deprecated"),new Et(kt.throughPoints(t)).serialize()},getCurveControlPoints:function(t){console.warn("deprecated");var e,n=[],r=[],i=t.length-1;if(1==i)return n[0]=new Y((2*t[0].x+t[1].x)/3,(2*t[0].y+t[1].y)/3),r[0]=new Y(2*n[0].x-t[0].x,2*n[0].y-t[0].y),[n,r];var o=[];for(e=1;e<i-1;e++)o[e]=4*t[e].x+2*t[e+1].x;o[0]=t[0].x+2*t[1].x,o[i-1]=(8*t[i-1].x+t[i].x)/2;var a=this.getFirstControlPoints(o);for(e=1;e<i-1;++e)o[e]=4*t[e].y+2*t[e+1].y;o[0]=t[0].y+2*t[1].y,o[i-1]=(8*t[i-1].y+t[i].y)/2;var s=this.getFirstControlPoints(o);for(e=0;e<i;e++)n.push(new Y(a[e],s[e])),e<i-1?r.push(new Y(2*t[e+1].x-a[e+1],2*t[e+1].y-s[e+1])):r.push(new Y((t[i].x+a[i-1])/2,(t[i].y+s[i-1])/2));return[n,r]},getCurveDivider:function(t,e,n,r){console.warn("deprecated");var i=new kt(t,e,n,r);return function(t){var e=i.divide(t);return[{p0:e[0].start,p1:e[0].controlPoint1,p2:e[0].controlPoint2,p3:e[0].end},{p0:e[1].start,p1:e[1].controlPoint1,p2:e[1].controlPoint2,p3:e[1].end}]}},getFirstControlPoints:function(t){console.warn("deprecated");var e=t.length,n=[],r=[],i=2;n[0]=t[0]/i;for(var o=1;o<e;o++)r[o]=1/i,i=(o<e-1?4:3.5)-r[o],n[o]=(t[o]-n[o-1])/i;for(o=1;o<e;o++)n[e-o-1]-=r[e-o]*n[e-o];return n},getInversionSolver:function(t,e,n,r){console.warn("deprecated");var i=new kt(t,e,n,r);return function(t){return i.closestPointT(t)}}},It=function t(e){return this instanceof t?"string"==typeof e?new t.parse(e):void(this.points=Array.isArray(e)?e.map(Y):[]):new t(e)};function Bt(t,e,n,r){switch(t.type){case j.Line:switch(e.type){case j.Line:return zt(t,e)}break;case j.Ellipse:switch(e.type){case j.Line:return Vt(t,e);case j.Ellipse:return $t(t,e)}break;case j.Rect:switch(e.type){case j.Line:return Ut(t,e);case j.Ellipse:return qt(t,e);case j.Rect:return Ht(t,e)}break;case j.Polyline:switch(e.type){case j.Line:return Gt(t,e);case j.Ellipse:return Wt(t,e);case j.Rect:return Yt(t,e);case j.Polyline:return Xt(t,e)}break;case j.Polygon:switch(e.type){case j.Line:return Qt(t,e);case j.Ellipse:return Kt(t,e);case j.Rect:return Jt(t,e);case j.Polyline:return Zt(t,e);case j.Polygon:return te(t,e)}break;case j.Path:switch(e.type){case j.Line:return ee(t,e,n);case j.Ellipse:return ne(t,e,n);case j.Rect:return re(t,e,n);case j.Polyline:return ie(t,e,n);case j.Polygon:return oe(t,e,n);case j.Path:return ae(t,e,n,r)}}switch(e.type){case j.Ellipse:case j.Rect:case j.Polyline:case j.Polygon:case j.Path:return Bt(e,t,r,n);default:throw Error("The intersection for ".concat(t," and ").concat(e," could not be found."))}}function zt(t,e){var n=t.start.x,r=t.start.y,i=t.end.x,o=t.end.y,a=e.start.x,s=e.start.y,u=i-n,l=o-r,c=e.end.x-a,f=e.end.y-s,h=n-a,d=r-s,p=u*f-c*l,g=(u*d-l*h)/p,v=(c*d-f*h)/p;return g>=0&&g<=1&&v>=0&&v<=1}function Vt(t,e){var n=t.a,r=t.b,i=t.x,o=t.y,a=e.start.x-i,s=e.end.x-i,u=e.start.y-o,l=n*n,c=r*r,f=s-a,h=e.end.y-o-u,d=f*f/l+h*h/c,p=2*a*f/l+2*u*h/c,g=p*p-4*d*(a*a/l+u*u/c-1);if(0===g){var v=-p/2/d;return v>=0&&v<=1}if(g>0){var m=Math.sqrt(g),y=(-p+m)/2/d,b=(-p-m)/2/d;return y>=0&&y<=1||b>=0&&b<=1}return!1}function $t(t,e){return function(t,e,n,r){var i=Math.cos,o=Math.sin,a=o(0),s=i(0),u=o(0),l=i(0),c=a*a,f=s*s,h=a*s,d=u*u,p=l*l,g=u*l,v=t.a*t.a,m=t.b*t.b,y=n.a*n.a,b=n.b*n.b,w=v*c+m*f,x=y*d+b*p,S=v*f+m*c,k=y*p+b*d,_=2*(m-v)*h,E=2*(b-y)*g,A=-2*w*t.x-_*t.y,P=-2*x*n.x-E*n.y,C=-_*t.x-2*S*t.y,T=-E*n.x-2*k*n.y,N=w*t.x*t.x+S*t.y*t.y+_*t.x*t.y-v*m,L=x*n.x*n.x+k*n.y*n.y+E*n.x*n.y-y*b;E/=2,P/=2,T/=2;var M=pe([[w,_/=2,A/=2],[_,S,C/=2],[A,C,N]]),O=pe([[x,E,P],[E,k,T],[P,T,L]]),R=.33333333*(pe([[x,_,A],[E,S,C],[P,C,N]])+pe([[w,E,A],[_,k,C],[A,T,N]])+pe([[w,_,P],[_,S,T],[A,C,L]])),F=.33333333*(pe([[w,E,P],[_,k,T],[A,T,L]])+pe([[x,_,P],[E,S,T],[P,C,L]])+pe([[x,E,A],[E,k,C],[P,T,N]])),D=de([[M,R],[R,F]]),j=de([[M,F],[R,O]]),I=de([[R,F],[F,O]]);return!(de([[2*D,j],[j,2*I]])>0&&(F>0||R>0))}(t,0,e)}function Ut(t,e){var n=e.start,r=e.end,i=t.x,o=t.y,a=t.width,s=t.height;return!(n.x>i+a&&r.x>i+a||n.x<i&&r.x<i||n.y>o+s&&r.y>o+s||n.y<o&&r.y<o)&&(!(!t.containsPoint(e.start)&&!t.containsPoint(e.end))||zt(t.topLine(),e)||zt(t.rightLine(),e)||zt(t.bottomLine(),e)||zt(t.leftLine(),e))}function qt(t,e){return!!Ht(t,ut.fromEllipse(e))&&Kt(It.fromRect(t),e)}function Ht(t,e){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Gt(t,e){return se(t,e,{interior:!1})}function Wt(t,e){return ue(t,e,{interior:!1})}function Yt(t,e){return le(t,e,{interior:!1})}function Xt(t,e){return fe(t,e,{interior:!1})}function Qt(t,e){return se(t,e,{interior:!0})}function Kt(t,e){return ue(t,e,{interior:!0})}function Jt(t,e){return le(t,e,{interior:!0})}function Zt(t,e){return fe(t,e,{interior:!0})}function te(t,e){return he(t,e,{interior:!0})}function ee(t,e,n){return t.getSubpaths().some((function(t){var r=l(t.toPolylines(n),1)[0];return"Z"===t.getSegment(-1).type?Qt(r,e):Gt(r,e)}))}function ne(t,e,n){return t.getSubpaths().some((function(t){var r=l(t.toPolylines(n),1)[0];return"Z"===t.getSegment(-1).type?Kt(r,e):Wt(r,e)}))}function re(t,e,n){return oe(t,It.fromRect(e),n)}function ie(t,e,n){return ce(t,e,n,{interior:!1})}function oe(t,e,n){return ce(t,e,n,{interior:!0})}function ae(t,e,n,r){return t.getSubpaths().some((function(t){var i=l(t.toPolylines(n),1)[0];return"Z"===t.getSegment(-1).type?oe(e,i,r):ie(e,i,r)}))}function se(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.interior,o=void 0!==i&&i;if(o){if(t.containsPoint(e.start))return!0;var a=t.start,s=t.end,l=t.points;n=s.equals(a)?l:[].concat(u(l),[a])}else n=t.points;for(var c=n,f=c.length,h=new ht,d=0;d<f-1;d++)if(h.start=n[d],h.end=n[d+1],zt(e,h))return!0;return!1}function ue(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.start,o=t.end,a=t.points;if(e.containsPoint(i))return!0;var s=r.interior,l=void 0!==s&&s;if(l){if(t.containsPoint(e.center()))return!0;n=o.equals(i)?a:[].concat(u(a),[i])}else n=a;for(var c=n,f=c.length,h=new ht,d=0;d<f-1;d++)if(h.start=n[d],h.end=n[d+1],Vt(e,h))return!0;return!1}function le(t,e,n){return he(t,It.fromRect(e),n)}function ce(t,e,n,r){return t.getSubpaths().some((function(t){var i=l(t.toPolylines(n),1)[0];return"Z"===t.getSegment(-1).type?he(e,i,r):fe(e,i,r)}))}function fe(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.interior,o=void 0!==i&&i;if(o){var a=e.start;if(t.containsPoint(a))return!0;n=t.clone().close()}else n=t;for(var s=e.points,u=s.length,l=new ht,c=0;c<u-1;c++)if(l.start=s[c],l.end=s[c+1],Gt(n,l))return!0;return!1}function he(t,e,n){return e.containsPoint(t.start)||fe(t,e.clone().close(),n)}function de(t){return t[0][0]*t[1][1]-t[0][1]*t[1][0]}function pe(t){return t[0][0]*t[1][1]*t[2][2]-t[0][0]*t[1][2]*t[2][1]-t[0][1]*t[1][0]*t[2][2]+t[0][1]*t[1][2]*t[2][0]+t[0][2]*t[1][0]*t[2][1]-t[0][2]*t[1][1]*t[2][0]}It.parse=function(t){return new It(pt(t))},It.fromRect=function(t){return new It([t.topLeft(),t.topRight(),t.bottomRight(),t.bottomLeft()])},It.prototype=_t(mt.prototype,{type:j.Polygon,clone:function(){return new It(gt(this.points))},convexHull:function(){return new It(vt(this.points))},lengthPoints:function(){var t=this.start,e=this.end,n=this.points;return n.length<=1||t.equals(e)?n:[].concat(u(n),[t.clone()])}});var ge,ve,me=e,ye=function(){if("object"!=("undefined"==typeof window?"undefined":h(window))||!window.SVGAngle&&!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"))return function(){throw new Error("SVG is required to use Vectorizer.")};var t={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},e=Math,r=e.PI,i=e.atan2,o=e.sqrt,a=e.min,s=e.max,u=e.cos,l=e.sin,c=function e(n,r,i){if(!(this instanceof e))return e.apply(Object.create(e.prototype),arguments);if(n){if(e.isV(n)&&(n=n.node),r=r||{},e.isString(n)){if("svg"===(n=n.trim()).toLowerCase())n=e.createSvgDocument();else if("<"===n[0]){var o=e.createSvgDocument(n);if(o.childNodes.length>1){var a,s,u=[];for(a=0,s=o.childNodes.length;a<s;a++){var l=o.childNodes[a];u.push(new e(document.importNode(l,!0)))}return u}n=document.importNode(o.firstChild,!0)}else n=document.createElementNS(t.svg,n);e.ensureId(n)}return this.node=n,this.setAttributes(r),i&&this.append(i),this}},f=c.prototype;function d(t,e,n){n||(n={});for(var r=n.includeAnnotationIndices,i=n.eol,o=n.lineHeight,a=n.baseSize,s=0,u={},l=e.length-1,f=0;f<=l;f++){var h=e[f],d=null;if(c.isObject(h)){var p=h.attrs,g=c("tspan",p),v=g.node,m=h.t;i&&f===l&&(m+=i),v.textContent=m;var y=p.class;y&&g.addClass(y),r&&g.attr("annotations",h.annotations),d=parseFloat(p["font-size"]),isFinite(d)||(d=a),d&&d>s&&(s=d)}else i&&f===l&&(h+=i),v=document.createTextNode(h||" "),a&&a>s&&(s=a);t.appendChild(v)}return s&&(u.maxFontSize=s),o?u.lineHeight=o:s&&(u.lineHeight=1.2*s),u}Object.defineProperty(f,"id",{enumerable:!0,get:function(){return this.node.id},set:function(t){this.node.id=t}}),f.getTransformToElement=function(t){var e=this.node;if(c.isSVGGraphicsElement(t)&&c.isSVGGraphicsElement(e)){var n=c.toNode(t).getScreenCTM(),r=e.getScreenCTM();if(n&&r)return n.inverse().multiply(r)}return c.createSVGMatrix()},f.transform=function(t,e){var n=this.node;if(c.isUndefined(t))return c.transformStringToMatrix(this.attr("transform"));if(e&&e.absolute)return this.attr("transform",c.matrixToTransformString(t));var r=c.createSVGTransform(t);return n.transform.baseVal.appendItem(r),this},f.translate=function(t,e,n){n=n||{},e=e||0;var r=this.attr("transform")||"",i=c.parseTransformString(r);if(r=i.value,c.isUndefined(t))return i.translate;r=r.replace(/translate\([^)]*\)/g,"").trim();var o="translate("+(n.absolute?t:i.translate.tx+t)+","+(n.absolute?e:i.translate.ty+e)+")";return this.attr("transform",(o+" "+r).trim()),this},f.rotate=function(t,e,n,r){r=r||{};var i=this.attr("transform")||"",o=c.parseTransformString(i);if(i=o.value,c.isUndefined(t))return o.rotate;i=i.replace(/rotate\([^)]*\)/g,"").trim(),t%=360;var a="rotate("+(r.absolute?t:o.rotate.angle+t)+(void 0!==e&&void 0!==n?","+e+","+n:"")+")";return this.attr("transform",(i+" "+a).trim()),this},f.scale=function(t,e){e=c.isUndefined(e)?t:e;var n=this.attr("transform")||"",r=c.parseTransformString(n);if(n=r.value,c.isUndefined(t))return r.scale;n=n.replace(/scale\([^)]*\)/g,"").trim();var i="scale("+t+","+e+")";return this.attr("transform",(n+" "+i).trim()),this},f.bbox=function(t,e){var n,r=this.node,i=r.ownerSVGElement;if(!i)return new ut(0,0,0,0);try{n=r.getBBox()}catch(t){n={x:r.clientLeft,y:r.clientTop,width:r.clientWidth,height:r.clientHeight}}if(t)return new ut(n);var o=this.getTransformToElement(e||i);return c.transformRect(n,o)},f.getBBox=function(t){var e,n={},r=this.node;if(!r.ownerSVGElement||!c.isSVGGraphicsElement(r))return new ut(0,0,0,0);if(t&&(t.target&&(n.target=c.toNode(t.target)),t.recursive&&(n.recursive=t.recursive)),n.recursive){var i=this.children(),o=i.length;if(0===o)return this.getBBox({target:n.target,recursive:!1});n.target||(n.target=this);for(var a=0;a<o;a++){var s,u=i[a];s=0===u.children().length?u.getBBox({target:n.target,recursive:!1}):u.getBBox({target:n.target,recursive:!0}),e=e?e.union(s):s}return e}try{e=r.getBBox()}catch(t){e={x:r.clientLeft,y:r.clientTop,width:r.clientWidth,height:r.clientHeight}}if(n.target){var l=this.getTransformToElement(n.target);return c.transformRect(e,l)}return new ut(e)};var p=/em$/;function g(t,e){var n=parseFloat(t);return p.test(t)?n*e:n}f.text=function(e,n){if(e&&"string"!=typeof e)throw new Error("Vectorizer: text() expects the first argument to be a string.");e=c.sanitizeText(e),n||(n={});var r=n.displayEmpty,i=n.eol,o=n.textPath,a=n.textVerticalAnchor,s="middle"===a||"bottom"===a||"top"===a,u=n.x;void 0===u&&(u=this.attr("x")||0);var l=n.includeAnnotationIndices,f=n.annotations;f&&!c.isArray(f)&&(f=[f]);var h=n.lineHeight,v="auto"===h,m=v?"1.5em":h||"1em";this.empty(),this.attr({"xml:space":"preserve",display:e||r?null:"none"});var y=parseFloat(this.attr("font-size"));y||(y=16,(s||f)&&this.attr("font-size",y));var b,w=document;o?("string"==typeof o&&(o={d:o}),b=function(t,e){t||(t={});var n=c("textPath"),r=t.d;if(r&&void 0===t["xlink:href"]){var i=c("path").attr("d",r).appendTo(e.defs());n.attr("xlink:href","#"+i.id)}return c.isObject(t)&&n.attr(t),n.node}(o,this)):b=w.createDocumentFragment();for(var x,S=0,k=e.split("\n"),_=[],E=0,A=k.length-1;E<=A;E++){var P,C=m,T="v-line",N=w.createElementNS(t.svg,"tspan"),L=k[E];if(L)if(f){var M=(P=d(N,c.annotateString(L,f,{offset:-S,includeAnnotationIndices:l}),{includeAnnotationIndices:l,eol:E!==A&&i,lineHeight:v?null:m,baseSize:y})).lineHeight;M&&v&&0!==E&&(C=M),0===E&&(x=.8*P.maxFontSize)}else i&&E!==A&&(L+=i),N.textContent=L;else{N.textContent="-",T+=" v-empty-line";var O=N.style;O.fillOpacity=0,O.strokeOpacity=0,f&&(P={})}P&&_.push(P),E>0&&N.setAttribute("dy",C),(E>0||o)&&N.setAttribute("x",u),N.className.baseVal=T,b.appendChild(N),S+=L.length+1}if(s)if(f)C=function(t,e,n,r){if(!Array.isArray(e))return 0;var i=e.length;if(!i)return 0;for(var o=e[0],a=g(o.maxFontSize,n)||n,s=0,u=g(r,n),l=1;l<i;l++)s+=g((o=e[l]).lineHeight,n)||u;var c,f=g(o.maxFontSize,n)||n;switch(t){case"middle":c=a/2-.15*f-s/2;break;case"bottom":c=-.25*f-s;break;default:case"top":c=.8*a}return c}(a,_,y,m);else if("top"===a)C="0.8em";else{var R;switch(A>0?(R=parseFloat(m)||1,R*=A,p.test(m)||(R/=y)):R=0,a){case"middle":C=.3-R/2+"em";break;case"bottom":C=-R-.3+"em"}}else 0===a?C="0em":a?C=a:(C=0,null===this.attr("y")&&this.attr("y",x||"0.8em"));return b.firstChild.setAttribute("dy",C),this.append(b),this},f.removeAttr=function(t){var e=c.qualifyAttr(t),n=this.node;return e.ns?n.hasAttributeNS(e.ns,e.local)&&n.removeAttributeNS(e.ns,e.local):n.hasAttribute(t)&&n.removeAttribute(t),this},f.attr=function(t,e){if(c.isUndefined(t)){for(var n=this.node.attributes,r={},i=0;i<n.length;i++)r[n[i].name]=n[i].value;return r}if(c.isString(t)&&c.isUndefined(e))return this.node.getAttribute(t);if("object"==h(t))for(var o in t)t.hasOwnProperty(o)&&this.setAttribute(o,t[o]);else this.setAttribute(t,e);return this},f.normalizePath=function(){return"PATH"===this.tagName()&&this.attr("d",c.normalizePathData(this.attr("d"))),this},f.remove=function(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this},f.empty=function(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this},f.setAttributes=function(t){for(var e in t)t.hasOwnProperty(e)&&this.setAttribute(e,t[e]);return this},f.append=function(t){c.isArray(t)||(t=[t]);for(var e=0,n=t.length;e<n;e++)this.node.appendChild(c.toNode(t[e]));return this},f.prepend=function(t){var e=this.node.firstChild;return e?c(e).before(t):this.append(t)},f.before=function(t){var e=this.node,n=e.parentNode;if(n){c.isArray(t)||(t=[t]);for(var r=0,i=t.length;r<i;r++)n.insertBefore(c.toNode(t[r]),e)}return this},f.appendTo=function(t){return c.toNode(t).appendChild(this.node),this},f.svg=function(){return this.node instanceof window.SVGSVGElement?this:c(this.node.ownerSVGElement)},f.tagName=function(){return this.node.tagName.toUpperCase()},f.defs=function(){var t=this.svg()||this,e=t.node.getElementsByTagName("defs")[0];return e?c(e):c("defs").appendTo(t)},f.clone=function(){var t=c(this.node.cloneNode(!0));return t.node.id=c.uniqueId(),t},f.findOne=function(t){var e=this.node.querySelector(t);return e?c(e):void 0},f.find=function(t){var e=[],n=this.node.querySelectorAll(t);if(n)for(var r=0;r<n.length;r++)e.push(c(n[r]));return e},f.children=function(){for(var t=this.node.childNodes,e=[],n=0;n<t.length;n++)1===t[n].nodeType&&e.push(c(t[n]));return e},f.parent=function(){return c(this.node.parentNode)||null},f.index=function(){for(var t=0,e=this.node.previousSibling;e;)1===e.nodeType&&t++,e=e.previousSibling;return t},f.findParentByClass=function(t,e){for(var n=this.node.ownerSVGElement,r=this.node.parentNode;r&&r!==e&&r!==n;){var i=c(r);if(i.hasClass(t))return i;r=r.parentNode}return null},f.contains=function(t){var e=this.node,n=c.toNode(t),r=n&&n.parentNode;return e===r||!!(r&&1===r.nodeType&&16&e.compareDocumentPosition(r))},f.toLocalPoint=function(t,e){var n=this.svg().node,r=n.createSVGPoint();r.x=t,r.y=e;try{var i=r.matrixTransform(n.getScreenCTM().inverse()),o=this.getTransformToElement(n).inverse()}catch(t){return r}return i.matrixTransform(o)},f.translateCenterToPoint=function(t){var e=this.getBBox({target:this.svg()}).center();return this.translate(t.x-e.x,t.y-e.y),this},f.translateAndAutoOrient=function(t,e,n){t=new Y(t),e=new Y(e),n||(n=this.svg());var r=this.scale();this.attr("transform","");var i=this.getBBox({target:n}).scale(r.sx,r.sy),o=c.createSVGTransform();o.setTranslate(-i.x-i.width/2,-i.y-i.height/2);var a=c.createSVGTransform(),s=t.angleBetween(e,t.clone().offset(1,0));s&&a.setRotate(s,0,0);var u=c.createSVGTransform(),l=t.clone().move(e,i.width/2);u.setTranslate(2*t.x-l.x,2*t.y-l.y);var f=this.getTransformToElement(n),h=c.createSVGTransform();return h.setMatrix(u.matrix.multiply(a.matrix.multiply(o.matrix.multiply(f.scale(r.sx,r.sy))))),this.attr("transform",c.matrixToTransformString(h.matrix)),this},f.animateAlongPath=function(t,e){e=c.toNode(e);var n=c.ensureId(e),r=c("animateMotion",t),i=c("mpath",{"xlink:href":"#"+n});r.append(i),this.append(r);try{r.node.beginElement()}catch(t){if("fake"===document.documentElement.getAttribute("smiling")){var o=r.node;o.animators=[];var a=o.getAttribute("id");a&&(id2anim[a]=o);for(var s=getTargets(o),u=0,l=s.length;u<l;u++){var f=s[u],h=new Animator(o,f,u);animators.push(h),o.animators[u]=h,h.register()}}}return this},f.hasClass=function(t){return new RegExp("(\\s|^)"+t+"(\\s|$)").test(this.node.getAttribute("class"))},f.addClass=function(t){if(t&&!this.hasClass(t)){var e=this.node.getAttribute("class")||"";this.node.setAttribute("class",(e+" "+t).trim())}return this},f.removeClass=function(t){if(t&&this.hasClass(t)){var e=this.node.getAttribute("class").replace(new RegExp("(\\s|^)"+t+"(\\s|$)","g"),"$2");this.node.setAttribute("class",e)}return this},f.toggleClass=function(t,e){return(c.isUndefined(e)?this.hasClass(t):!e)?this.removeClass(t):this.addClass(t),this},f.sample=function(t){t=t||1;for(var e,n=this.node,r=n.getTotalLength(),i=[],o=0;o<r;)e=n.getPointAtLength(o),i.push({x:e.x,y:e.y,distance:o}),o+=t;return i},f.convertToPath=function(){var t=c("path");t.attr(this.attr());var e=this.convertToPathData();return e&&t.attr("d",e),t},f.convertToPathData=function(){var t=this.tagName();switch(t){case"PATH":return this.attr("d");case"LINE":return c.convertLineToPathData(this.node);case"POLYGON":return c.convertPolygonToPathData(this.node);case"POLYLINE":return c.convertPolylineToPathData(this.node);case"ELLIPSE":return c.convertEllipseToPathData(this.node);case"CIRCLE":return c.convertCircleToPathData(this.node);case"RECT":return c.convertRectToPathData(this.node)}throw new Error(t+" cannot be converted to PATH.")},c.prototype.toGeometryShape=function(){var t,e,n,r,i,o,a,s,u,l,f,h,d,p,g;switch(this.tagName()){case"RECT":return t=parseFloat(this.attr("x"))||0,e=parseFloat(this.attr("y"))||0,n=parseFloat(this.attr("width"))||0,r=parseFloat(this.attr("height"))||0,new ut(t,e,n,r);case"CIRCLE":return i=parseFloat(this.attr("cx"))||0,o=parseFloat(this.attr("cy"))||0,a=parseFloat(this.attr("r"))||0,new Z({x:i,y:o},a,a);case"ELLIPSE":return i=parseFloat(this.attr("cx"))||0,o=parseFloat(this.attr("cy"))||0,s=parseFloat(this.attr("rx"))||0,u=parseFloat(this.attr("ry"))||0,new Z({x:i,y:o},s,u);case"POLYLINE":return l=c.getPointsFromSvgNode(this),new mt(l);case"POLYGON":return(l=c.getPointsFromSvgNode(this)).length>1&&l.push(l[0]),new mt(l);case"PATH":return f=this.attr("d"),Et.isDataSupported(f)||(f=c.normalizePathData(f)),new Et(f);case"LINE":return h=parseFloat(this.attr("x1"))||0,p=parseFloat(this.attr("y1"))||0,d=parseFloat(this.attr("x2"))||0,g=parseFloat(this.attr("y2"))||0,new ht({x:h,y:p},{x:d,y:g})}return this.getBBox()},f.findIntersection=function(t,e){var n=this.svg().node;e=e||n;var r=this.getBBox({target:e}),i=r.center();if(r.intersectionWithLineFromCenterToPoint(t)){var o,a=this.tagName();if("RECT"===a){var s=new ut(parseFloat(this.attr("x")||0),parseFloat(this.attr("y")||0),parseFloat(this.attr("width")),parseFloat(this.attr("height"))),u=this.getTransformToElement(e),l=c.decomposeMatrix(u),f=n.createSVGTransform();f.setRotate(-l.rotation,i.x,i.y);var h=c.transformRect(s,f.matrix.multiply(u));o=new ut(h).intersectionWithLineFromCenterToPoint(t,l.rotation)}else if("PATH"===a||"POLYGON"===a||"POLYLINE"===a||"CIRCLE"===a||"ELLIPSE"===a){var d,p,g,v,m,y=("PATH"===a?this:this.convertToPath()).sample(),b=1/0,w=[];for(d=0;d<y.length;d++)p=y[d],g=(g=c.createSVGPoint(p.x,p.y)).matrixTransform(this.getTransformToElement(e)),(m=(p=new Y(g)).distance(i)+(v=1.1*p.distance(t)))<b?(b=m,w=[{sample:p,refDistance:v}]):m<b+1&&w.push({sample:p,refDistance:v});w.sort((function(t,e){return t.refDistance-e.refDistance})),w[0]&&(o=w[0].sample)}return o}},f.setAttribute=function(t,e){var n=this.node;if(null===e)return this.removeAttr(t),this;var r=c.qualifyAttr(t);return r.ns?n.setAttributeNS(r.ns,t,e):"id"===t?n.id=e:n.setAttribute(t,e),this},c.createSvgDocument=function(e){if(e){var n='<svg xmlns="'.concat(t.svg,'" xmlns:xlink="').concat(t.xlink,'" version="1.1">').concat(e,"</svg>");return c.parseXML(n,{async:!1}).documentElement}var r=document.createElementNS(t.svg,"svg");return r.setAttributeNS(t.xmlns,"xmlns:xlink",t.xlink),r.setAttribute("version","1.1"),r},c.createSVGStyle=function(t){return c("style",{type:"text/css"},[c.createCDATASection(t)]).node},c.createCDATASection=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return document.implementation.createDocument(null,"xml",null).createCDATASection(t)},c.idCounter=0,c.uniqueId=function(){return"v-"+ ++c.idCounter},c.toNode=function(t){return c.isV(t)?t.node:t.nodeName&&t||t[0]},c.ensureId=function(t){return(t=c.toNode(t)).id||(t.id=c.uniqueId())},c.sanitizeText=function(t){return(t||"").replace(/ /g," ")},c.isUndefined=function(t){return void 0===t},c.isString=function(t){return"string"==typeof t},c.isObject=function(t){return t&&"object"==h(t)},c.isArray=Array.isArray,c.parseXML=function(t,e){var n;e=e||{};try{var r=new DOMParser;c.isUndefined(e.async)||(r.async=e.async),n=r.parseFromString(t,"text/xml")}catch(t){n=void 0}if(!n||n.getElementsByTagName("parsererror").length)throw new Error("Invalid XML: "+t);return n},c.qualifyAttr=function(e){if(-1!==e.indexOf(":")){var n=e.split(":");return{ns:t[n[0]],local:n[1]}}return{ns:null,local:e}},c.transformRegex=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,c.transformSeparatorRegex=/[ ,]+/,c.transformationListRegex=/^(\w+)\((.*)\)/,c.transformStringToMatrix=function(t){var e=c.createSVGMatrix(),n=t&&t.match(c.transformRegex);if(!n)return e;for(var r=0,i=n.length;r<i;r++){var o=n[r].match(c.transformationListRegex);if(o){var a,s,u,l,f,h=c.createSVGMatrix(),d=o[2].split(c.transformSeparatorRegex);switch(o[1].toLowerCase()){case"scale":a=parseFloat(d[0]),s=void 0===d[1]?a:parseFloat(d[1]),h=h.scaleNonUniform(a,s);break;case"translate":u=parseFloat(d[0]),l=parseFloat(d[1]),h=h.translate(u,l);break;case"rotate":f=parseFloat(d[0]),u=parseFloat(d[1])||0,l=parseFloat(d[2])||0,h=0!==u||0!==l?h.translate(u,l).rotate(f).translate(-u,-l):h.rotate(f);break;case"skewx":f=parseFloat(d[0]),h=h.skewX(f);break;case"skewy":f=parseFloat(d[0]),h=h.skewY(f);break;case"matrix":h.a=parseFloat(d[0]),h.b=parseFloat(d[1]),h.c=parseFloat(d[2]),h.d=parseFloat(d[3]),h.e=parseFloat(d[4]),h.f=parseFloat(d[5]);break;default:continue}e=e.multiply(h)}}return e},c.matrixToTransformString=function(t){return t||(t=!0),"matrix("+(void 0!==t.a?t.a:1)+","+(void 0!==t.b?t.b:0)+","+(void 0!==t.c?t.c:0)+","+(void 0!==t.d?t.d:1)+","+(void 0!==t.e?t.e:0)+","+(void 0!==t.f?t.f:0)+")"},c.parseTransformString=function(t){var e,n,r;if(t){var i=c.transformSeparatorRegex;if(t.trim().indexOf("matrix")>=0){var o=c.transformStringToMatrix(t),a=c.decomposeMatrix(o);e=[a.translateX,a.translateY],r=[a.scaleX,a.scaleY],n=[a.rotation];var s=[];0===e[0]&&0===e[1]||s.push("translate("+e+")"),1===r[0]&&1===r[1]||s.push("scale("+r+")"),0!==n[0]&&s.push("rotate("+n+")"),t=s.join(" ")}else{var u=t.match(/translate\((.*?)\)/);u&&(e=u[1].split(i));var l=t.match(/rotate\((.*?)\)/);l&&(n=l[1].split(i));var f=t.match(/scale\((.*?)\)/);f&&(r=f[1].split(i))}}var h=r&&r[0]?parseFloat(r[0]):1;return{value:t,translate:{tx:e&&e[0]?parseInt(e[0],10):0,ty:e&&e[1]?parseInt(e[1],10):0},rotate:{angle:n&&n[0]?parseInt(n[0],10):0,cx:n&&n[1]?parseInt(n[1],10):void 0,cy:n&&n[2]?parseInt(n[2],10):void 0},scale:{sx:h,sy:r&&r[1]?parseFloat(r[1]):h}}},c.deltaTransformPoint=function(t,e){return{x:e.x*t.a+e.y*t.c+0,y:e.x*t.b+e.y*t.d+0}},c.decomposeMatrix=function(t){var e=c.deltaTransformPoint(t,{x:0,y:1}),n=c.deltaTransformPoint(t,{x:1,y:0}),a=180/r*i(e.y,e.x)-90,s=180/r*i(n.y,n.x);return{translateX:t.e,translateY:t.f,scaleX:o(t.a*t.a+t.b*t.b),scaleY:o(t.c*t.c+t.d*t.d),skewX:a,skewY:s,rotation:a}},c.matrixToScale=function(t){var e,n,r,i;return t?(e=c.isUndefined(t.a)?1:t.a,i=c.isUndefined(t.d)?1:t.d,n=t.b,r=t.c):e=i=1,{sx:n?o(e*e+n*n):e,sy:r?o(r*r+i*i):i}},c.matrixToRotate=function(t){var e={x:0,y:1};return t&&(e=c.deltaTransformPoint(t,e)),{angle:A(C(i(e.y,e.x))-90)}},c.matrixToTranslate=function(t){return{tx:t&&t.e||0,ty:t&&t.f||0}},c.isVElement=c.isV=function(t){return t instanceof c},c.isSVGGraphicsElement=function(t){return!!t&&(t=c.toNode(t))instanceof SVGElement&&"function"==typeof t.getScreenCTM};var v=c("svg").node;return c.createSVGMatrix=function(t){var e=v.createSVGMatrix();for(var n in t)e[n]=t[n];return e},c.createSVGTransform=function(t){return c.isUndefined(t)?v.createSVGTransform():(t instanceof SVGMatrix||(t=c.createSVGMatrix(t)),v.createSVGTransformFromMatrix(t))},c.createSVGPoint=function(t,e){var n=v.createSVGPoint();return n.x=t,n.y=e,n},c.transformRect=function(t,e){var n=v.createSVGPoint();n.x=t.x,n.y=t.y;var r=n.matrixTransform(e);n.x=t.x+t.width,n.y=t.y;var i=n.matrixTransform(e);n.x=t.x+t.width,n.y=t.y+t.height;var o=n.matrixTransform(e);n.x=t.x,n.y=t.y+t.height;var u=n.matrixTransform(e),l=a(r.x,i.x,o.x,u.x),c=s(r.x,i.x,o.x,u.x),f=a(r.y,i.y,o.y,u.y),h=s(r.y,i.y,o.y,u.y);return new ut(l,f,c-l,h-f)},c.transformPoint=function(t,e){return new Y(c.createSVGPoint(t.x,t.y).matrixTransform(e))},c.transformLine=function(t,e){return new ht(c.transformPoint(t.start,e),c.transformPoint(t.end,e))},c.transformPolyline=function(t,e){var n=t instanceof mt?t.points:t;c.isArray(n)||(n=[]);for(var r=[],i=0,o=n.length;i<o;i++)r[i]=c.transformPoint(n[i],e);return new mt(r)},c.styleToObject=function(t){for(var e={},n=t.split(";"),r=0;r<n.length;r++){var i=n[r].split("=");e[i[0].trim()]=i[1].trim()}return e},c.createSlicePathData=function(t,e,n,i){var o=2*r-1e-6,a=t,s=e,c=n,f=i,h=(f<c&&(h=c,c=f,f=h),f-c),d=h<r?"0":"1",p=u(c),g=l(c),v=u(f),m=l(f);return h>=o?a?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+-s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+a+"A"+a+","+a+" 0 1,0 0,"+-a+"A"+a+","+a+" 0 1,0 0,"+a+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+-s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":a?"M"+s*p+","+s*g+"A"+s+","+s+" 0 "+d+",1 "+s*v+","+s*m+"L"+a*v+","+a*m+"A"+a+","+a+" 0 "+d+",0 "+a*p+","+a*g+"Z":"M"+s*p+","+s*g+"A"+s+","+s+" 0 "+d+",1 "+s*v+","+s*m+"L0,0Z"},c.mergeAttrs=function(t,e){for(var n in e)"class"===n?t[n]=t[n]?t[n]+" "+e[n]:e[n]:"style"===n?c.isObject(t[n])&&c.isObject(e[n])?t[n]=c.mergeAttrs(t[n],e[n]):c.isObject(t[n])?t[n]=c.mergeAttrs(t[n],c.styleToObject(e[n])):c.isObject(e[n])?t[n]=c.mergeAttrs(c.styleToObject(t[n]),e[n]):t[n]=c.mergeAttrs(c.styleToObject(t[n]),c.styleToObject(e[n])):t[n]=e[n];return t},c.annotateString=function(t,e,n){e=e||[];for(var r,i,o,a=(n=n||{}).offset||0,s=[],u=[],l=0;l<t.length;l++){i=u[l]=t[l];for(var f=0;f<e.length;f++){var h=e[f],d=h.start+a,p=h.end+a;l>=d&&l<p&&(c.isObject(i)?i.attrs=c.mergeAttrs(c.mergeAttrs({},i.attrs),h.attrs):i=u[l]={t:t[l],attrs:h.attrs},n.includeAnnotationIndices&&(i.annotations||(i.annotations=[])).push(f))}(o=u[l-1])?c.isObject(i)&&c.isObject(o)?JSON.stringify(i.attrs)===JSON.stringify(o.attrs)?r.t+=i.t:(s.push(r),r=i):c.isObject(i)||c.isObject(o)?(s.push(r),r=i):r=(r||"")+i:r=i}return r&&s.push(r),s},c.findAnnotationsAtIndex=function(t,e){var n=[];return t&&t.forEach((function(t){t.start<e&&e<=t.end&&n.push(t)})),n},c.findAnnotationsBetweenIndexes=function(t,e,n){var r=[];return t&&t.forEach((function(t){(e>=t.start&&e<t.end||n>t.start&&n<=t.end||t.start>=e&&t.end<n)&&r.push(t)})),r},c.shiftAnnotations=function(t,e,n){return t&&t.forEach((function(t){t.start<e&&t.end>=e?t.end+=n:t.start>=e&&(t.start+=n,t.end+=n)})),t},c.convertLineToPathData=function(t){return["M",(t=c(t)).attr("x1"),t.attr("y1"),"L",t.attr("x2"),t.attr("y2")].join(" ")},c.convertPolygonToPathData=function(t){var e=c.getPointsFromSvgNode(t);return 0===e.length?null:c.svgPointsToPath(e)+" Z"},c.convertPolylineToPathData=function(t){var e=c.getPointsFromSvgNode(t);return 0===e.length?null:c.svgPointsToPath(e)},c.svgPointsToPath=function(t){for(var e=0,n=t.length;e<n;e++)t[e]=t[e].x+" "+t[e].y;return"M "+t.join(" L")},c.getPointsFromSvgNode=function(t){var e=[],n=(t=c.toNode(t)).points;if(n)for(var r=0,i=n.numberOfItems;r<i;r++)e.push(n.getItem(r));return e},c.KAPPA=.551784,c.convertCircleToPathData=function(t){t=c(t);var e=parseFloat(t.attr("cx"))||0,n=parseFloat(t.attr("cy"))||0,r=parseFloat(t.attr("r")),i=r*c.KAPPA;return["M",e,n-r,"C",e+i,n-r,e+r,n-i,e+r,n,"C",e+r,n+i,e+i,n+r,e,n+r,"C",e-i,n+r,e-r,n+i,e-r,n,"C",e-r,n-i,e-i,n-r,e,n-r,"Z"].join(" ")},c.convertEllipseToPathData=function(t){t=c(t);var e=parseFloat(t.attr("cx"))||0,n=parseFloat(t.attr("cy"))||0,r=parseFloat(t.attr("rx")),i=parseFloat(t.attr("ry"))||r,o=r*c.KAPPA,a=i*c.KAPPA;return["M",e,n-i,"C",e+o,n-i,e+r,n-a,e+r,n,"C",e+r,n+a,e+o,n+i,e,n+i,"C",e-o,n+i,e-r,n+a,e-r,n,"C",e-r,n-a,e-o,n-i,e,n-i,"Z"].join(" ")},c.convertRectToPathData=function(t){return t=c(t),c.rectToPath({x:parseFloat(t.attr("x"))||0,y:parseFloat(t.attr("y"))||0,width:parseFloat(t.attr("width"))||0,height:parseFloat(t.attr("height"))||0,rx:parseFloat(t.attr("rx"))||0,ry:parseFloat(t.attr("ry"))||0})},c.rectToPath=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=a(t.rx||t["top-rx"]||0,r/2),s=a(t.rx||t["bottom-rx"]||0,r/2),u=a(t.ry||t["top-ry"]||0,i/2),l=a(t.ry||t["bottom-ry"]||0,i/2);return(o||s||u||l?["M",e,n+u,"v",i-u-l,"a",s,l,0,0,0,s,l,"h",r-2*s,"a",s,l,0,0,0,s,-l,"v",-(i-l-u),"a",o,u,0,0,0,-o,-u,"h",-(r-2*o),"a",o,u,0,0,0,-o,u,"Z"]:["M",e,n,"H",e+r,"V",n+i,"H",e,"V",n,"Z"]).join(" ")},c.normalizePathData=function(){var t="\t\n\v\f\r   ᠎              \u2028\u2029",e=new RegExp("([a-z])["+t+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+t+"]*,?["+t+"]*)+)","ig"),n=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+t+"]*,?["+t+"]*","ig"),r=Math,i=r.PI,o=r.sin,a=r.cos,s=r.tan,u=r.asin,l=r.sqrt,c=r.abs;function f(t,e,n,r,i,o){var a=1/3,s=2/3;return[a*t+s*n,a*e+s*r,a*i+s*n,a*o+s*r,i,o]}function h(t,e,n){return{x:t*a(n)-e*o(n),y:t*o(n)+e*a(n)}}function d(t,e,n,r,f,p,g,v,m,y){var b,w=120*i/180,x=i/180*(+f||0),S=[];if(y)L=y[0],M=y[1],T=y[2],N=y[3];else{t=(b=h(t,e,-x)).x,e=b.y;var k=(t-(v=(b=h(v,m,-x)).x))/2,_=(e-(m=b.y))/2,E=k*k/(n*n)+_*_/(r*r);E>1&&(n*=E=l(E),r*=E);var A=n*n,P=r*r,C=(p==g?-1:1)*l(c((A*P-A*_*_-P*k*k)/(A*_*_+P*k*k))),T=C*n*_/r+(t+v)/2,N=C*-r*k/n+(e+m)/2,L=u(((e-N)/r).toFixed(9)),M=u(((m-N)/r).toFixed(9));(L=t<T?i-L:L)<0&&(L=2*i+L),(M=v<T?i-M:M)<0&&(M=2*i+M),g&&L>M&&(L-=2*i),!g&&M>L&&(M-=2*i)}var O=M-L;if(c(O)>w){var R=M,F=v,D=m;S=d(v=T+n*a(M=L+w*(g&&M>L?1:-1)),m=N+r*o(M),n,r,f,0,g,F,D,[M,R,T,N])}O=M-L;var j=a(L),I=o(L),B=a(M),z=o(M),V=s(O/4),$=4/3*(n*V),U=4/3*(r*V),q=[t,e],H=[t+$*I,e-U*j],G=[v+$*z,m-U*B],W=[v,m];if(H[0]=2*q[0]-H[0],H[1]=2*q[1]-H[1],y)return[H,G,W].concat(S);for(var Y=[],X=(S=[H,G,W].concat(S).join().split(",")).length,Q=0;Q<X;Q++)Y[Q]=Q%2?h(S[Q-1],S[Q],x).y:h(S[Q],S[Q+1],x).x;return Y}return function(t){return function(t){var r=function(t){if(Array.isArray(t)&&Array.isArray(t&&t[0])||(t=function(t){if(!t)return null;var r={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return String(t).replace(e,(function(t,e,o){var a=[],s=e.toLowerCase();for(o.replace(n,(function(t,e){e&&a.push(+e)})),"m"===s&&a.length>2&&(i.push([e].concat(a.splice(0,2))),s="l",e="m"===e?"l":"L");a.length>=r[s]&&(i.push([e].concat(a.splice(0,r[s]))),r[s]););})),i}(t)),!t||!t.length)return[["M",0,0]];for(var r,i=[],o=0,a=0,s=0,u=0,l=t.length,c=0;c<l;c++){var f=[];i.push(f);var h,d,p=t[c];if((r=p[0])!=r.toUpperCase())switch(f[0]=r.toUpperCase(),f[0]){case"A":f[1]=p[1],f[2]=p[2],f[3]=p[3],f[4]=p[4],f[5]=p[5],f[6]=+p[6]+o,f[7]=+p[7]+a;break;case"V":f[1]=+p[1]+a;break;case"H":f[1]=+p[1]+o;break;case"M":for(s=+p[1]+o,u=+p[2]+a,h=p.length,d=1;d<h;d++)f[d]=+p[d]+(d%2?o:a);break;default:for(h=p.length,d=1;d<h;d++)f[d]=+p[d]+(d%2?o:a)}else for(var g=p.length,v=0;v<g;v++)f[v]=p[v];switch(f[0]){case"Z":o=+s,a=+u;break;case"H":o=f[1];break;case"V":a=f[1];break;case"M":s=f[f.length-2],u=f[f.length-1],o=f[f.length-2],a=f[f.length-1];break;default:o=f[f.length-2],a=f[f.length-1]}}return i}(t),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function o(t,e,n){var r,i;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(t[0]in{T:1,Q:1}||(e.qx=null,e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=0===parseFloat(t[1])||0===parseFloat(t[2])?["L",t[6],t[7]]:["C"].concat(d.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"===n||"S"===n?(r=2*e.x-e.bx,i=2*e.y-e.by):(r=e.x,i=e.y),t=["C",r,i].concat(t.slice(1));break;case"T":"Q"===n||"T"===n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(f(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(f(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"H":t=["L"].concat(t[1],e.y);break;case"V":t=["L"].concat(e.x,t[1])}return t}function a(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)s[e]="A",t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),c=r.length}}for(var s=[],u="",l="",c=r.length,h=0;h<c;h++){r[h]&&(u=r[h][0]),"C"!==u&&(s[h]=u,h>0&&(l=s[h-1])),r[h]=o(r[h],i,l),"A"!==s[h]&&"C"===u&&(s[h]="C"),a(r,h);var p=r[h],g=p.length;i.x=p[g-2],i.y=p[g-1],i.bx=parseFloat(p[g-4])||i.x,i.by=parseFloat(p[g-3])||i.y}return r[0][0]&&"M"===r[0][0]||r.unshift(["M",0,0]),r}(t).join(",").split(",").join(" ")}}(),c.namespace=t,c.g=n,c}(),be=b(3804),we=b(1273),xe="joint-",Se=function(t){return t?t.toString().split(" ").map((function(t){return t.substr(0,xe.length)!==xe&&(t=xe+t),t})).join(" "):t},ke=function(t){return t?t.toString().split(" ").map((function(t){return t.substr(0,xe.length)===xe&&(t=t.substr(xe.length)),t})).join(" "):t},_e=function(t,e){for(var n={},r={},i=ye.namespace.svg,o=e||i,a=document.createDocumentFragment(),s=[t,a,o];s.length>0;){o=s.pop();for(var u=s.pop(),l=s.pop(),c=0,f=l.length;c<f;c++){var h=l[c];if(!h.hasOwnProperty("tagName"))throw new Error("json-dom-parser: missing tagName");var d=h.tagName;h.hasOwnProperty("namespaceURI")&&(o=h.namespaceURI);var p=document.createElementNS(o,d),g=o===i,v=g?ye:we,m=h.attributes;m&&v(p).attr(m);var y=h.style;if(y&&we(p).css(y),h.hasOwnProperty("className")){var b=h.className;g?p.className.baseVal=b:p.className=b}if(h.hasOwnProperty("textContent")&&(p.textContent=h.textContent),h.hasOwnProperty("selector")){var w=h.selector;if(n[w])throw new Error("json-dom-parser: selector must be unique");n[w]=p,v(p).attr("joint-selector",w)}if(h.hasOwnProperty("groupSelector")){var x=h.groupSelector;Array.isArray(x)||(x=[x]);for(var S=0,k=x.length;S<k;S++){var _=x[S],E=r[_];E||(E=r[_]=[]),E.push(p)}}u.appendChild(p);var A=h.children;Array.isArray(A)&&s.push(A,p,o)}}return{fragment:a,selectors:n,groupSelectors:r}},Ee=function(t){var e=0;if(0===t.length)return e;for(var n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e&=e;return e},Ae=function(t,e,n){for(var r,i=Array.isArray(e)?e:e.split(n||"/"),o=0,a=i.length;o<a;){if(r=i[o++],Object(t)!==t||!(r in t))return;t=t[r]}return t},Pe=function(t,e){return"string"!=typeof e&&"number"!=typeof e&&(e=String(e)),("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!==e},Ce=function(t,e,n,r){for(var i=Array.isArray(e)?e:e.split(r||"/"),o=i.length-1,a=t,s=0;s<o;s++){var u=i[s];if(!Pe(a,u))return t;a=a[u]||(a[u]={})}return a[i[o]]=n,t},Te=function(t,e,n){for(var r=Array.isArray(e)?e:e.split(n||"/"),i=r.length-1,o=t,a=0;a<i;a++){var s=r[a];if(!Pe(o,s))return t;var u=o[s];if(!u)return t;o=u}return delete o[r[i]],t},Ne=function t(e){return t.id=t.id||1,e.id=void 0===e.id?"j_"+t.id++:e.id,e.id},Le=function(t){var e=t,n=t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0];if(n){for(var r in t)void 0===n[r]&&(n[r]=t[r]);e=n}var i=e.target;if(i){var o=i.correspondingUseElement;o&&(e.target=o)}return e},Me=function(){var t;if("undefined"!=typeof window&&(t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame),!t){var e=0;t=function(t){var n=(new Date).getTime(),r=Math.max(0,16-(n-e)),i=setTimeout((function(){t(n+r)}),r);return e=n+r,i}}return function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t(void 0!==n?e.bind.apply(e,[n].concat(i)):e)}}(),Oe=((ve="undefined"!=typeof window)&&(ge=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelAnimationFrame||window.oCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelRequestAnimationFrame),ge=ge||clearTimeout,ve?ge.bind(window):ge),Re=function(t){return mn(t)&&"%"===t.slice(-1)},Fe=function(t,e){var n=parseFloat(t);if(Number.isNaN(n))return null;var r,i={};if(i.value=n,null==e)r="[A-Za-z]*";else if(Array.isArray(e)){if(0===e.length)return null;r=e.join("|")}else mn(e)&&(r=e);var o=function(e){var n=new RegExp("(?:\\d+(?:\\.\\d+)*)("+e+")$").exec(t);return n?n[1]:null}(r);return null===o?null:(i.unit=o,i)},De=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=e.width,o=e.height,a=r.svgDocument||ye("svg").node,s=ye("tspan").node,l=ye("text").attr(n).append(s).node,c=document.createTextNode("");l.style.opacity=0,l.style.display="block",s.style.display="block",s.appendChild(c),a.appendChild(l),r.svgDocument||document.body.appendChild(a);var f=r.separator||" ",h=r.eol||"\n",d=r.hyphen?new RegExp(r.hyphen):/[^\w\d]/,p=r.maxLineCount;vn(p)||(p=1/0);for(var g,v,m,y=t.split(f),b=[],w=[],x=0,S=0,k=y.length;x<k;x++){var _=y[x];if(_){var E=!1;if(h&&_.indexOf(h)>=0){if(_.length>1){for(var A=_.split(h),P=0,C=A.length-1;P<C;P++)A.splice(2*P+1,0,h);y.splice.apply(y,[x,1].concat(u(A.filter((function(t){return""!==t}))))),x--,k=y.length;continue}w[++S]="",E=!0}if(!E)if(c.data=w[S]?w[S]+" "+_:_,s.getComputedTextLength()<=i)w[S]=c.data,(g||v)&&(b[S++]=!0,g=0,v=0);else{if(!w[S]||g){var T=!!g;if(g=_.length-1,T||!g){if(!g){if(!w[S]){w=[];break}y.splice(x,2,_+y[x+1]),k--,b[S++]=!0,x--;continue}y[x]=_.substring(0,g),y[x+1]=_.substring(g)+(void 0===y[x+1]?"":y[x+1])}else{if(v)y.splice(x,2,y[x]+y[x+1]),v=0;else{var N=_.search(d);N>-1&&N!==_.length-1&&0!==N&&(v=N+1,g=0),y.splice(x,1,_.substring(0,v||g),_.substring(v||g)),k++}S&&!b[S-1]&&S--}x--;continue}S++,x--}var L=null;if(w.length>p)L=p-1;else if(void 0!==o){var M;void 0===m&&(m=(M="auto"===n.lineHeight?{value:1.5,unit:"em"}:Fe(n.lineHeight,["em"])||{value:1,unit:"em"}).value,"em"===M.unit&&(m*=l.getBBox().height)),m*w.length>o&&(L=Math.floor(o/m)-1)}if(null!==L){w.splice(L+1);var O=r.ellipsis;if(!O||L<0)break;"string"!=typeof O&&(O="…");var R=w[L];if(!R&&!E)break;var F,D,j=R.length;do{if(D=R[j],F=R.substring(0,j),D?D.match(f)&&(F+=D):F+="string"==typeof f?f:" ",F+=O,c.data=F,s.getComputedTextLength()<=i){w[L]=F;break}j--}while(j>=0);break}}}return r.svgDocument?a.removeChild(l):document.body.removeChild(a),w.join(h)},je=function(t){if(Object(t)!==t){var e=0;return isFinite(t)&&(e=+t),{top:e,right:e,bottom:e,left:e}}var n,r,i,o;return n=r=i=o=0,isFinite(t.vertical)&&(n=i=+t.vertical),isFinite(t.horizontal)&&(r=o=+t.horizontal),isFinite(t.top)&&(n=+t.top),isFinite(t.right)&&(r=+t.right),isFinite(t.bottom)&&(i=+t.bottom),isFinite(t.left)&&(o=+t.left),{top:n,right:r,bottom:i,left:o}},Ie={linear:function(t){return t},quad:function(t){return t*t},cubic:function(t){return t*t*t},inout:function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)},exponential:function(t){return Math.pow(2,10*(t-1))},bounce:function(t){for(var e=0,n=1;;e+=n,n/=2)if(t>=(7-4*e)/11){var r=(11-6*e-11*t)/4;return-r*r+n*n}},reverse:function(t){return function(e){return 1-t(1-e)}},reflect:function(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}},clamp:function(t,e,n){return e=e||0,n=n||1,function(r){var i=t(r);return i<e?e:i>n?n:i}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},elastic:function(t){return t||(t=1.5),function(e){return Math.pow(2,10*(e-1))*Math.cos(20*Math.PI*t/3*e)}}},Be={number:function(t,e){var n=e-t;return function(e){return t+n*e}},object:function(t,e){var n=Object.keys(t);return function(r){var i,o,a={};for(i=n.length-1;-1!=i;i--)a[o=n[i]]=t[o]+(e[o]-t[o])*r;return a}},hexColor:function(t,e){var n=parseInt(t.slice(1),16),r=parseInt(e.slice(1),16),i=255&n,o=(255&r)-i,a=65280&n,s=(65280&r)-a,u=16711680&n,l=(16711680&r)-u;return function(t){return"#"+(1<<24|i+o*t&255|a+s*t&65280|u+l*t&16711680).toString(16).slice(1)}},unit:function(t,e){var n=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=n.exec(t),i=n.exec(e),o=i[1].indexOf("."),a=o>0?i[1].length-o-1:0;t=+r[1];var s=+i[1]-t,u=r[2];return function(e){return(t+s*e).toFixed(a)+u}}},ze={outline:function(t){var e=Number.isFinite(t.margin)?t.margin:2,n=Number.isFinite(t.width)?t.width:1;return Ve('<filter><feFlood flood-color="${color}" flood-opacity="${opacity}" result="colored"/><feMorphology in="SourceAlpha" result="morphedOuter" operator="dilate" radius="${outerRadius}" /><feMorphology in="SourceAlpha" result="morphedInner" operator="dilate" radius="${innerRadius}" /><feComposite result="morphedOuterColored" in="colored" in2="morphedOuter" operator="in"/><feComposite operator="xor" in="morphedOuterColored" in2="morphedInner" result="outline"/><feMerge><feMergeNode in="outline"/><feMergeNode in="SourceGraphic"/></feMerge></filter>')({color:t.color||"blue",opacity:Number.isFinite(t.opacity)?t.opacity:1,outerRadius:e+n,innerRadius:e})},highlight:function(t){return Ve('<filter><feFlood flood-color="${color}" flood-opacity="${opacity}" result="colored"/><feMorphology result="morphed" in="SourceGraphic" operator="dilate" radius="${width}"/><feComposite result="composed" in="colored" in2="morphed" operator="in"/><feGaussianBlur result="blured" in="composed" stdDeviation="${blur}"/><feBlend in="SourceGraphic" in2="blured" mode="normal"/></filter>')({color:t.color||"red",width:Number.isFinite(t.width)?t.width:1,blur:Number.isFinite(t.blur)?t.blur:0,opacity:Number.isFinite(t.opacity)?t.opacity:1})},blur:function(t){var e=Number.isFinite(t.x)?t.x:2;return Ve('<filter><feGaussianBlur stdDeviation="${stdDeviation}"/></filter>')({stdDeviation:Number.isFinite(t.y)?[e,t.y]:e})},dropShadow:function(t){var e="SVGFEDropShadowElement"in window?'<filter><feDropShadow stdDeviation="${blur}" dx="${dx}" dy="${dy}" flood-color="${color}" flood-opacity="${opacity}"/></filter>':'<filter><feGaussianBlur in="SourceAlpha" stdDeviation="${blur}"/><feOffset dx="${dx}" dy="${dy}" result="offsetblur"/><feFlood flood-color="${color}"/><feComposite in2="offsetblur" operator="in"/><feComponentTransfer><feFuncA type="linear" slope="${opacity}"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';return Ve(e)({dx:t.dx||0,dy:t.dy||0,opacity:Number.isFinite(t.opacity)?t.opacity:1,color:t.color||"black",blur:Number.isFinite(t.blur)?t.blur:4})},grayscale:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${b} ${h} 0 0 0 0 0 1 0"/></filter>')({a:.2126+.7874*(1-e),b:.7152-.7152*(1-e),c:.0722-.0722*(1-e),d:.2126-.2126*(1-e),e:.7152+.2848*(1-e),f:.0722-.0722*(1-e),g:.2126-.2126*(1-e),h:.0722+.9278*(1-e)})},sepia:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feColorMatrix type="matrix" values="${a} ${b} ${c} 0 0 ${d} ${e} ${f} 0 0 ${g} ${h} ${i} 0 0 0 0 0 1 0"/></filter>')({a:.393+.607*(1-e),b:.769-.769*(1-e),c:.189-.189*(1-e),d:.349-.349*(1-e),e:.686+.314*(1-e),f:.168-.168*(1-e),g:.272-.272*(1-e),h:.534-.534*(1-e),i:.131+.869*(1-e)})},saturate:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feColorMatrix type="saturate" values="${amount}"/></filter>')({amount:1-e})},hueRotate:function(t){return Ve('<filter><feColorMatrix type="hueRotate" values="${angle}"/></filter>')({angle:t.angle||0})},invert:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feComponentTransfer><feFuncR type="table" tableValues="${amount} ${amount2}"/><feFuncG type="table" tableValues="${amount} ${amount2}"/><feFuncB type="table" tableValues="${amount} ${amount2}"/></feComponentTransfer></filter>')({amount:e,amount2:1-e})},brightness:function(t){return Ve('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}"/><feFuncG type="linear" slope="${amount}"/><feFuncB type="linear" slope="${amount}"/></feComponentTransfer></filter>')({amount:Number.isFinite(t.amount)?t.amount:1})},contrast:function(t){var e=Number.isFinite(t.amount)?t.amount:1;return Ve('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}" intercept="${amount2}"/><feFuncG type="linear" slope="${amount}" intercept="${amount2}"/><feFuncB type="linear" slope="${amount}" intercept="${amount2}"/></feComponentTransfer></filter>')({amount:e,amount2:.5-e/2})}},Ve=function(t){var e=/<%= ([^ ]+) %>|\$\{ ?([^{} ]+) ?\}|\{\{([^{} ]+)\}\}/g;return function(n){return n=n||{},t.replace(e,(function(t){for(var e=Array.from(arguments),r=e.slice(1,4).find((function(t){return!!t})),i=r.split("."),o=n[i.shift()];void 0!==o&&i.length;)o=o[i.shift()];return void 0!==o?o:""}))}},$e=(be.assign,be.defaults,be.defaultsDeep,be.assign),Ue=be.defaults,qe=be.defaultsDeep,He=be.invokeMap||be.invoke,Ge=be.sortedIndexBy||be.sortedIndex,We=be.uniqBy||be.uniq,Ye=be.clone,Xe=be.cloneDeep,Qe=be.isEmpty,Ke=be.isEqual,Je=be.isFunction,Ze=be.isPlainObject,tn=be.toArray,en=(be.debounce,be.groupBy),nn=(be.sortBy,be.flattenDeep),rn=be.without,on=be.difference,an=(be.intersection,be.union),sn=be.has,un=be.result,ln=be.omit,cn=be.pick,fn=(be.bindAll,be.forIn),hn=be.camelCase,dn=be.uniqueId,pn=function(){if(be.mergeWith){var t=Array.from(arguments),e=t[t.length-1],n=Je(e)?e:yn;return t.push((function(t,e){var r=n(t,e);return void 0!==r?r:Array.isArray(t)&&!Array.isArray(e)?e:void 0})),be.mergeWith.apply(this,t)}return be.merge.apply(this,arguments)},gn=function(t){return!!t&&("object"==h(t)||"function"==typeof t)},vn=function(t){var e=Object.prototype.toString;return"number"==typeof t||!!t&&"object"==h(t)&&"[object Number]"===e.call(t)},mn=function(t){var e=Object.prototype.toString;return"string"==typeof t||!!t&&"object"==h(t)&&"[object String]"===e.call(t)},yn=function(){};function bn(t,e){return 0===e?"0%":Math.round(t/e*100*1e3)/1e3+"%"}function wn(t){return function(e,n,r,i){return(n.isNodeConnection(r)?Sn:xn)(t,e,n,r,i)}}function xn(t,e,n,r,i){var o=n.model.angle(),a=n.getNodeUnrotatedBBox(r),s=n.model.getBBox().center();i.rotate(s,o);var u=i.x-a.x,l=i.y-a.y;return t&&(u=bn(u,a.width),l=bn(l,a.height)),e.anchor={name:"topLeft",args:{dx:u,dy:l,rotate:!0}},e}function Sn(t,e,n,r,i){var o=n.getConnection();if(!o)return e;var a=o.closestPointLength(i);if(t){var s=o.length();e.anchor={name:"connectionRatio",args:{ratio:a/s}}}else e.anchor={name:"connectionLength",args:{length:a}};return e}wn(!1);var kn=wn(!0),_n=b(9240),En={},An=_n.View.extend({options:{},theme:null,themeClassNamePrefix:Se("theme-"),requireSetThemeOverride:!1,defaultTheme:"default",children:null,childNodes:null,DETACHABLE:!0,UPDATE_PRIORITY:2,FLAG_INSERT:1<<30,FLAG_REMOVE:1<<29,constructor:function(t){this.requireSetThemeOverride=t&&!!t.theme,this.options=$e({},this.options,t),_n.View.call(this,t)},initialize:function(){En[this.cid]=this,this.setTheme(this.options.theme||this.defaultTheme),this.init()},unmount:function(){this.svgElement?this.vel.remove():this.$el.remove()},renderChildren:function(t){if(t||(t=un(this,"children")),t){var e=this.svgElement,n=ye.namespace[e?"svg":"xhtml"],r=_e(t,n);(e?this.vel:this.$el).empty().append(r.fragment),this.childNodes=r.selectors}return this},findAttribute:function(t,e){for(var n=e;n&&1===n.nodeType;){var r=n.getAttribute(t);if(r)return r;if(n===this.el)return null;n=n.parentNode}return null},_ensureElement:function(){if(this.el)this.setElement(un(this,"el"));else{var t=un(this,"tagName"),e=$e({},un(this,"attributes")),n=$e({},un(this,"style"));this.id&&(e.id=un(this,"id")),this.setElement(this._createElement(t)),this._setAttributes(e),this._setStyle(n)}this._ensureElClassName()},_setAttributes:function(t){this.svgElement?this.vel.attr(t):this.$el.attr(t)},_setStyle:function(t){this.$el.css(t)},_createElement:function(t){return this.svgElement?document.createElementNS(ye.namespace.svg,t):document.createElement(t)},_setElement:function(t){this.$el=t instanceof _n.$?t:_n.$(t),this.el=this.$el[0],this.svgElement&&(this.vel=ye(this.el))},_ensureElClassName:function(){var t=un(this,"className");if(t){var e=Se(t);this.svgElement?this.vel.removeClass(t).addClass(e):this.$el.removeClass(t).addClass(e)}},init:function(){},onRender:function(){},confirmUpdate:function(){return 0},setTheme:function(t,e){return e=e||{},this.theme&&this.requireSetThemeOverride&&!e.override||(this.removeThemeClassName(),this.addThemeClassName(t),this.onSetTheme(this.theme,t),this.theme=t),this},addThemeClassName:function(t){if(!(t=t||this.theme))return this;var e=this.themeClassNamePrefix+t;return this.svgElement?this.vel.addClass(e):this.$el.addClass(e),this},removeThemeClassName:function(t){t=t||this.theme;var e=this.themeClassNamePrefix+t;return this.svgElement?this.vel.removeClass(e):this.$el.removeClass(e),this},onSetTheme:function(t,e){},remove:function(){return this.onRemove(),this.undelegateDocumentEvents(),En[this.cid]=null,_n.View.prototype.remove.apply(this,arguments),this},onRemove:function(){},getEventNamespace:function(){return".joint-event-ns-"+this.cid},delegateElementEvents:function(t,e,n){if(!e)return this;n||(n={});var r=this.getEventNamespace();for(var i in e){var o=e[i];"function"!=typeof o&&(o=this[o]),o&&we(t).on(i+r,n,o.bind(this))}return this},undelegateElementEvents:function(t){return we(t).off(this.getEventNamespace()),this},delegateDocumentEvents:function(t,e){return t||(t=un(this,"documentEvents")),this.delegateElementEvents(document,t,e)},undelegateDocumentEvents:function(){return this.undelegateElementEvents(document)},eventData:function(t,e){if(!t)throw new Error("eventData(): event object required.");var n=t.data,r="__"+this.cid+"__";return void 0===e?n&&n[r]||{}:(n||(n=t.data={}),n[r]||(n[r]={}),$e(n[r],e),this)},stopPropagation:function(t){return this.eventData(t,{propagationStopped:!0}),this},isPropagationStopped:function(t){return!!this.eventData(t).propagationStopped}},{extend:function(){var t=Array.from(arguments),e=t[0]&&$e({},t[0])||{},n=t[1]&&$e({},t[1])||{},r=e.render||this.prototype&&this.prototype.render||null;return e.render=function(){return"function"==typeof r&&r.apply(this,arguments),this.render.__render__===r&&this.onRender(),this},e.render.__render__=r,_n.View.extend.call(this,e,n)}});if(we.event&&!("dbltap"in we.event.special)){we.event.special.dbltap={bindType:"touchend",delegateType:"touchend",handle:function(t){for(var e,n=t.handleObj,r=t.target,i=we.data(r),o=(new Date).getTime(),a=("lastTouch"in i?o-i.lastTouch:0),s=arguments.length,u=new Array(s>1?s-1:0),l=1;l<s;l++)u[l-1]=arguments[l];a<300&&a>30?(i.lastTouch=null,t.type=n.origType,(e=n.handler).call.apply(e,[this,t].concat(u))):i.lastTouch=o}}}var Pn=An.extend({name:null,tagName:"g",className:"tool",svgElement:!0,_visible:!0,init:function(){var t=this.name;t&&this.vel.attr("data-tool-name",t)},configure:function(t,e){return this.relatedView=t,this.paper=t.paper,this.parentView=e,this.simulateRelatedView(this.el),this.delegateEvents(),this},simulateRelatedView:function(t){t&&t.setAttribute("model-id",this.relatedView.model.id)},getName:function(){return this.name},show:function(){this.el.style.display="",this._visible=!0},hide:function(){this.el.style.display="none",this._visible=!1},isVisible:function(){return!!this._visible},focus:function(){var t=this.options.focusOpacity;isFinite(t)&&(this.el.style.opacity=t),this.parentView.focusTool(this)},blur:function(){this.el.style.opacity="",this.parentView.blurTool(this)},update:function(){},guard:function(t){var e=this.paper,n=this.relatedView;return!e||!n||e.guard(t,n)}});function Cn(t,e,n){return kn.call(this.paper,{},e,n,t,this.model).anchor}function Tn(t,e){var n=t.model;return e?n.getBBox():n.isLink()?t.getConnection().bbox():t.getNodeUnrotatedBBox(t.el)}var Nn=An.extend({tagName:"circle",svgElement:!0,className:"marker-vertex",events:{mousedown:"onPointerDown",touchstart:"onPointerDown",dblclick:"onDoubleClick",dbltap:"onDoubleClick"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},attributes:{r:6,fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move"},position:function(t,e){this.vel.attr({cx:t,cy:e})},onPointerDown:function(t){this.options.guard(t)||(t.stopPropagation(),t.preventDefault(),this.options.paper.undelegateEvents(),this.delegateDocumentEvents(null,t.data),this.trigger("will-change",this,t))},onPointerMove:function(t){this.trigger("changing",this,t)},onDoubleClick:function(t){this.trigger("remove",this,t)},onPointerUp:function(t){this.trigger("changed",this,t),this.undelegateDocumentEvents(),this.options.paper.delegateEvents()}}),Ln=(Pn.extend({name:"vertices",options:{handleClass:Nn,snapRadius:20,redundancyRemoval:!0,vertexAdding:!0,stopPropagation:!0},children:[{tagName:"path",selector:"connection",className:"joint-vertices-path",attributes:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"cell"}}],handles:null,events:{"mousedown .joint-vertices-path":"onPathPointerDown","touchstart .joint-vertices-path":"onPathPointerDown"},onRender:function(){return this.options.vertexAdding&&(this.renderChildren(),this.updatePath()),this.resetHandles(),this.renderHandles(),this},update:function(){return this.relatedView.model.vertices().length===this.handles.length?this.updateHandles():(this.resetHandles(),this.renderHandles()),this.options.vertexAdding&&this.updatePath(),this},resetHandles:function(){var t=this.handles;if(this.handles=[],this.stopListening(),Array.isArray(t))for(var e=0,n=t.length;e<n;e++)t[e].remove()},renderHandles:function(){for(var t=this,e=this.relatedView.model.vertices(),n=0,r=e.length;n<r;n++){var i=e[n],o=new this.options.handleClass({index:n,paper:this.paper,guard:function(e){return t.guard(e)}});o.render(),o.position(i.x,i.y),this.simulateRelatedView(o.el),o.vel.appendTo(this.el),this.handles.push(o),this.startHandleListening(o)}},updateHandles:function(){for(var t=this.relatedView.model.vertices(),e=0,n=t.length;e<n;e++){var r=t[e],i=this.handles[e];if(!i)return;i.position(r.x,r.y)}},updatePath:function(){var t=this.childNodes.connection;t&&t.setAttribute("d",this.relatedView.getSerializedConnection())},startHandleListening:function(t){var e=this.relatedView;e.can("vertexMove")&&(this.listenTo(t,"will-change",this.onHandleWillChange),this.listenTo(t,"changing",this.onHandleChanging),this.listenTo(t,"changed",this.onHandleChanged)),e.can("vertexRemove")&&this.listenTo(t,"remove",this.onHandleRemove)},getNeighborPoints:function(t){var e=this.relatedView,n=e.model.vertices(),r=t>0?n[t-1]:e.sourceAnchor,i=t<n.length-1?n[t+1]:e.targetAnchor;return{prev:new Y(r),next:new Y(i)}},onHandleWillChange:function(t,e){this.focus();var n=this.relatedView,r=this.options;n.model.startBatch("vertex-move",{ui:!0,tool:this.cid}),r.stopPropagation||n.notifyPointerdown.apply(n,u(n.paper.getPointerArgs(e)))},onHandleChanging:function(t,e){var n=this.options,r=this.relatedView,i=t.options.index,o=l(r.paper.getPointerArgs(e),3),a=o[0],s=o[1],u=o[2],c={x:s,y:u};this.snapVertex(c,i),r.model.vertex(i,c,{ui:!0,tool:this.cid}),t.position(c.x,c.y),n.stopPropagation||r.notifyPointermove(a,s,u)},onHandleChanged:function(t,e){var n=this.options,r=this.relatedView;if(n.vertexAdding&&this.updatePath(),n.redundancyRemoval){r.removeRedundantLinearVertices({ui:!0,tool:this.cid})&&this.render(),this.blur(),r.model.stopBatch("vertex-move",{ui:!0,tool:this.cid}),this.eventData(e).vertexAdded&&r.model.stopBatch("vertex-add",{ui:!0,tool:this.cid});var i=l(r.paper.getPointerArgs(e),3),o=i[0],a=i[1],s=i[2];n.stopPropagation||r.notifyPointerup(o,a,s),r.checkMouseleave(o)}},snapVertex:function(t,e){var n=this.options.snapRadius;if(n>0){var r=this.getNeighborPoints(e),i=r.prev,o=r.next;Math.abs(t.x-i.x)<n?t.x=i.x:Math.abs(t.x-o.x)<n&&(t.x=o.x),Math.abs(t.y-i.y)<n?t.y=r.prev.y:Math.abs(t.y-o.y)<n&&(t.y=o.y)}},onHandleRemove:function(t,e){var n=t.options.index,r=this.relatedView;r.model.removeVertex(n,{ui:!0}),this.options.vertexAdding&&this.updatePath(),r.checkMouseleave(Le(e))},onPathPointerDown:function(t){if(!this.guard(t)){t.stopPropagation(),t.preventDefault();var e=Le(t),n=this.paper.snapToGrid(e.clientX,e.clientY).toJSON(),r=this.relatedView;r.model.startBatch("vertex-add",{ui:!0,tool:this.cid});var i=r.getVertexIndex(n.x,n.y);this.snapVertex(n,i),r.model.insertVertex(i,n,{ui:!0,tool:this.cid}),this.update();var o=this.handles[i];this.eventData(e,{vertexAdded:!0}),o.onPointerDown(e)}},onRemove:function(){this.resetHandles()}},{VertexHandle:Nn}),An.extend({tagName:"g",svgElement:!0,className:"marker-segment",events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},children:[{tagName:"line",selector:"line",attributes:{stroke:"#33334F","stroke-width":2,fill:"none","pointer-events":"none"}},{tagName:"rect",selector:"handle",attributes:{width:20,height:8,x:-10,y:-4,rx:4,ry:4,fill:"#33334F",stroke:"#FFFFFF","stroke-width":2}}],onRender:function(){this.renderChildren()},position:function(t,e,n,r){var i=ye.createSVGMatrix().translate(t,e).rotate(n),o=this.childNodes.handle;o.setAttribute("transform",ye.matrixToTransformString(i)),o.setAttribute("cursor",n%180==0?"row-resize":"col-resize");var a=r.getClosestPoint(new Y(t,e)),s=this.childNodes.line;s.setAttribute("x1",t),s.setAttribute("y1",e),s.setAttribute("x2",a.x),s.setAttribute("y2",a.y)},onPointerDown:function(t){this.options.guard(t)||(this.trigger("change:start",this,t),t.stopPropagation(),t.preventDefault(),this.options.paper.undelegateEvents(),this.delegateDocumentEvents(null,t.data))},onPointerMove:function(t){this.trigger("changing",this,t)},onPointerUp:function(t){this.undelegateDocumentEvents(),this.options.paper.delegateEvents(),this.trigger("change:end",this,t)},show:function(){this.el.style.display=""},hide:function(){this.el.style.display="none"}})),Mn=(Pn.extend({name:"segments",precision:.5,options:{handleClass:Ln,segmentLengthThreshold:40,redundancyRemoval:!0,anchor:Cn,snapRadius:10,snapHandle:!0,stopPropagation:!0},handles:null,onRender:function(){this.resetHandles();var t=this.relatedView,e=t.model.vertices();e.unshift(t.sourcePoint),e.push(t.targetPoint);for(var n=0,r=e.length;n<r-1;n++){var i=e[n],o=e[n+1],a=this.renderHandle(i,o);this.simulateRelatedView(a.el),this.handles.push(a),a.options.index=n}return this},renderHandle:function(t,e){var n=this,r=new this.options.handleClass({paper:this.paper,guard:function(t){return n.guard(t)}});return r.render(),this.updateHandle(r,t,e),r.vel.appendTo(this.el),this.startHandleListening(r),r},update:function(){return this.render(),this},startHandleListening:function(t){this.listenTo(t,"change:start",this.onHandleChangeStart),this.listenTo(t,"changing",this.onHandleChanging),this.listenTo(t,"change:end",this.onHandleChangeEnd)},resetHandles:function(){var t=this.handles;if(this.handles=[],this.stopListening(),Array.isArray(t))for(var e=0,n=t.length;e<n;e++)t[e].remove()},shiftHandleIndexes:function(t){for(var e=this.handles,n=0,r=e.length;n<r;n++)e[n].options.index+=t},resetAnchor:function(t,e){var n=this.relatedView.model;e?n.prop([t,"anchor"],e,{rewrite:!0,ui:!0,tool:this.cid}):n.removeProp([t,"anchor"],{ui:!0,tool:this.cid})},snapHandle:function(t,e,n){var r=t.options.index,i=this.relatedView.model.vertices(),o=t.options.axis,a=i[r-2]||n.sourceAnchor,s=i[r+1]||n.targetAnchor,u=this.options.snapRadius;return Math.abs(e[o]-a[o])<u?e[o]=a[o]:Math.abs(e[o]-s[o])<u&&(e[o]=s[o]),e},onHandleChanging:function(t,e){var n=this.options,r=this.eventData(e),i=this.relatedView,o=i.paper,a=t.options.index-1,s=Le(e),u=o.snapToGrid(s.clientX,s.clientY),l=this.snapHandle(t,u.clone(),r),c=t.options.axis,f=this.options.snapHandle?0:u[c]-l[c],h=i.model,d=Xe(h.vertices()),p=d[a],g=d[a+1],v=this.options.anchor;"function"!=typeof v&&(v=null);var m=i.sourceView,y=i.sourceBBox,b=!1,w=!1;if(p?0===a?y.containsPoint(p)?(d.shift(),this.shiftHandleIndexes(-1),b=!0):(p[c]=l[c],w=!0):p[c]=l[c]:((p=i.sourceAnchor.toJSON())[c]=l[c],y.containsPoint(p)?(p[c]=l[c],b=!0):(d.unshift(p),this.shiftHandleIndexes(1),w=!0)),v&&m){if(b){var x=r.sourceAnchor.clone();x[c]=l[c];var S=v.call(i,x,m,i.sourceMagnet||m.el,"source",i);this.resetAnchor("source",S)}w&&this.resetAnchor("source",r.sourceAnchorDef)}var k=i.targetView,_=i.targetBBox,E=!1,A=!1;if(g?a===d.length-2?_.containsPoint(g)?(d.pop(),E=!0):(g[c]=l[c],A=!0):g[c]=l[c]:((g=i.targetAnchor.toJSON())[c]=l[c],_.containsPoint(g)?E=!0:(d.push(g),A=!0)),v&&k){if(E){var P=r.targetAnchor.clone();P[c]=l[c];var C=v.call(i,P,k,i.targetMagnet||k.el,"target",i);this.resetAnchor("target",C)}A&&this.resetAnchor("target",r.targetAnchorDef)}h.vertices(d,{ui:!0,tool:this.cid}),this.updateHandle(t,p,g,f),n.stopPropagation||i.notifyPointermove(s,u.x,u.y)},onHandleChangeStart:function(t,e){var n=this.options,r=this.handles,i=this.relatedView,o=i.model,a=i.paper,s=t.options.index;if(Array.isArray(r)){for(var l=0,c=r.length;l<c;l++)l!==s&&r[l].hide();this.focus(),this.eventData(e,{sourceAnchor:i.sourceAnchor.clone(),targetAnchor:i.targetAnchor.clone(),sourceAnchorDef:Ye(o.prop(["source","anchor"])),targetAnchorDef:Ye(o.prop(["target","anchor"]))}),o.startBatch("segment-move",{ui:!0,tool:this.cid}),n.stopPropagation||i.notifyPointerdown.apply(i,u(a.getPointerArgs(e)))}},onHandleChangeEnd:function(t,e){var n=this.options,r=this.relatedView,i=r.paper,o=r.model;n.redundancyRemoval&&r.removeRedundantLinearVertices({ui:!0,tool:this.cid});var a=Le(e),s=i.snapToGrid(a.clientX,a.clientY);this.render(),this.blur(),o.stopBatch("segment-move",{ui:!0,tool:this.cid}),n.stopPropagation||r.notifyPointerup(a,s.x,s.y),r.checkMouseleave(a)},updateHandle:function(t,e,n,r){var i=Math.abs(e.x-n.x)<this.precision,o=Math.abs(e.y-n.y)<this.precision;if(i||o){var a=new ht(e,n);if(a.length()<this.options.segmentLengthThreshold)t.hide();else{var s=a.midpoint(),u=i?"x":"y";s[u]+=r||0;var l=a.vector().vectorAngle(new Y(1,0));t.position(s.x,s.y,l,this.relatedView),t.show(),t.options.axis=u}}else t.hide()},onRemove:function(){this.resetHandles()}},{SegmentHandle:Ln}),Pn.extend({tagName:"path",xAxisVector:new Y(1,0),events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},onRender:function(){this.update()},update:function(){var t,e,n=this.ratio,r=this.relatedView,i=r.getTangentAtRatio(n);if(i?(t=i.start,e=i.vector().vectorAngle(this.xAxisVector)||0):(t=r.getPointAtRatio(n),e=0),!t)return this;var o=ye.createSVGMatrix().translate(t.x,t.y).rotate(e);return this.vel.transform(o,{absolute:!0}),this},onPointerDown:function(t){if(!this.guard(t)){t.stopPropagation(),t.preventDefault();var e=this.relatedView;e.model.startBatch("arrowhead-move",{ui:!0,tool:this.cid}),e.can("arrowheadMove")&&(e.startArrowheadMove(this.arrowheadType),this.delegateDocumentEvents(),e.paper.undelegateEvents()),this.focus(),this.el.style.pointerEvents="none"}},onPointerMove:function(t){var e=Le(t),n=this.paper.snapToGrid(e.clientX,e.clientY);this.relatedView.pointermove(e,n.x,n.y)},onPointerUp:function(t){this.undelegateDocumentEvents();var e=this.relatedView,n=e.paper,r=Le(t),i=n.snapToGrid(r.clientX,r.clientY);e.pointerup(r,i.x,i.y),n.delegateEvents(),this.blur(),this.el.style.pointerEvents="",e.model.stopBatch("arrowhead-move",{ui:!0,tool:this.cid})}})),On=(Mn.extend({name:"target-arrowhead",ratio:1,arrowheadType:"target",attributes:{d:"M -10 -8 10 0 -10 8 Z",fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move",class:"target-arrowhead"}}),Mn.extend({name:"source-arrowhead",ratio:0,arrowheadType:"source",attributes:{d:"M 10 -8 -10 0 10 8 Z",fill:"#33334F",stroke:"#FFFFFF","stroke-width":2,cursor:"move",class:"source-arrowhead"}}),Pn.extend({name:"button",events:{mousedown:"onPointerDown",touchstart:"onPointerDown"},options:{distance:0,offset:0,rotate:!1},onRender:function(){this.renderChildren(this.options.markup),this.update()},update:function(){return this.position(),this},position:function(){var t=this.relatedView,e=this.vel,n=t.model.isLink()?this.getLinkMatrix():this.getElementMatrix();e.transform(n,{absolute:!0})},getElementMatrix:function(){var t=this.relatedView,e=this.options,n=e.x,r=void 0===n?0:n,i=e.y,o=void 0===i?0:i,a=e.offset,s=void 0===a?{}:a,u=e.useModelGeometry,l=e.rotate,c=Tn(t,u),f=t.model.angle();l||(c=c.bbox(f));var h=s.x,d=void 0===h?0:h,p=s.y,g=void 0===p?0:p;Re(r)&&(r=parseFloat(r)/100*c.width),Re(o)&&(o=parseFloat(o)/100*c.height);var v=ye.createSVGMatrix().translate(c.x+c.width/2,c.y+c.height/2);return l&&(v=v.rotate(f)),v.translate(r+d-c.width/2,o+g-c.height/2)},getLinkMatrix:function(){var t,e,n,r=this.relatedView,i=this.options,o=i.offset,a=void 0===o?0:o,s=i.distance,u=void 0===s?0:s,l=i.rotate;(t=Re(u)?r.getTangentAtRatio(parseFloat(u)/100):r.getTangentAtLength(u))?(e=t.start,n=t.vector().vectorAngle(new Y(1,0))||0):(e=r.getConnection().start,n=0);var c=ye.createSVGMatrix().translate(e.x,e.y).rotate(n).translate(0,a);return l||(c=c.rotate(-n)),c},onPointerDown:function(t){if(!this.guard(t)){t.stopPropagation(),t.preventDefault();var e=this.options.action;"function"==typeof e&&e.call(this.relatedView,t,this.relatedView,this)}}})),Rn=On.extend({children:[{tagName:"circle",selector:"button",attributes:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attributes:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],options:{distance:60,offset:0,action:function(t,e,n){e.model.remove({ui:!0,tool:n.cid})}}});On.extend({name:"connect",documentEvents:{mousemove:"drag",touchmove:"drag",mouseup:"dragend",touchend:"dragend",touchcancel:"dragend"},children:[{tagName:"circle",selector:"button",attributes:{r:7,fill:"#333333",cursor:"pointer"}},{tagName:"path",selector:"icon",attributes:{d:"M -4 -1 L 0 -1 L 0 -4 L 4 0 L 0 4 0 1 -4 1 z",fill:"#FFFFFF",stroke:"none","stroke-width":2,"pointer-events":"none"}}],options:{distance:80,offset:0,magnet:function(t){return t.el},action:function(t,e,n){return n.dragstart(t)}},getMagnetNode:function(){var t,e=this.options,n=this.relatedView,r=e.magnet;switch(h(r)){case"function":t=r.call(this,n,this);break;case"string":t=l(n.findBySelector(r),1)[0];break;default:t=r}if(t||(t=n.el),t instanceof SVGElement)return t;throw new Error("Connect: magnet must be an SVGElement")},dragstart:function(t){var e=this.paper,n=this.relatedView,r=Le(t),i=e.clientToLocalPoint(r.clientX,r.clientY),o=i.x,a=i.y;n.dragLinkStart(r,this.getMagnetNode(),o,a),e.undelegateEvents(),this.delegateDocumentEvents(null,t.data),this.focus()},drag:function(t){var e=this.paper,n=this.relatedView,r=Le(t),i=e.snapToGrid(r.clientX,r.clientY),o=i.x,a=i.y;n.dragLink(r,o,a)},dragend:function(t){var e=this.paper,n=this.relatedView,r=Le(t),i=e.snapToGrid(r.clientX,r.clientY),o=i.x,a=i.y;n.dragLinkEnd(r,o,a),this.undelegateDocumentEvents(),e.delegateEvents(),this.blur(),n.checkMouseleave(r)}}),Pn.extend({name:"boundary",tagName:"rect",options:{padding:10,useModelGeometry:!1},attributes:{fill:"none",stroke:"#33334F","stroke-width":.5,"stroke-dasharray":"5, 5","pointer-events":"none"},onRender:function(){this.update()},update:function(){var t=this.relatedView,e=this.options,n=this.vel,r=e.useModelGeometry,i=e.rotate,o=je(e.padding),a=Tn(t,r).moveAndExpand({x:-o.left,y:-o.top,width:o.left+o.right,height:o.top+o.bottom}),s=t.model;if(s.isElement()){var u=s.angle();if(u)if(i){var l=s.getBBox().center();n.rotate(u,l.x,l.y,{absolute:!0})}else a=a.bbox(u)}return n.attr(a.toJSON()),this}});var Fn=Pn.extend({tagName:"g",type:null,children:[{tagName:"circle",selector:"anchor",attributes:{cursor:"pointer"}},{tagName:"rect",selector:"area",attributes:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onPointerDown",touchstart:"onPointerDown",dblclick:"onPointerDblClick",dbltap:"onPointerDblClick"},documentEvents:{mousemove:"onPointerMove",touchmove:"onPointerMove",mouseup:"onPointerUp",touchend:"onPointerUp",touchcancel:"onPointerUp"},options:{snap:function(t,e,n,r,i,o){var a=o.options.snapRadius,s="source"===r,u=s?0:-1,l=this.model.vertex(u)||this.getEndAnchor(s?"target":"source");return l&&(Math.abs(l.x-t.x)<a&&(t.x=l.x),Math.abs(l.y-t.y)<a&&(t.y=l.y)),t},anchor:Cn,resetAnchor:!0,customAnchorAttributes:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttributes:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,restrictArea:!0,redundancyRemoval:!0},onRender:function(){this.renderChildren(),this.toggleArea(!1),this.update()},update:function(){var t=this.type;return this.relatedView.getEndView(t)?(this.updateAnchor(),this.updateArea(),this.el.style.display=""):this.el.style.display="none",this},updateAnchor:function(){var t=this.childNodes;if(t){var e=t.anchor;if(e){var n=this.relatedView,r=this.type,i=n.getEndAnchor(r),o=this.options,a=n.model.prop([r,"anchor"]);e.setAttribute("transform","translate("+i.x+","+i.y+")");var s=a?o.customAnchorAttributes:o.defaultAnchorAttributes;for(var u in s)e.setAttribute(u,s[u])}}},updateArea:function(){var t=this.childNodes;if(t){var e=t.area;if(e){var n,r,i,o=this.relatedView,a=this.type,s=o.getEndView(a),u=s.model,l=o.getEndMagnet(a),c=this.options.areaPadding;isFinite(c)||(c=0),s.isNodeConnection(l)?(r=0,i=(n=s.getBBox()).center()):(n=s.getNodeUnrotatedBBox(l),r=u.angle(),i=n.center(),r&&i.rotate(u.getBBox().center(),-r)),n.inflate(c),e.setAttribute("x",-n.width/2),e.setAttribute("y",-n.height/2),e.setAttribute("width",n.width),e.setAttribute("height",n.height),e.setAttribute("transform","translate("+i.x+","+i.y+") rotate("+r+")")}}},toggleArea:function(t){this.childNodes.area.style.display=t?"":"none"},onPointerDown:function(t){this.guard(t)||(t.stopPropagation(),t.preventDefault(),this.paper.undelegateEvents(),this.delegateDocumentEvents(),this.focus(),this.toggleArea(this.options.restrictArea),this.relatedView.model.startBatch("anchor-move",{ui:!0,tool:this.cid}))},resetAnchor:function(t){var e=this.type,n=this.relatedView.model;t?n.prop([e,"anchor"],t,{rewrite:!0,ui:!0,tool:this.cid}):n.removeProp([e,"anchor"],{ui:!0,tool:this.cid})},onPointerMove:function(t){var e,n=this.relatedView,r=this.type,i=n.getEndView(r),o=i.model,a=n.getEndMagnet(r),s=Le(t),u=this.paper.clientToLocalPoint(s.clientX,s.clientY),l=this.options.snap;if("function"==typeof l&&(u=l.call(n,u,i,a,r,n,this),u=new Y(u)),this.options.restrictArea)if(i.isNodeConnection(a)){var c=i.getClosestPoint(u);c&&(u=c)}else{var f=i.getNodeUnrotatedBBox(a),h=o.angle(),d=o.getBBox().center(),p=u.clone().rotate(d,h);f.containsPoint(p)||(u=f.pointNearestToPoint(p).rotate(d,-h))}var g=this.options.anchor;"function"==typeof g&&(e=g.call(n,u,i,a,r,n)),this.resetAnchor(e),this.update()},onPointerUp:function(t){this.paper.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);var e=this.relatedView;this.options.redundancyRemoval&&e.removeRedundantLinearVertices({ui:!0,tool:this.cid}),e.model.stopBatch("anchor-move",{ui:!0,tool:this.cid})},onPointerDblClick:function(){var t=this.options.resetAnchor;!1!==t&&(!0===t&&(t=null),this.resetAnchor(Xe(t)),this.update())}});function Dn(t){t=We(t);var e=tn(t).reduce((function(t,e){return t[e.id]=e.clone(),t}),{});return tn(t).forEach((function(t){var n=e[t.id];if(n.isLink()){var r=n.source(),i=n.target();r.id&&e[r.id]&&n.prop("source/id",e[r.id].id),i.id&&e[i.id]&&n.prop("target/id",e[i.id].id)}var o=t.get("parent");o&&e[o]&&n.set("parent",e[o].id);var a=tn(t.get("embeds")).reduce((function(t,n){return e[n]&&t.push(e[n].id),t}),[]);Qe(a)||n.set("embeds",a)})),e}Fn.extend({name:"source-anchor",type:"source"}),Fn.extend({name:"target-anchor",type:"target"});var jn={x:"x",y:"y",width:"w",height:"h",minimum:"s",maximum:"l",diagonal:"d"},In=Object.keys(jn).map((function(t){return jn[t]})).join(""),Bn="[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?",zn=/\s/g,Vn=new RegExp("^(".concat(Bn,"\\*)?([").concat(In,"])([-+]{1,2}").concat(Bn,")?$"),"g");function $n(t){throw new Error("Invalid calc() expression: ".concat(t))}function Un(t,e){var n=Vn.exec(t.replace(zn,""));n||$n(t),Vn.lastIndex=0;var r=l(n,4),i=r[1],o=void 0===i?1:i,a=r[2],s=r[3],u=void 0===s?0:s,c=e.x,f=e.y,h=e.width,d=e.height,p=0;switch(a){case jn.width:p=h;break;case jn.height:p=d;break;case jn.x:p=c;break;case jn.y:p=f;break;case jn.minimum:p=Math.min(d,h);break;case jn.maximum:p=Math.max(d,h);break;case jn.diagonal:p=Math.sqrt(d*d+h*h)}return parseFloat(o)*p+function(t){if(!t)return 0;switch(l(t,1)[0]){case"+":return parseFloat(t.substr(1));case"-":return-parseFloat(t.substr(1))}return parseFloat(t)}(u)}function qn(t){return"string"==typeof t&&t.includes("calc")}var Hn="calc(",Gn=Hn.length;function Wn(t,e){for(var n=t,r=0;;){var i=n.indexOf(Hn,r);if(-1===i)return n;var o=i+Gn,a=1;t:for(;;){switch(n[o]){case"(":a++;break;case")":if(0==--a)break t;break;case void 0:$n(n)}o++}var s=n.slice(i+Gn,o);qn(s)&&(s=Wn(s,e));var u=String(Un(s,e));n=n.slice(0,i)+u+n.slice(o+1),r=i+u.length}}function Yn(t,e){return function(n,r){var i=Re(n);n=parseFloat(n),i&&(n/=100);var o={};if(isFinite(n)){var a=i||n>=0&&n<=1?n*r[e]:Math.max(n+r[e],0);o[t]=a}return o}}function Xn(t,e,n){return function(r,i){var o,a=Re(r);if(r=parseFloat(r),a&&(r/=100),isFinite(r)){var s=i[n]();o=a||r>0&&r<1?s[t]+i[e]*r:s[t]+r}var u=Y();return u[t]=o||0,u}}function Qn(t,e,n){return function(r,i){var o;o="middle"===r?i[e]/2:r===n?i[e]:isFinite(r)?r>-1&&r<1?-i[e]*r:-r:Re(r)?i[e]*parseFloat(r)/100:0;var a=Y();return a[t]=-(i[t]+o),a}}function Kn(t,e){var n="joint-shape",r=e&&e.resetOffset;return function(e,i,o){var a=we(o),s=a.data(n);if(!s||s.value!==e){var u=t(e);s={value:e,shape:u,shapeBBox:u.bbox()},a.data(n,s)}var l=s.shape.clone(),c=s.shapeBBox.clone(),f=c.origin(),h=i.origin();c.x=h.x,c.y=h.y;var d=i.maxRectScaleToFit(c,h),p=0===c.width||0===i.width?1:d.sx,g=0===c.height||0===i.height?1:d.sy;return l.scale(p,g,f),r&&l.translate(-f.x,-f.y),l}}function Jn(t){var e=Kn((function(t){return new Et(ye.normalizePathData(t))}),t);return function(t,n,r){return{d:e(t,n,r).serialize()}}}function Zn(t){var e=Kn(mt,t);return function(t,n,r){return{points:e(t,n,r).serialize()}}}function tr(t,e){var n=new Y(1,0);return function(r){var i,o,a=this[t](r);return a?(o=e.rotate?a.vector().vectorAngle(n):0,i=a.start):(i=this.path.start,o=0),0===o?{transform:"translate("+i.x+","+i.y+")"}:{transform:"translate("+i.x+","+i.y+") rotate("+o+")"}}}function er(t){return function(e,n,r){var i=ye(r);i.attr(t)!==e&&i.attr(t,e)}}function nr(t,e,n){return void 0!==n.text}function rr(){return this.model.isLink()}function ir(t){var e={},n=t.stroke;"string"==typeof n&&(e.stroke=n,e.fill=n);var r=t.strokeOpacity;return void 0===r&&(r=t["stroke-opacity"]),void 0===r&&(r=t.opacity),void 0!==r&&(e["stroke-opacity"]=r,e["fill-opacity"]=r),e}function or(t){var e=this.paper;return"url(#".concat("pattern"===t.type?e.definePattern(t):e.defineGradient(t),")")}var ar,sr,ur={xlinkShow:{set:"xlink:show"},xlinkRole:{set:"xlink:role"},xlinkType:{set:"xlink:type"},xlinkArcrole:{set:"xlink:arcrole"},xlinkTitle:{set:"xlink:title"},xlinkActuate:{set:"xlink:actuate"},xmlSpace:{set:"xml:space"},xmlBase:{set:"xml:base"},xmlLang:{set:"xml:lang"},preserveAspectRatio:{set:"preserveAspectRatio"},requiredExtension:{set:"requiredExtension"},requiredFeatures:{set:"requiredFeatures"},systemLanguage:{set:"systemLanguage"},externalResourcesRequired:{set:"externalResourceRequired"},href:{set:er("href")},xlinkHref:{set:er("xlink:href")},filter:{qualify:Ze,set:function(t){return"url(#"+this.paper.defineFilter(t)+")"}},fill:{qualify:Ze,set:or},stroke:{qualify:Ze,set:or},sourceMarker:{qualify:Ze,set:function(t,e,n,r){return t=$e(ir(r),t),{"marker-start":"url(#"+this.paper.defineMarker(t)+")"}}},targetMarker:{qualify:Ze,set:function(t,e,n,r){return t=$e(ir(r),{transform:"rotate(180)"},t),{"marker-end":"url(#"+this.paper.defineMarker(t)+")"}}},vertexMarker:{qualify:Ze,set:function(t,e,n,r){return t=$e(ir(r),t),{"marker-mid":"url(#"+this.paper.defineMarker(t)+")"}}},text:{qualify:function(t,e,n){return!n.textWrap||!Ze(n.textWrap)},set:function(t,e,n,r){var i=we(n),o="joint-text",a=i.data(o),s=cn(r,"lineHeight","annotations","textPath","x","textVerticalAnchor","eol","displayEmpty"),u=s.x;qn(u)&&(s.x=Wn(u,e));var l=s.fontSize=r["font-size"]||r.fontSize,c=JSON.stringify([t,s]);if(void 0===a||a!==c){l&&n.setAttribute("font-size",l);var f=s.textPath;if(gn(f)){var h=f.selector;if("string"==typeof h){var d=this.findBySelector(h)[0];d instanceof SVGPathElement&&(s.textPath=$e({"xlink:href":"#"+d.id},f))}}ye(n).text(""+t,s),i.data(o,c)}}},textWrap:{qualify:Ze,set:function(t,e,n,r){var i=t.width||0,o={};Re(i)?o.width=e.width*parseFloat(i)/100:o.width=i<=0?e.width+i:i;var a,s=t.height||0;Re(s)?o.height=e.height*parseFloat(s)/100:o.height=s<=0?e.height+s:s;var u=t.text;void 0===u&&(u=r.text),a=void 0!==u?De(""+u,o,{"font-weight":r["font-weight"]||r.fontWeight,"font-size":r["font-size"]||r.fontSize,"font-family":r["font-family"]||r.fontFamily,lineHeight:r.lineHeight,"letter-spacing":"letter-spacing"in r?r["letter-spacing"]:r.letterSpacing},{svgDocument:this.paper.svg,ellipsis:t.ellipsis,hyphen:t.hyphen,maxLineCount:t.maxLineCount}):"",ur.text.set.call(this,a,e,n,r)}},title:{qualify:function(t,e){return e instanceof SVGElement},set:function(t,e,n){var r=we(n),i="joint-title",o=r.data(i);if(void 0===o||o!==t){r.data(i,t);var a=n.firstChild;if(a&&"TITLE"===a.tagName.toUpperCase())a.textContent=t;else{var s=document.createElementNS(n.namespaceURI,"title");s.textContent=t,n.insertBefore(s,a)}}}},lineHeight:{qualify:nr},textVerticalAnchor:{qualify:nr},textPath:{qualify:nr},annotations:{qualify:nr},eol:{qualify:nr},displayEmpty:{qualify:nr},port:{set:function(t){return null===t||void 0===t.id?t:t.id}},style:{qualify:Ze,set:function(t,e,n){we(n).css(t)}},html:{set:function(t,e,n){we(n).html(t+"")}},ref:{},refX:{position:Xn("x","width","origin")},refY:{position:Xn("y","height","origin")},refDx:{position:Xn("x","width","corner")},refDy:{position:Xn("y","height","corner")},refWidth:{set:Yn("width","width")},refHeight:{set:Yn("height","height")},refRx:{set:Yn("rx","width")},refRy:{set:Yn("ry","height")},refRInscribed:{set:(ar=Yn("r","width"),sr=Yn("r","height"),function(t,e){return(e.height>e.width?ar:sr)(t,e)})},refRCircumscribed:{set:function(t,e){var n=Re(t);t=parseFloat(t),n&&(t/=100);var r,i=Math.sqrt(e.height*e.height+e.width*e.width);return isFinite(t)&&(r=n||t>=0&&t<=1?t*i:Math.max(t+i,0)),{r}}},refCx:{set:Yn("cx","width")},refCy:{set:Yn("cy","height")},xAlignment:{offset:Qn("x","width","right")},yAlignment:{offset:Qn("y","height","bottom")},resetOffset:{offset:function(t,e){return t?{x:-e.x,y:-e.y}:{x:0,y:0}}},refDResetOffset:{set:Jn({resetOffset:!0})},refDKeepOffset:{set:Jn({resetOffset:!1})},refPointsResetOffset:{set:Zn({resetOffset:!0})},refPointsKeepOffset:{set:Zn({resetOffset:!1})},connection:{qualify:rr,set:function(t){var e,n=t.stubs,r=void 0===n?0:n;if(isFinite(r)&&0!==r){var i;i=r<0?(this.getConnectionLength()+r)/2:r;var o=this.getConnection(),a=o.divideAtLength(i),s=o.divideAtLength(-i);a&&s&&(e="".concat(a[0].serialize()," ").concat(s[1].serialize()))}return{d:e||this.getSerializedConnection()}}},atConnectionLengthKeepGradient:{qualify:rr,set:tr("getTangentAtLength",{rotate:!0})},atConnectionLengthIgnoreGradient:{qualify:rr,set:tr("getTangentAtLength",{rotate:!1})},atConnectionRatioKeepGradient:{qualify:rr,set:tr("getTangentAtRatio",{rotate:!0})},atConnectionRatioIgnoreGradient:{qualify:rr,set:tr("getTangentAtRatio",{rotate:!1})}};ur["xlink:href"]=ur.xlinkHref,["transform","d","points","width","height","cx","cy","r","rx","ry","x1","x2","y1","y2","x","y","dx","dy"].forEach((function(t){ur[t]={qualify:qn,set:function(e,n){return s({},t,Wn(e,n))}}})),ur.refR=ur.refRInscribed,ur.refD=ur.refDResetOffset,ur.refPoints=ur.refPointsResetOffset,ur.atConnectionLength=ur.atConnectionLengthKeepGradient,ur.atConnectionRatio=ur.atConnectionRatioKeepGradient,ur.refX2=ur.refX,ur.refY2=ur.refY,ur.refWidth2=ur.refWidth,ur.refHeight2=ur.refHeight,ur["ref-x"]=ur.refX,ur["ref-y"]=ur.refY,ur["ref-dy"]=ur.refDy,ur["ref-dx"]=ur.refDx,ur["ref-width"]=ur.refWidth,ur["ref-height"]=ur.refHeight,ur["x-alignment"]=ur.xAlignment,ur["y-alignment"]=ur.yAlignment;var lr=ur,cr=_n.Model.extend({constructor:function(t,e){var n,r=t||{};"function"==typeof this.preinitialize&&this.preinitialize.apply(this,arguments),this.cid=dn("c"),this.attributes={},e&&e.collection&&(this.collection=e.collection),e&&e.parse&&(r=this.parse(r,e)||{}),(n=un(this,"defaults"))&&(r=pn({},n,r)),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)},translate:function(t,e,n){throw new Error("Must define a translate() method.")},toJSON:function(){var t=un(this.constructor.prototype,"defaults").attrs||{},e=this.attributes.attrs,n={};fn(e,(function(e,r){var i=t[r];fn(e,(function(t,e){gn(t)&&!Array.isArray(t)?fn(t,(function(t,o){i&&i[e]&&Ke(i[e][o],t)||(n[r]=n[r]||{},(n[r][e]||(n[r][e]={}))[o]=t)})):i&&Ke(i[e],t)||(n[r]=n[r]||{},n[r][e]=t)}))}));var r=Xe(ln(this.attributes,"attrs"));return r.attrs=n,r},initialize:function(t){var e=this.getIdAttribute();t&&e in t||this.set(e,this.generateId(),{silent:!0}),this._transitionIds={},this._scheduledTransitionIds={},this.processPorts(),this.on("change:attrs",this.processPorts,this)},getIdAttribute:function(){return this.idAttribute||"id"},generateId:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},processPorts:function(){var t=this.ports,e={};fn(this.get("attrs"),(function(t,n){t&&t.port&&(void 0!==t.port.id?e[t.port.id]=t.port:e[t.port]={id:t.port})}));var n={};fn(t,(function(t,r){e[r]||(n[r]=!0)})),this.graph&&!Qe(n)&&(this.graph.getConnectedLinks(this,{inbound:!0}).forEach((function(t){n[t.get("target").port]&&t.remove()})),this.graph.getConnectedLinks(this,{outbound:!0}).forEach((function(t){n[t.get("source").port]&&t.remove()}))),this.ports=e},remove:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.graph,n=this.collection;if(!e)return n&&n.remove(this,t),this;e.startBatch("remove");var r=this.getParentCell();r&&r.unembed(this,t);for(var i=this.getEmbeddedCells(),o=0,a=i.length;o<a;o++){var s=i[o];s&&s.remove(t)}return this.trigger("remove",this,e.attributes.cells,t),e.stopBatch("remove"),this},toFront:function(t){var e=this.graph;if(e){t=t||{};var n,r=e.maxZIndex();t.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:!1!==t.breadthFirst})).unshift(this):n=[this],r=r-n.length+1;var i=e.get("cells"),o=i.indexOf(this)!==i.length-n.length;o||(o=n.some((function(t,e){return t.get("z")!==r+e}))),o&&(this.startBatch("to-front"),r+=n.length,n.forEach((function(e,n){e.set("z",r+n,t)})),this.stopBatch("to-front"))}return this},toBack:function(t){var e=this.graph;if(e){t=t||{};var n,r=e.minZIndex();t.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:!1!==t.breadthFirst})).unshift(this):n=[this];var i=0!==e.get("cells").indexOf(this);i||(i=n.some((function(t,e){return t.get("z")!==r+e}))),i&&(this.startBatch("to-back"),r-=n.length,n.forEach((function(e,n){e.set("z",r+n,t)})),this.stopBatch("to-back"))}return this},parent:function(t,e){return void 0===t?this.get("parent"):this.set("parent",t,e)},embed:function(t,e){var n=Array.isArray(t)?t:[t];if(!this.canEmbed(n))throw new Error("Recursive embedding not allowed.");return this._embedCells(n,e),this},unembed:function(t,e){var n=Array.isArray(t)?t:[t];return this._unembedCells(n,e),this},canEmbed:function(t){var e=this;return(Array.isArray(t)?t:[t]).every((function(t){return e!==t&&!e.isEmbeddedIn(t)}))},_embedCells:function(t,e){var n=this,r="embed";this.startBatch(r);var i=$e([],this.get("embeds"));t.forEach((function(t){i[t.isLink()?"unshift":"push"](t.id),t.parent(n.id,e)})),this.set("embeds",We(i),e),this.stopBatch(r)},_unembedCells:function(t,e){var n="unembed";this.startBatch(n),t.forEach((function(t){return t.unset("parent",e)})),this.set("embeds",rn.apply(void 0,[this.get("embeds")].concat(u(t.map((function(t){return t.id}))))),e),this.stopBatch(n)},getParentCell:function(){var t=this.parent(),e=this.graph;return t&&e&&e.getCell(t)||null},getAncestors:function(){var t=[];if(!this.graph)return t;for(var e=this.getParentCell();e;)t.push(e),e=e.getParentCell();return t},getEmbeddedCells:function(t){if(t=t||{},this.graph){var e;if(t.deep)if(t.breadthFirst){e=[];for(var n=this.getEmbeddedCells();n.length>0;){var r=n.shift();e.push(r),n.push.apply(n,r.getEmbeddedCells())}}else(e=this.getEmbeddedCells()).forEach((function(n){e.push.apply(e,n.getEmbeddedCells(t))}));else e=tn(this.get("embeds")).map(this.graph.getCell,this.graph);return e}return[]},isEmbeddedIn:function(t,e){var n=mn(t)?t:t.id,r=this.parent();if(e=Ue({deep:!0},e),this.graph&&e.deep){for(;r;){if(r===n)return!0;r=this.graph.getCell(r).parent()}return!1}return r===n},isEmbedded:function(){return!!this.parent()},clone:function(t){if((t=t||{}).deep)return tn(Dn([this].concat(this.getEmbeddedCells({deep:!0}))));var e=_n.Model.prototype.clone.apply(this,arguments);return e.set(this.getIdAttribute(),this.generateId()),e.unset("embeds"),e.unset("parent"),e},prop:function(t,e,n){var r="/",i=mn(t);if(i||Array.isArray(t)){if(arguments.length>1){var o,a;i?a=(o=t).split("/"):(o=t.join(r),a=t.slice());var s=a[0],u=a.length;if((n=n||{}).propertyPath=o,n.propertyValue=e,n.propertyPathArray=a,1===u)return this.set(s,e,n);for(var l={},c=l,f=s,h=1;h<u;h++){var d=a[h],p=Number.isFinite(i?Number(d):d);c=c[f]=p?[]:{},f=d}l=Ce(l,a,e,"/");var g=pn({},this.attributes);n.rewrite&&Te(g,o,"/");var v=pn(g,l);return this.set(s,v[s],n)}return Ae(this.attributes,t,r)}return this.set(pn({},this.attributes,t),e)},removeProp:function(t,e){e=e||{};var n=Array.isArray(t)?t:t.split("/"),r=n[0];if("attrs"===r&&(e.dirty=!0),1===n.length)return this.unset(t,e);var i=n.slice(1),o=Xe(this.get(r));return Te(o,i,"/"),this.set(r,o,e)},attr:function(t,e,n){var r=Array.from(arguments);return 0===r.length?this.get("attrs"):(Array.isArray(t)?r[0]=["attrs"].concat(t):mn(t)?r[0]="attrs/"+t:r[0]={attrs:t},this.prop.apply(this,r))},removeAttr:function(t,e){return Array.isArray(t)?this.removeProp(["attrs"].concat(t)):this.removeProp("attrs/"+t,e)},transition:function(t,e,n,r){var i=this;r=r||"/",n=$e({duration:100,delay:10,timingFunction:Ie.linear,valueFunction:Be.number},n);var o,a,s=0,u=function(e){var r,i,a;(i=(e-=s=s||e)/n.duration)<1?this._transitionIds[t]=r=Me(u):(i=1,delete this._transitionIds[t]),a=o(n.timingFunction(i)),n.transitionId=r,this.prop(t,a,n),r||this.trigger("transition:end",this,t)}.bind(this),l=this._scheduledTransitionIds;return a=setTimeout((function(s){l[t]&&(l[t]=rn(l[t],a),0===l[t].length&&delete l[t]),i.stopPendingTransitions(t,r),o=n.valueFunction(Ae(i.attributes,t,r),e),i._transitionIds[t]=Me(s),i.trigger("transition:start",i,t)}),n.delay,u),l[t]||(l[t]=[]),l[t].push(a),a},getTransitions:function(){return an(Object.keys(this._transitionIds),Object.keys(this._scheduledTransitionIds))},stopScheduledTransitions:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=this._scheduledTransitionIds,r=void 0===n?{}:n,i=Object.keys(r);if(t){var o=t.split(e);i=i.filter((function(t){return Ke(o,t.split(e).slice(0,o.length))}))}return i.forEach((function(t){r[t].forEach((function(t){return clearTimeout(t)})),delete r[t]})),this},stopPendingTransitions:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",r=this._transitionIds,i=void 0===r?{}:r,o=Object.keys(i);if(t){var a=t.split(n);o=o.filter((function(t){return Ke(a,t.split(n).slice(0,a.length))}))}o.forEach((function(t){var n=i[t];Oe(n),delete i[t],e.trigger("transition:end",e,t)}))},stopTransitions:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";return this.stopScheduledTransitions(t,e),this.stopPendingTransitions(t,e),this},addTo:function(t,e){return t.addCell(this,e),this},findView:function(t){return t.findViewByModel(this)},isElement:function(){return!1},isLink:function(){return!1},startBatch:function(t,e){return this.graph&&this.graph.startBatch(t,$e({},e,{cell:this})),this},stopBatch:function(t,e){return this.graph&&this.graph.stopBatch(t,$e({},e,{cell:this})),this},getChangeFlag:function(t){var e=0;if(!t)return e;for(var n in t)t.hasOwnProperty(n)&&this.hasChanged(n)&&(e|=t[n]);return e},angle:function(){return 0},position:function(){return new Y(0,0)},getPointFromConnectedLink:function(){return new Y},getBBox:function(){return new ut(0,0,0,0)},getPointRotatedAroundCenter:function(t,e,n){var r=new Y(e,n);return t&&r.rotate(this.getBBox().center(),t),r},getAbsolutePointFromRelative:function(t,e){return this.getPointRotatedAroundCenter(-this.angle(),this.position().offset(t,e))},getRelativePointFromAbsolute:function(t,e){return this.getPointRotatedAroundCenter(this.angle(),t,e).difference(this.position())}},{getAttributeDefinition:function(t){var e=this.attributes,n=lr;return e&&e[t]||n[t]},define:function(t,e,n,r){n=$e({defaults:qe({type:t},e,this.prototype.defaults)},n);var i=this.extend(n,r);return"undefined"!=typeof joint&&sn(joint,"shapes")&&Ce(joint.shapes,t,i,"."),i}}),fr=cr.extend({markup:['<path class="connection" stroke="black" d="M 0 0 0 0"/>','<path class="marker-source" fill="black" stroke="black" d="M 0 0 0 0"/>','<path class="marker-target" fill="black" stroke="black" d="M 0 0 0 0"/>','<path class="connection-wrap" d="M 0 0 0 0"/>','<g class="labels"/>','<g class="marker-vertices"/>','<g class="marker-arrowheads"/>','<g class="link-tools"/>'].join(""),toolMarkup:['<g class="link-tool">','<g class="tool-remove" event="remove">','<circle r="11" />','<path transform="scale(.8) translate(-16, -16)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z" />',"<title>Remove link.</title>","</g>",'<g class="tool-options" event="link:options">','<circle r="11" transform="translate(25)"/>','<path fill="white" transform="scale(.55) translate(29, -16)" d="M31.229,17.736c0.064-0.571,0.104-1.148,0.104-1.736s-0.04-1.166-0.104-1.737l-4.377-1.557c-0.218-0.716-0.504-1.401-0.851-2.05l1.993-4.192c-0.725-0.91-1.549-1.734-2.458-2.459l-4.193,1.994c-0.647-0.347-1.334-0.632-2.049-0.849l-1.558-4.378C17.165,0.708,16.588,0.667,16,0.667s-1.166,0.041-1.737,0.105L12.707,5.15c-0.716,0.217-1.401,0.502-2.05,0.849L6.464,4.005C5.554,4.73,4.73,5.554,4.005,6.464l1.994,4.192c-0.347,0.648-0.632,1.334-0.849,2.05l-4.378,1.557C0.708,14.834,0.667,15.412,0.667,16s0.041,1.165,0.105,1.736l4.378,1.558c0.217,0.715,0.502,1.401,0.849,2.049l-1.994,4.193c0.725,0.909,1.549,1.733,2.459,2.458l4.192-1.993c0.648,0.347,1.334,0.633,2.05,0.851l1.557,4.377c0.571,0.064,1.148,0.104,1.737,0.104c0.588,0,1.165-0.04,1.736-0.104l1.558-4.377c0.715-0.218,1.399-0.504,2.049-0.851l4.193,1.993c0.909-0.725,1.733-1.549,2.458-2.458l-1.993-4.193c0.347-0.647,0.633-1.334,0.851-2.049L31.229,17.736zM16,20.871c-2.69,0-4.872-2.182-4.872-4.871c0-2.69,2.182-4.872,4.872-4.872c2.689,0,4.871,2.182,4.871,4.872C20.871,18.689,18.689,20.871,16,20.871z"/>',"<title>Link options.</title>","</g>","</g>"].join(""),doubleToolMarkup:void 0,vertexMarkup:['<g class="marker-vertex-group" transform="translate(<%= x %>, <%= y %>)">','<circle class="marker-vertex" idx="<%= idx %>" r="10" />','<path class="marker-vertex-remove-area" idx="<%= idx %>" d="M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z" transform="translate(5, -33)"/>','<path class="marker-vertex-remove" idx="<%= idx %>" transform="scale(.8) translate(9.5, -37)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z">',"<title>Remove vertex.</title>","</path>","</g>"].join(""),arrowheadMarkup:['<g class="marker-arrowhead-group marker-arrowhead-group-<%= end %>">','<path class="marker-arrowhead" end="<%= end %>" d="M 26 0 L 0 13 L 26 26 z" />',"</g>"].join(""),defaultLabel:void 0,labelMarkup:void 0,_builtins:{defaultLabel:{markup:[{tagName:"rect",selector:"rect"},{tagName:"text",selector:"text"}],attrs:{text:{fill:"#000000",fontSize:14,textAnchor:"middle",yAlignment:"middle",pointerEvents:"none"},rect:{ref:"text",fill:"#ffffff",rx:3,ry:3,refWidth:1,refHeight:1,refX:0,refY:0}},position:{distance:.5}}},defaults:{type:"link",source:{},target:{}},isLink:function(){return!0},disconnect:function(t){return this.set({source:{x:0,y:0},target:{x:0,y:0}},t)},source:function(t,e,n){return void 0===t?Ye(this.get("source")):t instanceof cr?((r=Ye(e)||{}).id=t.id,i=n,this.set("source",r,i)):Ze(t)?(r=t,i=e,this.set("source",r,i)):((r=Ye(e)||{}).x=t.x,r.y=t.y,i=n,this.set("source",r,i));var r,i},target:function(t,e,n){return void 0===t?Ye(this.get("target")):t instanceof cr?((r=Ye(e)||{}).id=t.id,i=n,this.set("target",r,i)):Ze(t)?(r=t,i=e,this.set("target",r,i)):((r=Ye(e)||{}).x=t.x,r.y=t.y,i=n,this.set("target",r,i));var r,i},router:function(t,e,n){if(void 0===t){var r=this.get("router");return r?"object"==h(r)?Ye(r):r:this.get("manhattan")?{name:"orthogonal"}:null}var i="object"==h(t)||"function"==typeof t,o=i?t:{name:t,args:e},a=i?e:n;return this.set("router",o,a)},connector:function(t,e,n){if(void 0===t){var r=this.get("connector");return r?"object"==h(r)?Ye(r):r:this.get("smooth")?{name:"smooth"}:null}var i="object"==h(t)||"function"==typeof t,o=i?t:{name:t,args:e},a=i?e:n;return this.set("connector",o,a)},label:function(t,e,n){var r=this.labels();return(t=isFinite(t)&&null!==t?0|t:0)<0&&(t=r.length+t),arguments.length<=1?this.prop(["labels",t]):this.prop(["labels",t],e,n)},labels:function(t,e){return 0===arguments.length?(t=this.get("labels"),Array.isArray(t)?t.slice():[]):(Array.isArray(t)||(t=[]),this.set("labels",t,e))},hasLabels:function(){var t=this.attributes.labels;return Array.isArray(t)&&t.length>0},insertLabel:function(t,e,n){if(!e)throw new Error("dia.Link: no label provided");var r=this.labels(),i=r.length;return(t=isFinite(t)&&null!==t?0|t:i)<0&&(t=i+t+1),r.splice(t,0,e),this.labels(r,n)},appendLabel:function(t,e){return this.insertLabel(-1,t,e)},removeLabel:function(t,e){var n=this.labels();return t=isFinite(t)&&null!==t?0|t:-1,n.splice(t,1),this.labels(n,e)},vertex:function(t,e,n){var r=this.vertices();if((t=isFinite(t)&&null!==t?0|t:0)<0&&(t=r.length+t),arguments.length<=1)return this.prop(["vertices",t]);var i=this._normalizeVertex(e);return this.prop(["vertices",t],i,n)},vertices:function(t,e){if(0===arguments.length)return t=this.get("vertices"),Array.isArray(t)?t.slice():[];Array.isArray(t)||(t=[]);for(var n=[],r=0;r<t.length;r++){var i=t[r],o=this._normalizeVertex(i);n.push(o)}return this.set("vertices",n,e)},insertVertex:function(t,e,n){if(!e)throw new Error("dia.Link: no vertex provided");var r=this.vertices(),i=r.length;(t=isFinite(t)&&null!==t?0|t:i)<0&&(t=i+t+1);var o=this._normalizeVertex(e);return r.splice(t,0,o),this.vertices(r,n)},removeVertex:function(t,e){var n=this.vertices();return t=isFinite(t)&&null!==t?0|t:-1,n.splice(t,1),this.vertices(n,e)},_normalizeVertex:function(t){return Ze(t)?t:{x:t.x,y:t.y}},translate:function(t,e,n){return(n=n||{}).translateBy=n.translateBy||this.id,n.tx=t,n.ty=e,this.applyToPoints((function(n){return{x:(n.x||0)+t,y:(n.y||0)+e}}),n)},scale:function(t,e,n,r){return this.applyToPoints((function(r){return Y(r).scale(t,e,n).toJSON()}),r)},applyToPoints:function(t,e){if(!Je(t))throw new TypeError("dia.Link: applyToPoints expects its first parameter to be a function.");var n={},r=this.attributes,i=r.source,o=r.target;i.id||(n.source=t(i)),o.id||(n.target=t(o));var a=this.vertices();return a.length>0&&(n.vertices=a.map(t)),this.set(n,e)},getSourcePoint:function(){var t=this.getSourceCell();return t?t.getPointFromConnectedLink(this,"source"):new Y(this.source())},getTargetPoint:function(){var t=this.getTargetCell();return t?t.getPointFromConnectedLink(this,"target"):new Y(this.target())},getPointFromConnectedLink:function(){return this.getPolyline().pointAt(.5)},getPolyline:function(){var t=[this.getSourcePoint()].concat(u(this.vertices().map(Y)),[this.getTargetPoint()]);return new mt(t)},getBBox:function(){return this.getPolyline().bbox()},reparent:function(t){var e;if(this.graph){var n=this.getSourceElement(),r=this.getTargetElement(),i=this.getParentCell();n&&r&&(e=n===r||n.isEmbeddedIn(r)?r:r.isEmbeddedIn(n)?n:this.graph.getCommonAncestor(n,r)),!i||e&&e.id===i.id||i.unembed(this,t),e&&e.embed(this,t)}return e},hasLoop:function(t){t=t||{};var e=this.attributes,n=e.source,r=e.target,i=n.id,o=r.id;if(!i||!o)return!1;var a=i===o;if(!a&&t.deep&&this.graph){var s=this.getSourceCell(),u=this.getTargetCell();a=s.isEmbeddedIn(u)||u.isEmbeddedIn(s)}return a},getSourceCell:function(){var t=this.graph,e=this.attributes.source;return e&&e.id&&t&&t.getCell(e.id)||null},getSourceElement:function(){var t=this,e={};do{if(e[t.id])return null;e[t.id]=!0,t=t.getSourceCell()}while(t&&t.isLink());return t},getTargetCell:function(){var t=this.graph,e=this.attributes.target;return e&&e.id&&t&&t.getCell(e.id)||null},getTargetElement:function(){var t=this,e={};do{if(e[t.id])return null;e[t.id]=!0,t=t.getTargetCell()}while(t&&t.isLink());return t},getRelationshipAncestor:function(){var t;if(this.graph){var e=[this,this.getSourceElement(),this.getTargetElement()].filter((function(t){return!!t}));t=this.graph.getCommonAncestor.apply(this.graph,e)}return t||null},isRelationshipEmbeddedIn:function(t){var e=mn(t)||vn(t)?t:t.id,n=this.getRelationshipAncestor();return!!n&&(n.id===e||n.isEmbeddedIn(e))},_getDefaultLabel:function(){var t=this.get("defaultLabel")||this.defaultLabel||{},e={};return e.markup=t.markup||this.get("labelMarkup")||this.labelMarkup,e.position=t.position,e.attrs=t.attrs,e.size=t.size,e}},{endsEqual:function(t,e){var n=t.port===e.port||!t.port&&!e.port;return t.id===e.id&&n}});function hr(t,e,n){var r=t.toJSON();return r.angle=e||0,Ue({},n,r)}function dr(t,e,n){return t.map((function(t,e,n){var r=this.pointAt((e+.5)/n.length);return(t.dx||t.dy)&&r.offset(t.dx||0,t.dy||0),hr(r.round(),0,t)}),dt(e,n))}function pr(t,e,n,r){var i=e.center(),o=e.width/e.height,a=e.topMiddle(),s=Z.fromRect(e);return t.map((function(t,e,u){var l=n+r(e,u.length),c=a.clone().rotate(i,-l).scale(o,1,i),f=t.compensateRotation?-s.tangentTheta(c):0;return(t.dx||t.dy)&&c.offset(t.dx||0,t.dy||0),t.dr&&c.move(i,t.dr),hr(c.round(),f,t)}))}function gr(t,e){var n=e.x;mn(n)&&(n=parseFloat(n)/100*t.width);var r=e.y;return mn(r)&&(r=parseFloat(r)/100*t.height),X(n||0,r||0)}var vr=function(t,e,n){return t.map(gr.bind(null,e))},mr=function(t,e,n){return n.fn(t,e,n)},yr=function(t,e,n){return dr(t,gr(e,n.start||e.origin()),gr(e,n.end||e.corner()))},br=function(t,e,n){return dr(t,e.origin(),e.bottomLeft())},wr=function(t,e,n){return dr(t,e.topRight(),e.corner())},xr=function(t,e,n){return dr(t,e.origin(),e.topRight())},Sr=function(t,e,n){return dr(t,e.bottomLeft(),e.corner())},kr=function(t,e,n){var r=n.startAngle||0,i=n.step||360/t.length;return pr(t,e,r,(function(t){return t*i}))},_r=function(t,e,n){var r=n.startAngle||0,i=n.step||20;return pr(t,e,r,(function(t,e){return(t+.5-e/2)*i}))};function Er(t,e){return qe({},t,e,{x:0,y:0,angle:0,attrs:{".":{y:"0","text-anchor":"start"}}})}function Ar(t,e,n,r){r=Ue({},r,{offset:15});var i,o,a,s,u=e.center().theta(t),l=Pr(e),c=r.offset,f=0;u<l[1]||u>l[2]?(a=".3em",i=c,o=0,s="start"):u<l[0]?(a="0",i=0,o=-c,n?(f=-90,s="start"):s="middle"):u<l[3]?(a=".3em",i=-c,o=0,s="end"):(a=".6em",i=0,o=c,n?(f=90,s="start"):s="middle");var h=Math.round;return Er({x:h(i),y:h(o),angle:f,attrs:{".":{y:a,"text-anchor":s}}})}function Pr(t){var e=t.center(),n=e.theta(t.origin()),r=e.theta(t.bottomLeft()),i=e.theta(t.corner());return[n,e.theta(t.topRight()),i,r]}function Cr(t,e,n,r){var i,o,a,s,u=e.center().theta(t),l=(r=Ue({},r,{offset:15})).offset,c=0,f=Pr(e);u<f[1]||u>f[2]?(a=".3em",i=-l,o=0,s="end"):u<f[0]?(a=".6em",i=0,o=l,n?(c=90,s="start"):s="middle"):u<f[3]?(a=".3em",i=l,o=0,s="start"):(a="0em",i=0,o=-l,n?(c=-90,s="start"):s="middle");var h=Math.round;return Er({x:h(i),y:h(o),angle:c,attrs:{".":{y:a,"text-anchor":s}}})}function Tr(t,e,n){n=Ue({},n,{offset:20});var r,i=X(0,0),o=-t.theta(i),a=o,s=t.clone().move(i,n.offset).difference(t).round(),u=".3em";(o+90)%180==0?(r=e?"end":"middle",e||-270!==o||(u="0em")):o>-270&&o<-90?(r="start",a=o-180):r="end";var l=Math.round;return Er({x:l(s.x),y:l(s.y),angle:e?a:0,attrs:{".":{y:u,"text-anchor":r}}})}var Nr=function(t,e,n){return Er(n,e)},Lr=function(t,e,n){return Er(n,{x:-15,attrs:{".":{y:".3em","text-anchor":"end"}}})},Mr=function(t,e,n){return Er(n,{x:15,attrs:{".":{y:".3em","text-anchor":"start"}}})},Or=function(t,e,n){return Er(n,{y:-15,attrs:{".":{"text-anchor":"middle"}}})},Rr=function(t,e,n){return Er(n,{y:15,attrs:{".":{y:".6em","text-anchor":"middle"}}})},Fr=function(t,e,n){return Ar(t,e,!0,n)},Dr=function(t,e,n){return Ar(t,e,!1,n)},jr=function(t,e,n){return Cr(t,e,!0,n)},Ir=function(t,e,n){return Cr(t,e,!1,n)},Br=function(t,e,n){return Tr(t.difference(e.center()),!1,n)},zr=function(t,e,n){return Tr(t.difference(e.center()),!0,n)},Vr=function(t){var e=Xe(t)||{};this.ports=[],this.groups={},this.portLayoutNamespace=r,this.portLabelLayoutNamespace=i,this._init(e)};Vr.prototype={getPorts:function(){return this.ports},getGroup:function(t){return this.groups[t]||{}},getPortsByGroup:function(t){return this.ports.filter((function(e){return e.group===t}))},getGroupPortsMetrics:function(t,e){var n=this.getGroup(t),r=this.getPortsByGroup(t),i=n.position||{},o=i.name,a=this.portLayoutNamespace;a[o]||(o="left");var s=i.args||{},u=r.map((function(t){return t&&t.position&&t.position.args})),l=a[o](u,e,s),c={ports:r,result:[]};return tn(l).reduce(function(t,n,r){var i=t.ports[r];return t.result.push({portId:i.id,portTransformation:n,labelTransformation:this._getPortLabelLayout(i,Y(n),e),portAttrs:i.attrs,portSize:i.size,labelSize:i.label.size}),t}.bind(this),c),c.result},_getPortLabelLayout:function(t,e,n){var r=this.portLabelLayoutNamespace,i=t.label.position.name||"left";return r[i]?r[i](e,n,t.label.position.args):null},_init:function(t){if(gn(t.groups))for(var e=Object.keys(t.groups),n=0,r=e.length;n<r;n++){var i=e[n];this.groups[i]=this._evaluateGroup(t.groups[i])}for(var o=tn(t.items),a=0,s=o.length;a<s;a++)this.ports.push(this._evaluatePort(o[a]))},_evaluateGroup:function(t){return pn(t,{position:this._getPosition(t.position,!0),label:this._getLabel(t,!0)})},_evaluatePort:function(t){var e=$e({},t),n=this.getGroup(t.group);return e.markup=e.markup||n.markup,e.attrs=pn({},n.attrs,e.attrs),e.position=this._createPositionNode(n,e),e.label=pn({},n.label,this._getLabel(e)),e.z=this._getZIndex(n,e),e.size=$e({},n.size,e.size),e},_getZIndex:function(t,e){return vn(e.z)?e.z:vn(t.z)||"auto"===t.z?t.z:"auto"},_createPositionNode:function(t,e){return pn({name:"left",args:{}},t.position,{args:e.args})},_getPosition:function(t,e){var n,r={};Je(t)?(n="fn",r.fn=t):mn(t)?n=t:void 0===t?n=e?"left":null:Array.isArray(t)?(n="absolute",r.x=t[0],r.y=t[1]):gn(t)&&(n=t.name,$e(r,t.args));var i={args:r};return n&&(i.name=n),i},_getLabel:function(t,e){var n=t.label||{},r=n;return r.position=this._getPosition(n.position,e),r}};var $r={_initializePorts:function(){this._createPortData(),this.on("change:ports",(function(){this._processRemovedPort(),this._createPortData()}),this)},_processRemovedPort:function(){var t=this.get("ports")||{},e={};tn(t.items).forEach((function(t){e[t.id]=!0}));var n=this.previous("ports")||{},r={};tn(n.items).forEach((function(t){e[t.id]||(r[t.id]=!0)}));var i=this.graph;i&&!Qe(r)&&(i.getConnectedLinks(this,{inbound:!0}).forEach((function(t){r[t.get("target").port]&&t.remove()})),i.getConnectedLinks(this,{outbound:!0}).forEach((function(t){r[t.get("source").port]&&t.remove()})))},hasPorts:function(){var t=this.prop("ports/items");return Array.isArray(t)&&t.length>0},hasPort:function(t){return-1!==this.getPortIndex(t)},getPorts:function(){return Xe(this.prop("ports/items"))||[]},getGroupPorts:function(t){var e=tn(this.prop(["ports","items"])).filter((function(e){return e.group===t}));return Xe(e)},getPort:function(t){return Xe(tn(this.prop("ports/items")).find((function(e){return e.id&&e.id===t})))},getPortsPositions:function(t){return this._portSettingsData.getGroupPortsMetrics(t,ut(this.size())).reduce((function(t,e){var n=e.portTransformation;return t[e.portId]={x:n.x,y:n.y,angle:n.angle},t}),{})},getPortIndex:function(t){var e=gn(t)?t.id:t;return this._isValidPortId(e)?tn(this.prop("ports/items")).findIndex((function(t){return t.id===e})):-1},addPort:function(t,e){if(!gn(t)||Array.isArray(t))throw new Error("Element: addPort requires an object.");var n=$e([],this.prop("ports/items"));return n.push(t),this.prop("ports/items",n,e),this},insertPort:function(t,e,n){var r="number"==typeof t?t:this.getPortIndex(t);if(!gn(e)||Array.isArray(e))throw new Error("dia.Element: insertPort requires an object.");var i=$e([],this.prop("ports/items"));return i.splice(r,0,e),this.prop("ports/items",i,n),this},portProp:function(t,e,n,r){var i=this.getPortIndex(t);if(-1===i)throw new Error("Element: unable to find port with id "+t);var o=Array.prototype.slice.call(arguments,1);return Array.isArray(e)?o[0]=["ports","items",i].concat(e):mn(e)?o[0]=["ports/items/",i,"/",e].join(""):(o=["ports/items/"+i],Ze(e)&&(o.push(e),o.push(n))),this.prop.apply(this,o)},_validatePorts:function(){var t=this.get("ports")||{},e=[],n=tn((t=t||{}).items);return n.forEach((function(t){"object"!=h(t)&&e.push("Element: invalid port ",t),this._isValidPortId(t.id)||(t.id=this.generatePortId())}),this),We(n,"id").length!==n.length&&e.push("Element: found id duplicities in ports."),e},generatePortId:function(){return this.generateId()},_isValidPortId:function(t){return null!=t&&!gn(t)},addPorts:function(t,e){return t.length&&this.prop("ports/items",$e([],this.prop("ports/items")).concat(t),e),this},removePort:function(t,e){var n=e||{},r=this.getPortIndex(t);if(-1!==r){var i=$e([],this.prop(["ports","items"]));i.splice(r,1),n.rewrite=!0,this.startBatch("port-remove"),this.prop(["ports","items"],i,n),this.stopBatch("port-remove")}return this},removePorts:function(t,e){var n,r;if(Array.isArray(t)){if(n=e||{},0===t.length)return this.this;r=$e([],this.prop(["ports","items"])).filter((function(e){return!t.some((function(t){var n=gn(t)?t.id:t;return e.id===n}))}))}else n=t||{},r=[];return this.startBatch("port-remove"),n.rewrite=!0,this.prop(["ports","items"],r,n),this.stopBatch("port-remove"),this},_createPortData:function(){var t,e=this._validatePorts();if(e.length>0)throw this.set("ports",this.previous("ports")),new Error(e.join(" "));this._portSettingsData&&(t=this._portSettingsData.getPorts()),this._portSettingsData=new Vr(this.get("ports"));var n=this._portSettingsData.getPorts();if(t){var r=n.filter((function(e){if(!t.find((function(t){return t.id===e.id})))return e})),i=t.filter((function(t){if(!n.find((function(e){return e.id===t.id})))return t}));i.length>0&&this.trigger("ports:remove",this,i),r.length>0&&this.trigger("ports:add",this,r)}}},Ur={portContainerMarkup:"g",portMarkup:[{tagName:"circle",selector:"circle",attributes:{r:10,fill:"#FFFFFF",stroke:"#000000"}}],portLabelMarkup:[{tagName:"text",selector:"text",attributes:{fill:"#000000"}}],_portElementsCache:null,_initializePorts:function(){this._cleanPortsCache()},_refreshPorts:function(){this._removePorts(),this._cleanPortsCache(),this._renderPorts()},_cleanPortsCache:function(){this._portElementsCache={}},_renderPorts:function(){for(var t=[],e=this._getContainerElement(),n=0,r=e.node.childNodes.length;n<r;n++)t.push(e.node.childNodes[n]);var i=en(this.model._portSettingsData.getPorts(),"z");tn(i.auto).forEach((function(n){var r=this._getPortElement(n);e.append(r),t.push(r)}),this);for(var o=Object.keys(i),a=0;a<o.length;a++){var s=o[a];if("auto"!==s){var u=parseInt(s,10);this._appendPorts(i[s],u,t)}}this._updatePorts()},_getContainerElement:function(){return this.rotatableNode||this.vel},_appendPorts:function(t,e,n){var r=this._getContainerElement(),i=tn(t).map(this._getPortElement,this);n[e]||e<0?ye(n[Math.max(e,0)]).before(i):r.append(i)},_getPortElement:function(t){return this._portElementsCache[t.id]?this._portElementsCache[t.id].portElement:this._createPortElement(t)},findPortNode:function(t,e){var n=this._portElementsCache[t];if(!n)return null;var r=n.portContentElement.node,i=n.portContentSelectors,o=l(this.findBySelector(e,r,i),1)[0];return void 0===o?null:o},_updatePorts:function(){this._updatePortGroup(void 0),Object.keys(this.model._portSettingsData.groups).forEach(this._updatePortGroup,this)},_removePorts:function(){He(this._portElementsCache,"portElement.remove")},_createPortElement:function(t){var e,n,r,i,o=ye(this.portContainerMarkup).addClass("joint-port"),a=this._getPortMarkup(t);if(Array.isArray(a)){var s=this.parseDOMJSON(a,o.node),u=s.fragment;e=u.childNodes.length>1?ye("g").append(u):ye(u.firstChild),i=s.selectors}else e=ye(a),Array.isArray(e)&&(e=ye("g").append(e));if(!e)throw new Error("ElementView: Invalid port markup.");e.attr({port:t.id,"port-group":t.group});var l,c=this._getPortLabelMarkup(t.label);if(Array.isArray(c)){var f=this.parseDOMJSON(c,o.node),h=f.fragment,d=f.selectors,p=h.childNodes.length;p>0&&(r=d,n=1===p?ye(h.firstChild):ye("g").append(h))}else n=ye(c),Array.isArray(n)&&(n=ye("g").append(n));if(i&&r){for(var g in r)if(i[g]&&g!==this.selector)throw new Error("ElementView: selectors within port must be unique.");l=$e({},i,r)}else l=i||r;return o.append(e.addClass("joint-port-body")),n&&o.append(n.addClass("joint-port-label")),this._portElementsCache[t.id]={portElement:o,portLabelElement:n,portSelectors:l,portLabelSelectors:r,portContentElement:e,portContentSelectors:i},o},_updatePortGroup:function(t){for(var e=ut(this.model.size()),n=this.model._portSettingsData.getGroupPortsMetrics(t,e),r=0,i=n.length;r<i;r++){var o=n[r],a=o.portId,s=this._portElementsCache[a]||{},u=o.portTransformation;this.applyPortTransform(s.portElement,u),this.updateDOMSubtreeAttributes(s.portElement.node,o.portAttrs,{rootBBox:new ut(o.portSize),selectors:s.portSelectors});var l=o.labelTransformation;l&&s.portLabelElement&&(this.applyPortTransform(s.portLabelElement,l,-u.angle||0),this.updateDOMSubtreeAttributes(s.portLabelElement.node,l.attrs,{rootBBox:new ut(o.labelSize),selectors:s.portLabelSelectors}))}},applyPortTransform:function(t,e,n){var r=ye.createSVGMatrix().rotate(n||0).translate(e.x||0,e.y||0).rotate(e.angle||0);t.transform(r,{absolute:!0})},_getPortMarkup:function(t){return t.markup||this.model.get("portMarkup")||this.model.portMarkup||this.portMarkup},_getPortLabelMarkup:function(t){return t.markup||this.model.get("portLabelMarkup")||this.model.portLabelMarkup||this.portLabelMarkup}},qr=cr.extend({defaults:{position:{x:0,y:0},size:{width:1,height:1},angle:0},initialize:function(){this._initializePorts(),cr.prototype.initialize.apply(this,arguments)},_initializePorts:function(){},_refreshPorts:function(){},isElement:function(){return!0},position:function(t,e,n){var r,i=vn(e),o=n=(i?n:t)||{},a=o.parentRelative,s=o.deep,u=o.restrictedArea;if(a){if(!this.graph)throw new Error("Element must be part of a graph.");var l=this.getParentCell();l&&!l.isLink()&&(r=l.get("position"))}if(i){if(r&&(t+=r.x,e+=r.y),s||u){var c=this.get("position"),f=c.x,h=c.y;this.translate(t-f,e-h,n)}else this.set("position",{x:t,y:e},n);return this}var d=Y(this.get("position"));return a?d.difference(r):d},translate:function(t,e,n){if(e=e||0,0===(t=t||0)&&0===e)return this;(n=n||{}).translateBy=n.translateBy||this.id;var r=this.get("position")||{x:0,y:0},i=n.restrictedArea;if(i&&n.translateBy===this.id)if("function"==typeof i){var o=i.call(this,r.x+t,r.y+e,n);t=o.x-r.x,e=o.y-r.y}else{var a=this.getBBox({deep:!0}),s=r.x-a.x,u=r.y-a.y,l=Math.max(i.x+s,Math.min(i.x+i.width+s-a.width,r.x+t)),c=Math.max(i.y+u,Math.min(i.y+i.height+u-a.height,r.y+e));t=l-r.x,e=c-r.y}var f={x:r.x+t,y:r.y+e};return n.tx=t,n.ty=e,n.transition?(gn(n.transition)||(n.transition={}),this.transition("position",f,$e({},n.transition,{valueFunction:Be.object})),He(this.getEmbeddedCells(),"translate",t,e,n)):(this.startBatch("translate",n),this.set("position",f,n),He(this.getEmbeddedCells(),"translate",t,e,n),this.stopBatch("translate",n)),this},size:function(t,e,n){var r=this.get("size");return void 0===t?{width:r.width,height:r.height}:(gn(t)&&(n=e,e=vn(t.height)?t.height:r.height,t=vn(t.width)?t.width:r.width),this.resize(t,e,n))},resize:function(t,e,n){if(n=n||{},this.startBatch("resize",n),n.direction){var r=this.get("size");switch(n.direction){case"left":case"right":e=r.height;break;case"top":case"bottom":t=r.width}var i,o=A(this.get("angle")||0),a=this.getBBox();if(o){var s={"top-right":0,right:0,"top-left":1,top:1,"bottom-left":2,left:2,"bottom-right":3,bottom:3}[n.direction];n.absolute&&(s+=Math.floor((o+45)/90),s%=4);var u=a[["bottomLeft","corner","topRight","origin"][s]](),l=Y(u).rotate(a.center(),-o),c=Math.sqrt(t*t+e*e)/2,f=s*Math.PI/2;f+=Math.atan(s%2==0?e/t:t/e),f-=T(o);var h=Y.fromPolar(c,f,l);i=Y(h).offset(t/-2,e/-2)}else switch(i=a.topLeft(),n.direction){case"top":case"top-right":i.offset(0,a.height-e);break;case"left":case"bottom-left":i.offset(a.width-t,0);break;case"top-left":i.offset(a.width-t,a.height-e)}this.set("size",{width:t,height:e},n),this.position(i.x,i.y,n)}else this.set("size",{width:t,height:e},n);return this.stopBatch("resize",n),this},scale:function(t,e,n,r){var i=this.getBBox().scale(t,e,n);return this.startBatch("scale",r),this.position(i.x,i.y,r),this.resize(i.width,i.height,r),this.stopBatch("scale"),this},fitEmbeds:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.graph;if(!e)throw new Error("Element must be part of a graph.");var n=this.getEmbeddedCells().filter((function(t){return t.isElement()}));if(0===n.length)return this;this.startBatch("fit-embeds",t),t.deep&&He(n,"fitEmbeds",t);var r=je(t.padding),i=r.left,o=r.right,a=r.top,s=r.bottom,u=e.getCellsBBox(n),l=u.x,c=u.y,f=u.width,h=u.height;return l-=i,c-=a,f+=i+o,h+=s+a,this.set({position:{x:l,y:c},size:{width:f,height:h}},t),this.stopBatch("fit-embeds"),this},rotate:function(t,e,n,r){if(n){var i=this.getBBox().center(),o=this.get("size"),a=this.get("position");i.rotate(n,this.get("angle")-t);var s=i.x-o.width/2-a.x,u=i.y-o.height/2-a.y;this.startBatch("rotate",{angle:t,absolute:e,origin:n}),this.position(a.x+s,a.y+u,r),this.rotate(t,e,null,r),this.stopBatch("rotate")}else this.set("angle",e?t:(this.get("angle")+t)%360,r);return this},angle:function(){return A(this.get("angle")||0)},getBBox:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.graph,n=this.attributes,r=t.deep,i=t.rotate;if(r&&e){var o=this.getEmbeddedCells({deep:!0,breadthFirst:!0});return o.push(this),e.getCellsBBox(o,t)}var a=n.angle,s=void 0===a?0:a,u=n.position,l=u.x,c=u.y,f=n.size,h=f.width,d=f.height,p=new ut(l,c,h,d);return i&&p.rotateAroundCenter(s),p},getPointFromConnectedLink:function(t,e){var n=this.getBBox(),r=n.center(),i=t.get(e);if(!i)return r;var o=i.port;if(!o||!this.hasPort(o))return r;var a=this.portProp(o,["group"]),s=this.getPortsPositions(a),u=new Y(s[o]).offset(n.origin()),l=this.angle();return l&&u.rotate(r,-l),u}});$e(qr.prototype,$r);var Hr={cells:function(t){return function(){var e=Array.from(arguments),n=e.length,r=n>0&&e[0]||[],i=n>1&&e[n-1]||{};return Array.isArray(r)||(i instanceof cr?r=e:r instanceof cr&&(e.length>1&&e.pop(),r=e)),i instanceof cr&&(i={}),t.call(this,r,i)}}},Gr=_n.Collection.extend({initialize:function(t,e){e.cellNamespace?this.cellNamespace=e.cellNamespace:this.cellNamespace="undefined"!=typeof joint&&sn(joint,"shapes")?joint.shapes:null,this.graph=e.graph},model:function(t,e){var n=e.collection,r=n.cellNamespace,i=new("link"===t.type?fr:Ae(r,t.type,".")||qr)(t,e);return e.dry||(i.graph=n.graph),i},comparator:function(t){return t.get("z")||0}}),Wr=_n.Model.extend({initialize:function(t,e){var n=new Gr([],{model:(e=e||{}).cellModel,cellNamespace:e.cellNamespace,graph:this});_n.Model.prototype.set.call(this,"cells",n),n.on("all",this.trigger,this),this.on("change:z",this._sortOnChangeZ,this),this._out={},this._in={},this._nodes={},this._edges={},this._batches={},n.on("add",this._restructureOnAdd,this),n.on("remove",this._restructureOnRemove,this),n.on("reset",this._restructureOnReset,this),n.on("change:source",this._restructureOnChangeSource,this),n.on("change:target",this._restructureOnChangeTarget,this),n.on("remove",this._removeCell,this)},_sortOnChangeZ:function(){this.get("cells").sort()},_restructureOnAdd:function(t){if(t.isLink()){this._edges[t.id]=!0;var e=t.attributes,n=e.source,r=e.target;n.id&&((this._out[n.id]||(this._out[n.id]={}))[t.id]=!0),r.id&&((this._in[r.id]||(this._in[r.id]={}))[t.id]=!0)}else this._nodes[t.id]=!0},_restructureOnRemove:function(t){if(t.isLink()){delete this._edges[t.id];var e=t.attributes,n=e.source,r=e.target;n.id&&this._out[n.id]&&this._out[n.id][t.id]&&delete this._out[n.id][t.id],r.id&&this._in[r.id]&&this._in[r.id][t.id]&&delete this._in[r.id][t.id]}else delete this._nodes[t.id]},_restructureOnReset:function(t){t=t.models,this._out={},this._in={},this._nodes={},this._edges={},t.forEach(this._restructureOnAdd,this)},_restructureOnChangeSource:function(t){var e=t.previous("source");e.id&&this._out[e.id]&&delete this._out[e.id][t.id];var n=t.attributes.source;n.id&&((this._out[n.id]||(this._out[n.id]={}))[t.id]=!0)},_restructureOnChangeTarget:function(t){var e=t.previous("target");e.id&&this._in[e.id]&&delete this._in[e.id][t.id];var n=t.get("target");n.id&&((this._in[n.id]||(this._in[n.id]={}))[t.id]=!0)},getOutboundEdges:function(t){return this._out&&this._out[t]||{}},getInboundEdges:function(t){return this._in&&this._in[t]||{}},toJSON:function(){var t=_n.Model.prototype.toJSON.apply(this,arguments);return t.cells=this.get("cells").toJSON(),t},fromJSON:function(t,e){if(!t.cells)throw new Error("Graph JSON must contain cells array.");return this.set(t,e)},set:function(t,e,n){var r;return"object"==h(t)?(r=t,n=e):(r={})[t]=e,r.hasOwnProperty("cells")&&(this.resetCells(r.cells,n),r=ln(r,"cells")),_n.Model.prototype.set.call(this,r,n)},clear:function(t){t=$e({},t,{clear:!0});var e=this.get("cells");if(0===e.length)return this;this.startBatch("clear",t);var n=e.sortBy((function(t){return t.isLink()?1:2}));do{n.shift().remove(t)}while(n.length>0);return this.stopBatch("clear"),this},_prepareCell:function(t,e){var n;if(t instanceof _n.Model?(n=t.attributes,t.graph||e&&e.dry||(t.graph=this)):n=t,!mn(n.type))throw new TypeError("dia.Graph: cell type must be a string.");return t},minZIndex:function(){var t=this.get("cells").first();return t&&t.get("z")||0},maxZIndex:function(){var t=this.get("cells").last();return t&&t.get("z")||0},addCell:function(t,e){return Array.isArray(t)?this.addCells(t,e):(t instanceof _n.Model?t.has("z")||t.set("z",this.maxZIndex()+1):void 0===t.z&&(t.z=this.maxZIndex()+1),this.get("cells").add(this._prepareCell(t,e),e||{}),this)},addCells:function(t,e){return 0===t.length||(t=nn(t),e.maxPosition=e.position=t.length-1,this.startBatch("add",e),t.forEach((function(t){this.addCell(t,e),e.position--}),this),this.stopBatch("add",e)),this},resetCells:function(t,e){var n=tn(t).map((function(t){return this._prepareCell(t,e)}),this);return this.get("cells").reset(n,e),this},removeCells:function(t,e){return t.length&&(this.startBatch("remove"),He(t,"remove",e),this.stopBatch("remove")),this},_removeCell:function(t,e,n){(n=n||{}).clear||(n.disconnectLinks?this.disconnectLinks(t,n):this.removeLinks(t,n)),this.get("cells").remove(t,{silent:!0}),t.graph===this&&(t.graph=null)},getCell:function(t){return this.get("cells").get(t)},getCells:function(){return this.get("cells").toArray()},getElements:function(){return this.get("cells").filter((function(t){return t.isElement()}))},getLinks:function(){return this.get("cells").filter((function(t){return t.isLink()}))},getFirstCell:function(){return this.get("cells").first()},getLastCell:function(){return this.get("cells").last()},getConnectedLinks:function(t,e){var n=(e=e||{}).indirect,r=e.inbound,i=e.outbound;void 0===r&&void 0===i&&(r=i=!0);var o=[],a={};function s(t,e){if(fn(t.getOutboundEdges(e.id),function(e,l){if(!a[l]){var c=t.getCell(l);o.push(c),a[l]=!0,n&&(r&&u(t,c),i&&s(t,c))}}.bind(t)),n&&e.isLink()){var l=e.getTargetCell();l&&l.isLink()&&(a[l.id]||(o.push(l),s(t,l)))}}function u(t,e){if(fn(t.getInboundEdges(e.id),function(e,l){if(!a[l]){var c=t.getCell(l);o.push(c),a[l]=!0,n&&(r&&u(t,c),i&&s(t,c))}}.bind(t)),n&&e.isLink()){var l=e.getSourceCell();l&&l.isLink()&&(a[l.id]||(o.push(l),u(t,l)))}}if(i&&s(this,t),r&&u(this,t),e.deep){var l=t.getEmbeddedCells({deep:!0}),c={};l.forEach((function(t){t.isElement()&&(c[t.id]=!0)})),l.forEach((function(t){t.isLink()||(i&&fn(this.getOutboundEdges(t.id),function(t,n){if(!a[n]){var r=this.getCell(n).attributes,i=r.source,s=r.target,u=i.id,l=s.id;if(!e.includeEnclosed&&u&&c[u]&&l&&c[l])return;o.push(this.getCell(n)),a[n]=!0}}.bind(this)),r&&fn(this.getInboundEdges(t.id),function(t,n){if(!a[n]){var r=this.getCell(n).attributes,i=r.source,s=r.target,u=i.id,l=s.id;if(!e.includeEnclosed&&u&&c[u]&&l&&c[l])return;o.push(this.getCell(n)),a[n]=!0}}.bind(this)))}),this)}return o},getNeighbors:function(t,e){e||(e={});var n=e.inbound,r=e.outbound;void 0===n&&void 0===r&&(n=r=!0);var i=this.getConnectedLinks(t,e).reduce(function(i,o){var a=o.attributes,s=a.source,u=a.target,l=o.hasLoop(e);if(n&&sn(s,"id")&&!i[s.id]){var c=this.getCell(s.id);c.isElement()&&(!l&&(!c||c===t||e.deep&&c.isEmbeddedIn(t))||(i[s.id]=c))}if(r&&sn(u,"id")&&!i[u.id]){var f=this.getCell(u.id);f.isElement()&&(!l&&(!f||f===t||e.deep&&f.isEmbeddedIn(t))||(i[u.id]=f))}return i}.bind(this),{});if(t.isLink()){if(n){var o=t.getSourceCell();o&&o.isElement()&&!i[o.id]&&(i[o.id]=o)}if(r){var a=t.getTargetCell();a&&a.isElement()&&!i[a.id]&&(i[a.id]=a)}}return tn(i)},getCommonAncestor:function(){var t=Array.from(arguments).map((function(t){for(var e=[],n=t.get("parent");n;)e.push(n),n=this.getCell(n).get("parent");return e}),this);t=t.sort((function(t,e){return t.length-e.length}));var e=tn(t.shift()).find((function(e){return t.every((function(t){return t.includes(e)}))}));return this.getCell(e)},getSuccessors:function(t,e){e=e||{};var n=[];return this.search(t,(function(e){e!==t&&n.push(e)}),$e({},e,{outbound:!0})),n},cloneCells:Dn,cloneSubgraph:function(t,e){var n=this.getSubgraph(t,e);return this.cloneCells(n)},getSubgraph:function(t,e){e=e||{};var n=[],r={},i=[],o=[];return tn(t).forEach((function(t){r[t.id]||(n.push(t),r[t.id]=t,t.isLink()?o.push(t):i.push(t)),e.deep&&t.getEmbeddedCells({deep:!0}).forEach((function(t){r[t.id]||(n.push(t),r[t.id]=t,t.isLink()?o.push(t):i.push(t))}))})),o.forEach((function(t){var e=t.attributes,o=e.source,a=e.target;if(o.id&&!r[o.id]){var s=this.getCell(o.id);n.push(s),r[s.id]=s,i.push(s)}if(a.id&&!r[a.id]){var u=this.getCell(a.id);n.push(this.getCell(a.id)),r[u.id]=u,i.push(u)}}),this),i.forEach((function(t){this.getConnectedLinks(t,e).forEach((function(t){var e=t.attributes,i=e.source,o=e.target;!r[t.id]&&i.id&&r[i.id]&&o.id&&r[o.id]&&(n.push(t),r[t.id]=t)}))}),this),n},getPredecessors:function(t,e){e=e||{};var n=[];return this.search(t,(function(e){e!==t&&n.push(e)}),$e({},e,{inbound:!0})),n},search:function(t,e,n){(n=n||{}).breadthFirst?this.bfs(t,e,n):this.dfs(t,e,n)},bfs:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},o=[];for(o.push(t),i[t.id]=0;o.length>0;){var a=o.shift();if(!r[a.id]&&(r[a.id]=!0,!1!==e.call(this,a,i[a.id])))for(var s=this.getNeighbors(a,n),u=0,l=s.length;u<l;u++){var c=s[u];i[c.id]=i[a.id]+1,o.push(c)}}},dfs:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},o=[];for(o.push(t),i[t.id]=0;o.length>0;){var a=o.pop();if(!r[a.id]&&(r[a.id]=!0,!1!==e.call(this,a,i[a.id])))for(var s=this.getNeighbors(a,n),u=o.length,l=0,c=s.length;l<c;l++){var f=s[l];i[f.id]=i[a.id]+1,o.splice(u,0,f)}}},getSources:function(){var t=[];return fn(this._nodes,function(e,n){this._in[n]&&!Qe(this._in[n])||t.push(this.getCell(n))}.bind(this)),t},getSinks:function(){var t=[];return fn(this._nodes,function(e,n){this._out[n]&&!Qe(this._out[n])||t.push(this.getCell(n))}.bind(this)),t},isSource:function(t){return!this._in[t.id]||Qe(this._in[t.id])},isSink:function(t){return!this._out[t.id]||Qe(this._out[t.id])},isSuccessor:function(t,e){var n=!1;return this.search(t,(function(r){if(r===e&&r!==t)return n=!0,!1}),{outbound:!0}),n},isPredecessor:function(t,e){var n=!1;return this.search(t,(function(r){if(r===e&&r!==t)return n=!0,!1}),{inbound:!0}),n},isNeighbor:function(t,e,n){var r=(n=n||{}).inbound,i=n.outbound;void 0===r&&void 0===i&&(r=i=!0);var o=!1;return this.getConnectedLinks(t,n).forEach((function(t){var n=t.attributes,a=n.source,s=n.target;return r&&sn(a,"id")&&a.id===e.id||i&&sn(s,"id")&&s.id===e.id?(o=!0,!1):void 0})),o},disconnectLinks:function(t,e){this.getConnectedLinks(t).forEach((function(n){n.set(n.attributes.source.id===t.id?"source":"target",{x:0,y:0},e)}))},removeLinks:function(t,e){He(this.getConnectedLinks(t),"remove",e)},findModelsFromPoint:function(t){return this.getElements().filter((function(e){return e.getBBox({rotate:!0}).containsPoint(t)}))},findModelsInArea:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ut(t),r=e.strict,i=void 0!==r&&r,o=i?"containsRect":"intersect";return this.getElements().filter((function(t){return n[o](t.getBBox({rotate:!0}))}))},findModelsUnderElement:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.searchBy,r=void 0===n?"bbox":n,i=t.getBBox().rotateAroundCenter(t.angle());return("bbox"===r?this.findModelsInArea(i):this.findModelsFromPoint(i[r]())).filter((function(e){return t.id!==e.id&&!e.isEmbeddedIn(t)}))},getBBox:function(){return this.getCellsBBox(this.getCells())},getCellsBBox:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.rotate,r=void 0===n||n;return tn(t).reduce((function(t,e){var n=e.getBBox({rotate:r});return n?t?t.union(n):n:t}),null)},translate:function(t,e,n){var r=this.getCells().filter((function(t){return!t.isEmbedded()}));return He(r,"translate",t,e,n),this},resize:function(t,e,n){return this.resizeCells(t,e,this.getCells(),n)},resizeCells:function(t,e,n,r){var i=this.getCellsBBox(n);if(i){var o=Math.max(t/i.width,0),a=Math.max(e/i.height,0);He(n,"scale",o,a,i.origin(),r)}return this},startBatch:function(t,e){return e=e||{},this._batches[t]=(this._batches[t]||0)+1,this.trigger("batch:start",$e({},e,{batchName:t}))},stopBatch:function(t,e){return e=e||{},this._batches[t]=(this._batches[t]||0)-1,this.trigger("batch:stop",$e({},e,{batchName:t}))},hasActiveBatch:function(t){var e=this._batches;return(0===arguments.length?Object.keys(e):Array.isArray(t)?t:[t]).some((function(t){return e[t]>0}))}},{validations:{multiLinks:function(t,e){var n=e.attributes,r=n.source,i=n.target;if(r.id&&i.id){var o=e.getSourceCell();if(o&&t.getConnectedLinks(o,{outbound:!0}).filter((function(t){var e=t.attributes,n=e.source,o=e.target;return n&&n.id===r.id&&(!n.port||n.port===r.port)&&o&&o.id===i.id&&(!o.port||o.port===i.port)})).length>1)return!1}return!0},linkPinning:function(t,e){var n=e.attributes,r=n.source,i=n.target;return r.id&&i.id}}});!function(t,e,n){if(mn(n)){if(!Hr[n])throw new Error('Unknown wrapper: "'+n+'"');n=Hr[n]}if(!Je(n))throw new Error("Wrapper must be a function.");tn(["resetCells","addCells","removeCells"]).forEach((function(e){t[e]=n(t[e])}))}(Wr.prototype,0,Hr.cells);var Yr={exportElement:function(t){return t.size()},exportLink:function(t){var e=t.get("labelSize")||{};return{minLen:t.get("minLen")||1,weight:t.get("weight")||1,labelpos:t.get("labelPosition")||"c",labeloffset:t.get("labelOffset")||0,width:e.width||0,height:e.height||0}},importElement:function(t,e,n){var r=this.getCell(e),i=n.node(e);t.setPosition?t.setPosition(r,i):r.set("position",{x:i.x-i.width/2,y:i.y-i.height/2})},importLink:function(t,e,n){var r=this.getCell(e.name),i=n.edge(e),o=i.points||[],a=new mt(o);if(t.setVertices||t.setLinkVertices)if(Je(t.setVertices))t.setVertices(r,o);else{a.simplify({threshold:.001});var s=a.points.map((function(t){return t.toJSON()})),u=s.length;r.set("vertices",s.slice(1,u-1))}if(t.setLabels&&"x"in i&&"y"in i){var l={x:i.x,y:i.y};if(Je(t.setLabels))t.setLabels(r,l,o);else{var c=a.closestPointLength(l),f=a.pointAtLength(c),h=c/a.length(),d=new Y(l).difference(f).toJSON();r.label(0,{position:{distance:h,offset:d}})}}},layout:function(t,e){var n;n=t instanceof Wr?t:(new Wr).resetCells(t,{dry:!0,sort:!1}),t=null;var r=(e=Ue(e||{},{resizeClusters:!0,clusterPadding:10,exportElement:this.exportElement,exportLink:this.exportLink})).dagre||("undefined"!=typeof dagre?dagre:void 0);if(void 0===r)throw new Error('The the "dagre" utility is a mandatory dependency.');var i=Yr.toGraphLib(n,{graphlib:e.graphlib,directed:!0,multigraph:!0,compound:!0,setNodeLabel:e.exportElement,setEdgeLabel:e.exportLink,setEdgeName:function(t){return t.id}}),o={},a=e.marginX||0,s=e.marginY||0;if(e.rankDir&&(o.rankdir=e.rankDir),e.align&&(o.align=e.align),e.nodeSep&&(o.nodesep=e.nodeSep),e.edgeSep&&(o.edgesep=e.edgeSep),e.rankSep&&(o.ranksep=e.rankSep),e.ranker&&(o.ranker=e.ranker),a&&(o.marginx=a),s&&(o.marginy=s),i.setGraph(o),r.layout(i,{debugTiming:!!e.debugTiming}),n.startBatch("layout"),Yr.fromGraphLib(i,{importNode:this.importElement.bind(n,e),importEdge:this.importLink.bind(n,e)}),e.resizeClusters){var u=i.nodes().filter((function(t){return i.children(t).length>0})).map(n.getCell.bind(n)).sort((function(t,e){return e.getAncestors().length-t.getAncestors().length}));He(u,"fitEmbeds",{padding:e.clusterPadding})}n.stopBatch("layout");var l=i.graph();return new ut(a,s,Math.abs(l.width-2*a),Math.abs(l.height-2*s))},fromGraphLib:function(t,e){var n=(e=e||{}).importNode||yn,r=e.importEdge||yn,i=this instanceof Wr?this:new Wr;return t.nodes().forEach((function(r){n.call(i,r,t,i,e)})),t.edges().forEach((function(n){r.call(i,n,t,i,e)})),i},toGraphLib:function(t,e){var n=(e=e||{}).graphlib||("undefined"!=typeof graphlib?graphlib:void 0);if(void 0===n)throw new Error('The the "graphlib" utility is a mandatory dependency.');for(var r=cn(e,"directed","compound","multigraph"),i=new n.Graph(r),o=e.setNodeLabel||yn,a=e.setEdgeLabel||yn,s=e.setEdgeName||yn,u=t.get("cells"),l=0,c=u.length;l<c;l++){var f=u.at(l);if(f.isLink()){var h=f.get("source"),d=f.get("target");if(!h.id||!d.id)break;i.setEdge(h.id,d.id,a(f),s(f))}else if(i.setNode(f.id,o(f)),i.isCompound()&&f.has("parent")){var p=f.get("parent");u.has(p)&&i.setParent(f.id,p)}}return i}};Wr.prototype.toGraphLib=function(t){return Yr.toGraphLib(this,t)},Wr.prototype.fromGraphLib=function(t,e){return Yr.fromGraphLib.call(this,t,e)};var Xr={_results:{},_tests:{svgforeignobject:function(){return!!document.createElementNS&&/SVGForeignObject/.test({}.toString.call(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")))}},addTest:function(t,e){return this._tests[t]=e},test:function(t){var e=this._tests[t];if(!e)throw new Error('Test not defined ("'+t+'"). Use `joint.env.addTest(name, fn) to add a new test.`');var n=this._results[t];if(void 0!==n)return n;try{n=e()}catch(t){n=!1}return this._results[t]=n,n}},Qr=qr.define("standard.Rectangle",{attrs:{body:{refWidth:"100%",refHeight:"100%",strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}]}),Kr=qr.define("standard.Circle",{attrs:{body:{refCx:"50%",refCy:"50%",refR:"50%",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"}]}),Jr=qr.define("standard.Ellipse",{attrs:{body:{refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"ellipse",selector:"body"},{tagName:"text",selector:"label"}]}),Zr=qr.define("standard.Path",{attrs:{body:{refD:"M 0 0 L 10 0 10 10 0 10 Z",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"path",selector:"body"},{tagName:"text",selector:"label"}]}),ti=qr.define("standard.Polygon",{attrs:{body:{refPoints:"0 0 10 0 10 10 0 10",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"polygon",selector:"body"},{tagName:"text",selector:"label"}]}),ei=qr.define("standard.Polyline",{attrs:{body:{refPoints:"0 0 10 0 10 10 0 10 0 0",strokeWidth:2,stroke:"#333333",fill:"#FFFFFF"},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",fontSize:14,fill:"#333333"}}},{markup:[{tagName:"polyline",selector:"body"},{tagName:"text",selector:"label"}]}),ni=qr.define("standard.Image",{attrs:{image:{refWidth:"100%",refHeight:"100%"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"image",selector:"image"},{tagName:"text",selector:"label"}]}),ri=qr.define("standard.BorderedImage",{attrs:{border:{refWidth:"100%",refHeight:"100%",stroke:"#333333",strokeWidth:2},background:{refWidth:-1,refHeight:-1,x:.5,y:.5,fill:"#FFFFFF"},image:{refWidth:-1,refHeight:-1,x:.5,y:.5},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"background",attributes:{stroke:"none"}},{tagName:"image",selector:"image"},{tagName:"rect",selector:"border",attributes:{fill:"none"}},{tagName:"text",selector:"label"}]}),ii=qr.define("standard.EmbeddedImage",{attrs:{body:{refWidth:"100%",refHeight:"100%",stroke:"#333333",fill:"#FFFFFF",strokeWidth:2},image:{refWidth:"30%",refHeight:-20,x:10,y:10,preserveAspectRatio:"xMidYMin"},label:{textVerticalAnchor:"top",textAnchor:"left",refX:"30%",refX2:20,refY:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"image",selector:"image"},{tagName:"text",selector:"label"}]}),oi=qr.define("standard.InscribedImage",{attrs:{border:{refRx:"50%",refRy:"50%",refCx:"50%",refCy:"50%",stroke:"#333333",strokeWidth:2},background:{refRx:"50%",refRy:"50%",refCx:"50%",refCy:"50%",fill:"#FFFFFF"},image:{refWidth:"68%",refHeight:"68%",refX:"16%",refY:"16%",preserveAspectRatio:"xMidYMid"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"100%",refY2:10,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"ellipse",selector:"background"},{tagName:"image",selector:"image"},{tagName:"ellipse",selector:"border",attributes:{fill:"none"}},{tagName:"text",selector:"label"}]}),ai=qr.define("standard.HeaderedRectangle",{attrs:{body:{refWidth:"100%",refHeight:"100%",strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},header:{refWidth:"100%",height:30,strokeWidth:2,stroke:"#000000",fill:"#FFFFFF"},headerText:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:15,fontSize:16,fill:"#333333"},bodyText:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"50%",refY2:15,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"header"},{tagName:"text",selector:"headerText"},{tagName:"text",selector:"bodyText"}]}),si=qr.define("standard.Cylinder",{attrs:{body:{lateralArea:10,fill:"#FFFFFF",stroke:"#333333",strokeWidth:2},top:{refCx:"50%",cy:10,refRx:"50%",ry:10,fill:"#FFFFFF",stroke:"#333333",strokeWidth:2},label:{textVerticalAnchor:"middle",textAnchor:"middle",refX:"50%",refY:"100%",refY2:15,fontSize:14,fill:"#333333"}}},{markup:[{tagName:"path",selector:"body"},{tagName:"ellipse",selector:"top"},{tagName:"text",selector:"label"}],topRy:function(t,e){if(void 0===t)return this.attr("body/lateralArea");var n={lateralArea:t},r=Re(t)?{refCy:t,refRy:t,cy:null,ry:null}:{refCy:null,refRy:null,cy:t,ry:t};return this.attr({body:n,top:r},e)}},{attributes:{lateralArea:{set:function(t,e){var n=Re(t);n&&(t=parseFloat(t)/100);var r=e.x,i=e.y,o=e.width,a=e.height,s=o/2,u=n?a*t:t,l=ye.KAPPA,c=l*s,f=l*(n?a*t:t),h=r+o/2,d=r+o,p=i+u,g=p-u,v=i+a-u,m=i+a;return{d:["M",r,p,"L",r,v,"C",r,v+f,h-c,m,h,m,"C",h+c,m,d,v+f,d,v,"L",d,p,"C",d,p-f,h+c,g,h,g,"C",h-c,g,r,p-f,r,p,"Z"].join(" ")}}}}}),ui=Xr.test("svgforeignobject")?{tagName:"foreignObject",selector:"foreignObject",attributes:{overflow:"hidden"},children:[{tagName:"div",namespaceURI:"http://www.w3.org/1999/xhtml",selector:"label",style:{width:"100%",height:"100%",position:"static",backgroundColor:"transparent",textAlign:"center",margin:0,padding:"0px 5px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"}}]}:{tagName:"text",selector:"label",attributes:{"text-anchor":"middle"}},li=qr.define("standard.TextBlock",{attrs:{body:{refWidth:"100%",refHeight:"100%",stroke:"#333333",fill:"#ffffff",strokeWidth:2},foreignObject:{refWidth:"100%",refHeight:"100%"},label:{style:{fontSize:14}}}},{markup:[{tagName:"rect",selector:"body"},ui]},{attributes:{text:{set:function(t,e,n,r){if(!(n instanceof HTMLElement)){var i=r.style||{},o={text:t,width:-5,height:"100%"},a=$e({textVerticalAnchor:"middle"},i);return lr.textWrap.set.call(this,o,e,n,a),{fill:i.color||null}}n.textContent=t},position:function(t,e,n){if(n instanceof SVGElement)return e.center()}}}}),ci=fr.define("standard.Link",{attrs:{line:{connection:!0,stroke:"#333333",strokeWidth:2,strokeLinejoin:"round",targetMarker:{type:"path",d:"M 10 -5 0 0 10 5 z"}},wrapper:{connection:!0,strokeWidth:10,strokeLinejoin:"round"}}},{markup:[{tagName:"path",selector:"wrapper",attributes:{fill:"none",cursor:"pointer",stroke:"transparent","stroke-linecap":"round"}},{tagName:"path",selector:"line",attributes:{fill:"none","pointer-events":"none"}}]}),fi=fr.define("standard.DoubleLink",{attrs:{line:{connection:!0,stroke:"#DDDDDD",strokeWidth:4,strokeLinejoin:"round",targetMarker:{type:"path",stroke:"#000000",d:"M 10 -3 10 -10 -2 0 10 10 10 3"}},outline:{connection:!0,stroke:"#000000",strokeWidth:6,strokeLinejoin:"round"}}},{markup:[{tagName:"path",selector:"outline",attributes:{fill:"none"}},{tagName:"path",selector:"line",attributes:{fill:"none"}}]}),hi=fr.define("standard.ShadowLink",{attrs:{line:{connection:!0,stroke:"#FF0000",strokeWidth:20,strokeLinejoin:"round",targetMarker:{type:"path",stroke:"none",d:"M 0 -10 -10 0 0 10 z"},sourceMarker:{type:"path",stroke:"none",d:"M -10 -10 0 0 -10 10 0 10 0 -10 z"}},shadow:{connection:!0,refX:3,refY:6,stroke:"#000000",strokeOpacity:.2,strokeWidth:20,strokeLinejoin:"round",targetMarker:{type:"path",d:"M 0 -10 -10 0 0 10 z",stroke:"none"},sourceMarker:{type:"path",stroke:"none",d:"M -10 -10 0 0 -10 10 0 10 0 -10 z"}}}},{markup:[{tagName:"path",selector:"shadow",attributes:{fill:"none"}},{tagName:"path",selector:"line",attributes:{fill:"none"}}]});function di(t){return t?Array.isArray(t)?t:[t]:[]}var pi=An.extend({tagName:"g",svgElement:!0,className:"highlight",HIGHLIGHT_FLAG:1,UPDATE_PRIORITY:3,DETACHABLE:!1,UPDATABLE:!0,MOUNTABLE:!0,cellView:null,nodeSelector:null,node:null,updateRequested:!1,transformGroup:null,requestUpdate:function(t,e){var n=t.paper;this.cellView=t,this.nodeSelector=e,n&&(this.updateRequested=!0,n.requestViewUpdate(this,this.HIGHLIGHT_FLAG,this.UPDATE_PRIORITY))},confirmUpdate:function(){this.updateRequested=!1;var t=this.cellView,e=this.nodeSelector;return this.update(t,e),this.mount(),this.transform(),0},findNode:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof n){var r=t.findBySelector(n),i=l(r,1);e=i[0]}else if(Ze(n)){var o=t.model.isLink(),a=n.label,s=void 0===a?null:a,u=n.port,c=n.selector;e=o&&null!==s?t.findLabelNode(s,c):!o&&u?t.findPortNode(u,c):l(t.findBySelector(c),1)[0]}else n&&((e=ye.toNode(n))instanceof SVGElement||(e=null));return e||null},mount:function(){var t=this.MOUNTABLE,e=this.cellView,n=this.el,r=this.options,i=this.transformGroup;if(t&&!i){var o=e.vel,a=e.paper,s=r.layer;if(s){var u=this.transformGroup=ye("g").addClass("highlight-transform").append(n);a.getLayerView(s).insertSortedNode(u.node,r.z)}else n.parentNode&&!n.nextSibling||o.append(n)}},unmount:function(){var t=this.MOUNTABLE,e=this.transformGroup,n=this.vel;t&&(e?(this.transformGroup=null,e.remove()):n.remove())},transform:function(){var t=this.transformGroup,e=this.cellView,n=this.updateRequested;if(t&&!e.model.isLink()&&!n){var r=e.getRootTranslateMatrix(),i=e.getRootRotateMatrix(),o=r.multiply(i);t.attr("transform",ye.matrixToTransformString(o))}},update:function(){var t=this.node,e=this.cellView,n=this.nodeSelector,r=this.updateRequested,i=this.id;if(!r){var o=this.node=this.findNode(e,n);t&&this.unhighlight(e,t),o?(this.highlight(e,o),this.mount()):(this.unmount(),e.notify("cell:highlight:invalid",i,this))}},onRemove:function(){var t=this.node,e=this.cellView,n=this.id,r=this.constructor;t&&this.unhighlight(e,t),this.unmount(),r._removeRef(e,n)},highlight:function(t,e){},unhighlight:function(t,e){}},{_views:{},highlight:function(t,e,n){var r=this.uniqueId(e,n);this.add(t,e,r,n)},unhighlight:function(t,e,n){var r=this.uniqueId(e,n);this.remove(t,r)},get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.cid,r=this._views,i=r[n];if(null===e){var o=[];if(!i)return o;for(var a in i){var s=i[a];s instanceof this&&o.push(s)}return o}if(!i)return null;if(e in i){var u=i[e];if(u instanceof this)return u}return null},add:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)throw new Error("dia.HighlighterView: An ID required.");var i=pi.get(t,n);i&&i.remove();var o=new this(r);return o.id=n,this._addRef(t,n,o),o.requestUpdate(t,e),o},_addRef:function(t,e,n){var r=t.cid,i=this._views,o=i[r];o||(o=i[r]={}),o[e]=n},_removeRef:function(t,e){var n=t.cid,r=this._views,i=r[n];if(i){for(var o in e&&delete i[e],i)return;delete r[n]}},remove:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;di(this.get(t,e)).forEach((function(t){t.remove()}))},update:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];di(this.get(t,e)).forEach((function(t){(n||t.UPDATABLE)&&t.update()}))},transform:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;di(this.get(t,e)).forEach((function(t){t.UPDATABLE&&t.transform()}))},uniqueId:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return ye.ensureId(t)+JSON.stringify(e)}}),gi={DEFAULT:"default",EMBEDDING:"embedding",CONNECTING:"connecting",MAGNET_AVAILABILITY:"magnetAvailability",ELEMENT_AVAILABILITY:"elementAvailability"},vi=An.extend({tagName:"g",svgElement:!0,selector:"root",metrics:null,className:function(){var t=["cell"],e=this.model.get("type");return e&&e.toLowerCase().split(".").forEach((function(e,n,r){t.push("type-"+r.slice(0,n+1).join("-"))})),t.join(" ")},_presentationAttributes:null,_flags:null,setFlags:function(){var t,e,n,r={},i={},o=0,a=un(this,"presentationAttributes");for(var s in a)if(a.hasOwnProperty(s)){var u=a[s];for(Array.isArray(u)||(u=[u]),t=0,e=u.length;t<e;t++){var l=r[n=u[t]];l||(l=r[n]=1<<o++),i[s]|=l}}var c=un(this,"initFlag");for(Array.isArray(c)||(c=[c]),t=0,e=c.length;t<e;t++)r[n=c[t]]||(r[n]=1<<o++);if(o>25)throw new Error("dia.CellView: Maximum number of flags exceeded.");this._flags=r,this._presentationAttributes=i},hasFlag:function(t,e){return t&this.getFlag(e)},removeFlag:function(t,e){return t^t&this.getFlag(e)},getFlag:function(t){var e=this._flags;if(!e)return 0;var n=0;if(Array.isArray(t))for(var r=0,i=t.length;r<i;r++)n|=e[t[r]];else n|=e[t];return n},attributes:function(){var t=this.model;return{"model-id":t.id,"data-type":t.attributes.type}},constructor:function(t){t.id=t.id||Ne(this),An.call(this,t)},initialize:function(){this.setFlags(),An.prototype.initialize.apply(this,arguments),this.cleanNodesCache(),this.$el.data("view",this),this.startListening()},onMount:function(){},startListening:function(){this.listenTo(this.model,"change",this.onAttributesChange)},onAttributesChange:function(t,e){var n=t.getChangeFlag(this._presentationAttributes);!e.updateHandled&&n&&(e.dirty&&this.hasFlag(n,"UPDATE")&&(n|=this.getFlag("RENDER")),e.tool&&(e.async=!1),this.requestUpdate(n,e))},requestUpdate:function(t,e){var n=this.paper;n&&t>0&&n.requestViewUpdate(this,t,this.UPDATE_PRIORITY,e)},parseDOMJSON:function(t,e){var n=_e(t),r=n.selectors,i=n.groupSelectors;for(var o in i){if(r[o])throw new Error("dia.CellView: ambiguous group selector");r[o]=i[o]}if(e){var a=this.selector;if(r[a])throw new Error("dia.CellView: ambiguous root selector.");r[a]=e}return{fragment:n.fragment,selectors:r}},can:function(t){var e,n,r=Je(this.options.interactive)?this.options.interactive(this):this.options.interactive;return gn(r)&&!1!==r[t]||(e=r,n=Object.prototype.toString,(!0===e||!1===e||!!e&&"object"==h(e)&&"[object Boolean]"===n.call(e))&&!1!==r)},findBySelector:function(t,e,n){if(e||(e=this.el),n||(n=this.selectors),!t||"."===t)return[e];if(n){var r=n[t];if(r)return Array.isArray(r)?r:[r]}return we(e).find(t).toArray()},notify:function(t){if(this.paper){var e=Array.prototype.slice.call(arguments,1);this.trigger.apply(this,[t].concat(e)),this.paper.trigger.apply(this.paper,[t,this].concat(e))}},getBBox:function(t){var e;if(t&&t.useModelGeometry){var n=this.model;e=n.getBBox().bbox(n.angle())}else e=this.getNodeBBox(this.el);return this.paper.localToPaperRect(e)},getNodeBBox:function(t){var e=this.getNodeBoundingRect(t),n=this.getNodeMatrix(t),r=this.getRootTranslateMatrix(),i=this.getRootRotateMatrix();return ye.transformRect(e,r.multiply(i).multiply(n))},getNodeUnrotatedBBox:function(t){var e=this.getNodeBoundingRect(t),n=this.getNodeMatrix(t),r=this.getRootTranslateMatrix();return ye.transformRect(e,r.multiply(n))},getRootTranslateMatrix:function(){var t=this.model.position();return ye.createSVGMatrix().translate(t.x,t.y)},getRootRotateMatrix:function(){var t=ye.createSVGMatrix(),e=this.model,n=e.angle();if(n){var r=e.getBBox(),i=r.width/2,o=r.height/2;t=t.translate(i,o).rotate(n).translate(-i,-o)}return t},_notifyHighlight:function(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.el;if(r=void 0===(n=l("string"==typeof e?this.findBySelector(e):this.$(e),1)[0])?o:n,i.partial=r!==o,void 0===i.type){var a;switch(!0){case i.embedding:a=gi.EMBEDDING;break;case i.connecting:a=gi.CONNECTING;break;case i.magnetAvailability:a=gi.MAGNET_AVAILABILITY;break;case i.elementAvailability:a=gi.ELEMENT_AVAILABILITY;break;default:a=gi.DEFAULT}i.type=a}return this.notify(t,r,i),this},highlight:function(t,e){return this._notifyHighlight("cell:highlight",t,e)},unhighlight:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._notifyHighlight("cell:unhighlight",t,e)},findMagnet:function(t){var e=this.el,n=this.$(t)[0];n||(n=e);do{var r=n.getAttribute("magnet"),i=n===e;if((r||i)&&"false"!==r)return n;if(i)return;n=n.parentNode}while(n)},findProxyNode:function(t,e){t||(t=this.el);var n=t.getAttribute("".concat(e,"-selector"));if(n){var r=l(this.findBySelector(n),1)[0];if(r)return r}return t},getSelector:function(t,e){var n;if(t===this.el)return"string"==typeof e&&(n="> "+e),n;if(t){var r=ye(t).index()+1;n=t.tagName+":nth-child("+r+")",e&&(n+=" > "+e),n=this.getSelector(t.parentNode,n)}return n},addLinkFromMagnet:function(t,e,n){var r=this.paper,i=r.model,o=r.getDefaultLink(this,t);return o.set({source:this.getLinkEnd(t,e,n,o,"source"),target:{x:e,y:n}}).addTo(i,{async:!1,ui:!0}),o.findView(r)},getLinkEnd:function(t){for(var e=this.model,n=e.id,r=this.findAttribute("port",t),i=t.getAttribute("joint-selector"),o={id:n},a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];return null!=i&&(o.magnet=i),null!=r?(o.port=r,e.hasPort(r)||i||(o.selector=this.getSelector(t))):null==i&&this.el!==t&&(o.selector=this.getSelector(t)),this.customizeLinkEnd.apply(this,[o,t].concat(s))},customizeLinkEnd:function(t,e,n,r,i,o){var a=this.paper,s=a.options.connectionStrategy;if("function"==typeof s){var u=s.call(a,t,this,e,new Y(n,r),i,o,a);if(u)return u}return t},getMagnetFromLinkEnd:function(t){var e,n=this.el,r=t.port,i=t.magnet,o=this.model;return null!=r&&o.isElement()&&o.hasPort(r)?e=this.findPortNode(r,i)||n:(i||(i=t.selector),i||null==r||(i='[port="'+r+'"]'),e=this.findBySelector(i,n,this.selectors)[0]),this.findProxyNode(e,"magnet")},dragLinkStart:function(t,e,n,r){this.model.startBatch("add-link");var i=this.addLinkFromMagnet(e,n,r);i.notifyPointerdown(t,n,r),i.eventData(t,i.startArrowheadMove("target",{whenNotAllowed:"remove"})),this.eventData(t,{linkView:i})},dragLink:function(t,e,n){var r=this.eventData(t),i=r.linkView;if(i)i.pointermove(t,e,n);else{var o=this.paper,a=o.options.magnetThreshold,s=this.getEventTarget(t),u=r.targetMagnet;if("onleave"===a){if(u===s||ye(u).contains(s))return}else if(o.eventData(t).mousemoved<=a)return;this.dragLinkStart(t,u,e,n)}},dragLinkEnd:function(t,e,n){var r=this.eventData(t).linkView;r&&(r.pointerup(t,e,n),this.model.stopBatch("add-link"))},getAttributeDefinition:function(t){return this.model.constructor.getAttributeDefinition(t)},setNodeAttributes:function(t,e){Qe(e)||(t instanceof SVGElement?ye(t).attr(e):we(t).attr(e))},processNodeAttributes:function(t,e){var n,r,i,o,a,s,u,l,c,f,h=[];for(n in e)e.hasOwnProperty(n)&&(r=e[n],!(i=this.getAttributeDefinition(n))||Je(i.qualify)&&!i.qualify.call(this,r,t,e)?(s||(s={}),s[(f=n,f.replace(/[A-Z]/g,"-$&").toLowerCase())]=r):(mn(i.set)&&(s||(s={}),s[i.set]=r),null!==r&&h.push(n,i)));for(o=0,a=h.length;o<a;o+=2)n=h[o],i=h[o+1],r=e[n],Je(i.set)&&(u||(u={}),u[n]=r),Je(i.position)&&(l||(l={}),l[n]=r),Je(i.offset)&&(c||(c={}),c[n]=r);return{raw:e,normal:s,set:u,position:l,offset:c}},updateRelativeAttributes:function(t,e,n,r){var i,o;r||(r={});var a=e.raw||{},s=e.normal||{},u=e.set,l=e.position,c=e.offset;for(i in u){o=u[i];var f=this.getAttributeDefinition(i).set.call(this,o,n.clone(),t,a);gn(f)?$e(s,f):void 0!==f&&(s[i]=f)}if(t instanceof HTMLElement)this.setNodeAttributes(t,s);else{var h,d,p,g=s.transform,v=ye.transformStringToMatrix(g),m=Y(v.e,v.f);if(g&&(s=ln(s,"transform"),v.e=v.f=0),l||c){var y=this.getNodeScale(t,r.scalableNode);h=y.sx,d=y.sy}var b=!1;for(i in l)o=l[i],(p=this.getAttributeDefinition(i).position.call(this,o,n.clone(),t,a))&&(m.offset(Y(p).scale(h,d)),b||(b=!0));this.setNodeAttributes(t,s);var w=!1;if(c){var x=this.getNodeBoundingRect(t);if(x.width>0&&x.height>0){var S=ye.transformRect(x,v).scale(1/h,1/d);for(i in c)o=c[i],(p=this.getAttributeDefinition(i).offset.call(this,o,S,t,a))&&(m.offset(Y(p).scale(h,d)),w||(w=!0))}}(void 0!==g||b||w)&&(m.round(1),v.e=m.x,v.f=m.y,t.setAttribute("transform",ye.matrixToTransformString(v)))}},getNodeScale:function(t,e){var n,r;if(e&&e.contains(t)){var i=e.scale();n=1/i.sx,r=1/i.sy}else n=1,r=1;return{sx:n,sy:r}},cleanNodesCache:function(){this.metrics={}},nodeCache:function(t){var e=this.metrics;if(!e)return{};var n=ye.ensureId(t),r=e[n];return r||(r=e[n]={}),r},getNodeData:function(t){var e=this.nodeCache(t);return e.data||(e.data={}),e.data},getNodeBoundingRect:function(t){var e=this.nodeCache(t);return void 0===e.boundingRect&&(e.boundingRect=ye(t).getBBox()),new ut(e.boundingRect)},getNodeMatrix:function(t){var e=this.nodeCache(t);if(void 0===e.magnetMatrix){var n=this.rotatableNode||this.el;e.magnetMatrix=ye(t).getTransformToElement(n)}return ye.createSVGMatrix(e.magnetMatrix)},getNodeShape:function(t){var e=this.nodeCache(t);return void 0===e.geometryShape&&(e.geometryShape=ye(t).toGeometryShape()),e.geometryShape.clone()},isNodeConnection:function(t){return this.model.isLink()&&(!t||t===this.el)},findNodesAttributes:function(t,e,n,r){var i,o,a,s,l={},c=[];for(var f in t)if(t.hasOwnProperty(f)&&(a=t[f],Ze(a))){var h=n[f]=this.findBySelector(f,e,r);for(i=0,o=h.length;i<o;i++){var d=h[i];s=ye.ensureId(d);var p=r&&r[f]===d,g=l[s];if(g){g.array||(c.push(s),g.array=!0,g.attributes=[g.attributes],g.selectedLength=[g.selectedLength]);var v=g.attributes,m=g.selectedLength;if(p)v.unshift(a),m.unshift(-1);else{var y=Ge(m,o);v.splice(y,0,a),m.splice(y,0,o)}}else l[s]={attributes:a,selectedLength:p?-1:o,node:d,array:!1}}}for(i=0,o=c.length;i<o;i++)(a=l[s=c[i]]).attributes=pn.apply(void 0,[{}].concat(u(a.attributes.reverse())));return l},getEventTarget:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.target,r=t.type,i=t.clientX,o=void 0===i?0:i,a=t.clientY,s=void 0===a?0:a;return e.fromPoint||"touchmove"===r||"touchend"===r?document.elementFromPoint(o,s):n},updateDOMSubtreeAttributes:function(t,e,n){n||(n={}),n.rootBBox||(n.rootBBox=ut()),n.selectors||(n.selectors=this.selectors);var r,i,o,a,s,u,l={},c={},f=[],h=[],d=n.roAttributes,p=this.findNodesAttributes(d||e,t,l,n.selectors),g=d?this.findNodesAttributes(e,t,l,n.selectors):p;for(var v in p)if(o=(a=p[v]).attributes,i=a.node,(s=this.processNodeAttributes(i,o)).set||s.position||s.offset){var m,y=g[v]&&g[v].attributes,b=y&&void 0===o.ref?y.ref:o.ref;if(b){if(!(m=(l[b]||this.findBySelector(b,t,n.selectors))[0]))throw new Error('dia.CellView: "'+b+'" reference does not exist.')}else m=null;if(r={node:i,refNode:m,processedAttributes:s,allAttributes:y},m){var w=h.findIndex((function(t){return t.refNode===i}));w>-1?h.splice(w,0,r):h.push(r)}else f.push(r)}else this.setNodeAttributes(i,s.normal);f.push.apply(f,h);for(var x=0,S=f.length;x<S;x++){r=f[x],i=r.node,m=r.refNode;var k=ye(n.rotatableNode),_=m?ye.ensureId(m):"",E=!!k&&!!m&&k.contains(m),A=c[_];if(!A){var P=E?k:t;A=c[_]=m?ye(m).getBBox({target:P}):n.rootBBox}d?(s=this.processNodeAttributes(i,r.allAttributes),this.mergeProcessedAttributes(s,r.processedAttributes)):s=r.processedAttributes;var C=A;E&&!k.contains(i)&&(u||(u=ye.transformStringToMatrix(k.attr("transform"))),C=ye.transformRect(A,u)),this.updateRelativeAttributes(i,s,C,n)}},mergeProcessedAttributes:function(t,e){t.set||(t.set={}),t.position||(t.position={}),t.offset||(t.offset={}),$e(t.set,e.set),$e(t.position,e.position),$e(t.offset,e.offset);var n=t.normal&&t.normal.transform;void 0!==n&&e.normal&&(e.normal.transform=n),t.normal=e.normal},onRemove:function(){this.removeTools(),this.removeHighlighters()},_toolsView:null,hasTools:function(t){var e=this._toolsView;return!(!e||t&&e.getName()!==t)},addTools:function(t){return this.removeTools(),t&&(this._toolsView=t,t.configure({relatedView:this}),t.listenTo(this.paper,"tools:event",this.onToolEvent.bind(this))),this},updateTools:function(t){var e=this._toolsView;return e&&e.update(t),this},removeTools:function(){var t=this._toolsView;return t&&(t.remove(),this._toolsView=null),this},hideTools:function(){var t=this._toolsView;return t&&t.hide(),this},showTools:function(){var t=this._toolsView;return t&&t.show(),this},onToolEvent:function(t){switch(t){case"remove":this.removeTools();break;case"hide":this.hideTools();break;case"show":this.showTools()}},removeHighlighters:function(){pi.remove(this)},updateHighlighters:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];pi.update(this,null,t)},transformHighlighters:function(){pi.transform(this)},pointerdblclick:function(t,e,n){this.notify("cell:pointerdblclick",t,e,n)},pointerclick:function(t,e,n){this.notify("cell:pointerclick",t,e,n)},contextmenu:function(t,e,n){this.notify("cell:contextmenu",t,e,n)},pointerdown:function(t,e,n){var r=this.model,i=r.graph;i&&(r.startBatch("pointer"),this.eventData(t,{graph:i})),this.notify("cell:pointerdown",t,e,n)},pointermove:function(t,e,n){this.notify("cell:pointermove",t,e,n)},pointerup:function(t,e,n){var r=this.eventData(t).graph;this.notify("cell:pointerup",t,e,n),r&&r.stopBatch("pointer",{cell:this.model})},mouseover:function(t){this.notify("cell:mouseover",t)},mouseout:function(t){this.notify("cell:mouseout",t)},mouseenter:function(t){this.notify("cell:mouseenter",t)},mouseleave:function(t){this.notify("cell:mouseleave",t)},mousewheel:function(t,e,n,r){this.notify("cell:mousewheel",t,e,n,r)},onevent:function(t,e,n,r){this.notify(e,t,n,r)},onmagnet:function(){},magnetpointerdblclick:function(){},magnetcontextmenu:function(){},checkMouseleave:function(t){var e=this.paper;e.isAsync()&&e.dumpView(this);var n=this.getEventTarget(t,{fromPoint:!0}),r=e.findView(n);r!==this&&(this.mouseleave(t),r&&r.mouseenter(t))},setInteractivity:function(t){this.options.interactive=t}},{Highlighting:gi,addPresentationAttributes:function(t){return pn({},un(this.prototype,"presentationAttributes"),t,(function(t,e){if(t&&e)return"string"==typeof t&&(t=[t]),"string"==typeof e&&(e=[e]),Array.isArray(t)&&Array.isArray(e)?We(t.concat(e)):void 0}))}}),mi={UPDATE:"UPDATE",TRANSLATE:"TRANSLATE",TOOLS:"TOOLS",RESIZE:"RESIZE",PORTS:"PORTS",ROTATE:"ROTATE",RENDER:"RENDER"},yi=vi.extend({_removePorts:function(){},_renderPorts:function(){},className:function(){var t=vi.prototype.className.apply(this).split(" ");return t.push("element"),t.join(" ")},initialize:function(){vi.prototype.initialize.apply(this,arguments),this._initializePorts()},presentationAttributes:{attrs:[mi.UPDATE],position:[mi.TRANSLATE,mi.TOOLS],size:[mi.RESIZE,mi.PORTS,mi.TOOLS],angle:[mi.ROTATE,mi.TOOLS],markup:[mi.RENDER],ports:[mi.PORTS]},initFlag:[mi.RENDER],UPDATE_PRIORITY:0,confirmUpdate:function(t,e){this.hasFlag(t,mi.PORTS)&&(this._removePorts(),this._cleanPortsCache());var n=!1;if(this.hasFlag(t,mi.RENDER))this.render(),this.updateTools(e),this.updateHighlighters(!0),n=!0,t=this.removeFlag(t,[mi.RENDER,mi.UPDATE,mi.RESIZE,mi.TRANSLATE,mi.ROTATE,mi.PORTS,mi.TOOLS]);else{var r=!1;this.hasFlag(t,mi.RESIZE)&&(this.resize(e),r=!0,t=this.removeFlag(t,[mi.RESIZE,mi.UPDATE])),this.hasFlag(t,mi.UPDATE)&&(this.update(this.model,null,e),t=this.removeFlag(t,mi.UPDATE),r=!0,t=this.removeFlag(t,mi.PORTS)),this.hasFlag(t,mi.TRANSLATE)&&(this.translate(),t=this.removeFlag(t,mi.TRANSLATE),n=!0),this.hasFlag(t,mi.ROTATE)&&(this.rotate(),t=this.removeFlag(t,mi.ROTATE),n=!0),this.hasFlag(t,mi.PORTS)&&(this._renderPorts(),r=!0,t=this.removeFlag(t,mi.PORTS)),r&&this.updateHighlighters(!1)}return n&&this.transformHighlighters(),this.hasFlag(t,mi.TOOLS)&&(this.updateTools(e),t=this.removeFlag(t,mi.TOOLS)),t},_initializePorts:function(){},update:function(t,e){this.cleanNodesCache();this._removePorts();var n=this.model,r=n.attr();this.updateDOMSubtreeAttributes(this.el,r,{rootBBox:new ut(n.size()),selectors:this.selectors,scalableNode:this.scalableNode,rotatableNode:this.rotatableNode,roAttributes:e===r?null:e}),this._renderPorts()},rotatableSelector:"rotatable",scalableSelector:"scalable",scalableNode:null,rotatableNode:null,renderMarkup:function(){var t=this.model,e=t.get("markup")||t.markup;if(!e)throw new Error("dia.ElementView: markup required");if(Array.isArray(e))return this.renderJSONMarkup(e);if("string"==typeof e)return this.renderStringMarkup(e);throw new Error("dia.ElementView: invalid markup")},renderJSONMarkup:function(t){var e=this.parseDOMJSON(t,this.el),n=this.selectors=e.selectors;this.rotatableNode=ye(n[this.rotatableSelector])||null,this.scalableNode=ye(n[this.scalableSelector])||null,this.vel.append(e.fragment)},renderStringMarkup:function(t){var e=this.vel;e.append(ye(t)),this.rotatableNode=e.findOne(".rotatable"),this.scalableNode=e.findOne(".scalable"),(this.selectors={})[this.selector]=this.el},render:function(){return this.vel.empty(),this.renderMarkup(),this.scalableNode&&this.update(),this.resize(),this.rotatableNode?(this.rotate(),this.translate()):this.updateTransformation(),this},resize:function(t){if(this.scalableNode)return this.sgResize(t);this.model.attributes.angle&&this.rotate(),this.update()},translate:function(){if(this.rotatableNode)return this.rgTranslate();this.updateTransformation()},rotate:function(){if(this.rotatableNode)return this.rgRotate(),void this.update();this.updateTransformation()},updateTransformation:function(){var t=this.getTranslateString(),e=this.getRotateString();e&&(t+=" "+e),this.vel.attr("transform",t)},getTranslateString:function(){var t=this.model.attributes.position;return"translate("+t.x+","+t.y+")"},getRotateString:function(){var t=this.model.attributes,e=t.angle;if(!e)return null;var n=t.size;return"rotate("+e+","+n.width/2+","+n.height/2+")"},rgRotate:function(){this.rotatableNode.attr("transform",this.getRotateString())},rgTranslate:function(){this.vel.attr("transform",this.getTranslateString())},sgResize:function(t){var e=this.model,n=e.angle(),r=e.size(),i=this.scalableNode,o=!1;i.node.getElementsByTagName("path").length>0&&(o=!0);var a=i.getBBox({recursive:o}),s=r.width/(a.width||1),u=r.height/(a.height||1);i.attr("transform","scale("+s+","+u+")");var l=this.rotatableNode,c=l&&l.attr("transform");if(c){l.attr("transform",c+" rotate("+-n+","+r.width/2+","+r.height/2+")");var f=i.getBBox({target:this.paper.cells});e.set("position",{x:f.x,y:f.y},$e({updateHandled:!0},t)),this.translate(),this.rotate()}this.update()},prepareEmbedding:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.model||this.model,n=(t.paper||this.paper).model,r=t.initialZIndices={},i=e.getEmbeddedCells({deep:!0}),o=n.getConnectedLinks(e,{deep:!0,includeEnclosed:!0});[e].concat(u(i),u(o)).forEach((function(t){return r[t.id]=t.attributes.z})),e.startBatch("to-front"),e.toFront({deep:!0,ui:!0});var a=n.getElements().reduce((function(t,e){return Math.max(t,e.attributes.z||0)}),0);o.forEach((function(t){t.attributes.z<=a&&t.set("z",a+1,{ui:!0})})),e.stopBatch("to-front");var s=e.parent();s?(n.getCell(s).unembed(e,{ui:!0}),t.initialParentId=s):t.initialParentId=null},processEmbedding:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=e.model||this.model,a=e.paper||this.paper,s=a.model,u=a.options,l=u.findParentBy,c=u.frontParentOnly,f=u.validateEmbedding;t=(t=Je(l)?tn(l.call(s,this,n,r,i)):"pointer"===l?tn(s.findModelsFromPoint({x:r,y:i})):s.findModelsUnderElement(o,{searchBy:l})).filter((function(t){return t instanceof cr&&o.id!==t.id&&!t.isEmbeddedIn(o)})),c&&(t=t.slice(-1));for(var h=null,d=e.candidateEmbedView,p=t.length-1;p>=0;p--){var g=t[p];if(d&&d.model.id==g.id){h=d;break}var v=g.findView(a);if(!Je(f)||f.call(a,this,v)){h=v;break}}h&&h!=d&&(this.clearEmbedding(e),e.candidateEmbedView=h.highlight(h.findProxyNode(null,"container"),{embedding:!0})),!h&&d&&this.clearEmbedding(e)},clearEmbedding:function(t){t||(t={});var e=t.candidateEmbedView;e&&(e.unhighlight(e.findProxyNode(null,"container"),{embedding:!0}),t.candidateEmbedView=null)},finalizeEmbedding:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.candidateEmbedView,n=t.model||this.model,r=t.paper||this.paper;if(e)e.model.embed(n,{ui:!0}),e.unhighlight(e.findProxyNode(null,"container"),{embedding:!0}),t.candidateEmbedView=null;else{var i=r.options.validateUnembedding,o=t.initialParentId;if(o&&"function"==typeof i&&!i.call(r,this))return void this._disallowUnembed(t)}r.model.getConnectedLinks(n,{deep:!0}).forEach((function(t){t.reparent({ui:!0})}))},_disallowUnembed:function(t){var e=t.model,n=t.whenNotAllowed,r=void 0===n?"revert":n,i=e||this.model,o=(t.paper||this.paper).model;switch(r){case"remove":i.remove({ui:!0});break;case"revert":var a=t.initialParentId,s=t.initialPosition,u=t.initialZIndices;if(s){var l=s.x,c=s.y;i.position(l,c,{deep:!0,ui:!0})}u&&Object.keys(u).forEach((function(t){var e=o.getCell(t);e&&e.set("z",u[t],{ui:!0})}));var f=o.getCell(a);f&&f.embed(i,{ui:!0})}},getDelegatedView:function(){for(var t=this,e=t.model,n=t.paper;t&&!e.isLink();){if(!e.isEmbedded()||t.can("stopDelegation"))return t;e=e.getParentCell(),t=n.findViewByModel(e)}return null},findProxyNode:function(t,e){t||(t=this.el);var n=t.getAttribute("".concat(e,"-selector"));if(n){var r=this.findAttribute("port",t);if(r){var i=this.findPortNode(r,n);if(i)return i}else{var o=l(this.findBySelector(n),1)[0];if(o)return o}}return t},notifyPointerdown:function(t,e,n){vi.prototype.pointerdown.call(this,t,e,n),this.notify("element:pointerdown",t,e,n)},notifyPointermove:function(t,e,n){vi.prototype.pointermove.call(this,t,e,n),this.notify("element:pointermove",t,e,n)},notifyPointerup:function(t,e,n){this.notify("element:pointerup",t,e,n),vi.prototype.pointerup.call(this,t,e,n)},pointerdblclick:function(t,e,n){vi.prototype.pointerdblclick.apply(this,arguments),this.notify("element:pointerdblclick",t,e,n)},pointerclick:function(t,e,n){vi.prototype.pointerclick.apply(this,arguments),this.notify("element:pointerclick",t,e,n)},contextmenu:function(t,e,n){vi.prototype.contextmenu.apply(this,arguments),this.notify("element:contextmenu",t,e,n)},pointerdown:function(t,e,n){this.isPropagationStopped(t)||(this.notifyPointerdown(t,e,n),this.dragStart(t,e,n))},pointermove:function(t,e,n){var r=this.eventData(t);switch(r.action){case"magnet":this.dragMagnet(t,e,n);break;case"move":(r.delegatedView||this).drag(t,e,n);default:this.notifyPointermove(t,e,n)}this.eventData(t,r)},pointerup:function(t,e,n){var r=this.eventData(t);switch(r.action){case"magnet":this.dragMagnetEnd(t,e,n);break;case"move":(r.delegatedView||this).dragEnd(t,e,n);default:this.notifyPointerup(t,e,n)}var i=r.targetMagnet;i&&this.magnetpointerclick(t,i,e,n),this.checkMouseleave(t)},mouseover:function(t){vi.prototype.mouseover.apply(this,arguments),this.notify("element:mouseover",t)},mouseout:function(t){vi.prototype.mouseout.apply(this,arguments),this.notify("element:mouseout",t)},mouseenter:function(t){vi.prototype.mouseenter.apply(this,arguments),this.notify("element:mouseenter",t)},mouseleave:function(t){vi.prototype.mouseleave.apply(this,arguments),this.notify("element:mouseleave",t)},mousewheel:function(t,e,n,r){vi.prototype.mousewheel.apply(this,arguments),this.notify("element:mousewheel",t,e,n,r)},onmagnet:function(t,e,n){this.dragMagnetStart(t,e,n)},magnetpointerdblclick:function(t,e,n,r){this.notify("element:magnet:pointerdblclick",t,e,n,r)},magnetcontextmenu:function(t,e,n,r){this.notify("element:magnet:contextmenu",t,e,n,r)},dragStart:function(t,e,n){var r=this.getDelegatedView();if(r&&r.can("elementMove")){this.eventData(t,{action:"move",delegatedView:r});var i=r.model.position();r.eventData(t,{initialPosition:i,pointerOffset:i.difference(e,n),restrictedArea:this.paper.getRestrictedArea(r,e,n)})}},dragMagnetStart:function(t,e,n){if(this.can("addLinkFromMagnet")){var r=t.currentTarget,i=this.paper;this.eventData(t,{targetMagnet:r}),t.stopPropagation(),i.options.validateMagnet(this,r,t)?(i.options.magnetThreshold<=0&&this.dragLinkStart(t,r,e,n),this.eventData(t,{action:"magnet"}),this.stopPropagation(t)):this.pointerdown(t,e,n),i.delegateDragEvents(this,t.data)}},drag:function(t,e,n){var r=this.paper,i=r.options.gridSize,o=this.model,a=this.eventData(t),s=a.pointerOffset,u=a.restrictedArea,l=a.embedding,c=P(e+s.x,i),f=P(n+s.y,i);o.position(c,f,{restrictedArea:u,deep:!0,ui:!0}),r.options.embeddingMode&&(l||(this.prepareEmbedding(a),l=!0),this.processEmbedding(a,t,e,n)),this.eventData(t,{embedding:l})},dragMagnet:function(t,e,n){this.dragLink(t,e,n)},dragEnd:function(t,e,n){var r=this.eventData(t);r.embedding&&this.finalizeEmbedding(r)},dragMagnetEnd:function(t,e,n){this.dragLinkEnd(t,e,n)},magnetpointerclick:function(t,e,n,r){var i=this.paper;i.eventData(t).mousemoved>i.options.clickThreshold||this.notify("element:magnet:pointerclick",t,e,n,r)}},{Flags:mi});$e(yi.prototype,Ur);var bi=function(t,e,n){return t},wi=function(t,e,n){var r,i,o,a=e.side||"bottom",s=je(e.padding||40),u=n.sourceBBox,l=n.targetBBox,c=u.center(),f=l.center();switch(a){case"bottom":o=1,r="y",i="height";break;case"top":o=-1,r="y",i="height";break;case"left":o=-1,r="x",i="width";break;case"right":o=1,r="x",i="width";break;default:throw new Error("Router: invalid side")}return c[r]+=o*(u[i]/2+s[a]),f[r]+=o*(l[i]/2+s[a]),o*(c[r]-f[r])>0?f[r]=c[r]:c[r]=f[r],[c].concat(t,f)},xi={N:"S",S:"N",E:"W",W:"E"},Si={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function ki(t,e,n){var r=new Y(t.x,e.y);return n.containsPoint(r)&&(r=new Y(e.x,t.y)),r}function _i(t,e){return t["W"===e||"E"===e?"width":"height"]}function Ei(t,e){return t.x===e.x?t.y>e.y?"N":"S":t.y===e.y?t.x>e.x?"W":"E":null}function Ai(t){return new ut(t.x,t.y,0,0)}function Pi(t){var e=je(t.padding||t.elementPadding||20);return{x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}function Ci(t,e){return t.sourceBBox.clone().moveAndExpand(Pi(e))}function Ti(t,e){return t.targetBBox.clone().moveAndExpand(Pi(e))}function Ni(t,e,n){var r=new Y(t.x,e.y),i=new Y(e.x,t.y),o=Ei(t,r),a=Ei(t,i),s=xi[n],u=o===n||o!==s&&(a===s||a!==n)?r:i;return{points:[u],direction:Ei(u,e)}}function Li(t,e,n){var r=ki(t,e,n);return{points:[r],direction:Ei(r,e)}}function Mi(t,e,n,r){var i,o={},a=[new Y(t.x,e.y),new Y(e.x,t.y)],s=a.filter((function(t){return!n.containsPoint(t)})),u=s.filter((function(e){return Ei(e,t)!==r}));if(u.length>0)i=(i=u.filter((function(e){return Ei(t,e)===r})).pop())||u[0],o.points=[i],o.direction=Ei(i,e);else{i=on(a,s)[0];var l=new Y(e).move(i,-_i(n,r)/2),c=ki(l,t,n);o.points=[c,l],o.direction=Ei(l,e)}return o}function Oi(t,e,n,r){var i=Li(e,t,r),o=i.points[0];if(n.containsPoint(o)){var a=(i=Li(t,e,n)).points[0];if(r.containsPoint(a)){var s=new Y(t).move(a,-_i(n,Ei(t,a))/2),u=new Y(e).move(o,-_i(r,Ei(e,o))/2),l=new ht(s,u).midpoint(),c=Li(t,l,n),f=Ni(l,e,c.direction);i.points=[c.points[0],f.points[0]],i.direction=f.direction}}return i}function Ri(t,e,n,r,i){var o,a,s,u={},l=n.union(r).inflate(1),c=l.center().distance(e)>l.center().distance(t),f=c?e:t,h=c?t:e;return i?(o=Y.fromPolar(l.width+l.height,Si[i],f),o=l.pointNearestToPoint(o).move(o,-1)):o=l.pointNearestToPoint(f).move(f,1),a=ki(o,h,l),o.round().equals(a.round())?(a=Y.fromPolar(l.width+l.height,T(o.theta(f))+Math.PI/2,h),s=ki(o,a=l.pointNearestToPoint(a).move(h,1).round(),l),u.points=c?[a,s,o]:[o,s,a]):u.points=c?[a,o]:[o,a],u.direction=Ei(c?o:a,e),u}function Fi(t,e,n){var r,i=Ci(n,e),o=Ti(n,e),a=function(t,e){return t.sourceAnchor?t.sourceAnchor:Ci(t,e).center()}(n,e),s=function(t,e){return t.targetAnchor?t.targetAnchor:Ti(t,e).center()}(n,e);i=i.union(Ai(a)),o=o.union(Ai(s)),(t=tn(t).map(Y)).unshift(a),t.push(s);for(var u=[],l=0,c=t.length-1;l<c;l++){var f=null,h=t[l],d=t[l+1],p=!!Ei(h,d);if(0===l)l+1===c?i.intersect(o.clone().inflate(1))?f=Ri(h,d,i,o):p||(f=Oi(h,d,i,o)):i.containsPoint(d)?f=Ri(h,d,i,Ai(d).moveAndExpand(Pi(e))):p||(f=Li(h,d,i));else if(l+1===c){var g=p&&Ei(d,h)===r;o.containsPoint(h)||g?f=Ri(h,d,Ai(h).moveAndExpand(Pi(e)),o,r):p||(f=Mi(h,d,o,r))}else p||(f=Ni(h,d,r));f?(Array.prototype.push.apply(u,f.points),r=f.direction):r=Ei(h,d),l+1<c&&u.push(d)}return u}var Di={step:10,maximumLoops:2e3,precision:1,maxAllowedDirectionChange:90,perpendicular:!0,excludeEnds:[],excludeTypes:["basic.Text"],startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost:function(){return this.step},directions:function(){var t=this.step,e=this.cost();return[{offsetX:t,offsetY:0,cost:e},{offsetX:-t,offsetY:0,cost:e},{offsetX:0,offsetY:t,cost:e},{offsetX:0,offsetY:-t,cost:e}]},penalties:function(){return{0:0,45:this.step/2,90:this.step/2}},paddingBox:function(){var t=this.step;return{x:-t,y:-t,width:2*t,height:2*t}},isPointObstacle:null,fallbackRouter:function(t,e,n){if(!Je(Fi))throw new Error("Manhattan requires the orthogonal router as default fallback.");return Fi(t,$e({},Di,e),n)},fallbackRoute:function(t,e,n){return null},draggingRoute:null};function ji(t){this.map={},this.options=t,this.mapGridSize=100}function Ii(){this.items=[],this.hash={},this.values={},this.OPEN=1,this.CLOSE=2}function Bi(t,e){return e&&e.paddingBox?t.sourceBBox.clone().moveAndExpand(e.paddingBox):t.sourceBBox.clone()}function zi(t,e){return e&&e.paddingBox?t.targetBBox.clone().moveAndExpand(e.paddingBox):t.targetBBox.clone()}function Vi(t,e){return t.sourceAnchor?t.sourceAnchor:Bi(t,e).center()}function $i(t,e,n,r,i){var o=360/n,a=t.theta(function(t,e,n,r){var i=r.step,o=e.x-t.x,a=e.y-t.y,s=o/n.x*i,u=a/n.y*i;return new Y(t.x+s,t.y+u)}(t,e,r,i)),s=A(a+o/2);return o*Math.floor(s/o)}function Ui(t,e){var n=Math.abs(t-e);return n>180?360-n:n}function qi(t,e){if(!t)return e;var n=Math.abs(t),r=Math.round(n/e);return r?e+(n-r*e)/r:n}function Hi(t,e){return t.round(e)}function Gi(t,e,n){return Hi(function(t,e){var n=e.source,r=P(t.x-n.x,e.x)+n.x,i=P(t.y-n.y,e.y)+n.y;return new Y(r,i)}(t.clone(),e),n)}function Wi(t){return t.clone().toString()}function Yi(t){return new Y(0===t.x?0:Math.abs(t.x)/t.x,0===t.y?0:Math.abs(t.y)/t.y)}function Xi(t,e,n,r,i,o,a){for(var s,u=[],l=Yi(i.difference(n)),c=Wi(n),f=t[c];f;){var h=Yi((s=e[c]).difference(f));h.equals(l)||(u.unshift(s),l=h),f=t[c=Wi(f)]}var d=e[c];return Yi(d.difference(r)).equals(l)||u.unshift(d),u}function Qi(t,e){for(var n=1/0,r=0,i=e.length;r<i;r++){var o=t.manhattanDistance(e[r]);o<n&&(n=o)}return n}function Ki(t,e,n,r,i){var o=i.precision,a=i.directionMap,s=t.difference(e.center()),u=gn(a)?Object.keys(a):[],l=tn(n),c=u.reduce((function(n,i){if(l.includes(i)){for(var u,c=a[i],f=new Y(t.x+c.x*(Math.abs(s.x)+e.width),t.y+c.y*(Math.abs(s.y)+e.height)),h=new ht(t,f).intersect(e)||[],d=h.length,p=null,g=0;g<d;g++){var v=h[g],m=t.squaredDistance(v);(void 0===u||m>u)&&(u=m,p=v)}if(p){var y=Gi(p,r,o);e.containsPoint(y)&&(y=Gi(y.offset(c.x*r.x,c.y*r.y),r,o)),n.push(y)}}return n}),[]);return e.containsPoint(t)||c.push(Gi(t,r,o)),c}function Ji(t,e,n,r){var i,o,a=r.precision;i=Hi(t instanceof ut?Vi(this,r).clone():t.clone(),a),o=Hi(e instanceof ut?function(t,e){return t.targetAnchor?t.targetAnchor:zi(t,e).center()}(this,r).clone():e.clone(),a);var s,u,l,c,f,h,d,p=(s=r.step,l=o,{source:(u=i).clone(),x:qi(l.x-u.x,s),y:qi(l.y-u.y,s)});if(h=t instanceof ut?Ki(c=i,t,r.startDirections,p,r):[c=i],e instanceof ut?(f=o,d=Ki(o,e,r.endDirections,p,r)):d=[f=o],h=h.filter((function(t){return!n(t)})),d=d.filter((function(t){return!n(t)})),h.length>0&&d.length>0){for(var g=new Ii,v={},m={},y={},b=0,w=h.length;b<w;b++){var x=h[b],S=Wi(x);g.add(S,Qi(x,d)),v[S]=x,y[S]=0}var k,_,E=r.previousDirectionAngle,A=void 0===E,P=r.directions;!function(t,e,n){var r=n.step;tn(n.directions).forEach((function(t){t.gridOffsetX=t.offsetX/r*e.x,t.gridOffsetY=t.offsetY/r*e.y}))}(0,p,r);for(var C=P.length,T=tn(d).reduce((function(t,e){var n=Wi(e);return t.push(n),t}),[]),N=r.maximumLoops;!g.isEmpty()&&N>0;){var L,M=g.pop(),O=v[M],R=m[M],F=y[M],D=void 0===R,j=O.equals(c);L=D?A?j?null:$i(c,O,C,p,r):E:$i(R,O,C,p,r);var I=h.length===d.length;if(I)for(var B=0;B<h.length;B++)if(!h[B].equals(d[B])){I=!1;break}if((!D||!I)&&T.indexOf(M)>=0)return r.previousDirectionAngle=L,Xi(m,v,O,c,f);for(b=0;b<C;b++){var z=(k=P[b]).angle;if(_=Ui(L,z),A&&j||!(_>r.maxAllowedDirectionChange)){var V=Gi(O.clone().offset(k.gridOffsetX,k.gridOffsetY),p,a),$=Wi(V);if(!g.isClose($)&&!n(V)){if(T.indexOf($)>=0&&!V.equals(f)&&Ui(z,$i(V,f,C,p,r))>r.maxAllowedDirectionChange)continue;var U=F+k.cost+(j?0:r.penalties[_]);(!g.isOpen($)||U<y[$])&&(v[$]=V,m[$]=O,y[$]=U,g.add($,U+Qi(V,d)))}}}N--}}return r.fallbackRoute.call(this,c,f,r)}ji.prototype.build=function(t,e){var n=this.options,r=tn(n.excludeEnds).reduce((function(n,r){var i=e.get(r);if(i){var o=t.getCell(i.id);o&&n.push(o)}return n}),[]),i=[],o=t.getCell(e.get("source").id);o&&(i=an(i,o.getAncestors().map((function(t){return t.id}))));var a=t.getCell(e.get("target").id);a&&(i=an(i,a.getAncestors().map((function(t){return t.id}))));var s=this.mapGridSize;return t.getElements().reduce((function(t,e){var o=tn(n.excludeTypes).includes(e.get("type")),a=r.find((function(t){return t.id===e.id})),u=i.includes(e.id);if(!(o||a||u))for(var l=e.getBBox().moveAndExpand(n.paddingBox),c=l.origin().snapToGrid(s),f=l.corner().snapToGrid(s),h=c.x;h<=f.x;h+=s)for(var d=c.y;d<=f.y;d+=s){var p=h+"@"+d;t[p]=t[p]||[],t[p].push(l)}return t}),this.map),this},ji.prototype.isPointAccessible=function(t){var e=t.clone().snapToGrid(this.mapGridSize).toString();return tn(this.map[e]).every((function(e){return!e.containsPoint(t)}))},Ii.prototype.add=function(t,e){this.hash[t]?this.items.splice(this.items.indexOf(t),1):this.hash[t]=this.OPEN,this.values[t]=e;var n=Ge(this.items,t,function(t){return this.values[t]}.bind(this));this.items.splice(n,0,t)},Ii.prototype.remove=function(t){this.hash[t]=this.CLOSE},Ii.prototype.isOpen=function(t){return this.hash[t]===this.OPEN},Ii.prototype.isClose=function(t){return this.hash[t]===this.CLOSE},Ii.prototype.isEmpty=function(){return 0===this.items.length},Ii.prototype.pop=function(){var t=this.items.shift();return this.remove(t),t};var Zi=function(t,e,n){return function(t,e,n){!function(t){if(t.directions=un(t,"directions"),t.penalties=un(t,"penalties"),t.paddingBox=un(t,"paddingBox"),t.padding=un(t,"padding"),t.padding){var e=je(t.padding);t.paddingBox={x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}tn(t.directions).forEach((function(t){var e=new Y(0,0),n=new Y(t.offsetX,t.offsetY);t.angle=A(e.theta(n))}))}(e),n.options.perpendicular=!!e.perpendicular;var r,i=Bi(n,e),o=zi(n,e),a=Vi(n,e);if("function"==typeof e.isPointObstacle)r=e.isPointObstacle;else{var s=new ji(e);s.build(n.paper.model,n.model),r=function(t){return!s.isPointAccessible(t)}}for(var u,l,c=tn(t).map(Y),f=[],h=a,d=0,p=c.length;d<=p;d++){var g=null;if(l=u||i,!(u=c[d])&&(u=o,(!n.model.get("source").id||!n.model.get("target").id)&&Je(e.draggingRoute))){var v=l===i?a:l,m=u.origin();g=e.draggingRoute.call(n,v,m,e)}if(null===(g=g||Ji.call(n,l,u,r,e)))return e.fallbackRouter(t,e,n);var y=g[0];y&&y.equals(h)&&g.shift(),h=g[g.length-1]||h,Array.prototype.push.apply(f,g)}return f}(t,$e({},Di,e),n)},to={maxAllowedDirectionChange:45,diagonalCost:function(){var t=this.step;return Math.ceil(Math.sqrt(t*t<<1))},directions:function(){var t=this.step,e=this.cost(),n=this.diagonalCost();return[{offsetX:t,offsetY:0,cost:e},{offsetX:t,offsetY:t,cost:n},{offsetX:0,offsetY:t,cost:e},{offsetX:-t,offsetY:t,cost:n},{offsetX:-t,offsetY:0,cost:e},{offsetX:-t,offsetY:-t,cost:n},{offsetX:0,offsetY:-t,cost:e},{offsetX:t,offsetY:-t,cost:n}]},fallbackRoute:function(t,e,n){var r=t.theta(e),i=[],o={x:e.x,y:t.y},a={x:t.x,y:e.y};if(r%180>90){var s=o;o=a,a=s}var u=r%90<45?o:a,l=new ht(t,u),c=90*Math.ceil(r/90),f=Y.fromPolar(l.squaredLength(),T(c+135),u),h=new ht(e,f),d=l.intersection(h),p=d||e,g=d?p:t,v=360/n.directions.length,m=g.theta(e),y=A(m+v/2),b=v*Math.floor(y/v);return n.previousDirectionAngle=b,p&&i.push(p.round()),i.push(e),i}},eo=function(t,e,n){if(!Je(Zi))throw new Error("Metro requires the manhattan router.");return Zi(t,$e({},to,e),n)},no=["arc","gap","cubic"],ro=["smooth"],io=1/3,oo=2/3;function ao(t,e,n){var r=[].concat(t,n,e);return r.reduce((function(t,e,n){var i=r[n+1];return null!=i&&(t[n]=dt(e,i)),t}),[])}function so(t,e){return dt(t,e).squaredLength()}function uo(t,e,n,r){var i,o=new Et;return i=Et.createSegment("M",t[0].start),o.appendSegment(i),tn(t).forEach((function(a,s){if(a.isJump){var u,l,c,f;if("arc"===n){u=-90,l=a.start.difference(a.end);var h=Number(l.x<0||0===l.x&&l.y<0);h&&(u+=180);var d,p=a.midpoint(),g=new ht(p,a.end).rotate(p,u);c=(d=new ht(a.start,p)).pointAt(2/3).rotate(a.start,u),f=g.pointAt(1/3).rotate(g.end,-u),i=Et.createSegment("C",c,f,g.end),o.appendSegment(i),d=new ht(p,a.end),c=g.pointAt(1/3).rotate(g.end,u),f=d.pointAt(1/3).rotate(a.end,-u),i=Et.createSegment("C",c,f,a.end),o.appendSegment(i)}else if("gap"===n)i=Et.createSegment("M",a.end),o.appendSegment(i);else if("cubic"===n){u=a.start.theta(a.end);var v=.6*e,m=1.35*e;l=a.start.difference(a.end),(h=Number(l.x<0||0===l.x&&l.y<0))&&(m*=-1),c=Y(a.start.x+v,a.start.y+m).rotate(a.start,u),f=Y(a.end.x-v,a.end.y+m).rotate(a.end,u),i=Et.createSegment("C",c,f,a.end),o.appendSegment(i)}}else{var y=t[s+1];0==r||!y||y.isJump?(i=Et.createSegment("L",a.end),o.appendSegment(i)):function(t,e,n,r,i){var o,a=n.distance(r)/2,s=n.distance(i)/2,u=-Math.min(t,a),l=-Math.min(t,s),c=n.clone().move(r,u).round(),f=n.clone().move(i,l).round(),h=new Y(io*c.x+oo*n.x,oo*n.y+io*c.y),d=new Y(io*f.x+oo*n.x,oo*n.y+io*f.y);o=Et.createSegment("L",c),e.appendSegment(o),o=Et.createSegment("C",h,d,f),e.appendSegment(o)}(r,o,a.end,a.start,y.end)}})),o}var lo=function(t,e,n,r){!function(t){var e=t.paper,n=e._jumpOverUpdateList;if(null==n){n=e._jumpOverUpdateList=[];var r=e.model;r.on("batch:stop",(function(){this.hasActiveBatch()||function(t){for(var e=t._jumpOverUpdateList,n=0;n<e.length;n++){var r=e[n],i=r.getFlag(r.constructor.Flags.CONNECTOR);r.requestUpdate(i)}}(e)})),r.on("reset",(function(){n=e._jumpOverUpdateList=[]}))}n.indexOf(t)<0&&(n.push(t),t.listenToOnce(t.model,"change:connector remove",(function(){n.splice(n.indexOf(t),1)})))}(this);var i=r.raw,o=r.size||5,a=r.jump&&(""+r.jump).toLowerCase(),s=r.radius||0,u=r.ignoreConnectors||ro;-1===no.indexOf(a)&&(a=no[0]);var l=this.paper,c=l.model.getLinks();if(1===c.length)return uo(ao(t,e,n),o,a,s);var f=this.model,h=c.indexOf(f),d=l.options.defaultConnector||{},p=c.filter((function(t,e){var n=t.get("connector")||d;return!(tn(u).includes(n.name)||e>h&&"jumpover"===n.name)})),g=p.map((function(t){return l.findViewByModel(t)})),v=ao(t,e,n),m=g.map((function(t){return null==t?[]:t===this?v:ao(t.sourcePoint,t.targetPoint,t.route)}),this),y=uo(v.reduce((function(t,e){var n=p.reduce((function(t,n,r){if(n!==f){var i=function(t,e){return tn(e).reduce((function(e,n){var r=t.intersection(n);return r&&e.push(r),e}),[])}(e,m[r]);t.push.apply(t,i)}return t}),[]).sort((function(t,n){return so(e.start,t)-so(e.start,n)}));return n.length>0?t.push.apply(t,function(t,e,n){return e.reduce((function(r,i,o){if(!0===i.skip)return r;var a=r.pop()||t,s=X(i).move(a.start,-n),u=X(i).move(a.start,+n),l=e[o+1];if(null!=l){var c=u.distance(l);c<=n&&(u=l.move(a.start,c),l.skip=!0)}else if(s.distance(a.end)<2*n+1)return r.push(a),r;if(u.distance(a.start)<2*n+1)return r.push(a),r;var f=dt(s,u);return f.isJump=!0,r.push(dt(a.start,s),f,dt(u,a.end)),r}),[])}(e,n,o)):t.push(e),t}),[]),o,a,s);return i?y:y.serialize()},co=function(t,e,n,r){var i=r&&r.raw,o=[t].concat(n).concat([e]),a=new mt(o),s=new Et(a);return i?s:s.serialize()},fo=function(t,e,n,r){r||(r={});var i,o=r.radius||10,a=r.raw,s=new Et;i=Et.createSegment("M",t),s.appendSegment(i);for(var u,l,c,f,h,d,p,g,v,m,y,b=1/3,w=2/3,x=0,S=n.length;x<S;x++)u=new Y(n[x]),l=n[x-1]||t,c=n[x+1]||e,f=h||u.distance(l)/2,h=u.distance(c)/2,d=-Math.min(o,f),p=-Math.min(o,h),g=u.clone().move(l,d).round(),v=u.clone().move(c,p).round(),m=new Y(b*g.x+w*u.x,w*u.y+b*g.y),y=new Y(b*v.x+w*u.x,w*u.y+b*v.y),i=Et.createSegment("L",g),s.appendSegment(i),i=Et.createSegment("C",m,y,v),s.appendSegment(i);return i=Et.createSegment("L",e),s.appendSegment(i),a?s:s.serialize()},ho=function(t,e,n,r){var i,o=r&&r.raw;if(n&&0!==n.length){var a=[t].concat(n).concat([e]),s=kt.throughPoints(a);i=new Et(s)}else{var u;if(i=new Et,u=Et.createSegment("M",t),i.appendSegment(u),Math.abs(t.x-e.x)>=Math.abs(t.y-e.y)){var l=(t.x+e.x)/2;u=Et.createSegment("C",l,t.y,l,e.y,e.x,e.y),i.appendSegment(u)}else{var c=(t.y+e.y)/2;u=Et.createSegment("C",t.x,c,e.x,c,e.x,e.y),i.appendSegment(u)}}return o?i:i.serialize()},po={AUTO:"auto",HORIZONTAL:"horizontal",VERTICAL:"vertical",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},go={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",AUTO:"auto",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},vo=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0,o=Boolean(r.raw),a=r.direction,s=void 0===a?po.AUTO:a,l=r.precision,c=void 0===l?3:l,f={coeff:r.distanceCoefficient||.6,angleTangentCoefficient:r.angleTangentCoefficient||80,tau:r.tension||.5,sourceTangent:r.sourceTangent?new Y(r.sourceTangent):null,targetTangent:r.targetTangent?new Y(r.targetTangent):null};"string"==typeof r.sourceDirection?f.sourceDirection=r.sourceDirection:"number"==typeof r.sourceDirection?f.sourceDirection=new Y(1,0).rotate(null,r.sourceDirection):f.sourceDirection=r.sourceDirection?new Y(r.sourceDirection).normalize():null,"string"==typeof r.targetDirection?f.targetDirection=r.targetDirection:"number"==typeof r.targetDirection?f.targetDirection=new Y(1,0).rotate(null,r.targetDirection):f.targetDirection=r.targetDirection?new Y(r.targetDirection).normalize():null;var h,d,p=[t].concat(u(n.map((function(t){return new Y(t)}))),[e]);if(f.sourceTangent)h=f.sourceTangent;else{var g=function(t,e,n,r){if(r.sourceDirection)switch(r.sourceDirection){case go.UP:return new Y(0,-1);case go.DOWN:return new Y(0,1);case go.LEFT:return new Y(-1,0);case go.RIGHT:return new Y(1,0);case go.AUTO:return mo(t,e);case go.CLOSEST_POINT:return bo(0,e);case go.OUTWARDS:return xo(t,e);default:return r.sourceDirection}switch(n){case po.HORIZONTAL:return function(t,e,n){var r=t.sourceBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[0]):r.x>e[1].x?"right":"left"){case"left":return new Y(-1,0);case"right":default:return new Y(1,0)}}(t,e);case po.VERTICAL:return function(t,e,n){var r=t.sourceBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[0]):r.y>e[1].y?"bottom":"top"){case"top":return new Y(0,-1);case"bottom":default:return new Y(0,1)}}(t,e);case po.CLOSEST_POINT:return bo(0,e);case po.OUTWARDS:return xo(t,e);case po.AUTO:default:return mo(t,e)}}(i,p,s,f),v=p[0].distance(p[1])*f.coeff,m=_o(g,p[1].difference(p[0]).normalize());if(m>Math.PI/4){var y=v+(m-Math.PI/4)*f.angleTangentCoefficient;h=g.clone().scale(y,y)}else h=g.clone().scale(v,v)}if(f.targetTangent)d=f.targetTangent;else{var b=function(t,e,n,r){if(r.targetDirection)switch(r.targetDirection){case go.UP:return new Y(0,-1);case go.DOWN:return new Y(0,1);case go.LEFT:return new Y(-1,0);case go.RIGHT:return new Y(0,1);case go.AUTO:return yo(t,e);case go.CLOSEST_POINT:return wo(0,e);case go.OUTWARDS:return So(t,e);default:return r.targetDirection}switch(n){case po.HORIZONTAL:return function(t,e,n){var r=t.targetBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[e.length-1]):r.x>e[e.length-2].x?"left":"right"){case"left":return new Y(-1,0);case"right":default:return new Y(1,0)}}(t,e);case po.VERTICAL:return function(t,e,n){var r=t.targetBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[e.length-1]):r.y>e[e.length-2].y?"top":"bottom"){case"top":return new Y(0,-1);case"bottom":default:return new Y(0,1)}}(t,e);case po.CLOSEST_POINT:return wo(0,e);case po.OUTWARDS:return So(t,e);case po.AUTO:default:return yo(t,e)}}(i,p,s,f),w=p.length-1,x=p[w-1].distance(p[w])*f.coeff,S=_o(b,p[w-1].difference(p[w]).normalize());if(S>Math.PI/4){var k=x+(S-Math.PI/4)*f.angleTangentCoefficient;d=b.clone().scale(k,k)}else d=b.clone().scale(x,x)}var _=function(t,e,n,r){for(var i=r.tau,o=r.coeff,a=[],s=[],u=[],l=t.length-1,c=0;c<l;c++)a[c]=t[c].distance(t[c+1]);s[0]=e,s[l]=n;for(var f=1;f<l;f++){var h=void 0,d=void 0;h=1===f?t[f-1].clone().offset(s[f-1].x,s[f-1].y):t[f-1].clone(),d=f===l-1?t[f+1].clone().offset(s[f+1].x,s[f+1].y):t[f+1].clone();var p,g=h.difference(t[f]).normalize(),v=d.difference(t[f]).normalize(),m=_o(g,v),y=void 0,b=(Math.PI-m)/2,w=Eo(g,v);p=Eo(t[f].difference(t[f+1]),t[f].difference(t[f-1])),w<0&&(b=-b),m<Math.PI/2&&(b<0&&p<0||b>0&&p>0)&&(b-=Math.PI),ko(y=v.clone(),b);var x=y.clone(),S=y.clone(),k=a[f-1]*o,_=a[f]*o;x.scale(k,k),S.scale(_,_),s[f]=[x,S]}for(var E=0;E<l;E++){var A,P;A=0===E?t[E+1].difference(s[E].x/i,s[E].y/i):t[E+1].difference(s[E][1].x/i,s[E][1].y/i),P=E===l-1?t[E].clone().offset(s[E+1].x/i,s[E+1].y/i):t[E].difference(s[E+1][0].x/i,s[E+1][0].y/i),u[E]=[A,t[E],t[E+1],P]}return u}(p,h,d,f).map((function(t){return function(t,e){var n=e.tau,r=new Y;r.x=t[1].x+(t[2].x-t[0].x)/(6*n),r.y=t[1].y+(t[2].y-t[0].y)/(6*n);var i=new Y;return i.x=t[2].x+(t[3].x-t[1].x)/(6*n),i.y=t[2].y+(t[3].y-t[1].y)/(6*n),new kt(t[1],r,i,t[2])}(t,f)})),E=new Et(_).round(c);return o?E:E.serialize()};function mo(t,e,n){var r=t.sourceBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[0]):r.sideNearestToPoint(e[1])){case"top":return new Y(0,-1);case"bottom":return new Y(0,1);case"right":return new Y(1,0);case"left":return new Y(-1,0)}}function yo(t,e,n){var r=t.targetBBox;switch(r.width&&r.height?r.sideNearestToPoint(e[e.length-1]):r.sideNearestToPoint(e[e.length-2])){case"top":return new Y(0,-1);case"bottom":return new Y(0,1);case"right":return new Y(1,0);case"left":return new Y(-1,0)}}function bo(t,e,n){return e[1].difference(e[0]).normalize()}function wo(t,e,n){var r=e.length-1;return e[r-1].difference(e[r]).normalize()}function xo(t,e,n){var r=t.sourceBBox.center();return e[0].difference(r).normalize()}function So(t,e,n){var r=t.targetBBox.center();return e[e.length-1].difference(r).normalize()}function ko(t,e){var n=Math.cos(e),r=Math.sin(e),i=n*t.x-r*t.y,o=r*t.x+n*t.y;t.x=i,t.y=o}function _o(t,e){var n=t.dot(e)/(t.magnitude()*e.magnitude());return n<-1&&(n=-1),n>1&&(n=1),Math.acos(n)}function Eo(t,e){return t.x*e.y-t.y*e.x}vo.Directions=po,vo.TangentDirections=go;var Ao={RENDER:"RENDER",UPDATE:"UPDATE",TOOLS:"TOOLS",LEGACY_TOOLS:"LEGACY_TOOLS",LABELS:"LABELS",VERTICES:"VERTICES",SOURCE:"SOURCE",TARGET:"TARGET",CONNECTOR:"CONNECTOR"},Po=vi.extend({className:function(){var t=vi.prototype.className.apply(this).split(" ");return t.push("link"),t.join(" ")},options:{shortLinkLength:105,doubleLinkTools:!1,longLinkLength:155,linkToolsOffset:40,doubleLinkToolsOffset:65,sampleInterval:50},_labelCache:null,_labelSelectors:null,_markerCache:null,_V:null,_dragData:null,metrics:null,decimalsRounding:2,initialize:function(){vi.prototype.initialize.apply(this,arguments),this._labelCache={},this._labelSelectors={},this._markerCache={},this._V={},this.cleanNodesCache()},presentationAttributes:{markup:[Ao.RENDER],attrs:[Ao.UPDATE],router:[Ao.UPDATE],connector:[Ao.CONNECTOR],smooth:[Ao.UPDATE],manhattan:[Ao.UPDATE],toolMarkup:[Ao.LEGACY_TOOLS],labels:[Ao.LABELS],labelMarkup:[Ao.LABELS],vertices:[Ao.VERTICES,Ao.UPDATE],vertexMarkup:[Ao.VERTICES],source:[Ao.SOURCE,Ao.UPDATE],target:[Ao.TARGET,Ao.UPDATE]},initFlag:[Ao.RENDER,Ao.SOURCE,Ao.TARGET,Ao.TOOLS],UPDATE_PRIORITY:1,confirmUpdate:function(t,e){if(e||(e={}),this.hasFlag(t,Ao.SOURCE)){if(!this.updateEndProperties("source"))return t;t=this.removeFlag(t,Ao.SOURCE)}if(this.hasFlag(t,Ao.TARGET)){if(!this.updateEndProperties("target"))return t;t=this.removeFlag(t,Ao.TARGET)}var n=this.paper,r=this.sourceView,i=this.targetView;if(n&&(r&&!n.isViewMounted(r)||i&&!n.isViewMounted(i)))return t;if(this.hasFlag(t,Ao.RENDER))return this.render(),this.updateHighlighters(!0),this.updateTools(e),this.removeFlag(t,[Ao.RENDER,Ao.UPDATE,Ao.VERTICES,Ao.LABELS,Ao.TOOLS,Ao.LEGACY_TOOLS,Ao.CONNECTOR]);var o=!1;this.hasFlag(t,Ao.VERTICES)&&(this.renderVertexMarkers(),t=this.removeFlag(t,Ao.VERTICES));var a=this.model,s=a.attributes,u=this.hasFlag(t,Ao.LABELS),l=this.hasFlag(t,Ao.LEGACY_TOOLS);u&&(this.onLabelsChange(a,s.labels,e),t=this.removeFlag(t,Ao.LABELS),o=!0),l&&(this.renderTools(),t=this.removeFlag(t,Ao.LEGACY_TOOLS));var c=this.hasFlag(t,Ao.UPDATE),f=this.hasFlag(t,Ao.CONNECTOR);return(c||f)&&(c?e.translateBy&&a.isRelationshipEmbeddedIn(e.translateBy)?this.translate(e.tx,e.ty):this.update():(this.updatePath(),this.updateDOM()),this.updateTools(e),t=this.removeFlag(t,[Ao.UPDATE,Ao.TOOLS,Ao.CONNECTOR]),u=!1,l=!1,o=!0),u&&this.updateLabelPositions(),l&&this.updateToolsPosition(),o&&this.updateHighlighters(),this.hasFlag(t,Ao.TOOLS)&&(this.updateTools(e),t=this.removeFlag(t,Ao.TOOLS)),t},requestConnectionUpdate:function(t){this.requestUpdate(this.getFlag(Ao.UPDATE),t)},isLabelsRenderRequired:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.model.previous("labels");if(!e)return!0;if("propertyPathArray"in t&&"propertyValue"in t){var n=t.propertyPathArray||[],r=n.length;if(r>1&&e[n[1]]){if(2===r)return"markup"in Object(t.propertyValue);if("markup"!==n[2])return!1}}return!0},onLabelsChange:function(t,e,n){this.isLabelsRenderRequired(n)?this.renderLabels():this.updateLabels()},render:function(){return this.vel.empty(),this.unmountLabels(),this._V={},this.renderMarkup(),this.renderLabels(),this.update(),this},renderMarkup:function(){var t=this.model,e=t.get("markup")||t.markup;if(!e)throw new Error("dia.LinkView: markup required");if(Array.isArray(e))return this.renderJSONMarkup(e);if("string"==typeof e)return this.renderStringMarkup(e);throw new Error("dia.LinkView: invalid markup")},renderJSONMarkup:function(t){var e=this.parseDOMJSON(t,this.el);this.selectors=e.selectors,this.vel.append(e.fragment)},renderStringMarkup:function(t){var e=ye(t);Array.isArray(e)||(e=[e]);for(var n=this._V,r=0,i=e.length;r<i;r++){var o=e[r],a=o.attr("class");a&&(a=ke(a),n[we.camelCase(a)]=o)}this.renderTools(),this.renderVertexMarkers(),this.renderArrowheadMarkers(),this.vel.append(e)},_getLabelMarkup:function(t){if(t){if(Array.isArray(t))return this.parseDOMJSON(t,null);if("string"==typeof t)return this._getLabelStringMarkup(t);throw new Error("dia.linkView: invalid label markup")}},_getLabelStringMarkup:function(t){var e=ye(t),n=document.createDocumentFragment();if(Array.isArray(e))for(var r=0,i=e.length;r<i;r++){var o=e[r].node;n.appendChild(o)}else n.appendChild(e.node);return{fragment:n,selectors:{}}},_normalizeLabelMarkup:function(t){if(t){var e,n=t.fragment;if(!(t.fragment instanceof DocumentFragment&&t.fragment.hasChildNodes()))throw new Error("dia.LinkView: invalid label markup.");var r=n.childNodes;return(e=r.length>1||"G"!==r[0].nodeName.toUpperCase()?ye("g").append(n):ye(r[0])).addClass("label"),{node:e.node,selectors:t.selectors}}},renderLabels:function(){var t=this._V,e=t.labels,n=this._labelCache={},r=this._labelSelectors={},i=this.model,o=i.attributes.labels||[],a=o.length;if(0===a)return e&&e.remove(),this;e?e.empty():(e=t.labels=ye("g").addClass("labels"),this.options.labelsLayer&&(e.addClass(Se(un(this,"className"))),e.attr("model-id",i.id)));for(var s=0;s<a;s++){var u,l,c=o[s],f=this._normalizeLabelMarkup(this._getLabelMarkup(c.markup));if(f)u=f.node,l=f.selectors;else{var h=i._builtins.defaultLabel,d=this._normalizeLabelMarkup(this._getLabelMarkup(h.markup)),p=i._getDefaultLabel(),g=this._normalizeLabelMarkup(this._getLabelMarkup(p.markup))||d;u=g.node,l=g.selectors}u.setAttribute("label-idx",s),e.append(u),n[s]=u;var v=this.selector;if(l[v])throw new Error("dia.LinkView: ambiguous label root selector.");l[v]=u,r[s]=l}return e.parent()||this.mountLabels(),this.updateLabels(),this},mountLabels:function(){var t=this.el,e=this.paper,n=this.model,r=this._V,i=this.options,o=r.labels;if(o&&n.hasLabels()){var a=o.node;i.labelsLayer?e.getLayerView(i.labelsLayer).insertSortedNode(a,n.get("z")):a.parentNode!==t&&t.appendChild(a)}},unmountLabels:function(){var t=this.options,e=this._V;if(e){var n=e.labels;n&&t.labelsLayer&&n.remove()}},onMount:function(){this.mountLabels()},unmount:function(){vi.prototype.unmount.apply(this,arguments),this.unmountLabels()},findLabelNode:function(t,e){var n=this._labelCache[t];if(!n)return null;var r=this._labelSelectors[t],i=l(this.findBySelector(e,n,r),1)[0];return void 0===i?null:i},_mergeLabelAttrs:function(t,e,n,r){if(null===e)return null;if(void 0===e){if(null===n)return null;if(void 0===n){if(t)return;return r}return t?n:pn({},r,n)}return t?pn({},n,e):pn({},r,n,e)},updateLabels:function(){if(!this._V.labels)return this;for(var t=this.model,e=t.get("labels")||[],n=this.can("labelMove"),r=t._builtins.defaultLabel.attrs,i=t._getDefaultLabel(),o=i.markup,a=i.attrs,s=0,u=e.length;s<u;s++){var l=this._labelCache[s];l.setAttribute("cursor",n?"move":"default");var c=this._labelSelectors[s],f=e[s],h=f.markup,d=f.attrs,p=this._mergeLabelAttrs(h||o,d,a,r);this.updateDOMSubtreeAttributes(l,p,{rootBBox:new ut(f.size),selectors:c})}return this},renderTools:function(){if(!this._V.linkTools)return this;var t,e=we(this._V.linkTools.node).empty(),n=Ve(this.model.get("toolMarkup")||this.model.toolMarkup),r=ye(n());return e.append(r.node),this._toolCache=r,this.options.doubleLinkTools&&(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup?(n=Ve(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup),t=ye(n())):t=r.clone(),e.append(t.node),this._tool2Cache=t),this},renderVertexMarkers:function(){if(!this._V.markerVertices)return this;var t=we(this._V.markerVertices.node).empty(),e=Ve(this.model.get("vertexMarkup")||this.model.vertexMarkup);return this.model.vertices().forEach((function(n,r){t.append(ye(e($e({idx:r},n))).node)})),this},renderArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;var t=we(this._V.markerArrowheads.node);t.empty();var e=Ve(this.model.get("arrowheadMarkup")||this.model.arrowheadMarkup);return this._V.sourceArrowhead=ye(e({end:"source"})),this._V.targetArrowhead=ye(e({end:"target"})),t.append(this._V.sourceArrowhead.node,this._V.targetArrowhead.node),this},removeRedundantLinearVertices:function(t){var e=this.model,n=e.vertices(),r=[this.sourceAnchor].concat(u(n),[this.targetAnchor]),i=r.length,o=new mt(r);o.simplify({threshold:.001});var a=o.points.map((function(t){return t.toJSON()})),s=a.length;return i===s?0:(e.vertices(a.slice(1,s-1),t),i-s)},updateDefaultConnectionPath:function(){var t=this._V;t.connection&&t.connection.attr("d",this.getSerializedConnection()),t.connectionWrap&&t.connectionWrap.attr("d",this.getSerializedConnection()),t.markerSource&&t.markerTarget&&this._translateAndAutoOrientArrows(t.markerSource,t.markerTarget)},getEndView:function(t){switch(t){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error("dia.LinkView: type parameter required.")}},getEndAnchor:function(t){switch(t){case"source":return new Y(this.sourceAnchor);case"target":return new Y(this.targetAnchor);default:throw new Error("dia.LinkView: type parameter required.")}},getEndConnectionPoint:function(t){switch(t){case"source":return new Y(this.sourcePoint);case"target":return new Y(this.targetPoint);default:throw new Error("dia.LinkView: type parameter required.")}},getEndMagnet:function(t){switch(t){case"source":var e=this.sourceView;if(!e)break;return this.sourceMagnet||e.el;case"target":var n=this.targetView;if(!n)break;return this.targetMagnet||n.el;default:throw new Error("dia.LinkView: type parameter required.")}return null},update:function(){return this.updateRoute(),this.updatePath(),this.updateDOM(),this},translate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.route,r=this.path;if(n&&r){var i=new mt(n);i.translate(t,e),this.route=i.points,this._translateConnectionPoints(t,e),r.translate(t,e),this.updateDOM()}},updateDOM:function(){var t=this.el,e=this.model,n=this.selectors;this.cleanNodesCache(),this.updateDOMSubtreeAttributes(t,e.attr(),{selectors:n}),this.updateDefaultConnectionPath(),this.updateLabelPositions(),this.updateToolsPosition(),this.updateArrowheadMarkers(),this.options.perpendicular=null},updateRoute:function(){var t=this.model.vertices(),e=this.findAnchors(t),n=this.sourceAnchor=e.source,r=this.targetAnchor=e.target,i=this.findRoute(t);this.route=i;var o=this.findConnectionPoints(i,n,r);this.sourcePoint=o.source,this.targetPoint=o.target},updatePath:function(){var t=this.route,e=this.sourcePoint,n=this.targetPoint,r=this.findMarkerPoints(t,e,n),i=this.findPath(t,r.source||e,r.target||n);this.path=i},findMarkerPoints:function(t,e,n){var r,i,o=t[0],a=t[t.length-1],s=this._markerCache;return this._V.markerSource&&(s.sourceBBox=s.sourceBBox||this._V.markerSource.getBBox(),r=Y(e).move(o||n,s.sourceBBox.width*this._V.markerSource.scale().sx*-1).round()),this._V.markerTarget&&(s.targetBBox=s.targetBBox||this._V.markerTarget.getBBox(),i=Y(n).move(a||e,s.targetBBox.width*this._V.markerTarget.scale().sx*-1).round()),s.sourcePoint=r||e.clone(),s.targetPoint=i||n.clone(),{source:r,target:i}},findAnchorsOrdered:function(t,e,n,r){var i,o,a,s,u=this.model,l=u.get(t),c=u.get(n),f=this.getEndView(t),h=this.getEndView(n),d=this.getEndMagnet(t),p=this.getEndMagnet(n);f?(a=e?new Y(e):h?p:new Y(c),i=this.getAnchor(l.anchor,f,d,a,t)):i=new Y(l),h?(s=new Y(r||i),o=this.getAnchor(c.anchor,h,p,s,n)):o=new Y(c);var g={};return g[t]=i,g[n]=o,g},findAnchors:function(t){var e=this.model,n=t[0],r=t[t.length-1];return e.target().priority&&!e.source().priority?this.findAnchorsOrdered("target",r,"source",n):this.findAnchorsOrdered("source",n,"target",r)},findConnectionPoints:function(t,e,n){var r,i,o,a,s=t[0],u=t[t.length-1],l=this.model,c=l.get("source"),f=l.get("target"),h=this.sourceView,d=this.targetView,p=this.paper.options;if(h&&!h.isNodeConnection(this.sourceMagnet)){r=this.sourceMagnet||h.el;var g=c.connectionPoint||p.defaultConnectionPoint,v=new ht(s||n,e);o=this.getConnectionPoint(g,h,r,v,"source")}else o=e;if(d&&!d.isNodeConnection(this.targetMagnet)){i=this.targetMagnet||d.el;var m=f.connectionPoint||p.defaultConnectionPoint,y=new ht(u||e,n);a=this.getConnectionPoint(m,d,i,y,"target")}else a=n;return{source:o,target:a}},getAnchor:function(t,e,n,r,i){var o,a=e.isNodeConnection(n),s=this.paper.options;if(t||(t=a?s.defaultLinkAnchor:s.perpendicularLinks||this.options.perpendicular?{name:"perpendicular"}:s.defaultAnchor),!t)throw new Error("Anchor required.");if("function"==typeof t)o=t;else{var u=t.name;if("function"!=typeof(o=s[a?"linkAnchorNamespace":"anchorNamespace"][u]))throw new Error("Unknown anchor: "+u)}var l=o.call(this,e,n,r,t.args||{},i,this);return l?l.round(this.decimalsRounding):new Y},getConnectionPoint:function(t,e,n,r,i){var o,a,s=r.end,u=this.paper.options;if("function"==typeof u.linkConnectionPoint){var l=n===e.el?void 0:n;if(o=u.linkConnectionPoint(this,e,l,r.start,i))return o}if(!t)return s;if("function"==typeof t)a=t;else{var c=t.name;if("function"!=typeof(a=u.connectionPointNamespace[c]))throw new Error("Unknown connection point: "+c)}return(o=a.call(this,r,e,n,t.args||{},i,this))?o.round(this.decimalsRounding):s},_translateConnectionPoints:function(t,e){var n=this._markerCache;n.sourcePoint.offset(t,e),n.targetPoint.offset(t,e),this.sourcePoint.offset(t,e),this.targetPoint.offset(t,e),this.sourceAnchor.offset(t,e),this.targetAnchor.offset(t,e)},_normalizeLabelPosition:function(t){return"number"==typeof t?{distance:t,offset:null,angle:0,args:null}:t},updateLabelPositions:function(){if(!this._V.labels)return this;if(!this.path)return this;var t=this.model,e=t.get("labels")||[];if(!e.length)return this;for(var n=t._builtins.defaultLabel.position,r=t._getDefaultLabel(),i=this._normalizeLabelPosition(r.position),o=pn({},n,i),a=0,s=e.length;a<s;a++){var u=this._labelCache[a];if(u){var l=e[a],c=this._normalizeLabelPosition(l.position),f=pn({},o,c),h=this._getLabelTransformationMatrix(f);u.setAttribute("transform",ye.matrixToTransformString(h)),this._cleanLabelMatrices(a)}}return this},_cleanLabelMatrices:function(t){var e=this.metrics,n=this._labelSelectors[t];if(n)for(var r in n){var i=n[r].id;i&&i in e&&delete e[i].magnetMatrix}},updateToolsPosition:function(){if(!this._V.linkTools)return this;var t="",e=this.options.linkToolsOffset,n=this.getConnectionLength();if(!Number.isNaN(n)){n<this.options.shortLinkLength&&(t="scale(.5)",e/=2);var r=this.getPointAtLength(e);if(this._toolCache.attr("transform","translate("+r.x+", "+r.y+") "+t),this.options.doubleLinkTools&&n>=this.options.longLinkLength){var i=this.options.doubleLinkToolsOffset||e;r=this.getPointAtLength(n-i),this._tool2Cache.attr("transform","translate("+r.x+", "+r.y+") "+t),this._tool2Cache.attr("visibility","visible")}else this.options.doubleLinkTools&&this._tool2Cache.attr("visibility","hidden")}return this},updateArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;if("none"===we.css(this._V.markerArrowheads.node,"display"))return this;var t=this.getConnectionLength()<this.options.shortLinkLength?.5:1;return this._V.sourceArrowhead.scale(t),this._V.targetArrowhead.scale(t),this._translateAndAutoOrientArrows(this._V.sourceArrowhead,this._V.targetArrowhead),this},updateEndProperties:function(t){var e=this.model,n=this.paper,r="".concat(t,"View"),i=e.get(t),o=i&&i.id;if(!o)return this[r]=null,this.updateEndMagnet(t),!0;var a=n.getModelById(o);if(!a)throw new Error("LinkView: invalid "+t+" cell.");var s=a.findView(n);return!!s&&(this[r]=s,this.updateEndMagnet(t),!0)},updateEndMagnet:function(t){var e="".concat(t,"Magnet"),n=this.getEndView(t);if(n){var r=n.getMagnetFromLinkEnd(this.model.get(t));r===n.el&&(r=null),this[e]=r}else this[e]=null},_translateAndAutoOrientArrows:function(t,e){var n=tn(this.route);t&&t.translateAndAutoOrient(this.sourcePoint,n[0]||this.targetPoint,this.paper.cells),e&&e.translateAndAutoOrient(this.targetPoint,n[n.length-1]||this.sourcePoint,this.paper.cells)},_getLabelPositionAngle:function(t){return(this.model.label(t).position||{}).angle||0},_getLabelPositionArgs:function(t){return(this.model.label(t).position||{}).args},_getDefaultLabelPositionArgs:function(){return(this.model._getDefaultLabel().position||{}).args},_mergeLabelPositionArgs:function(t,e){return null===t?null:void 0===t?null===e?null:e:pn({},e,t)},addLabel:function(t,e,n,r){var i,o,a,s=0;"number"!=typeof t?(i=t.x,o=t.y,"number"==typeof e?(s=e,a=n):a=e):(i=t,o=e,"number"==typeof n?(s=n,a=r):a=n);var u=this._getDefaultLabelPositionArgs(),l=a,c=this._mergeLabelPositionArgs(l,u),f={position:this.getLabelPosition(i,o,s,c)};return this.model.insertLabel(-1,f,a),-1},addVertex:function(t,e,n){var r="number"!=typeof t,i=r?t.x:t,o=r?t.y:e,a=r?e:n,s={x:i,y:o},u=this.getVertexIndex(i,o);return this.model.insertVertex(u,s,a),u},sendToken:function(t,e,n){var r,i,o;gn(e)?(r=e.duration,i="reverse"===e.direction,o=e.connection):(r=e,i=!1,o=null);var a={dur:(r=r||1e3)+"ms",repeatCount:1,calcMode:"linear",fill:"freeze"};i&&(a.keyPoints="1;0",a.keyTimes="0;1");var s,u=ye(t);if("string"==typeof o)s=this.findBySelector(o,this.el,this.selectors)[0];else{var l=this._V;s=l.connection?l.connection.node:this.el.querySelector("path")}if(!(s instanceof SVGPathElement))throw new Error("dia.LinkView: token animation requires a valid connection path.");u.appendTo(this.paper.cells).animateAlongPath(a,s),setTimeout(function(t,e){return function(){t.remove(),"function"==typeof e&&e()}}(u,n),r)},findRoute:function(t){t||(t=[]);var e=this.paper.options.routerNamespace||a,n=this.model.router(),r=this.paper.options.defaultRouter;if(!n){if(!r)return t.map(Y);n=r}var i=Je(n)?n:e[n.name];if(!Je(i))throw new Error('dia.LinkView: unknown router: "'+n.name+'".');var o=n.args||{};return i.call(this,t,o,this)||t.map(Y)},findPath:function(t,e,n){var r=this.paper.options.connectorNamespace||c,i=this.model.connector(),o=this.paper.options.defaultConnector;i||(i=o||{});var a=Je(i)?i:r[i.name];if(!Je(a))throw new Error('dia.LinkView: unknown connector: "'+i.name+'".');var s=Ye(i.args||{});s.raw=!0;var u=a.call(this,e,n,t,s,this);return"string"==typeof u&&(u=new Et(ye.normalizePathData(u))),u},getConnection:function(){var t=this.path;return t?t.clone():null},getSerializedConnection:function(){var t=this.path;if(!t)return null;var e=this.metrics;if(e.hasOwnProperty("data"))return e.data;var n=t.serialize();return e.data=n,n},getConnectionSubdivisions:function(){var t=this.path;if(!t)return null;var e=this.metrics;if(e.hasOwnProperty("segmentSubdivisions"))return e.segmentSubdivisions;var n=t.getSegmentSubdivisions();return e.segmentSubdivisions=n,n},getConnectionLength:function(){var t=this.path;if(!t)return 0;var e=this.metrics;if(e.hasOwnProperty("length"))return e.length;var n=t.length({segmentSubdivisions:this.getConnectionSubdivisions()});return e.length=n,n},getPointAtLength:function(t){var e=this.path;return e?e.pointAtLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getPointAtRatio:function(t){var e=this.path;return e?(Re(t)&&(t=parseFloat(t)/100),e.pointAt(t,{segmentSubdivisions:this.getConnectionSubdivisions()})):null},getTangentAtLength:function(t){var e=this.path;return e?e.tangentAtLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getTangentAtRatio:function(t){var e=this.path;return e?e.tangentAt(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPoint:function(t){var e=this.path;return e?e.closestPoint(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointLength:function(t){var e=this.path;return e?e.closestPointLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointRatio:function(t){var e=this.path;return e?e.closestPointNormalizedLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getLabelPosition:function(t,e,n,r){var i,o={},a=0;"number"==typeof n?(a=n,i=r):i=n,i&&(o.args=i);var s,u,l=!(i&&i.absoluteDistance),c=i&&i.absoluteDistance&&i.reverseDistance,f=i&&i.absoluteOffset,h=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},p=new Y(t,e),g=h.closestPointT(p,d),v=h.lengthAtT(g,d);if(l&&(v=v/this.getConnectionLength()||0),c&&(v=-1*(this.getConnectionLength()-v)||1),o.distance=v,f||(s=h.tangentAtT(g)),s)u=s.pointOffset(p);else{var m=h.pointAtT(g),y=p.difference(m);u={x:y.x,y:y.y}}return o.offset=u,o.angle=a,o},_getLabelTransformationMatrix:function(t){var e,n=0,r={};if("number"==typeof t)e=t;else{if("number"!=typeof t.distance)throw new Error("dia.LinkView: invalid label position distance.");r=t.args||{},e=t.distance,n=t.angle||0}var i=e>0&&e<=1,o=0,a={x:0,y:0};if(t.offset){var s=t.offset;"number"==typeof s&&(o=s),s.x&&(a.x=s.x),s.y&&(a.y=s.y)}var u,l=0!==a.x||0!==a.y||0===o,c=r.keepGradient,f=r.ensureLegibility,h=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},p=i?e*this.getConnectionLength():e,g=h.tangentAtLength(p,d),v=n;if(g){if(l)(u=g.start).offset(a);else{var m=g.clone();m.rotate(g.start,-90),m.setLength(o),u=m.end}c&&(v=g.angle()+n,f&&(v=A((v+90)%180-90)))}else u=h.start,l&&u.offset(a);return ye.createSVGMatrix().translate(u.x,u.y).rotate(v)},getLabelCoordinates:function(t){var e=this._getLabelTransformationMatrix(t);return new Y(e.e,e.f)},getVertexIndex:function(t,e){for(var n=this.model.vertices(),r=this.getClosestPointLength(new Y(t,e)),i=0,o=n.length;i<o;i++){var a=n[i];if(r<this.getClosestPointLength(a))break}return i},notifyPointerdown:function(t,e,n){vi.prototype.pointerdown.call(this,t,e,n),this.notify("link:pointerdown",t,e,n)},notifyPointermove:function(t,e,n){vi.prototype.pointermove.call(this,t,e,n),this.notify("link:pointermove",t,e,n)},notifyPointerup:function(t,e,n){this.notify("link:pointerup",t,e,n),vi.prototype.pointerup.call(this,t,e,n)},pointerdblclick:function(t,e,n){vi.prototype.pointerdblclick.apply(this,arguments),this.notify("link:pointerdblclick",t,e,n)},pointerclick:function(t,e,n){vi.prototype.pointerclick.apply(this,arguments),this.notify("link:pointerclick",t,e,n)},contextmenu:function(t,e,n){vi.prototype.contextmenu.apply(this,arguments),this.notify("link:contextmenu",t,e,n)},pointerdown:function(t,e,n){switch(this.notifyPointerdown(t,e,n),t.target.getAttribute("class")){case"marker-vertex":return void this.dragVertexStart(t,e,n);case"marker-vertex-remove":case"marker-vertex-remove-area":return void this.dragVertexRemoveStart(t,e,n);case"marker-arrowhead":return void this.dragArrowheadStart(t,e,n);case"connection":case"connection-wrap":return void this.dragConnectionStart(t,e,n);case"marker-source":case"marker-target":return}this.dragStart(t,e,n)},pointermove:function(t,e,n){var r=this._dragData;switch(r&&this.eventData(t,r),this.eventData(t).action){case"vertex-move":this.dragVertex(t,e,n);break;case"label-move":this.dragLabel(t,e,n);break;case"arrowhead-move":this.dragArrowhead(t,e,n);break;case"move":this.drag(t,e,n)}r&&$e(r,this.eventData(t)),this.notifyPointermove(t,e,n)},pointerup:function(t,e,n){var r=this._dragData;switch(r&&(this.eventData(t,r),this._dragData=null),this.eventData(t).action){case"vertex-move":this.dragVertexEnd(t,e,n);break;case"label-move":this.dragLabelEnd(t,e,n);break;case"arrowhead-move":this.dragArrowheadEnd(t,e,n);break;case"move":this.dragEnd(t,e,n)}this.notifyPointerup(t,e,n),this.checkMouseleave(t)},mouseover:function(t){vi.prototype.mouseover.apply(this,arguments),this.notify("link:mouseover",t)},mouseout:function(t){vi.prototype.mouseout.apply(this,arguments),this.notify("link:mouseout",t)},mouseenter:function(t){vi.prototype.mouseenter.apply(this,arguments),this.notify("link:mouseenter",t)},mouseleave:function(t){vi.prototype.mouseleave.apply(this,arguments),this.notify("link:mouseleave",t)},mousewheel:function(t,e,n,r){vi.prototype.mousewheel.apply(this,arguments),this.notify("link:mousewheel",t,e,n,r)},onevent:function(t,e,n,r){var i=ye(t.target).findParentByClass("link-tool",this.el);if(i){if(t.stopPropagation(),this.can("useLinkTools")){if("remove"===e)return void this.model.remove({ui:!0});this.notify(e,t,n,r)}this.notifyPointerdown(t,n,r),this.paper.delegateDragEvents(this,t.data)}else vi.prototype.onevent.apply(this,arguments)},onlabel:function(t,e,n){this.notifyPointerdown(t,e,n),this.dragLabelStart(t,e,n),this.eventData(t).stopPropagation&&t.stopPropagation()},dragConnectionStart:function(t,e,n){if(this.can("vertexAdd")){var r=this.addVertex({x:e,y:n},{ui:!0});this.eventData(t,{action:"vertex-move",vertexIdx:r})}},dragLabelStart:function(t,e,n){if(this.can("labelMove")){var r=t.currentTarget,i=parseInt(r.getAttribute("label-idx"),10),o=this._getLabelPositionAngle(i),a=this._getLabelPositionArgs(i),s=this._getDefaultLabelPositionArgs(),u=this._mergeLabelPositionArgs(a,s);this.eventData(t,{action:"label-move",labelIdx:i,positionAngle:o,positionArgs:u,stopPropagation:!0})}else this.eventData(t,{stopPropagation:!0});this.paper.delegateDragEvents(this,t.data)},dragVertexStart:function(t,e,n){if(this.can("vertexMove")){var r=t.target,i=parseInt(r.getAttribute("idx"),10);this.eventData(t,{action:"vertex-move",vertexIdx:i})}},dragVertexRemoveStart:function(t,e,n){if(this.can("vertexRemove")){var r=t.target,i=parseInt(r.getAttribute("idx"),10);this.model.removeVertex(i)}},dragArrowheadStart:function(t,e,n){if(this.can("arrowheadMove")){var r=t.target.getAttribute("end"),i=this.startArrowheadMove(r,{ignoreBackwardsCompatibility:!0});this.eventData(t,i)}},dragStart:function(t,e,n){this.can("linkMove")&&this.eventData(t,{action:"move",dx:e,dy:n})},dragLabel:function(t,e,n){var r=this.eventData(t),i={position:this.getLabelPosition(e,n,r.positionAngle,r.positionArgs)};this.paper.options.snapLabels&&delete i.position.offset,this.model.label(r.labelIdx,i)},dragVertex:function(t,e,n){var r=this.eventData(t);this.model.vertex(r.vertexIdx,{x:e,y:n},{ui:!0})},dragArrowhead:function(t,e,n){this.paper.options.snapLinks?this._snapArrowhead(t,e,n):this._connectArrowhead(this.getEventTarget(t),e,n,this.eventData(t))},drag:function(t,e,n){var r=this.eventData(t);this.model.translate(e-r.dx,n-r.dy,{ui:!0}),this.eventData(t,{dx:e,dy:n})},dragLabelEnd:function(){},dragVertexEnd:function(){},dragArrowheadEnd:function(t,e,n){var r=this.eventData(t),i=this.paper;i.options.snapLinks?this._snapArrowheadEnd(r):this._connectArrowheadEnd(r,e,n),i.linkAllowed(this)?(this._finishEmbedding(r),this._notifyConnectEvent(r,t)):this._disallow(r),this._afterArrowheadMove(r)},dragEnd:function(){},_disallow:function(t){switch(t.whenNotAllowed){case"remove":this.model.remove({ui:!0});break;case"revert":default:this.model.set(t.arrowhead,t.initialEnd,{ui:!0})}},_finishEmbedding:function(t){this.paper.options.embeddingMode&&this.model.reparent()&&(t.z=null)},_notifyConnectEvent:function(t,e){var n=t.arrowhead,r=t.initialEnd,i=this.model.prop(n);if(i&&!fr.endsEqual(r,i)){var o=this.paper;r.id&&this.notify("link:disconnect",e,o.findViewByModel(r.id),t.initialMagnet,n),i.id&&this.notify("link:connect",e,o.findViewByModel(i.id),t.magnetUnderPointer,n)}},_snapArrowhead:function(t,e,n){var r=this.paper,i=r.options,o=i.snapLinks,a=i.connectionStrategy,s=this.eventData(t),u=o.radius||50,l=r.findViewsInArea({x:e-u,y:n-u,width:2*u,height:2*u}),c=s.closestView||null,f=s.closestMagnet||null,h=s.magnetProxy||null;s.closestView=s.closestMagnet=s.magnetProxy=null;var d,p=Number.MAX_VALUE,g=new Y(e,n);l.forEach((function(t){var e=[];"false"!==t.el.getAttribute("magnet")&&e.push({bbox:t.model.getBBox(),magnet:t.el}),t.$("[magnet]").toArray().forEach((function(n){e.push({bbox:t.getNodeBBox(n),magnet:n})})),e.forEach((function(e){var n=e.magnet,i=e.bbox.center().squaredDistance(g);i<p&&(f===n||r.options.validateConnection.apply(r,s.validateConnectionArgs(t,t.el===n?null:n)))&&(p=i,s.closestView=t,s.closestMagnet=n)}))}),this);var v=null,m=s.closestView,y=s.closestMagnet;y&&(v=s.magnetProxy=m.findProxyNode(y,"highlighter"));var b=s.arrowhead,w=f!==y;if(c&&w&&c.unhighlight(h,{connecting:!0,snapping:!0}),m){var x=s.prevEnd,S=s.prevX,k=s.prevY;if(s.prevX=e,s.prevY=n,!w&&("function"!=typeof a||S===e&&k===n))return;if(d=m.getLinkEnd(y,e,n,this.model,b),!w&&Ke(x,d))return;s.prevEnd=d,w&&m.highlight(v,{connecting:!0,snapping:!0})}else d={x:e,y:n};this.model.set(b,d||{x:e,y:n},{ui:!0}),c&&this.notify("link:snap:disconnect",t,c,f,b),m&&this.notify("link:snap:connect",t,m,y,b)},_snapArrowheadEnd:function(t){var e=t.closestView,n=t.closestMagnet;e&&n&&(e.unhighlight(t.magnetProxy,{connecting:!0,snapping:!0}),t.magnetUnderPointer=e.findMagnet(n)),t.closestView=t.closestMagnet=null},_connectArrowhead:function(t,e,n,r){var i=this.paper,o=this.model;if(r.eventTarget!==t){r.magnetProxy&&r.viewUnderPointer.unhighlight(r.magnetProxy,{connecting:!0});var a=r.viewUnderPointer=i.findView(t);if(a){var s=r.magnetUnderPointer=a.findMagnet(t),u=r.magnetProxy=a.findProxyNode(s,"highlighter");s&&this.paper.options.validateConnection.apply(i,r.validateConnectionArgs(a,s))?u&&a.highlight(u,{connecting:!0}):(r.magnetUnderPointer=null,r.magnetProxy=null)}else r.magnetUnderPointer=null,r.magnetProxy=null}r.eventTarget=t,o.set(r.arrowhead,{x:e,y:n},{ui:!0})},_connectArrowheadEnd:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=this.model,i=t.viewUnderPointer,o=t.magnetUnderPointer,a=t.magnetProxy,s=t.arrowhead;if(o&&a&&i){i.unhighlight(a,{connecting:!0});var u=i.getLinkEnd(o,e,n,r,s);r.set(s,u,{ui:!0})}},_beforeArrowheadMove:function(t){t.z=this.model.get("z"),this.model.toFront();var e=this.el.style;t.pointerEvents=e.pointerEvents,e.pointerEvents="none",this.paper.options.markAvailable&&this._markAvailableMagnets(t)},_afterArrowheadMove:function(t){null!==t.z&&(this.model.set("z",t.z,{ui:!0}),t.z=null),this.el.style.pointerEvents=t.pointerEvents,this.paper.options.markAvailable&&this._unmarkAvailableMagnets(t)},_createValidateConnectionArgs:function(t){var e,n=[];n[4]=t,n[5]=this;var r=0,i=0;"source"===t?(r=2,e="target"):(i=2,e="source");var o=this.model.get(e);if(o.id){var a=n[r]=this.paper.findViewByModel(o.id),s=a.getMagnetFromLinkEnd(o);s===a.el&&(s=void 0),n[r+1]=s}return function(t,e){return n[i]=t,n[i+1]=t.el===e?void 0:e,n}},_markAvailableMagnets:function(t){function e(t,e){var n=t.paper;return n.options.validateConnection.apply(n,this.validateConnectionArgs(t,e))}var n=this.paper,r=n.model.getCells();t.marked={};for(var i=0,o=r.length;i<o;i++){var a=r[i].findView(n);if(a){var s=Array.prototype.slice.call(a.el.querySelectorAll("[magnet]"));"false"!==a.el.getAttribute("magnet")&&s.push(a.el);var u=s.filter(e.bind(t,a));if(u.length>0){for(var l=0,c=u.length;l<c;l++)a.highlight(u[l],{magnetAvailability:!0});a.highlight(null,{elementAvailability:!0}),t.marked[a.model.id]=u}}}},_unmarkAvailableMagnets:function(t){for(var e,n,r=Object.keys(t.marked),i=0,o=r.length;i<o;i++){e=r[i],n=t.marked[e];var a=this.paper.findViewByModel(e);if(a){for(var s=0,u=n.length;s<u;s++)a.unhighlight(n[s],{magnetAvailability:!0});a.unhighlight(null,{elementAvailability:!0})}}t.marked=null},startArrowheadMove:function(t,e){e||(e={});var n={action:"arrowhead-move",arrowhead:t,whenNotAllowed:e.whenNotAllowed||"revert",initialMagnet:this[t+"Magnet"]||(this[t+"View"]?this[t+"View"].el:null),initialEnd:Ye(this.model.get(t)),validateConnectionArgs:this._createValidateConnectionArgs(t)};return this._beforeArrowheadMove(n),!0!==e.ignoreBackwardsCompatibility&&(this._dragData=n),n},onRemove:function(){vi.prototype.onRemove.apply(this,arguments),this.unmountLabels()}},{Flags:Ao});Object.defineProperty(Po.prototype,"sourceBBox",{enumerable:!0,get:function(){var t=this.sourceView;if(!t){var e=this.model.source();return new ut(e.x,e.y)}var n=this.sourceMagnet;return t.isNodeConnection(n)?new ut(this.sourceAnchor):t.getNodeBBox(n||t.el)}}),Object.defineProperty(Po.prototype,"targetBBox",{enumerable:!0,get:function(){var t=this.targetView;if(!t){var e=this.model.target();return new ut(e.x,e.y)}var n=this.targetMagnet;return t.isNodeConnection(n)?new ut(this.targetAnchor):t.getNodeBBox(n||t.el)}});var Co={CELLS:"cells",BACK:"back",FRONT:"front",TOOLS:"tools",LABELS:"labels"},To=An.extend({tagName:"g",svgElement:!0,pivotNodes:null,defaultTheme:null,options:{name:""},className:function(){return Se("".concat(this.options.name,"-layer"))},init:function(){this.pivotNodes={}},insertSortedNode:function(t,e){this.el.insertBefore(t,this.insertPivot(e))},insertNode:function(t){var e=this.el;t.parentNode!==e&&e.appendChild(t)},insertPivot:function(t){var e=this.el,n=this.pivotNodes;(t=+t)||(t=0);var r=n[t];if(r)return r;r=n[t]=document.createComment("z-index:"+(t+1));var i=-1/0;for(var o in n)(o=+o)<t&&o>i&&(i=o);if(i!==-1/0){var a=n[i];e.insertBefore(r,a.nextSibling)}else e.insertBefore(r,e.firstChild);return r},removePivots:function(){var t=this.el,e=this.pivotNodes;for(var n in e)t.removeChild(e[n]);this.pivotNodes={}}}),No=pi.extend({tagName:"path",className:"highlight-stroke",attributes:{"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},options:{padding:3,rx:0,ry:0,useFirstSubpath:!1,attrs:{"stroke-width":3,stroke:"#FEB663"}},getPathData:function(t,e){var n,r=this.options,i=r.useFirstSubpath;try{var o=ye(e);if(n=o.convertToPathData().trim(),"PATH"===o.tagName()&&i){var a=n.search(/.M/i)+1;a>0&&(n=n.substr(0,a))}}catch(i){var s=t.getNodeBoundingRect(e);n=ye.rectToPath($e({},r,s.toJSON()))}return n},highlightConnection:function(t){this.vel.attr("d",t.getSerializedConnection())},highlightNode:function(t,e){var n=this.vel,r=this.options,i=r.padding,o=r.layer,a=t.getNodeMatrix(e);if(i){o||e!==t.el||n.remove();var s=t.getNodeBoundingRect(e),u=s.x+s.width/2,l=s.y+s.height/2;s=ye.transformRect(s,a);var c=Math.max(s.width,1),f=Math.max(s.height,1),h=(c+i)/c,d=(f+i)/f,p=ye.createSVGMatrix({a:h,b:0,c:0,d,e:u-h*u,f:l-d*l});a=a.multiply(p)}n.attr({d:this.getPathData(t,e),transform:ye.matrixToTransformString(a)})},highlight:function(t,e){var n=this.vel,r=this.options;n.attr(r.attrs),t.isNodeConnection(e)?this.highlightConnection(t):this.highlightNode(t,e)}}),Lo=pi.extend({tagName:"rect",className:"highlight-mask",attributes:{"pointer-events":"none"},options:{padding:3,maskClip:20,deep:!1,attrs:{stroke:"#FEB663","stroke-width":3,"stroke-linecap":"butt","stroke-linejoin":"miter"}},VISIBLE:"white",INVISIBLE:"black",MASK_ROOT_ATTRIBUTE_BLACKLIST:["marker-start","marker-end","marker-mid","transform","stroke-dasharray"],MASK_CHILD_ATTRIBUTE_BLACKLIST:["stroke","fill","stroke-width","stroke-opacity","stroke-dasharray","fill-opacity","marker-start","marker-end","marker-mid"],MASK_REPLACE_TAGS:["FOREIGNOBJECT","IMAGE","USE","TEXT","TSPAN","TEXTPATH"],MASK_REMOVE_TAGS:["TEXT","TSPAN","TEXTPATH"],transformMaskChild:function(t,e){var n=this.MASK_CHILD_ATTRIBUTE_BLACKLIST,r=this.MASK_REPLACE_TAGS,i=this.MASK_REMOVE_TAGS,o=e.tagName();if(!ye.isSVGGraphicsElement(e)||i.includes(o))return e.remove(),!1;if(r.includes(o)){var a=t.vel.findOne("#".concat(e.id));if(a){var s=a.node,u=t.getNodeBoundingRect(s);t.model.isElement()&&(u=ye.transformRect(u,t.getNodeMatrix(s)));var l=ye("rect",u.toJSON()),c=u.center(),f=c.x,h=c.y,d=a.rotate(),p=d.angle,g=d.cx,v=void 0===g?f:g,m=d.cy,y=void 0===m?h:m;p&&l.rotate(p,v,y),e.parent().append(l)}return e.remove(),!1}return n.forEach((function(t){"fill"===t&&"none"===e.attr("fill")||e.removeAttr(t)})),!0},transformMaskRoot:function(t,e){this.MASK_ROOT_ATTRIBUTE_BLACKLIST.forEach((function(t){e.removeAttr(t)}))},getMaskShape:function(t,e){var n,r=this,i=this.options,o=this.MASK_REPLACE_TAGS,a=i.deep,s=e.tagName();if("G"===s){if(!a)return null;!function(t,e){for(var n=t.children();n.length>0;){var r=n.shift();e(r)&&n.push.apply(n,u(r.children()))}}(n=e.clone(),(function(e){return r.transformMaskChild(t,e)}))}else{if(o.includes(s))return null;n=e.clone()}return this.transformMaskRoot(t,n),n},getMaskId:function(){return"highlight-mask-".concat(this.cid)},getMask:function(t,e){var n=this.VISIBLE,r=this.INVISIBLE,i=this.options,o=i.padding,a=i.attrs,s="stroke-width"in a?a["stroke-width"]:1,u="none"!==e.attr("fill"),l=parseFloat(e.attr("stroke-width"));isNaN(l)&&(l=1);var c=l+2*o,f=c+2*s,h=this.getMaskShape(t,e);if(!h){var d=t.getNodeBoundingRect(e.node);d.inflate(d.width?0:.5,d.height?0:.5),h=ye("rect",d.toJSON())}return h.attr(a),ye("mask",{id:this.getMaskId()}).append([h.clone().attr({fill:u?n:"none",stroke:n,"stroke-width":f}),h.clone().attr({fill:u?r:"none",stroke:r,"stroke-width":c})])},removeMask:function(t){var e=t.svg.getElementById(this.getMaskId());e&&t.defs.removeChild(e)},addMask:function(t,e){t.defs.appendChild(e.node)},highlight:function(t,e){var n=this.options,r=this.vel,i=n.padding,o=n.attrs,a=n.maskClip,s=void 0===a?20:a,u=n.layer,l="stroke"in o?o.stroke:"#000000";u||e!==t.el||r.remove();var c=t.getNodeBoundingRect(e).inflate(i+s),f=this.getMask(t,ye(e));this.addMask(t.paper,f),r.attr(c.toJSON()),r.attr({transform:ye.matrixToTransformString(t.getNodeMatrix(e)),mask:"url(#".concat(f.id,")"),fill:l})},unhighlight:function(t){this.removeMask(t.paper)}}),Mo=pi.extend({UPDATABLE:!1,MOUNTABLE:!1,opacityClassName:Se("highlight-opacity"),highlight:function(t,e){ye(e).addClass(this.opacityClassName)},unhighlight:function(t,e){ye(e).removeClass(this.opacityClassName)}}),Oo=Se("highlighted"),Ro=pi.extend({UPDATABLE:!1,MOUNTABLE:!1,options:{className:Oo},highlight:function(t,e){ye(e).addClass(this.options.className)},unhighlight:function(t,e){ye(e).removeClass(this.options.className)}},{className:Oo});function Fo(t,e,n,r){var i="ratio"in r?r.ratio:.5;return t.getPointAtRatio(i)}function Do(t,e,n,r){var i="length"in r?r.length:20;return t.getPointAtLength(i)}function jo(t){return function(e,n,r,i){if(r instanceof Element){var o,a=this.paper.findView(r);if(a)if(a.isNodeConnection(r)){var s="fixedAt"in i?i.fixedAt:"50%";o=Io(a,s)}else o=a.getNodeBBox(r).center();else o=new Y;return t.call(this,e,n,o,i)}return t.apply(this,arguments)}}function Io(t,e){var n=parseFloat(e);return Re(e)?t.getPointAtRatio(n/100):t.getPointAtLength(n)}var Bo=jo((function(t,e,n,r){var i=1e6,o=t.getConnection(),a=t.getConnectionSubdivisions(),s=new ht(n.clone().offset(0,i),n.clone().offset(0,-i)),u=new ht(n.clone().offset(i,0),n.clone().offset(-i,0)),l=s.intersect(o,{segmentSubdivisions:a}),c=u.intersect(o,{segmentSubdivisions:a}),f=[];return l&&Array.prototype.push.apply(f,l),c&&Array.prototype.push.apply(f,c),f.length>0?n.chooseClosest(f):"fallbackAt"in r?Io(t,r.fallbackAt):zo(t,e,n,r)})),zo=jo((function(t,e,n,r){return t.getClosestPoint(n)||new Y}));function Vo(t,e,n){if(Ze(n)){var r=n,i=r.x,o=r.y;if(isFinite(o)){var a=new ht(e,t).parallel(o);e=a.start,t=a.end}n=i}if(!isFinite(n))return t;var s=t.distance(e);return 0===n&&s>0?t:t.move(e,-Math.min(n,s-1))}function $o(t){var e=t.getAttribute("stroke-width");return null===e?0:parseFloat(e)||0}function Uo(t,e,n,r){var i=e.getNodeBBox(n);r.stroke&&i.inflate($o(n)/2);var o=t.intersect(i);return Vo(o?t.start.chooseClosest(o):t.end,t.start,r.offset)}var qo=function(t,e,n,r){var i=r.offset,o=r.alignOffset,a=r.align;return a&&function(t,e){var n,r,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=t.start,u=t.end;switch(e){case"left":n="x",r=u,i=s,o=-1;break;case"right":n="x",r=s,i=u,o=1;break;case"top":n="y",r=u,i=s,o=-1;break;case"bottom":n="y",r=s,i=u,o=1;break;default:return}s[n]<u[n]?r[n]=i[n]:i[n]=r[n],isFinite(a)&&(r[n]+=o*a,i[n]+=o*a)}(t,a,o),Vo(t.end,t.start,i)},Ho=Uo,Go=function(t,e,n,r){var i=e.model.angle();if(0===i)return Uo(t,e,n,r);var o=e.getNodeUnrotatedBBox(n);r.stroke&&o.inflate($o(n)/2);var a=o.center(),s=t.clone().rotate(a,i),u=s.setLength(1e6).intersect(o);return Vo(u?s.start.chooseClosest(u).rotate(a,-i):t.end,t.start,r.offset)},Wo=function(t,e,n,r){var i,o,a=r.selector,s=t.end;if(i="string"==typeof a?e.findBySelector(a)[0]:Array.isArray(a)?Ae(n,a):function(t){if(!t)return null;var e=t;do{var n=e.tagName;if("string"!=typeof n)return null;if("G"===(n=n.toUpperCase()))e=e.firstElementChild;else{if("TITLE"!==n)break;e=e.nextElementSibling}}while(e);return e}(n),!ye.isSVGGraphicsElement(i)){if(i===n||!ye.isSVGGraphicsElement(n))return s;i=n}var u,l=e.getNodeShape(i),c=e.getNodeMatrix(i),f=e.getRootTranslateMatrix(),h=e.getRootRotateMatrix(),d=f.multiply(h).multiply(c),p=d.inverse(),g=ye.transformLine(t,p),v=g.start.clone(),m=e.getNodeData(i);if(!1===r.insideout&&(m.shapeBBox||(m.shapeBBox=l.bbox()),m.shapeBBox.containsPoint(v)))return s;if(l instanceof Et){var y=r.precision||2;m.segmentSubdivisons||(m.segmentSubdivisons=l.getSegmentSubdivisions({precision:y})),u={precision:y,segmentSubdivisions:m.segmentSubdivisons}}!0===r.extrapolate&&g.setLength(1e6),(o=g.intersect(l,u))?ye.isArray(o)&&(o=v.chooseClosest(o)):!0===r.sticky&&(o=l instanceof ut?l.pointNearestToPoint(v):l instanceof Z?l.intersectionWithLineFromCenterToPoint(v):l.closestPoint(v,u));var b=o?ye.transformPoint(o,d):s,w=r.offset||0;return r.stroke&&(w+=$o(i)/2),Vo(b,t.start,w)};function Yo(t){return function(e,n,r,i){var o=!!i.rotate,a=o?e.getNodeUnrotatedBBox(n):e.getNodeBBox(n),s=a[t](),u=i.dx;if(u){var l=Re(u);u=parseFloat(u),isFinite(u)&&(l&&(u/=100,u*=a.width),s.x+=u)}var c=i.dy;if(c){var f=Re(c);c=parseFloat(c),isFinite(c)&&(f&&(c/=100,c*=a.height),s.y+=c)}return o?s.rotate(e.model.getBBox().center(),-e.model.angle()):s}}var Xo=Yo("center"),Qo=Yo("topMiddle"),Ko=Yo("bottomMiddle"),Jo=Yo("leftMiddle"),Zo=Yo("rightMiddle"),ta=Yo("origin"),ea=Yo("topRight"),na=Yo("bottomLeft"),ra=Yo("corner"),ia=jo((function(t,e,n,r){var i=t.model.angle(),o=t.getNodeBBox(e),a=o.center(),s=o.origin(),u=o.corner(),l=r.padding;if(isFinite(l)||(l=0),s.y+l<=n.y&&n.y<=u.y-l){var c=n.y-a.y;a.x+=0===i||180===i?0:1*c/Math.tan(T(i)),a.y+=c}else if(s.x+l<=n.x&&n.x<=u.x-l){var f=n.x-a.x;a.y+=90===i||270===i?0:f*Math.tan(T(i)),a.x+=f}return a})),oa=jo((function(t,e,n,r){var i,o,a,s=!!r.rotate;s?(i=t.getNodeUnrotatedBBox(e),a=t.model.getBBox().center(),o=t.model.angle()):i=t.getNodeBBox(e);var u,l=r.padding;switch(isFinite(l)&&i.inflate(l),s&&n.rotate(a,o),i.sideNearestToPoint(n)){case"left":u=i.leftMiddle();break;case"right":u=i.rightMiddle();break;case"top":u=i.topMiddle();break;case"bottom":u=i.bottomMiddle()}return s?u.rotate(a,-o):u})),aa=function(t,e,n,r,i){return t.model.getPointFromConnectedLink(this.model,i).offset(r.dx,r.dy)},sa={NONE:"sorting-none",APPROX:"sorting-approximate",EXACT:"sorting-exact"},ua=9007199254740991,la=vi.Highlighting,ca=(s(t={},la.DEFAULT,{name:"stroke",options:{padding:3}}),s(t,la.MAGNET_AVAILABILITY,{name:"addClass",options:{className:"available-magnet"}}),s(t,la.ELEMENT_AVAILABILITY,{name:"addClass",options:{className:"available-cell"}}),t),fa=[{name:Co.BACK},{name:Co.CELLS},{name:Co.LABELS},{name:Co.FRONT},{name:Co.TOOLS}],ha=An.extend({className:"paper",options:{width:800,height:600,origin:{x:0,y:0},gridSize:1,drawGrid:!1,background:!1,perpendicularLinks:!1,elementView:yi,linkView:Po,snapLabels:!1,snapLinks:!1,labelsLayer:!1,multiLinks:!0,guard:function(t,e){return!1},highlighting:ca,preventContextMenu:!0,preventDefaultBlankAction:!0,restrictTranslate:!1,markAvailable:!1,defaultLink:new fr,defaultConnector:{name:"normal"},defaultRouter:{name:"normal"},defaultAnchor:{name:"center"},defaultLinkAnchor:{name:"connectionRatio"},defaultConnectionPoint:{name:"bbox"},connectionStrategy:null,validateMagnet:function(t,e,n){return"passive"!==e.getAttribute("magnet")},validateConnection:function(t,e,n,r,i,o){return("target"===i?n:t)instanceof yi},embeddingMode:!1,validateEmbedding:function(t,e){return!0},validateUnembedding:function(t){return!0},findParentBy:"bbox",frontParentOnly:!0,interactive:{labelMove:!1},linkPinning:!0,allowLink:null,clickThreshold:0,moveThreshold:0,magnetThreshold:0,sorting:sa.EXACT,frozen:!1,onViewUpdate:function(t,e,n,r,i){e&(t.FLAG_INSERT|t.FLAG_REMOVE)||r.mounting||r.isolate||i.requestConnectedLinksUpdate(t,n,r)},onViewPostponed:function(t,e,n){return n.forcePostponedViewUpdate(t,e)},beforeRender:null,afterRender:null,viewport:null,cellViewNamespace:null,routerNamespace:null,connectorNamespace:null,highlighterNamespace:f,anchorNamespace:g,linkAnchorNamespace:d,connectionPointNamespace:p},events:{dblclick:"pointerdblclick",contextmenu:"contextmenu",mousedown:"pointerdown",touchstart:"pointerdown",mouseover:"mouseover",mouseout:"mouseout",mouseenter:"mouseenter",mouseleave:"mouseleave",wheel:"mousewheel","mouseenter .joint-cell":"mouseenter","mouseleave .joint-cell":"mouseleave","mouseenter .joint-tools":"mouseenter","mouseleave .joint-tools":"mouseleave","mousedown .joint-cell [event]":"onevent","touchstart .joint-cell [event]":"onevent","mousedown .joint-cell [magnet]":"onmagnet","touchstart .joint-cell [magnet]":"onmagnet","dblclick .joint-cell [magnet]":"magnetpointerdblclick","contextmenu .joint-cell [magnet]":"magnetcontextmenu","mousedown .joint-link .label":"onlabel","touchstart .joint-link .label":"onlabel","dragstart .joint-cell image":"onImageDragStart"},documentEvents:{mousemove:"pointermove",touchmove:"pointermove",mouseup:"pointerup",touchend:"pointerup",touchcancel:"pointerup"},svg:null,viewport:null,defs:null,tools:null,$background:null,layers:null,$grid:null,$document:null,_viewportMatrix:null,_viewportTransformString:null,_updates:null,_layers:null,SORT_DELAYING_BATCHES:["add","to-front","to-back"],UPDATE_DELAYING_BATCHES:["translate"],MIN_SCALE:1e-6,init:function(){var t=this.options,e=this.el;t.cellViewNamespace||(t.cellViewNamespace="undefined"!=typeof joint&&sn(joint,"shapes")?joint.shapes:null);var n=this.model=t.model||new Wr;this._layers={},this.setGrid(t.drawGrid),this.cloneOptions(),this.render(),this._setDimensions(),this.startListening(),this._views={},this.$document=we(e.ownerDocument),this.resetViews(n.attributes.cells.models),!this.isFrozen()&&this.isAsync()&&this.updateViewsAsync()},_resetUpdates:function(){return this._updates={id:null,priorities:[{},{},{}],unmountedCids:[],mountedCids:[],unmounted:{},mounted:{},count:0,keyFrozen:!1,freezeKey:null,sort:!1}},startListening:function(){var t=this.model;this.listenTo(t,"add",this.onCellAdded).listenTo(t,"remove",this.onCellRemoved).listenTo(t,"change",this.onCellChange).listenTo(t,"reset",this.onGraphReset).listenTo(t,"sort",this.onGraphSort).listenTo(t,"batch:stop",this.onGraphBatchStop),this.on("cell:highlight",this.onCellHighlight).on("cell:unhighlight",this.onCellUnhighlight).on("scale translate",this.update)},onCellAdded:function(t,e,n){var r=n.position;this.isAsync()||!vn(r)?this.renderView(t,n):(n.maxPosition===r&&this.freeze({key:"addCells"}),this.renderView(t,n),0===r&&this.unfreeze({key:"addCells"}))},onCellRemoved:function(t,e,n){var r=this.findViewByModel(t);r&&this.requestViewUpdate(r,r.FLAG_REMOVE,r.UPDATE_PRIORITY,n)},onCellChange:function(t,e){if(t!==this.model.attributes.cells&&t.hasChanged("z")&&this.options.sorting===sa.APPROX){var n=this.findViewByModel(t);n&&this.requestViewUpdate(n,n.FLAG_INSERT,n.UPDATE_PRIORITY,e)}},onGraphReset:function(t,e){this.resetLayers(),this.resetViews(t.models,e)},onGraphSort:function(){this.model.hasActiveBatch(this.SORT_DELAYING_BATCHES)||this.sortViews()},onGraphBatchStop:function(t){if(!this.isFrozen()){var e=t&&t.batchName,n=this.model;if(!this.isAsync()){var r=this.UPDATE_DELAYING_BATCHES;r.includes(e)&&!n.hasActiveBatch(r)&&this.updateViews(t)}var i=this.SORT_DELAYING_BATCHES;i.includes(e)&&!n.hasActiveBatch(i)&&this.sortViews()}},cloneOptions:function(){var t=this.options,e=t.defaultConnector,n=t.defaultRouter,r=t.defaultConnectionPoint,i=t.defaultAnchor,o=t.defaultLinkAnchor,a=t.origin,s=t.highlighting,u=t.cellViewNamespace,l=t.interactive;!u&&"undefined"!=typeof joint&&sn(joint,"shapes")&&(t.cellViewNamespace=joint.shapes),Je(e)||(t.defaultConnector=Xe(e)),Je(n)||(t.defaultRouter=Xe(n)),Je(r)||(t.defaultConnectionPoint=Xe(r)),Je(i)||(t.defaultAnchor=Xe(i)),Je(o)||(t.defaultLinkAnchor=Xe(o)),Ze(l)&&(t.interactive=$e({},l)),Ze(s)&&(t.highlighting=qe({},s,ca)),t.origin=$e({},a)},children:function(){var t=ye.namespace;return[{namespaceURI:t.xhtml,tagName:"div",className:Se("paper-background"),selector:"background"},{namespaceURI:t.xhtml,tagName:"div",className:Se("paper-grid"),selector:"grid"},{namespaceURI:t.svg,tagName:"svg",attributes:{width:"100%",height:"100%","xmlns:xlink":t.xlink},selector:"svg",children:[{tagName:"defs",selector:"defs"},{tagName:"g",className:Se("layers"),selector:"layers"}]}]},hasLayerView:function(t){return t in this._layers},getLayerView:function(t){var e=this._layers;if(t in e)return e[t];throw new Error('dia.Paper: Unknown layer "'.concat(t,'"'))},getLayerNode:function(t){return this.getLayerView(t).el},render:function(){this.renderChildren();var t=this.childNodes,e=this.options,n=t.svg,r=t.defs,i=t.layers,o=t.background,a=t.grid;return this.svg=n,this.defs=r,this.layers=i,this.$background=we(o),this.$grid=we(a),this.renderLayers(),ye.ensureId(n),e.background&&this.drawBackground(e.background),e.drawGrid&&this.drawGrid(),this},renderLayers:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fa;this.removeLayers(),e.forEach((function(e){var n=e.name,r=(e.sorted,new To({name:n}));t.layers.appendChild(r.el),t._layers[n]=r}));var n=this.getLayerView(Co.CELLS),r=this.getLayerView(Co.TOOLS),i=this.getLayerView(Co.LABELS);this.tools=r.el,this.cells=this.viewport=n.el,n.vel.addClass(Se("viewport")),i.vel.addClass(Se("viewport"))},removeLayers:function(){var t=this._layers;Object.keys(t,(function(e){t[e].remove(),delete t[e]}))},resetLayers:function(){var t=this._layers;Object.keys(t,(function(e){t[e].removePivots()}))},update:function(){return this.options.drawGrid&&this.drawGrid(),this._background&&this.updateBackgroundImage(this._background),this},matrix:function(t){var e=this.layers;if(void 0===t){var n=e.getAttribute("transform");return(this._viewportTransformString||null)===n?t=this._viewportMatrix:(t=e.getCTM(),this._viewportMatrix=t,this._viewportTransformString=n),ye.createSVGMatrix(t)}t=ye.createSVGMatrix(t);var r=ye.matrixToTransformString(t);return e.setAttribute("transform",r),this._viewportMatrix=t,this._viewportTransformString=e.getAttribute("transform"),this},clientMatrix:function(){return ye.createSVGMatrix(this.cells.getScreenCTM())},requestConnectedLinksUpdate:function(t,e,n){if(t instanceof vi)for(var r=t.model,i=this.model.getConnectedLinks(r),o=0,a=i.length;o<a;o++){var s=i[o],u=this.findViewByModel(s);if(u){var l=["UPDATE"];s.getTargetCell()===r&&l.push("TARGET"),s.getSourceCell()===r&&l.push("SOURCE");var c=Math.max(e+1,u.UPDATE_PRIORITY);this.scheduleViewUpdate(u,u.getFlag(l),c,n)}}},forcePostponedViewUpdate:function(t,e){if(!(t&&t instanceof vi))return!1;var n=t.model;if(n.isElement())return!1;if(0==(e&t.getFlag(["SOURCE","TARGET"]))){var r=0,i=this.findViewByModel(n.getSourceCell());i&&!this.isViewMounted(i)&&(r=this.dumpView(i),t.updateEndMagnet("source"));var o=0,a=this.findViewByModel(n.getTargetCell());if(a&&!this.isViewMounted(a)&&(o=this.dumpView(a),t.updateEndMagnet("target")),0===r&&0===o)return!this.dumpView(t)}return!1},requestViewUpdate:function(t,e,n,r){r||(r={}),this.scheduleViewUpdate(t,e,n,r);var i=this.isAsync();if(!(this.isFrozen()||i&&!1!==r.async||this.model.hasActiveBatch(this.UPDATE_DELAYING_BATCHES))){var o=this.updateViews(r);i&&this.notifyAfterRender(o,r)}},scheduleViewUpdate:function(t,e,n,r){var i=this._updates,o=this.options,a=t.FLAG_REMOVE,s=t.FLAG_INSERT,u=t.UPDATE_PRIORITY,l=t.cid,c=i.priorities[n];if(c||(c=i.priorities[n]={}),n>u)for(var f=n-1;f>=u;f--){var h=i.priorities[f];h&&l in h&&(c[l]|=h[l],delete h[l])}var d=c[l]||0;if((d&e)!==e){d||i.count++,e&a&&d&s?c[l]^=s:e&s&&d&a&&(c[l]^=a),c[l]|=e;var p=o.onViewUpdate;"function"==typeof p&&p.call(this,t,e,n,r||{},this)}},dumpViewUpdate:function(t){if(!t)return 0;var e=this._updates,n=t.cid,r=e.priorities[t.UPDATE_PRIORITY],i=this.registerMountedView(t)|r[n];return delete r[n],i},dumpView:function(t,e){var n=this.dumpViewUpdate(t);return n?this.updateView(t,n,e):0},updateView:function(t,e,n){if(!t)return 0;var r=t.FLAG_REMOVE,i=t.FLAG_INSERT,o=t.model;if(t instanceof vi){if(e&r)return this.removeView(o),0;e&i&&(this.insertView(t),e^=i)}return e?t.confirmUpdate(e,n||{}):0},requireView:function(t,e){var n=this.findViewByModel(t);return n?(this.dumpView(n,e),n):null},registerUnmountedView:function(t){var e=t.cid,n=this._updates;if(e in n.unmounted)return 0;var r=n.unmounted[e]|=t.FLAG_INSERT;return n.unmountedCids.push(e),delete n.mounted[e],r},registerMountedView:function(t){var e=t.cid,n=this._updates;if(e in n.mounted)return 0;n.mounted[e]=!0,n.mountedCids.push(e);var r=n.unmounted[e]||0;return delete n.unmounted[e],r},isViewMounted:function(t){return!!t&&t.cid in this._updates.mounted},dumpViews:function(t){var e=Ue({},t,{viewport:null});this.checkViewport(e),this.updateViews(e)},updateViews:function(t){var e;this.notifyBeforeRender(t);var n=0,r=0,i=ua;do{r++,n+=(e=this.updateViewsBatch(t)).updated,i=Math.min(e.priority,i)}while(!e.empty);var o={updated:n,batches:r,priority:i};return this.notifyAfterRender(o,t),o},hasScheduledUpdates:function(){for(var t=this._updates.priorities,e=Object.keys(t),n=e.length;n>0&&n--;)for(var r in t[e[n]])return!0;return!1},updateViewsAsync:function(t,e){t||(t={}),e||(e={processed:0,priority:ua});var n=this._updates,r=n.id;if(r){Oe(r),0===e.processed&&this.hasScheduledUpdates()&&this.notifyBeforeRender(t);var i=this.updateViewsBatch(t),o=Ue({},t,{mountBatchSize:1e3-i.mounted,unmountBatchSize:1e3-i.unmounted}),a=this.checkViewport(o),s=a.unmounted,u=a.mounted,l=e.processed,c=n.count;i.updated>0&&(l+=i.updated+i.unmounted,i.processed=l,e.priority=Math.min(i.priority,e.priority),i.empty&&0===u?(i.unmounted+=s,i.mounted+=u,i.priority=e.priority,this.notifyAfterRender(i,t),e.processed=0,e.priority=ua,n.count=0):e.processed=l);var f=t.progress;if(c&&"function"==typeof f&&f.call(this,i.empty,l,c,i,this),n.id!==r)return}n.id=Me(this.updateViewsAsync,this,t,e)},notifyBeforeRender:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.beforeRender;"function"!=typeof e&&"function"!=typeof(e=this.options.beforeRender)||e.call(this,t,this)},notifyAfterRender:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.afterRender;"function"!=typeof n&&(n=this.options.afterRender),"function"==typeof n&&n.call(this,t,e,this),this.trigger("render:done",t,e)},updateViewsBatch:function(t){t||(t={});var e=t.batchSize||1/0,n=this._updates,r=0,i=0,o=0,a=0,s=ua,u=!0,l=this.options,c=n.priorities,f="viewport"in t?t.viewport:l.viewport;"function"!=typeof f&&(f=null);var h=l.onViewPostponed;"function"!=typeof h&&(h=null);var d=Object.keys(c);t:for(var p=0,g=d.length;p<g;p++){var v=+d[p],m=c[v];for(var y in m){if(r>=e){u=!1;break t}var b=En[y];if(b){var w=m[y];if(0==(w&b.FLAG_REMOVE)){var x=y in n.unmounted;if(b.DETACHABLE&&f&&!f.call(this,b,!x,this)){x||(this.registerUnmountedView(b),b.unmount()),n.unmounted[y]|=w,delete m[y],o++;continue}x&&(w|=b.FLAG_INSERT,a++),w|=this.registerMountedView(b)}var S=this.updateView(b,w,t);S>0&&(m[y]=S,!h||!h.call(this,b,S,this)||m[y])?(i++,u=!1):(s>v&&(s=v),r++,delete m[y])}else delete m[y]}}return{priority:s,updated:r,postponed:i,unmounted:o,mounted:a,empty:u}},getUnmountedViews:function(){for(var t=this._updates,e=Object.keys(t.unmounted),n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=En[e[i]];return r},getMountedViews:function(){for(var t=this._updates,e=Object.keys(t.mounted),n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=En[e[i]];return r},checkUnmountedViews:function(t,e){e||(e={});var n=0;"function"!=typeof t&&(t=null);for(var r=("mountBatchSize"in e?e.mountBatchSize:1/0),i=this._updates,o=i.unmountedCids,a=i.unmounted,s=0,u=Math.min(o.length,r);s<u;s++){var l=o[s];if(l in a){var c=En[l];if(c)if(c.DETACHABLE&&t&&!t.call(this,c,!1,this))o.push(l);else{n++;var f=this.registerMountedView(c);f&&this.scheduleViewUpdate(c,f,c.UPDATE_PRIORITY,{mounting:!0})}}}return o.splice(0,s),n},checkMountedViews:function(t,e){e||(e={});var n=0;if("function"!=typeof t)return n;for(var r=("unmountBatchSize"in e?e.unmountBatchSize:1/0),i=this._updates,o=i.mountedCids,a=i.mounted,s=0,u=Math.min(o.length,r);s<u;s++){var l=o[s];if(l in a){var c=En[l];c&&(c.DETACHABLE&&!t.call(this,c,!0,this)?(n++,this.registerUnmountedView(c)&&c.unmount()):o.push(l))}}return o.splice(0,s),n},checkViewport:function(t){var e=Ue({},t,{mountBatchSize:1/0,unmountBatchSize:1/0}),n="viewport"in e?e.viewport:this.options.viewport,r=this.checkMountedViews(n,e);if(r>0){var i=this._updates.unmountedCids;e.mountBatchSize=Math.min(i.length-r,e.mountBatchSize)}return{mounted:this.checkUnmountedViews(n,e),unmounted:r}},freeze:function(t){t||(t={});var e=this._updates,n=t.key,r=this.options.frozen,i=e.freezeKey;if(n&&n!==i){if(r&&i)return;e.freezeKey=n,e.keyFrozen=r}this.options.frozen=!0;var o=e.id;e.id=null,this.isAsync()&&o&&Oe(o)},unfreeze:function(t){t||(t={});var e=this._updates,n=t.key,r=e.freezeKey;n&&r&&n!==r||(e.freezeKey=null,n&&n===r&&e.keyFrozen||(this.isAsync()?(this.freeze(),this.updateViewsAsync(t)):this.updateViews(t),this.options.frozen=e.keyFrozen=!1,e.sort&&(this.sortViews(),e.sort=!1)))},isAsync:function(){return!!this.options.async},isFrozen:function(){return!!this.options.frozen},isExactSorting:function(){return this.options.sorting===sa.EXACT},onRemove:function(){this.freeze(),this.removeLayers(),this.removeViews()},getComputedSize:function(){var t=this.options,e=t.width,n=t.height;return vn(e)||(e=this.el.clientWidth),vn(n)||(n=this.el.clientHeight),{width:e,height:n}},setDimensions:function(t,e){var n=this.options,r=n.width,i=n.height,o=void 0===t?r:t,a=void 0===e?i:e;if(r!==o||i!==a){n.width=o,n.height=a,this._setDimensions();var s=this.getComputedSize();this.trigger("resize",s.width,s.height)}},_setDimensions:function(){var t=this.options,e=t.width,n=t.height;vn(e)&&(e=Math.round(e)),vn(n)&&(n=Math.round(n)),this.$el.css({width:null===e?"":e,height:null===n?"":n})},setOrigin:function(t,e){return this.translate(t||0,e||0)},fitToContent:function(t,e,n,r){r=gn(t)?t:$e({gridWidth:t,gridHeight:e,padding:n},r);var i=this.getFitToContentArea(r),o=i.x,a=i.y,s=i.width,u=i.height,l=this.scale(),c=l.sx,f=l.sy;return this.setOrigin(-o*c,-a*f),this.setDimensions(s*c,u*f),new ut(o,a,s,u)},getFitToContentArea:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.gridWidth||1,n=t.gridHeight||1,r=je(t.padding||0),i=Math.max(t.minWidth||0,e),o=Math.max(t.minHeight||0,n),a=t.maxWidth||Number.MAX_VALUE,s=t.maxHeight||Number.MAX_VALUE,u=t.allowNewOrigin,l="contentArea"in t?new ut(t.contentArea):this.getContentArea(t),c=this.scale(),f=c.sx,h=c.sy;l.x*=f,l.y*=h,l.width*=f,l.height*=h;var d=Math.ceil((l.width+l.x)/e),p=Math.ceil((l.height+l.y)/n);t.allowNegativeBottomRight||(d=Math.max(d,1),p=Math.max(p,1)),d*=e,p*=n;var g=0;("negative"===u&&l.x<0||"positive"===u&&l.x>=0||"any"===u)&&(g=Math.ceil(-l.x/e)*e,d+=g+=r.left);var v=0;return("negative"===u&&l.y<0||"positive"===u&&l.y>=0||"any"===u)&&(v=Math.ceil(-l.y/n)*n,p+=v+=r.top),d+=r.right,p+=r.bottom,d=Math.max(d,i),p=Math.max(p,o),d=Math.min(d,a),p=Math.min(p,s),new ut(-g/f,-v/h,d/f,p/h)},scaleContentToFit:function(t){var e,n;if(t||(t={}),"contentArea"in t){var r=t.contentArea;e=this.localToPaperRect(r),n=new Y(r)}else e=this.getContentBBox(t),n=this.paperToLocalPoint(e);if(e.width&&e.height){Ue(t,{padding:0,preserveAspectRatio:!0,scaleGrid:null,minScale:0,maxScale:Number.MAX_VALUE});var i,o=je(t.padding),a=t.minScaleX||t.minScale,s=t.maxScaleX||t.maxScale,u=t.minScaleY||t.minScale,l=t.maxScaleY||t.maxScale;if(t.fittingBBox)i=t.fittingBBox;else{var c=this.translate(),f=this.getComputedSize();i={x:c.tx,y:c.ty,width:f.width,height:f.height}}i=new ut(i).moveAndExpand({x:o.left,y:o.top,width:-o.left-o.right,height:-o.top-o.bottom});var h=this.scale(),d=i.width/e.width*h.sx,p=i.height/e.height*h.sy;if(t.preserveAspectRatio&&(d=p=Math.min(d,p)),t.scaleGrid){var g=t.scaleGrid;d=g*Math.floor(d/g),p=g*Math.floor(p/g)}d=Math.min(s,Math.max(a,d)),p=Math.min(l,Math.max(u,p));var v=this.options.origin,m=i.x-n.x*d-v.x,y=i.y-n.y*p-v.y;this.scale(d,p),this.translate(m,y)}},getContentArea:function(t){return t&&t.useModelGeometry?this.model.getBBox()||new ut:ye(this.cells).getBBox()},getContentBBox:function(t){return this.localToPaperRect(this.getContentArea(t))},getArea:function(){return this.paperToLocalRect(this.getComputedSize())},getRestrictedArea:function(){for(var t=this.options.restrictTranslate,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Je(t)?t.apply(this,n):!0===t?this.getArea():t?new ut(t):null},createViewForModel:function(t){var e,n,r=this.options,i=r.cellViewNamespace,o=t.get("type")+"View",a=Ae(i,o,".");return t.isLink()?(e=r.linkView,n=Po):(e=r.elementView,n=yi),new(e.prototype instanceof _n.View?a||e:e.call(this,t)||a||n)({model:t,interactive:r.interactive,labelsLayer:!0===r.labelsLayer?Co.LABELS:r.labelsLayer})},removeView:function(t){var e=t.id,n=this._views,r=this._updates,i=n[e];if(i){var o=i.cid,a=r.mounted,s=r.unmounted;i.remove(),delete n[e],delete a[o],delete s[o]}return i},renderView:function(t,e){var n,r,i=t.id,o=this._views,a=!0;return i in o&&((n=o[i]).model===t?(r=n.FLAG_INSERT,a=!1):this.removeView(t)),a&&((n=o[i]=this.createViewForModel(t)).paper=this,r=this.registerUnmountedView(n)|n.getFlag(un(n,"initFlag"))),this.requestViewUpdate(n,r,n.UPDATE_PRIORITY,e),n},onImageDragStart:function(){return!1},resetViews:function(t,e){e||(e={}),t||(t=[]),this._resetUpdates(),this.removeViews(),this.freeze({key:"reset"});for(var n=0,r=t.length;n<r;n++)this.renderView(t[n],e);this.unfreeze({key:"reset"}),this.sortViews()},removeViews:function(){He(this._views,"remove"),this._views={}},sortViews:function(){this.isExactSorting()&&(this.isFrozen()?this._updates.sort=!0:this.sortViewsExact())},sortViewsExact:function(){var t,e,n,r=we(this.cells).children("[model-id]"),i=this.model.get("cells");t=function(t,e){var n=i.get(t.getAttribute("model-id")),r=i.get(e.getAttribute("model-id")),o=n.attributes.z||0,a=r.attributes.z||0;return o===a?0:o<a?-1:1},e=we(r),n=e.map((function(){var t=this.parentNode,e=t.insertBefore(document.createTextNode(""),this.nextSibling);return function(){if(t===this)throw new Error("You can't sort elements if any one is a descendant of another.");t.insertBefore(this,e),t.removeChild(e)}})),Array.prototype.sort.call(e,t).each((function(t){n[t].call(this)}))},insertView:function(t){var e=this.getLayerView(Co.CELLS),n=t.el,r=t.model;switch(this.options.sorting){case sa.APPROX:e.insertSortedNode(n,r.get("z"));break;case sa.EXACT:default:e.insertNode(n)}t.onMount()},scale:function(t,e,n,r){if(void 0===t)return ye.matrixToScale(this.matrix());void 0===e&&(e=t),void 0===n&&(n=0,r=0);var i=this.translate();if(n||r||i.tx||i.ty){var o=i.tx-n*(t-1),a=i.ty-r*(e-1);this.translate(o,a)}t=Math.max(t||0,this.MIN_SCALE),e=Math.max(e||0,this.MIN_SCALE);var s=this.matrix();return s.a=t,s.d=e,this.matrix(s),this.trigger("scale",t,e,n,r),this},rotate:function(t,e,n){if(void 0===t)return ye.matrixToRotate(this.matrix());if(void 0===e){var r=this.cells.getBBox();e=r.width/2,n=r.height/2}var i=this.matrix().translate(e,n).rotate(t).translate(-e,-n);return this.matrix(i),this},translate:function(t,e){if(void 0===t)return ye.matrixToTranslate(this.matrix());var n=this.options,r=n.origin,i=n.drawGrid;t||(t=0),e||(e=0);var o=this.matrix();if(o.e===t&&o.f===e)return this;o.e=t,o.f=e,this.matrix(o);var a=this.translate(),s=a.tx,u=a.ty;return r.x=s,r.y=u,this.trigger("translate",s,u),i&&this.drawGrid(),this},findView:function(t){var e=mn(t)?this.cells.querySelector(t):t instanceof we?t[0]:t,n=this.findAttribute("model-id",e);if(n)return this._views[n]},findViewByModel:function(t){var e=mn(t)||vn(t)?t:t&&t.id;return this._views[e]},findViewsFromPoint:function(t){return t=new Y(t),this.model.getElements().map(this.findViewByModel,this).filter((function(e){return e&&e.vel.getBBox({target:this.cells}).containsPoint(t)}),this)},findViewsInArea:function(t,e){e=Ue(e||{},{strict:!1}),t=new ut(t);var n=this.model.getElements().map(this.findViewByModel,this),r=e.strict?"containsRect":"intersect";return n.filter((function(e){return e&&t[r](e.vel.getBBox({target:this.cells}))}),this)},removeTools:function(){return this.dispatchToolsEvent("remove"),this},hideTools:function(){return this.dispatchToolsEvent("hide"),this},showTools:function(){return this.dispatchToolsEvent("show"),this},dispatchToolsEvent:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];"string"==typeof t&&this.trigger.apply(this,["tools:event",t].concat(n))},getModelById:function(t){return this.model.getCell(t)},snapToGrid:function(t,e){return this.clientToLocalPoint(t,e).snapToGrid(this.options.gridSize)},localToPaperPoint:function(t,e){var n=new Y(t,e);return ye.transformPoint(n,this.matrix())},localToPaperRect:function(t,e,n,r){var i=new ut(t,e,n,r);return ye.transformRect(i,this.matrix())},paperToLocalPoint:function(t,e){var n=new Y(t,e);return ye.transformPoint(n,this.matrix().inverse())},paperToLocalRect:function(t,e,n,r){var i=new ut(t,e,n,r);return ye.transformRect(i,this.matrix().inverse())},localToClientPoint:function(t,e){var n=new Y(t,e);return ye.transformPoint(n,this.clientMatrix())},localToClientRect:function(t,e,n,r){var i=new ut(t,e,n,r);return ye.transformRect(i,this.clientMatrix())},clientToLocalPoint:function(t,e){var n=new Y(t,e);return ye.transformPoint(n,this.clientMatrix().inverse())},clientToLocalRect:function(t,e,n,r){var i=new ut(t,e,n,r);return ye.transformRect(i,this.clientMatrix().inverse())},localToPagePoint:function(t,e){return this.localToPaperPoint(t,e).offset(this.pageOffset())},localToPageRect:function(t,e,n,r){return this.localToPaperRect(t,e,n,r).offset(this.pageOffset())},pageToLocalPoint:function(t,e){var n=new Y(t,e).difference(this.pageOffset());return this.paperToLocalPoint(n)},pageToLocalRect:function(t,e,n,r){var i=this.pageOffset(),o=new ut(t,e,n,r);return o.x-=i.x,o.y-=i.y,this.paperToLocalRect(o)},clientOffset:function(){var t=this.svg.getBoundingClientRect();return new Y(t.left,t.top)},pageOffset:function(){return this.clientOffset().offset(window.scrollX,window.scrollY)},linkAllowed:function(t){if(!(t instanceof Po))throw new Error("Must provide a linkView.");var e=t.model,n=this.options,r=this.model,i=r.constructor.validations;return!(!n.multiLinks&&!i.multiLinks.call(this,r,e)||!n.linkPinning&&!i.linkPinning.call(this,r,e)||"function"==typeof n.allowLink&&!n.allowLink.call(this,t,this))},getDefaultLink:function(t,e){return Je(this.options.defaultLink)?this.options.defaultLink.call(this,t,e):this.options.defaultLink.clone()},resolveHighlighter:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.highlighter,n=t.type,r=this.options,i=r.highlighting,o=r.highlighterNamespace;if(void 0===e){if(!i)return!1;if(n&&!1===(e=i[n]))return!1;e||(e=i.default)}if(!e)return!1;mn(e)&&(e={name:e});var a=e.name,s=o[a];if(!s)throw new Error('Unknown highlighter ("'+a+'")');if("function"!=typeof s.highlight)throw new Error('Highlighter ("'+a+'") is missing required highlight() method');if("function"!=typeof s.unhighlight)throw new Error('Highlighter ("'+a+'") is missing required unhighlight() method');return{highlighter:s,options:e.options||{},name:a}},onCellHighlight:function(t,e,n){var r=this.resolveHighlighter(n);if(r){var i=r.highlighter,o=r.options;i.highlight(t,e,o)}},onCellUnhighlight:function(t,e,n){var r=this.resolveHighlighter(n);if(r){var i=r.highlighter,o=r.options;i.unhighlight(t,e,o)}},pointerdblclick:function(t){t.preventDefault(),t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e)){var n=this.snapToGrid(t.clientX,t.clientY);e?e.pointerdblclick(t,n.x,n.y):this.trigger("blank:pointerdblclick",t,n.x,n.y)}},pointerclick:function(t){if(this.eventData(t).mousemoved<=this.options.clickThreshold){t=Le(t);var e=this.findView(t.target);if(this.guard(t,e))return;var n=this.snapToGrid(t.clientX,t.clientY);e?e.pointerclick(t,n.x,n.y):this.trigger("blank:pointerclick",t,n.x,n.y)}},contextmenu:function(t){this.options.preventContextMenu&&t.preventDefault(),t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e)){var n=this.snapToGrid(t.clientX,t.clientY);e?e.contextmenu(t,n.x,n.y):this.trigger("blank:contextmenu",t,n.x,n.y)}},pointerdown:function(t){t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e)){var n=this.snapToGrid(t.clientX,t.clientY);e?(t.preventDefault(),e.pointerdown(t,n.x,n.y)):(this.options.preventDefaultBlankAction&&t.preventDefault(),this.trigger("blank:pointerdown",t,n.x,n.y)),this.delegateDragEvents(e,t.data)}},pointermove:function(t){var e=this.eventData(t);if(e.mousemoved||(e.mousemoved=0),!(++e.mousemoved<=this.options.moveThreshold)){t=Le(t);var n=this.snapToGrid(t.clientX,t.clientY),r=e.sourceView;r?r.pointermove(t,n.x,n.y):this.trigger("blank:pointermove",t,n.x,n.y),this.eventData(t,e)}},pointerup:function(t){this.undelegateDocumentEvents();var e=Le(t),n=this.snapToGrid(e.clientX,e.clientY),r=this.eventData(t).sourceView;r?r.pointerup(e,n.x,n.y):this.trigger("blank:pointerup",e,n.x,n.y),e.isPropagationStopped()||this.pointerclick(we.Event(t,{type:"click",data:t.data})),t.stopImmediatePropagation(),this.delegateEvents()},mouseover:function(t){t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e))if(e)e.mouseover(t);else{if(this.el===t.target)return;this.trigger("blank:mouseover",t)}},mouseout:function(t){t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e))if(e)e.mouseout(t);else{if(this.el===t.target)return;this.trigger("blank:mouseout",t)}},mouseenter:function(t){var e=t=Le(t),n=e.target,r=e.relatedTarget,i=e.currentTarget,o=this.findView(n);if(!this.guard(t,o)){var a=this.findView(r);if(o){if(a===o)return;if(o.mouseenter(t),this.el.contains(r))return}a||i===this.el&&this.trigger("paper:mouseenter",t)}},mouseleave:function(t){var e=t=Le(t),n=e.target,r=e.relatedTarget,i=e.currentTarget,o=this.findView(n);if(!this.guard(t,o)){var a=this.findView(r);if(o){if(a===o)return;if(o.mouseleave(t),this.el.contains(r))return}a||i===this.el&&this.trigger("paper:mouseleave",t)}},mousewheel:function(t){t=Le(t);var e=this.findView(t.target);if(!this.guard(t,e)){var n=t.originalEvent,r=this.snapToGrid(n.clientX,n.clientY),i=Math.max(-1,Math.min(1,n.wheelDelta));e?e.mousewheel(t,r.x,r.y,i):this.trigger("blank:mousewheel",t,r.x,r.y,i)}},onevent:function(t){var e=t.currentTarget,n=e.getAttribute("event");if(n){var r=this.findView(e);if(r){if(t=Le(t),this.guard(t,r))return;var i=this.snapToGrid(t.clientX,t.clientY);r.onevent(t,n,i.x,i.y)}}},magnetEvent:function(t,e){var n=t.currentTarget;if(n.getAttribute("magnet")){var r=this.findView(n);if(r){if(t=Le(t),this.guard(t,r))return;var i=this.snapToGrid(t.clientX,t.clientY);e.call(this,r,t,n,i.x,i.y)}}},onmagnet:function(t){this.magnetEvent(t,(function(t,e,n,r,i){t.onmagnet(e,r,i)}))},magnetpointerdblclick:function(t){this.magnetEvent(t,(function(t,e,n,r,i){t.magnetpointerdblclick(e,n,r,i)}))},magnetcontextmenu:function(t){this.options.preventContextMenu&&t.preventDefault(),this.magnetEvent(t,(function(t,e,n,r,i){t.magnetcontextmenu(e,n,r,i)}))},onlabel:function(t){var e=t.currentTarget,n=this.findView(e);if(n){if(t=Le(t),this.guard(t,n))return;var r=this.snapToGrid(t.clientX,t.clientY);n.onlabel(t,r.x,r.y)}},getPointerArgs:function(t){var e=Le(t),n=this.snapToGrid(e.clientX,e.clientY);return[e,n.x,n.y]},delegateDragEvents:function(t,e){e||(e={}),this.eventData({data:e},{sourceView:t||null,mousemoved:0}),this.delegateDocumentEvents(null,e),this.undelegateEvents()},guard:function(t,e){return"mousedown"===t.type&&2===t.button||!(!this.options.guard||!this.options.guard(t,e))||(t.data&&void 0!==t.data.guarded?t.data.guarded:!(e&&e.model&&e.model instanceof cr||this.svg===t.target||this.el===t.target||we.contains(this.svg,t.target)))},setGridSize:function(t){return this.options.gridSize=t,this.options.drawGrid&&this.drawGrid(),this},clearGrid:function(){return this.$grid&&this.$grid.css("backgroundImage","none"),this},_getGridRefs:function(){return this._gridCache||(this._gridCache={root:ye("svg",{width:"100%",height:"100%"},ye("defs")),patterns:{},add:function(t,e){ye(this.root.node.childNodes[0]).append(e),this.patterns[t]=e,this.root.append(ye("rect",{width:"100%",height:"100%",fill:"url(#"+t+")"}))},get:function(t){return this.patterns[t]},exist:function(t){return void 0!==this.patterns[t]}}),this._gridCache},setGrid:function(t){return this.clearGrid(),this._gridCache=null,this._gridSettings=[],(Array.isArray(t)?t:[t||{}]).forEach((function(t){this._gridSettings.push.apply(this._gridSettings,this._resolveDrawGridOption(t))}),this),this},_resolveDrawGridOption:function(t){var e=this.constructor.gridPatterns;if(mn(t)&&Array.isArray(e[t]))return e[t].map((function(t){return $e({},t)}));var n=t||{args:[{}]},r=Array.isArray(n),i=n.name;if(r||i||n.markup||(i="dot"),i&&Array.isArray(e[i])){var o=e[i].map((function(t){return $e({},t)})),a=Array.isArray(n.args)?n.args:[n.args||{}];Ue(a[0],ln(t,"args"));for(var s=0;s<a.length;s++)o[s]&&$e(o[s],a[s]);return o}return r?n:[n]},drawGrid:function(t){var e=this.options.gridSize;if(e<=1)return this.clearGrid();var n=Array.isArray(t)?t:[t],r=this.matrix(),i=this._getGridRefs();this._gridSettings.forEach((function(t,o){var a="pattern_"+o,s=pn(t,n[o],{sx:r.a||1,sy:r.d||1,ox:r.e||0,oy:r.f||0});s.width=e*(r.a||1)*(s.scaleFactor||1),s.height=e*(r.d||1)*(s.scaleFactor||1),i.exist(a)||i.add(a,ye("pattern",{id:a,patternUnits:"userSpaceOnUse"},ye(s.markup)));var u=i.get(a);Je(s.update)&&s.update(u.node.childNodes[0],s);var l=s.ox%s.width;l<0&&(l+=s.width);var c=s.oy%s.height;c<0&&(c+=s.height),u.attr({x:l,y:c,width:s.width,height:s.height})}));var o=(new XMLSerializer).serializeToString(i.root.node);return o="url(data:image/svg+xml;base64,"+btoa(o)+")",this.$grid.css("backgroundImage",o),this},updateBackgroundImage:function(t){var e=(t=t||{}).position||"center",n=t.size||"auto auto",r=this.scale(),i=this.translate();gn(e)&&(e=i.tx+r.sx*(e.x||0)+"px "+(i.ty+r.sy*(e.y||0))+"px"),gn(n)&&(n=(n=new ut(n).scale(r.sx,r.sy)).width+"px "+n.height+"px"),this.$background.css({backgroundSize:n,backgroundPosition:e})},drawBackgroundImage:function(t,e){if(t instanceof HTMLImageElement){if(this._background&&this._background.id===e.id){var n,r=(e=e||{}).size,i=e.repeat||"no-repeat",o=e.opacity||1,a=Math.abs(e.quality)||1,s=this.constructor.backgroundPatterns[hn(i)];if(Je(s)){t.width*=a,t.height*=a;var u=s(t,e);if(!(u instanceof HTMLCanvasElement))throw new Error("dia.Paper: background pattern must return an HTML Canvas instance");n=u.toDataURL("image/png"),i="repeat",gn(r)?(r.width*=u.width/t.width,r.height*=u.height/t.height):void 0===r&&(e.size={width:u.width/a,height:u.height/a})}else n=t.src,void 0===r&&(e.size={width:t.width,height:t.height});this.$background.css({opacity:o,backgroundRepeat:i,backgroundImage:"url("+n+")"}),this.updateBackgroundImage(e)}}else this.$background.css("backgroundImage","")},updateBackgroundColor:function(t){this.$el.css("backgroundColor",t||"")},drawBackground:function(t){if(t=t||{},this.updateBackgroundColor(t.color),t.image){t=this._background=Xe(t),Ne(t);var e=document.createElement("img");e.onload=this.drawBackgroundImage.bind(this,e,t),e.src=t.image}else this.drawBackgroundImage(null),this._background=null;return this},setInteractivity:function(t){this.options.interactive=t,He(this._views,"setInteractivity",t)},isDefined:function(t){return!!this.svg.getElementById(t)},defineFilter:function(t){if(!gn(t))throw new TypeError("dia.Paper: defineFilter() requires 1. argument to be an object.");var e=t.id,n=t.name;if(e||(e=n+this.svg.id+Ee(JSON.stringify(t))),!this.isDefined(e)){var r=ze,i=r[n]&&r[n](t.args||{});if(!i)throw new Error("Non-existing filter "+n);var o=$e({filterUnits:"objectBoundingBox",x:-1,y:-1,width:3,height:3},t.attrs,{id:e});ye(i,o).appendTo(this.defs)}return e},defineGradient:function(t){if(!gn(t))throw new TypeError("dia.Paper: defineGradient() requires 1. argument to be an object.");var e=this.svg,n=this.defs,r=t.type,i=t.id,o=void 0===i?r+e.id+Ee(JSON.stringify(t)):i,a=t.stops,s=t.attrs,u=void 0===s?{}:s;if(this.isDefined(o))return o;var l=tn(a).map((function(t){var e=t.offset,n=t.color,r=t.opacity;return ye("stop").attr({offset:e,"stop-color":n,"stop-opacity":Number.isFinite(r)?r:1})})),c=ye(r,u,l);return c.id=o,c.appendTo(n),o},definePattern:function(t){if(!gn(t))throw new TypeError("dia.Paper: definePattern() requires 1. argument to be an object.");var e=this.svg,n=this.defs,r=t.id,i=void 0===r?e.id+Ee(JSON.stringify(t)):r,o=t.markup,a=t.attrs,s=void 0===a?{}:a;if(!o)throw new TypeError("dia.Paper: definePattern() requires markup.");if(this.isDefined(i))return i;var u=ye("pattern",{patternUnits:"userSpaceOnUse"});if(u.id=i,u.attr(s),"string"==typeof o)u.append(ye(o));else{var l=_e(o).fragment;u.append(l)}return u.appendTo(n),i},defineMarker:function(t){if(!gn(t))throw new TypeError("dia.Paper: defineMarker() requires 1. argument to be an object.");var e=this.svg,n=this.defs,r=t.id,i=void 0===r?e.id+Ee(JSON.stringify(t)):r,o=t.markup,a=t.attrs,s=void 0===a?{}:a,u=t.markerUnits,l=void 0===u?"userSpaceOnUse":u;if(this.isDefined(i))return i;var c=ye("marker",{orient:"auto",overflow:"visible",markerUnits:l});if(c.id=i,c.attr(s),o)if("string"==typeof o)c.append(ye(o));else{var f=_e(o).fragment;c.append(f)}else{var h=t.type,d=ye(void 0===h?"path":h,ln(t,"type","id","markup","attrs","markerUnits"));c.append(d)}return c.appendTo(n),i}},{sorting:sa,Layers:Co,backgroundPatterns:{flipXy:function(t){var e=document.createElement("canvas"),n=t.width,r=t.height;e.width=2*n,e.height=2*r;var i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.setTransform(-1,0,0,-1,e.width,e.height),i.drawImage(t,0,0,n,r),i.setTransform(-1,0,0,1,e.width,0),i.drawImage(t,0,0,n,r),i.setTransform(1,0,0,-1,0,e.height),i.drawImage(t,0,0,n,r),e},flipX:function(t){var e=document.createElement("canvas"),n=t.width,r=t.height;e.width=2*n,e.height=r;var i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.translate(2*n,0),i.scale(-1,1),i.drawImage(t,0,0,n,r),e},flipY:function(t){var e=document.createElement("canvas"),n=t.width,r=t.height;e.width=n,e.height=2*r;var i=e.getContext("2d");return i.drawImage(t,0,0,n,r),i.translate(0,2*r),i.scale(1,-1),i.drawImage(t,0,0,n,r),e},watermark:function(t,e){e=e||{};var n=t.width,r=t.height,i=document.createElement("canvas");i.width=3*n,i.height=3*r;for(var o=i.getContext("2d"),a=vn(e.watermarkAngle)?-e.watermarkAngle:-20,s=T(a),u=i.width/4,l=i.height/4,c=0;c<4;c++)for(var f=0;f<4;f++)(c+f)%2>0&&(o.setTransform(1,0,0,1,(2*c-1)*u,(2*f-1)*l),o.rotate(s),o.drawImage(t,-n/2,-r/2,n,r));return i}},gridPatterns:{dot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(t,e){ye(t).attr({width:e.thickness*e.sx,height:e.thickness*e.sy,fill:e.color})}}],fixedDot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(t,e){var n=e.sx<=1?e.thickness*e.sx:e.thickness;ye(t).attr({width:n,height:n,fill:e.color})}}],mesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(t,e){var n,r=e.width,i=e.height,o=e.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",ye(t).attr({d:n,stroke:e.color,"stroke-width":e.thickness})}}],doubleMesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(t,e){var n,r=e.width,i=e.height,o=e.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",ye(t).attr({d:n,stroke:e.color,"stroke-width":e.thickness})}},{color:"#000000",thickness:3,scaleFactor:4,markup:"path",update:function(t,e){var n,r=e.width,i=e.height,o=e.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",ye(t).attr({d:n,stroke:e.color,"stroke-width":e.thickness})}}]}}),da=An.extend({tagName:"g",className:"tools",svgElement:!0,tools:null,isRendered:!1,options:{tools:null,relatedView:null,name:null},configure:function(t){var e=(t=$e(this.options,t)).tools;if(!Array.isArray(e))return this;var n=t.relatedView;if(!(n instanceof vi))return this;for(var r=this.tools=[],i=0,o=e.length;i<o;i++){var a=e[i];a instanceof Pn&&(a.configure(n,this),this.vel.append(a.el),r.push(a))}return this.isRendered=!1,n.requestUpdate(n.getFlag("TOOLS")),this},getName:function(){return this.options.name},update:function(t){t||(t={});var e=this.tools;if(!e)return this;for(var n=this.isRendered,r=0,i=e.length;r<i;r++){var o=e[r];n?t.tool!==o.cid&&o.isVisible()&&o.update():o.render()}return n||(this.mount(),this.blurTool(),this.isRendered=!0),this},focusTool:function(t){var e=this.tools;if(!e)return this;for(var n=0,r=e.length;n<r;n++){var i=e[n];t===i?i.show():i.hide()}return this},blurTool:function(t){var e=this.tools;if(!e)return this;for(var n=0,r=e.length;n<r;n++){var i=e[n];i===t||i.isVisible()||(i.show(),i.update())}return this},hide:function(){return this.focusTool(null)},show:function(){return this.blurTool(null)},onRemove:function(){var t=this.tools;if(!t)return this;for(var e=0,n=t.length;e<n;e++)t[e].remove();this.tools=null},mount:function(){var t=this.options,e=this.el,n=t.relatedView,r=t.layer,i=void 0===r?Co.TOOLS:r,o=t.z;return n&&(i?n.paper.getLayerView(i).insertSortedNode(e,o):n.el.appendChild(e)),this}}),pa=b(4179),ga=b.n(pa),va=b(4459),ma=b.n(va),ya=b(1723),ba=b(8718),wa=b.n(ba);b(9876);var xa=function(t,e){var n=e.width,r=e.lineHeight,i=De(t,{width:n},{wordWrap:"break-word"}),o=i.split("\n").length;return{brokenText:i,textHeight:(o-1)*r}},Sa=function(t,e){return null!=e&&e.includes(t)?.3:1},ka=function(t,e){switch(t){case"N":return{bodyColor:"rgba(78, 175, 82, 0.1)",strokeColor:x().$greenCheck,label:"green",opacity:Sa("added",e)};case"E":return{bodyColor:"rgba(43, 87, 151, 0.1)",strokeColor:x().$colorDocument,label:"blue",opacity:Sa("changed",e)};case"D":return{bodyColor:"rgba(202, 62, 55, 0.1)",strokeColor:x().$colorVideo,label:"red",opacity:Sa("removed",e)};default:return{bodyColor:x().$white,strokeColor:"#757575",label:"grey",opacity:Sa("no changes",e)}}},_a="Step#1",Ea={},Aa=qr.define("qad.Question",{ports:{groups:{outWithLink:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$lightGrey,r:10}}},outWithoutLink:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$popularGrey,r:10}}},red:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$colorVideo,r:10}}},green:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$greenCheck,r:10}}},blue:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ya.colors.$colorDocument,r:10}}},grey:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:"#757575",r:10}}}}},attrs:{".body":{magnet:"passive",refWidth:"100%",refHeight:"100%",rx:5,stroke:ya.colors.$dark,fill:"white",cursor:"pointer"},text:{fontSize:14,lineHeight:20,fontFamily:"Open Sans, Arial, sans-serif",fill:ya.colors.$dark,fontWeight:700,cursor:"default"},".question-text":{xAlignment:"start",refX:50,refY:20},".edit-button":{fill:ya.colors.$paleBlue,event:"step:edit",width:20,height:20,refX:"100%",refX2:-5,refY:5,xAlignment:"right",cursor:"pointer",title:"Click to edit"},".option-rect":{rx:3,ry:3,stroke:"none",fill:"none",height:30,refWidth:"100%"},".option-order-number":{fill:ya.colors.$paleBlue,xAlignment:"middle",refX:32,yAlignment:"middle",refY:15},".option-order-box":{fill:ya.colors.$bgColor,width:24,height:24,xAlignment:20,yAlignment:"middle",refY:15,rx:5},".option-text":{fontSize:14,lineHeight:20,fill:ya.colors.$paleBlue,refX:50,yAlignment:-10},".question-icon":{x:20,y:18}}},{markup:'<rect class="body"/><text class="question-text"/><g class="edit-button"><path fill-opacity="0" d="M0 0h15v15H0z"/><path d="M0 11.873l9.22-9.22 3.126 3.124-9.221 9.22H0v-3.124zM14.754 2.19a.835.835 0 0 1 0 1.179L13.23 4.894l-3.125-3.125L11.63.244a.835.835 0 0 1 1.18 0l1.945 1.946z"/></g><g class="options" />',optionMarkup:'<g class="option"><rect class="option-rect"/><rect class="option-order-box" /><text class="option-order-number"/><text class="option-text"/></g>',questionMarkup:'<svg class="question-icon" width="14px" height="14px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Page-1" stroke="none" stroke-width="1" fill-rule="evenodd">\n <g id="question" fill-rule="nonzero">\n <path d="M25,0 C11.215,0 0,11.215 0,25 C0,38.785 11.215,50 25,50 C38.785,50 50,38.785 50,25 C50,11.215 38.785,0 25,0 Z M25,45.455\n C13.721,45.455 4.545,36.279 4.545,25 C4.545,13.722 13.721,4.545 25,4.545 C36.279,4.545 45.455,13.722 45.455,25 C45.455,36.279 36.279,45.455 25,45.455 Z"/>\n <path d="M26.975,35.296 C27.041,34.44 26.795,33.716 26.235,33.123 C25.675,32.531 24.967,32.235 24.111,32.235 C23.321,32.235 22.63,32.498\n 22.037,33.025 C21.444,33.551 21.148,34.243 21.148,35.099 C21.148,35.955 21.412,36.663 21.938,37.222 C22.465,37.782 23.123,38.062 23.914,38.062\n C24.77,38.062 25.494,37.815 26.086,37.321 C26.679,36.827 26.976,36.152 26.976,35.296 L26.975,35.296 Z M31.815,22.654 C32.605,21.535 33,20.35\n 33,19.1 C33,16.927 32.177,15.215 30.53,13.964 C28.95,12.779 26.91,12.186 24.407,12.186 C22.564,12.186 21.017,12.614 19.765,13.47 C17.922,14.72\n 17,16.96 17,20.185 L21.84,20.185 C21.84,18.802 21.971,17.914 22.235,17.519 C22.827,16.531 23.683,16.037 24.802,16.037 C25.922,16.037 26.745,16.399\n 27.272,17.123 C27.798,17.848 28.062,18.605 28.062,19.395 C28.062,19.922 27.798,20.58 27.272,21.37 C27.14,21.634 26.811,21.963 26.284,22.358\n C24.572,23.346 23.42,24.333 22.827,25.321 C22.3,26.177 21.971,27.527 21.84,29.371 C21.84,29.634 21.971,29.765 22.235,29.765 L26.086,29.765\n C26.416,29.765 26.58,29.634 26.58,29.37 C26.58,28.646 26.646,28.02 26.778,27.494 C26.975,26.901 27.37,26.342 27.963,25.814 L29.346,24.926\n C30.596,24.004 31.42,23.246 31.815,22.654 Z"/>\n </g>\n </g>\n</svg>',solutionMarkup:'<svg class="question-icon" viewBox="0 0 14 14" width="14" height="14" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 0c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.14-7-7 3.14-7 7-7zm0 1.273A5.734 5.734 0 0 0 1.273 7 5.734 5.734 0 0 0 7 12.727 5.734 5.734 0 0 0 12.727 7 5.734 5.734 0 0 0 7 1.273zm2.748 3.111a.61.61 0 1 1 .862.863L6.244 9.613a.61.61 0 0 1-.863 0L3.387 7.62a.61.61 0 1 1 .863-.862l1.563 1.562z" fill-rule="evenodd"/>\n</svg>',linkMarkup:'<svg class="question-icon" width="14px" height="14px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" xml:space="preserve">\n <g id="Symbols">\n <g id="menu_x2F_open_x5F_link" transform="translate(-21.000000, -12.000000)">\n <path id="Link-Icon" d="M29.4,13.1c0.7-0.7,1.6-1.1,2.7-1.1c1,0,1.9,0.4,2.7,1.1l1.1,1.1c0.7,0.7,1.1,1.6,1.1,2.7\n s-0.4,1.9-1.1,2.7l-3.6,3.6c-1.1,1.1-2.5,1.4-3.9,0.8c-0.5-0.2-1-0.5-1.3-0.8L25.9,22l1.6-1.6l1.1,1.1c0.3,0.3,0.7,0.5,1.1,0.5\n s0.8-0.2,1.1-0.5l3.6-3.6c0.3-0.3,0.5-0.7,0.5-1.1s-0.2-0.8-0.5-1.1l-1.1-1.1c-0.3-0.3-0.7-0.5-1.1-0.5c-0.4,0-0.8,0.2-1.1,0.5\n l-0.5,0.5c-0.4-0.2-0.8-0.4-1.2-0.5s-0.8-0.1-1.1-0.1H28L29.4,13.1z M29.8,15.9c0.5,0.2,0.9,0.5,1.3,0.9l1.1,1.1l-1.6,1.6\n l-1.1-1.1c-0.3-0.3-0.7-0.5-1.1-0.5s-0.8,0.2-1.1,0.5L23.7,22c-0.3,0.3-0.5,0.7-0.5,1.1s0.2,0.8,0.5,1.1l1.1,1.1\n c0.3,0.3,0.7,0.5,1.1,0.5s0.8-0.2,1.1-0.5l0.5-0.5c0.4,0.2,0.8,0.4,1.2,0.5s0.8,0.1,1.1,0.1h0.4l-1.6,1.6C27.9,27.6,27,28,25.9,28\n c-1.1,0-1.9-0.4-2.7-1.1l-1.1-1.1c-0.7-0.7-1.1-1.6-1.1-2.7c0-1.1,0.4-1.9,1.1-2.7l3.6-3.6c0.5-0.5,1.2-0.9,1.9-1\n C28.5,15.5,29.1,15.6,29.8,15.9z"/>\n </g>\n </g>\n</svg>',initialStepMarkup:function(t){return'<svg class="first-step-icon" height="22px" width="22px" xmlns="http://www.w3.org/2000/svg" >\n <circle class="first-step-icon__part" r="12" fill="#606d87" />\n <g id="Symbols">\n <svg viewBox="11 13 28 28">\n <path title="aaffaa" class="first-step-icon__part" d="m12.36 6 .4 2H18v6h-3.36l-.4-2H7V6h5.36M14 4H5v17h2v-7h5.6l.4 2h7V6h-5.6L14 4z" fill="#fff"/>\n </svg>\n </g>\n <title class="first-step-icon__text">'.concat(t,"</title>\n</svg>")},labelMarkup:'<g><rect class="label" /><text class="label-text" /></g>',initialize:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];qr.prototype.initialize.apply(this,e);var r=this.get("question")||"",i=this.get("url"),o=this.get("id"),a=this.get("isSolution"),s=this.get("isLink"),u=this.get("interactive"),l=this.get("color"),c=this.get("position"),f=this.get("boxColors"),h=this.get("isReadOnly"),d=this.get("isCompare"),p=this.get("labelText"),g=xa(r,{width:230,lineHeight:20}),v=g.brokenText,m=g.textHeight,y=this.get("bodyTitle")||"Double click to edit";wa()(i)&&s&&this.attr(".body",{fill:ya.colors.$red,opacity:.1}),(o===_a||a)&&this.attr(".body",{stroke:ya.colors.$catchyBlue,strokeWidth:2}),(a||s)&&(this.attr(".question-text",{refX:55,refY:25}),this.attr(".question-icon",{x:25,y:23})),l&&(this.attr(".body",{stroke:l,strokeWidth:2}),this.attr(".question-icon",{fill:l})),this.attr(".first-step-icon__part",{cursor:"pointer"}),f.bodyColor&&d&&(this.attr(".body",{stroke:f.strokeColor,strokeWidth:2,fill:f.bodyColor,opacity:f.opacity}),this.attr(".label-text",{text:p,y:-8,x:5,fill:"#fff"}),this.attr(".label",{fill:f.strokeColor,width:8.4*p.length+10,height:20,opacity:f.opacity,y:-22,rx:3}),this.attr(".question-icon",{fill:f.strokeColor,opacity:f.opacity}),this.attr(".question-text",{opacity:f.opacity}),this.attr(".options",{opacity:f.opacity})),c&&this.moveBox(c),this.attr(".body",{title:u||h?y:"",cursor:u||h?"pointer":"default"}),this.attr({".question-text":{text:v,title:r}}),this.attr(".options/refY",45+m),this.adjustSize(m),this.renderOptions(m)},renderOptions:function(t){var e=0,n=0,r={};this.get("options").forEach(function(i,o){var a=".option-".concat(i.id),s=i.text||"",u=xa(s,{width:200,lineHeight:20}),l=u.brokenText,c=u.textHeight;r[a]={transform:"translate(0, ".concat(e,")")},r["".concat(a," .option-order-number")]={text:o+1},r["".concat(a," .option-text")]={text:l,title:i.text,refY:15},e+=30+c;var f=45+t+20;this.addPort({group:i.group,id:i.id,args:{y:f+n-5,x:280},attrs:{circle:{opacity:i.opacity}}}),n+=c+30}.bind(this)),this.attr(r)},adjustSize:function(t){var e=this.get("isLink"),n=this.get("isSolution"),r=this.get("options")||[],i=0;r.forEach((function(t){var e=t.text||"",n=xa(e,{width:200,lineHeight:20}).textHeight;i+=n}));var o=30*r.length+(e||n?35:45)+(e||n?25:20)+t+i;this.resize(300,o)},moveBox:function(t){this.position(t.x,t.y)}}),Pa=yi.extend({renderMarkup:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];yi.prototype.renderMarkup.apply(this,e),this.renderOptions(),this.renderIcons(),this.renderLabels()},renderOptions:function(){this.model.get("options").forEach(function(t){var e="option-".concat(t.id),n=ye(this.model.optionMarkup).addClass(e);n.attr("option-id",t.id),this.$(".options").append(n.node)}.bind(this))},renderIcons:function(){var t=this.model.get("isLink"),e=this.model.get("isSolution"),n="Step#1"===this.model.get("id"),r=this.model.get("highlightFirstStep"),i=this.model.get("firstStepTitle");t?this.$(".body").parent().append(ye(this.model.linkMarkup).node):e?this.$(".body").parent().append(ye(this.model.solutionMarkup).node):this.$(".body").parent().append(ye(this.model.questionMarkup).node),r&&n&&this.$(".body").parent().append(ye(this.model.initialStepMarkup(i)).node)},renderLabels:function(){this.$(".body").parent().append(ye(this.model.labelMarkup).node)}});Object.assign(Ea,{qad:{Question:Aa,QuestionView:Pa},standard:o});var Ca=b(5082),Ta=b.n(Ca),Na=b(6414),La=b.n(Na),Ma=b(2566),Oa=b.n(Ma),Ra=b(6985),Fa=b.n(Ra),Da=b(5935),ja=b.n(Da),Ia=function(){},Ba=b(6062),za=b.n(Ba),Va=b(2780);za()(Va.Z,{insert:"head",singleton:!1}),Va.Z.locals;var $a=function(t){var e=t.tree,n=(0,v.useRef)(),r=(0,v.useRef)(),i=(0,v.useRef)(e);return(0,v.useEffect)((function(){n.current&&(r.current=function(t){var e=t.el,n=t.selectedLink,r=t.asyncRender,i=void 0!==r&&r,o=t.onLinkConnect,a=void 0===o?Ia:o,s=t.onLinkDisconnect,u=void 0===s?Ia:s,l=t.onStepEdit,c=void 0===l?Ia:l,f=t.onPaperClick,h=void 0===f?Ia:f,d=t.onCellMousedDown,p=void 0===d?Ia:d,g=t.onCellMousedUp,v=void 0===g?Ia:g,m=t.interactive,y=t.isReadOnly,b=void 0!==y&&y,w=t.isStatic,S=void 0!==w&&w,k=t.isCompare,_=void 0!==k&&k,E=t.uncheckedChanges,A=t.labelsText,P=void 0===A?{addedLabel:"Added",removedLabel:"Removed",changedLabel:"Changed",noChangesLabel:"No changes"}:A,C=t.onPan,T=void 0===C?Ia:C,N=t.highlightFirstStep,L=void 0!==N&&N,M=t.firstStepTitle,O=new Wr({},{cellNamespace:Ea}),R=new ha({el:e,interactive:m,async:i,model:O,height:"auto",width:"100%",linkPinning:!1,multiLinks:!1,clickThreshold:1,cellViewNamespace:Ea,defaultRouter:{name:"manhattan",args:{side:"right",step:10,maximumLoops:5e3,paddingBox:{top:0,left:0,right:0,bottom:0},padding:{top:10,left:20,right:10,bottom:20},startDirections:["right"],endDirections:["top","bottom","left"],excludeTypes:["qad.Question"]}},defaultConnector:{name:"rounded",args:{radius:20}},defaultLink:new ci({attrs:{line:{stroke:x().$lightGrey,strokeWidth:2,targetMarker:{d:"M 13 -7.5 0 0 13 7.5"}}}}),validateConnection:function(t,e,n){return t!==n&&!n.model.isLink()}});function F(){O.getLinks().forEach((function(t){t.toFront()}))}function D(t){var e=x().$lightGrey,n=x().$dark,r=t.model.attr("line/stroke")===n;t.model.attr("line/stroke",r?e:n),t.model.attr("line/stroke-width",r?2:4),t.sourceMagnet.setAttribute("fill",r?e:n),t.targetView.model.attr(".body/stroke",r?t.targetView.model.attributes.color||e:n)}function j(){n&&(n=null)}return S||function(){function t(t,e){e.stopPropagation();var n=t.model.id;c(n.toString())}R.on("blank:pointerclick",h),m&&(R.on("link:connect",(function(t){var e=t.model,n=e.source(),r=e.target();t.sourceMagnet.setAttribute("fill",x().$lightGrey),a({source:n,target:r})})),R.on("link:disconnect",(function(t){var e=t.model.source();t.sourceMagnet.setAttribute("fill",x().$popularGrey),u({source:e})})),R.on("cell:pointermove",(function(t){t.model.toFront()})),R.on("cell:pointerdown",(function(t){p(t,O)})),R.on("cell:pointerup",(function(t,e,n,r){v(t,O,e,n,r)})),R.on("link:mouseenter",(function(t){!function(t){var e=new Rn({distance:30,action:function(t){this.model.remove({ui:!0}),this.sourceView&&this.notify("link:disconnect",t,this.sourceView,this.sourceMagnet,"source")}}),n=new da({tools:[e]});t.addTools(n)}(t),t.model.toFront()})),R.on("link:mouseleave",(function(t){t.removeTools(),n&&n.model.toFront()})),R.on("link:pointerclick",(function(t){var e;if(!Ta()(n)){if(n&&D(n),(null===(e=n)||void 0===e?void 0:e.model.id)!==t.model.id)return D(t),void(n=t);j()}})),R.on("link:pointerdblclick",(function(t){T(t)}))),R.on("cell:pointerdblclick",t),R.on("cell:pointerclick",t)}(),Object.freeze({scaleContentToFit:function(){R.scaleContentToFit({padding:30})},autoLayoutNodes:function(){Yr.layout(O,{setLinkVertices:!1,dagre:ga(),graphlib:ma(),nodeSep:0,edgeSep:0,rankSep:0,marginX:0,rankDir:"LR",ranker:"network-simplex"})},nodesToJSON:function(t,e){var n=[];return t.forEach((function(r){var i,o,a,s,u,l,c,f=Oa()(r,"question.answers")||[],h=Fa()(r,"url")&&La()(r.type,"Link"),d=!Fa()(r,"question.answers")&&!h,p=ka(r.diffType||(null===(i=r.settings)||void 0===i||null===(o=i.position)||void 0===o?void 0:o.diffType),E),g=function(t,e){switch(t){case"N":return(null==e?void 0:e.addedLabel)||"Added";case"E":return(null==e?void 0:e.changedLabel)||"Changed";case"D":return(null==e?void 0:e.removedLabel)||"Removed";default:return(null==e?void 0:e.noChangesLabel)||"No changes"}}(r.diffType,P),v=f.map((function(e,i){var o=e.nextStep,a=e.title,s=e.id,u=e.diffType,l=ka((null==o?void 0:o.diffType)||u,E),c=l.label||p.label;return o&&ja()(t,{id:o.id})&&r.id&&n.push({id:"".concat(r.id,"-").concat(o.id,"-").concat(i),type:"standard.Link",source:{id:r.id,port:s},target:{id:o.id},attrs:{line:{stroke:_&&(l.strokeColor||p.strokeColor)||x().$lightGrey,targetMarker:{d:"M 13 -7.5 0 0 13 7.5"},opacity:l.opacity||1}}}),{id:s,text:a,group:_&&c?c:o?"outWithLink":"outWithoutLink",opacity:l.opacity||p.opacity}}));n.push({id:r.id,url:r.url,type:"qad.Question",question:Oa()(r,"question.title",r.title),isSolution:d,isLink:h,options:v,interactive:m,color:(null===(a=r.settings)||void 0===a?void 0:a.borderColor)||(d?x().$dark:h?x().$yellow:x().$catchyBlue),boxColors:p,isReadOnly:null!=b?b:S,isCompare:_,highlightFirstStep:L,labelText:g,firstStepTitle:M,position:{x:(null===(s=r.settings)||void 0===s||null===(u=s.position)||void 0===u?void 0:u.x)||0,y:(null===(l=r.settings)||void 0===l||null===(c=l.position)||void 0===c?void 0:c.y)||0},bodyTitle:Oa()(e,"bodyTitle")||"Double click to edit",attrs:{".edit-button":{title:Oa()(e,"editButtonTitle")||"Click to edit"}}})})),{cells:n}},fromJSON:function(t,e){O.fromJSON(t),e||F()},resetSelectedLink:j,pushLinksToFront:F,paper:R,graph:O})}({el:n.current,isStatic:!0,highlightFirstStep:!0,interactive:!1}),setTimeout((function(){var t,e,n,o,a,s,u,l;t=i.current,u=null==r||null===(e=r.current)||void 0===e?void 0:e.nodesToJSON(t),l=null===(n=0===(null===(o=i.current)||void 0===o?void 0:o.filter((function(t){var e;return null===(e=t.settings)||void 0===e?void 0:e.position})).length))||void 0===n||n,null==r||null===(a=r.current)||void 0===a||a.fromJSON(u),l&&(null==r||null===(s=r.current)||void 0===s||s.autoLayoutNodes())}),0))}),[]),m().createElement("div",{"data-interactive":!1,className:"Graph__graph-holder",id:"graph-holder",style:{padding:12},ref:n})}}(),w}()},"object"==h(e)&&"object"==h(t)?t.exports=a(n(1591),n(4959),n(6370),n(672),n(490),n(491),n(3153),n(5550),n(9276),n(8954),n(6550),n(5373),n(937)):(i=[n(1591),n(4959),n(6370),n(672),n(490),n(491),n(3153),n(5550),n(9276),n(8954),n(6550),n(5373),n(937)],void 0===(o="function"==typeof(r=a)?r.apply(e,i):r)||(t.exports=o))}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.amdO={},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n.r(r),n.d(r,{renderStaticDTDiagram:()=>o});var t=n(1591),e=n(2609),i=n(9867),o=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#diagram-container",o=document.querySelector(r);e.createRoot(o).render(t.createElement(i.StaticTree,{tree:n},null))}})();var i=window;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();