fastify-swagger
Version:
Serve Swagger/OpenAPI documentation for Fastify, supporting dynamic generation
2 lines • 337 kB
JavaScript
/*! For license information please see swagger-ui-standalone-preset.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(function(){try{return require("esprima")}catch(t){}}()):"function"==typeof define&&define.amd?define(["esprima"],e):"object"==typeof exports?exports.SwaggerUIStandalonePreset=e(function(){try{return require("esprima")}catch(t){}}()):t.SwaggerUIStandalonePreset=e(t.esprima)}(this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist",n(n.s=243)}([function(t,e,n){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function n(t){return u(t)?t:J(t)}function r(t){return s(t)?t:Z(t)}function i(t){return a(t)?t:V(t)}function o(t){return u(t)&&!c(t)?t:X(t)}function u(t){return!(!t||!t[l])}function s(t){return!(!t||!t[p])}function a(t){return!(!t||!t[h])}function c(t){return s(t)||a(t)}function f(t){return!(!t||!t[d])}e(r,n),e(i,n),e(o,n),n.isIterable=u,n.isKeyed=s,n.isIndexed=a,n.isAssociative=c,n.isOrdered=f,n.Keyed=r,n.Indexed=i,n.Set=o;var l="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",y="delete",v=5,g=1<<v,w=g-1,M={},m={value:!1},_={value:!1};function L(t){return t.value=!1,t}function x(t){t&&(t.value=!0)}function b(){}function j(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i<n;i++)r[i]=t[i+e];return r}function N(t){return void 0===t.size&&(t.size=t.__iterate(D)),t.size}function S(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?N(t)+e:e}function D(){return!0}function I(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function A(t,e){return E(t,e,0)}function O(t,e){return E(t,e,e)}function E(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var C=0,T=1,z=2,k="function"==typeof Symbol&&Symbol.iterator,U="@@iterator",Y=k||U;function P(t){this.next=t}function R(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function Q(){return{value:void 0,done:!0}}function F(t){return!!W(t)}function B(t){return t&&"function"==typeof t.next}function G(t){var e=W(t);return e&&e.call(t)}function W(t){var e=t&&(k&&t[k]||t[U]);if("function"==typeof e)return e}function q(t){return t&&"number"==typeof t.length}function J(t){return null==t?ut():u(t)?t.toSeq():ct(t)}function Z(t){return null==t?ut().toKeyedSeq():u(t)?s(t)?t.toSeq():t.fromEntrySeq():st(t)}function V(t){return null==t?ut():u(t)?s(t)?t.entrySeq():t.toIndexedSeq():at(t)}function X(t){return(null==t?ut():u(t)?s(t)?t.entrySeq():t:at(t)).toSetSeq()}P.prototype.toString=function(){return"[Iterator]"},P.KEYS=C,P.VALUES=T,P.ENTRIES=z,P.prototype.inspect=P.prototype.toSource=function(){return this.toString()},P.prototype[Y]=function(){return this},e(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(t,e){return lt(this,t,e,!0)},J.prototype.__iterator=function(t,e){return pt(this,t,e,!0)},e(Z,J),Z.prototype.toKeyedSeq=function(){return this},e(V,J),V.of=function(){return V(arguments)},V.prototype.toIndexedSeq=function(){return this},V.prototype.toString=function(){return this.__toString("Seq [","]")},V.prototype.__iterate=function(t,e){return lt(this,t,e,!1)},V.prototype.__iterator=function(t,e){return pt(this,t,e,!1)},e(X,J),X.of=function(){return X(arguments)},X.prototype.toSetSeq=function(){return this},J.isSeq=ot,J.Keyed=Z,J.Set=X,J.Indexed=V;var H,K,$,tt="@@__IMMUTABLE_SEQ__@@";function et(t){this._array=t,this.size=t.length}function nt(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function rt(t){this._iterable=t,this.size=t.length||t.size}function it(t){this._iterator=t,this._iteratorCache=[]}function ot(t){return!(!t||!t[tt])}function ut(){return H||(H=new et([]))}function st(t){var e=Array.isArray(t)?new et(t).fromEntrySeq():B(t)?new it(t).fromEntrySeq():F(t)?new rt(t).fromEntrySeq():"object"==typeof t?new nt(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function at(t){var e=ft(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function ct(t){var e=ft(t)||"object"==typeof t&&new nt(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function ft(t){return q(t)?new et(t):B(t)?new it(t):F(t)?new rt(t):void 0}function lt(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,u=0;u<=o;u++){var s=i[n?o-u:u];if(!1===e(s[1],r?s[0]:u,t))return u+1}return u}return t.__iterateUncached(e,n)}function pt(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,u=0;return new P((function(){var t=i[n?o-u:u];return u++>o?Q():R(e,r?t[0]:u-1,t[1])}))}return t.__iteratorUncached(e,n)}function ht(t,e){return e?dt(e,t,"",{"":t}):yt(t)}function dt(t,e,n,r){return Array.isArray(e)?t.call(r,n,V(e).map((function(n,r){return dt(t,n,r,e)}))):vt(e)?t.call(r,n,Z(e).map((function(n,r){return dt(t,n,r,e)}))):e}function yt(t){return Array.isArray(t)?V(t).map(yt).toList():vt(t)?Z(t).map(yt).toMap():t}function vt(t){return t&&(t.constructor===Object||void 0===t.constructor)}function gt(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function wt(t,e){if(t===e)return!0;if(!u(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||s(t)!==s(e)||a(t)!==a(e)||f(t)!==f(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!c(t);if(f(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&>(i[1],t)&&(n||gt(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var l=!0,p=e.__iterate((function(e,r){if(n?!t.has(e):i?!gt(e,t.get(r,M)):!gt(t.get(r,M),e))return l=!1,!1}));return l&&t.size===p}function Mt(t,e){if(!(this instanceof Mt))return new Mt(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(K)return K;K=this}}function mt(t,e){if(!t)throw new Error(e)}function _t(t,e,n){if(!(this instanceof _t))return new _t(t,e,n);if(mt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e<t&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if($)return $;$=this}}function Lt(){throw TypeError("Abstract")}function xt(){}function bt(){}function jt(){}J.prototype[tt]=!0,e(et,V),et.prototype.get=function(t,e){return this.has(t)?this._array[S(this,t)]:e},et.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===t(n[e?r-i:i],i,this))return i+1;return i},et.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new P((function(){return i>r?Q():R(t,i,n[e?r-i++:i++])}))},e(nt,Z),nt.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},nt.prototype.has=function(t){return this._object.hasOwnProperty(t)},nt.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var u=r[e?i-o:o];if(!1===t(n[u],u,this))return o+1}return o},nt.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new P((function(){var u=r[e?i-o:o];return o++>i?Q():R(t,u,n[u])}))},nt.prototype[d]=!0,e(rt,V),rt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=G(this._iterable),r=0;if(B(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},rt.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=G(this._iterable);if(!B(n))return new P(Q);var r=0;return new P((function(){var e=n.next();return e.done?e:R(t,r++,e.value)}))},e(it,V),it.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===t(i[o],o++,this))return o;for(;!(n=r.next()).done;){var u=n.value;if(i[o]=u,!1===t(u,o++,this))break}return o},it.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator,r=this._iteratorCache,i=0;return new P((function(){if(i>=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return R(t,i,r[i++])}))},e(Mt,V),Mt.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Mt.prototype.get=function(t,e){return this.has(t)?this._value:e},Mt.prototype.includes=function(t){return gt(this._value,t)},Mt.prototype.slice=function(t,e){var n=this.size;return I(t,e,n)?this:new Mt(this._value,O(e,n)-A(t,n))},Mt.prototype.reverse=function(){return this},Mt.prototype.indexOf=function(t){return gt(this._value,t)?0:-1},Mt.prototype.lastIndexOf=function(t){return gt(this._value,t)?this.size:-1},Mt.prototype.__iterate=function(t,e){for(var n=0;n<this.size;n++)if(!1===t(this._value,n,this))return n+1;return n},Mt.prototype.__iterator=function(t,e){var n=this,r=0;return new P((function(){return r<n.size?R(t,r++,n._value):Q()}))},Mt.prototype.equals=function(t){return t instanceof Mt?gt(this._value,t._value):wt(t)},e(_t,V),_t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},_t.prototype.get=function(t,e){return this.has(t)?this._start+S(this,t)*this._step:e},_t.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},_t.prototype.slice=function(t,e){return I(t,e,this.size)?this:(t=A(t,this.size),(e=O(e,this.size))<=t?new _t(0,0):new _t(this.get(t,this._end),this.get(e,this._end),this._step))},_t.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},_t.prototype.lastIndexOf=function(t){return this.indexOf(t)},_t.prototype.__iterate=function(t,e){for(var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===t(i,o,this))return o+1;i+=e?-r:r}return o},_t.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new P((function(){var u=i;return i+=e?-r:r,o>n?Q():R(t,o++,u)}))},_t.prototype.equals=function(t){return t instanceof _t?this._start===t._start&&this._end===t._end&&this._step===t._step:wt(this,t)},e(Lt,n),e(xt,Lt),e(bt,Lt),e(jt,Lt),Lt.Keyed=xt,Lt.Indexed=bt,Lt.Set=jt;var Nt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function St(t){return t>>>1&1073741824|3221225471&t}function Dt(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!=t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)n^=t/=4294967295;return St(n)}if("string"===e)return t.length>Pt?It(t):At(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return Ot(t);if("function"==typeof t.toString)return At(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function It(t){var e=Ft[t];return void 0===e&&(e=At(t),Qt===Rt&&(Qt=0,Ft={}),Qt++,Ft[t]=e),e}function At(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return St(e)}function Ot(t){var e;if(kt&&void 0!==(e=zt.get(t)))return e;if(void 0!==(e=t[Yt]))return e;if(!Ct){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Yt]))return e;if(void 0!==(e=Tt(t)))return e}if(e=++Ut,1073741824&Ut&&(Ut=0),kt)zt.set(t,e);else{if(void 0!==Et&&!1===Et(t))throw new Error("Non-extensible objects are not allowed as keys.");if(Ct)Object.defineProperty(t,Yt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Yt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Yt]=e}}return e}var Et=Object.isExtensible,Ct=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function Tt(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}var zt,kt="function"==typeof WeakMap;kt&&(zt=new WeakMap);var Ut=0,Yt="__immutablehash__";"function"==typeof Symbol&&(Yt=Symbol(Yt));var Pt=16,Rt=255,Qt=0,Ft={};function Bt(t){mt(t!==1/0,"Cannot perform this action with an infinite size.")}function Gt(t){return null==t?ie():Wt(t)&&!f(t)?t:ie().withMutations((function(e){var n=r(t);Bt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}function Wt(t){return!(!t||!t[Jt])}e(Gt,xt),Gt.of=function(){var e=t.call(arguments,0);return ie().withMutations((function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}}))},Gt.prototype.toString=function(){return this.__toString("Map {","}")},Gt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Gt.prototype.set=function(t,e){return oe(this,t,e)},Gt.prototype.setIn=function(t,e){return this.updateIn(t,M,(function(){return e}))},Gt.prototype.remove=function(t){return oe(this,t,M)},Gt.prototype.deleteIn=function(t){return this.updateIn(t,(function(){return M}))},Gt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Gt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=ve(this,Ln(t),e,n);return r===M?void 0:r},Gt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ie()},Gt.prototype.merge=function(){return pe(this,void 0,arguments)},Gt.prototype.mergeWith=function(e){return pe(this,e,t.call(arguments,1))},Gt.prototype.mergeIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,ie(),(function(t){return"function"==typeof t.merge?t.merge.apply(t,n):n[n.length-1]}))},Gt.prototype.mergeDeep=function(){return pe(this,he,arguments)},Gt.prototype.mergeDeepWith=function(e){var n=t.call(arguments,1);return pe(this,de(e),n)},Gt.prototype.mergeDeepIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,ie(),(function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,n):n[n.length-1]}))},Gt.prototype.sort=function(t){return Fe(ln(this,t))},Gt.prototype.sortBy=function(t,e){return Fe(ln(this,e,t))},Gt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Gt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new b)},Gt.prototype.asImmutable=function(){return this.__ensureOwner()},Gt.prototype.wasAltered=function(){return this.__altered},Gt.prototype.__iterator=function(t,e){return new te(this,t,e)},Gt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate((function(e){return r++,t(e[1],e[0],n)}),e),r},Gt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?re(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Gt.isMap=Wt;var qt,Jt="@@__IMMUTABLE_MAP__@@",Zt=Gt.prototype;function Vt(t,e){this.ownerID=t,this.entries=e}function Xt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Ht(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function Kt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function $t(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function te(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&ne(t._root)}function ee(t,e){return R(t,e[0],e[1])}function ne(t,e){return{node:t,index:0,__prev:e}}function re(t,e,n,r){var i=Object.create(Zt);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function ie(){return qt||(qt=re(0))}function oe(t,e,n){var r,i;if(t._root){var o=L(m),u=L(_);if(r=ue(t._root,t.__ownerID,0,void 0,e,n,o,u),!u.value)return t;i=t.size+(o.value?n===M?-1:1:0)}else{if(n===M)return t;i=1,r=new Vt(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?re(i,r):ie()}function ue(t,e,n,r,i,o,u,s){return t?t.update(e,n,r,i,o,u,s):o===M?t:(x(s),x(u),new $t(e,r,[i,o]))}function se(t){return t.constructor===$t||t.constructor===Kt}function ae(t,e,n,r,i){if(t.keyHash===r)return new Kt(e,r,[t.entry,i]);var o,u=(0===n?t.keyHash:t.keyHash>>>n)&w,s=(0===n?r:r>>>n)&w;return new Xt(e,1<<u|1<<s,u===s?[ae(t,e,n+v,r,i)]:(o=new $t(e,r,i),u<s?[t,o]:[o,t]))}function ce(t,e,n,r){t||(t=new b);for(var i=new $t(t,Dt(n),[n,r]),o=0;o<e.length;o++){var u=e[o];i=i.update(t,0,void 0,u[0],u[1])}return i}function fe(t,e,n,r){for(var i=0,o=0,u=new Array(n),s=0,a=1,c=e.length;s<c;s++,a<<=1){var f=e[s];void 0!==f&&s!==r&&(i|=a,u[o++]=f)}return new Xt(t,i,u)}function le(t,e,n,r,i){for(var o=0,u=new Array(g),s=0;0!==n;s++,n>>>=1)u[s]=1&n?e[o++]:void 0;return u[r]=i,new Ht(t,o+1,u)}function pe(t,e,n){for(var i=[],o=0;o<n.length;o++){var s=n[o],a=r(s);u(s)||(a=a.map((function(t){return ht(t)}))),i.push(a)}return ye(t,e,i)}function he(t,e,n){return t&&t.mergeDeep&&u(e)?t.mergeDeep(e):gt(t,e)?t:e}function de(t){return function(e,n,r){if(e&&e.mergeDeepWith&&u(n))return e.mergeDeepWith(t,n);var i=t(e,n,r);return gt(e,i)?e:i}}function ye(t,e,n){return 0===(n=n.filter((function(t){return 0!==t.size}))).length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations((function(t){for(var r=e?function(n,r){t.update(r,M,(function(t){return t===M?n:e(t,n,r)}))}:function(e,n){t.set(n,e)},i=0;i<n.length;i++)n[i].forEach(r)})):t.constructor(n[0])}function ve(t,e,n,r){var i=t===M,o=e.next();if(o.done){var u=i?n:t,s=r(u);return s===u?t:s}mt(i||t&&t.set,"invalid keyPath");var a=o.value,c=i?M:t.get(a,M),f=ve(c,e,n,r);return f===c?t:f===M?t.remove(a):(i?ie():t).set(a,f)}function ge(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function we(t,e,n,r){var i=r?t:j(t);return i[e]=n,i}function Me(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),u=0,s=0;s<i;s++)s===e?(o[s]=n,u=-1):o[s]=t[s+u];return o}function me(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,u=0;u<r;u++)u===e&&(o=1),i[u]=t[u+o];return i}Zt[Jt]=!0,Zt[y]=Zt.remove,Zt.removeIn=Zt.deleteIn,Vt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(gt(n,i[o][0]))return i[o][1];return r},Vt.prototype.update=function(t,e,n,r,i,o,u){for(var s=i===M,a=this.entries,c=0,f=a.length;c<f&&!gt(r,a[c][0]);c++);var l=c<f;if(l?a[c][1]===i:s)return this;if(x(u),(s||!l)&&x(o),!s||1!==a.length){if(!l&&!s&&a.length>=_e)return ce(t,a,r,i);var p=t&&t===this.ownerID,h=p?a:j(a);return l?s?c===f-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),p?(this.entries=h,this):new Vt(t,h)}},Xt.prototype.get=function(t,e,n,r){void 0===e&&(e=Dt(n));var i=1<<((0===t?e:e>>>t)&w),o=this.bitmap;return 0==(o&i)?r:this.nodes[ge(o&i-1)].get(t+v,e,n,r)},Xt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=Dt(r));var s=(0===e?n:n>>>e)&w,a=1<<s,c=this.bitmap,f=0!=(c&a);if(!f&&i===M)return this;var l=ge(c&a-1),p=this.nodes,h=f?p[l]:void 0,d=ue(h,t,e+v,n,r,i,o,u);if(d===h)return this;if(!f&&d&&p.length>=Le)return le(t,p,c,s,d);if(f&&!d&&2===p.length&&se(p[1^l]))return p[1^l];if(f&&d&&1===p.length&&se(d))return d;var y=t&&t===this.ownerID,g=f?d?c:c^a:c|a,m=f?d?we(p,l,d,y):me(p,l,y):Me(p,l,d,y);return y?(this.bitmap=g,this.nodes=m,this):new Xt(t,g,m)},Ht.prototype.get=function(t,e,n,r){void 0===e&&(e=Dt(n));var i=(0===t?e:e>>>t)&w,o=this.nodes[i];return o?o.get(t+v,e,n,r):r},Ht.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=Dt(r));var s=(0===e?n:n>>>e)&w,a=i===M,c=this.nodes,f=c[s];if(a&&!f)return this;var l=ue(f,t,e+v,n,r,i,o,u);if(l===f)return this;var p=this.count;if(f){if(!l&&--p<xe)return fe(t,c,p,s)}else p++;var h=t&&t===this.ownerID,d=we(c,s,l,h);return h?(this.count=p,this.nodes=d,this):new Ht(t,p,d)},Kt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(gt(n,i[o][0]))return i[o][1];return r},Kt.prototype.update=function(t,e,n,r,i,o,u){void 0===n&&(n=Dt(r));var s=i===M;if(n!==this.keyHash)return s?this:(x(u),x(o),ae(this,t,e,n,[r,i]));for(var a=this.entries,c=0,f=a.length;c<f&&!gt(r,a[c][0]);c++);var l=c<f;if(l?a[c][1]===i:s)return this;if(x(u),(s||!l)&&x(o),s&&2===f)return new $t(t,this.keyHash,a[1^c]);var p=t&&t===this.ownerID,h=p?a:j(a);return l?s?c===f-1?h.pop():h[c]=h.pop():h[c]=[r,i]:h.push([r,i]),p?(this.entries=h,this):new Kt(t,this.keyHash,h)},$t.prototype.get=function(t,e,n,r){return gt(n,this.entry[0])?this.entry[1]:r},$t.prototype.update=function(t,e,n,r,i,o,u){var s=i===M,a=gt(r,this.entry[0]);return(a?i===this.entry[1]:s)?this:(x(u),s?void x(o):a?t&&t===this.ownerID?(this.entry[1]=i,this):new $t(t,this.keyHash,[r,i]):(x(o),ae(this,t,e,Dt(r),[r,i])))},Vt.prototype.iterate=Kt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===t(n[e?i-r:r]))return!1},Xt.prototype.iterate=Ht.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[e?i-r:r];if(o&&!1===o.iterate(t,e))return!1}},$t.prototype.iterate=function(t,e){return t(this.entry)},e(te,P),te.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return ee(t,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return ee(t,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return ee(t,o.entry);e=this._stack=ne(o,e)}continue}e=this._stack=this._stack.__prev}return Q()};var _e=g/4,Le=g/2,xe=g/4;function be(t){var e=Te();if(null==t)return e;if(je(t))return t;var n=i(t),r=n.size;return 0===r?e:(Bt(r),r>0&&r<g?Ce(0,r,v,null,new De(n.toArray())):e.withMutations((function(t){t.setSize(r),n.forEach((function(e,n){return t.set(n,e)}))})))}function je(t){return!(!t||!t[Ne])}e(be,bt),be.of=function(){return this(arguments)},be.prototype.toString=function(){return this.__toString("List [","]")},be.prototype.get=function(t,e){if((t=S(this,t))>=0&&t<this.size){var n=Ye(this,t+=this._origin);return n&&n.array[t&w]}return e},be.prototype.set=function(t,e){return ze(this,t,e)},be.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},be.prototype.insert=function(t,e){return this.splice(t,0,e)},be.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=v,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Te()},be.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){Pe(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])}))},be.prototype.pop=function(){return Pe(this,0,-1)},be.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){Pe(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])}))},be.prototype.shift=function(){return Pe(this,1)},be.prototype.merge=function(){return Re(this,void 0,arguments)},be.prototype.mergeWith=function(e){return Re(this,e,t.call(arguments,1))},be.prototype.mergeDeep=function(){return Re(this,he,arguments)},be.prototype.mergeDeepWith=function(e){var n=t.call(arguments,1);return Re(this,de(e),n)},be.prototype.setSize=function(t){return Pe(this,0,t)},be.prototype.slice=function(t,e){var n=this.size;return I(t,e,n)?this:Pe(this,A(t,n),O(e,n))},be.prototype.__iterator=function(t,e){var n=0,r=Ee(this,e);return new P((function(){var e=r();return e===Oe?Q():R(t,n++,e)}))},be.prototype.__iterate=function(t,e){for(var n,r=0,i=Ee(this,e);(n=i())!==Oe&&!1!==t(n,r++,this););return r},be.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ce(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},be.isList=je;var Ne="@@__IMMUTABLE_LIST__@@",Se=be.prototype;function De(t,e){this.array=t,this.ownerID=e}Se[Ne]=!0,Se[y]=Se.remove,Se.setIn=Zt.setIn,Se.deleteIn=Se.removeIn=Zt.removeIn,Se.update=Zt.update,Se.updateIn=Zt.updateIn,Se.mergeIn=Zt.mergeIn,Se.mergeDeepIn=Zt.mergeDeepIn,Se.withMutations=Zt.withMutations,Se.asMutable=Zt.asMutable,Se.asImmutable=Zt.asImmutable,Se.wasAltered=Zt.wasAltered,De.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&w;if(r>=this.array.length)return new De([],t);var i,o=0===r;if(e>0){var u=this.array[r];if((i=u&&u.removeBefore(t,e-v,n))===u&&o)return this}if(o&&!i)return this;var s=Ue(this,t);if(!o)for(var a=0;a<r;a++)s.array[a]=void 0;return i&&(s.array[r]=i),s},De.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r,i=n-1>>>e&w;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((r=o&&o.removeAfter(t,e-v,n))===o&&i===this.array.length-1)return this}var u=Ue(this,t);return u.array.splice(i+1),r&&(u.array[i]=r),u};var Ie,Ae,Oe={};function Ee(t,e){var n=t._origin,r=t._capacity,i=Qe(r),o=t._tail;return u(t._root,t._level,0);function u(t,e,n){return 0===e?s(t,n):a(t,e,n)}function s(t,u){var s=u===i?o&&o.array:t&&t.array,a=u>n?0:n-u,c=r-u;return c>g&&(c=g),function(){if(a===c)return Oe;var t=e?--c:a++;return s&&s[t]}}function a(t,i,o){var s,a=t&&t.array,c=o>n?0:n-o>>i,f=1+(r-o>>i);return f>g&&(f=g),function(){for(;;){if(s){var t=s();if(t!==Oe)return t;s=null}if(c===f)return Oe;var n=e?--f:c++;s=u(a&&a[n],i-v,o+(n<<i))}}}}function Ce(t,e,n,r,i,o,u){var s=Object.create(Se);return s.size=e-t,s._origin=t,s._capacity=e,s._level=n,s._root=r,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function Te(){return Ie||(Ie=Ce(0,0,v))}function ze(t,e,n){if((e=S(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?Pe(t,e).set(0,n):Pe(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o=L(_);return e>=Qe(t._capacity)?r=ke(r,t.__ownerID,0,e,n,o):i=ke(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Ce(t._origin,t._capacity,t._level,i,r):t}function ke(t,e,n,r,i,o){var u,s=r>>>n&w,a=t&&s<t.array.length;if(!a&&void 0===i)return t;if(n>0){var c=t&&t.array[s],f=ke(c,e,n-v,r,i,o);return f===c?t:((u=Ue(t,e)).array[s]=f,u)}return a&&t.array[s]===i?t:(x(o),u=Ue(t,e),void 0===i&&s===u.array.length-1?u.array.pop():u.array[s]=i,u)}function Ue(t,e){return e&&t&&e===t.ownerID?t:new De(t?t.array.slice():[],e)}function Ye(t,e){if(e>=Qe(t._capacity))return t._tail;if(e<1<<t._level+v){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&w],r-=v;return n}}function Pe(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new b,i=t._origin,o=t._capacity,u=i+e,s=void 0===n?o:n<0?o+n:i+n;if(u===i&&s===o)return t;if(u>=s)return t.clear();for(var a=t._level,c=t._root,f=0;u+f<0;)c=new De(c&&c.array.length?[void 0,c]:[],r),f+=1<<(a+=v);f&&(u+=f,i+=f,s+=f,o+=f);for(var l=Qe(o),p=Qe(s);p>=1<<a+v;)c=new De(c&&c.array.length?[c]:[],r),a+=v;var h=t._tail,d=p<l?Ye(t,s-1):p>l?new De([],r):h;if(h&&p>l&&u<o&&h.array.length){for(var y=c=Ue(c,r),g=a;g>v;g-=v){var M=l>>>g&w;y=y.array[M]=Ue(y.array[M],r)}y.array[l>>>v&w]=h}if(s<o&&(d=d&&d.removeAfter(r,0,s)),u>=p)u-=p,s-=p,a=v,c=null,d=d&&d.removeBefore(r,0,u);else if(u>i||p<l){for(f=0;c;){var m=u>>>a&w;if(m!==p>>>a&w)break;m&&(f+=(1<<a)*m),a-=v,c=c.array[m]}c&&u>i&&(c=c.removeBefore(r,a,u-f)),c&&p<l&&(c=c.removeAfter(r,a,p-f)),f&&(u-=f,s-=f)}return t.__ownerID?(t.size=s-u,t._origin=u,t._capacity=s,t._level=a,t._root=c,t._tail=d,t.__hash=void 0,t.__altered=!0,t):Ce(u,s,a,c,d)}function Re(t,e,n){for(var r=[],o=0,s=0;s<n.length;s++){var a=n[s],c=i(a);c.size>o&&(o=c.size),u(a)||(c=c.map((function(t){return ht(t)}))),r.push(c)}return o>t.size&&(t=t.setSize(o)),ye(t,e,r)}function Qe(t){return t<g?0:t-1>>>v<<v}function Fe(t){return null==t?We():Be(t)?t:We().withMutations((function(e){var n=r(t);Bt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}function Be(t){return Wt(t)&&f(t)}function Ge(t,e,n,r){var i=Object.create(Fe.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function We(){return Ae||(Ae=Ge(ie(),Te()))}function qe(t,e,n){var r,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(n===M){if(!a)return t;u.size>=g&&u.size>=2*o.size?(r=(i=u.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(n===u.get(s)[1])return t;r=o,i=u.set(s,[e,n])}else r=o.set(e,u.size),i=u.set(u.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Ge(r,i)}function Je(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function Ze(t){this._iter=t,this.size=t.size}function Ve(t){this._iter=t,this.size=t.size}function Xe(t){this._iter=t,this.size=t.size}function He(t){var e=Mn(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=mn,e.__iterateUncached=function(e,n){var r=this;return t.__iterate((function(t,n){return!1!==e(n,t,r)}),n)},e.__iteratorUncached=function(e,n){if(e===z){var r=t.__iterator(e,n);return new P((function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(e===T?C:T,n)},e}function Ke(t,e,n){var r=Mn(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,M);return o===M?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate((function(t,i,u){return!1!==r(e.call(n,t,i,u),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(z,i);return new P((function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return R(r,s,e.call(n,u[1],s,t),i)}))},r}function $e(t,e){var n=Mn(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=He(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=mn,n.__iterate=function(e,n){var r=this;return t.__iterate((function(t,n){return e(t,n,r)}),!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function tn(t,e,n,r){var i=Mn(t);return r&&(i.has=function(r){var i=t.get(r,M);return i!==M&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,M);return o!==M&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate((function(t,o,a){if(e.call(n,t,o,a))return s++,i(t,r?o:s-1,u)}),o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(z,o),s=0;return new P((function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,c=a[0],f=a[1];if(e.call(n,f,c,t))return R(i,r?c:s++,f,o)}}))},i}function en(t,e,n){var r=Gt().asMutable();return t.__iterate((function(i,o){r.update(e.call(n,i,o,t),0,(function(t){return t+1}))})),r.asImmutable()}function nn(t,e,n){var r=s(t),i=(f(t)?Fe():Gt()).asMutable();t.__iterate((function(o,u){i.update(e.call(n,o,u,t),(function(t){return(t=t||[]).push(r?[u,o]:o),t}))}));var o=wn(t);return i.map((function(e){return yn(t,o(e))}))}function rn(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=i:n|=0),I(e,n,i))return t;var o=A(e,i),u=O(n,i);if(o!=o||u!=u)return rn(t.toSeq().cacheResult(),e,n,r);var s,a=u-o;a==a&&(s=a<0?0:a);var c=Mn(t);return c.size=0===s?s:t.size&&s||void 0,!r&&ot(t)&&s>=0&&(c.get=function(e,n){return(e=S(this,e))>=0&&e<s?t.get(e+o,n):n}),c.__iterateUncached=function(e,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(e,n);var u=0,a=!0,c=0;return t.__iterate((function(t,n){if(!a||!(a=u++<o))return c++,!1!==e(t,r?n:c-1,i)&&c!==s})),c},c.__iteratorUncached=function(e,n){if(0!==s&&n)return this.cacheResult().__iterator(e,n);var i=0!==s&&t.__iterator(e,n),u=0,a=0;return new P((function(){for(;u++<o;)i.next();if(++a>s)return Q();var t=i.next();return r||e===T?t:R(e,a-1,e===C?void 0:t.value[1],t)}))},c}function on(t,e,n){var r=Mn(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var u=0;return t.__iterate((function(t,i,s){return e.call(n,t,i,s)&&++u&&r(t,i,o)})),u},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var u=t.__iterator(z,i),s=!0;return new P((function(){if(!s)return Q();var t=u.next();if(t.done)return t;var i=t.value,a=i[0],c=i[1];return e.call(n,c,a,o)?r===z?t:R(r,a,c,t):(s=!1,Q())}))},r}function un(t,e,n,r){var i=Mn(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(n,t,o,c)))return a++,i(t,r?o:a-1,u)})),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(z,o),a=!0,c=0;return new P((function(){var t,o,f;do{if((t=s.next()).done)return r||i===T?t:R(i,c++,i===C?void 0:t.value[1],t);var l=t.value;o=l[0],f=l[1],a&&(a=e.call(n,f,o,u))}while(a);return i===z?t:R(i,o,f,t)}))},i}function sn(t,e){var n=s(t),i=[t].concat(e).map((function(t){return u(t)?n&&(t=r(t)):t=n?st(t):at(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===i.length)return t;if(1===i.length){var o=i[0];if(o===t||n&&s(o)||a(t)&&a(o))return o}var c=new et(i);return n?c=c.toKeyedSeq():a(t)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),c}function an(t,e,n){var r=Mn(t);return r.__iterateUncached=function(r,i){var o=0,s=!1;function a(t,c){var f=this;t.__iterate((function(t,i){return(!e||c<e)&&u(t)?a(t,c+1):!1===r(t,n?i:o++,f)&&(s=!0),!s}),i)}return a(t,0),o},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),s=[],a=0;return new P((function(){for(;o;){var t=o.next();if(!1===t.done){var c=t.value;if(r===z&&(c=c[1]),e&&!(s.length<e)||!u(c))return n?t:R(r,a++,c,t);s.push(o),o=c.__iterator(r,i)}else o=s.pop()}return Q()}))},r}function cn(t,e,n){var r=wn(t);return t.toSeq().map((function(i,o){return r(e.call(n,i,o,t))})).flatten(!0)}function fn(t,e){var n=Mn(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return t.__iterate((function(t,r){return(!o||!1!==n(e,o++,i))&&!1!==n(t,o++,i)}),r),o},n.__iteratorUncached=function(n,r){var i,o=t.__iterator(T,r),u=0;return new P((function(){return(!i||u%2)&&(i=o.next()).done?i:u%2?R(n,u++,e):R(n,u++,i.value,i)}))},n}function ln(t,e,n){e||(e=_n);var r=s(t),i=0,o=t.toSeq().map((function(e,r){return[r,e,i++,n?n(e,r,t):e]})).toArray();return o.sort((function(t,n){return e(t[3],n[3])||t[2]-n[2]})).forEach(r?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),r?Z(o):a(t)?V(o):X(o)}function pn(t,e,n){if(e||(e=_n),n){var r=t.toSeq().map((function(e,r){return[e,n(e,r,t)]})).reduce((function(t,n){return hn(e,t[1],n[1])?n:t}));return r&&r[0]}return t.reduce((function(t,n){return hn(e,t,n)?n:t}))}function hn(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(null==n||n!=n)||r>0}function dn(t,e,r){var i=Mn(t);return i.size=new et(r).map((function(t){return t.size})).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(T,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=n(t),G(i?t.reverse():t)})),u=0,s=!1;return new P((function(){var n;return s||(n=o.map((function(t){return t.next()})),s=n.some((function(t){return t.done}))),s?Q():R(t,u++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function yn(t,e){return ot(t)?e:t.constructor(e)}function vn(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function gn(t){return Bt(t.size),N(t)}function wn(t){return s(t)?r:a(t)?i:o}function Mn(t){return Object.create((s(t)?Z:a(t)?V:X).prototype)}function mn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function _n(t,e){return t>e?1:t<e?-1:0}function Ln(t){var e=G(t);if(!e){if(!q(t))throw new TypeError("Expected iterable or array-like: "+t);e=G(n(t))}return e}function xn(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var u=Object.keys(t);Sn(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Gt(o)},i=r.prototype=Object.create(bn);return i.constructor=r,r}e(Fe,Gt),Fe.of=function(){return this(arguments)},Fe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Fe.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):We()},Fe.prototype.set=function(t,e){return qe(this,t,e)},Fe.prototype.remove=function(t){return qe(this,t,M)},Fe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Fe.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},Fe.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Fe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Ge(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Fe.isOrderedMap=Be,Fe.prototype[d]=!0,Fe.prototype[y]=Fe.prototype.remove,e(Je,Z),Je.prototype.get=function(t,e){return this._iter.get(t,e)},Je.prototype.has=function(t){return this._iter.has(t)},Je.prototype.valueSeq=function(){return this._iter.valueSeq()},Je.prototype.reverse=function(){var t=this,e=$e(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},Je.prototype.map=function(t,e){var n=this,r=Ke(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},Je.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?gn(this):0,function(i){return t(i,e?--n:n++,r)}),e)},Je.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(T,e),r=e?gn(this):0;return new P((function(){var i=n.next();return i.done?i:R(t,e?--r:r++,i.value,i)}))},Je.prototype[d]=!0,e(Ze,V),Ze.prototype.includes=function(t){return this._iter.includes(t)},Ze.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate((function(e){return t(e,r++,n)}),e)},Ze.prototype.__iterator=function(t,e){var n=this._iter.__iterator(T,e),r=0;return new P((function(){var e=n.next();return e.done?e:R(t,r++,e.value,e)}))},e(Ve,X),Ve.prototype.has=function(t){return this._iter.includes(t)},Ve.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){return t(e,e,n)}),e)},Ve.prototype.__iterator=function(t,e){var n=this._iter.__iterator(T,e);return new P((function(){var e=n.next();return e.done?e:R(t,e.value,e.value,e)}))},e(Xe,Z),Xe.prototype.entrySeq=function(){return this._iter.toSeq()},Xe.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){if(e){vn(e);var r=u(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}}),e)},Xe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(T,e);return new P((function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){vn(r);var i=u(r);return R(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}}))},Ze.prototype.cacheResult=Je.prototype.cacheResult=Ve.prototype.cacheResult=Xe.prototype.cacheResult=mn,e(xn,xt),xn.prototype.toString=function(){return this.__toString(Nn(this)+" {","}")},xn.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},xn.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},xn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=jn(this,ie()))},xn.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Nn(this));if(this._map&&!this._map.has(t)&&e===this._defaultValues[t])return this;var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:jn(this,n)},xn.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:jn(this,e)},xn.prototype.wasAltered=function(){return this._map.wasAltered()},xn.prototype.__iterator=function(t,e){var n=this;return r(this._defaultValues).map((function(t,e){return n.get(e)})).__iterator(t,e)},xn.prototype.__iterate=function(t,e){var n=this;return r(this._defaultValues).map((function(t,e){return n.get(e)})).__iterate(t,e)},xn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?jn(this,e,t):(this.__ownerID=t,this._map=e,this)};var bn=xn.prototype;function jn(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Nn(t){return t._name||t.constructor.name||"Record"}function Sn(t,e){try{e.forEach(Dn.bind(void 0,t))}catch(t){}}function Dn(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){mt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function In(t){return null==t?kn():An(t)&&!f(t)?t:kn().withMutations((function(e){var n=o(t);Bt(n.size),n.forEach((function(t){return e.add(t)}))}))}function An(t){return!(!t||!t[En])}bn[y]=bn.remove,bn.deleteIn=bn.removeIn=Zt.removeIn,bn.merge=Zt.merge,bn.mergeWith=Zt.mergeWith,bn.mergeIn=Zt.mergeIn,bn.mergeDeep=Zt.mergeDeep,bn.mergeDeepWith=Zt.mergeDeepWith,bn.mergeDeepIn=Zt.mergeDeepIn,bn.setIn=Zt.setIn,bn.update=Zt.update,bn.updateIn=Zt.updateIn,bn.withMutations=Zt.withMutations,bn.asMutable=Zt.asMutable,bn.asImmutable=Zt.asImmutable,e(In,jt),In.of=function(){return this(arguments)},In.fromKeys=function(t){return this(r(t).keySeq())},In.prototype.toString=function(){return this.__toString("Set {","}")},In.prototype.has=function(t){return this._map.has(t)},In.prototype.add=function(t){return Tn(this,this._map.set(t,!0))},In.prototype.remove=function(t){return Tn(this,this._map.remove(t))},In.prototype.clear=function(){return Tn(this,this._map.clear())},In.prototype.union=function(){var e=t.call(arguments,0);return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(t){for(var n=0;n<e.length;n++)o(e[n]).forEach((function(e){return t.add(e)}))})):this.constructor(e[0])},In.prototype.intersect=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return o(t)}));var n=this;return this.withMutations((function(t){n.forEach((function(n){e.every((function(t){return t.includes(n)}))||t.remove(n)}))}))},In.prototype.subtract=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return o(t)}));var n=this;return this.withMutations((function(t){n.forEach((function(n){e.some((function(t){return t.includes(n)}))&&t.remove(n)}))}))},In.prototype.merge=function(){return this.union.apply(this,arguments)},In.prototype.mergeWith=function(e){var n=t.call(arguments,1);return this.union.apply(this,n)},In.prototype.sort=function(t){return Un(ln(this,t))},In.prototype.sortBy=function(t,e){return Un(ln(this,e,t))},In.prototype.wasAltered=function(){return this._map.wasAltered()},In.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate((function(e,r){return t(r,r,n)}),e)},In.prototype.__iterator=function(t,e){return this._map.map((function(t,e){return e})).__iterator(t,e)},In.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},In.isSet=An;var On,En="@@__IMMUTABLE_SET__@@",Cn=In.prototype;function Tn(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function zn(t,e){var n=Object.create(Cn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function kn(){return On||(On=zn(ie()))}function Un(t){return null==t?Fn():Yn(t)?t:Fn().withMutations((function(e){var n=o(t);Bt(n.size),n.forEach((function(t){return e.add(t)}))}))}function Yn(t){return An(t)&&f(t)}Cn[En]=!0,Cn[y]=Cn.remove,Cn.mergeDeep=Cn.merge,Cn.mergeDeepWith=Cn.mergeWith,Cn.withMutations=Zt.withMutations,Cn.asMutable=Zt.asMutable,Cn.asImmutable=Zt.asImmutable,Cn.__empty=kn,Cn.__make=zn,e(Un,In),Un.of=function(){return this(arguments)},Un.fromKeys=function(t){return this(r(t).keySeq())},Un.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Un.isOrderedSet=Yn;var Pn,Rn=Un.prototype;function Qn(t,e){var n=Object.create(Rn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Fn(){return Pn||(Pn=Qn(We()))}function Bn(t){return null==t?Vn():Gn(t)?t:Vn().unshiftAll(t)}function Gn(t){return!(!t||!t[qn])}Rn[d]=!0,Rn.__empty=Fn,Rn.__make=Qn,e(Bn,bt),Bn.of=function(){return this(arguments)},Bn.prototype.toString=function(){return this.__toString("Stack [","]")},Bn.prototype.get=function(t,e){var n=this._head;for(t=S(this,t);n&&t--;)n=n.next;return n?n.value:e},Bn.prototype.peek=function(){return this._head&&this._head.value},Bn.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Zn(t,e)},Bn.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;Bt(t.size);var e=this.size,n=this._head;return t.reverse().forEach((function(t){e++,n={value:t,next:n}})),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Zn(e,n)},Bn.prototype.pop=function(){return this.slice(1)},Bn.prototype.unshift=function(){return this.push.apply(this,arguments)},Bn.prototype.unshiftAll=function(t){return this.pushAll(t)},Bn.prototype.shift=function(){return this.pop.apply(this,arguments)},Bn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Vn()},Bn.prototype.slice=function(t,e){if(I(t,e,this.size))return this;var n=A(t,this.size);if(O(e,this.size)!==this.size)return bt.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Zn(r,i)},Bn.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Zn(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Bn.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},Bn.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new P((function(){if(r){var e=r.value;return r=r.next,R(t,n++,e)}return Q()}))},Bn.isStack=Gn;var Wn,qn="@@__IMMUTABLE_STACK__@@",Jn=Bn.prototype;function Zn(t,e,n,r){var i=Object.create(Jn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Vn(){return Wn||(Wn=Zn(0))}function Xn(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}Jn[qn]=!0,Jn.withMutations=Zt.withMutations,Jn.asMutable=Zt.asMutable,Jn.asImmutable=Zt.asImmutable,Jn.wasAltered=Zt.wasAltered,n.Iterator=P,Xn(n,{toArray:function(){Bt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate((function(e,n){t[n]=e})),t},toIndexedSeq:function(){return new Ze(this)},toJS:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJS?t.toJS():t})).__toJS()},toJSON:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t})).__toJS()},toKeyedSeq:function(){return new Je(this,!0)},toMap:function(){return Gt(this.toKeyedSeq())},toObject:function(){Bt(this.size);var t={};return this.__iterate((function(e,n){t[n]=e})),t},toOrderedMap:function(){return Fe(this.toKeyedSeq())},toOrderedSet:function(){return Un(s(this)?this.valueSeq():this)},toSet:function(){return In(s(this)?this.value