@shelf/global-renderer 2.4.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see renderStaticDTDiagram.js.LICENSE.txt */
2
+ (()=>{var e={2:(e,t,n)=>{var r=n(2199),i=n(4664),o=n(5950);e.exports=function(e){return r(e,o,i)}},79:(e,t,n)=>{var r=n(3702),i=n(80),o=n(4739),a=n(8655),s=n(1175);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},80:(e,t,n)=>{var r=n(6025),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},104:(e,t,n)=>{var r=n(3661);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},117:(e,t,n)=>{var r;try{r={clone:n(2629),constant:n(7334),each:n(6135),filter:n(7612),has:n(1448),isArray:n(6449),isEmpty:n(2193),isFunction:n(1882),isUndefined:n(2216),keys:n(5950),map:n(5378),reduce:n(860),size:n(7091),transform:n(9752),union:n(299),values:n(5880)}}catch(e){}r||(r=window._),e.exports=r},124:(e,t,n)=>{var r=n(9325);e.exports=function(){return r.Date.now()}},135:(e,t,n)=>{var r=n(6857),i=n(3988);function o(e,t,n,r,o,a){var s={width:0,height:0,rank:a,borderType:t},l=o[t][a-1],u=i.addDummyNode(e,"border",s,n);o[t][a]=u,e.setParent(u,r),l&&e.setEdge(l,u,{weight:1})}e.exports=function(e){r.forEach(e.children(),function t(n){var i=e.children(n),a=e.node(n);if(i.length&&r.forEach(i,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,l=a.maxRank+1;s<l;++s)o(e,"borderLeft","_bl",n,a,s),o(e,"borderRight","_br",n,a,s)}})}},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},270:(e,t,n)=>{var r=n(7068),i=n(346);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},289:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},299:(e,t,n)=>{var r=n(3120),i=n(9302),o=n(5765),a=n(3693),s=i(function(e){return o(r(e,1,a,!0))});e.exports=s},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},426:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},494:function(e,t,n){e.exports=function(e){"use strict";var t=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(e),n={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function r(e,t,r){var i=n[r];return Array.isArray(i)&&(i=i[t?0:1]),i.replace("%d",e)}var i={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r}};return t.default.locale(i,null,!0),i}(n(4353))},498:(e,t,n)=>{var r=n(7507);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},514:(e,t,n)=>{var r=n(4932);e.exports=function(e,t){return r(t,function(t){return e[t]})}},583:(e,t,n)=>{var r=n(7237),i=n(7255),o=n(8586),a=n(7797);e.exports=function(e){return o(e)?r(a(e)):i(e)}},631:(e,t,n)=>{var r=n(8077),i=n(9326);e.exports=function(e,t){return null!=e&&i(e,t,r)}},641:(e,t,n)=>{var r=n(6649),i=n(5950);e.exports=function(e,t){return e&&r(e,t,i)}},659:(e,t,n)=>{var r=n(1873),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},689:(e,t,n)=>{var r=n(2),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var f=c;f--;){var h=u[f];if(!(l?h in t:i.call(t,h)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=l;++f<c;){var m=e[h=u[f]],y=t[h];if(o)var b=l?o(y,m,h,t,e,s):o(m,y,h,e,t,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=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(e),s.delete(t),g}},695:(e,t,n)=>{var r=n(8096),i=n(2428),o=n(6449),a=n(3656),s=n(361),l=n(7167),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),f=!n&&!c&&a(e),h=!n&&!c&&!f&&l(e),d=n||c||f||h,p=d?r(e.length,String):[],g=p.length;for(var v in e)!t&&!u.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||p.push(v);return p}},756:(e,t,n)=>{var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},776:(e,t,n)=>{var r=n(756),i=n(5950);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},860:(e,t,n)=>{var r=n(882),i=n(909),o=n(5389),a=n(5558),s=n(6449);e.exports=function(e,t,n){var l=s(e)?r:a,u=arguments.length<3;return l(e,o(t,4),n,u,i)}},882:e=>{e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}},909:(e,t,n)=>{var r=n(641),i=n(8329)(r);e.exports=i},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:(e,t,n)=>{var r=n(79),i=n(8223),o=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(6221)},999:(e,t,n)=>{var r=n(9302),i=n(6800);e.exports=function(e){return r(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t})}},1033:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},1042:(e,t,n)=>{var r=n(6110)(Object,"create");e.exports=r},1045:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"post")}},1166:(e,t,n)=>{e.exports={Graph:n(6454),version:n(4458)}},1175:(e,t,n)=>{var r=n(6025);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},1234:e=>{e.exports=function(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:void 0;n(a,e[r],s)}return a}},1247:(e,t,n)=>{"use strict";var r=n(9982),i=n(6540),o=n(961);function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function u(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function c(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(a(188))}function h(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=h(e)))return t;e=e.sibling}return null}var d=Object.assign,p=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),C=Symbol.for("react.lazy");Symbol.for("react.scope");var A=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var P=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var L=Symbol.iterator;function T(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var N=Symbol.for("react.client.reference");function O(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===N?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case m:return"Fragment";case b:return"Profiler";case y:return"StrictMode";case S:return"Suspense";case _:return"SuspenseList";case A:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case v:return"Portal";case x:return e.displayName||"Context";case w:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case E:return null!==(t=e.displayName||null)?t:O(e.type)||"Memo";case C:t=e._payload,e=e._init;try{return O(e(t))}catch(e){}}return null}var M=Array.isArray,R=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j={pending:!1,data:null,method:null,action:null},I=[],F=-1;function z(e){return{current:e}}function V(e){0>F||(e.current=I[F],I[F]=null,F--)}function B(e,t){F++,I[F]=e.current,e.current=t}var $,U,H=z(null),q=z(null),W=z(null),G=z(null);function Y(e,t){switch(B(W,t),B(q,e),B(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bf(t=yf(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(H),B(H,e)}function X(){V(H),V(q),V(W)}function K(e){null!==e.memoizedState&&B(G,e);var t=H.current,n=bf(t,e.type);t!==n&&(B(q,e),B(H,n))}function J(e){q.current===e&&(V(H),V(q)),G.current===e&&(V(G),fh._currentValue=j)}function Q(e){if(void 0===$)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||"",U=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+$+e+U}var Z=!1;function ee(e,t){if(!e||Z)return"";Z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),a=o[0],s=o[1];if(a&&s){var l=a.split("\n"),u=s.split("\n");for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===u.length)for(r=l.length-1,i=u.length-1;1<=r&&0<=i&&l[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==u[i]){if(1!==r||1!==i)do{if(r--,0>--i||l[r]!==u[i]){var c="\n"+l[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=i);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Q(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return Q(e.type);case 16:return Q("Lazy");case 13:return e.child!==t&&null!==t?Q("Suspense Fallback"):Q("Suspense");case 19:return Q("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return Q("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var re=Object.prototype.hasOwnProperty,ie=r.unstable_scheduleCallback,oe=r.unstable_cancelCallback,ae=r.unstable_shouldYield,se=r.unstable_requestPaint,le=r.unstable_now,ue=r.unstable_getCurrentPriorityLevel,ce=r.unstable_ImmediatePriority,fe=r.unstable_UserBlockingPriority,he=r.unstable_NormalPriority,de=r.unstable_LowPriority,pe=r.unstable_IdlePriority,ge=r.log,ve=r.unstable_setDisableYieldValue,me=null,ye=null;function be(e){if("function"==typeof ge&&ve(e),ye&&"function"==typeof ye.setStrictMode)try{ye.setStrictMode(me,e)}catch(e){}}var we=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(xe(e)/ke|0)|0},xe=Math.log,ke=Math.LN2,Se=256,_e=262144,Ee=4194304;function Ce(e){var t=42&e;if(0!==t)return t;switch(e&-e){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ae(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~o)?i=Ce(r):0!==(a&=s)?i=Ce(a):n||0!==(n=s&~e)&&(i=Ce(n)):0!==(s=r&~o)?i=Ce(s):0!==a?i=Ce(a):n||0!==(n=r&~e)&&(i=Ce(n)),0===i?0:0!==t&&t!==i&&0===(t&o)&&((o=i&-i)>=(n=t&-t)||32===o&&4194048&n)?t:i}function Pe(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Le(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;default:return-1}}function Te(){var e=Ee;return!(62914560&(Ee<<=1))&&(Ee=4194304),e}function Ne(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Oe(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Me(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-we(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function De(e,t){var n=t&-t;return 0!==((n=42&n?1:je(n))&(e.suspendedLanes|t))?0:n}function je(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ie(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Fe(){var e=D.p;return 0!==e?e:void 0===(e=window.event)?32:Ah(e.type)}function ze(e,t){var n=D.p;try{return D.p=e,t()}finally{D.p=n}}var Ve=Math.random().toString(36).slice(2),Be="__reactFiber$"+Ve,$e="__reactProps$"+Ve,Ue="__reactContainer$"+Ve,He="__reactEvents$"+Ve,qe="__reactListeners$"+Ve,We="__reactHandles$"+Ve,Ge="__reactResources$"+Ve,Ye="__reactMarker$"+Ve;function Xe(e){delete e[Be],delete e[$e],delete e[He],delete e[qe],delete e[We]}function Ke(e){var t=e[Be];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ue]||n[Be]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=If(e);null!==e;){if(n=e[Be])return n;e=If(e)}return t}n=(e=n).parentNode}return null}function Je(e){if(e=e[Be]||e[Ue]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Qe(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(a(33))}function Ze(e){var t=e[Ge];return t||(t=e[Ge]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ye]=!0}var tt=new Set,nt={};function rt(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var ot=RegExp("^[: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]*$"),at={},st={};function lt(e,t,n){if(i=t,re.call(st,i)||!re.call(at,i)&&(ot.test(i)?st[i]=!0:(at[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function ut(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ct(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ht(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function dt(e){if(!e._valueTracker){var t=ht(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ht(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function gt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var vt=/[\n"\\]/g;function mt(e){return e.replace(vt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function yt(e,t,n,r,i,o,a,s){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+ft(t)):e.value!==""+ft(t)&&(e.value=""+ft(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?wt(e,a,ft(t)):null!=n?wt(e,a,ft(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=o&&(e.defaultChecked=!!o),null!=i&&(e.checked=i&&"function"!=typeof i&&"symbol"!=typeof i),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+ft(s):e.removeAttribute("name")}function bt(e,t,n,r,i,o,a,s){if(null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.type=o),null!=t||null!=n){if(("submit"===o||"reset"===o)&&null==t)return void dt(e);n=null!=n?""+ft(n):"",t=null!=t?""+ft(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:i)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a),dt(e)}function wt(e,t,n){"number"===t&&gt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function xt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ft(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function kt(e,t,n){null==t||((t=""+ft(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+ft(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function St(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(a(92));if(M(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=ft(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),dt(e)}function _t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Et=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ct(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||Et.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function At(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(a(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Ct(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Ct(e,o,t[o])}function Pt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Tt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Nt(e){return Tt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ot(){}var Mt=null;function Rt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Dt=null,jt=null;function It(e){var t=Je(e);if(t&&(e=t.stateNode)){var n=e[$e]||null;e:switch(e=t.stateNode,t.type){case"input":if(yt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+mt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[$e]||null;if(!i)throw Error(a(90));yt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&pt(r)}break e;case"textarea":kt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&xt(e,!!n.multiple,t,!1)}}}var Ft=!1;function zt(e,t,n){if(Ft)return e(t,n);Ft=!0;try{return e(t)}finally{if(Ft=!1,(null!==Dt||null!==jt)&&(Zu(),Dt&&(t=Dt,e=jt,jt=Dt=null,It(t),e)))for(t=0;t<e.length;t++)It(e[t])}}function Vt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[$e]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Bt=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),$t=!1;if(Bt)try{var Ut={};Object.defineProperty(Ut,"passive",{get:function(){$t=!0}}),window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch(e){$t=!1}var Ht=null,qt=null,Wt=null;function Gt(){if(Wt)return Wt;var e,t,n=qt,r=n.length,i="value"in Ht?Ht.value:Ht.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Wt=i.slice(e,1<t?1-t:void 0)}function Yt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Xt(){return!0}function Kt(){return!1}function Jt(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Xt:Kt,this.isPropagationStopped=Kt,this}return d(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Xt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Xt)},persist:function(){},isPersistent:Xt}),t}var Qt,Zt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Jt(tn),rn=d({},tn,{view:0,detail:0}),on=Jt(rn),an=d({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Qt=e.screenX-en.screenX,Zt=e.screenY-en.screenY):Zt=Qt=0,en=e),Qt)},movementY:function(e){return"movementY"in e?e.movementY:Zt}}),sn=Jt(an),ln=Jt(d({},an,{dataTransfer:0})),un=Jt(d({},rn,{relatedTarget:0})),cn=Jt(d({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),fn=Jt(d({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),hn=Jt(d({},tn,{data:0})),dn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pn={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"},gn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=gn[e])&&!!t[e]}function mn(){return vn}var yn=Jt(d({},rn,{key:function(e){if(e.key){var t=dn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mn,charCode:function(e){return"keypress"===e.type?Yt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),bn=Jt(d({},an,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),wn=Jt(d({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mn})),xn=Jt(d({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),kn=Jt(d({},an,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Sn=Jt(d({},tn,{newState:0,oldState:0})),_n=[9,13,27,32],En=Bt&&"CompositionEvent"in window,Cn=null;Bt&&"documentMode"in document&&(Cn=document.documentMode);var An=Bt&&"TextEvent"in window&&!Cn,Pn=Bt&&(!En||Cn&&8<Cn&&11>=Cn),Ln=String.fromCharCode(32),Tn=!1;function Nn(e,t){switch(e){case"keyup":return-1!==_n.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function On(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Mn=!1,Rn={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 Dn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function jn(e,t,n,r){Dt?jt?jt.push(r):jt=[r]:Dt=r,0<(t=rf(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var In=null,Fn=null;function zn(e){Xc(e,0)}function Vn(e){if(pt(Qe(e)))return e}function Bn(e,t){if("change"===e)return t}var $n=!1;if(Bt){var Un;if(Bt){var Hn="oninput"in document;if(!Hn){var qn=document.createElement("div");qn.setAttribute("oninput","return;"),Hn="function"==typeof qn.oninput}Un=Hn}else Un=!1;$n=Un&&(!document.documentMode||9<document.documentMode)}function Wn(){In&&(In.detachEvent("onpropertychange",Gn),Fn=In=null)}function Gn(e){if("value"===e.propertyName&&Vn(Fn)){var t=[];jn(t,Fn,e,Rt(e)),zt(zn,t)}}function Yn(e,t,n){"focusin"===e?(Wn(),Fn=n,(In=t).attachEvent("onpropertychange",Gn)):"focusout"===e&&Wn()}function Xn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Vn(Fn)}function Kn(e,t){if("click"===e)return Vn(t)}function Jn(e,t){if("input"===e||"change"===e)return Vn(t)}var Qn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Zn(e,t){if(Qn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!re.call(t,i)||!Qn(e[i],t[i]))return!1}return!0}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Bt&&"documentMode"in document&&11>=document.documentMode,ar=null,sr=null,lr=null,ur=!1;function cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ur||null==ar||ar!==gt(r)||(r="selectionStart"in(r=ar)&&ir(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},lr&&Zn(lr,r)||(lr=r,0<(r=rf(sr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ar)))}function fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hr={animationend:fr("Animation","AnimationEnd"),animationiteration:fr("Animation","AnimationIteration"),animationstart:fr("Animation","AnimationStart"),transitionrun:fr("Transition","TransitionRun"),transitionstart:fr("Transition","TransitionStart"),transitioncancel:fr("Transition","TransitionCancel"),transitionend:fr("Transition","TransitionEnd")},dr={},pr={};function gr(e){if(dr[e])return dr[e];if(!hr[e])return e;var t,n=hr[e];for(t in n)if(n.hasOwnProperty(t)&&t in pr)return dr[e]=n[t];return e}Bt&&(pr=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);var vr=gr("animationend"),mr=gr("animationiteration"),yr=gr("animationstart"),br=gr("transitionrun"),wr=gr("transitionstart"),xr=gr("transitioncancel"),kr=gr("transitionend"),Sr=new Map,_r="abort auxClick beforeToggle 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 Er(e,t){Sr.set(e,t),rt(t,[e])}_r.push("scrollEnd");var Cr="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Ar=[],Pr=0,Lr=0;function Tr(){for(var e=Pr,t=Lr=Pr=0;t<e;){var n=Ar[t];Ar[t++]=null;var r=Ar[t];Ar[t++]=null;var i=Ar[t];Ar[t++]=null;var o=Ar[t];if(Ar[t++]=null,null!==r&&null!==i){var a=r.pending;null===a?i.next=i:(i.next=a.next,a.next=i),r.pending=i}0!==o&&Rr(n,i,o)}}function Nr(e,t,n,r){Ar[Pr++]=e,Ar[Pr++]=t,Ar[Pr++]=n,Ar[Pr++]=r,Lr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Or(e,t,n,r){return Nr(e,t,n,r),Dr(e)}function Mr(e,t){return Nr(e,null,null,t),Dr(e)}function Rr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(r=o.alternate)&&(r.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(i=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,i&&null!==t&&(i=31-we(n),null===(r=(e=o.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),o):null}function Dr(e){if(50<Hu)throw Hu=0,qu=null,Error(a(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var jr={};function Ir(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,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 Fr(e,t,n,r){return new Ir(e,t,n,r)}function zr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Vr(e,t){var n=e.alternate;return null===n?((n=Fr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Br(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $r(e,t,n,r,i,o){var s=0;if(r=e,"function"==typeof e)zr(e)&&(s=1);else if("string"==typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,H.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case A:return(e=Fr(31,n,t,i)).elementType=A,e.lanes=o,e;case m:return Ur(n.children,i,o,t);case y:s=8,i|=24;break;case b:return(e=Fr(12,n,t,2|i)).elementType=b,e.lanes=o,e;case S:return(e=Fr(13,n,t,i)).elementType=S,e.lanes=o,e;case _:return(e=Fr(19,n,t,i)).elementType=_,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case x:s=10;break e;case w:s=9;break e;case k:s=11;break e;case E:s=14;break e;case C:s=16,r=null;break e}s=29,n=Error(a(130,null===e?"null":typeof e,"")),r=null}return(t=Fr(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ur(e,t,n,r){return(e=Fr(7,e,r,t)).lanes=n,e}function Hr(e,t,n){return(e=Fr(6,e,null,t)).lanes=n,e}function qr(e){var t=Fr(18,null,null,0);return t.stateNode=e,t}function Wr(e,t,n){return(t=Fr(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gr=new WeakMap;function Yr(e,t){if("object"==typeof e&&null!==e){var n=Gr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},Gr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Xr=[],Kr=0,Jr=null,Qr=0,Zr=[],ei=0,ti=null,ni=1,ri="";function ii(e,t){Xr[Kr++]=Qr,Xr[Kr++]=Jr,Jr=e,Qr=t}function oi(e,t,n){Zr[ei++]=ni,Zr[ei++]=ri,Zr[ei++]=ti,ti=e;var r=ni;e=ri;var i=32-we(r)-1;r&=~(1<<i),n+=1;var o=32-we(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ni=1<<32-we(t)+i|n<<i|r,ri=o+e}else ni=1<<o|n<<i|r,ri=e}function ai(e){null!==e.return&&(ii(e,1),oi(e,1,0))}function si(e){for(;e===Jr;)Jr=Xr[--Kr],Xr[Kr]=null,Qr=Xr[--Kr],Xr[Kr]=null;for(;e===ti;)ti=Zr[--ei],Zr[ei]=null,ri=Zr[--ei],Zr[ei]=null,ni=Zr[--ei],Zr[ei]=null}function li(e,t){Zr[ei++]=ni,Zr[ei++]=ri,Zr[ei++]=ti,ni=t.id,ri=t.overflow,ti=e}var ui=null,ci=null,fi=!1,hi=null,di=!1,pi=Error(a(519));function gi(e){throw xi(Yr(Error(a(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),pi}function vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Be]=e,t[$e]=r,n){case"dialog":Kc("cancel",t),Kc("close",t);break;case"iframe":case"object":case"embed":Kc("load",t);break;case"video":case"audio":for(n=0;n<Gc.length;n++)Kc(Gc[n],t);break;case"source":Kc("error",t);break;case"img":case"image":case"link":Kc("error",t),Kc("load",t);break;case"details":Kc("toggle",t);break;case"input":Kc("invalid",t),bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Kc("invalid",t);break;case"textarea":Kc("invalid",t),St(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||cf(t.textContent,n)?(null!=r.popover&&(Kc("beforetoggle",t),Kc("toggle",t)),null!=r.onScroll&&Kc("scroll",t),null!=r.onScrollEnd&&Kc("scrollend",t),null!=r.onClick&&(t.onclick=Ot),t=!0):t=!1,t||gi(e,!0)}function mi(e){for(ui=e.return;ui;)switch(ui.tag){case 5:case 31:case 13:return void(di=!1);case 27:case 3:return void(di=!0);default:ui=ui.return}}function yi(e){if(e!==ui)return!1;if(!fi)return mi(e),fi=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||wf(e.type,e.memoizedProps)),t=!t),t&&ci&&gi(e),mi(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));ci=jf(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));ci=jf(e)}else 27===n?(n=ci,Af(e.type)?(e=Df,Df=null,ci=e):ci=n):ci=ui?Rf(e.stateNode.nextSibling):null;return!0}function bi(){ci=ui=null,fi=!1}function wi(){var e=hi;return null!==e&&(null===Tu?Tu=e:Tu.push.apply(Tu,e),hi=null),e}function xi(e){null===hi?hi=[e]:hi.push(e)}var ki=z(null),Si=null,_i=null;function Ei(e,t,n){B(ki,t._currentValue),t._currentValue=n}function Ci(e){e._currentValue=ki.current,V(ki)}function Ai(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Pi(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var o=i.dependencies;if(null!==o){var s=i.child;o=o.firstContext;e:for(;null!==o;){var l=o;o=i;for(var u=0;u<t.length;u++)if(l.context===t[u]){o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Ai(o.return,n,e),r||(s=null);break e}o=l.next}}else if(18===i.tag){if(null===(s=i.return))throw Error(a(341));s.lanes|=n,null!==(o=s.alternate)&&(o.lanes|=n),Ai(s,n,e),s=null}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===e){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}}function Li(e,t,n,r){e=null;for(var i=t,o=!1;null!==i;){if(!o)if(524288&i.flags)o=!0;else if(262144&i.flags)break;if(10===i.tag){var s=i.alternate;if(null===s)throw Error(a(387));if(null!==(s=s.memoizedProps)){var l=i.type;Qn(i.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(i===G.current){if(null===(s=i.alternate))throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(fh):e=[fh])}i=i.return}null!==e&&Pi(t,e,n,r),t.flags|=262144}function Ti(e){for(e=e.firstContext;null!==e;){if(!Qn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ni(e){Si=e,_i=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Oi(e){return Ri(Si,e)}function Mi(e,t){return null===Si&&Ni(e),Ri(e,t)}function Ri(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===_i){if(null===e)throw Error(a(308));_i=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _i=_i.next=t;return n}var Di="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ji=r.unstable_scheduleCallback,Ii=r.unstable_NormalPriority,Fi={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zi(){return{controller:new Di,data:new Map,refCount:0}}function Vi(e){e.refCount--,0===e.refCount&&ji(Ii,function(){e.controller.abort()})}var Bi=null,$i=0,Ui=0,Hi=null;function qi(){if(0===--$i&&null!==Bi){null!==Hi&&(Hi.status="fulfilled");var e=Bi;Bi=null,Ui=0,Hi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Wi=R.S;R.S=function(e,t){Mu=le(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Bi){var n=Bi=[];$i=0,Ui=$c(),Hi={status:"pending",value:void 0,then:function(e){n.push(e)}}}$i++,t.then(qi,qi)}(0,t),null!==Wi&&Wi(e,t)};var Gi=z(null);function Yi(){var e=Gi.current;return null!==e?e:pu.pooledCache}function Xi(e,t){B(Gi,null===t?Gi.current:t.pool)}function Ki(){var e=Yi();return null===e?null:{parent:Fi._currentValue,pool:e}}var Ji=Error(a(460)),Qi=Error(a(474)),Zi=Error(a(542)),eo={then:function(){}};function to(e){return"fulfilled"===(e=e.status)||"rejected"===e}function no(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Ot,Ot),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw ao(e=t.reason),e;default:if("string"==typeof t.status)t.then(Ot,Ot);else{if(null!==(e=pu)&&100<e.shellSuspendCounter)throw Error(a(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw ao(e=t.reason),e}throw io=t,Ji}}function ro(e){try{return(0,e._init)(e._payload)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw io=e,Ji;throw e}}var io=null;function oo(){if(null===io)throw Error(a(459));var e=io;return io=null,e}function ao(e){if(e===Ji||e===Zi)throw Error(a(483))}var so=null,lo=0;function uo(e){var t=lo;return lo+=1,null===so&&(so=[]),no(so,e,t)}function co(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function fo(e,t){if(t.$$typeof===p)throw Error(a(525));throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ho(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=Vr(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Hr(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var o=n.type;return o===m?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===C&&ro(o)===t.type)?(co(t=i(t,n.props),n),t.return=e,t):(co(t=$r(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Wr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Ur(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Hr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case g:return co(n=$r(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case v:return(t=Wr(t,e.mode,n)).return=e,t;case C:return h(e,t=ro(t),n)}if(M(t)||T(t))return(t=Ur(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return h(e,uo(t),n);if(t.$$typeof===x)return h(e,Mi(e,t),n);fo(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case g:return n.key===i?u(e,t,n,r):null;case v:return n.key===i?c(e,t,n,r):null;case C:return d(e,t,n=ro(n),r)}if(M(n)||T(n))return null!==i?null:f(e,t,n,r,null);if("function"==typeof n.then)return d(e,t,uo(n),r);if(n.$$typeof===x)return d(e,t,Mi(e,n),r);fo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case g:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case v:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case C:return p(e,t,n,r=ro(r),i)}if(M(r)||T(r))return f(t,e=e.get(n)||null,r,i,null);if("function"==typeof r.then)return p(e,t,n,uo(r),i);if(r.$$typeof===x)return p(e,t,n,Mi(t,r),i);fo(t,r)}return null}function y(l,u,c,f){if("object"==typeof c&&null!==c&&c.type===m&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case g:e:{for(var b=c.key;null!==u;){if(u.key===b){if((b=c.type)===m){if(7===u.tag){n(l,u.sibling),(f=i(u,c.props.children)).return=l,l=f;break e}}else if(u.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===C&&ro(b)===u.type){n(l,u.sibling),co(f=i(u,c.props),c),f.return=l,l=f;break e}n(l,u);break}t(l,u),u=u.sibling}c.type===m?((f=Ur(c.props.children,l.mode,f,c.key)).return=l,l=f):(co(f=$r(c.type,c.key,c.props,null,l.mode,f),c),f.return=l,l=f)}return s(l);case v:e:{for(b=c.key;null!==u;){if(u.key===b){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(f=i(u,c.children||[])).return=l,l=f;break e}n(l,u);break}t(l,u),u=u.sibling}(f=Wr(c,l.mode,f)).return=l,l=f}return s(l);case C:return y(l,u,c=ro(c),f)}if(M(c))return function(i,a,s,l){for(var u=null,c=null,f=a,g=a=0,v=null;null!==f&&g<s.length;g++){f.index>g?(v=f,f=null):v=f.sibling;var m=d(i,f,s[g],l);if(null===m){null===f&&(f=v);break}e&&f&&null===m.alternate&&t(i,f),a=o(m,a,g),null===c?u=m:c.sibling=m,c=m,f=v}if(g===s.length)return n(i,f),fi&&ii(i,g),u;if(null===f){for(;g<s.length;g++)null!==(f=h(i,s[g],l))&&(a=o(f,a,g),null===c?u=f:c.sibling=f,c=f);return fi&&ii(i,g),u}for(f=r(f);g<s.length;g++)null!==(v=p(f,i,g,s[g],l))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),a=o(v,a,g),null===c?u=v:c.sibling=v,c=v);return e&&f.forEach(function(e){return t(i,e)}),fi&&ii(i,g),u}(l,u,c,f);if(T(c)){if("function"!=typeof(b=T(c)))throw Error(a(150));return function(i,s,l,u){if(null==l)throw Error(a(151));for(var c=null,f=null,g=s,v=s=0,m=null,y=l.next();null!==g&&!y.done;v++,y=l.next()){g.index>v?(m=g,g=null):m=g.sibling;var b=d(i,g,y.value,u);if(null===b){null===g&&(g=m);break}e&&g&&null===b.alternate&&t(i,g),s=o(b,s,v),null===f?c=b:f.sibling=b,f=b,g=m}if(y.done)return n(i,g),fi&&ii(i,v),c;if(null===g){for(;!y.done;v++,y=l.next())null!==(y=h(i,y.value,u))&&(s=o(y,s,v),null===f?c=y:f.sibling=y,f=y);return fi&&ii(i,v),c}for(g=r(g);!y.done;v++,y=l.next())null!==(y=p(g,i,v,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?v:y.key),s=o(y,s,v),null===f?c=y:f.sibling=y,f=y);return e&&g.forEach(function(e){return t(i,e)}),fi&&ii(i,v),c}(l,u,c=b.call(c),f)}if("function"==typeof c.then)return y(l,u,uo(c),f);if(c.$$typeof===x)return y(l,u,Mi(l,c),f);fo(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(f=i(u,c)).return=l,l=f):(n(l,u),(f=Hr(c,l.mode,f)).return=l,l=f),s(l)):n(l,u)}return function(e,t,n,r){try{lo=0;var i=y(e,t,n,r);return so=null,i}catch(t){if(t===Ji||t===Zi)throw t;var o=Fr(29,t,null,e.mode);return o.lanes=r,o.return=e,o}}}var po=ho(!0),go=ho(!1),vo=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&du){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Dr(e),Rr(e,null,n),t}return Nr(e,r,t,n),Dr(e)}function xo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}function ko(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var So=!1;function _o(){if(So&&null!==Hi)throw Hi}function Eo(e,t,n,r){So=!1;var i=e.updateQueue;vo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?o=u:a.next=u,a=l;var c=e.alternate;null!==c&&(s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l)}if(null!==o){var f=i.baseState;for(a=0,c=u=l=null,s=o;;){var h=-536870913&s.lane,p=h!==s.lane;if(p?(vu&h)===h:(r&h)===h){0!==h&&h===Ui&&(So=!0),null!==c&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var g=e,v=s;h=t;var m=n;switch(v.tag){case 1:if("function"==typeof(g=v.payload)){f=g.call(m,f,h);break e}f=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(h="function"==typeof(g=v.payload)?g.call(m,f,h):g))break e;f=d({},f,h);break e;case 2:vo=!0}}null!==(h=s.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=i.callbacks)?i.callbacks=[h]:p.push(h))}else p={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=f):c=c.next=p,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}null===c&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null===o&&(i.shared.lanes=0),_u|=a,e.lanes=a,e.memoizedState=f}}function Co(e,t){if("function"!=typeof e)throw Error(a(191,e));e.call(t)}function Ao(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var Po=z(null),Lo=z(0);function To(e,t){B(Lo,e=ku),B(Po,t),ku=e|t.baseLanes}function No(){B(Lo,ku),B(Po,Po.current)}function Oo(){ku=Lo.current,V(Po),V(Lo)}var Mo=z(null),Ro=null;function Do(e){var t=e.alternate;B(Vo,1&Vo.current),B(Mo,e),null===Ro&&(null===t||null!==Po.current||null!==t.memoizedState)&&(Ro=e)}function jo(e){B(Vo,Vo.current),B(Mo,e),null===Ro&&(Ro=e)}function Io(e){22===e.tag?(B(Vo,Vo.current),B(Mo,e),null===Ro&&(Ro=e)):Fo()}function Fo(){B(Vo,Vo.current),B(Mo,Mo.current)}function zo(e){V(Mo),Ro===e&&(Ro=null),V(Vo)}var Vo=z(0);function Bo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Of(n)||Mf(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $o=0,Uo=null,Ho=null,qo=null,Wo=!1,Go=!1,Yo=!1,Xo=0,Ko=0,Jo=null,Qo=0;function Zo(){throw Error(a(321))}function ea(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function ta(e,t,n,r,i,o){return $o=o,Uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=null===e||null===e.memoizedState?vs:ms,Yo=!1,o=n(r,i),Yo=!1,Go&&(o=ra(t,n,r,i)),na(e),o}function na(e){R.H=gs;var t=null!==Ho&&null!==Ho.next;if($o=0,qo=Ho=Uo=null,Wo=!1,Ko=0,Jo=null,t)throw Error(a(300));null===e||Ms||null!==(e=e.dependencies)&&Ti(e)&&(Ms=!0)}function ra(e,t,n,r){Uo=e;var i=0;do{if(Go&&(Jo=null),Ko=0,Go=!1,25<=i)throw Error(a(301));if(i+=1,qo=Ho=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}R.H=ys,o=t(n,r)}while(Go);return o}function ia(){var e=R.H,t=e.useState()[0];return t="function"==typeof t.then?ca(t):t,e=e.useState()[0],(null!==Ho?Ho.memoizedState:null)!==e&&(Uo.flags|=1024),t}function oa(){var e=0!==Xo;return Xo=0,e}function aa(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function sa(e){if(Wo){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Wo=!1}$o=0,qo=Ho=Uo=null,Go=!1,Ko=Xo=0,Jo=null}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qo?Uo.memoizedState=qo=e:qo=qo.next=e,qo}function ua(){if(null===Ho){var e=Uo.alternate;e=null!==e?e.memoizedState:null}else e=Ho.next;var t=null===qo?Uo.memoizedState:qo.next;if(null!==t)qo=t,Ho=e;else{if(null===e){if(null===Uo.alternate)throw Error(a(467));throw Error(a(310))}e={memoizedState:(Ho=e).memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},null===qo?Uo.memoizedState=qo=e:qo=qo.next=e}return qo}function ca(e){var t=Ko;return Ko+=1,null===Jo&&(Jo=[]),e=no(Jo,e,t),t=Uo,null===(null===qo?t.memoizedState:qo.next)&&(t=t.alternate,R.H=null===t||null===t.memoizedState?vs:ms),e}function fa(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ca(e);if(e.$$typeof===x)return Oi(e)}throw Error(a(438,String(e)))}function ha(e){var t=null,n=Uo.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Uo.alternate;null!==r&&null!==(r=r.updateQueue)&&null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Uo.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=P;return t.index++,n}function da(e,t){return"function"==typeof t?t(e):t}function pa(e){return ga(ua(),Ho,e)}function ga(e,t,n){var r=e.queue;if(null===r)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,null===i)e.memoizedState=o;else{var l=s=null,u=null,c=t=i.next,f=!1;do{var h=-536870913&c.lane;if(h!==c.lane?(vu&h)===h:($o&h)===h){var d=c.revertLane;if(0===d)null!==u&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===Ui&&(f=!0);else{if(($o&d)===d){c=c.next,d===Ui&&(f=!0);continue}h={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=h,s=o):u=u.next=h,Uo.lanes|=d,_u|=d}h=c.action,Yo&&n(o,h),o=c.hasEagerState?c.eagerState:n(o,h)}else d={lane:h,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=d,s=o):u=u.next=d,Uo.lanes|=h,_u|=h;c=c.next}while(null!==c&&c!==t);if(null===u?s=o:u.next=l,!Qn(o,e.memoizedState)&&(Ms=!0,f&&null!==(n=Hi)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=u,r.lastRenderedState=o}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function va(e){var t=ua(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Qn(o,t.memoizedState)||(Ms=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ma(e,t,n){var r=Uo,i=ua(),o=fi;if(o){if(void 0===n)throw Error(a(407));n=n()}else n=t();var s=!Qn((Ho||i).memoizedState,n);if(s&&(i.memoizedState=n,Ms=!0),i=i.queue,$a(wa.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||null!==qo&&1&qo.memoizedState.tag){if(r.flags|=2048,Ia(9,{destroy:void 0},ba.bind(null,r,i,n,t),null),null===pu)throw Error(a(349));o||127&$o||ya(r,t,n)}return n}function ya(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Uo.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Uo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ba(e,t,n,r){t.value=n,t.getSnapshot=r,xa(t)&&ka(e)}function wa(e,t,n){return n(function(){xa(t)&&ka(e)})}function xa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(e){return!0}}function ka(e){var t=Mr(e,2);null!==t&&Yu(t,0,2)}function Sa(e){var t=la();if("function"==typeof e){var n=e;if(e=n(),Yo){be(!0);try{n()}finally{be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:e},t}function _a(e,t,n,r){return e.baseState=n,ga(e,Ho,"function"==typeof r?r:da)}function Ea(e,t,n,r,i){if(hs(e))throw Error(a(485));if(null!==(e=t.action)){var o={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==R.T?n(!0):o.isTransition=!1,r(o),null===(n=t.pending)?(o.next=t.pending=o,Ca(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ca(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var o=R.T,a={};R.T=a;try{var s=n(i,r),l=R.S;null!==l&&l(a,s),Aa(e,t,s)}catch(n){La(e,t,n)}finally{null!==o&&null!==a.types&&(o.types=a.types),R.T=o}}else try{Aa(e,t,o=n(i,r))}catch(n){La(e,t,n)}}function Aa(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Pa(e,t,n)},function(n){return La(e,t,n)}):Pa(e,t,n)}function Pa(e,t,n){t.status="fulfilled",t.value=n,Ta(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ca(e,n)))}function La(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ta(t),t=t.next}while(t!==r)}e.action=null}function Ta(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Na(e,t){return t}function Oa(e,t){if(fi){var n=pu.formState;if(null!==n){e:{var r=Uo;if(fi){if(ci){t:{for(var i=ci,o=di;8!==i.nodeType;){if(!o){i=null;break t}if(null===(i=Rf(i.nextSibling))){i=null;break t}}i="F!"===(o=i.data)||"F"===o?i:null}if(i){ci=Rf(i.nextSibling),r="F!"===i.data;break e}}gi(r)}r=!1}r&&(t=n[0])}}return(n=la()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:t},n.queue=r,n=us.bind(null,Uo,r),r.dispatch=n,r=Sa(!1),o=fs.bind(null,Uo,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=la()).queue=i,n=Ea.bind(null,Uo,i,o,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ma(e){return Ra(ua(),Ho,e)}function Ra(e,t,n){if(t=ga(e,t,Na)[0],e=pa(da)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=ca(t)}catch(e){if(e===Ji)throw Zi;throw e}else r=t;var i=(t=ua()).queue,o=i.dispatch;return n!==t.memoizedState&&(Uo.flags|=2048,Ia(9,{destroy:void 0},Da.bind(null,i,n),null)),[r,o,e]}function Da(e,t){e.action=t}function ja(e){var t=ua(),n=Ho;if(null!==n)return Ra(t,n,e);ua(),t=t.memoizedState;var r=(n=ua()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ia(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Uo.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Uo.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fa(){return ua().memoizedState}function za(e,t,n,r){var i=la();Uo.flags|=e,i.memoizedState=Ia(1|t,{destroy:void 0},n,void 0===r?null:r)}function Va(e,t,n,r){var i=ua();r=void 0===r?null:r;var o=i.memoizedState.inst;null!==Ho&&null!==r&&ea(r,Ho.memoizedState.deps)?i.memoizedState=Ia(t,o,n,r):(Uo.flags|=e,i.memoizedState=Ia(1|t,o,n,r))}function Ba(e,t){za(8390656,8,e,t)}function $a(e,t){Va(2048,8,e,t)}function Ua(e){var t=ua().memoizedState;return function(e){Uo.flags|=4;var t=Uo.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Uo.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&du)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function Ha(e,t){return Va(4,2,e,t)}function qa(e,t){return Va(4,4,e,t)}function Wa(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Ga(e,t,n){n=null!=n?n.concat([e]):null,Va(4,4,Wa.bind(null,t,e),n)}function Ya(){}function Xa(e,t){var n=ua();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ea(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ka(e,t){var n=ua();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ea(t,r[1]))return r[0];if(r=e(),Yo){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r}function Ja(e,t,n){return void 0===n||1073741824&$o&&!(261930&vu)?e.memoizedState=t:(e.memoizedState=n,e=Gu(),Uo.lanes|=e,_u|=e,n)}function Qa(e,t,n,r){return Qn(n,t)?n:null!==Po.current?(e=Ja(e,n,r),Qn(e,t)||(Ms=!0),e):42&$o&&(!(1073741824&$o)||261930&vu)?(e=Gu(),Uo.lanes|=e,_u|=e,t):(Ms=!0,e.memoizedState=n)}function Za(e,t,n,r,i){var o=D.p;D.p=0!==o&&8>o?o:8;var a,s,l,u=R.T,c={};R.T=c,fs(e,!1,t,n);try{var f=i(),h=R.S;null!==h&&h(c,f),null!==f&&"object"==typeof f&&"function"==typeof f.then?cs(e,t,(a=r,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},f.then(function(){l.status="fulfilled",l.value=a;for(var e=0;e<s.length;e++)(0,s[e])(a)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Wu()):cs(e,t,r,Wu())}catch(n){cs(e,t,{then:function(){},status:"rejected",reason:n},Wu())}finally{D.p=o,null!==u&&null!==c.types&&(u.types=c.types),R.T=u}}function es(){}function ts(e,t,n,r){if(5!==e.tag)throw Error(a(476));var i=ns(e).queue;Za(e,i,t,j,null===n?es:function(){return rs(e),n(r)})}function ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:j,baseState:j,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:j},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function rs(e){var t=ns(e);null===t.next&&(t=e.alternate.memoizedState),cs(e,t.next.queue,{},Wu())}function is(){return Oi(fh)}function os(){return ua().memoizedState}function as(){return ua().memoizedState}function ss(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Wu(),r=wo(t,e=bo(n),n);return null!==r&&(Yu(r,0,n),xo(r,t,n)),t={cache:zi()},void(e.payload=t)}t=t.return}}function ls(e,t,n){var r=Wu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},hs(e)?ds(t,n):null!==(n=Or(e,t,n,r))&&(Yu(n,0,r),ps(n,t,r))}function us(e,t,n){cs(e,t,n,Wu())}function cs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(hs(e))ds(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Qn(s,a))return Nr(e,t,i,0),null===pu&&Tr(),!1}catch(e){}if(null!==(n=Or(e,t,i,r)))return Yu(n,0,r),ps(n,t,r),!0}return!1}function fs(e,t,n,r){if(r={lane:2,revertLane:$c(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},hs(e)){if(t)throw Error(a(479))}else null!==(t=Or(e,n,r,2))&&Yu(t,0,2)}function hs(e){var t=e.alternate;return e===Uo||null!==t&&t===Uo}function ds(e,t){Go=Wo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ps(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}var gs={readContext:Oi,use:fa,useCallback:Zo,useContext:Zo,useEffect:Zo,useImperativeHandle:Zo,useLayoutEffect:Zo,useInsertionEffect:Zo,useMemo:Zo,useReducer:Zo,useRef:Zo,useState:Zo,useDebugValue:Zo,useDeferredValue:Zo,useTransition:Zo,useSyncExternalStore:Zo,useId:Zo,useHostTransitionStatus:Zo,useFormState:Zo,useActionState:Zo,useOptimistic:Zo,useMemoCache:Zo,useCacheRefresh:Zo};gs.useEffectEvent=Zo;var vs={readContext:Oi,use:fa,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:Oi,useEffect:Ba,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,za(4194308,4,Wa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return za(4194308,4,e,t)},useInsertionEffect:function(e,t){za(4,2,e,t)},useMemo:function(e,t){var n=la();t=void 0===t?null:t;var r=e();if(Yo){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=la();if(void 0!==n){var i=n(t);if(Yo){be(!0);try{n(t)}finally{be(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ls.bind(null,Uo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},la().memoizedState=e},useState:function(e){var t=(e=Sa(e)).queue,n=us.bind(null,Uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ya,useDeferredValue:function(e,t){return Ja(la(),e,t)},useTransition:function(){var e=Sa(!1);return e=Za.bind(null,Uo,e.queue,!0,!1),la().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Uo,i=la();if(fi){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===pu)throw Error(a(349));127&vu||ya(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ba(wa.bind(null,r,o,e),[e]),r.flags|=2048,Ia(9,{destroy:void 0},ba.bind(null,r,o,n,t),null),n},useId:function(){var e=la(),t=pu.identifierPrefix;if(fi){var n=ri;t="_"+t+"R_"+(n=(ni&~(1<<32-we(ni)-1)).toString(32)+n),0<(n=Xo++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Qo++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:is,useFormState:Oa,useActionState:Oa,useOptimistic:function(e){var t=la();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=fs.bind(null,Uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:ha,useCacheRefresh:function(){return la().memoizedState=ss.bind(null,Uo)},useEffectEvent:function(e){var t=la(),n={impl:e};return t.memoizedState=n,function(){if(2&du)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},ms={readContext:Oi,use:fa,useCallback:Xa,useContext:Oi,useEffect:$a,useImperativeHandle:Ga,useInsertionEffect:Ha,useLayoutEffect:qa,useMemo:Ka,useReducer:pa,useRef:Fa,useState:function(){return pa(da)},useDebugValue:Ya,useDeferredValue:function(e,t){return Qa(ua(),Ho.memoizedState,e,t)},useTransition:function(){var e=pa(da)[0],t=ua().memoizedState;return["boolean"==typeof e?e:ca(e),t]},useSyncExternalStore:ma,useId:os,useHostTransitionStatus:is,useFormState:Ma,useActionState:Ma,useOptimistic:function(e,t){return _a(ua(),0,e,t)},useMemoCache:ha,useCacheRefresh:as};ms.useEffectEvent=Ua;var ys={readContext:Oi,use:fa,useCallback:Xa,useContext:Oi,useEffect:$a,useImperativeHandle:Ga,useInsertionEffect:Ha,useLayoutEffect:qa,useMemo:Ka,useReducer:va,useRef:Fa,useState:function(){return va(da)},useDebugValue:Ya,useDeferredValue:function(e,t){var n=ua();return null===Ho?Ja(n,e,t):Qa(n,Ho.memoizedState,e,t)},useTransition:function(){var e=va(da)[0],t=ua().memoizedState;return["boolean"==typeof e?e:ca(e),t]},useSyncExternalStore:ma,useId:os,useHostTransitionStatus:is,useFormState:ja,useActionState:ja,useOptimistic:function(e,t){var n=ua();return null!==Ho?_a(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ha,useCacheRefresh:as};function bs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:d({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}ys.useEffectEvent=Ua;var ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Wu(),i=bo(r);i.payload=t,null!=n&&(i.callback=n),null!==(t=wo(e,i,r))&&(Yu(t,0,r),xo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Wu(),i=bo(r);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=wo(e,i,r))&&(Yu(t,0,r),xo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wu(),r=bo(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=wo(e,r,n))&&(Yu(t,0,n),xo(t,e,n))}};function xs(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&Zn(n,r)&&Zn(i,o))}function ks(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ws.enqueueReplaceState(t,t.state,null)}function Ss(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=d({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}function _s(e){Cr(e)}function Es(e){console.error(e)}function Cs(e){Cr(e)}function As(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ps(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ls(e,t,n){return(n=bo(n)).tag=3,n.payload={element:null},n.callback=function(){As(e,t)},n}function Ts(e){return(e=bo(e)).tag=3,e}function Ns(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"==typeof i){var o=r.value;e.payload=function(){return i(o)},e.callback=function(){Ps(t,n,r)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){Ps(t,n,r),"function"!=typeof i&&(null===ju?ju=new Set([this]):ju.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Os=Error(a(461)),Ms=!1;function Rs(e,t,n,r){t.child=null===e?go(t,null,n,r):po(t,e.child,n,r)}function Ds(e,t,n,r,i){n=n.render;var o=t.ref;if("ref"in r){var a={};for(var s in r)"ref"!==s&&(a[s]=r[s])}else a=r;return Ni(t),r=ta(e,t,n,a,o,i),s=oa(),null===e||Ms?(fi&&s&&ai(t),t.flags|=1,Rs(e,t,r,i),t.child):(aa(e,t,i),il(e,t,i))}function js(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||zr(o)||void 0!==o.defaultProps||null!==n.compare?((e=$r(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Is(e,t,o,r,i))}if(o=e.child,!ol(e,i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Zn)(a,r)&&e.ref===t.ref)return il(e,t,i)}return t.flags|=1,(e=Vr(o,r)).ref=t.ref,e.return=t,t.child=e}function Is(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Zn(o,r)&&e.ref===t.ref){if(Ms=!1,t.pendingProps=r=o,!ol(e,i))return t.lanes=e.lanes,il(e,t,i);131072&e.flags&&(Ms=!0)}}return Hs(e,t,n,r,i)}function Fs(e,t,n,r){var i=r.children,o=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(o=null!==o?o.baseLanes|n:n,null!==e){for(r=t.child=e.child,i=0;null!==r;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~o}else r=0,t.child=null;return Vs(e,t,o,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Vs(e,t,null!==o?o.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Xi(0,null!==o?o.cachePool:null),null!==o?To(t,o):No(),Io(t)}else null!==o?(Xi(0,o.cachePool),To(t,o),Fo(),t.memoizedState=null):(null!==e&&Xi(0,null),No(),Fo());return Rs(e,t,i,n),t.child}function zs(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vs(e,t,n,r,i){var o=Yi();return o=null===o?null:{parent:Fi._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},null!==e&&Xi(0,null),No(),Io(t),null!==e&&Li(e,t,r,!0),t.childLanes=i,null}function Bs(e,t){return(t=Zs({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function $s(e,t,n){return po(t,e.child,null,n),(e=Bs(t,t.pendingProps)).flags|=2,zo(t),t.memoizedState=null,e}function Us(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(a(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Hs(e,t,n,r,i){return Ni(t),n=ta(e,t,n,r,void 0,i),r=oa(),null===e||Ms?(fi&&r&&ai(t),t.flags|=1,Rs(e,t,n,i),t.child):(aa(e,t,i),il(e,t,i))}function qs(e,t,n,r,i,o){return Ni(t),t.updateQueue=null,n=ra(t,r,n,i),na(e),r=oa(),null===e||Ms?(fi&&r&&ai(t),t.flags|=1,Rs(e,t,n,o),t.child):(aa(e,t,o),il(e,t,o))}function Ws(e,t,n,r,i){if(Ni(t),null===t.stateNode){var o=jr,a=n.contextType;"object"==typeof a&&null!==a&&(o=Oi(a)),o=new n(r,o),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=ws,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=r,o.state=t.memoizedState,o.refs={},mo(t),a=n.contextType,o.context="object"==typeof a&&null!==a?Oi(a):jr,o.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(bs(t,n,a,r),o.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(a=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),a!==o.state&&ws.enqueueReplaceState(o,o.state,null),Eo(t,r,o,i),_o(),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){o=t.stateNode;var s=t.memoizedProps,l=Ss(n,s);o.props=l;var u=o.context,c=n.contextType;a=jr,"object"==typeof c&&null!==c&&(a=Oi(c));var f=n.getDerivedStateFromProps;c="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate,s=t.pendingProps!==s,c||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s||u!==a)&&ks(t,o,r,a),vo=!1;var h=t.memoizedState;o.state=h,Eo(t,r,o,i),_o(),u=t.memoizedState,s||h!==u||vo?("function"==typeof f&&(bs(t,n,f,r),u=t.memoizedState),(l=vo||xs(t,n,l,r,h,u,a))?(c||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=a,r=l):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,yo(e,t),c=Ss(n,a=t.memoizedProps),o.props=c,f=t.pendingProps,h=o.context,u=n.contextType,l=jr,"object"==typeof u&&null!==u&&(l=Oi(u)),(u="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==f||h!==l)&&ks(t,o,r,l),vo=!1,h=t.memoizedState,o.state=h,Eo(t,r,o,i),_o();var d=t.memoizedState;a!==f||h!==d||vo||null!==e&&null!==e.dependencies&&Ti(e.dependencies)?("function"==typeof s&&(bs(t,n,s,r),d=t.memoizedState),(c=vo||xs(t,n,c,r,h,d,l)||null!==e&&null!==e.dependencies&&Ti(e.dependencies))?(u||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,d,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,d,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=d),o.props=r,o.state=d,o.context=l,r=c):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,Us(e,t),r=!!(128&t.flags),o||r?(o=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:o.render(),t.flags|=1,null!==e&&r?(t.child=po(t,e.child,null,i),t.child=po(t,null,n,i)):Rs(e,t,n,i),t.memoizedState=o.state,e=t.child):e=il(e,t,i),e}function Gs(e,t,n,r){return bi(),t.flags|=256,Rs(e,t,n,r),t.child}var Ys={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xs(e){return{baseLanes:e,cachePool:Ki()}}function Ks(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Au),e}function Js(e,t,n){var r,i=t.pendingProps,o=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&Vo.current)),r&&(o=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(fi){if(o?Do(t):Fo(),(e=ci)?null!==(e=null!==(e=Nf(e,di))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ti?{id:ni,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},(n=qr(e)).return=t,t.child=n,ui=t,ci=null):e=null,null===e)throw gi(t);return Mf(e)?t.lanes=32:t.lanes=536870912,null}var l=i.children;return i=i.fallback,o?(Fo(),l=Zs({mode:"hidden",children:l},o=t.mode),i=Ur(i,o,n,null),l.return=t,i.return=t,l.sibling=i,t.child=l,(i=t.child).memoizedState=Xs(n),i.childLanes=Ks(e,r,n),t.memoizedState=Ys,zs(null,i)):(Do(t),Qs(t,l))}var u=e.memoizedState;if(null!==u&&null!==(l=u.dehydrated)){if(s)256&t.flags?(Do(t),t.flags&=-257,t=el(e,t,n)):null!==t.memoizedState?(Fo(),t.child=e.child,t.flags|=128,t=null):(Fo(),l=i.fallback,o=t.mode,i=Zs({mode:"visible",children:i.children},o),(l=Ur(l,o,n,null)).flags|=2,i.return=t,l.return=t,i.sibling=l,t.child=i,po(t,e.child,null,n),(i=t.child).memoizedState=Xs(n),i.childLanes=Ks(e,r,n),t.memoizedState=Ys,t=zs(null,i));else if(Do(t),Mf(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var c=r.dgst;r=c,(i=Error(a(419))).stack="",i.digest=r,xi({value:i,source:null,stack:null}),t=el(e,t,n)}else if(Ms||Li(e,t,n,!1),r=0!==(n&e.childLanes),Ms||r){if(null!==(r=pu)&&0!==(i=De(r,n))&&i!==u.retryLane)throw u.retryLane=i,Mr(e,i),Yu(r,0,i),Os;Of(l)||ac(),t=el(e,t,n)}else Of(l)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,ci=Rf(l.nextSibling),ui=t,fi=!0,hi=null,di=!1,null!==e&&li(t,e),(t=Qs(t,i.children)).flags|=4096);return t}return o?(Fo(),l=i.fallback,o=t.mode,c=(u=e.child).sibling,(i=Vr(u,{mode:"hidden",children:i.children})).subtreeFlags=65011712&u.subtreeFlags,null!==c?l=Vr(c,l):(l=Ur(l,o,n,null)).flags|=2,l.return=t,i.return=t,i.sibling=l,t.child=i,zs(null,i),i=t.child,null===(l=e.child.memoizedState)?l=Xs(n):(null!==(o=l.cachePool)?(u=Fi._currentValue,o=o.parent!==u?{parent:u,pool:u}:o):o=Ki(),l={baseLanes:l.baseLanes|n,cachePool:o}),i.memoizedState=l,i.childLanes=Ks(e,r,n),t.memoizedState=Ys,zs(e.child,i)):(Do(t),e=(n=e.child).sibling,(n=Vr(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Qs(e,t){return(t=Zs({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Zs(e,t){return(e=Fr(22,e,null,t)).lanes=0,e}function el(e,t,n){return po(t,e.child,null,n),(e=Qs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ai(e.return,t,n)}function nl(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.treeForkCount=o)}function rl(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;r=r.children;var a=Vo.current,s=!!(2&a);if(s?(a=1&a|2,t.flags|=128):a&=1,B(Vo,a),Rs(e,t,r,n),r=fi?Qr:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tl(e,n,t);else if(19===e.tag)tl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Bo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),nl(t,!1,i,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Bo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}nl(t,!0,n,null,o,r);break;case"together":nl(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function il(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),_u|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Li(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Vr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Vr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ol(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Ti(e))}function al(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ms=!0;else{if(!(ol(e,n)||128&t.flags))return Ms=!1,function(e,t,n){switch(t.tag){case 3:Y(t,t.stateNode.containerInfo),Ei(0,Fi,e.memoizedState.cache),bi();break;case 27:case 5:K(t);break;case 4:Y(t,t.stateNode.containerInfo);break;case 10:Ei(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,jo(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Do(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Js(e,t,n):(Do(t),null!==(e=il(e,t,n))?e.sibling:null);Do(t);break;case 19:var i=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Li(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return rl(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(Vo,Vo.current),r)break;return null;case 22:return t.lanes=0,Fs(e,t,n,t.pendingProps);case 24:Ei(0,Fi,e.memoizedState.cache)}return il(e,t,n)}(e,t,n);Ms=!!(131072&e.flags)}else Ms=!1,fi&&1048576&t.flags&&oi(t,Qr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var i=e.$$typeof;if(i===k){t.tag=11,t=Ds(null,t,e,r,n);break e}if(i===E){t.tag=14,t=js(null,t,e,r,n);break e}}throw t=O(e)||e,Error(a(306,t,""))}zr(e)?(r=Ss(e,r),t.tag=1,t=Ws(null,t,e,r,n)):(t.tag=0,t=Hs(null,t,e,r,n))}return t;case 0:return Hs(e,t,t.type,t.pendingProps,n);case 1:return Ws(e,t,r=t.type,i=Ss(r,t.pendingProps),n);case 3:e:{if(Y(t,t.stateNode.containerInfo),null===e)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,yo(e,t),Eo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ei(0,Fi,r),r!==o.cache&&Pi(t,[Fi],n,!0),_o(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Gs(e,t,r,n);break e}if(r!==i){xi(i=Yr(Error(a(424)),t)),t=Gs(e,t,r,n);break e}for(e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,ci=Rf(e.firstChild),ui=t,fi=!0,hi=null,di=!0,n=go(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(bi(),r===i){t=il(e,t,n);break e}Rs(e,t,r,n)}t=t.child}return t;case 26:return Us(e,t),null===e?(n=Wf(t.type,null,t.pendingProps,null))?t.memoizedState=n:fi||(n=t.type,e=t.pendingProps,(r=mf(W.current).createElement(n))[Be]=t,r[$e]=e,df(r,n,e),et(r),t.stateNode=r):t.memoizedState=Wf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return K(t),null===e&&fi&&(r=t.stateNode=Ff(t.type,t.pendingProps,W.current),ui=t,di=!0,i=ci,Af(t.type)?(Df=i,ci=Rf(r.firstChild)):ci=i),Rs(e,t,t.pendingProps.children,n),Us(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&fi&&((i=r=ci)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ye])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(o=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(o!==i.rel||e.getAttribute("href")!==(null==i.href||""===i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((o=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var o=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===o)return e}if(null===(e=Rf(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,di))?(t.stateNode=r,ui=t,ci=Rf(r.firstChild),di=!1,i=!0):i=!1),i||gi(t)),K(t),i=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,r=o.children,wf(i,o)?r=null:null!==s&&wf(i,s)&&(t.flags|=32),null!==t.memoizedState&&(i=ta(e,t,ia,null,null,n),fh._currentValue=i),Us(e,t),Rs(e,t,r,n),t.child;case 6:return null===e&&fi&&((e=n=ci)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Rf(e.nextSibling)))return null}return e}(n,t.pendingProps,di))?(t.stateNode=n,ui=t,ci=null,e=!0):e=!1),e||gi(t)),null;case 13:return Js(e,t,n);case 4:return Y(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=po(t,null,r,n):Rs(e,t,r,n),t.child;case 11:return Ds(e,t,t.type,t.pendingProps,n);case 7:return Rs(e,t,t.pendingProps,n),t.child;case 8:case 12:return Rs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ei(0,t.type,r.value),Rs(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Ni(t),r=r(i=Oi(i)),t.flags|=1,Rs(e,t,r,n),t.child;case 14:return js(e,t,t.type,t.pendingProps,n);case 15:return Is(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,i=!!(128&t.flags);if(t.flags&=-129,null===e){if(fi){if("hidden"===r.mode)return e=Bs(t,r),t.lanes=536870912,zs(null,e);if(jo(t),(e=ci)?null!==(e=null!==(e=Nf(e,di))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ti?{id:ni,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},(n=qr(e)).return=t,t.child=n,ui=t,ci=null):e=null,null===e)throw gi(t);return t.lanes=536870912,null}return Bs(t,r)}var o=e.memoizedState;if(null!==o){var s=o.dehydrated;if(jo(t),i)if(256&t.flags)t.flags&=-257,t=$s(e,t,n);else{if(null===t.memoizedState)throw Error(a(558));t.child=e.child,t.flags|=128,t=null}else if(Ms||Li(e,t,n,!1),i=0!==(n&e.childLanes),Ms||i){if(null!==(r=pu)&&0!==(s=De(r,n))&&s!==o.retryLane)throw o.retryLane=s,Mr(e,s),Yu(r,0,s),Os;ac(),t=$s(e,t,n)}else e=o.treeContext,ci=Rf(s.nextSibling),ui=t,fi=!0,hi=null,di=!1,null!==e&&li(t,e),(t=Bs(t,r)).flags|=4096;return t}return(e=Vr(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Fs(e,t,n,t.pendingProps);case 24:return Ni(t),r=Oi(Fi),null===e?(null===(i=Yi())&&(i=pu,o=zi(),i.pooledCache=o,o.refCount++,null!==o&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},mo(t),Ei(0,Fi,i)):(0!==(e.lanes&n)&&(yo(e,t),Eo(t,null,null,n),_o()),i=e.memoizedState,o=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),Ei(0,Fi,r)):(r=o.cache,Ei(0,Fi,r),r!==i.cache&&Pi(t,[Fi],n,!0))),Rs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function sl(e){e.flags|=4}function ll(e,t,n,r,i){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&i)===i)if(e.stateNode.complete)e.flags|=8192;else{if(!rc())throw io=eo,Qi;e.flags|=8192}}else e.flags&=-16777217}function ul(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!oh(t)){if(!rc())throw io=eo,Qi;e.flags|=8192}}function cl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Te():536870912,e.lanes|=t,Pu|=t)}function fl(e,t){if(!fi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function hl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=65011712&i.subtreeFlags,r|=65011712&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function dl(e,t,n){var r=t.pendingProps;switch(si(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return hl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ci(Fi),X(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(yi(t)?sl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,wi())),hl(t),null;case 26:var i=t.type,o=t.memoizedState;return null===e?(sl(t),null!==o?(hl(t),ul(t,o)):(hl(t),ll(t,i,0,0,n))):o?o!==e.memoizedState?(sl(t),hl(t),ul(t,o)):(hl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&sl(t),hl(t),ll(t,i,0,0,n)),null;case 27:if(J(t),n=W.current,i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return hl(t),null}e=H.current,yi(t)?vi(t):(e=Ff(i,r,n),t.stateNode=e,sl(t))}return hl(t),null;case 5:if(J(t),i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return hl(t),null}if(o=H.current,yi(t))vi(t);else{var s=mf(W.current);switch(o){case 1:o=s.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:o=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":o=s.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":o=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":(o=s.createElement("div")).innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?s.createElement(i,{is:r.is}):s.createElement(i)}}o[Be]=t,o[$e]=r;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)o.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;e:switch(df(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&sl(t)}}return hl(t),ll(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(e=W.current,yi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=ui))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Be]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||cf(e.nodeValue,n)))||gi(t,!0)}else(e=mf(e).createTextNode(r))[Be]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=yi(t),null!==n){if(null===e){if(!r)throw Error(a(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(a(557));e[Be]=t}else bi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=wi(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(zo(t),t):(zo(t),null);if(128&t.flags)throw Error(a(558))}return hl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=yi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[Be]=t}else bi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),i=!1}else i=wi(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(zo(t),t):(zo(t),null)}return zo(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cl(t,t.updateQueue),hl(t),null);case 4:return X(),null===e&&Zc(t.stateNode.containerInfo),hl(t),null;case 10:return Ci(t.type),hl(t),null;case 19:if(V(Vo),null===(r=t.memoizedState))return hl(t),null;if(i=!!(128&t.flags),null===(o=r.rendering))if(i)fl(r,!1);else{if(0!==Su||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Bo(e))){for(t.flags|=128,fl(r,!1),e=o.updateQueue,t.updateQueue=e,cl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Br(n,e),n=n.sibling;return B(Vo,1&Vo.current|2),fi&&ii(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Ru&&(t.flags|=128,i=!0,fl(r,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=Bo(o))){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,cl(t,e),fl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!fi)return hl(t),null}else 2*le()-r.renderingStartTime>Ru&&536870912!==n&&(t.flags|=128,i=!0,fl(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=Vo.current,B(Vo,i?1&n|2:1&n),fi&&ii(t,r.treeForkCount),e):(hl(t),null);case 22:case 23:return zo(t),Oo(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(hl(t),6&t.subtreeFlags&&(t.flags|=8192)):hl(t),null!==(n=t.updateQueue)&&cl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&V(Gi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ci(Fi),hl(t),null;case 25:case 30:return null}throw Error(a(156,t.tag))}function pl(e,t){switch(si(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ci(Fi),X(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return J(t),null;case 31:if(null!==t.memoizedState){if(zo(t),null===t.alternate)throw Error(a(340));bi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(zo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));bi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return V(Vo),null;case 4:return X(),null;case 10:return Ci(t.type),null;case 22:case 23:return zo(t),Oo(),null!==e&&V(Gi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Ci(Fi),null;default:return null}}function gl(e,t){switch(si(t),t.tag){case 3:Ci(Fi),X();break;case 26:case 27:case 5:J(t);break;case 4:X();break;case 31:null!==t.memoizedState&&zo(t);break;case 13:zo(t);break;case 19:V(Vo);break;case 10:Ci(t.type);break;case 22:case 23:zo(t),Oo(),null!==e&&V(Gi);break;case 24:Ci(Fi)}}function vl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var o=n.create,a=n.inst;r=o(),a.destroy=r}n=n.next}while(n!==i)}}catch(e){Sc(t,t.return,e)}}function ml(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var o=i.next;r=o;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(void 0!==s){a.destroy=void 0,i=t;var l=n,u=s;try{u()}catch(e){Sc(i,l,e)}}}r=r.next}while(r!==o)}}catch(e){Sc(t,t.return,e)}}function yl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ao(t,n)}catch(t){Sc(e,e.return,t)}}}function bl(e,t,n){n.props=Ss(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Sc(e,t,n)}}function wl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(n){Sc(e,t,n)}}function xl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){Sc(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){Sc(e,t,n)}else n.current=null}function kl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Sc(e,e.return,t)}}function Sl(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,o=null,s=null,l=null,u=null,c=null,f=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":u=h;default:r.hasOwnProperty(p)||ff(e,t,p,null,r,h)}}for(var d in r){var p=r[d];if(h=n[d],r.hasOwnProperty(d)&&(null!=p||null!=h))switch(d){case"type":o=p;break;case"name":i=p;break;case"checked":c=p;break;case"defaultChecked":f=p;break;case"value":s=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(a(137,t));break;default:p!==h&&ff(e,t,d,p,r,h)}}return void yt(e,s,l,u,c,f,o,i);case"select":for(o in p=s=l=d=null,n)if(u=n[o],n.hasOwnProperty(o)&&null!=u)switch(o){case"value":break;case"multiple":p=u;default:r.hasOwnProperty(o)||ff(e,t,o,null,r,u)}for(i in r)if(o=r[i],u=n[i],r.hasOwnProperty(i)&&(null!=o||null!=u))switch(i){case"value":d=o;break;case"defaultValue":l=o;break;case"multiple":s=o;default:o!==u&&ff(e,t,i,o,r,u)}return t=l,n=s,r=p,void(null!=d?xt(e,!!n,d,!1):!!r!=!!n&&(null!=t?xt(e,!!n,t,!0):xt(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=d=null,n)if(i=n[l],n.hasOwnProperty(l)&&null!=i&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:ff(e,t,l,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(null!=i||null!=o))switch(s){case"value":d=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(a(91));break;default:i!==o&&ff(e,t,s,i,r,o)}return void kt(e,d,p);case"option":for(var g in n)d=n[g],n.hasOwnProperty(g)&&null!=d&&!r.hasOwnProperty(g)&&("selected"===g?e.selected=!1:ff(e,t,g,null,r,d));for(u in r)d=r[u],p=n[u],!r.hasOwnProperty(u)||d===p||null==d&&null==p||("selected"===u?e.selected=d&&"function"!=typeof d&&"symbol"!=typeof d:ff(e,t,u,d,r,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in n)d=n[v],n.hasOwnProperty(v)&&null!=d&&!r.hasOwnProperty(v)&&ff(e,t,v,null,r,d);for(c in r)if(d=r[c],p=n[c],r.hasOwnProperty(c)&&d!==p&&(null!=d||null!=p))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(a(137,t));break;default:ff(e,t,c,d,r,p)}return;default:if(Pt(t)){for(var m in n)d=n[m],n.hasOwnProperty(m)&&void 0!==d&&!r.hasOwnProperty(m)&&hf(e,t,m,void 0,r,d);for(f in r)d=r[f],p=n[f],!r.hasOwnProperty(f)||d===p||void 0===d&&void 0===p||hf(e,t,f,d,r,p);return}}for(var y in n)d=n[y],n.hasOwnProperty(y)&&null!=d&&!r.hasOwnProperty(y)&&ff(e,t,y,null,r,d);for(h in r)d=r[h],p=n[h],!r.hasOwnProperty(h)||d===p||null==d&&null==p||ff(e,t,h,d,r,p)}(r,e.type,n,t),r[$e]=t}catch(t){Sc(e,e.return,t)}}function _l(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Af(e.type)||4===e.tag}function El(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||_l(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Af(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Ot));else if(4!==r&&(27===r&&Af(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Cl(e,t,n),e=e.sibling;null!==e;)Cl(e,t,n),e=e.sibling}function Al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Af(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Al(e,t,n),e=e.sibling;null!==e;)Al(e,t,n),e=e.sibling}function Pl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);df(t,r,n),t[Be]=e,t[$e]=n}catch(t){Sc(e,e.return,t)}}var Ll=!1,Tl=!1,Nl=!1,Ol="function"==typeof WeakSet?WeakSet:Set,Ml=null;function Rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Yl(e,n),4&r&&vl(5,n);break;case 1:if(Yl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){Sc(n,n.return,e)}else{var i=Ss(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Sc(n,n.return,e)}}64&r&&yl(n),512&r&&wl(n,n.return);break;case 3:if(Yl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Ao(e,t)}catch(e){Sc(n,n.return,e)}}break;case 27:null===t&&4&r&&Pl(n);case 26:case 5:Yl(e,n),null===t&&4&r&&kl(n),512&r&&wl(n,n.return);break;case 12:Yl(e,n);break;case 31:Yl(e,n),4&r&&Vl(e,n);break;case 13:Yl(e,n),4&r&&Bl(e,n),64&r&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Ac.bind(null,n));break;case 22:if(!(r=null!==n.memoizedState||Ll)){t=null!==t&&null!==t.memoizedState||Tl,i=Ll;var o=Tl;Ll=r,(Tl=t)&&!o?Kl(e,n,!!(8772&n.subtreeFlags)):Yl(e,n),Ll=i,Tl=o}break;case 30:break;default:Yl(e,n)}}function Dl(e){var t=e.alternate;null!==t&&(e.alternate=null,Dl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Xe(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var jl=null,Il=!1;function Fl(e,t,n){for(n=n.child;null!==n;)zl(e,t,n),n=n.sibling}function zl(e,t,n){if(ye&&"function"==typeof ye.onCommitFiberUnmount)try{ye.onCommitFiberUnmount(me,n)}catch(e){}switch(n.tag){case 26:Tl||xl(n,t),Fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Tl||xl(n,t);var r=jl,i=Il;Af(n.type)&&(jl=n.stateNode,Il=!1),Fl(e,t,n),zf(n.stateNode),jl=r,Il=i;break;case 5:Tl||xl(n,t);case 6:if(r=jl,i=Il,jl=null,Fl(e,t,n),Il=i,null!==(jl=r))if(Il)try{(9===jl.nodeType?jl.body:"HTML"===jl.nodeName?jl.ownerDocument.body:jl).removeChild(n.stateNode)}catch(e){Sc(n,t,e)}else try{jl.removeChild(n.stateNode)}catch(e){Sc(n,t,e)}break;case 18:null!==jl&&(Il?(Pf(9===(e=jl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),qh(e)):Pf(jl,n.stateNode));break;case 4:r=jl,i=Il,jl=n.stateNode.containerInfo,Il=!0,Fl(e,t,n),jl=r,Il=i;break;case 0:case 11:case 14:case 15:ml(2,n,t),Tl||ml(4,n,t),Fl(e,t,n);break;case 1:Tl||(xl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&bl(n,t,r)),Fl(e,t,n);break;case 21:Fl(e,t,n);break;case 22:Tl=(r=Tl)||null!==n.memoizedState,Fl(e,t,n),Tl=r;break;default:Fl(e,t,n)}}function Vl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{qh(e)}catch(e){Sc(t,t.return,e)}}}function Bl(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{qh(e)}catch(e){Sc(t,t.return,e)}}function $l(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ol),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ol),t;default:throw Error(a(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Pc.bind(null,e,t);t.then(r,r)}})}function Ul(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(Af(l.type)){jl=l.stateNode,Il=!1;break e}break;case 5:jl=l.stateNode,Il=!1;break e;case 3:case 4:jl=l.stateNode.containerInfo,Il=!0;break e}l=l.return}if(null===jl)throw Error(a(160));zl(o,s,i),jl=null,Il=!1,null!==(o=i.alternate)&&(o.return=null),i.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)ql(t,e),t=t.sibling}var Hl=null;function ql(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ul(t,e),Wl(e),4&r&&(ml(3,e,e.return),vl(3,e),ml(5,e,e.return));break;case 1:Ul(t,e),Wl(e),512&r&&(Tl||null===n||xl(n,n.return)),64&r&&Ll&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:var i=Hl;if(Ul(t,e),Wl(e),512&r&&(Tl||null===n||xl(n,n.return)),4&r){var o=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(o=i.getElementsByTagName("title")[0])||o[Ye]||o[Be]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector("head > title"))),df(o,r,n),o[Be]=e,et(o),r=o;break e;case"link":var s=rh("link","href",i).get(r+(n.href||""));if(s)for(var l=0;l<s.length;l++)if((o=s[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(l,1);break t}df(o=i.createElement(r),r,n),i.head.appendChild(o);break;case"meta":if(s=rh("meta","content",i).get(r+(n.content||"")))for(l=0;l<s.length;l++)if((o=s[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(l,1);break t}df(o=i.createElement(r),r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[Be]=e,et(o),r=o}e.stateNode=r}else ih(i,e.type,e.stateNode);else e.stateNode=Qf(i,r,e.memoizedProps);else o!==r?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===r?ih(i,e.type,e.stateNode):Qf(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Sl(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ul(t,e),Wl(e),512&r&&(Tl||null===n||xl(n,n.return)),null!==n&&4&r&&Sl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ul(t,e),Wl(e),512&r&&(Tl||null===n||xl(n,n.return)),32&e.flags){i=e.stateNode;try{_t(i,"")}catch(t){Sc(e,e.return,t)}}4&r&&null!=e.stateNode&&Sl(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(Nl=!0);break;case 6:if(Ul(t,e),Wl(e),4&r){if(null===e.stateNode)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Sc(e,e.return,t)}}break;case 3:if(nh=null,i=Hl,Hl=$f(t.containerInfo),Ul(t,e),Hl=i,Wl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{qh(t.containerInfo)}catch(t){Sc(e,e.return,t)}Nl&&(Nl=!1,Gl(e));break;case 4:r=Hl,Hl=$f(e.stateNode.containerInfo),Ul(t,e),Wl(e),Hl=r;break;case 12:default:Ul(t,e),Wl(e);break;case 31:case 19:Ul(t,e),Wl(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,$l(e,r));break;case 13:Ul(t,e),Wl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Ou=le()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,$l(e,r));break;case 22:i=null!==e.memoizedState;var u=null!==n&&null!==n.memoizedState,c=Ll,f=Tl;if(Ll=c||i,Tl=f||u,Ul(t,e),Tl=f,Ll=c,Wl(e),8192&r)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||u||Ll||Tl||Xl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){u=n=t;try{if(o=u.stateNode,i)"function"==typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{l=u.stateNode;var h=u.memoizedProps.style,d=null!=h&&h.hasOwnProperty("display")?h.display:null;l.style.display=null==d||"boolean"==typeof d?"":(""+d).trim()}}catch(e){Sc(u,u.return,e)}}}else if(6===t.tag){if(null===n){u=t;try{u.stateNode.nodeValue=i?"":u.memoizedProps}catch(e){Sc(u,u.return,e)}}}else if(18===t.tag){if(null===n){u=t;try{var p=u.stateNode;i?Lf(p,!0):Lf(u.stateNode,!1)}catch(e){Sc(u,u.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,$l(e,n));case 30:case 21:}}function Wl(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(_l(r)){n=r;break}r=r.return}if(null==n)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Al(e,El(e),i);break;case 5:var o=n.stateNode;32&n.flags&&(_t(o,""),n.flags&=-33),Al(e,El(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Cl(e,El(e),s);break;default:throw Error(a(161))}}catch(t){Sc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Gl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Gl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Yl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Rl(e,t.alternate,t),t=t.sibling}function Xl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ml(4,t,t.return),Xl(t);break;case 1:xl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&bl(t,t.return,n),Xl(t);break;case 27:zf(t.stateNode);case 26:case 5:xl(t,t.return),Xl(t);break;case 22:null===t.memoizedState&&Xl(t);break;default:Xl(t)}e=e.sibling}}function Kl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,o=t,a=o.flags;switch(o.tag){case 0:case 11:case 15:Kl(i,o,n),vl(4,o);break;case 1:if(Kl(i,o,n),"function"==typeof(i=(r=o).stateNode).componentDidMount)try{i.componentDidMount()}catch(e){Sc(r,r.return,e)}if(null!==(i=(r=o).updateQueue)){var s=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(null!==l)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Co(l[i],s)}catch(e){Sc(r,r.return,e)}}n&&64&a&&yl(o),wl(o,o.return);break;case 27:Pl(o);case 26:case 5:Kl(i,o,n),n&&null===r&&4&a&&kl(o),wl(o,o.return);break;case 12:Kl(i,o,n);break;case 31:Kl(i,o,n),n&&4&a&&Vl(i,o);break;case 13:Kl(i,o,n),n&&4&a&&Bl(i,o);break;case 22:null===o.memoizedState&&Kl(i,o,n),wl(o,o.return);break;case 30:break;default:Kl(i,o,n)}t=t.sibling}}function Jl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Vi(n))}function Ql(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Vi(e))}function Zl(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)eu(e,t,n,r),t=t.sibling}function eu(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Zl(e,t,n,r),2048&i&&vl(9,t);break;case 1:case 31:case 13:default:Zl(e,t,n,r);break;case 3:Zl(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Vi(e)));break;case 12:if(2048&i){Zl(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,a=o.id,s=o.onPostCommit;"function"==typeof s&&s(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){Sc(t,t.return,e)}}else Zl(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,a=t.alternate,null!==t.memoizedState?2&o._visibility?Zl(e,t,n,r):nu(e,t):2&o._visibility?Zl(e,t,n,r):(o._visibility|=2,tu(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&i&&Jl(a,t);break;case 24:Zl(e,t,n,r),2048&i&&Ql(t.alternate,t)}}function tu(e,t,n,r,i){for(i=i&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var o=e,a=t,s=n,l=r,u=a.flags;switch(a.tag){case 0:case 11:case 15:tu(o,a,s,l,i),vl(8,a);break;case 23:break;case 22:var c=a.stateNode;null!==a.memoizedState?2&c._visibility?tu(o,a,s,l,i):nu(o,a):(c._visibility|=2,tu(o,a,s,l,i)),i&&2048&u&&Jl(a.alternate,a);break;case 24:tu(o,a,s,l,i),i&&2048&u&&Ql(a.alternate,a);break;default:tu(o,a,s,l,i)}t=t.sibling}}function nu(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:nu(n,r),2048&i&&Jl(r.alternate,r);break;case 24:nu(n,r),2048&i&&Ql(r.alternate,r);break;default:nu(n,r)}t=t.sibling}}var ru=8192;function iu(e,t,n){if(e.subtreeFlags&ru)for(e=e.child;null!==e;)ou(e,t,n),e=e.sibling}function ou(e,t,n){switch(e.tag){case 26:iu(e,t,n),e.flags&ru&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var i=Gf(r.href),o=t.querySelector(Yf(i));if(o)return null!==(t=o._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=sh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,void et(o);o=t.ownerDocument||t,r=Xf(r),(i=Vf.get(i))&&eh(r,i),et(o=o.createElement("link"));var a=o;a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),df(o,"link",r),n.instance=o}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=sh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Hl,e.memoizedState,e.memoizedProps);break;case 5:default:iu(e,t,n);break;case 3:case 4:var r=Hl;Hl=$f(e.stateNode.containerInfo),iu(e,t,n),Hl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=ru,ru=16777216,iu(e,t,n),ru=r):iu(e,t,n))}}function au(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function su(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Ml=r,cu(r,e)}au(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lu(e),e=e.sibling}function lu(e){switch(e.tag){case 0:case 11:case 15:su(e),2048&e.flags&&ml(9,e,e.return);break;case 3:case 12:default:su(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,uu(e)):su(e)}}function uu(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Ml=r,cu(r,e)}au(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:ml(8,t,t.return),uu(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,uu(t));break;default:uu(t)}e=e.sibling}}function cu(e,t){for(;null!==Ml;){var n=Ml;switch(n.tag){case 0:case 11:case 15:ml(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Vi(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Ml=r;else e:for(n=e;null!==Ml;){var i=(r=Ml).sibling,o=r.return;if(Dl(r),r===n){Ml=null;break e}if(null!==i){i.return=o,Ml=i;break e}Ml=o}}}var fu={getCacheForType:function(e){var t=Oi(Fi),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Oi(Fi).controller.signal}},hu="function"==typeof WeakMap?WeakMap:Map,du=0,pu=null,gu=null,vu=0,mu=0,yu=null,bu=!1,wu=!1,xu=!1,ku=0,Su=0,_u=0,Eu=0,Cu=0,Au=0,Pu=0,Lu=null,Tu=null,Nu=!1,Ou=0,Mu=0,Ru=1/0,Du=null,ju=null,Iu=0,Fu=null,zu=null,Vu=0,Bu=0,$u=null,Uu=null,Hu=0,qu=null;function Wu(){return 2&du&&0!==vu?vu&-vu:null!==R.T?$c():Fe()}function Gu(){if(0===Au)if(536870912&vu&&!fi)Au=536870912;else{var e=_e;!(3932160&(_e<<=1))&&(_e=262144),Au=e}return null!==(e=Mo.current)&&(e.flags|=32),Au}function Yu(e,t,n){(e!==pu||2!==mu&&9!==mu)&&null===e.cancelPendingCommit||(tc(e,0),Qu(e,vu,Au,!1)),Oe(e,n),2&du&&e===pu||(e===pu&&(!(2&du)&&(Eu|=n),4===Su&&Qu(e,vu,Au,!1)),Dc(e))}function Xu(e,t,n){if(6&du)throw Error(a(327));for(var r=!n&&!(127&t)&&0===(t&e.expiredLanes)||Pe(e,t),i=r?function(e,t){var n=du;du|=2;var r=ic(),i=oc();pu!==e||vu!==t?(Du=null,Ru=le()+500,tc(e,t)):wu=Pe(e,t);e:for(;;)try{if(0!==mu&&null!==gu){t=gu;var o=yu;t:switch(mu){case 1:mu=0,yu=null,hc(e,t,o,1);break;case 2:case 9:if(to(o)){mu=0,yu=null,fc(t);break}t=function(){2!==mu&&9!==mu||pu!==e||(mu=7),Dc(e)},o.then(t,t);break e;case 3:mu=7;break e;case 4:mu=5;break e;case 7:to(o)?(mu=0,yu=null,fc(t)):(mu=0,yu=null,hc(e,t,o,7));break;case 5:var s=null;switch(gu.tag){case 26:s=gu.memoizedState;case 5:case 27:var l=gu;if(s?oh(s):l.stateNode.complete){mu=0,yu=null;var u=l.sibling;if(null!==u)gu=u;else{var c=l.return;null!==c?(gu=c,dc(c)):gu=null}break t}}mu=0,yu=null,hc(e,t,o,5);break;case 6:mu=0,yu=null,hc(e,t,o,6);break;case 8:ec(),Su=6;break e;default:throw Error(a(462))}}uc();break}catch(t){nc(e,t)}return _i=Si=null,R.H=r,R.A=i,du=n,null!==gu?0:(pu=null,vu=0,Tr(),Su)}(e,t):sc(e,t,!0),o=r;;){if(0===i){wu&&!r&&Qu(e,t,0,!1);break}if(n=e.current.alternate,!o||Ju(n)){if(2===i){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=0!=(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;i=Lu;var u=l.current.memoizedState.isDehydrated;if(u&&(tc(l,s).flags|=256),2!==(s=sc(l,s,!1))){if(xu&&!u){l.errorRecoveryDisabledLanes|=o,Eu|=o,i=4;break e}o=Tu,Tu=i,null!==o&&(null===Tu?Tu=o:Tu.push.apply(Tu,o))}i=s}if(o=!1,2!==i)continue}}if(1===i){tc(e,0),Qu(e,t,0,!0);break}e:{switch(r=e,o=i){case 0:case 1:throw Error(a(345));case 4:if((4194048&t)!==t)break;case 6:Qu(r,t,Au,!bu);break e;case 2:Tu=null;break;case 3:case 5:break;default:throw Error(a(329))}if((62914560&t)===t&&10<(i=Ou+300-le())){if(Qu(r,t,Au,!bu),0!==Ae(r,0,!0))break e;Vu=t,r.timeoutHandle=kf(Ku.bind(null,r,n,Tu,Du,Nu,t,Au,Eu,Pu,bu,o,"Throttled",-0,0),i)}else Ku(r,n,Tu,Du,Nu,t,Au,Eu,Pu,bu,o,null,-0,0)}break}i=sc(e,t,!1),o=!1}Dc(e)}function Ku(e,t,n,r,i,o,a,s,l,u,c,f,h,d){if(e.timeoutHandle=-1,8192&(f=t.subtreeFlags)||!(16785408&~f)){ou(t,o,f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ot});var p=(62914560&o)===o?Ou-le():(4194048&o)===o?Mu-le():0;if(null!==(p=function(e,t){return e.stylesheets&&0===e.count&&uh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===ah&&(ah=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],o=i.transferSize,a=i.initiatorType,s=i.duration;if(o&&s&&pf(a)){for(a=0,s=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],u=l.startTime;if(u>s)break;var c=l.transferSize,f=l.initiatorType;c&&pf(f)&&(a+=c*((l=l.responseEnd)<s?1:(s-u)/(l-u)))}if(--r,t+=8*(o+a)/(i.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var i=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ah?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}(f,p)))return Vu=o,e.cancelPendingCommit=p(gc.bind(null,e,t,o,n,r,i,a,s,l,c,f,null,h,d)),void Qu(e,o,a,!u)}gc(e,t,o,n,r,i,a,s,l)}function Ju(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Qn(o(),i))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qu(e,t,n,r){t&=~Cu,t&=~Eu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var o=31-we(i),a=1<<o;r[o]=-1,i&=~a}0!==n&&Me(e,n,t)}function Zu(){return!!(6&du)||(jc(0,!1),!1)}function ec(){if(null!==gu){if(0===mu)var e=gu.return;else _i=Si=null,sa(e=gu),so=null,lo=0,e=gu;for(;null!==e;)gl(e.alternate,e),e=e.return;gu=null}}function tc(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,Sf(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Vu=0,ec(),pu=e,gu=n=Vr(e.current,null),vu=t,mu=0,yu=null,bu=!1,wu=Pe(e,t),xu=!1,Pu=Au=Cu=Eu=_u=Su=0,Tu=Lu=null,Nu=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-we(r),o=1<<i;t|=e[i],r&=~o}return ku=t,Tr(),n}function nc(e,t){Uo=null,R.H=gs,t===Ji||t===Zi?(t=oo(),mu=3):t===Qi?(t=oo(),mu=4):mu=t===Os?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,yu=t,null===gu&&(Su=1,As(e,Yr(t,e.current)))}function rc(){var e=Mo.current;return null===e||((4194048&vu)===vu?null===Ro:!!((62914560&vu)===vu||536870912&vu)&&e===Ro)}function ic(){var e=R.H;return R.H=gs,null===e?gs:e}function oc(){var e=R.A;return R.A=fu,e}function ac(){Su=4,bu||(4194048&vu)!==vu&&null!==Mo.current||(wu=!0),!(134217727&_u)&&!(134217727&Eu)||null===pu||Qu(pu,vu,Au,!1)}function sc(e,t,n){var r=du;du|=2;var i=ic(),o=oc();pu===e&&vu===t||(Du=null,tc(e,t)),t=!1;var a=Su;e:for(;;)try{if(0!==mu&&null!==gu){var s=gu,l=yu;switch(mu){case 8:ec(),a=6;break e;case 3:case 2:case 9:case 6:null===Mo.current&&(t=!0);var u=mu;if(mu=0,yu=null,hc(e,s,l,u),n&&wu){a=0;break e}break;default:u=mu,mu=0,yu=null,hc(e,s,l,u)}}lc(),a=Su;break}catch(t){nc(e,t)}return t&&e.shellSuspendCounter++,_i=Si=null,du=r,R.H=i,R.A=o,null===gu&&(pu=null,vu=0,Tr()),a}function lc(){for(;null!==gu;)cc(gu)}function uc(){for(;null!==gu&&!ae();)cc(gu)}function cc(e){var t=al(e.alternate,e,ku);e.memoizedProps=e.pendingProps,null===t?dc(e):gu=t}function fc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qs(n,t,t.pendingProps,t.type,void 0,vu);break;case 11:t=qs(n,t,t.pendingProps,t.type.render,t.ref,vu);break;case 5:sa(t);default:gl(n,t),t=al(n,t=gu=Br(t,ku),ku)}e.memoizedProps=e.pendingProps,null===t?dc(e):gu=t}function hc(e,t,n,r){_i=Si=null,sa(t),so=null,lo=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Li(t,n,i,!0),null!==(n=Mo.current)){switch(n.tag){case 31:case 13:return null===Ro?ac():null===n.alternate&&0===Su&&(Su=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===eo?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),_c(e,r,i)),!1;case 22:return n.flags|=65536,r===eo?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),_c(e,r,i)),!1}throw Error(a(435,n.tag))}return _c(e,r,i),ac(),!1}if(fi)return null!==(t=Mo.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==pi&&xi(Yr(e=Error(a(422),{cause:r}),n))):(r!==pi&&xi(Yr(t=Error(a(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=Yr(r,n),ko(e,i=Ls(e.stateNode,r,i)),4!==Su&&(Su=2)),!1;var o=Error(a(520),{cause:r});if(o=Yr(o,n),null===Lu?Lu=[o]:Lu.push(o),4!==Su&&(Su=2),null===t)return!0;r=Yr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,ko(n,e=Ls(n.stateNode,r,e)),!1;case 1:if(t=n.type,o=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===o||"function"!=typeof o.componentDidCatch||null!==ju&&ju.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,Ns(i=Ts(i),e,n,r),ko(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,vu))return Su=1,As(e,Yr(n,e.current)),void(gu=null)}catch(t){if(null!==i)throw gu=i,t;return Su=1,As(e,Yr(n,e.current)),void(gu=null)}32768&t.flags?(fi||1===r?e=!0:wu||536870912&vu?e=!1:(bu=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=Mo.current)&&13===r.tag&&(r.flags|=16384)),pc(t,e)):dc(t)}function dc(e){var t=e;do{if(32768&t.flags)return void pc(t,bu);e=t.return;var n=dl(t.alternate,t,ku);if(null!==n)return void(gu=n);if(null!==(t=t.sibling))return void(gu=t);gu=t=e}while(null!==t);0===Su&&(Su=5)}function pc(e,t){do{var n=pl(e.alternate,e);if(null!==n)return n.flags&=32767,void(gu=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(gu=e);gu=e=n}while(null!==e);Su=6,gu=null}function gc(e,t,n,r,i,o,s,l,u){e.cancelPendingCommit=null;do{wc()}while(0!==Iu);if(6&du)throw Error(a(327));if(null!==t){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,function(e,t,n,r,i,o){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0<n;){var c=31-we(n),f=1<<c;s[c]=0,l[c]=-1;var h=u[c];if(null!==h)for(u[c]=null,c=0;c<h.length;c++){var d=h[c];null!==d&&(d.lane&=-536870913)}n&=~f}0!==r&&Me(e,r,0),0!==o&&0===i&&0!==e.tag&&(e.suspendedLanes|=o&~(a&~t))}(e,n,o|=Lr,s,l,u),e===pu&&(gu=pu=null,vu=0),zu=t,Fu=e,Vu=n,Bu=o,$u=i,Uu=r,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,ie(he,function(){return xc(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&t.flags),13878&t.subtreeFlags||r){r=R.T,R.T=null,i=D.p,D.p=2,s=du,du|=4;try{!function(e,t){if(e=e.containerInfo,gf=wh,ir(e=rr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.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(e){n=null;break e}var s=0,l=-1,u=-1,c=0,f=0,h=e,d=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==o||0!==r&&3!==h.nodeType||(u=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)d=h,h=p;for(;;){if(h===e)break t;if(d===n&&++c===i&&(l=s),d===o&&++f===r&&(u=s),null!==(p=h.nextSibling))break;d=(h=d).parentNode}h=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(vf={focusedElem:e,selectionRange:n},wh=!1,Ml=t;null!==Ml;)if(e=(t=Ml).child,1028&t.subtreeFlags&&null!==e)e.return=t,Ml=e;else for(;null!==Ml;){switch(o=(t=Ml).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(i=e[n]).ref.impl=i.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==o){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var g=Ss(n.type,i);e=r.getSnapshotBeforeUpdate(g,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Sc(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Tf(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tf(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(a(163))}if(null!==(e=t.sibling)){e.return=t.return,Ml=e;break}Ml=t.return}}(e,t)}finally{du=s,D.p=i,R.T=r}}Iu=1,vc(),mc(),yc()}}function vc(){if(1===Iu){Iu=0;var e=Fu,t=zu,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=R.T,R.T=null;var r=D.p;D.p=2;var i=du;du|=4;try{ql(t,e);var o=vf,a=rr(e.containerInfo),s=o.focusedElem,l=o.selectionRange;if(a!==s&&s&&s.ownerDocument&&nr(s.ownerDocument.documentElement,s)){if(null!==l&&ir(s)){var u=l.start,c=l.end;if(void 0===c&&(c=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(c,s.value.length);else{var f=s.ownerDocument||document,h=f&&f.defaultView||window;if(h.getSelection){var d=h.getSelection(),p=s.textContent.length,g=Math.min(l.start,p),v=void 0===l.end?g:Math.min(l.end,p);!d.extend&&g>v&&(a=v,v=g,g=a);var m=tr(s,g),y=tr(s,v);if(m&&y&&(1!==d.rangeCount||d.anchorNode!==m.node||d.anchorOffset!==m.offset||d.focusNode!==y.node||d.focusOffset!==y.offset)){var b=f.createRange();b.setStart(m.node,m.offset),d.removeAllRanges(),g>v?(d.addRange(b),d.extend(y.node,y.offset)):(b.setEnd(y.node,y.offset),d.addRange(b))}}}}for(f=[],d=s;d=d.parentNode;)1===d.nodeType&&f.push({element:d,left:d.scrollLeft,top:d.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<f.length;s++){var w=f[s];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}wh=!!gf,vf=gf=null}finally{du=i,D.p=r,R.T=n}}e.current=t,Iu=2}}function mc(){if(2===Iu){Iu=0;var e=Fu,t=zu,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=R.T,R.T=null;var r=D.p;D.p=2;var i=du;du|=4;try{Rl(e,t.alternate,t)}finally{du=i,D.p=r,R.T=n}}Iu=3}}function yc(){if(4===Iu||3===Iu){Iu=0,se();var e=Fu,t=zu,n=Vu,r=Uu;10256&t.subtreeFlags||10256&t.flags?Iu=5:(Iu=0,zu=Fu=null,bc(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(ju=null),Ie(n),t=t.stateNode,ye&&"function"==typeof ye.onCommitFiberRoot)try{ye.onCommitFiberRoot(me,t,void 0,!(128&~t.current.flags))}catch(e){}if(null!==r){t=R.T,i=D.p,D.p=2,R.T=null;try{for(var o=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];o(s.value,{componentStack:s.stack})}}finally{R.T=t,D.p=i}}3&Vu&&wc(),Dc(e),i=e.pendingLanes,261930&n&&42&i?e===qu?Hu++:(Hu=0,qu=e):Hu=0,jc(0,!1)}}function bc(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,Vi(t))}function wc(){return vc(),mc(),yc(),xc()}function xc(){if(5!==Iu)return!1;var e=Fu,t=Bu;Bu=0;var n=Ie(Vu),r=R.T,i=D.p;try{D.p=32>n?32:n,R.T=null,n=$u,$u=null;var o=Fu,s=Vu;if(Iu=0,zu=Fu=null,Vu=0,6&du)throw Error(a(331));var l=du;if(du|=4,lu(o.current),eu(o,o.current,s,n),du=l,jc(0,!1),ye&&"function"==typeof ye.onPostCommitFiberRoot)try{ye.onPostCommitFiberRoot(me,o)}catch(e){}return!0}finally{D.p=i,R.T=r,bc(e,t)}}function kc(e,t,n){t=Yr(n,t),null!==(e=wo(e,t=Ls(e.stateNode,t,2),2))&&(Oe(e,2),Dc(e))}function Sc(e,t,n){if(3===e.tag)kc(e,e,n);else for(;null!==t;){if(3===t.tag){kc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ju||!ju.has(r))){e=Yr(n,e),null!==(r=wo(t,n=Ts(2),2))&&(Ns(n,r,t,e),Oe(r,2),Dc(r));break}}t=t.return}}function _c(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hu;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(xu=!0,i.add(n),e=Ec.bind(null,e,t,n),t.then(e,e))}function Ec(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,pu===e&&(vu&n)===n&&(4===Su||3===Su&&(62914560&vu)===vu&&300>le()-Ou?!(2&du)&&tc(e,0):Cu|=n,Pu===vu&&(Pu=0)),Dc(e)}function Cc(e,t){0===t&&(t=Te()),null!==(e=Mr(e,t))&&(Oe(e,t),Dc(e))}function Ac(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cc(e,n)}function Pc(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==r&&r.delete(t),Cc(e,n)}var Lc=null,Tc=null,Nc=!1,Oc=!1,Mc=!1,Rc=0;function Dc(e){e!==Tc&&null===e.next&&(null===Tc?Lc=Tc=e:Tc=Tc.next=e),Oc=!0,Nc||(Nc=!0,Ef(function(){6&du?ie(ce,Ic):Fc()}))}function jc(e,t){if(!Mc&&Oc){Mc=!0;do{for(var n=!1,r=Lc;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var a=r.suspendedLanes,s=r.pingedLanes;o=(1<<31-we(42|e)+1)-1,o=201326741&(o&=i&~(a&~s))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Bc(r,o))}else o=vu,!(3&(o=Ae(r,r===pu?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Pe(r,o)||(n=!0,Bc(r,o));r=r.next}}while(n);Mc=!1}}function Ic(){Fc()}function Fc(){Oc=Nc=!1;var e,t=0;0!==Rc&&((e=window.event)&&"popstate"===e.type?e!==xf&&(xf=e,1):(xf=null,0))&&(t=Rc);for(var n=le(),r=null,i=Lc;null!==i;){var o=i.next,a=zc(i,n);0===a?(i.next=null,null===r?Lc=o:r.next=o,null===o&&(Tc=r)):(r=i,(0!==t||3&a)&&(Oc=!0)),i=o}0!==Iu&&5!==Iu||jc(t,!1),0!==Rc&&(Rc=0)}function zc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-62914561&e.pendingLanes;0<o;){var a=31-we(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=Le(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}if(n=vu,n=Ae(e,e===(t=pu)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===mu||9===mu)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Pe(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&oe(r),Ie(n)){case 2:case 8:n=fe;break;case 32:default:n=he;break;case 268435456:n=pe}return r=Vc.bind(null,e),n=ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&oe(r),e.callbackPriority=2,e.callbackNode=null,2}function Vc(e,t){if(0!==Iu&&5!==Iu)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var r=vu;return 0===(r=Ae(e,e===pu?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Xu(e,r,t),zc(e,le()),null!=e.callbackNode&&e.callbackNode===n?Vc.bind(null,e):null)}function Bc(e,t){if(wc())return null;Xu(e,t,!0)}function $c(){if(0===Rc){var e=Ui;0===e&&(e=Se,!(261888&(Se<<=1))&&(Se=256)),Rc=e}return Rc}function Uc(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Nt(""+e)}function Hc(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var qc=0;qc<_r.length;qc++){var Wc=_r[qc];Er(Wc.toLowerCase(),"on"+(Wc[0].toUpperCase()+Wc.slice(1)))}Er(vr,"onAnimationEnd"),Er(mr,"onAnimationIteration"),Er(yr,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(br,"onTransitionRun"),Er(wr,"onTransitionStart"),Er(xr,"onTransitionCancel"),Er(kr,"onTransitionEnd"),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gc="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(" "),Yc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gc));function Xc(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=u;try{o(i)}catch(e){Cr(e)}i.currentTarget=null,o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=u;try{o(i)}catch(e){Cr(e)}i.currentTarget=null,o=l}}}}function Kc(e,t){var n=t[He];void 0===n&&(n=t[He]=new Set);var r=e+"__bubble";n.has(r)||(ef(t,e,2,!1),n.add(r))}function Jc(e,t,n){var r=0;t&&(r|=4),ef(n,e,r,t)}var Qc="_reactListening"+Math.random().toString(36).slice(2);function Zc(e){if(!e[Qc]){e[Qc]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Yc.has(t)||Jc(t,!1,e),Jc(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Qc]||(t[Qc]=!0,Jc("selectionchange",!1,t))}}function ef(e,t,n,r){switch(Ah(t)){case 2:var i=xh;break;case 8:i=kh;break;default:i=Sh}n=i.bind(null,t,n,e),i=void 0,!$t||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function tf(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&a.stateNode.containerInfo===i)return;a=a.return}for(;null!==s;){if(null===(a=Ke(s)))return;if(5===(u=a.tag)||6===u||26===u||27===u){r=o=a;continue e}s=s.parentNode}}r=r.return}zt(function(){var r=o,i=Rt(n),a=[];e:{var s=Sr.get(e);if(void 0!==s){var u=nn,c=e;switch(e){case"keypress":if(0===Yt(n))break e;case"keydown":case"keyup":u=yn;break;case"focusin":c="focus",u=un;break;case"focusout":c="blur",u=un;break;case"beforeblur":case"afterblur":u=un;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=wn;break;case vr:case mr:case yr:u=cn;break;case kr:u=xn;break;case"scroll":case"scrollend":u=on;break;case"wheel":u=kn;break;case"copy":case"cut":case"paste":u=fn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=bn;break;case"toggle":case"beforetoggle":u=Sn}var f=!!(4&t),h=!f&&("scroll"===e||"scrollend"===e),d=f?null!==s?s+"Capture":null:s;f=[];for(var p,g=r;null!==g;){var v=g;if(p=v.stateNode,5!==(v=v.tag)&&26!==v&&27!==v||null===p||null===d||null!=(v=Vt(g,d))&&f.push(nf(g,v,p)),h)break;g=g.return}0<f.length&&(s=new u(s,c,null,n,i),a.push({event:s,listeners:f}))}}if(!(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Mt||!(c=n.relatedTarget||n.fromElement)||!Ke(c)&&!c[Ue])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?Ke(c):null)&&(h=l(c),f=c.tag,c!==h||5!==f&&27!==f&&6!==f)&&(c=null)):(u=null,c=r),u!==c)){if(f=sn,v="onMouseLeave",d="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(f=bn,v="onPointerLeave",d="onPointerEnter",g="pointer"),h=null==u?s:Qe(u),p=null==c?s:Qe(c),(s=new f(v,g+"leave",u,n,i)).target=h,s.relatedTarget=p,v=null,Ke(i)===r&&((f=new f(d,g+"enter",c,n,i)).target=p,f.relatedTarget=h,v=f),h=v,u&&c)e:{for(f=of,g=c,p=0,v=d=u;v;v=f(v))p++;v=0;for(var m=g;m;m=f(m))v++;for(;0<p-v;)d=f(d),p--;for(;0<v-p;)g=f(g),v--;for(;p--;){if(d===g||null!==g&&d===g.alternate){f=d;break e}d=f(d),g=f(g)}f=null}else f=null;null!==u&&af(a,s,u,f,!1),null!==c&&null!==h&&af(a,h,c,f,!0)}if("select"===(u=(s=r?Qe(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var y=Bn;else if(Dn(s))if($n)y=Jn;else{y=Xn;var b=Yn}else!(u=s.nodeName)||"input"!==u.toLowerCase()||"checkbox"!==s.type&&"radio"!==s.type?r&&Pt(r.elementType)&&(y=Bn):y=Kn;switch(y&&(y=y(e,r))?jn(a,y,n,i):(b&&b(e,s,r),"focusout"===e&&r&&"number"===s.type&&null!=r.memoizedProps.value&&wt(s,"number",s.value)),b=r?Qe(r):window,e){case"focusin":(Dn(b)||"true"===b.contentEditable)&&(ar=b,sr=r,lr=null);break;case"focusout":lr=sr=ar=null;break;case"mousedown":ur=!0;break;case"contextmenu":case"mouseup":case"dragend":ur=!1,cr(a,n,i);break;case"selectionchange":if(or)break;case"keydown":case"keyup":cr(a,n,i)}var w;if(En)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Mn?Nn(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(Pn&&"ko"!==n.locale&&(Mn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Mn&&(w=Gt()):(qt="value"in(Ht=i)?Ht.value:Ht.textContent,Mn=!0)),0<(b=rf(r,x)).length&&(x=new hn(x,e,null,n,i),a.push({event:x,listeners:b}),(w||null!==(w=On(n)))&&(x.data=w))),(w=An?function(e,t){switch(e){case"compositionend":return On(t);case"keypress":return 32!==t.which?null:(Tn=!0,Ln);case"textInput":return(e=t.data)===Ln&&Tn?null:e;default:return null}}(e,n):function(e,t){if(Mn)return"compositionend"===e||!En&&Nn(e,t)?(e=Gt(),Wt=qt=Ht=null,Mn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Pn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(x=rf(r,"onBeforeInput")).length&&(b=new hn("onBeforeInput","beforeinput",null,n,i),a.push({event:b,listeners:x}),b.data=w),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var o=Uc((i[$e]||null).action),a=r.submitter;a&&null!==(t=(t=a[$e]||null)?Uc(t.formAction):a.getAttribute("formAction"))&&(o=t,a=null);var s=new nn("action","action",null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Rc){var e=a?Hc(i,a):new FormData(i);ts(n,{pending:!0,data:e,method:i.method,action:o},null,e)}}else"function"==typeof o&&(s.preventDefault(),e=a?Hc(i,a):new FormData(i),ts(n,{pending:!0,data:e,method:i.method,action:o},o,e))},currentTarget:i}]})}}(a,e,r,n,i)}Xc(a,t)})}function nf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rf(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===o||(null!=(i=Vt(e,n))&&r.unshift(nf(e,i,o)),null!=(i=Vt(e,t))&&r.push(nf(e,i,o))),3===e.tag)return r;e=e.return}return[]}function of(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function af(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===u||(l=u,i?null!=(u=Vt(n,o))&&a.unshift(nf(n,u,l)):i||null!=(u=Vt(n,o))&&a.push(nf(n,u,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var sf=/\r\n?/g,lf=/\u0000|\uFFFD/g;function uf(e){return("string"==typeof e?e:""+e).replace(sf,"\n").replace(lf,"")}function cf(e,t){return t=uf(t),uf(e)===t}function ff(e,t,n,r,i,o){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||_t(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&_t(e,""+r);break;case"className":ut(e,"class",r);break;case"tabIndex":ut(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ut(e,n,r);break;case"style":At(e,r,o);break;case"data":if("object"!==t){ut(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Nt(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof o&&("formAction"===n?("input"!==t&&ff(e,t,"name",i.name,i,null),ff(e,t,"formEncType",i.formEncType,i,null),ff(e,t,"formMethod",i.formMethod,i,null),ff(e,t,"formTarget",i.formTarget,i,null)):(ff(e,t,"encType",i.encType,i,null),ff(e,t,"method",i.method,i,null),ff(e,t,"target",i.target,i,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Nt(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Ot);break;case"onScroll":null!=r&&Kc("scroll",e);break;case"onScrollEnd":null!=r&&Kc("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(a(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=Nt(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Kc("beforetoggle",e),Kc("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ct(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ct(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ct(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ct(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ct(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ct(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ct(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ct(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ct(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&lt(e,n=Lt.get(n)||n,r)}}function hf(e,t,n,r,i,o){switch(n){case"style":At(e,r,o);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(a(60));e.innerHTML=n}}break;case"children":"string"==typeof r?_t(e,r):("number"==typeof r||"bigint"==typeof r)&&_t(e,""+r);break;case"onScroll":null!=r&&Kc("scroll",e);break;case"onScrollEnd":null!=r&&Kc("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Ot);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"==typeof(o=null!=(o=e[$e]||null)?o[n]:null)&&e.removeEventListener(t,o,i),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!=typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function df(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Kc("error",e),Kc("load",e);var r,i=!1,o=!1;for(r in n)if(n.hasOwnProperty(r)){var s=n[r];if(null!=s)switch(r){case"src":i=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:ff(e,t,r,s,n,null)}}return o&&ff(e,t,"srcSet",n.srcSet,n,null),void(i&&ff(e,t,"src",n.src,n,null));case"input":Kc("invalid",e);var l=r=s=o=null,u=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var f=n[i];if(null!=f)switch(i){case"name":o=f;break;case"type":s=f;break;case"checked":u=f;break;case"defaultChecked":c=f;break;case"value":r=f;break;case"defaultValue":l=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(a(137,t));break;default:ff(e,t,i,f,n,null)}}return void bt(e,r,l,u,c,s,o,!1);case"select":for(o in Kc("invalid",e),i=s=r=null,n)if(n.hasOwnProperty(o)&&null!=(l=n[o]))switch(o){case"value":r=l;break;case"defaultValue":s=l;break;case"multiple":i=l;default:ff(e,t,o,l,n,null)}return t=r,n=s,e.multiple=!!i,void(null!=t?xt(e,!!i,t,!1):null!=n&&xt(e,!!i,n,!0));case"textarea":for(s in Kc("invalid",e),r=o=i=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":i=l;break;case"defaultValue":o=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(a(91));break;default:ff(e,t,s,l,n,null)}return void St(e,i,o,r);case"option":for(u in n)n.hasOwnProperty(u)&&null!=(i=n[u])&&("selected"===u?e.selected=i&&"function"!=typeof i&&"symbol"!=typeof i:ff(e,t,u,i,n,null));return;case"dialog":Kc("beforetoggle",e),Kc("toggle",e),Kc("cancel",e),Kc("close",e);break;case"iframe":case"object":Kc("load",e);break;case"video":case"audio":for(i=0;i<Gc.length;i++)Kc(Gc[i],e);break;case"image":Kc("error",e),Kc("load",e);break;case"details":Kc("toggle",e);break;case"embed":case"source":case"link":Kc("error",e),Kc("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:ff(e,t,c,i,n,null)}return;default:if(Pt(t)){for(f in n)n.hasOwnProperty(f)&&void 0!==(i=n[f])&&hf(e,t,f,i,n,void 0);return}}for(l in n)n.hasOwnProperty(l)&&null!=(i=n[l])&&ff(e,t,l,i,n,null)}function pf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var gf=null,vf=null;function mf(e){return 9===e.nodeType?e:e.ownerDocument}function yf(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bf(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function wf(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var xf=null,kf="function"==typeof setTimeout?setTimeout:void 0,Sf="function"==typeof clearTimeout?clearTimeout:void 0,_f="function"==typeof Promise?Promise:void 0,Ef="function"==typeof queueMicrotask?queueMicrotask:void 0!==_f?function(e){return _f.resolve(null).then(e).catch(Cf)}:kf;function Cf(e){setTimeout(function(){throw e})}function Af(e){return"head"===e}function Pf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)||"/&"===n){if(0===r)return e.removeChild(i),void qh(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)zf(e.ownerDocument.documentElement);else if("head"===n){zf(n=e.ownerDocument.head);for(var o=n.firstChild;o;){var a=o.nextSibling,s=o.nodeName;o[Ye]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===o.rel.toLowerCase()||n.removeChild(o),o=a}}else"body"===n&&zf(e.ownerDocument.body);n=i}while(n);qh(t)}function Lf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Tf(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Tf(n),Xe(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Nf(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Rf(e.nextSibling)))return null}return e}function Of(e){return"$?"===e.data||"$~"===e.data}function Mf(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Rf(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Df=null;function jf(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Rf(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function If(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Ff(e,t,n){switch(t=mf(n),e){case"html":if(!(e=t.documentElement))throw Error(a(452));return e;case"head":if(!(e=t.head))throw Error(a(453));return e;case"body":if(!(e=t.body))throw Error(a(454));return e;default:throw Error(a(451))}}function zf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xe(e)}var Vf=new Map,Bf=new Set;function $f(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Uf=D.d;D.d={f:function(){var e=Uf.f(),t=Zu();return e||t},r:function(e){var t=Je(e);null!==t&&5===t.tag&&"form"===t.type?rs(t):Uf.r(e)},D:function(e){Uf.D(e),qf("dns-prefetch",e,null)},C:function(e,t){Uf.C(e,t),qf("preconnect",e,t)},L:function(e,t,n){Uf.L(e,t,n);var r=Hf;if(r&&e&&t){var i='link[rel="preload"][as="'+mt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+mt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(i+='[imagesizes="'+mt(n.imageSizes)+'"]')):i+='[href="'+mt(e)+'"]';var o=i;switch(t){case"style":o=Gf(e);break;case"script":o=Kf(e)}Vf.has(o)||(e=d({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Vf.set(o,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(Yf(o))||"script"===t&&r.querySelector(Jf(o))||(df(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){Uf.m(e,t);var n=Hf;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+mt(r)+'"][href="'+mt(e)+'"]',o=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Kf(e)}if(!Vf.has(o)&&(e=d({rel:"modulepreload",href:e},t),Vf.set(o,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Jf(o)))return}df(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){Uf.X(e,t);var n=Hf;if(n&&e){var r=Ze(n).hoistableScripts,i=Kf(e),o=r.get(i);o||((o=n.querySelector(Jf(i)))||(e=d({src:e,async:!0},t),(t=Vf.get(i))&&th(e,t),et(o=n.createElement("script")),df(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}},S:function(e,t,n){Uf.S(e,t,n);var r=Hf;if(r&&e){var i=Ze(r).hoistableStyles,o=Gf(e);t=t||"default";var a=i.get(o);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(Yf(o)))s.loading=5;else{e=d({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Vf.get(o))&&eh(e,n);var l=a=r.createElement("link");et(l),df(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Zf(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},i.set(o,a)}}},M:function(e,t){Uf.M(e,t);var n=Hf;if(n&&e){var r=Ze(n).hoistableScripts,i=Kf(e),o=r.get(i);o||((o=n.querySelector(Jf(i)))||(e=d({src:e,async:!0,type:"module"},t),(t=Vf.get(i))&&th(e,t),et(o=n.createElement("script")),df(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}};var Hf="undefined"==typeof document?null:document;function qf(e,t,n){var r=Hf;if(r&&"string"==typeof t&&t){var i=mt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"==typeof n&&(i+='[crossorigin="'+n+'"]'),Bf.has(i)||(Bf.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(df(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function Wf(e,t,n,r){var i,o,s,l,u=(u=W.current)?$f(u):null;if(!u)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Gf(n.href),(r=(n=Ze(u).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Gf(n.href);var c=Ze(u).hoistableStyles,f=c.get(e);if(f||(u=u.ownerDocument||u,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,f),(c=u.querySelector(Yf(e)))&&!c._p&&(f.instance=c,f.state.loading=5),Vf.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Vf.set(e,n),c||(i=u,o=e,s=n,l=f.state,i.querySelector('link[rel="preload"][as="style"]['+o+"]")?l.loading=1:(o=i.createElement("link"),l.preload=o,o.addEventListener("load",function(){return l.loading|=1}),o.addEventListener("error",function(){return l.loading|=2}),df(o,"link",s),et(o),i.head.appendChild(o))))),t&&null===r)throw Error(a(528,""));return f}if(t&&null!==r)throw Error(a(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Kf(n),(r=(n=Ze(u).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Gf(e){return'href="'+mt(e)+'"'}function Yf(e){return'link[rel="stylesheet"]['+e+"]"}function Xf(e){return d({},e,{"data-precedence":e.precedence,precedence:null})}function Kf(e){return'[src="'+mt(e)+'"]'}function Jf(e){return"script[async]"+e}function Qf(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+mt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var i=d({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),df(r,"style",i),Zf(r,n.precedence,e),t.instance=r;case"stylesheet":i=Gf(n.href);var o=e.querySelector(Yf(i));if(o)return t.state.loading|=4,t.instance=o,et(o),o;r=Xf(n),(i=Vf.get(i))&&eh(r,i),et(o=(e.ownerDocument||e).createElement("link"));var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),df(o,"link",r),t.state.loading|=4,Zf(o,n.precedence,e),t.instance=o;case"script":return o=Kf(n.src),(i=e.querySelector(Jf(o)))?(t.instance=i,et(i),i):(r=n,(i=Vf.get(o))&&th(r=d({},n),i),et(i=(e=e.ownerDocument||e).createElement("script")),df(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(a(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Zf(r,n.precedence,e));return t.instance}function Zf(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,o=i,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)o=s;else if(o!==i)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function eh(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function th(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var nh=null;function rh(e,t,n){if(null===nh){var r=new Map,i=nh=new Map;i.set(n,r)}else(r=(i=nh).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var o=n[i];if(!(o[Ye]||o[Be]||"link"===e&&"stylesheet"===o.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==o.namespaceURI){var a=o.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(o):r.set(a,[o])}}return r}function ih(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function oh(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var ah=0;function sh(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var lh=null;function uh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,lh=new Map,t.forEach(ch,e),lh=null,sh.call(e))}function ch(e,t){if(!(4&t.state.loading)){var n=lh.get(e);if(n)var r=n.get(null);else{n=new Map,lh.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var a=i[o];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(i=t.instance).getAttribute("data-precedence"),(o=n.get(a)||r)===r&&n.set(null,i),n.set(a,i),this.count++,r=sh.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),o?o.parentNode.insertBefore(i,o.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var fh={$$typeof:x,Provider:null,Consumer:null,_currentValue:j,_currentValue2:j,_threadCount:0};function hh(e,t,n,r,i,o,a,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ne(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ne(0),this.hiddenUpdates=Ne(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=o,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,o,a,s,l,u,c,f){return e=new hh(e,t,n,a,l,u,c,f,s),t=1,!0===o&&(t|=24),o=Fr(3,null,null,t),e.current=o,o.stateNode=e,(t=zi()).refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:t},mo(o),e}function ph(e){return e?e=jr:jr}function gh(e,t,n,r,i,o){i=ph(i),null===r.context?r.context=i:r.pendingContext=i,(r=bo(t)).payload={element:n},null!==(o=void 0===o?null:o)&&(r.callback=o),null!==(n=wo(e,r,t))&&(Yu(n,0,t),xo(n,e,t))}function vh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function mh(e,t){vh(e,t),(e=e.alternate)&&vh(e,t)}function yh(e){if(13===e.tag||31===e.tag){var t=Mr(e,67108864);null!==t&&Yu(t,0,67108864),mh(e,67108864)}}function bh(e){if(13===e.tag||31===e.tag){var t=Wu(),n=Mr(e,t=je(t));null!==n&&Yu(n,0,t),mh(e,t)}}var wh=!0;function xh(e,t,n,r){var i=R.T;R.T=null;var o=D.p;try{D.p=2,Sh(e,t,n,r)}finally{D.p=o,R.T=i}}function kh(e,t,n,r){var i=R.T;R.T=null;var o=D.p;try{D.p=8,Sh(e,t,n,r)}finally{D.p=o,R.T=i}}function Sh(e,t,n,r){if(wh){var i=_h(r);if(null===i)tf(e,t,r,Eh,n),jh(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Lh=Ih(Lh,e,t,n,r,i),!0;case"dragenter":return Th=Ih(Th,e,t,n,r,i),!0;case"mouseover":return Nh=Ih(Nh,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Oh.set(o,Ih(Oh.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Mh.set(o,Ih(Mh.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(jh(e,r),4&t&&-1<Dh.indexOf(e)){for(;null!==i;){var o=Je(i);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var a=Ce(o.pendingLanes);if(0!==a){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-we(a);s.entanglements[1]|=l,a&=~l}Dc(o),!(6&du)&&(Ru=le()+500,jc(0,!1))}}break;case 31:case 13:null!==(s=Mr(o,2))&&Yu(s,0,2),Zu(),mh(o,2)}if(null===(o=_h(r))&&tf(e,t,r,Eh,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else tf(e,t,r,null,n)}}function _h(e){return Ch(e=Rt(e))}var Eh=null;function Ch(e){if(Eh=null,null!==(e=Ke(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=u(t)))return e;e=null}else if(31===n){if(null!==(e=c(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Eh=e,null}function Ah(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ue()){case ce:return 2;case fe:return 8;case he:case de:return 32;case pe:return 268435456;default:return 32}default:return 32}}var Ph=!1,Lh=null,Th=null,Nh=null,Oh=new Map,Mh=new Map,Rh=[],Dh="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".split(" ");function jh(e,t){switch(e){case"focusin":case"focusout":Lh=null;break;case"dragenter":case"dragleave":Th=null;break;case"mouseover":case"mouseout":Nh=null;break;case"pointerover":case"pointerout":Oh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mh.delete(t.pointerId)}}function Ih(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=Je(t))&&yh(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Fh(e){var t=Ke(e.target);if(null!==t){var n=l(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=u(n)))return e.blockedOn=t,void ze(e.priority,function(){bh(n)})}else if(31===t){if(null!==(t=c(n)))return e.blockedOn=t,void ze(e.priority,function(){bh(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=_h(e.nativeEvent);if(null!==n)return null!==(t=Je(n))&&yh(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Mt=r,n.target.dispatchEvent(r),Mt=null,t.shift()}return!0}function Vh(e,t,n){zh(e)&&n.delete(t)}function Bh(){Ph=!1,null!==Lh&&zh(Lh)&&(Lh=null),null!==Th&&zh(Th)&&(Th=null),null!==Nh&&zh(Nh)&&(Nh=null),Oh.forEach(Vh),Mh.forEach(Vh)}function $h(e,t){e.blockedOn===t&&(e.blockedOn=null,Ph||(Ph=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Bh)))}var Uh=null;function Hh(e){Uh!==e&&(Uh=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Uh===e&&(Uh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!=typeof r){if(null===Ch(r||n))continue;break}var o=Je(n);null!==o&&(e.splice(t,3),t-=3,ts(o,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function qh(e){function t(t){return $h(t,e)}null!==Lh&&$h(Lh,e),null!==Th&&$h(Th,e),null!==Nh&&$h(Nh,e),Oh.forEach(t),Mh.forEach(t);for(var n=0;n<Rh.length;n++){var r=Rh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Rh.length&&null===(n=Rh[0]).blockedOn;)Fh(n),null===n.blockedOn&&Rh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],a=i[$e]||null;if("function"==typeof o)a||Hh(n);else if(a){var s=null;if(o&&o.hasAttribute("formAction")){if(i=o,a=o[$e]||null)s=a.formAction;else if(null!==Ch(i))continue}else s=a.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),Hh(n)}}}function Wh(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==i&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==i&&(i(),i=null)}}}function Gh(e){this._internalRoot=e}function Yh(e){this._internalRoot=e}Yh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));gh(t.current,Wu(),e,t,null,null)},Yh.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;gh(e.current,2,null,e,null,null),Zu(),t[Ue]=null}},Yh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rh.length&&0!==t&&t<Rh[n].priority;n++);Rh.splice(n,0,e),0===n&&Fh(e)}};var Xh=i.version;if("19.2.3"!==Xh)throw Error(a(527,Xh,"19.2.3"));D.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){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 f(i),e;if(o===r)return f(i),t;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?e:t}(t),null===(e=null!==e?h(e):null)?null:e.stateNode};var Kh={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.3"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{me=Jh.inject(Kh),ye=Jh}catch(e){}}t.createRoot=function(e,t){if(!s(e))throw Error(a(299));var n=!1,r="",i=_s,o=Es,l=Cs;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(o=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=dh(e,1,!1,null,0,n,r,null,i,o,l,Wh),e[Ue]=t.current,Zc(e),new Gh(t)},t.hydrateRoot=function(e,t,n){if(!s(e))throw Error(a(299));var r=!1,i="",o=_s,l=Es,u=Cs,c=null;return null!=n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onUncaughtError&&(o=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(u=n.onRecoverableError),void 0!==n.formState&&(c=n.formState)),(t=dh(e,1,!0,t,0,r,i,c,o,l,u,Wh)).context=ph(null),n=t.current,(i=bo(r=je(r=Wu()))).callback=null,wo(n,i,r),n=r,t.current.lanes=n,Oe(t,n),Dc(t),e[Ue]=t.current,Zc(e),new Yh(t)},t.version="19.2.3"},1331:(e,t,n)=>{var r=n(2552),i=n(8879),o=n(346),a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1391:(e,t,n)=>{var r,i,o;o="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g,r=[n(4523),n(4692),t],i=function(e,t,n){o.Backbone=function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.4.1",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var a,s=t.Events={},l=/\s+/,u=function(e,t,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)t=u(e,t,a[s],r[a[s]],o)}else if(r&&l.test(r))for(a=r.split(l);s<a.length;s++)t=e(t,a[s],i,o);else t=e(t,r,i,o);return t};s.on=function(e,t,n){return this._events=u(c,this._events||{},e,t,{context:n,ctx:this,listening:a}),a&&((this._listeners||(this._listeners={}))[a.id]=a,a.interop=!1),this},s.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),s=a=o[i];s||(this._listenId||(this._listenId=n.uniqueId("l")),s=a=o[i]=new v(this,e));var l=f(e,t,r,this);if(a=void 0,l)throw l;return s.interop&&s.on(t,r),this};var c=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return e},f=function(e,t,n,r){try{e.on(t,n,r)}catch(e){return e}};s.off=function(e,t,n){return this._events?(this._events=u(h,this._events,e,t,{context:n,listeners:this._listeners}),this):this},s.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(t,r,this),s.interop&&s.off(t,r)}return n.isEmpty(i)&&(this._listeningTo=void 0),this};var h=function(e,t,r,i){if(e){var o,a=i.context,s=i.listeners,l=0;if(t||a||r){for(o=t?[t]:n.keys(e);l<o.length;l++){var u=e[t=o[l]];if(!u)break;for(var c=[],f=0;f<u.length;f++){var h=u[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(t,r)}}c.length?e[t]=c:delete e[t]}return e}for(o=n.keys(s);l<o.length;l++)s[o[l]].cleanup()}};s.once=function(e,t,n){var r=u(d,{},e,t,this.off.bind(this));return"string"==typeof e&&null==n&&(t=void 0),this.on(r,t,n)},s.listenToOnce=function(e,t,n){var r=u(d,{},t,n,this.stopListening.bind(this,e));return this.listenTo(e,r)};var d=function(e,t,r,i){if(r){var o=e[t]=n.once(function(){i(t,o),r.apply(this,arguments)});o._callback=r}return e};s.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return u(p,this._events,e,void 0,n),this};var p=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&g(i,r),o&&g(o,[t].concat(r))}return e},g=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}},v=function(e,t){this.id=e._listenId,this.listener=e,this.obj=t,this.interop=!0,this.count=0,this._events=void 0};v.prototype.on=s.on,v.prototype.off=function(e,t){var n;this.interop?(this._events=u(h,this._events,e,t,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},v.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},s.bind=s.on,s.unbind=s.off,n.extend(t,s);var m=t.Model=function(e,t){var r=e||{};t||(t={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(m.prototype,s,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if("object"==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var u=this.attributes,c=this.changed,f=this._previousAttributes;for(var h in i)t=i[h],n.isEqual(u[h],t)||s.push(h),n.isEqual(f[h],t)?delete c[h]:c[h]=t,o?delete u[h]:u[h]=t;if(this.idAttribute in i){var d=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,d,r)}if(!a){s.length&&(this._pending=r);for(var p=0;p<s.length;p++)this.trigger("change:"+s[p],this,u[s[p]],r)}if(l)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t,r=this._changing?this._previousAttributes:this.attributes,i={};for(var o in e){var a=e[o];n.isEqual(r[o],a)||(i[o]=a,t=!0)}return!!t&&i},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;if(!t.set(i,e))return!1;r&&r.call(e.context,t,n,e),t.trigger("sync",t,n,e)},H(this,e),this.sync("read",this,e)},save:function(e,t,r){var i;null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t;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 a=this,s=r.success,l=this.attributes;r.success=function(e){a.attributes=l;var t=r.parse?a.parse(e,r):e;if(o&&(t=n.extend({},i,t)),t&&!a.set(t,r))return!1;s&&s.call(r.context,a,e,r),a.trigger("sync",a,e,r)},H(this,r),i&&o&&(this.attributes=n.extend({},l,i));var u=this.isNew()?"create":r.patch?"patch":"update";"patch"!==u||r.attrs||(r.attrs=i);var c=this.sync(u,this,r);return this.attributes=l,c},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var a=!1;return this.isNew()?n.defer(e.success):(H(this,e),a=this.sync("delete",this,e)),i||o(),a},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||U();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}});var y=t.Collection=function(e,t){t||(t={}),this.preinitialize.apply(this,arguments),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},b={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},x=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,i=Array(e.length-n),o=t.length;for(r=0;r<i.length;r++)i[r]=e[r+n];for(r=0;r<o;r++)e[r+n]=t[r];for(r=0;r<i.length;r++)e[r+o+n]=i[r]};n.extend(y.prototype,s,{model:m,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,w))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var i=this._removeModels(e,t);return!t.silent&&i.length&&(t.changes={added:[],merged:[],removed:i},this.trigger("update",this,t)),r?i[0]:i},set:function(e,t){if(null!=e){(t=n.extend({},b,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],l=[],u=[],c=[],f={},h=t.add,d=t.merge,p=t.remove,g=!1,v=this.comparator&&null==i&&!1!==t.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a<e.length;a++){o=e[a];var y=this.get(o);if(y){if(d&&o!==y){var w=this._isModel(o)?o.attributes:o;t.parse&&(w=y.parse(w,t)),y.set(w,t),u.push(y),v&&!g&&(g=y.hasChanged(m))}f[y.cid]||(f[y.cid]=!0,s.push(y)),e[a]=y}else h&&(o=e[a]=this._prepareModel(o,t))&&(l.push(o),this._addReference(o,t),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,t)}var k=!1,S=!v&&h&&p;if(s.length&&S?(k=this.length!==s.length||n.some(this.models,function(e,t){return e!==s[t]}),this.models.length=0,x(this.models,s,0),this.length=this.models.length):l.length&&(v&&(g=!0),x(this.models,l,null==i?this.length:i),this.length=this.models.length),g&&this.sort({silent:!0}),!t.silent){for(a=0;a<l.length;a++)null!=i&&(t.index=i+a),(o=l[a]).trigger("add",o,this,t);(g||k)&&this.trigger("sort",this,t),(l.length||c.length||u.length)&&(t.changes={added:l,removed:c,merged:u},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(this._isModel(e)?e.attributes:e,e.idAttribute)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=t.bind(this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},H(this,e),this.sync("read",this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e,t){return e[t||this.model.prototype.idAttribute||"id"]},values:function(){return new S(this,_)},keys:function(){return new S(this,E)},entries:function(){return new S(this,C)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){return this._isModel(e)?(e.collection||(e.collection=this),e):((t=t?n.clone(t):{}).collection=this,(r=this.model.prototype?new this.model(e,t):this.model(e,t)).validationError?(this.trigger("invalid",this,r.validationError,t),!1):r);var r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[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],t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}}return n},_isModel:function(e){return e instanceof m},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes,e.idAttribute);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes,e.idAttribute);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"changeId"===e){var i=this.modelId(t.previousAttributes(),t.idAttribute),o=this.modelId(t.attributes,t.idAttribute);null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t)}}this.trigger.apply(this,arguments)}});var k="function"==typeof Symbol&&Symbol.iterator;k&&(y.prototype[k]=y.prototype.values);var S=function(e,t){this._collection=e,this._kind=t,this._index=0},_=1,E=2,C=3;k&&(S.prototype[k]=function(){return this}),S.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var e,t=this._collection.at(this._index);if(this._index++,this._kind===_)e=t;else{var n=this._collection.modelId(t.attributes,t.idAttribute);e=this._kind===E?n:[n,t]}return{value:e,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var A=t.View=function(e){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(e,L)),this._ensureElement(),this.initialize.apply(this,arguments)},P=/^(\S+)\s*(.*)$/,L=["model","collection","el","id","attributes","className","tagName","events"];n.extend(A.prototype,s,{tagName:"div",$:function(e){return this.$el.find(e)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(P);this.delegate(i[1],i[2],r.bind(this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}});var T=function(e,t,r,i){n.each(r,function(n,r){t[r]&&(e.prototype[r]=function(e,t,n,r){switch(t){case 1:return function(){return e[n](this[r])};case 2:return function(t){return e[n](this[r],t)};case 3:return function(t,i){return e[n](this[r],N(t,this),i)};case 4:return function(t,i,o){return e[n](this[r],N(t,this),i,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[r]),e[n].apply(e,t)}}}(t,n,r,i))})},N=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?O(e):n.isString(e)?function(t){return t.get(e)}:e},O=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}};n.each([[y,{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"],[m,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],function(e){var t=e[0],r=e[1],i=e[2];t.mixin=function(e){var r=n.reduce(n.functions(e),function(e,t){return e[t]=0,e},{});T(t,e,r,i)},T(t,n,r,i)}),t.sync=function(e,r,i){var o=M[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||U()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(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(e){if(e.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var l=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,l&&l.call(i.context,e,t,n)};var u=i.xhr=t.ajax(n.extend(a,i));return r.trigger("request",r,u,i),u};var M={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var R=t.Router=function(e){e||(e={}),this.preinitialize.apply(this,arguments),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},D=/\((.*?)\)/g,j=/(\(\?)?:\w+/g,I=/\*\w+/g,F=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(R.prototype,s,{preinitialize:function(){},initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,function(n){var a=o._extractParameters(e,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),t.history.trigger("route",o,r,a))}),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(F,"\\$&").replace(D,"(?:$1)?").replace(j,function(e,t){return t?e:"([^/?]+)"}).replace(I,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var z=t.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},V=/^[#\/]|\s+$/g,B=/^\/+|\/+$/g,$=/#.*$/;z.started=!1,n.extend(z.prototype,s,{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(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(V,"")},start:function(e){if(z.started)throw new Error("Backbone.history has already been started");if(z.started=!0,this.options=n.extend({root:"/"},this.options,e),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(B,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+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(e,t){return attachEvent("on"+e,t)};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 e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),z.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0}))},navigate:function(e,t){if(!z.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;e=e.replace($,"");var i=this.decodeFragment(e);if(this.fragment!==i){if(this.fragment=i,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var o=this.iframe.contentWindow;t.replace||(o.document.open(),o.document.close()),this._updateHash(o.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new z;m.extend=y.extend=R.extend=A.extend=z.extend=function(e,t){var r,i=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t),r.prototype=n.create(i.prototype,e),r.prototype.constructor=r,r.__super__=i.prototype,r};var U=function(){throw new Error('A "url" property or function must be specified')},H=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t}(o,n,e,t)}.apply(t,r),void 0===i||(e.exports=i)},1420:(e,t,n)=>{var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},1448:(e,t,n)=>{var r=n(426),i=n(9326);e.exports=function(e,t){return null!=e&&i(e,t,r)}},1453:(e,t,n)=>{"use strict";var r=n(6857),i=n(8918),o=n(6639),a=n(4520),s=n(7860),l=n(4384),u=n(8191).Graph,c=n(3988);function f(e,t,n){return r.map(t,function(t){return s(e,t,n)})}function h(e,t){var n=new u;r.forEach(e,function(e){var i=e.graph().root,o=a(e,i,n,t);r.forEach(o.vs,function(t,n){e.node(t).order=n}),l(e,n,o.vs)})}function d(e,t){r.forEach(t,function(t){r.forEach(t,function(t,n){e.node(t).order=n})})}e.exports=function(e){var t=c.maxRank(e),n=f(e,r.range(1,t+1),"inEdges"),a=f(e,r.range(t-1,-1,-1),"outEdges"),s=i(e);d(e,s);for(var l,u=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){h(p%2?n:a,p%4>=2),s=c.buildLayerMatrix(e);var v=o(e,s);v<u&&(g=0,l=r.cloneDeep(s),u=v)}d(e,l)}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},1489:(e,t,n)=>{var r=n(7400);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},1549:(e,t,n)=>{var r=n(2032),i=n(3862),o=n(6721),a=n(2749),s=n(5749);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},1667:(e,t,n)=>{e.exports={components:n(3619),dijkstra:n(8905),dijkstraAll:n(4919),findCycles:n(6678),floydWarshall:n(3590),isAcyclic:n(498),postorder:n(1045),preorder:n(6016),prim:n(4423),tarjan:n(6291),topsort:n(7507)}},1684:(e,t,n)=>{var r=n(3599),i=n(6176),o=n(3488);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},1737:(e,t,n)=>{var r=n(117);function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(e){return e.key})},i.prototype.has=function(e){return r.has(this._keyIndices,e)},i.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var i=this._arr,o=i.length;return n[e]=o,i.push({key:e,priority:t}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},i.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},i.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))},i.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},i.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,i=n[e],o=n[t];n[e]=o,n[t]=i,r[o.key]=e,r[i.key]=t}},1769:(e,t,n)=>{var r=n(6449),i=n(8586),o=n(1802),a=n(3222);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},1791:(e,t,n)=>{var r=n(6547),i=n(3360);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var u=t[s],c=o?o(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),a?i(n,u,c):r(n,u,c)}return n}},1799:(e,t,n)=>{var r=n(7217),i=n(270);e.exports=function(e,t,n,o){var a=n.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<s;){var c=(u=n[a])[0],f=e[c],h=u[1];if(l&&u[2]){if(void 0===f&&!(c in e))return!1}else{var d=new r;if(o)var p=o(f,h,c,e,t,d);if(!(void 0===p?i(h,f,3,o,d):p))return!1}}return!0}},1800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1802:(e,t,n)=>{var r=n(2224),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t});e.exports=a},1811:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1873:(e,t,n)=>{var r=n(9325).Symbol;e.exports=r},1882:(e,t,n)=>{var r=n(2552),i=n(3805);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},1986:(e,t,n)=>{var r=n(1873),i=n(7828),o=n(5288),a=n(5911),s=n(317),l=n(4247),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=l),e.size!=t.size&&!p)return!1;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var v=a(d(e),d(t),r,u,f,h);return h.delete(e),v;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},1993:(e,t,n)=>{var r=n(9811),i=n(4460),o=n(7927);e.exports=function(e){return i(e)?o(e):r(e)}},2006:(e,t,n)=>{var r=n(5389),i=n(4894),o=n(5950);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var l=r(n,3);t=o(t),n=function(e){return l(s[e],e,s)}}var u=e(t,n,a);return u>-1?s[l?t[u]:u]:void 0}}},2031:(e,t,n)=>{var r=n(6857),i=n(8191).Graph,o=n(9859);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new i,a=0,s=0;r.forEach(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),r.forEach(e.edges(),function(e){var r=n.edge(e.v,e.w)||0,i=t(e),o=r+i;n.setEdge(e.v,e.w,o),s=Math.max(s,n.node(e.v).out+=i),a=Math.max(a,n.node(e.w).in+=i)});var u=r.range(s+a+3).map(function(){return new o}),c=a+1;return r.forEach(n.nodes(),function(e){l(u,c,n.node(e))}),{graph:n,buckets:u,zeroIdx:c}}(e,t||a),u=function(e,t,n){for(var r,i=[],o=t[t.length-1],a=t[0];e.nodeCount();){for(;r=a.dequeue();)s(e,t,n,r);for(;r=o.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var l=t.length-2;l>0;--l)if(r=t[l].dequeue()){i=i.concat(s(e,t,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,function(t){return e.outEdges(t.v,t.w)}),!0)};var a=r.constant(1);function s(e,t,n,i,o){var a=o?[]:void 0;return r.forEach(e.inEdges(i.v),function(r){var i=e.edge(r),s=e.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,l(t,n,s)}),r.forEach(e.outEdges(i.v),function(r){var i=e.edge(r),o=r.w,a=e.node(o);a.in-=i,l(t,n,a)}),e.removeNode(i.v),a}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},2032:(e,t,n)=>{var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2193:(e,t,n)=>{var r=n(8984),i=n(5861),o=n(2428),a=n(6449),s=n(4894),l=n(3656),u=n(5527),c=n(7167),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},2199:(e,t,n)=>{var r=n(4528),i=n(6449);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},2216:e=>{e.exports=function(e){return void 0===e}},2224:(e,t,n)=>{var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},2271:(e,t,n)=>{var r=n(1791),i=n(4664);e.exports=function(e,t){return r(e,i(e),t)}},2420:(e,t,n)=>{var r=n(6649),i=n(4066),o=n(7241);e.exports=function(e,t){return null==e?e:r(e,i(t),o)}},2428:(e,t,n)=>{var r=n(7534),i=n(346),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},2523:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},2543:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",l=32,u=128,c=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",m="[object Boolean]",y="[object Date]",b="[object Error]",w="[object Function]",x="[object GeneratorFunction]",k="[object Map]",S="[object Number]",_="[object Object]",E="[object Promise]",C="[object RegExp]",A="[object Set]",P="[object String]",L="[object Symbol]",T="[object WeakMap]",N="[object ArrayBuffer]",O="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",D="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",V="[object Uint16Array]",B="[object Uint32Array]",$=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,G=RegExp(q.source),Y=RegExp(W.source),X=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",_e="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Ae="\\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",Pe="["+xe+"]",Le="["+Ae+"]",Te="["+ke+"]",Ne="\\d+",Oe="["+Se+"]",Me="["+_e+"]",Re="[^"+xe+Ae+Ne+Se+_e+Ee+"]",De="\\ud83c[\\udffb-\\udfff]",je="[^"+xe+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Ee+"]",Ve="\\u200d",Be="(?:"+Me+"|"+Re+")",$e="(?:"+ze+"|"+Re+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Te+"|"+De+")?",We="["+Ce+"]?",Ge=We+qe+"(?:"+Ve+"(?:"+[je,Ie,Fe].join("|")+")"+We+qe+")*",Ye="(?:"+[Oe,Ie,Fe].join("|")+")"+Ge,Xe="(?:"+[je+Te+"?",Te,Ie,Fe,Pe].join("|")+")",Ke=RegExp("['’]","g"),Je=RegExp(Te,"g"),Qe=RegExp(De+"(?="+De+")|"+Xe+Ge,"g"),Ze=RegExp([ze+"?"+Me+"+"+Ue+"(?="+[Le,ze,"$"].join("|")+")",$e+"+"+He+"(?="+[Le,ze+Be,"$"].join("|")+")",ze+"?"+Be+"+"+Ue,ze+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Ye].join("|"),"g"),et=RegExp("["+Ve+xe+ke+Ce+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["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"],rt=-1,it={};it[M]=it[R]=it[D]=it[j]=it[I]=it[F]=it[z]=it[V]=it[B]=!0,it[g]=it[v]=it[N]=it[m]=it[O]=it[y]=it[b]=it[w]=it[k]=it[S]=it[_]=it[C]=it[A]=it[P]=it[T]=!1;var ot={};ot[g]=ot[v]=ot[N]=ot[O]=ot[m]=ot[y]=ot[M]=ot[R]=ot[D]=ot[j]=ot[I]=ot[k]=ot[S]=ot[_]=ot[C]=ot[A]=ot[P]=ot[L]=ot[F]=ot[z]=ot[V]=ot[B]=!0,ot[b]=ot[w]=ot[T]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,lt=parseInt,ut="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ct="object"==typeof self&&self&&self.Object===Object&&self,ft=ut||ct||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,gt=pt&&ut.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,yt=vt&&vt.isDate,bt=vt&&vt.isMap,wt=vt&&vt.isRegExp,xt=vt&&vt.isSet,kt=vt&&vt.isTypedArray;function St(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function _t(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Lt(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function Tt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Ot(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Mt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Rt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var jt=Ut("length");function It(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Ft(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function zt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ft(e,Bt,n)}function Vt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Bt(e){return e!=e}function $t(e,t){var n=null==e?0:e.length;return n?Wt(e,t)/n:h}function Ut(e){return function(t){return null==t?i:t[e]}}function Ht(e){return function(t){return null==e?i:e[t]}}function qt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Wt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Yt(e){return e?e.slice(0,hn(e)+1).replace(re,""):e}function Xt(e){return function(t){return e(t)}}function Kt(e,t){return Nt(t,function(t){return e[t]})}function Jt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function Zt(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}var en=Ht({À:"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"}),tn=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function un(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function cn(e){return rn(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):jt(e)}function fn(e){return rn(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function hn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var dn=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),pn=function e(t){var n,r=(t=null==t?ft:pn.defaults(ft.Object(),t,pn.pick(ft,nt))).Array,ie=t.Date,xe=t.Error,ke=t.Function,Se=t.Math,_e=t.Object,Ee=t.RegExp,Ce=t.String,Ae=t.TypeError,Pe=r.prototype,Le=ke.prototype,Te=_e.prototype,Ne=t["__core-js_shared__"],Oe=Le.toString,Me=Te.hasOwnProperty,Re=0,De=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=Te.toString,Ie=Oe.call(_e),Fe=ft._,ze=Ee("^"+Oe.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=pt?t.Buffer:i,Be=t.Symbol,$e=t.Uint8Array,Ue=Ve?Ve.allocUnsafe:i,He=an(_e.getPrototypeOf,_e),qe=_e.create,We=Te.propertyIsEnumerable,Ge=Pe.splice,Ye=Be?Be.isConcatSpreadable:i,Xe=Be?Be.iterator:i,Qe=Be?Be.toStringTag:i,et=function(){try{var e=lo(_e,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ut=ie&&ie.now!==ft.Date.now&&ie.now,ct=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Se.ceil,dt=Se.floor,gt=_e.getOwnPropertySymbols,vt=Ve?Ve.isBuffer:i,jt=t.isFinite,Ht=Pe.join,gn=an(_e.keys,_e),vn=Se.max,mn=Se.min,yn=ie.now,bn=t.parseInt,wn=Se.random,xn=Pe.reverse,kn=lo(t,"DataView"),Sn=lo(t,"Map"),_n=lo(t,"Promise"),En=lo(t,"Set"),Cn=lo(t,"WeakMap"),An=lo(_e,"create"),Pn=Cn&&new Cn,Ln={},Tn=Io(kn),Nn=Io(Sn),On=Io(_n),Mn=Io(En),Rn=Io(Cn),Dn=Be?Be.prototype:i,jn=Dn?Dn.valueOf:i,In=Dn?Dn.toString:i;function Fn(e){if(es(e)&&!Ua(e)&&!(e instanceof $n)){if(e instanceof Bn)return e;if(Me.call(e,"__wrapped__"))return Fo(e)}return new Bn(e)}var zn=function(){function e(){}return function(t){if(!Za(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new Hn(e);this.size=t.size}function Yn(e,t){var n=Ua(e),r=!n&&$a(e),i=!n&&!r&&Ga(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Gt(e.length,Ce):[],l=s.length;for(var u in e)!t&&!Me.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||vo(u,l))||s.push(u);return s}function Xn(e){var t=e.length;return t?e[qr(0,t-1)]:i}function Kn(e,t){return Oo(Ci(e),or(t,0,e.length))}function Jn(e){return Oo(Ci(e))}function Qn(e,t,n){(n!==i&&!za(e[t],n)||n===i&&!(t in e))&&rr(e,t,n)}function Zn(e,t,n){var r=e[t];Me.call(e,t)&&za(r,n)&&(n!==i||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function tr(e,t,n,r){return cr(e,function(e,i,o){t(r,e,n(e),o)}),r}function nr(e,t){return e&&Ai(t,Ts(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,o=t.length,a=r(o),s=null==e;++n<o;)a[n]=s?i:Es(e,t[n]);return a}function or(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,n,r,o,a){var s,l=1&t,u=2&t,c=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!Za(e))return e;var f=Ua(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Ci(e,s)}else{var h=fo(e),d=h==w||h==x;if(Ga(e))return wi(e,l);if(h==_||h==g||d&&!o){if(s=u||d?{}:po(e),!l)return u?function(e,t){return Ai(e,co(e),t)}(e,function(e,t){return e&&Ai(t,Ns(t),e)}(s,e)):function(e,t){return Ai(e,uo(e),t)}(e,nr(s,e))}else{if(!ot[h])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case N:return xi(e);case m:case y:return new i(+e);case O:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case R:case D:case j:case I:case F:case z:case V:case B:return ki(e,n);case k:return new i;case S:case P:return new i(e);case C:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case L:return r=e,jn?_e(jn.call(r)):{}}}(e,h,l)}}a||(a=new Gn);var p=a.get(e);if(p)return p;a.set(e,s),os(e)?e.forEach(function(r){s.add(ar(r,t,n,r,e,a))}):ts(e)&&e.forEach(function(r,i){s.set(i,ar(r,t,n,i,e,a))});var v=f?i:(c?u?to:eo:u?Ns:Ts)(e);return Et(v||e,function(r,i){v&&(r=e[i=r]),Zn(s,i,ar(r,t,n,i,e,a))}),s}function sr(e,t,n){var r=n.length;if(null==e)return!r;for(e=_e(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new Ae(o);return Po(function(){e.apply(i,n)},t)}function ur(e,t,n,r){var i=-1,o=Lt,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Nt(t,Xt(n))),r?(o=Tt,a=!1):t.length>=200&&(o=Jt,a=!1,t=new Wn(t));e:for(;++i<s;){var c=e[i],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f==f){for(var h=u;h--;)if(t[h]===f)continue e;l.push(c)}else o(t,f,r)||l.push(c)}return l}Fn.templateSettings={escape:X,evaluate:K,interpolate:J,variable:"",imports:{_:Fn}},Fn.prototype=Vn.prototype,Fn.prototype.constructor=Fn,Bn.prototype=zn(Vn.prototype),Bn.prototype.constructor=Bn,$n.prototype=zn(Vn.prototype),$n.prototype.constructor=$n,Un.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===a?i:n}return Me.call(t,e)?t[e]:i},Un.prototype.has=function(e){var t=this.__data__;return An?t[e]!==i:Me.call(t,e)},Un.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===i?a:t,this},Hn.prototype.clear=function(){this.__data__=[],this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,0))},Hn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?i:t[n][1]},Hn.prototype.has=function(e){return er(this.__data__,e)>-1},Hn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(Sn||Hn),string:new Un}},qn.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return ao(this,e).get(e)},qn.prototype.has=function(e){return ao(this,e).has(e)},qn.prototype.set=function(e,t){var n=ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Wn.prototype.add=Wn.prototype.push=function(e){return this.__data__.set(e,a),this},Wn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Hn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var cr=Ti(yr),fr=Ti(br,!0);function hr(e,t){var n=!0;return cr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function dr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(l===i?s==s&&!ss(s):n(s,l)))var l=s,u=a}return u}function pr(e,t){var n=[];return cr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function gr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=go),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?gr(s,t-1,n,r,i):Ot(i,s):r||(i[i.length]=s)}return i}var vr=Ni(),mr=Ni(!0);function yr(e,t){return e&&vr(e,t,Ts)}function br(e,t){return e&&mr(e,t,Ts)}function wr(e,t){return Pt(t,function(t){return Ka(e[t])})}function xr(e,t){for(var n=0,r=(t=vi(t,e)).length;null!=e&&n<r;)e=e[jo(t[n++])];return n&&n==r?e:i}function kr(e,t,n){var r=t(e);return Ua(e)?r:Ot(r,n(e))}function Sr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Qe&&Qe in _e(e)?function(e){var t=Me.call(e,Qe),n=e[Qe];try{e[Qe]=i;var r=!0}catch(e){}var o=je.call(e);return r&&(t?e[Qe]=n:delete e[Qe]),o}(e):function(e){return je.call(e)}(e)}function _r(e,t){return e>t}function Er(e,t){return null!=e&&Me.call(e,t)}function Cr(e,t){return null!=e&&t in _e(e)}function Ar(e,t,n){for(var o=n?Tt:Lt,a=e[0].length,s=e.length,l=s,u=r(s),c=1/0,f=[];l--;){var h=e[l];l&&t&&(h=Nt(h,Xt(t))),c=mn(h.length,c),u[l]=!n&&(t||a>=120&&h.length>=120)?new Wn(l&&h):i}h=e[0];var d=-1,p=u[0];e:for(;++d<a&&f.length<c;){var g=h[d],v=t?t(g):g;if(g=n||0!==g?g:0,!(p?Jt(p,v):o(f,v,n))){for(l=s;--l;){var m=u[l];if(!(m?Jt(m,v):o(e[l],v,n)))continue e}p&&p.push(v),f.push(g)}}return f}function Pr(e,t,n){var r=null==(e=Eo(e,t=vi(t,e)))?e:e[jo(Xo(t))];return null==r?i:St(r,e,n)}function Lr(e){return es(e)&&Sr(e)==g}function Tr(e,t,n,r,o){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,n,r,o,a){var s=Ua(e),l=Ua(t),u=s?v:fo(e),c=l?v:fo(t),f=(u=u==g?_:u)==_,h=(c=c==g?_:c)==_,d=u==c;if(d&&Ga(e)){if(!Ga(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Gn),s||ls(e)?Qi(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case m:case y:case S:return za(+e,+t);case b:return e.name==t.name&&e.message==t.message;case C:case P:return e==t+"";case k:var s=on;case A:var l=1&r;if(s||(s=ln),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=Qi(s(e),s(t),r,i,o,a);return a.delete(e),c;case L:if(jn)return jn.call(e)==jn.call(t)}return!1}(e,t,u,n,r,o,a);if(!(1&n)){var p=f&&Me.call(e,"__wrapped__"),w=h&&Me.call(t,"__wrapped__");if(p||w){var x=p?e.value():e,E=w?t.value():t;return a||(a=new Gn),o(x,E,n,r,a)}}return!!d&&(a||(a=new Gn),function(e,t,n,r,o,a){var s=1&n,l=eo(e),u=l.length;if(u!=eo(t).length&&!s)return!1;for(var c=u;c--;){var f=l[c];if(!(s?f in t:Me.call(t,f)))return!1}var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=s;++c<u;){var v=e[f=l[c]],m=t[f];if(r)var y=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(!(y===i?v===m||o(v,m,n,r,a):y)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,r,o,a))}(e,t,n,r,Tr,o))}function Nr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=_e(e);o--;){var l=n[o];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var u=(l=n[o])[0],c=e[u],f=l[1];if(s&&l[2]){if(c===i&&!(u in e))return!1}else{var h=new Gn;if(r)var d=r(c,f,u,e,t,h);if(!(d===i?Tr(f,c,3,r,h):d))return!1}}return!0}function Or(e){return!(!Za(e)||(t=e,De&&De in t))&&(Ka(e)?ze:ge).test(Io(e));var t}function Mr(e){return"function"==typeof e?e:null==e?nl:"object"==typeof e?Ua(e)?Fr(e[0],e[1]):Ir(e):fl(e)}function Rr(e){if(!xo(e))return gn(e);var t=[];for(var n in _e(e))Me.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e,t){return e<t}function jr(e,t){var n=-1,i=qa(e)?r(e.length):[];return cr(e,function(e,r,o){i[++n]=t(e,r,o)}),i}function Ir(e){var t=so(e);return 1==t.length&&t[0][2]?So(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Fr(e,t){return yo(e)&&ko(t)?So(jo(e),t):function(n){var r=Es(n,e);return r===i&&r===t?Cs(n,e):Tr(t,r,3)}}function zr(e,t,n,r,o){e!==t&&vr(t,function(a,s){if(o||(o=new Gn),Za(a))!function(e,t,n,r,o,a,s){var l=Co(e,n),u=Co(t,n),c=s.get(u);if(c)Qn(e,n,c);else{var f=a?a(l,u,n+"",e,t,s):i,h=f===i;if(h){var d=Ua(u),p=!d&&Ga(u),g=!d&&!p&&ls(u);f=u,d||p||g?Ua(l)?f=l:Wa(l)?f=Ci(l):p?(h=!1,f=wi(u,!0)):g?(h=!1,f=ki(u,!0)):f=[]:rs(u)||$a(u)?(f=l,$a(l)?f=vs(l):Za(l)&&!Ka(l)||(f=po(u))):h=!1}h&&(s.set(u,f),o(f,u,r,a,s),s.delete(u)),Qn(e,n,f)}}(e,t,s,n,zr,r,o);else{var l=r?r(Co(e,s),a,s+"",e,t,o):i;l===i&&(l=a),Qn(e,s,l)}},Ns)}function Vr(e,t){var n=e.length;if(n)return vo(t+=t<0?n:0,n)?e[t]:i}function Br(e,t,n){t=t.length?Nt(t,function(e){return Ua(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e}):[nl];var r=-1;t=Nt(t,Xt(oo()));var i=jr(e,function(e,n,i){var o=Nt(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=Si(i[r],o[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(i)}function $r(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=xr(e,a);n(s,a)&&Kr(o,vi(a,e),s)}return o}function Ur(e,t,n,r){var i=r?Vt:zt,o=-1,a=t.length,s=e;for(e===t&&(t=Ci(t)),n&&(s=Nt(e,Xt(n)));++o<a;)for(var l=0,u=t[o],c=n?n(u):u;(l=i(s,c,l,r))>-1;)s!==e&&Ge.call(s,l,1),Ge.call(e,l,1);return e}function Hr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;vo(i)?Ge.call(e,i,1):li(e,i)}}return e}function qr(e,t){return e+dt(wn()*(t-e+1))}function Wr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Lo(_o(e,t,nl),e+"")}function Yr(e){return Xn(zs(e))}function Xr(e,t){var n=zs(e);return Oo(n,or(t,0,n.length))}function Kr(e,t,n,r){if(!Za(e))return e;for(var o=-1,a=(t=vi(t,e)).length,s=a-1,l=e;null!=l&&++o<a;){var u=jo(t[o]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=s){var f=l[u];(c=r?r(f,u,l):i)===i&&(c=Za(f)?f:vo(t[o+1])?[]:{})}Zn(l,u,c),l=l[u]}return e}var Jr=Pn?function(e,t){return Pn.set(e,t),e}:nl,Qr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Zs(t),writable:!0})}:nl;function Zr(e){return Oo(zs(e))}function ei(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ti(e,t){var n;return cr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function ni(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ri(e,t,nl,n)}function ri(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,l=null===t,u=ss(t),c=t===i;o<a;){var f=dt((o+a)/2),h=n(e[f]),d=h!==i,p=null===h,g=h==h,v=ss(h);if(s)var m=r||g;else m=c?g&&(r||d):l?g&&d&&(r||!p):u?g&&d&&!p&&(r||!v):!p&&!v&&(r?h<=t:h<t);m?o=f+1:a=f}return mn(a,4294967294)}function ii(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,l)){var l=s;o[i++]=0===a?0:a}}return o}function oi(e){return"number"==typeof e?e:ss(e)?h:+e}function ai(e){if("string"==typeof e)return e;if(Ua(e))return Nt(e,ai)+"";if(ss(e))return In?In.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function si(e,t,n){var r=-1,i=Lt,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=Tt;else if(o>=200){var u=t?null:Wi(e);if(u)return ln(u);a=!1,i=Jt,l=new Wn}else l=t?[]:s;e:for(;++r<o;){var c=e[r],f=t?t(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var h=l.length;h--;)if(l[h]===f)continue e;t&&l.push(f),s.push(c)}else i(l,f,n)||(l!==s&&l.push(f),s.push(c))}return s}function li(e,t){return null==(e=Eo(e,t=vi(t,e)))||delete e[jo(Xo(t))]}function ui(e,t,n,r){return Kr(e,t,n(xr(e,t)),r)}function ci(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ei(e,r?0:o,r?o+1:i):ei(e,r?o+1:0,r?i:o)}function fi(e,t){var n=e;return n instanceof $n&&(n=n.value()),Mt(t,function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))},n)}function hi(e,t,n){var i=e.length;if(i<2)return i?si(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],l=-1;++l<i;)l!=o&&(a[o]=ur(a[o]||s,e[l],t,n));return si(gr(a,1),t,n)}function di(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var l=r<a?t[r]:i;n(s,e[r],l)}return s}function pi(e){return Wa(e)?e:[]}function gi(e){return"function"==typeof e?e:nl}function vi(e,t){return Ua(e)?e:yo(e,t)?[e]:Do(ms(e))}var mi=Gr;function yi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ei(e,t,n)}var bi=at||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function ki(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,a=ss(e),s=t!==i,l=null===t,u=t==t,c=ss(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||r&&s&&u||!n&&u||!o)return 1;if(!r&&!a&&!c&&e<t||c&&n&&o&&!r&&!a||l&&n&&o||!s&&o||!u)return-1}return 0}function _i(e,t,n,i){for(var o=-1,a=e.length,s=n.length,l=-1,u=t.length,c=vn(a-s,0),f=r(u+c),h=!i;++l<u;)f[l]=t[l];for(;++o<s;)(h||o<a)&&(f[n[o]]=e[o]);for(;c--;)f[l++]=e[o++];return f}function Ei(e,t,n,i){for(var o=-1,a=e.length,s=-1,l=n.length,u=-1,c=t.length,f=vn(a-l,0),h=r(f+c),d=!i;++o<f;)h[o]=e[o];for(var p=o;++u<c;)h[p+u]=t[u];for(;++s<l;)(d||o<a)&&(h[p+n[s]]=e[o++]);return h}function Ci(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=r?r(n[l],e[l],l,n,e):i;u===i&&(u=e[l]),o?rr(n,l,u):Zn(n,l,u)}return n}function Pi(e,t){return function(n,r){var i=Ua(n)?_t:tr,o=t?t():{};return i(n,e,oo(r,2),o)}}function Li(e){return Gr(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&mo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=_e(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t})}function Ti(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=_e(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ni(e){return function(t,n,r){for(var i=-1,o=_e(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}function Oi(e){return function(t){var n=rn(t=ms(t))?fn(t):i,r=n?n[0]:t.charAt(0),o=n?yi(n,1).join(""):t.slice(1);return r[e]()+o}}function Mi(e){return function(t){return Mt(Ks($s(t).replace(Ke,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return Za(r)?r:n}}function Di(e){return function(t,n,r){var o=_e(t);if(!qa(t)){var a=oo(n,3);t=Ts(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function ji(e){return Zi(function(t){var n=t.length,r=n,a=Bn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Ae(o);if(a&&!l&&"wrapper"==ro(s))var l=new Bn([],!0)}for(r=l?r:n;++r<n;){var u=ro(s=t[r]),c="wrapper"==u?no(s):i;l=c&&bo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[ro(c[0])].apply(l,c[3]):1==s.length&&bo(s)?l[u]():l.thru(s)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Ua(r))return l.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}})}function Ii(e,t,n,o,a,s,l,c,f,h){var d=t&u,p=1&t,g=2&t,v=24&t,m=512&t,y=g?i:Ri(e);return function u(){for(var b=arguments.length,w=r(b),x=b;x--;)w[x]=arguments[x];if(v)var k=io(u),S=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,k);if(o&&(w=_i(w,o,a,v)),s&&(w=Ei(w,s,l,v)),b-=S,v&&b<h){var _=sn(w,k);return Hi(e,t,Ii,u.placeholder,n,w,_,c,f,h-b)}var E=p?n:this,C=g?E[e]:e;return b=w.length,c?w=function(e,t){for(var n=e.length,r=mn(t.length,n),o=Ci(e);r--;){var a=t[r];e[r]=vo(a,n)?o[a]:i}return e}(w,c):m&&b>1&&w.reverse(),d&&f<b&&(w.length=f),this&&this!==ft&&this instanceof u&&(C=y||Ri(C)),C.apply(E,w)}}function Fi(e,t){return function(n,r){return function(e,t,n,r){return yr(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function zi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ai(n),r=ai(r)):(n=oi(n),r=oi(r)),o=e(n,r)}return o}}function Vi(e){return Zi(function(t){return t=Nt(t,Xt(oo())),Gr(function(n){var r=this;return e(t,function(e){return St(e,r,n)})})})}function Bi(e,t){var n=(t=t===i?" ":ai(t)).length;if(n<2)return n?Wr(t,e):t;var r=Wr(t,ht(e/cn(t)));return rn(t)?yi(fn(r),0,e).join(""):r.slice(0,e)}function $i(e){return function(t,n,o){return o&&"number"!=typeof o&&mo(t,n,o)&&(n=o=i),t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n,i){for(var o=-1,a=vn(ht((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,o=o===i?t<n?1:-1:hs(o),e)}}function Ui(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Hi(e,t,n,r,o,a,s,u,c,f){var h=8&t;t|=h?l:64,4&(t&=~(h?64:l))||(t&=-4);var d=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,u,c,f],p=n.apply(i,d);return bo(e)&&Ao(p,d),p.placeholder=r,To(p,e,t)}function qi(e){var t=Se[e];return function(e,n){if(e=gs(e),(n=null==n?0:mn(ds(n),292))&&jt(e)){var r=(ms(e)+"e").split("e");return+((r=(ms(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Wi=En&&1/ln(new En([,-0]))[1]==c?function(e){return new En(e)}:sl;function Gi(e){return function(t){var n=fo(t);return n==k?on(t):n==A?un(t):function(e,t){return Nt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Yi(e,t,n,a,c,f,h,d){var p=2&t;if(!p&&"function"!=typeof e)throw new Ae(o);var g=a?a.length:0;if(g||(t&=-97,a=c=i),h=h===i?h:vn(ds(h),0),d=d===i?d:ds(d),g-=c?c.length:0,64&t){var v=a,m=c;a=c=i}var y=p?i:no(e),b=[e,t,n,a,c,v,m,f,h,d];if(y&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==u&&8==n||r==u&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?_i(c,l,t[4]):l,e[4]=c?sn(e[3],s):t[4]}(l=t[5])&&(c=e[5],e[5]=c?Ei(c,l,t[6]):l,e[6]=c?sn(e[5],s):t[6]),(l=t[7])&&(e[7]=l),r&u&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,y),e=b[0],t=b[1],n=b[2],a=b[3],c=b[4],!(d=b[9]=b[9]===i?p?0:e.length:vn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var o=Ri(e);return function a(){for(var s=arguments.length,l=r(s),u=s,c=io(a);u--;)l[u]=arguments[u];var f=s<3&&l[0]!==c&&l[s-1]!==c?[]:sn(l,c);return(s-=f.length)<n?Hi(e,t,Ii,a.placeholder,i,l,f,i,i,n-s):St(this&&this!==ft&&this instanceof a?o:e,this,l)}}(e,t,d):t!=l&&33!=t||c.length?Ii.apply(i,b):function(e,t,n,i){var o=1&t,a=Ri(e);return function t(){for(var s=-1,l=arguments.length,u=-1,c=i.length,f=r(c+l),h=this&&this!==ft&&this instanceof t?a:e;++u<c;)f[u]=i[u];for(;l--;)f[u++]=arguments[++s];return St(h,o?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,i=Ri(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return To((y?Jr:Ao)(w,b),e,t)}function Xi(e,t,n,r){return e===i||za(e,Te[n])&&!Me.call(r,n)?t:e}function Ki(e,t,n,r,o,a){return Za(e)&&Za(t)&&(a.set(t,e),zr(e,t,i,Ki,a),a.delete(t)),e}function Ji(e){return rs(e)?i:e}function Qi(e,t,n,r,o,a){var s=1&n,l=e.length,u=t.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var h=-1,d=!0,p=2&n?new Wn:i;for(a.set(e,t),a.set(t,e);++h<l;){var g=e[h],v=t[h];if(r)var m=s?r(v,g,h,t,e,a):r(g,v,h,e,t,a);if(m!==i){if(m)continue;d=!1;break}if(p){if(!Dt(t,function(e,t){if(!Jt(p,t)&&(g===e||o(g,e,n,r,a)))return p.push(t)})){d=!1;break}}else if(g!==v&&!o(g,v,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Zi(e){return Lo(_o(e,i,Ho),e+"")}function eo(e){return kr(e,Ts,uo)}function to(e){return kr(e,Ns,co)}var no=Pn?function(e){return Pn.get(e)}:sl;function ro(e){for(var t=e.name+"",n=Ln[t],r=Me.call(Ln,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(Me.call(Fn,"placeholder")?Fn:e).placeholder}function oo(){var e=Fn.iteratee||rl;return e=e===rl?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function so(e){for(var t=Ts(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ko(i)]}return t}function lo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Or(n)?n:i}var uo=gt?function(e){return null==e?[]:(e=_e(e),Pt(gt(e),function(t){return We.call(e,t)}))}:pl,co=gt?function(e){for(var t=[];e;)Ot(t,uo(e)),e=He(e);return t}:pl,fo=Sr;function ho(e,t,n){for(var r=-1,i=(t=vi(t,e)).length,o=!1;++r<i;){var a=jo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Qa(i)&&vo(a,i)&&(Ua(e)||$a(e))}function po(e){return"function"!=typeof e.constructor||xo(e)?{}:zn(He(e))}function go(e){return Ua(e)||$a(e)||!!(Ye&&e&&e[Ye])}function vo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,n){if(!Za(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&vo(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function yo(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||Z.test(e)||!Q.test(e)||null!=t&&e in _e(t)}function bo(e){var t=ro(e),n=Fn[t];if("function"!=typeof n||!(t in $n.prototype))return!1;if(e===n)return!0;var r=no(n);return!!r&&e===r[0]}(kn&&fo(new kn(new ArrayBuffer(1)))!=O||Sn&&fo(new Sn)!=k||_n&&fo(_n.resolve())!=E||En&&fo(new En)!=A||Cn&&fo(new Cn)!=T)&&(fo=function(e){var t=Sr(e),n=t==_?e.constructor:i,r=n?Io(n):"";if(r)switch(r){case Tn:return O;case Nn:return k;case On:return E;case Mn:return A;case Rn:return T}return t});var wo=Ne?Ka:gl;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function ko(e){return e==e&&!Za(e)}function So(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in _e(n))}}function _o(e,t,n){return t=vn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=vn(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var l=r(t+1);++o<t;)l[o]=i[o];return l[t]=n(s),St(e,this,l)}}function Eo(e,t){return t.length<2?e:xr(e,ei(t,0,-1))}function Co(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ao=No(Jr),Po=ct||function(e,t){return ft.setTimeout(e,t)},Lo=No(Qr);function To(e,t,n){var r=t+"";return Lo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Et(p,function(n){var r="_."+n[0];t&n[1]&&!Lt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function No(e){var t=0,n=0;return function(){var r=yn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Oo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=qr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Mo,Ro,Do=(Mo=Ma(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,function(e,n,r,i){t.push(r?i.replace(ce,"$1"):n||e)}),t},function(e){return 500===Ro.size&&Ro.clear(),e}),Ro=Mo.cache,Mo);function jo(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Io(e){if(null!=e){try{return Oe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fo(e){if(e instanceof $n)return e.clone();var t=new Bn(e.__wrapped__,e.__chain__);return t.__actions__=Ci(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Gr(function(e,t){return Wa(e)?ur(e,gr(t,1,Wa,!0)):[]}),Vo=Gr(function(e,t){var n=Xo(t);return Wa(n)&&(n=i),Wa(e)?ur(e,gr(t,1,Wa,!0),oo(n,2)):[]}),Bo=Gr(function(e,t){var n=Xo(t);return Wa(n)&&(n=i),Wa(e)?ur(e,gr(t,1,Wa,!0),i,n):[]});function $o(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ds(n);return i<0&&(i=vn(r+i,0)),Ft(e,oo(t,3),i)}function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ds(n),o=n<0?vn(r+o,0):mn(o,r-1)),Ft(e,oo(t,3),o,!0)}function Ho(e){return null!=e&&e.length?gr(e,1):[]}function qo(e){return e&&e.length?e[0]:i}var Wo=Gr(function(e){var t=Nt(e,pi);return t.length&&t[0]===e[0]?Ar(t):[]}),Go=Gr(function(e){var t=Xo(e),n=Nt(e,pi);return t===Xo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ar(n,oo(t,2)):[]}),Yo=Gr(function(e){var t=Xo(e),n=Nt(e,pi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ar(n,i,t):[]});function Xo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ko=Gr(Jo);function Jo(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var Qo=Zi(function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Hr(e,Nt(t,function(e){return vo(e,n)?+e:e}).sort(Si)),r});function Zo(e){return null==e?e:xn.call(e)}var ea=Gr(function(e){return si(gr(e,1,Wa,!0))}),ta=Gr(function(e){var t=Xo(e);return Wa(t)&&(t=i),si(gr(e,1,Wa,!0),oo(t,2))}),na=Gr(function(e){var t=Xo(e);return t="function"==typeof t?t:i,si(gr(e,1,Wa,!0),i,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,function(e){if(Wa(e))return t=vn(e.length,t),!0}),Gt(t,function(t){return Nt(e,Ut(t))})}function ia(e,t){if(!e||!e.length)return[];var n=ra(e);return null==t?n:Nt(n,function(e){return St(t,i,e)})}var oa=Gr(function(e,t){return Wa(e)?ur(e,t):[]}),aa=Gr(function(e){return hi(Pt(e,Wa))}),sa=Gr(function(e){var t=Xo(e);return Wa(t)&&(t=i),hi(Pt(e,Wa),oo(t,2))}),la=Gr(function(e){var t=Xo(e);return t="function"==typeof t?t:i,hi(Pt(e,Wa),i,t)}),ua=Gr(ra),ca=Gr(function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ia(e,n)});function fa(e){var t=Fn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var da=Zi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof $n&&vo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)}),pa=Pi(function(e,t,n){Me.call(e,n)?++e[n]:rr(e,n,1)}),ga=Di($o),va=Di(Uo);function ma(e,t){return(Ua(e)?Et:cr)(e,oo(t,3))}function ya(e,t){return(Ua(e)?Ct:fr)(e,oo(t,3))}var ba=Pi(function(e,t,n){Me.call(e,n)?e[n].push(t):rr(e,n,[t])}),wa=Gr(function(e,t,n){var i=-1,o="function"==typeof t,a=qa(e)?r(e.length):[];return cr(e,function(e){a[++i]=o?St(t,e,n):Pr(e,t,n)}),a}),xa=Pi(function(e,t,n){rr(e,n,t)});function ka(e,t){return(Ua(e)?Nt:jr)(e,oo(t,3))}var Sa=Pi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),_a=Gr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&mo(e,t[0],t[1])?t=[]:n>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Br(e,gr(t,1),[])}),Ea=ut||function(){return ft.Date.now()};function Ca(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,u,i,i,i,i,t)}function Aa(e,t){var n;if("function"!=typeof t)throw new Ae(o);return e=ds(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Pa=Gr(function(e,t,n){var r=1;if(n.length){var i=sn(n,io(Pa));r|=l}return Yi(e,r,t,n,i)}),La=Gr(function(e,t,n){var r=3;if(n.length){var i=sn(n,io(La));r|=l}return Yi(t,r,e,n,i)});function Ta(e,t,n){var r,a,s,l,u,c,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Ae(o);function g(t){var n=r,o=a;return r=a=i,f=t,l=e.apply(o,n)}function v(e){var n=e-c;return c===i||n>=t||n<0||d&&e-f>=s}function m(){var e=Ea();if(v(e))return y(e);u=Po(m,function(e){var n=t-(e-c);return d?mn(n,s-(e-f)):n}(e))}function y(e){return u=i,p&&r?g(e):(r=a=i,l)}function b(){var e=Ea(),n=v(e);if(r=arguments,a=this,c=e,n){if(u===i)return function(e){return f=e,u=Po(m,t),h?g(e):l}(c);if(d)return bi(u),u=Po(m,t),g(c)}return u===i&&(u=Po(m,t)),l}return t=gs(t)||0,Za(n)&&(h=!!n.leading,s=(d="maxWait"in n)?vn(gs(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){u!==i&&bi(u),f=0,r=c=a=u=i},b.flush=function(){return u===i?l:y(Ea())},b}var Na=Gr(function(e,t){return lr(e,1,t)}),Oa=Gr(function(e,t,n){return lr(e,gs(t)||0,n)});function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ma.Cache||qn),n}function Ra(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=qn;var Da=mi(function(e,t){var n=(t=1==t.length&&Ua(t[0])?Nt(t[0],Xt(oo())):Nt(gr(t,1),Xt(oo()))).length;return Gr(function(r){for(var i=-1,o=mn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return St(e,this,r)})}),ja=Gr(function(e,t){var n=sn(t,io(ja));return Yi(e,l,i,t,n)}),Ia=Gr(function(e,t){var n=sn(t,io(Ia));return Yi(e,64,i,t,n)}),Fa=Zi(function(e,t){return Yi(e,256,i,i,i,t)});function za(e,t){return e===t||e!=e&&t!=t}var Va=Ui(_r),Ba=Ui(function(e,t){return e>=t}),$a=Lr(function(){return arguments}())?Lr:function(e){return es(e)&&Me.call(e,"callee")&&!We.call(e,"callee")},Ua=r.isArray,Ha=mt?Xt(mt):function(e){return es(e)&&Sr(e)==N};function qa(e){return null!=e&&Qa(e.length)&&!Ka(e)}function Wa(e){return es(e)&&qa(e)}var Ga=vt||gl,Ya=yt?Xt(yt):function(e){return es(e)&&Sr(e)==y};function Xa(e){if(!es(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Ka(e){if(!Za(e))return!1;var t=Sr(e);return t==w||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ds(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Xt(bt):function(e){return es(e)&&fo(e)==k};function ns(e){return"number"==typeof e||es(e)&&Sr(e)==S}function rs(e){if(!es(e)||Sr(e)!=_)return!1;var t=He(e);if(null===t)return!0;var n=Me.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Ie}var is=wt?Xt(wt):function(e){return es(e)&&Sr(e)==C},os=xt?Xt(xt):function(e){return es(e)&&fo(e)==A};function as(e){return"string"==typeof e||!Ua(e)&&es(e)&&Sr(e)==P}function ss(e){return"symbol"==typeof e||es(e)&&Sr(e)==L}var ls=kt?Xt(kt):function(e){return es(e)&&Qa(e.length)&&!!it[Sr(e)]},us=Ui(Dr),cs=Ui(function(e,t){return e<=t});function fs(e){if(!e)return[];if(qa(e))return as(e)?fn(e):Ci(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=fo(e);return(t==k?on:t==A?ln:zs)(e)}function hs(e){return e?(e=gs(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ds(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function ps(e){return e?or(ds(e),0,d):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return h;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var n=pe.test(e);return n||ve.test(e)?lt(e.slice(2),n?2:8):de.test(e)?h:+e}function vs(e){return Ai(e,Ns(e))}function ms(e){return null==e?"":ai(e)}var ys=Li(function(e,t){if(xo(t)||qa(t))Ai(t,Ts(t),e);else for(var n in t)Me.call(t,n)&&Zn(e,n,t[n])}),bs=Li(function(e,t){Ai(t,Ns(t),e)}),ws=Li(function(e,t,n,r){Ai(t,Ns(t),e,r)}),xs=Li(function(e,t,n,r){Ai(t,Ts(t),e,r)}),ks=Zi(ir),Ss=Gr(function(e,t){e=_e(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Ns(a),l=-1,u=s.length;++l<u;){var c=s[l],f=e[c];(f===i||za(f,Te[c])&&!Me.call(e,c))&&(e[c]=a[c])}return e}),_s=Gr(function(e){return e.push(i,Ki),St(Ms,i,e)});function Es(e,t,n){var r=null==e?i:xr(e,t);return r===i?n:r}function Cs(e,t){return null!=e&&ho(e,t,Cr)}var As=Fi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n},Zs(nl)),Ps=Fi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Me.call(e,t)?e[t].push(n):e[t]=[n]},oo),Ls=Gr(Pr);function Ts(e){return qa(e)?Yn(e):Rr(e)}function Ns(e){return qa(e)?Yn(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var n in _e(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Me.call(e,r))&&n.push(r);return n}(e)}var Os=Li(function(e,t,n){zr(e,t,n)}),Ms=Li(function(e,t,n,r){zr(e,t,n,r)}),Rs=Zi(function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,function(t){return t=vi(t,e),r||(r=t.length>1),t}),Ai(e,to(e),n),r&&(n=ar(n,7,Ji));for(var i=t.length;i--;)li(n,t[i]);return n}),Ds=Zi(function(e,t){return null==e?{}:function(e,t){return $r(e,t,function(t,n){return Cs(e,n)})}(e,t)});function js(e,t){if(null==e)return{};var n=Nt(to(e),function(e){return[e]});return t=oo(t),$r(e,n,function(e,n){return t(e,n[0])})}var Is=Gi(Ts),Fs=Gi(Ns);function zs(e){return null==e?[]:Kt(e,Ts(e))}var Vs=Mi(function(e,t,n){return t=t.toLowerCase(),e+(n?Bs(t):t)});function Bs(e){return Xs(ms(e).toLowerCase())}function $s(e){return(e=ms(e))&&e.replace(ye,en).replace(Je,"")}var Us=Mi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Hs=Mi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),qs=Oi("toLowerCase"),Ws=Mi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Gs=Mi(function(e,t,n){return e+(n?" ":"")+Xs(t)}),Ys=Mi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Xs=Oi("toUpperCase");function Ks(e,t,n){return e=ms(e),(t=n?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Js=Gr(function(e,t){try{return St(e,i,t)}catch(e){return Xa(e)?e:new xe(e)}}),Qs=Zi(function(e,t){return Et(t,function(t){t=jo(t),rr(e,t,Pa(e[t],e))}),e});function Zs(e){return function(){return e}}var el=ji(),tl=ji(!0);function nl(e){return e}function rl(e){return Mr("function"==typeof e?e:ar(e,1))}var il=Gr(function(e,t){return function(n){return Pr(n,e,t)}}),ol=Gr(function(e,t){return function(n){return Pr(e,n,t)}});function al(e,t,n){var r=Ts(t),i=wr(t,r);null!=n||Za(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Ts(t)));var o=!(Za(n)&&"chain"in n&&!n.chain),a=Ka(e);return Et(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ci(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})}),e}function sl(){}var ll=Vi(Nt),ul=Vi(At),cl=Vi(Dt);function fl(e){return yo(e)?Ut(jo(e)):function(e){return function(t){return xr(t,e)}}(e)}var hl=$i(),dl=$i(!0);function pl(){return[]}function gl(){return!1}var vl,ml=zi(function(e,t){return e+t},0),yl=qi("ceil"),bl=zi(function(e,t){return e/t},1),wl=qi("floor"),xl=zi(function(e,t){return e*t},1),kl=qi("round"),Sl=zi(function(e,t){return e-t},0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ds(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=Ca,Fn.assign=ys,Fn.assignIn=bs,Fn.assignInWith=ws,Fn.assignWith=xs,Fn.at=ks,Fn.before=Aa,Fn.bind=Pa,Fn.bindAll=Qs,Fn.bindKey=La,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},Fn.chain=fa,Fn.chunk=function(e,t,n){t=(n?mo(e,t,n):t===i)?1:vn(ds(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,l=r(ht(o/t));a<o;)l[s++]=ei(e,a,a+=t);return l},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ot(Ua(n)?Ci(n):[n],gr(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=oo();return e=t?Nt(e,function(e){if("function"!=typeof e[1])throw new Ae(o);return[n(e[0]),e[1]]}):[],Gr(function(n){for(var r=-1;++r<t;){var i=e[r];if(St(i[0],this,n))return St(i[1],this,n)}})},Fn.conforms=function(e){return function(e){var t=Ts(e);return function(n){return sr(n,e,t)}}(ar(e,1))},Fn.constant=Zs,Fn.countBy=pa,Fn.create=function(e,t){var n=zn(e);return null==t?n:nr(n,t)},Fn.curry=function e(t,n,r){var o=Yi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.curryRight=function e(t,n,r){var o=Yi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Fn.debounce=Ta,Fn.defaults=Ss,Fn.defaultsDeep=_s,Fn.defer=Na,Fn.delay=Oa,Fn.difference=zo,Fn.differenceBy=Vo,Fn.differenceWith=Bo,Fn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=n||t===i?1:ds(t))<0?0:t,r):[]},Fn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,0,(t=r-(t=n||t===i?1:ds(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!0):[]},Fn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&mo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ds(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ds(r))<0&&(r+=o),r=n>r?0:ps(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Fn.filter=function(e,t){return(Ua(e)?Pt:pr)(e,oo(t,3))},Fn.flatMap=function(e,t){return gr(ka(e,t),1)},Fn.flatMapDeep=function(e,t){return gr(ka(e,t),c)},Fn.flatMapDepth=function(e,t,n){return n=n===i?1:ds(n),gr(ka(e,t),n)},Fn.flatten=Ho,Fn.flattenDeep=function(e){return null!=e&&e.length?gr(e,c):[]},Fn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===i?1:ds(t)):[]},Fn.flip=function(e){return Yi(e,512)},Fn.flow=el,Fn.flowRight=tl,Fn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Fn.functions=function(e){return null==e?[]:wr(e,Ts(e))},Fn.functionsIn=function(e){return null==e?[]:wr(e,Ns(e))},Fn.groupBy=ba,Fn.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},Fn.intersection=Wo,Fn.intersectionBy=Go,Fn.intersectionWith=Yo,Fn.invert=As,Fn.invertBy=Ps,Fn.invokeMap=wa,Fn.iteratee=rl,Fn.keyBy=xa,Fn.keys=Ts,Fn.keysIn=Ns,Fn.map=ka,Fn.mapKeys=function(e,t){var n={};return t=oo(t,3),yr(e,function(e,r,i){rr(n,t(e,r,i),e)}),n},Fn.mapValues=function(e,t){var n={};return t=oo(t,3),yr(e,function(e,r,i){rr(n,r,t(e,r,i))}),n},Fn.matches=function(e){return Ir(ar(e,1))},Fn.matchesProperty=function(e,t){return Fr(e,ar(t,1))},Fn.memoize=Ma,Fn.merge=Os,Fn.mergeWith=Ms,Fn.method=il,Fn.methodOf=ol,Fn.mixin=al,Fn.negate=Ra,Fn.nthArg=function(e){return e=ds(e),Gr(function(t){return Vr(t,e)})},Fn.omit=Rs,Fn.omitBy=function(e,t){return js(e,Ra(oo(t)))},Fn.once=function(e){return Aa(2,e)},Fn.orderBy=function(e,t,n,r){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(n=r?i:n)||(n=null==n?[]:[n]),Br(e,t,n))},Fn.over=ll,Fn.overArgs=Da,Fn.overEvery=ul,Fn.overSome=cl,Fn.partial=ja,Fn.partialRight=Ia,Fn.partition=Sa,Fn.pick=Ds,Fn.pickBy=js,Fn.property=fl,Fn.propertyOf=function(e){return function(t){return null==e?i:xr(e,t)}},Fn.pull=Ko,Fn.pullAll=Jo,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,oo(n,2)):e},Fn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,i,n):e},Fn.pullAt=Qo,Fn.range=hl,Fn.rangeRight=dl,Fn.rearg=Fa,Fn.reject=function(e,t){return(Ua(e)?Pt:pr)(e,Ra(oo(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=oo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Hr(e,i),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new Ae(o);return Gr(e,t=t===i?t:ds(t))},Fn.reverse=Zo,Fn.sampleSize=function(e,t,n){return t=(n?mo(e,t,n):t===i)?1:ds(t),(Ua(e)?Kn:Xr)(e,t)},Fn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},Fn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Kr(e,t,n,r)},Fn.shuffle=function(e){return(Ua(e)?Jn:Zr)(e)},Fn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mo(e,t,n)?(t=0,n=r):(t=null==t?0:ds(t),n=n===i?r:ds(n)),ei(e,t,n)):[]},Fn.sortBy=_a,Fn.sortedUniq=function(e){return e&&e.length?ii(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},Fn.split=function(e,t,n){return n&&"number"!=typeof n&&mo(e,t,n)&&(t=n=i),(n=n===i?d:n>>>0)?(e=ms(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=ai(t))&&rn(e)?yi(fn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:vn(ds(t),0),Gr(function(n){var r=n[t],i=yi(n,0,t);return r&&Ot(i,r),St(e,this,i)})},Fn.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?ei(e,0,(t=n||t===i?1:ds(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ei(e,(t=r-(t=n||t===i?1:ds(t)))<0?0:t,r):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?ci(e,oo(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?ci(e,oo(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return Za(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ta(e,t,{leading:r,maxWait:t,trailing:i})},Fn.thru=ha,Fn.toArray=fs,Fn.toPairs=Is,Fn.toPairsIn=Fs,Fn.toPath=function(e){return Ua(e)?Nt(e,jo):ss(e)?[e]:Ci(Do(ms(e)))},Fn.toPlainObject=vs,Fn.transform=function(e,t,n){var r=Ua(e),i=r||Ga(e)||ls(e);if(t=oo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Za(e)&&Ka(o)?zn(He(e)):{}}return(i?Et:yr)(e,function(e,r,i){return t(n,e,r,i)}),n},Fn.unary=function(e){return Ca(e,1)},Fn.union=ea,Fn.unionBy=ta,Fn.unionWith=na,Fn.uniq=function(e){return e&&e.length?si(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?si(e,oo(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?si(e,i,t):[]},Fn.unset=function(e,t){return null==e||li(e,t)},Fn.unzip=ra,Fn.unzipWith=ia,Fn.update=function(e,t,n){return null==e?e:ui(e,t,gi(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:ui(e,t,gi(n),r)},Fn.values=zs,Fn.valuesIn=function(e){return null==e?[]:Kt(e,Ns(e))},Fn.without=oa,Fn.words=Ks,Fn.wrap=function(e,t){return ja(gi(t),e)},Fn.xor=aa,Fn.xorBy=sa,Fn.xorWith=la,Fn.zip=ua,Fn.zipObject=function(e,t){return di(e||[],t||[],Zn)},Fn.zipObjectDeep=function(e,t){return di(e||[],t||[],Kr)},Fn.zipWith=ca,Fn.entries=Is,Fn.entriesIn=Fs,Fn.extend=bs,Fn.extendWith=ws,al(Fn,Fn),Fn.add=ml,Fn.attempt=Js,Fn.camelCase=Vs,Fn.capitalize=Bs,Fn.ceil=yl,Fn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=gs(n))==n?n:0),t!==i&&(t=(t=gs(t))==t?t:0),or(gs(e),t,n)},Fn.clone=function(e){return ar(e,4)},Fn.cloneDeep=function(e){return ar(e,5)},Fn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Fn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Fn.conformsTo=function(e,t){return null==t||sr(e,t,Ts(t))},Fn.deburr=$s,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=bl,Fn.endsWith=function(e,t,n){e=ms(e),t=ai(t);var r=e.length,o=n=n===i?r:or(ds(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Fn.eq=za,Fn.escape=function(e){return(e=ms(e))&&Y.test(e)?e.replace(W,tn):e},Fn.escapeRegExp=function(e){return(e=ms(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var r=Ua(e)?At:hr;return n&&mo(e,t,n)&&(t=i),r(e,oo(t,3))},Fn.find=ga,Fn.findIndex=$o,Fn.findKey=function(e,t){return It(e,oo(t,3),yr)},Fn.findLast=va,Fn.findLastIndex=Uo,Fn.findLastKey=function(e,t){return It(e,oo(t,3),br)},Fn.floor=wl,Fn.forEach=ma,Fn.forEachRight=ya,Fn.forIn=function(e,t){return null==e?e:vr(e,oo(t,3),Ns)},Fn.forInRight=function(e,t){return null==e?e:mr(e,oo(t,3),Ns)},Fn.forOwn=function(e,t){return e&&yr(e,oo(t,3))},Fn.forOwnRight=function(e,t){return e&&br(e,oo(t,3))},Fn.get=Es,Fn.gt=Va,Fn.gte=Ba,Fn.has=function(e,t){return null!=e&&ho(e,t,Er)},Fn.hasIn=Cs,Fn.head=qo,Fn.identity=nl,Fn.includes=function(e,t,n,r){e=qa(e)?e:zs(e),n=n&&!r?ds(n):0;var i=e.length;return n<0&&(n=vn(i+n,0)),as(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&zt(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ds(n);return i<0&&(i=vn(r+i,0)),zt(e,t,i)},Fn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=mn(t,n)&&e<vn(t,n)}(e=gs(e),t,n)},Fn.invoke=Ls,Fn.isArguments=$a,Fn.isArray=Ua,Fn.isArrayBuffer=Ha,Fn.isArrayLike=qa,Fn.isArrayLikeObject=Wa,Fn.isBoolean=function(e){return!0===e||!1===e||es(e)&&Sr(e)==m},Fn.isBuffer=Ga,Fn.isDate=Ya,Fn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||ls(e)||$a(e)))return!e.length;var t=fo(e);if(t==k||t==A)return!e.size;if(xo(e))return!Rr(e).length;for(var n in e)if(Me.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return Tr(e,t)},Fn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Tr(e,t,i,n):!!r},Fn.isError=Xa,Fn.isFinite=function(e){return"number"==typeof e&&jt(e)},Fn.isFunction=Ka,Fn.isInteger=Ja,Fn.isLength=Qa,Fn.isMap=ts,Fn.isMatch=function(e,t){return e===t||Nr(e,t,so(t))},Fn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Nr(e,t,so(t),n)},Fn.isNaN=function(e){return ns(e)&&e!=+e},Fn.isNative=function(e){if(wo(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Fn.isNil=function(e){return null==e},Fn.isNull=function(e){return null===e},Fn.isNumber=ns,Fn.isObject=Za,Fn.isObjectLike=es,Fn.isPlainObject=rs,Fn.isRegExp=is,Fn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=f},Fn.isSet=os,Fn.isString=as,Fn.isSymbol=ss,Fn.isTypedArray=ls,Fn.isUndefined=function(e){return e===i},Fn.isWeakMap=function(e){return es(e)&&fo(e)==T},Fn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==Sr(e)},Fn.join=function(e,t){return null==e?"":Ht.call(e,t)},Fn.kebabCase=Us,Fn.last=Xo,Fn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ds(n))<0?vn(r+o,0):mn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ft(e,Bt,o,!0)},Fn.lowerCase=Hs,Fn.lowerFirst=qs,Fn.lt=us,Fn.lte=cs,Fn.max=function(e){return e&&e.length?dr(e,nl,_r):i},Fn.maxBy=function(e,t){return e&&e.length?dr(e,oo(t,2),_r):i},Fn.mean=function(e){return $t(e,nl)},Fn.meanBy=function(e,t){return $t(e,oo(t,2))},Fn.min=function(e){return e&&e.length?dr(e,nl,Dr):i},Fn.minBy=function(e,t){return e&&e.length?dr(e,oo(t,2),Dr):i},Fn.stubArray=pl,Fn.stubFalse=gl,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=xl,Fn.nth=function(e,t){return e&&e.length?Vr(e,ds(t)):i},Fn.noConflict=function(){return ft._===this&&(ft._=Fe),this},Fn.noop=sl,Fn.now=Ea,Fn.pad=function(e,t,n){e=ms(e);var r=(t=ds(t))?cn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Bi(dt(i),n)+e+Bi(ht(i),n)},Fn.padEnd=function(e,t,n){e=ms(e);var r=(t=ds(t))?cn(e):0;return t&&r<t?e+Bi(t-r,n):e},Fn.padStart=function(e,t,n){e=ms(e);var r=(t=ds(t))?cn(e):0;return t&&r<t?Bi(t-r,n)+e:e},Fn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(ms(e).replace(re,""),t||0)},Fn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=wn();return mn(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return qr(e,t)},Fn.reduce=function(e,t,n){var r=Ua(e)?Mt:qt,i=arguments.length<3;return r(e,oo(t,4),n,i,cr)},Fn.reduceRight=function(e,t,n){var r=Ua(e)?Rt:qt,i=arguments.length<3;return r(e,oo(t,4),n,i,fr)},Fn.repeat=function(e,t,n){return t=(n?mo(e,t,n):t===i)?1:ds(t),Wr(ms(e),t)},Fn.replace=function(){var e=arguments,t=ms(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,n){var r=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[jo(t[r])];a===i&&(r=o,a=n),e=Ka(a)?a.call(e):a}return e},Fn.round=kl,Fn.runInContext=e,Fn.sample=function(e){return(Ua(e)?Xn:Yr)(e)},Fn.size=function(e){if(null==e)return 0;if(qa(e))return as(e)?cn(e):e.length;var t=fo(e);return t==k||t==A?e.size:Rr(e).length},Fn.snakeCase=Ws,Fn.some=function(e,t,n){var r=Ua(e)?Dt:ti;return n&&mo(e,t,n)&&(t=i),r(e,oo(t,3))},Fn.sortedIndex=function(e,t){return ni(e,t)},Fn.sortedIndexBy=function(e,t,n){return ri(e,t,oo(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ni(e,t);if(r<n&&za(e[r],t))return r}return-1},Fn.sortedLastIndex=function(e,t){return ni(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return ri(e,t,oo(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ni(e,t,!0)-1;if(za(e[n],t))return n}return-1},Fn.startCase=Gs,Fn.startsWith=function(e,t,n){return e=ms(e),n=null==n?0:or(ds(n),0,e.length),t=ai(t),e.slice(n,n+t.length)==t},Fn.subtract=Sl,Fn.sum=function(e){return e&&e.length?Wt(e,nl):0},Fn.sumBy=function(e,t){return e&&e.length?Wt(e,oo(t,2)):0},Fn.template=function(e,t,n){var r=Fn.templateSettings;n&&mo(e,t,n)&&(t=i),e=ms(e),t=ws({},t,r,Xi);var o,a,s=ws({},t.imports,r.imports,Xi),l=Ts(s),u=Kt(s,l),c=0,f=t.interpolate||be,h="__p += '",d=Ee((t.escape||be).source+"|"+f.source+"|"+(f===J?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(Me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,function(t,n,r,i,s,l){return r||(r=i),h+=e.slice(c,l).replace(we,nn),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),h+="';\n";var g=Me.call(t,"variable")&&t.variable;if(g){if(ue.test(g))throw new xe("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace($,""):h).replace(U,"$1").replace(H,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Js(function(){return ke(l,p+"return "+h).apply(i,u)});if(v.source=h,Xa(v))throw v;return v},Fn.times=function(e,t){if((e=ds(e))<1||e>f)return[];var n=d,r=mn(e,d);t=oo(t),e-=d;for(var i=Gt(r,t);++n<e;)t(n);return i},Fn.toFinite=hs,Fn.toInteger=ds,Fn.toLength=ps,Fn.toLower=function(e){return ms(e).toLowerCase()},Fn.toNumber=gs,Fn.toSafeInteger=function(e){return e?or(ds(e),-9007199254740991,f):0===e?e:0},Fn.toString=ms,Fn.toUpper=function(e){return ms(e).toUpperCase()},Fn.trim=function(e,t,n){if((e=ms(e))&&(n||t===i))return Yt(e);if(!e||!(t=ai(t)))return e;var r=fn(e),o=fn(t);return yi(r,Qt(r,o),Zt(r,o)+1).join("")},Fn.trimEnd=function(e,t,n){if((e=ms(e))&&(n||t===i))return e.slice(0,hn(e)+1);if(!e||!(t=ai(t)))return e;var r=fn(e);return yi(r,0,Zt(r,fn(t))+1).join("")},Fn.trimStart=function(e,t,n){if((e=ms(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=ai(t)))return e;var r=fn(e);return yi(r,Qt(r,fn(t))).join("")},Fn.truncate=function(e,t){var n=30,r="...";if(Za(t)){var o="separator"in t?t.separator:o;n="length"in t?ds(t.length):n,r="omission"in t?ai(t.omission):r}var a=(e=ms(e)).length;if(rn(e)){var s=fn(e);a=s.length}if(n>=a)return e;var l=n-cn(r);if(l<1)return r;var u=s?yi(s,0,l).join(""):e.slice(0,l);if(o===i)return u+r;if(s&&(l+=u.length-l),is(o)){if(e.slice(l).search(o)){var c,f=u;for(o.global||(o=Ee(o.source,ms(he.exec(o))+"g")),o.lastIndex=0;c=o.exec(f);)var h=c.index;u=u.slice(0,h===i?l:h)}}else if(e.indexOf(ai(o),l)!=l){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+r},Fn.unescape=function(e){return(e=ms(e))&&G.test(e)?e.replace(q,dn):e},Fn.uniqueId=function(e){var t=++Re;return ms(e)+t},Fn.upperCase=Ys,Fn.upperFirst=Xs,Fn.each=ma,Fn.eachRight=ya,Fn.first=qo,al(Fn,(vl={},yr(Fn,function(e,t){Me.call(Fn.prototype,t)||(vl[t]=e)}),vl),{chain:!1}),Fn.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Fn[e].placeholder=Fn}),Et(["drop","take"],function(e,t){$n.prototype[e]=function(n){n=n===i?1:vn(ds(n),0);var r=this.__filtered__&&!t?new $n(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Et(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Et(["head","last"],function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}}),Et(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}}),$n.prototype.compact=function(){return this.filter(nl)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=Gr(function(e,t){return"function"==typeof e?new $n(this):this.map(function(n){return Pr(n,e,t)})}),$n.prototype.reject=function(e){return this.filter(Ra(oo(e)))},$n.prototype.slice=function(e,t){e=ds(e);var n=this;return n.__filtered__&&(e>0||t<0)?new $n(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ds(t))<0?n.dropRight(-t):n.take(t-e)),n)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(d)},yr($n.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Fn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Fn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,l=t instanceof $n,u=s[0],c=l||Ua(t),f=function(e){var t=o.apply(Fn,Ot([e],s));return r&&h?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,g=l&&!d;if(!a&&c){t=g?t:new $n(this);var v=e.apply(t,s);return v.__actions__.push({func:ha,args:[f],thisArg:i}),new Bn(v,h)}return p&&g?e.apply(this,s):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})}),Et(["pop","push","shift","sort","splice","unshift"],function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ua(i)?i:[],e)}return this[n](function(n){return t.apply(Ua(n)?n:[],e)})}}),yr($n.prototype,function(e,t){var n=Fn[t];if(n){var r=n.name+"";Me.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:t,func:n})}}),Ln[Ii(i,2).name]=[{name:"wrapper",func:i}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=Ci(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ci(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ci(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,f=c.length,h=0,d=mn(l,this.__takeCount__);if(!n||!r&&i==l&&d==l)return fi(e,this.__actions__);var p=[];e:for(;l--&&h<d;){for(var g=-1,v=e[u+=t];++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 e;break e}}p[h++]=v}return p},Fn.prototype.at=da,Fn.prototype.chain=function(){return fa(this)},Fn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=Fo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Zo],thisArg:i}),new Bn(t,this.__chain__)}return this.thru(Zo)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Xe&&(Fn.prototype[Xe]=function(){return this}),Fn}();ft._=pn,(r=function(){return pn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2552:(e,t,n)=>{var r=n(1873),i=n(659),o=n(9350),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},2629:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,4)}},2651:(e,t,n)=>{var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},2749:(e,t,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},2804:(e,t,n)=>{var r=n(6110)(n(9325),"Promise");e.exports=r},2824:(e,t,n)=>{var r=n(7805),i=n(3290),o=n(1961),a=n(3007),s=n(5529),l=n(2428),u=n(6449),c=n(3693),f=n(3656),h=n(1882),d=n(3805),p=n(1331),g=n(7167),v=n(4974),m=n(9884);e.exports=function(e,t,n,y,b,w,x){var k=v(e,n),S=v(t,n),_=x.get(S);if(_)r(e,n,_);else{var E=w?w(k,S,n+"",e,t,x):void 0,C=void 0===E;if(C){var A=u(S),P=!A&&f(S),L=!A&&!P&&g(S);E=S,A||P||L?u(k)?E=k:c(k)?E=a(k):P?(C=!1,E=i(S,!0)):L?(C=!1,E=o(S,!0)):E=[]:p(S)||l(S)?(E=k,l(k)?E=m(k):d(k)&&!h(k)||(E=s(S))):C=!1}C&&(x.set(S,E),b(E,S,y,w,x),x.delete(S)),r(e,n,E)}}},2865:(e,t,n)=>{var r=n(9570),i=n(1811)(r);e.exports=i},2903:(e,t,n)=>{var r=n(3805),i=n(5527),o=n(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},2948:(e,t,n)=>{var r=n(6857);e.exports=function(e){var t=function(e){var t={},n=0;return r.forEach(e.children(),function i(o){var a=n;r.forEach(e.children(o),i),t[o]={low:a,lim:n++}}),t}(e);r.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,o=function(e,t,n,r){var i,o,a=[],s=[],l=Math.min(t[n].low,t[r].low),u=Math.max(t[n].lim,t[r].lim);i=n;do{i=e.parent(i),a.push(i)}while(i&&(t[i].low>l||u>t[i].lim));for(o=i,i=r;(i=e.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(e,t,i.v,i.w),a=o.path,s=o.lca,l=0,u=a[l],c=!0;n!==i.w;){if(r=e.node(n),c){for(;(u=a[l])!==s&&e.node(u).maxRank<r.rank;)l++;u===s&&(c=!1)}if(!c){for(;l<a.length-1&&e.node(u=a[l+1]).minRank<=r.rank;)l++;u=a[l]}e.setParent(n,u),n=e.successors(n)[0]}})}},2949:(e,t,n)=>{var r=n(2651);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},3007:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},3031:(e,t,n)=>{var r=n(3120),i=n(6155),o=n(9302),a=n(6800),s=o(function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])});e.exports=s},3040:(e,t,n)=>{var r=n(1549),i=n(79),o=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},3120:(e,t,n)=>{var r=n(4528),i=n(5891);e.exports=function e(t,n,o,a,s){var l=-1,u=t.length;for(o||(o=i),s||(s=[]);++l<u;){var c=t[l];n>0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},3170:(e,t,n)=>{var r=n(6547),i=n(1769),o=n(361),a=n(3805),s=n(7797);e.exports=function(e,t,n,l){if(!a(e))return e;for(var u=-1,c=(t=i(t,e)).length,f=c-1,h=e;null!=h&&++u<c;){var d=s(t[u]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(u!=f){var g=h[d];void 0===(p=l?l(g,d,h):void 0)&&(p=a(g)?g:o(t[u+1])?[]:{})}r(h,d,p),h=h[d]}return e}},3181:(e,t,n)=>{var r=n(5508)();e.exports=r},3201:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3221:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}},3222:(e,t,n)=>{var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},3243:(e,t,n)=>{var r=n(6110),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},3290:(e,t,n)=>{e=n.nmd(e);var r=n(9325),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},3335:e=>{e.exports=function(e,t){return e>t}},3345:e=>{e.exports=function(){return[]}},3349:(e,t,n)=>{var r=n(2199),i=n(6375),o=n(7241);e.exports=function(e){return r(e,o,i)}},3360:(e,t,n)=>{var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3488:e=>{e.exports=function(e){return e}},3590:(e,t,n)=>{var r=n(117);e.exports=function(e,t,n){return function(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,o=t(n);r[e][i]={distance:o,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var o=r[n];i.forEach(function(n){var r=o[e],i=t[n],a=o[n],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)})})}),r}(e,t||i,n||function(t){return e.outEdges(t)})};var i=r.constant(1)},3599:(e,t,n)=>{var r=n(4394);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(void 0===l?s==s&&!r(s):n(s,l)))var l=s,u=a}return u}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},3619:(e,t,n)=>{var r=n(117);e.exports=function(e){var t,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,t.push(i),r.each(e.successors(i),o),r.each(e.predecessors(i),o))}return r.each(e.nodes(),function(e){t=[],o(e),t.length&&i.push(t)}),i}},3650:(e,t,n)=>{var r=n(4335)(Object.keys,Object);e.exports=r},3656:(e,t,n)=>{e=n.nmd(e);var r=n(9325),i=n(9935),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},3661:(e,t,n)=>{var r=n(3040),i=n(7670),o=n(289),a=n(4509),s=n(2949);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},3663:(e,t,n)=>{var r=n(1799),i=n(776),o=n(7197);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},3693:(e,t,n)=>{var r=n(4894),i=n(346);e.exports=function(e){return i(e)&&r(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3714:(e,t,n)=>{var r=n(3730);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,l=n.length;++i<s;){var u=r(o[i],a[i]);if(u)return i>=l?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}},3729:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},3730:(e,t,n)=>{var r=n(4394);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&e<t||c&&n&&o&&!i&&!a||l&&n&&o||!s&&o||!u)return-1}return 0}},3736:(e,t,n)=>{var r=n(1873),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},3776:(e,t,n)=>{"use strict";var r=n(6857),i=n(3988),o=n(9741).positionX;e.exports=function(e){(function(e){var t=i.buildLayerMatrix(e),n=e.graph().ranksep,o=0;r.forEach(t,function(t){var i=r.max(r.map(t,function(t){return e.node(t).height}));r.forEach(t,function(t){e.node(t).y=o+i/2}),o+=i+n})})(e=i.asNonCompoundGraph(e)),r.forEach(o(e),function(t,n){e.node(n).x=t})}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3838:(e,t,n)=>{var r=n(1791),i=n(7241);e.exports=function(e,t){return e&&r(t,i(t),e)}},3860:(e,t,n)=>{var r=n(6857);e.exports=function(e,t){return r.map(t,function(t){var n=e.inEdges(t);if(n.length){var i=r.reduce(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}})}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},3916:(e,t,n)=>{var r=n(3360),i=n(641),o=n(5389);e.exports=function(e,t){var n={};return t=o(t,3),i(e,function(e,i,o){r(n,i,t(e,i,o))}),n}},3937:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},3950:e=>{e.exports=function(){}},3988:(e,t,n)=>{"use strict";var r=n(6857),i=n(8191).Graph;function o(e,t,n,i){var o;do{o=r.uniqueId(i)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function a(e){return r.max(r.map(e.nodes(),function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n}))}e.exports={addDummyNode:o,simplify:function(e){var t=(new i).setGraph(e.graph());return r.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t},asNonCompoundGraph:function(e){var t=new i({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t},successorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,i=e.x,o=e.y,a=t.x-i,s=t.y-o,l=e.width/2,u=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*l>Math.abs(a)*u?(s<0&&(u=-u),n=u*a/s,r=u):(a<0&&(l=-l),n=l,r=l*s/a),{x:i+n,y:o+r}},buildLayerMatrix:function(e){var t=r.map(r.range(a(e)+1),function(){return[]});return r.forEach(e.nodes(),function(n){var i=e.node(n),o=i.rank;r.isUndefined(o)||(t[o][i.order]=n)}),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank}));r.forEach(e.nodes(),function(n){var i=e.node(n);r.has(i,"rank")&&(i.rank-=t)})},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank})),n=[];r.forEach(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var i=0,o=e.graph().nodeRankFactor;r.forEach(n,function(t,n){r.isUndefined(t)&&n%o!==0?--i:i&&r.forEach(t,function(t){e.node(t).rank+=i})})},addBorderNode:function(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),o(e,"border",i,t)},maxRank:a,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},4066:(e,t,n)=>{var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},4128:(e,t,n)=>{var r=n(1800),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},4173:function(e,t,n){e.exports=function(e){"use strict";var t=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(e),n="січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),r="січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),i=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function o(e,t,n){var r,i;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,i={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}var a=function(e,t){return i.test(t)?n[e.month()]:r[e.month()]};a.s=r,a.f=n;var s={name:"uk",weekdays:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),weekdaysShort:"ндл_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:a,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekStart:1,relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:o,mm:o,h:o,hh:o,d:"день",dd:o,M:"місяць",MM:o,y:"рік",yy:o},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"}};return t.default.locale(s,null,!0),s}(n(4353))},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},4248:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},4353:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",i="minute",o="hour",a="day",s="week",l="month",u="quarter",c="year",f="date",h="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),o=n-i<0,a=t.clone().add(r+(o?-1:1),l);return+(-(r+(n-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:c,w:s,d:a,D:f,h:o,m:i,s:r,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",b={};b[y]=g;var w="$isDayjsObject",x=function(e){return e instanceof E||!(!e||!e[w])},k=function e(t,n,r){var i;if(!t)return y;if("string"==typeof t){var o=t.toLowerCase();b[o]&&(i=o),n&&(b[o]=n,i=o);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},S=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},_=m;_.l=k,_.i=x,_.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=k(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var v=g.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(d);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return _},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return S(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<S(e)},v.$g=function(e,t,n){return _.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,u=!!_.u(t)||t,h=_.p(e),d=function(e,t){var r=_.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return u?r:r.endOf(a)},p=function(e,t){return _.w(n.toDate()[e].apply(n.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,v=this.$M,m=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case c:return u?d(1,0):d(31,11);case l:return u?d(1,v):d(0,v+1);case s:var b=this.$locale().weekStart||0,w=(g<b?g+7:g)-b;return d(u?m-w:m+(6-w),v);case a:case f:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case i:return p(y+"Seconds",2);case r:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var s,u=_.p(e),h="set"+(this.$u?"UTC":""),d=(s={},s[a]=h+"Date",s[f]=h+"Date",s[l]=h+"Month",s[c]=h+"FullYear",s[o]=h+"Hours",s[i]=h+"Minutes",s[r]=h+"Seconds",s[n]=h+"Milliseconds",s)[u],p=u===a?this.$D+(t-this.$W):t;if(u===l||u===c){var g=this.clone().set(f,1);g.$d[d](p),g.init(),this.$d=g.set(f,Math.min(this.$D,g.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[_.p(e)]()},v.add=function(n,u){var f,h=this;n=Number(n);var d=_.p(u),p=function(e){var t=S(h);return _.w(t.date(t.date()+Math.round(e*n)),h)};if(d===l)return this.set(l,this.$M+n);if(d===c)return this.set(c,this.$y+n);if(d===a)return p(1);if(d===s)return p(7);var g=(f={},f[i]=e,f[o]=t,f[r]=1e3,f)[d]||1,v=this.$d.getTime()+n*g;return _.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=_.z(this),o=this.$H,a=this.$m,s=this.$M,l=n.weekdays,u=n.months,c=n.meridiem,f=function(e,n,i,o){return e&&(e[n]||e(t,r))||i[n].slice(0,o)},d=function(e){return _.s(o%12||12,e,"0")},g=c||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return s+1;case"MM":return _.s(s+1,2,"0");case"MMM":return f(n.monthsShort,s,u,3);case"MMMM":return f(u,s);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,l,2);case"ddd":return f(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(o);case"HH":return _.s(o,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return g(o,a,!0);case"A":return g(o,a,!1);case"m":return String(a);case"mm":return _.s(a,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,f,h){var d,p=this,g=_.p(f),v=S(n),m=(v.utcOffset()-this.utcOffset())*e,y=this-v,b=function(){return _.m(p,v)};switch(g){case c:d=b()/12;break;case l:d=b();break;case u:d=b()/3;break;case s:d=(y-m)/6048e5;break;case a:d=(y-m)/864e5;break;case o:d=y/t;break;case i:d=y/e;break;case r:d=y/1e3;break;default:d=y}return h?d:_.a(d)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return b[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=k(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return _.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),C=E.prototype;return S.prototype=C,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",a],["$M",l],["$y",c],["$D",f]].forEach(function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),S.extend=function(e,t){return e.$i||(e(t,E,S),e.$i=!0),S},S.locale=k,S.isDayjs=x,S.unix=function(e){return S(1e3*e)},S.en=b[y],S.Ls=b,S.p={},S}()},4383:(e,t,n)=>{var r=n(6001),i=n(8816)(function(e,t){return null==e?{}:r(e,t)});e.exports=i},4384:(e,t,n)=>{var r=n(6857);e.exports=function(e,t,n){var i,o={};r.forEach(n,function(n){for(var r,a,s=e.parent(n);s;){if((r=e.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void t.setEdge(a,s);s=r}})}},4394:(e,t,n)=>{var r=n(2552),i=n(346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},4423:(e,t,n)=>{var r=n(117),i=n(6454),o=n(1737);e.exports=function(e,t){var n,a=new i,s={},l=new o;function u(e){var r=e.v===n?e.w:e.v,i=l.priority(r);if(void 0!==i){var o=t(e);o<i&&(s[r]=n,l.decrease(r,o))}}if(0===e.nodeCount())return a;r.each(e.nodes(),function(e){l.add(e,Number.POSITIVE_INFINITY),a.setNode(e)}),l.decrease(e.nodes()[0],0);for(var c=!1;l.size()>0;){if(n=l.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(u)}return a}},4458:e=>{e.exports="2.1.8"},4460:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},4477:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<i&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],f=1,h=null,d=3,p=!1,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(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function k(e){if(v=!1,x(e),!g)if(null!==r(u))g=!0,_||(_=!0,S());else{var t=r(c);null!==t&&O(k,t.startTime-e)}}var S,_=!1,E=-1,C=5,A=-1;function P(){return!(!m&&t.unstable_now()-A<C)}function L(){if(m=!1,_){var e=t.unstable_now();A=e;var n=!0;try{e:{g=!1,v&&(v=!1,b(E),E=-1),p=!0;var o=d;try{t:{for(x(e),h=r(u);null!==h&&!(h.expirationTime>e&&P());){var a=h.callback;if("function"==typeof a){h.callback=null,d=h.priorityLevel;var s=a(h.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){h.callback=s,x(e),n=!0;break t}h===r(u)&&i(u),x(e)}else i(u);h=r(u)}if(null!==h)n=!0;else{var l=r(c);null!==l&&O(k,l.startTime-e),n=!1}}break e}finally{h=null,d=o,p=!1}n=void 0}}finally{n?S():_=!1}}}if("function"==typeof w)S=function(){w(L)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,N=T.port2;T.port1.onmessage=L,S=function(){N.postMessage(null)}}else S=function(){y(L,0)};function O(e,n){E=y(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},t.unstable_requestPaint=function(){m=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(v?(b(E),E=-1):v=!0,O(k,o-a))):(e.sortIndex=s,n(u,e),g||p||(g=!0,_||(_=!0,S()))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}},4506:(e,t,n)=>{var r=n(3599),i=n(3335),o=n(3488);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},4509:(e,t,n)=>{var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},4517:(e,t,n)=>{var r=n(6545),i=n(3950),o=n(4247),a=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=a},4520:(e,t,n)=>{var r=n(6857),i=n(3860),o=n(4959),a=n(5169);e.exports=function e(t,n,s,l){var u=t.children(n),c=t.node(n),f=c?c.borderLeft:void 0,h=c?c.borderRight:void 0,d={};f&&(u=r.filter(u,function(e){return e!==f&&e!==h}));var p=i(t,u);r.forEach(p,function(n){if(t.children(n.v).length){var i=e(t,n.v,s,l);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(e,t){r.forEach(e,function(e){e.vs=r.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}(g,d);var v=a(g,l);if(f&&(v.vs=r.flatten([f,v.vs,h],!0),t.predecessors(f).length)){var m=t.node(t.predecessors(f)[0]),y=t.node(t.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}},4523:(e,t,n)=>{"use strict";n.r(t),n.d(t,{VERSION:()=>i,after:()=>Rt,all:()=>en,allKeys:()=>ve,any:()=>tn,assign:()=>Re,before:()=>Dt,bind:()=>kt,bindAll:()=>Et,chain:()=>yt,chunk:()=>Fn,clone:()=>Fe,collect:()=>Yt,compact:()=>An,compose:()=>Mt,constant:()=>Q,contains:()=>nn,countBy:()=>mn,create:()=>Ie,debounce:()=>Tt,default:()=>Un,defaults:()=>De,defer:()=>Pt,delay:()=>At,detect:()=>qt,difference:()=>Ln,drop:()=>En,each:()=>Gt,escape:()=>at,every:()=>en,extend:()=>Me,extendOwn:()=>Re,filter:()=>Qt,find:()=>qt,findIndex:()=>zt,findKey:()=>It,findLastIndex:()=>Vt,findWhere:()=>Wt,first:()=>_n,flatten:()=>Pn,foldl:()=>Kt,foldr:()=>Jt,forEach:()=>Gt,functions:()=>Ne,get:()=>Ue,groupBy:()=>gn,has:()=>He,head:()=>_n,identity:()=>qe,include:()=>nn,includes:()=>nn,indexBy:()=>vn,indexOf:()=>Ut,initial:()=>Sn,inject:()=>Kt,intersection:()=>Mn,invert:()=>Te,invoke:()=>rn,isArguments:()=>X,isArray:()=>W,isArrayBuffer:()=>I,isBoolean:()=>P,isDataView:()=>q,isDate:()=>M,isElement:()=>L,isEmpty:()=>le,isEqual:()=>ge,isError:()=>D,isFinite:()=>K,isFunction:()=>V,isMap:()=>_e,isMatch:()=>ue,isNaN:()=>J,isNull:()=>C,isNumber:()=>O,isObject:()=>E,isRegExp:()=>R,isSet:()=>Ce,isString:()=>N,isSymbol:()=>j,isTypedArray:()=>ie,isUndefined:()=>A,isWeakMap:()=>Ee,isWeakSet:()=>Ae,iteratee:()=>Ke,keys:()=>se,last:()=>Cn,lastIndexOf:()=>Ht,map:()=>Yt,mapObject:()=>Qe,matcher:()=>We,matches:()=>We,max:()=>sn,memoize:()=>Ct,methods:()=>Ne,min:()=>ln,mixin:()=>Vn,negate:()=>Ot,noop:()=>Ze,now:()=>rt,object:()=>jn,omit:()=>kn,once:()=>jt,pairs:()=>Le,partial:()=>xt,partition:()=>yn,pick:()=>xn,pluck:()=>on,property:()=>Ge,propertyOf:()=>et,random:()=>nt,range:()=>In,reduce:()=>Kt,reduceRight:()=>Jt,reject:()=>Zt,rest:()=>En,restArguments:()=>_,result:()=>gt,sample:()=>fn,select:()=>Qt,shuffle:()=>hn,size:()=>bn,some:()=>tn,sortBy:()=>dn,sortedIndex:()=>Bt,tail:()=>En,take:()=>_n,tap:()=>ze,template:()=>pt,templateSettings:()=>lt,throttle:()=>Lt,times:()=>tt,toArray:()=>cn,toPath:()=>Ve,transpose:()=>Rn,unescape:()=>st,union:()=>On,uniq:()=>Nn,unique:()=>Nn,uniqueId:()=>mt,unzip:()=>Rn,values:()=>Pe,where:()=>an,without:()=>Tn,wrap:()=>Nt,zip:()=>Dn});var r={};n.r(r),n.d(r,{VERSION:()=>i,after:()=>Rt,all:()=>en,allKeys:()=>ve,any:()=>tn,assign:()=>Re,before:()=>Dt,bind:()=>kt,bindAll:()=>Et,chain:()=>yt,chunk:()=>Fn,clone:()=>Fe,collect:()=>Yt,compact:()=>An,compose:()=>Mt,constant:()=>Q,contains:()=>nn,countBy:()=>mn,create:()=>Ie,debounce:()=>Tt,default:()=>Bn,defaults:()=>De,defer:()=>Pt,delay:()=>At,detect:()=>qt,difference:()=>Ln,drop:()=>En,each:()=>Gt,escape:()=>at,every:()=>en,extend:()=>Me,extendOwn:()=>Re,filter:()=>Qt,find:()=>qt,findIndex:()=>zt,findKey:()=>It,findLastIndex:()=>Vt,findWhere:()=>Wt,first:()=>_n,flatten:()=>Pn,foldl:()=>Kt,foldr:()=>Jt,forEach:()=>Gt,functions:()=>Ne,get:()=>Ue,groupBy:()=>gn,has:()=>He,head:()=>_n,identity:()=>qe,include:()=>nn,includes:()=>nn,indexBy:()=>vn,indexOf:()=>Ut,initial:()=>Sn,inject:()=>Kt,intersection:()=>Mn,invert:()=>Te,invoke:()=>rn,isArguments:()=>X,isArray:()=>W,isArrayBuffer:()=>I,isBoolean:()=>P,isDataView:()=>q,isDate:()=>M,isElement:()=>L,isEmpty:()=>le,isEqual:()=>ge,isError:()=>D,isFinite:()=>K,isFunction:()=>V,isMap:()=>_e,isMatch:()=>ue,isNaN:()=>J,isNull:()=>C,isNumber:()=>O,isObject:()=>E,isRegExp:()=>R,isSet:()=>Ce,isString:()=>N,isSymbol:()=>j,isTypedArray:()=>ie,isUndefined:()=>A,isWeakMap:()=>Ee,isWeakSet:()=>Ae,iteratee:()=>Ke,keys:()=>se,last:()=>Cn,lastIndexOf:()=>Ht,map:()=>Yt,mapObject:()=>Qe,matcher:()=>We,matches:()=>We,max:()=>sn,memoize:()=>Ct,methods:()=>Ne,min:()=>ln,mixin:()=>Vn,negate:()=>Ot,noop:()=>Ze,now:()=>rt,object:()=>jn,omit:()=>kn,once:()=>jt,pairs:()=>Le,partial:()=>xt,partition:()=>yn,pick:()=>xn,pluck:()=>on,property:()=>Ge,propertyOf:()=>et,random:()=>nt,range:()=>In,reduce:()=>Kt,reduceRight:()=>Jt,reject:()=>Zt,rest:()=>En,restArguments:()=>_,result:()=>gt,sample:()=>fn,select:()=>Qt,shuffle:()=>hn,size:()=>bn,some:()=>tn,sortBy:()=>dn,sortedIndex:()=>Bt,tail:()=>En,take:()=>_n,tap:()=>ze,template:()=>pt,templateSettings:()=>lt,throttle:()=>Lt,times:()=>tt,toArray:()=>cn,toPath:()=>Ve,transpose:()=>Rn,unescape:()=>st,union:()=>On,uniq:()=>Nn,unique:()=>Nn,uniqueId:()=>mt,unzip:()=>Rn,values:()=>Pe,where:()=>an,without:()=>Tn,wrap:()=>Nt,zip:()=>Dn});var i="1.13.7",o="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||Function("return this")()||{},a=Array.prototype,s=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,u=a.push,c=a.slice,f=s.toString,h=s.hasOwnProperty,d="undefined"!=typeof ArrayBuffer,p="undefined"!=typeof DataView,g=Array.isArray,v=Object.keys,m=Object.create,y=d&&ArrayBuffer.isView,b=isNaN,w=isFinite,x=!{toString:null}.propertyIsEnumerable("toString"),k=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],S=Math.pow(2,53)-1;function _(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}}function E(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function C(e){return null===e}function A(e){return void 0===e}function P(e){return!0===e||!1===e||"[object Boolean]"===f.call(e)}function L(e){return!(!e||1!==e.nodeType)}function T(e){var t="[object "+e+"]";return function(e){return f.call(e)===t}}const N=T("String"),O=T("Number"),M=T("Date"),R=T("RegExp"),D=T("Error"),j=T("Symbol"),I=T("ArrayBuffer");var F=T("Function"),z=o.document&&o.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof z&&(F=function(e){return"function"==typeof e||!1});const V=F,B=T("Object");var $=p&&(!/\[native code\]/.test(String(DataView))||B(new DataView(new ArrayBuffer(8)))),U="undefined"!=typeof Map&&B(new Map),H=T("DataView");const q=$?function(e){return null!=e&&V(e.getInt8)&&I(e.buffer)}:H,W=g||T("Array");function G(e,t){return null!=e&&h.call(e,t)}var Y=T("Arguments");!function(){Y(arguments)||(Y=function(e){return G(e,"callee")})}();const X=Y;function K(e){return!j(e)&&w(e)&&!isNaN(parseFloat(e))}function J(e){return O(e)&&b(e)}function Q(e){return function(){return e}}function Z(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=S}}function ee(e){return function(t){return null==t?void 0:t[e]}}const te=ee("byteLength"),ne=Z(te);var re=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const ie=d?function(e){return y?y(e)&&!q(e):ne(e)&&re.test(f.call(e))}:Q(!1),oe=ee("length");function ae(e,t){t=function(e){for(var t={},n=e.length,r=0;r<n;++r)t[e[r]]=!0;return{contains:function(e){return!0===t[e]},push:function(n){return t[n]=!0,e.push(n)}}}(t);var n=k.length,r=e.constructor,i=V(r)&&r.prototype||s,o="constructor";for(G(e,o)&&!t.contains(o)&&t.push(o);n--;)(o=k[n])in e&&e[o]!==i[o]&&!t.contains(o)&&t.push(o)}function se(e){if(!E(e))return[];if(v)return v(e);var t=[];for(var n in e)G(e,n)&&t.push(n);return x&&ae(e,t),t}function le(e){if(null==e)return!0;var t=oe(e);return"number"==typeof t&&(W(e)||N(e)||X(e))?0===t:0===oe(se(e))}function ue(e,t){var n=se(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0}function ce(e){return e instanceof ce?e:this instanceof ce?void(this._wrapped=e):new ce(e)}function fe(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,te(e))}ce.VERSION=i,ce.prototype.value=function(){return this._wrapped},ce.prototype.valueOf=ce.prototype.toJSON=ce.prototype.value,ce.prototype.toString=function(){return String(this._wrapped)};var he="[object DataView]";function de(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&pe(e,t,n,r)}function pe(e,t,n,r){e instanceof ce&&(e=e._wrapped),t instanceof ce&&(t=t._wrapped);var i=f.call(e);if(i!==f.call(t))return!1;if($&&"[object Object]"==i&&q(e)){if(!q(t))return!1;i=he}switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return l.valueOf.call(e)===l.valueOf.call(t);case"[object ArrayBuffer]":case he:return pe(fe(e),fe(t),n,r)}var o="[object Array]"===i;if(!o&&ie(e)){if(te(e)!==te(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;o=!0}if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(V(a)&&a instanceof a&&V(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!de(e[u],t[u],n,r))return!1}else{var c,h=se(e);if(u=h.length,se(t).length!==u)return!1;for(;u--;)if(!G(t,c=h[u])||!de(e[c],t[c],n,r))return!1}return n.pop(),r.pop(),!0}function ge(e,t){return de(e,t)}function ve(e){if(!E(e))return[];var t=[];for(var n in e)t.push(n);return x&&ae(e,t),t}function me(e){var t=oe(e);return function(n){if(null==n)return!1;var r=ve(n);if(oe(r))return!1;for(var i=0;i<t;i++)if(!V(n[e[i]]))return!1;return e!==ke||!V(n[ye])}}var ye="forEach",be=["clear","delete"],we=["get","has","set"],xe=be.concat(ye,we),ke=be.concat(we),Se=["add"].concat(be,ye,"has");const _e=U?me(xe):T("Map"),Ee=U?me(ke):T("WeakMap"),Ce=U?me(Se):T("Set"),Ae=T("WeakSet");function Pe(e){for(var t=se(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r}function Le(e){for(var t=se(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r}function Te(e){for(var t={},n=se(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t}function Ne(e){var t=[];for(var n in e)V(e[n])&&t.push(n);return t.sort()}function Oe(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,l=0;l<s;l++){var u=a[l];t&&void 0!==n[u]||(n[u]=o[u])}return n}}const Me=Oe(ve),Re=Oe(se),De=Oe(ve,!0);function je(e){if(!E(e))return{};if(m)return m(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}function Ie(e,t){var n=je(e);return t&&Re(n,t),n}function Fe(e){return E(e)?W(e)?e.slice():Me({},e):e}function ze(e,t){return t(e),e}function Ve(e){return W(e)?e:[e]}function Be(e){return ce.toPath(e)}function $e(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0}function Ue(e,t,n){var r=$e(e,Be(t));return A(r)?n:r}function He(e,t){for(var n=(t=Be(t)).length,r=0;r<n;r++){var i=t[r];if(!G(e,i))return!1;e=e[i]}return!!n}function qe(e){return e}function We(e){return e=Re({},e),function(t){return ue(t,e)}}function Ge(e){return e=Be(e),function(t){return $e(t,e)}}function Ye(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}function Xe(e,t,n){return null==e?qe:V(e)?Ye(e,t,n):E(e)&&!W(e)?We(e):Ge(e)}function Ke(e,t){return Xe(e,t,1/0)}function Je(e,t,n){return ce.iteratee!==Ke?ce.iteratee(e,t):Xe(e,t,n)}function Qe(e,t,n){t=Je(t,n);for(var r=se(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o}function Ze(){}function et(e){return null==e?Ze:function(t){return Ue(e,t)}}function tt(e,t,n){var r=Array(Math.max(0,e));t=Ye(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r}function nt(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}ce.toPath=Ve,ce.iteratee=Ke;const rt=Date.now||function(){return(new Date).getTime()};function it(e){var t=function(t){return e[t]},n="(?:"+se(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}}const ot={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},at=it(ot),st=it(Te(ot)),lt=ce.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var ut=/(.)^/,ct={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},ft=/\\|'|\r|\n|\u2028|\u2029/g;function ht(e){return"\\"+ct[e]}var dt=/^\s*(\w|\$)+\s*$/;function pt(e,t,n){!t&&n&&(t=n),t=De({},t,ce.templateSettings);var r=RegExp([(t.escape||ut).source,(t.interpolate||ut).source,(t.evaluate||ut).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(r,function(t,n,r,a,s){return o+=e.slice(i,s).replace(ft,ht),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n";var a,s=t.variable;if(s){if(!dt.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(e){throw e.source=o,e}var l=function(e){return a.call(this,e,ce)};return l.source="function("+s+"){\n"+o+"}",l}function gt(e,t,n){var r=(t=Be(t)).length;if(!r)return V(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=V(o)?o.call(e):o}return e}var vt=0;function mt(e){var t=++vt+"";return e?e+t:t}function yt(e){var t=ce(e);return t._chain=!0,t}function bt(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=je(e.prototype),a=e.apply(o,i);return E(a)?a:o}var wt=_(function(e,t){var n=wt.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return bt(e,r,this,this,a)};return r});wt.placeholder=ce;const xt=wt,kt=_(function(e,t,n){if(!V(e))throw new TypeError("Bind must be called on a function");var r=_(function(i){return bt(e,r,t,this,n.concat(i))});return r}),St=Z(oe);function _t(e,t,n,r){if(r=r||[],t||0===t){if(t<=0)return r.concat(e)}else t=1/0;for(var i=r.length,o=0,a=oe(e);o<a;o++){var s=e[o];if(St(s)&&(W(s)||X(s)))if(t>1)_t(s,t-1,n,r),i=r.length;else for(var l=0,u=s.length;l<u;)r[i++]=s[l++];else n||(r[i++]=s)}return r}const Et=_(function(e,t){var n=(t=_t(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=kt(e[r],e)}return e});function Ct(e,t){var n=function(r){var i=n.cache,o=""+(t?t.apply(this,arguments):r);return G(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n}const At=_(function(e,t,n){return setTimeout(function(){return e.apply(null,n)},t)}),Pt=xt(At,ce,1);function Lt(e,t,n){var r,i,o,a,s=0;n||(n={});var l=function(){s=!1===n.leading?0:rt(),r=null,a=e.apply(i,o),r||(i=o=null)},u=function(){var u=rt();s||!1!==n.leading||(s=u);var c=t-(u-s);return i=this,o=arguments,c<=0||c>t?(r&&(clearTimeout(r),r=null),s=u,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,c)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u}function Tt(e,t,n){var r,i,o,a,s,l=function(){var u=rt()-i;t>u?r=setTimeout(l,t-u):(r=null,n||(a=e.apply(s,o)),r||(o=s=null))},u=_(function(u){return s=this,o=u,i=rt(),r||(r=setTimeout(l,t),n&&(a=e.apply(s,o))),a});return u.cancel=function(){clearTimeout(r),r=o=s=null},u}function Nt(e,t){return xt(t,e)}function Ot(e){return function(){return!e.apply(this,arguments)}}function Mt(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function Rt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function Dt(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}const jt=xt(Dt,2);function It(e,t,n){t=Je(t,n);for(var r,i=se(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r}function Ft(e){return function(t,n,r){n=Je(n,r);for(var i=oe(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}const zt=Ft(1),Vt=Ft(-1);function Bt(e,t,n,r){for(var i=(n=Je(n,r,1))(t),o=0,a=oe(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o}function $t(e,t,n){return function(r,i,o){var a=0,s=oe(r);if("number"==typeof o)e>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=t(c.call(r,a,s),J))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(r[o]===i)return o;return-1}}const Ut=$t(1,zt,Bt),Ht=$t(-1,Vt);function qt(e,t,n){var r=(St(e)?zt:It)(e,t,n);if(void 0!==r&&-1!==r)return e[r]}function Wt(e,t){return qt(e,We(t))}function Gt(e,t,n){var r,i;if(t=Ye(t,n),St(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=se(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e}function Yt(e,t,n){t=Je(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o}function Xt(e){return function(t,n,r,i){var o=arguments.length>=3;return function(t,n,r,i){var o=!St(t)&&se(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var l=o?o[s]:s;r=n(r,t[l],l,t)}return r}(t,Ye(n,i,4),r,o)}}const Kt=Xt(1),Jt=Xt(-1);function Qt(e,t,n){var r=[];return t=Je(t,n),Gt(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function Zt(e,t,n){return Qt(e,Ot(Je(t)),n)}function en(e,t,n){t=Je(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0}function tn(e,t,n){t=Je(t,n);for(var r=!St(e)&&se(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1}function nn(e,t,n,r){return St(e)||(e=Pe(e)),("number"!=typeof n||r)&&(n=0),Ut(e,t,n)>=0}const rn=_(function(e,t,n){var r,i;return V(t)?i=t:(t=Be(t),r=t.slice(0,-1),t=t[t.length-1]),Yt(e,function(e){var o=i;if(!o){if(r&&r.length&&(e=$e(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)})});function on(e,t){return Yt(e,Ge(t))}function an(e,t){return Qt(e,We(t))}function sn(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,l=(e=St(e)?e:Pe(e)).length;s<l;s++)null!=(r=e[s])&&r>o&&(o=r);else t=Je(t,n),Gt(e,function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o}function ln(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var s=0,l=(e=St(e)?e:Pe(e)).length;s<l;s++)null!=(r=e[s])&&r<o&&(o=r);else t=Je(t,n),Gt(e,function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)});return o}var un=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function cn(e){return e?W(e)?c.call(e):N(e)?e.match(un):St(e)?Yt(e,qe):Pe(e):[]}function fn(e,t,n){if(null==t||n)return St(e)||(e=Pe(e)),e[nt(e.length-1)];var r=cn(e),i=oe(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=nt(a,o),l=r[a];r[a]=r[s],r[s]=l}return r.slice(0,t)}function hn(e){return fn(e,1/0)}function dn(e,t,n){var r=0;return t=Je(t,n),on(Yt(e,function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),"value")}function pn(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=Je(r,i),Gt(n,function(t,i){var a=r(t,i,n);e(o,t,a)}),o}}const gn=pn(function(e,t,n){G(e,n)?e[n].push(t):e[n]=[t]}),vn=pn(function(e,t,n){e[n]=t}),mn=pn(function(e,t,n){G(e,n)?e[n]++:e[n]=1}),yn=pn(function(e,t,n){e[n?0:1].push(t)},!0);function bn(e){return null==e?0:St(e)?e.length:se(e).length}function wn(e,t,n){return t in n}const xn=_(function(e,t){var n={},r=t[0];if(null==e)return n;V(r)?(t.length>1&&(r=Ye(r,t[1])),t=ve(e)):(r=wn,t=_t(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n}),kn=_(function(e,t){var n,r=t[0];return V(r)?(r=Ot(r),t.length>1&&(n=t[1])):(t=Yt(_t(t,!1,!1),String),r=function(e,n){return!nn(t,n)}),xn(e,r,n)});function Sn(e,t,n){return c.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function _n(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:Sn(e,e.length-t)}function En(e,t,n){return c.call(e,null==t||n?1:t)}function Cn(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:En(e,Math.max(0,e.length-t))}function An(e){return Qt(e,Boolean)}function Pn(e,t){return _t(e,t,!1)}const Ln=_(function(e,t){return t=_t(t,!0,!0),Qt(e,function(e){return!nn(t,e)})}),Tn=_(function(e,t){return Ln(e,t)});function Nn(e,t,n,r){P(t)||(r=n,n=t,t=!1),null!=n&&(n=Je(n,r));for(var i=[],o=[],a=0,s=oe(e);a<s;a++){var l=e[a],u=n?n(l,a,e):l;t&&!n?(a&&o===u||i.push(l),o=u):n?nn(o,u)||(o.push(u),i.push(l)):nn(i,l)||i.push(l)}return i}const On=_(function(e){return Nn(_t(e,!0,!0))});function Mn(e){for(var t=[],n=arguments.length,r=0,i=oe(e);r<i;r++){var o=e[r];if(!nn(t,o)){var a;for(a=1;a<n&&nn(arguments[a],o);a++);a===n&&t.push(o)}}return t}function Rn(e){for(var t=e&&sn(e,oe).length||0,n=Array(t),r=0;r<t;r++)n[r]=on(e,r);return n}const Dn=_(Rn);function jn(e,t){for(var n={},r=0,i=oe(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n}function In(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i}function Fn(e,t){if(null==t||t<1)return[];for(var n=[],r=0,i=e.length;r<i;)n.push(c.call(e,r,r+=t));return n}function zn(e,t){return e._chain?ce(t).chain():t}function Vn(e){return Gt(Ne(e),function(t){var n=ce[t]=e[t];ce.prototype[t]=function(){var e=[this._wrapped];return u.apply(e,arguments),zn(this,n.apply(ce,e))}}),ce}Gt(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];ce.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),zn(this,n)}}),Gt(["concat","join","slice"],function(e){var t=a[e];ce.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),zn(this,e)}});const Bn=ce;var $n=Vn(r);$n._=$n;const Un=$n},4528:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},4664:(e,t,n)=>{var r=n(9770),i=n(3345),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return o.call(e,t)}))}:i;e.exports=s},4684:(e,t,n)=>{var r=n(9302),i=n(5288),o=n(6800),a=n(7241),s=Object.prototype,l=s.hasOwnProperty,u=r(function(e,t){e=Object(e);var n=-1,r=t.length,u=r>2?t[2]:void 0;for(u&&o(t[0],t[1],u)&&(r=1);++n<r;)for(var c=t[n],f=a(c),h=-1,d=f.length;++h<d;){var p=f[h],g=e[p];(void 0===g||i(g,s[p])&&!l.call(e,p))&&(e[p]=c[p])}return e});e.exports=u},4692:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},u=o.push,c=o.indexOf,f={},h=f.toString,d=f.hasOwnProperty,p=d.toString,g=p.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in w)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function k(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[h.call(e)]||"object":typeof e}var S="3.6.4",_=function(e,t){return new _.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=k(e);return!m(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}_.fn=_.prototype={jquery:S,constructor:_,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=_.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(_.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(_.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},_.extend=_.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(u&&r&&(_.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||_.isPlainObject(n)?n:{},i=!1,a[t]=_.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},_.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e)||(t=a(e))&&("function"!=typeof(n=d.call(t,"constructor")&&t.constructor)||p.call(n)!==g))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){x(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(E(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?_.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:c.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(E(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return l(a)},guid:1,support:v}),"function"==typeof Symbol&&(_.fn[Symbol.iterator]=o[Symbol.iterator]),_.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()});var C=function(e){var t,n,r,i,o,a,s,l,u,c,f,h,d,p,g,v,m,y,b,w="sizzle"+1*new Date,x=e.document,k=0,S=0,_=le(),E=le(),C=le(),A=le(),P=function(e,t){return e===t&&(f=!0),0},L={}.hasOwnProperty,T=[],N=T.pop,O=T.push,M=T.push,R=T.slice,D=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",F="(?:\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",z="\\["+I+"*("+F+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+I+"*\\]",V=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",B=new RegExp(I+"+","g"),$=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),U=new RegExp("^"+I+"*,"+I+"*"),H=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),q=new RegExp(I+"|>"),W=new RegExp(V),G=new RegExp("^"+F+"$"),Y={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+V),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},ae=we(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{M.apply(T=R.call(x.childNodes),x.childNodes),T[x.childNodes.length].nodeType}catch(e){M={apply:T.length?function(e,t){O.apply(e,R.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,u,c,f,p,m,y=t&&t.ownerDocument,x=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return r;if(!i&&(h(t),t=t||d,g)){if(11!==x&&(f=Z.exec(e)))if(o=f[1]){if(9===x){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(y&&(u=y.getElementById(o))&&b(t,u)&&u.id===o)return r.push(u),r}else{if(f[2])return M.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return M.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!A[e+" "]&&(!v||!v.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(m=e,y=t,1===x&&(q.test(e)||H.test(e))){for((y=ee.test(e)&&me(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=w)),s=(p=a(e)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+be(p[s]);m=p.join(",")}try{return M.apply(r,y.querySelectorAll(m)),r}catch(t){A(e,!0)}finally{c===w&&t.removeAttribute("id")}}}return l(e.replace($,"$1"),t,r,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ue(e){return e[w]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ve(e){return ue(function(t){return t=+t,ue(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e: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",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce(function(e){return p.appendChild(e).appendChild(d.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),n.cssHas=ce(function(){try{return d.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ce(function(e){return p.appendChild(e).id=w,!d.getElementsByName||!d.getElementsByName(w).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],v=[],(n.qsa=Q.test(d.querySelectorAll))&&(ce(function(e){var t;p.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(t=d.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+I+"*name"+I+"*="+I+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=Q.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),m.push("!=",V)}),n.cssHas||v.push(":has"),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),t=Q.test(p.compareDocumentPosition),b=t||Q.test(p.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},P=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==x&&b(x,e)?-1:t==d||t.ownerDocument==x&&b(x,t)?1:c?D(c,e)-D(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==d?-1:t==d?1:i?-1:o?1:c?D(c,e)-D(c,t):0;if(i===o)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?he(a[r],s[r]):a[r]==x?-1:s[r]==x?1:0},d):d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&g&&!A[t+" "]&&(!m||!m.test(t))&&(!v||!v.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return se(t,d,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=d&&h(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=d&&h(e);var i=r.attrHandle[t.toLowerCase()],o=i&&L.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(P),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},r=se.selectors={cacheLength:50,createPseudo:ue,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&_(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,f,h,d,p,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(v){if(o){for(;g;){for(h=t;h=h[g];)if(s?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?v.firstChild:v.lastChild],a&&y){for(b=(d=(u=(c=(f=(h=v)[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===k&&u[1])&&u[2],h=d&&v.childNodes[d];h=++d&&h&&h[g]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[k,d,b];break}}else if(y&&(b=d=(u=(c=(f=(h=t)[w]||(h[w]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===k&&u[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]={}))[e]=[k,b]),h!==t)););return(b-=i)===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=D(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ue(function(e){var t=[],n=[],r=s(e.replace($,"$1"));return r[w]?ue(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ue(function(e){return function(t){return se(e,t).length>0}}),contains:ue(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}}),lang:ue(function(e){return G.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=de(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function we(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=S++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,l){var u,c,f,h=[k,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[w]||(t[w]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((u=c[o])&&u[0]===k&&u[1]===s)return h[2]=u[2];if(c[o]=h,h[2]=e(t,n,l))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ke(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function Se(e,t,n,r,i,o){return r&&!r[w]&&(r=Se(r)),i&&!i[w]&&(i=Se(i,o)),ue(function(o,a,s,l){var u,c,f,h=[],d=[],p=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),v=!e||!o&&t?g:ke(g,h,e,s,l),m=n?i||(o?e:p||r)?[]:a:v;if(n&&n(v,m,s,l),r)for(u=ke(m,d),r(u,[],s,l),c=u.length;c--;)(f=u[c])&&(m[d[c]]=!(v[d[c]]=f));if(o){if(i||e){if(i){for(u=[],c=m.length;c--;)(f=m[c])&&u.push(v[c]=f);i(null,m=[],u,l)}for(c=m.length;c--;)(f=m[c])&&(u=i?D(o,f):h[c])>-1&&(o[u]=!(a[u]=f))}}else m=ke(m===a?m.splice(p,m.length):m),i?i(null,a,m,l):M.apply(a,m)})}function _e(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],l=a?1:0,c=we(function(e){return e===t},s,!0),f=we(function(e){return D(t,e)>-1},s,!0),h=[function(e,n,r){var i=!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];l<o;l++)if(n=r.relative[e[l].type])h=[we(xe(h),n)];else{if((n=r.filter[e[l].type].apply(null,e[l].matches))[w]){for(i=++l;i<o&&!r.relative[e[i].type];i++);return Se(l>1&&xe(h),l>1&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace($,"$1"),n,l<i&&_e(e.slice(l,i)),i<o&&_e(e=e.slice(i)),i<o&&be(e))}h.push(n)}return xe(h)}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,o,a,s,l,u,c=E[e+" "];if(c)return t?0:c.slice(0);for(s=e,l=[],u=r.preFilter;s;){for(a in n&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=H.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))||u[a]&&!(i=u[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):E(e,l).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=C[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=_e(t[n]))[w]?i.push(s):o.push(s);s=C(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,l,c){var f,p,v,m=0,y="0",b=o&&[],w=[],x=u,S=o||i&&r.find.TAG("*",c),_=k+=null==x?1:Math.random()||.1,E=S.length;for(c&&(u=a==d||a||c);y!==E&&null!=(f=S[y]);y++){if(i&&f){for(p=0,a||f.ownerDocument==d||(h(f),s=!g);v=e[p++];)if(v(f,a||d,s)){l.push(f);break}c&&(k=_)}n&&((f=!v&&f)&&m--,o&&b.push(f))}if(m+=y,n&&y!==m){for(p=0;v=t[p++];)v(b,w,a,s);if(o){if(m>0)for(;y--;)b[y]||w[y]||(w[y]=N.call(l));w=ke(w)}M.apply(l,w),c&&!o&&w.length>0&&m+t.length>1&&se.uniqueSort(l)}return c&&(k=_,u=x),b};return n?ue(o):o}(o,i)),s.selector=e}return s},l=se.select=function(e,t,n,i){var o,l,u,c,f,h="function"==typeof e&&e,d=!i&&a(e=h.selector||e);if(n=n||[],1===d.length){if((l=d[0]=d[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&g&&r.relative[l[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=Y.needsContext.test(e)?0:l.length;o--&&(u=l[o],!r.relative[c=u.type]);)if((f=r.find[c])&&(i=f(u.matches[0].replace(te,ne),ee.test(l[0].type)&&me(t.parentNode)||t))){if(l.splice(o,1),!(e=i.length&&be(l)))return M.apply(n,i),n;break}}return(h||s(e,d))(i,t,!g,n,!t||ee.test(e)&&me(t.parentNode)||t),n},n.sortStable=w.split("").sort(P).join("")===w,n.detectDuplicates=!!f,h(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(j,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(r);_.find=C,_.expr=C.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=C.uniqueSort,_.text=C.getText,_.isXMLDoc=C.isXML,_.contains=C.contains,_.escapeSelector=C.escape;var A=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&_(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},L=_.expr.match.needsContext;function T(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(e,t,n){return m(t)?_.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?_.grep(e,function(e){return e===t!==n}):"string"!=typeof t?_.grep(e,function(e){return c.call(t,e)>-1!==n}):_.filter(t,e,n)}_.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?_.find.matchesSelector(r,e)?[r]:[]:_.find.matches(e,_.grep(t,function(e){return 1===e.nodeType}))},_.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(_(e).filter(function(){for(t=0;t<r;t++)if(_.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)_.find(e,i[t],n);return r>1?_.uniqueSort(n):n},filter:function(e){return this.pushStack(O(this,e||[],!1))},not:function(e){return this.pushStack(O(this,e||[],!0))},is:function(e){return!!O(this,"string"==typeof e&&L.test(e)?_(e):e||[],!1).length}});var M,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||M,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:R.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),N.test(r[1])&&_.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,M=_(b);var D=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(_.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&_(e);if(!L.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&_.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?_.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(_(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(T(e,"template")&&(e=e.content||e),_.merge([],e.childNodes))}},function(e,t){_.fn[e]=function(n,r){var i=_.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=_.filter(r,i)),this.length>1&&(j[e]||_.uniqueSort(i),D.test(e)&&i.reverse()),this.pushStack(i)}});var F=/[^\x20\t\r\n\f]+/g;function z(e){return e}function V(e){throw e}function B(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}_.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return _.each(e.match(F)||[],function(e,n){t[n]=!0}),t}(e):_.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},u={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){_.each(n,function(n,r){m(r)?e.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==k(r)&&t(r)})}(arguments),n&&!t&&l()),this},remove:function(){return _.each(arguments,function(e,t){for(var n;(n=_.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?_.inArray(e,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||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},_.extend({Deferred:function(e){var t=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return _.Deferred(function(n){_.each(t,function(t,r){var i=m(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,i){var o=0;function a(e,t,n,i){return function(){var s=this,l=arguments,u=function(){var r,u;if(!(e<o)){if((r=n.apply(s,l))===t.promise())throw new TypeError("Thenable self-resolution");u=r&&("object"==typeof r||"function"==typeof r)&&r.then,m(u)?i?u.call(r,a(o,t,z,i),a(o,t,V,i)):(o++,u.call(r,a(o,t,z,i),a(o,t,V,i),a(o,t,z,t.notifyWith))):(n!==z&&(s=void 0,l=[r]),(i||t.resolveWith)(s,l))}},c=i?u:function(){try{u()}catch(r){_.Deferred.exceptionHook&&_.Deferred.exceptionHook(r,c.stackTrace),e+1>=o&&(n!==V&&(s=void 0,l=[r]),t.rejectWith(s,l))}};e?c():(_.Deferred.getStackHook&&(c.stackTrace=_.Deferred.getStackHook()),r.setTimeout(c))}}return _.Deferred(function(r){t[0][3].add(a(0,r,m(i)?i:z,r.notifyWith)),t[1][3].add(a(0,r,m(e)?e:z)),t[2][3].add(a(0,r,m(n)?n:V))}).promise()},promise:function(e){return null!=e?_.extend(e,i):i}},o={};return _.each(t,function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=_.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(B(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||m(i[n]&&i[n].then)))return o.then();for(;n--;)B(i[n],a(n),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&$.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},_.readyException=function(e){r.setTimeout(function(){throw e})};var U=_.Deferred();function H(){b.removeEventListener("DOMContentLoaded",H),r.removeEventListener("load",H),_.ready()}_.fn.ready=function(e){return U.then(e).catch(function(e){_.readyException(e)}),this},_.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==e&&--_.readyWait>0||U.resolveWith(b,[_]))}}),_.ready.then=U.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(_.ready):(b.addEventListener("DOMContentLoaded",H),r.addEventListener("load",H));var q=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===k(n))for(s in i=!0,n)q(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(_(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},W=/^-ms-/,G=/-([a-z])/g;function Y(e,t){return t.toUpperCase()}function X(e){return e.replace(W,"ms-").replace(G,Y)}var K=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function J(){this.expando=_.expando+J.uid++}J.uid=1,J.prototype={cache:function(e){var t=e[this.expando];return t||(t={},K(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(F)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||_.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!_.isEmptyObject(t)}};var Q=new J,Z=new J,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}Z.set(e,t,n)}else n=void 0;return n}_.extend({hasData:function(e){return Z.hasData(e)||Q.hasData(e)},data:function(e,t,n){return Z.access(e,t,n)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),_.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Z.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=X(r.slice(5)),ne(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Z.set(this,e)}):q(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=Z.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each(function(){Z.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Z.remove(this,e)})}}),_.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,_.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=_.queue(e,t),r=n.length,i=n.shift(),o=_._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){_.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:_.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),_.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?_.queue(this[0],e):void 0===t?this:this.each(function(){var n=_.queue(this,e,t);_._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&_.dequeue(this,e)})},dequeue:function(e){return this.each(function(){_.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=_.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Q.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=b.documentElement,se=function(e){return _.contains(e.ownerDocument,e)},le={composed:!0};ae.getRootNode&&(se=function(e){return _.contains(e.ownerDocument,e)||e.getRootNode(le)===e.ownerDocument});var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===_.css(e,"display")};function ce(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return _.css(e,t,"")},l=s(),u=n&&n[3]||(_.cssNumber[t]?"":"px"),c=e.nodeType&&(_.cssNumber[t]||"px"!==u&&+l)&&ie.exec(_.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)_.style(e,t,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,_.style(e,t,c+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}var fe={};function he(e){var t,n=e.ownerDocument,r=e.nodeName,i=fe[r];return i||(t=n.body.appendChild(n.createElement(r)),i=_.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),fe[r]=i,i)}function de(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=Q.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ue(r)&&(i[o]=he(r))):"none"!==n&&(i[o]="none",Q.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}_.fn.extend({show:function(){return de(this,!0)},hide:function(){return de(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ue(this)?_(this).show():_(this).hide()})}});var pe,ge,ve=/^(?:checkbox|radio)$/i,me=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;pe=b.createDocumentFragment().appendChild(b.createElement("div")),(ge=b.createElement("input")).setAttribute("type","radio"),ge.setAttribute("checked","checked"),ge.setAttribute("name","t"),pe.appendChild(ge),v.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="<option></option>",v.option=!!pe.lastChild;var be={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 we(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&T(e,t)?_.merge([e],n):n}function xe(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,v.option||(be.optgroup=be.option=[1,"<select multiple='multiple'>","</select>"]);var ke=/<|&#?\w+;/;function Se(e,t,n,r,i){for(var o,a,s,l,u,c,f=t.createDocumentFragment(),h=[],d=0,p=e.length;d<p;d++)if((o=e[d])||0===o)if("object"===k(o))_.merge(h,o.nodeType?[o]:o);else if(ke.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(me.exec(o)||["",""])[1].toLowerCase(),l=be[s]||be._default,a.innerHTML=l[1]+_.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;_.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(t.createTextNode(o));for(f.textContent="",d=0;o=h[d++];)if(r&&_.inArray(o,r)>-1)i&&i.push(o);else if(u=se(o),a=we(f.appendChild(o),"script"),u&&xe(a),n)for(c=0;o=a[c++];)ye.test(o.type||"")&&n.push(o);return f}var _e=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Ce(){return!1}function Ae(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Pe(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Pe(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ce;else if(!i)return e;return 1===o&&(a=i,i=function(e){return _().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=_.guid++)),e.each(function(){_.event.add(this,t,i,r,n)})}function Le(e,t,n){n?(Q.set(e,t,!1),_.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(_.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),Q.set(this,t,o),r=n(this,t),this[t](),o!==(i=Q.get(this,t))||r?Q.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(Q.set(this,t,{value:_.event.trigger(_.extend(o[0],_.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&_.event.add(e,t,Ee)}_.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,f,h,d,p,g,v=Q.get(e);if(K(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&_.find.matchesSelector(ae,i),n.guid||(n.guid=_.guid++),(l=v.events)||(l=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(F)||[""]).length;u--;)d=g=(s=_e.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),d&&(f=_.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=_.event.special[d]||{},c=_.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&_.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=l[d])||((h=l[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),_.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,h,d,p,g,v=Q.hasData(e)&&Q.get(e);if(v&&(l=v.events)){for(u=(t=(t||"").match(F)||[""]).length;u--;)if(d=g=(s=_e.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),d){for(f=_.event.special[d]||{},h=l[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(e,c));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,p,v.handle)||_.removeEvent(e,d,v.handle),delete l[d])}else for(d in l)_.event.remove(e,d+t[u],n,r,!0);_.isEmptyObject(l)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),l=_.event.fix(e),u=(Q.get(this,"events")||Object.create(null))[l.type]||[],c=_.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=_.event.handlers.call(this,l,u),t=0;(i=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((_.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,i,o,a,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?_(i,this).index(u)>-1:_.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l<t.length&&s.push({elem:u,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(_.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[_.expando]?e:new _.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ve.test(t.type)&&t.click&&T(t,"input")&&Le(t,"click",Ee),!1},trigger:function(e){var t=this||e;return ve.test(t.type)&&t.click&&T(t,"input")&&Le(t,"click"),!0},_default:function(e){var t=e.target;return ve.test(t.type)&&t.click&&T(t,"input")&&Q.get(t,"click")||T(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},_.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},_.Event=function(e,t){if(!(this instanceof _.Event))return new _.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:Ce,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&_.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[_.expando]=!0},_.Event.prototype={constructor:_.Event,isDefaultPrevented:Ce,isPropagationStopped:Ce,isImmediatePropagationStopped:Ce,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},_.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},_.event.addProp),_.each({focus:"focusin",blur:"focusout"},function(e,t){_.event.special[e]={setup:function(){return Le(this,e,Ae),!1},trigger:function(){return Le(this,e),!0},_default:function(t){return Q.get(t.target,e)},delegateType:t}}),_.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){_.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||_.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),_.fn.extend({on:function(e,t,n,r){return Pe(this,e,t,n,r)},one:function(e,t,n,r){return Pe(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,_(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ce),this.each(function(){_.event.remove(this,e,n,t)})}});var Te=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Oe=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Me(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Re(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Q.hasData(e)&&(s=Q.get(e).events))for(i in Q.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)_.event.add(t,i,s[i][n]);Z.hasData(e)&&(o=Z.access(e),a=_.extend({},o),Z.set(t,a))}}function Ie(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ve.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Fe(e,t,n,r){t=l(t);var i,o,a,s,u,c,f=0,h=e.length,d=h-1,p=t[0],g=m(p);if(g||h>1&&"string"==typeof p&&!v.checkClone&&Ne.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),Fe(o,t,n,r)});if(h&&(o=(i=Se(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=_.map(we(i,"script"),Re)).length;f<h;f++)u=i,f!==d&&(u=_.clone(u,!0,!0),s&&_.merge(a,we(u,"script"))),n.call(e[f],u,f);if(s)for(c=a[a.length-1].ownerDocument,_.map(a,De),f=0;f<s;f++)u=a[f],ye.test(u.type||"")&&!Q.access(u,"globalEval")&&_.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?_._evalUrl&&!u.noModule&&_._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):x(u.textContent.replace(Oe,""),u,c))}return e}function ze(e,t,n){for(var r,i=t?_.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||_.cleanData(we(r)),r.parentNode&&(n&&se(r)&&xe(we(r,"script")),r.parentNode.removeChild(r));return e}_.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=se(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||_.isXMLDoc(e)))for(a=we(s),r=0,i=(o=we(e)).length;r<i;r++)Ie(o[r],a[r]);if(t)if(n)for(o=o||we(e),a=a||we(s),r=0,i=o.length;r<i;r++)je(o[r],a[r]);else je(e,s);return(a=we(s,"script")).length>0&&xe(a,!l&&we(e,"script")),s},cleanData:function(e){for(var t,n,r,i=_.event.special,o=0;void 0!==(n=e[o]);o++)if(K(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?_.event.remove(n,r):_.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),_.fn.extend({detach:function(e){return ze(this,e,!0)},remove:function(e){return ze(this,e)},text:function(e){return q(this,function(e){return void 0===e?_.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Fe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Me(this,e).appendChild(e)})},prepend:function(){return Fe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Me(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(_.cleanData(we(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return _.clone(this,e,t)})},html:function(e){return q(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Te.test(e)&&!be[(me.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(_.cleanData(we(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Fe(this,arguments,function(t){var n=this.parentNode;_.inArray(this,e)<0&&(_.cleanData(we(this)),n&&n.replaceChild(t,this))},e)}}),_.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){_.fn[e]=function(e){for(var n,r=[],i=_(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),_(i[a])[t](n),u.apply(r,n.get());return this.pushStack(r)}});var Ve=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Be=/^--/,$e=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},He=new RegExp(oe.join("|"),"i"),qe="[\\x20\\t\\r\\n\\f]",We=new RegExp("^"+qe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+qe+"+$","g");function Ge(e,t,n){var r,i,o,a,s=Be.test(t),l=e.style;return(n=n||$e(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(We,"$1")||void 0),""!==a||se(e)||(a=_.style(e,t)),!v.pixelBoxStyles()&&Ve.test(a)&&He.test(t)&&(r=l.width,i=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=r,l.minWidth=i,l.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){u.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%",ae.appendChild(u).appendChild(c);var e=r.getComputedStyle(c);n="1%"!==e.top,l=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),i=36===t(e.width),c.style.position="absolute",o=12===t(c.offsetWidth/3),ae.removeChild(u),c=null}}function t(e){return Math.round(parseFloat(e))}var n,i,o,a,s,l,u=b.createElement("div"),c=b.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===c.style.backgroundClip,_.extend(v,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,n,i;return null==s&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",ae.appendChild(e).appendChild(t).appendChild(n),i=r.getComputedStyle(t),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight,ae.removeChild(e)),s}}))}();var Xe=["Webkit","Moz","ms"],Ke=b.createElement("div").style,Je={};function Qe(e){return _.cssProps[e]||Je[e]||(e in Ke?e:Je[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Xe.length;n--;)if((e=Xe[n]+t)in Ke)return e}(e)||e)}var Ze=/^(none|table(?!-c[ea]).+)/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"};function nt(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function rt(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=_.css(e,n+oe[a],!0,i)),r?("content"===n&&(l-=_.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(l-=_.css(e,"border"+oe[a]+"Width",!0,i))):(l+=_.css(e,"padding"+oe[a],!0,i),"padding"!==n?l+=_.css(e,"border"+oe[a]+"Width",!0,i):s+=_.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l}function it(e,t,n){var r=$e(e),i=(!v.boxSizingReliable()||n)&&"border-box"===_.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ve.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&T(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===_.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===_.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+rt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function ot(e,t,n,r,i){return new ot.prototype.init(e,t,n,r,i)}_.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"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(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),l=Be.test(t),u=e.style;if(l||(t=Qe(s)),a=_.cssHooks[t]||_.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ce(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(_.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Be.test(t)||(t=Qe(s)),(a=_.cssHooks[t]||_.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in tt&&(i=tt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),_.each(["height","width"],function(e,t){_.cssHooks[t]={get:function(e,n,r){if(n)return!Ze.test(_.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?it(e,t,r):Ue(e,et,function(){return it(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===_.css(e,"boxSizing",!1,o),l=r?rt(e,t,r,s,o):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-rt(e,t,"border",!1,o)-.5)),l&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=_.css(e,t)),nt(0,n,l)}}}),_.cssHooks.marginLeft=Ye(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),_.each({margin:"",padding:"",border:"Width"},function(e,t){_.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(_.cssHooks[e+t].set=nt)}),_.fn.extend({css:function(e,t){return q(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=_.css(e,t[a],!1,r);return o}return void 0!==n?_.style(e,t,n):_.css(e,t)},e,t,arguments.length>1)}}),_.Tween=ot,ot.prototype={constructor:ot,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||_.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(_.cssNumber[n]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,n=ot.propHooks[this.prop];return this.options.duration?this.pos=t=_.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ot.propHooks._default.set(this),this}},ot.prototype.init.prototype=ot.prototype,ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=_.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){_.fx.step[e.prop]?_.fx.step[e.prop](e):1!==e.elem.nodeType||!_.cssHooks[e.prop]&&null==e.elem.style[Qe(e.prop)]?e.elem[e.prop]=e.now:_.style(e.elem,e.prop,e.now+e.unit)}}},ot.propHooks.scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},_.fx=ot.prototype.init,_.fx.step={};var at,st,lt=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function ct(){st&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ct):r.setTimeout(ct,_.fx.interval),_.fx.tick())}function ft(){return r.setTimeout(function(){at=void 0}),at=Date.now()}function ht(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function dt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=_.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;for(var t=at||ft(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),o=0,a=u.tweens.length;o<a;o++)u.tweens[o].run(r);return s.notifyWith(e,[u,r,n]),r<1&&a?n:(a||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:_.extend({},t),opts:_.extend(!0,{specialEasing:{},easing:_.easing._default},n),originalProperties:t,originalOptions:n,startTime:at||ft(),duration:n.duration,tweens:[],createTween:function(t,n){var r=_.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=_.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,u.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(u,e,c,u.opts))return m(r.stop)&&(_._queueHooks(u.elem,u.opts.queue).stop=r.stop.bind(r)),r;return _.map(c,dt,u),m(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),_.fx.timer(_.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}_.Animation=_.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ce(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(F);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,l,u,c,f="width"in t||"height"in t,h=this,d={},p=e.style,g=e.nodeType&&ue(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=_._queueHooks(e,"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--,_.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],lt.test(i)){if(delete t[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]||_.style(e,r)}if((l=!_.isEmptyObject(t))||!_.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(u=v&&v.display)&&(u=Q.get(e,"display")),"none"===(c=_.css(e,"display"))&&(u?c=u:(de([e],!0),u=e.style.display||u,c=_.css(e,"display"),de([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===_.css(e,"float")&&(l||(h.done(function(){p.display=u}),null==u&&(c=p.display,u="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]})),l=!1,d)l||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:u}),o&&(v.hidden=!g),g&&de([e],!0),h.done(function(){for(r in g||de([e]),Q.remove(e,"fxshow"),d)_.style(e,r,d[r])})),l=dt(g?v[r]:0,r,h),r in v||(v[r]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),_.speed=function(e,t,n){var r=e&&"object"==typeof e?_.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return _.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in _.fx.speeds?r.duration=_.fx.speeds[r.duration]:r.duration=_.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&_.dequeue(this,r.queue)},r},_.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=_.isEmptyObject(e),o=_.speed(t,n,r),a=function(){var t=pt(this,_.extend({},e),o);(i||Q.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=_.timers,a=Q.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ut.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||_.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Q.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=_.timers,a=r?r.length:0;for(n.finish=!0,_.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),_.each(["toggle","show","hide"],function(e,t){var n=_.fn[t];_.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ht(t,!0),e,r,i)}}),_.each({slideDown:ht("show"),slideUp:ht("hide"),slideToggle:ht("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){_.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),_.timers=[],_.fx.tick=function(){var e,t=0,n=_.timers;for(at=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||_.fx.stop(),at=void 0},_.fx.timer=function(e){_.timers.push(e),_.fx.start()},_.fx.interval=13,_.fx.start=function(){st||(st=!0,ct())},_.fx.stop=function(){st=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(e,t){return e=_.fx&&_.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,n){var i=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(i)}})},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var gt,vt=_.expr.attrHandle;_.fn.extend({attr:function(e,t){return q(this,_.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){_.removeAttr(this,e)})}}),_.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?_.prop(e,t,n):(1===o&&_.isXMLDoc(e)||(i=_.attrHooks[t.toLowerCase()]||(_.expr.match.bool.test(t)?gt:void 0)),void 0!==n?null===n?void _.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=_.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&T(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),gt={set:function(e,t,n){return!1===t?_.removeAttr(e,n):e.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),function(e,t){var n=vt[t]||_.find.attr;vt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=vt[a],vt[a]=i,i=null!=n(e,t,r)?a:null,vt[a]=o),i}});var mt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function bt(e){return(e.match(F)||[]).join(" ")}function wt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}_.fn.extend({prop:function(e,t){return q(this,_.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[_.propFix[e]||e]})}}),_.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&_.isXMLDoc(e)||(t=_.propFix[t]||t,i=_.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=_.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(_.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this}),_.fn.extend({addClass:function(e){var t,n,r,i,o,a;return m(e)?this.each(function(t){_(this).addClass(e.call(this,t,wt(this)))}):(t=xt(e)).length?this.each(function(){if(r=wt(this),n=1===this.nodeType&&" "+bt(r)+" "){for(o=0;o<t.length;o++)i=t[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=bt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,r,i,o,a;return m(e)?this.each(function(t){_(this).removeClass(e.call(this,t,wt(this)))}):arguments.length?(t=xt(e)).length?this.each(function(){if(r=wt(this),n=1===this.nodeType&&" "+bt(r)+" "){for(o=0;o<t.length;o++)for(i=t[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=bt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return m(e)?this.each(function(n){_(this).toggleClass(e.call(this,n,wt(this),t),t)}):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=xt(e),this.each(function(){if(s)for(o=_(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==e&&"boolean"!==a||((r=wt(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":Q.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+bt(wt(n))+" ").indexOf(t)>-1)return!0;return!1}});var kt=/\r/g;_.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,_(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=_.map(i,function(e){return null==e?"":e+""})),(t=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=_.valHooks[i.type]||_.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(kt,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(e){var t=_.find.attr(e,"value");return null!=t?t:bt(_.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!T(n.parentNode,"optgroup"))){if(t=_(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=_.makeArray(t),a=i.length;a--;)((r=i[a]).selected=_.inArray(_.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=_.inArray(_(e).val(),t)>-1}},v.checkOn||(_.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in r;var St=/^(?:focusinfocus|focusoutblur)$/,_t=function(e){e.stopPropagation()};_.extend(_.event,{trigger:function(e,t,n,i){var o,a,s,l,u,c,f,h,p=[n||b],g=d.call(e,"type")?e.type:e,v=d.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!St.test(g+_.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),u=g.indexOf(":")<0&&"on"+g,(e=e[_.expando]?e:new _.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:_.makeArray(t,[e]),f=_.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,t))){if(!i&&!f.noBubble&&!y(n)){for(l=f.delegateType||g,St.test(l+g)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(n.ownerDocument||b)&&p.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=p[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?l:f.bindType||g,(c=(Q.get(a,"events")||Object.create(null))[e.type]&&Q.get(a,"handle"))&&c.apply(a,t),(c=u&&a[u])&&c.apply&&K(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),t)||!K(n)||u&&m(n[g])&&!y(n)&&((s=n[u])&&(n[u]=null),_.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,_t),n[g](),e.isPropagationStopped()&&h.removeEventListener(g,_t),_.event.triggered=void 0,s&&(n[u]=s)),e.result}},simulate:function(e,t,n){var r=_.extend(new _.Event,n,{type:e,isSimulated:!0});_.event.trigger(r,null,t)}}),_.fn.extend({trigger:function(e,t){return this.each(function(){_.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return _.event.trigger(e,t,n,!0)}}),v.focusin||_.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){_.event.simulate(t,e.target,_.event.fix(e))};_.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,t);i||r.addEventListener(e,n,!0),Q.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,t)-1;i?Q.access(r,t,i):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}});var Et=r.location,Ct={guid:Date.now()},At=/\?/;_.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||_.error("Invalid XML: "+(n?_.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Pt=/\[\]$/,Lt=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,r){var i;if(Array.isArray(t))_.each(t,function(t,i){n||Pt.test(e)?r(e,i):Ot(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==k(t))r(e,t);else for(i in t)Ot(e+"["+i+"]",t[i],n,r)}_.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!_.isPlainObject(e))_.each(e,function(){i(this.name,this.value)});else for(n in e)Ot(n,e[n],t,i);return r.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=_.prop(this,"elements");return e?_.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!_(this).is(":disabled")&&Nt.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!ve.test(e))}).map(function(e,t){var n=_(this).val();return null==n?null:Array.isArray(n)?_.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,Dt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:GET|HEAD)$/,Ft=/^\/\//,zt={},Vt={},Bt="*/".concat("*"),$t=b.createElement("a");function Ut(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(F)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ht(e,t,n,r){var i={},o=e===Vt;function a(s){var l;return i[s]=!0,_.each(e[s]||[],function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)}),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function qt(e,t){var n,r,i=_.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&_.extend(!0,e,r),e}$t.href=Et.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,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":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,_.ajaxSettings),t):qt(_.ajaxSettings,e)},ajaxPrefilter:Ut(zt),ajaxTransport:Ut(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,a,s,l,u,c,f,h,d=_.ajaxSetup({},t),p=d.context||d,g=d.context&&(p.nodeType||p.jquery)?_(p):_.event,v=_.Deferred(),m=_.Callbacks("once memory"),y=d.statusCode||{},w={},x={},k="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=jt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==u&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||k;return n&&n.abort(t),E(0,t),this}};if(v.promise(S),d.url=((e||d.url||Et.href)+"").replace(Ft,Et.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(F)||[""],null==d.crossDomain){l=b.createElement("a");try{l.href=d.url,l.href=l.href,d.crossDomain=$t.protocol+"//"+$t.host!=l.protocol+"//"+l.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=_.param(d.data,d.traditional)),Ht(zt,d,t,S),u)return S;for(f in(c=_.event&&d.global)&&0===_.active++&&_.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!It.test(d.type),i=d.url.replace(Rt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Mt,"+")):(h=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(At.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Dt,"$1"),h=(At.test(i)?"&":"?")+"_="+Ct.guid+++h),d.url=i+h),d.ifModified&&(_.lastModified[i]&&S.setRequestHeader("If-Modified-Since",_.lastModified[i]),_.etag[i]&&S.setRequestHeader("If-None-Match",_.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&S.setRequestHeader("Content-Type",d.contentType),S.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Bt+"; q=0.01":""):d.accepts["*"]),d.headers)S.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(p,S,d)||u))return S.abort();if(k="abort",m.add(d.complete),S.done(d.success),S.fail(d.error),n=Ht(Vt,d,t,S)){if(S.readyState=1,c&&g.trigger("ajaxSend",[S,d]),u)return S;d.async&&d.timeout>0&&(s=r.setTimeout(function(){S.abort("timeout")},d.timeout));try{u=!1,n.send(w,E)}catch(e){if(u)throw e;E(-1,e)}}else E(-1,"No Transport");function E(e,t,a,l){var f,h,b,w,x,k=t;u||(u=!0,s&&r.clearTimeout(s),n=void 0,o=l||"",S.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(w=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(d,S,a)),!f&&_.inArray("script",d.dataTypes)>-1&&_.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),w=function(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(d,w,S,f),f?(d.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(_.lastModified[i]=x),(x=S.getResponseHeader("etag"))&&(_.etag[i]=x)),204===e||"HEAD"===d.type?k="nocontent":304===e?k="notmodified":(k=w.state,h=w.data,f=!(b=w.error))):(b=k,!e&&k||(k="error",e<0&&(e=0))),S.status=e,S.statusText=(t||k)+"",f?v.resolveWith(p,[h,k,S]):v.rejectWith(p,[S,k,b]),S.statusCode(y),y=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[S,d,f?h:b]),m.fireWith(p,[S,k]),c&&(g.trigger("ajaxComplete",[S,d]),--_.active||_.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return _.get(e,t,n,"json")},getScript:function(e,t){return _.get(e,void 0,t,"script")}}),_.each(["get","post"],function(e,t){_[t]=function(e,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),_.ajax(_.extend({url:e,type:t,dataType:i,data:n,success:r},_.isPlainObject(e)&&e))}}),_.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),_._evalUrl=function(e,t,n){return _.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){_.globalEval(e,t,n)}})},_.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=_(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return m(e)?this.each(function(t){_(this).wrapInner(e.call(this,t))}):this.each(function(){var t=_(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=m(e);return this.each(function(n){_(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){_(this).replaceWith(this.childNodes)}),this}}),_.expr.pseudos.hidden=function(e){return!_.expr.pseudos.visible(e)},_.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},Gt=_.ajaxSettings.xhr();v.cors=!!Gt&&"withCredentials"in Gt,v.ajax=Gt=!!Gt,_.ajaxTransport(function(e){var t,n;if(v.cors||Gt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),_.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return _.globalEval(e),e}}}),_.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),_.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=_("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}});var Yt,Xt=[],Kt=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||_.expando+"_"+Ct.guid++;return this[e]=!0,e}}),_.ajaxPrefilter("json jsonp",function(e,t,n){var i,o,a,s=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Kt,"$1"+i):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||_.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always(function(){void 0===o?_(r).removeProp(i):r[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(i)),a&&m(o)&&o(a[0]),a=o=void 0}),"script"}),v.createHTMLDocument=((Yt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Yt.childNodes.length),_.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=Se([e],t,o),o&&o.length&&_(o).remove(),_.merge([],i.childNodes)));var r,i,o},_.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=bt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&_.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?_("<div>").append(_.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},_.expr.pseudos.animated=function(e){return _.grep(_.timers,function(t){return e===t.elem}).length},_.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u=_.css(e,"position"),c=_(e),f={};"static"===u&&(e.style.position="relative"),s=c.offset(),o=_.css(e,"top"),l=_.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),m(t)&&(t=t.call(e,n,_.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},_.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){_.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===_.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===_.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=_(e).offset()).top+=_.css(e,"borderTopWidth",!0),i.left+=_.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-_.css(r,"marginTop",!0),left:t.left-i.left-_.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===_.css(e,"position");)e=e.offsetParent;return e||ae})}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;_.fn[e]=function(r){return q(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),_.each(["top","left"],function(e,t){_.cssHooks[t]=Ye(v.pixelPosition,function(e,n){if(n)return n=Ge(e,t),Ve.test(n)?_(e).position()[t]+"px":n})}),_.each({Height:"height",Width:"width"},function(e,t){_.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){_.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return q(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?_.css(t,n,s):_.style(t,n,i,s)},t,a?i:void 0,a)}})}),_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){_.fn[t]=function(e){return this.on(t,e)}}),_.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(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(e,t){_.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var Jt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;_.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),i=function(){return e.apply(t||this,r.concat(s.call(arguments)))},i.guid=e.guid=e.guid||_.guid++,i},_.holdReady=function(e){e?_.readyWait++:_.ready(!0)},_.isArray=Array.isArray,_.parseJSON=JSON.parse,_.nodeName=T,_.isFunction=m,_.isWindow=y,_.camelCase=X,_.type=k,_.now=Date.now,_.isNumeric=function(e){var t=_.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},_.trim=function(e){return null==e?"":(e+"").replace(Jt,"$1")},void 0===(n=function(){return _}.apply(t,[]))||(e.exports=n);var Qt=r.jQuery,Zt=r.$;return _.noConflict=function(e){return r.$===_&&(r.$=Zt),e&&r.jQuery===_&&(r.jQuery=Qt),_},void 0===i&&(r.jQuery=r.$=_),_})},4713:(e,t,n)=>{var r=n(2523),i=n(5389),o=n(1489),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:o(n);return l<0&&(l=a(s+l,0)),r(e,i(t,3),l)}},4733:(e,t,n)=>{var r=n(1791),i=n(5950);e.exports=function(e,t){return e&&r(t,i(t),e)}},4739:(e,t,n)=>{var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4848:(e,t,n)=>{"use strict";e.exports=n(9698)},4850:(e,t,n)=>{"use strict";var r=n(6857);function i(e){r.forEach(e.nodes(),function(t){o(e.node(t))}),r.forEach(e.edges(),function(t){o(e.edge(t))})}function o(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||i(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),function(t){a(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)})}(e),"lr"!==t&&"rl"!==t||(function(e){r.forEach(e.nodes(),function(t){s(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)})}(e),i(e))}}},4894:(e,t,n)=>{var r=n(1882),i=n(294);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},4901:(e,t,n)=>{var r=n(2552),i=n(294),o=n(346),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,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},4915:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},4919:(e,t,n)=>{var r=n(8905),i=n(117);e.exports=function(e,t,n){return i.transform(e.nodes(),function(i,o){i[o]=r(e,o,t,n)},{})}},4932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},4959:(e,t,n)=>{"use strict";var r=n(6857);e.exports=function(e,t){var n={};return r.forEach(e,function(e,t){var i=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),r.forEach(t.edges(),function(e){var t=n[e.v],i=n[e.w];r.isUndefined(t)||r.isUndefined(i)||(i.indegree++,t.out.push(n[e.w]))}),function(e){var t=[];function n(e){return function(t){var n,i,o,a;t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&(i=t,o=0,a=0,(n=e).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(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(t,function(e){return!e.merged}),function(e){return r.pick(e,["vs","i","barycenter","weight"])})}(r.filter(n,function(e){return!e.indegree}))}},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},5015:(e,t,n)=>{var r=n(2552),i=n(6449),o=n(346);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},5083:(e,t,n)=>{var r=n(1882),i=n(7296),o=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,f=u.hasOwnProperty,h=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?h:s).test(a(e))}},5128:(e,t,n)=>{var r=n(909),i=n(4894);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,function(e,r,i){o[++n]=t(e,r,i)}),o}},5169:(e,t,n)=>{var r=n(6857),i=n(3988);function o(e,t,n){for(var i;t.length&&(i=r.last(t)).i<=n;)t.pop(),e.push(i.vs),n++;return n}e.exports=function(e,t){var n,a=i.partition(e,function(e){return r.has(e,"barycenter")}),s=a.lhs,l=r.sortBy(a.rhs,function(e){return-e.i}),u=[],c=0,f=0,h=0;s.sort((n=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:n?t.i-e.i:e.i-t.i})),h=o(u,l,h),r.forEach(s,function(e){h+=e.vs.length,u.push(e.vs),c+=e.barycenter*e.weight,f+=e.weight,h=o(u,l,h)});var d={vs:r.flatten(u,!0)};return f&&(d.barycenter=c/f,d.weight=f),d}},5250:(e,t,n)=>{var r=n(7217),i=n(7805),o=n(6649),a=n(2824),s=n(3805),l=n(7241),u=n(4974);e.exports=function e(t,n,c,f,h){t!==n&&o(n,function(o,l){if(h||(h=new r),s(o))a(t,n,l,c,e,f,h);else{var d=f?f(u(t,l),o,l+"",t,n,h):void 0;void 0===d&&(d=o),i(t,l,d)}},l)}},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5325:(e,t,n)=>{var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},5338:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(1247)},5364:(e,t,n)=>{var r=n(5250),i=n(999)(function(e,t,n){r(e,t,n)});e.exports=i},5378:(e,t,n)=>{var r=n(4932),i=n(5389),o=n(5128),a=n(6449);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},5389:(e,t,n)=>{var r=n(3663),i=n(7978),o=n(3488),a=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},5463:e=>{e.exports=function(e){return e!=e}},5481:(e,t,n)=>{var r=n(9325)["__core-js_shared__"];e.exports=r},5508:(e,t,n)=>{var r=n(6151),i=n(6800),o=n(7400);e.exports=function(e){return function(t,n,a){return a&&"number"!=typeof a&&i(t,n,a)&&(n=a=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),a=void 0===a?t<n?1:-1:o(a),r(t,n,a,e)}}},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5529:(e,t,n)=>{var r=n(9344),i=n(8879),o=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},5558:e=>{e.exports=function(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}},5580:(e,t,n)=>{var r=n(6110)(n(9325),"DataView");e.exports=r},5749:(e,t,n)=>{var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5750:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var i=n.prototype,o=i.format;r.en.formats=e,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,i){var o=i&&i.toUpperCase();return r||n[i]||e[i]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})}(t,void 0===n?{}:n);return o.call(this,r)}}}()},5765:(e,t,n)=>{var r=n(8859),i=n(5325),o=n(9905),a=n(9219),s=n(4517),l=n(4247);e.exports=function(e,t,n){var u=-1,c=i,f=e.length,h=!0,d=[],p=d;if(n)h=!1,c=o;else if(f>=200){var g=t?null:s(e);if(g)return l(g);h=!1,c=a,p=new r}else p=t?[]:d;e:for(;++u<f;){var v=e[u],m=t?t(v):v;if(v=n||0!==v?v:0,h&&m==m){for(var y=p.length;y--;)if(p[y]===m)continue e;t&&p.push(m),d.push(v)}else c(p,m,n)||(p!==d&&p.push(m),d.push(v))}return d}},5861:(e,t,n)=>{var r=n(5580),i=n(8223),o=n(2804),a=n(6545),s=n(8303),l=n(2552),u=n(7473),c="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",g=u(r),v=u(i),m=u(o),y=u(a),b=u(s),w=l;(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(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(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 t}),e.exports=w},5880:(e,t,n)=>{var r=n(514),i=n(5950);e.exports=function(e){return null==e?[]:r(e,i(e))}},5891:(e,t,n)=>{var r=n(1873),i=n(2428),o=n(6449),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},5911:(e,t,n)=>{var r=n(8859),i=n(4248),o=n(9219);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,f=t.length;if(c!=f&&!(u&&f>c))return!1;var h=l.get(e),d=l.get(t);if(h&&d)return h==t&&d==e;var p=-1,g=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p<c;){var m=e[p],y=t[p];if(a)var b=u?a(y,m,p,t,e,l):a(m,y,p,e,t,l);if(void 0!==b){if(b)continue;g=!1;break}if(v){if(!i(t,function(e,t){if(!o(v,t)&&(m===e||s(m,e,n,a,l)))return v.push(t)})){g=!1;break}}else if(m!==y&&!s(m,y,n,a,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},5950:(e,t,n)=>{var r=n(695),i=n(8984),o=n(4894);e.exports=function(e){return o(e)?r(e):i(e)}},5970:(e,t,n)=>{var r=n(3120);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},6001:(e,t,n)=>{var r=n(7420),i=n(631);e.exports=function(e,t){return r(e,t,function(t,n){return i(e,n)})}},6009:(e,t,n)=>{e=n.nmd(e);var r=n(4840),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6016:(e,t,n)=>{var r=n(9276);e.exports=function(e,t){return r(e,t,"pre")}},6025:(e,t,n)=>{var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6038:(e,t,n)=>{var r=n(5861),i=n(346);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},6110:(e,t,n)=>{var r=n(5083),i=n(392);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},6131:(e,t,n)=>{var r=n(2523),i=n(5463),o=n(6959);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},6135:(e,t,n)=>{e.exports=n(9754)},6151:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,i,o){for(var a=-1,s=n(t((r-e)/(i||1)),0),l=Array(s);s--;)l[o?s:++a]=e,e+=i;return l}},6155:(e,t,n)=>{var r=n(4932),i=n(7422),o=n(5389),a=n(5128),s=n(3937),l=n(7301),u=n(3714),c=n(3488),f=n(6449);e.exports=function(e,t,n){t=t.length?r(t,function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e}):[c];var h=-1;t=r(t,l(o));var d=a(e,function(e,n,i){return{criteria:r(t,function(t){return t(e)}),index:++h,value:e}});return s(d,function(e,t){return u(e,t,n)})}},6169:(e,t,n)=>{var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},6176:e=>{e.exports=function(e,t){return e<t}},6189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},6221:(e,t,n)=>{"use strict";var r=n(6540);function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var a={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=Symbol.for("react.portal"),l=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(i(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=a.p;try{if(l.T=null,a.p=2,e)return e()}finally{l.T=t,a.p=n,a.d.f()}},t.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,a.d.C(e,t))},t.prefetchDNS=function(e){"string"==typeof e&&a.d.D(e)},t.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,r=u(n,t.crossOrigin),i="string"==typeof t.integrity?t.integrity:void 0,o="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?a.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):"script"===n&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=u(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&a.d.M(e)},t.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,r=u(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=u(t.as,t.crossOrigin);a.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else a.d.m(e)},t.requestFormReset=function(e){a.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},t.useFormStatus=function(){return l.H.useHostTransitionStatus()},t.version="19.2.3"},6246:(e,t,n)=>{e.exports={graphlib:n(8191),layout:n(8202),debug:n(8909),util:{time:n(3988).time,notime:n(3988).notime},version:n(7038)}},6291:(e,t,n)=>{var r=n(117);e.exports=function(e){var t=0,n=[],i={},o=[];function a(s){var l=i[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(e){r.has(i,e)?i[e].onStack&&(l.lowlink=Math.min(l.lowlink,i[e].index)):(a(e),l.lowlink=Math.min(l.lowlink,i[e].lowlink))}),l.lowlink===l.index){var u,c=[];do{u=n.pop(),i[u].onStack=!1,c.push(u)}while(s!==u);o.push(c)}}return e.nodes().forEach(function(e){r.has(i,e)||a(e)}),o}},6353:(e,t,n)=>{var r=n(6857),i=n(3988);function o(e,t,n,a,s,l,u){var c=e.children(u);if(c.length){var f=i.addBorderNode(e,"_bt"),h=i.addBorderNode(e,"_bb"),d=e.node(u);e.setParent(f,u),d.borderTop=f,e.setParent(h,u),d.borderBottom=h,r.forEach(c,function(r){o(e,t,n,a,s,l,r);var i=e.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-l[u]+1;e.setEdge(f,c,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(d,h,{weight:p,minlen:g,nestingEdge:!0})}),e.parent(u)||e.setEdge(t,f,{weight:0,minlen:s+l[u]})}else u!==t&&e.setEdge(t,u,{weight:0,minlen:n})}e.exports={run:function(e){var t=i.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(i,o){var a=e.children(i);a&&a.length&&r.forEach(a,function(e){n(e,o+1)}),t[i]=o}return r.forEach(e.children(),function(e){n(e,1)}),t}(e),a=r.max(r.values(n))-1,s=2*a+1;e.graph().nestingRoot=t,r.forEach(e.edges(),function(t){e.edge(t).minlen*=s});var l=function(e){return r.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}(e)+1;r.forEach(e.children(),function(r){o(e,t,s,l,a,n,r)}),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}}},6375:(e,t,n)=>{var r=n(4528),i=n(8879),o=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:a;e.exports=s},6449:e=>{var t=Array.isArray;e.exports=t},6454:(e,t,n)=>{"use strict";var r=n(117);e.exports=o;var i="\0";function o(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function l(e,t,n,i){var o=""+t,a=""+n;if(!e&&o>a){var s=o;o=a,a=s}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function u(e,t){return l(e,t.v,t.w,t.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._in[t])})},o.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._out[t])})},o.prototype.setNodes=function(e,t){var n=arguments,i=this;return r.each(e,function(e){n.length>1?i.setNode(e,t):i.setNode(e)}),this},o.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return r.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},o.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),r.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var i={};function o(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(i[e]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(t.nodes(),function(e){t.setParent(e,o(e))}),t},o.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var n=this,i=arguments;return r.reduce(e,function(e,r){return i.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r}),this},o.prototype.setEdge=function(){var e,t,n,i,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(i=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var u=l(this._isDirected,e,t,n);if(r.has(this._edgeLabels,u))return o&&(this._edgeLabels[u]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[u]=o?i:this._defaultEdgeLabelFn(e,t,n);var c=function(e,t,n,r){var i=""+t,o=""+n;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[u]=c,a(this._preds[t],e),a(this._sucs[e],t),this._in[t][u]=c,this._out[e][u]=c,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return r.has(this._edgeLabels,i)},o.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var i=r.values(n);return t?r.filter(i,function(e){return e.v===t}):i}},o.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var i=r.values(n);return t?r.filter(i,function(e){return e.w===t}):i}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},6533:(e,t,n)=>{var r=n(3599),i=n(5389),o=n(6176);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},6540:(e,t,n)=>{"use strict";e.exports=n(9869)},6545:(e,t,n)=>{var r=n(6110)(n(9325),"Set");e.exports=r},6547:(e,t,n)=>{var r=n(3360),i=n(5288),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6574:(e,t,n)=>{var r=n(909);e.exports=function(e,t){var n=[];return r(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}},6639:(e,t,n)=>{"use strict";var r=n(6857);function i(e,t,n){for(var i=r.zipObject(n,r.map(n,function(e,t){return t})),o=r.flatten(r.map(t,function(t){return r.sortBy(r.map(e.outEdges(t),function(t){return{pos:i[t.w],weight:e.edge(t).weight}}),"pos")}),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var l=r.map(new Array(s),function(){return 0}),u=0;return r.forEach(o.forEach(function(e){var t=e.pos+a;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;u+=e.weight*n})),u}e.exports=function(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}},6649:(e,t,n)=>{var r=n(3221)();e.exports=r},6678:(e,t,n)=>{var r=n(117),i=n(6291);e.exports=function(e){return r.filter(i(e),function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}},6721:(e,t,n)=>{var r=n(1042),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},6757:(e,t,n)=>{var r=n(1033),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=n(l),r(e,this,u)}}},6800:(e,t,n)=>{var r=n(5288),i=n(4894),o=n(361),a=n(3805);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},6822:(e,t,n)=>{"use strict";var r=n(6857),i=n(2031);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?i(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},i={};return r.forEach(e.nodes(),function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(e.outEdges(a),function(e){r.has(n,e.w)?t.push(e):o(e.w)}),delete n[a])}),t}(e);r.forEach(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))})},undo:function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}},6857:(e,t,n)=>{var r;try{r={cloneDeep:n(8055),constant:n(7334),defaults:n(4684),each:n(6135),filter:n(7612),find:n(7309),flatten:n(5970),forEach:n(9754),forIn:n(2420),has:n(1448),isUndefined:n(2216),last:n(8090),map:n(5378),mapValues:n(3916),max:n(4506),merge:n(5364),min:n(1684),minBy:n(6533),now:n(124),pick:n(4383),range:n(3181),reduce:n(860),sortBy:n(3031),uniqueId:n(7200),values:n(5880),zipObject:n(7248)}}catch(e){}r||(r=window._),e.exports=r},6860:(e,t,n)=>{"use strict";var r=n(6857),i=n(8481),o=n(8073).slack,a=n(8073).longestPath,s=n(8191).alg.preorder,l=n(8191).alg.postorder,u=n(3988).simplify;function c(e){e=u(e),a(e);var t,n=i(e);for(d(n),f(n,e);t=g(n);)m(n,e,t,v(n,e,t))}function f(e,t){var n=l(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=h(e,t,n)}(e,t,n)})}function h(e,t,n){var i=e.node(n).parent,o=!0,a=t.edge(n,i),s=0;return a||(o=!1,a=t.edge(i,n)),s=a.weight,r.forEach(t.nodeEdges(n),function(r){var a,l,u=r.v===n,c=u?r.w:r.v;if(c!==i){var f=u===o,h=t.edge(r).weight;if(s+=f?h:-h,a=n,l=c,e.hasEdge(a,l)){var d=e.edge(n,c).cutvalue;s+=f?-d:d}}}),s}function d(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,i,o){var a=n,s=e.node(i);return t[i]=!0,r.forEach(e.neighbors(i),function(o){r.has(t,o)||(n=p(e,t,n,o,i))}),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function g(e){return r.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function v(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var s=e.node(i),l=e.node(a),u=s,c=!1;s.lim>l.lim&&(u=l,c=!0);var f=r.filter(t.edges(),function(t){return c===y(0,e.node(t.v),u)&&c!==y(0,e.node(t.w),u)});return r.minBy(f,function(e){return o(t,e)})}function m(e,t,n,i){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(i.v,i.w,{}),d(e),f(e,t),function(e,t){var n=r.find(e.nodes(),function(e){return!t.node(e).parent}),i=s(e,n);i=i.slice(1),r.forEach(i,function(n){var r=e.node(n).parent,i=t.edge(n,r),o=!1;i||(i=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?i.minlen:-i.minlen)})}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=d,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=g,c.enterEdge=v,c.exchangeEdges=m},6959:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},7038:e=>{e.exports="0.8.5"},7068:(e,t,n)=>{var r=n(7217),i=n(5911),o=n(1986),a=n(689),s=n(5861),l=n(6449),u=n(3656),c=n(7167),f="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,v,m){var y=l(e),b=l(t),w=y?h:s(e),x=b?h:s(t),k=(w=w==f?d:w)==d,S=(x=x==f?d:x)==d,_=w==x;if(_&&u(e)){if(!u(t))return!1;y=!0,k=!1}if(_&&!k)return m||(m=new r),y||c(e)?i(e,t,n,g,v,m):o(e,t,w,n,g,v,m);if(!(1&n)){var E=k&&p.call(e,"__wrapped__"),C=S&&p.call(t,"__wrapped__");if(E||C){var A=E?e.value():e,P=C?t.value():t;return m||(m=new r),v(A,P,n,g,m)}}return!!_&&(m||(m=new r),a(e,t,n,g,v,m))}},7091:(e,t,n)=>{var r=n(8984),i=n(5861),o=n(4894),a=n(5015),s=n(1993);e.exports=function(e){if(null==e)return 0;if(o(e))return a(e)?s(e):e.length;var t=i(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},7167:(e,t,n)=>{var r=n(4901),i=n(7301),o=n(6009),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},7199:(e,t,n)=>{var r=n(9653),i=n(6169),o=n(3201),a=n(3736),s=n(1961);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,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(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},7200:(e,t,n)=>{var r=n(3222),i=0;e.exports=function(e){var t=++i;return r(e)+t}},7217:(e,t,n)=>{var r=n(79),i=n(1420),o=n(938),a=n(3605),s=n(9817),l=n(945);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7241:(e,t,n)=>{var r=n(695),i=n(2903),o=n(4894);e.exports=function(e){return o(e)?r(e,!0):i(e)}},7248:(e,t,n)=>{var r=n(6547),i=n(1234);e.exports=function(e,t){return i(e||[],t||[],r)}},7255:(e,t,n)=>{var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},7296:(e,t,n)=>{var r,i=n(5481),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},7309:(e,t,n)=>{var r=n(2006)(n(4713));e.exports=r},7317:function(e,t,n){e.exports=function(e){"use strict";var t=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(e),n={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"}};return t.default.locale(n,null,!0),n}(n(4353))},7334:e=>{e.exports=function(e){return function(){return e}}},7375:function(e){e.exports=function(){"use strict";return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),o=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return i.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return i.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return i.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}});return r.bind(this)(o)}}}()},7400:(e,t,n)=>{var r=n(9374),i=1/0;e.exports=function(e){return e?(e=r(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},7420:(e,t,n)=>{var r=n(7422),i=n(3170),o=n(1769);e.exports=function(e,t,n){for(var a=-1,s=t.length,l={};++a<s;){var u=t[a],c=r(e,u);n(c,u)&&i(l,o(u,e),c)}return l}},7422:(e,t,n)=>{var r=n(1769),i=n(7797);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7494:(e,t,n)=>{var r=n(117),i=n(6454);function o(e){return r.map(e.nodes(),function(t){var n=e.node(t),i=e.parent(t),o={v:t};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o})}function a(e){return r.map(e.edges(),function(t){var n=e.edge(t),i={v:t.v,w:t.w};return r.isUndefined(t.name)||(i.name=t.name),r.isUndefined(n)||(i.value=n),i})}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:a(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new i(e.options).setGraph(e.value);return r.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),r.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},7507:(e,t,n)=>{var r=n(117);function i(e){var t={},n={},i=[];if(r.each(e.sinks(),function a(s){if(r.has(n,s))throw new o;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],i.push(s))}),r.size(t)!==e.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=new Error},7534:(e,t,n)=>{var r=n(2552),i=n(346);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},7556:(e,t,n)=>{var r=n(1873),i=n(4932),o=n(6449),a=n(4394),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7612:(e,t,n)=>{var r=n(9770),i=n(6574),o=n(5389),a=n(6449);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},7670:(e,t,n)=>{var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},7730:(e,t,n)=>{var r=n(9172),i=n(7301),o=n(6009),a=o&&o.isMap,s=a?i(a):r;e.exports=s},7797:(e,t,n)=>{var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7805:(e,t,n)=>{var r=n(3360),i=n(5288);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},7828:(e,t,n)=>{var r=n(9325).Uint8Array;e.exports=r},7860:(e,t,n)=>{var r=n(6857),i=n(8191).Graph;e.exports=function(e,t,n){var o=function(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}(e),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(t){return e.node(t)});return r.forEach(e.nodes(),function(i){var s=e.node(i),l=e.parent(i);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(a.setNode(i),a.setParent(i,l||o),r.forEach(e[n](i),function(t){var n=t.v===i?t.w:t.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:e.edge(t).weight+s})}),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),a}},7927:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+i+")?",u="[\\ufe0e\\ufe0f]?",c=u+l+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+u+l+")*",f="(?:"+[o+r+"?",r,a,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+f+c,"g");e.exports=function(e){for(var t=h.lastIndex=0;h.test(e);)++t;return t}},7978:(e,t,n)=>{var r=n(270),i=n(8156),o=n(631),a=n(8586),s=n(756),l=n(7197),u=n(7797);e.exports=function(e,t){return a(e)&&s(t)?l(u(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},8055:(e,t,n)=>{var r=n(9999);e.exports=function(e){return r(e,5)}},8073:(e,t,n)=>{"use strict";var r=n(6857);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),function n(i){var o=e.node(i);if(r.has(t,i))return o.rank;t[i]=!0;var a=r.min(r.map(e.outEdges(i),function(t){return n(t.w)-e.edge(t).minlen}));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},8090:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},8096:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},8156:(e,t,n)=>{var r=n(7422);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},8191:(e,t,n)=>{var r;try{r=n(8362)}catch(e){}r||(r=window.graphlib),e.exports=r},8202:(e,t,n)=>{"use strict";var r=n(6857),i=n(6822),o=n(8209),a=n(9361),s=n(3988).normalizeRanks,l=n(2948),u=n(3988).removeEmptyRanks,c=n(6353),f=n(135),h=n(4850),d=n(1453),p=n(3776),g=n(3988),v=n(8191).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?g.time:g.notime;n("layout",function(){var t=n(" buildLayoutGraph",function(){return function(e){var t=new v({multigraph:!0,compound:!0}),n=C(e.graph());return t.setGraph(r.merge({},y,E(n,m),r.pick(n,b))),r.forEach(e.nodes(),function(n){var i=C(e.node(n));t.setNode(n,r.defaults(E(i,w),x)),t.setParent(n,e.parent(n))}),r.forEach(e.edges(),function(n){var i=C(e.edge(n));t.setEdge(n,r.merge({},S,E(i,k),r.pick(i,_)))}),t}(e)});n(" runLayout",function(){!function(e,t){t(" makeSpaceForEdgeLabels",function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(e)}),t(" removeSelfEdges",function(){!function(e){r.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}(e)}),t(" acyclic",function(){i.run(e)}),t(" nestingGraph.run",function(){c.run(e)}),t(" rank",function(){a(g.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};g.addDummyNode(e,"edge-proxy",i,"_ep")}})}(e)}),t(" removeEmptyRanks",function(){u(e)}),t(" nestingGraph.cleanup",function(){c.cleanup(e)}),t(" normalizeRanks",function(){s(e)}),t(" assignRankMinMax",function(){!function(e){var t=0;r.forEach(e.nodes(),function(n){var i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=r.max(t,i.maxRank))}),e.graph().maxRank=t}(e)}),t(" removeEdgeLabelProxies",function(){!function(e){r.forEach(e.nodes(),function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}(e)}),t(" normalize.run",function(){o.run(e)}),t(" parentDummyChains",function(){l(e)}),t(" addBorderSegments",function(){f(e)}),t(" order",function(){d(e)}),t(" insertSelfEdges",function(){!function(e){var t=g.buildLayerMatrix(e);r.forEach(t,function(t){var n=0;r.forEach(t,function(t,i){var o=e.node(t);o.order=i+n,r.forEach(o.selfEdges,function(t){g.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:i+ ++n,e:t.e,label:t.label},"_se")}),delete o.selfEdges})})}(e)}),t(" adjustCoordinateSystem",function(){h.adjust(e)}),t(" position",function(){p(e)}),t(" positionSelfEdges",function(){!function(e){r.forEach(e.nodes(),function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),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}})}(e)}),t(" removeBorderNodes",function(){!function(e){r.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),i=e.node(n.borderTop),o=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.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(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}(e)}),t(" normalize.undo",function(){o.undo(e)}),t(" fixupEdgeLabelCoords",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);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}})}(e)}),t(" undoCoordinateSystem",function(){h.undo(e)}),t(" translateGraph",function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=e.graph(),s=a.marginx||0,l=a.marginy||0;function u(e){var r=e.x,a=e.y,s=e.width,l=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-l/2),o=Math.max(o,a+l/2)}r.forEach(e.nodes(),function(t){u(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.has(n,"x")&&u(n)}),t-=s,i-=l,r.forEach(e.nodes(),function(n){var r=e.node(n);r.x-=t,r.y-=i}),r.forEach(e.edges(),function(n){var o=e.edge(n);r.forEach(o.points,function(e){e.x-=t,e.y-=i}),r.has(o,"x")&&(o.x-=t),r.has(o,"y")&&(o.y-=i)}),a.width=n-t+s,a.height=o-i+l}(e)}),t(" assignNodeIntersects",function(){!function(e){r.forEach(e.edges(),function(t){var n,r,i=e.edge(t),o=e.node(t.v),a=e.node(t.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))})}(e)}),t(" reversePoints",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}(e)}),t(" acyclic.undo",function(){i.undo(e)})}(t,n)}),n(" updateInputGraph",function(){!function(e,t){r.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),r.forEach(e.edges(),function(n){var i=e.edge(n),o=t.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)})})};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},k=["minlen","weight","width","height","labeloffset"],S={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},_=["labelpos"];function E(e,t){return r.mapValues(r.pick(e,t),Number)}function C(e){var t={};return r.forEach(e,function(e,n){t[n.toLowerCase()]=e}),t}},8209:(e,t,n)=>{"use strict";var r=n(6857),i=n(3988);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),function(t){!function(e,t){var n,r,o,a=t.v,s=e.node(a).rank,l=t.w,u=e.node(l).rank,c=t.name,f=e.edge(t),h=f.labelRank;if(u!==s+1){for(e.removeEdge(t),o=0,++s;s<u;++o,++s)f.points=[],r={width:0,height:0,edgeLabel:f,edgeObj:t,rank:s},n=i.addDummyNode(e,"edge",r,"_d"),s===h&&(r.width=f.width,r.height=f.height,r.dummy="edge-label",r.labelpos=f.labelpos),e.setEdge(a,n,{weight:f.weight},c),0===o&&e.graph().dummyChains.push(n),a=n;e.setEdge(a,l,{weight:f.weight},c)}}(e,t)})},undo:function(e){r.forEach(e.graph().dummyChains,function(t){var n,r=e.node(t),i=r.edgeLabel;for(e.setEdge(r.edgeObj,i);r.dummy;)n=e.successors(t)[0],e.removeNode(t),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),t=n,r=e.node(t)})}}},8223:(e,t,n)=>{var r=n(6110)(n(9325),"Map");e.exports=r},8303:(e,t,n)=>{var r=n(6110)(n(9325),"WeakMap");e.exports=r},8329:(e,t,n)=>{var r=n(4894);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},8362:(e,t,n)=>{var r=n(1166);e.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},8440:(e,t,n)=>{var r=n(6038),i=n(7301),o=n(6009),a=o&&o.isSet,s=a?i(a):r;e.exports=s},8481:(e,t,n)=>{"use strict";var r=n(6857),i=n(8191).Graph,o=n(8073).slack;function a(e,t){return r.forEach(e.nodes(),function n(i){r.forEach(t.nodeEdges(i),function(r){var a=r.v,s=i===a?r.w:a;e.hasNode(s)||o(t,r)||(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))})}),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return o(t,n)})}function l(e,t,n){r.forEach(e.nodes(),function(e){t.node(e).rank+=n})}e.exports=function(e){var t,n,r=new i({directed:!1}),u=e.nodes()[0],c=e.nodeCount();for(r.setNode(u,{});a(r,e)<c;)t=s(r,e),n=r.hasNode(t.v)?o(e,t):-o(e,t),l(r,e,n);return r}},8493:(e,t,n)=>{"use strict";var r=n(6540),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}"undefined"==typeof window||void 0===window.document||window.document.createElement;void 0!==r.useSyncExternalStore&&r.useSyncExternalStore},8586:(e,t,n)=>{var r=n(6449),i=n(4394),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},8655:(e,t,n)=>{var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},8816:(e,t,n)=>{var r=n(5970),i=n(6757),o=n(2865);e.exports=function(e){return o(i(e,void 0,r),e+"")}},8859:(e,t,n)=>{var r=n(3661),i=n(1380),o=n(1459);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},8879:(e,t,n)=>{var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},8905:(e,t,n)=>{var r=n(117),i=n(1737);e.exports=function(e,t,n,r){return function(e,t,n,r){var o,a,s={},l=new i,u=function(e){var t=e.v!==o?e.v:e.w,r=s[t],i=n(e),u=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);u<r.distance&&(r.distance=u,r.predecessor=o,l.decrease(t,u))};for(e.nodes().forEach(function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},l.add(e,n)});l.size()>0&&(o=l.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(u);return s}(e,String(t),n||o,r||function(t){return e.outEdges(t)})};var o=r.constant(1)},8909:(e,t,n)=>{var r=n(6857),i=n(3988),o=n(8191).Graph;e.exports={debugOrdering:function(e){var t=i.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),r.forEach(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),r.forEach(t,function(e,t){var i="layer"+t;n.setNode(i,{rank:"same"}),r.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}}},8918:(e,t,n)=>{"use strict";var r=n(6857);e.exports=function(e){var t={},n=r.filter(e.nodes(),function(t){return!e.children(t).length}),i=r.max(r.map(n,function(t){return e.node(t).rank})),o=r.map(r.range(i+1),function(){return[]}),a=r.sortBy(n,function(t){return e.node(t).rank});return r.forEach(a,function n(i){if(!r.has(t,i)){t[i]=!0;var a=e.node(i);o[a.rank].push(i),r.forEach(e.successors(i),n)}}),o}},8948:(e,t,n)=>{var r=n(1791),i=n(6375);e.exports=function(e,t){return r(e,i(e),t)}},8984:(e,t,n)=>{var r=n(5527),i=n(3650),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9172:(e,t,n)=>{var r=n(5861),i=n(346);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},9219:e=>{e.exports=function(e,t){return e.has(t)}},9276:(e,t,n)=>{var r=n(117);function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),function(t){i(e,t,n,o,a,s)}),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)}),a}},9302:(e,t,n)=>{var r=n(3488),i=n(6757),o=n(2865);e.exports=function(e,t){return o(i(e,t,r),e+"")}},9325:(e,t,n)=>{var r=n(4840),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},9326:(e,t,n)=>{var r=n(1769),i=n(2428),o=n(6449),a=n(361),s=n(294),l=n(7797);e.exports=function(e,t,n){for(var u=-1,c=(t=r(t,e)).length,f=!1;++u<c;){var h=l(t[u]);if(!(f=null!=e&&n(e,h)))break;e=e[h]}return f||++u!=c?f:!!(c=null==e?0:e.length)&&s(c)&&a(h,c)&&(o(e)||i(e))}},9344:(e,t,n)=>{var r=n(3805),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9361:(e,t,n)=>{"use strict";var r=n(8073).longestPath,i=n(8481),o=n(6860);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){o(e)}(e);break;case"tight-tree":!function(e){r(e),i(e)}(e);break;case"longest-path":a(e)}};var a=r},9374:(e,t,n)=>{var r=n(4128),i=n(3805),o=n(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9570:(e,t,n)=>{var r=n(7334),i=n(3243),o=n(3488),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},9653:(e,t,n)=>{var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},9698:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),t.jsx=function(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var o in r={},t)"key"!==o&&(r[o]=t[o]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}},9741:(e,t,n)=>{"use strict";var r=n(6857),i=n(8191).Graph,o=n(3988);function a(e,t){var n={};return r.reduce(t,function(t,i){var o=0,a=0,s=t.length,u=r.last(i);return r.forEach(i,function(t,c){var f=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),function(t){return e.node(t).dummy})}(e,t),h=f?e.node(f).order:s;(f||t===u)&&(r.forEach(i.slice(a,c+1),function(t){r.forEach(e.predecessors(t),function(r){var i=e.node(r),a=i.order;!(a<o||h<a)||i.dummy&&e.node(t).dummy||l(n,r,t)})}),a=c+1,o=h)}),i}),n}function s(e,t){var n={};function i(t,i,o,a,s){var u;r.forEach(r.range(i,o),function(i){u=t[i],e.node(u).dummy&&r.forEach(e.predecessors(u),function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>s)&&l(n,t,u)})})}return r.reduce(t,function(t,n){var o,a=-1,s=0;return r.forEach(n,function(r,l){if("border"===e.node(r).dummy){var u=e.predecessors(r);u.length&&(o=e.node(u[0]).order,i(n,s,l,a,o),s=l,a=o)}i(n,s,n.length,o,t.length)}),n}),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function u(e,t,n){if(t>n){var i=t;t=n,n=i}return r.has(e[t],n)}function c(e,t,n,i){var o={},a={},s={};return r.forEach(t,function(e){r.forEach(e,function(e,t){o[e]=e,a[e]=e,s[e]=t})}),r.forEach(t,function(e){var t=-1;r.forEach(e,function(e){var l=i(e);if(l.length){l=r.sortBy(l,function(e){return s[e]});for(var c=(l.length-1)/2,f=Math.floor(c),h=Math.ceil(c);f<=h;++f){var d=l[f];a[e]===e&&t<s[d]&&!u(n,e,d)&&(a[d]=e,a[e]=o[e]=o[d],t=s[d])}}})}),{root:o,align:a}}function f(e,t,n,o,a){var s={},l=function(e,t,n,o){var a=new i,s=e.graph(),l=function(e,t,n){return function(i,o,a){var s,l=i.node(o),u=i.node(a),c=0;if(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}if(s&&(c+=n?s:-s),s=0,c+=(l.dummy?t:e)/2,c+=(u.dummy?t:e)/2,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}return s&&(c+=n?s:-s),s=0,c}}(s.nodesep,s.edgesep,o);return r.forEach(t,function(t){var i;r.forEach(t,function(t){var r=n[t];if(a.setNode(r),i){var o=n[i],s=a.edge(o,r);a.setEdge(o,r,Math.max(l(e,t,i),s||0))}i=t})}),a}(e,t,n,a),u=a?"borderLeft":"borderRight";function c(e,t){for(var n=l.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c(function(e){s[e]=l.inEdges(e).reduce(function(e,t){return Math.max(e,s[t.v]+l.edge(t))},0)},l.predecessors.bind(l)),c(function(t){var n=l.outEdges(t).reduce(function(e,t){return Math.min(e,s[t.w]-l.edge(t))},Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[t]=Math.max(s[t],n))},l.successors.bind(l)),r.forEach(o,function(e){s[e]=s[n[e]]}),s}function h(e,t){return r.minBy(r.values(t),function(t){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(t,function(t,r){var o=function(e,t){return e.node(t).width}(e,r)/2;n=Math.max(t+o,n),i=Math.min(t-o,i)}),n-i})}function d(e,t){var n=r.values(t),i=r.min(n),o=r.max(n);r.forEach(["u","d"],function(n){r.forEach(["l","r"],function(a){var s,l=n+a,u=e[l];if(u!==t){var c=r.values(u);(s="l"===a?i-r.min(c):o-r.max(c))&&(e[l]=r.mapValues(u,function(e){return e+s}))}})})}function p(e,t){return r.mapValues(e.ul,function(n,i){if(t)return e[t.toLowerCase()][i];var o=r.sortBy(r.map(e,i));return(o[1]+o[2])/2})}e.exports={positionX:function(e){var t,n=o.buildLayerMatrix(e),i=r.merge(a(e,n),s(e,n)),l={};r.forEach(["u","d"],function(o){t="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],function(n){"r"===n&&(t=r.map(t,function(e){return r.values(e).reverse()}));var a=("u"===o?e.predecessors:e.successors).bind(e),s=c(0,t,i,a),u=f(e,t,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,function(e){return-e})),l[o+n]=u})});var u=h(e,l);return d(l,u),p(l,e.graph().align)},findType1Conflicts:a,findType2Conflicts:s,addConflict:l,hasConflict:u,verticalAlignment:c,horizontalCompaction:f,alignCoordinates:d,findSmallestWidthAlignment:h,balance:p}},9752:(e,t,n)=>{var r=n(3729),i=n(9344),o=n(641),a=n(5389),s=n(8879),l=n(6449),u=n(3656),c=n(1882),f=n(3805),h=n(7167);e.exports=function(e,t,n){var d=l(e),p=d||u(e)||h(e);if(t=a(t,4),null==n){var g=e&&e.constructor;n=p?d?new g:[]:f(e)&&c(g)?i(s(e)):{}}return(p?r:o)(e,function(e,r,i){return t(n,e,r,i)}),n}},9754:(e,t,n)=>{var r=n(3729),i=n(909),o=n(4066),a=n(6449);e.exports=function(e,t){return(a(e)?r:i)(e,o(t))}},9770:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},9811:(e,t,n)=>{var r=n(7237)("length");e.exports=r},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},9859:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},9869:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||g}function b(){}function w(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var x=w.prototype=new b;x.constructor=w,v(x,y.prototype),x.isPureReactComponent=!0;var k=Array.isArray;function S(){}var _={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function C(e,t,r){var i=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==i?i:null,props:r}}function A(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var P=/\/+/g;function L(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function T(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,u,c=!1;if(null===e)c=!0;else switch(s){case"bigint":case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0;break;case h:return T((c=e._init)(e._payload),t,i,o,a)}}if(c)return a=a(e),c=""===o?"."+L(e,0):o,k(a)?(i="",null!=c&&(i=c.replace(P,"$&/")+"/"),T(a,t,i,"",function(e){return e})):null!=a&&(A(a)&&(l=a,u=i+(null==a.key||e&&e.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+c,a=C(l.type,u,l.props)),t.push(a)),1;c=0;var f,d=""===o?".":o+":";if(k(e))for(var g=0;g<e.length;g++)c+=T(o=e[g],t,i,s=d+L(o,g),a);else if("function"==typeof(g=null===(f=e)||"object"!=typeof f?null:"function"==typeof(f=p&&f[p]||f["@@iterator"])?f:null))for(e=g.call(e),g=0;!(o=e.next()).done;)c+=T(o=o.value,t,i,s=d+L(o,g++),a);else if("object"===s){if("function"==typeof e.then)return T(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,i,o,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return c}function N(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",function(e){return t.call(n,e,i++)}),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var M="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},R={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=d,t.Children=R,t.Component=y,t.Fragment=i,t.Profiler=a,t.PureComponent=w,t.StrictMode=o,t.Suspense=c,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return _.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=v({},e.props),i=e.key;if(null!=t)for(o in void 0!==t.key&&(i=""+t.key),t)!E.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(r[o]=t[o]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var a=Array(o),s=0;s<o;s++)a[s]=arguments[s+2];r.children=a}return C(e.type,i,r)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:s,_context:e},e},t.createElement=function(e,t,n){var r,i={},o=null;if(null!=t)for(r in void 0!==t.key&&(o=""+t.key),t)E.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var a=arguments.length-2;if(1===a)i.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];i.children=s}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===i[r]&&(i[r]=a[r]);return C(e,o,i)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=_.T,n={};_.T=n;try{var r=e(),i=_.S;null!==i&&i(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(S,M)}catch(e){M(e)}finally{null!==t&&null!==n.types&&(t.types=n.types),_.T=t}},t.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},t.use=function(e){return _.H.use(e)},t.useActionState=function(e,t,n){return _.H.useActionState(e,t,n)},t.useCallback=function(e,t){return _.H.useCallback(e,t)},t.useContext=function(e){return _.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return _.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return _.H.useEffect(e,t)},t.useEffectEvent=function(e){return _.H.useEffectEvent(e)},t.useId=function(){return _.H.useId()},t.useImperativeHandle=function(e,t,n){return _.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return _.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return _.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return _.H.useMemo(e,t)},t.useOptimistic=function(e,t){return _.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return _.H.useReducer(e,t,n)},t.useRef=function(e){return _.H.useRef(e)},t.useState=function(e){return _.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return _.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return _.H.useTransition()},t.version="19.2.3"},9884:(e,t,n)=>{var r=n(1791),i=n(7241);e.exports=function(e){return r(e,i(e))}},9888:(e,t,n)=>{"use strict";n(8493)},9905:e=>{e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},9935:e=>{e.exports=function(){return!1}},9982:(e,t,n)=>{"use strict";e.exports=n(4477)},9999:(e,t,n)=>{var r=n(7217),i=n(3729),o=n(6547),a=n(4733),s=n(3838),l=n(3290),u=n(3007),c=n(2271),f=n(8948),h=n(2),d=n(3349),p=n(5861),g=n(6189),v=n(7199),m=n(5529),y=n(6449),b=n(3656),w=n(7730),x=n(3805),k=n(8440),S=n(5950),_=n(7241),E="[object Arguments]",C="[object Function]",A="[object Object]",P={};P[E]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[A]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[C]=P["[object WeakMap]"]=!1,e.exports=function e(t,n,L,T,N,O){var M,R=1&n,D=2&n,j=4&n;if(L&&(M=N?L(t,T,N,O):L(t)),void 0!==M)return M;if(!x(t))return t;var I=y(t);if(I){if(M=g(t),!R)return u(t,M)}else{var F=p(t),z=F==C||"[object GeneratorFunction]"==F;if(b(t))return l(t,R);if(F==A||F==E||z&&!N){if(M=D||z?{}:m(t),!R)return D?f(t,s(M,t)):c(t,a(M,t))}else{if(!P[F])return N?t:{};M=v(t,F,R)}}O||(O=new r);var V=O.get(t);if(V)return V;O.set(t,M),k(t)?t.forEach(function(r){M.add(e(r,n,L,r,t,O))}):w(t)&&t.forEach(function(r,i){M.set(i,e(r,n,L,i,t,O))});var B=I?void 0:(j?D?d:h:D?_:S)(t);return i(B||t,function(r,i){B&&(r=t[i=r]),o(M,i,e(r,n,L,i,t,O))}),M}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{"use strict";n.r(r),n.d(r,{renderStaticDTDiagram:()=>wu});var e={};n.r(e),n.d(e,{ellipseWithEllipse:()=>In,ellipseWithLine:()=>jn,exists:()=>Rn,lineWithLine:()=>Dn,pathWithEllipse:()=>Jn,pathWithLine:()=>Kn,pathWithPath:()=>tr,pathWithPolygon:()=>er,pathWithPolyline:()=>Zn,pathWithRect:()=>Qn,polygonWithEllipse:()=>Wn,polygonWithLine:()=>qn,polygonWithPolygon:()=>Xn,polygonWithPolyline:()=>Yn,polygonWithRect:()=>Gn,polylineWithEllipse:()=>$n,polylineWithLine:()=>Bn,polylineWithPolyline:()=>Hn,polylineWithRect:()=>Un,rectWithEllipse:()=>zn,rectWithLine:()=>Fn,rectWithRect:()=>Vn});var t={};n.r(t),n.d(t,{Curve:()=>yn,Ellipse:()=>Jt,Line:()=>Wt,Path:()=>wn,Point:()=>$t,Polygon:()=>Mn,Polyline:()=>hn,Rect:()=>sn,bezier:()=>On,ellipse:()=>Qt,intersection:()=>cr,line:()=>Gt,normalizeAngle:()=>wt,point:()=>Ut,random:()=>_t,rect:()=>ln,scale:()=>bt,snapToGrid:()=>xt,toDeg:()=>kt,toRad:()=>St,types:()=>Nt});var i={};n.r(i),n.d(i,{absolute:()=>Ui,bottom:()=>Xi,ellipse:()=>Ji,ellipseSpread:()=>Ki,fn:()=>Hi,left:()=>Wi,line:()=>qi,right:()=>Gi,top:()=>Yi});var o={};n.r(o),n.d(o,{bottom:()=>so,inside:()=>fo,insideOriented:()=>co,left:()=>io,manual:()=>ro,outside:()=>uo,outsideOriented:()=>lo,radial:()=>ho,radialOriented:()=>po,right:()=>oo,top:()=>ao});var a={};n.r(a),n.d(a,{manhattan:()=>fa,metro:()=>da,normal:()=>No,oneSide:()=>Oo,orthogonal:()=>Go});var s={};n.r(s),n.d(s,{curve:()=>Aa,jumpover:()=>xa,normal:()=>ka,rounded:()=>Sa,smooth:()=>_a});var l={};n.r(l),n.d(l,{addClass:()=>Wa,mask:()=>Ua,opacity:()=>Ha,stroke:()=>Ba});var u={};n.r(u),n.d(u,{connectionClosest:()=>Qa,connectionLength:()=>Ya,connectionPerpendicular:()=>Ja,connectionRatio:()=>Ga,resolveRef:()=>Xa});var c={};n.r(c),n.d(c,{anchor:()=>is,bbox:()=>os,boundary:()=>ss,rectangle:()=>as});var f={};n.r(f),n.d(f,{bottom:()=>fs,bottomLeft:()=>vs,bottomRight:()=>ms,center:()=>us,left:()=>hs,midSide:()=>bs,modelCenter:()=>ws,perpendicular:()=>ys,right:()=>ds,top:()=>cs,topLeft:()=>ps,topRight:()=>gs});var h={};n.r(h),n.d(h,{BorderedImage:()=>Qs,Circle:()=>Ws,Cylinder:()=>nl,DoubleLink:()=>al,Ellipse:()=>Gs,EmbeddedImage:()=>Zs,HeaderedRectangle:()=>tl,Image:()=>Js,InscribedImage:()=>el,Link:()=>ol,Path:()=>Ys,Polygon:()=>Xs,Polyline:()=>Ks,Rectangle:()=>qs,ShadowLink:()=>sl,TextBlock:()=>il});var d=n(6540),p=n(5338);const g={de:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Vollbildmodus","reloadPage":"Seite erneut laden","pleaseWait":"Dokument wird geladen, bitte warten","loading":{"text":"Bitte warten Sie, bis die benötigten Seiten geladen sind"},"zooming":{"zoomIn":"Vergrößern","zoomOut":"Verkleinern"},"actions":{"rotate":"Im Uhrzeigersinn drehen","download":"Herunterladen","print":"Drucken"},"errors":{"unspecific":"Es ist ein Fehler aufgetreten"},"exportDTPDF":{"question":"Frage","solution":"Lösung","condition":"Bedingung","link":"Link","step":"Schritt","startingPoint":"Startpunkt","parentSteps":"Übergeordneter Schritt","noLinks":"Keine verknüpften Schritte","exportedInfo":"Exportiert am {{date}} von {{exportedBy}}","createdInfo":"Erstellt von {{createdBy}}","conditionDefaultTitle":"Standard","contains":"Enthält","notContains":"Enthält nicht","andOperator":"UND","orOperator":"ODER","default":"Standard","deleted":"Gelöscht"}}')}},en:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Fullscreen","reloadPage":"Reload page","pleaseWait":"Loading document, please wait","loading":{"text":"Please wait until we load requested pages"},"zooming":{"zoomIn":"Zoom in","zoomOut":"Zoom out"},"actions":{"rotate":"Rotate clockwise","download":"Download","print":"Print"},"errors":{"unspecific":"Something went wrong"},"exportDTPDF":{"question":"Question","solution":"Solution","condition":"Condition","link":"Link","step":"Step","startingPoint":"Starting point","parentSteps":"Parent step","noLinks":"No linked steps","exportedInfo":"Exported at {{date}} by {{exportedBy}}","createdInfo":"Created by {{createdBy}}","conditionDefaultTitle":"Default","contains":"Contains","notContains":"Doesn\'t contain","andOperator":"AND","orOperator":"OR","default":"Default","deleted":"Deleted"}}')}},es:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Pantalla completa","reloadPage":"Recargar página","pleaseWait":"Cargando documentos, espere","loading":{"text":"Por favor, espere hasta que carguemos las páginas solicitadas"},"zooming":{"zoomIn":"Acercar","zoomOut":"Alejar"},"actions":{"rotate":"Girar en el sentido de las agujas del reloj","download":"Descargar","print":"Imprimir"},"errors":{"unspecific":"Algo salió mal"},"exportDTPDF":{"question":"Pregunta","solution":"Solución","condition":"Condición","link":"Enlace","step":"Paso","startingPoint":"Punto de partida","parentSteps":"Etapa actual","noLinks":"Sin elementos enlazados","exportedInfo":"Exportado a {{date}} por {{exportedBy}}","createdInfo":"Creado por {{createdBy}}","conditionDefaultTitle":"Predeterminado","contains":"Contiene","notContains":"No contiene","andOperator":"Y","orOperator":"O","default":"Predeterminado","deleted":"Eliminado"}}')}},pl:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Fullscreen","reloadPage":"Przeładowanie strony","pleaseWait":"Ładowanie dokumentu, proszę czekać","loading":{"text":"Proszę czekać, aż załadujemy żądane strony"},"zooming":{"zoomIn":"Powiększenie","zoomOut":"Powiększenie"},"actions":{"rotate":"Obróć się zgodnie z ruchem wskazówek zegara","download":"Pobierz","print":"Drukuj"},"errors":{"unspecific":"Coś poszło nie tak"},"exportDTPDF":{"question":"Pytanie","solution":"Rozwiązanie","condition":"Stan","link":"Odnośnik","step":"Krok","startingPoint":"Punkt początkowy","parentSteps":"Krok rodzica","noLinks":"Нет связанных групп","exportedInfo":"Eksportowane w {{date}} na {{exportedBy}}","createdInfo":"Stworzony przez {{createdBy}}","conditionDefaultTitle":"Default","contains":"Zawiera","notContains":"Nie zawiera","andOperator":"I","orOperator":"Lub","default":"Default","deleted":"Usunięto"}}')}},uk:{translation:{"pdf-viewer":JSON.parse('{"fullscreen":"Повноекранний режим","reloadPage":"Оновити","pleaseWait":"Завантаження документу, будь ласка, зачекайте","loading":{"text":"Зачекайте, ми завантажуємо вміст сторінки"},"zooming":{"zoomIn":"Наблизити","zoomOut":"Зменшити"},"actions":{"rotate":"Повернути за годинниковою стрілкою","download":"Завантажити","print":"Друкувати"},"errors":{"unspecific":"Щось пішло не так"},"exportDTPDF":{"question":"Питання","solution":"Рішення","condition":"Умова","link":"Посилання","step":"Крок","startingPoint":"Початковий крок","parentSteps":"Батьківський крок","noLinks":"Немає пов\'язаних кроків","exportedInfo":"Експортовано на {{date}} користувачем {{exportedBy}}","createdInfo":"Створено користувачем {{createdBy}}","conditionDefaultTitle":"За замовчанням","contains":"Містить","notContains":"Не містить","andOperator":"ТА","orOperator":"АБО","default":"За замовчанням","deleted":"Видалений"}}')}}},v=e=>"string"==typeof e,m=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},y=e=>null==e?"":""+e,b=/###/g,w=e=>e&&e.indexOf("###")>-1?e.replace(b,"."):e,x=e=>!e||v(e),k=(e,t,n)=>{const r=v(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(x(e))return{};const t=w(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return x(e)?{}:{obj:e,k:w(r[i])}},S=(e,t,n)=>{const{obj:r,k:i}=k(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=k(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=k(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},_=(e,t)=>{const{obj:n,k:r}=k(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},E=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?v(e[r])||e[r]instanceof String||v(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):E(e[r],t[r],n):e[r]=t[r]);return e},C=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var A={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const P=e=>v(e)?e.replace(/[&<>"'\/]/g,e=>A[e]):e,L=[" ",",","?","!",";"],T=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),N=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},O=e=>e?.replace("_","-"),M={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class R{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||M,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(v(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new R(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new R(this.logger,e)}}var D=new R;class j{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}}class I extends j{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):v(n)&&i?a.push(...n.split(i)):a.push(n)));const s=_(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&v(n)?N(this.data?.[e]?.[t],n,i):s}addResource(e,t,n,r,i={silent:!1}){const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),S(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(const r in n)(v(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=_(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?E(s,n,i):s={...s,...n},S(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var F={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const z=Symbol("i18next/PATH_KEY");function V(e,t){const{[z]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===z?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}());return n.join(t?.keySeparator??".")}const B={},$=e=>!v(e)&&"boolean"!=typeof e&&"number"!=typeof e;class U extends j{constructor(e,t={}){var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=D.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const r=this.resolve(e,n);if(void 0===r?.res)return!1;const i=$(r.res);return!1!==n.returnObjects||!i}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=L.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=T.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:v(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:v(i)?[i]:i}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=V(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const i=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1];let u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");const c=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===c?.toLowerCase())return f?i?{res:`${l}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${a}`:i?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a;const h=this.resolve(e,r);let d=h?.res;const p=h?.usedKey||a,g=h?.exactUsedKey||a,m=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==r.count&&!v(r.count),w=U.hasDefaultValue(r),x=b?this.pluralResolver.getSuffix(c,r.count,r):"",k=r.ordinal&&b?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",S=b&&!r.ordinal&&0===r.count,_=S&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${k}`]||r.defaultValue;let E=d;y&&!d&&w&&(E=_);const C=$(E),A=Object.prototype.toString.apply(E);if(!(y&&E&&C&&["[object Number]","[object Function]","[object RegExp]"].indexOf(A)<0)||v(m)&&Array.isArray(E))if(y&&v(m)&&Array.isArray(d))d=d.join(m),d&&(d=this.extendTranslation(d,e,r,n));else{let t=!1,i=!1;!this.isValidLookup(d)&&w&&(t=!0,d=_),this.isValidLookup(d)||(i=!0,d=a);const s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&i?void 0:d,f=w&&_!==d&&this.options.updateMissing;if(i||t||f){if(this.logger.log(f?"updateKey":"missingKey",c,l,a,f?_:d),o){const e=this.resolve(a,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);const n=(e,t,n)=>{const i=w&&n!==d?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,i,f,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,i,f,r),this.emit("missingKey",e,l,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,r);S&&r[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,r[`defaultValue${t}`]||_)})}):n(e,a,_))}d=this.extendTranslation(d,e,r,h,n),i&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${l}${u}${a}`),(i||t)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${a}`:a,t?d:void 0,r))}else{if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,E,{...r,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(h.res=e,h.usedParams=this.getUsedParamsDetails(r),h):e}if(o){const e=Array.isArray(E),t=e?[]:{},n=e?g:p;for(const e in E)if(Object.prototype.hasOwnProperty.call(E,e)){const i=`${n}${o}${e}`;t[e]=w&&!d?this.translate(i,{...r,defaultValue:$(_)?_[e]:void 0,joinArrays:!1,ns:s}):this.translate(i,{...r,joinArrays:!1,ns:s}),t[e]===i&&(t[e]=E[e])}d=t}}return i?(h.res=d,h.usedParams=this.getUsedParamsDetails(r),h):d}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=v(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!v(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>i?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=v(o)?[o]:o;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=F.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,o,a;return v(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const c=void 0!==t.count&&!v(t.count),f=c&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(v(t.context)||"number"==typeof t.context)&&""!==t.context,d=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(a=e,B[`${d[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(B[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${d.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach(r=>{if(this.isValidLookup(n))return;o=r;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));const n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),a.push(l+e),f&&a.push(l+n)),h){const r=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(r),c&&(t.ordinal&&0===e.indexOf(i)&&a.push(r+e.replace(i,this.options.pluralSeparator)),a.push(r+e),f&&a.push(r+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!v(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class H{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=D.create("languageUtils")}getScriptPartFromCode(e){if(!(e=O(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=O(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(v(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),v(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return v(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):v(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}}const q={zero:0,one:1,two:2,few:3,many:4,other:5},W={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class G{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=D.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=O("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),W;if(!e.match(/-|_/))return W;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>q[e]-q[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Y=(e,t,n,r=".",i=!0)=>{let o=((e,t,n)=>{const r=_(e,n);return void 0!==r?r:_(t,n)})(e,t,n);return!o&&i&&v(n)&&(o=N(e,n,r),void 0===o&&(o=N(t,n,r))),o},X=e=>e.replace(/\$/g,"$$$$");class K{constructor(e={}){this.logger=D.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:P,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?C(i):o||"{{",this.suffix=a?C(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?C(f):h||C("$t("),this.nestingSuffix=d?C(d):p||C(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=Y(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(Y(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>X(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?X(this.escape(e)):X(e)}].forEach(t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof u){const t=u(e,i,r);o=v(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(c){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else v(o)||this.useRawValueToEscape||(o=y(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,o;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...n},o=o.replace&&!v(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!v(i))return i;v(i)||(i=y(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const J=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(O(r),i),t[a]=s),s(n)}},Q=e=>(t,n,r)=>e(O(n),r)(t);class Z{constructor(e={}){this.logger=D.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?J:Q;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=J(t)}format(e,t,n,r={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e);return o}}class ee extends j{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=D.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=k(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();v(e)&&(e=this.languageUtils.toResolveHierarchy(e)),v(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i,o={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,r,s):l(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const te=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),v(e[1])&&(t.defaultValue=e[1]),v(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ne=e=>(v(e.ns)&&(e.ns=[e.ns]),v(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),v(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),re=()=>{};class ie extends j{constructor(e={},t){var n;if(super(),this.options=ne(e),this.services={},this.logger=D,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(v(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=te();this.options={...n,...this.options,...ne(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?D.init(r(this.modules.logger),this.options):D.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Z;const t=new H(this.options);this.store=new I(this.options.resources,this.options);const i=this.services;i.logger=D,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new G(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new K(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new ee(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new U(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=re),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=m(),o=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),i}loadResources(e,t=re){let n=t;const r=v(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===r?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const r=m();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=re),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=m();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=v(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(v(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{i(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const r=(e,t,...i)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(i)):{...t},o.lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);const a=this.options.keySeparator||".";let s;return o.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=V(e,{...this.options,...t})),`${o.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=V(e,{...this.options,...t})),s=o.keyPrefix?`${o.keyPrefix}${a}${e}`:e),this.t(s,o)};return v(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=m();return this.options.ns?(v(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=m();v(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new H(te());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new ie(e,t);return n.createInstance=ie.createInstance,n}cloneInstance(e={},t=re){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new ie(r);if(void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e)),["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{});i.store=new I(e,r),i.services.resourceStore=i.store}return e.interpolation&&(i.services.interpolator=new K(r)),i.translator=new U(i.services,r),i.translator.on("*",(e,...t)=>{i.emit(e,...t)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const oe=ie.createInstance();oe.createInstance,oe.dir,oe.init,oe.loadResources,oe.reloadResources,oe.use,oe.changeLanguage,oe.getFixedT,oe.t,oe.exists,oe.setDefaultNamespace,oe.hasLoadedNamespace,oe.loadNamespaces,oe.loadLanguages,n(4915),Object.create(null);const ae=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,se={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},le=e=>se[e];let ue,ce={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(ae,le),transDefaultProps:void 0};const fe={type:"3rdParty",init(e){((e={})=>{ce={...ce,...e}})(e.options.react),(e=>{ue=e})(e)}},he=(0,d.createContext)();Error;const de={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&copy;":"©","&reg;":"®","&trade;":"™","&hellip;":"…","&ndash;":"–","&mdash;":"—","&lsquo;":"‘","&rsquo;":"’","&sbquo;":"‚","&ldquo;":"“","&rdquo;":"”","&bdquo;":"„","&dagger;":"†","&Dagger;":"‡","&bull;":"•","&prime;":"′","&Prime;":"″","&lsaquo;":"‹","&rsaquo;":"›","&sect;":"§","&para;":"¶","&middot;":"·","&ensp;":" ","&emsp;":" ","&thinsp;":" ","&euro;":"€","&pound;":"£","&yen;":"¥","&cent;":"¢","&curren;":"¤","&times;":"×","&divide;":"÷","&minus;":"−","&plusmn;":"±","&ne;":"≠","&le;":"≤","&ge;":"≥","&asymp;":"≈","&equiv;":"≡","&infin;":"∞","&int;":"∫","&sum;":"∑","&prod;":"∏","&radic;":"√","&part;":"∂","&permil;":"‰","&deg;":"°","&micro;":"µ","&larr;":"←","&uarr;":"↑","&rarr;":"→","&darr;":"↓","&harr;":"↔","&crarr;":"↵","&lArr;":"⇐","&uArr;":"⇑","&rArr;":"⇒","&dArr;":"⇓","&hArr;":"⇔","&alpha;":"α","&beta;":"β","&gamma;":"γ","&delta;":"δ","&epsilon;":"ε","&zeta;":"ζ","&eta;":"η","&theta;":"θ","&iota;":"ι","&kappa;":"κ","&lambda;":"λ","&mu;":"μ","&nu;":"ν","&xi;":"ξ","&omicron;":"ο","&pi;":"π","&rho;":"ρ","&sigma;":"σ","&tau;":"τ","&upsilon;":"υ","&phi;":"φ","&chi;":"χ","&psi;":"ψ","&omega;":"ω","&Alpha;":"Α","&Beta;":"Β","&Gamma;":"Γ","&Delta;":"Δ","&Epsilon;":"Ε","&Zeta;":"Ζ","&Eta;":"Η","&Theta;":"Θ","&Iota;":"Ι","&Kappa;":"Κ","&Lambda;":"Λ","&Mu;":"Μ","&Nu;":"Ν","&Xi;":"Ξ","&Omicron;":"Ο","&Pi;":"Π","&Rho;":"Ρ","&Sigma;":"Σ","&Tau;":"Τ","&Upsilon;":"Υ","&Phi;":"Φ","&Chi;":"Χ","&Psi;":"Ψ","&Omega;":"Ω","&Agrave;":"À","&Aacute;":"Á","&Acirc;":"Â","&Atilde;":"Ã","&Auml;":"Ä","&Aring;":"Å","&AElig;":"Æ","&Ccedil;":"Ç","&Egrave;":"È","&Eacute;":"É","&Ecirc;":"Ê","&Euml;":"Ë","&Igrave;":"Ì","&Iacute;":"Í","&Icirc;":"Î","&Iuml;":"Ï","&ETH;":"Ð","&Ntilde;":"Ñ","&Ograve;":"Ò","&Oacute;":"Ó","&Ocirc;":"Ô","&Otilde;":"Õ","&Ouml;":"Ö","&Oslash;":"Ø","&Ugrave;":"Ù","&Uacute;":"Ú","&Ucirc;":"Û","&Uuml;":"Ü","&Yacute;":"Ý","&THORN;":"Þ","&szlig;":"ß","&agrave;":"à","&aacute;":"á","&acirc;":"â","&atilde;":"ã","&auml;":"ä","&aring;":"å","&aelig;":"æ","&ccedil;":"ç","&egrave;":"è","&eacute;":"é","&ecirc;":"ê","&euml;":"ë","&igrave;":"ì","&iacute;":"í","&icirc;":"î","&iuml;":"ï","&eth;":"ð","&ntilde;":"ñ","&ograve;":"ò","&oacute;":"ó","&ocirc;":"ô","&otilde;":"õ","&ouml;":"ö","&oslash;":"ø","&ugrave;":"ù","&uacute;":"ú","&ucirc;":"û","&uuml;":"ü","&yacute;":"ý","&thorn;":"þ","&yuml;":"ÿ","&iexcl;":"¡","&iquest;":"¿","&fnof;":"ƒ","&circ;":"ˆ","&tilde;":"˜","&OElig;":"Œ","&oelig;":"œ","&Scaron;":"Š","&scaron;":"š","&Yuml;":"Ÿ","&ordf;":"ª","&ordm;":"º","&macr;":"¯","&acute;":"´","&cedil;":"¸","&sup1;":"¹","&sup2;":"²","&sup3;":"³","&frac14;":"¼","&frac12;":"½","&frac34;":"¾","&spades;":"♠","&clubs;":"♣","&hearts;":"♥","&diams;":"♦","&loz;":"◊","&oline;":"‾","&frasl;":"⁄","&weierp;":"℘","&image;":"ℑ","&real;":"ℜ","&alefsym;":"ℵ"};new RegExp(Object.keys(de).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g");function pe({i18n:e,defaultNS:t,children:n}){const r=(0,d.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,d.createElement)(he.Provider,{value:r},n)}n(9888);const ge=e=>"string"==typeof e,ve=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},me=e=>null==e?"":""+e,ye=/###/g,be=e=>e&&e.indexOf("###")>-1?e.replace(ye,"."):e,we=e=>!e||ge(e),xe=(e,t,n)=>{const r=ge(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(we(e))return{};const t=be(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return we(e)?{}:{obj:e,k:be(r[i])}},ke=(e,t,n)=>{const{obj:r,k:i}=xe(e,t,Object);if(void 0!==r||1===t.length)return void(r[i]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=xe(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=xe(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},Se=(e,t)=>{const{obj:n,k:r}=xe(e,t);if(n)return n[r]},_e=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?ge(e[r])||e[r]instanceof String||ge(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):_e(e[r],t[r],n):e[r]=t[r]);return e},Ee=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ce={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Ae=e=>ge(e)?e.replace(/[&<>"'\/]/g,e=>Ce[e]):e,Pe=[" ",",","?","!",";"],Le=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Te=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let e=0;e<r.length;){if(!i||"object"!=typeof i)return;let t,o="";for(let a=e;a<r.length;++a)if(a!==e&&(o+=n),o+=r[a],t=i[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}i=t}return i},Ne=e=>e&&e.replace("_","-"),Oe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Me{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Oe,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(ge(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Me(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Me(this.logger,e)}}var Re=new Me;class De{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{let[r,i]=t;for(let t=0;t<i;t++)r.apply(r,[e,...n])})}}class je extends De{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):ge(n)&&i?a.push(...n.split(i)):a.push(n)));const s=Se(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&ge(n)?Te(this.data&&this.data[e]&&this.data[e][t],n,i):s}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),ke(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(ge(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=Se(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?_e(s,n,i):s={...s,...n},ke(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Ie={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))}),t}};const Fe={};class ze extends De{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Re.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Pe.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const i=Le.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!i.test(e);if(!o){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:ge(i)?[i]:i};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:ge(i)?[i]:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],l=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(u){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:o}const c=this.resolve(e,t);let f=c&&c.res;const h=c&&c.usedKey||o,d=c&&c.exactUsedKey||o,p=Object.prototype.toString.apply(f),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!ge(f)&&"boolean"!=typeof f&&"number"!=typeof f;if(!(v&&f&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||ge(g)&&Array.isArray(f))if(v&&ge(g)&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1;const u=void 0!==t.count&&!ge(t.count),h=ze.hasDefaultValue(t),d=u?this.pluralResolver.getSuffix(l,t.count,t):"",p=t.ordinal&&u?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",g=u&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${d}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(f)&&h&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=o);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:f,y=h&&v!==f&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",l,s,o,y?v:f),i){const e=this.resolve(o,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const i=h&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,i,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,i,y,t),this.emit("missingKey",e,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([e],o+n,t[`defaultValue${n}`]||v)})}):r(e,o,v))}f=this.extendTranslation(f,e,t,c,n),a&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${s}:${o}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${o}`:o,r?f:void 0):this.options.parseMissingKeyHandler(f))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,f,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(i){const e=Array.isArray(f),n=e?[]:{},r=e?d:h;for(const e in f)if(Object.prototype.hasOwnProperty.call(f,e)){const o=`${r}${i}${e}`;n[e]=this.translate(o,{...t,joinArrays:!1,ns:a}),n[e]===o&&(n[e]=f[e])}f=n}}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(t),c):f}extendTranslation(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=ge(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let l=n.replace&&!ge(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):o.translate(...r,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=ge(a)?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=Ie.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ge(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),l=s.key;n=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const c=void 0!==a.count&&!ge(a.count),f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),h=void 0!==a.context&&(ge(a.context)||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{this.isValidLookup(t)||(o=e,!Fe[`${d[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Fe[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${d.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach(n=>{if(this.isValidLookup(t))return;i=n;const o=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,l,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(o.push(l+e),a.ordinal&&0===e.indexOf(r)&&o.push(l+e.replace(r,this.options.pluralSeparator)),f&&o.push(l+t)),h){const n=`${l}${this.options.contextSeparator}${a.context}`;o.push(n),c&&(o.push(n+e),a.ordinal&&0===e.indexOf(r)&&o.push(n+e.replace(r,this.options.pluralSeparator)),f&&o.push(n+t))}}let s;for(;s=o.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!ge(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}const Ve=e=>e.charAt(0).toUpperCase()+e.slice(1);class Be{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Re.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Ne(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Ne(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(ge(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Ve(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Ve(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Ve(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),ge(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return ge(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):ge(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}}let $e=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ue={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const He=["v1","v2","v3"],qe=["v4"],We={zero:0,one:1,two:2,few:3,many:4,other:5};class Ge{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Re.create("pluralResolver"),this.options.compatibilityJSON&&!qe.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return $e.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Ue[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=Ne("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(n,{type:r})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(r,t)}return this.pluralRulesCache[i]=o,o}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>We[e]-We[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!He.includes(this.options.compatibilityJSON)}}const Ye=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,n)=>{const r=Se(e,n);return void 0!==r?r:Se(t,n)})(e,t,n);return!o&&i&&ge(n)&&(o=Te(e,n,r),void 0===o&&(o=Te(t,n,r))),o},Xe=e=>e.replace(/\$/g,"$$$$");class Ke{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Re.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:Ae,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?Ee(i):o||"{{",this.suffix=a?Ee(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?Ee(f):h||Ee("$t("),this.nestingSuffix=d?Ee(d):p||Ee(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=Ye(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}const i=e.split(this.formatSeparator),o=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(Ye(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:o})};this.resetRegExp();const u=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Xe(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Xe(this.escape(e)):Xe(e)}].forEach(t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(o=l(n),void 0===o)if("function"==typeof u){const t=u(e,i,r);o=ge(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(c){o=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else ge(o)||this.useRawValueToEscape||(o=me(o));const s=t.safeValue(o);if(e=e.replace(i[0],s),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let o=`{${r[1]}`;e=r[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];i={...o},i=i.replace&&!ge(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),s=e,l=!0}if(r=t(a.call(this,n[1].trim(),i),i),r&&n[0]===e&&!ge(r))return r;ge(r)||(r=me(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l&&(r=s.reduce((e,t)=>this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Je=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(Ne(r),i),t[a]=s),s(n)}};class Qe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Re.create("formatter"),this.options=e,this.formats={number:Je((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:Je((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:Je((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:Je((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:Je((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Je(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(e=>e.indexOf(")")>-1)){const e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}const o=i.reduce((e,t)=>{const{formatName:i,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...o,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e);return o}}class Ze extends De{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Re.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const i={},o={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,r=!1,void 0===o[a]&&(o[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:i}=xe(e,t,Object);r[i]=r[i]||[],r[i].push(n)})(n.loaded,[i],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();ge(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ge(t)&&(t=[t]);const i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;i=5===l.length?l(e,t,n,r,s):l(e,t,n,r),i&&"function"==typeof i.then?i.then(e=>a(null,e)).catch(a):a(null,i)}catch(e){a(e)}else l(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const et=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),ge(e[1])&&(t.defaultValue=e[1]),ge(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),tt=e=>(ge(e.ns)&&(e.ns=[e.ns]),ge(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ge(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),nt=()=>{};class rt extends De{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=tt(e),this.services={},this.logger=Re,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(ge(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=et();this.options={...r,...this.options,...tt(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?Re.init(i(this.modules.logger),this.options):Re.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Qe);const n=new Be(this.options);this.store=new je(this.options.resources,this.options);const o=this.services;o.logger=Re,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new Ge(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new Ke(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new Ze(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)}),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new ze(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=nt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const o=ve(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt;const n=ge(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>r(e)),this.options.preload&&this.options.preload.forEach(e=>r(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){const r=ve();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=nt),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ie.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=ve();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=ge(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{o(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const i=function(e,t){let o;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else o={...t};o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);const u=r.options.keySeparator||".";let c;return c=o.keyPrefix&&Array.isArray(e)?e.map(e=>`${o.keyPrefix}${u}${e}`):o.keyPrefix?`${o.keyPrefix}${u}${e}`:e,r.t(c,o)};return ge(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,e)||r&&!o(i,e)))}loadNamespaces(e,t){const n=ve();return this.options.ns?(ge(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ve();ge(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new Be(et());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new rt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new rt(r);return void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e)),["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new je(this.store.data,r),i.services.resourceStore=i.store),i.translator=new ze(i.services,r),i.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const it=rt.createInstance();it.createInstance=rt.createInstance,it.createInstance,it.dir,it.init,it.loadResources,it.reloadResources,it.use,it.changeLanguage,it.getFixedT,it.t,it.exists,it.setDefaultNamespace,it.hasLoadedNamespace,it.loadNamespaces,it.loadLanguages;var ot=n(4353);n(494),n(7317),n(4173);var at=n(5750),st=n(7375);ot.extend(at),ot.extend(st);const lt=(e,t)=>ot(e).format(t),ut={format(e,t,n="en"){var r;return r=n,ot.locale(r),void 0===e?e:"uppercase"===t?e.toUpperCase():"lowercase"===t?e.toLowerCase():"capitalize"===t?e.charAt(0).toUpperCase()+e.slice(1):"bold"===t?`<b>${e}</b>`:"italic"===t?`<i>${e}</i>`:"datetime"===t?lt(e,"MMMM D, YYYY h:mm A"):"datetimeUTC"===t?`${lt(e,"MMMM D, YYYY H:mm")} (UTC)`:"numeral"===t?Number(e).toLocaleString("en-US"):"emphatic"===t?`<em>${e}</em>`:"strong"===t?`<strong>${e}</strong>`:e}};var ct=oe.createInstance();ct.init({lng:"en",resources:g,fallbackLng:"en",interpolation:ut,missingKeyHandler:function(){return"⛔️"}}),ct.use(fe);const ft=ct;var ht=n(4848),dt=n(1391),pt=n(2543),gt=n(4692);const{round:vt,floor:mt,PI:yt}=Math,bt={linear:function(e,t,n){var r=e[1]-e[0],i=t[1]-t[0];return(n-e[0])/r*i+t[0]||0}},wt=function(e){return e%360+(e<0?360:0)},xt=function(e,t){return t*vt(e/t)},kt=function(e){return 180*e/yt%360},St=function(e,t){return(e=(t=t||!1)?e:e%360)*yt/180},_t=function(e,t){if(void 0===t)t=void 0===e?1:e,e=0;else if(t<e){const n=e;e=t,t=n}return mt(Math.random()*(t-e+1)+e)},{cos:Et,sin:Ct,atan2:At}=Math,Pt=function(e,t){var n=St(e.y),r=St(t.y),i=e.x,o=t.x,a=St(o-i),s=Ct(a)*Et(r),l=Et(n)*Ct(r)-Ct(n)*Et(r)*Et(a),u=kt(At(s,l))-22.5;return u<0&&(u+=360),["NE","E","SE","S","SW","W","NW","N"][u=parseInt(u/45)]},Lt=function(e,t){var n=e.x,r=e.y;return(n-=t.x)*n+(r-=t.y)*r},Tt=function(e,t){return Math.sqrt(Lt(e,t))},Nt={Point:1,Line:2,Ellipse:3,Rect:4,Polyline:5,Polygon:6,Curve:7,Path:8},{abs:Ot,cos:Mt,sin:Rt,sqrt:Dt,min:jt,max:It,atan2:Ft,round:zt,pow:Vt,PI:Bt}=Math,$t=function(e,t){if(!(this instanceof $t))return new $t(e,t);if("string"==typeof e){var n=e.split(-1===e.indexOf("@")?" ":"@");e=parseFloat(n[0]),t=parseFloat(n[1])}else Object(e)===e&&(t=e.y,e=e.x);this.x=void 0===e?0:e,this.y=void 0===t?0:t};$t.fromPolar=function(e,t,n){n=new $t(n);var r=Ot(e*Mt(t)),i=Ot(e*Rt(t)),o=wt(kt(t));return o<90?i=-i:o<180?(r=-r,i=-i):o<270&&(r=-r),new $t(n.x+r,n.y+i)},$t.random=function(e,t,n,r){return new $t(_t(e,t),_t(n,r))},$t.prototype={type:Nt.Point,chooseClosest:function(e){var t=e.length;if(1===t)return new $t(e[0]);for(var n=null,r=1/0,i=0;i<t;i++){var o=new $t(e[i]),a=this.squaredDistance(o);a<r&&(n=o,r=a)}return n},adhereToRect:function(e){return e.containsPoint(this)||(this.x=jt(It(this.x,e.x),e.x+e.width),this.y=jt(It(this.y,e.y),e.y+e.height)),this},angleBetween:function(e,t){var n=this.equals(e)||this.equals(t)?NaN:this.theta(t)-this.theta(e);return n<0&&(n+=360),n},bearing:function(e){return Pt(this,e)},changeInAngle:function(e,t,n){return this.clone().offset(-e,-t).theta(n)-this.theta(n)},clone:function(){return new $t(this)},cross:function(e,t){return e&&t?(t.x-this.x)*(e.y-this.y)-(t.y-this.y)*(e.x-this.x):NaN},difference:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),new $t(this.x-(e||0),this.y-(t||0))},distance:function(e){return Tt(this,e)},dot:function(e){return e?this.x*e.x+this.y*e.y:NaN},equals:function(e){return!!e&&this.x===e.x&&this.y===e.y},lerp:function(e,t){var n=this.x,r=this.y;return new $t((1-t)*n+t*e.x,(1-t)*r+t*e.y)},magnitude:function(){return Dt(this.x*this.x+this.y*this.y)||.01},manhattanDistance:function(e){return Ot(e.x-this.x)+Ot(e.y-this.y)},move:function(e,t){var n=St(new $t(e).theta(this));return this.offset(Mt(n)*t,-Rt(n)*t)},normalize:function(e){var t=(e||1)/this.magnitude();return this.scale(t,t)},offset:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),this.x+=e||0,this.y+=t||0,this},reflection:function(e){return new $t(e).move(this,this.distance(e))},rotate:function(e,t){if(0===t)return this;e=e||new $t(0,0),t=St(wt(-t));var n=Mt(t),r=Rt(t),i=n*(this.x-e.x)-r*(this.y-e.y)+e.x,o=r*(this.x-e.x)+n*(this.y-e.y)+e.y;return this.x=i,this.y=o,this},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=Vt(10,e)}return this.x=zt(this.x*t)/t,this.y=zt(this.y*t)/t,this},scale:function(e,t,n){return n=n&&new $t(n)||new $t(0,0),this.x=n.x+e*(this.x-n.x),this.y=n.y+t*(this.y-n.y),this},snapToGrid:function(e,t){return this.x=xt(this.x,e),this.y=xt(this.y,t||e),this},squaredDistance:function(e){return Lt(this,e)},theta:function(e){var t=-((e=new $t(e)).y-this.y),n=e.x-this.x,r=Ft(t,n);return r<0&&(r=2*Bt+r),180*r/Bt},toJSON:function(){return{x:this.x,y:this.y}},toPolar:function(e){e=e&&new $t(e)||new $t(0,0);var t=this.x,n=this.y;return this.x=Dt((t-e.x)*(t-e.x)+(n-e.y)*(n-e.y)),this.y=St(e.theta(new $t(t,n))),this},toString:function(){return this.x+"@"+this.y},serialize:function(){return this.x+","+this.y},update:function(e,t){return Object(e)===e&&(t=e.y,e=e.x),this.x=e||0,this.y=t||0,this},vectorAngle:function(e){return new $t(0,0).angleBetween(this,e)}},$t.prototype.translate=$t.prototype.offset;const Ut=$t,{max:Ht,min:qt}=Math,Wt=function(e,t){return this instanceof Wt?e instanceof Wt?new Wt(e.start,e.end):(this.start=new $t(e),void(this.end=new $t(t))):new Wt(e,t)};Wt.prototype={type:Nt.Line,angle:function(){var e=new $t(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,e)},bbox:function(){var e=qt(this.start.x,this.end.x),t=qt(this.start.y,this.end.y),n=Ht(this.start.x,this.end.x),r=Ht(this.start.y,this.end.y);return new sn(e,t,n-e,r-t)},bearing:function(){return Pt(this.start,this.end)},clone:function(){return new Wt(this.start,this.end)},closestPoint:function(e){return this.pointAt(this.closestPointNormalizedLength(e))},closestPointLength:function(e){return this.closestPointNormalizedLength(e)*this.length()},closestPointNormalizedLength:function(e){var t=this.vector().dot(new Wt(this.start,e).vector()),n=qt(1,Ht(0,t/this.squaredLength()));return n!=n?0:n},closestPointTangent:function(e){return this.tangentAt(this.closestPointNormalizedLength(e))},containsPoint:function(e){var t=this.start,n=this.end;if(0!==t.cross(e,n))return!1;var r=this.length();return!(new Wt(t,e).length()>r||new Wt(e,n).length()>r)},divideAt:function(e){var t=this.pointAt(e);return[new Wt(this.start,t),new Wt(t,this.end)]},divideAtLength:function(e){var t=this.pointAtLength(e);return[new Wt(this.start,t),new Wt(t,this.end)]},equals:function(e){return!!e&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.end.x===e.end.x&&this.end.y===e.end.y},intersect:function(e,t){if(e&&e.intersectionWithLine){var n=e.intersectionWithLine(this,t);return n&&e instanceof Wt&&(n=n[0]),n}return null},intersectionWithLine:function(e){var t=new $t(this.end.x-this.start.x,this.end.y-this.start.y),n=new $t(e.end.x-e.start.x,e.end.y-e.start.y),r=t.x*n.y-t.y*n.x,i=new $t(e.start.x-this.start.x,e.start.y-this.start.y),o=i.x*n.y-i.y*n.x,a=i.x*t.y-i.y*t.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 $t(this.start.x+o*t.x/r,this.start.y+o*t.y/r)]},isDifferentiable:function(){return!this.start.equals(this.end)},length:function(){return Tt(this.start,this.end)},midpoint:function(){return new $t((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)},parallel:function(e){const t=this.clone();if(!this.isDifferentiable())return t;const{start:n,end:r}=t,i=n.clone().rotate(r,270),o=r.clone().rotate(n,90);return n.move(o,e),r.move(i,e),t},pointAt:function(e){var t=this.start,n=this.end;return e<=0?t.clone():e>=1?n.clone():t.lerp(n,e)},pointAtLength:function(e){var t=this.start,n=this.end,r=!0;e<0&&(r=!1,e=-e);var i=this.length();return e>=i?r?n.clone():t.clone():this.pointAt((r?e:i-e)/i)},pointOffset:function(e){e=new $t(e);var t=this.start,n=this.end;return((n.x-t.x)*(e.y-t.y)-(n.y-t.y)*(e.x-t.x))/this.length()},rotate:function(e,t){return this.start.rotate(e,t),this.end.rotate(e,t),this},round:function(e){return this.start.round(e),this.end.round(e),this},scale:function(e,t,n){return this.start.scale(e,t,n),this.end.scale(e,t,n),this},setLength:function(e){var t=this.length();if(!t)return this;var n=e/t;return this.scale(n,n,this.start)},squaredLength:function(){return Lt(this.start,this.end)},tangentAt:function(e){if(!this.isDifferentiable())return null;var t=this.start,n=this.end,r=this.pointAt(e),i=new Wt(t,n);return i.translate(r.x-t.x,r.y-t.y),i},tangentAtLength:function(e){if(!this.isDifferentiable())return null;var t=this.start,n=this.end,r=this.pointAtLength(e),i=new Wt(t,n);return i.translate(r.x-t.x,r.y-t.y),i},toString:function(){return this.start.toString()+" "+this.end.toString()},serialize:function(){return this.start.serialize()+" "+this.end.serialize()},translate:function(e,t){return this.start.translate(e,t),this.end.translate(e,t),this},vector:function(){return new $t(this.end.x-this.start.x,this.end.y-this.start.y)}},Wt.prototype.intersection=Wt.prototype.intersect;const Gt=Wt,{sqrt:Yt,round:Xt,pow:Kt}=Math,Jt=function(e,t,n){return this instanceof Jt?e instanceof Jt?new Jt(new $t(e.x,e.y),e.a,e.b):(e=new $t(e),this.x=e.x,this.y=e.y,this.a=t,void(this.b=n)):new Jt(e,t,n)};Jt.fromRect=function(e){return e=new sn(e),new Jt(e.center(),e.width/2,e.height/2)},Jt.prototype={type:Nt.Ellipse,bbox:function(){return new sn(this.x-this.a,this.y-this.b,2*this.a,2*this.b)},center:function(){return new $t(this.x,this.y)},clone:function(){return new Jt(this)},containsPoint:function(e){return this.normalizedDistance(e)<=1},equals:function(e){return!!e&&e.x===this.x&&e.y===this.y&&e.a===this.a&&e.b===this.b},inflate:function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this.a+=2*e,this.b+=2*t,this},intersectionWithLine:function(e){var t=[],n=e.start,r=e.end,i=this.a,o=this.b,a=e.vector(),s=n.difference(new $t(this)),l=new $t(a.x/(i*i),a.y/(o*o)),u=new $t(s.x/(i*i),s.y/(o*o)),c=a.dot(l),f=a.dot(u),h=f*f-c*(s.dot(u)-1);if(h<0)return null;if(h>0){var d=Yt(h),p=(-f-d)/c,g=(-f+d)/c;if((p<0||1<p)&&(g<0||1<g))return null;0<=p&&p<=1&&t.push(n.lerp(r,p)),0<=g&&g<=1&&t.push(n.lerp(r,g))}else{var v=-f/c;if(!(0<=v&&v<=1))return null;t.push(n.lerp(r,v))}return t},intersectionWithLineFromCenterToPoint:function(e,t){e=new $t(e),t&&e.rotate(new $t(this.x,this.y),t);var n,r=e.x-this.x,i=e.y-this.y;if(0===r)return n=this.bbox().pointNearestToPoint(e),t?n.rotate(new $t(this.x,this.y),-t):n;var o=i/r,a=o*o,s=this.a*this.a,l=this.b*this.b,u=Yt(1/(1/s+a/l)),c=o*(u=r<0?-u:u);return n=new $t(this.x+u,this.y+c),t?n.rotate(new $t(this.x,this.y),-t):n},normalizedDistance:function(e){var t=e.x,n=e.y,r=this.a,i=this.b,o=this.x,a=this.y;return(t-o)*(t-o)/(r*r)+(n-a)*(n-a)/(i*i)},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=Kt(10,e)}return this.x=Xt(this.x*t)/t,this.y=Xt(this.y*t)/t,this.a=Xt(this.a*t)/t,this.b=Xt(this.b*t)/t,this},tangentTheta:function(e){var t,n,r=e.x,i=e.y,o=this.a,a=this.b,s=this.bbox().center(),l=s.x,u=s.y,c=r>s.x+o/2,f=r<s.x-o/2;return c||f?n=o*o/(r-l)-o*o*(i-u)*((t=r>s.x?i-30:i+30)-u)/(a*a*(r-l))+l:t=a*a/(i-u)-a*a*(r-l)*((n=i>s.y?r+30:r-30)-l)/(o*o*(i-u))+u,new $t(n,t).theta(e)},toString:function(){return new $t(this.x,this.y).toString()+" "+this.a+" "+this.b}};const Qt=Jt,{abs:Zt,cos:en,sin:tn,min:nn,max:rn,round:on,pow:an}=Math,sn=function(e,t,n,r){if(!(this instanceof sn))return new sn(e,t,n,r);Object(e)===e&&(t=e.y,n=e.width,r=e.height,e=e.x),this.x=void 0===e?0:e,this.y=void 0===t?0:t,this.width=void 0===n?0:n,this.height=void 0===r?0:r};sn.fromEllipse=function(e){return e=new Jt(e),new sn(e.x-e.a,e.y-e.b,2*e.a,2*e.b)},sn.fromPointUnion=function(...e){if(0===e.length)return null;const t=new $t;let n,r,i,o;n=r=1/0,i=o=-1/0;for(let a=0;a<e.length;a++){t.update(e[a]);const s=t.x,l=t.y;s<n&&(n=s),s>i&&(i=s),l<r&&(r=l),l>o&&(o=l)}return new sn(n,r,i-n,o-r)},sn.fromRectUnion=function(...e){if(0===e.length)return null;const t=new sn;let n,r,i,o;n=r=1/0,i=o=-1/0;for(let a=0;a<e.length;a++){t.update(e[a]);const s=t.x,l=t.y,u=s+t.width,c=l+t.height;s<n&&(n=s),u>i&&(i=u),l<r&&(r=l),c>o&&(o=c)}return new sn(n,r,i-n,o-r)},sn.prototype={type:Nt.Rect,bbox:function(e){return this.clone().rotateAroundCenter(e)},rotateAroundCenter:function(e){if(!e)return this;const{width:t,height:n}=this,r=St(e),i=Zt(tn(r)),o=Zt(en(r)),a=t*o+n*i,s=t*i+n*o;return this.x+=(t-a)/2,this.y+=(n-s)/2,this.width=a,this.height=s,this},bottomLeft:function(){return new $t(this.x,this.y+this.height)},bottomLine:function(){return new Wt(this.bottomLeft(),this.bottomRight())},bottomMiddle:function(){return new $t(this.x+this.width/2,this.y+this.height)},center:function(){return new $t(this.x+this.width/2,this.y+this.height/2)},clone:function(){return new sn(this)},containsPoint:function(e){return(e=new $t(e)).x>=this.x&&e.x<=this.x+this.width&&e.y>=this.y&&e.y<=this.y+this.height},containsRect:function(e){var t=new sn(this).normalize(),n=new sn(e).normalize(),r=t.width,i=t.height,o=n.width,a=n.height;if(!(r&&i&&o&&a))return!1;var s=t.x,l=t.y,u=n.x,c=n.y;return o+=u,r+=s,a+=c,i+=l,s<=u&&o<=r&&l<=c&&a<=i},corner:function(){return new $t(this.x+this.width,this.y+this.height)},equals:function(e){var t=new sn(this).normalize(),n=new sn(e).normalize();return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height},inflate:function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this.x-=e,this.y-=t,this.width+=2*e,this.height+=2*t,this},intersect:function(e){var t=this.origin(),n=this.corner(),r=e.origin(),i=e.corner();if(i.x<=t.x||i.y<=t.y||r.x>=n.x||r.y>=n.y)return null;var o=rn(t.x,r.x),a=rn(t.y,r.y);return new sn(o,a,nn(n.x,i.x)-o,nn(n.y,i.y)-a)},intersectionWithLine:function(e){var t,n,r=this,i=[r.topLine(),r.rightLine(),r.bottomLine(),r.leftLine()],o=[],a=[],s=i.length;for(n=0;n<s;n++)null!==(t=e.intersect(i[n]))&&a.indexOf(t.toString())<0&&(o.push(t),a.push(t.toString()));return o.length>0?o:null},intersectionWithLineFromCenterToPoint:function(e,t){e=new $t(e);var n,r=new $t(this.x+this.width/2,this.y+this.height/2);t&&e.rotate(r,t);for(var i=[this.topLine(),this.rightLine(),this.bottomLine(),this.leftLine()],o=new Wt(r,e),a=i.length-1;a>=0;--a){var s=i[a].intersection(o);if(null!==s){n=s;break}}return n&&t&&n.rotate(r,-t),n},leftLine:function(){return new Wt(this.topLeft(),this.bottomLeft())},leftMiddle:function(){return new $t(this.x,this.y+this.height/2)},maxRectScaleToFit:function(e,t){var n,r,i,o,a,s,l,u;e=new sn(e),t||(t=e.center());var c=t.x,f=t.y;n=r=i=o=a=s=l=u=1/0;var h=e.topLeft();h.x<c&&(n=(this.x-c)/(h.x-c)),h.y<f&&(a=(this.y-f)/(h.y-f));var d=e.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=e.topRight();p.x>c&&(i=(this.x+this.width-c)/(p.x-c)),p.y<f&&(l=(this.y-f)/(p.y-f));var g=e.bottomLeft();return g.x<c&&(o=(this.x-c)/(g.x-c)),g.y>f&&(u=(this.y+this.height-f)/(g.y-f)),{sx:nn(n,r,i,o),sy:nn(a,s,l,u)}},maxRectUniformScaleToFit:function(e,t){var n=this.maxRectScaleToFit(e,t);return nn(n.sx,n.sy)},moveAndExpand:function(e){return this.x+=e.x||0,this.y+=e.y||0,this.width+=e.width||0,this.height+=e.height||0,this},normalize:function(){var e=this.x,t=this.y,n=this.width,r=this.height;return this.width<0&&(e=this.x+this.width,n=-this.width),this.height<0&&(t=this.y+this.height,r=-this.height),this.x=e,this.y=t,this.width=n,this.height=r,this},offset:function(e,t){return $t.prototype.offset.call(this,e,t)},origin:function(){return new $t(this.x,this.y)},pointNearestToPoint:function(e){if(e=new $t(e),this.containsPoint(e))switch(this.sideNearestToPoint(e)){case"right":return new $t(this.x+this.width,e.y);case"left":return new $t(this.x,e.y);case"bottom":return new $t(e.x,this.y+this.height);case"top":return new $t(e.x,this.y)}return e.adhereToRect(this)},rightLine:function(){return new Wt(this.topRight(),this.bottomRight())},rightMiddle:function(){return new $t(this.x+this.width,this.y+this.height/2)},round:function(e){let t=1;if(e)switch(e){case 1:t=10;break;case 2:t=100;break;case 3:t=1e3;break;default:t=an(10,e)}return this.x=on(this.x*t)/t,this.y=on(this.y*t)/t,this.width=on(this.width*t)/t,this.height=on(this.height*t)/t,this},scale:function(e,t,n){return n=this.origin().scale(e,t,n),this.x=n.x,this.y=n.y,this.width*=e,this.height*=t,this},sideNearestToPoint:function(e){var t=(e=new $t(e)).x-this.x,n=this.x+this.width-e.x,r=e.y-this.y,i=t,o="left";return n<i&&(i=n,o="right"),r<i&&(i=r,o="top"),this.y+this.height-e.y<i&&(o="bottom"),o},snapToGrid:function(e,t){var n=this.origin().snapToGrid(e,t),r=this.corner().snapToGrid(e,t);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 Wt(this.topLeft(),this.topRight())},topMiddle:function(){return new $t(this.x+this.width/2,this.y)},topRight:function(){return new $t(this.x+this.width,this.y)},toString:function(){return this.origin().toString()+" "+this.corner().toString()},union:function(e){return sn.fromRectUnion(this,e)},update:function(e,t,n,r){return Object(e)===e&&(t=e.y,n=e.width,r=e.height,e=e.x),this.x=e||0,this.y=t||0,this.width=n||0,this.height=r||0,this}},sn.prototype.bottomRight=sn.prototype.corner,sn.prototype.topLeft=sn.prototype.origin,sn.prototype.translate=sn.prototype.offset;const ln=sn;function un(e){if(""===(e=e.trim()))return[];const t=[],n=e.split(/\s*,\s*|\s+/),r=n.length;for(let e=0;e<r;e+=2)t.push({x:+n[e],y:+n[e+1]});return t}function cn(e){const t=e.length;if(0===t)return[];const n=[];for(let r=0;r<t;r++){const t=e[r].clone();n.push(t)}return n}function fn(e){const{abs:t}=Math;var n,r,i,o=e.length;if(0===o)return[];for(n=0;n<o;n++)(void 0===i||e[n].y<i.y||e[n].y===i.y&&e[n].x>i.x)&&(i=e[n]);var a=[];for(n=0;n<o;n++){var s=i.theta(e[n]);0===s&&(s=360);var l=[e[n],n,s];a.push(l)}if(a.sort(function(e,t){var n=e[2]-t[2];return 0===n&&(n=t[1]-e[1]),n}),a.length>2){var u=a[a.length-1];a.unshift(u)}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);t(x-180)<1e-10||d.equals(f)||g.equals(d)?(m[h[0]+"@@"+h[1]]=d,y.push(p)):t((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 k=-1;for(r=y.length,n=0;n<r;n++){var S=y[n][1];(void 0===v||S<v)&&(v=S,k=n)}var _=[];if(k>0){var E=y.slice(k),C=y.slice(0,k);_=E.concat(C)}else _=y;var A=[];for(r=_.length,n=0;n<r;n++)A.push(_[n][0]);return A}const hn=function(e){return this instanceof hn?"string"==typeof e?new hn.parse(e):void(this.points=Array.isArray(e)?e.map($t):[]):new hn(e)};hn.parse=function(e){return new hn(un(e))},hn.fromRect=function(e){return new hn([e.topLeft(),e.topRight(),e.bottomRight(),e.bottomLeft(),e.topLeft()])},hn.prototype={type:Nt.Polyline,bbox:function(){var e=1/0,t=-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],l=s.x,u=s.y;l<e&&(e=l),l>t&&(t=l),u<n&&(n=u),u>r&&(r=u)}return new sn(e,n,t-e,r-n)},clone:function(){return new hn(cn(this.points))},closestPoint:function(e){var t=this.closestPointLength(e);return this.pointAtLength(t)},closestPointLength:function(e){var t,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 l=new Wt(n[s],n[s+1]),u=l.length(),c=l.closestPointNormalizedLength(e),f=l.pointAt(c).squaredDistance(e);f<i&&(i=f,t=o+c*u),o+=u}return t},closestPointNormalizedLength:function(e){var t=this.closestPointLength(e);if(0===t)return 0;var n=this.length();return 0===n?0:t/n},closestPointTangent:function(e){var t=this.closestPointLength(e);return this.tangentAtLength(t)},containsPoint:function(e){var t=this.points,n=t.length;if(0===n)return!1;for(var r=e.x,i=e.y,o=n-1,a=0,s=0,l=new Wt,u=new Wt,c=new $t;a<n;a++){var f=t[o],h=t[a];if(e.equals(f))return!0;if(l.start=f,l.end=h,l.containsPoint(e))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,u.start=e,u.end=c,l.intersect(u)&&s++)}o=a}return s%2==1},close:function(){const{start:e,end:t,points:n}=this;return e&&t&&!e.equals(t)&&n.push(e.clone()),this},lengthPoints:function(){return this.points},convexHull:function(){return new hn(fn(this.points))},equals:function(e){if(!e)return!1;var t=this.points,n=e.points,r=t.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=t[i],a=e.points[i];if(!o.equals(a))return!1}return!0},intersectionWithLine:function(e){for(var t=new Wt(e),n=[],r=this.lengthPoints(),i=new Wt,o=0,a=r.length-1;o<a;o++){i.start=r[o],i.end=r[o+1];var s=t.intersectionWithLine(i);s&&n.push(s[0])}return n.length>0?n:null},isDifferentiable:function(){var e=this.points,t=e.length;if(0===t)return!1;for(var n=new Wt,r=t-1,i=0;i<r;i++)if(n.start=e[i],n.end=e[i+1],n.isDifferentiable())return!0;return!1},length:function(){var e=this.lengthPoints(),t=e.length;if(0===t)return 0;for(var n=0,r=t-1,i=0;i<r;i++)n+=e[i].distance(e[i+1]);return n},pointAt:function(e){var t=this.lengthPoints(),n=t.length;if(0===n)return null;if(1===n)return t[0].clone();if(e<=0)return t[0].clone();if(e>=1)return t[n-1].clone();var r=this.length()*e;return this.pointAtLength(r)},pointAtLength:function(e){var t=this.lengthPoints(),n=t.length;if(0===n)return null;if(1===n)return t[0].clone();var r=!0;e<0&&(r=!1,e=-e);for(var i=0,o=n-1,a=0;a<o;a++){var s=r?a:o-1-a,l=t[s],u=t[s+1],c=new Wt(l,u),f=l.distance(u);if(e<=i+f)return c.pointAtLength((r?1:-1)*(e-i));i+=f}return(r?t[n-1]:t[0]).clone()},round:function(e){for(var t=this.points,n=t.length,r=0;r<n;r++)t[r].round(e);return this},scale:function(e,t,n){for(var r=this.points,i=r.length,o=0;o<i;o++)r[o].scale(e,t,n);return this},simplify:function(e={}){const t=this.points;if(t.length<3)return this;const n=e.threshold||0;let r=0;for(;t[r+2];){const e=r+1,i=r+2,o=t[r],a=t[e],s=t[i];new Wt(o,s).closestPoint(a).distance(a)<=n?t.splice(e,1):r+=1}return this},tangentAt:function(e){var t=this.lengthPoints().length;if(0===t)return null;if(1===t)return null;e<0&&(e=0),e>1&&(e=1);var n=this.length()*e;return this.tangentAtLength(n)},tangentAtLength:function(e){var t=this.lengthPoints(),n=t.length;if(0===n)return null;if(1===n)return null;var r,i=!0;e<0&&(i=!1,e=-e);for(var o=0,a=n-1,s=0;s<a;s++){var l=i?s:a-1-s,u=t[l],c=t[l+1],f=new Wt(u,c),h=u.distance(c);if(f.isDifferentiable()){if(e<=o+h)return f.tangentAtLength((i?1:-1)*(e-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(e,t){for(var n=this.points,r=n.length,i=0;i<r;i++)n[i].translate(e,t);return this},serialize:function(){var e=this.points,t=e.length;if(0===t)return"";for(var n="",r=0;r<t;r++){var i=e[r];n+=i.x+","+i.y+" "}return n.trim()}},Object.defineProperty(hn.prototype,"start",{configurable:!0,enumerable:!0,get:function(){return 0===this.points.length?null:this.points[0]}}),Object.defineProperty(hn.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var e=this.points.length;return 0===e?null:this.points[e-1]}});const{abs:dn,sqrt:pn,min:gn,max:vn,pow:mn}=Math,yn=function(e,t,n,r){return this instanceof yn?e instanceof yn?new yn(e.start,e.controlPoint1,e.controlPoint2,e.end):(this.start=new $t(e),this.controlPoint1=new $t(t),this.controlPoint2=new $t(n),void(this.end=new $t(r))):new yn(e,t,n,r)};function bn(e){var t,n,r=[];for(n=arguments.length,t=1;t<n;t++)r.push(arguments[t]);if(!e)throw new Error("Missing a parent object.");var i=Object.create(e);for(n=r.length,t=0;t<n;t++){var o,a,s=r[t];for(a in s)s.hasOwnProperty(a)&&(delete i[a],o=Object.getOwnPropertyDescriptor(s,a),Object.defineProperty(i,a,o))}return i}yn.throughPoints=function(){function e(e){var t=e.length,n=[],r=[],i=2;n[0]=e[0]/i;for(var o=1;o<t;o++)r[o]=1/i,i=(o<t-1?4:3.5)-r[o],n[o]=(e[o]-n[o-1])/i;for(o=1;o<t;o++)n[t-o-1]-=r[t-o]*n[t-o];return n}return function(t){if(!t||Array.isArray(t)&&t.length<2)throw new Error("At least 2 points are required");for(var n=function(t){var n,r=[],i=[],o=t.length-1;if(1==o)return r[0]=new $t((2*t[0].x+t[1].x)/3,(2*t[0].y+t[1].y)/3),i[0]=new $t(2*r[0].x-t[0].x,2*r[0].y-t[0].y),[r,i];var a=[];for(n=1;n<o-1;n++)a[n]=4*t[n].x+2*t[n+1].x;a[0]=t[0].x+2*t[1].x,a[o-1]=(8*t[o-1].x+t[o].x)/2;var s=e(a);for(n=1;n<o-1;++n)a[n]=4*t[n].y+2*t[n+1].y;a[0]=t[0].y+2*t[1].y,a[o-1]=(8*t[o-1].y+t[o].y)/2;var l=e(a);for(n=0;n<o;n++)r.push(new $t(s[n],l[n])),n<o-1?i.push(new $t(2*t[n+1].x-s[n+1],2*t[n+1].y-l[n+1])):i.push(new $t((t[o].x+s[o-1])/2,(t[o].y+l[o-1])/2));return[r,i]}(t),r=[],i=n[0].length,o=0;o<i;o++){var a=new $t(n[0][o].x,n[0][o].y),s=new $t(n[1][o].x,n[1][o].y);r.push(new yn(t[o],a,s,t[o+1]))}return r}}(),yn.prototype={type:Nt.Curve,bbox:function(){for(var e,t,n,r,i,o,a,s,l=this.start,u=this.controlPoint1,c=this.controlPoint2,f=this.end,h=l.x,d=l.y,p=u.x,g=u.y,v=c.x,m=c.y,y=f.x,b=f.y,w=new Array,x=new Array,k=[new Array,new Array],S=0;S<2;++S)if(0===S?(t=6*h-12*p+6*v,e=-3*h+9*p-9*v+3*y,n=3*p-3*h):(t=6*d-12*g+6*m,e=-3*d+9*g-9*m+3*b,n=3*g-3*d),dn(e)<1e-12){if(dn(t)<1e-12)continue;0<(r=-n/t)&&r<1&&x.push(r)}else s=pn(a=t*t-4*n*e),a<0||(0<(i=(-t+s)/(2*e))&&i<1&&x.push(i),0<(o=(-t-s)/(2*e))&&o<1&&x.push(o));for(var _,E,C,A=x.length,P=A;A--;)E=(_=1-(r=x[A]))*_*_*h+3*_*_*r*p+3*_*r*r*v+r*r*r*y,k[0][A]=E,C=_*_*_*d+3*_*_*r*g+3*_*r*r*m+r*r*r*b,k[1][A]=C,w[A]={X:E,Y:C};x[P]=0,x[P+1]=1,w[P]={X:h,Y:d},w[P+1]={X:y,Y:b},k[0][P]=h,k[1][P]=d,k[0][P+1]=y,k[1][P+1]=b,x.length=P+2,k[0].length=P+2,k[1].length=P+2,w.length=P+2;var L=gn.apply(null,k[0]),T=gn.apply(null,k[1]),N=vn.apply(null,k[0]),O=vn.apply(null,k[1]);return new sn(L,T,N-L,O-T)},clone:function(){return new yn(this.start,this.controlPoint1,this.controlPoint2,this.end)},closestPoint:function(e,t){return this.pointAtT(this.closestPointT(e,t))},closestPointLength:function(e,t){var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,subdivisions:void 0===t.subdivisions?this.getSubdivisions({precision:n}):t.subdivisions};return this.lengthAtT(this.closestPointT(e,r),r)},closestPointNormalizedLength:function(e,t){var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,subdivisions:void 0===t.subdivisions?this.getSubdivisions({precision:n}):t.subdivisions},i=this.closestPointLength(e,r);if(!i)return 0;var o=this.length(r);return 0===o?0:i/o},closestPointT:function(e,t){for(var n,r,i,o,a,s,l,u=void 0===(t=t||{}).precision?this.PRECISION:t.precision,c=void 0===t.subdivisions?this.getSubdivisions({precision:u}):t.subdivisions,f=c.length,h=f?1/f:0,d=0;d<f;d++){var p=c[d],g=p.start.distance(e),v=p.end.distance(e),m=g+v;(!l||m<l)&&(n=p,r=d*h,i=(d+1)*h,o=g,a=v,s=p.start.distance(p.end),l=m)}for(var y=mn(10,-u);;){var b=o?dn(o-a)/o:0,w=a?dn(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 k=x[0].start.distance(e),S=x[0].end.distance(e),_=k+S,E=x[1].start.distance(e),C=x[1].end.distance(e);_<=E+C?(n=x[0],i-=h,o=k,a=S):(n=x[1],r+=h,o=E,a=C)}},closestPointTangent:function(e,t){return this.tangentAtT(this.closestPointT(e,t))},containsPoint:function(e,t){return this.toPolyline(t).containsPoint(e)},divideAt:function(e,t){if(e<=0)return this.divideAtT(0);if(e>=1)return this.divideAtT(1);var n=this.tAt(e,t);return this.divideAtT(n)},divideAtLength:function(e,t){var n=this.tAtLength(e,t);return this.divideAtT(n)},divideAtT:function(e){var t=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return[new yn(t,t,t,t),new yn(t,n,r,i)];if(e>=1)return[new yn(t,n,r,i),new yn(i,i,i,i)];var o=this.getSkeletonPoints(e),a=o.startControlPoint1,s=o.startControlPoint2,l=o.divider,u=o.dividerControlPoint1,c=o.dividerControlPoint2;return[new yn(t,a,s,l),new yn(l,u,c,i)]},endpointDistance:function(){return this.start.distance(this.end)},equals:function(e){return!!e&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.controlPoint1.x===e.controlPoint1.x&&this.controlPoint1.y===e.controlPoint1.y&&this.controlPoint2.x===e.controlPoint2.x&&this.controlPoint2.y===e.controlPoint2.y&&this.end.x===e.end.x&&this.end.y===e.end.y},getSkeletonPoints:function(e){var t=this.start,n=this.controlPoint1,r=this.controlPoint2,i=this.end;if(e<=0)return{startControlPoint1:t.clone(),startControlPoint2:t.clone(),divider:t.clone(),dividerControlPoint1:n.clone(),dividerControlPoint2:r.clone()};if(e>=1)return{startControlPoint1:n.clone(),startControlPoint2:r.clone(),divider:i.clone(),dividerControlPoint1:i.clone(),dividerControlPoint2:i.clone()};var o=new Wt(t,n).pointAt(e),a=new Wt(n,r).pointAt(e),s=new Wt(r,i).pointAt(e),l=new Wt(o,a).pointAt(e),u=new Wt(a,s).pointAt(e);return{startControlPoint1:o,startControlPoint2:l,divider:new Wt(l,u).pointAt(e),dividerControlPoint1:u,dividerControlPoint2:s}},getSubdivisions:function(e){var t=void 0===(e=e||{}).precision?this.PRECISION:e.precision,n=[new yn(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(0===t)return n;for(var r=this.endpointDistance(),i=mn(10,-t),o=0;;){o+=1;for(var a=[],s=n.length,l=0;l<s;l++){var u=n[l].divide(.5);a.push(u[0],u[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 e=this.start,t=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(n)&&n.equals(r))},length:function(e){for(var t=void 0===(e=e||{}).precision?this.PRECISION:e.precision,n=void 0===e.subdivisions?this.getSubdivisions({precision:t}):e.subdivisions,r=0,i=n.length,o=0;o<i;o++)r+=n[o].endpointDistance();return r},lengthAtT:function(e,t){if(e<=0)return 0;var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision;return this.divide(e)[0].length({precision:n})},pointAt:function(e,t){if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();var n=this.tAt(e,t);return this.pointAtT(n)},pointAtLength:function(e,t){var n=this.tAtLength(e,t);return this.pointAtT(n)},pointAtT:function(e){return e<=0?this.start.clone():e>=1?this.end.clone():this.getSkeletonPoints(e).divider},PRECISION:3,round:function(e){return this.start.round(e),this.controlPoint1.round(e),this.controlPoint2.round(e),this.end.round(e),this},scale:function(e,t,n){return this.start.scale(e,t,n),this.controlPoint1.scale(e,t,n),this.controlPoint2.scale(e,t,n),this.end.scale(e,t,n),this},tangentAt:function(e,t){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);var n=this.tAt(e,t);return this.tangentAtT(n)},tangentAtLength:function(e,t){if(!this.isDifferentiable())return null;var n=this.tAtLength(e,t);return this.tangentAtT(n)},tangentAtT:function(e){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);var t=this.getSkeletonPoints(e),n=t.startControlPoint2,r=t.dividerControlPoint1,i=t.divider,o=new Wt(n,r);return o.translate(i.x-n.x,i.y-n.y),o},tAt:function(e,t){if(e<=0)return 0;if(e>=1)return 1;var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,subdivisions:void 0===t.subdivisions?this.getSubdivisions({precision:n}):t.subdivisions},i=this.length(r)*e;return this.tAtLength(i,r)},tAtLength:function(e,t){var n=!0;e<0&&(n=!1,e=-e);for(var r,i,o,a,s,l=void 0===(t=t||{}).precision?this.PRECISION:t.precision,u=void 0===t.subdivisions?this.getSubdivisions({precision:l}):t.subdivisions,c={precision:l,subdivisions:u},f=0,h=u.length,d=1/h,p=0;p<h;p++){var g=n?p:h-1-p,v=u[p],m=v.endpointDistance();if(e<=f+m){r=v,i=g*d,o=(g+1)*d,a=n?e-f:m+f-e,s=n?m+f-e:e-f;break}f+=m}if(!r)return n?1:0;for(var y=this.length(c),b=mn(10,-l);;){var w,x;if((0!==y?a/y:0)<b)return i;if((0!==y?s/y:0)<b)return o;var k=r.divide(.5);d/=2;var S=k[0].endpointDistance(),_=k[1].endpointDistance();a<=S?(r=k[0],o-=d,x=S-(w=a)):(r=k[1],i+=d,x=_-(w=a-S)),a=w,s=x}},toPoints:function(e){for(var t=void 0===(e=e||{}).precision?this.PRECISION:e.precision,n=void 0===e.subdivisions?this.getSubdivisions({precision:t}):e.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(e){return new hn(this.toPoints(e))},toString:function(){return this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(e,t){return this.start.translate(e,t),this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t),this}},yn.prototype.divide=yn.prototype.divideAtT;const wn=function(e){if(!(this instanceof wn))return new wn(e);if("string"==typeof e)return new wn.parse(e);var t,n;if(this.segments=[],e)if(Array.isArray(e)&&0!==e.length)if(n=(e=e.reduce(function(e,t){return e.concat(t)},[])).length,e[0].isSegment)for(t=0;t<n;t++){var r=e[t];this.appendSegment(r)}else{var i=null;for(t=0;t<n;t++){var o=e[t];if(!(o instanceof Wt||o instanceof yn))throw new Error("Cannot construct a path segment from the provided object.");0===t&&this.appendSegment(wn.createSegment("M",o.start)),i&&!i.end.equals(o.start)&&this.appendSegment(wn.createSegment("M",o.start)),o instanceof Wt?this.appendSegment(wn.createSegment("L",o.end)):o instanceof yn&&this.appendSegment(wn.createSegment("C",o.controlPoint1,o.controlPoint2,o.end)),i=o}}else if(e.isSegment)this.appendSegment(e);else if(e instanceof Wt)this.appendSegment(wn.createSegment("M",e.start)),this.appendSegment(wn.createSegment("L",e.end));else if(e instanceof yn)this.appendSegment(wn.createSegment("M",e.start)),this.appendSegment(wn.createSegment("C",e.controlPoint1,e.controlPoint2,e.end));else{if(!(e instanceof hn))throw new Error("Cannot construct a path from the provided object.");if(!e.points||0===e.points.length)return;for(n=e.points.length,t=0;t<n;t++){var a=e.points[t];0===t?this.appendSegment(wn.createSegment("M",a)):this.appendSegment(wn.createSegment("L",a))}}};function xn(e,t){return t.unshift(null),new(Function.prototype.bind.apply(e,t))}wn.parse=function(e){if(!e)return new wn;for(var t=new wn,n=e.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=wn.createSegment.apply(this,o);t.appendSegment(a)}return t},wn.createSegment=function(e){if(!e)throw new Error("Type must be provided.");var t=wn.segmentTypes[e];if(!t)throw new Error(e+" is not a recognized path segment type.");for(var n=[],r=arguments.length,i=1;i<r;i++)n.push(arguments[i]);return xn(t,n)},wn.prototype={type:Nt.Path,appendSegment:function(e){var t,n=this.segments,r=n.length,i=0!==r?n[r-1]:null;if(Array.isArray(e)){if(!(e=e.reduce(function(e,t){return e.concat(t)},[]))[0].isSegment)throw new Error("Segments required.");for(var o=e.length,a=0;a<o;a++){var s=e[a];t=this.prepareSegment(s,i,null),n.push(t),i=t}}else{if(!e||!e.isSegment)throw new Error("Segment required.");t=this.prepareSegment(e,i,null),n.push(t)}},bbox:function(){var e,t=this.segments,n=t.length;if(0===n)return null;for(var r=0;r<n;r++){var i=t[r];if(i.isVisible){var o=i.bbox();e=e?e.union(o):o}}if(e)return e;var a=t[n-1];return new sn(a.end.x,a.end.y,0,0)},clone:function(){for(var e=this.segments,t=e.length,n=new wn,r=0;r<t;r++){var i=e[r].clone();n.appendSegment(i)}return n},closestPoint:function(e,t){var n=this.closestPointT(e,t);return n?this.pointAtT(n):null},closestPointLength:function(e,t){var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.closestPointT(e,r);return i?this.lengthAtT(i,r):0},closestPointNormalizedLength:function(e,t){var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.closestPointLength(e,r);if(0===i)return 0;var o=this.length(r);return 0===o?0:i/o},closestPointT:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;for(var i,o=void 0===(t=t||{}).precision?this.PRECISION:t.precision,a=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,s=1/0,l=0;l<r;l++){var u=n[l],c=a[l];if(u.isVisible){var f=u.closestPointT(e,{precision:o,subdivisions:c}),h=u.pointAtT(f),d=new Wt(h,e).squaredLength();d<s&&(i={segmentIndex:l,value:f},s=d)}}return i||{segmentIndex:r-1,value:1}},closestPointTangent:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;for(var i,o=void 0===(t=t||{}).precision?this.PRECISION:t.precision,a=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,s=1/0,l=0;l<r;l++){var u=n[l],c=a[l];if(u.isDifferentiable()){var f=u.closestPointT(e,{precision:o,subdivisions:c}),h=u.pointAtT(f),d=new Wt(h,e).squaredLength();d<s&&(i=u.tangentAtT(f),s=d)}}return i||null},containsPoint:function(e,t){var n=this.toPolylines(t);if(!n)return!1;for(var r=n.length,i=0,o=0;o<r;o++)n[o].containsPoint(e)&&i++;return i%2==1},divideAt:function(e,t){if(0===this.segments.length)return null;e<0&&(e=0),e>1&&(e=1);var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.length(r)*e;return this.divideAtLength(i,r)},divideAtLength:function(e,t){var n=this.segments.length;if(0===n)return null;var r=!0;e<0&&(r=!1,e=-e);var i,o,a,s,l,u,c,f=void 0===(t=t||{}).precision?this.PRECISION:t.precision,h=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:f}):t.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()&&(l=o,u=p,e<=d+v)){s=p,a=o.divideAtLength((r?1:-1)*(e-d),{precision:f,subdivisions:g});break}d+=v}if(!l)return null;a||(s=u,c=r?1:0,a=l.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,wn.createSegment("M",x)),w+=1,a[1].isDifferentiable()||(m.removeSegment(w-1),w-=1);var k=w-y-1;for(i=w;i<m.segments.length;i++){var S=this.getSegment(i-k);if("Z"===(o=m.getSegment(i)).type&&!S.subpathStartSegment.end.equals(o.subpathStartSegment.end)){var _=wn.createSegment("L",S.end);m.replaceSegment(i,_)}}return[new wn(m.segments.slice(0,b)),new wn(m.segments.slice(b))]},equals:function(e){if(!e)return!1;var t=this.segments,n=e.segments,r=t.length;if(n.length!==r)return!1;for(var i=0;i<r;i++){var o=t[i],a=n[i];if(o.type!==a.type||!o.equals(a))return!1}return!0},getSegment:function(e){var t=this.segments,n=t.length;if(0===n)throw new Error("Path has no segments.");if(e<0&&(e=n+e),e>=n||e<0)throw new Error("Index out of range.");return t[e]},getSegmentSubdivisions:function(e){for(var t=this.segments,n=t.length,r=void 0===(e=e||{}).precision?this.PRECISION:e.precision,i=[],o=0;o<n;o++){var a=t[o].getSubdivisions({precision:r});i.push(a)}return i},getSubpaths:function(){const e=this.clone().validate().segments,t=e.length,n=[];for(let r=0;r<t;r++){const t=e[r];t.isSubpathStart?n.push(new wn(t)):n[n.length-1].appendSegment(t)}return n},insertSegment:function(e,t){var n,r=this.segments,i=r.length;if(e<0&&(e=i+e+1),e>i||e<0)throw new Error("Index out of range.");var o=null,a=null;if(0!==i&&(a=e>=1?(o=r[e-1]).nextSegment:r[0]),Array.isArray(t)){if(!(t=t.reduce(function(e,t){return e.concat(t)},[]))[0].isSegment)throw new Error("Segments required.");for(var s=t.length,l=0;l<s;l++){var u=t[l];n=this.prepareSegment(u,o,a),r.splice(e+l,0,n),o=n}}else{if(!t||!t.isSegment)throw new Error("Segment required.");n=this.prepareSegment(t,o,a),r.splice(e,0,n)}},intersectionWithLine:function(e,t){var n=null,r=this.toPolylines(t);if(!r)return null;for(var i=0,o=r.length;i<o;i++){var a=r[i],s=e.intersect(a);s&&(n||(n=[]),Array.isArray(s)?Array.prototype.push.apply(n,s):n.push(s))}return n},isDifferentiable:function(){for(var e=this.segments,t=e.length,n=0;n<t;n++)if(e[n].isDifferentiable())return!0;return!1},isValid:function(){var e=this.segments;return 0===e.length||"M"===e[0].type},length:function(e){var t=this.segments,n=t.length;if(0===n)return 0;for(var r=void 0===(e=e||{}).precision?this.PRECISION:e.precision,i=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:r}):e.segmentSubdivisions,o=0,a=0;a<n;a++){var s=t[a],l=i[a];o+=s.length({subdivisions:l})}return o},lengthAtT:function(e,t){var n=this.segments,r=n.length;if(0===r)return 0;var i=e.segmentIndex;if(i<0)return 0;var o=e.value;i>=r?(i=r-1,o=1):o<0?o=0:o>1&&(o=1);for(var a,s=void 0===(t=t||{}).precision?this.PRECISION:t.precision,l=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:s}):t.segmentSubdivisions,u=0,c=0;c<i;c++){var f=n[c];a=l[c],u+=f.length({precisison:s,subdivisions:a})}return f=n[i],a=l[i],u+f.lengthAtT(o,{precisison:s,subdivisions:a})},pointAt:function(e,t){if(0===this.segments.length)return null;if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.length(r)*e;return this.pointAtLength(i,r)},pointAtLength:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;if(0===e)return this.start.clone();var i=!0;e<0&&(i=!1,e=-e);for(var o,a=void 0===(t=t||{}).precision?this.PRECISION:t.precision,s=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:a}):t.segmentSubdivisions,l=0,u=0;u<r;u++){var c=i?u:r-1-u,f=n[c],h=s[c],d=f.length({precision:a,subdivisions:h});if(f.isVisible){if(e<=l+d)return f.pointAtLength((i?1:-1)*(e-l),{precision:a,subdivisions:h});o=f}l+=d}return o?i?o.end:o.start:n[r-1].end.clone()},pointAtT:function(e){var t=this.segments,n=t.length;if(0===n)return null;var r=e.segmentIndex;if(r<0)return t[0].pointAtT(0);if(r>=n)return t[n-1].pointAtT(1);var i=e.value;return i<0?i=0:i>1&&(i=1),t[r].pointAtT(i)},PRECISION:3,prepareSegment:function(e,t,n){e.previousSegment=t,e.nextSegment=n,t&&(t.nextSegment=e),n&&(n.previousSegment=e);var r=e;return e.isSubpathStart&&(e.subpathStartSegment=e,r=n),r&&this.updateSubpathStartSegment(r),e},removeSegment:function(e){var t=this.segments,n=t.length;if(0===n)throw new Error("Path has no segments.");if(e<0&&(e=n+e),e>=n||e<0)throw new Error("Index out of range.");var r=t.splice(e,1)[0],i=r.previousSegment,o=r.nextSegment;i&&(i.nextSegment=o),o&&(o.previousSegment=i),r.isSubpathStart&&o&&this.updateSubpathStartSegment(o)},replaceSegment:function(e,t){var n,r=this.segments,i=r.length;if(0===i)throw new Error("Path has no segments.");if(e<0&&(e=i+e),e>=i||e<0)throw new Error("Index out of range.");var o=r[e],a=o.previousSegment,s=o.nextSegment,l=o.isSubpathStart;if(Array.isArray(t)){if(!(t=t.reduce(function(e,t){return e.concat(t)},[]))[0].isSegment)throw new Error("Segments required.");r.splice(e,1);for(var u=t.length,c=0;c<u;c++){var f=t[c];n=this.prepareSegment(f,a,s),r.splice(e+c,0,n),a=n,l&&n.isSubpathStart&&(l=!1)}}else{if(!t||!t.isSegment)throw new Error("Segment required.");n=this.prepareSegment(t,a,s),r.splice(e,1,n),l&&n.isSubpathStart&&(l=!1)}l&&s&&this.updateSubpathStartSegment(s)},round:function(e){for(var t=this.segments,n=t.length,r=0;r<n;r++)t[r].round(e);return this},scale:function(e,t,n){for(var r=this.segments,i=r.length,o=0;o<i;o++)r[o].scale(e,t,n);return this},segmentAt:function(e,t){var n=this.segmentIndexAt(e,t);return n?this.getSegment(n):null},segmentAtLength:function(e,t){var n=this.segmentIndexAtLength(e,t);return n?this.getSegment(n):null},segmentIndexAt:function(e,t){if(0===this.segments.length)return null;e<0&&(e=0),e>1&&(e=1);var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.length(r)*e;return this.segmentIndexAtLength(i,r)},segmentIndexAtLength:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;var i=!0;e<0&&(i=!1,e=-e);for(var o=void 0===(t=t||{}).precision?this.PRECISION:t.precision,a=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:o}):t.segmentSubdivisions,s=null,l=0,u=0;u<r;u++){var c=i?u:r-1-u,f=n[c],h=a[c],d=f.length({precision:o,subdivisions:h});if(f.isVisible){if(e<=l+d)return c;s=c}l+=d}return s},serialize:function(){if(!this.isValid())throw new Error("Invalid path segments.");return this.toString()},tangentAt:function(e,t){if(0===this.segments.length)return null;e<0&&(e=0),e>1&&(e=1);var n=void 0===(t=t||{}).precision?this.PRECISION:t.precision,r={precision:n,segmentSubdivisions:void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:n}):t.segmentSubdivisions},i=this.length(r)*e;return this.tangentAtLength(i,r)},tangentAtLength:function(e,t){var n=this.segments,r=n.length;if(0===r)return null;var i=!0;e<0&&(i=!1,e=-e);for(var o,a=void 0===(t=t||{}).precision?this.PRECISION:t.precision,s=void 0===t.segmentSubdivisions?this.getSegmentSubdivisions({precision:a}):t.segmentSubdivisions,l=0,u=0;u<r;u++){var c=i?u:r-1-u,f=n[c],h=s[c],d=f.length({precision:a,subdivisions:h});if(f.isDifferentiable()){if(e<=l+d)return f.tangentAtLength((i?1:-1)*(e-l),{precision:a,subdivisions:h});o=f}l+=d}if(o){var p=i?1:0;return o.tangentAtT(p)}return null},tangentAtT:function(e){var t=this.segments,n=t.length;if(0===n)return null;var r=e.segmentIndex;if(r<0)return t[0].tangentAtT(0);if(r>=n)return t[n-1].tangentAtT(1);var i=e.value;return i<0?i=0:i>1&&(i=1),t[r].tangentAtT(i)},toPoints:function(e){var t=this.segments,n=t.length;if(0===n)return null;for(var r=void 0===(e=e||{}).precision?this.PRECISION:e.precision,i=void 0===e.segmentSubdivisions?this.getSegmentSubdivisions({precision:r}):e.segmentSubdivisions,o=[],a=[],s=0;s<n;s++){var l=t[s];if(l.isVisible){var u=i[s];if(u.length>0){var c=u.map(function(e){return e.start});Array.prototype.push.apply(a,c)}else a.push(l.start)}else a.length>0&&(a.push(t[s-1].end),o.push(a),a=[])}return a.length>0&&(a.push(this.end),o.push(a)),o},toPolylines:function(e){var t=[],n=this.toPoints(e);if(!n)return null;for(var r=0,i=n.length;r<i;r++)t.push(new hn(n[r]));return t},toString:function(){for(var e=this.segments,t=e.length,n="",r=0;r<t;r++)n+=e[r].serialize()+" ";return n.trim()},translate:function(e,t){for(var n=this.segments,r=n.length,i=0;i<r;i++)n[i].translate(e,t);return this},updateSubpathStartSegment:function(e){for(var t=e.previousSegment;e&&!e.isSubpathStart;)e.subpathStartSegment=t?t.subpathStartSegment:null,t=e,e=e.nextSegment},validate:function(){return this.isValid()||this.insertSegment(0,wn.createSegment("M",0,0)),this}},Object.defineProperty(wn.prototype,"start",{configurable:!0,enumerable:!0,get:function(){var e=this.segments,t=e.length;if(0===t)return null;for(var n=0;n<t;n++){var r=e[n];if(r.isVisible)return r.start}return e[t-1].end}}),Object.defineProperty(wn.prototype,"end",{configurable:!0,enumerable:!0,get:function(){var e=this.segments,t=e.length;if(0===t)return null;for(var n=t-1;n>=0;n--){var r=e[n];if(r.isVisible)return r.end}return e[t-1].end}});var kn={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(e){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(e);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(e){if(this.divideAt)return this.divideAt(e);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(e){if(e<=0)return 0;var t=this.length();return e>=1?t:t*e},nextSegment:null,pointAt:function(){throw new Error("Declaration missing for virtual function.")},pointAtLength:function(){throw new Error("Declaration missing for virtual function.")},pointAtT:function(e){if(this.pointAt)return this.pointAt(e);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(e){if(this.tangentAt)return this.tangentAt(e);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(kn,"end",{configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(kn,"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(kn,"type",{configurable:!0,enumerable:!0,get:function(){throw new Error("Bad segment declaration. No type specified.")}});var Sn=function(){for(var e,t,n=[],r=arguments.length,i=0;i<r;i++)n.push(arguments[i]);if(!(this instanceof Sn))return xn(Sn,n);if(0===r)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates (none provided).");if(n[0]instanceof Wt){if(1===r)return this.end=n[0].end.clone(),this;throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+r+" lines provided).")}if("string"==typeof n[0]||"number"==typeof n[0]){if(2===r)return this.end=new $t(+n[0],+n[1]),this;if(r<2)throw new Error("Lineto constructor expects a line, 1 point, or 2 coordinates ("+r+" coordinates provided).");var o;for(e=[],i=0;i<r;i+=2)o=n.slice(i,i+2),e.push(xn(Sn,o));return e}if(1===r)return this.end=new $t(n[0]),this;for(e=[],i=0;i<r;i+=1)t=n[i],e.push(new Sn(t));return e},_n={clone:function(){return new Sn(this.end)},divideAt:function(e){var t=new Wt(this.start,this.end).divideAt(e);return[new Sn(t[0]),new Sn(t[1])]},divideAtLength:function(e){var t=new Wt(this.start,this.end).divideAtLength(e);return[new Sn(t[0]),new Sn(t[1])]},getSubdivisions:function(){return[]},isDifferentiable:function(){return!!this.previousSegment&&!this.start.equals(this.end)},round:function(e){return this.end.round(e),this},scale:function(e,t,n){return this.end.scale(e,t,n),this},serialize:function(){var e=this.end;return this.type+" "+e.x+" "+e.y},toString:function(){return this.type+" "+this.start+" "+this.end},translate:function(e,t){return this.end.translate(e,t),this}};Object.defineProperty(_n,"type",{configurable:!0,enumerable:!0,value:"L"}),Sn.prototype=bn(kn,Wt.prototype,_n);var En=function(){for(var e,t,n=[],r=arguments.length,i=0;i<r;i++)n.push(arguments[i]);if(!(this instanceof En))return xn(En,n);if(0===r)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates (none provided).");if(n[0]instanceof yn){if(1===r)return this.controlPoint1=n[0].controlPoint1.clone(),this.controlPoint2=n[0].controlPoint2.clone(),this.end=n[0].end.clone(),this;throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+r+" curves provided).")}if("string"==typeof n[0]||"number"==typeof n[0]){if(6===r)return this.controlPoint1=new $t(+n[0],+n[1]),this.controlPoint2=new $t(+n[2],+n[3]),this.end=new $t(+n[4],+n[5]),this;if(r<6)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+r+" coordinates provided).");var o;for(e=[],i=0;i<r;i+=6)o=n.slice(i,i+6),e.push(xn(En,o));return e}if(3===r)return this.controlPoint1=new $t(n[0]),this.controlPoint2=new $t(n[1]),this.end=new $t(n[2]),this;if(r<3)throw new Error("Curveto constructor expects a curve, 3 points, or 6 coordinates ("+r+" points provided).");for(e=[],i=0;i<r;i+=3)t=n.slice(i,i+3),e.push(xn(En,t));return e},Cn={clone:function(){return new En(this.controlPoint1,this.controlPoint2,this.end)},divideAt:function(e,t){var n=new yn(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAt(e,t);return[new En(n[0]),new En(n[1])]},divideAtLength:function(e,t){var n=new yn(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAtLength(e,t);return[new En(n[0]),new En(n[1])]},divideAtT:function(e){var t=new yn(this.start,this.controlPoint1,this.controlPoint2,this.end).divideAtT(e);return[new En(t[0]),new En(t[1])]},isDifferentiable:function(){if(!this.previousSegment)return!1;var e=this.start,t=this.controlPoint1,n=this.controlPoint2,r=this.end;return!(e.equals(t)&&t.equals(n)&&n.equals(r))},round:function(e){return this.controlPoint1.round(e),this.controlPoint2.round(e),this.end.round(e),this},scale:function(e,t,n){return this.controlPoint1.scale(e,t,n),this.controlPoint2.scale(e,t,n),this.end.scale(e,t,n),this},serialize:function(){var e=this.controlPoint1,t=this.controlPoint2,n=this.end;return this.type+" "+e.x+" "+e.y+" "+t.x+" "+t.y+" "+n.x+" "+n.y},toString:function(){return this.type+" "+this.start+" "+this.controlPoint1+" "+this.controlPoint2+" "+this.end},translate:function(e,t){return this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t),this}};Object.defineProperty(Cn,"type",{configurable:!0,enumerable:!0,value:"C"}),En.prototype=bn(kn,yn.prototype,Cn);var An=function(){for(var e,t,n=[],r=arguments.length,i=0;i<r;i++)n.push(arguments[i]);if(!(this instanceof An))return xn(An,n);if(0===r)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates (none provided).");if(n[0]instanceof Wt){if(1===r)return this.end=n[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+r+" lines provided).")}if(n[0]instanceof yn){if(1===r)return this.end=n[0].end.clone(),this;throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+r+" curves provided).")}if("string"==typeof n[0]||"number"==typeof n[0]){if(2===r)return this.end=new $t(+n[0],+n[1]),this;if(r<2)throw new Error("Moveto constructor expects a line, a curve, 1 point, or 2 coordinates ("+r+" coordinates provided).");var o;for(e=[],i=0;i<r;i+=2)o=n.slice(i,i+2),0===i?e.push(xn(An,o)):e.push(xn(Sn,o));return e}if(1===r)return this.end=new $t(n[0]),this;for(e=[],i=0;i<r;i+=1)t=n[i],0===i?e.push(new An(t)):e.push(new Sn(t));return e},Pn={bbox:function(){return null},clone:function(){return new An(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(e){return this.end.equals(e.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(e){return this.end.round(e),this},scale:function(e,t,n){return this.end.scale(e,t,n),this},serialize:function(){var e=this.end;return this.type+" "+e.x+" "+e.y},tangentAt:function(){return null},tangentAtLength:function(){return null},tangentAtT:function(){return null},toString:function(){return this.type+" "+this.end},translate:function(e,t){return this.end.translate(e,t),this}};Object.defineProperty(Pn,"start",{configurable:!0,enumerable:!0,get:function(){throw new Error("Illegal access. Moveto segments should not need a start property.")}}),Object.defineProperty(Pn,"type",{configurable:!0,enumerable:!0,value:"M"}),An.prototype=bn(kn,Pn);var Ln=function(){for(var e=[],t=arguments.length,n=0;n<t;n++)e.push(arguments[n]);if(!(this instanceof Ln))return xn(Ln,e);if(t>0)throw new Error("Closepath constructor expects no arguments.");return this},Tn={clone:function(){return new Ln},divideAt:function(e){var t=new Wt(this.start,this.end).divideAt(e);return[t[1].isDifferentiable()?new Sn(t[0]):this.clone(),new Sn(t[1])]},divideAtLength:function(e){var t=new Wt(this.start,this.end).divideAtLength(e);return[t[1].isDifferentiable()?new Sn(t[0]):this.clone(),new Sn(t[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(Tn,"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(Tn,"type",{configurable:!0,enumerable:!0,value:"Z"}),Ln.prototype=bn(kn,Wt.prototype,Tn);var Nn=wn.segmentTypes={L:Sn,C:En,M:An,Z:Ln,z:Ln};wn.regexSupportedData=new RegExp("^[\\s\\d"+Object.keys(Nn).join("")+",.]*$"),wn.isDataSupported=function(e){return"string"==typeof e&&this.regexSupportedData.test(e)};const On={curveThroughPoints:function(e){return console.warn("deprecated"),new wn(yn.throughPoints(e)).serialize()},getCurveControlPoints:function(e){console.warn("deprecated");var t,n=[],r=[],i=e.length-1;if(1==i)return n[0]=new $t((2*e[0].x+e[1].x)/3,(2*e[0].y+e[1].y)/3),r[0]=new $t(2*n[0].x-e[0].x,2*n[0].y-e[0].y),[n,r];var o=[];for(t=1;t<i-1;t++)o[t]=4*e[t].x+2*e[t+1].x;o[0]=e[0].x+2*e[1].x,o[i-1]=(8*e[i-1].x+e[i].x)/2;var a=this.getFirstControlPoints(o);for(t=1;t<i-1;++t)o[t]=4*e[t].y+2*e[t+1].y;o[0]=e[0].y+2*e[1].y,o[i-1]=(8*e[i-1].y+e[i].y)/2;var s=this.getFirstControlPoints(o);for(t=0;t<i;t++)n.push(new $t(a[t],s[t])),t<i-1?r.push(new $t(2*e[t+1].x-a[t+1],2*e[t+1].y-s[t+1])):r.push(new $t((e[i].x+a[i-1])/2,(e[i].y+s[i-1])/2));return[n,r]},getCurveDivider:function(e,t,n,r){console.warn("deprecated");var i=new yn(e,t,n,r);return function(e){var t=i.divide(e);return[{p0:t[0].start,p1:t[0].controlPoint1,p2:t[0].controlPoint2,p3:t[0].end},{p0:t[1].start,p1:t[1].controlPoint1,p2:t[1].controlPoint2,p3:t[1].end}]}},getFirstControlPoints:function(e){console.warn("deprecated");var t=e.length,n=[],r=[],i=2;n[0]=e[0]/i;for(var o=1;o<t;o++)r[o]=1/i,i=(o<t-1?4:3.5)-r[o],n[o]=(e[o]-n[o-1])/i;for(o=1;o<t;o++)n[t-o-1]-=r[t-o]*n[t-o];return n},getInversionSolver:function(e,t,n,r){console.warn("deprecated");var i=new yn(e,t,n,r);return function(e){return i.closestPointT(e)}}},Mn=function(e){return this instanceof Mn?"string"==typeof e?new Mn.parse(e):void(this.points=Array.isArray(e)?e.map($t):[]):new Mn(e)};function Rn(e,t,n,r){switch(e.type){case Nt.Line:if(t.type===Nt.Line)return Dn(e,t);break;case Nt.Ellipse:switch(t.type){case Nt.Line:return jn(e,t);case Nt.Ellipse:return In(e,t)}break;case Nt.Rect:switch(t.type){case Nt.Line:return Fn(e,t);case Nt.Ellipse:return zn(e,t);case Nt.Rect:return Vn(e,t)}break;case Nt.Polyline:switch(t.type){case Nt.Line:return Bn(e,t);case Nt.Ellipse:return $n(e,t);case Nt.Rect:return Un(e,t);case Nt.Polyline:return Hn(e,t)}break;case Nt.Polygon:switch(t.type){case Nt.Line:return qn(e,t);case Nt.Ellipse:return Wn(e,t);case Nt.Rect:return Gn(e,t);case Nt.Polyline:return Yn(e,t);case Nt.Polygon:return Xn(e,t)}break;case Nt.Path:switch(t.type){case Nt.Line:return Kn(e,t,n);case Nt.Ellipse:return Jn(e,t,n);case Nt.Rect:return Qn(e,t,n);case Nt.Polyline:return Zn(e,t,n);case Nt.Polygon:return er(e,t,n);case Nt.Path:return tr(e,t,n,r)}}switch(t.type){case Nt.Ellipse:case Nt.Rect:case Nt.Polyline:case Nt.Polygon:case Nt.Path:return Rn(t,e,r,n);default:throw Error(`The intersection for ${e} and ${t} could not be found.`)}}function Dn(e,t){const n=e.start.x,r=e.start.y,i=e.end.x,o=e.end.y,a=t.start.x,s=t.start.y,l=i-n,u=o-r,c=t.end.x-a,f=t.end.y-s,h=n-a,d=r-s,p=l*f-c*u,g=(l*d-u*h)/p,v=(c*d-f*h)/p;return g>=0&&g<=1&&v>=0&&v<=1}function jn(e,t){const n=e.a,r=e.b,i=e.x,o=e.y,a=t.start.x-i,s=t.end.x-i,l=t.start.y-o,u=n*n,c=r*r,f=s-a,h=t.end.y-o-l,d=f*f/u+h*h/c,p=2*a*f/u+2*l*h/c,g=p*p-4*d*(a*a/u+l*l/c-1);if(0===g){const e=-p/2/d;return e>=0&&e<=1}if(g>0){const e=Math.sqrt(g),t=(-p+e)/2/d,n=(-p-e)/2/d;return t>=0&&t<=1||n>=0&&n<=1}return!1}function In(e,t){return function(e,t,n){const{cos:r,sin:i}=Math,o=i(0),a=r(0),s=i(0),l=r(0),u=o*o,c=a*a,f=o*a,h=s*s,d=l*l,p=s*l,g=e.a*e.a,v=e.b*e.b,m=n.a*n.a,y=n.b*n.b,b=g*u+v*c,w=m*h+y*d,x=g*c+v*u,k=m*d+y*h;let S=2*(v-g)*f,_=2*(y-m)*p,E=-2*b*e.x-S*e.y,C=-2*w*n.x-_*n.y,A=-S*e.x-2*x*e.y,P=-_*n.x-2*k*n.y;const L=b*e.x*e.x+x*e.y*e.y+S*e.x*e.y-g*v,T=w*n.x*n.x+k*n.y*n.y+_*n.x*n.y-m*y;S/=2,_/=2,E/=2,C/=2,A/=2,P/=2;const N=ur([[b,S,E],[S,x,A],[E,A,L]]),O=ur([[w,_,C],[_,k,P],[C,P,T]]),M=.33333333*(ur([[w,S,E],[_,x,A],[C,A,L]])+ur([[b,_,E],[S,k,A],[E,P,L]])+ur([[b,S,C],[S,x,P],[E,A,T]])),R=.33333333*(ur([[b,_,C],[S,k,P],[E,P,T]])+ur([[w,S,C],[_,x,P],[C,A,T]])+ur([[w,_,E],[_,k,A],[C,P,L]])),D=lr([[N,M],[M,R]]),j=lr([[N,R],[M,O]]),I=lr([[M,R],[R,O]]);return!(lr([[2*D,j],[j,2*I]])>0&&(R>0||M>0))}(e,0,t)}function Fn(e,t){const{start:n,end:r}=t,{x:i,y:o,width:a,height:s}=e;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)&&(!(!e.containsPoint(t.start)&&!e.containsPoint(t.end))||Dn(e.topLine(),t)||Dn(e.rightLine(),t)||Dn(e.bottomLine(),t)||Dn(e.leftLine(),t))}function zn(e,t){return!!Vn(e,sn.fromEllipse(t))&&Wn(Mn.fromRect(e),t)}function Vn(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Bn(e,t){return nr(e,t,{interior:!1})}function $n(e,t){return rr(e,t,{interior:!1})}function Un(e,t){return ir(e,t,{interior:!1})}function Hn(e,t){return ar(e,t,{interior:!1})}function qn(e,t){return nr(e,t,{interior:!0})}function Wn(e,t){return rr(e,t,{interior:!0})}function Gn(e,t){return ir(e,t,{interior:!0})}function Yn(e,t){return ar(e,t,{interior:!0})}function Xn(e,t){return sr(e,t,{interior:!0})}function Kn(e,t,n){return e.getSubpaths().some(e=>{const[r]=e.toPolylines(n),{type:i}=e.getSegment(-1);return"Z"===i?qn(r,t):Bn(r,t)})}function Jn(e,t,n){return e.getSubpaths().some(e=>{const[r]=e.toPolylines(n),{type:i}=e.getSegment(-1);return"Z"===i?Wn(r,t):$n(r,t)})}function Qn(e,t,n){return er(e,Mn.fromRect(t),n)}function Zn(e,t,n){return or(e,t,n,{interior:!1})}function er(e,t,n){return or(e,t,n,{interior:!0})}function tr(e,t,n,r){return e.getSubpaths().some(e=>{const[i]=e.toPolylines(n),{type:o}=e.getSegment(-1);return"Z"===o?er(t,i,r):Zn(t,i,r)})}function nr(e,t,n={}){const{interior:r=!1}=n;let i;if(r){if(e.containsPoint(t.start))return!0;const{start:n,end:r,points:o}=e;i=r.equals(n)?o:[...o,n]}else i=e.points;const{length:o}=i,a=new Wt;for(let e=0;e<o-1;e++)if(a.start=i[e],a.end=i[e+1],Dn(t,a))return!0;return!1}function rr(e,t,n={}){const{start:r,end:i,points:o}=e;if(t.containsPoint(r))return!0;let a;const{interior:s=!1}=n;if(s){if(e.containsPoint(t.center()))return!0;a=i.equals(r)?o:[...o,r]}else a=o;const{length:l}=a,u=new Wt;for(let e=0;e<l-1;e++)if(u.start=a[e],u.end=a[e+1],jn(t,u))return!0;return!1}function ir(e,t,n){return sr(e,Mn.fromRect(t),n)}function or(e,t,n,r){return e.getSubpaths().some(e=>{const[i]=e.toPolylines(n),{type:o}=e.getSegment(-1);return"Z"===o?sr(t,i,r):ar(t,i,r)})}function ar(e,t,n={}){const{interior:r=!1}=n;let i;if(r){const{start:n}=t;if(e.containsPoint(n))return!0;i=e.clone().close()}else i=e;const o=t.points,{length:a}=o,s=new Wt;for(let e=0;e<a-1;e++)if(s.start=o[e],s.end=o[e+1],Bn(i,s))return!0;return!1}function sr(e,t,n){return t.containsPoint(e.start)||ar(e,t.clone().close(),n)}function lr(e){return e[0][0]*e[1][1]-e[0][1]*e[1][0]}function ur(e){return e[0][0]*e[1][1]*e[2][2]-e[0][0]*e[1][2]*e[2][1]-e[0][1]*e[1][0]*e[2][2]+e[0][1]*e[1][2]*e[2][0]+e[0][2]*e[1][0]*e[2][1]-e[0][2]*e[1][1]*e[2][0]}Mn.parse=function(e){return new Mn(un(e))},Mn.fromRect=function(e){return new Mn([e.topLeft(),e.topRight(),e.bottomRight(),e.bottomLeft()])},Mn.prototype=bn(hn.prototype,{type:Nt.Polygon,clone:function(){return new Mn(cn(this.points))},convexHull:function(){return new Mn(fn(this.points))},lengthPoints:function(){const{start:e,end:t,points:n}=this;return n.length<=1||e.equals(t)?n:[...n,e.clone()]}});const cr=e,fr=function(){if("object"!=typeof 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 e={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"},n=Math,r=n.PI,i=n.atan2,o=n.sqrt,a=n.min,s=n.max,l=n.cos,u=n.sin,c=function(t,n,r){if(!(this instanceof c))return c.apply(Object.create(c.prototype),arguments);if(t){if(c.isV(t)&&(t=t.node),n=n||{},c.isString(t)){if("svg"===(t=t.trim()).toLowerCase())t=c.createSvgDocument();else if("<"===t[0]){var i=c.createSvgDocument(t);if(i.childNodes.length>1){var o,a,s=[];for(o=0,a=i.childNodes.length;o<a;o++){var l=i.childNodes[o];s.push(new c(document.importNode(l,!0)))}return s}t=document.importNode(i.firstChild,!0)}else t=document.createElementNS(e.svg,t);c.ensureId(t)}return this.node=t,this.setAttributes(n),r&&this.append(r),this}},f=c.prototype;function h(e,t,n){n||(n={});for(var r=n.includeAnnotationIndices,i=n.eol,o=n.lineHeight,a=n.baseSize,s=0,l={},u=t.length-1,f=0;f<=u;f++){var h=t[f],d=null;if(c.isObject(h)){var p=h.attrs,g=c("tspan",p),v=g.node,m=h.t;i&&f===u&&(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===u&&(h+=i),v=document.createTextNode(h||" "),a&&a>s&&(s=a);e.appendChild(v)}return s&&(l.maxFontSize=s),o?l.lineHeight=o:s&&(l.lineHeight=1.2*s),l}Object.defineProperty(f,"id",{enumerable:!0,get:function(){return this.node.id},set:function(e){this.node.id=e}}),f.getTransformToElement=function(e){var t=this.node;if(c.isSVGGraphicsElement(e)&&c.isSVGGraphicsElement(t)){var n=c.toNode(e).getScreenCTM(),r=t.getScreenCTM();if(n&&r)return n.inverse().multiply(r)}return c.createSVGMatrix()},f.transform=function(e,t){var n=this.node;if(c.isUndefined(e))return c.transformStringToMatrix(this.attr("transform"));if(t&&t.absolute)return this.attr("transform",c.matrixToTransformString(e));var r=c.createSVGTransform(e);return n.transform.baseVal.appendItem(r),this},f.translate=function(e,t,n){n=n||{},t=t||0;var r=this.attr("transform")||"",i=c.parseTransformString(r);if(r=i.value,c.isUndefined(e))return i.translate;r=r.replace(/translate\([^)]*\)/g,"").trim();var o="translate("+(n.absolute?e:i.translate.tx+e)+","+(n.absolute?t:i.translate.ty+t)+")";return this.attr("transform",(o+" "+r).trim()),this},f.rotate=function(e,t,n,r){r=r||{};var i=this.attr("transform")||"",o=c.parseTransformString(i);if(i=o.value,c.isUndefined(e))return o.rotate;i=i.replace(/rotate\([^)]*\)/g,"").trim(),e%=360;var a="rotate("+(r.absolute?e:o.rotate.angle+e)+(void 0!==t&&void 0!==n?","+t+","+n:"")+")";return this.attr("transform",(i+" "+a).trim()),this},f.scale=function(e,t){t=c.isUndefined(t)?e:t;var n=this.attr("transform")||"",r=c.parseTransformString(n);if(n=r.value,c.isUndefined(e))return r.scale;n=n.replace(/scale\([^)]*\)/g,"").trim();var i="scale("+e+","+t+")";return this.attr("transform",(n+" "+i).trim()),this},f.bbox=function(e,t){var n,r=this.node,i=r.ownerSVGElement;if(!i)return new sn(0,0,0,0);try{n=r.getBBox()}catch(e){n={x:r.clientLeft,y:r.clientTop,width:r.clientWidth,height:r.clientHeight}}if(e)return new sn(n);var o=this.getTransformToElement(t||i);return c.transformRect(n,o)},f.getBBox=function(e){var t,n={},r=this.node;if(!r.ownerSVGElement||!c.isSVGGraphicsElement(r))return new sn(0,0,0,0);if(e&&(e.target&&(n.target=c.toNode(e.target)),e.recursive&&(n.recursive=e.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,l=i[a];s=0===l.children().length?l.getBBox({target:n.target,recursive:!1}):l.getBBox({target:n.target,recursive:!0}),t=t?t.union(s):s}return t}try{t=r.getBBox()}catch(e){t={x:r.clientLeft,y:r.clientTop,width:r.clientWidth,height:r.clientHeight}}if(n.target){var u=this.getTransformToElement(n.target);return c.transformRect(t,u)}return new sn(t)};var d=/em$/;function p(e,t){var n=parseFloat(e);return d.test(e)?n*t:n}f.text=function(t,n){if(t&&"string"!=typeof t)throw new Error("Vectorizer: text() expects the first argument to be a string.");t=c.sanitizeText(t),n||(n={});var r=n.displayEmpty,i=n.eol,o=n.textPath,a=n.textVerticalAnchor,s="middle"===a||"bottom"===a||"top"===a,l=n.x;void 0===l&&(l=this.attr("x")||0);var u=n.includeAnnotationIndices,f=n.annotations;f&&!c.isArray(f)&&(f=[f]);var g=n.lineHeight,v="auto"===g,m=v?"1.5em":g||"1em";this.empty(),this.attr({"xml:space":"preserve",display:t||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(e,t){e||(e={});var n=c("textPath"),r=e.d;if(r&&void 0===e["xlink:href"]){var i=c("path").attr("d",r).appendTo(t.defs());n.attr("xlink:href","#"+i.id)}return c.isObject(e)&&n.attr(e),n.node}(o,this)):b=w.createDocumentFragment();for(var x,k=0,S=t.split("\n"),_=[],E=0,C=S.length-1;E<=C;E++){var A,P=m,L="v-line",T=w.createElementNS(e.svg,"tspan"),N=S[E];if(N)if(f){var O=(A=h(T,c.annotateString(N,f,{offset:-k,includeAnnotationIndices:u}),{includeAnnotationIndices:u,eol:E!==C&&i,lineHeight:v?null:m,baseSize:y})).lineHeight;O&&v&&0!==E&&(P=O),0===E&&(x=.8*A.maxFontSize)}else i&&E!==C&&(N+=i),T.textContent=N;else{T.textContent="-",L+=" v-empty-line";var M=T.style;M.fillOpacity=0,M.strokeOpacity=0,f&&(A={})}A&&_.push(A),E>0&&T.setAttribute("dy",P),(E>0||o)&&T.setAttribute("x",l),T.className.baseVal=L,b.appendChild(T),k+=N.length+1}if(s)if(f)P=function(e,t,n,r){if(!Array.isArray(t))return 0;var i=t.length;if(!i)return 0;for(var o=t[0],a=p(o.maxFontSize,n)||n,s=0,l=p(r,n),u=1;u<i;u++)s+=p((o=t[u]).lineHeight,n)||l;var c,f=p(o.maxFontSize,n)||n;switch(e){case"middle":c=a/2-.15*f-s/2;break;case"bottom":c=-.25*f-s;break;default:c=.8*a}return c}(a,_,y,m);else if("top"===a)P="0.8em";else{var R;switch(C>0?(R=parseFloat(m)||1,R*=C,d.test(m)||(R/=y)):R=0,a){case"middle":P=.3-R/2+"em";break;case"bottom":P=-R-.3+"em"}}else 0===a?P="0em":a?P=a:(P=0,null===this.attr("y")&&this.attr("y",x||"0.8em"));return b.firstChild.setAttribute("dy",P),this.append(b),this},f.removeAttr=function(e){var t=c.qualifyAttr(e),n=this.node;return t.ns?n.hasAttributeNS(t.ns,t.local)&&n.removeAttributeNS(t.ns,t.local):n.hasAttribute(e)&&n.removeAttribute(e),this},f.attr=function(e,t){if(c.isUndefined(e)){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(e)&&c.isUndefined(t))return this.node.getAttribute(e);if("object"==typeof e)for(var o in e)e.hasOwnProperty(o)&&this.setAttribute(o,e[o]);else this.setAttribute(e,t);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(e){for(var t in e)e.hasOwnProperty(t)&&this.setAttribute(t,e[t]);return this},f.append=function(e){c.isArray(e)||(e=[e]);for(var t=0,n=e.length;t<n;t++)this.node.appendChild(c.toNode(e[t]));return this},f.prepend=function(e){var t=this.node.firstChild;return t?c(t).before(e):this.append(e)},f.before=function(e){var t=this.node,n=t.parentNode;if(n){c.isArray(e)||(e=[e]);for(var r=0,i=e.length;r<i;r++)n.insertBefore(c.toNode(e[r]),t)}return this},f.appendTo=function(e){return c.toNode(e).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 e=this.svg()||this,t=e.node.getElementsByTagName("defs")[0];return t?c(t):c("defs").appendTo(e)},f.clone=function(){var e=c(this.node.cloneNode(!0));return e.node.id=c.uniqueId(),e},f.findOne=function(e){var t=this.node.querySelector(e);return t?c(t):void 0},f.find=function(e){var t=[],n=this.node.querySelectorAll(e);if(n)for(var r=0;r<n.length;r++)t.push(c(n[r]));return t},f.children=function(){for(var e=this.node.childNodes,t=[],n=0;n<e.length;n++)1===e[n].nodeType&&t.push(c(e[n]));return t},f.parent=function(){return c(this.node.parentNode)||null},f.index=function(){for(var e=0,t=this.node.previousSibling;t;)1===t.nodeType&&e++,t=t.previousSibling;return e},f.findParentByClass=function(e,t){for(var n=this.node.ownerSVGElement,r=this.node.parentNode;r&&r!==t&&r!==n;){var i=c(r);if(i.hasClass(e))return i;r=r.parentNode}return null},f.contains=function(e){var t=this.node,n=c.toNode(e),r=n&&n.parentNode;return t===r||!!(r&&1===r.nodeType&&16&t.compareDocumentPosition(r))},f.toLocalPoint=function(e,t){var n=this.svg().node,r=n.createSVGPoint();r.x=e,r.y=t;try{var i=r.matrixTransform(n.getScreenCTM().inverse()),o=this.getTransformToElement(n).inverse()}catch(e){return r}return i.matrixTransform(o)},f.translateCenterToPoint=function(e){var t=this.getBBox({target:this.svg()}).center();return this.translate(e.x-t.x,e.y-t.y),this},f.translateAndAutoOrient=function(e,t,n){e=new $t(e),t=new $t(t),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=e.angleBetween(t,e.clone().offset(1,0));s&&a.setRotate(s,0,0);var l=c.createSVGTransform(),u=e.clone().move(t,i.width/2);l.setTranslate(2*e.x-u.x,2*e.y-u.y);var f=this.getTransformToElement(n),h=c.createSVGTransform();return h.setMatrix(l.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(e,t){t=c.toNode(t);var n=c.ensureId(t),r=c("animateMotion",e),i=c("mpath",{"xlink:href":"#"+n});r.append(i),this.append(r);try{r.node.beginElement()}catch(e){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),l=0,u=s.length;l<u;l++){var f=s[l],h=new Animator(o,f,l);animators.push(h),o.animators[l]=h,h.register()}}}return this},f.hasClass=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)").test(this.node.getAttribute("class"))},f.addClass=function(e){if(e&&!this.hasClass(e)){var t=this.node.getAttribute("class")||"";this.node.setAttribute("class",(t+" "+e).trim())}return this},f.removeClass=function(e){if(e&&this.hasClass(e)){var t=this.node.getAttribute("class").replace(new RegExp("(\\s|^)"+e+"(\\s|$)","g"),"$2");this.node.setAttribute("class",t)}return this},f.toggleClass=function(e,t){return(c.isUndefined(t)?this.hasClass(e):!t)?this.removeClass(e):this.addClass(e),this},f.sample=function(e){e=e||1;for(var t,n=this.node,r=n.getTotalLength(),i=[],o=0;o<r;)t=n.getPointAtLength(o),i.push({x:t.x,y:t.y,distance:o}),o+=e;return i},f.convertToPath=function(){var e=c("path");e.attr(this.attr());var t=this.convertToPathData();return t&&e.attr("d",t),e},f.convertToPathData=function(){var e=this.tagName();switch(e){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(e+" cannot be converted to PATH.")},c.prototype.toGeometryShape=function(){var e,t,n,r,i,o,a,s,l,u,f,h,d,p,g;switch(this.tagName()){case"RECT":return e=parseFloat(this.attr("x"))||0,t=parseFloat(this.attr("y"))||0,n=parseFloat(this.attr("width"))||0,r=parseFloat(this.attr("height"))||0,new sn(e,t,n,r);case"CIRCLE":return i=parseFloat(this.attr("cx"))||0,o=parseFloat(this.attr("cy"))||0,a=parseFloat(this.attr("r"))||0,new Jt({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,l=parseFloat(this.attr("ry"))||0,new Jt({x:i,y:o},s,l);case"POLYLINE":return u=c.getPointsFromSvgNode(this),new hn(u);case"POLYGON":return(u=c.getPointsFromSvgNode(this)).length>1&&u.push(u[0]),new hn(u);case"PATH":return f=this.attr("d"),wn.isDataSupported(f)||(f=c.normalizePathData(f)),new wn(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 Wt({x:h,y:p},{x:d,y:g})}return this.getBBox()},f.findIntersection=function(e,t){var n=this.svg().node;t=t||n;var r=this.getBBox({target:t}),i=r.center();if(r.intersectionWithLineFromCenterToPoint(e)){var o,a=this.tagName();if("RECT"===a){var s=new sn(parseFloat(this.attr("x")||0),parseFloat(this.attr("y")||0),parseFloat(this.attr("width")),parseFloat(this.attr("height"))),l=this.getTransformToElement(t),u=c.decomposeMatrix(l),f=n.createSVGTransform();f.setRotate(-u.rotation,i.x,i.y);var h=c.transformRect(s,f.matrix.multiply(l));o=new sn(h).intersectionWithLineFromCenterToPoint(e,u.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(t)),(m=(p=new $t(g)).distance(i)+(v=1.1*p.distance(e)))<b?(b=m,w=[{sample:p,refDistance:v}]):m<b+1&&w.push({sample:p,refDistance:v});w.sort(function(e,t){return e.refDistance-t.refDistance}),w[0]&&(o=w[0].sample)}return o}},f.setAttribute=function(e,t){var n=this.node;if(null===t)return this.removeAttr(e),this;var r=c.qualifyAttr(e);return r.ns?n.setAttributeNS(r.ns,e,t):"id"===e?n.id=t:n.setAttribute(e,t),this},c.createSvgDocument=function(t){if(t){const n=`<svg xmlns="${e.svg}" xmlns:xlink="${e.xlink}" version="1.1">${t}</svg>`,{documentElement:r}=c.parseXML(n,{async:!1});return r}const n=document.createElementNS(e.svg,"svg");return n.setAttributeNS(e.xmlns,"xmlns:xlink",e.xlink),n.setAttribute("version","1.1"),n},c.createSVGStyle=function(e){const{node:t}=c("style",{type:"text/css"},[c.createCDATASection(e)]);return t},c.createCDATASection=function(e=""){return document.implementation.createDocument(null,"xml",null).createCDATASection(e)},c.idCounter=0,c.uniqueId=function(){return"v-"+ ++c.idCounter},c.toNode=function(e){return c.isV(e)?e.node:e.nodeName&&e||e[0]},c.ensureId=function(e){return(e=c.toNode(e)).id||(e.id=c.uniqueId())},c.sanitizeText=function(e){return(e||"").replace(/ /g," ")},c.isUndefined=function(e){return void 0===e},c.isString=function(e){return"string"==typeof e},c.isObject=function(e){return e&&"object"==typeof e},c.isArray=Array.isArray,c.parseXML=function(e,t){var n;t=t||{};try{var r=new DOMParser;c.isUndefined(t.async)||(r.async=t.async),n=r.parseFromString(e,"text/xml")}catch(e){n=void 0}if(!n||n.getElementsByTagName("parsererror").length)throw new Error("Invalid XML: "+e);return n},c.qualifyAttr=function(t){if(-1!==t.indexOf(":")){var n=t.split(":");return{ns:e[n[0]],local:n[1]}}return{ns:null,local:t}},c.transformRegex=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,c.transformSeparatorRegex=/[ ,]+/,c.transformationListRegex=/^(\w+)\((.*)\)/,c.transformStringToMatrix=function(e){var t=c.createSVGMatrix(),n=e&&e.match(c.transformRegex);if(!n)return t;for(var r=0,i=n.length;r<i;r++){var o=n[r].match(c.transformationListRegex);if(o){var a,s,l,u,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":l=parseFloat(d[0]),u=parseFloat(d[1]),h=h.translate(l,u);break;case"rotate":f=parseFloat(d[0]),l=parseFloat(d[1])||0,u=parseFloat(d[2])||0,h=0!==l||0!==u?h.translate(l,u).rotate(f).translate(-l,-u):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}t=t.multiply(h)}}return t},c.matrixToTransformString=function(e){return e||(e=!0),"matrix("+(void 0!==e.a?e.a:1)+","+(void 0!==e.b?e.b:0)+","+(void 0!==e.c?e.c:0)+","+(void 0!==e.d?e.d:1)+","+(void 0!==e.e?e.e:0)+","+(void 0!==e.f?e.f:0)+")"},c.parseTransformString=function(e){var t,n,r;if(e){var i=c.transformSeparatorRegex;if(e.trim().indexOf("matrix")>=0){var o=c.transformStringToMatrix(e),a=c.decomposeMatrix(o);t=[a.translateX,a.translateY],r=[a.scaleX,a.scaleY],n=[a.rotation];var s=[];0===t[0]&&0===t[1]||s.push("translate("+t+")"),1===r[0]&&1===r[1]||s.push("scale("+r+")"),0!==n[0]&&s.push("rotate("+n+")"),e=s.join(" ")}else{var l=e.match(/translate\((.*?)\)/);l&&(t=l[1].split(i));var u=e.match(/rotate\((.*?)\)/);u&&(n=u[1].split(i));var f=e.match(/scale\((.*?)\)/);f&&(r=f[1].split(i))}}var h=r&&r[0]?parseFloat(r[0]):1;return{value:e,translate:{tx:t&&t[0]?parseInt(t[0],10):0,ty:t&&t[1]?parseInt(t[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(e,t){return{x:t.x*e.a+t.y*e.c+0,y:t.x*e.b+t.y*e.d+0}},c.decomposeMatrix=function(e){var t=c.deltaTransformPoint(e,{x:0,y:1}),n=c.deltaTransformPoint(e,{x:1,y:0}),a=180/r*i(t.y,t.x)-90,s=180/r*i(n.y,n.x);return{translateX:e.e,translateY:e.f,scaleX:o(e.a*e.a+e.b*e.b),scaleY:o(e.c*e.c+e.d*e.d),skewX:a,skewY:s,rotation:a}},c.matrixToScale=function(e){var t,n,r,i;return e?(t=c.isUndefined(e.a)?1:e.a,i=c.isUndefined(e.d)?1:e.d,n=e.b,r=e.c):t=i=1,{sx:n?o(t*t+n*n):t,sy:r?o(r*r+i*i):i}},c.matrixToRotate=function(e){var t={x:0,y:1};return e&&(t=c.deltaTransformPoint(e,t)),{angle:wt(kt(i(t.y,t.x))-90)}},c.matrixToTranslate=function(e){return{tx:e&&e.e||0,ty:e&&e.f||0}},c.isV=function(e){return e instanceof c},c.isVElement=c.isV,c.isSVGGraphicsElement=function(e){return!!e&&(e=c.toNode(e))instanceof SVGElement&&"function"==typeof e.getScreenCTM};var g=c("svg").node;return c.createSVGMatrix=function(e){var t=g.createSVGMatrix();for(var n in e)t[n]=e[n];return t},c.createSVGTransform=function(e){return c.isUndefined(e)?g.createSVGTransform():(e instanceof SVGMatrix||(e=c.createSVGMatrix(e)),g.createSVGTransformFromMatrix(e))},c.createSVGPoint=function(e,t){var n=g.createSVGPoint();return n.x=e,n.y=t,n},c.transformRect=function(e,t){var n=g.createSVGPoint();n.x=e.x,n.y=e.y;var r=n.matrixTransform(t);n.x=e.x+e.width,n.y=e.y;var i=n.matrixTransform(t);n.x=e.x+e.width,n.y=e.y+e.height;var o=n.matrixTransform(t);n.x=e.x,n.y=e.y+e.height;var l=n.matrixTransform(t),u=a(r.x,i.x,o.x,l.x),c=s(r.x,i.x,o.x,l.x),f=a(r.y,i.y,o.y,l.y),h=s(r.y,i.y,o.y,l.y);return new sn(u,f,c-u,h-f)},c.transformPoint=function(e,t){return new $t(c.createSVGPoint(e.x,e.y).matrixTransform(t))},c.transformLine=function(e,t){return new Wt(c.transformPoint(e.start,t),c.transformPoint(e.end,t))},c.transformPolyline=function(e,t){var n=e instanceof hn?e.points:e;c.isArray(n)||(n=[]);for(var r=[],i=0,o=n.length;i<o;i++)r[i]=c.transformPoint(n[i],t);return new hn(r)},c.styleToObject=function(e){for(var t={},n=e.split(";"),r=0;r<n.length;r++){var i=n[r].split("=");t[i[0].trim()]=i[1].trim()}return t},c.createSlicePathData=function(e,t,n,i){var o=2*r-1e-6,a=e,s=t,c=n,f=i,h=(f<c&&(h=c,c=f,f=h),f-c),d=h<r?"0":"1",p=l(c),g=u(c),v=l(f),m=u(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(e,t){for(var n in t)"class"===n?e[n]=e[n]?e[n]+" "+t[n]:t[n]:"style"===n?c.isObject(e[n])&&c.isObject(t[n])?e[n]=c.mergeAttrs(e[n],t[n]):c.isObject(e[n])?e[n]=c.mergeAttrs(e[n],c.styleToObject(t[n])):c.isObject(t[n])?e[n]=c.mergeAttrs(c.styleToObject(e[n]),t[n]):e[n]=c.mergeAttrs(c.styleToObject(e[n]),c.styleToObject(t[n])):e[n]=t[n];return e},c.annotateString=function(e,t,n){t=t||[];for(var r,i,o,a=(n=n||{}).offset||0,s=[],l=[],u=0;u<e.length;u++){i=l[u]=e[u];for(var f=0;f<t.length;f++){var h=t[f],d=h.start+a,p=h.end+a;u>=d&&u<p&&(c.isObject(i)?i.attrs=c.mergeAttrs(c.mergeAttrs({},i.attrs),h.attrs):i=l[u]={t:e[u],attrs:h.attrs},n.includeAnnotationIndices&&(i.annotations||(i.annotations=[])).push(f))}(o=l[u-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(e,t){var n=[];return e&&e.forEach(function(e){e.start<t&&t<=e.end&&n.push(e)}),n},c.findAnnotationsBetweenIndexes=function(e,t,n){var r=[];return e&&e.forEach(function(e){(t>=e.start&&t<e.end||n>e.start&&n<=e.end||e.start>=t&&e.end<n)&&r.push(e)}),r},c.shiftAnnotations=function(e,t,n){return e&&e.forEach(function(e){e.start<t&&e.end>=t?e.end+=n:e.start>=t&&(e.start+=n,e.end+=n)}),e},c.convertLineToPathData=function(e){return["M",(e=c(e)).attr("x1"),e.attr("y1"),"L",e.attr("x2"),e.attr("y2")].join(" ")},c.convertPolygonToPathData=function(e){var t=c.getPointsFromSvgNode(e);return 0===t.length?null:c.svgPointsToPath(t)+" Z"},c.convertPolylineToPathData=function(e){var t=c.getPointsFromSvgNode(e);return 0===t.length?null:c.svgPointsToPath(t)},c.svgPointsToPath=function(e){for(var t=0,n=e.length;t<n;t++)e[t]=e[t].x+" "+e[t].y;return"M "+e.join(" L")},c.getPointsFromSvgNode=function(e){var t=[],n=(e=c.toNode(e)).points;if(n)for(var r=0,i=n.numberOfItems;r<i;r++)t.push(n.getItem(r));return t},c.KAPPA=.551784,c.convertCircleToPathData=function(e){e=c(e);var t=parseFloat(e.attr("cx"))||0,n=parseFloat(e.attr("cy"))||0,r=parseFloat(e.attr("r")),i=r*c.KAPPA;return["M",t,n-r,"C",t+i,n-r,t+r,n-i,t+r,n,"C",t+r,n+i,t+i,n+r,t,n+r,"C",t-i,n+r,t-r,n+i,t-r,n,"C",t-r,n-i,t-i,n-r,t,n-r,"Z"].join(" ")},c.convertEllipseToPathData=function(e){e=c(e);var t=parseFloat(e.attr("cx"))||0,n=parseFloat(e.attr("cy"))||0,r=parseFloat(e.attr("rx")),i=parseFloat(e.attr("ry"))||r,o=r*c.KAPPA,a=i*c.KAPPA;return["M",t,n-i,"C",t+o,n-i,t+r,n-a,t+r,n,"C",t+r,n+a,t+o,n+i,t,n+i,"C",t-o,n+i,t-r,n+a,t-r,n,"C",t-r,n-a,t-o,n-i,t,n-i,"Z"].join(" ")},c.convertRectToPathData=function(e){return e=c(e),c.rectToPath({x:parseFloat(e.attr("x"))||0,y:parseFloat(e.attr("y"))||0,width:parseFloat(e.attr("width"))||0,height:parseFloat(e.attr("height"))||0,rx:parseFloat(e.attr("rx"))||0,ry:parseFloat(e.attr("ry"))||0})},c.rectToPath=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=a(e.rx||e["top-rx"]||0,r/2),s=a(e.rx||e["bottom-rx"]||0,r/2),l=a(e.ry||e["top-ry"]||0,i/2),u=a(e.ry||e["bottom-ry"]||0,i/2);return(o||s||l||u?["M",t,n+l,"v",i-l-u,"a",s,u,0,0,0,s,u,"h",r-2*s,"a",s,u,0,0,0,s,-u,"v",-(i-u-l),"a",o,l,0,0,0,-o,-l,"h",-(r-2*o),"a",o,l,0,0,0,-o,l,"Z"]:["M",t,n,"H",t+r,"V",n+i,"H",t,"V",n,"Z"]).join(" ")},c.normalizePathData=function(){var e="\t\n\v\f\r   ᠎              \u2028\u2029",t=new RegExp("([a-z])["+e+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+e+"]*,?["+e+"]*)+)","ig"),n=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+e+"]*,?["+e+"]*","ig"),r=Math,i=r.PI,o=r.sin,a=r.cos,s=r.tan,l=r.asin,u=r.sqrt,c=r.abs;function f(e,t,n,r,i,o){var a=1/3,s=2/3;return[a*e+s*n,a*t+s*r,a*i+s*n,a*o+s*r,i,o]}function h(e,t,n){return{x:e*a(n)-t*o(n),y:e*o(n)+t*a(n)}}function d(e,t,n,r,f,p,g,v,m,y){var b,w=120*i/180,x=i/180*(+f||0),k=[];if(y)N=y[0],O=y[1],L=y[2],T=y[3];else{e=(b=h(e,t,-x)).x,t=b.y;var S=(e-(v=(b=h(v,m,-x)).x))/2,_=(t-(m=b.y))/2,E=S*S/(n*n)+_*_/(r*r);E>1&&(n*=E=u(E),r*=E);var C=n*n,A=r*r,P=(p==g?-1:1)*u(c((C*A-C*_*_-A*S*S)/(C*_*_+A*S*S))),L=P*n*_/r+(e+v)/2,T=P*-r*S/n+(t+m)/2,N=l(((t-T)/r).toFixed(9)),O=l(((m-T)/r).toFixed(9));(N=e<L?i-N:N)<0&&(N=2*i+N),(O=v<L?i-O:O)<0&&(O=2*i+O),g&&N>O&&(N-=2*i),!g&&O>N&&(O-=2*i)}var M=O-N;if(c(M)>w){var R=O,D=v,j=m;k=d(v=L+n*a(O=N+w*(g&&O>N?1:-1)),m=T+r*o(O),n,r,f,0,g,D,j,[O,R,L,T])}M=O-N;var I=a(N),F=o(N),z=a(O),V=o(O),B=s(M/4),$=4/3*(n*B),U=4/3*(r*B),H=[e,t],q=[e+$*F,t-U*I],W=[v+$*V,m-U*z],G=[v,m];if(q[0]=2*H[0]-q[0],q[1]=2*H[1]-q[1],y)return[q,W,G].concat(k);for(var Y=[],X=(k=[q,W,G].concat(k).join().split(",")).length,K=0;K<X;K++)Y[K]=K%2?h(k[K-1],k[K],x).y:h(k[K],k[K+1],x).x;return Y}function p(e){var r=function(e){if(Array.isArray(e)&&Array.isArray(e&&e[0])||(e=function(e){if(!e)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(e).replace(t,function(e,t,o){var a=[],s=t.toLowerCase();for(o.replace(n,function(e,t){t&&a.push(+t)}),"m"===s&&a.length>2&&(i.push([t].concat(a.splice(0,2))),s="l",t="m"===t?"l":"L");a.length>=r[s]&&(i.push([t].concat(a.splice(0,r[s]))),r[s]););}),i}(e)),!e||!e.length)return[["M",0,0]];for(var r,i=[],o=0,a=0,s=0,l=0,u=e.length,c=0;c<u;c++){var f=[];i.push(f);var h,d,p=e[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,l=+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=+l;break;case"H":o=f[1];break;case"V":a=f[1];break;case"M":s=f[f.length-2],l=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}(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function o(e,t,n){var r,i;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(e[0]in{T:1,Q:1}||(t.qx=null,t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=0===parseFloat(e[1])||0===parseFloat(e[2])?["L",e[6],e[7]]:["C"].concat(d.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":"C"===n||"S"===n?(r=2*t.x-t.bx,i=2*t.y-t.by):(r=t.x,i=t.y),e=["C",r,i].concat(e.slice(1));break;case"T":"Q"===n||"T"===n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(f(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(f(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"H":e=["L"].concat(e[1],t.y);break;case"V":e=["L"].concat(t.x,e[1])}return e}function a(e,t){if(e[t].length>7){e[t].shift();for(var n=e[t];n.length;)s[t]="A",e.splice(t++,0,["C"].concat(n.splice(0,6)));e.splice(t,1),c=r.length}}for(var s=[],l="",u="",c=r.length,h=0;h<c;h++){r[h]&&(l=r[h][0]),"C"!==l&&(s[h]=l,h>0&&(u=s[h-1])),r[h]=o(r[h],i,u),"A"!==s[h]&&"C"===l&&(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}return function(e){return p(e).join(",").split(",").join(" ")}}(),c.namespace=e,c.g=t,c}(),hr=fr,dr={useCSSSelectors:!0,classNamePrefix:"joint-",defaultTheme:"default",doubleTapInterval:300},pr=function(e){return e?e.toString().split(" ").map(function(e){return e.substr(0,dr.classNamePrefix.length)!==dr.classNamePrefix&&(e=dr.classNamePrefix+e),e}).join(" "):e},gr=function(e){return e?e.toString().split(" ").map(function(e){return e.substr(0,dr.classNamePrefix.length)===dr.classNamePrefix&&(e=e.substr(dr.classNamePrefix.length)),e}).join(" "):e},vr=function(e,t){for(var n={},r={},i=hr.namespace.svg,o=t||i,a=document.createDocumentFragment(),s=[e,a,o];s.length>0;){o=s.pop();for(var l=s.pop(),u=s.pop(),c=0,f=u.length;c<f;c++){var h=u[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?hr:gt,m=h.attributes;m&&v(p).attr(m);var y=h.style;if(y&&gt(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 k=0,S=x.length;k<S;k++){var _=x[k],E=r[_];E||(E=r[_]=[]),E.push(p)}}l.appendChild(p);var C=h.children;Array.isArray(C)&&s.push(C,p,o)}}return{fragment:a,selectors:n,groupSelectors:r}},mr=function(e){let t=0;if(0===e.length)return t;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t},yr=function(e,t,n){for(var r,i=Array.isArray(t)?t:t.split(n||"/"),o=0,a=i.length;o<a;){if(r=i[o++],Object(e)!==e||!(r in e))return;e=e[r]}return e},br=function(e,t){return"string"!=typeof t&&"number"!=typeof t&&(t=String(t)),("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!==t},wr=function(e,t,n,r){const i=Array.isArray(t)?t:t.split(r||"/"),o=i.length-1;let a=e,s=0;for(;s<o;s++){const t=i[s];if(!br(a,t))return e;a=a[t]||(a[t]={})}return a[i[o]]=n,e},xr=function(e,t,n){const r=Array.isArray(t)?t:t.split(n||"/"),i=r.length-1;let o=e,a=0;for(;a<i;a++){const t=r[a];if(!br(o,t))return e;const n=o[t];if(!n)return e;o=n}return delete o[r[i]],e},kr=function(e){return kr.id=kr.id||1,e.id=void 0===e.id?"j_"+kr.id++:e.id,e.id},Sr=function(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()},_r=function(e){var t=e,n=e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0];if(n){for(var r in e)void 0===n[r]&&(n[r]=e[r]);t=n}var i=t.target;if(i){var o=i.correspondingUseElement;o&&(t.target=o)}return t},Er=function(){var e;if("undefined"!=typeof window&&(e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame),!e){var t=0;e=function(e){var n=(new Date).getTime(),r=Math.max(0,16-(n-t)),i=setTimeout(function(){e(n+r)},r);return t=n+r,i}}return function(t,n,...r){return e(void 0!==n?t.bind(n,...r):t)}}(),Cr=function(){var e,t="undefined"!=typeof window;return t&&(e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelAnimationFrame||window.oCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelRequestAnimationFrame),e=e||clearTimeout,t?e.bind(window):e}(),Ar=function(e){return ui(e)&&"%"===e.slice(-1)},Pr=function(e,t){var n=parseFloat(e);if(Number.isNaN(n))return null;var r,i={};if(i.value=n,null==t)r="[A-Za-z]*";else if(Array.isArray(t)){if(0===t.length)return null;r=t.join("|")}else ui(t)&&(r=t);var o=function(t){var n=new RegExp("(?:\\d+(?:\\.\\d+)*)("+t+")$").exec(e);return n?n[1]:null}(r);return null===o?null:(i.unit=o,i)},Lr=function(e,t,n={},r={}){var i=t.width,o=t.height,a=r.svgDocument||hr("svg").node,s=hr("tspan").node,l=hr("text").attr(n).append(s).node,u=document.createTextNode("");l.style.opacity=0,l.style.display="block",s.style.display="block",s.appendChild(u),a.appendChild(l),r.svgDocument||document.body.appendChild(a);var c=r.separator||" ",f=r.eol||"\n",h=r.hyphen?new RegExp(r.hyphen):/[^\w\d]/,d=r.maxLineCount;li(d)||(d=1/0);for(var p,g,v,m=e.split(c),y=[],b=[],w=0,x=0,k=m.length;w<k;w++){var S=m[w];if(S){var _=!1;if(f&&S.indexOf(f)>=0){if(S.length>1){for(var E=S.split(f),C=0,A=E.length-1;C<A;C++)E.splice(2*C+1,0,f);m.splice(w,1,...E.filter(e=>""!==e)),w--,k=m.length;continue}b[++x]="",_=!0}if(!_)if(u.data=b[x]?b[x]+" "+S:S,s.getComputedTextLength()<=i)b[x]=u.data,(p||g)&&(y[x++]=!0,p=0,g=0);else{if(!b[x]||p){var P=!!p;if(p=S.length-1,P||!p){if(!p){if(!b[x]){b=[];break}m.splice(w,2,S+m[w+1]),k--,y[x++]=!0,w--;continue}m[w]=S.substring(0,p),m[w+1]=S.substring(p)+(void 0===m[w+1]?"":m[w+1])}else{if(g)m.splice(w,2,m[w]+m[w+1]),g=0;else{var L=S.search(h);L>-1&&L!==S.length-1&&0!==L&&(g=L+1,p=0),m.splice(w,1,S.substring(0,g||p),S.substring(g||p)),k++}x&&!y[x-1]&&x--}w--;continue}x++,w--}var T=null;if(b.length>d)T=d-1;else if(void 0!==o){var N;void 0===v&&(v=(N="auto"===n.lineHeight?{value:1.5,unit:"em"}:Pr(n.lineHeight,["em"])||{value:1,unit:"em"}).value,"em"===N.unit&&(v*=l.getBBox().height)),v*b.length>o&&(T=Math.floor(o/v)-1)}if(null!==T){b.splice(T+1);var O=r.ellipsis;if(!O||T<0)break;"string"!=typeof O&&(O="…");var M=b[T];if(!M&&!_)break;var R,D,j=M.length;do{if(D=M[j],R=M.substring(0,j),D?D.match(c)&&(R+=D):R+="string"==typeof c?c:" ",R+=O,u.data=R,s.getComputedTextLength()<=i){b[T]=R;break}j--}while(j>=0);break}}}return r.svgDocument?a.removeChild(l):document.body.removeChild(a),b.join(f)},Tr=function(e){if(Object(e)!==e){var t=0;return isFinite(e)&&(t=+e),{top:t,right:t,bottom:t,left:t}}var n,r,i,o;return n=r=i=o=0,isFinite(e.vertical)&&(n=i=+e.vertical),isFinite(e.horizontal)&&(r=o=+e.horizontal),isFinite(e.top)&&(n=+e.top),isFinite(e.right)&&(r=+e.right),isFinite(e.bottom)&&(i=+e.bottom),isFinite(e.left)&&(o=+e.left),{top:n,right:r,bottom:i,left:o}},Nr={linear:function(e){return e},quad:function(e){return e*e},cubic:function(e){return e*e*e},inout:function(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)},exponential:function(e){return Math.pow(2,10*(e-1))},bounce:function(e){for(var t=0,n=1;;t+=n,n/=2)if(e>=(7-4*t)/11){var r=(11-6*t-11*e)/4;return-r*r+n*n}},reverse:function(e){return function(t){return 1-e(1-t)}},reflect:function(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}},clamp:function(e,t,n){return t=t||0,n=n||1,function(r){var i=e(r);return i<t?t:i>n?n:i}},back:function(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}},elastic:function(e){return e||(e=1.5),function(t){return Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e/3*t)}}},Or={number:function(e,t){var n=t-e;return function(t){return e+n*t}},object:function(e,t){var n=Object.keys(e);return function(r){var i,o,a={};for(i=n.length-1;-1!=i;i--)a[o=n[i]]=e[o]+(t[o]-e[o])*r;return a}},hexColor:function(e,t){var n=parseInt(e.slice(1),16),r=parseInt(t.slice(1),16),i=255&n,o=(255&r)-i,a=65280&n,s=(65280&r)-a,l=16711680&n,u=(16711680&r)-l;return function(e){return"#"+(1<<24|i+o*e&255|a+s*e&65280|l+u*e&16711680).toString(16).slice(1)}},unit:function(e,t){var n=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,r=n.exec(e),i=n.exec(t),o=i[1].indexOf("."),a=o>0?i[1].length-o-1:0;e=+r[1];var s=+i[1]-e,l=r[2];return function(t){return(e+s*t).toFixed(a)+l}}},Mr={outline:function(e){var t=Number.isFinite(e.margin)?e.margin:2,n=Number.isFinite(e.width)?e.width:1;return Rr('<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:e.color||"blue",opacity:Number.isFinite(e.opacity)?e.opacity:1,outerRadius:t+n,innerRadius:t})},highlight:function(e){return Rr('<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:e.color||"red",width:Number.isFinite(e.width)?e.width:1,blur:Number.isFinite(e.blur)?e.blur:0,opacity:Number.isFinite(e.opacity)?e.opacity:1})},blur:function(e){var t=Number.isFinite(e.x)?e.x:2;return Rr('<filter><feGaussianBlur stdDeviation="${stdDeviation}"/></filter>')({stdDeviation:Number.isFinite(e.y)?[t,e.y]:t})},dropShadow:function(e){var t="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 Rr(t)({dx:e.dx||0,dy:e.dy||0,opacity:Number.isFinite(e.opacity)?e.opacity:1,color:e.color||"black",blur:Number.isFinite(e.blur)?e.blur:4})},grayscale:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Rr('<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-t),b:.7152-.7152*(1-t),c:.0722-.0722*(1-t),d:.2126-.2126*(1-t),e:.7152+.2848*(1-t),f:.0722-.0722*(1-t),g:.2126-.2126*(1-t),h:.0722+.9278*(1-t)})},sepia:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Rr('<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-t),b:.769-.769*(1-t),c:.189-.189*(1-t),d:.349-.349*(1-t),e:.686+.314*(1-t),f:.168-.168*(1-t),g:.272-.272*(1-t),h:.534-.534*(1-t),i:.131+.869*(1-t)})},saturate:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Rr('<filter><feColorMatrix type="saturate" values="${amount}"/></filter>')({amount:1-t})},hueRotate:function(e){return Rr('<filter><feColorMatrix type="hueRotate" values="${angle}"/></filter>')({angle:e.angle||0})},invert:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Rr('<filter><feComponentTransfer><feFuncR type="table" tableValues="${amount} ${amount2}"/><feFuncG type="table" tableValues="${amount} ${amount2}"/><feFuncB type="table" tableValues="${amount} ${amount2}"/></feComponentTransfer></filter>')({amount:t,amount2:1-t})},brightness:function(e){return Rr('<filter><feComponentTransfer><feFuncR type="linear" slope="${amount}"/><feFuncG type="linear" slope="${amount}"/><feFuncB type="linear" slope="${amount}"/></feComponentTransfer></filter>')({amount:Number.isFinite(e.amount)?e.amount:1})},contrast:function(e){var t=Number.isFinite(e.amount)?e.amount:1;return Rr('<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:t,amount2:.5-t/2})}},Rr=function(e){var t=/<%= ([^ ]+) %>|\$\{ ?([^{} ]+) ?\}|\{\{([^{} ]+)\}\}/g;return function(n){return n=n||{},e.replace(t,function(e){for(var t=Array.from(arguments).slice(1,4).find(function(e){return!!e}).split("."),r=n[t.shift()];void 0!==r&&t.length;)r=r[t.shift()];return void 0!==r?r:""})}},Dr=(pt.assign,pt.defaults,pt.defaultsDeep,pt.assign),jr=pt.defaults,Ir=pt.defaultsDeep,Fr=pt.invokeMap||pt.invoke,zr=pt.sortedIndexBy||pt.sortedIndex,Vr=pt.uniqBy||pt.uniq,Br=pt.clone,$r=pt.cloneDeep,Ur=pt.isEmpty,Hr=pt.isEqual,qr=pt.isFunction,Wr=pt.isPlainObject,Gr=pt.toArray,Yr=(pt.debounce,pt.groupBy),Xr=(pt.sortBy,pt.flattenDeep),Kr=pt.without,Jr=pt.difference,Qr=(pt.intersection,pt.union),Zr=pt.has,ei=pt.result,ti=pt.omit,ni=pt.pick,ri=(pt.bindAll,pt.forIn),ii=pt.camelCase,oi=pt.uniqueId,ai=function(){if(pt.mergeWith){var e=Array.from(arguments),t=e[e.length-1],n=qr(t)?t:ci;return e.push(function(e,t){var r=n(e,t);return void 0!==r?r:Array.isArray(e)&&!Array.isArray(t)?t:void 0}),pt.mergeWith.apply(this,e)}return pt.merge.apply(this,arguments)},si=function(e){return!!e&&("object"==typeof e||"function"==typeof e)},li=function(e){var t=Object.prototype.toString;return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"===t.call(e)},ui=function(e){var t=Object.prototype.toString;return"string"==typeof e||!!e&&"object"==typeof e&&"[object String]"===t.call(e)},ci=function(){};function fi(e){e=Vr(e);const t=Gr(e).reduce(function(e,t){return e[t.id]=t.clone(),e},{});return Gr(e).forEach(function(e){const n=t[e.id];if(n.isLink()){const e=n.source(),r=n.target();e.id&&t[e.id]&&n.prop("source/id",t[e.id].id),r.id&&t[r.id]&&n.prop("target/id",t[r.id].id)}const r=e.get("parent");r&&t[r]&&n.set("parent",t[r].id);const i=Gr(e.get("embeds")).reduce(function(e,n){return t[n]&&e.push(t[n].id),e},[]);Ur(i)||n.set("embeds",i)}),t}const hi={x:"x",y:"y",width:"w",height:"h",minimum:"s",maximum:"l",diagonal:"d"},di=Object.keys(hi).map(e=>hi[e]).join(""),pi="[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?",gi=/\s/g,vi=new RegExp(`^(${pi}\\*)?([${di}])([-+]{1,2}${pi})?$`,"g");function mi(e){throw new Error(`Invalid calc() expression: ${e}`)}function yi(e,t){const n=vi.exec(e.replace(gi,""));n||mi(e),vi.lastIndex=0;const[,r=1,i,o=0]=n,{x:a,y:s,width:l,height:u}=t;let c=0;switch(i){case hi.width:c=l;break;case hi.height:c=u;break;case hi.x:c=a;break;case hi.y:c=s;break;case hi.minimum:c=Math.min(u,l);break;case hi.maximum:c=Math.max(u,l);break;case hi.diagonal:c=Math.sqrt(u*u+l*l)}return parseFloat(r)*c+function(e){if(!e)return 0;const[t]=e;switch(t){case"+":return parseFloat(e.substr(1));case"-":return-parseFloat(e.substr(1))}return parseFloat(e)}(o)}function bi(e){return"string"==typeof e&&e.includes("calc")}function wi(e,t){let n=e,r=0;for(;;){let e=n.indexOf("calc(",r);if(-1===e)return n;let i=e+5,o=1;e:for(;;){switch(n[i]){case"(":o++;break;case")":if(o--,0===o)break e;break;case void 0:mi(n)}i++}let a=n.slice(e+5,i);bi(a)&&(a=wi(a,t));const s=String(yi(a,t));n=n.slice(0,e)+s+n.slice(i+1),r=e+s.length}}function xi(e,t){return function(n,r){var i=Ar(n);n=parseFloat(n),i&&(n/=100);var o={};if(isFinite(n)){var a=i||n>=0&&n<=1?n*r[t]:Math.max(n+r[t],0);o[e]=a}return o}}function ki(e,t,n){return function(r,i){var o,a=Ar(r);if(r=parseFloat(r),a&&(r/=100),isFinite(r)){var s=i[n]();o=a||r>0&&r<1?s[e]+i[t]*r:s[e]+r}var l=$t();return l[e]=o||0,l}}function Si(e,t,n){return function(r,i){var o;o="middle"===r?i[t]/2:r===n?i[t]:isFinite(r)?r>-1&&r<1?-i[t]*r:-r:Ar(r)?i[t]*parseFloat(r)/100:0;var a=$t();return a[e]=-(i[e]+o),a}}function _i(e,t){var n="joint-shape",r=t&&t.resetOffset;return function(t,i,o){var a=gt(o),s=a.data(n);if(!s||s.value!==t){var l=e(t);s={value:t,shape:l,shapeBBox:l.bbox()},a.data(n,s)}var u=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 u.scale(p,g,f),r&&u.translate(-f.x,-f.y),u}}function Ei(e){var t=_i(function(e){return new wn(hr.normalizePathData(e))},e);return function(e,n,r){return{d:t(e,n,r).serialize()}}}function Ci(e){var t=_i(hn,e);return function(e,n,r){return{points:t(e,n,r).serialize()}}}function Ai(e,t){var n=new $t(1,0);return function(r){var i,o,a=this[e](r);return a?(o=t.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 Pi(e){return function(t,n,r){const i=hr(r);i.attr(e)!==t&&i.attr(e,t)}}function Li(e,t,n){return void 0!==n.text}function Ti(){return this.model.isLink()}function Ni(e){var t={},n=e.stroke;"string"==typeof n&&(t.stroke=n,t.fill=n);var r=e.strokeOpacity;return void 0===r&&(r=e["stroke-opacity"]),void 0===r&&(r=e.opacity),void 0!==r&&(t["stroke-opacity"]=r,t["fill-opacity"]=r),t}function Oi(e){const{paper:t}=this;return`url(#${"pattern"===e.type?t.definePattern(e):t.defineGradient(e)})`}const Mi={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:Pi("href")},xlinkHref:{set:Pi("xlink:href")},filter:{qualify:Wr,set:function(e){return"url(#"+this.paper.defineFilter(e)+")"}},fill:{qualify:Wr,set:Oi},stroke:{qualify:Wr,set:Oi},sourceMarker:{qualify:Wr,set:function(e,t,n,r){return e=Dr(Ni(r),e),{"marker-start":"url(#"+this.paper.defineMarker(e)+")"}}},targetMarker:{qualify:Wr,set:function(e,t,n,r){return e=Dr(Ni(r),{transform:"rotate(180)"},e),{"marker-end":"url(#"+this.paper.defineMarker(e)+")"}}},vertexMarker:{qualify:Wr,set:function(e,t,n,r){return e=Dr(Ni(r),e),{"marker-mid":"url(#"+this.paper.defineMarker(e)+")"}}},text:{qualify:function(e,t,n){return!n.textWrap||!Wr(n.textWrap)},set:function(e,t,n,r){var i=gt(n),o="joint-text",a=i.data(o),s=ni(r,"lineHeight","annotations","textPath","x","textVerticalAnchor","eol","displayEmpty");const{x:l}=s;bi(l)&&(s.x=wi(l,t));var u=s.fontSize=r["font-size"]||r.fontSize,c=JSON.stringify([e,s]);if(void 0===a||a!==c){u&&n.setAttribute("font-size",u);var f=s.textPath;if(si(f)){var h=f.selector;if("string"==typeof h){var d=this.findBySelector(h)[0];d instanceof SVGPathElement&&(s.textPath=Dr({"xlink:href":"#"+d.id},f))}}hr(n).text(""+e,s),i.data(o,c)}}},textWrap:{qualify:Wr,set:function(e,t,n,r){var i=e.width||0,o={};Ar(i)?o.width=t.width*parseFloat(i)/100:o.width=i<=0?t.width+i:i;var a,s=e.height||0;Ar(s)?o.height=t.height*parseFloat(s)/100:o.height=s<=0?t.height+s:s;var l=e.text;void 0===l&&(l=r.text),a=void 0!==l?Lr(""+l,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:e.ellipsis,hyphen:e.hyphen,maxLineCount:e.maxLineCount}):"",Mi.text.set.call(this,a,t,n,r)}},title:{qualify:function(e,t){return t instanceof SVGElement},set:function(e,t,n){var r=gt(n),i="joint-title",o=r.data(i);if(void 0===o||o!==e){r.data(i,e);var a=n.firstChild;if(a&&"TITLE"===a.tagName.toUpperCase())a.textContent=e;else{var s=document.createElementNS(n.namespaceURI,"title");s.textContent=e,n.insertBefore(s,a)}}}},lineHeight:{qualify:Li},textVerticalAnchor:{qualify:Li},textPath:{qualify:Li},annotations:{qualify:Li},eol:{qualify:Li},displayEmpty:{qualify:Li},port:{set:function(e){return null===e||void 0===e.id?e:e.id}},style:{qualify:Wr,set:function(e,t,n){gt(n).css(e)}},html:{set:function(e,t,n){gt(n).html(e+"")}},ref:{},refX:{position:ki("x","width","origin")},refY:{position:ki("y","height","origin")},refDx:{position:ki("x","width","corner")},refDy:{position:ki("y","height","corner")},refWidth:{set:xi("width","width")},refHeight:{set:xi("height","height")},refRx:{set:xi("rx","width")},refRy:{set:xi("ry","height")},refRInscribed:{set:(Ri=xi("r","width"),Di=xi("r","height"),function(e,t){return(t.height>t.width?Ri:Di)(e,t)})},refRCircumscribed:{set:function(e,t){var n=Ar(e);e=parseFloat(e),n&&(e/=100);var r,i=Math.sqrt(t.height*t.height+t.width*t.width);return isFinite(e)&&(r=n||e>=0&&e<=1?e*i:Math.max(e+i,0)),{r}}},refCx:{set:xi("cx","width")},refCy:{set:xi("cy","height")},xAlignment:{offset:Si("x","width","right")},yAlignment:{offset:Si("y","height","bottom")},resetOffset:{offset:function(e,t){return e?{x:-t.x,y:-t.y}:{x:0,y:0}}},refDResetOffset:{set:Ei({resetOffset:!0})},refDKeepOffset:{set:Ei({resetOffset:!1})},refPointsResetOffset:{set:Ci({resetOffset:!0})},refPointsKeepOffset:{set:Ci({resetOffset:!1})},connection:{qualify:Ti,set:function({stubs:e=0}){let t;if(isFinite(e)&&0!==e){let n;n=e<0?(this.getConnectionLength()+e)/2:e;const r=this.getConnection(),i=r.divideAtLength(n),o=r.divideAtLength(-n);i&&o&&(t=`${i[0].serialize()} ${o[1].serialize()}`)}return{d:t||this.getSerializedConnection()}}},atConnectionLengthKeepGradient:{qualify:Ti,set:Ai("getTangentAtLength",{rotate:!0})},atConnectionLengthIgnoreGradient:{qualify:Ti,set:Ai("getTangentAtLength",{rotate:!1})},atConnectionRatioKeepGradient:{qualify:Ti,set:Ai("getTangentAtRatio",{rotate:!0})},atConnectionRatioIgnoreGradient:{qualify:Ti,set:Ai("getTangentAtRatio",{rotate:!1})}};var Ri,Di;Mi["xlink:href"]=Mi.xlinkHref,["transform","d","points","width","height","cx","cy","r","rx","ry","x1","x2","y1","y2","x","y","dx","dy"].forEach(e=>{Mi[e]={qualify:bi,set:function(t,n){return{[e]:wi(t,n)}}}}),Mi.refR=Mi.refRInscribed,Mi.refD=Mi.refDResetOffset,Mi.refPoints=Mi.refPointsResetOffset,Mi.atConnectionLength=Mi.atConnectionLengthKeepGradient,Mi.atConnectionRatio=Mi.atConnectionRatioKeepGradient,Mi.refX2=Mi.refX,Mi.refY2=Mi.refY,Mi.refWidth2=Mi.refWidth,Mi.refHeight2=Mi.refHeight,Mi["ref-x"]=Mi.refX,Mi["ref-y"]=Mi.refY,Mi["ref-dy"]=Mi.refDy,Mi["ref-dx"]=Mi.refDx,Mi["ref-width"]=Mi.refWidth,Mi["ref-height"]=Mi.refHeight,Mi["x-alignment"]=Mi.xAlignment,Mi["y-alignment"]=Mi.yAlignment;const ji=Mi,Ii=dt.Model.extend({constructor:function(e,t){var n,r=e||{};"function"==typeof this.preinitialize&&this.preinitialize.apply(this,arguments),this.cid=oi("c"),this.attributes={},t&&t.collection&&(this.collection=t.collection),t&&t.parse&&(r=this.parse(r,t)||{}),(n=ei(this,"defaults"))&&(r=ai({},n,r)),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)},translate:function(e,t,n){throw new Error("Must define a translate() method.")},toJSON:function(){const e=ei(this.constructor.prototype,"defaults").attrs||{},t=this.attributes.attrs,n={};ri(t,function(t,r){const i=e[r];ri(t,function(e,t){si(e)&&!Array.isArray(e)?ri(e,function(e,o){i&&i[t]&&Hr(i[t][o],e)||(n[r]=n[r]||{},(n[r][t]||(n[r][t]={}))[o]=e)}):i&&Hr(i[t],e)||(n[r]=n[r]||{},n[r][t]=e)})});const r=$r(ti(this.attributes,"attrs"));return r.attrs=n,r},initialize:function(e){const t=this.getIdAttribute();e&&t in e||this.set(t,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(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},processPorts:function(){var e=this.ports,t={};ri(this.get("attrs"),function(e,n){e&&e.port&&(void 0!==e.port.id?t[e.port.id]=e.port:t[e.port]={id:e.port})});var n={};ri(e,function(e,r){t[r]||(n[r]=!0)}),this.graph&&!Ur(n)&&(this.graph.getConnectedLinks(this,{inbound:!0}).forEach(function(e){n[e.get("target").port]&&e.remove()}),this.graph.getConnectedLinks(this,{outbound:!0}).forEach(function(e){n[e.get("source").port]&&e.remove()})),this.ports=t},remove:function(e={}){const{graph:t,collection:n}=this;if(!t)return n&&n.remove(this,e),this;t.startBatch("remove");const r=this.getParentCell();r&&r.unembed(this,e);const i=this.getEmbeddedCells();for(let t=0,n=i.length;t<n;t++){const n=i[t];n&&n.remove(e)}return this.trigger("remove",this,t.attributes.cells,e),t.stopBatch("remove"),this},toFront:function(e){var t=this.graph;if(t){e=e||{};var n,r=t.maxZIndex();e.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:!1!==e.breadthFirst})).unshift(this):n=[this],r=r-n.length+1;var i=t.get("cells"),o=i.indexOf(this)!==i.length-n.length;o||(o=n.some(function(e,t){return e.get("z")!==r+t})),o&&(this.startBatch("to-front"),r+=n.length,n.forEach(function(t,n){t.set("z",r+n,e)}),this.stopBatch("to-front"))}return this},toBack:function(e){var t=this.graph;if(t){e=e||{};var n,r=t.minZIndex();e.deep?(n=this.getEmbeddedCells({deep:!0,breadthFirst:!1!==e.breadthFirst})).unshift(this):n=[this];var i=0!==t.get("cells").indexOf(this);i||(i=n.some(function(e,t){return e.get("z")!==r+t})),i&&(this.startBatch("to-back"),r-=n.length,n.forEach(function(t,n){t.set("z",r+n,e)}),this.stopBatch("to-back"))}return this},parent:function(e,t){return void 0===e?this.get("parent"):this.set("parent",e,t)},embed:function(e,t){const n=Array.isArray(e)?e:[e];if(!this.canEmbed(n))throw new Error("Recursive embedding not allowed.");return this._embedCells(n,t),this},unembed:function(e,t){const n=Array.isArray(e)?e:[e];return this._unembedCells(n,t),this},canEmbed:function(e){return(Array.isArray(e)?e:[e]).every(e=>this!==e&&!this.isEmbeddedIn(e))},_embedCells:function(e,t){const n="embed";this.startBatch(n);const r=Dr([],this.get("embeds"));e.forEach(e=>{r[e.isLink()?"unshift":"push"](e.id),e.parent(this.id,t)}),this.set("embeds",Vr(r),t),this.stopBatch(n)},_unembedCells:function(e,t){const n="unembed";this.startBatch(n),e.forEach(e=>e.unset("parent",t)),this.set("embeds",Kr(this.get("embeds"),...e.map(e=>e.id)),t),this.stopBatch(n)},getParentCell:function(){var e=this.parent(),t=this.graph;return e&&t&&t.getCell(e)||null},getAncestors:function(){var e=[];if(!this.graph)return e;for(var t=this.getParentCell();t;)e.push(t),t=t.getParentCell();return e},getEmbeddedCells:function(e){if(e=e||{},this.graph){var t;if(e.deep)if(e.breadthFirst){t=[];for(var n=this.getEmbeddedCells();n.length>0;){var r=n.shift();t.push(r),n.push.apply(n,r.getEmbeddedCells())}}else(t=this.getEmbeddedCells()).forEach(function(n){t.push.apply(t,n.getEmbeddedCells(e))});else t=Gr(this.get("embeds")).map(this.graph.getCell,this.graph);return t}return[]},isEmbeddedIn:function(e,t){var n=ui(e)?e:e.id,r=this.parent();if(t=jr({deep:!0},t),this.graph&&t.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(e){if((e=e||{}).deep)return Gr(fi([this].concat(this.getEmbeddedCells({deep:!0}))));var t=dt.Model.prototype.clone.apply(this,arguments);return t.set(this.getIdAttribute(),this.generateId()),t.unset("embeds"),t.unset("parent"),t},prop:function(e,t,n){var r=ui(e);if(r||Array.isArray(e)){if(arguments.length>1){var i,o;r?o=(i=e).split("/"):(i=e.join("/"),o=e.slice());var a=o[0],s=o.length;if((n=n||{}).propertyPath=i,n.propertyValue=t,n.propertyPathArray=o,1===s)return this.set(a,t,n);for(var l={},u=l,c=a,f=1;f<s;f++){var h=o[f],d=Number.isFinite(r?Number(h):h);u=u[c]=d?[]:{},c=h}l=wr(l,o,t,"/");var p=ai({},this.attributes);n.rewrite&&xr(p,i,"/");var g=ai(p,l);return this.set(a,g[a],n)}return yr(this.attributes,e,"/")}return this.set(ai({},this.attributes,e),t)},removeProp:function(e,t){t=t||{};var n=Array.isArray(e)?e:e.split("/"),r=n[0];if("attrs"===r&&(t.dirty=!0),1===n.length)return this.unset(e,t);var i=n.slice(1),o=$r(this.get(r));return xr(o,i,"/"),this.set(r,o,t)},attr:function(e,t,n){var r=Array.from(arguments);return 0===r.length?this.get("attrs"):(Array.isArray(e)?r[0]=["attrs"].concat(e):ui(e)?r[0]="attrs/"+e:r[0]={attrs:e},this.prop.apply(this,r))},removeAttr:function(e,t){return Array.isArray(e)?this.removeProp(["attrs"].concat(e)):this.removeProp("attrs/"+e,t)},transition:function(e,t,n,r){r=r||"/",n=Dr({duration:100,delay:10,timingFunction:Nr.linear,valueFunction:Or.number},n);var i,o=0,a=function(t){var r,s,l;(s=(t-=o=o||t)/n.duration)<1?this._transitionIds[e]=r=Er(a):(s=1,delete this._transitionIds[e]),l=i(n.timingFunction(s)),n.transitionId=r,this.prop(e,l,n),r||this.trigger("transition:end",this,e)}.bind(this);const{_scheduledTransitionIds:s}=this;let l;return l=setTimeout(o=>{s[e]&&(s[e]=Kr(s[e],l),0===s[e].length&&delete s[e]),this.stopPendingTransitions(e,r),i=n.valueFunction(yr(this.attributes,e,r),t),this._transitionIds[e]=Er(o),this.trigger("transition:start",this,e)},n.delay,a),s[e]||(s[e]=[]),s[e].push(l),l},getTransitions:function(){return Qr(Object.keys(this._transitionIds),Object.keys(this._scheduledTransitionIds))},stopScheduledTransitions:function(e,t="/"){const{_scheduledTransitionIds:n={}}=this;let r=Object.keys(n);if(e){const n=e.split(t);r=r.filter(e=>Hr(n,e.split(t).slice(0,n.length)))}return r.forEach(e=>{n[e].forEach(e=>clearTimeout(e)),delete n[e]}),this},stopPendingTransitions(e,t="/"){const{_transitionIds:n={}}=this;let r=Object.keys(n);if(e){const n=e.split(t);r=r.filter(e=>Hr(n,e.split(t).slice(0,n.length)))}r.forEach(e=>{const t=n[e];Cr(t),delete n[e],this.trigger("transition:end",this,e)})},stopTransitions:function(e,t="/"){return this.stopScheduledTransitions(e,t),this.stopPendingTransitions(e,t),this},addTo:function(e,t){return e.addCell(this,t),this},findView:function(e){return e.findViewByModel(this)},isElement:function(){return!1},isLink:function(){return!1},startBatch:function(e,t){return this.graph&&this.graph.startBatch(e,Dr({},t,{cell:this})),this},stopBatch:function(e,t){return this.graph&&this.graph.stopBatch(e,Dr({},t,{cell:this})),this},getChangeFlag:function(e){var t=0;if(!e)return t;for(var n in e)e.hasOwnProperty(n)&&this.hasChanged(n)&&(t|=e[n]);return t},angle:function(){return 0},position:function(){return new $t(0,0)},getPointFromConnectedLink:function(){return new $t},getBBox:function(){return new sn(0,0,0,0)},getPointRotatedAroundCenter(e,t,n){const r=new $t(t,n);return e&&r.rotate(this.getBBox().center(),e),r},getAbsolutePointFromRelative(e,t){return this.getPointRotatedAroundCenter(-this.angle(),this.position().offset(e,t))},getRelativePointFromAbsolute(e,t){return this.getPointRotatedAroundCenter(this.angle(),e,t).difference(this.position())}},{getAttributeDefinition:function(e){var t=this.attributes,n=ji;return t&&t[e]||n[e]},define:function(e,t,n,r){n=Dr({defaults:Ir({type:e},t,this.prototype.defaults)},n);var i=this.extend(n,r);return"undefined"!=typeof joint&&Zr(joint,"shapes")&&wr(joint.shapes,e,i,"."),i}}),Fi=Ii.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(e){return this.set({source:{x:0,y:0},target:{x:0,y:0}},e)},source:function(e,t,n){return void 0===e?Br(this.get("source")):e instanceof Ii?((r=Br(t)||{}).id=e.id,i=n,this.set("source",r,i)):Wr(e)?(r=e,i=t,this.set("source",r,i)):((r=Br(t)||{}).x=e.x,r.y=e.y,i=n,this.set("source",r,i));var r,i},target:function(e,t,n){return void 0===e?Br(this.get("target")):e instanceof Ii?((r=Br(t)||{}).id=e.id,i=n,this.set("target",r,i)):Wr(e)?(r=e,i=t,this.set("target",r,i)):((r=Br(t)||{}).x=e.x,r.y=e.y,i=n,this.set("target",r,i));var r,i},router:function(e,t,n){if(void 0===e){var r=this.get("router");return r?"object"==typeof r?Br(r):r:this.get("manhattan")?{name:"orthogonal"}:null}var i="object"==typeof e||"function"==typeof e,o=i?e:{name:e,args:t},a=i?t:n;return this.set("router",o,a)},connector:function(e,t,n){if(void 0===e){var r=this.get("connector");return r?"object"==typeof r?Br(r):r:this.get("smooth")?{name:"smooth"}:null}var i="object"==typeof e||"function"==typeof e,o=i?e:{name:e,args:t},a=i?t:n;return this.set("connector",o,a)},label:function(e,t,n){var r=this.labels();return(e=isFinite(e)&&null!==e?0|e:0)<0&&(e=r.length+e),arguments.length<=1?this.prop(["labels",e]):this.prop(["labels",e],t,n)},labels:function(e,t){return 0===arguments.length?(e=this.get("labels"),Array.isArray(e)?e.slice():[]):(Array.isArray(e)||(e=[]),this.set("labels",e,t))},hasLabels:function(){const{labels:e}=this.attributes;return Array.isArray(e)&&e.length>0},insertLabel:function(e,t,n){if(!t)throw new Error("dia.Link: no label provided");var r=this.labels(),i=r.length;return(e=isFinite(e)&&null!==e?0|e:i)<0&&(e=i+e+1),r.splice(e,0,t),this.labels(r,n)},appendLabel:function(e,t){return this.insertLabel(-1,e,t)},removeLabel:function(e,t){var n=this.labels();return e=isFinite(e)&&null!==e?0|e:-1,n.splice(e,1),this.labels(n,t)},vertex:function(e,t,n){var r=this.vertices();if((e=isFinite(e)&&null!==e?0|e:0)<0&&(e=r.length+e),arguments.length<=1)return this.prop(["vertices",e]);var i=this._normalizeVertex(t);return this.prop(["vertices",e],i,n)},vertices:function(e,t){if(0===arguments.length)return e=this.get("vertices"),Array.isArray(e)?e.slice():[];Array.isArray(e)||(e=[]);for(var n=[],r=0;r<e.length;r++){var i=e[r],o=this._normalizeVertex(i);n.push(o)}return this.set("vertices",n,t)},insertVertex:function(e,t,n){if(!t)throw new Error("dia.Link: no vertex provided");var r=this.vertices(),i=r.length;(e=isFinite(e)&&null!==e?0|e:i)<0&&(e=i+e+1);var o=this._normalizeVertex(t);return r.splice(e,0,o),this.vertices(r,n)},removeVertex:function(e,t){var n=this.vertices();return e=isFinite(e)&&null!==e?0|e:-1,n.splice(e,1),this.vertices(n,t)},_normalizeVertex:function(e){return Wr(e)?e:{x:e.x,y:e.y}},translate:function(e,t,n){return(n=n||{}).translateBy=n.translateBy||this.id,n.tx=e,n.ty=t,this.applyToPoints(function(n){return{x:(n.x||0)+e,y:(n.y||0)+t}},n)},scale:function(e,t,n,r){return this.applyToPoints(function(r){return $t(r).scale(e,t,n).toJSON()},r)},applyToPoints:function(e,t){if(!qr(e))throw new TypeError("dia.Link: applyToPoints expects its first parameter to be a function.");var n={},{source:r,target:i}=this.attributes;r.id||(n.source=e(r)),i.id||(n.target=e(i));var o=this.vertices();return o.length>0&&(n.vertices=o.map(e)),this.set(n,t)},getSourcePoint:function(){var e=this.getSourceCell();return e?e.getPointFromConnectedLink(this,"source"):new $t(this.source())},getTargetPoint:function(){var e=this.getTargetCell();return e?e.getPointFromConnectedLink(this,"target"):new $t(this.target())},getPointFromConnectedLink:function(){return this.getPolyline().pointAt(.5)},getPolyline:function(){const e=[this.getSourcePoint(),...this.vertices().map($t),this.getTargetPoint()];return new hn(e)},getBBox:function(){return this.getPolyline().bbox()},reparent:function(e){var t;if(this.graph){var n=this.getSourceElement(),r=this.getTargetElement(),i=this.getParentCell();n&&r&&(t=n===r||n.isEmbeddedIn(r)?r:r.isEmbeddedIn(n)?n:this.graph.getCommonAncestor(n,r)),!i||t&&t.id===i.id||i.unembed(this,e),t&&t.embed(this,e)}return t},hasLoop:function(e){e=e||{};var{source:t,target:n}=this.attributes,r=t.id,i=n.id;if(!r||!i)return!1;var o=r===i;if(!o&&e.deep&&this.graph){var a=this.getSourceCell(),s=this.getTargetCell();o=a.isEmbeddedIn(s)||s.isEmbeddedIn(a)}return o},getSourceCell:function(){const{graph:e,attributes:t}=this;var n=t.source;return n&&n.id&&e&&e.getCell(n.id)||null},getSourceElement:function(){var e=this,t={};do{if(t[e.id])return null;t[e.id]=!0,e=e.getSourceCell()}while(e&&e.isLink());return e},getTargetCell:function(){const{graph:e,attributes:t}=this;var n=t.target;return n&&n.id&&e&&e.getCell(n.id)||null},getTargetElement:function(){var e=this,t={};do{if(t[e.id])return null;t[e.id]=!0,e=e.getTargetCell()}while(e&&e.isLink());return e},getRelationshipAncestor:function(){var e;if(this.graph){var t=[this,this.getSourceElement(),this.getTargetElement()].filter(function(e){return!!e});e=this.graph.getCommonAncestor.apply(this.graph,t)}return e||null},isRelationshipEmbeddedIn:function(e){var t=ui(e)||li(e)?e:e.id,n=this.getRelationshipAncestor();return!!n&&(n.id===t||n.isEmbeddedIn(t))},_getDefaultLabel:function(){var e=this.get("defaultLabel")||this.defaultLabel||{},t={};return t.markup=e.markup||this.get("labelMarkup")||this.labelMarkup,t.position=e.position,t.attrs=e.attrs,t.size=e.size,t}},{endsEqual:function(e,t){var n=e.port===t.port||!e.port&&!t.port;return e.id===t.id&&n}});function zi(e,t,n){var r=e.toJSON();return r.angle=t||0,jr({},n,r)}function Vi(e,t,n){return e.map(function(e,t,n){var r=this.pointAt((t+.5)/n.length);return(e.dx||e.dy)&&r.offset(e.dx||0,e.dy||0),zi(r.round(),0,e)},Gt(t,n))}function Bi(e,t,n,r){var i=t.center(),o=t.width/t.height,a=t.topMiddle(),s=Jt.fromRect(t);return e.map(function(e,t,l){var u=n+r(t,l.length),c=a.clone().rotate(i,-u).scale(o,1,i),f=e.compensateRotation?-s.tangentTheta(c):0;return(e.dx||e.dy)&&c.offset(e.dx||0,e.dy||0),e.dr&&c.move(i,e.dr),zi(c.round(),f,e)})}function $i(e,t){var n=t.x;ui(n)&&(n=parseFloat(n)/100*e.width);var r=t.y;return ui(r)&&(r=parseFloat(r)/100*e.height),Ut(n||0,r||0)}const Ui=function(e,t,n){return e.map($i.bind(null,t))},Hi=function(e,t,n){return n.fn(e,t,n)},qi=function(e,t,n){return Vi(e,$i(t,n.start||t.origin()),$i(t,n.end||t.corner()))},Wi=function(e,t,n){return Vi(e,t.origin(),t.bottomLeft())},Gi=function(e,t,n){return Vi(e,t.topRight(),t.corner())},Yi=function(e,t,n){return Vi(e,t.origin(),t.topRight())},Xi=function(e,t,n){return Vi(e,t.bottomLeft(),t.corner())},Ki=function(e,t,n){var r=n.startAngle||0,i=n.step||360/e.length;return Bi(e,t,r,function(e){return e*i})},Ji=function(e,t,n){var r=n.startAngle||0,i=n.step||20;return Bi(e,t,r,function(e,t){return(e+.5-t/2)*i})};function Qi(e,t){return Ir({},e,t,{x:0,y:0,angle:0,attrs:{".":{y:"0","text-anchor":"start"}}})}function Zi(e,t,n,r){r=jr({},r,{offset:15});var i,o,a,s,l=t.center().theta(e),u=eo(t),c=r.offset,f=0;l<u[1]||l>u[2]?(a=".3em",i=c,o=0,s="start"):l<u[0]?(a="0",i=0,o=-c,n?(f=-90,s="start"):s="middle"):l<u[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 Qi({x:h(i),y:h(o),angle:f,attrs:{".":{y:a,"text-anchor":s}}})}function eo(e){var t=e.center(),n=t.theta(e.origin()),r=t.theta(e.bottomLeft()),i=t.theta(e.corner());return[n,t.theta(e.topRight()),i,r]}function to(e,t,n,r){var i,o,a,s,l=t.center().theta(e),u=(r=jr({},r,{offset:15})).offset,c=0,f=eo(t);l<f[1]||l>f[2]?(a=".3em",i=-u,o=0,s="end"):l<f[0]?(a=".6em",i=0,o=u,n?(c=90,s="start"):s="middle"):l<f[3]?(a=".3em",i=u,o=0,s="start"):(a="0em",i=0,o=-u,n?(c=-90,s="start"):s="middle");var h=Math.round;return Qi({x:h(i),y:h(o),angle:c,attrs:{".":{y:a,"text-anchor":s}}})}function no(e,t,n){n=jr({},n,{offset:20});var r,i=Ut(0,0),o=-e.theta(i),a=o,s=e.clone().move(i,n.offset).difference(e).round(),l=".3em";(o+90)%180==0?(r=t?"end":"middle",t||-270!==o||(l="0em")):o>-270&&o<-90?(r="start",a=o-180):r="end";var u=Math.round;return Qi({x:u(s.x),y:u(s.y),angle:t?a:0,attrs:{".":{y:l,"text-anchor":r}}})}const ro=function(e,t,n){return Qi(n,t)},io=function(e,t,n){return Qi(n,{x:-15,attrs:{".":{y:".3em","text-anchor":"end"}}})},oo=function(e,t,n){return Qi(n,{x:15,attrs:{".":{y:".3em","text-anchor":"start"}}})},ao=function(e,t,n){return Qi(n,{y:-15,attrs:{".":{"text-anchor":"middle"}}})},so=function(e,t,n){return Qi(n,{y:15,attrs:{".":{y:".6em","text-anchor":"middle"}}})},lo=function(e,t,n){return Zi(e,t,!0,n)},uo=function(e,t,n){return Zi(e,t,!1,n)},co=function(e,t,n){return to(e,t,!0,n)},fo=function(e,t,n){return to(e,t,!1,n)},ho=function(e,t,n){return no(e.difference(t.center()),!1,n)},po=function(e,t,n){return no(e.difference(t.center()),!0,n)};var go=function(e){var t=$r(e)||{};this.ports=[],this.groups={},this.portLayoutNamespace=i,this.portLabelLayoutNamespace=o,this._init(t)};go.prototype={getPorts:function(){return this.ports},getGroup:function(e){return this.groups[e]||{}},getPortsByGroup:function(e){return this.ports.filter(function(t){return t.group===e})},getGroupPortsMetrics:function(e,t){var n=this.getGroup(e),r=this.getPortsByGroup(e),i=n.position||{},o=i.name,a=this.portLayoutNamespace;a[o]||(o="left");var s=i.args||{},l=r.map(function(e){return e&&e.position&&e.position.args}),u=a[o](l,t,s),c={ports:r,result:[]};return Gr(u).reduce(function(e,n,r){var i=e.ports[r];return e.result.push({portId:i.id,portTransformation:n,labelTransformation:this._getPortLabelLayout(i,$t(n),t),portAttrs:i.attrs,portSize:i.size,labelSize:i.label.size}),e}.bind(this),c),c.result},_getPortLabelLayout:function(e,t,n){var r=this.portLabelLayoutNamespace,i=e.label.position.name||"left";return r[i]?r[i](t,n,e.label.position.args):null},_init:function(e){if(si(e.groups))for(var t=Object.keys(e.groups),n=0,r=t.length;n<r;n++){var i=t[n];this.groups[i]=this._evaluateGroup(e.groups[i])}for(var o=Gr(e.items),a=0,s=o.length;a<s;a++)this.ports.push(this._evaluatePort(o[a]))},_evaluateGroup:function(e){return ai(e,{position:this._getPosition(e.position,!0),label:this._getLabel(e,!0)})},_evaluatePort:function(e){var t=Dr({},e),n=this.getGroup(e.group);return t.markup=t.markup||n.markup,t.attrs=ai({},n.attrs,t.attrs),t.position=this._createPositionNode(n,t),t.label=ai({},n.label,this._getLabel(t)),t.z=this._getZIndex(n,t),t.size=Dr({},n.size,t.size),t},_getZIndex:function(e,t){return li(t.z)?t.z:li(e.z)||"auto"===e.z?e.z:"auto"},_createPositionNode:function(e,t){return ai({name:"left",args:{}},e.position,{args:t.args})},_getPosition:function(e,t){var n,r={};qr(e)?(n="fn",r.fn=e):ui(e)?n=e:void 0===e?n=t?"left":null:Array.isArray(e)?(n="absolute",r.x=e[0],r.y=e[1]):si(e)&&(n=e.name,Dr(r,e.args));var i={args:r};return n&&(i.name=n),i},_getLabel:function(e,t){var n=e.label||{},r=n;return r.position=this._getPosition(n.position,t),r}};const vo={_initializePorts:function(){this._createPortData(),this.on("change:ports",function(){this._processRemovedPort(),this._createPortData()},this)},_processRemovedPort:function(){var e=this.get("ports")||{},t={};Gr(e.items).forEach(function(e){t[e.id]=!0});var n=this.previous("ports")||{},r={};Gr(n.items).forEach(function(e){t[e.id]||(r[e.id]=!0)});var i=this.graph;i&&!Ur(r)&&(i.getConnectedLinks(this,{inbound:!0}).forEach(function(e){r[e.get("target").port]&&e.remove()}),i.getConnectedLinks(this,{outbound:!0}).forEach(function(e){r[e.get("source").port]&&e.remove()}))},hasPorts:function(){var e=this.prop("ports/items");return Array.isArray(e)&&e.length>0},hasPort:function(e){return-1!==this.getPortIndex(e)},getPorts:function(){return $r(this.prop("ports/items"))||[]},getGroupPorts:function(e){const t=Gr(this.prop(["ports","items"])).filter(t=>t.group===e);return $r(t)},getPort:function(e){return $r(Gr(this.prop("ports/items")).find(function(t){return t.id&&t.id===e}))},getPortsPositions:function(e){return this._portSettingsData.getGroupPortsMetrics(e,sn(this.size())).reduce(function(e,t){var n=t.portTransformation;return e[t.portId]={x:n.x,y:n.y,angle:n.angle},e},{})},getPortIndex:function(e){var t=si(e)?e.id:e;return this._isValidPortId(t)?Gr(this.prop("ports/items")).findIndex(function(e){return e.id===t}):-1},addPort:function(e,t){if(!si(e)||Array.isArray(e))throw new Error("Element: addPort requires an object.");var n=Dr([],this.prop("ports/items"));return n.push(e),this.prop("ports/items",n,t),this},insertPort:function(e,t,n){const r="number"==typeof e?e:this.getPortIndex(e);if(!si(t)||Array.isArray(t))throw new Error("dia.Element: insertPort requires an object.");const i=Dr([],this.prop("ports/items"));return i.splice(r,0,t),this.prop("ports/items",i,n),this},portProp:function(e,t,n,r){var i=this.getPortIndex(e);if(-1===i)throw new Error("Element: unable to find port with id "+e);var o=Array.prototype.slice.call(arguments,1);return Array.isArray(t)?o[0]=["ports","items",i].concat(t):ui(t)?o[0]=["ports/items/",i,"/",t].join(""):(o=["ports/items/"+i],Wr(t)&&(o.push(t),o.push(n))),this.prop.apply(this,o)},_validatePorts:function(){var e=this.get("ports")||{},t=[],n=Gr((e=e||{}).items);return n.forEach(function(e){"object"!=typeof e&&t.push("Element: invalid port ",e),this._isValidPortId(e.id)||(e.id=this.generatePortId())},this),Vr(n,"id").length!==n.length&&t.push("Element: found id duplicities in ports."),t},generatePortId:function(){return this.generateId()},_isValidPortId:function(e){return null!=e&&!si(e)},addPorts:function(e,t){return e.length&&this.prop("ports/items",Dr([],this.prop("ports/items")).concat(e),t),this},removePort:function(e,t){const n=t||{},r=this.getPortIndex(e);if(-1!==r){const e=Dr([],this.prop(["ports","items"]));e.splice(r,1),n.rewrite=!0,this.startBatch("port-remove"),this.prop(["ports","items"],e,n),this.stopBatch("port-remove")}return this},removePorts:function(e,t){let n,r;if(Array.isArray(e)){if(n=t||{},0===e.length)return this.this;r=Dr([],this.prop(["ports","items"])).filter(function(t){return!e.some(function(e){const n=si(e)?e.id:e;return t.id===n})})}else n=e||{},r=[];return this.startBatch("port-remove"),n.rewrite=!0,this.prop(["ports","items"],r,n),this.stopBatch("port-remove"),this},_createPortData:function(){var e,t=this._validatePorts();if(t.length>0)throw this.set("ports",this.previous("ports")),new Error(t.join(" "));this._portSettingsData&&(e=this._portSettingsData.getPorts()),this._portSettingsData=new go(this.get("ports"));var n=this._portSettingsData.getPorts();if(e){var r=n.filter(function(t){if(!e.find(function(e){return e.id===t.id}))return t}),i=e.filter(function(e){if(!n.find(function(t){return t.id===e.id}))return e});i.length>0&&this.trigger("ports:remove",this,i),r.length>0&&this.trigger("ports:add",this,r)}}},mo={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 e=[],t=this._getContainerElement(),n=0,r=t.node.childNodes.length;n<r;n++)e.push(t.node.childNodes[n]);var i=Yr(this.model._portSettingsData.getPorts(),"z"),o="auto";Gr(i[o]).forEach(function(n){var r=this._getPortElement(n);t.append(r),e.push(r)},this);for(var a=Object.keys(i),s=0;s<a.length;s++){var l=a[s];if(l!==o){var u=parseInt(l,10);this._appendPorts(i[l],u,e)}}this._updatePorts()},_getContainerElement:function(){return this.rotatableNode||this.vel},_appendPorts:function(e,t,n){var r=this._getContainerElement(),i=Gr(e).map(this._getPortElement,this);n[t]||t<0?hr(n[Math.max(t,0)]).before(i):r.append(i)},_getPortElement:function(e){return this._portElementsCache[e.id]?this._portElementsCache[e.id].portElement:this._createPortElement(e)},findPortNode:function(e,t){const n=this._portElementsCache[e];if(!n)return null;const r=n.portContentElement.node,i=n.portContentSelectors,[o=null]=this.findBySelector(t,r,i);return o},_updatePorts:function(){this._updatePortGroup(void 0),Object.keys(this.model._portSettingsData.groups).forEach(this._updatePortGroup,this)},_removePorts:function(){Fr(this._portElementsCache,"portElement.remove")},_createPortElement:function(e){let t,n,r,i;var o=hr(this.portContainerMarkup).addClass("joint-port"),a=this._getPortMarkup(e);if(Array.isArray(a)){var s=this.parseDOMJSON(a,o.node),l=s.fragment;t=l.childNodes.length>1?hr("g").append(l):hr(l.firstChild),i=s.selectors}else t=hr(a),Array.isArray(t)&&(t=hr("g").append(t));if(!t)throw new Error("ElementView: Invalid port markup.");t.attr({port:e.id,"port-group":e.group});const u=this._getPortLabelMarkup(e.label);if(Array.isArray(u)){const{fragment:e,selectors:t}=this.parseDOMJSON(u,o.node),i=e.childNodes.length;i>0&&(r=t,n=1===i?hr(e.firstChild):hr("g").append(e))}else n=hr(u),Array.isArray(n)&&(n=hr("g").append(n));var c;if(i&&r){for(var f in r)if(i[f]&&f!==this.selector)throw new Error("ElementView: selectors within port must be unique.");c=Dr({},i,r)}else c=i||r;return o.append(t.addClass("joint-port-body")),n&&o.append(n.addClass("joint-port-label")),this._portElementsCache[e.id]={portElement:o,portLabelElement:n,portSelectors:c,portLabelSelectors:r,portContentElement:t,portContentSelectors:i},o},_updatePortGroup:function(e){for(var t=sn(this.model.size()),n=this.model._portSettingsData.getGroupPortsMetrics(e,t),r=0,i=n.length;r<i;r++){var o=n[r],a=o.portId,s=this._portElementsCache[a]||{},l=o.portTransformation;this.applyPortTransform(s.portElement,l),this.updateDOMSubtreeAttributes(s.portElement.node,o.portAttrs,{rootBBox:new sn(o.portSize),selectors:s.portSelectors});var u=o.labelTransformation;u&&s.portLabelElement&&(this.applyPortTransform(s.portLabelElement,u,-l.angle||0),this.updateDOMSubtreeAttributes(s.portLabelElement.node,u.attrs,{rootBBox:new sn(o.labelSize),selectors:s.portLabelSelectors}))}},applyPortTransform:function(e,t,n){var r=hr.createSVGMatrix().rotate(n||0).translate(t.x||0,t.y||0).rotate(t.angle||0);e.transform(r,{absolute:!0})},_getPortMarkup:function(e){return e.markup||this.model.get("portMarkup")||this.model.portMarkup||this.portMarkup},_getPortLabelMarkup:function(e){return e.markup||this.model.get("portLabelMarkup")||this.model.portLabelMarkup||this.portLabelMarkup}},yo=Ii.extend({defaults:{position:{x:0,y:0},size:{width:1,height:1},angle:0},initialize:function(){this._initializePorts(),Ii.prototype.initialize.apply(this,arguments)},_initializePorts:function(){},_refreshPorts:function(){},isElement:function(){return!0},position:function(e,t,n){const r=li(t);n=(r?n:e)||{};const{parentRelative:i,deep:o,restrictedArea:a}=n;let s;if(i){if(!this.graph)throw new Error("Element must be part of a graph.");const e=this.getParentCell();e&&!e.isLink()&&(s=e.get("position"))}if(r){if(s&&(e+=s.x,t+=s.y),o||a){const{x:r,y:i}=this.get("position");this.translate(e-r,t-i,n)}else this.set("position",{x:e,y:t},n);return this}{const e=$t(this.get("position"));return i?e.difference(s):e}},translate:function(e,t,n){if(t=t||0,0===(e=e||0)&&0===t)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+e,r.y+t,n);e=o.x-r.x,t=o.y-r.y}else{var a=this.getBBox({deep:!0}),s=r.x-a.x,l=r.y-a.y,u=Math.max(i.x+s,Math.min(i.x+i.width+s-a.width,r.x+e)),c=Math.max(i.y+l,Math.min(i.y+i.height+l-a.height,r.y+t));e=u-r.x,t=c-r.y}var f={x:r.x+e,y:r.y+t};return n.tx=e,n.ty=t,n.transition?(si(n.transition)||(n.transition={}),this.transition("position",f,Dr({},n.transition,{valueFunction:Or.object})),Fr(this.getEmbeddedCells(),"translate",e,t,n)):(this.startBatch("translate",n),this.set("position",f,n),Fr(this.getEmbeddedCells(),"translate",e,t,n),this.stopBatch("translate",n)),this},size:function(e,t,n){var r=this.get("size");return void 0===e?{width:r.width,height:r.height}:(si(e)&&(n=t,t=li(e.height)?e.height:r.height,e=li(e.width)?e.width:r.width),this.resize(e,t,n))},resize:function(e,t,n){if(n=n||{},this.startBatch("resize",n),n.direction){var r=this.get("size");switch(n.direction){case"left":case"right":t=r.height;break;case"top":case"bottom":e=r.width}var i,o=wt(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 l=a[["bottomLeft","corner","topRight","origin"][s]](),u=$t(l).rotate(a.center(),-o),c=Math.sqrt(e*e+t*t)/2,f=s*Math.PI/2;f+=Math.atan(s%2==0?t/e:e/t),f-=St(o);var h=$t.fromPolar(c,f,u);i=$t(h).offset(e/-2,t/-2)}else switch(i=a.topLeft(),n.direction){case"top":case"top-right":i.offset(0,a.height-t);break;case"left":case"bottom-left":i.offset(a.width-e,0);break;case"top-left":i.offset(a.width-e,a.height-t)}this.set("size",{width:e,height:t},n),this.position(i.x,i.y,n)}else this.set("size",{width:e,height:t},n);return this.stopBatch("resize",n),this},scale:function(e,t,n,r){var i=this.getBBox().scale(e,t,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(e={}){const{graph:t}=this;if(!t)throw new Error("Element must be part of a graph.");const n=this.getEmbeddedCells().filter(e=>e.isElement());if(0===n.length)return this;this.startBatch("fit-embeds",e),e.deep&&Fr(n,"fitEmbeds",e);const{left:r,right:i,top:o,bottom:a}=Tr(e.padding);let{x:s,y:l,width:u,height:c}=t.getCellsBBox(n);return s-=r,l-=o,u+=r+i,c+=a+o,this.set({position:{x:s,y:l},size:{width:u,height:c}},e),this.stopBatch("fit-embeds"),this},rotate:function(e,t,n,r){if(n){var i=this.getBBox().center(),o=this.get("size"),a=this.get("position");i.rotate(n,this.get("angle")-e);var s=i.x-o.width/2-a.x,l=i.y-o.height/2-a.y;this.startBatch("rotate",{angle:e,absolute:t,origin:n}),this.position(a.x+s,a.y+l,r),this.rotate(e,t,null,r),this.stopBatch("rotate")}else this.set("angle",t?e:(this.get("angle")+e)%360,r);return this},angle:function(){return wt(this.get("angle")||0)},getBBox:function(e={}){const{graph:t,attributes:n}=this,{deep:r,rotate:i}=e;if(r&&t){const n=this.getEmbeddedCells({deep:!0,breadthFirst:!0});return n.push(this),t.getCellsBBox(n,e)}const{angle:o=0,position:{x:a,y:s},size:{width:l,height:u}}=n,c=new sn(a,s,l,u);return i&&c.rotateAroundCenter(o),c},getPointFromConnectedLink:function(e,t){var n=this.getBBox(),r=n.center(),i=e.get(t);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),l=new $t(s[o]).offset(n.origin()),u=this.angle();return u&&l.rotate(r,-u),l}});Dr(yo.prototype,vo);const bo={cells:function(e){return function(){var t=Array.from(arguments),n=t.length,r=n>0&&t[0]||[],i=n>1&&t[n-1]||{};return Array.isArray(r)||(i instanceof Ii?r=t:r instanceof Ii&&(t.length>1&&t.pop(),r=t)),i instanceof Ii&&(i={}),e.call(this,r,i)}}},wo=dt.Collection.extend({initialize:function(e,t){t.cellNamespace?this.cellNamespace=t.cellNamespace:this.cellNamespace="undefined"!=typeof joint&&Zr(joint,"shapes")?joint.shapes:null,this.graph=t.graph},model:function(e,t){var n=t.collection,r=n.cellNamespace,i=new("link"===e.type?Fi:yr(r,e.type,".")||yo)(e,t);return t.dry||(i.graph=n.graph),i},comparator:function(e){return e.get("z")||0}}),xo=dt.Model.extend({initialize:function(e,t){var n=new wo([],{model:(t=t||{}).cellModel,cellNamespace:t.cellNamespace,graph:this});dt.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(e){if(e.isLink()){this._edges[e.id]=!0;var{source:t,target:n}=e.attributes;t.id&&((this._out[t.id]||(this._out[t.id]={}))[e.id]=!0),n.id&&((this._in[n.id]||(this._in[n.id]={}))[e.id]=!0)}else this._nodes[e.id]=!0},_restructureOnRemove:function(e){if(e.isLink()){delete this._edges[e.id];var{source:t,target:n}=e.attributes;t.id&&this._out[t.id]&&this._out[t.id][e.id]&&delete this._out[t.id][e.id],n.id&&this._in[n.id]&&this._in[n.id][e.id]&&delete this._in[n.id][e.id]}else delete this._nodes[e.id]},_restructureOnReset:function(e){e=e.models,this._out={},this._in={},this._nodes={},this._edges={},e.forEach(this._restructureOnAdd,this)},_restructureOnChangeSource:function(e){var t=e.previous("source");t.id&&this._out[t.id]&&delete this._out[t.id][e.id];var n=e.attributes.source;n.id&&((this._out[n.id]||(this._out[n.id]={}))[e.id]=!0)},_restructureOnChangeTarget:function(e){var t=e.previous("target");t.id&&this._in[t.id]&&delete this._in[t.id][e.id];var n=e.get("target");n.id&&((this._in[n.id]||(this._in[n.id]={}))[e.id]=!0)},getOutboundEdges:function(e){return this._out&&this._out[e]||{}},getInboundEdges:function(e){return this._in&&this._in[e]||{}},toJSON:function(){var e=dt.Model.prototype.toJSON.apply(this,arguments);return e.cells=this.get("cells").toJSON(),e},fromJSON:function(e,t){if(!e.cells)throw new Error("Graph JSON must contain cells array.");return this.set(e,t)},set:function(e,t,n){var r;return"object"==typeof e?(r=e,n=t):(r={})[e]=t,r.hasOwnProperty("cells")&&(this.resetCells(r.cells,n),r=ti(r,"cells")),dt.Model.prototype.set.call(this,r,n)},clear:function(e){e=Dr({},e,{clear:!0});var t=this.get("cells");if(0===t.length)return this;this.startBatch("clear",e);var n=t.sortBy(function(e){return e.isLink()?1:2});do{n.shift().remove(e)}while(n.length>0);return this.stopBatch("clear"),this},_prepareCell:function(e,t){var n;if(e instanceof dt.Model?(n=e.attributes,e.graph||t&&t.dry||(e.graph=this)):n=e,!ui(n.type))throw new TypeError("dia.Graph: cell type must be a string.");return e},minZIndex:function(){var e=this.get("cells").first();return e&&e.get("z")||0},maxZIndex:function(){var e=this.get("cells").last();return e&&e.get("z")||0},addCell:function(e,t){return Array.isArray(e)?this.addCells(e,t):(e instanceof dt.Model?e.has("z")||e.set("z",this.maxZIndex()+1):void 0===e.z&&(e.z=this.maxZIndex()+1),this.get("cells").add(this._prepareCell(e,t),t||{}),this)},addCells:function(e,t){return 0===e.length||(e=Xr(e),t.maxPosition=t.position=e.length-1,this.startBatch("add",t),e.forEach(function(e){this.addCell(e,t),t.position--},this),this.stopBatch("add",t)),this},resetCells:function(e,t){var n=Gr(e).map(function(e){return this._prepareCell(e,t)},this);return this.get("cells").reset(n,t),this},removeCells:function(e,t){return e.length&&(this.startBatch("remove"),Fr(e,"remove",t),this.stopBatch("remove")),this},_removeCell:function(e,t,n){(n=n||{}).clear||(n.disconnectLinks?this.disconnectLinks(e,n):this.removeLinks(e,n)),this.get("cells").remove(e,{silent:!0}),e.graph===this&&(e.graph=null)},getCell:function(e){return this.get("cells").get(e)},getCells:function(){return this.get("cells").toArray()},getElements:function(){return this.get("cells").filter(e=>e.isElement())},getLinks:function(){return this.get("cells").filter(e=>e.isLink())},getFirstCell:function(){return this.get("cells").first()},getLastCell:function(){return this.get("cells").last()},getConnectedLinks:function(e,t){var n=(t=t||{}).indirect,r=t.inbound,i=t.outbound;void 0===r&&void 0===i&&(r=i=!0);var o=[],a={};function s(e,t){if(ri(e.getOutboundEdges(t.id),function(t,u){if(!a[u]){var c=e.getCell(u);o.push(c),a[u]=!0,n&&(r&&l(e,c),i&&s(e,c))}}.bind(e)),n&&t.isLink()){var u=t.getTargetCell();u&&u.isLink()&&(a[u.id]||(o.push(u),s(e,u)))}}function l(e,t){if(ri(e.getInboundEdges(t.id),function(t,u){if(!a[u]){var c=e.getCell(u);o.push(c),a[u]=!0,n&&(r&&l(e,c),i&&s(e,c))}}.bind(e)),n&&t.isLink()){var u=t.getSourceCell();u&&u.isLink()&&(a[u.id]||(o.push(u),l(e,u)))}}if(i&&s(this,e),r&&l(this,e),t.deep){var u=e.getEmbeddedCells({deep:!0}),c={};u.forEach(function(e){e.isElement()&&(c[e.id]=!0)}),u.forEach(function(e){e.isLink()||(i&&ri(this.getOutboundEdges(e.id),function(e,n){if(!a[n]){var r=this.getCell(n),{source:i,target:s}=r.attributes,l=i.id,u=s.id;if(!t.includeEnclosed&&l&&c[l]&&u&&c[u])return;o.push(this.getCell(n)),a[n]=!0}}.bind(this)),r&&ri(this.getInboundEdges(e.id),function(e,n){if(!a[n]){var r=this.getCell(n),{source:i,target:s}=r.attributes,l=i.id,u=s.id;if(!t.includeEnclosed&&l&&c[l]&&u&&c[u])return;o.push(this.getCell(n)),a[n]=!0}}.bind(this)))},this)}return o},getNeighbors:function(e,t){t||(t={});var n=t.inbound,r=t.outbound;void 0===n&&void 0===r&&(n=r=!0);var i=this.getConnectedLinks(e,t).reduce(function(i,o){var{source:a,target:s}=o.attributes,l=o.hasLoop(t);if(n&&Zr(a,"id")&&!i[a.id]){var u=this.getCell(a.id);u.isElement()&&(!l&&(!u||u===e||t.deep&&u.isEmbeddedIn(e))||(i[a.id]=u))}if(r&&Zr(s,"id")&&!i[s.id]){var c=this.getCell(s.id);c.isElement()&&(!l&&(!c||c===e||t.deep&&c.isEmbeddedIn(e))||(i[s.id]=c))}return i}.bind(this),{});if(e.isLink()){if(n){var o=e.getSourceCell();o&&o.isElement()&&!i[o.id]&&(i[o.id]=o)}if(r){var a=e.getTargetCell();a&&a.isElement()&&!i[a.id]&&(i[a.id]=a)}}return Gr(i)},getCommonAncestor:function(){var e=Array.from(arguments).map(function(e){for(var t=[],n=e.get("parent");n;)t.push(n),n=this.getCell(n).get("parent");return t},this);e=e.sort(function(e,t){return e.length-t.length});var t=Gr(e.shift()).find(function(t){return e.every(function(e){return e.includes(t)})});return this.getCell(t)},getSuccessors:function(e,t){t=t||{};var n=[];return this.search(e,function(t){t!==e&&n.push(t)},Dr({},t,{outbound:!0})),n},cloneCells:fi,cloneSubgraph:function(e,t){var n=this.getSubgraph(e,t);return this.cloneCells(n)},getSubgraph:function(e,t){t=t||{};var n=[],r={},i=[],o=[];return Gr(e).forEach(function(e){r[e.id]||(n.push(e),r[e.id]=e,e.isLink()?o.push(e):i.push(e)),t.deep&&e.getEmbeddedCells({deep:!0}).forEach(function(e){r[e.id]||(n.push(e),r[e.id]=e,e.isLink()?o.push(e):i.push(e))})}),o.forEach(function(e){var{source:t,target:o}=e.attributes;if(t.id&&!r[t.id]){var a=this.getCell(t.id);n.push(a),r[a.id]=a,i.push(a)}if(o.id&&!r[o.id]){var s=this.getCell(o.id);n.push(this.getCell(o.id)),r[s.id]=s,i.push(s)}},this),i.forEach(function(e){this.getConnectedLinks(e,t).forEach(function(e){var{source:t,target:i}=e.attributes;!r[e.id]&&t.id&&r[t.id]&&i.id&&r[i.id]&&(n.push(e),r[e.id]=e)})},this),n},getPredecessors:function(e,t){t=t||{};var n=[];return this.search(e,function(t){t!==e&&n.push(t)},Dr({},t,{inbound:!0})),n},search:function(e,t,n){(n=n||{}).breadthFirst?this.bfs(e,t,n):this.dfs(e,t,n)},bfs:function(e,t,n={}){const r={},i={},o=[];for(o.push(e),i[e.id]=0;o.length>0;){var a=o.shift();if(r[a.id])continue;if(r[a.id]=!0,!1===t.call(this,a,i[a.id]))continue;const e=this.getNeighbors(a,n);for(let t=0,n=e.length;t<n;t++){const n=e[t];i[n.id]=i[a.id]+1,o.push(n)}}},dfs:function(e,t,n={}){const r={},i={},o=[];for(o.push(e),i[e.id]=0;o.length>0;){const e=o.pop();if(r[e.id])continue;if(r[e.id]=!0,!1===t.call(this,e,i[e.id]))continue;const a=this.getNeighbors(e,n),s=o.length;for(let t=0,n=a.length;t<n;t++){const n=a[t];i[n.id]=i[e.id]+1,o.splice(s,0,n)}}},getSources:function(){var e=[];return ri(this._nodes,function(t,n){this._in[n]&&!Ur(this._in[n])||e.push(this.getCell(n))}.bind(this)),e},getSinks:function(){var e=[];return ri(this._nodes,function(t,n){this._out[n]&&!Ur(this._out[n])||e.push(this.getCell(n))}.bind(this)),e},isSource:function(e){return!this._in[e.id]||Ur(this._in[e.id])},isSink:function(e){return!this._out[e.id]||Ur(this._out[e.id])},isSuccessor:function(e,t){var n=!1;return this.search(e,function(r){if(r===t&&r!==e)return n=!0,!1},{outbound:!0}),n},isPredecessor:function(e,t){var n=!1;return this.search(e,function(r){if(r===t&&r!==e)return n=!0,!1},{inbound:!0}),n},isNeighbor:function(e,t,n){var r=(n=n||{}).inbound,i=n.outbound;void 0===r&&void 0===i&&(r=i=!0);var o=!1;return this.getConnectedLinks(e,n).forEach(function(e){var{source:n,target:a}=e.attributes;return r&&Zr(n,"id")&&n.id===t.id||i&&Zr(a,"id")&&a.id===t.id?(o=!0,!1):void 0}),o},disconnectLinks:function(e,t){this.getConnectedLinks(e).forEach(function(n){n.set(n.attributes.source.id===e.id?"source":"target",{x:0,y:0},t)})},removeLinks:function(e,t){Fr(this.getConnectedLinks(e),"remove",t)},findModelsFromPoint:function(e){return this.getElements().filter(t=>t.getBBox({rotate:!0}).containsPoint(e))},findModelsInArea:function(e,t={}){const n=new sn(e),{strict:r=!1}=t,i=r?"containsRect":"intersect";return this.getElements().filter(e=>n[i](e.getBBox({rotate:!0})))},findModelsUnderElement:function(e,t={}){const{searchBy:n="bbox"}=t,r=e.getBBox().rotateAroundCenter(e.angle());return("bbox"===n?this.findModelsInArea(r):this.findModelsFromPoint(r[n]())).filter(t=>e.id!==t.id&&!t.isEmbeddedIn(e))},getBBox:function(){return this.getCellsBBox(this.getCells())},getCellsBBox:function(e,t={}){const{rotate:n=!0}=t;return Gr(e).reduce(function(e,t){const r=t.getBBox({rotate:n});return r?e?e.union(r):r:e},null)},translate:function(e,t,n){var r=this.getCells().filter(function(e){return!e.isEmbedded()});return Fr(r,"translate",e,t,n),this},resize:function(e,t,n){return this.resizeCells(e,t,this.getCells(),n)},resizeCells:function(e,t,n,r){var i=this.getCellsBBox(n);if(i){var o=Math.max(e/i.width,0),a=Math.max(t/i.height,0);Fr(n,"scale",o,a,i.origin(),r)}return this},startBatch:function(e,t){return t=t||{},this._batches[e]=(this._batches[e]||0)+1,this.trigger("batch:start",Dr({},t,{batchName:e}))},stopBatch:function(e,t){return t=t||{},this._batches[e]=(this._batches[e]||0)-1,this.trigger("batch:stop",Dr({},t,{batchName:e}))},hasActiveBatch:function(e){const t=this._batches;let n;return n=0===arguments.length?Object.keys(t):Array.isArray(e)?e:[e],n.some(e=>t[e]>0)}},{validations:{multiLinks:function(e,t){var{source:n,target:r}=t.attributes;if(n.id&&r.id){var i=t.getSourceCell();if(i&&e.getConnectedLinks(i,{outbound:!0}).filter(function(e){var{source:t,target:i}=e.attributes;return t&&t.id===n.id&&(!t.port||t.port===n.port)&&i&&i.id===r.id&&(!i.port||i.port===r.port)}).length>1)return!1}return!0},linkPinning:function(e,t){var{source:n,target:r}=t.attributes;return n.id&&r.id}}});!function(e,t,n){if(ui(n)){if(!bo[n])throw new Error('Unknown wrapper: "'+n+'"');n=bo[n]}if(!qr(n))throw new Error("Wrapper must be a function.");Gr(["resetCells","addCells","removeCells"]).forEach(function(t){e[t]=n(e[t])})}(xo.prototype,0,bo.cells);const ko={},So=dt.View.extend({options:{},theme:null,themeClassNamePrefix:pr("theme-"),requireSetThemeOverride:!1,defaultTheme:dr.defaultTheme,children:null,childNodes:null,DETACHABLE:!0,UPDATE_PRIORITY:2,FLAG_INSERT:1<<30,FLAG_REMOVE:1<<29,constructor:function(e){this.requireSetThemeOverride=e&&!!e.theme,this.options=Dr({},this.options,e),dt.View.call(this,e)},initialize:function(){ko[this.cid]=this,this.setTheme(this.options.theme||this.defaultTheme),this.init()},unmount:function(){this.svgElement?this.vel.remove():this.$el.remove()},renderChildren:function(e){if(e||(e=ei(this,"children")),e){var t=this.svgElement,n=hr.namespace[t?"svg":"xhtml"],r=vr(e,n);(t?this.vel:this.$el).empty().append(r.fragment),this.childNodes=r.selectors}return this},findAttribute:function(e,t){for(var n=t;n&&1===n.nodeType;){var r=n.getAttribute(e);if(r)return r;if(n===this.el)return null;n=n.parentNode}return null},_ensureElement:function(){if(this.el)this.setElement(ei(this,"el"));else{var e=ei(this,"tagName"),t=Dr({},ei(this,"attributes")),n=Dr({},ei(this,"style"));this.id&&(t.id=ei(this,"id")),this.setElement(this._createElement(e)),this._setAttributes(t),this._setStyle(n)}this._ensureElClassName()},_setAttributes:function(e){this.svgElement?this.vel.attr(e):this.$el.attr(e)},_setStyle:function(e){this.$el.css(e)},_createElement:function(e){return this.svgElement?document.createElementNS(hr.namespace.svg,e):document.createElement(e)},_setElement:function(e){this.$el=e instanceof dt.$?e:dt.$(e),this.el=this.$el[0],this.svgElement&&(this.vel=hr(this.el))},_ensureElClassName:function(){var e=ei(this,"className");if(e){var t=pr(e);this.svgElement?this.vel.removeClass(e).addClass(t):this.$el.removeClass(e).addClass(t)}},init:function(){},onRender:function(){},confirmUpdate:function(){return 0},setTheme:function(e,t){return t=t||{},this.theme&&this.requireSetThemeOverride&&!t.override||(this.removeThemeClassName(),this.addThemeClassName(e),this.onSetTheme(this.theme,e),this.theme=e),this},addThemeClassName:function(e){if(!(e=e||this.theme))return this;var t=this.themeClassNamePrefix+e;return this.svgElement?this.vel.addClass(t):this.$el.addClass(t),this},removeThemeClassName:function(e){e=e||this.theme;var t=this.themeClassNamePrefix+e;return this.svgElement?this.vel.removeClass(t):this.$el.removeClass(t),this},onSetTheme:function(e,t){},remove:function(){return this.onRemove(),this.undelegateDocumentEvents(),ko[this.cid]=null,dt.View.prototype.remove.apply(this,arguments),this},onRemove:function(){},getEventNamespace:function(){return".joint-event-ns-"+this.cid},delegateElementEvents:function(e,t,n){if(!t)return this;n||(n={});var r=this.getEventNamespace();for(var i in t){var o=t[i];"function"!=typeof o&&(o=this[o]),o&&gt(e).on(i+r,n,o.bind(this))}return this},undelegateElementEvents:function(e){return gt(e).off(this.getEventNamespace()),this},delegateDocumentEvents:function(e,t){return e||(e=ei(this,"documentEvents")),this.delegateElementEvents(document,e,t)},undelegateDocumentEvents:function(){return this.undelegateElementEvents(document)},eventData:function(e,t){if(!e)throw new Error("eventData(): event object required.");var n=e.data,r="__"+this.cid+"__";return void 0===t?n&&n[r]||{}:(n||(n=e.data={}),n[r]||(n[r]={}),Dr(n[r],t),this)},stopPropagation:function(e){return this.eventData(e,{propagationStopped:!0}),this},isPropagationStopped:function(e){return!!this.eventData(e).propagationStopped}},{extend:function(){var e=Array.from(arguments),t=e[0]&&Dr({},e[0])||{},n=e[1]&&Dr({},e[1])||{},r=t.render||this.prototype&&this.prototype.render||null;return t.render=function(){return"function"==typeof r&&r.apply(this,arguments),this.render.__render__===r&&this.onRender(),this},t.render.__render__=r,dt.View.extend.call(this,t,n)}}),_o="dbltap";if(gt.event&&!(_o in gt.event.special)){const e=dr.doubleTapInterval,t=30;gt.event.special[_o]={bindType:"touchend",delegateType:"touchend",handle:function(n,...r){const{handleObj:i,target:o}=n,a=gt.data(o),s=(new Date).getTime(),l="lastTouch"in a?s-a.lastTouch:0;l<e&&l>t?(a.lastTouch=null,n.type=i.origType,i.handler.call(this,n,...r)):a.lastTouch=s}}}function Eo(e){return e?Array.isArray(e)?e:[e]:[]}const Co=So.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(e,t){const{paper:n}=e;this.cellView=e,this.nodeSelector=t,n&&(this.updateRequested=!0,n.requestViewUpdate(this,this.HIGHLIGHT_FLAG,this.UPDATE_PRIORITY))},confirmUpdate(){this.updateRequested=!1;const{cellView:e,nodeSelector:t}=this;return this.update(e,t),this.mount(),this.transform(),0},findNode(e,t=null){let n;if("string"==typeof t)[n]=e.findBySelector(t);else if(Wr(t)){const r=e.model.isLink(),{label:i=null,port:o,selector:a}=t;r&&null!==i?n=e.findLabelNode(i,a):!r&&o?n=e.findPortNode(o,a):[n]=e.findBySelector(a)}else t&&(n=hr.toNode(t),n instanceof SVGElement||(n=null));return n||null},mount(){const{MOUNTABLE:e,cellView:t,el:n,options:r,transformGroup:i}=this;if(!e||i)return;const{vel:o,paper:a}=t,{layer:s}=r;if(s){const e=this.transformGroup=hr("g").addClass("highlight-transform").append(n);a.getLayerView(s).insertSortedNode(e.node,r.z)}else n.parentNode&&!n.nextSibling||o.append(n)},unmount(){const{MOUNTABLE:e,transformGroup:t,vel:n}=this;e&&(t?(this.transformGroup=null,t.remove()):n.remove())},transform(){const{transformGroup:e,cellView:t,updateRequested:n}=this;if(!e||t.model.isLink()||n)return;const r=t.getRootTranslateMatrix(),i=t.getRootRotateMatrix(),o=r.multiply(i);e.attr("transform",hr.matrixToTransformString(o))},update(){const{node:e,cellView:t,nodeSelector:n,updateRequested:r,id:i}=this;if(r)return;const o=this.node=this.findNode(t,n);e&&this.unhighlight(t,e),o?(this.highlight(t,o),this.mount()):(this.unmount(),t.notify("cell:highlight:invalid",i,this))},onRemove(){const{node:e,cellView:t,id:n,constructor:r}=this;e&&this.unhighlight(t,e),this.unmount(),r._removeRef(t,n)},highlight(e,t){},unhighlight(e,t){}},{_views:{},highlight:function(e,t,n){const r=this.uniqueId(t,n);this.add(e,t,r,n)},unhighlight:function(e,t,n){const r=this.uniqueId(t,n);this.remove(e,r)},get(e,t=null){const{cid:n}=e,{_views:r}=this,i=r[n];if(null===t){const e=[];if(!i)return e;for(let t in i){const n=i[t];n instanceof this&&e.push(n)}return e}if(!i)return null;if(t in i){const e=i[t];if(e instanceof this)return e}return null},add(e,t,n,r={}){if(!n)throw new Error("dia.HighlighterView: An ID required.");const i=Co.get(e,n);i&&i.remove();const o=new this(r);return o.id=n,this._addRef(e,n,o),o.requestUpdate(e,t),o},_addRef(e,t,n){const{cid:r}=e,{_views:i}=this;let o=i[r];o||(o=i[r]={}),o[t]=n},_removeRef(e,t){const{cid:n}=e,{_views:r}=this,i=r[n];if(i){t&&delete i[t];for(let e in i)return;delete r[n]}},remove(e,t=null){Eo(this.get(e,t)).forEach(e=>{e.remove()})},update(e,t=null,n=!1){Eo(this.get(e,t)).forEach(e=>{(n||e.UPDATABLE)&&e.update()})},transform(e,t=null){Eo(this.get(e,t)).forEach(e=>{e.UPDATABLE&&e.transform()})},uniqueId:(e,t="")=>hr.ensureId(e)+JSON.stringify(t)}),Ao={DEFAULT:"default",EMBEDDING:"embedding",CONNECTING:"connecting",MAGNET_AVAILABILITY:"magnetAvailability",ELEMENT_AVAILABILITY:"elementAvailability"},Po=So.extend({tagName:"g",svgElement:!0,selector:"root",metrics:null,className:function(){var e=["cell"],t=this.model.get("type");return t&&t.toLowerCase().split(".").forEach(function(t,n,r){e.push("type-"+r.slice(0,n+1).join("-"))}),e.join(" ")},_presentationAttributes:null,_flags:null,setFlags:function(){var e,t,n,r={},i={},o=0,a=ei(this,"presentationAttributes");for(var s in a)if(a.hasOwnProperty(s)){var l=a[s];for(Array.isArray(l)||(l=[l]),e=0,t=l.length;e<t;e++){var u=r[n=l[e]];u||(u=r[n]=1<<o++),i[s]|=u}}var c=ei(this,"initFlag");for(Array.isArray(c)||(c=[c]),e=0,t=c.length;e<t;e++)r[n=c[e]]||(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(e,t){return e&this.getFlag(t)},removeFlag:function(e,t){return e^e&this.getFlag(t)},getFlag:function(e){var t=this._flags;if(!t)return 0;var n=0;if(Array.isArray(e))for(var r=0,i=e.length;r<i;r++)n|=t[e[r]];else n|=t[e];return n},attributes:function(){var e=this.model;return{"model-id":e.id,"data-type":e.attributes.type}},constructor:function(e){e.id=e.id||kr(this),So.call(this,e)},initialize:function(){this.setFlags(),So.prototype.initialize.apply(this,arguments),this.cleanNodesCache(),this.$el.data("view",this),this.startListening()},onMount(){},startListening:function(){this.listenTo(this.model,"change",this.onAttributesChange)},onAttributesChange:function(e,t){var n=e.getChangeFlag(this._presentationAttributes);!t.updateHandled&&n&&(t.dirty&&this.hasFlag(n,"UPDATE")&&(n|=this.getFlag("RENDER")),t.tool&&(t.async=!1),this.requestUpdate(n,t))},requestUpdate:function(e,t){const{paper:n}=this;n&&e>0&&n.requestViewUpdate(this,e,this.UPDATE_PRIORITY,t)},parseDOMJSON:function(e,t){var n=vr(e),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(t){var a=this.selector;if(r[a])throw new Error("dia.CellView: ambiguous root selector.");r[a]=t}return{fragment:n.fragment,selectors:r}},can:function(e){var t,n,r=qr(this.options.interactive)?this.options.interactive(this):this.options.interactive;return si(r)&&!1!==r[e]||(t=r,n=Object.prototype.toString,(!0===t||!1===t||!!t&&"object"==typeof t&&"[object Boolean]"===n.call(t))&&!1!==r)},findBySelector:function(e,t,n){if(t||(t=this.el),n||(n=this.selectors),!e||"."===e)return[t];if(n){var r=n[e];if(r)return Array.isArray(r)?r:[r]}return dr.useCSSSelectors?gt(t).find(e).toArray():[]},notify:function(e){if(this.paper){var t=Array.prototype.slice.call(arguments,1);this.trigger.apply(this,[e].concat(t)),this.paper.trigger.apply(this.paper,[e,this].concat(t))}},getBBox:function(e){var t;if(e&&e.useModelGeometry){var n=this.model;t=n.getBBox().bbox(n.angle())}else t=this.getNodeBBox(this.el);return this.paper.localToPaperRect(t)},getNodeBBox:function(e){var t=this.getNodeBoundingRect(e),n=this.getNodeMatrix(e),r=this.getRootTranslateMatrix(),i=this.getRootRotateMatrix();return hr.transformRect(t,r.multiply(i).multiply(n))},getNodeUnrotatedBBox:function(e){var t=this.getNodeBoundingRect(e),n=this.getNodeMatrix(e),r=this.getRootTranslateMatrix();return hr.transformRect(t,r.multiply(n))},getRootTranslateMatrix:function(){var e=this.model.position();return hr.createSVGMatrix().translate(e.x,e.y)},getRootRotateMatrix:function(){var e=hr.createSVGMatrix(),t=this.model,n=t.angle();if(n){var r=t.getBBox(),i=r.width/2,o=r.height/2;e=e.translate(i,o).rotate(n).translate(-i,-o)}return e},_notifyHighlight:function(e,t,n={}){const{el:r}=this;let i;if([i=r]="string"==typeof t?this.findBySelector(t):this.$(t),n.partial=i!==r,void 0===n.type){let e;switch(!0){case n.embedding:e=Ao.EMBEDDING;break;case n.connecting:e=Ao.CONNECTING;break;case n.magnetAvailability:e=Ao.MAGNET_AVAILABILITY;break;case n.elementAvailability:e=Ao.ELEMENT_AVAILABILITY;break;default:e=Ao.DEFAULT}n.type=e}return this.notify(e,i,n),this},highlight:function(e,t){return this._notifyHighlight("cell:highlight",e,t)},unhighlight:function(e,t={}){return this._notifyHighlight("cell:unhighlight",e,t)},findMagnet:function(e){const t=this.el;let n=this.$(e)[0];n||(n=t);do{const e=n.getAttribute("magnet"),r=n===t;if((e||r)&&"false"!==e)return n;if(r)return;n=n.parentNode}while(n)},findProxyNode:function(e,t){e||(e=this.el);const n=e.getAttribute(`${t}-selector`);if(n){const[e]=this.findBySelector(n);if(e)return e}return e},getSelector:function(e,t){var n;if(e===this.el)return"string"==typeof t&&(n="> "+t),n;if(e){var r=hr(e).index()+1;n=e.tagName+":nth-child("+r+")",t&&(n+=" > "+t),n=this.getSelector(e.parentNode,n)}return n},addLinkFromMagnet:function(e,t,n){var r=this.paper,i=r.model,o=r.getDefaultLink(this,e);return o.set({source:this.getLinkEnd(e,t,n,o,"source"),target:{x:t,y:n}}).addTo(i,{async:!1,ui:!0}),o.findView(r)},getLinkEnd:function(e,...t){var n=this.model,r=n.id,i=this.findAttribute("port",e),o=e.getAttribute("joint-selector"),a={id:r};return null!=o&&(a.magnet=o),null!=i?(a.port=i,n.hasPort(i)||o||(a.selector=this.getSelector(e))):null==o&&this.el!==e&&(a.selector=this.getSelector(e)),this.customizeLinkEnd(a,e,...t)},customizeLinkEnd:function(e,t,n,r,i,o){const{paper:a}=this,{connectionStrategy:s}=a.options;if("function"==typeof s){var l=s.call(a,e,this,t,new $t(n,r),i,o,a);if(l)return l}return e},getMagnetFromLinkEnd:function(e){var t,n=this.el,r=e.port,i=e.magnet,o=this.model;return null!=r&&o.isElement()&&o.hasPort(r)?t=this.findPortNode(r,i)||n:(i||(i=e.selector),i||null==r||(i='[port="'+r+'"]'),t=this.findBySelector(i,n,this.selectors)[0]),this.findProxyNode(t,"magnet")},dragLinkStart:function(e,t,n,r){this.model.startBatch("add-link");const i=this.addLinkFromMagnet(t,n,r);i.notifyPointerdown(e,n,r),i.eventData(e,i.startArrowheadMove("target",{whenNotAllowed:"remove"})),this.eventData(e,{linkView:i})},dragLink:function(e,t,n){var r=this.eventData(e),i=r.linkView;if(i)i.pointermove(e,t,n);else{var o=this.paper,a=o.options.magnetThreshold,s=this.getEventTarget(e),l=r.targetMagnet;if("onleave"===a){if(l===s||hr(l).contains(s))return}else if(o.eventData(e).mousemoved<=a)return;this.dragLinkStart(e,l,t,n)}},dragLinkEnd:function(e,t,n){var r=this.eventData(e).linkView;r&&(r.pointerup(e,t,n),this.model.stopBatch("add-link"))},getAttributeDefinition:function(e){return this.model.constructor.getAttributeDefinition(e)},setNodeAttributes:function(e,t){Ur(t)||(e instanceof SVGElement?hr(e).attr(t):gt(e).attr(t))},processNodeAttributes:function(e,t){var n,r,i,o,a,s,l,u,c,f=[];for(n in t)t.hasOwnProperty(n)&&(r=t[n],!(i=this.getAttributeDefinition(n))||qr(i.qualify)&&!i.qualify.call(this,r,e,t)?(s||(s={}),s[Sr(n)]=r):(ui(i.set)&&(s||(s={}),s[i.set]=r),null!==r&&f.push(n,i)));for(o=0,a=f.length;o<a;o+=2)n=f[o],i=f[o+1],r=t[n],qr(i.set)&&(l||(l={}),l[n]=r),qr(i.position)&&(u||(u={}),u[n]=r),qr(i.offset)&&(c||(c={}),c[n]=r);return{raw:t,normal:s,set:l,position:u,offset:c}},updateRelativeAttributes:function(e,t,n,r){var i,o;r||(r={});var a=t.raw||{},s=t.normal||{},l=t.set,u=t.position,c=t.offset;for(i in l){o=l[i];var f=this.getAttributeDefinition(i).set.call(this,o,n.clone(),e,a);si(f)?Dr(s,f):void 0!==f&&(s[i]=f)}if(e instanceof HTMLElement)this.setNodeAttributes(e,s);else{var h,d,p,g=s.transform,v=hr.transformStringToMatrix(g),m=$t(v.e,v.f);if(g&&(s=ti(s,"transform"),v.e=v.f=0),u||c){var y=this.getNodeScale(e,r.scalableNode);h=y.sx,d=y.sy}var b=!1;for(i in u)o=u[i],(p=this.getAttributeDefinition(i).position.call(this,o,n.clone(),e,a))&&(m.offset($t(p).scale(h,d)),b||(b=!0));this.setNodeAttributes(e,s);var w=!1;if(c){var x=this.getNodeBoundingRect(e);if(x.width>0&&x.height>0){var k=hr.transformRect(x,v).scale(1/h,1/d);for(i in c)o=c[i],(p=this.getAttributeDefinition(i).offset.call(this,o,k,e,a))&&(m.offset($t(p).scale(h,d)),w||(w=!0))}}(void 0!==g||b||w)&&(m.round(1),v.e=m.x,v.f=m.y,e.setAttribute("transform",hr.matrixToTransformString(v)))}},getNodeScale:function(e,t){var n,r;if(t&&t.contains(e)){var i=t.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(e){var t=this.metrics;if(!t)return{};var n=hr.ensureId(e),r=t[n];return r||(r=t[n]={}),r},getNodeData:function(e){var t=this.nodeCache(e);return t.data||(t.data={}),t.data},getNodeBoundingRect:function(e){var t=this.nodeCache(e);return void 0===t.boundingRect&&(t.boundingRect=hr(e).getBBox()),new sn(t.boundingRect)},getNodeMatrix:function(e){var t=this.nodeCache(e);if(void 0===t.magnetMatrix){var n=this.rotatableNode||this.el;t.magnetMatrix=hr(e).getTransformToElement(n)}return hr.createSVGMatrix(t.magnetMatrix)},getNodeShape:function(e){var t=this.nodeCache(e);return void 0===t.geometryShape&&(t.geometryShape=hr(e).toGeometryShape()),t.geometryShape.clone()},isNodeConnection:function(e){return this.model.isLink()&&(!e||e===this.el)},findNodesAttributes:function(e,t,n,r){var i,o,a,s,l={},u=[];for(var c in e)if(e.hasOwnProperty(c)&&(a=e[c],Wr(a))){var f=n[c]=this.findBySelector(c,t,r);for(i=0,o=f.length;i<o;i++){var h=f[i];s=hr.ensureId(h);var d=r&&r[c]===h,p=l[s];if(p){p.array||(u.push(s),p.array=!0,p.attributes=[p.attributes],p.selectedLength=[p.selectedLength]);var g=p.attributes,v=p.selectedLength;if(d)g.unshift(a),v.unshift(-1);else{var m=zr(v,o);g.splice(m,0,a),v.splice(m,0,o)}}else l[s]={attributes:a,selectedLength:d?-1:o,node:h,array:!1}}}for(i=0,o=u.length;i<o;i++)(a=l[s=u[i]]).attributes=ai({},...a.attributes.reverse());return l},getEventTarget:function(e,t={}){const{target:n,type:r,clientX:i=0,clientY:o=0}=e;return t.fromPoint||"touchmove"===r||"touchend"===r?document.elementFromPoint(i,o):n},updateDOMSubtreeAttributes:function(e,t,n){n||(n={}),n.rootBBox||(n.rootBBox=sn()),n.selectors||(n.selectors=this.selectors);var r,i,o,a,s,l,u={},c={},f=[],h=[],d=n.roAttributes,p=this.findNodesAttributes(d||t,e,u,n.selectors),g=d?this.findNodesAttributes(t,e,u,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=(u[b]||this.findBySelector(b,e,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(e){return e.refNode===i});w>-1?h.splice(w,0,r):h.push(r)}else f.push(r)}else this.setNodeAttributes(i,s.normal);f.push(...h);for(var x=0,k=f.length;x<k;x++){r=f[x],i=r.node,m=r.refNode;var S=hr(n.rotatableNode),_=m?hr.ensureId(m):"",E=!!S&&!!m&&S.contains(m),C=c[_];if(!C){var A=E?S:e;C=c[_]=m?hr(m).getBBox({target:A}):n.rootBBox}d?(s=this.processNodeAttributes(i,r.allAttributes),this.mergeProcessedAttributes(s,r.processedAttributes)):s=r.processedAttributes;var P=C;E&&!S.contains(i)&&(l||(l=hr.transformStringToMatrix(S.attr("transform"))),P=hr.transformRect(C,l)),this.updateRelativeAttributes(i,s,P,n)}},mergeProcessedAttributes:function(e,t){e.set||(e.set={}),e.position||(e.position={}),e.offset||(e.offset={}),Dr(e.set,t.set),Dr(e.position,t.position),Dr(e.offset,t.offset);var n=e.normal&&e.normal.transform;void 0!==n&&t.normal&&(t.normal.transform=n),e.normal=t.normal},onRemove:function(){this.removeTools(),this.removeHighlighters()},_toolsView:null,hasTools:function(e){var t=this._toolsView;return!(!t||e&&t.getName()!==e)},addTools:function(e){return this.removeTools(),e&&(this._toolsView=e,e.configure({relatedView:this}),e.listenTo(this.paper,"tools:event",this.onToolEvent.bind(this))),this},updateTools:function(e){var t=this._toolsView;return t&&t.update(e),this},removeTools:function(){var e=this._toolsView;return e&&(e.remove(),this._toolsView=null),this},hideTools:function(){var e=this._toolsView;return e&&e.hide(),this},showTools:function(){var e=this._toolsView;return e&&e.show(),this},onToolEvent:function(e){switch(e){case"remove":this.removeTools();break;case"hide":this.hideTools();break;case"show":this.showTools()}},removeHighlighters:function(){Co.remove(this)},updateHighlighters:function(e=!1){Co.update(this,null,e)},transformHighlighters:function(){Co.transform(this)},pointerdblclick:function(e,t,n){this.notify("cell:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){this.notify("cell:pointerclick",e,t,n)},contextmenu:function(e,t,n){this.notify("cell:contextmenu",e,t,n)},pointerdown:function(e,t,n){const{model:r}=this,{graph:i}=r;i&&(r.startBatch("pointer"),this.eventData(e,{graph:i})),this.notify("cell:pointerdown",e,t,n)},pointermove:function(e,t,n){this.notify("cell:pointermove",e,t,n)},pointerup:function(e,t,n){const{graph:r}=this.eventData(e);this.notify("cell:pointerup",e,t,n),r&&r.stopBatch("pointer",{cell:this.model})},mouseover:function(e){this.notify("cell:mouseover",e)},mouseout:function(e){this.notify("cell:mouseout",e)},mouseenter:function(e){this.notify("cell:mouseenter",e)},mouseleave:function(e){this.notify("cell:mouseleave",e)},mousewheel:function(e,t,n,r){this.notify("cell:mousewheel",e,t,n,r)},onevent:function(e,t,n,r){this.notify(t,e,n,r)},onmagnet:function(){},magnetpointerdblclick:function(){},magnetcontextmenu:function(){},checkMouseleave(e){const{paper:t}=this;t.isAsync()&&t.dumpView(this);const n=this.getEventTarget(e,{fromPoint:!0}),r=t.findView(n);r!==this&&(this.mouseleave(e),r&&r.mouseenter(e))},setInteractivity:function(e){this.options.interactive=e}},{Highlighting:Ao,addPresentationAttributes:function(e){return ai({},ei(this.prototype,"presentationAttributes"),e,function(e,t){if(e&&t)return"string"==typeof e&&(e=[e]),"string"==typeof t&&(t=[t]),Array.isArray(e)&&Array.isArray(t)?Vr(e.concat(t)):void 0})}}),Lo={UPDATE:"UPDATE",TRANSLATE:"TRANSLATE",TOOLS:"TOOLS",RESIZE:"RESIZE",PORTS:"PORTS",ROTATE:"ROTATE",RENDER:"RENDER"},To=Po.extend({_removePorts:function(){},_renderPorts:function(){},className:function(){var e=Po.prototype.className.apply(this).split(" ");return e.push("element"),e.join(" ")},initialize:function(){Po.prototype.initialize.apply(this,arguments),this._initializePorts()},presentationAttributes:{attrs:[Lo.UPDATE],position:[Lo.TRANSLATE,Lo.TOOLS],size:[Lo.RESIZE,Lo.PORTS,Lo.TOOLS],angle:[Lo.ROTATE,Lo.TOOLS],markup:[Lo.RENDER],ports:[Lo.PORTS]},initFlag:[Lo.RENDER],UPDATE_PRIORITY:0,confirmUpdate:function(e,t){const{useCSSSelectors:n}=dr;this.hasFlag(e,Lo.PORTS)&&(this._removePorts(),this._cleanPortsCache());let r=!1;if(this.hasFlag(e,Lo.RENDER))this.render(),this.updateTools(t),this.updateHighlighters(!0),r=!0,e=this.removeFlag(e,[Lo.RENDER,Lo.UPDATE,Lo.RESIZE,Lo.TRANSLATE,Lo.ROTATE,Lo.PORTS,Lo.TOOLS]);else{let i=!1;this.hasFlag(e,Lo.RESIZE)&&(this.resize(t),i=!0,e=this.removeFlag(e,[Lo.RESIZE,Lo.UPDATE])),this.hasFlag(e,Lo.UPDATE)&&(this.update(this.model,null,t),e=this.removeFlag(e,Lo.UPDATE),i=!0,n&&(e=this.removeFlag(e,Lo.PORTS))),this.hasFlag(e,Lo.TRANSLATE)&&(this.translate(),e=this.removeFlag(e,Lo.TRANSLATE),r=!0),this.hasFlag(e,Lo.ROTATE)&&(this.rotate(),e=this.removeFlag(e,Lo.ROTATE),r=!0),this.hasFlag(e,Lo.PORTS)&&(this._renderPorts(),i=!0,e=this.removeFlag(e,Lo.PORTS)),i&&this.updateHighlighters(!1)}return r&&this.transformHighlighters(),this.hasFlag(e,Lo.TOOLS)&&(this.updateTools(t),e=this.removeFlag(e,Lo.TOOLS)),e},_initializePorts:function(){},update:function(e,t){this.cleanNodesCache();const{useCSSSelectors:n}=dr;n&&this._removePorts();var r=this.model,i=r.attr();this.updateDOMSubtreeAttributes(this.el,i,{rootBBox:new sn(r.size()),selectors:this.selectors,scalableNode:this.scalableNode,rotatableNode:this.rotatableNode,roAttributes:t===i?null:t}),n&&this._renderPorts()},rotatableSelector:"rotatable",scalableSelector:"scalable",scalableNode:null,rotatableNode:null,renderMarkup:function(){var e=this.model,t=e.get("markup")||e.markup;if(!t)throw new Error("dia.ElementView: markup required");if(Array.isArray(t))return this.renderJSONMarkup(t);if("string"==typeof t)return this.renderStringMarkup(t);throw new Error("dia.ElementView: invalid markup")},renderJSONMarkup:function(e){var t=this.parseDOMJSON(e,this.el),n=this.selectors=t.selectors;this.rotatableNode=hr(n[this.rotatableSelector])||null,this.scalableNode=hr(n[this.scalableSelector])||null,this.vel.append(t.fragment)},renderStringMarkup:function(e){var t=this.vel;t.append(hr(e)),this.rotatableNode=t.findOne(".rotatable"),this.scalableNode=t.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(),dr.useCSSSelectors||this._renderPorts(),this},resize:function(e){if(this.scalableNode)return this.sgResize(e);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 e=this.getTranslateString(),t=this.getRotateString();t&&(e+=" "+t),this.vel.attr("transform",e)},getTranslateString:function(){var e=this.model.attributes.position;return"translate("+e.x+","+e.y+")"},getRotateString:function(){var e=this.model.attributes,t=e.angle;if(!t)return null;var n=e.size;return"rotate("+t+","+n.width/2+","+n.height/2+")"},rgRotate:function(){this.rotatableNode.attr("transform",this.getRotateString())},rgTranslate:function(){this.vel.attr("transform",this.getTranslateString())},sgResize:function(e){var t=this.model,n=t.angle(),r=t.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),l=r.height/(a.height||1);i.attr("transform","scale("+s+","+l+")");var u=this.rotatableNode,c=u&&u.attr("transform");if(c){u.attr("transform",c+" rotate("+-n+","+r.width/2+","+r.height/2+")");var f=i.getBBox({target:this.paper.cells});t.set("position",{x:f.x,y:f.y},Dr({updateHandled:!0},e)),this.translate(),this.rotate()}this.update()},prepareEmbedding:function(e={}){const t=e.model||this.model,n=(e.paper||this.paper).model,r=e.initialZIndices={},i=t.getEmbeddedCells({deep:!0}),o=n.getConnectedLinks(t,{deep:!0,includeEnclosed:!0});[t,...i,...o].forEach(e=>r[e.id]=e.attributes.z),t.startBatch("to-front"),t.toFront({deep:!0,ui:!0});const a=n.getElements().reduce((e,t)=>Math.max(e,t.attributes.z||0),0);o.forEach(e=>{e.attributes.z<=a&&e.set("z",a+1,{ui:!0})}),t.stopBatch("to-front");const s=t.parent();s?(n.getCell(s).unembed(t,{ui:!0}),e.initialParentId=s):e.initialParentId=null},processEmbedding:function(e={},t,n,r){const i=e.model||this.model,o=e.paper||this.paper,a=o.model,{findParentBy:s,frontParentOnly:l,validateEmbedding:u}=o.options;let c;c=qr(s)?Gr(s.call(a,this,t,n,r)):"pointer"===s?Gr(a.findModelsFromPoint({x:n,y:r})):a.findModelsUnderElement(i,{searchBy:s}),c=c.filter(e=>e instanceof Ii&&i.id!==e.id&&!e.isEmbeddedIn(i)),l&&(c=c.slice(-1));let f=null;const h=e.candidateEmbedView;for(let e=c.length-1;e>=0;e--){const t=c[e];if(h&&h.model.id==t.id){f=h;break}{const e=t.findView(o);if(!qr(u)||u.call(o,this,e)){f=e;break}}}f&&f!=h&&(this.clearEmbedding(e),e.candidateEmbedView=f.highlight(f.findProxyNode(null,"container"),{embedding:!0})),!f&&h&&this.clearEmbedding(e)},clearEmbedding:function(e){e||(e={});var t=e.candidateEmbedView;t&&(t.unhighlight(t.findProxyNode(null,"container"),{embedding:!0}),e.candidateEmbedView=null)},finalizeEmbedding:function(e={}){const t=e.candidateEmbedView,n=e.model||this.model,r=e.paper||this.paper;if(t)t.model.embed(n,{ui:!0}),t.unhighlight(t.findProxyNode(null,"container"),{embedding:!0}),e.candidateEmbedView=null;else{const{validateUnembedding:t}=r.options,{initialParentId:n}=e;if(n&&"function"==typeof t&&!t.call(r,this))return void this._disallowUnembed(e)}r.model.getConnectedLinks(n,{deep:!0}).forEach(e=>{e.reparent({ui:!0})})},_disallowUnembed:function(e){const{model:t,whenNotAllowed:n="revert"}=e,r=t||this.model,i=(e.paper||this.paper).model;switch(n){case"remove":r.remove({ui:!0});break;case"revert":{const{initialParentId:t,initialPosition:n,initialZIndices:o}=e;if(n){const{x:e,y:t}=n;r.position(e,t,{deep:!0,ui:!0})}o&&Object.keys(o).forEach(e=>{const t=i.getCell(e);t&&t.set("z",o[e],{ui:!0})});const a=i.getCell(t);a&&a.embed(r,{ui:!0});break}}},getDelegatedView:function(){for(var e=this,t=e.model,n=e.paper;e&&!t.isLink();){if(!t.isEmbedded()||e.can("stopDelegation"))return e;t=t.getParentCell(),e=n.findViewByModel(t)}return null},findProxyNode:function(e,t){e||(e=this.el);const n=e.getAttribute(`${t}-selector`);if(n){const t=this.findAttribute("port",e);if(t){const e=this.findPortNode(t,n);if(e)return e}else{const[e]=this.findBySelector(n);if(e)return e}}return e},notifyPointerdown(e,t,n){Po.prototype.pointerdown.call(this,e,t,n),this.notify("element:pointerdown",e,t,n)},notifyPointermove(e,t,n){Po.prototype.pointermove.call(this,e,t,n),this.notify("element:pointermove",e,t,n)},notifyPointerup(e,t,n){this.notify("element:pointerup",e,t,n),Po.prototype.pointerup.call(this,e,t,n)},pointerdblclick:function(e,t,n){Po.prototype.pointerdblclick.apply(this,arguments),this.notify("element:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){Po.prototype.pointerclick.apply(this,arguments),this.notify("element:pointerclick",e,t,n)},contextmenu:function(e,t,n){Po.prototype.contextmenu.apply(this,arguments),this.notify("element:contextmenu",e,t,n)},pointerdown:function(e,t,n){this.isPropagationStopped(e)||(this.notifyPointerdown(e,t,n),this.dragStart(e,t,n))},pointermove:function(e,t,n){var r=this.eventData(e);switch(r.action){case"magnet":this.dragMagnet(e,t,n);break;case"move":(r.delegatedView||this).drag(e,t,n);default:this.notifyPointermove(e,t,n)}this.eventData(e,r)},pointerup:function(e,t,n){var r=this.eventData(e);switch(r.action){case"magnet":this.dragMagnetEnd(e,t,n);break;case"move":(r.delegatedView||this).dragEnd(e,t,n);default:this.notifyPointerup(e,t,n)}var i=r.targetMagnet;i&&this.magnetpointerclick(e,i,t,n),this.checkMouseleave(e)},mouseover:function(e){Po.prototype.mouseover.apply(this,arguments),this.notify("element:mouseover",e)},mouseout:function(e){Po.prototype.mouseout.apply(this,arguments),this.notify("element:mouseout",e)},mouseenter:function(e){Po.prototype.mouseenter.apply(this,arguments),this.notify("element:mouseenter",e)},mouseleave:function(e){Po.prototype.mouseleave.apply(this,arguments),this.notify("element:mouseleave",e)},mousewheel:function(e,t,n,r){Po.prototype.mousewheel.apply(this,arguments),this.notify("element:mousewheel",e,t,n,r)},onmagnet:function(e,t,n){this.dragMagnetStart(e,t,n)},magnetpointerdblclick:function(e,t,n,r){this.notify("element:magnet:pointerdblclick",e,t,n,r)},magnetcontextmenu:function(e,t,n,r){this.notify("element:magnet:contextmenu",e,t,n,r)},dragStart:function(e,t,n){var r=this.getDelegatedView();if(!r||!r.can("elementMove"))return;this.eventData(e,{action:"move",delegatedView:r});const i=r.model.position();r.eventData(e,{initialPosition:i,pointerOffset:i.difference(t,n),restrictedArea:this.paper.getRestrictedArea(r,t,n)})},dragMagnetStart:function(e,t,n){if(this.can("addLinkFromMagnet")){var r=e.currentTarget,i=this.paper;this.eventData(e,{targetMagnet:r}),e.stopPropagation(),i.options.validateMagnet(this,r,e)?(i.options.magnetThreshold<=0&&this.dragLinkStart(e,r,t,n),this.eventData(e,{action:"magnet"}),this.stopPropagation(e)):this.pointerdown(e,t,n),i.delegateDragEvents(this,e.data)}},drag:function(e,t,n){var r=this.paper,i=r.options.gridSize,o=this.model,a=this.eventData(e),{pointerOffset:s,restrictedArea:l,embedding:u}=a,c=xt(t+s.x,i),f=xt(n+s.y,i);o.position(c,f,{restrictedArea:l,deep:!0,ui:!0}),r.options.embeddingMode&&(u||(this.prepareEmbedding(a),u=!0),this.processEmbedding(a,e,t,n)),this.eventData(e,{embedding:u})},dragMagnet:function(e,t,n){this.dragLink(e,t,n)},dragEnd:function(e,t,n){var r=this.eventData(e);r.embedding&&this.finalizeEmbedding(r)},dragMagnetEnd:function(e,t,n){this.dragLinkEnd(e,t,n)},magnetpointerclick:function(e,t,n,r){var i=this.paper;i.eventData(e).mousemoved>i.options.clickThreshold||this.notify("element:magnet:pointerclick",e,t,n,r)}},{Flags:Lo});Dr(To.prototype,mo);const No=function(e,t,n){return e},Oo=function(e,t,n){var r,i,o,a=t.side||"bottom",s=Tr(t.padding||40),l=n.sourceBBox,u=n.targetBBox,c=l.center(),f=u.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*(l[i]/2+s[a]),f[r]+=o*(u[i]/2+s[a]),o*(c[r]-f[r])>0?f[r]=c[r]:c[r]=f[r],[c].concat(e,f)};var Mo={N:"S",S:"N",E:"W",W:"E"},Ro={N:-Math.PI/2*3,S:-Math.PI/2,E:0,W:Math.PI};function Do(e,t,n){var r=new $t(e.x,t.y);return n.containsPoint(r)&&(r=new $t(t.x,e.y)),r}function jo(e,t){return e["W"===t||"E"===t?"width":"height"]}function Io(e,t){return e.x===t.x?e.y>t.y?"N":"S":e.y===t.y?e.x>t.x?"W":"E":null}function Fo(e){return new sn(e.x,e.y,0,0)}function zo(e){var t=Tr(e.padding||e.elementPadding||20);return{x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}function Vo(e,t){return e.sourceBBox.clone().moveAndExpand(zo(t))}function Bo(e,t){return e.targetBBox.clone().moveAndExpand(zo(t))}function $o(e,t,n){var r=new $t(e.x,t.y),i=new $t(t.x,e.y),o=Io(e,r),a=Io(e,i),s=Mo[n],l=o===n||o!==s&&(a===s||a!==n)?r:i;return{points:[l],direction:Io(l,t)}}function Uo(e,t,n){var r=Do(e,t,n);return{points:[r],direction:Io(r,t)}}function Ho(e,t,n,r){var i,o={},a=[new $t(e.x,t.y),new $t(t.x,e.y)],s=a.filter(function(e){return!n.containsPoint(e)}),l=s.filter(function(t){return Io(t,e)!==r});if(l.length>0)i=(i=l.filter(function(t){return Io(e,t)===r}).pop())||l[0],o.points=[i],o.direction=Io(i,t);else{i=Jr(a,s)[0];var u=new $t(t).move(i,-jo(n,r)/2),c=Do(u,e,n);o.points=[c,u],o.direction=Io(u,t)}return o}function qo(e,t,n,r){var i=Uo(t,e,r),o=i.points[0];if(n.containsPoint(o)){var a=(i=Uo(e,t,n)).points[0];if(r.containsPoint(a)){var s=new $t(e).move(a,-jo(n,Io(e,a))/2),l=new $t(t).move(o,-jo(r,Io(t,o))/2),u=new Wt(s,l).midpoint(),c=Uo(e,u,n),f=$o(u,t,c.direction);i.points=[c.points[0],f.points[0]],i.direction=f.direction}}return i}function Wo(e,t,n,r,i){var o,a,s,l={},u=n.union(r).inflate(1),c=u.center().distance(t)>u.center().distance(e),f=c?t:e,h=c?e:t;return i?(o=$t.fromPolar(u.width+u.height,Ro[i],f),o=u.pointNearestToPoint(o).move(o,-1)):o=u.pointNearestToPoint(f).move(f,1),a=Do(o,h,u),o.round().equals(a.round())?(a=$t.fromPolar(u.width+u.height,St(o.theta(f))+Math.PI/2,h),s=Do(o,a=u.pointNearestToPoint(a).move(h,1).round(),u),l.points=c?[a,s,o]:[o,s,a]):l.points=c?[a,o]:[o,a],l.direction=Io(c?o:a,t),l}function Go(e,t,n){var r,i=Vo(n,t),o=Bo(n,t),a=function(e,t){return e.sourceAnchor?e.sourceAnchor:Vo(e,t).center()}(n,t),s=function(e,t){return e.targetAnchor?e.targetAnchor:Bo(e,t).center()}(n,t);i=i.union(Fo(a)),o=o.union(Fo(s)),(e=Gr(e).map($t)).unshift(a),e.push(s);for(var l=[],u=0,c=e.length-1;u<c;u++){var f=null,h=e[u],d=e[u+1],p=!!Io(h,d);if(0===u)u+1===c?i.intersect(o.clone().inflate(1))?f=Wo(h,d,i,o):p||(f=qo(h,d,i,o)):i.containsPoint(d)?f=Wo(h,d,i,Fo(d).moveAndExpand(zo(t))):p||(f=Uo(h,d,i));else if(u+1===c){var g=p&&Io(d,h)===r;o.containsPoint(h)||g?f=Wo(h,d,Fo(h).moveAndExpand(zo(t)),o,r):p||(f=Ho(h,d,o,r))}else p||(f=$o(h,d,r));f?(Array.prototype.push.apply(l,f.points),r=f.direction):r=Io(h,d),u+1<c&&l.push(d)}return l}var Yo={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 e=this.step,t=this.cost();return[{offsetX:e,offsetY:0,cost:t},{offsetX:-e,offsetY:0,cost:t},{offsetX:0,offsetY:e,cost:t},{offsetX:0,offsetY:-e,cost:t}]},penalties:function(){return{0:0,45:this.step/2,90:this.step/2}},paddingBox:function(){var e=this.step;return{x:-e,y:-e,width:2*e,height:2*e}},isPointObstacle:null,fallbackRouter:function(e,t,n){if(!qr(Go))throw new Error("Manhattan requires the orthogonal router as default fallback.");return Go(e,Dr({},Yo,t),n)},fallbackRoute:function(e,t,n){return null},draggingRoute:null};function Xo(e){this.map={},this.options=e,this.mapGridSize=100}function Ko(){this.items=[],this.hash={},this.values={},this.OPEN=1,this.CLOSE=2}function Jo(e,t){return t&&t.paddingBox?e.sourceBBox.clone().moveAndExpand(t.paddingBox):e.sourceBBox.clone()}function Qo(e,t){return t&&t.paddingBox?e.targetBBox.clone().moveAndExpand(t.paddingBox):e.targetBBox.clone()}function Zo(e,t){return e.sourceAnchor?e.sourceAnchor:Jo(e,t).center()}function ea(e,t,n,r,i){var o=360/n,a=e.theta(function(e,t,n,r){var i=r.step,o=t.x-e.x,a=t.y-e.y,s=o/n.x*i,l=a/n.y*i;return new $t(e.x+s,e.y+l)}(e,t,r,i)),s=wt(a+o/2);return o*Math.floor(s/o)}function ta(e,t){var n=Math.abs(e-t);return n>180?360-n:n}function na(e,t){if(!e)return t;var n=Math.abs(e),r=Math.round(n/t);return r?t+(n-r*t)/r:n}function ra(e,t){return e.round(t)}function ia(e,t,n){return ra(function(e,t){var n=t.source,r=xt(e.x-n.x,t.x)+n.x,i=xt(e.y-n.y,t.y)+n.y;return new $t(r,i)}(e.clone(),t),n)}function oa(e){return e.clone().toString()}function aa(e){return new $t(0===e.x?0:Math.abs(e.x)/e.x,0===e.y?0:Math.abs(e.y)/e.y)}function sa(e,t,n,r,i,o,a){for(var s,l=[],u=aa(i.difference(n)),c=oa(n),f=e[c];f;){var h=aa((s=t[c]).difference(f));h.equals(u)||(l.unshift(s),u=h),f=e[c=oa(f)]}var d=t[c];return aa(d.difference(r)).equals(u)||l.unshift(d),l}function la(e,t){for(var n=1/0,r=0,i=t.length;r<i;r++){var o=e.manhattanDistance(t[r]);o<n&&(n=o)}return n}function ua(e,t,n,r,i){var o=i.precision,a=i.directionMap,s=e.difference(t.center()),l=si(a)?Object.keys(a):[],u=Gr(n),c=l.reduce(function(n,i){if(u.includes(i)){for(var l,c=a[i],f=new $t(e.x+c.x*(Math.abs(s.x)+t.width),e.y+c.y*(Math.abs(s.y)+t.height)),h=new Wt(e,f).intersect(t)||[],d=h.length,p=null,g=0;g<d;g++){var v=h[g],m=e.squaredDistance(v);(void 0===l||m>l)&&(l=m,p=v)}if(p){var y=ia(p,r,o);t.containsPoint(y)&&(y=ia(y.offset(c.x*r.x,c.y*r.y),r,o)),n.push(y)}}return n},[]);return t.containsPoint(e)||c.push(ia(e,r,o)),c}function ca(e,t,n,r){var i,o,a=r.precision;i=ra(e instanceof sn?Zo(this,r).clone():e.clone(),a),o=ra(t instanceof sn?function(e,t){return e.targetAnchor?e.targetAnchor:Qo(e,t).center()}(this,r).clone():t.clone(),a);var s,l,u,c,f,h,d,p=(s=r.step,u=o,{source:(l=i).clone(),x:na(u.x-l.x,s),y:na(u.y-l.y,s)});if(h=e instanceof sn?ua(c=i,e,r.startDirections,p,r):[c=i],t instanceof sn?(f=o,d=ua(o,t,r.endDirections,p,r)):d=[f=o],h=h.filter(e=>!n(e)),d=d.filter(e=>!n(e)),h.length>0&&d.length>0){for(var g=new Ko,v={},m={},y={},b=0,w=h.length;b<w;b++){var x=h[b],k=oa(x);g.add(k,la(x,d)),v[k]=x,y[k]=0}var S,_,E=r.previousDirectionAngle,C=void 0===E,A=r.directions;!function(e,t,n){var r=n.step;Gr(n.directions).forEach(function(e){e.gridOffsetX=e.offsetX/r*t.x,e.gridOffsetY=e.offsetY/r*t.y})}(0,p,r);for(var P=A.length,L=Gr(d).reduce(function(e,t){var n=oa(t);return e.push(n),e},[]),T=r.maximumLoops;!g.isEmpty()&&T>0;){var N,O=g.pop(),M=v[O],R=m[O],D=y[O],j=void 0===R,I=M.equals(c);N=j?C?I?null:ea(c,M,P,p,r):E:ea(R,M,P,p,r);var F=h.length===d.length;if(F)for(var z=0;z<h.length;z++)if(!h[z].equals(d[z])){F=!1;break}if((!j||!F)&&L.indexOf(O)>=0)return r.previousDirectionAngle=N,sa(m,v,M,c,f);for(b=0;b<P;b++){var V=(S=A[b]).angle;if(_=ta(N,V),C&&I||!(_>r.maxAllowedDirectionChange)){var B=ia(M.clone().offset(S.gridOffsetX,S.gridOffsetY),p,a),$=oa(B);if(!g.isClose($)&&!n(B)){if(L.indexOf($)>=0&&!B.equals(f)&&ta(V,ea(B,f,P,p,r))>r.maxAllowedDirectionChange)continue;var U=D+S.cost+(I?0:r.penalties[_]);(!g.isOpen($)||U<y[$])&&(v[$]=B,m[$]=M,y[$]=U,g.add($,U+la(B,d)))}}}T--}}return r.fallbackRoute.call(this,c,f,r)}Xo.prototype.build=function(e,t){var n=this.options,r=Gr(n.excludeEnds).reduce(function(n,r){var i=t.get(r);if(i){var o=e.getCell(i.id);o&&n.push(o)}return n},[]),i=[],o=e.getCell(t.get("source").id);o&&(i=Qr(i,o.getAncestors().map(function(e){return e.id})));var a=e.getCell(t.get("target").id);a&&(i=Qr(i,a.getAncestors().map(function(e){return e.id})));var s=this.mapGridSize;return e.getElements().reduce(function(e,t){var o=Gr(n.excludeTypes).includes(t.get("type")),a=r.find(function(e){return e.id===t.id}),l=i.includes(t.id);if(!(o||a||l))for(var u=t.getBBox().moveAndExpand(n.paddingBox),c=u.origin().snapToGrid(s),f=u.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;e[p]=e[p]||[],e[p].push(u)}return e},this.map),this},Xo.prototype.isPointAccessible=function(e){var t=e.clone().snapToGrid(this.mapGridSize).toString();return Gr(this.map[t]).every(function(t){return!t.containsPoint(e)})},Ko.prototype.add=function(e,t){this.hash[e]?this.items.splice(this.items.indexOf(e),1):this.hash[e]=this.OPEN,this.values[e]=t;var n=zr(this.items,e,function(e){return this.values[e]}.bind(this));this.items.splice(n,0,e)},Ko.prototype.remove=function(e){this.hash[e]=this.CLOSE},Ko.prototype.isOpen=function(e){return this.hash[e]===this.OPEN},Ko.prototype.isClose=function(e){return this.hash[e]===this.CLOSE},Ko.prototype.isEmpty=function(){return 0===this.items.length},Ko.prototype.pop=function(){var e=this.items.shift();return this.remove(e),e};const fa=function(e,t,n){return function(e,t,n){!function(e){if(e.directions=ei(e,"directions"),e.penalties=ei(e,"penalties"),e.paddingBox=ei(e,"paddingBox"),e.padding=ei(e,"padding"),e.padding){var t=Tr(e.padding);e.paddingBox={x:-t.left,y:-t.top,width:t.left+t.right,height:t.top+t.bottom}}Gr(e.directions).forEach(function(e){var t=new $t(0,0),n=new $t(e.offsetX,e.offsetY);e.angle=wt(t.theta(n))})}(t),n.options.perpendicular=!!t.perpendicular;var r=Jo(n,t),i=Qo(n,t),o=Zo(n,t);let a;if("function"==typeof t.isPointObstacle)a=t.isPointObstacle;else{const e=new Xo(t);e.build(n.paper.model,n.model),a=t=>!e.isPointAccessible(t)}for(var s,l,u=Gr(e).map($t),c=[],f=o,h=0,d=u.length;h<=d;h++){var p=null;if(l=s||r,!(s=u[h])&&(s=i,(!n.model.get("source").id||!n.model.get("target").id)&&qr(t.draggingRoute))){var g=l===r?o:l,v=s.origin();p=t.draggingRoute.call(n,g,v,t)}if(null===(p=p||ca.call(n,l,s,a,t)))return t.fallbackRouter(e,t,n);var m=p[0];m&&m.equals(f)&&p.shift(),f=p[p.length-1]||f,Array.prototype.push.apply(c,p)}return c}(e,Dr({},Yo,t),n)};var ha={maxAllowedDirectionChange:45,diagonalCost:function(){var e=this.step;return Math.ceil(Math.sqrt(e*e<<1))},directions:function(){var e=this.step,t=this.cost(),n=this.diagonalCost();return[{offsetX:e,offsetY:0,cost:t},{offsetX:e,offsetY:e,cost:n},{offsetX:0,offsetY:e,cost:t},{offsetX:-e,offsetY:e,cost:n},{offsetX:-e,offsetY:0,cost:t},{offsetX:-e,offsetY:-e,cost:n},{offsetX:0,offsetY:-e,cost:t},{offsetX:e,offsetY:-e,cost:n}]},fallbackRoute:function(e,t,n){var r=e.theta(t),i=[],o={x:t.x,y:e.y},a={x:e.x,y:t.y};if(r%180>90){var s=o;o=a,a=s}var l=r%90<45?o:a,u=new Wt(e,l),c=90*Math.ceil(r/90),f=$t.fromPolar(u.squaredLength(),St(c+135),l),h=new Wt(t,f),d=u.intersection(h),p=d||t,g=d?p:e,v=360/n.directions.length,m=g.theta(t),y=wt(m+v/2),b=v*Math.floor(y/v);return n.previousDirectionAngle=b,p&&i.push(p.round()),i.push(t),i}};const da=function(e,t,n){if(!qr(fa))throw new Error("Metro requires the manhattan router.");return fa(e,Dr({},ha,t),n)};var pa=["arc","gap","cubic"],ga=["smooth"],va=1/3,ma=2/3;function ya(e,t,n){var r=[].concat(e,n,t);return r.reduce(function(e,t,n){var i=r[n+1];return null!=i&&(e[n]=Gt(t,i)),e},[])}function ba(e,t){return Gt(e,t).squaredLength()}function wa(e,t,n,r){var i,o=new wn;return i=wn.createSegment("M",e[0].start),o.appendSegment(i),Gr(e).forEach(function(a,s){if(a.isJump){var l,u,c,f;if("arc"===n){l=-90,u=a.start.difference(a.end);var h=Number(u.x<0||0===u.x&&u.y<0);h&&(l+=180);var d,p=a.midpoint(),g=new Wt(p,a.end).rotate(p,l);c=(d=new Wt(a.start,p)).pointAt(2/3).rotate(a.start,l),f=g.pointAt(1/3).rotate(g.end,-l),i=wn.createSegment("C",c,f,g.end),o.appendSegment(i),d=new Wt(p,a.end),c=g.pointAt(1/3).rotate(g.end,l),f=d.pointAt(1/3).rotate(a.end,-l),i=wn.createSegment("C",c,f,a.end),o.appendSegment(i)}else if("gap"===n)i=wn.createSegment("M",a.end),o.appendSegment(i);else if("cubic"===n){l=a.start.theta(a.end);var v=.6*t,m=1.35*t;u=a.start.difference(a.end),(h=Number(u.x<0||0===u.x&&u.y<0))&&(m*=-1),c=$t(a.start.x+v,a.start.y+m).rotate(a.start,l),f=$t(a.end.x-v,a.end.y+m).rotate(a.end,l),i=wn.createSegment("C",c,f,a.end),o.appendSegment(i)}}else{var y=e[s+1];0==r||!y||y.isJump?(i=wn.createSegment("L",a.end),o.appendSegment(i)):function(e,t,n,r,i){var o,a=n.distance(r)/2,s=n.distance(i)/2,l=-Math.min(e,a),u=-Math.min(e,s),c=n.clone().move(r,l).round(),f=n.clone().move(i,u).round(),h=new $t(va*c.x+ma*n.x,ma*n.y+va*c.y),d=new $t(va*f.x+ma*n.x,ma*n.y+va*f.y);o=wn.createSegment("L",c),t.appendSegment(o),o=wn.createSegment("C",h,d,f),t.appendSegment(o)}(r,o,a.end,a.start,y.end)}}),o}const xa=function(e,t,n,r){!function(e){var t=e.paper,n=t._jumpOverUpdateList;if(null==n){n=t._jumpOverUpdateList=[];var r=t.model;r.on("batch:stop",function(){this.hasActiveBatch()||function(e){for(var t=e._jumpOverUpdateList,n=0;n<t.length;n++){const e=t[n],r=e.getFlag(e.constructor.Flags.CONNECTOR);e.requestUpdate(r)}}(t)}),r.on("reset",function(){n=t._jumpOverUpdateList=[]})}n.indexOf(e)<0&&(n.push(e),e.listenToOnce(e.model,"change:connector remove",function(){n.splice(n.indexOf(e),1)}))}(this);var i=r.raw,o=r.size||5,a=r.jump&&(""+r.jump).toLowerCase(),s=r.radius||0,l=r.ignoreConnectors||ga;-1===pa.indexOf(a)&&(a=pa[0]);var u=this.paper,c=u.model.getLinks();if(1===c.length)return wa(ya(e,t,n),o,a,s);var f=this.model,h=c.indexOf(f),d=u.options.defaultConnector||{},p=c.filter(function(e,t){var n=e.get("connector")||d;return!(Gr(l).includes(n.name)||t>h&&"jumpover"===n.name)}),g=p.map(function(e){return u.findViewByModel(e)}),v=ya(e,t,n),m=g.map(function(e){return null==e?[]:e===this?v:ya(e.sourcePoint,e.targetPoint,e.route)},this),y=v.reduce(function(e,t){var n=p.reduce(function(e,n,r){if(n!==f){var i=function(e,t){return Gr(t).reduce(function(t,n){var r=e.intersection(n);return r&&t.push(r),t},[])}(t,m[r]);e.push.apply(e,i)}return e},[]).sort(function(e,n){return ba(t.start,e)-ba(t.start,n)});return n.length>0?e.push.apply(e,function(e,t,n){return t.reduce(function(r,i,o){if(!0===i.skip)return r;var a=r.pop()||e,s=Ut(i).move(a.start,-n),l=Ut(i).move(a.start,+n),u=t[o+1];if(null!=u){var c=l.distance(u);c<=n&&(l=u.move(a.start,c),u.skip=!0)}else if(s.distance(a.end)<2*n+1)return r.push(a),r;if(l.distance(a.start)<2*n+1)return r.push(a),r;var f=Gt(s,l);return f.isJump=!0,r.push(Gt(a.start,s),f,Gt(l,a.end)),r},[])}(t,n,o)):e.push(t),e},[]),b=wa(y,o,a,s);return i?b:b.serialize()},ka=function(e,t,n,r){var i=r&&r.raw,o=[e].concat(n).concat([t]),a=new hn(o),s=new wn(a);return i?s:s.serialize()},Sa=function(e,t,n,r){r||(r={});var i,o=r.radius||10,a=r.raw,s=new wn;i=wn.createSegment("M",e),s.appendSegment(i);for(var l,u,c,f,h,d,p,g,v,m,y,b=1/3,w=2/3,x=0,k=n.length;x<k;x++)l=new $t(n[x]),u=n[x-1]||e,c=n[x+1]||t,f=h||l.distance(u)/2,h=l.distance(c)/2,d=-Math.min(o,f),p=-Math.min(o,h),g=l.clone().move(u,d).round(),v=l.clone().move(c,p).round(),m=new $t(b*g.x+w*l.x,w*l.y+b*g.y),y=new $t(b*v.x+w*l.x,w*l.y+b*v.y),i=wn.createSegment("L",g),s.appendSegment(i),i=wn.createSegment("C",m,y,v),s.appendSegment(i);return i=wn.createSegment("L",t),s.appendSegment(i),a?s:s.serialize()},_a=function(e,t,n,r){var i,o=r&&r.raw;if(n&&0!==n.length){var a=[e].concat(n).concat([t]),s=yn.throughPoints(a);i=new wn(s)}else{var l;if(i=new wn,l=wn.createSegment("M",e),i.appendSegment(l),Math.abs(e.x-t.x)>=Math.abs(e.y-t.y)){var u=(e.x+t.x)/2;l=wn.createSegment("C",u,e.y,u,t.y,t.x,t.y),i.appendSegment(l)}else{var c=(e.y+t.y)/2;l=wn.createSegment("C",e.x,c,t.x,c,t.x,t.y),i.appendSegment(l)}}return o?i:i.serialize()},Ea={AUTO:"auto",HORIZONTAL:"horizontal",VERTICAL:"vertical",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},Ca={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",AUTO:"auto",CLOSEST_POINT:"closest-point",OUTWARDS:"outwards"},Aa=function(e,t,n=[],r={},i){const o=Boolean(r.raw),{direction:a=Ea.AUTO,precision:s=3}=r,l={coeff:r.distanceCoefficient||.6,angleTangentCoefficient:r.angleTangentCoefficient||80,tau:r.tension||.5,sourceTangent:r.sourceTangent?new $t(r.sourceTangent):null,targetTangent:r.targetTangent?new $t(r.targetTangent):null};"string"==typeof r.sourceDirection?l.sourceDirection=r.sourceDirection:"number"==typeof r.sourceDirection?l.sourceDirection=new $t(1,0).rotate(null,r.sourceDirection):l.sourceDirection=r.sourceDirection?new $t(r.sourceDirection).normalize():null,"string"==typeof r.targetDirection?l.targetDirection=r.targetDirection:"number"==typeof r.targetDirection?l.targetDirection=new $t(1,0).rotate(null,r.targetDirection):l.targetDirection=r.targetDirection?new $t(r.targetDirection).normalize():null;const u=[e,...n.map(e=>new $t(e)),t];let c,f;if(l.sourceTangent)c=l.sourceTangent;else{const e=function(e,t,n,r){if(r.sourceDirection)switch(r.sourceDirection){case Ca.UP:return new $t(0,-1);case Ca.DOWN:return new $t(0,1);case Ca.LEFT:return new $t(-1,0);case Ca.RIGHT:return new $t(1,0);case Ca.AUTO:return Pa(e,t);case Ca.CLOSEST_POINT:return Ta(0,t);case Ca.OUTWARDS:return Oa(e,t);default:return r.sourceDirection}switch(n){case Ea.HORIZONTAL:return function(e,t){const{sourceBBox:n}=e;let r;return r=n.width&&n.height?n.sideNearestToPoint(t[0]):n.x>t[1].x?"right":"left",new $t("left"===r?-1:1,0)}(e,t);case Ea.VERTICAL:return function(e,t){const{sourceBBox:n}=e;let r;return r=n.width&&n.height?n.sideNearestToPoint(t[0]):n.y>t[1].y?"bottom":"top",new $t(0,"top"===r?-1:1)}(e,t);case Ea.CLOSEST_POINT:return Ta(0,t);case Ea.OUTWARDS:return Oa(e,t);case Ea.AUTO:default:return Pa(e,t)}}(i,u,a,l),t=u[0].distance(u[1])*l.coeff,n=Da(e,u[1].difference(u[0]).normalize());if(n>Math.PI/4){const r=t+(n-Math.PI/4)*l.angleTangentCoefficient;c=e.clone().scale(r,r)}else c=e.clone().scale(t,t)}if(l.targetTangent)f=l.targetTangent;else{const e=function(e,t,n,r){if(r.targetDirection)switch(r.targetDirection){case Ca.UP:return new $t(0,-1);case Ca.DOWN:return new $t(0,1);case Ca.LEFT:return new $t(-1,0);case Ca.RIGHT:return new $t(0,1);case Ca.AUTO:return La(e,t);case Ca.CLOSEST_POINT:return Na(0,t);case Ca.OUTWARDS:return Ma(e,t);default:return r.targetDirection}switch(n){case Ea.HORIZONTAL:return function(e,t){const{targetBBox:n}=e;let r;return r=n.width&&n.height?n.sideNearestToPoint(t[t.length-1]):n.x>t[t.length-2].x?"left":"right",new $t("left"===r?-1:1,0)}(e,t);case Ea.VERTICAL:return function(e,t){const{targetBBox:n}=e;let r;return r=n.width&&n.height?n.sideNearestToPoint(t[t.length-1]):n.y>t[t.length-2].y?"top":"bottom",new $t(0,"top"===r?-1:1)}(e,t);case Ea.CLOSEST_POINT:return Na(0,t);case Ea.OUTWARDS:return Ma(e,t);case Ea.AUTO:default:return La(e,t)}}(i,u,a,l),t=u.length-1,n=u[t-1].distance(u[t])*l.coeff,r=Da(e,u[t-1].difference(u[t]).normalize());if(r>Math.PI/4){const t=n+(r-Math.PI/4)*l.angleTangentCoefficient;f=e.clone().scale(t,t)}else f=e.clone().scale(n,n)}const h=function(e,t,n,r){const{tau:i,coeff:o}=r,a=[],s=[],l=[],u=e.length-1;for(let t=0;t<u;t++)a[t]=e[t].distance(e[t+1]);s[0]=t,s[u]=n;for(let t=1;t<u;t++){let n,r;n=1===t?e[t-1].clone().offset(s[t-1].x,s[t-1].y):e[t-1].clone(),r=t===u-1?e[t+1].clone().offset(s[t+1].x,s[t+1].y):e[t+1].clone();const i=n.difference(e[t]).normalize(),l=r.difference(e[t]).normalize(),c=Da(i,l);let f,h=(Math.PI-c)/2;const d=ja(i,l);let p;p=ja(e[t].difference(e[t+1]),e[t].difference(e[t-1])),d<0&&(h=-h),c<Math.PI/2&&(h<0&&p<0||h>0&&p>0)&&(h-=Math.PI),f=l.clone(),Ra(f,h);const g=f.clone(),v=f.clone(),m=a[t-1]*o,y=a[t]*o;g.scale(m,m),v.scale(y,y),s[t]=[g,v]}for(let t=0;t<u;t++){let n,r;n=0===t?e[t+1].difference(s[t].x/i,s[t].y/i):e[t+1].difference(s[t][1].x/i,s[t][1].y/i),r=t===u-1?e[t].clone().offset(s[t+1].x/i,s[t+1].y/i):e[t].difference(s[t+1][0].x/i,s[t+1][0].y/i),l[t]=[n,e[t],e[t+1],r]}return l}(u,c,f,l),d=h.map(e=>function(e,t){const{tau:n}=t,r=new $t;r.x=e[1].x+(e[2].x-e[0].x)/(6*n),r.y=e[1].y+(e[2].y-e[0].y)/(6*n);const i=new $t;return i.x=e[2].x+(e[3].x-e[1].x)/(6*n),i.y=e[2].y+(e[3].y-e[1].y)/(6*n),new yn(e[1],r,i,e[2])}(e,l)),p=new wn(d).round(s);return o?p:p.serialize()};function Pa(e,t,n){const{sourceBBox:r}=e;let i;switch(i=r.width&&r.height?r.sideNearestToPoint(t[0]):r.sideNearestToPoint(t[1]),i){case"top":return new $t(0,-1);case"bottom":return new $t(0,1);case"right":return new $t(1,0);case"left":return new $t(-1,0)}}function La(e,t,n){const{targetBBox:r}=e;let i;switch(i=r.width&&r.height?r.sideNearestToPoint(t[t.length-1]):r.sideNearestToPoint(t[t.length-2]),i){case"top":return new $t(0,-1);case"bottom":return new $t(0,1);case"right":return new $t(1,0);case"left":return new $t(-1,0)}}function Ta(e,t,n){return t[1].difference(t[0]).normalize()}function Na(e,t,n){const r=t.length-1;return t[r-1].difference(t[r]).normalize()}function Oa(e,t,n){const{sourceBBox:r}=e,i=r.center();return t[0].difference(i).normalize()}function Ma(e,t,n){const{targetBBox:r}=e,i=r.center();return t[t.length-1].difference(i).normalize()}function Ra(e,t){const n=Math.cos(t),r=Math.sin(t),i=n*e.x-r*e.y,o=r*e.x+n*e.y;e.x=i,e.y=o}function Da(e,t){let n=e.dot(t)/(e.magnitude()*t.magnitude());return n<-1&&(n=-1),n>1&&(n=1),Math.acos(n)}function ja(e,t){return e.x*t.y-e.y*t.x}Aa.Directions=Ea,Aa.TangentDirections=Ca;const Ia={RENDER:"RENDER",UPDATE:"UPDATE",TOOLS:"TOOLS",LEGACY_TOOLS:"LEGACY_TOOLS",LABELS:"LABELS",VERTICES:"VERTICES",SOURCE:"SOURCE",TARGET:"TARGET",CONNECTOR:"CONNECTOR"},Fa=Po.extend({className:function(){var e=Po.prototype.className.apply(this).split(" ");return e.push("link"),e.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(){Po.prototype.initialize.apply(this,arguments),this._labelCache={},this._labelSelectors={},this._markerCache={},this._V={},this.cleanNodesCache()},presentationAttributes:{markup:[Ia.RENDER],attrs:[Ia.UPDATE],router:[Ia.UPDATE],connector:[Ia.CONNECTOR],smooth:[Ia.UPDATE],manhattan:[Ia.UPDATE],toolMarkup:[Ia.LEGACY_TOOLS],labels:[Ia.LABELS],labelMarkup:[Ia.LABELS],vertices:[Ia.VERTICES,Ia.UPDATE],vertexMarkup:[Ia.VERTICES],source:[Ia.SOURCE,Ia.UPDATE],target:[Ia.TARGET,Ia.UPDATE]},initFlag:[Ia.RENDER,Ia.SOURCE,Ia.TARGET,Ia.TOOLS],UPDATE_PRIORITY:1,confirmUpdate:function(e,t){if(t||(t={}),this.hasFlag(e,Ia.SOURCE)){if(!this.updateEndProperties("source"))return e;e=this.removeFlag(e,Ia.SOURCE)}if(this.hasFlag(e,Ia.TARGET)){if(!this.updateEndProperties("target"))return e;e=this.removeFlag(e,Ia.TARGET)}const{paper:n,sourceView:r,targetView:i}=this;if(n&&(r&&!n.isViewMounted(r)||i&&!n.isViewMounted(i)))return e;if(this.hasFlag(e,Ia.RENDER))return this.render(),this.updateHighlighters(!0),this.updateTools(t),this.removeFlag(e,[Ia.RENDER,Ia.UPDATE,Ia.VERTICES,Ia.LABELS,Ia.TOOLS,Ia.LEGACY_TOOLS,Ia.CONNECTOR]);let o=!1;this.hasFlag(e,Ia.VERTICES)&&(this.renderVertexMarkers(),e=this.removeFlag(e,Ia.VERTICES));const{model:a}=this,{attributes:s}=a;let l=this.hasFlag(e,Ia.LABELS),u=this.hasFlag(e,Ia.LEGACY_TOOLS);l&&(this.onLabelsChange(a,s.labels,t),e=this.removeFlag(e,Ia.LABELS),o=!0),u&&(this.renderTools(),e=this.removeFlag(e,Ia.LEGACY_TOOLS));const c=this.hasFlag(e,Ia.UPDATE),f=this.hasFlag(e,Ia.CONNECTOR);return(c||f)&&(c?t.translateBy&&a.isRelationshipEmbeddedIn(t.translateBy)?this.translate(t.tx,t.ty):this.update():(this.updatePath(),this.updateDOM()),this.updateTools(t),e=this.removeFlag(e,[Ia.UPDATE,Ia.TOOLS,Ia.CONNECTOR]),l=!1,u=!1,o=!0),l&&this.updateLabelPositions(),u&&this.updateToolsPosition(),o&&this.updateHighlighters(),this.hasFlag(e,Ia.TOOLS)&&(this.updateTools(t),e=this.removeFlag(e,Ia.TOOLS)),e},requestConnectionUpdate:function(e){this.requestUpdate(this.getFlag(Ia.UPDATE),e)},isLabelsRenderRequired:function(e={}){const t=this.model.previous("labels");if(!t)return!0;if("propertyPathArray"in e&&"propertyValue"in e){var n=e.propertyPathArray||[],r=n.length;if(r>1&&t[n[1]]){if(2===r)return"markup"in Object(e.propertyValue);if("markup"!==n[2])return!1}}return!0},onLabelsChange:function(e,t,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 e=this.model,t=e.get("markup")||e.markup;if(!t)throw new Error("dia.LinkView: markup required");if(Array.isArray(t))return this.renderJSONMarkup(t);if("string"==typeof t)return this.renderStringMarkup(t);throw new Error("dia.LinkView: invalid markup")},renderJSONMarkup:function(e){var t=this.parseDOMJSON(e,this.el);this.selectors=t.selectors,this.vel.append(t.fragment)},renderStringMarkup:function(e){var t=hr(e);Array.isArray(t)||(t=[t]);for(var n=this._V,r=0,i=t.length;r<i;r++){var o=t[r],a=o.attr("class");a&&(a=gr(a),n[gt.camelCase(a)]=o)}this.renderTools(),this.renderVertexMarkers(),this.renderArrowheadMarkers(),this.vel.append(t)},_getLabelMarkup:function(e){if(e){if(Array.isArray(e))return this.parseDOMJSON(e,null);if("string"==typeof e)return this._getLabelStringMarkup(e);throw new Error("dia.linkView: invalid label markup")}},_getLabelStringMarkup:function(e){var t=hr(e),n=document.createDocumentFragment();if(Array.isArray(t))for(var r=0,i=t.length;r<i;r++){var o=t[r].node;n.appendChild(o)}else n.appendChild(t.node);return{fragment:n,selectors:{}}},_normalizeLabelMarkup:function(e){if(e){var t,n=e.fragment;if(!(e.fragment instanceof DocumentFragment&&e.fragment.hasChildNodes()))throw new Error("dia.LinkView: invalid label markup.");var r=n.childNodes;return(t=r.length>1||"G"!==r[0].nodeName.toUpperCase()?hr("g").append(n):hr(r[0])).addClass("label"),{node:t.node,selectors:e.selectors}}},renderLabels:function(){var e=this._V,t=e.labels,n=this._labelCache={},r=this._labelSelectors={},i=this.model,o=i.attributes.labels||[],a=o.length;if(0===a)return t&&t.remove(),this;t?t.empty():(t=e.labels=hr("g").addClass("labels"),this.options.labelsLayer&&(t.addClass(pr(ei(this,"className"))),t.attr("model-id",i.id)));for(var s=0;s<a;s++){var l,u,c=o[s],f=this._normalizeLabelMarkup(this._getLabelMarkup(c.markup));if(f)l=f.node,u=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;l=g.node,u=g.selectors}l.setAttribute("label-idx",s),t.append(l),n[s]=l;var v=this.selector;if(u[v])throw new Error("dia.LinkView: ambiguous label root selector.");u[v]=l,r[s]=u}return t.parent()||this.mountLabels(),this.updateLabels(),this},mountLabels:function(){const{el:e,paper:t,model:n,_V:r,options:i}=this,{labels:o}=r;if(!o||!n.hasLabels())return;const{node:a}=o;i.labelsLayer?t.getLayerView(i.labelsLayer).insertSortedNode(a,n.get("z")):a.parentNode!==e&&e.appendChild(a)},unmountLabels:function(){const{options:e,_V:t}=this;if(!t)return;const{labels:n}=t;n&&e.labelsLayer&&n.remove()},onMount:function(){this.mountLabels()},unmount:function(){Po.prototype.unmount.apply(this,arguments),this.unmountLabels()},findLabelNode:function(e,t){const n=this._labelCache[e];if(!n)return null;const r=this._labelSelectors[e],[i=null]=this.findBySelector(t,n,r);return i},_mergeLabelAttrs:function(e,t,n,r){if(null===t)return null;if(void 0===t){if(null===n)return null;if(void 0===n){if(e)return;return r}return e?n:ai({},r,n)}return e?ai({},n,t):ai({},r,n,t)},updateLabels:function(){if(!this._V.labels)return this;for(var e=this.model,t=e.get("labels")||[],n=this.can("labelMove"),r=e._builtins.defaultLabel.attrs,i=e._getDefaultLabel(),o=i.markup,a=i.attrs,s=0,l=t.length;s<l;s++){var u=this._labelCache[s];u.setAttribute("cursor",n?"move":"default");var c=this._labelSelectors[s],f=t[s],h=f.markup,d=f.attrs,p=this._mergeLabelAttrs(h||o,d,a,r);this.updateDOMSubtreeAttributes(u,p,{rootBBox:new sn(f.size),selectors:c})}return this},renderTools:function(){if(!this._V.linkTools)return this;var e,t=gt(this._V.linkTools.node).empty(),n=Rr(this.model.get("toolMarkup")||this.model.toolMarkup),r=hr(n());return t.append(r.node),this._toolCache=r,this.options.doubleLinkTools&&(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup?(n=Rr(this.model.get("doubleToolMarkup")||this.model.doubleToolMarkup),e=hr(n())):e=r.clone(),t.append(e.node),this._tool2Cache=e),this},renderVertexMarkers:function(){if(!this._V.markerVertices)return this;var e=gt(this._V.markerVertices.node).empty(),t=Rr(this.model.get("vertexMarkup")||this.model.vertexMarkup);return this.model.vertices().forEach(function(n,r){e.append(hr(t(Dr({idx:r},n))).node)}),this},renderArrowheadMarkers:function(){if(!this._V.markerArrowheads)return this;var e=gt(this._V.markerArrowheads.node);e.empty();var t=Rr(this.model.get("arrowheadMarkup")||this.model.arrowheadMarkup);return this._V.sourceArrowhead=hr(t({end:"source"})),this._V.targetArrowhead=hr(t({end:"target"})),e.append(this._V.sourceArrowhead.node,this._V.targetArrowhead.node),this},removeRedundantLinearVertices:function(e){const t=this.model,n=t.vertices(),r=[this.sourceAnchor,...n,this.targetAnchor],i=r.length,o=new hn(r);o.simplify({threshold:.001});const a=o.points.map(e=>e.toJSON()),s=a.length;return i===s?0:(t.vertices(a.slice(1,s-1),e),i-s)},updateDefaultConnectionPath:function(){var e=this._V;e.connection&&e.connection.attr("d",this.getSerializedConnection()),e.connectionWrap&&e.connectionWrap.attr("d",this.getSerializedConnection()),e.markerSource&&e.markerTarget&&this._translateAndAutoOrientArrows(e.markerSource,e.markerTarget)},getEndView:function(e){switch(e){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error("dia.LinkView: type parameter required.")}},getEndAnchor:function(e){switch(e){case"source":return new $t(this.sourceAnchor);case"target":return new $t(this.targetAnchor);default:throw new Error("dia.LinkView: type parameter required.")}},getEndConnectionPoint:function(e){switch(e){case"source":return new $t(this.sourcePoint);case"target":return new $t(this.targetPoint);default:throw new Error("dia.LinkView: type parameter required.")}},getEndMagnet:function(e){switch(e){case"source":var t=this.sourceView;if(!t)break;return this.sourceMagnet||t.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(e=0,t=0){const{route:n,path:r}=this;if(!n||!r)return;const i=new hn(n);i.translate(e,t),this.route=i.points,this._translateConnectionPoints(e,t),r.translate(e,t),this.updateDOM()},updateDOM(){const{el:e,model:t,selectors:n}=this;this.cleanNodesCache(),this.updateDOMSubtreeAttributes(e,t.attr(),{selectors:n}),this.updateDefaultConnectionPath(),this.updateLabelPositions(),this.updateToolsPosition(),this.updateArrowheadMarkers(),this.options.perpendicular=null},updateRoute:function(){const{model:e}=this,t=e.vertices(),n=this.findAnchors(t),r=this.sourceAnchor=n.source,i=this.targetAnchor=n.target,o=this.findRoute(t);this.route=o;var a=this.findConnectionPoints(o,r,i);this.sourcePoint=a.source,this.targetPoint=a.target},updatePath:function(){const{route:e,sourcePoint:t,targetPoint:n}=this,r=this.findMarkerPoints(e,t,n),i=this.findPath(e,r.source||t,r.target||n);this.path=i},findMarkerPoints:function(e,t,n){var r,i,o=e[0],a=e[e.length-1],s=this._markerCache;return this._V.markerSource&&(s.sourceBBox=s.sourceBBox||this._V.markerSource.getBBox(),r=$t(t).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=$t(n).move(a||t,s.targetBBox.width*this._V.markerTarget.scale().sx*-1).round()),s.sourcePoint=r||t.clone(),s.targetPoint=i||n.clone(),{source:r,target:i}},findAnchorsOrdered:function(e,t,n,r){var i,o,a,s,l=this.model,u=l.get(e),c=l.get(n),f=this.getEndView(e),h=this.getEndView(n),d=this.getEndMagnet(e),p=this.getEndMagnet(n);f?(a=t?new $t(t):h?p:new $t(c),i=this.getAnchor(u.anchor,f,d,a,e)):i=new $t(u),h?(s=new $t(r||i),o=this.getAnchor(c.anchor,h,p,s,n)):o=new $t(c);var g={};return g[e]=i,g[n]=o,g},findAnchors:function(e){var t=this.model,n=e[0],r=e[e.length-1];return t.target().priority&&!t.source().priority?this.findAnchorsOrdered("target",r,"source",n):this.findAnchorsOrdered("source",n,"target",r)},findConnectionPoints:function(e,t,n){var r,i,o,a,s=e[0],l=e[e.length-1],u=this.model,c=u.get("source"),f=u.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 Wt(s||n,t);o=this.getConnectionPoint(g,h,r,v,"source")}else o=t;if(d&&!d.isNodeConnection(this.targetMagnet)){i=this.targetMagnet||d.el;var m=f.connectionPoint||p.defaultConnectionPoint,y=new Wt(l||t,n);a=this.getConnectionPoint(m,d,i,y,"target")}else a=n;return{source:o,target:a}},getAnchor:function(e,t,n,r,i){var o,a=t.isNodeConnection(n),s=this.paper.options;if(e||(e=a?s.defaultLinkAnchor:s.perpendicularLinks||this.options.perpendicular?{name:"perpendicular"}:s.defaultAnchor),!e)throw new Error("Anchor required.");if("function"==typeof e)o=e;else{var l=e.name;if("function"!=typeof(o=s[a?"linkAnchorNamespace":"anchorNamespace"][l]))throw new Error("Unknown anchor: "+l)}var u=o.call(this,t,n,r,e.args||{},i,this);return u?u.round(this.decimalsRounding):new $t},getConnectionPoint:function(e,t,n,r,i){var o,a,s=r.end,l=this.paper.options;if("function"==typeof l.linkConnectionPoint){var u=n===t.el?void 0:n;if(o=l.linkConnectionPoint(this,t,u,r.start,i))return o}if(!e)return s;if("function"==typeof e)a=e;else{var c=e.name;if("function"!=typeof(a=l.connectionPointNamespace[c]))throw new Error("Unknown connection point: "+c)}return(o=a.call(this,r,t,n,e.args||{},i,this))?o.round(this.decimalsRounding):s},_translateConnectionPoints:function(e,t){var n=this._markerCache;n.sourcePoint.offset(e,t),n.targetPoint.offset(e,t),this.sourcePoint.offset(e,t),this.targetPoint.offset(e,t),this.sourceAnchor.offset(e,t),this.targetAnchor.offset(e,t)},_normalizeLabelPosition:function(e){return"number"==typeof e?{distance:e,offset:null,angle:0,args:null}:e},updateLabelPositions:function(){if(!this._V.labels)return this;if(!this.path)return this;var e=this.model,t=e.get("labels")||[];if(!t.length)return this;for(var n=e._builtins.defaultLabel.position,r=e._getDefaultLabel(),i=this._normalizeLabelPosition(r.position),o=ai({},n,i),a=0,s=t.length;a<s;a++){var l=this._labelCache[a];if(l){var u=t[a],c=this._normalizeLabelPosition(u.position),f=ai({},o,c),h=this._getLabelTransformationMatrix(f);l.setAttribute("transform",hr.matrixToTransformString(h)),this._cleanLabelMatrices(a)}}return this},_cleanLabelMatrices:function(e){const{metrics:t,_labelSelectors:n}=this,r=n[e];if(r)for(let e in r){const{id:n}=r[e];n&&n in t&&delete t[n].magnetMatrix}},updateToolsPosition:function(){if(!this._V.linkTools)return this;var e="",t=this.options.linkToolsOffset,n=this.getConnectionLength();if(!Number.isNaN(n)){n<this.options.shortLinkLength&&(e="scale(.5)",t/=2);var r=this.getPointAtLength(t);if(this._toolCache.attr("transform","translate("+r.x+", "+r.y+") "+e),this.options.doubleLinkTools&&n>=this.options.longLinkLength){var i=this.options.doubleLinkToolsOffset||t;r=this.getPointAtLength(n-i),this._tool2Cache.attr("transform","translate("+r.x+", "+r.y+") "+e),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"===gt.css(this._V.markerArrowheads.node,"display"))return this;var e=this.getConnectionLength()<this.options.shortLinkLength?.5:1;return this._V.sourceArrowhead.scale(e),this._V.targetArrowhead.scale(e),this._translateAndAutoOrientArrows(this._V.sourceArrowhead,this._V.targetArrowhead),this},updateEndProperties:function(e){const{model:t,paper:n}=this,r=`${e}View`,i=t.get(e),o=i&&i.id;if(!o)return this[r]=null,this.updateEndMagnet(e),!0;const a=n.getModelById(o);if(!a)throw new Error("LinkView: invalid "+e+" cell.");const s=a.findView(n);return!!s&&(this[r]=s,this.updateEndMagnet(e),!0)},updateEndMagnet:function(e){const t=`${e}Magnet`,n=this.getEndView(e);if(n){let r=n.getMagnetFromLinkEnd(this.model.get(e));r===n.el&&(r=null),this[t]=r}else this[t]=null},_translateAndAutoOrientArrows:function(e,t){var n=Gr(this.route);e&&e.translateAndAutoOrient(this.sourcePoint,n[0]||this.targetPoint,this.paper.cells),t&&t.translateAndAutoOrient(this.targetPoint,n[n.length-1]||this.sourcePoint,this.paper.cells)},_getLabelPositionAngle:function(e){return(this.model.label(e).position||{}).angle||0},_getLabelPositionArgs:function(e){return(this.model.label(e).position||{}).args},_getDefaultLabelPositionArgs:function(){return(this.model._getDefaultLabel().position||{}).args},_mergeLabelPositionArgs:function(e,t){return null===e?null:void 0===e?null===t?null:t:ai({},t,e)},addLabel:function(e,t,n,r){var i,o,a,s=0;"number"!=typeof e?(i=e.x,o=e.y,"number"==typeof t?(s=t,a=n):a=t):(i=e,o=t,"number"==typeof n?(s=n,a=r):a=n);var l=this._getDefaultLabelPositionArgs(),u=a,c=this._mergeLabelPositionArgs(u,l),f={position:this.getLabelPosition(i,o,s,c)};return this.model.insertLabel(-1,f,a),-1},addVertex:function(e,t,n){var r="number"!=typeof e,i=r?e.x:e,o=r?e.y:t,a=r?t:n,s={x:i,y:o},l=this.getVertexIndex(i,o);return this.model.insertVertex(l,s,a),l},sendToken:function(e,t,n){var r,i,o;si(t)?(r=t.duration,i="reverse"===t.direction,o=t.connection):(r=t,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,l=hr(e);if("string"==typeof o)s=this.findBySelector(o,this.el,this.selectors)[0];else{var u=this._V;s=u.connection?u.connection.node:this.el.querySelector("path")}if(!(s instanceof SVGPathElement))throw new Error("dia.LinkView: token animation requires a valid connection path.");l.appendTo(this.paper.cells).animateAlongPath(a,s),setTimeout(function(e,t){return function(){e.remove(),"function"==typeof t&&t()}}(l,n),r)},findRoute:function(e){e||(e=[]);var t=this.paper.options.routerNamespace||a,n=this.model.router(),r=this.paper.options.defaultRouter;if(!n){if(!r)return e.map($t);n=r}var i=qr(n)?n:t[n.name];if(!qr(i))throw new Error('dia.LinkView: unknown router: "'+n.name+'".');var o=n.args||{};return i.call(this,e,o,this)||e.map($t)},findPath:function(e,t,n){var r=this.paper.options.connectorNamespace||s,i=this.model.connector(),o=this.paper.options.defaultConnector;i||(i=o||{});var a=qr(i)?i:r[i.name];if(!qr(a))throw new Error('dia.LinkView: unknown connector: "'+i.name+'".');var l=Br(i.args||{});l.raw=!0;var u=a.call(this,t,n,e,l,this);return"string"==typeof u&&(u=new wn(hr.normalizePathData(u))),u},getConnection:function(){var e=this.path;return e?e.clone():null},getSerializedConnection:function(){var e=this.path;if(!e)return null;var t=this.metrics;if(t.hasOwnProperty("data"))return t.data;var n=e.serialize();return t.data=n,n},getConnectionSubdivisions:function(){var e=this.path;if(!e)return null;var t=this.metrics;if(t.hasOwnProperty("segmentSubdivisions"))return t.segmentSubdivisions;var n=e.getSegmentSubdivisions();return t.segmentSubdivisions=n,n},getConnectionLength:function(){var e=this.path;if(!e)return 0;var t=this.metrics;if(t.hasOwnProperty("length"))return t.length;var n=e.length({segmentSubdivisions:this.getConnectionSubdivisions()});return t.length=n,n},getPointAtLength:function(e){var t=this.path;return t?t.pointAtLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getPointAtRatio:function(e){var t=this.path;return t?(Ar(e)&&(e=parseFloat(e)/100),t.pointAt(e,{segmentSubdivisions:this.getConnectionSubdivisions()})):null},getTangentAtLength:function(e){var t=this.path;return t?t.tangentAtLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getTangentAtRatio:function(e){var t=this.path;return t?t.tangentAt(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPoint:function(e){var t=this.path;return t?t.closestPoint(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointLength:function(e){var t=this.path;return t?t.closestPointLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getClosestPointRatio:function(e){var t=this.path;return t?t.closestPointNormalizedLength(e,{segmentSubdivisions:this.getConnectionSubdivisions()}):null},getLabelPosition:function(e,t,n,r){var i,o={},a=0;"number"==typeof n?(a=n,i=r):i=n,i&&(o.args=i);var s,l,u=!(i&&i.absoluteDistance),c=i&&i.absoluteDistance&&i.reverseDistance,f=i&&i.absoluteOffset,h=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},p=new $t(e,t),g=h.closestPointT(p,d),v=h.lengthAtT(g,d);if(u&&(v=v/this.getConnectionLength()||0),c&&(v=-1*(this.getConnectionLength()-v)||1),o.distance=v,f||(s=h.tangentAtT(g)),s)l=s.pointOffset(p);else{var m=h.pointAtT(g),y=p.difference(m);l={x:y.x,y:y.y}}return o.offset=l,o.angle=a,o},_getLabelTransformationMatrix:function(e){var t,n=0,r={};if("number"==typeof e)t=e;else{if("number"!=typeof e.distance)throw new Error("dia.LinkView: invalid label position distance.");r=e.args||{},t=e.distance,n=e.angle||0}var i=t>0&&t<=1,o=0,a={x:0,y:0};if(e.offset){var s=e.offset;"number"==typeof s&&(o=s),s.x&&(a.x=s.x),s.y&&(a.y=s.y)}var l,u=0!==a.x||0!==a.y||0===o,c=r.keepGradient,f=r.ensureLegibility,h=this.path,d={segmentSubdivisions:this.getConnectionSubdivisions()},p=i?t*this.getConnectionLength():t,g=h.tangentAtLength(p,d),v=n;if(g){if(u)(l=g.start).offset(a);else{var m=g.clone();m.rotate(g.start,-90),m.setLength(o),l=m.end}c&&(v=g.angle()+n,f&&(v=wt((v+90)%180-90)))}else l=h.start,u&&l.offset(a);return hr.createSVGMatrix().translate(l.x,l.y).rotate(v)},getLabelCoordinates:function(e){var t=this._getLabelTransformationMatrix(e);return new $t(t.e,t.f)},getVertexIndex:function(e,t){for(var n=this.model.vertices(),r=this.getClosestPointLength(new $t(e,t)),i=0,o=n.length;i<o;i++){var a=n[i];if(r<this.getClosestPointLength(a))break}return i},notifyPointerdown(e,t,n){Po.prototype.pointerdown.call(this,e,t,n),this.notify("link:pointerdown",e,t,n)},notifyPointermove(e,t,n){Po.prototype.pointermove.call(this,e,t,n),this.notify("link:pointermove",e,t,n)},notifyPointerup(e,t,n){this.notify("link:pointerup",e,t,n),Po.prototype.pointerup.call(this,e,t,n)},pointerdblclick:function(e,t,n){Po.prototype.pointerdblclick.apply(this,arguments),this.notify("link:pointerdblclick",e,t,n)},pointerclick:function(e,t,n){Po.prototype.pointerclick.apply(this,arguments),this.notify("link:pointerclick",e,t,n)},contextmenu:function(e,t,n){Po.prototype.contextmenu.apply(this,arguments),this.notify("link:contextmenu",e,t,n)},pointerdown:function(e,t,n){switch(this.notifyPointerdown(e,t,n),e.target.getAttribute("class")){case"marker-vertex":return void this.dragVertexStart(e,t,n);case"marker-vertex-remove":case"marker-vertex-remove-area":return void this.dragVertexRemoveStart(e,t,n);case"marker-arrowhead":return void this.dragArrowheadStart(e,t,n);case"connection":case"connection-wrap":return void this.dragConnectionStart(e,t,n);case"marker-source":case"marker-target":return}this.dragStart(e,t,n)},pointermove:function(e,t,n){var r=this._dragData;switch(r&&this.eventData(e,r),this.eventData(e).action){case"vertex-move":this.dragVertex(e,t,n);break;case"label-move":this.dragLabel(e,t,n);break;case"arrowhead-move":this.dragArrowhead(e,t,n);break;case"move":this.drag(e,t,n)}r&&Dr(r,this.eventData(e)),this.notifyPointermove(e,t,n)},pointerup:function(e,t,n){var r=this._dragData;switch(r&&(this.eventData(e,r),this._dragData=null),this.eventData(e).action){case"vertex-move":this.dragVertexEnd(e,t,n);break;case"label-move":this.dragLabelEnd(e,t,n);break;case"arrowhead-move":this.dragArrowheadEnd(e,t,n);break;case"move":this.dragEnd(e,t,n)}this.notifyPointerup(e,t,n),this.checkMouseleave(e)},mouseover:function(e){Po.prototype.mouseover.apply(this,arguments),this.notify("link:mouseover",e)},mouseout:function(e){Po.prototype.mouseout.apply(this,arguments),this.notify("link:mouseout",e)},mouseenter:function(e){Po.prototype.mouseenter.apply(this,arguments),this.notify("link:mouseenter",e)},mouseleave:function(e){Po.prototype.mouseleave.apply(this,arguments),this.notify("link:mouseleave",e)},mousewheel:function(e,t,n,r){Po.prototype.mousewheel.apply(this,arguments),this.notify("link:mousewheel",e,t,n,r)},onevent:function(e,t,n,r){if(hr(e.target).findParentByClass("link-tool",this.el)){if(e.stopPropagation(),this.can("useLinkTools")){if("remove"===t)return void this.model.remove({ui:!0});this.notify(t,e,n,r)}this.notifyPointerdown(e,n,r),this.paper.delegateDragEvents(this,e.data)}else Po.prototype.onevent.apply(this,arguments)},onlabel:function(e,t,n){this.notifyPointerdown(e,t,n),this.dragLabelStart(e,t,n),this.eventData(e).stopPropagation&&e.stopPropagation()},dragConnectionStart:function(e,t,n){if(this.can("vertexAdd")){var r=this.addVertex({x:t,y:n},{ui:!0});this.eventData(e,{action:"vertex-move",vertexIdx:r})}},dragLabelStart:function(e,t,n){if(this.can("labelMove")){var r=e.currentTarget,i=parseInt(r.getAttribute("label-idx"),10),o=this._getLabelPositionAngle(i),a=this._getLabelPositionArgs(i),s=this._getDefaultLabelPositionArgs(),l=this._mergeLabelPositionArgs(a,s);this.eventData(e,{action:"label-move",labelIdx:i,positionAngle:o,positionArgs:l,stopPropagation:!0})}else this.eventData(e,{stopPropagation:!0});this.paper.delegateDragEvents(this,e.data)},dragVertexStart:function(e,t,n){if(this.can("vertexMove")){var r=e.target,i=parseInt(r.getAttribute("idx"),10);this.eventData(e,{action:"vertex-move",vertexIdx:i})}},dragVertexRemoveStart:function(e,t,n){if(this.can("vertexRemove")){var r=e.target,i=parseInt(r.getAttribute("idx"),10);this.model.removeVertex(i)}},dragArrowheadStart:function(e,t,n){if(this.can("arrowheadMove")){var r=e.target.getAttribute("end"),i=this.startArrowheadMove(r,{ignoreBackwardsCompatibility:!0});this.eventData(e,i)}},dragStart:function(e,t,n){this.can("linkMove")&&this.eventData(e,{action:"move",dx:t,dy:n})},dragLabel:function(e,t,n){var r=this.eventData(e),i={position:this.getLabelPosition(t,n,r.positionAngle,r.positionArgs)};this.paper.options.snapLabels&&delete i.position.offset,this.model.label(r.labelIdx,i)},dragVertex:function(e,t,n){var r=this.eventData(e);this.model.vertex(r.vertexIdx,{x:t,y:n},{ui:!0})},dragArrowhead:function(e,t,n){this.paper.options.snapLinks?this._snapArrowhead(e,t,n):this._connectArrowhead(this.getEventTarget(e),t,n,this.eventData(e))},drag:function(e,t,n){var r=this.eventData(e);this.model.translate(t-r.dx,n-r.dy,{ui:!0}),this.eventData(e,{dx:t,dy:n})},dragLabelEnd:function(){},dragVertexEnd:function(){},dragArrowheadEnd:function(e,t,n){var r=this.eventData(e),i=this.paper;i.options.snapLinks?this._snapArrowheadEnd(r):this._connectArrowheadEnd(r,t,n),i.linkAllowed(this)?(this._finishEmbedding(r),this._notifyConnectEvent(r,e)):this._disallow(r),this._afterArrowheadMove(r)},dragEnd:function(){},_disallow:function(e){"remove"===e.whenNotAllowed?this.model.remove({ui:!0}):this.model.set(e.arrowhead,e.initialEnd,{ui:!0})},_finishEmbedding:function(e){this.paper.options.embeddingMode&&this.model.reparent()&&(e.z=null)},_notifyConnectEvent:function(e,t){var n=e.arrowhead,r=e.initialEnd,i=this.model.prop(n);if(i&&!Fi.endsEqual(r,i)){var o=this.paper;r.id&&this.notify("link:disconnect",t,o.findViewByModel(r.id),e.initialMagnet,n),i.id&&this.notify("link:connect",t,o.findViewByModel(i.id),e.magnetUnderPointer,n)}},_snapArrowhead:function(e,t,n){const{paper:r}=this,{snapLinks:i,connectionStrategy:o}=r.options,a=this.eventData(e);var s=i.radius||50,l=r.findViewsInArea({x:t-s,y:n-s,width:2*s,height:2*s}),u=a.closestView||null,c=a.closestMagnet||null,f=a.magnetProxy||null;a.closestView=a.closestMagnet=a.magnetProxy=null;var h,d=Number.MAX_VALUE,p=new $t(t,n);l.forEach(function(e){const t=[];"false"!==e.el.getAttribute("magnet")&&t.push({bbox:e.model.getBBox(),magnet:e.el}),e.$("[magnet]").toArray().forEach(n=>{t.push({bbox:e.getNodeBBox(n),magnet:n})}),t.forEach(t=>{const{magnet:n,bbox:i}=t,o=i.center().squaredDistance(p);o<d&&(c===n||r.options.validateConnection.apply(r,a.validateConnectionArgs(e,e.el===n?null:n)))&&(d=o,a.closestView=e,a.closestMagnet=n)})},this);var g=null,v=a.closestView,m=a.closestMagnet;m&&(g=a.magnetProxy=v.findProxyNode(m,"highlighter"));var y=a.arrowhead,b=c!==m;if(u&&b&&u.unhighlight(f,{connecting:!0,snapping:!0}),v){const{prevEnd:e,prevX:r,prevY:i}=a;if(a.prevX=t,a.prevY=n,!b&&("function"!=typeof o||r===t&&i===n))return;if(h=v.getLinkEnd(m,t,n,this.model,y),!b&&Hr(e,h))return;a.prevEnd=h,b&&v.highlight(g,{connecting:!0,snapping:!0})}else h={x:t,y:n};this.model.set(y,h||{x:t,y:n},{ui:!0}),u&&this.notify("link:snap:disconnect",e,u,c,y),v&&this.notify("link:snap:connect",e,v,m,y)},_snapArrowheadEnd:function(e){var t=e.closestView,n=e.closestMagnet;t&&n&&(t.unhighlight(e.magnetProxy,{connecting:!0,snapping:!0}),e.magnetUnderPointer=t.findMagnet(n)),e.closestView=e.closestMagnet=null},_connectArrowhead:function(e,t,n,r){const{paper:i,model:o}=this;if(r.eventTarget!==e){r.magnetProxy&&r.viewUnderPointer.unhighlight(r.magnetProxy,{connecting:!0});const t=r.viewUnderPointer=i.findView(e);if(t){const n=r.magnetUnderPointer=t.findMagnet(e),o=r.magnetProxy=t.findProxyNode(n,"highlighter");n&&this.paper.options.validateConnection.apply(i,r.validateConnectionArgs(t,n))?o&&t.highlight(o,{connecting:!0}):(r.magnetUnderPointer=null,r.magnetProxy=null)}else r.magnetUnderPointer=null,r.magnetProxy=null}r.eventTarget=e,o.set(r.arrowhead,{x:t,y:n},{ui:!0})},_connectArrowheadEnd:function(e={},t,n){const{model:r}=this,{viewUnderPointer:i,magnetUnderPointer:o,magnetProxy:a,arrowhead:s}=e;if(!o||!a||!i)return;i.unhighlight(a,{connecting:!0});const l=i.getLinkEnd(o,t,n,r,s);r.set(s,l,{ui:!0})},_beforeArrowheadMove:function(e){e.z=this.model.get("z"),this.model.toFront();var t=this.el.style;e.pointerEvents=t.pointerEvents,t.pointerEvents="none",this.paper.options.markAvailable&&this._markAvailableMagnets(e)},_afterArrowheadMove:function(e){null!==e.z&&(this.model.set("z",e.z,{ui:!0}),e.z=null),this.el.style.pointerEvents=e.pointerEvents,this.paper.options.markAvailable&&this._unmarkAvailableMagnets(e)},_createValidateConnectionArgs:function(e){var t,n=[];n[4]=e,n[5]=this;var r=0,i=0;"source"===e?(r=2,t="target"):(i=2,t="source");var o=this.model.get(t);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(e,t){return n[i]=e,n[i+1]=e.el===t?void 0:t,n}},_markAvailableMagnets:function(e){function t(e,t){var n=e.paper;return n.options.validateConnection.apply(n,this.validateConnectionArgs(e,t))}var n=this.paper,r=n.model.getCells();e.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 l=s.filter(t.bind(e,a));if(l.length>0){for(var u=0,c=l.length;u<c;u++)a.highlight(l[u],{magnetAvailability:!0});a.highlight(null,{elementAvailability:!0}),e.marked[a.model.id]=l}}}},_unmarkAvailableMagnets:function(e){for(var t,n,r=Object.keys(e.marked),i=0,o=r.length;i<o;i++){t=r[i],n=e.marked[t];var a=this.paper.findViewByModel(t);if(a){for(var s=0,l=n.length;s<l;s++)a.unhighlight(n[s],{magnetAvailability:!0});a.unhighlight(null,{elementAvailability:!0})}}e.marked=null},startArrowheadMove:function(e,t){t||(t={});var n={action:"arrowhead-move",arrowhead:e,whenNotAllowed:t.whenNotAllowed||"revert",initialMagnet:this[e+"Magnet"]||(this[e+"View"]?this[e+"View"].el:null),initialEnd:Br(this.model.get(e)),validateConnectionArgs:this._createValidateConnectionArgs(e)};return this._beforeArrowheadMove(n),!0!==t.ignoreBackwardsCompatibility&&(this._dragData=n),n},onRemove:function(){Po.prototype.onRemove.apply(this,arguments),this.unmountLabels()}},{Flags:Ia});Object.defineProperty(Fa.prototype,"sourceBBox",{enumerable:!0,get:function(){var e=this.sourceView;if(!e){var t=this.model.source();return new sn(t.x,t.y)}var n=this.sourceMagnet;return e.isNodeConnection(n)?new sn(this.sourceAnchor):e.getNodeBBox(n||e.el)}}),Object.defineProperty(Fa.prototype,"targetBBox",{enumerable:!0,get:function(){var e=this.targetView;if(!e){var t=this.model.target();return new sn(t.x,t.y)}var n=this.targetMagnet;return e.isNodeConnection(n)?new sn(this.targetAnchor):e.getNodeBBox(n||e.el)}});const za={CELLS:"cells",BACK:"back",FRONT:"front",TOOLS:"tools",LABELS:"labels"},Va=So.extend({tagName:"g",svgElement:!0,pivotNodes:null,defaultTheme:null,options:{name:""},className:function(){return pr(`${this.options.name}-layer`)},init:function(){this.pivotNodes={}},insertSortedNode:function(e,t){this.el.insertBefore(e,this.insertPivot(t))},insertNode:function(e){const{el:t}=this;e.parentNode!==t&&t.appendChild(e)},insertPivot:function(e){const{el:t,pivotNodes:n}=this;(e=+e)||(e=0);let r=n[e];if(r)return r;r=n[e]=document.createComment("z-index:"+(e+1));let i=-1/0;for(let t in n)t=+t,t<e&&t>i&&(i=t);if(i!==-1/0){const e=n[i];t.insertBefore(r,e.nextSibling)}else t.insertBefore(r,t.firstChild);return r},removePivots:function(){const{el:e,pivotNodes:t}=this;for(let n in t)e.removeChild(t[n]);this.pivotNodes={}}}),Ba=Co.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(e,t){const{options:n}=this,{useFirstSubpath:r}=n;let i;try{const e=hr(t);if(i=e.convertToPathData().trim(),"PATH"===e.tagName()&&r){const e=i.search(/.M/i)+1;e>0&&(i=i.substr(0,e))}}catch(r){const o=e.getNodeBoundingRect(t);i=hr.rectToPath(Dr({},n,o.toJSON()))}return i},highlightConnection(e){this.vel.attr("d",e.getSerializedConnection())},highlightNode(e,t){const{vel:n,options:r}=this,{padding:i,layer:o}=r;let a=e.getNodeMatrix(t);if(i){o||t!==e.el||n.remove();let r=e.getNodeBoundingRect(t);const s=r.x+r.width/2,l=r.y+r.height/2;r=hr.transformRect(r,a);const u=Math.max(r.width,1),c=Math.max(r.height,1),f=(u+i)/u,h=(c+i)/c,d=hr.createSVGMatrix({a:f,b:0,c:0,d:h,e:s-f*s,f:l-h*l});a=a.multiply(d)}n.attr({d:this.getPathData(e,t),transform:hr.matrixToTransformString(a)})},highlight(e,t){const{vel:n,options:r}=this;n.attr(r.attrs),e.isNodeConnection(t)?this.highlightConnection(e):this.highlightNode(e,t)}}),$a=20,Ua=Co.extend({tagName:"rect",className:"highlight-mask",attributes:{"pointer-events":"none"},options:{padding:3,maskClip:$a,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(e,t){const{MASK_CHILD_ATTRIBUTE_BLACKLIST:n,MASK_REPLACE_TAGS:r,MASK_REMOVE_TAGS:i}=this,o=t.tagName();if(!hr.isSVGGraphicsElement(t)||i.includes(o))return t.remove(),!1;if(r.includes(o)){const n=e.vel.findOne(`#${t.id}`);if(n){const{node:r}=n;let i=e.getNodeBoundingRect(r);e.model.isElement()&&(i=hr.transformRect(i,e.getNodeMatrix(r)));const o=hr("rect",i.toJSON()),{x:a,y:s}=i.center(),{angle:l,cx:u=a,cy:c=s}=n.rotate();l&&o.rotate(l,u,c),t.parent().append(o)}return t.remove(),!1}return n.forEach(e=>{"fill"===e&&"none"===t.attr("fill")||t.removeAttr(e)}),!0},transformMaskRoot(e,t){const{MASK_ROOT_ATTRIBUTE_BLACKLIST:n}=this;n.forEach(e=>{t.removeAttr(e)})},getMaskShape(e,t){const{options:n,MASK_REPLACE_TAGS:r}=this,{deep:i}=n,o=t.tagName();let a;if("G"===o){if(!i)return null;a=t.clone(),function(e,t){const n=e.children();for(;n.length>0;){const e=n.shift();t(e)&&n.push(...e.children())}}(a,t=>this.transformMaskChild(e,t))}else{if(r.includes(o))return null;a=t.clone()}return this.transformMaskRoot(e,a),a},getMaskId(){return`highlight-mask-${this.cid}`},getMask(e,t){const{VISIBLE:n,INVISIBLE:r,options:i}=this,{padding:o,attrs:a}=i,s="stroke-width"in a?a["stroke-width"]:1,l="none"!==t.attr("fill");let u=parseFloat(t.attr("stroke-width"));isNaN(u)&&(u=1);const c=u+2*o,f=c+2*s;let h=this.getMaskShape(e,t);if(!h){const n=e.getNodeBoundingRect(t.node);n.inflate(n.width?0:.5,n.height?0:.5),h=hr("rect",n.toJSON())}return h.attr(a),hr("mask",{id:this.getMaskId()}).append([h.clone().attr({fill:l?n:"none",stroke:n,"stroke-width":f}),h.clone().attr({fill:l?r:"none",stroke:r,"stroke-width":c})])},removeMask(e){const t=e.svg.getElementById(this.getMaskId());t&&e.defs.removeChild(t)},addMask(e,t){e.defs.appendChild(t.node)},highlight(e,t){const{options:n,vel:r}=this,{padding:i,attrs:o,maskClip:a=$a,layer:s}=n,l="stroke"in o?o.stroke:"#000000";s||t!==e.el||r.remove();const u=e.getNodeBoundingRect(t).inflate(i+a),c=this.getMask(e,hr(t));this.addMask(e.paper,c),r.attr(u.toJSON()),r.attr({transform:hr.matrixToTransformString(e.getNodeMatrix(t)),mask:`url(#${c.id})`,fill:l})},unhighlight(e){this.removeMask(e.paper)}}),Ha=Co.extend({UPDATABLE:!1,MOUNTABLE:!1,opacityClassName:pr("highlight-opacity"),highlight:function(e,t){hr(t).addClass(this.opacityClassName)},unhighlight:function(e,t){hr(t).removeClass(this.opacityClassName)}}),qa=pr("highlighted"),Wa=Co.extend({UPDATABLE:!1,MOUNTABLE:!1,options:{className:qa},highlight:function(e,t){hr(t).addClass(this.options.className)},unhighlight:function(e,t){hr(t).removeClass(this.options.className)}},{className:qa});function Ga(e,t,n,r){var i="ratio"in r?r.ratio:.5;return e.getPointAtRatio(i)}function Ya(e,t,n,r){var i="length"in r?r.length:20;return e.getPointAtLength(i)}function Xa(e){return function(t,n,r,i){if(r instanceof Element){var o,a=this.paper.findView(r);return o=a?a.isNodeConnection(r)?Ka(a,"fixedAt"in i?i.fixedAt:"50%"):a.getNodeBBox(r).center():new $t,e.call(this,t,n,o,i)}return e.apply(this,arguments)}}function Ka(e,t){var n=parseFloat(t);return Ar(t)?e.getPointAtRatio(n/100):e.getPointAtLength(n)}const Ja=Xa(function(e,t,n,r){var i=1e6,o=e.getConnection(),a=e.getConnectionSubdivisions(),s=new Wt(n.clone().offset(0,i),n.clone().offset(0,-i)),l=new Wt(n.clone().offset(i,0),n.clone().offset(-i,0)),u=s.intersect(o,{segmentSubdivisions:a}),c=l.intersect(o,{segmentSubdivisions:a}),f=[];return u&&Array.prototype.push.apply(f,u),c&&Array.prototype.push.apply(f,c),f.length>0?n.chooseClosest(f):"fallbackAt"in r?Ka(e,r.fallbackAt):Qa(e,t,n,r)}),Qa=Xa(function(e,t,n,r){return e.getClosestPoint(n)||new $t});function Za(e,t,n){if(Wr(n)){const{x:r,y:i}=n;if(isFinite(i)){const n=new Wt(t,e),{start:r,end:o}=n.parallel(i);t=r,e=o}n=r}if(!isFinite(n))return e;var r=e.distance(t);return 0===n&&r>0?e:e.move(t,-Math.min(n,r-1))}function es(e){var t=e.getAttribute("stroke-width");return null===t?0:parseFloat(t)||0}function ts(e,t,n,r){var i=t.getNodeBBox(n);r.stroke&&i.inflate(es(n)/2);var o=e.intersect(i);return Za(o?e.start.chooseClosest(o):e.end,e.start,r.offset)}var ns="segmentSubdivisons",rs="shapeBBox";const is=function(e,t,n,r){let{offset:i,alignOffset:o,align:a}=r;return a&&function(e,t,n=0){let r,i,o,a;const{start:s,end:l}=e;switch(t){case"left":r="x",i=l,o=s,a=-1;break;case"right":r="x",i=s,o=l,a=1;break;case"top":r="y",i=l,o=s,a=-1;break;case"bottom":r="y",i=s,o=l,a=1;break;default:return}s[r]<l[r]?i[r]=o[r]:o[r]=i[r],isFinite(n)&&(i[r]+=a*n,o[r]+=a*n)}(e,a,o),Za(e.end,e.start,i)},os=ts,as=function(e,t,n,r){var i=t.model.angle();if(0===i)return ts(e,t,n,r);var o=t.getNodeUnrotatedBBox(n);r.stroke&&o.inflate(es(n)/2);var a=o.center(),s=e.clone().rotate(a,i),l=s.setLength(1e6).intersect(o);return Za(l?s.start.chooseClosest(l).rotate(a,-i):e.end,e.start,r.offset)},ss=function(e,t,n,r){var i,o,a=r.selector,s=e.end;if(i="string"==typeof a?t.findBySelector(a)[0]:Array.isArray(a)?yr(n,a):function(e){if(!e)return null;var t=e;do{var n=t.tagName;if("string"!=typeof n)return null;if("G"===(n=n.toUpperCase()))t=t.firstElementChild;else{if("TITLE"!==n)break;t=t.nextElementSibling}}while(t);return t}(n),!hr.isSVGGraphicsElement(i)){if(i===n||!hr.isSVGGraphicsElement(n))return s;i=n}var l,u=t.getNodeShape(i),c=t.getNodeMatrix(i),f=t.getRootTranslateMatrix(),h=t.getRootRotateMatrix(),d=f.multiply(h).multiply(c),p=d.inverse(),g=hr.transformLine(e,p),v=g.start.clone(),m=t.getNodeData(i);if(!1===r.insideout&&(m[rs]||(m[rs]=u.bbox()),m[rs].containsPoint(v)))return s;if(u instanceof wn){var y=r.precision||2;m[ns]||(m[ns]=u.getSegmentSubdivisions({precision:y})),l={precision:y,segmentSubdivisions:m[ns]}}!0===r.extrapolate&&g.setLength(1e6),(o=g.intersect(u,l))?hr.isArray(o)&&(o=v.chooseClosest(o)):!0===r.sticky&&(o=u instanceof sn?u.pointNearestToPoint(v):u instanceof Jt?u.intersectionWithLineFromCenterToPoint(v):u.closestPoint(v,l));var b=o?hr.transformPoint(o,d):s,w=r.offset||0;return r.stroke&&(w+=es(i)/2),Za(b,e.start,w)};function ls(e){return function(t,n,r,i){var o=!!i.rotate,a=o?t.getNodeUnrotatedBBox(n):t.getNodeBBox(n),s=a[e](),l=i.dx;if(l){var u=Ar(l);l=parseFloat(l),isFinite(l)&&(u&&(l/=100,l*=a.width),s.x+=l)}var c=i.dy;if(c){var f=Ar(c);c=parseFloat(c),isFinite(c)&&(f&&(c/=100,c*=a.height),s.y+=c)}return o?s.rotate(t.model.getBBox().center(),-t.model.angle()):s}}const us=ls("center"),cs=ls("topMiddle"),fs=ls("bottomMiddle"),hs=ls("leftMiddle"),ds=ls("rightMiddle"),ps=ls("origin"),gs=ls("topRight"),vs=ls("bottomLeft"),ms=ls("corner"),ys=Xa(function(e,t,n,r){var i=e.model.angle(),o=e.getNodeBBox(t),a=o.center(),s=o.origin(),l=o.corner(),u=r.padding;if(isFinite(u)||(u=0),s.y+u<=n.y&&n.y<=l.y-u){var c=n.y-a.y;a.x+=0===i||180===i?0:1*c/Math.tan(St(i)),a.y+=c}else if(s.x+u<=n.x&&n.x<=l.x-u){var f=n.x-a.x;a.y+=90===i||270===i?0:f*Math.tan(St(i)),a.x+=f}return a}),bs=Xa(function(e,t,n,r){var i,o,a,s=!!r.rotate;s?(i=e.getNodeUnrotatedBBox(t),a=e.model.getBBox().center(),o=e.model.angle()):i=e.getNodeBBox(t);var l,u=r.padding;switch(isFinite(u)&&i.inflate(u),s&&n.rotate(a,o),i.sideNearestToPoint(n)){case"left":l=i.leftMiddle();break;case"right":l=i.rightMiddle();break;case"top":l=i.topMiddle();break;case"bottom":l=i.bottomMiddle()}return s?l.rotate(a,-o):l}),ws=function(e,t,n,r,i){return e.model.getPointFromConnectedLink(this.model,i).offset(r.dx,r.dy)},xs={NONE:"sorting-none",APPROX:"sorting-approximate",EXACT:"sorting-exact"},ks=1/0,Ss=9007199254740991,_s=Po.Highlighting,Es={[_s.DEFAULT]:{name:"stroke",options:{padding:3}},[_s.MAGNET_AVAILABILITY]:{name:"addClass",options:{className:"available-magnet"}},[_s.ELEMENT_AVAILABILITY]:{name:"addClass",options:{className:"available-cell"}}},Cs=[{name:za.BACK},{name:za.CELLS},{name:za.LABELS},{name:za.FRONT},{name:za.TOOLS}],As=So.extend({className:"paper",options:{width:800,height:600,origin:{x:0,y:0},gridSize:1,drawGrid:!1,background:!1,perpendicularLinks:!1,elementView:To,linkView:Fa,snapLabels:!1,snapLinks:!1,labelsLayer:!1,multiLinks:!0,guard:function(e,t){return!1},highlighting:Es,preventContextMenu:!0,preventDefaultBlankAction:!0,restrictTranslate:!1,markAvailable:!1,defaultLink:new Fi,defaultConnector:{name:"normal"},defaultRouter:{name:"normal"},defaultAnchor:{name:"center"},defaultLinkAnchor:{name:"connectionRatio"},defaultConnectionPoint:{name:"bbox"},connectionStrategy:null,validateMagnet:function(e,t,n){return"passive"!==t.getAttribute("magnet")},validateConnection:function(e,t,n,r,i,o){return("target"===i?n:e)instanceof To},embeddingMode:!1,validateEmbedding:function(e,t){return!0},validateUnembedding:function(e){return!0},findParentBy:"bbox",frontParentOnly:!0,interactive:{labelMove:!1},linkPinning:!0,allowLink:null,clickThreshold:0,moveThreshold:0,magnetThreshold:0,sorting:xs.EXACT,frozen:!1,onViewUpdate:function(e,t,n,r,i){t&(e.FLAG_INSERT|e.FLAG_REMOVE)||r.mounting||r.isolate||i.requestConnectedLinksUpdate(e,n,r)},onViewPostponed:function(e,t,n){return n.forcePostponedViewUpdate(e,t)},beforeRender:null,afterRender:null,viewport:null,cellViewNamespace:null,routerNamespace:null,connectorNamespace:null,highlighterNamespace:l,anchorNamespace:f,linkAnchorNamespace:u,connectionPointNamespace:c},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(){const{options:e,el:t}=this;e.cellViewNamespace||(e.cellViewNamespace="undefined"!=typeof joint&&Zr(joint,"shapes")?joint.shapes:null);const n=this.model=e.model||new xo;this._layers={},this.setGrid(e.drawGrid),this.cloneOptions(),this.render(),this._setDimensions(),this.startListening(),this._views={},this.$document=gt(t.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 e=this.model;this.listenTo(e,"add",this.onCellAdded).listenTo(e,"remove",this.onCellRemoved).listenTo(e,"change",this.onCellChange).listenTo(e,"reset",this.onGraphReset).listenTo(e,"sort",this.onGraphSort).listenTo(e,"batch:stop",this.onGraphBatchStop),this.on("cell:highlight",this.onCellHighlight).on("cell:unhighlight",this.onCellUnhighlight).on("scale translate",this.update)},onCellAdded:function(e,t,n){var r=n.position;this.isAsync()||!li(r)?this.renderView(e,n):(n.maxPosition===r&&this.freeze({key:"addCells"}),this.renderView(e,n),0===r&&this.unfreeze({key:"addCells"}))},onCellRemoved:function(e,t,n){const r=this.findViewByModel(e);r&&this.requestViewUpdate(r,r.FLAG_REMOVE,r.UPDATE_PRIORITY,n)},onCellChange:function(e,t){if(e!==this.model.attributes.cells&&e.hasChanged("z")&&this.options.sorting===xs.APPROX){const n=this.findViewByModel(e);n&&this.requestViewUpdate(n,n.FLAG_INSERT,n.UPDATE_PRIORITY,t)}},onGraphReset:function(e,t){this.resetLayers(),this.resetViews(e.models,t)},onGraphSort:function(){this.model.hasActiveBatch(this.SORT_DELAYING_BATCHES)||this.sortViews()},onGraphBatchStop:function(e){if(!this.isFrozen()){var t=e&&e.batchName,n=this.model;if(!this.isAsync()){var r=this.UPDATE_DELAYING_BATCHES;r.includes(t)&&!n.hasActiveBatch(r)&&this.updateViews(e)}var i=this.SORT_DELAYING_BATCHES;i.includes(t)&&!n.hasActiveBatch(i)&&this.sortViews()}},cloneOptions:function(){const{options:e}=this,{defaultConnector:t,defaultRouter:n,defaultConnectionPoint:r,defaultAnchor:i,defaultLinkAnchor:o,origin:a,highlighting:s,cellViewNamespace:l,interactive:u}=e;!l&&"undefined"!=typeof joint&&Zr(joint,"shapes")&&(e.cellViewNamespace=joint.shapes),qr(t)||(e.defaultConnector=$r(t)),qr(n)||(e.defaultRouter=$r(n)),qr(r)||(e.defaultConnectionPoint=$r(r)),qr(i)||(e.defaultAnchor=$r(i)),qr(o)||(e.defaultLinkAnchor=$r(o)),Wr(u)&&(e.interactive=Dr({},u)),Wr(s)&&(e.highlighting=Ir({},s,Es)),e.origin=Dr({},a)},children:function(){var e=hr.namespace;return[{namespaceURI:e.xhtml,tagName:"div",className:pr("paper-background"),selector:"background"},{namespaceURI:e.xhtml,tagName:"div",className:pr("paper-grid"),selector:"grid"},{namespaceURI:e.svg,tagName:"svg",attributes:{width:"100%",height:"100%","xmlns:xlink":e.xlink},selector:"svg",children:[{tagName:"defs",selector:"defs"},{tagName:"g",className:pr("layers"),selector:"layers"}]}]},hasLayerView(e){return e in this._layers},getLayerView(e){const{_layers:t}=this;if(e in t)return t[e];throw new Error(`dia.Paper: Unknown layer "${e}"`)},getLayerNode(e){return this.getLayerView(e).el},render:function(){this.renderChildren();const{childNodes:e,options:t}=this,{svg:n,defs:r,layers:i,background:o,grid:a}=e;return this.svg=n,this.defs=r,this.layers=i,this.$background=gt(o),this.$grid=gt(a),this.renderLayers(),hr.ensureId(n),t.background&&this.drawBackground(t.background),t.drawGrid&&this.drawGrid(),this},renderLayers:function(e=Cs){this.removeLayers(),e.forEach(({name:e,sorted:t})=>{const n=new Va({name:e});this.layers.appendChild(n.el),this._layers[e]=n});const t=this.getLayerView(za.CELLS),n=this.getLayerView(za.TOOLS),r=this.getLayerView(za.LABELS);this.tools=n.el,this.cells=this.viewport=t.el,t.vel.addClass(pr("viewport")),r.vel.addClass(pr("viewport"))},removeLayers:function(){const{_layers:e}=this;Object.keys(e,t=>{e[t].remove(),delete e[t]})},resetLayers:function(){const{_layers:e}=this;Object.keys(e,t=>{e[t].removePivots()})},update:function(){return this.options.drawGrid&&this.drawGrid(),this._background&&this.updateBackgroundImage(this._background),this},matrix:function(e){var t=this.layers;if(void 0===e){var n=t.getAttribute("transform");return(this._viewportTransformString||null)===n?e=this._viewportMatrix:(e=t.getCTM(),this._viewportMatrix=e,this._viewportTransformString=n),hr.createSVGMatrix(e)}e=hr.createSVGMatrix(e);var r=hr.matrixToTransformString(e);return t.setAttribute("transform",r),this._viewportMatrix=e,this._viewportTransformString=t.getAttribute("transform"),this},clientMatrix:function(){return hr.createSVGMatrix(this.cells.getScreenCTM())},requestConnectedLinksUpdate:function(e,t,n){if(e instanceof Po)for(var r=e.model,i=this.model.getConnectedLinks(r),o=0,a=i.length;o<a;o++){var s=i[o],l=this.findViewByModel(s);if(l){var u=["UPDATE"];s.getTargetCell()===r&&u.push("TARGET"),s.getSourceCell()===r&&u.push("SOURCE");var c=Math.max(t+1,l.UPDATE_PRIORITY);this.scheduleViewUpdate(l,l.getFlag(u),c,n)}}},forcePostponedViewUpdate:function(e,t){if(!(e&&e instanceof Po))return!1;var n=e.model;if(n.isElement())return!1;if(0===(t&e.getFlag(["SOURCE","TARGET"]))){var r=0,i=this.findViewByModel(n.getSourceCell());i&&!this.isViewMounted(i)&&(r=this.dumpView(i),e.updateEndMagnet("source"));var o=0,a=this.findViewByModel(n.getTargetCell());if(a&&!this.isViewMounted(a)&&(o=this.dumpView(a),e.updateEndMagnet("target")),0===r&&0===o)return!this.dumpView(e)}return!1},requestViewUpdate:function(e,t,n,r){r||(r={}),this.scheduleViewUpdate(e,t,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(e,t,n,r){const{_updates:i,options:o}=this,{FLAG_REMOVE:a,FLAG_INSERT:s,UPDATE_PRIORITY:l,cid:u}=e;let c=i.priorities[n];if(c||(c=i.priorities[n]={}),n>l)for(let e=n-1;e>=l;e--){const t=i.priorities[e];t&&u in t&&(c[u]|=t[u],delete t[u])}let f=c[u]||0;if((f&t)===t)return;f||i.count++,t&a&&f&s?c[u]^=s:t&s&&f&a&&(c[u]^=a),c[u]|=t;const h=o.onViewUpdate;"function"==typeof h&&h.call(this,e,t,n,r||{},this)},dumpViewUpdate:function(e){if(!e)return 0;var t=this._updates,n=e.cid,r=t.priorities[e.UPDATE_PRIORITY],i=this.registerMountedView(e)|r[n];return delete r[n],i},dumpView:function(e,t){var n=this.dumpViewUpdate(e);return n?this.updateView(e,n,t):0},updateView:function(e,t,n){if(!e)return 0;const{FLAG_REMOVE:r,FLAG_INSERT:i,model:o}=e;if(e instanceof Po){if(t&r)return this.removeView(o),0;t&i&&(this.insertView(e),t^=i)}return t?e.confirmUpdate(t,n||{}):0},requireView:function(e,t){var n=this.findViewByModel(e);return n?(this.dumpView(n,t),n):null},registerUnmountedView:function(e){var t=e.cid,n=this._updates;if(t in n.unmounted)return 0;var r=n.unmounted[t]|=e.FLAG_INSERT;return n.unmountedCids.push(t),delete n.mounted[t],r},registerMountedView:function(e){var t=e.cid,n=this._updates;if(t in n.mounted)return 0;n.mounted[t]=!0,n.mountedCids.push(t);var r=n.unmounted[t]||0;return delete n.unmounted[t],r},isViewMounted:function(e){return!!e&&e.cid in this._updates.mounted},dumpViews:function(e){var t=jr({},e,{viewport:null});this.checkViewport(t),this.updateViews(t)},updateViews:function(e){let t;this.notifyBeforeRender(e);let n=0,r=0,i=Ss;do{r++,t=this.updateViewsBatch(e),n+=t.updated,i=Math.min(t.priority,i)}while(!t.empty);const o={updated:n,batches:r,priority:i};return this.notifyAfterRender(o,e),o},hasScheduledUpdates:function(){const e=this._updates.priorities,t=Object.keys(e);let n=t.length;for(;n>0&&n--;)for(let r in e[t[n]])return!0;return!1},updateViewsAsync:function(e,t){e||(e={}),t||(t={processed:0,priority:Ss});var n=this._updates,r=n.id;if(r){Cr(r),0===t.processed&&this.hasScheduledUpdates()&&this.notifyBeforeRender(e);var i=this.updateViewsBatch(e),o=jr({},e,{mountBatchSize:1e3-i.mounted,unmountBatchSize:1e3-i.unmounted}),a=this.checkViewport(o),s=a.unmounted,l=a.mounted,u=t.processed,c=n.count;i.updated>0&&(u+=i.updated+i.unmounted,i.processed=u,t.priority=Math.min(i.priority,t.priority),i.empty&&0===l?(i.unmounted+=s,i.mounted+=l,i.priority=t.priority,this.notifyAfterRender(i,e),t.processed=0,t.priority=Ss,n.count=0):t.processed=u);var f=e.progress;if(c&&"function"==typeof f&&f.call(this,i.empty,u,c,i,this),n.id!==r)return}n.id=Er(this.updateViewsAsync,this,e,t)},notifyBeforeRender:function(e={}){let t=e.beforeRender;"function"!=typeof t&&(t=this.options.beforeRender,"function"!=typeof t)||t.call(this,e,this)},notifyAfterRender:function(e,t={}){let n=t.afterRender;"function"!=typeof n&&(n=this.options.afterRender),"function"==typeof n&&n.call(this,e,t,this),this.trigger("render:done",e,t)},updateViewsBatch:function(e){e||(e={});var t=e.batchSize||ks,n=this._updates,r=0,i=0,o=0,a=0,s=Ss,l=!0,u=this.options,c=n.priorities,f="viewport"in e?e.viewport:u.viewport;"function"!=typeof f&&(f=null);var h=u.onViewPostponed;"function"!=typeof h&&(h=null);var d=Object.keys(c);e:for(var p=0,g=d.length;p<g;p++){var v=+d[p],m=c[v];for(var y in m){if(r>=t){l=!1;break e}var b=ko[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 k=this.updateView(b,w,e);k>0&&(m[y]=k,!h||!h.call(this,b,k,this)||m[y])?(i++,l=!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:l}},getUnmountedViews:function(){const e=this._updates,t=Object.keys(e.unmounted),n=t.length,r=new Array(n);for(var i=0;i<n;i++)r[i]=ko[t[i]];return r},getMountedViews:function(){const e=this._updates,t=Object.keys(e.mounted),n=t.length,r=new Array(n);for(var i=0;i<n;i++)r[i]=ko[t[i]];return r},checkUnmountedViews:function(e,t){t||(t={});var n=0;"function"!=typeof e&&(e=null);for(var r=("mountBatchSize"in t?t.mountBatchSize:1/0),i=this._updates,o=i.unmountedCids,a=i.unmounted,s=0,l=Math.min(o.length,r);s<l;s++){var u=o[s];if(u in a){var c=ko[u];if(c)if(c.DETACHABLE&&e&&!e.call(this,c,!1,this))o.push(u);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(e,t){t||(t={});var n=0;if("function"!=typeof e)return n;for(var r=("unmountBatchSize"in t?t.unmountBatchSize:1/0),i=this._updates,o=i.mountedCids,a=i.mounted,s=0,l=Math.min(o.length,r);s<l;s++){var u=o[s];if(u in a){var c=ko[u];c&&(c.DETACHABLE&&!e.call(this,c,!0,this)?(n++,this.registerUnmountedView(c)&&c.unmount()):o.push(u))}}return o.splice(0,s),n},checkViewport:function(e){var t=jr({},e,{mountBatchSize:1/0,unmountBatchSize:1/0}),n="viewport"in t?t.viewport:this.options.viewport,r=this.checkMountedViews(n,t);if(r>0){var i=this._updates.unmountedCids;t.mountBatchSize=Math.min(i.length-r,t.mountBatchSize)}return{mounted:this.checkUnmountedViews(n,t),unmounted:r}},freeze:function(e){e||(e={});var t=this._updates,n=e.key,r=this.options.frozen,i=t.freezeKey;if(n&&n!==i){if(r&&i)return;t.freezeKey=n,t.keyFrozen=r}this.options.frozen=!0;var o=t.id;t.id=null,this.isAsync()&&o&&Cr(o)},unfreeze:function(e){e||(e={});var t=this._updates,n=e.key,r=t.freezeKey;n&&r&&n!==r||(t.freezeKey=null,n&&n===r&&t.keyFrozen||(this.isAsync()?(this.freeze(),this.updateViewsAsync(e)):this.updateViews(e),this.options.frozen=t.keyFrozen=!1,t.sort&&(this.sortViews(),t.sort=!1)))},isAsync:function(){return!!this.options.async},isFrozen:function(){return!!this.options.frozen},isExactSorting:function(){return this.options.sorting===xs.EXACT},onRemove:function(){this.freeze(),this.removeLayers(),this.removeViews()},getComputedSize:function(){var e=this.options,t=e.width,n=e.height;return li(t)||(t=this.el.clientWidth),li(n)||(n=this.el.clientHeight),{width:t,height:n}},setDimensions:function(e,t){const{options:n}=this,{width:r,height:i}=n;let o=void 0===e?r:e,a=void 0===t?i:t;if(r===o&&i===a)return;n.width=o,n.height=a,this._setDimensions();const s=this.getComputedSize();this.trigger("resize",s.width,s.height)},_setDimensions:function(){const{options:e}=this;let t=e.width,n=e.height;li(t)&&(t=Math.round(t)),li(n)&&(n=Math.round(n)),this.$el.css({width:null===t?"":t,height:null===n?"":n})},setOrigin:function(e,t){return this.translate(e||0,t||0)},fitToContent:function(e,t,n,r){r=si(e)?e:Dr({gridWidth:e,gridHeight:t,padding:n},r);const{x:i,y:o,width:a,height:s}=this.getFitToContentArea(r),{sx:l,sy:u}=this.scale();return this.setOrigin(-i*l,-o*u),this.setDimensions(a*l,s*u),new sn(i,o,a,s)},getFitToContentArea:function(e={}){const t=e.gridWidth||1,n=e.gridHeight||1,r=Tr(e.padding||0),i=Math.max(e.minWidth||0,t),o=Math.max(e.minHeight||0,n),a=e.maxWidth||Number.MAX_VALUE,s=e.maxHeight||Number.MAX_VALUE,l=e.allowNewOrigin,u="contentArea"in e?new sn(e.contentArea):this.getContentArea(e),{sx:c,sy:f}=this.scale();u.x*=c,u.y*=f,u.width*=c,u.height*=f;let h=Math.ceil((u.width+u.x)/t),d=Math.ceil((u.height+u.y)/n);e.allowNegativeBottomRight||(h=Math.max(h,1),d=Math.max(d,1)),h*=t,d*=n;let p=0;("negative"===l&&u.x<0||"positive"===l&&u.x>=0||"any"===l)&&(p=Math.ceil(-u.x/t)*t,p+=r.left,h+=p);let g=0;return("negative"===l&&u.y<0||"positive"===l&&u.y>=0||"any"===l)&&(g=Math.ceil(-u.y/n)*n,g+=r.top,d+=g),h+=r.right,d+=r.bottom,h=Math.max(h,i),d=Math.max(d,o),h=Math.min(h,a),d=Math.min(d,s),new sn(-p/c,-g/f,h/c,d/f)},scaleContentToFit:function(e){var t,n;if(e||(e={}),"contentArea"in e){var r=e.contentArea;t=this.localToPaperRect(r),n=new $t(r)}else t=this.getContentBBox(e),n=this.paperToLocalPoint(t);if(t.width&&t.height){jr(e,{padding:0,preserveAspectRatio:!0,scaleGrid:null,minScale:0,maxScale:Number.MAX_VALUE});var i,o=Tr(e.padding),a=e.minScaleX||e.minScale,s=e.maxScaleX||e.maxScale,l=e.minScaleY||e.minScale,u=e.maxScaleY||e.maxScale;if(e.fittingBBox)i=e.fittingBBox;else{var c=this.translate(),f=this.getComputedSize();i={x:c.tx,y:c.ty,width:f.width,height:f.height}}i=new sn(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/t.width*h.sx,p=i.height/t.height*h.sy;if(e.preserveAspectRatio&&(d=p=Math.min(d,p)),e.scaleGrid){var g=e.scaleGrid;d=g*Math.floor(d/g),p=g*Math.floor(p/g)}d=Math.min(s,Math.max(a,d)),p=Math.min(u,Math.max(l,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(e){return e&&e.useModelGeometry?this.model.getBBox()||new sn:hr(this.cells).getBBox()},getContentBBox:function(e){return this.localToPaperRect(this.getContentArea(e))},getArea:function(){return this.paperToLocalRect(this.getComputedSize())},getRestrictedArea:function(...e){const{restrictTranslate:t}=this.options;let n;return n=qr(t)?t.apply(this,e):!0===t?this.getArea():t?new sn(t):null,n},createViewForModel:function(e){const{options:t}=this;var n,r,i=t.cellViewNamespace,o=e.get("type")+"View",a=yr(i,o,".");return e.isLink()?(n=t.linkView,r=Fa):(n=t.elementView,r=To),new(n.prototype instanceof dt.View?a||n:n.call(this,e)||a||r)({model:e,interactive:t.interactive,labelsLayer:!0===t.labelsLayer?za.LABELS:t.labelsLayer})},removeView:function(e){const{id:t}=e,{_views:n,_updates:r}=this,i=n[t];if(i){var{cid:o}=i;const{mounted:e,unmounted:a}=r;i.remove(),delete n[t],delete e[o],delete a[o]}return i},renderView:function(e,t){const{id:n}=e,r=this._views;let i,o,a=!0;return n in r&&(i=r[n],i.model===e?(o=i.FLAG_INSERT,a=!1):this.removeView(e)),a&&(i=r[n]=this.createViewForModel(e),i.paper=this,o=this.registerUnmountedView(i)|i.getFlag(ei(i,"initFlag"))),this.requestViewUpdate(i,o,i.UPDATE_PRIORITY,t),i},onImageDragStart:function(){return!1},resetViews:function(e,t){t||(t={}),e||(e=[]),this._resetUpdates(),this.removeViews(),this.freeze({key:"reset"});for(var n=0,r=e.length;n<r;n++)this.renderView(e[n],t);this.unfreeze({key:"reset"}),this.sortViews()},removeViews:function(){Fr(this._views,"remove"),this._views={}},sortViews:function(){this.isExactSorting()&&(this.isFrozen()?this._updates.sort=!0:this.sortViewsExact())},sortViewsExact:function(){var e,t,n,r=gt(this.cells).children("[model-id]"),i=this.model.get("cells");e=function(e,t){var n=i.get(e.getAttribute("model-id")),r=i.get(t.getAttribute("model-id")),o=n.attributes.z||0,a=r.attributes.z||0;return o===a?0:o<a?-1:1},t=gt(r),n=t.map(function(){var e=this.parentNode,t=e.insertBefore(document.createTextNode(""),this.nextSibling);return function(){if(e===this)throw new Error("You can't sort elements if any one is a descendant of another.");e.insertBefore(this,t),e.removeChild(t)}}),Array.prototype.sort.call(t,e).each(function(e){n[e].call(this)})},insertView:function(e){const t=this.getLayerView(za.CELLS),{el:n,model:r}=e;this.options.sorting===xs.APPROX?t.insertSortedNode(n,r.get("z")):t.insertNode(n),e.onMount()},scale:function(e,t,n,r){if(void 0===e)return hr.matrixToScale(this.matrix());void 0===t&&(t=e),void 0===n&&(n=0,r=0);var i=this.translate();if(n||r||i.tx||i.ty){var o=i.tx-n*(e-1),a=i.ty-r*(t-1);this.translate(o,a)}e=Math.max(e||0,this.MIN_SCALE),t=Math.max(t||0,this.MIN_SCALE);var s=this.matrix();return s.a=e,s.d=t,this.matrix(s),this.trigger("scale",e,t,n,r),this},rotate:function(e,t,n){if(void 0===e)return hr.matrixToRotate(this.matrix());if(void 0===t){var r=this.cells.getBBox();t=r.width/2,n=r.height/2}var i=this.matrix().translate(t,n).rotate(e).translate(-t,-n);return this.matrix(i),this},translate:function(e,t){if(void 0===e)return hr.matrixToTranslate(this.matrix());const{options:n}=this,{origin:r,drawGrid:i}=n;e||(e=0),t||(t=0);const o=this.matrix();if(o.e===e&&o.f===t)return this;o.e=e,o.f=t,this.matrix(o);const{tx:a,ty:s}=this.translate();return r.x=a,r.y=s,this.trigger("translate",a,s),i&&this.drawGrid(),this},findView:function(e){var t=ui(e)?this.cells.querySelector(e):e instanceof gt?e[0]:e,n=this.findAttribute("model-id",t);if(n)return this._views[n]},findViewByModel:function(e){var t=ui(e)||li(e)?e:e&&e.id;return this._views[t]},findViewsFromPoint:function(e){return e=new $t(e),this.model.getElements().map(this.findViewByModel,this).filter(function(t){return t&&t.vel.getBBox({target:this.cells}).containsPoint(e)},this)},findViewsInArea:function(e,t){t=jr(t||{},{strict:!1}),e=new sn(e);var n=this.model.getElements().map(this.findViewByModel,this),r=t.strict?"containsRect":"intersect";return n.filter(function(t){return t&&e[r](t.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(e,...t){"string"==typeof e&&this.trigger("tools:event",e,...t)},getModelById:function(e){return this.model.getCell(e)},snapToGrid:function(e,t){return this.clientToLocalPoint(e,t).snapToGrid(this.options.gridSize)},localToPaperPoint:function(e,t){var n=new $t(e,t);return hr.transformPoint(n,this.matrix())},localToPaperRect:function(e,t,n,r){var i=new sn(e,t,n,r);return hr.transformRect(i,this.matrix())},paperToLocalPoint:function(e,t){var n=new $t(e,t);return hr.transformPoint(n,this.matrix().inverse())},paperToLocalRect:function(e,t,n,r){var i=new sn(e,t,n,r);return hr.transformRect(i,this.matrix().inverse())},localToClientPoint:function(e,t){var n=new $t(e,t);return hr.transformPoint(n,this.clientMatrix())},localToClientRect:function(e,t,n,r){var i=new sn(e,t,n,r);return hr.transformRect(i,this.clientMatrix())},clientToLocalPoint:function(e,t){var n=new $t(e,t);return hr.transformPoint(n,this.clientMatrix().inverse())},clientToLocalRect:function(e,t,n,r){var i=new sn(e,t,n,r);return hr.transformRect(i,this.clientMatrix().inverse())},localToPagePoint:function(e,t){return this.localToPaperPoint(e,t).offset(this.pageOffset())},localToPageRect:function(e,t,n,r){return this.localToPaperRect(e,t,n,r).offset(this.pageOffset())},pageToLocalPoint:function(e,t){var n=new $t(e,t).difference(this.pageOffset());return this.paperToLocalPoint(n)},pageToLocalRect:function(e,t,n,r){var i=this.pageOffset(),o=new sn(e,t,n,r);return o.x-=i.x,o.y-=i.y,this.paperToLocalRect(o)},clientOffset:function(){var e=this.svg.getBoundingClientRect();return new $t(e.left,e.top)},pageOffset:function(){return this.clientOffset().offset(window.scrollX,window.scrollY)},linkAllowed:function(e){if(!(e instanceof Fa))throw new Error("Must provide a linkView.");var t=e.model,n=this.options,r=this.model,i=r.constructor.validations;return!(!n.multiLinks&&!i.multiLinks.call(this,r,t)||!n.linkPinning&&!i.linkPinning.call(this,r,t)||"function"==typeof n.allowLink&&!n.allowLink.call(this,e,this))},getDefaultLink:function(e,t){return qr(this.options.defaultLink)?this.options.defaultLink.call(this,e,t):this.options.defaultLink.clone()},resolveHighlighter:function(e={}){let{highlighter:t,type:n}=e;const{highlighting:r,highlighterNamespace:i}=this.options;if(void 0===t){if(!r)return!1;if(n&&(t=r[n],!1===t))return!1;t||(t=r.default)}if(!t)return!1;ui(t)&&(t={name:t});const o=t.name,a=i[o];if(!a)throw new Error('Unknown highlighter ("'+o+'")');if("function"!=typeof a.highlight)throw new Error('Highlighter ("'+o+'") is missing required highlight() method');if("function"!=typeof a.unhighlight)throw new Error('Highlighter ("'+o+'") is missing required unhighlight() method');return{highlighter:a,options:t.options||{},name:o}},onCellHighlight:function(e,t,n){const r=this.resolveHighlighter(n);if(!r)return;const{highlighter:i,options:o}=r;i.highlight(e,t,o)},onCellUnhighlight:function(e,t,n){const r=this.resolveHighlighter(n);if(!r)return;const{highlighter:i,options:o}=r;i.unhighlight(e,t,o)},pointerdblclick:function(e){e.preventDefault(),e=_r(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=this.snapToGrid(e.clientX,e.clientY);t?t.pointerdblclick(e,n.x,n.y):this.trigger("blank:pointerdblclick",e,n.x,n.y)}},pointerclick:function(e){if(this.eventData(e).mousemoved<=this.options.clickThreshold){e=_r(e);var t=this.findView(e.target);if(this.guard(e,t))return;var n=this.snapToGrid(e.clientX,e.clientY);t?t.pointerclick(e,n.x,n.y):this.trigger("blank:pointerclick",e,n.x,n.y)}},contextmenu:function(e){this.options.preventContextMenu&&e.preventDefault(),e=_r(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=this.snapToGrid(e.clientX,e.clientY);t?t.contextmenu(e,n.x,n.y):this.trigger("blank:contextmenu",e,n.x,n.y)}},pointerdown:function(e){e=_r(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=this.snapToGrid(e.clientX,e.clientY);t?(e.preventDefault(),t.pointerdown(e,n.x,n.y)):(this.options.preventDefaultBlankAction&&e.preventDefault(),this.trigger("blank:pointerdown",e,n.x,n.y)),this.delegateDragEvents(t,e.data)}},pointermove:function(e){var t=this.eventData(e);if(t.mousemoved||(t.mousemoved=0),!(++t.mousemoved<=this.options.moveThreshold)){e=_r(e);var n=this.snapToGrid(e.clientX,e.clientY),r=t.sourceView;r?r.pointermove(e,n.x,n.y):this.trigger("blank:pointermove",e,n.x,n.y),this.eventData(e,t)}},pointerup:function(e){this.undelegateDocumentEvents();var t=_r(e),n=this.snapToGrid(t.clientX,t.clientY),r=this.eventData(e).sourceView;r?r.pointerup(t,n.x,n.y):this.trigger("blank:pointerup",t,n.x,n.y),t.isPropagationStopped()||this.pointerclick(gt.Event(e,{type:"click",data:e.data})),e.stopImmediatePropagation(),this.delegateEvents()},mouseover:function(e){e=_r(e);var t=this.findView(e.target);if(!this.guard(e,t))if(t)t.mouseover(e);else{if(this.el===e.target)return;this.trigger("blank:mouseover",e)}},mouseout:function(e){e=_r(e);var t=this.findView(e.target);if(!this.guard(e,t))if(t)t.mouseout(e);else{if(this.el===e.target)return;this.trigger("blank:mouseout",e)}},mouseenter:function(e){e=_r(e);const{target:t,relatedTarget:n,currentTarget:r}=e,i=this.findView(t);if(this.guard(e,i))return;const o=this.findView(n);if(i){if(o===i)return;if(i.mouseenter(e),this.el.contains(n))return}o||r===this.el&&this.trigger("paper:mouseenter",e)},mouseleave:function(e){e=_r(e);const{target:t,relatedTarget:n,currentTarget:r}=e,i=this.findView(t);if(this.guard(e,i))return;const o=this.findView(n);if(i){if(o===i)return;if(i.mouseleave(e),this.el.contains(n))return}o||r===this.el&&this.trigger("paper:mouseleave",e)},mousewheel:function(e){e=_r(e);var t=this.findView(e.target);if(!this.guard(e,t)){var n=e.originalEvent,r=this.snapToGrid(n.clientX,n.clientY),i=Math.max(-1,Math.min(1,n.wheelDelta));t?t.mousewheel(e,r.x,r.y,i):this.trigger("blank:mousewheel",e,r.x,r.y,i)}},onevent:function(e){var t=e.currentTarget,n=t.getAttribute("event");if(n){var r=this.findView(t);if(r){if(e=_r(e),this.guard(e,r))return;var i=this.snapToGrid(e.clientX,e.clientY);r.onevent(e,n,i.x,i.y)}}},magnetEvent:function(e,t){var n=e.currentTarget;if(n.getAttribute("magnet")){var r=this.findView(n);if(r){if(e=_r(e),this.guard(e,r))return;var i=this.snapToGrid(e.clientX,e.clientY);t.call(this,r,e,n,i.x,i.y)}}},onmagnet:function(e){this.magnetEvent(e,function(e,t,n,r,i){e.onmagnet(t,r,i)})},magnetpointerdblclick:function(e){this.magnetEvent(e,function(e,t,n,r,i){e.magnetpointerdblclick(t,n,r,i)})},magnetcontextmenu:function(e){this.options.preventContextMenu&&e.preventDefault(),this.magnetEvent(e,function(e,t,n,r,i){e.magnetcontextmenu(t,n,r,i)})},onlabel:function(e){var t=e.currentTarget,n=this.findView(t);if(n){if(e=_r(e),this.guard(e,n))return;var r=this.snapToGrid(e.clientX,e.clientY);n.onlabel(e,r.x,r.y)}},getPointerArgs(e){const t=_r(e),{x:n,y:r}=this.snapToGrid(t.clientX,t.clientY);return[t,n,r]},delegateDragEvents:function(e,t){t||(t={}),this.eventData({data:t},{sourceView:e||null,mousemoved:0}),this.delegateDocumentEvents(null,t),this.undelegateEvents()},guard:function(e,t){return"mousedown"===e.type&&2===e.button||!(!this.options.guard||!this.options.guard(e,t))||(e.data&&void 0!==e.data.guarded?e.data.guarded:!(t&&t.model&&t.model instanceof Ii||this.svg===e.target||this.el===e.target||gt.contains(this.svg,e.target)))},setGridSize:function(e){return this.options.gridSize=e,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:hr("svg",{width:"100%",height:"100%"},hr("defs")),patterns:{},add:function(e,t){hr(this.root.node.childNodes[0]).append(t),this.patterns[e]=t,this.root.append(hr("rect",{width:"100%",height:"100%",fill:"url(#"+e+")"}))},get:function(e){return this.patterns[e]},exist:function(e){return void 0!==this.patterns[e]}}),this._gridCache},setGrid:function(e){return this.clearGrid(),this._gridCache=null,this._gridSettings=[],(Array.isArray(e)?e:[e||{}]).forEach(function(e){this._gridSettings.push.apply(this._gridSettings,this._resolveDrawGridOption(e))},this),this},_resolveDrawGridOption:function(e){var t=this.constructor.gridPatterns;if(ui(e)&&Array.isArray(t[e]))return t[e].map(function(e){return Dr({},e)});var n=e||{args:[{}]},r=Array.isArray(n),i=n.name;if(r||i||n.markup||(i="dot"),i&&Array.isArray(t[i])){var o=t[i].map(function(e){return Dr({},e)}),a=Array.isArray(n.args)?n.args:[n.args||{}];jr(a[0],ti(e,"args"));for(var s=0;s<a.length;s++)o[s]&&Dr(o[s],a[s]);return o}return r?n:[n]},drawGrid:function(e){var t=this.options.gridSize;if(t<=1)return this.clearGrid();var n=Array.isArray(e)?e:[e],r=this.matrix(),i=this._getGridRefs();this._gridSettings.forEach(function(e,o){var a="pattern_"+o,s=ai(e,n[o],{sx:r.a||1,sy:r.d||1,ox:r.e||0,oy:r.f||0});s.width=t*(r.a||1)*(s.scaleFactor||1),s.height=t*(r.d||1)*(s.scaleFactor||1),i.exist(a)||i.add(a,hr("pattern",{id:a,patternUnits:"userSpaceOnUse"},hr(s.markup)));var l=i.get(a);qr(s.update)&&s.update(l.node.childNodes[0],s);var u=s.ox%s.width;u<0&&(u+=s.width);var c=s.oy%s.height;c<0&&(c+=s.height),l.attr({x:u,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(e){var t=(e=e||{}).position||"center",n=e.size||"auto auto",r=this.scale(),i=this.translate();si(t)&&(t=i.tx+r.sx*(t.x||0)+"px "+(i.ty+r.sy*(t.y||0))+"px"),si(n)&&(n=(n=new sn(n).scale(r.sx,r.sy)).width+"px "+n.height+"px"),this.$background.css({backgroundSize:n,backgroundPosition:t})},drawBackgroundImage:function(e,t){if(e instanceof HTMLImageElement){if(this._background&&this._background.id===t.id){var n,r=(t=t||{}).size,i=t.repeat||"no-repeat",o=t.opacity||1,a=Math.abs(t.quality)||1,s=this.constructor.backgroundPatterns[ii(i)];if(qr(s)){e.width*=a,e.height*=a;var l=s(e,t);if(!(l instanceof HTMLCanvasElement))throw new Error("dia.Paper: background pattern must return an HTML Canvas instance");n=l.toDataURL("image/png"),i="repeat",si(r)?(r.width*=l.width/e.width,r.height*=l.height/e.height):void 0===r&&(t.size={width:l.width/a,height:l.height/a})}else n=e.src,void 0===r&&(t.size={width:e.width,height:e.height});this.$background.css({opacity:o,backgroundRepeat:i,backgroundImage:"url("+n+")"}),this.updateBackgroundImage(t)}}else this.$background.css("backgroundImage","")},updateBackgroundColor:function(e){this.$el.css("backgroundColor",e||"")},drawBackground:function(e){if(e=e||{},this.updateBackgroundColor(e.color),e.image){e=this._background=$r(e),kr(e);var t=document.createElement("img");t.onload=this.drawBackgroundImage.bind(this,t,e),t.src=e.image}else this.drawBackgroundImage(null),this._background=null;return this},setInteractivity:function(e){this.options.interactive=e,Fr(this._views,"setInteractivity",e)},isDefined:function(e){return!!this.svg.getElementById(e)},defineFilter:function(e){if(!si(e))throw new TypeError("dia.Paper: defineFilter() requires 1. argument to be an object.");var t=e.id,n=e.name;if(t||(t=n+this.svg.id+mr(JSON.stringify(e))),!this.isDefined(t)){var r=Mr,i=r[n]&&r[n](e.args||{});if(!i)throw new Error("Non-existing filter "+n);var o=Dr({filterUnits:"objectBoundingBox",x:-1,y:-1,width:3,height:3},e.attrs,{id:t});hr(i,o).appendTo(this.defs)}return t},defineGradient:function(e){if(!si(e))throw new TypeError("dia.Paper: defineGradient() requires 1. argument to be an object.");const{svg:t,defs:n}=this,{type:r,id:i=r+t.id+mr(JSON.stringify(e)),stops:o,attrs:a={}}=e;if(this.isDefined(i))return i;const s=Gr(o).map(({offset:e,color:t,opacity:n})=>hr("stop").attr({offset:e,"stop-color":t,"stop-opacity":Number.isFinite(n)?n:1})),l=hr(r,a,s);return l.id=i,l.appendTo(n),i},definePattern:function(e){if(!si(e))throw new TypeError("dia.Paper: definePattern() requires 1. argument to be an object.");const{svg:t,defs:n}=this,{id:r=t.id+mr(JSON.stringify(e)),markup:i,attrs:o={}}=e;if(!i)throw new TypeError("dia.Paper: definePattern() requires markup.");if(this.isDefined(r))return r;const a=hr("pattern",{patternUnits:"userSpaceOnUse"});if(a.id=r,a.attr(o),"string"==typeof i)a.append(hr(i));else{const{fragment:e}=vr(i);a.append(e)}return a.appendTo(n),r},defineMarker:function(e){if(!si(e))throw new TypeError("dia.Paper: defineMarker() requires 1. argument to be an object.");const{svg:t,defs:n}=this,{id:r=t.id+mr(JSON.stringify(e)),markup:i,attrs:o={},markerUnits:a="userSpaceOnUse"}=e;if(this.isDefined(r))return r;const s=hr("marker",{orient:"auto",overflow:"visible",markerUnits:a});if(s.id=r,s.attr(o),i)if("string"==typeof i)s.append(hr(i));else{const{fragment:e}=vr(i);s.append(e)}else{const{type:t="path"}=e,n=hr(t,ti(e,"type","id","markup","attrs","markerUnits"));s.append(n)}return s.appendTo(n),r}},{sorting:xs,Layers:za,backgroundPatterns:{flipXy:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=2*n,t.height=2*r;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.setTransform(-1,0,0,-1,t.width,t.height),i.drawImage(e,0,0,n,r),i.setTransform(-1,0,0,1,t.width,0),i.drawImage(e,0,0,n,r),i.setTransform(1,0,0,-1,0,t.height),i.drawImage(e,0,0,n,r),t},flipX:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=2*n,t.height=r;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.translate(2*n,0),i.scale(-1,1),i.drawImage(e,0,0,n,r),t},flipY:function(e){var t=document.createElement("canvas"),n=e.width,r=e.height;t.width=n,t.height=2*r;var i=t.getContext("2d");return i.drawImage(e,0,0,n,r),i.translate(0,2*r),i.scale(1,-1),i.drawImage(e,0,0,n,r),t},watermark:function(e,t){t=t||{};var n=e.width,r=e.height,i=document.createElement("canvas");i.width=3*n,i.height=3*r;for(var o=i.getContext("2d"),a=li(t.watermarkAngle)?-t.watermarkAngle:-20,s=St(a),l=i.width/4,u=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)*l,(2*f-1)*u),o.rotate(s),o.drawImage(e,-n/2,-r/2,n,r));return i}},gridPatterns:{dot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(e,t){hr(e).attr({width:t.thickness*t.sx,height:t.thickness*t.sy,fill:t.color})}}],fixedDot:[{color:"#AAAAAA",thickness:1,markup:"rect",update:function(e,t){var n=t.sx<=1?t.thickness*t.sx:t.thickness;hr(e).attr({width:n,height:n,fill:t.color})}}],mesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",hr(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}}],doubleMesh:[{color:"#AAAAAA",thickness:1,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",hr(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}},{color:"#000000",thickness:3,scaleFactor:4,markup:"path",update:function(e,t){var n,r=t.width,i=t.height,o=t.thickness;n=r-o>=0&&i-o>=0?["M",r,0,"H0 M0 0 V0",i].join(" "):"M 0 0 0 0",hr(e).attr({d:n,stroke:t.color,"stroke-width":t.thickness})}}]}}),Ps={exportElement:function(e){return e.size()},exportLink:function(e){var t=e.get("labelSize")||{};return{minLen:e.get("minLen")||1,weight:e.get("weight")||1,labelpos:e.get("labelPosition")||"c",labeloffset:e.get("labelOffset")||0,width:t.width||0,height:t.height||0}},importElement:function(e,t,n){var r=this.getCell(t),i=n.node(t);e.setPosition?e.setPosition(r,i):r.set("position",{x:i.x-i.width/2,y:i.y-i.height/2})},importLink:function(e,t,n){const r=this.getCell(t.name),i=n.edge(t),o=i.points||[],a=new hn(o);if(e.setVertices||e.setLinkVertices)if(qr(e.setVertices))e.setVertices(r,o);else{a.simplify({threshold:.001});const e=a.points.map(e=>e.toJSON()),t=e.length;r.set("vertices",e.slice(1,t-1))}if(e.setLabels&&"x"in i&&"y"in i){const t={x:i.x,y:i.y};if(qr(e.setLabels))e.setLabels(r,t,o);else{const e=a.closestPointLength(t),n=a.pointAtLength(e),i=e/a.length(),o=new $t(t).difference(n).toJSON();r.label(0,{position:{distance:i,offset:o}})}}},layout:function(e,t){var n;n=e instanceof xo?e:(new xo).resetCells(e,{dry:!0,sort:!1}),e=null;const r=(t=jr(t||{},{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=Ps.toGraphLib(n,{graphlib:t.graphlib,directed:!0,multigraph:!0,compound:!0,setNodeLabel:t.exportElement,setEdgeLabel:t.exportLink,setEdgeName:function(e){return e.id}}),o={},a=t.marginX||0,s=t.marginY||0;if(t.rankDir&&(o.rankdir=t.rankDir),t.align&&(o.align=t.align),t.nodeSep&&(o.nodesep=t.nodeSep),t.edgeSep&&(o.edgesep=t.edgeSep),t.rankSep&&(o.ranksep=t.rankSep),t.ranker&&(o.ranker=t.ranker),a&&(o.marginx=a),s&&(o.marginy=s),i.setGraph(o),r.layout(i,{debugTiming:!!t.debugTiming}),n.startBatch("layout"),Ps.fromGraphLib(i,{importNode:this.importElement.bind(n,t),importEdge:this.importLink.bind(n,t)}),t.resizeClusters){var l=i.nodes().filter(function(e){return i.children(e).length>0}).map(n.getCell.bind(n)).sort(function(e,t){return t.getAncestors().length-e.getAncestors().length});Fr(l,"fitEmbeds",{padding:t.clusterPadding})}n.stopBatch("layout");var u=i.graph();return new sn(a,s,Math.abs(u.width-2*a),Math.abs(u.height-2*s))},fromGraphLib:function(e,t){var n=(t=t||{}).importNode||ci,r=t.importEdge||ci,i=this instanceof xo?this:new xo;return e.nodes().forEach(function(r){n.call(i,r,e,i,t)}),e.edges().forEach(function(n){r.call(i,n,e,i,t)}),i},toGraphLib:function(e,t){const n=(t=t||{}).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=ni(t,"directed","compound","multigraph"),i=new n.Graph(r),o=t.setNodeLabel||ci,a=t.setEdgeLabel||ci,s=t.setEdgeName||ci,l=e.get("cells"),u=0,c=l.length;u<c;u++){var f=l.at(u);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");l.has(p)&&i.setParent(f.id,p)}}return i}};function Ls(e,t){return 0===t?"0%":Math.round(e/t*100*1e3)/1e3+"%"}function Ts(e){return function(t,n,r,i){return(n.isNodeConnection(r)?Os:Ns)(e,t,n,r,i)}}function Ns(e,t,n,r,i){var o=n.model.angle(),a=n.getNodeUnrotatedBBox(r),s=n.model.getBBox().center();i.rotate(s,o);var l=i.x-a.x,u=i.y-a.y;return e&&(l=Ls(l,a.width),u=Ls(u,a.height)),t.anchor={name:"topLeft",args:{dx:l,dy:u,rotate:!0}},t}function Os(e,t,n,r,i){var o=n.getConnection();if(!o)return t;var a=o.closestPointLength(i);if(e){var s=o.length();t.anchor={name:"connectionRatio",args:{ratio:a/s}}}else t.anchor={name:"connectionLength",args:{length:a}};return t}xo.prototype.toGraphLib=function(e){return Ps.toGraphLib(this,e)},xo.prototype.fromGraphLib=function(e,t){return Ps.fromGraphLib.call(this,e,t)},Ts(!1);const Ms=Ts(!0),Rs=So.extend({name:null,tagName:"g",className:"tool",svgElement:!0,_visible:!0,init:function(){var e=this.name;e&&this.vel.attr("data-tool-name",e)},configure:function(e,t){return this.relatedView=e,this.paper=e.paper,this.parentView=t,this.simulateRelatedView(this.el),this.delegateEvents(),this},simulateRelatedView:function(e){e&&e.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 e=this.options.focusOpacity;isFinite(e)&&(this.el.style.opacity=e),this.parentView.focusTool(this)},blur:function(){this.el.style.opacity="",this.parentView.blurTool(this)},update:function(){},guard:function(e){const{paper:t,relatedView:n}=this;return!t||!n||t.guard(e,n)}});function Ds(e,t,n){return Ms.call(this.paper,{},t,n,e,this.model).anchor}function js(e,t){const{model:n}=e;return t?n.getBBox():n.isLink()?e.getConnection().bbox():e.getNodeUnrotatedBBox(e.el)}var Is=So.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(e,t){this.vel.attr({cx:e,cy:t})},onPointerDown:function(e){this.options.guard(e)||(e.stopPropagation(),e.preventDefault(),this.options.paper.undelegateEvents(),this.delegateDocumentEvents(null,e.data),this.trigger("will-change",this,e))},onPointerMove:function(e){this.trigger("changing",this,e)},onDoubleClick:function(e){this.trigger("remove",this,e)},onPointerUp:function(e){this.trigger("changed",this,e),this.undelegateDocumentEvents(),this.options.paper.delegateEvents()}}),Fs=(Rs.extend({name:"vertices",options:{handleClass:Is,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 e=this.handles;if(this.handles=[],this.stopListening(),Array.isArray(e))for(var t=0,n=e.length;t<n;t++)e[t].remove()},renderHandles:function(){for(var e=this.relatedView.model.vertices(),t=0,n=e.length;t<n;t++){var r=e[t],i=new this.options.handleClass({index:t,paper:this.paper,guard:e=>this.guard(e)});i.render(),i.position(r.x,r.y),this.simulateRelatedView(i.el),i.vel.appendTo(this.el),this.handles.push(i),this.startHandleListening(i)}},updateHandles:function(){for(var e=this.relatedView.model.vertices(),t=0,n=e.length;t<n;t++){var r=e[t],i=this.handles[t];if(!i)return;i.position(r.x,r.y)}},updatePath:function(){var e=this.childNodes.connection;e&&e.setAttribute("d",this.relatedView.getSerializedConnection())},startHandleListening:function(e){var t=this.relatedView;t.can("vertexMove")&&(this.listenTo(e,"will-change",this.onHandleWillChange),this.listenTo(e,"changing",this.onHandleChanging),this.listenTo(e,"changed",this.onHandleChanged)),t.can("vertexRemove")&&this.listenTo(e,"remove",this.onHandleRemove)},getNeighborPoints:function(e){var t=this.relatedView,n=t.model.vertices(),r=e>0?n[e-1]:t.sourceAnchor,i=e<n.length-1?n[e+1]:t.targetAnchor;return{prev:new $t(r),next:new $t(i)}},onHandleWillChange:function(e,t){this.focus();const{relatedView:n,options:r}=this;n.model.startBatch("vertex-move",{ui:!0,tool:this.cid}),r.stopPropagation||n.notifyPointerdown(...n.paper.getPointerArgs(t))},onHandleChanging:function(e,t){const{options:n,relatedView:r}=this;var i=e.options.index,[o,a,s]=r.paper.getPointerArgs(t),l={x:a,y:s};this.snapVertex(l,i),r.model.vertex(i,l,{ui:!0,tool:this.cid}),e.position(l.x,l.y),n.stopPropagation||r.notifyPointermove(o,a,s)},onHandleChanged:function(e,t){const{options:n,relatedView:r}=this;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(t).vertexAdded&&r.model.stopBatch("vertex-add",{ui:!0,tool:this.cid});var[i,o,a]=r.paper.getPointerArgs(t);n.stopPropagation||r.notifyPointerup(i,o,a),r.checkMouseleave(i)}},snapVertex:function(e,t){var n=this.options.snapRadius;if(n>0){var r=this.getNeighborPoints(t),i=r.prev,o=r.next;Math.abs(e.x-i.x)<n?e.x=i.x:Math.abs(e.x-o.x)<n&&(e.x=o.x),Math.abs(e.y-i.y)<n?e.y=r.prev.y:Math.abs(e.y-o.y)<n&&(e.y=o.y)}},onHandleRemove:function(e,t){var n=e.options.index,r=this.relatedView;r.model.removeVertex(n,{ui:!0}),this.options.vertexAdding&&this.updatePath(),r.checkMouseleave(_r(t))},onPathPointerDown:function(e){if(!this.guard(e)){e.stopPropagation(),e.preventDefault();var t=_r(e),n=this.paper.snapToGrid(t.clientX,t.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(t,{vertexAdded:!0}),o.onPointerDown(t)}},onRemove:function(){this.resetHandles()}},{VertexHandle:Is}),So.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(e,t,n,r){var i=hr.createSVGMatrix().translate(e,t).rotate(n),o=this.childNodes.handle;o.setAttribute("transform",hr.matrixToTransformString(i)),o.setAttribute("cursor",n%180==0?"row-resize":"col-resize");var a=r.getClosestPoint(new $t(e,t)),s=this.childNodes.line;s.setAttribute("x1",e),s.setAttribute("y1",t),s.setAttribute("x2",a.x),s.setAttribute("y2",a.y)},onPointerDown:function(e){this.options.guard(e)||(this.trigger("change:start",this,e),e.stopPropagation(),e.preventDefault(),this.options.paper.undelegateEvents(),this.delegateDocumentEvents(null,e.data))},onPointerMove:function(e){this.trigger("changing",this,e)},onPointerUp:function(e){this.undelegateDocumentEvents(),this.options.paper.delegateEvents(),this.trigger("change:end",this,e)},show:function(){this.el.style.display=""},hide:function(){this.el.style.display="none"}})),zs=(Rs.extend({name:"segments",precision:.5,options:{handleClass:Fs,segmentLengthThreshold:40,redundancyRemoval:!0,anchor:Ds,snapRadius:10,snapHandle:!0,stopPropagation:!0},handles:null,onRender:function(){this.resetHandles();var e=this.relatedView,t=e.model.vertices();t.unshift(e.sourcePoint),t.push(e.targetPoint);for(var n=0,r=t.length;n<r-1;n++){var i=t[n],o=t[n+1],a=this.renderHandle(i,o);this.simulateRelatedView(a.el),this.handles.push(a),a.options.index=n}return this},renderHandle:function(e,t){var n=new this.options.handleClass({paper:this.paper,guard:e=>this.guard(e)});return n.render(),this.updateHandle(n,e,t),n.vel.appendTo(this.el),this.startHandleListening(n),n},update:function(){return this.render(),this},startHandleListening:function(e){this.listenTo(e,"change:start",this.onHandleChangeStart),this.listenTo(e,"changing",this.onHandleChanging),this.listenTo(e,"change:end",this.onHandleChangeEnd)},resetHandles:function(){var e=this.handles;if(this.handles=[],this.stopListening(),Array.isArray(e))for(var t=0,n=e.length;t<n;t++)e[t].remove()},shiftHandleIndexes:function(e){for(var t=this.handles,n=0,r=t.length;n<r;n++)t[n].options.index+=e},resetAnchor:function(e,t){var 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})},snapHandle:function(e,t,n){var r=e.options.index,i=this.relatedView.model.vertices(),o=e.options.axis,a=i[r-2]||n.sourceAnchor,s=i[r+1]||n.targetAnchor,l=this.options.snapRadius;return Math.abs(t[o]-a[o])<l?t[o]=a[o]:Math.abs(t[o]-s[o])<l&&(t[o]=s[o]),t},onHandleChanging:function(e,t){const{options:n}=this;var r=this.eventData(t),i=this.relatedView,o=i.paper,a=e.options.index-1,s=_r(t),l=o.snapToGrid(s.clientX,s.clientY),u=this.snapHandle(e,l.clone(),r),c=e.options.axis,f=this.options.snapHandle?0:l[c]-u[c],h=i.model,d=$r(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]=u[c],w=!0):p[c]=u[c]:((p=i.sourceAnchor.toJSON())[c]=u[c],y.containsPoint(p)?(p[c]=u[c],b=!0):(d.unshift(p),this.shiftHandleIndexes(1),w=!0)),v&&m){if(b){var x=r.sourceAnchor.clone();x[c]=u[c];var k=v.call(i,x,m,i.sourceMagnet||m.el,"source",i);this.resetAnchor("source",k)}w&&this.resetAnchor("source",r.sourceAnchorDef)}var S=i.targetView,_=i.targetBBox,E=!1,C=!1;if(g?a===d.length-2?_.containsPoint(g)?(d.pop(),E=!0):(g[c]=u[c],C=!0):g[c]=u[c]:((g=i.targetAnchor.toJSON())[c]=u[c],_.containsPoint(g)?E=!0:(d.push(g),C=!0)),v&&S){if(E){var A=r.targetAnchor.clone();A[c]=u[c];var P=v.call(i,A,S,i.targetMagnet||S.el,"target",i);this.resetAnchor("target",P)}C&&this.resetAnchor("target",r.targetAnchorDef)}h.vertices(d,{ui:!0,tool:this.cid}),this.updateHandle(e,p,g,f),n.stopPropagation||i.notifyPointermove(s,l.x,l.y)},onHandleChangeStart:function(e,t){const{options:n,handles:r,relatedView:i}=this,{model:o,paper:a}=i;var s=e.options.index;if(Array.isArray(r)){for(var l=0,u=r.length;l<u;l++)l!==s&&r[l].hide();this.focus(),this.eventData(t,{sourceAnchor:i.sourceAnchor.clone(),targetAnchor:i.targetAnchor.clone(),sourceAnchorDef:Br(o.prop(["source","anchor"])),targetAnchorDef:Br(o.prop(["target","anchor"]))}),o.startBatch("segment-move",{ui:!0,tool:this.cid}),n.stopPropagation||i.notifyPointerdown(...a.getPointerArgs(t))}},onHandleChangeEnd:function(e,t){const{options:n,relatedView:r}=this,{paper:i,model:o}=r;n.redundancyRemoval&&r.removeRedundantLinearVertices({ui:!0,tool:this.cid});const a=_r(t),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(e,t,n,r){var i=Math.abs(t.x-n.x)<this.precision,o=Math.abs(t.y-n.y)<this.precision;if(i||o){var a=new Wt(t,n);if(a.length()<this.options.segmentLengthThreshold)e.hide();else{var s=a.midpoint(),l=i?"x":"y";s[l]+=r||0;var u=a.vector().vectorAngle(new $t(1,0));e.position(s.x,s.y,u,this.relatedView),e.show(),e.options.axis=l}}else e.hide()},onRemove:function(){this.resetHandles()}},{SegmentHandle:Fs}),Rs.extend({tagName:"path",xAxisVector:new $t(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 e,t,n=this.ratio,r=this.relatedView,i=r.getTangentAtRatio(n);if(i?(e=i.start,t=i.vector().vectorAngle(this.xAxisVector)||0):(e=r.getPointAtRatio(n),t=0),!e)return this;var o=hr.createSVGMatrix().translate(e.x,e.y).rotate(t);return this.vel.transform(o,{absolute:!0}),this},onPointerDown:function(e){if(!this.guard(e)){e.stopPropagation(),e.preventDefault();var t=this.relatedView;t.model.startBatch("arrowhead-move",{ui:!0,tool:this.cid}),t.can("arrowheadMove")&&(t.startArrowheadMove(this.arrowheadType),this.delegateDocumentEvents(),t.paper.undelegateEvents()),this.focus(),this.el.style.pointerEvents="none"}},onPointerMove:function(e){var t=_r(e),n=this.paper.snapToGrid(t.clientX,t.clientY);this.relatedView.pointermove(t,n.x,n.y)},onPointerUp:function(e){this.undelegateDocumentEvents();var t=this.relatedView,n=t.paper,r=_r(e),i=n.snapToGrid(r.clientX,r.clientY);t.pointerup(r,i.x,i.y),n.delegateEvents(),this.blur(),this.el.style.pointerEvents="",t.model.stopBatch("arrowhead-move",{ui:!0,tool:this.cid})}})),Vs=(zs.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"}}),zs.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"}}),Rs.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(){const{relatedView:e,vel:t}=this,n=e.model.isLink()?this.getLinkMatrix():this.getElementMatrix();t.transform(n,{absolute:!0})},getElementMatrix(){const{relatedView:e,options:t}=this;let{x:n=0,y:r=0,offset:i={},useModelGeometry:o,rotate:a}=t,s=js(e,o);const l=e.model.angle();a||(s=s.bbox(l));const{x:u=0,y:c=0}=i;Ar(n)&&(n=parseFloat(n)/100*s.width),Ar(r)&&(r=parseFloat(r)/100*s.height);let f=hr.createSVGMatrix().translate(s.x+s.width/2,s.y+s.height/2);return a&&(f=f.rotate(l)),f=f.translate(n+u-s.width/2,r+c-s.height/2),f},getLinkMatrix(){const{relatedView:e,options:t}=this,{offset:n=0,distance:r=0,rotate:i}=t;let o,a,s;o=Ar(r)?e.getTangentAtRatio(parseFloat(r)/100):e.getTangentAtLength(r),o?(a=o.start,s=o.vector().vectorAngle(new $t(1,0))||0):(a=e.getConnection().start,s=0);let l=hr.createSVGMatrix().translate(a.x,a.y).rotate(s).translate(0,n);return i||(l=l.rotate(-s)),l},onPointerDown:function(e){if(!this.guard(e)){e.stopPropagation(),e.preventDefault();var t=this.options.action;"function"==typeof t&&t.call(this.relatedView,e,this.relatedView,this)}}})),Bs=Vs.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(e,t,n){t.model.remove({ui:!0,tool:n.cid})}}});Vs.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:e=>e.el,action:(e,t,n)=>n.dragstart(e)},getMagnetNode:function(){const{options:e,relatedView:t}=this,{magnet:n}=e;let r;switch(typeof n){case"function":r=n.call(this,t,this);break;case"string":[r]=t.findBySelector(n);break;default:r=n}if(r||(r=t.el),r instanceof SVGElement)return r;throw new Error("Connect: magnet must be an SVGElement")},dragstart:function(e){const{paper:t,relatedView:n}=this,r=_r(e),{x:i,y:o}=t.clientToLocalPoint(r.clientX,r.clientY);n.dragLinkStart(r,this.getMagnetNode(),i,o),t.undelegateEvents(),this.delegateDocumentEvents(null,e.data),this.focus()},drag:function(e){const{paper:t,relatedView:n}=this,r=_r(e),{x:i,y:o}=t.snapToGrid(r.clientX,r.clientY);n.dragLink(r,i,o)},dragend:function(e){const{paper:t,relatedView:n}=this,r=_r(e),{x:i,y:o}=t.snapToGrid(r.clientX,r.clientY);n.dragLinkEnd(r,i,o),this.undelegateDocumentEvents(),t.delegateEvents(),this.blur(),n.checkMouseleave(r)}}),Rs.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(){const{relatedView:e,options:t,vel:n}=this,{useModelGeometry:r,rotate:i}=t,o=Tr(t.padding);let a=js(e,r).moveAndExpand({x:-o.left,y:-o.top,width:o.left+o.right,height:o.top+o.bottom});var s=e.model;if(s.isElement()){var l=s.angle();if(l)if(i){var u=s.getBBox().center();n.rotate(l,u.x,u.y,{absolute:!0})}else a=a.bbox(l)}return n.attr(a.toJSON()),this}});var $s=Rs.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(e,t,n,r,i,o){var a=o.options.snapRadius,s="source"===r,l=s?0:-1,u=this.model.vertex(l)||this.getEndAnchor(s?"target":"source");return u&&(Math.abs(u.x-e.x)<a&&(e.x=u.x),Math.abs(u.y-e.y)<a&&(e.y=u.y)),e},anchor:Ds,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 e=this.type;return this.relatedView.getEndView(e)?(this.updateAnchor(),this.updateArea(),this.el.style.display=""):this.el.style.display="none",this},updateAnchor:function(){var e=this.childNodes;if(e){var t=e.anchor;if(t){var n=this.relatedView,r=this.type,i=n.getEndAnchor(r),o=this.options,a=n.model.prop([r,"anchor"]);t.setAttribute("transform","translate("+i.x+","+i.y+")");var s=a?o.customAnchorAttributes:o.defaultAnchorAttributes;for(var l in s)t.setAttribute(l,s[l])}}},updateArea:function(){var e=this.childNodes;if(e){var t=e.area;if(t){var n,r,i,o=this.relatedView,a=this.type,s=o.getEndView(a),l=s.model,u=o.getEndMagnet(a),c=this.options.areaPadding;isFinite(c)||(c=0),s.isNodeConnection(u)?(r=0,i=(n=s.getBBox()).center()):(n=s.getNodeUnrotatedBBox(u),r=l.angle(),i=n.center(),r&&i.rotate(l.getBBox().center(),-r)),n.inflate(c),t.setAttribute("x",-n.width/2),t.setAttribute("y",-n.height/2),t.setAttribute("width",n.width),t.setAttribute("height",n.height),t.setAttribute("transform","translate("+i.x+","+i.y+") rotate("+r+")")}}},toggleArea:function(e){this.childNodes.area.style.display=e?"":"none"},onPointerDown:function(e){this.guard(e)||(e.stopPropagation(),e.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(e){var t=this.type,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})},onPointerMove:function(e){var t,n=this.relatedView,r=this.type,i=n.getEndView(r),o=i.model,a=n.getEndMagnet(r),s=_r(e),l=this.paper.clientToLocalPoint(s.clientX,s.clientY),u=this.options.snap;if("function"==typeof u&&(l=u.call(n,l,i,a,r,n,this),l=new $t(l)),this.options.restrictArea)if(i.isNodeConnection(a)){var c=i.getClosestPoint(l);c&&(l=c)}else{var f=i.getNodeUnrotatedBBox(a),h=o.angle(),d=o.getBBox().center(),p=l.clone().rotate(d,h);f.containsPoint(p)||(l=f.pointNearestToPoint(p).rotate(d,-h))}var g=this.options.anchor;"function"==typeof g&&(t=g.call(n,l,i,a,r,n)),this.resetAnchor(t),this.update()},onPointerUp:function(e){this.paper.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);var t=this.relatedView;this.options.redundancyRemoval&&t.removeRedundantLinearVertices({ui:!0,tool:this.cid}),t.model.stopBatch("anchor-move",{ui:!0,tool:this.cid})},onPointerDblClick:function(){var e=this.options.resetAnchor;!1!==e&&(!0===e&&(e=null),this.resetAnchor($r(e)),this.update())}});$s.extend({name:"source-anchor",type:"source"}),$s.extend({name:"target-anchor",type:"target"});const Us=So.extend({tagName:"g",className:"tools",svgElement:!0,tools:null,isRendered:!1,options:{tools:null,relatedView:null,name:null},configure:function(e){var t=(e=Dr(this.options,e)).tools;if(!Array.isArray(t))return this;var n=e.relatedView;if(!(n instanceof Po))return this;for(var r=this.tools=[],i=0,o=t.length;i<o;i++){var a=t[i];a instanceof Rs&&(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(e){e||(e={});var t=this.tools;if(!t)return this;for(var n=this.isRendered,r=0,i=t.length;r<i;r++){var o=t[r];n?e.tool!==o.cid&&o.isVisible()&&o.update():o.render()}return n||(this.mount(),this.blurTool(),this.isRendered=!0),this},focusTool:function(e){var t=this.tools;if(!t)return this;for(var n=0,r=t.length;n<r;n++){var i=t[n];e===i?i.show():i.hide()}return this},blurTool:function(e){var t=this.tools;if(!t)return this;for(var n=0,r=t.length;n<r;n++){var i=t[n];i===e||i.isVisible()||(i.show(),i.update())}return this},hide:function(){return this.focusTool(null)},show:function(){return this.blurTool(null)},onRemove:function(){var e=this.tools;if(!e)return this;for(var t=0,n=e.length;t<n;t++)e[t].remove();this.tools=null},mount:function(){const{options:e,el:t}=this,{relatedView:n,layer:r=za.TOOLS,z:i}=e;return n&&(r?n.paper.getLayerView(r).insertSortedNode(t,i):n.el.appendChild(t)),this}}),Hs={_results:{},_tests:{svgforeignobject:function(){return!!document.createElementNS&&/SVGForeignObject/.test({}.toString.call(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")))}},addTest:function(e,t){return this._tests[e]=t},test:function(e){var t=this._tests[e];if(!t)throw new Error('Test not defined ("'+e+'"). Use `joint.env.addTest(name, fn) to add a new test.`');var n=this._results[e];if(void 0!==n)return n;try{n=t()}catch(e){n=!1}return this._results[e]=n,n}},qs=yo.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"}]}),Ws=yo.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"}]}),Gs=yo.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"}]}),Ys=yo.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"}]}),Xs=yo.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"}]}),Ks=yo.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"}]}),Js=yo.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"}]}),Qs=yo.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"}]}),Zs=yo.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"}]}),el=yo.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"}]}),tl=yo.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"}]}),nl=yo.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(e,t){if(void 0===e)return this.attr("body/lateralArea");var n={lateralArea:e},r=Ar(e)?{refCy:e,refRy:e,cy:null,ry:null}:{refCy:null,refRy:null,cy:e,ry:e};return this.attr({body:n,top:r},t)}},{attributes:{lateralArea:{set:function(e,t){var n=Ar(e);n&&(e=parseFloat(e)/100);var r=t.x,i=t.y,o=t.width,a=t.height,s=o/2,l=n?a*e:e,u=hr.KAPPA,c=u*s,f=u*(n?a*e:e),h=r+o/2,d=r+o,p=i+l,g=p-l,v=i+a-l,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(" ")}}}}});var rl=Hs.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"}};const il=yo.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"},rl]},{attributes:{text:{set:function(e,t,n,r){if(!(n instanceof HTMLElement)){var i=r.style||{},o={text:e,width:-5,height:"100%"},a=Dr({textVerticalAnchor:"middle"},i);return ji.textWrap.set.call(this,o,t,n,a),{fill:i.color||null}}n.textContent=e},position:function(e,t,n){if(n instanceof SVGElement)return t.center()}}}}),ol=Fi.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"}}]}),al=Fi.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"}}]}),sl=Fi.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"}}]});var ll=n(6246),ul=n(8362);const cl="#fe9b00",fl="#00a5ff",hl="#606d84",dl="#2a303b",pl="#4eaf52",gl="#ffffff",vl="#dddddd",ml="#ca3e37",yl="#2b5797",bl={},wl=(e,{width:t,lineHeight:n})=>{const r=`${e}-${t}-${n}`;if(bl[r])return bl[r];const i=Lr(e,{width:t},{wordWrap:"break-word"}),o=(i.match(/\n/g)||[]).length*n;return bl[r]={brokenText:i,textHeight:o},{brokenText:i,textHeight:o}},xl=(e,t)=>null!=t&&t.includes(e)?.3:1,kl=(e,t)=>{switch(e){case"N":return{bodyColor:"rgba(78, 175, 82, 0.1)",strokeColor:pl,label:"green",opacity:xl("added",t)};case"E":return{bodyColor:"rgba(43, 87, 151, 0.1)",strokeColor:yl,label:"blue",opacity:xl("changed",t)};case"D":return{bodyColor:"rgba(202, 62, 55, 0.1)",strokeColor:ml,label:"red",opacity:xl("removed",t)};default:return{bodyColor:gl,strokeColor:"#757575",label:"grey",opacity:xl("no changes",t)}}},Sl=e=>e&&"Condition"===e.type;function _l({isCompare:e,node:t,variablesPairs:n,containsLabel:r="Contains",notContainsLabel:i="Doesn't contain",andOperator:o="AND",orOperator:a="OR",deletedVarFlag:s="(Deleted)",isTreeIncludesContextVarsData:l,uncheckedChanges:u,boxColors:c}){if(null==t||!t.conditions)return{conditions:[]};const{upperCase:f}=pt,h={eq:"[=]",neq:"[≠]",contains:`[${r}]`,not_contains:`[${i}]`};let d=!1;return{conditions:t.conditions.map(t=>{var r,i,o,a;let f=!1;const p=kl((null==(r=t.nextStep)?void 0:r.diffType)||(null==t?void 0:t.diffType),u),g=p.label||c.label,v=null==(o=null==(i=null==t?void 0:t.expression)?void 0:i.rules)?void 0:o.map(({variableId:e,operator:t,value:r,isDeleted:i,variableName:o})=>{const a=l?{isDeleted:i,name:o}:null==n?void 0:n[e];return!f&&null!=a&&a.isDeleted&&(f=!0,d=!0),`${null!=a&&a.isDeleted?`${a.name} ${s}`:null==a?void 0:a.name} ${h[t]} ${r}`});return{id:t.id,nextStep:t.nextStep,joiner:null==(a=null==t?void 0:t.expression)?void 0:a.joiner,rules:v||[],shouldRemovePort:f,group:e&&g?g:t.nextStep?"outWithLink":"outWithoutLink",opacity:p.opacity||c.opacity}}).map(({joiner:e,rules:t,...n})=>({text:e?t.join(` ${f("or"===e?a:o)} `):t[0],...n})),isConditionsIncludeDeletedVars:d}}var El=function(e,t){return e<t?-1:e>t?1:0},Cl=function(e,t){var n=e.localeCompare(t);return n?n/Math.abs(n):0},Al=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Pl=/^\s+|\s+$/g,Ll=/\s+/g,Tl=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Nl=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,Ol=/^0+[1-9]{1}[0-9]*$/,Ml=/[^\x00-\x80]/,Rl=function(e,t){return e<t?-1:e>t?1:0},Dl=function(e,t){return e.value===t.value?0:void 0!==e.parsedNumber&&void 0!==t.parsedNumber?El(e.parsedNumber,t.parsedNumber):e.chunks&&t.chunks?function(e,t){for(var n=e.length,r=t.length,i=Math.min(n,r),o=0;o<i;o++){var a=e[o],s=t[o];if(a.normalizedString!==s.normalizedString){if(""===a.normalizedString!=(""===s.normalizedString))return""===a.normalizedString?-1:1;if(void 0!==a.parsedNumber&&void 0!==s.parsedNumber){var l=El(a.parsedNumber,s.parsedNumber);return 0===l?Rl(a.normalizedString,s.normalizedString):l}return void 0!==a.parsedNumber||void 0!==s.parsedNumber?void 0!==a.parsedNumber?-1:1:Ml.test(a.normalizedString+s.normalizedString)?Cl(a.normalizedString,s.normalizedString):Rl(a.normalizedString,s.normalizedString)}}return n>i||r>i?n<=i?-1:1:0}(e.chunks,t.chunks):function(e,t){return(e.chunks?!t.chunks:t.chunks)?e.chunks?-1:1:(e.isNaN?!t.isNaN:t.isNaN)?e.isNaN?-1:1:(e.isSymbol?!t.isSymbol:t.isSymbol)?e.isSymbol?-1:1:(e.isObject?!t.isObject:t.isObject)?e.isObject?-1:1:(e.isArray?!t.isArray:t.isArray)?e.isArray?-1:1:(e.isFunction?!t.isFunction:t.isFunction)?e.isFunction?-1:1:(e.isNull?!t.isNull:t.isNull)?e.isNull?-1:1:0}(e,t)},jl=function(e){return e.replace(Ll," ").replace(Pl,"")},Il=function(e){if(0!==e.length){var t=Number(e);if(!Number.isNaN(t))return t}},Fl=function(e,t,n){if(Tl.test(e)&&(!Ol.test(e)||0===t||"."!==n[t-1]))return Il(e)||0},zl=function(e,t,n){return{parsedNumber:Fl(e,t,n),normalizedString:jl(e)}},Vl=function(e){var t=function(e){return e.replace(Al,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}(e).map(zl);return t},Bl=function(e){return"function"==typeof e},$l=function(e){return Number.isNaN(e)||e instanceof Number&&Number.isNaN(e.valueOf())},Ul=function(e){return null===e},Hl=function(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof Number||e instanceof String||e instanceof Boolean||e instanceof Date)},ql=function(e){return"symbol"==typeof e},Wl=function(e){return void 0===e},Gl=function(e){if("string"==typeof e||e instanceof String||("number"==typeof e||e instanceof Number)&&!$l(e)||"boolean"==typeof e||e instanceof Boolean||e instanceof Date){var t=function(e){return"boolean"==typeof e||e instanceof Boolean?Number(e).toString():"number"==typeof e||e instanceof Number?e.toString():e instanceof Date?e.getTime().toString():"string"==typeof e||e instanceof String?e.toLowerCase().replace(Pl,""):""}(e),n=function(e){var t=Il(e);return void 0!==t?t:function(e){try{var t=Date.parse(e);return!Number.isNaN(t)&&Nl.test(e)?t:void 0}catch(e){return}}(e)}(t);return{parsedNumber:n,chunks:Vl(n?""+n:t),value:e}}return{isArray:Array.isArray(e),isFunction:Bl(e),isNaN:$l(e),isNull:Ul(e),isObject:Hl(e),isSymbol:ql(e),isUndefined:Wl(e),value:e}},Yl=function(e){return"function"==typeof e?e:function(t){if(Array.isArray(t)){var n=Number(e);if(Number.isInteger(n))return t[n]}else if(t&&"object"==typeof t){var r=Object.getOwnPropertyDescriptor(t,e);return null==r?void 0:r.value}return t}};function Xl(e,t,n){if(!e||!Array.isArray(e))return[];var r=function(e){if(!e)return[];var t=Array.isArray(e)?[].concat(e):[e];return t.some(function(e){return"string"!=typeof e&&"number"!=typeof e&&"function"!=typeof e})?[]:t}(t),i=function(e){if(!e)return[];var t=Array.isArray(e)?[].concat(e):[e];return t.some(function(e){return"asc"!==e&&"desc"!==e&&"function"!=typeof e})?[]:t}(n);return function(e,t,n){var r=t.length?t.map(Yl):[function(e){return e}],i=e.map(function(e,t){return{index:t,values:r.map(function(t){return t(e)}).map(Gl)}});return i.sort(function(e,t){return function(e,t,n){for(var r=e.index,i=e.values,o=t.index,a=t.values,s=i.length,l=n.length,u=0;u<s;u++){var c=u<l?n[u]:null;if(c&&"function"==typeof c){var f=c(i[u].value,a[u].value);if(f)return f}else{var h=Dl(i[u],a[u]);if(h)return h*("desc"===c?-1:1)}}return r-o}(e,t,n)}),i.map(function(t){return function(e,t){return e[t]}(e,t.index)})}(e,r,i)}const{has:Kl,isEqual:Jl,some:Ql}=pt,Zl=e=>{const t=Jl(e.type,"Condition"),n=Kl(e,"url")&&Jl(e.type,"Link"),r=!Kl(e,"question.answers")&&!n&&Jl(e.type,"Solution");return t?pl:r?dl:n?cl:fl},eu=({id:e,source:t,target:n,isDefault:r=!1,lineProps:i})=>({id:e,type:"standard.Link",source:t,target:n,attrs:{line:{targetMarker:{d:"M 13 -7.5 0 0 13 7.5"},...i}},isDefault:r}),tu=({nodes:e,node:t,variablesPairs:n,isTreeIncludesContextVarsData:r,isCompare:i,defaultOptionColor:o,boxColors:a,uncheckedChanges:s,targetCellsIds:l})=>{var u,c,f;if(!Jl(t.type,"Condition"))return;const h=[];let d=!1;return null!=(u=null==t?void 0:t.defaultNextStep)&&u.id&&Ql(e,{id:null==(c=null==t?void 0:t.defaultNextStep)?void 0:c.id})&&t.id?(l.add((null==(f=null==t?void 0:t.defaultNextStep)?void 0:f.id)||""),h.push(eu({id:`${t.id}-${t.defaultNextStep.id}-default`,source:{id:t.id,port:`${t.id}`},target:{id:t.defaultNextStep.id},isDefault:!0,lineProps:{stroke:i&&(o.strokeColor||a.strokeColor)||vl,opacity:o.opacity||1}}))):d=!0,t.conditions&&t.conditions.length?(t.conditions.forEach((o,u)=>{var c,f;const p=kl((null==(c=o.nextStep)?void 0:c.diffType)||(null==o?void 0:o.diffType),s),{nextStep:g}=o,v=(null==(f=null==o?void 0:o.expression)?void 0:f.rules)||[],m=Ql(v,r?({isDeleted:e})=>e:({variableId:e})=>{var t;return null==(t=null==n?void 0:n[e])?void 0:t.isDeleted}),y=g&&Ql(e,{id:g.id})&&t.id&&!m;y&&(l.add(g.id),h.push(eu({id:`${t.id}-${g.id}-${u}`,source:{id:t.id,port:o.id},target:{id:g.id},lineProps:{stroke:i&&(p.strokeColor||a.strokeColor)||vl,opacity:p.opacity||1}}))),!y&&!d&&(d=!0)}),{conditionsConnection:h,isAnyUnlinkedConditions:d}):{conditionsConnection:h,isAnyUnlinkedConditions:d}},nu={defaultC:vl,selectedC:dl,hoverC:"#939393"},ru={stroke:nu.defaultC,"stroke-width":2,fill:nu.defaultC},iu={stroke:nu.defaultC,"stroke-width":2,fill:"transparent"},ou={stroke:nu.hoverC},au={stroke:nu.defaultC},su={noURLError:"Add the link",deletedVariableWarn:"Replace deleted variable(s)",linkConnectionWarn:"Add the incoming or outgoing connection"},lu=20,uu=".question-icon",cu={},fu=yo.define("qad.Question",{ports:{groups:{outWithLink:{position:"right",attrs:{circle:{magnet:!0,cursor:"pointer",r:8,...iu}}},outWithoutLink:{position:"right",attrs:{circle:{magnet:!0,cursor:"pointer",r:8,...ru}}},red:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:ml,r:10}}},green:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:pl,r:10}}},blue:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:yl,r:10}}},grey:{position:"right",attrs:{circle:{magnet:!0,stroke:"none",cursor:"pointer",fill:"#757575",r:10}}}}},attrs:{".body-background":{refWidth:"100%",refHeight:"100%",fill:"white"},".body":{refWidth:"100%",refHeight:"100%",rx:5,stroke:dl,fill:"white",cursor:"pointer"},text:{fontSize:14,lineHeight:20,fontFamily:"Open Sans, Arial, sans-serif",fill:dl,fontWeight:600,cursor:"default"},".question-text":{xAlignment:"start",refX:50,refY:lu},".edit-button":{fill:hl,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:hl,xAlignment:"middle",refX:32,yAlignment:"middle",refY:15,fontWeight:400},".option-order-box":{fill:"#f5f5f5",width:24,height:24,xAlignment:lu,yAlignment:"middle",refY:15,rx:5,fontWeight:400},".option-text":{fontSize:14,fontWeight:400,lineHeight:20,fill:dl,refX:50,yAlignment:-8},".variables-text":{fontSize:14,fontWeight:400,lineHeight:20,fill:dl,refX:50},[uu]:{x:lu,y:18},".variables-icon":{x:lu},".warning-icon":{x:15},".error-icon":{x:15}}},{markup:'<rect class="body-background"/><rect class="body"\n /><text class="question-text"/><g class="edit-button"><path fill-opacity="0" d="M0 0h15v15H0z"\n /><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"\n /></g><g class="variables" /><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>',variablesMarkup:'<text class="variables-text"/>',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>',conditionMarkup:'<svg class="question-icon" width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">\n <g fill="none" fill-rule="evenodd">\n <path d="M0 0h18v18H0z"/>\n <path d="M4.209 16.636 3 15.44l4.14-4.098A3.38 3.38 0 0 0 8.143 8.94V4.613L6.78 5.953 5.571 4.759 9 1.364l3.429 3.394-1.209 1.196-1.363-1.34V8.94c0 .899.36 1.764 1.003 2.4L15 15.44l-1.209 1.196L9 11.893l-4.791 4.743z" fill="#4EAF52" fill-rule="nonzero"/>\n </g>\n</svg>',initialStepMarkup:(e,t="First")=>{const n=(e=>{const t=document.createElement("canvas").getContext("2d");if(t){t.font="14px Open Sans";const{width:n}=t.measureText(e);return Math.ceil(n)+31}return 57})(t);return`<svg class="first-step-icon" width="${n}" height="22" viewBox="7 10 ${n} 22" xmlns="http://www.w3.org/2000/svg">\n <g class="first-step-icon__part" fill="none" fill-rule="evenodd">\n <path fill="#606D84" d="M 0 0 h ${n-10} L ${n} 10 L ${n-10} 22 H 0 z"/>\n <text class="first-step-icon__text" font-family="OpenSans-Regular, Open Sans" font-size="14">\n <tspan x="10" y="16">${t}</tspan>\n </text>\n </g>\n <title>${e}</title>\n </svg>`},variablesIconMarkup:'<svg class="variables-icon" width="14px" height="14px" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-43.000000, -248.000000)">\n <g transform="translate(10.000000, 185.000000)">\n <g transform="translate(33.000000, 63.000000)">\n <rect x="0" y="0" width="14" height="14"></rect>\n <path d="M3,1 L3,1.94736842 L1.10284464,1.94736842 L1.10284464,12.0459127 L3,12.0459127 L3,13 L0,13 L0,1 L3,1 Z M14,1 L14,13 L11,13 L11,12.0459127 L12.8971554,12.0459127 L12.8971554,1.94736842 L11,1.94736842 L11,1 L14,1 Z M4.68378651,3 L7.01208459,6.06569343 L9.33232628,3 L10.8388721,3 L7.7693857,6.90510949 L11,11 L9.48539778,11 L7.01208459,7.75912409 L4.51460222,11 L3,11 L6.2306143,6.90510949 L3.1611279,3 L4.68378651,3 Z" fill-rule="nonzero"></path>\n </g>\n </g>\n </g>\n</g>\n</svg>',labelMarkup:'<g><rect class="label" /><text class="label-text" /></g>',warningMessageMarkup:'<g class="warning-message"><rect class="warning-body"/><text class="warning-text"/></g>',warningIconMarkup:'<svg class="warning-icon" width="14px" height="14px" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">\n<g fill="none" fill-rule="evenodd">\n <path d="M4 18.818h16L12 5 4 18.818zm8.727-2.182h-1.454v-1.454h1.454v1.454zm0-2.909h-1.454v-2.909h1.454v2.91z" fill="#FE9B00" fill-rule="nonzero"/>\n</g>\n</svg>',errorIconMarkup:'<svg class="error-icon" width="14px" height="14px" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">\n<g fill="none" fill-rule="evenodd">\n <path d="M12.5 5C8.36 5 5 8.36 5 12.5c0 4.14 3.36 7.5 7.5 7.5 4.14 0 7.5-3.36 7.5-7.5C20 8.36 16.64 5 12.5 5zm.75 11.25h-1.5v-1.5h1.5v1.5zm0-3h-1.5v-4.5h1.5v4.5z" fill="#CA3E37" fill-rule="nonzero"/>\n</g>\n</svg>',initialize(...e){yo.prototype.initialize.apply(this,e);const t=this.get("question")||"",n=this.get("id"),r=this.get("isSolution"),i=this.get("isLink"),o=this.get("interactive"),a=this.get("color"),s=this.get("position"),l=this.get("boxColors"),u=this.get("isReadOnly"),c=this.get("isCompare"),f=this.get("labelText"),h=this.get("activeStepId"),d=h&&h===n,p=this.get("assignedVariablesText")||"",g=this.get("isFirstStep"),{brokenText:v,textHeight:m}=wl(t,{width:230,lineHeight:20}),{brokenText:y="",textHeight:b=0}=p?wl(p,{width:230,lineHeight:20}):{},w=this.get("bodyTitle")??"Double click to edit";if((g||r)&&this.attr(".body",{stroke:fl,strokeWidth:1}),(r||i)&&(this.attr(".question-text",{refX:55,refY:25}),this.attr(uu,{x:25,y:23})),a&&(this.attr(".body",{stroke:a,strokeWidth:1}),this.attr(uu,{fill:a}),this.attr(".variables-icon path",{fill:a})),this.attr(".first-step-icon__part",{cursor:"pointer"}),this.attr(".first-step-icon__text",{"font-weight":"400",fill:gl,cursor:"inherit"}),l.bodyColor&&c){const e=g&&this.get("highlightFirstStep");this.attr(".body",{stroke:l.strokeColor,strokeWidth:1,fill:l.bodyColor,opacity:l.opacity}),this.attr(".label-text",{text:f,y:e?-17:-8,x:5,fill:"#fff"}),this.attr(".label",{fill:l.strokeColor,width:8.4*f.length+10,height:20,opacity:l.opacity,y:e?-31:-22,rx:3}),this.attr(uu,{fill:l.strokeColor,opacity:l.opacity}),this.attr(".variables-icon",{opacity:l.opacity}),this.attr(".variables-icon path",{fill:l.strokeColor}),this.attr(".variables-text",{opacity:l.opacity}),this.attr(".question-text",{opacity:l.opacity}),this.attr(".options",{opacity:l.opacity})}s&&this.moveBox(s),d&&this.attr(".body",{fill:a,fillOpacity:.1,stroke:a}),this.attr(".body",{title:o||u?w:"",cursor:o||u?"pointer":"default"}),this.attr({".question-text":{text:v,title:t}}),p&&(this.attr({".variables-text":{text:y,title:p,refY:25}}),this.attr(".variables-icon/y",45+m+4)),!c&&!u&&this.attr({".warning-body":{refWidth:"100%",fillOpacity:.12,ry:5},".warning-text":{fontSize:14,fontWeight:400,lineHeight:20,fill:dl,refX:50}});const x=p?80:45;this.attr(".variables/refY",25+m),this.attr(".options/refY",x+b+m);const{optionsOffset:k}=this.renderOptions(m,b),{warningHeight:S}=this.renderWarningMessage({offsetY:(k||-5)+x+b+m});this.adjustSize(m,b+S)},getOptions:function(){if(this.get("isCondition")){const e=this.get("conditions")||[],{conditionDefaultTitle:t,group:n,opacity:r}=this.get("conditionDefaultProps")||{};return[...e,{id:this.get("id"),group:n,opacity:r,text:t}]}return this.get("options")},getVariablesText:function(){return this.get("assignedVariablesText")},getStepWarnings:function(){const{isEmpty:e}=pt,t=this.get("url"),n=this.get("isLink");return{isEmptyLink:e(t)&&n,isAnyDeletedVariable:this.get("isOptionsIncludeDeletedVars")||this.get("isConditionsIncludeDeletedVars"),isUnlinkedMagnets:this.get("isUnlinkedMagnets"),...this.get("warningMessages")||su}},renderWarningMessage:function({offsetY:e}){const t=this.get("isCompare"),n=this.get("isReadOnly"),r={warningHeight:0};if(t||n)return r;const{isEmptyLink:i,isAnyDeletedVariable:o,isUnlinkedMagnets:a,noURLError:s,deletedVariableWarn:l,linkConnectionWarn:u}=this.getStepWarnings();if(!(i||o||a))return r;const c=i?s:o?l:u,f=i?ml:cl,h=i?".error-icon":".warning-icon",{brokenText:d,textHeight:p}=wl(c,{width:230,lineHeight:20});return this.attr({".warning-text":{text:d,title:c,refY:e+20+10},".warning-body":{height:p+35,refY:e+20,fill:f},[h]:{y:e+20+4}}),{warningHeight:p+35}},renderOptions:function(e,t=0){let n=0,r=0;const i={},o=this.getVariablesText(),a=this.get("isCompare");return this.getOptions().forEach(function(s,l){const u=`.option-${s.id}`,c=s.text||"",{brokenText:f,textHeight:h}=wl(c,{width:200,lineHeight:20});i[u]={transform:`translate(0, ${n})`},i[`${u} .option-order-number`]={text:l+1},i[`${u} .option-text`]={text:f,title:s.text,refY:15},n+=30+h;const d=(o?80+e+t:45+e)+lu;(a||!s.shouldRemovePort)&&this.addPort({group:s.group,id:s.id,args:{y:d+r-5,x:280},attrs:{circle:{opacity:s.opacity}}}),r+=h+30}.bind(this)),this.attr(i),{optionsOffset:n??0}},adjustSize:function(e,t=0){const n=this.get("isLink"),r=this.get("isSolution"),i=this.getOptions()||[],o=this.getVariablesText();let a=0;i.forEach(e=>{const t=e.text||"",{textHeight:n}=wl(t,{width:200,lineHeight:20});a+=n});const s=o?80:45,l=30*i.length+(n||r?35:s)+(n||r?25:lu)+e+t+a;this.resize(300,l)},moveBox:function(e){this.position(e.x,e.y)}}),hu=To.extend({renderMarkup(...e){To.prototype.renderMarkup.apply(this,e),this.renderOptions(),this.renderVariables(),this.renderIcons(),this.renderLabels(),this.renderWarningMessage()},renderVariables:function(){this.model.getVariablesText()&&(this.$(".variables").append(hr(this.model.variablesMarkup).node),this.$(".body").parent().append(hr(this.model.variablesIconMarkup).node))},renderWarningMessage:function(){const e=this.model.get("isCompare"),t=this.model.get("isReadOnly");if(e||t)return;const{isEmptyLink:n,isAnyDeletedVariable:r,isUnlinkedMagnets:i}=this.model.getStepWarnings();if(n||r||i){const e=n?"errorIconMarkup":"warningIconMarkup";this.$(".body").parent().append(hr(this.model.warningMessageMarkup).node),this.$(".warning-message").append(hr(this.model[e]).node)}},renderOptions:function(){this.model.getOptions().forEach(function(e){const t=`option-${e.id}`,n=hr(this.model.optionMarkup).addClass(t);n.attr("option-id",e.id),this.$(".options").append(n.node)}.bind(this))},renderIcons:function(){const e=this.model.get("isLink"),t=this.model.get("isCondition"),n=this.model.get("isSolution"),r=this.model.get("isFirstStep"),i=this.model.get("highlightFirstStep"),o=this.model.get("firstStepTitle"),a=this.model.get("firstStepLabel");e?this.$(".body").parent().append(hr(this.model.linkMarkup).node):n?this.$(".body").parent().append(hr(this.model.solutionMarkup).node):t?this.$(".body").parent().append(hr(this.model.conditionMarkup).node):this.$(".body").parent().append(hr(this.model.questionMarkup).node),i&&r&&this.$(".body").parent().append(hr(this.model.initialStepMarkup(o,a)).node)},renderLabels:function(){this.$(".body").parent().append(hr(this.model.labelMarkup).node)}});Object.assign(cu,{qad:{Question:fu,QuestionView:hu},standard:h});const du=()=>{},pu="line/stroke",gu="attrs/circle";function vu({el:e,selectedLink:t,asyncRender:n=!1,onLinkConnect:r=du,onLinkDisconnect:i=du,onStepEdit:o=du,onPaperClick:a=du,onCellMousedDown:s=du,onCellMousedUp:l=du,onMouseEnterElement:u=du,onMouseLeaveElement:c=du,interactive:f,isReadOnly:h=!1,isStatic:d=!1,isCompare:p=!1,isTreeIncludesContextVarsData:g=!1,uncheckedChanges:v,onPan:m=du,highlightFirstStep:y=!1,activeStepId:b,getCurrentVariables:w,currentNodesRef:x,onInvalidConditionsConnecting:k,isSetStepHoverStyles:S,localization:_}){const E=_,C=new xo({},{cellNamespace:cu}),A=new As({el:e,interactive:f,async:n,sorting:As.sorting.APPROX,model:C,height:"auto",width:"100%",linkPinning:!1,multiLinks:!1,clickThreshold:1,gridSize:10,cellViewNamespace:cu,defaultRouter:{name:"manhattan",args:{side:"right",step:10,maximumLoops:100,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 ol({attrs:{line:{stroke:nu.defaultC,strokeWidth:2,targetMarker:{d:"M 13 -7.5 0 0 13 7.5"}}}}),defaultConnectionPoint:{name:"boundary",args:{offset:1}},validateConnection:function(e,t,n){var r,i;if(e===n)return!1;const o=null==(r=null==x?void 0:x.current)?void 0:r.find(({id:t})=>{var n;return t===(null==(n=null==e?void 0:e.model)?void 0:n.id)}),a=null==(i=null==x?void 0:x.current)?void 0:i.find(({id:e})=>{var t;return e===(null==(t=null==n?void 0:n.model)?void 0:t.id)}),s=Sl(o),l=Sl(a);return s&&l&&k?(k(),!1):!n.model.isLink()}});function P(){C.getLinks().forEach(e=>{e.toFront()})}function L(e){var t;const{defaultC:n,selectedC:r}=nu,i=e.model.attr(pu)===r;e.model.attr(pu,i?n:r);const o=e.model.attributes.source.port;null==(t=e.sourceView.model)||t.portProp(o,gu,{stroke:i?n:r}),e.targetView.model.attr(".body/stroke",i?e.targetView.model.attributes.color||n:r)}function T(){t&&(t=null)}return d||function(){function e(e,t){if(t.stopPropagation(),e.model.isLink())return;const n=e.model.id;o(n.toString())}A.on("blank:pointerclick",a),p||(A.on("link:mouseenter",function(e){var n,r;if((null==(n=null==t?void 0:t.model)?void 0:n.id)!==(null==(r=null==e?void 0:e.model)?void 0:r.id)){const t=e.model.attributes.source.port;e.model.attr(pu,nu.hoverC);const n=e.model.getSourceElement();null==n||n.portProp(t,gu,{...ou})}e.model.toFront()}),A.on("link:mouseleave",function(e){var n,r;if((null==(n=null==t?void 0:t.model)?void 0:n.id)!==(null==(r=null==e?void 0:e.model)?void 0:r.id)){const t=e.model.attributes.source.port,n=e.model.getSourceElement();null==n||n.portProp(t,gu,{...au}),e.model.attr(pu,nu.defaultC)}t&&t.model.toFront()})),(f||S)&&(A.on("element:mouseenter",function(e){u(e.model)}),A.on("element:mouseleave",function(e){c(e.model)})),f&&(A.on("link:connect",function(e,t,n){const i=e.model,o=i.source(),a=i.target();"circle"===(null==a?void 0:a.magnet)&&i.target({id:n.model.id});const s=C.getConnectedLinks(i.getSourceElement(),{outbound:!0}).filter(function(e){const t=e.get("source"),n=e.get("target");return t.port===o.port&&n.id!==a.id});s.length>0&&s.forEach(e=>{e.remove()});const l=e.model.attributes.source.port,u=e.model.getSourceElement();null==u||u.portProp(l,gu,{...iu}),r({source:o,target:a})}),A.on("link:disconnect",function(e,n,r){var o;const a=e.model,s=a.source(),l=a.attributes.source.port;r.model.isElement()&&(null==(o=r.model)||o.portProp(l,gu,{...ru})),t&&(L(t),T()),i({source:s})}),A.on("cell:pointermove",function(e){e.model.toFront()}),A.on("cell:pointerdown",function(e){s(e,C)}),A.on("cell:pointerup",function(e,t,n,r){const i=C.getConnectedLinks(e.model,{outbound:!0});null!=i&&i.length&&i.forEach(e=>e.toFront()),l(e,C,t,n,r)}),A.on("link:pointerclick",function(e){if(void 0!==t){if(t&&(t.removeTools(),L(t)),(null==t?void 0:t.model.id)!==e.model.id)return L(e),t=e,void function(e){const t=new Bs({distance:30,action:function(e){this.model.remove({ui:!0}),this.sourceView&&this.notify("link:disconnect",e,this.sourceView,this.sourceMagnet,"source")}}),n=new Us({tools:[t]});e.addTools(n)}(e);T()}}),A.on("link:pointerdblclick",function(e){m(e)})),A.on("cell:pointerdblclick",e),A.on("cell:pointerclick",e)}(),Object.freeze({scaleContentToFit:function(){A.scaleContentToFit({padding:30})},autoLayoutNodes:function(){Ps.layout(C,{setLinkVertices:!1,dagre:ll,graphlib:ul,nodeSep:0,edgeSep:0,rankSep:0,marginX:0,rankDir:"LR",ranker:"network-simplex"})},nodesToJSON:function({nodes:e,buttonsText:t,activeStepId:n}){const{get:r,has:i,isEmpty:o,isEqual:a,some:s}=pt,l=[],u=null==w?void 0:w(),c=!g&&!o(u),d=new Set;return e.forEach(o=>{var m,w,x,k,S,_,C,A,P,L;const T=r(o,"question.answers")||[],N=a(o.type,"Condition"),O=i(o,"url")&&a(o.type,"Link"),M=!i(o,"question.answers")&&!O&&a(o.type,"Solution"),R=kl(o.diffType||(null==(w=null==(m=o.settings)?void 0:m.position)?void 0:w.diffType),v),D=((e,t)=>{switch(e){case"N":return(null==t?void 0:t.addedLabel)||"Added";case"E":return(null==t?void 0:t.changedLabel)||"Changed";case"D":return(null==t?void 0:t.removedLabel)||"Removed";default:return(null==t?void 0:t.noChangesLabel)||"No changes"}})(o.diffType,E.labelsText),j=new Set,I=new Map;let F=!1;const z=T.map(({nextStep:t,title:n,id:r,diffType:i,assignments:a},u)=>{const f=kl((null==t?void 0:t.diffType)||i,v),h=f.label||R.label;c&&null!=a&&a.length&&a.forEach(e=>{j.add(e.variableId)}),g&&null!=a&&a.length&&a.forEach(e=>{I.set(e.variableId,{name:e.variableName||"",isDeleted:e.isDeleted})});const m=t&&(null==o?void 0:o.id)&&s(e,{id:null==t?void 0:t.id});return m&&(d.add(t.id),l.push({id:`${o.id}-${t.id}-${u}`,type:"standard.Link",source:{id:o.id,port:r},target:{id:t.id},attrs:{line:{stroke:p&&(f.strokeColor||R.strokeColor)||nu.defaultC,targetMarker:{d:"M 13 -7.5 0 0 13 7.5"},opacity:f.opacity||1}}})),!m&&!F&&(F=!0),{id:r,text:n,group:p&&h?h:t?"outWithLink":"outWithoutLink",opacity:f.opacity||R.opacity}}),V=kl(null==(x=o.defaultNextStep)?void 0:x.diffType,v),B=V.label||R.label,$=p&&B?B:null!=(k=o.defaultNextStep)&&k.id?"outWithLink":"outWithoutLink",{conditionsConnection:U,isAnyUnlinkedConditions:H}=tu({nodes:e,node:o,variablesPairs:u,isTreeIncludesContextVarsData:g,isCompare:p,defaultOptionColor:V,boxColors:R,uncheckedChanges:v,targetCellsIds:d})||{};null!=U&&U.length&&l.push(...U);const{assignedVariablesText:q,isOptionsIncludeDeletedVars:W}=(({assignedIds:e,variablesPairs:t,deletedVarFlag:n="(Deleted)",assignedVariables:r=[],isTreeIncludesContextVarsData:i,shouldUseVariablesPairs:o})=>{const a=i&&!!r.length,s=o&&!(null==e||!e.length);if(!a&&!s)return;const l=s?((e,t)=>e.reduce((e,n)=>{const r=null==t?void 0:t[n];return r&&e.push(r),e},[]))(e,t):r,u=Xl(l,[e=>!(null==e||!e.isDeleted),e=>e.name]),{varNames:c,isOptionsIncludeDeletedVars:f}=((e,t)=>{const n=[];let r=!1;return e.forEach(e=>{if(e.isDeleted)return n.push(`${e.name} ${t}`),void(r=!0);n.push(e.name)}),{varNames:n,isOptionsIncludeDeletedVars:r}})(u,n);return{assignedVariablesText:c.join(", "),isOptionsIncludeDeletedVars:f}})({assignedIds:[...j],assignedVariables:[...I.values()],isTreeIncludesContextVarsData:g,shouldUseVariablesPairs:c,variablesPairs:u,deletedVarFlag:E.deletedVarFlag})||{};l.push({id:o.id,isFirstStep:o.isFirstStep,url:o.url,type:"qad.Question",question:r(o,"question.title",o.title),isSolution:M,isCondition:N,isLink:O,options:z,interactive:f,color:(null==(S=o.settings)?void 0:S.borderColor)||Zl(o),boxColors:R,isReadOnly:h,isCompare:p,highlightFirstStep:y,labelText:D,firstStepTitle:E.firstStepTitle,firstStepLabel:E.firstStepLabel,warningMessages:E.warningMessages,activeStepId:n||b,position:{x:(null==(C=null==(_=o.settings)?void 0:_.position)?void 0:C.x)||0,y:(null==(P=null==(A=o.settings)?void 0:A.position)?void 0:P.y)||0},bodyTitle:r(t,"bodyTitle")??"Double click to edit",attrs:{".edit-button":{title:r(t,"editButtonTitle")??"Click to edit"}},...N?{conditionDefaultProps:{conditionDefaultTitle:E.conditionDefaultTitle,group:$,opacity:V.opacity||R.opacity},defaultNextStepId:null==(L=null==o?void 0:o.defaultNextStep)?void 0:L.id,..._l({isCompare:p,node:o,containsLabel:E.containsLabel,notContainsLabel:E.notContainsLabel,andOperator:E.andOperator,orOperator:E.orOperator,variablesPairs:u,deletedVarFlag:E.deletedVarFlag,isTreeIncludesContextVarsData:g,uncheckedChanges:v,boxColors:R})}:{},...q&&{assignedVariablesText:q,isOptionsIncludeDeletedVars:W},isUnlinkedMagnets:H||F})}),p||h?{cells:l}:{cells:l.map(e=>e.isFirstStep||d.has(null==e?void 0:e.id)||null!=e&&e.isUnlinkedMagnets?e:{...e,isUnlinkedMagnets:!0})}},fromJSON:function(e,t){A.freeze(),C.resetCells(e.cells),A.unfreeze({batchSize:10,progress:e=>{e&&A.unfreeze()}}),t||P()},resetSelectedLink:T,pushLinksToFront:P,paper:A,graph:C})}!function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".joint-cell{cursor:default}.joint-cell .edit-button{opacity:0;transition:opacity .25s ease}.joint-cell:hover .edit-button{opacity:1}.Graph{display:flex;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}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();const mu=({tree:e,variables:t,conditionDefaultTitle:n="Default",containsLabel:r="Contains",notContainsLabel:i="Doesn't contain",andOperator:o="AND",orOperator:a="OR"})=>{const s=(0,d.useRef)(void 0),l=(0,d.useRef)(void 0),u=(0,d.useRef)(e);return(0,d.useEffect)(()=>{s.current&&(l.current=vu({el:s.current,isStatic:!0,isReadOnly:!0,highlightFirstStep:!0,interactive:!1,getCurrentVariables:()=>{return null==(e=t.map(({id:e,name:t,isDeleted:n})=>({variableId:e,name:t,isDeleted:n})))?void 0:e.reduce((e,t)=>(e[t.variableId]={...t},e),{});var e},localization:{conditionDefaultTitle:n,containsLabel:r,notContainsLabel:i,andOperator:o,orOperator:a,firstStepTitle:"",firstStepLabel:"",deletedVarFlag:""}}),setTimeout(()=>{(e=>{var t,n,r,i;const o=null==(t=null==l?void 0:l.current)?void 0:t.nodesToJSON({nodes:e}),a=0===(null==(n=u.current)?void 0:n.filter(e=>{var t;return null==(t=e.settings)?void 0:t.position}).length);null==(r=null==l?void 0:l.current)||r.fromJSON(o),a&&(null==(i=null==l?void 0:l.current)||i.autoLayoutNodes())})(u.current)},0))},[]),(0,ht.jsx)("div",{"data-interactive":!1,className:"Graph__graph-holder",id:"graph-holder",style:{padding:12},ref:s})};function yu(){return yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yu.apply(null,arguments)}const bu=function(e){var t=e.tree,n=e.variables,r={conditionDefaultTitle:ft.t("pdf-viewer.exportDTPDF.conditionDefaultTitle"),containsLabel:ft.t("pdf-viewer.exportDTPDF.contains"),notContainsLabel:ft.t("pdf-viewer.exportDTPDF.notContains"),andOperator:ft.t("pdf-viewer.exportDTPDF.andOperator"),orOperator:ft.t("pdf-viewer.exportDTPDF.orOperator")};return d.createElement(pe,{i18n:ft},d.createElement(mu,yu({tree:t},r,{variables:n})))};var wu=function(e){var t=e.language,n=e.tree,r=e.variables,i=e.containerSelector,o=void 0===i?"#diagram-container":i,a=document.querySelector(o);t&&ft.changeLanguage(t),p.createRoot(a).render(d.createElement(bu,{tree:n,variables:r},null))}})();var i=window;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();