/*! For license information please see 2.8ee1f069.chunk.js.LICENSE.txt */ (this.webpackJsonpweb=this.webpackJsonpweb||[]).push([[2],[function(e,t,n){"use strict";n.d(t,"S",(function(){return E})),n.d(t,"x",(function(){return x})),n.d(t,"R",(function(){return D})),n.d(t,"w",(function(){return C})),n.d(t,"N",(function(){return w})),n.d(t,"u",(function(){return S})),n.d(t,"H",(function(){return k})),n.d(t,"o",(function(){return A})),n.d(t,"T",(function(){return T})),n.d(t,"y",(function(){return _})),n.d(t,"E",(function(){return O})),n.d(t,"l",(function(){return F})),n.d(t,"F",(function(){return N})),n.d(t,"m",(function(){return I})),n.d(t,"J",(function(){return M})),n.d(t,"q",(function(){return j})),n.d(t,"L",(function(){return P})),n.d(t,"s",(function(){return L})),n.d(t,"G",(function(){return R})),n.d(t,"n",(function(){return B})),n.d(t,"O",(function(){return U})),n.d(t,"v",(function(){return z})),n.d(t,"I",(function(){return V})),n.d(t,"p",(function(){return q})),n.d(t,"D",(function(){return H})),n.d(t,"k",(function(){return W})),n.d(t,"C",(function(){return G})),n.d(t,"j",(function(){return K})),n.d(t,"d",(function(){return J})),n.d(t,"e",(function(){return Q})),n.d(t,"U",(function(){return Y})),n.d(t,"z",(function(){return X})),n.d(t,"M",(function(){return $})),n.d(t,"t",(function(){return Z})),n.d(t,"B",(function(){return ee})),n.d(t,"K",(function(){return te})),n.d(t,"r",(function(){return ne})),n.d(t,"A",(function(){return re})),n.d(t,"g",(function(){return ae})),n.d(t,"f",(function(){return se})),n.d(t,"i",(function(){return fe})),n.d(t,"P",(function(){return de})),n.d(t,"c",(function(){return he})),n.d(t,"h",(function(){return me})),n.d(t,"a",(function(){return ve})),n.d(t,"b",(function(){return ye})),n.d(t,"Q",(function(){return Ee}));var r=n(42),i=n(3),o=n(31),a=n(47),s=n(35),u=n(8),c=n(27),l=n(44),p=n(24);function f(e){return e}var d=n(40),h=n(39),m=n(1),g=n(195);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t0?e:void 0}J.prototype.toString=function(){return"["+String(this.ofType)+"]"},Object(h.a)(J),Object(d.a)(J),Q.prototype.toString=function(){return String(this.ofType)+"!"},Object(h.a)(Q),Object(d.a)(Q);var ae=function(){function e(e){var t=e.parseValue||f;this.name=e.name,this.description=e.description,this.serialize=e.serialize||f,this.parseValue=t,this.parseLiteral=e.parseLiteral||function(e){return t(Object(g.a)(e))},this.extensions=e.extensions&&Object(s.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),"string"===typeof e.name||Object(u.a)(0,"Must provide name."),null==e.serialize||"function"===typeof e.serialize||Object(u.a)(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),e.parseLiteral&&("function"===typeof e.parseValue&&"function"===typeof e.parseLiteral||Object(u.a)(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){return{name:this.name,description:this.description,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},e}();Object(h.a)(ae),Object(d.a)(ae);var se=function(){function e(e){this.name=e.name,this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=e.extensions&&Object(s.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=ce.bind(void 0,e),this._interfaces=ue.bind(void 0,e),"string"===typeof e.name||Object(u.a)(0,"Must provide name."),null==e.isTypeOf||"function"===typeof e.isTypeOf||Object(u.a)(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(Object(i.a)(e.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return"function"===typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"===typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:pe(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},e}();function ue(e){var t=ie(e.interfaces)||[];return Array.isArray(t)||Object(u.a)(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),t}function ce(e){var t=ie(e.fields)||{};return le(t)||Object(u.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Object(a.a)(t,(function(t,n){le(t)||Object(u.a)(0,"".concat(e.name,".").concat(n," field config must be an object")),!("isDeprecated"in t)||Object(u.a)(0,"".concat(e.name,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),null==t.resolve||"function"===typeof t.resolve||Object(u.a)(0,"".concat(e.name,".").concat(n," field resolver must be a function if ")+"provided, but got: ".concat(Object(i.a)(t.resolve),"."));var o=t.args||{};le(o)||Object(u.a)(0,"".concat(e.name,".").concat(n," args must be an object with argument names as keys."));var a=Object(r.a)(o).map((function(e){var t=e[0],n=e[1];return{name:t,description:void 0===n.description?null:n.description,type:n.type,defaultValue:n.defaultValue,extensions:n.extensions&&Object(s.a)(n.extensions),astNode:n.astNode}}));return y({},t,{name:n,description:t.description,type:t.type,args:a,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:Boolean(t.deprecationReason),deprecationReason:t.deprecationReason,extensions:t.extensions&&Object(s.a)(t.extensions),astNode:t.astNode})}))}function le(e){return Object(p.a)(e)&&!Array.isArray(e)}function pe(e){return Object(a.a)(e,(function(e){return{description:e.description,type:e.type,args:fe(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}))}function fe(e){return Object(c.a)(e,(function(e){return e.name}),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,extensions:e.extensions,astNode:e.astNode}}))}function de(e){return P(e.type)&&void 0===e.defaultValue}Object(h.a)(se),Object(d.a)(se);var he=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&Object(s.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=ce.bind(void 0,e),"string"===typeof e.name||Object(u.a)(0,"Must provide name."),null==e.resolveType||"function"===typeof e.resolveType||Object(u.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(i.a)(e.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return"function"===typeof this._fields&&(this._fields=this._fields()),this._fields},t.toConfig=function(){return{name:this.name,description:this.description,fields:pe(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},e}();Object(h.a)(he),Object(d.a)(he);var me=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&Object(s.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._types=ge.bind(void 0,e),"string"===typeof e.name||Object(u.a)(0,"Must provide name."),null==e.resolveType||"function"===typeof e.resolveType||Object(u.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(i.a)(e.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return"function"===typeof this._types&&(this._types=this._types()),this._types},t.toConfig=function(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},e}();function ge(e){var t=ie(e.types)||[];return Array.isArray(t)||Object(u.a)(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}Object(h.a)(me),Object(d.a)(me);var ve=function(){function e(e){var t,n;this.name=e.name,this.description=e.description,this.extensions=e.extensions&&Object(s.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._values=(t=this.name,le(n=e.values)||Object(u.a)(0,"".concat(t," values must be an object with value names as keys.")),Object(r.a)(n).map((function(e){var n=e[0],r=e[1];return le(r)||Object(u.a)(0,"".concat(t,".").concat(n,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(Object(i.a)(r),".")),!("isDeprecated"in r)||Object(u.a)(0,"".concat(t,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),{name:n,description:r.description,value:"value"in r?r.value:n,isDeprecated:Boolean(r.deprecationReason),deprecationReason:r.deprecationReason,extensions:r.extensions&&Object(s.a)(r.extensions),astNode:r.astNode}}))),this._valueLookup=new Map(this._values.map((function(e){return[e.value,e]}))),this._nameLookup=Object(o.a)(this._values,(function(e){return e.name})),"string"===typeof e.name||Object(u.a)(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(e){return this._nameLookup[e]},t.serialize=function(e){var t=this._valueLookup.get(e);if(t)return t.name},t.parseValue=function(e){if("string"===typeof e){var t=this.getValue(e);if(t)return t.value}},t.parseLiteral=function(e,t){if(e.kind===m.a.ENUM){var n=this.getValue(e.value);if(n)return n.value}},t.toConfig=function(){var e=Object(c.a)(this.getValues(),(function(e){return e.name}),(function(e){return{description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},e}();Object(h.a)(ve),Object(d.a)(ve);var ye=function(){function e(e){this.name=e.name,this.description=e.description,this.extensions=e.extensions&&Object(s.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=oe(e.extensionASTNodes),this._fields=be.bind(void 0,e),"string"===typeof e.name||Object(u.a)(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return"function"===typeof this._fields&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var e=Object(a.a)(this.getFields(),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},e}();function be(e){var t=ie(e.fields)||{};return le(t)||Object(u.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Object(a.a)(t,(function(t,n){return!("resolve"in t)||Object(u.a)(0,"".concat(e.name,".").concat(n," field has a resolve property, but Input Types cannot define resolvers.")),y({},t,{name:n,description:t.description,type:t.type,defaultValue:t.defaultValue,extensions:t.extensions&&Object(s.a)(t.extensions),astNode:t.astNode})}))}function Ee(e){return P(e.type)&&void 0===e.defaultValue}Object(h.a)(ye),Object(d.a)(ye)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},function(e,t,n){"use strict";n.d(t,"x",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return p})),n.d(t,"r",(function(){return d})),n.d(t,"u",(function(){return h})),n.d(t,"o",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"q",(function(){return b})),n.d(t,"v",(function(){return E})),n.d(t,"w",(function(){return x})),n.d(t,"f",(function(){return D})),n.d(t,"l",(function(){return C})),n.d(t,"g",(function(){return w})),n.d(t,"m",(function(){return S})),n.d(t,"j",(function(){return k})),n.d(t,"y",(function(){return T})),n.d(t,"t",(function(){return F})),n.d(t,"s",(function(){return N})),n.d(t,"n",(function(){return I})),n.d(t,"z",(function(){return M})),n.d(t,"p",(function(){return j})),n.d(t,"k",(function(){return P})),n.d(t,"A",(function(){return L})),n.d(t,"i",(function(){return R}));var r=Object.assign||function(e){for(var t=1;t=0&&e.splice(n,1)}var D={from:function(e){var t=Array(e.length);for(var n in e)y(e,n)&&(t[n]=e[n]);return t}};function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r({},e),n=new Promise((function(e,n){t.resolve=e,t.reject=n}));return t.promise=n,t}function w(e){for(var t=[],n=0;n1&&void 0!==arguments[1])||arguments[1],n=void 0,r=new Promise((function(r){n=setTimeout((function(){return r(t)}),e)}));return r[c]=function(){return clearTimeout(n)},r}function k(){var e,t=!0,n=void 0,r=void 0;return(e={})[a]=!0,e.isRunning=function(){return t},e.result=function(){return n},e.error=function(){return r},e.setRunning=function(e){return t=e},e.setResult=function(e){return n=e},e.setError=function(e){return r=e},e}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(){return++e}}var T=A(),_=function(e){throw e},O=function(e){return{value:e,done:!0}};function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],i={name:n,next:e,throw:t,return:O};return r&&(i[s]=!0),"undefined"!==typeof Symbol&&(i[Symbol.iterator]=function(){return i}),i}function N(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";"undefined"===typeof window?console.log("redux-saga "+e+": "+t+"\n"+(n&&n.stack||n)):console[e](t,n)}function I(e,t){return function(){return e.apply(void 0,arguments)}}var M=function(e,t){return e+" has been deprecated in favor of "+t+", please update your code"},j=function(e){return new Error("\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project's github repo.\n Error: "+e+"\n")},P=function(e,t){return(e?e+".":"")+"setContext(props): argument "+t+" is not a plain object"},L=function(e){return function(t){return e(Object.defineProperty(t,l,{value:!0}))}},R=function e(t){return function(){for(var n=arguments.length,r=Array(n),i=0;i2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"===typeof e.constructor){var n=e.constructor.name;if("string"===typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(24),i=n(85),o=n(131);function a(e,t,n,o,s,u,c){var l=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,p=n;if(!p&&l){var f=l[0];p=f&&f.loc&&f.loc.source}var d,h=o;!h&&l&&(h=l.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),h&&0===h.length&&(h=void 0),o&&n?d=o.map((function(e){return Object(i.a)(n,e)})):l&&(d=l.reduce((function(e,t){return t.loc&&e.push(Object(i.a)(t.loc.source,t.loc.start)),e}),[]));var m=c;if(null==m&&null!=u){var g=u.extensions;Object(r.a)(g)&&(m=g)}Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:d||void 0,enumerable:Boolean(d)},path:{value:s||void 0,enumerable:Boolean(s)},nodes:{value:l||void 0},source:{value:p||void 0},positions:{value:h||void 0},originalError:{value:u},extensions:{value:m||void 0,enumerable:Boolean(m)}}),u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,a):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}function s(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n0&&void 0!==arguments[0]?arguments[0]:"*";if(arguments.length&&Object(r.h)(arguments[0],r.q.notUndef,"take(patternOrChannel): patternOrChannel is undefined"),r.q.pattern(e))return s(o,{pattern:e});if(r.q.channel(e))return s(o,{channel:e});throw new Error("take(patternOrChannel): argument "+String(e)+" is not valid channel or a valid pattern")}c.maybe=function(){var e=c.apply(void 0,arguments);return e[o].maybe=!0,e};var l=Object(r.n)(c.maybe,Object(r.z)("takem","take.maybe"));function p(e,t){return arguments.length>1?(Object(r.h)(e,r.q.notUndef,"put(channel, action): argument channel is undefined"),Object(r.h)(e,r.q.channel,"put(channel, action): argument "+e+" is not a valid channel"),Object(r.h)(t,r.q.notUndef,"put(channel, action): argument action is undefined")):(Object(r.h)(e,r.q.notUndef,"put(action): argument action is undefined"),t=e,e=null),s("PUT",{channel:e,action:t})}function f(e){return s("ALL",e)}function d(e){return s("RACE",e)}function h(e,t,n){Object(r.h)(t,r.q.notUndef,e+": argument fn is undefined");var i=null;if(r.q.array(t)){var o=t;i=o[0],t=o[1]}else if(t.fn){var a=t;i=a.context,t=a.fn}return i&&r.q.string(t)&&r.q.func(i[t])&&(t=i[t]),Object(r.h)(t,r.q.func,e+": argument "+t+" is not a function"),{context:i,fn:t,args:n}}function m(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:[];return s("CALL",h("apply",{context:e,fn:t},n))}function v(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1)return f(t.map((function(e){return E(e)})));var i=t[0];return Object(r.h)(i,r.q.notUndef,"join(task): argument task is undefined"),Object(r.h)(i,r.q.task,"join(task): argument "+i+" is not a valid Task object "+a),s("JOIN",i)}function x(){for(var e=arguments.length,t=Array(e),n=0;n1)return f(t.map((function(e){return x(e)})));var i=t[0];return 1===t.length&&(Object(r.h)(i,r.q.notUndef,"cancel(task): argument task is undefined"),Object(r.h)(i,r.q.task,"cancel(task): argument "+i+" is not a valid Task object "+a)),s("CANCEL",i||r.d)}function D(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i1&&(Object(r.h)(t,r.q.notUndef,"actionChannel(pattern, buffer): argument buffer is undefined"),Object(r.h)(t,r.q.buffer,"actionChannel(pattern, buffer): argument "+t+" is not a valid buffer")),s("ACTION_CHANNEL",{pattern:e,buffer:t})}function w(){return s("CANCELLED",{})}function S(e){return Object(r.h)(e,r.q.channel,"flush(channel): argument "+e+" is not valid channel"),s("FLUSH",e)}function k(e){return Object(r.h)(e,r.q.string,"getContext(prop): argument "+e+" is not a string"),s("GET_CONTEXT",e)}function A(e){return Object(r.h)(e,r.q.object,Object(r.k)(null,e)),s("SET_CONTEXT",e)}p.resolve=function(){var e=p.apply(void 0,arguments);return e.PUT.resolve=!0,e},p.sync=Object(r.n)(p.resolve,Object(r.z)("put.sync","put.resolve"));var T=function(e){return function(t){return t&&t[i]&&t[e]}},_={take:T(o),put:T("PUT"),all:T("ALL"),race:T("RACE"),call:T("CALL"),cps:T("CPS"),fork:T("FORK"),join:T("JOIN"),cancel:T("CANCEL"),select:T("SELECT"),actionChannel:T("ACTION_CHANNEL"),cancelled:T("CANCELLED"),flush:T("FLUSH"),getContext:T("GET_CONTEXT"),setContext:T("SET_CONTEXT")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(86));var r=n(86);t.styled=r.default},function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"})},function(e,t,n){"use strict";var r=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))};t.a=r},function(e,t,n){"use strict";n.r(t),n.d(t,"__Schema",(function(){return p})),n.d(t,"__Directive",(function(){return f})),n.d(t,"__DirectiveLocation",(function(){return d})),n.d(t,"__Type",(function(){return h})),n.d(t,"__Field",(function(){return m})),n.d(t,"__InputValue",(function(){return g})),n.d(t,"__EnumValue",(function(){return v})),n.d(t,"TypeKind",(function(){return y})),n.d(t,"__TypeKind",(function(){return b})),n.d(t,"SchemaMetaFieldDef",(function(){return E})),n.d(t,"TypeMetaFieldDef",(function(){return x})),n.d(t,"TypeNameMetaFieldDef",(function(){return D})),n.d(t,"introspectionTypes",(function(){return C})),n.d(t,"isIntrospectionType",(function(){return w}));var r=n(10),i=n(3),o=n(19),a=n(16),s=n(9),u=n(59),c=n(12),l=n(0),p=new l.f({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{types:{description:"A list of all types supported by this server.",type:Object(l.e)(Object(l.d)(Object(l.e)(h))),resolve:function(e){return Object(r.a)(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:Object(l.e)(h),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:h,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:h,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:Object(l.e)(Object(l.d)(Object(l.e)(f))),resolve:function(e){return e.getDirectives()}}}}}),f=new l.f({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:Object(l.e)(c.e),resolve:function(e){return e.name}},description:{type:c.e,resolve:function(e){return e.description}},locations:{type:Object(l.e)(Object(l.d)(Object(l.e)(d))),resolve:function(e){return e.locations}},args:{type:Object(l.e)(Object(l.d)(Object(l.e)(g))),resolve:function(e){return e.args}}}}}),d=new l.a({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:s.a.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:s.a.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:s.a.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:s.a.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:s.a.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:s.a.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:s.a.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:s.a.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:s.a.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:s.a.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:s.a.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:s.a.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:s.a.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:s.a.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:s.a.UNION,description:"Location adjacent to a union definition."},ENUM:{value:s.a.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:s.a.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:s.a.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:s.a.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),h=new l.f({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:Object(l.e)(b),resolve:function(e){return Object(l.R)(e)?y.SCALAR:Object(l.N)(e)?y.OBJECT:Object(l.H)(e)?y.INTERFACE:Object(l.T)(e)?y.UNION:Object(l.E)(e)?y.ENUM:Object(l.F)(e)?y.INPUT_OBJECT:Object(l.J)(e)?y.LIST:Object(l.L)(e)?y.NON_NULL:void Object(o.a)(!1,'Unexpected type: "'.concat(Object(i.a)(e),'".'))}},name:{type:c.e,resolve:function(e){return void 0!==e.name?e.name:void 0}},description:{type:c.e,resolve:function(e){return void 0!==e.description?e.description:void 0}},fields:{type:Object(l.d)(Object(l.e)(m)),args:{includeDeprecated:{type:c.a,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(Object(l.N)(e)||Object(l.H)(e)){var i=Object(r.a)(e.getFields());return n||(i=i.filter((function(e){return!e.deprecationReason}))),i}return null}},interfaces:{type:Object(l.d)(Object(l.e)(h)),resolve:function(e){if(Object(l.N)(e))return e.getInterfaces()}},possibleTypes:{type:Object(l.d)(Object(l.e)(h)),resolve:function(e,t,n,r){var i=r.schema;if(Object(l.C)(e))return i.getPossibleTypes(e)}},enumValues:{type:Object(l.d)(Object(l.e)(v)),args:{includeDeprecated:{type:c.a,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(Object(l.E)(e)){var r=e.getValues();return n||(r=r.filter((function(e){return!e.deprecationReason}))),r}}},inputFields:{type:Object(l.d)(Object(l.e)(g)),resolve:function(e){if(Object(l.F)(e))return Object(r.a)(e.getFields())}},ofType:{type:h,resolve:function(e){return void 0!==e.ofType?e.ofType:void 0}}}}}),m=new l.f({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:Object(l.e)(c.e),resolve:function(e){return e.name}},description:{type:c.e,resolve:function(e){return e.description}},args:{type:Object(l.e)(Object(l.d)(Object(l.e)(g))),resolve:function(e){return e.args}},type:{type:Object(l.e)(h),resolve:function(e){return e.type}},isDeprecated:{type:Object(l.e)(c.a),resolve:function(e){return e.isDeprecated}},deprecationReason:{type:c.e,resolve:function(e){return e.deprecationReason}}}}}),g=new l.f({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:Object(l.e)(c.e),resolve:function(e){return e.name}},description:{type:c.e,resolve:function(e){return e.description}},type:{type:Object(l.e)(h),resolve:function(e){return e.type}},defaultValue:{type:c.e,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(e){var t=Object(u.a)(e.defaultValue,e.type);return t?Object(a.print)(t):null}}}}}),v=new l.f({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:Object(l.e)(c.e),resolve:function(e){return e.name}},description:{type:c.e,resolve:function(e){return e.description}},isDeprecated:{type:Object(l.e)(c.a),resolve:function(e){return e.isDeprecated}},deprecationReason:{type:c.e,resolve:function(e){return e.deprecationReason}}}}}),y=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),b=new l.a({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:y.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:y.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:y.INTERFACE,description:"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields."},UNION:{value:y.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:y.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:y.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:y.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:y.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),E={name:"__schema",type:Object(l.e)(p),description:"Access the current type schema of this server.",args:[],resolve:function(e,t,n,r){return r.schema},deprecationReason:void 0,extensions:void 0,astNode:void 0},x={name:"__type",type:h,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:Object(l.e)(c.e),defaultValue:void 0,extensions:void 0,astNode:void 0}],resolve:function(e,t,n,r){var i=t.name;return r.schema.getType(i)},deprecationReason:void 0,extensions:void 0,astNode:void 0},D={name:"__typename",type:Object(l.e)(c.e),description:"The name of the current Object type at runtime.",args:[],resolve:function(e,t,n,r){return r.parentType.name},deprecationReason:void 0,extensions:void 0,astNode:void 0},C=Object.freeze([p,f,d,h,m,g,v,b]);function w(e){return Object(l.K)(e)&&C.some((function(t){var n=t.name;return e.name===n}))}},function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"e",(function(){return f})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"f",(function(){return g}));var r=Number.isFinite||function(e){return"number"===typeof e&&isFinite(e)},i=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},o=n(3),a=n(24),s=n(1),u=n(0);var c=new u.g({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize:function(e){if("boolean"===typeof e)return e?1:0;var t=e;if("string"===typeof e&&""!==e&&(t=Number(e)),!i(t))throw new TypeError("Int cannot represent non-integer value: ".concat(Object(o.a)(e)));if(t>2147483647||t<-2147483648)throw new TypeError("Int cannot represent non 32-bit signed integer value: ".concat(Object(o.a)(e)));return t},parseValue:function(e){if(!i(e))throw new TypeError("Int cannot represent non-integer value: ".concat(Object(o.a)(e)));if(e>2147483647||e<-2147483648)throw new TypeError("Int cannot represent non 32-bit signed integer value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){if(e.kind===s.a.INT){var t=parseInt(e.value,10);if(t<=2147483647&&t>=-2147483648)return t}}});var l=new u.g({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:function(e){if("boolean"===typeof e)return e?1:0;var t=e;if("string"===typeof e&&""!==e&&(t=Number(e)),!r(t))throw new TypeError("Float cannot represent non numeric value: ".concat(Object(o.a)(e)));return t},parseValue:function(e){if(!r(e))throw new TypeError("Float cannot represent non numeric value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){return e.kind===s.a.FLOAT||e.kind===s.a.INT?parseFloat(e.value):void 0}});function p(e){if(Object(a.a)(e)){if("function"===typeof e.valueOf){var t=e.valueOf();if(!Object(a.a)(t))return t}if("function"===typeof e.toJSON)return e.toJSON()}return e}var f=new u.g({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:function(e){var t=p(e);if("string"===typeof t)return t;if("boolean"===typeof t)return t?"true":"false";if(r(t))return t.toString();throw new TypeError("String cannot represent value: ".concat(Object(o.a)(e)))},parseValue:function(e){if("string"!==typeof e)throw new TypeError("String cannot represent a non string value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){return e.kind===s.a.STRING?e.value:void 0}});var d=new u.g({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:function(e){if("boolean"===typeof e)return e;if(r(e))return 0!==e;throw new TypeError("Boolean cannot represent a non boolean value: ".concat(Object(o.a)(e)))},parseValue:function(e){if("boolean"!==typeof e)throw new TypeError("Boolean cannot represent a non boolean value: ".concat(Object(o.a)(e)));return e},parseLiteral:function(e){return e.kind===s.a.BOOLEAN?e.value:void 0}});var h=new u.g({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:function(e){var t=p(e);if("string"===typeof t)return t;if(i(t))return String(t);throw new TypeError("ID cannot represent value: ".concat(Object(o.a)(e)))},parseValue:function(e){if("string"===typeof e)return e;if(i(e))return e.toString();throw new TypeError("ID cannot represent value: ".concat(Object(o.a)(e)))},parseLiteral:function(e){return e.kind===s.a.STRING||e.kind===s.a.INT?e.value:void 0}}),m=Object.freeze([f,c,l,d,h]);function g(e){return Object(u.R)(e)&&m.some((function(t){var n=t.name;return e.name===n}))}},function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),u=!o&&/WebKit\//.test(e),c=u&&/Qt\/\d+\.\d+/.test(e),l=!o&&/Chrome\//.test(e),p=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),E=/win/i.test(t),x=p&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(p=!1,u=!0);var D=y&&(c||p&&(null==x||x<12.11)),C=n||a&&s>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,k=function(e,t){var n=e.className,r=w(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function A(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return A(e).appendChild(t)}function _(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(j=function(e){try{e.select()}catch(t){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function U(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var G=[""];function K(e){for(;G.length<=e;)G.push(J(G)+" ");return G[e]}function J(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||$.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var ue=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var u="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,l=a.length,p=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function he(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ye(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){de(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function De(e){be(e),Ee(e)}function Ce(e){return e.target||e.srcElement}function we(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,ke,Ae=function(){if(a&&s<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==Se){var t=_("span","\u200b");T(e,_("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Se?_("span","\u200b"):_("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function _e(e){if(null!=ke)return ke;var t=T(e,document.createTextNode("A\u062eA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return A(e),!(!n||n.left==n.right)&&(ke=r.right-n.right<3)}var Oe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Fe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ne=function(){var e=_("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Ie=null,Me={},je={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Me[e]=t}function Le(e){if("string"==typeof e&&je.hasOwnProperty(e))e=je[e];else if(e&&"string"==typeof e.name&&je.hasOwnProperty(e.name)){var t=je[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Le("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Le("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Re(e,t){t=Le(t);var n=Me[t.name];if(!n)return Re(e,"text/plain");var r=n(e,t);if(Be.hasOwnProperty(t.name)){var i=Be[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Be={};function Ue(e,t){L(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ve(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function qe(e,t,n){return!e.startState||e.startState(t,n)}var He=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function We(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?Ze(n,We(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?Ze(e.line,t):n<0?Ze(e.line,0):e}(t,We(e,t.line).text.length)}function st(e,t){for(var n=[],r=0;r=this.string.length},He.prototype.sol=function(){return this.pos==this.lineStart},He.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},He.prototype.next=function(){if(this.post},He.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},He.prototype.skipToEnd=function(){this.pos=this.string.length},He.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},He.prototype.backUp=function(e){this.pos-=e},He.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},He.prototype.current=function(){return this.string.slice(this.start,this.pos)},He.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},He.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},He.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function lt(e,t,n,r){var i=[e.state.modeGen],o={};bt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],u=1,c=0;n.state=!0,bt(e,t.text,s.mode,n,(function(e,t){for(var n=u;ce&&i.splice(u,1,e,i[u+1],r),u+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength&&ze(e.doc.mode,r.state),o=lt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ct(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var u=We(o,s-1),c=u.stateAfter;if(c&&(!n||s+(c instanceof ut?c.lookAhead:0)<=o.modeFrontier))return s;var l=R(u.text,null,e.options.tabSize);(null==i||r>l)&&(i=s-1,r=l)}return i}(e,t,n),a=o>r.first&&We(r,o-1).stateAfter,s=a?ct.fromSaved(r,a,o):new ct(r,qe(r.mode),o);return r.iter(o,t,(function(n){dt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,n){return t instanceof ut?new ct(e,ze(e.mode,t.state),n,t.lookAhead):new ct(e,ze(e.mode,t),n)},ct.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var gt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function vt(e,t,n,r){var i,o,a=e.doc,s=a.mode,u=We(a,(t=at(a,t)).line),c=ft(e,t.line,n),l=new He(u.text,e.options.tabSize,c);for(r&&(o=[]);(r||l.pose.options.maxHighlightLength?(s=!1,a&&dt(e,t,r,p.pos),p.pos=t.length,u=null):u=yt(mt(n,p,r.state,f),o),f){var d=f[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!s||l!=u){for(;c=t:o.to>t);(r||(r=[])).push(new Dt(a,o.from,s?null:o.to))}}return r}(n,i,a),u=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||Ft(n,o.marker)<0)&&(n=o.marker)}return n}function Pt(e,t,n,r,i){var o=We(e,t),a=xt&&o.markedSpans;if(a)for(var s=0;s=0&&p<=0||l<=0&&p>=0)&&(l<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?et(c.to,n)>=0:et(c.to,n)>0)||l>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?et(c.from,r)<=0:et(c.from,r)<0)))return!0}}}function Lt(e){for(var t;t=It(e);)e=t.find(-1,!0).line;return e}function Rt(e,t){var n=We(e,t),r=Lt(n);return n==r?t:Qe(r)}function Bt(e,t){if(t>e.lastLine())return t;var n,r=We(e,t);if(!Ut(e,r))return t;for(;n=Mt(r);)r=n.find(1,!0).line;return Qe(r)+1}function Ut(e,t){var n=xt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Wt=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,At(e)}Wt.prototype.lineNo=function(){return Qe(this)},ye(Wt);var Kt={},Jt={};function Qt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:Kt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Yt(e,t){var n=O("span",null,null,u?"padding-right: .1px":null),r={pre:O("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=$t,_e(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=Zt(r.addToken,a)),r.map=[],tn(o,r,pt(e,o,t!=e.display.externalMeasured&&Qe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Xt(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function $t(e,t,n,r,i,o,u){if(t){var c,l=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&p.from<=c);f++);if(p.to>=l)return e(n,r,i,o,a,s,u);e(n,r.slice(0,p.to-c),i,o,null,s,u),o=null,r=r.slice(p.to-c),c=p.to}}}function en(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function tn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,u,c,l,p,f,d=i.length,h=0,m=1,g="",v=0;;){if(v==h){u=c=l=s="",f=null,p=null,v=1/0;for(var y=[],b=void 0,E=0;Eh||D.collapsed&&x.to==h&&x.from==h)){if(null!=x.to&&x.to!=h&&v>x.to&&(v=x.to,c=""),D.className&&(u+=" "+D.className),D.css&&(s=(s?s+";":"")+D.css),D.startStyle&&x.from==h&&(l+=" "+D.startStyle),D.endStyle&&x.to==v&&(b||(b=[])).push(D.endStyle,x.to),D.title&&((f||(f={})).title=D.title),D.attributes)for(var C in D.attributes)(f||(f={}))[C]=D.attributes[C];D.collapsed&&(!p||Ft(p.marker,D)<0)&&(p=x)}else x.from>h&&v>x.from&&(v=x.from)}if(b)for(var w=0;w=d)break;for(var k=Math.min(d,v);;){if(g){var A=h+g.length;if(!p){var T=A>k?g.slice(0,k-h):g;t.addToken(t,T,a?a+u:u,l,h+T.length==v?c:"",s,f)}if(A>=k){g=g.slice(k-h),h=k;break}h=A,l=""}g=i.slice(o,o=n[m++]),a=Qt(n[m++],t.cm.options)}}else for(var _=1;_n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function _n(e,t,n,r){return Nn(e,Fn(e,t),n,r)}function On(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((u.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=jn(t.map,n,r),u=o.node,c=o.start,l=o.end,p=o.collapse;if(3==u.nodeType){for(var f=0;f<4;f++){for(;c&&re(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+l1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var d;c>0&&(p=r="right"),i=e.options.lineWrapping&&(d=u.getClientRects()).length>1?d["right"==r?d.length-1:0]:u.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=u.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+rr(e.display),top:h.top,bottom:h.bottom}:Mn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=u-s)-1,t>=u&&(a="right")),null!=i){if(r=e[c+2],s==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==u-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Ln(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(u=r.text.length,c="before"):u<=0&&(u=0,c="after"),!s)return a("before"==c?u-1:u,"before"==c);function l(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var p=se(s,u,c),f=ae,d=l(u,p,"before"==c);return null!=f&&(d.other=l(u,f,"before"!=c)),d}function Kn(e,t){var n=0;t=at(e.doc,t),e.options.lineWrapping||(n=rr(e.display)*t.ch);var r=We(e.doc,t.line),i=Vt(r)+Dn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Jn(e,t,n,r,i){var o=Ze(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Qn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Jn(r.first,0,null,-1,-1);var i=Ye(r,n),o=r.first+r.size-1;if(i>o)return Jn(r.first+r.size-1,We(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=We(r,i);;){var s=Zn(e,a,i,t,n),u=jt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var c=u.find(1);if(c.line==i)return c;a=We(r,i=c.line)}}function Yn(e,t,n,r){r-=Vn(t);var i=t.text.length,o=oe((function(t){return Nn(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return Nn(e,n,t).top>r}),o,i)}}function Xn(e,t,n,r){return n||(n=Fn(e,t)),Yn(e,t,n,qn(e,t,Nn(e,n,r),"line").top)}function $n(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Zn(e,t,n,r,i){i-=Vt(t);var o=Fn(e,t),a=Vn(t),s=0,u=t.text.length,c=!0,l=ce(t,e.doc.direction);if(l){var p=(e.options.lineWrapping?tr:er)(e,t,n,o,l,r,i);s=(c=1!=p.level)?p.from:p.to-1,u=c?p.to:p.from-1}var f,d,h=null,m=null,g=oe((function(t){var n=Nn(e,o,t);return n.top+=a,n.bottom+=a,!!$n(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)}),s,u),v=!1;if(m){var y=r-m.left=E.bottom?1:0}return Jn(n,g=ie(t.text,g,1),d,v,r-f)}function er(e,t,n,r,i,o,a){var s=oe((function(s){var u=i[s],c=1!=u.level;return $n(Gn(e,Ze(n,c?u.to:u.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),u=i[s];if(s>0){var c=1!=u.level,l=Gn(e,Ze(n,c?u.from:u.to,c?"after":"before"),"line",t,r);$n(l,o,a,!0)&&l.top>a&&(u=i[s-1])}return u}function tr(e,t,n,r,i,o,a){var s=Yn(e,t,r,a),u=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var l=null,p=null,f=0;f=c||d.to<=u)){var h=Nn(e,r,1!=d.level?Math.min(c,d.to)-1:Math.max(u,d.from)).right,m=hm)&&(l=d,p=m)}}return l||(l=i[i.length-1]),l.fromc&&(l={from:l.from,to:c,level:l.level}),l}function nr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==In){In=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)In.appendChild(document.createTextNode("x")),In.appendChild(_("br"));In.appendChild(document.createTextNode("x"))}T(e.measure,In);var n=In.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),A(e.measure),n||1}function rr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),n=_("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ir(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ar(e){var t=nr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/rr(e.display)-3);return function(i){if(Ut(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(u=We(e.doc,c.line).text).length==c.ch){var l=R(u,u.length,e.options.tabSize)-u.length;c=Ze(c.line,Math.max(0,Math.round((o-wn(e.display).left)/rr(e.display))-l))}return c}function cr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)xt&&Rt(e.doc,t)i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var o=dr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var a=dr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):fr(e)}else{var s=dr(e,t,t,-1),u=dr(e,n,n+r,1);s&&u?(i.view=i.view.slice(0,s.index).concat(rn(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[cr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function dr(e,t,n,r){var i,o=cr(e,t),a=e.display.view;if(!xt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,u=0;u0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;Rt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function hr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?f:r,(function(e,t,i,p){var g="ltr"==i,v=d(e,g?"left":"right"),y=d(t-1,g?"right":"left"),b=null==n&&0==e,E=null==r&&t==f,x=0==p,D=!m||p==m.length-1;if(y.top-v.top<=3){var C=(c?E:b)&&D,w=(c?b:E)&&x?s:(g?v:y).left,S=C?u:(g?y:v).right;l(w,v.top,S-w,v.bottom)}else{var k,A,T,_;g?(k=c&&b&&x?s:v.left,A=c?u:h(e,i,"before"),T=c?s:h(t,i,"after"),_=c&&E&&D?u:y.right):(k=c?h(e,i,"before"):s,A=!c&&b&&x?u:v.right,T=!c&&E&&D?s:y.left,_=c?h(t,i,"after"):u),l(k,v.top,A-k,v.bottom),v.bottom0?t.blinker=setInterval((function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function xr(e){e.state.focused||(e.display.input.focus(),Cr(e))}function Dr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,wr(e))}),100)}function Cr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Er(e))}function wr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,k(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Sr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(Je(i.line,u),kr(i.line),i.rest))for(var d=0;de.display.sizerWidth){var h=Math.ceil(c/rr(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function kr(e){if(e.widgets)for(var t=0;t=a&&(o=Ye(t,Vt(We(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function Tr(e,t){var n=e.display,r=nr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=An(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Cn(n),u=t.tops-r;if(t.topi+o){var l=Math.min(t.top,(c?s:t.bottom)-o);l!=i&&(a.scrollTop=l)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=kn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+p-3&&(a.scrollLeft=t.right+(d?0:10)-f),a}function _r(e,t){null!=t&&(Nr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Or(e){Nr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Fr(e,t,n){null==t&&null==n||Nr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Nr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ir(e,Kn(e,t.from),Kn(e,t.to),t.margin))}function Ir(e,t,n,r){var i=Tr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Fr(e,i.scrollLeft,i.scrollTop)}function Mr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||si(e,{top:t}),jr(e,t,!0),n&&si(e),ni(e,100))}function jr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,li(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Lr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Cn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Rr=function(e,t,n){this.cm=n;var r=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Rr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Rr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Rr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Rr.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Rr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Rr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Br=function(){};function Ur(e,t){t||(t=Lr(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Sr(e),zr(e,Lr(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Br.prototype.update=function(){return{bottom:0,right:0}},Br.prototype.setScrollLeft=function(){},Br.prototype.setScrollTop=function(){},Br.prototype.clear=function(){};var Vr={native:Rr,null:Br};function qr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Vr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Pr(e,t):Mr(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Hr=0;function Wr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Hr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function Gr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function Qr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Sr(t),e.barMeasure=Lr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_n(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-kn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Yr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=_("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Dn(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?Ze(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?Ze(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Gn(e,t),u=n&&n!=t?Gn(e,n):s,c=Tr(e,i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-r,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+r}),l=e.doc.scrollTop,p=e.doc.scrollLeft;if(null!=c.scrollTop&&(Mr(e,c.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(a=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}(t,at(r,e.scrollToPos.from),at(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,u=lt(e,o,r,!0);s&&(r.state=s),o.styles=u.styles;var c=o.styleClasses,l=u.classes;l?o.styleClasses=l:c&&(o.styleClasses=null);for(var p=!a||a.length!=o.styles.length||c!=l&&(!c||!l||c.bgClass!=l.bgClass||c.textClass!=l.textClass),f=0;!p&&fn)return ni(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&$r(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==hr(e))return!1;pi(e)&&(fr(e),t.dims=ir(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),xt&&(o=Rt(e.doc,o),a=Bt(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=rn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=rn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,cr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Vt(We(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=hr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var l=function(e){if(e.hasFocus())return null;var t=N();if(!t||!F(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&F(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return u&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,l=r.viewFrom,p=0;p-1&&(d=!1),cn(e,f,l,n)),d&&(A(f.lineNumber),f.lineNumber.appendChild(document.createTextNode($e(e.options,l)))),a=f.node.nextSibling}else{var h=gn(e,f,l,n);o.insertBefore(h,a)}l+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=N()&&(e.activeElt.focus(),e.anchorNode&&F(document.body,e.anchorNode)&&F(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(l),A(n.cursorDiv),A(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ni(e,400)),n.updateLineNumbers=null,!0}function ai(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=kn(e))r&&(t.visible=Ar(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Cn(e.display)-An(e),n.top)}),t.visible=Ar(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oi(e,t))break;Sr(e);var i=Lr(e);mr(e),Ur(e,i),ci(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function si(e,t){var n=new ii(e,t);if(oi(e,n)){Sr(e),ai(e,n);var r=Lr(e);mr(e),Ur(e,r),ci(e,r),n.finish()}}function ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ci(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sn(e)+"px"}function li(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&c||o&&l){if(o&&y&&u)e:for(var f=t.target,d=a.view;f!=s;f=f.parentNode)for(var h=0;h=0&&et(e,r.to())<=0)return n}return-1};var Di=function(e,t){this.anchor=e,this.head=t};function Ci(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return et(e.from(),t.from())})),n=U(t,i);for(var o=1;o0:u>=0){var c=it(s.from(),a.from()),l=rt(s.to(),a.to()),p=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Di(p?l:c,p?c:l))}}return new xi(t,n)}function wi(e,t){return new xi([new Di(e,t||e)],0)}function Si(e){return e.text?Ze(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function ki(e,t){if(et(e,t.from)<0)return e;if(et(e,t.to)<=0)return Si(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Si(t).ch-t.to.ch),Ze(n,r)}function Ai(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}sn(e,"change",e,t)}function Ii(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Ri(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}(i,i.lastOp==r)))a=J(o.changes),0==et(t.from,t.to)&&0==et(t.from,a.to)?a.to=Si(t):o.changes.push(Li(e,t));else{var u=J(i.done);for(u&&u.ranges||zi(e.sel,i.done),o={changes:[Li(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||he(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,J(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ri(i.undone)}function zi(e,t){var n=J(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Vi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function qi(e){if(!e)return null;for(var t,n=0;n-1&&(J(s)[p]=c[p],delete c[p])}}}return r}function Gi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=et(t,i)<0;o!=et(n,i)<0?(i=t,t=n):o!=et(t,n)<0&&(t=n)}return new Di(i,t)}return new Di(n||t,t)}function Ki(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new xi([Gi(e.sel.primary(),t,n,i)],0),r)}function Ji(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(he(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var p=u.find(r<0?1:-1),f=void 0;if((r<0?l:c)&&(p=oo(e,p,-r,p&&p.line==t.line?o:null)),p&&p.line==t.line&&(f=et(p,n))&&(r<0?f<0:f>0))return ro(e,p,t,r,i)}var d=u.find(r<0?-1:1);return(r<0?c:l)&&(d=oo(e,d,r,d.line==t.line?o:null)),d?ro(e,d,t,r,i):null}}return t}function io(e,t,n,r,i){var o=r||1,a=ro(e,t,n,o,i)||!i&&ro(e,t,n,o,!0)||ro(e,t,n,-o,i)||!i&&ro(e,t,n,-o,!0);return a||(e.cantEdit=!0,Ze(e.first,0))}function oo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?at(e,Ze(t.line-1)):null:n>0&&t.ch==(r||We(e,t.line)).text.length?t.line0)){var l=[u,1],p=et(c.from,s.from),f=et(c.to,s.to);(p<0||!a.inclusiveLeft&&!p)&&l.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&l.push({from:s.to,to:c.to}),i.splice.apply(i,l),u+=l.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)co(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else co(e,t)}}function co(e,t){if(1!=t.text.length||""!=t.text[0]||0!=et(t.from,t.to)){var n=Ai(e,t);Bi(e,t,n,e.cm?e.cm.curOp.id:NaN),fo(e,t,n,St(e,t));var r=[];Ii(e,(function(e,n){n||-1!=U(r,e.history)||(vo(e.history,t),r.push(e.history)),fo(e,t,null,St(e,t))}))}}function lo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,u="undo"==t?o.undone:o.done,c=0;c=0;--d){var h=f(d);if(h)return h.v}}}}function po(e,t){if(0!=t&&(e.first+=t,e.sel=new xi(Q(e.sel.ranges,(function(e){return new Di(Ze(e.anchor.line+t,e.anchor.ch),Ze(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){lr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Ze(o,We(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=Ai(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,u=o.line;e.options.lineWrapping||(u=Qe(Lt(We(r,o.line))),r.iter(u,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ni(r,t,n,ar(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,(function(e){var t=qt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=We(e,r).stateAfter;if(i&&(!(i instanceof ut)||r+i.lookAhead1||!(this.children[0]instanceof bo))){var s=[];this.collapse(s),this.children=[new bo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Pt(e,t.line,t,n,o)||t.line!=n.line&&Pt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");xt=!0}o.addToHistory&&Bi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,u=t.line,c=e.cm;if(e.iter(u,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Lt(e)==c.display.maxLine&&(s=!0),o.collapsed&&u!=t.line&&Je(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Dt(o,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Je(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Et=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Co,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)lr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var l=t.line;l<=n.line;l++)pr(c,l,"text");o.atomic&&to(c.doc),sn(c,"markerAdded",c,o)}return o}wo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Wr(e),ve(this,"clear")){var n=this.find();n&&sn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=l,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&lr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&to(e.doc)),e&&sn(e,"markerCleared",e,this,r,i),t&&Gr(e),this.parent&&this.parent.clear()}},wo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;u--)uo(this,r[u]);s?Xi(this,s):this.cm&&Or(this.cm)})),undo:ti((function(){lo(this,"undo")})),redo:ti((function(){lo(this,"redo")})),undoSelection:ti((function(){lo(this,"undo",!0)})),redoSelection:ti((function(){lo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=at(this,e),t=at(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=u.to||null==u.from&&i!=e.line||null!=u.from&&i==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n})),at(this,Ze(n,t))},indexFromPos:function(e){var t=(e=at(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var p=e.dataTransfer.getData("Text");if(p){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Zi(t.doc,wi(n,n)),f)for(var d=0;d=0;t--)ho(e.doc,"",r[t].from,r[t].to,"+delete");Or(e)}))}function Xo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function $o(e,t,n){var r=Xo(e,t.ch,n);return null==r?null:new Ze(t.line,r,n<0?"after":"before")}function Zo(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(n,t.doc.direction);if(o){var a,s=i<0?J(o):o[0],u=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Fn(t,n);a=i<0?n.text.length-1:0;var l=Nn(t,c,a).top;a=oe((function(e){return Nn(t,c,e).top==l}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==u&&(a=Xo(n,a,1))}else a=i<0?s.to:s.from;return new Ze(r,a,u)}}return new Ze(r,i<0?n.text.length:0,i<0?"before":"after")}Vo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Vo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Vo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Vo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Vo.default=y?Vo.macDefault:Vo.pcDefault;var ea={selectAll:ao,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Yo(e,(function(t){if(t.empty()){var n=We(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Ze(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ze(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=We(e.doc,i.line-1).text;a&&(i=new Ze(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Ze(i.line-1,a.length-1),i,"+transpose"))}n.push(new Di(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return $r(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(et((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(et(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=Zr(e,(function(t){u&&(i.scroller.draggable=!1),e.state.draggingText=!1,de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",l),de(i.scroller,"dragstart",p),de(i.scroller,"drop",c),o||(be(t),r.addNew||Ki(e.doc,n,null,null,r.extend),u||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()}),20):i.input.focus())})),l=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},p=function(){return o=!0};u&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",l),pe(i.scroller,"dragstart",p),pe(i.scroller,"drop",c),Dr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;be(t);var a,s,u=o.sel,c=u.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new Di(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Di(n,n)),n=ur(e,t,!0,!0),s=-1;else{var l=ga(e,n,r.unit);a=r.extend?Gi(a,l.anchor,l.head,r.extend):l}r.addNew?-1==s?(s=c.length,$i(o,Ci(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?($i(o,Ci(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Qi(o,s,a,q):(s=0,$i(o,new xi([a],0),q),u=o.sel);var p=n;function f(t){if(0!=et(p,t))if(p=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,l=R(We(o,n.line).text,n.ch,c),f=R(We(o,t.line).text,t.ch,c),d=Math.min(l,f),h=Math.max(l,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=We(o,m).text,y=W(v,d,c);d==h?i.push(new Di(Ze(m,y),Ze(m,y))):v.length>y&&i.push(new Di(Ze(m,y),Ze(m,W(v,h,c))))}i.length||i.push(new Di(n,n)),$i(o,Ci(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,E=a,x=ga(e,t,r.unit),D=E.anchor;et(x.anchor,D)>0?(b=x.head,D=it(E.from(),x.anchor)):(b=x.anchor,D=rt(E.to(),x.head));var C=u.ranges.slice(0);C[s]=function(e,t){var n=t.anchor,r=t.head,i=We(e.doc,n.line);if(0==et(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var u,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var l=se(o,r.ch,r.sticky),p=l-a||(r.ch-n.ch)*(1==s.level?-1:1);u=l==c-1||l==c?p<0:p>0}var f=o[c+(u?-1:0)],d=u==(1==f.level),h=d?f.from:f.to,m=d?"after":"before";return n.ch==h&&n.sticky==m?t:new Di(new Ze(n.line,h,m),r)}(e,new Di(at(o,D),b)),$i(o,Ci(e,C,s),q)}}var d=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(be(t),i.input.focus()),de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=Zr(e,(function(t){0!==t.buttons&&we(t)?function t(n){var a=++h,s=ur(e,n,!0,"rectangle"==r.unit);if(s)if(0!=et(s,p)){e.curOp.focus=N(),f(s);var u=Ar(i,o);(s.line>=u.to||s.lined.bottom?20:0;c&&setTimeout(Zr(e,(function(){h==a&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=Zr(e,m);e.state.selectingText=v,pe(i.wrapper.ownerDocument,"mousemove",g),pe(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):Ce(e)==n.scroller&&be(e):2==i?(r&&Ki(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Dr(t)))}}function ga(e,t,n){if("char"==n)return new Di(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Di(Ze(t.line,0),at(e.doc,Ze(t.line+1,0)));var r=n(e,t);return new Di(r.from,r.to)}function va(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,n))return xe(t);o-=s.top-a.viewOffset;for(var u=0;u=i)return he(e,n,e,Ye(e.doc,o),e.display.gutterSpecs[u].className,t),xe(t)}}function ya(e,t){return va(e,t,"gutterClick",!0)}function ba(e,t){xn(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&va(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ea(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Bn(e)}ha.prototype.compare=function(e,t,n){return this.time+400>e&&0==et(t,this.pos)&&n==this.button};var xa={toString:function(){return"CodeMirror.Init"}},Da={},Ca={};function wa(e,t,n){if(!t!=!(n&&n!=xa)){var r=e.display.dragFunctions,i=t?pe:de;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Sa(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(k(e.display.wrapper,"CodeMirror-wrap"),Ht(e)),sr(e),lr(e),Bn(e),setTimeout((function(){return Ur(e)}),100)}function ka(e,t){var n=this;if(!(this instanceof ka))return new ka(e,t);this.options=t=t?L(t):{},L(Da,t,!1);var r=t.value;"string"==typeof r?r=new Oo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new ka.inputStyles[t.inputStyle](this),o=this.display=new mi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Ea(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),qr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;pe(t.scroller,"mousedown",Zr(e,ma)),pe(t.scroller,"dblclick",a&&s<11?Zr(e,(function(t){if(!me(e,t)){var n=ur(e,t);if(n&&!ya(e,t)&&!xn(e.display,t)){be(t);var r=e.findWordAt(n);Ki(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),pe(t.scroller,"contextmenu",(function(t){return ba(e,t)})),pe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||ba(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ya(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!xn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Di(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new Di(Ze(s.line,0),at(e.doc,Ze(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Mr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return Ei(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return Ei(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||De(t)},over:function(t){me(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();vr(e,n,r),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),De(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Fo<100))De(t);else if(!me(e,t)&&!xn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=_("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),p&&n.parentNode.removeChild(n)}}(e,t)},drop:Zr(e,No),leave:function(t){me(e,t)||Io(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return la.call(e,t)})),pe(u,"keydown",Zr(e,ca)),pe(u,"keypress",Zr(e,pa)),pe(u,"focus",(function(t){return Cr(e,t)})),pe(u,"blur",(function(t){return wr(e,t)}))}(this),Po(),Wr(this),this.curOp.forceUpdate=!0,Mi(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(P(Cr,this),20):wr(this),Ca)Ca.hasOwnProperty(c)&&Ca[c](this,t[c],xa);pi(this),t.finishInit&&t.finishInit(this);for(var l=0;l150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?R(We(o,t-1).text,null,a):0:"add"==n?c=u+e.options.indentUnit:"subtract"==n?c=u-e.options.indentUnit:"number"==typeof n&&(c=u+n),c=Math.max(0,c);var p="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(c/a);d;--d)f+=a,p+="\t";if(fa,u=Oe(t),c=null;if(s&&r.ranges.length>1)if(_a&&_a.text.join("\n")==t){if(r.ranges.length%_a.text.length==0){c=[];for(var l=0;l<_a.text.length;l++)c.push(o.splitLines(_a.text[l]))}}else u.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=Q(u,(function(e){return[e]})));for(var p=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var d=r.ranges[f],h=d.from(),m=d.to();d.empty()&&(n&&n>0?h=Ze(h.line,h.ch-n):e.state.overwrite&&!s?m=Ze(m.line,Math.min(We(o,m.line).text.length,m.ch+J(u).length)):s&&_a&&_a.lineWise&&_a.text.join("\n")==t&&(h=m=Ze(h.line,0)));var g={from:h,to:m,text:c?c[f%c.length]:u,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};uo(e.doc,g),sn(e,"inputRead",e,g)}t&&!s&&Ia(e,t),Or(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Na(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||$r(t,(function(){return Fa(t,n,0,null,"paste")})),!0}function Ia(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Ta(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(We(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ta(e,i.head.line,"smart"));a&&sn(e,"electricInput",e,i.head.line)}}}function Ma(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=l.begin)){var d=p?"before":"after";return new Ze(n.line,f,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new Ze(n.line,u(e,1),"before"):new Ze(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:u(r.end,-1);if(a.from<=c&&c0?l.end:u(l.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):$o(s,t,n))){if(r||!function(){var n=t.line+u;return!(n=e.first+e.size)&&(t=new Ze(n,t.ch,t.sticky),s=We(e,n))}())return!1;t=Zo(i,e.cm,s,t.line,u)}else t=o;return!0}if("char"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var l=null,p="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(n<0)||c(!d);d=!1){var h=s.text.charAt(t.ch)||"\n",m=ee(h,f)?"w":p&&"\n"==h?"n":!p||/\s/.test(h)?null:"p";if(!p||d||m||(m="s"),l&&l!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(l=m),n>0&&!c(!d))break}var g=io(e,t,o,a,!0);return tt(o,g)&&(g.hitSide=!0),g}function Ra(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(u-.5*nr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Qn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ba=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,t){var n=On(e,t.line);if(!n||n.hidden)return null;var r=We(e.doc,t.line),i=Tn(n,r,t.line),o=ce(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=jn(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function za(e,t){return t&&(e.bad=!0),e}function Va(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return za(e.clipPos(Ze(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Ua(t,i)||{node:u[0].measure.map[2],offset:0},l=o.liner.firstLine()&&(a=Ze(a.line-1,We(r.doc,a.line-1).length)),s.ch==We(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=cr(r,a.line))?(t=Qe(i.view[0].line),n=i.view[0].node):(t=Qe(i.view[e].line),n=i.view[e-1].node.nextSibling);var u,c,l=cr(r,s.line);if(l==i.view.length-1?(u=i.viewTo-1,c=i.lineDiv.lastChild):(u=Qe(i.view[l+1].line)-1,c=i.view[l+1].node.previousSibling),!n)return!1;for(var p=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),u=!1;function c(){a&&(o+=s,u&&(o+=s),a=u=!1)}function l(e){e&&(c(),o+=e)}function p(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void l(n);var o,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(Ze(r,0),Ze(i+1,0),(g=+f,function(e){return e.id==g}));return void(d.length&&(o=d[0].find(0))&&l(Ge(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var m=0;m1&&f.length>1;)if(J(p)==J(f))p.pop(),f.pop(),u--;else{if(p[0]!=f[0])break;p.shift(),f.shift(),t++}for(var d=0,h=0,m=p[0],g=f[0],v=Math.min(m.length,g.length);da.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;p[p.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),p[0]=p[0].slice(d).replace(/\u200b+$/,"");var x=Ze(t,d),D=Ze(u,f.length?J(f).length-h:0);return p.length>1||p[0]||et(x,D)?(ho(r.doc,p,x,D,"+input"),!0):void 0},Ba.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ba.prototype.reset=function(){this.forceCompositionEnd()},Ba.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ba.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ba.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||$r(this.cm,(function(){return lr(e.cm)}))},Ba.prototype.setUneditable=function(e){e.contentEditable="false"},Ba.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Zr(this.cm,Fa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ba.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ba.prototype.onContextMenu=function(){},Ba.prototype.resetPosition=function(){},Ba.prototype.needsContentAttribute=!0;var Ha=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Ha.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())Oa({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ma(r);Oa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,V):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(i,"paste",(function(e){me(r,e)||Na(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!xn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){xn(e,t)||be(t)})),pe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ha.prototype.createField=function(e){this.wrapper=Pa(),this.textarea=this.wrapper.firstChild},Ha.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=gr(e);if(e.options.moveInputWithCursor){var i=Gn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ha.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ha.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&j(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ha.prototype.getField=function(){return this.textarea},Ha.prototype.supportsTouch=function(){return!1},Ha.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ha.prototype.blur=function(){this.textarea.blur()},Ha.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ha.prototype.receivedFocus=function(){this.slowPoll()},Ha.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ha.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ha.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Fe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="\u200b"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var u=0,c=Math.min(r.length,i.length);u1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ha.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ha.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ha.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=ur(n,e),c=r.scroller.scrollTop;if(o&&!p){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Zr(n,$i)(n.doc,wi(o),V);var l,f=i.style.cssText,d=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(l=window.scrollY),r.input.focus(),u&&window.scrollTo(null,l),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&m(),C?(De(e),pe(window,"mouseup",(function e(){de(window,"mouseup",e),setTimeout(g,20)}))):setTimeout(g,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="\u200b"+(e?i.value:"");i.value="\u21da",i.value=o,t.prevInput=e?"":"\u200b",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&m();var e=0;r.detectingSelectAll=setTimeout((function o(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"\u200b"==t.prevInput?Zr(n,ao)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())}),200)}}},Ha.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ha.prototype.setUneditable=function(){},Ha.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=xa&&i(e,t,n)}:i)}e.defineOption=n,e.Init=xa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,_i(e)}),!0),n("indentUnit",2,_i,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Oi(e),Bn(e),lr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Ze(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ho(e.doc,t,n[i],Ze(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=xa&&e.refresh()})),n("specialCharPlaceholder",Xt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!E),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ea(e),hi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Qo(t),i=n!=xa&&Qo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Sa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),hi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Ur(e)}),!0),n("scrollbarStyle","native",(function(e){qr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),hi(e)}),!0),n("firstLineNumber",1,hi,!0),n("lineNumberFormatter",(function(e){return e}),hi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(wr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,wa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Oi,!0),n("addModeClass",!1,Oi,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Oi,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(ka),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Zr(this,t[e])(this,n,i),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Ta(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Or(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=s;u0&&Qi(this.doc,r,new Di(o,c[r].to()),V)}}})),getTokenAt:function(e,t){return vt(this,e,t)},getLineTokens:function(e,t){return vt(this,Ze(e),t,!0)},getTokenTypeAt:function(e){e=at(this.doc,e);var t,n=pt(this,We(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=We(this.doc,e)}else r=e;return qn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Vt(r):0)},defaultTextHeight:function(){return nr(this.display)},defaultCharWidth:function(){return rr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=Gn(this,at(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var u=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&function(e,t){var n=Tr(e,t);null!=n.scrollTop&&Mr(e,n.scrollTop),null!=n.scrollLeft&&Pr(e,n.scrollLeft)}(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:ei(ca),triggerOnKeyPress:ei(pa),triggerOnKeyUp:la,triggerOnMouseDown:ei(ma),execCommand:function(e){if(ea.hasOwnProperty(e))return ea[e].call(null,this)},triggerElectric:ei((function(e){Ia(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=at(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5)&&sr(this),he(this,"refresh",this)})),swapDoc:ei((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Mi(this,e),Bn(this),this.display.input.reset(),Fr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(ka);var Wa="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Oo.prototype)Oo.prototype.hasOwnProperty(Ga)&&U(Wa,Ga)<0&&(ka.prototype[Ga]=function(e){return function(){return e.apply(this.doc,arguments)}}(Oo.prototype[Ga]));return ye(Oo),ka.inputStyles={textarea:Ha,contenteditable:Ba},ka.defineMode=function(e){ka.defaults.mode||"null"==e||(ka.defaults.mode=e),Pe.apply(this,arguments)},ka.defineMIME=function(e,t){je[e]=t},ka.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),ka.defineMIME("text/plain","null"),ka.defineExtension=function(e,t){ka.prototype[e]=t},ka.defineDocExtension=function(e,t){Oo.prototype[e]=t},ka.fromTextArea=function(e,t){if((t=t?L(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(u){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(de(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=ka((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=de,e.on=pe,e.wheelEventPixels=bi,e.Doc=Oo,e.splitLines=Oe,e.countColumn=R,e.findColumn=W,e.isWordChar=Z,e.Pass=z,e.signal=he,e.Line=Wt,e.changeEnd=Si,e.scrollbarModel=Vr,e.Pos=Ze,e.cmpPos=et,e.modes=Me,e.mimeModes=je,e.resolveMode=Le,e.getMode=Re,e.modeExtensions=Be,e.extendMode=Ue,e.copyState=ze,e.startState=qe,e.innerMode=Ve,e.commands=ea,e.keyMap=Vo,e.keyName=Jo,e.isModifierKey=Go,e.lookupKey=Wo,e.normalizeKeyMap=Ho,e.StringStream=He,e.SharedTextMarker=ko,e.TextMarker=wo,e.LineWidget=xo,e.e_preventDefault=be,e.e_stopPropagation=Ee,e.e_stop=De,e.addClass=I,e.contains=F,e.rmClass=k,e.keyNames=Ro}(ka),ka.version="5.52.2",ka}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,l=n(151);var p=/[&<>"]/,f=/[&<>"]/g,d={"&":"&","<":"<",">":">",'"':"""};function h(e){return d[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var g=n(109);t.lib={},t.lib.mdurl=n(152),t.lib.ucmicro=n(258),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(u,(function(e,t,n){return t||function(e,t){var n=0;return i(l,t)?l[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return p.test(e)?e.replace(f,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},function(e,t,n){"use strict";n.r(t),n.d(t,"print",(function(){return o}));var r=n(17),i=n(46);function o(e){return Object(r.c)(e,{leave:a})}var a={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return u(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=l("(",u(e.variableDefinitions,", "),")"),i=u(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?u([t,u([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+l(" = ",r)+l(" ",u(i," "))},SelectionSet:function(e){return c(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet;return u([l("",t,": ")+n+l("(",u(r,", "),")"),u(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+l(" ",u(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return u(["...",l("on ",t),u(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(l("(",u(r,", "),")")," ")+"on ".concat(n," ").concat(l("",u(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?Object(i.c)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+u(e.values,", ")+"]"},ObjectValue:function(e){return"{"+u(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+l("(",u(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return u(["schema",u(t," "),c(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:s((function(e){return u(["scalar",e.name,u(e.directives," ")]," ")})),ObjectTypeDefinition:s((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["type",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")})),FieldDefinition:s((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(d(n)?l("(\n",p(u(n,"\n")),"\n)"):l("(",u(n,", "),")"))+": "+r+l(" ",u(i," "))})),InputValueDefinition:s((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return u([t+": "+n,l("= ",r),u(i," ")]," ")})),InterfaceTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.fields;return u(["interface",t,u(n," "),c(r)]," ")})),UnionTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.types;return u(["union",t,u(n," "),r&&0!==r.length?"= "+u(r," | "):""]," ")})),EnumTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.values;return u(["enum",t,u(n," "),c(r)]," ")})),EnumValueDefinition:s((function(e){return u([e.name,u(e.directives," ")]," ")})),InputObjectTypeDefinition:s((function(e){var t=e.name,n=e.directives,r=e.fields;return u(["input",t,u(n," "),c(r)]," ")})),DirectiveDefinition:s((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(d(n)?l("(\n",p(u(n,"\n")),"\n)"):l("(",u(n,", "),")"))+(r?" repeatable":"")+" on "+u(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return u(["extend schema",u(t," "),c(n)]," ")},ScalarTypeExtension:function(e){return u(["extend scalar",e.name,u(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return u(["extend type",t,l("implements ",u(n," & ")),u(r," "),c(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return u(["extend interface",t,u(n," "),c(r)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return u(["extend union",t,u(n," "),r&&0!==r.length?"= "+u(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return u(["extend enum",t,u(n," "),c(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return u(["extend input",t,u(n," "),c(r)]," ")}};function s(e){return function(t){return u([t.description,e(t)],"\n")}}function u(e,t){return e?e.filter((function(e){return e})).join(t||""):""}function c(e){return e&&0!==e.length?"{\n"+p(u(e,"\n"))+"\n}":""}function l(e,t,n){return t?e+t+(n||""):""}function p(e){return e&&" "+e.replace(/\n/g,"\n ")}function f(e){return-1!==e.indexOf("\n")}function d(e){return e&&e.some(f)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(3),i={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},o=Object.freeze({});function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,a=void 0,u=Array.isArray(e),c=[e],p=-1,f=[],d=void 0,h=void 0,m=void 0,g=[],v=[],y=e;do{var b=++p===c.length,E=b&&0!==f.length;if(b){if(h=0===v.length?void 0:g[g.length-1],d=m,m=v.pop(),E){if(u)d=d.slice();else{for(var x={},D=0,C=Object.keys(d);D0||Object(s.a)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||Object(s.a)(0,"column in locationOffset is 1-indexed and must be positive")};Object(f.a)(d);var h=n(46),m=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function g(e,t){var n=new E(m.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:v,lookahead:y}}function v(){return this.lastToken=this.token,this.token=this.lookahead()}function y(){var e=this.token;if(e.kind!==m.EOF)do{e=e.next||(e.next=D(this,e))}while(e.kind===m.COMMENT);return e}function b(e){var t=e.kind;return t===m.BANG||t===m.DOLLAR||t===m.AMP||t===m.PAREN_L||t===m.PAREN_R||t===m.SPREAD||t===m.COLON||t===m.EQUALS||t===m.AT||t===m.BRACKET_L||t===m.BRACKET_R||t===m.BRACE_L||t===m.PIPE||t===m.BRACE_R}function E(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function x(e){return isNaN(e)?m.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function D(e,t){var n=e.source,r=n.body,i=r.length,o=function(e,t,n){var r=e.length,i=t;for(;i=i)return new E(m.EOF,i,i,a,s,t);var u=r.charCodeAt(o);switch(u){case 33:return new E(m.BANG,o,o+1,a,s,t);case 35:return function(e,t,n,r,i){var o,a=e.body,s=t;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new E(m.COMMENT,t,s,n,r,i,a.slice(t+1,s))}(n,o,a,s,t);case 36:return new E(m.DOLLAR,o,o+1,a,s,t);case 38:return new E(m.AMP,o,o+1,a,s,t);case 40:return new E(m.PAREN_L,o,o+1,a,s,t);case 41:return new E(m.PAREN_R,o,o+1,a,s,t);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new E(m.SPREAD,o,o+3,a,s,t);break;case 58:return new E(m.COLON,o,o+1,a,s,t);case 61:return new E(m.EQUALS,o,o+1,a,s,t);case 64:return new E(m.AT,o,o+1,a,s,t);case 91:return new E(m.BRACKET_L,o,o+1,a,s,t);case 93:return new E(m.BRACKET_R,o,o+1,a,s,t);case 123:return new E(m.BRACE_L,o,o+1,a,s,t);case 124:return new E(m.PIPE,o,o+1,a,s,t);case 125:return new E(m.BRACE_R,o,o+1,a,s,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,t,n,r,i){var o=e.body,a=o.length,s=t+1,u=0;for(;s!==a&&!isNaN(u=o.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new E(m.NAME,t,s,n,r,i,o.slice(t,s))}(n,o,a,s,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,n,r,i,o){var a=e.body,s=n,u=t,c=!1;45===s&&(s=a.charCodeAt(++u));if(48===s){if((s=a.charCodeAt(++u))>=48&&s<=57)throw l(e,u,"Invalid number, unexpected digit after 0: ".concat(x(s),"."))}else u=C(e,u,s),s=a.charCodeAt(u);46===s&&(c=!0,s=a.charCodeAt(++u),u=C(e,u,s),s=a.charCodeAt(u));69!==s&&101!==s||(c=!0,43!==(s=a.charCodeAt(++u))&&45!==s||(s=a.charCodeAt(++u)),u=C(e,u,s),s=a.charCodeAt(u));if(46===s||69===s||101===s)throw l(e,u,"Invalid number, expected digit but got: ".concat(x(s),"."));return new E(c?m.FLOAT:m.INT,t,u,r,i,o,a.slice(t,u))}(n,o,u,a,s,t);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?function(e,t,n,r,i,o){var a=e.body,s=t+3,u=s,c=0,p="";for(;s=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw l(e,i,"Invalid number, expected digit but got: ".concat(x(o),"."))}function w(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}Object(u.a)(E,(function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}));var S=n(9);function k(e,t){return new _(e,t).parseDocument()}function A(e,t){var n=new _(e,t);n.expectToken(m.SOF);var r=n.parseValueLiteral(!1);return n.expectToken(m.EOF),r}function T(e,t){var n=new _(e,t);n.expectToken(m.SOF);var r=n.parseTypeReference();return n.expectToken(m.EOF),r}var _=function(){function e(e,t){var n="string"===typeof e?new d(e):e;n instanceof d||Object(s.a)(0,"Must provide Source. Received: ".concat(Object(a.a)(n))),this._lexer=g(n),this._options=t||{}}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(m.NAME);return{kind:p.a.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:p.a.DOCUMENT,definitions:this.many(m.SOF,this.parseDefinition,m.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(m.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(m.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(m.BRACE_L))return{kind:p.a.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(m.NAME)&&(t=this.parseName()),{kind:p.a.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(m.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(m.PAREN_L,this.parseVariableDefinition,m.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:p.a.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(m.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(m.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(m.DOLLAR),{kind:p.a.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:p.a.SELECTION_SET,selections:this.many(m.BRACE_L,this.parseSelection,m.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(m.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(m.COLON)?(e=r,t=this.parseName()):t=r,{kind:p.a.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(m.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(m.PAREN_L,t,m.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(m.COLON),{kind:p.a.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:p.a.ARGUMENT,name:this.parseName(),value:(this.expectToken(m.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(m.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(m.NAME)?{kind:p.a.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:p.a.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e=this._lexer.token;return this.expectKeyword("fragment"),this._options.experimentalFragmentVariables?{kind:p.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}:{kind:p.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case m.BRACKET_L:return this.parseList(e);case m.BRACE_L:return this.parseObject(e);case m.INT:return this._lexer.advance(),{kind:p.a.INT,value:t.value,loc:this.loc(t)};case m.FLOAT:return this._lexer.advance(),{kind:p.a.FLOAT,value:t.value,loc:this.loc(t)};case m.STRING:case m.BLOCK_STRING:return this.parseStringLiteral();case m.NAME:return"true"===t.value||"false"===t.value?(this._lexer.advance(),{kind:p.a.BOOLEAN,value:"true"===t.value,loc:this.loc(t)}):"null"===t.value?(this._lexer.advance(),{kind:p.a.NULL,loc:this.loc(t)}):(this._lexer.advance(),{kind:p.a.ENUM,value:t.value,loc:this.loc(t)});case m.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:p.a.STRING,value:e.value,block:e.kind===m.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:p.a.LIST,values:this.any(m.BRACKET_L,(function(){return t.parseValueLiteral(e)}),m.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:p.a.OBJECT,fields:this.any(m.BRACE_L,(function(){return t.parseObjectField(e)}),m.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(m.COLON),{kind:p.a.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(m.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(m.AT),{kind:p.a.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(m.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(m.BRACKET_R),e={kind:p.a.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(m.BANG)?{kind:p.a.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:p.a.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===m.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(m.STRING)||this.peek(m.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token;this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.many(m.BRACE_L,this.parseOperationTypeDefinition,m.BRACE_R);return{kind:p.a.SCHEMA_DEFINITION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(m.COLON);var n=this.parseNamedType();return{kind:p.a.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:p.a.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:p.a.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(m.AMP);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(m.AMP)||this._options.allowLegacySDLImplementsInterfaces&&this.peek(m.NAME))}return e},t.parseFieldsDefinition=function(){return this._options.allowLegacySDLEmptyFields&&this.peek(m.BRACE_L)&&this._lexer.lookahead().kind===m.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(m.BRACE_L,this.parseFieldDefinition,m.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(m.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:p.a.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(m.PAREN_L,this.parseInputValueDef,m.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(m.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(m.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:p.a.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:p.a.INTERFACE_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:p.a.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(m.EQUALS)){this.expectOptionalToken(m.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(m.PIPE))}return e},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:p.a.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(m.BRACE_L,this.parseEnumValueDefinition,m.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:p.a.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:p.a.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(m.BRACE_L,this.parseInputValueDef,m.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===m.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(m.BRACE_L,this.parseOperationTypeDefinition,m.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:p.a.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:p.a.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:p.a.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:p.a.INTERFACE_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:p.a.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:p.a.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:p.a.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(m.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:p.a.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){this.expectOptionalToken(m.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(m.PIPE));return e},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==S.a[t.value])return t;throw this.unexpected(e)},t.loc=function(e){if(!this._options.noLocation)return new O(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw l(this._lexer.source,t.start,"Expected ".concat(e,", found ").concat(F(t)))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==m.NAME||t.value!==e)throw l(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(F(t)));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===m.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=e||this._lexer.token;return l(this._lexer.source,t.start,"Unexpected ".concat(F(t)))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},e}();function O(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function F(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}Object(u.a)(O,(function(){return{start:this.start,end:this.end}}));var N=n(17),I=Array.prototype.find?function(e,t){return Array.prototype.find.call(e,t)}:function(e,t){for(var n=0;n1&&"_"===e[0]&&"_"===e[1]?new c.a('Name "'.concat(e,'" must not begin with "__", which is reserved by GraphQL introspection.'),t):R.test(e)?void 0:new c.a('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'),t)}var z=n(0);function V(e,t){return e===t||(Object(z.L)(e)&&Object(z.L)(t)||!(!Object(z.J)(e)||!Object(z.J)(t)))&&V(e.ofType,t.ofType)}function q(e,t,n){return t===n||(Object(z.L)(n)?!!Object(z.L)(t)&&q(e,t.ofType,n.ofType):Object(z.L)(t)?q(e,t.ofType,n):Object(z.J)(n)?!!Object(z.J)(t)&&q(e,t.ofType,n.ofType):!Object(z.J)(t)&&!!(Object(z.C)(n)&&Object(z.N)(t)&&e.isPossibleType(n,t)))}function H(e,t,n){return t===n||(Object(z.C)(t)?Object(z.C)(n)?e.getPossibleTypes(t).some((function(t){return e.isPossibleType(n,t)})):e.isPossibleType(t,n):!!Object(z.C)(n)&&e.isPossibleType(n,t))}var W=n(35),G=n(44),K=n(24),J=n(12);function Q(e){return Object(G.a)(e,X)}function Y(e){if(!Q(e))throw new Error("Expected ".concat(Object(a.a)(e)," to be a GraphQL directive."));return e}var X=function(){function e(e){this.name=e.name,this.description=e.description,this.locations=e.locations,this.isRepeatable=null!=e.isRepeatable&&e.isRepeatable,this.extensions=e.extensions&&Object(W.a)(e.extensions),this.astNode=e.astNode,e.name||Object(s.a)(0,"Directive must be named."),Array.isArray(e.locations)||Object(s.a)(0,"@".concat(e.name," locations must be an Array."));var t=e.args||{};Object(K.a)(t)&&!Array.isArray(t)||Object(s.a)(0,"@".concat(e.name," args must be an object with argument names as keys.")),this.args=Object(L.a)(t).map((function(e){var t=e[0],n=e[1];return{name:t,description:void 0===n.description?null:n.description,type:n.type,defaultValue:n.defaultValue,extensions:n.extensions&&Object(W.a)(n.extensions),astNode:n.astNode}}))}var t=e.prototype;return t.toString=function(){return"@"+this.name},t.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:Object(z.i)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},e}();Object(f.a)(X),Object(u.a)(X);var $=new X({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[S.a.FIELD,S.a.FRAGMENT_SPREAD,S.a.INLINE_FRAGMENT],args:{if:{type:Object(z.e)(J.a),description:"Included when true."}}}),Z=new X({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[S.a.FIELD,S.a.FRAGMENT_SPREAD,S.a.INLINE_FRAGMENT],args:{if:{type:Object(z.e)(J.a),description:"Skipped when true."}}}),ee="No longer supported",te=new X({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[S.a.FIELD_DEFINITION,S.a.ENUM_VALUE],args:{reason:{type:J.e,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax (as specified by [CommonMark](https://commonmark.org/).",defaultValue:ee}}}),ne=Object.freeze([$,Z,te]);function re(e){return Q(e)&&ne.some((function(t){return t.name===e.name}))}var ie=n(11);function oe(e){return Object(G.a)(e,se)}function ae(e){if(!oe(e))throw new Error("Expected ".concat(Object(a.a)(e)," to be a GraphQL schema."));return e}var se=function(){function e(e){e&&e.assumeValid?this.__validationErrors=[]:(this.__validationErrors=void 0,Object(K.a)(e)||Object(s.a)(0,"Must provide configuration object."),!e.types||Array.isArray(e.types)||Object(s.a)(0,'"types" must be Array if provided but got: '.concat(Object(a.a)(e.types),".")),!e.directives||Array.isArray(e.directives)||Object(s.a)(0,'"directives" must be Array if provided but got: '+"".concat(Object(a.a)(e.directives),".")),!e.allowedLegacyNames||Array.isArray(e.allowedLegacyNames)||Object(s.a)(0,'"allowedLegacyNames" must be Array if provided but got: '+"".concat(Object(a.a)(e.allowedLegacyNames),"."))),this.extensions=e.extensions&&Object(W.a)(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=e.extensionASTNodes,this.__allowedLegacyNames=e.allowedLegacyNames||[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=e.directives||ne;var t=[this._queryType,this._mutationType,this._subscriptionType,ie.__Schema].concat(e.types),n=Object.create(null);n=t.reduce(ue,n),n=this._directives.reduce(ce,n),this._typeMap=n,this._possibleTypeMap=Object.create(null),this._implementations=Object.create(null);for(var r=0,i=Object(P.a)(this._typeMap);r0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(e){var t=this._schema;switch(e.kind){case p.a.SELECTION_SET:var n=Object(z.A)(this.getType());this._parentTypeStack.push(Object(z.D)(n)?n:void 0);break;case p.a.FIELD:var r,i,o=this.getParentType();o&&(r=this._getFieldDef(t,o,e))&&(i=r.type),this._fieldDefStack.push(r),this._typeStack.push(Object(z.O)(i)?i:void 0);break;case p.a.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case p.a.OPERATION_DEFINITION:var a;"query"===e.operation?a=t.getQueryType():"mutation"===e.operation?a=t.getMutationType():"subscription"===e.operation&&(a=t.getSubscriptionType()),this._typeStack.push(Object(z.N)(a)?a:void 0);break;case p.a.INLINE_FRAGMENT:case p.a.FRAGMENT_DEFINITION:var s=e.typeCondition,u=s?ke(t,s):Object(z.A)(this.getType());this._typeStack.push(Object(z.O)(u)?u:void 0);break;case p.a.VARIABLE_DEFINITION:var c=ke(t,e.type);this._inputTypeStack.push(Object(z.G)(c)?c:void 0);break;case p.a.ARGUMENT:var l,f,d=this.getDirective()||this.getFieldDef();d&&(l=I(d.args,(function(t){return t.name===e.name.value})))&&(f=l.type),this._argument=l,this._defaultValueStack.push(l?l.defaultValue:void 0),this._inputTypeStack.push(Object(z.G)(f)?f:void 0);break;case p.a.LIST:var h=Object(z.B)(this.getInputType()),m=Object(z.J)(h)?h.ofType:h;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Object(z.G)(m)?m:void 0);break;case p.a.OBJECT_FIELD:var g,v,y=Object(z.A)(this.getInputType());Object(z.F)(y)&&(v=y.getFields()[e.name.value])&&(g=v.type),this._defaultValueStack.push(v?v.defaultValue:void 0),this._inputTypeStack.push(Object(z.G)(g)?g:void 0);break;case p.a.ENUM:var b,E=Object(z.A)(this.getInputType());Object(z.E)(E)&&(b=E.getValue(e.value)),this._enumValue=b}},t.leave=function(e){switch(e.kind){case p.a.SELECTION_SET:this._parentTypeStack.pop();break;case p.a.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case p.a.DIRECTIVE:this._directive=null;break;case p.a.OPERATION_DEFINITION:case p.a.INLINE_FRAGMENT:case p.a.FRAGMENT_DEFINITION:this._typeStack.pop();break;case p.a.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case p.a.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case p.a.LIST:case p.a.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case p.a.ENUM:this._enumValue=null}},e}();function Te(e,t,n){var r=n.name.value;return r===ie.SchemaMetaFieldDef.name&&e.getQueryType()===t?ie.SchemaMetaFieldDef:r===ie.TypeMetaFieldDef.name&&e.getQueryType()===t?ie.TypeMetaFieldDef:r===ie.TypeNameMetaFieldDef.name&&Object(z.D)(t)?ie.TypeNameMetaFieldDef:Object(z.N)(t)||Object(z.H)(t)?t.getFields()[r]:void 0}var _e=n(127);function Oe(e){var t=Object.create(null);return{OperationDefinition:function(n){var r=n.name;return r&&(t[r.value]?e.reportError(new c.a(function(e){return'There can be only one operation named "'.concat(e,'".')}(r.value),[t[r.value],r])):t[r.value]=r),!1},FragmentDefinition:function(){return!1}}}function Fe(e){var t=0;return{Document:function(e){t=e.definitions.filter((function(e){return e.kind===p.a.OPERATION_DEFINITION})).length},OperationDefinition:function(n){!n.name&&t>1&&e.reportError(new c.a("This anonymous operation must be the only defined operation.",n))}}}function Ne(e){return{OperationDefinition:function(t){var n;"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new c.a((n=t.name&&t.name.value)?'Subscription "'.concat(n,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",t.selectionSet.selections.slice(1)))}}}function Ie(e,t){var n="string"===typeof e?[e,t]:[void 0,e],r=n[0],i=n[1],o=" Did you mean ";switch(r&&(o+=r+" "),i.length){case 0:return"";case 1:return o+i[0]+"?";case 2:return o+i[0]+" or "+i[1]+"?"}var a=i.slice(0,5),s=a.pop();return o+a.join(", ")+", or "+s+"?"}function Me(e,t){for(var n=Object.create(null),r=e.length/2,i=0;i1&&l>1&&r[c-1]===i[l-2]&&r[c-2]===i[l-1]&&(n[c][l]=Math.min(n[c][l],n[c-2][l-2]+p))}return n[o][a]}var Pe=n(43);function Le(e){for(var t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null),i=0,o=e.getDocument().definitions;i1)for(var l=0;l0)return[[t,e.map((function(e){return e[0]}))],e.reduce((function(e,t){var n=t[1];return e.concat(n)}),[n]),e.reduce((function(e,t){var n=t[2];return e.concat(n)}),[r])]}(function(e,t,n,r,i,o,a,s){var u=[],c=Nt(e,t,i,o),l=c[0],p=c[1],f=Nt(e,t,a,s),d=f[0],h=f[1];if(Ot(e,u,t,n,r,l,d),0!==h.length)for(var m=Object.create(null),g=0;g0&&e.reportError(new c.a("Must provide only one schema definition.",t)),++r)}}}function Bt(e){return"There can be only one ".concat(e," type in schema.")}function Ut(e){return"Type for ".concat(e," already defined in the schema. It cannot be redefined.")}function zt(e){var t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(t){if(t.operationTypes)for(var i=0,o=t.operationTypes||[];i2&&void 0!==arguments[2]?arguments[2]:nn,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Ae(e),i=arguments.length>4?arguments[4]:void 0;t||Object(s.a)(0,"Must provide document"),pe(e);var o=Object.freeze({}),a=[],u=i&&i.maxErrors,l=new un(e,t,r,(function(e){if(null!=u&&a.length>=u)throw a.push(new c.a("Too many validation errors, error limit reached. Validation aborted.")),o;a.push(e)})),p=Object(N.d)(n.map((function(e){return e(l)})));try{Object(N.c)(t,Object(N.e)(r,p))}catch(f){if(f!==o)throw f}return a}function ln(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rn,r=[],i=new sn(e,t,(function(e){r.push(e)})),o=n.map((function(e){return e(i)}));return Object(N.c)(e,Object(N.d)(o)),r}var pn=n(38);var fn=n(103);function dn(e,t){return{prev:e,key:t}}function hn(e){for(var t=[],n=e;n;)t.push(n.key),n=n.prev;return t.reverse()}function mn(e,t,n){return e&&Array.isArray(e.path)?e:new c.a(e&&e.message,e&&e.nodes||t,e&&e.source,e&&e.positions,n,e)}function gn(e,t){if("query"===t.operation){var n=e.getQueryType();if(!n)throw new c.a("Schema does not define the required query root type.",t);return n}if("mutation"===t.operation){var r=e.getMutationType();if(!r)throw new c.a("Schema is not configured for mutations.",t);return r}if("subscription"===t.operation){var i=e.getSubscriptionType();if(!i)throw new c.a("Schema is not configured for subscriptions.",t);return i}throw new c.a("Can only have query, mutation and subscription operations.",t)}function vn(e){return e.map((function(e){return"number"===typeof e?"["+e.toString()+"]":"."+e})).join("")}function yn(e,t,n){if(e){if(Object(z.L)(t)){if(e.kind===p.a.NULL)return;return yn(e,t.ofType,n)}if(e.kind===p.a.NULL)return null;if(e.kind===p.a.VARIABLE){var r=e.name.value;if(!n||Object(pt.a)(n[r]))return;var i=n[r];if(null===i&&Object(z.L)(t))return;return i}if(Object(z.J)(t)){var o=t.ofType;if(e.kind===p.a.LIST){for(var s=[],u=0,c=e.values;u2&&void 0!==arguments[2]?arguments[2]:xn;return Dn(e,t,n)}function xn(e,t,n){var r="Invalid value "+Object(a.a)(t);throw e.length>0&&(r+=' at "value'.concat(vn(e),'": ')),n.message=r+": "+n.message,n}function Dn(e,t,n,r){if(Object(z.L)(t))return null!=e?Dn(e,t.ofType,n,r):void n(hn(r),e,new c.a("Expected non-nullable type ".concat(Object(a.a)(t)," not to be null.")));if(null==e)return null;if(Object(z.J)(t)){var i=t.ofType;if(Object(pn.e)(e)){var o=[];return Object(pn.b)(e,(function(e,t){o.push(Dn(e,i,n,dn(r,t)))})),o}return[Dn(e,i,n,r)]}if(Object(z.F)(t)){if(!Object(K.a)(e))return void n(hn(r),e,new c.a("Expected type ".concat(t.name," to be an object.")));for(var s={},u=t.getFields(),l=0,p=Object(P.a)(u);l0&&(i+=' at "'.concat(u).concat(vn(e),'"')),r(new c.a(i+"; "+n.message,s,void 0,void 0,void 0,n.originalError))}))},s=0;s=i)throw new c.a("Too many errors processing variables, error limit reached. Execution aborted.");o.push(e)}));if(0===o.length)return{coerced:s}}catch(u){o.push(u)}return{errors:o}}function wn(e,t,n){for(var r={},i=Object(lt.a)(t.arguments||[],(function(e){return e.name.value})),o=0,s=e.args;o0)return{errors:p};try{t=k(r)}catch(l){return{errors:[l]}}var f=cn(n,t);return f.length>0?{errors:f}:An({schema:n,document:t,rootValue:i,contextValue:o,variableValues:a,operationName:s,fieldResolver:u,typeResolver:c})}var Zn=n(85),er=n(131);function tr(e,t,n){var r,i,o,a,s,u,c=Object(pn.c)(e);function l(e){return e.done?e:nr(e.value,t).then(rr,i)}if("function"===typeof c.return&&(r=c.return,i=function(e){var t=function(){return Promise.reject(e)};return r.call(c).then(t,t)}),n){var p=n;o=function(e){return nr(e,p).then(rr,i)}}return a={next:function(){return c.next().then(l,o)},return:function(){return r?r.call(c).then(l,o):Promise.resolve({value:void 0,done:!0})},throw:function(e){return"function"===typeof c.throw?c.throw(e).then(l,o):Promise.reject(e).catch(i)}},s=pn.a,u=function(){return this},s in a?Object.defineProperty(a,s,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[s]=u,a}function nr(e,t){return new Promise((function(n){return n(t(e))}))}function rr(e){return{value:e,done:!1}}function ir(e,t,n,r,i,o,a,s){return 1===arguments.length?ar(e):ar({schema:e,document:t,rootValue:n,contextValue:r,variableValues:i,operationName:o,fieldResolver:a,subscribeFieldResolver:s})}function or(e){if(e instanceof c.a)return{errors:[e]};throw e}function ar(e){var t=e.schema,n=e.document,r=e.rootValue,i=e.contextValue,o=e.variableValues,a=e.operationName,s=e.fieldResolver,u=e.subscribeFieldResolver,c=sr(t,n,r,i,o,a,u),l=function(e){return An(t,n,e,i,o,a,s)};return c.then((function(e){return Object(pn.d)(e)?tr(e,l,or):e}))}function sr(e,t,n,r,i,o,s){_n(e,t,i);try{var u=On(e,t,n,r,i,o,s);if(Array.isArray(u))return Promise.resolve({errors:u});var l=gn(e,u.operation),p=Nn(u,l,u.operation.selectionSet,Object.create(null),Object.create(null)),f=Object.keys(p)[0],d=p[f],h=d[0].name.value,m=Qn(e,l,h);if(!m)throw new c.a('The subscription field "'.concat(h,'" is not defined.'),d);var g=m.subscribe||u.fieldResolver,v=dn(void 0,f),y=Pn(u,m,d,l,v),b=Ln(u,m,d,g,n,y);return Promise.resolve(b).then((function(e){if(e instanceof Error)return{errors:[mn(e,d,hn(v))]};if(Object(pn.d)(e))return e;throw new Error("Subscription field must return Async Iterable. Received: "+Object(a.a)(e))}))}catch(E){return E instanceof c.a?Promise.resolve({errors:[E]}):Promise.reject(E)}}function ur(e){e||Object(s.a)(0,"Received null or undefined error.");var t=e.message||"An unknown error occurred.",n=e.locations,r=e.path,i=e.extensions;return i?{message:t,locations:n,path:r,extensions:i}:{message:t,locations:n,path:r}}function cr(e){var t=!(e&&!1===e.descriptions);return"\n query IntrospectionQuery {\n __schema {\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n directives {\n name\n ".concat(t?"description":"","\n locations\n args {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ").concat(t?"description":"","\n fields(includeDeprecated: true) {\n name\n ").concat(t?"description":"","\n args {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ").concat(t?"description":"","\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ").concat(t?"description":"","\n type { ...TypeRef }\n defaultValue\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n ")}var lr=cr(),pr=n(216);function fr(e,t){var n=An(e,k(cr(t)));return!o(n)&&!n.errors&&n.data||Object(Se.a)(0),n.data}var dr=n(27);function hr(e,t){Object(K.a)(e)&&Object(K.a)(e.__schema)||Object(s.a)(0,'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: '+Object(a.a)(e));for(var n=e.__schema,r=Object(dr.a)(n.types,(function(e){return e.name}),(function(e){return function(e){if(e&&e.name&&e.kind)switch(e.kind){case ie.TypeKind.SCALAR:return n=e,new z.g({name:n.name,description:n.description});case ie.TypeKind.OBJECT:return function(e){if(!e.interfaces)throw new Error("Introspection result missing interfaces: "+Object(a.a)(e));return new z.f({name:e.name,description:e.description,interfaces:function(){return e.interfaces.map(g)},fields:function(){return v(e)}})}(e);case ie.TypeKind.INTERFACE:return t=e,new z.c({name:t.name,description:t.description,fields:function(){return v(t)}});case ie.TypeKind.UNION:return function(e){if(!e.possibleTypes)throw new Error("Introspection result missing possibleTypes: "+Object(a.a)(e));return new z.h({name:e.name,description:e.description,types:function(){return e.possibleTypes.map(m)}})}(e);case ie.TypeKind.ENUM:return function(e){if(!e.enumValues)throw new Error("Introspection result missing enumValues: "+Object(a.a)(e));return new z.a({name:e.name,description:e.description,values:Object(dr.a)(e.enumValues,(function(e){return e.name}),(function(e){return{description:e.description,deprecationReason:e.deprecationReason}}))})}(e);case ie.TypeKind.INPUT_OBJECT:return function(e){if(!e.inputFields)throw new Error("Introspection result missing inputFields: "+Object(a.a)(e));return new z.b({name:e.name,description:e.description,fields:function(){return y(e.inputFields)}})}(e)}var t;var n;throw new Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema:"+Object(a.a)(e))}(e)})),i=0,o=[].concat(J.g,ie.introspectionTypes);i0?function(){return n.map((function(e){return t.getNamedType(e)}))}:[],o=r&&r.length>0?function(){return yr(r,(function(e){return t.buildField(e)}))}:Object.create(null);return new z.f({name:e.name.value,description:Er(e,this._options),interfaces:i,fields:o,astNode:e})},t._makeInterfaceDef=function(e){var t=this,n=e.fields,r=n&&n.length>0?function(){return yr(n,(function(e){return t.buildField(e)}))}:Object.create(null);return new z.c({name:e.name.value,description:Er(e,this._options),fields:r,astNode:e})},t._makeEnumDef=function(e){var t=this,n=e.values||[];return new z.a({name:e.name.value,description:Er(e,this._options),values:yr(n,(function(e){return t.buildEnumValue(e)})),astNode:e})},t._makeUnionDef=function(e){var t=this,n=e.types,r=n&&n.length>0?function(){return n.map((function(e){return t.getNamedType(e)}))}:[];return new z.h({name:e.name.value,description:Er(e,this._options),types:r,astNode:e})},t._makeScalarDef=function(e){return new z.g({name:e.name.value,description:Er(e,this._options),astNode:e})},t._makeInputObjectDef=function(e){var t=this,n=e.fields;return new z.b({name:e.name.value,description:Er(e,this._options),fields:n?function(){return yr(n,(function(e){return t.buildInputField(e)}))}:Object.create(null),astNode:e})},e}();function yr(e,t){return Object(dr.a)(e,(function(e){return e.name.value}),t)}function br(e){var t=Sn(te,e);return t&&t.reason}function Er(e,t){if(e.description)return e.description.value;if(t&&t.commentDescriptions){var n=function(e){var t=e.loc;if(!t)return;var n=[],r=t.startToken.prev;for(;r&&r.kind===m.COMMENT&&r.next&&r.prev&&r.line+1===r.next.line&&r.line!==r.prev.line;){var i=String(r.value);n.push(i),r=r.prev}return n.reverse().join("\n")}(e);if(void 0!==n)return Object(h.a)("\n"+n)}}function xr(e,t){return mr(k(e,t),t)}var Dr=n(47);function Cr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wr(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:"";return 0===t.length?"":t.every((function(e){return!e.description}))?"("+t.map(Hr).join(", ")+")":"(\n"+t.map((function(t,r){return Gr(e,t," "+n,!r)+" "+n+Hr(t)})).join("\n")+"\n"+n+")"}function Hr(e){var t=Object(Mr.a)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=" = ".concat(Object(Be.print)(t))),n}function Wr(e){if(!e.isDeprecated)return"";var t=e.deprecationReason,n=Object(Mr.a)(t,J.e);return n&&""!==t&&t!==ee?" @deprecated(reason: "+Object(Be.print)(n)+")":" @deprecated"}function Gr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!t.description)return"";var i=Jr(t.description,120-n.length);if(e&&e.commentDescriptions)return Kr(i,n,r);var o=i.join("\n"),a=o.length>70,s=Object(h.c)(o,"",a),u=n&&!r?"\n"+n:n;return u+s.replace(/\n/g,"\n"+n)+"\n"}function Kr(e,t,n){for(var r=t&&!n?"\n":"",i=0;i0&&(s+=' at "value'.concat(vn(u),'"')),i.push(new c.a(s+": "+o.message,n,void 0,void 0,void 0,o.originalError))}));return i.length>0?{errors:i,value:void 0}:{errors:void 0,value:o}}function Xr(e,t){var n=Yr(e,t).errors;return n?n.map((function(e){return e.message})):[]}function $r(e,t){var n=new se({}),r={kind:p.a.DOCUMENT,definitions:[]},i=new Ae(n,void 0,e),o=new un(n,r,i),a=ht(o);return Object(N.c)(t,Object(N.e)(i,a)),o.getErrors()}function Zr(e){return{kind:"Document",definitions:j(e,(function(e){return e.definitions}))}}function ei(e){var t,n=[],r=Object.create(null),i=new Map,o=Object.create(null),a=0;Object(N.c)(e,{OperationDefinition:function(e){t=ti(e),n.push(e),i.set(e,a++)},FragmentDefinition:function(e){t=e.name.value,r[t]=e,i.set(e,a++)},FragmentSpread:function(e){var n=e.name.value;(o[t]||(o[t]=Object.create(null)))[n]=!0}});for(var s=Object.create(null),u=0;u0&&(n="\n"+n);var i=n[n.length-1];return('"'===i&&'\\"""'!==n.slice(-4)||"\\"===i)&&(n+="\n"),'"""'+n+'"""'}function oi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ai(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var si=Object.freeze({TYPE_REMOVED:"TYPE_REMOVED",TYPE_CHANGED_KIND:"TYPE_CHANGED_KIND",TYPE_REMOVED_FROM_UNION:"TYPE_REMOVED_FROM_UNION",VALUE_REMOVED_FROM_ENUM:"VALUE_REMOVED_FROM_ENUM",REQUIRED_INPUT_FIELD_ADDED:"REQUIRED_INPUT_FIELD_ADDED",INTERFACE_REMOVED_FROM_OBJECT:"INTERFACE_REMOVED_FROM_OBJECT",FIELD_REMOVED:"FIELD_REMOVED",FIELD_CHANGED_KIND:"FIELD_CHANGED_KIND",REQUIRED_ARG_ADDED:"REQUIRED_ARG_ADDED",ARG_REMOVED:"ARG_REMOVED",ARG_CHANGED_KIND:"ARG_CHANGED_KIND",DIRECTIVE_REMOVED:"DIRECTIVE_REMOVED",DIRECTIVE_ARG_REMOVED:"DIRECTIVE_ARG_REMOVED",REQUIRED_DIRECTIVE_ARG_ADDED:"REQUIRED_DIRECTIVE_ARG_ADDED",DIRECTIVE_LOCATION_REMOVED:"DIRECTIVE_LOCATION_REMOVED"}),ui=Object.freeze({VALUE_ADDED_TO_ENUM:"VALUE_ADDED_TO_ENUM",TYPE_ADDED_TO_UNION:"TYPE_ADDED_TO_UNION",OPTIONAL_INPUT_FIELD_ADDED:"OPTIONAL_INPUT_FIELD_ADDED",OPTIONAL_ARG_ADDED:"OPTIONAL_ARG_ADDED",INTERFACE_ADDED_TO_OBJECT:"INTERFACE_ADDED_TO_OBJECT",ARG_DEFAULT_VALUE_CHANGE:"ARG_DEFAULT_VALUE_CHANGE"});function ci(e,t){return pi(e,t).filter((function(e){return e.type in si}))}function li(e,t){return pi(e,t).filter((function(e){return e.type in ui}))}function pi(e,t){return[].concat(function(e,t){for(var n=[],r=Di(Object(P.a)(e.getTypeMap()),Object(P.a)(t.getTypeMap())),i=0,o=r.removed;i=0||(i[n]=e[n]);return i}var m=n(192),g=n.n(m),v=n(26),y=n.n(v),b=n(66),E={notify:function(){}};var x=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=E}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=function(){var e=[],t=[];return{clear:function(){t=null,e=null},notify:function(){for(var n=e=t,r=0;r, or explicitly pass "'+_+'" as a prop to "'+o+'".'),r.initSelector(),r.initSubscription(),r}r(s,n);var u=s.prototype;return u.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[I]=t||this.context[I],e},u.componentDidMount=function(){A&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},u.componentWillReceiveProps=function(e){this.selector.run(e)},u.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},u.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=S,this.store=null,this.selector.run=S,this.selector.shouldComponentUpdate=!1},u.getWrappedInstance=function(){return y()(F,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+m+"() call."),this.wrappedInstance},u.setWrappedInstance=function(e){this.wrappedInstance=e},u.initSelector=function(){var t=e(this.store.dispatch,a);this.selector=function(e,t){var n={run:function(r){try{var i=e(t.getState(),r);(i!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=i,n.error=null)}catch(o){n.shouldComponentUpdate=!0,n.error=o}}};return n}(t,this.store),this.selector.run(this.props)},u.initSubscription=function(){if(A){var e=(this.propsMode?this.props:this.context)[I];this.subscription=new x(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},u.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(w)):this.notifyNestedSubs()},u.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},u.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},u.addExtraProps=function(e){if(!F&&!E&&(!this.propsMode||!this.subscription))return e;var t=d({},e);return F&&(t.ref=this.setWrappedInstance),E&&(t[E]=this.renderCount++),this.propsMode&&this.subscription&&(t[I]=this.subscription),t},u.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(i.createElement)(t,this.addExtraProps(e.props))},s}(i.Component);return D&&(s.prototype.UNSAFE_componentWillReceiveProps=s.prototype.componentWillReceiveProps,delete s.prototype.componentWillReceiveProps),s.WrappedComponent=t,s.displayName=o,s.childContextTypes=P,s.contextTypes=j,s.propTypes=j,g()(s,t)}}var A=Object.prototype.hasOwnProperty;function T(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function _(e,t){if(T(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(var i=0;i=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function V(e,t){return e===t}var q=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?k:n,i=t.mapStateToPropsFactories,o=void 0===i?j:i,a=t.mapDispatchToPropsFactories,s=void 0===a?M:a,u=t.mergePropsFactories,c=void 0===u?L:u,l=t.selectorFactory,p=void 0===l?U:l;return function(e,t,n,i){void 0===i&&(i={});var a=i,u=a.pure,l=void 0===u||u,f=a.areStatesEqual,m=void 0===f?V:f,g=a.areOwnPropsEqual,v=void 0===g?_:g,y=a.areStatePropsEqual,b=void 0===y?_:y,E=a.areMergedPropsEqual,x=void 0===E?_:E,D=h(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),C=z(e,o,"mapStateToProps"),w=z(t,s,"mapDispatchToProps"),S=z(n,c,"mergeProps");return r(p,d({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:C,initMapDispatchToProps:w,initMergeProps:S,pure:l,areStatesEqual:m,areOwnPropsEqual:v,areStatePropsEqual:b,areMergedPropsEqual:x},D))}}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(14),i=Object.setPrototypeOf,o=void 0===i?function(e,t){return e.__proto__=t,e}:i,a=function(e){function t(n){void 0===n&&(n="Invariant Violation");var r=e.call(this,"number"===typeof n?"Invariant Violation: "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name="Invariant Violation",o(r,t.prototype),r}return Object(r.b)(t,e),t}(Error);function s(e,t){if(!e)throw new a(t)}function u(e){return function(){return console[e].apply(console,arguments)}}!function(e){e.warn=u("warn"),e.error=u("error")}(s||(s={}));var c={env:{}};if("object"===typeof e)c=e;else try{Function("stub","process = stub")(c)}catch(l){}}).call(this,n(69))},function(e,t,n){"use strict";function r(e,t){return e===t}function i(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:r,n=null,o=null;return function(){return i(t,n,arguments)||(o=e.apply(null,arguments)),n=arguments,o}}function a(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"===typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:u;if("object"!==typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map((function(t){return e[t]})),(function(){for(var e=arguments.length,t=Array(e),r=0;r>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?a(e)+t:t}function u(){return!0}function c(e,t,n){return(0===e&&!d(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function l(e,t){return f(e,t,0)}function p(e,t){return f(e,t,t)}function f(e,t,n){return void 0===e?n:d(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function d(e){return e<0||0===e&&1/e===-1/0}function h(e){return Boolean(e&&e["@@__IMMUTABLE_ITERABLE__@@"])}function m(e){return Boolean(e&&e["@@__IMMUTABLE_KEYED__@@"])}function g(e){return Boolean(e&&e["@@__IMMUTABLE_INDEXED__@@"])}function v(e){return m(e)||g(e)}var y=function(e){return h(e)?e:R(e)},b=function(e){function t(e){return m(e)?e:B(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(y),E=function(e){function t(e){return g(e)?e:U(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(y),x=function(e){function t(e){return h(e)&&!v(e)?e:z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(y);y.Keyed=b,y.Indexed=E,y.Set=x;function D(e){return Boolean(e&&e["@@__IMMUTABLE_SEQ__@@"])}function C(e){return Boolean(e&&e["@@__IMMUTABLE_RECORD__@@"])}function w(e){return h(e)||C(e)}var S="@@__IMMUTABLE_ORDERED__@@";function k(e){return Boolean(e&&e[S])}var A="function"===typeof Symbol&&Symbol.iterator,T=A||"@@iterator",_=function(e){this.next=e};function O(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function F(){return{value:void 0,done:!0}}function N(e){return!!j(e)}function I(e){return e&&"function"===typeof e.next}function M(e){var t=j(e);return t&&t.call(e)}function j(e){var t=e&&(A&&e[A]||e["@@iterator"]);if("function"===typeof t)return t}_.prototype.toString=function(){return"[Iterator]"},_.KEYS=0,_.VALUES=1,_.ENTRIES=2,_.prototype.inspect=_.prototype.toSource=function(){return this.toString()},_.prototype[T]=function(){return this};var P=Object.prototype.hasOwnProperty;function L(e){return!(!Array.isArray(e)&&"string"!==typeof e)||e&&"object"===typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var R=function(e){function t(e){return null===e||void 0===e?G():w(e)?e.toSeq():function(e){var t=Q(e);if(t)return t;if("object"===typeof e)return new q(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new _((function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return O(e,o[0],o[1])}))}return this.__iteratorUncached(e,t)},t}(y),B=function(e){function t(e){return null===e||void 0===e?G().toKeyedSeq():h(e)?m(e)?e.toSeq():e.fromEntrySeq():C(e)?e.toSeq():K(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(R),U=function(e){function t(e){return null===e||void 0===e?G():h(e)?m(e)?e.entrySeq():e.toIndexedSeq():C(e)?e.toSeq().entrySeq():J(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(R),z=function(e){function t(e){return(h(e)&&!v(e)?e:U(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(R);R.isSeq=D,R.Keyed=B,R.Set=z,R.Indexed=U,R.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var V=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[s(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new _((function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return O(e,o,n[o])}))},t}(U),q=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return P.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[t?i-++o:o++];if(!1===e(n[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new _((function(){if(o===i)return{value:void 0,done:!0};var a=r[t?i-++o:o++];return O(e,a,n[a])}))},t}(B);q.prototype[S]=!0;var H,W=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=M(this._collection),r=0;if(I(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=M(this._collection);if(!I(n))return new _(F);var r=0;return new _((function(){var t=n.next();return t.done?t:O(e,r++,t.value)}))},t}(U);function G(){return H||(H=new V([]))}function K(e){var t=Array.isArray(e)?new V(e):N(e)?new W(e):void 0;if(t)return t.fromEntrySeq();if("object"===typeof e)return new q(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function J(e){var t=Q(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function Q(e){return L(e)?new V(e):N(e)?new W(e):void 0}function Y(e){return Boolean(e&&e["@@__IMMUTABLE_MAP__@@"])}function X(e){return Y(e)&&k(e)}function $(e){return Boolean(e&&"function"===typeof e.equals&&"function"===typeof e.hashCode)}function Z(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"===typeof e.valueOf&&"function"===typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!!($(e)&&$(t)&&e.equals(t))}var ee="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function te(e){return e>>>1&1073741824|3221225471&e}var ne=Object.prototype.valueOf;function re(e){switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return function(e){if(e!==e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return te(t)}(e);case"string":return e.length>pe?function(e){var t=he[e];void 0===t&&(t=ie(e),de===fe&&(de=0,he={}),de++,he[e]=t);return t}(e):ie(e);case"object":case"function":return null===e?1108378658:"function"===typeof e.hashCode?te(e.hashCode(e)):(e.valueOf!==ne&&"function"===typeof e.valueOf&&(e=e.valueOf(e)),function(e){var t;if(ue&&void 0!==(t=se.get(e)))return t;if(void 0!==(t=e[le]))return t;if(!ae){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[le]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++ce,1073741824&ce&&(ce=0);if(ue)se.set(e,t);else{if(void 0!==oe&&!1===oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ae)Object.defineProperty(e,le,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[le]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[le]=t}}return t}(e));case"undefined":return 1108378659;default:if("function"===typeof e.toString)return ie(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function ie(e){for(var t=0,n=0;n=0&&(d.get=function(t,n){return(t=s(this,t))>=0&&tu)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:O(t,s-1,0===t?void 0:e.value[1],e)}))},d}function we(e,t,n,r){var i=Me(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate((function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(2,o),u=!0,c=0;return new _((function(){var e,o,l;do{if((e=s.next()).done)return r||1===i?e:O(i,c++,0===i?void 0:e.value[1],e);var p=e.value;o=p[0],l=p[1],u&&(u=t.call(n,l,o,a))}while(u);return 2===i?e:O(i,o,l,e)}))},i}function Se(e,t){var n=m(e),r=[e].concat(t).map((function(e){return h(e)?n&&(e=b(e)):e=n?K(e):J(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&m(i)||g(e)&&g(i))return i}var o=new V(r);return n?o=o.toKeyedSeq():g(e)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),o}function ke(e,t,n){var r=Me(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function e(u,c){u.__iterate((function(o,u){return(!t||c0}function Oe(e,t,n,r){var i=Me(e),o=new V(n).map((function(e){return e.size}));return i.size=r?o.max():o.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map((function(e){return e=y(e),M(i?e.reverse():e)})),a=0,s=!1;return new _((function(){var n;return s||(n=o.map((function(e){return e.next()})),s=r?n.every((function(e){return e.done})):n.some((function(e){return e.done}))),s?{value:void 0,done:!0}:O(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function Fe(e,t){return e===t?e:D(e)?t:e.constructor(t)}function Ne(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ie(e){return m(e)?b:g(e)?E:x}function Me(e){return Object.create((m(e)?B:g(e)?U:z).prototype)}function je(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):R.prototype.cacheResult.call(this)}function Pe(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e0;)t[n]=arguments[n+1];if("function"!==typeof e)throw new TypeError("Invalid merger function: "+e);return ot(this,t,e)}function ot(e,t,n){for(var i=[],o=0;o0;)t[n]=arguments[n+1];return pt(e,t)}function st(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return pt(t,n,e)}function ut(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return lt(e,t)}function ct(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return lt(t,n,e)}function lt(e,t,n){return pt(e,t,function(e){return function t(n,r,i){return Ve(n)&&Ve(r)?pt(n,[r],t):e?e(n,r,i):r}}(n))}function pt(e,t,n){if(!Ve(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(w(e))return"function"===typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?E:b,a=r?function(t){i===e&&(i=Ge(i)),i.push(t)}:function(t,r){var o=P.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=Ge(i)),i[r]=a)},s=0;s0;)t[n]=arguments[n+1];return lt(this,t,e)}function ht(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Qe(this,e,Nt(),(function(e){return pt(e,t)}))}function mt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Qe(this,e,Nt(),(function(e){return lt(e,t)}))}function gt(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function vt(){return this.__ownerID?this:this.__ensureOwner(new o)}function yt(){return this.__ensureOwner()}function bt(){return this.__altered}ge.prototype.cacheResult=me.prototype.cacheResult=ve.prototype.cacheResult=ye.prototype.cacheResult=je;var Et=function(e){function t(t){return null===t||void 0===t?Nt():Y(t)&&!k(t)?t:Nt().withMutations((function(n){var r=e(t);Be(r.size),r.forEach((function(e,t){return n.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Nt().withMutations((function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return It(this,e,t)},t.prototype.remove=function(e){return It(this,e,r)},t.prototype.deleteAll=function(e){var t=y(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Nt()},t.prototype.sort=function(e){return rn(Ae(this,e))},t.prototype.sortBy=function(e,t){return rn(Ae(this,t,e))},t.prototype.map=function(e,t){return this.withMutations((function(n){n.forEach((function(r,i){n.set(i,e.call(t,r,i,n))}))}))},t.prototype.__iterator=function(e,t){return new Tt(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ft(this.size,this._root,e,this.__hash):0===this.size?Nt():(this.__ownerID=e,this.__altered=!1,this)},t}(b);Et.isMap=Y;var xt=Et.prototype;xt["@@__IMMUTABLE_MAP__@@"]=!0,xt.delete=xt.remove,xt.removeAll=xt.deleteAll,xt.setIn=Xe,xt.removeIn=xt.deleteIn=Ze,xt.update=tt,xt.updateIn=nt,xt.merge=xt.concat=rt,xt.mergeWith=it,xt.mergeDeep=ft,xt.mergeDeepWith=dt,xt.mergeIn=ht,xt.mergeDeepIn=mt,xt.withMutations=gt,xt.wasAltered=bt,xt.asImmutable=yt,xt["@@transducer/init"]=xt.asMutable=vt,xt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},xt["@@transducer/result"]=function(e){return e.asImmutable()};var Dt=function(e,t){this.ownerID=e,this.entries=t};Dt.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Bt)return function(e,t,n,r){e||(e=new o);for(var i=new kt(e,re(n),[n,r]),a=0;a>>e)),o=this.bitmap;return 0===(o&i)?r:this.nodes[Lt(o&i-1)].get(e+5,t,n,r)},Ct.prototype.update=function(e,t,n,i,o,a,s){void 0===n&&(n=re(i));var u=31&(0===t?n:n>>>t),c=1<=Ut)return function(e,t,n,r,i){for(var o=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new wt(e,o+1,a)}(e,d,l,u,m);if(p&&!m&&2===d.length&&jt(d[1^f]))return d[1^f];if(p&&m&&1===d.length&&jt(m))return m;var g=e&&e===this.ownerID,v=p?m?l:l^c:l|c,y=p?m?Rt(d,f,m,g):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a>>e),o=this.nodes[i];return o?o.get(e+5,t,n,r):r},wt.prototype.update=function(e,t,n,i,o,a,s){void 0===n&&(n=re(i));var u=31&(0===t?n:n>>>t),c=o===r,l=this.nodes,p=l[u];if(c&&!p)return this;var f=Mt(p,e,t+5,n,i,o,a,s);if(f===p)return this;var d=this.count;if(p){if(!f&&--d>>n),s=31&(0===n?r:r>>>n),u=a===s?[Pt(e,t,n+5,r,i)]:(o=new kt(t,r,i),a>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Rt(e,t,n,r){var i=r?e:Le(e);return i[t]=n,i}var Bt=8,Ut=16,zt=8;function Vt(e){return Boolean(e&&e["@@__IMMUTABLE_LIST__@@"])}var qt=function(e){function t(t){var n=Yt();if(null===t||void 0===t)return n;if(Vt(t))return t;var r=e(t),i=r.size;return 0===i?n:(Be(i),i>0&&i<32?Qt(0,i,5,null,new Wt(r.toArray())):n.withMutations((function(e){e.setSize(i),r.forEach((function(t,n){return e.set(n,t)}))})))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=s(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?en(e,t).set(0,n):en(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o={value:!1};t>=tn(e._capacity)?r=Xt(r,e.__ownerID,0,t,n,o):i=Xt(i,e.__ownerID,e._level,t,n,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return Qt(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Yt()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){en(n,0,t+e.length);for(var r=0;r>>t&31;if(r>=this.array.length)return new Wt([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var s=$t(this,e);if(!o)for(var u=0;u>>t&31;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=$t(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var Gt,Kt={};function Jt(e,t){var n=e._origin,r=e._capacity,i=tn(r),o=e._tail;return a(e._root,e._level,0);function a(e,s,u){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,u=a>n?0:n-a,c=r-a;c>32&&(c=32);return function(){if(u===c)return Kt;var e=t?--c:u++;return s&&s[e]}}(e,u):function(e,i,o){var s,u=e&&e.array,c=o>n?0:n-o>>i,l=1+(r-o>>i);l>32&&(l=32);return function(){for(;;){if(s){var e=s();if(e!==Kt)return e;s=null}if(c===l)return Kt;var n=t?--l:c++;s=a(u&&u[n],i-5,o+(n<>>n&31,c=e&&u0){var l=e&&e.array[u],p=Xt(l,t,n-5,r,o,a);return p===l?e:((s=$t(e,t)).array[u]=p,s)}return c&&e.array[u]===o?e:(a&&i(a),s=$t(e,t),void 0===o&&u===s.array.length-1?s.array.pop():s.array[u]=o,s)}function $t(e,t){return t&&e&&t===e.ownerID?e:new Wt(e?e.array.slice():[],t)}function Zt(e,t){if(t>=tn(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&31],r-=5;return n}}function en(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new o,i=e._origin,a=e._capacity,s=i+t,u=void 0===n?a:n<0?a+n:i+n;if(s===i&&u===a)return e;if(s>=u)return e.clear();for(var c=e._level,l=e._root,p=0;s+p<0;)l=new Wt(l&&l.array.length?[void 0,l]:[],r),p+=1<<(c+=5);p&&(s+=p,i+=p,u+=p,a+=p);for(var f=tn(a),d=tn(u);d>=1<f?new Wt([],r):h;if(h&&d>f&&s5;v-=5){var y=f>>>v&31;g=g.array[y]=$t(g.array[y],r)}g.array[f>>>5&31]=h}if(u=d)s-=d,u-=d,c=5,l=null,m=m&&m.removeBefore(r,0,s);else if(s>i||d>>c&31;if(b!==d>>>c&31)break;b&&(p+=(1<i&&(l=l.removeBefore(r,c,s-p)),l&&d>>5<<5}var nn,rn=function(e){function t(e){return null===e||void 0===e?an():X(e)?e:an().withMutations((function(t){var n=b(e);Be(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):an()},t.prototype.set=function(e,t){return sn(this,e,t)},t.prototype.remove=function(e){return sn(this,e,r)},t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate((function(t){return t&&e(t[1],t[0],n)}),t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?on(t,n,e,this.__hash):0===this.size?an():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(Et);function on(e,t,n,r){var i=Object.create(rn.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function an(){return nn||(nn=on(Nt(),Yt()))}function sn(e,t,n){var i,o,a=e._map,s=e._list,u=a.get(t),c=void 0!==u;if(n===r){if(!c)return e;s.size>=32&&s.size>=2*a.size?(i=(o=s.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(i.__ownerID=o.__ownerID=e.__ownerID)):(i=a.remove(t),o=u===s.size-1?s.pop():s.set(u,void 0))}else if(c){if(n===s.get(u)[1])return e;i=a,o=s.set(u,[t,n])}else i=a.set(t,s.size),o=s.set(s.size,[t,n]);return e.__ownerID?(e.size=i.size,e._map=i,e._list=o,e.__hash=void 0,e):on(i,o)}rn.isOrderedMap=X,rn.prototype[S]=!0,rn.prototype.delete=rn.prototype.remove;function un(e){return Boolean(e&&e["@@__IMMUTABLE_STACK__@@"])}var cn=function(e){function t(e){return null===e||void 0===e?dn():un(e)?e:dn().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=s(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):fn(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&un(t))return t;Be(t.size);var n=this.size,r=this._head;return t.__iterate((function(e){n++,r={value:e,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):fn(n,r)},t.prototype.pop=function(){return this.slice(1)},t.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):dn()},t.prototype.slice=function(t,n){if(c(t,n,this.size))return this;var r=l(t,this.size);if(p(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):fn(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?fn(this.size,this._head,e,this.__hash):0===this.size?dn():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new V(this.toArray()).__iterate((function(t,r){return e(t,r,n)}),t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new V(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new _((function(){if(r){var t=r.value;return r=r.next,O(e,n++,t)}return{value:void 0,done:!0}}))},t}(E);cn.isStack=un;var ln,pn=cn.prototype;function fn(e,t,n,r){var i=Object.create(pn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function dn(){return ln||(ln=fn(0))}pn["@@__IMMUTABLE_STACK__@@"]=!0,pn.shift=pn.pop,pn.unshift=pn.push,pn.unshiftAll=pn.pushAll,pn.withMutations=gt,pn.wasAltered=bt,pn.asImmutable=yt,pn["@@transducer/init"]=pn.asMutable=vt,pn["@@transducer/step"]=function(e,t){return e.unshift(t)},pn["@@transducer/result"]=function(e){return e.asImmutable()};function hn(e){return Boolean(e&&e["@@__IMMUTABLE_SET__@@"])}function mn(e){return hn(e)&&k(e)}function gn(e,t){if(e===t)return!0;if(!h(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||m(e)!==m(t)||g(e)!==g(t)||k(e)!==k(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!v(e);if(k(e)){var i=e.entries();return t.every((function(e,t){var r=i.next().value;return r&&Z(r[1],e)&&(n||Z(r[0],t))}))&&i.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"===typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var s=!0,u=t.__iterate((function(t,i){if(n?!e.has(t):o?!Z(t,e.get(i,r)):!Z(e.get(i,r),t))return s=!1,!1}));return s&&e.size===u}function vn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function yn(e){if(!e||"object"!==typeof e)return e;if(!h(e)){if(!Ve(e))return e;e=R(e)}if(m(e)){var t={};return e.__iterate((function(e,n){t[n]=yn(e)})),t}var n=[];return e.__iterate((function(e){n.push(yn(e))})),n}var bn=function(e){function t(t){return null===t||void 0===t?wn():hn(t)&&!k(t)?t:wn().withMutations((function(n){var r=e(t);Be(r.size),r.forEach((function(e){return n.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(b(e).keySeq())},t.intersect=function(e){return(e=y(e).toArray()).length?xn.intersect.apply(t(e.pop()),e):wn()},t.union=function(e){return(e=y(e).toArray()).length?xn.union.apply(t(e.pop()),e):wn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Dn(this,this._map.set(e,e))},t.prototype.remove=function(e){return Dn(this,this._map.remove(e))},t.prototype.clear=function(){return Dn(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=[],i=[];return this.forEach((function(o){var a=e.call(t,o,o,n);a!==o&&(r.push(o),i.push(a))})),this.withMutations((function(e){r.forEach((function(t){return e.remove(t)})),i.forEach((function(t){return e.add(t)}))}))},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(n){for(var r=0;r=0&&t=0&&n>>-15,461845907),t=ee(t<<13|t>>>-13,5),t=ee((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=te((t=ee(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+zn(re(e),re(t))|0}:function(e,t){r=r+zn(re(e),re(t))|0}:t?function(e){r=31*r+re(e)|0}:function(e){r=r+re(e)|0}),r)}(this))}});var Fn=y.prototype;Fn["@@__IMMUTABLE_ITERABLE__@@"]=!0,Fn[T]=Fn.values,Fn.toJSON=Fn.toArray,Fn.__toStringMapper=qe,Fn.inspect=Fn.toSource=function(){return this.toString()},Fn.chain=Fn.flatMap,Fn.contains=Fn.includes,vn(b,{flip:function(){return Fe(this,be(this))},mapEntries:function(e,t){var n=this,r=0;return Fe(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Fe(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Nn=b.prototype;Nn["@@__IMMUTABLE_KEYED__@@"]=!0,Nn[T]=Fn.entries,Nn.toJSON=On,Nn.__toStringMapper=function(e,t){return qe(t)+": "+qe(e)},vn(E,{toKeyedSeq:function(){return new me(this,!1)},filter:function(e,t){return Fe(this,De(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Fe(this,xe(this,!1))},slice:function(e,t){return Fe(this,Ce(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=l(e,e<0?this.count():this.size);var r=this.slice(0,e);return Fe(this,1===n?r:r.concat(Le(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return Fe(this,ke(this,e,!1))},get:function(e,t){return(e=s(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=s(this,e))>=0&&(void 0!==this.size?this.size===1/0||et?-1:0}function zn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}In["@@__IMMUTABLE_INDEXED__@@"]=!0,In[S]=!0,vn(x,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),x.prototype.has=Fn.includes,x.prototype.contains=x.prototype.includes,vn(B,b.prototype),vn(U,E.prototype),vn(z,x.prototype);var Vn=function(e){function t(e){return null===e||void 0===e?Gn():mn(e)?e:Gn().withMutations((function(t){var n=x(e);Be(n.size),n.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(b(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(bn);Vn.isOrderedSet=mn;var qn,Hn=Vn.prototype;function Wn(e,t){var n=Object.create(Hn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Gn(){return qn||(qn=Wn(an()))}Hn[S]=!0,Hn.zip=In.zip,Hn.zipWith=In.zipWith,Hn.__empty=Gn,Hn.__make=Wn;var Kn=function(e,t){var n,r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(e),u=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var c=0;c2?[]:void 0,{"":e})}function nr(e,t){return m(t)?t.toMap():t.toList()}var rr="4.0.0-rc.11",ir={version:rr,Collection:y,Iterable:y,Seq:R,Map:Et,OrderedMap:rn,List:qt,Stack:cn,Set:bn,OrderedSet:Vn,Record:Kn,Range:kn,Repeat:er,is:Z,fromJS:tr,hash:re,isImmutable:w,isCollection:h,isKeyed:m,isIndexed:g,isAssociative:v,isOrdered:k,isValueObject:$,isSeq:D,isList:Vt,isMap:Y,isOrderedMap:X,isStack:un,isSet:hn,isOrderedSet:mn,isRecord:C,get:We,getIn:An,has:He,hasIn:_n,merge:at,mergeDeep:ut,mergeWith:st,mergeDeepWith:ct,remove:Ke,removeIn:$e,set:Je,setIn:Ye,update:et,updateIn:Qe},or=y;t.default=ir},function(e,t,n){"use strict";var r=n(81),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"f",(function(){return d}));var r=n(2),i=n(48),o=n(67),a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:i.a.fixed(),t=!1,n=[];function o(){if(t&&n.length)throw Object(r.p)("Cannot have a closed channel with pending takers");if(n.length&&!e.isEmpty())throw Object(r.p)("Cannot have pending takers with non empty buffer")}function a(i){if(o(),Object(r.h)(i,r.q.notUndef,"Saga was provided with an undefined action"),!t){if(!n.length)return e.put(i);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:i.a.none(),n=arguments[2];arguments.length>2&&Object(r.h)(n,r.q.func,"Invalid match function passed to eventChannel");var o=p(t),a=function(){o.__closed__||(s&&s(),o.close())},s=e((function(e){u(e)?a():n&&!n(e)||o.put(e)}));if(o.__closed__&&s(),!r.q.func(s))throw new Error("in eventChannel: subscribe should return a function to unsubscribe");return{take:o.take,flush:o.flush,close:a}}function d(e){var t=f((function(t){return e((function(e){e[r.c]?t(e):Object(o.a)((function(){return t(e)}))}))}));return a({},t,{take:function(e,n){arguments.length>1&&(Object(r.h)(n,r.q.func,"channel.take's matcher argument must be a function"),e[r.b]=n),t.take(e)}})}},function(e,t,n){"use strict";function r(e,t){return e.reduce((function(e,n){return e[t(n)]=n,e}),Object.create(null))}n.d(t,"a",(function(){return r}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=n(41);function o(e,t){return function(n){var r;return(r={})[e]=n||t,r}}t.editQuery=(r=i.createActions({EDIT_QUERY:function(e){return{query:e}},EDIT_HEADERS:o("headers"),EDIT_ENDPOINT:o("endpoint"),EDIT_VARIABLES:o("variables"),SET_OPERATION_NAME:o("operationName"),SET_VARIABLE_TO_TYPE:o("variableToType"),SET_OPERATIONS:o("operations"),SET_EDITOR_FLEX:o("editorFlex"),EDIT_NAME:o("name"),OPEN_QUERY_VARIABLES:function(){return{queryVariablesActive:!0}},CLOSE_QUERY_VARIABLES:function(){return{queryVariablesActive:!1}},SET_VARIABLE_EDITOR_HEIGHT:o("variableEditorHeight"),SET_RESPONSE_TRACING_HEIGHT:o("responceTracingHeight"),SET_TRACING_SUPPORTED:o("tracingSupported"),SET_IS_QUERY_PLAN_SUPPORTED:o("isQueryPlanSupported"),SET_SUBSCRIPTION_ACTIVE:o("subscriptionActive"),SET_QUERY_TYPES:o("queryTypes"),SET_RESPONSE_EXTENSIONS:o("responseExtensions"),SET_CURRENT_QUERY_START_TIME:o("currentQueryStartTime"),SET_CURRENT_QUERY_END_TIME:o("currentQueryEndTime"),UPDATE_QUERY_FACTS:o(),PRETTIFY_QUERY:o(),INJECT_HEADERS:function(e,t){return{headers:e,endpoint:t}},CLOSE_TRACING:function(){},OPEN_TRACING:function(){},TOGGLE_TRACING:function(){},CLOSE_VARIABLES:o("variableEditorHeight"),OPEN_VARIABLES:o("variableEditorHeight"),TOGGLE_VARIABLES:o(),ADD_RESPONSE:function(e,t,n){return{workspaceId:e,sessionId:t,response:n}},SET_RESPONSE:function(e,t,n){return{workspaceId:e,sessionId:t,response:n}},CLEAR_RESPONSES:o(),FETCH_SCHEMA:o(),REFETCH_SCHEMA:o(),SET_ENDPOINT_UNREACHABLE:o("endpoint"),SET_SCROLL_TOP:function(e,t){return{sessionId:e,scrollTop:t}},SCHEMA_FETCHING_SUCCESS:function(e,t,n,r){return{endpoint:e,tracingSupported:t,isQueryPlanSupported:n,isPollingSchema:r}},SCHEMA_FETCHING_ERROR:function(e,t){return{endpoint:e,error:t}},RENEW_STACKS:o(),RUN_QUERY:function(e){return{operationName:e}},QUERY_SUCCESS:o(),QUERY_ERROR:o(),RUN_QUERY_AT_POSITION:function(e){return{position:e}},START_QUERY:o("queryRunning",!0),STOP_QUERY:function(e,t){return{workspaceId:t,sessionId:e}},OPEN_SETTINGS_TAB:function(){return{}},OPEN_CONFIG_TAB:function(){return{}},NEW_SESSION:function(e,t){return{endpoint:e,reuseHeaders:t}},NEW_SESSION_FROM_QUERY:function(e){return{query:e}},NEW_FILE_TAB:function(e,t,n){return{fileName:e,filePath:t,file:n}},DUPLICATE_SESSION:o("session"),CLOSE_SELECTED_TAB:function(){return{}},SELECT_NEXT_TAB:function(){return{}},SELECT_PREV_TAB:function(){return{}},SELECT_TAB:o("sessionId"),SELECT_TAB_INDEX:o("index"),CLOSE_TAB:o("sessionId"),REORDER_TABS:function(e,t){return{src:e,dest:t}},EDIT_SETTINGS:o(),SAVE_SETTINGS:o(),EDIT_CONFIG:o(),SAVE_CONFIG:o(),EDIT_FILE:o(),SAVE_FILE:o()})).editQuery,t.editVariables=r.editVariables,t.setOperationName=r.setOperationName,t.editHeaders=r.editHeaders,t.editEndpoint=r.editEndpoint,t.setVariableToType=r.setVariableToType,t.setOperations=r.setOperations,t.startQuery=r.startQuery,t.stopQuery=r.stopQuery,t.setEditorFlex=r.setEditorFlex,t.openQueryVariables=r.openQueryVariables,t.closeQueryVariables=r.closeQueryVariables,t.setVariableEditorHeight=r.setVariableEditorHeight,t.setResponseTracingHeight=r.setResponseTracingHeight,t.setTracingSupported=r.setTracingSupported,t.setIsQueryPlanSupported=r.setIsQueryPlanSupported,t.closeTracing=r.closeTracing,t.openTracing=r.openTracing,t.closeVariables=r.closeVariables,t.openVariables=r.openVariables,t.addResponse=r.addResponse,t.setResponse=r.setResponse,t.clearResponses=r.clearResponses,t.openSettingsTab=r.openSettingsTab,t.schemaFetchingSuccess=r.schemaFetchingSuccess,t.schemaFetchingError=r.schemaFetchingError,t.setEndpointUnreachable=r.setEndpointUnreachable,t.renewStacks=r.renewStacks,t.runQuery=r.runQuery,t.prettifyQuery=r.prettifyQuery,t.fetchSchema=r.fetchSchema,t.updateQueryFacts=r.updateQueryFacts,t.runQueryAtPosition=r.runQueryAtPosition,t.toggleTracing=r.toggleTracing,t.toggleVariables=r.toggleVariables,t.newSession=r.newSession,t.newSessionFromQuery=r.newSessionFromQuery,t.newFileTab=r.newFileTab,t.closeTab=r.closeTab,t.closeSelectedTab=r.closeSelectedTab,t.editSettings=r.editSettings,t.saveSettings=r.saveSettings,t.editConfig=r.editConfig,t.saveConfig=r.saveConfig,t.editFile=r.editFile,t.saveFile=r.saveFile,t.selectTab=r.selectTab,t.selectTabIndex=r.selectTabIndex,t.selectNextTab=r.selectNextTab,t.selectPrevTab=r.selectPrevTab,t.duplicateSession=r.duplicateSession,t.querySuccess=r.querySuccess,t.queryError=r.queryError,t.setSubscriptionActive=r.setSubscriptionActive,t.setQueryTypes=r.setQueryTypes,t.injectHeaders=r.injectHeaders,t.openConfigTab=r.openConfigTab,t.editName=r.editName,t.setResponseExtensions=r.setResponseExtensions,t.setCurrentQueryStartTime=r.setCurrentQueryStartTime,t.setCurrentQueryEndTime=r.setCurrentQueryEndTime,t.refetchSchema=r.refetchSchema,t.setScrollTop=r.setScrollTop,t.reorderTabs=r.reorderTabs},function(e,t,n){"use strict";var r=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&t%1===0}function s(e){return Object(e)===e&&(a(e)||function(e){return!!c(e)}(e))}function u(e){var t=c(e);if(t)return t.call(e)}function c(e){if(null!=e){var t=i&&e[i]||e["@@iterator"];if("function"===typeof t)return t}}function l(e){this._o=e,this._i=0}function p(e,t,n){if(null!=e){if("function"===typeof e.forEach)return e.forEach(t,n);var r=0,i=u(e);if(i){for(var o;!(o=i.next()).done;)if(t.call(n,o.value,r++,e),r>9999999)throw new TypeError("Near-infinite iteration.")}else if(a(e))for(;r=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}};var f=r&&r.asyncIterator,d=f||"@@asyncIterator";function h(e){return!!g(e)}function m(e){var t=g(e);if(t)return t.call(e)}function g(e){if(null!=e){var t=f&&e[f]||e["@@asyncIterator"];if("function"===typeof t)return t}}function v(e){this._i=e}function y(e,t,n){var r;return new Promise((function(i){i((r=e[t](n)).value)})).then((function(e){return{value:e,done:r.done}}))}v.prototype[d]=function(){return this},v.prototype.next=function(e){return y(this._i,"next",e)},v.prototype.return=function(e){return this._i.return?y(this._i,"return",e):Promise.resolve({value:e,done:!0})},v.prototype.throw=function(e){return this._i.throw?y(this._i,"throw",e):Promise.reject(e)}},function(e,t,n){"use strict";function r(e){"function"===typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(84);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=t,e.prototype.inspect=t,r.a&&(e.prototype[r.a]=t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"combineActions",(function(){return p})),n.d(t,"createAction",(function(){return h})),n.d(t,"createActions",(function(){return F})),n.d(t,"createCurriedAction",(function(){return L})),n.d(t,"handleAction",(function(){return R})),n.d(t,"handleActions",(function(){return z}));var r=n(26),i=n.n(r),o=function(e){return"function"===typeof e},a=function(e){return 0===e.length},s=function(e){return e.toString()},u=function(e){return"string"===typeof e};function c(e){return u(e)||o(e)||("symbol"===typeof(t=e)||"object"===typeof t&&"[object Symbol]"===Object.prototype.toString.call(t));var t}function l(e){return!a(e)&&e.every(c)}function p(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i1?t-1:0),r=1;r2?n-2:0),a=2;a0&&a(t[0]);)t.shift();for(;t.length>0&&a(t[t.length-1]);)t.pop();return t.join("\n")}function i(e){for(var t=null,n=1;n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a=!r||o||n,s="";return!a||r&&i||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,a&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(42);function i(e,t){for(var n=Object.create(null),i=0,o=Object(r.a)(e);i0&&void 0!==arguments[0]?arguments[0]:10,t=arguments[1],n=new Array(e),r=0,i=0,o=0,a=function(t){n[i]=t,i=(i+1)%e,r++},s=function(){if(0!=r){var t=n[o];return n[o]=null,r--,o=(o+1)%e,t}},u=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){if(rl);p++){var f=e.getLine(c++);s=null==s?f:s+"\n"+f}u*=2,t.lastIndex=n.ch;var d=t.exec(s);if(d){var h=s.slice(0,d.index).split("\n"),m=d[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:r(g,v),to:r(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:d}}}}function u(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function c(e,t,n){t=i(t,"g");for(var o=n.line,a=n.ch,s=e.firstLine();o>=s;o--,a=-1){var c=e.getLine(o),l=u(c,t,a<0?0:c.length-a);if(l)return{from:r(o,l.index),to:r(o,l.index+l[0].length),match:l}}}function l(e,t,n){if(!o(t))return c(e,t,n);t=i(t,"gm");for(var a,s=1,l=e.getLine(n.line).length-n.ch,p=n.line,f=e.firstLine();p>=f;){for(var d=0;d=f;d++){var h=e.getLine(p--);a=null==a?h:h+"\n"+a}s*=2;var m=u(a,t,l);if(m){var g=a.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=p+g.length,b=g[g.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function p(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function f(e,i,o,a){if(!i.length)return null;var s=a?t:n,u=s(i).split(/\r|\n\r?/);e:for(var c=o.line,l=o.ch,f=e.lastLine()+1-u.length;c<=f;c++,l=0){var d=e.getLine(c).slice(l),h=s(d);if(1==u.length){var m=h.indexOf(u[0]);if(-1==m)continue e;return o=p(d,h,m,s)+l,{from:r(c,p(d,h,m,s)+l),to:r(c,p(d,h,m+u[0].length,s)+l)}}var g=h.length-u[0].length;if(h.slice(g)==u[0]){for(var v=1;v=f;c--,l=-1){var d=e.getLine(c);l>-1&&(d=d.slice(0,l));var h=s(d);if(1==u.length){var m=h.lastIndexOf(u[0]);if(-1==m)continue e;return{from:r(c,p(d,h,m,s)),to:r(c,p(d,h,m+u[0].length,s))}}var g=u[u.length-1];if(h.slice(0,g.length)==g){var v=1;for(o=c-u.length+1;v0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(n(13))},function(e,t,n){!function(e){function t(t,n,r){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(o,"dialog-opened"),i}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,i,o){o||(o={}),n(this,null);var a=t(this,r,o.bottom),s=!1,u=this;function c(t){if("string"==typeof t)p.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),u.focus(),o.onClose&&o.onClose(a)}}var l,p=a.getElementsByTagName("input")[0];return p?(p.focus(),o.value&&(p.value=o.value,!1!==o.selectValueOnOpen&&p.select()),o.onInput&&e.on(p,"input",(function(e){o.onInput(e,p.value,c)})),o.onKeyUp&&e.on(p,"keyup",(function(e){o.onKeyUp(e,p.value,c)})),e.on(p,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,p.value,c)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(p.blur(),e.e_stop(t),c()),13==t.keyCode&&i(p.value,t))})),!1!==o.closeOnBlur&&e.on(p,"blur",c)):(l=a.getElementsByTagName("button")[0])&&(e.on(l,"click",(function(){c(),u.focus()})),!1!==o.closeOnBlur&&e.on(l,"blur",c),l.focus()),c})),e.defineExtension("openConfirm",(function(r,i,o){n(this,null);var a=t(this,r,o&&o.bottom),s=a.getElementsByTagName("button"),u=!1,c=this,l=1;function p(){u||(u=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var f=0;f2&&void 0!==arguments[2]?arguments[2]:"iterator",a=void 0,s=t;function u(t,n){if(s===o)return i;if(n)throw s=o,n;a&&a(t);var r=e[s](),u=r[0],c=r[1],l=r[2];return a=l,(s=u)===o?i:c}return Object(r.t)(u,(function(e){return u(null,e)}),n,!0)}var u=n(6),c=n(30);function l(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i2?n-2:0),i=2;i3?i-3:0),p=3;p