(this.webpackJsonpweb=this.webpackJsonpweb||[]).push([[2],[function(e,t,n){"use strict";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}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 j})),n.d(t,"q",(function(){return M})),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})),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 j})),n.d(t,"p",(function(){return M})),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 j=function(e,t){return e+" has been deprecated in favor of "+t+", please update your code"},M=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;ia)return"[Array]";for(var n=Math.min(o,e.length),r=e.length-n,i=[],s=0;s1&&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>a)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+": "+u(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 x(o,{pattern:e});if(r.q.channel(e))return x(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 w=Object(r.n)(C.maybe,Object(r.z)("takem","take.maybe"));function S(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),x(a,{channel:e,action:t})}function k(e){return x(s,e)}function A(e){return x(u,e)}function T(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 _(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:[];return x(c,T("apply",{context:e,fn:t},n))}function F(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 k(t.map((function(e){return j(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 "+E),x(f,i)}function M(){for(var e=arguments.length,t=Array(e),n=0;n1)return k(t.map((function(e){return M(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 "+E)),x(d,i||r.d)}function P(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")),x(m,{pattern:e,buffer:t})}function R(){return x(g,{})}function B(e){return Object(r.h)(e,r.q.channel,"flush(channel): argument "+e+" is not valid channel"),x(v,e)}function U(e){return Object(r.h)(e,r.q.string,"getContext(prop): argument "+e+" is not a string"),x(y,e)}function z(e){return Object(r.h)(e,r.q.object,Object(r.k)(null,e)),x(b,e)}S.resolve=function(){var e=S.apply(void 0,arguments);return e[a].resolve=!0,e},S.sync=Object(r.n)(S.resolve,Object(r.z)("put.sync","put.resolve"));var V=function(e){return function(t){return t&&t[i]&&t[e]}},q={take:V(o),put:V(a),all:V(s),race:V(u),call:V(c),cps:V(l),fork:V(p),join:V(f),cancel:V(d),select:V(h),actionChannel:V(m),cancelled:V(g),flush:V(v),getContext:V(y),setContext:V(b)}},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(18),a=n(15),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";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);n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return g})),n.d(t,"g",(function(){return v})),n.d(t,"f",(function(){return y}));var c=2147483647,l=-2147483648;var p=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>c||tc||e=l)return t}}});var f=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 d(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 h=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=d(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 m=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 g=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=d(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}}),v=Object.freeze([h,p,f,m,g]);function y(e){return Object(u.R)(e)&&v.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?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=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 K=[""];function J(e){for(;K.length<=e;)K.push(Q(K)+" ");return K[e]}function Q(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\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 ie(e){return e.charCodeAt(0)>=768&&re.test(e)}function oe(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 se=null;function ue(e,t,n){var r;se=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:se=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:se=i)}return null!=r?r:se}var ce=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(u,c){var l="ltr"==c?"L":"R";if(0==u.length||"ltr"==c&&!n.test(u))return!1;for(var p,f=u.length,d=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function me(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function Ee(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function De(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){Ee(e),xe(e)}function we(e){return e.target||e.srcElement}function Se(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 ke,Ae,Te=function(){if(a&&s<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}();function _e(e){if(null==ke){var t=_("span","\u200b");T(e,_("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ke=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=ke?_("span","\u200b"):_("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Oe(e){if(null!=Ae)return Ae;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)&&(Ae=r.right-n.right<3)}var Fe=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/)},Ne=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)},Ie=function(){var e=_("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),je=null,Me={},Pe={};function Le(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Me[e]=t}function Re(e){if("string"==typeof e&&Pe.hasOwnProperty(e))e=Pe[e];else if(e&&"string"==typeof e.name&&Pe.hasOwnProperty(e.name)){var t=Pe[e.name];"string"==typeof t&&(t={name:t}),(e=$(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Re("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Re("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Re(t);var n=Me[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[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 Ue={};function ze(e,t){L(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function Ve(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 qe(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 He(e,t,n){return!e.startState||e.startState(t,n)}var We=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 Ge(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?et(n,Ge(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ge(e,t.line).text.length)}function ut(e,t){for(var n=[],r=0;r=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.post},We.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},We.prototype.backUp=function(e){this.pos-=e},We.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},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},We.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},We.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},lt=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 pt(e,t,n,r){var i=[e.state.modeGen],o={};Et(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,Et(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&&Ve(e.doc.mode,r.state),o=pt(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 dt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new lt(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=Ge(o,s-1),c=u.stateAfter;if(c&&(!n||s+(c instanceof ct?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&&Ge(r,o-1).stateAfter,s=a?lt.fromSaved(r,a,o):new lt(r,He(r.mode),o);return r.iter(o,t,(function(n){ht(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.")}lt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},lt.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}},lt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},lt.fromSaved=function(e,t,n){return t instanceof ct?new lt(e,Ve(e.mode,t.state),n,t.lookAhead):new lt(e,Ve(e.mode,t),n)},lt.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o,a=e.doc,s=a.mode,u=Ge(a,(t=st(a,t)).line),c=dt(e,t.line,n),l=new We(u.text,e.options.tabSize,c);for(r&&(o=[]);(r||l.pose.options.maxHighlightLength?(s=!1,a&&ht(e,t,r,p.pos),p.pos=t.length,u=null):u=bt(gt(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 Ct(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||Nt(n,o.marker)<0)&&(n=o.marker)}return n}function Lt(e,t,n,r,i){var o=Ge(e,t),a=Dt&&o.markedSpans;if(a)for(var s=0;s=0&&p<=0||l<=0&&p>=0)&&(l<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||l>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Rt(e){for(var t;t=jt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=Ge(e,t),r=Rt(n);return n==r?t:Ye(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ge(e,t);if(!zt(e,r))return t;for(;n=Mt(r);)r=n.find(1,!0).line;return Ye(r)+1}function zt(e,t){var n=Dt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Gt=function(e,t,n){this.text=e,_t(this,t),this.height=n?n(this):1};function Kt(e){e.parent=null,Tt(e)}Gt.prototype.lineNo=function(){return Ye(this)},be(Gt);var Jt={},Qt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Qt:Jt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(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=Zt,Oe(e.display.measure)&&(a=le(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(o,r,ft(e,o,t!=e.display.externalMeasured&&Ye(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=j(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=j(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(_e(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 me(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=j(r.pre.className,r.textClass||"")),r}function $t(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(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 tn(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 nn(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||Nt(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=Yt(n[m++],t.cm.options)}}else for(var _=1;_n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function On(e,t,n,r){return In(e,Nn(e,t),n,r)}function Fn(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=Pn(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&&ie(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+ir(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 Rn(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=ue(s,u,c),f=se,d=l(u,p,"before"==c);return null!=f&&(d.other=l(u,f,"before"!=c)),d}function Jn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ge(e.doc,t.line),i=qt(r)+Cn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Qn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Qn(r.first,0,null,-1,-1);var i=Xe(r,n),o=r.first+r.size-1;if(i>o)return Qn(r.first+r.size-1,Ge(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ge(r,i);;){var s=er(e,a,i,t,n),u=Pt(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=Ge(r,i=c.line)}}function Xn(e,t,n,r){r-=qn(t);var i=t.text.length,o=ae((function(t){return In(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=ae((function(t){return In(e,n,t).top>r}),o,i)}}function $n(e,t,n,r){return n||(n=Nn(e,t)),Xn(e,t,n,Hn(e,t,In(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=qt(t);var o=Nn(e,t),a=qn(t),s=0,u=t.text.length,c=!0,l=le(t,e.doc.direction);if(l){var p=(e.options.lineWrapping?nr:tr)(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=ae((function(t){var n=In(e,o,t);return n.top+=a,n.bottom+=a,!!Zn(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 Qn(n,g=oe(t.text,g,1),d,v,r-f)}function tr(e,t,n,r,i,o,a){var s=ae((function(s){var u=i[s],c=1!=u.level;return Zn(Kn(e,et(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=Kn(e,et(n,c?u.from:u.to,c?"after":"before"),"line",t,r);Zn(l,o,a,!0)&&l.top>a&&(u=i[s-1])}return u}function nr(e,t,n,r,i,o,a){var s=Xn(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=In(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 rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==jn){jn=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)jn.appendChild(document.createTextNode("x")),jn.appendChild(_("br"));jn.appendChild(document.createTextNode("x"))}T(e.measure,jn);var n=jn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),A(e.measure),n||1}function ir(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 or(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:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(zt(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=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)Dt&&Bt(e.doc,t)i.viewFrom?dr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)dr(e);else if(t<=i.viewFrom){var o=hr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):dr(e)}else if(n>=i.viewTo){var a=hr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):dr(e)}else{var s=hr(e,t,t,-1),u=hr(e,n,n+r,1);s&&u?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):dr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[lr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function dr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var i,o=lr(e,t),a=e.display.view;if(!Dt||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(;Bt(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 mr(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 Dr(e){e.state.focused||(e.display.input.focus(),wr(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function wr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(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()),xr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(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 kr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(Qe(i.line,u),Ar(i.line),i.rest))for(var d=0;de.display.sizerWidth){var h=Math.ceil(c/ir(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ar(e){if(e.widgets)for(var t=0;t=a&&(o=Xe(t,qt(Ge(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function _r(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Tn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+wn(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=An(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 Or(e,t){null!=t&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Fr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Nr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,jr(e,Jn(e,t.from),Jn(e,t.to),t.margin))}function jr(e,t,n,r){var i=_r(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});Nr(e,i.scrollLeft,i.scrollTop)}function Mr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ui(e,{top:t}),Pr(e,t,!0),n&&ui(e),ri(e,100))}function Pr(e,t,n){t=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 Lr(e,t,n,r){t=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,pi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Rr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(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+kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=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),fe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),fe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.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}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.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},Br.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)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function zr(e,t){t||(t=Rr(e));var n=e.display.barWidth,r=e.display.barHeight;Vr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&kr(e),Vr(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function Vr(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=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var qr={native:Br,null:Ur};function Hr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&k(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new qr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(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?Lr(e,t):Mr(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Wr=0;function Gr(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:++Wr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Kr(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 oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qr(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&kr(t),e.barMeasure=Rr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=On(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+kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-An(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xr(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-Cn(e.display))+"px;\n height: "+(t.bottom-t.top+kn(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?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Kn(e,t),u=n&&n!=t?Kn(e,n):s,c=_r(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&&(Lr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(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=dt(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?Ve(t.mode,r.state):null,u=pt(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 ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Zr(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==mr(e))return!1;fi(e)&&(dr(e),t.dims=or(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)),Dt&&(o=Bt(e.doc,o),a=Ut(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=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,lr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=qt(Ge(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(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),ln(e,f,l,n)),d&&(A(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Ze(e.options,l)))),a=f.node.nextSibling}else{var h=vn(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,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=An(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+wn(e.display)-Tn(e),n.top)}),t.visible=Tr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ai(e,t);r=!1){kr(e);var i=Rr(e);gr(e),zr(e,i),li(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 ui(e,t){var n=new oi(e,t);if(ai(e,n)){kr(e),si(e,n);var r=Rr(e);gr(e),zr(e,r),li(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function li(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+kn(e)+"px"}function pi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(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&&tt(e,r.to())<=0)return n}return-1};var Ci=function(e,t){this.anchor=e,this.head=t};function wi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=U(t,i);for(var o=1;o0:u>=0){var c=ot(s.from(),a.from()),l=it(s.to(),a.to()),p=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Ci(p?l:c,p?c:l))}}return new Di(t,n)}function Si(e,t){return new Di([new Ci(e,t||e)],0)}function ki(e){return e.text?et(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ai(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return ki(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+=ki(t).ch-t.to.ch),et(n,r)}function Ti(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}un(e,"change",e,t)}function ji(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?(Bi(e.done),Q(e.done)):e.done.length&&!Q(e.done).ranges?Q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Q(e.done)):void 0}(i,i.lastOp==r)))a=Q(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=ki(t):o.changes.push(Ri(e,t));else{var u=Q(i.done);for(u&&u.ranges||Vi(e.sel,i.done),o={changes:[Ri(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||me(e,"historyAdded")}function zi(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,Q(i.done),t))?i.done[i.done.length-1]=t:Vi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function Vi(e,t){var n=Q(t);n&&n.ranges&&n.equals(e)||t.push(e)}function qi(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 Hi(e){if(!e)return null;for(var t,n=0;n-1&&(Q(s)[p]=c[p],delete c[p])}}}return r}function Ki(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Ci(i,t)}return new Ci(n||t,t)}function Ji(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Zi(e,new Di([Ki(e.sel.primary(),t,n,i)],0),r)}function Qi(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&&(me(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=ao(e,p,-r,p&&p.line==t.line?o:null)),p&&p.line==t.line&&(f=tt(p,n))&&(r<0?f<0:f>0))return io(e,p,t,r,i)}var d=u.find(r<0?-1:1);return(r<0?c:l)&&(d=ao(e,d,r,d.line==t.line?o:null)),d?io(e,d,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,a=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ge(e,t.line)).text.length?t.line0)){var l=[u,1],p=tt(c.from,s.from),f=tt(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)lo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else lo(e,t)}}function lo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ti(e,t);Ui(e,t,n,e.cm?e.cm.curOp.id:NaN),ho(e,t,n,kt(e,t));var r=[];ji(e,(function(e,n){n||-1!=U(r,e.history)||(yo(e.history,t),r.push(e.history)),ho(e,t,null,kt(e,t))}))}}function po(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 fo(e,t){if(0!=t&&(e.first+=t,e.sel=new Di(Y(e.sel.ranges,(function(e){return new Ci(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){pr(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:et(o,Ge(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),n||(n=Ti(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=Ye(Rt(Ge(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&&ve(e),Ii(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,(function(e){var t=Ht(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=Ge(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof Eo))){var s=[];this.collapse(s),this.children=[new Eo(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(Lt(e,t.line,t,n,o)||t.line!=n.line&&Lt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Dt=!0}o.addToHistory&&Ui(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&&Rt(e)==c.display.maxLine&&(s=!0),o.collapsed&&u!=t.line&&Qe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(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){zt(e,t)&&Qe(t,0)})),o.clearOnEnter&&fe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++wo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)pr(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++)fr(c,l,"text");o.atomic&&no(c.doc),un(c,"markerAdded",c,o)}return o}So.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gr(e),ye(this,"clear")){var n=this.find();n&&un(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&&pr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&un(e,"markerCleared",e,this,r,i),t&&Kr(e),this.parent&&this.parent.clear()}},So.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;u--)co(this,r[u]);s?$i(this,s):this.cm&&Fr(this.cm)})),undo:ni((function(){po(this,"undo")})),redo:ni((function(){po(this,"redo")})),undoSelection:ni((function(){po(this,"undo",!0)})),redoSelection:ni((function(){po(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=st(this,e),t=st(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})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(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 l=e.dataTransfer.getData("Text");if(l){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),eo(t.doc,Si(n,n)),p)for(var f=0;f=0;t--)mo(e.doc,"",r[t].from,r[t].to,"+delete");Fr(e)}))}function $o(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Zo(e,t,n){var r=$o(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,i){if(e){var o=le(n,t.doc.direction);if(o){var a,s=i<0?Q(o):o[0],u=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Nn(t,n);a=i<0?n.text.length-1:0;var l=In(t,c,a).top;a=ae((function(e){return In(t,c,e).top==l}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==u&&(a=$o(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,u)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}qo.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"},qo.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"},qo.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"},qo.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"]},qo.default=y?qo.macDefault:qo.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(e){return Xo(e,(function(t){if(t.empty()){var n=Ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ge(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new Ci(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Zr(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&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=ei(e,(function(t){u&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",l),he(i.scroller,"dragstart",p),he(i.scroller,"drop",c),o||(Ee(t),r.addNew||Ji(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(),fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",l),fe(i.scroller,"dragstart",p),fe(i.scroller,"drop",c),Cr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;Ee(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 Ci(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Ci(n,n)),n=cr(e,t,!0,!0),s=-1;else{var l=va(e,n,r.unit);a=r.extend?Ki(a,l.anchor,l.head,r.extend):l}r.addNew?-1==s?(s=c.length,Zi(o,wi(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Zi(o,wi(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Yi(o,s,a,H):(s=0,Zi(o,new Di([a],0),H),u=o.sel);var p=n;function f(t){if(0!=tt(p,t))if(p=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,l=R(Ge(o,n.line).text,n.ch,c),f=R(Ge(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=Ge(o,m).text,y=G(v,d,c);d==h?i.push(new Ci(et(m,y),et(m,y))):v.length>y&&i.push(new Ci(et(m,y),et(m,G(v,h,c))))}i.length||i.push(new Ci(n,n)),Zi(o,wi(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,E=a,x=va(e,t,r.unit),D=E.anchor;tt(x.anchor,D)>0?(b=x.head,D=ot(E.from(),x.anchor)):(b=x.anchor,D=it(E.to(),x.head));var C=u.ranges.slice(0);C[s]=function(e,t){var n=t.anchor,r=t.head,i=Ge(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=le(i);if(!o)return t;var a=ue(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=ue(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 Ci(new et(n.line,h,m),r)}(e,new Ci(st(o,D),b)),Zi(o,wi(e,C,s),H)}}var d=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(Ee(t),i.input.focus()),he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&Se(t)?function t(n){var a=++h,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,p)){e.curOp.focus=N(),f(s);var u=Tr(i,o);(s.line>=u.to||s.lined.bottom?20:0;c&&setTimeout(ei(e,(function(){h==a&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,fe(i.wrapper.ownerDocument,"mousemove",g),fe(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):we(e)==n.scroller&&Ee(e):2==i?(r&&Ji(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function va(e,t,n){if("char"==n)return new Ci(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ci(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ci(r.from,r.to)}function ya(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&&Ee(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,n))return De(t);o-=s.top-a.viewOffset;for(var u=0;u=i)return me(e,n,e,Xe(e.doc,o),e.display.gutterSpecs[u].className,t),De(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function Ea(e,t){Dn(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||ge(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function xa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}ma.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Ca={},wa={};function Sa(e,t,n){if(!t!=!(n&&n!=Da)){var r=e.display.dragFunctions,i=t?fe:he;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 ka(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"),Wt(e)),ur(e),pr(e),Un(e),setTimeout((function(){return zr(e)}),100)}function Aa(e,t){var n=this;if(!(this instanceof Aa))return new Aa(e,t);this.options=t=t?L(t):{},L(Ca,t,!1);var r=t.value;"string"==typeof r?r=new Fo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Aa.inputStyles[t.inputStyle](this),o=this.display=new gi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,xa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Hr(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;fe(t.scroller,"mousedown",ei(e,ga)),fe(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!ge(e,t)){var n=cr(e,t);if(n&&!ba(e,t)&&!Dn(e.display,t)){Ee(t);var r=e.findWordAt(n);Ji(e.doc,r.anchor,r.head)}}})):function(t){return ge(e,t)||Ee(t)}),fe(t.scroller,"contextmenu",(function(t){return Ea(e,t)}));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}fe(t.scroller,"touchstart",(function(i){if(!ge(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ba(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)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Dn(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 Ci(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new Ci(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ee(n)}i()})),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Mr(e,t.scroller.scrollTop),Lr(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return xi(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return xi(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ge(e,t)||Ce(t)},over:function(t){ge(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(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),Ce(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-No<100))Ce(t);else if(!ge(e,t)&&!Dn(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:ei(e,Io),leave:function(t){ge(e,t)||jo(e)}};var u=t.input.getField();fe(u,"keyup",(function(t){return pa.call(e,t)})),fe(u,"keydown",ei(e,la)),fe(u,"keypress",ei(e,fa)),fe(u,"focus",(function(t){return wr(e,t)})),fe(u,"blur",(function(t){return Sr(e,t)}))}(this),Lo(),Gr(this),this.curOp.forceUpdate=!0,Mi(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(P(wr,this),20):Sr(this),wa)wa.hasOwnProperty(c)&&wa[c](n,t[c],Da);fi(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(Ge(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=Fe(t),c=null;if(s&&r.ranges.length>1)if(Oa&&Oa.text.join("\n")==t){if(r.ranges.length%Oa.text.length==0){c=[];for(var l=0;l=0;f--){var d=r.ranges[f],h=d.from(),m=d.to();d.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ge(o,m.line).text.length,m.ch+Q(u).length)):s&&Oa&&Oa.lineWise&&Oa.text.join("\n")==t&&(h=m=et(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")};co(e.doc,g),un(e,"inputRead",e,g)}t&&!s&&ja(e,t),Fr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ia(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return Na(t,n,0,null,"paste")})),!0}function ja(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=_a(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ge(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=_a(e,i.head.line,"smart"));a&&un(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=ue(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 et(n.line,f,d)}}var h=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,u(e,1),"before"):new et(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):Zo(s,t,n))){if(r||!function(){var r=t.line+n;return!(r=e.first+e.size)&&(t=new et(r,t.ch,t.sticky),s=Ge(e,r))}())return!1;t=ea(i,e.cm,s,t.line,n)}else t=o;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,l="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||u(!f);f=!1){var d=s.text.charAt(t.ch)||"\n",h=te(d,p)?"w":l&&"\n"==d?"n":!l||/\s/.test(d)?null:"p";if(!l||f||h||(h="s"),c&&c!=h){n<0&&(n=1,u(),t.sticky="after");break}if(h&&(c=h),n>0&&!u(!f))break}var m=oo(e,t,o,a,!0);return nt(o,m)&&(m.hitSide=!0),m}function Ba(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*rr(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=Yn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ua=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 za(e,t){var n=Fn(e,t.line);if(!n||n.hidden)return null;var r=Ge(e.doc,t.line),i=_n(n,r,t.line),o=le(r,e.doc.direction),a="left";o&&(a=ue(o,t.ch)%2?"right":"left");var s=Pn(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Va(e,t){return t&&(e.bad=!0),e}function qa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Va(e.clipPos(et(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&&za(t,i)||{node:u[0].measure.map[2],offset:0},l=o.liner.firstLine()&&(a=et(a.line-1,Ge(r.doc,a.line-1).length)),s.ch==Ge(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=lr(r,a.line))?(t=Ye(i.view[0].line),n=i.view[0].node):(t=Ye(i.view[e].line),n=i.view[e-1].node.nextSibling);var u,c,l=lr(r,s.line);if(l==i.view.length-1?(u=i.viewTo-1,c=i.lineDiv.lastChild):(u=Ye(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(et(r,0),et(i+1,0),(g=+f,function(e){return e.id==g}));return void(d.length&&(o=d[0].find(0))&&l(Ke(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(Q(p)==Q(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=et(t,d),D=et(u,f.length?Q(f).length-h:0);return p.length>1||p[0]||tt(x,D)?(mo(r.doc,p,x,D,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.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))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return pr(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Na)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Wa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Wa.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ge(r,e)){if(r.somethingSelected())Fa({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ma(r);Fa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,q):(n.prevInput="",i.value=t.text.join("\n"),M(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),fe(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(i,"paste",(function(e){ge(r,e)||Ia(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(i,"cut",o),fe(i,"copy",o),fe(e.scroller,"paste",(function(t){if(!Dn(e,t)&&!ge(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)}})),fe(e.lineSpace,"selectstart",(function(t){Dn(e,t)||Ee(t)})),fe(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"})}})),fe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wa.prototype.createField=function(e){this.wrapper=La(),this.textarea=this.wrapper.firstChild},Wa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=Kn(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},Wa.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")},Wa.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&&M(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Wa.prototype.getField=function(){return this.textarea},Wa.prototype.supportsTouch=function(){return!1},Wa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},Wa.prototype.blur=function(){this.textarea.blur()},Wa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wa.prototype.receivedFocus=function(){this.slowPoll()},Wa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Wa.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))}))},Wa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ne(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},Wa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wa.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cr(n,e),c=r.scroller.scrollTop;if(o&&!p){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Zi)(n.doc,Si(o),q);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?(Ce(e),fe(window,"mouseup",(function e(){he(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?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())}),200)}}},Wa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Wa.prototype.setUneditable=function(){},Wa.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!=Da&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Da,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Oi(e)}),!0),n("indentUnit",2,Oi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Fi(e),Un(e),pr(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(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(e.doc,t,n[i],et(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!=Da&&e.refresh()})),n("specialCharPlaceholder",$t,(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){xa(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Yo(t),i=n!=Da&&Yo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ka,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=di(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return zr(e)}),!0),n("scrollbarStyle","native",(function(e){Hr(e),zr(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=di(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(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,Sa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Fi,!0),n("addModeClass",!1,Fi,!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,Fi,!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)}(Aa),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)&&ei(this,t[e])(this,n,i),me(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"](Yo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(_a(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Fr(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&&Yi(this.doc,r,new Ci(o,c[r].to()),q)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ft(this,Ge(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=Ge(this.doc,e)}else r=e;return Hn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-qt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(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=Kn(this,st(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=_r(e,t);null!=n.scrollTop&&Mr(e,n.scrollTop),null!=n.scrollLeft&&Lr(e,n.scrollLeft)}(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:ti(la),triggerOnKeyPress:ti(fa),triggerOnKeyUp:pa,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){ja(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5)&&ur(this),me(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Mi(this,e),Un(this),this.display.input.reset(),Nr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,un(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}},be(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})}}(Aa);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Fo.prototype)Fo.prototype.hasOwnProperty(Ka)&&U(Ga,Ka)<0&&(Aa.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Fo.prototype[Ka]));return be(Fo),Aa.inputStyles={textarea:Wa,contenteditable:Ua},Aa.defineMode=function(e){Aa.defaults.mode||"null"==e||(Aa.defaults.mode=e),Le.apply(this,arguments)},Aa.defineMIME=function(e,t){Pe[e]=t},Aa.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Aa.defineMIME("text/plain","null"),Aa.defineExtension=function(e,t){Aa.prototype[e]=t},Aa.defineDocExtension=function(e,t){Fo.prototype[e]=t},Aa.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&&(fe(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&&(he(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Aa((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=he,e.on=fe,e.wheelEventPixels=Ei,e.Doc=Fo,e.splitLines=Fe,e.countColumn=R,e.findColumn=G,e.isWordChar=ee,e.Pass=V,e.signal=me,e.Line=Gt,e.changeEnd=ki,e.scrollbarModel=qr,e.Pos=et,e.cmpPos=tt,e.modes=Me,e.mimeModes=Pe,e.resolveMode=Re,e.getMode=Be,e.modeExtensions=Ue,e.extendMode=ze,e.copyState=Ve,e.startState=He,e.innerMode=qe,e.commands=ta,e.keyMap=qo,e.keyName=Qo,e.isModifierKey=Ko,e.lookupKey=Go,e.normalizeKeyMap=Wo,e.StringStream=We,e.SharedTextMarker=Ao,e.TextMarker=So,e.LineWidget=Do,e.e_preventDefault=Ee,e.e_stopPropagation=xe,e.e_stop=Ce,e.addClass=I,e.contains=F,e.rmClass=k,e.keyNames=Bo}(Aa),Aa.version="5.49.2",Aa}()},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function o(e){return!(e>=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){return Array.prototype.slice.call(arguments,1).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(16),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(a.a)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||Object(a.a)(0,"column in locationOffset is 1-indexed and must be positive")};Object(p.a)(f);var d=n(46),h=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 m(e,t){var n=new b(h.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:g,lookahead:v}}function g(){return this.lastToken=this.token,this.token=this.lookahead()}function v(){var e=this.token;if(e.kind!==h.EOF)do{e=e.next||(e.next=x(this,e))}while(e.kind===h.COMMENT);return e}function y(e){var t=e.kind;return t===h.BANG||t===h.DOLLAR||t===h.AMP||t===h.PAREN_L||t===h.PAREN_R||t===h.SPREAD||t===h.COLON||t===h.EQUALS||t===h.AT||t===h.BRACKET_L||t===h.BRACKET_R||t===h.BRACE_L||t===h.PIPE||t===h.BRACE_R}function b(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 E(e){return isNaN(e)?h.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function x(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 b(h.EOF,i,i,a,s,t);var u=r.charCodeAt(o);switch(u){case 33:return new b(h.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 b(h.COMMENT,t,s,n,r,i,a.slice(t+1,s))}(n,o,a,s,t);case 36:return new b(h.DOLLAR,o,o+1,a,s,t);case 38:return new b(h.AMP,o,o+1,a,s,t);case 40:return new b(h.PAREN_L,o,o+1,a,s,t);case 41:return new b(h.PAREN_R,o,o+1,a,s,t);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new b(h.SPREAD,o,o+3,a,s,t);break;case 58:return new b(h.COLON,o,o+1,a,s,t);case 61:return new b(h.EQUALS,o,o+1,a,s,t);case 64:return new b(h.AT,o,o+1,a,s,t);case 91:return new b(h.BRACKET_L,o,o+1,a,s,t);case 93:return new b(h.BRACKET_R,o,o+1,a,s,t);case 123:return new b(h.BRACE_L,o,o+1,a,s,t);case 124:return new b(h.PIPE,o,o+1,a,s,t);case 125:return new b(h.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 b(h.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,l=!1;45===s&&(s=a.charCodeAt(++u));if(48===s){if((s=a.charCodeAt(++u))>=48&&s<=57)throw c(e,u,"Invalid number, unexpected digit after 0: ".concat(E(s),"."))}else u=D(e,u,s),s=a.charCodeAt(u);46===s&&(l=!0,s=a.charCodeAt(++u),u=D(e,u,s),s=a.charCodeAt(u));69!==s&&101!==s||(l=!0,43!==(s=a.charCodeAt(++u))&&45!==s||(s=a.charCodeAt(++u)),u=D(e,u,s),s=a.charCodeAt(u));if(46===s||69===s||101===s)throw c(e,u,"Invalid number, expected digit but got: ".concat(E(s),"."));return new b(l?h.FLOAT:h.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,l=0,p="";for(;s=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw c(e,i,"Invalid number, expected digit but got: ".concat(E(o),"."))}function C(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}Object(s.a)(b,(function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}));var w=n(9);function S(e,t){return new T(e,t).parseDocument()}function k(e,t){var n=new T(e,t);n.expectToken(h.SOF);var r=n.parseValueLiteral(!1);return n.expectToken(h.EOF),r}function A(e,t){var n=new T(e,t);n.expectToken(h.SOF);var r=n.parseTypeReference();return n.expectToken(h.EOF),r}var T=function(){function e(e,t){var n="string"===typeof e?new f(e):e;n instanceof f||Object(a.a)(0,"Must provide Source. Received: ".concat(Object(o.a)(n))),this._lexer=m(n),this._options=t||{}}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(h.NAME);return{kind:l.a.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:l.a.DOCUMENT,definitions:this.many(h.SOF,this.parseDefinition,h.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(h.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(h.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(h.BRACE_L))return{kind:l.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(h.NAME)&&(t=this.parseName()),{kind:l.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(h.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(h.PAREN_L,this.parseVariableDefinition,h.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:l.a.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(h.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(h.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(h.DOLLAR),{kind:l.a.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:l.a.SELECTION_SET,selections:this.many(h.BRACE_L,this.parseSelection,h.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(h.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(h.COLON)?(e=r,t=this.parseName()):t=r,{kind:l.a.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(h.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(h.PAREN_L,t,h.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(h.COLON),{kind:l.a.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:l.a.ARGUMENT,name:this.parseName(),value:(this.expectToken(h.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(h.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(h.NAME)?{kind:l.a.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:l.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:l.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:l.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 h.BRACKET_L:return this.parseList(e);case h.BRACE_L:return this.parseObject(e);case h.INT:return this._lexer.advance(),{kind:l.a.INT,value:t.value,loc:this.loc(t)};case h.FLOAT:return this._lexer.advance(),{kind:l.a.FLOAT,value:t.value,loc:this.loc(t)};case h.STRING:case h.BLOCK_STRING:return this.parseStringLiteral();case h.NAME:return"true"===t.value||"false"===t.value?(this._lexer.advance(),{kind:l.a.BOOLEAN,value:"true"===t.value,loc:this.loc(t)}):"null"===t.value?(this._lexer.advance(),{kind:l.a.NULL,loc:this.loc(t)}):(this._lexer.advance(),{kind:l.a.ENUM,value:t.value,loc:this.loc(t)});case h.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:l.a.STRING,value:e.value,block:e.kind===h.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:l.a.LIST,values:this.any(h.BRACKET_L,(function(){return t.parseValueLiteral(e)}),h.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:l.a.OBJECT,fields:this.any(h.BRACE_L,(function(){return t.parseObjectField(e)}),h.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(h.COLON),{kind:l.a.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(h.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(h.AT),{kind:l.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(h.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(h.BRACKET_R),e={kind:l.a.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(h.BANG)?{kind:l.a.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:l.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===h.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(h.STRING)||this.peek(h.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(h.BRACE_L,this.parseOperationTypeDefinition,h.BRACE_R);return{kind:l.a.SCHEMA_DEFINITION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(h.COLON);var n=this.parseNamedType();return{kind:l.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:l.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:l.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(h.AMP);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(h.AMP)||this._options.allowLegacySDLImplementsInterfaces&&this.peek(h.NAME))}return e},t.parseFieldsDefinition=function(){return this._options.allowLegacySDLEmptyFields&&this.peek(h.BRACE_L)&&this._lexer.lookahead().kind===h.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(h.BRACE_L,this.parseFieldDefinition,h.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(h.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:l.a.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(h.PAREN_L,this.parseInputValueDef,h.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(h.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(h.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:l.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:l.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:l.a.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(h.EQUALS)){this.expectOptionalToken(h.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(h.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:l.a.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(h.BRACE_L,this.parseEnumValueDefinition,h.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:l.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:l.a.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(h.BRACE_L,this.parseInputValueDef,h.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===h.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(h.BRACE_L,this.parseOperationTypeDefinition,h.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:l.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:l.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:l.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:l.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:l.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:l.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:l.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(h.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:l.a.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){this.expectOptionalToken(h.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(h.PIPE));return e},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==w.a[t.value])return t;throw this.unexpected(e)},t.loc=function(e){if(!this._options.noLocation)return new _(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 c(this._lexer.source,t.start,"Expected ".concat(e,", found ").concat(O(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!==h.NAME||t.value!==e)throw c(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(O(t)));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===h.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=e||this._lexer.token;return c(this._lexer.source,t.start,"Unexpected ".concat(O(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 _(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function O(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}Object(s.a)(_,(function(){return{start:this.start,end:this.end}}));var F=n(16),N=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 u.a('Name "'.concat(e,'" must not begin with "__", which is reserved by GraphQL introspection.'),t):L.test(e)?void 0:new u.a('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'),t)}var U=n(0);function z(e,t){return e===t||(Object(U.L)(e)&&Object(U.L)(t)?z(e.ofType,t.ofType):!(!Object(U.J)(e)||!Object(U.J)(t))&&z(e.ofType,t.ofType))}function V(e,t,n){return t===n||(Object(U.L)(n)?!!Object(U.L)(t)&&V(e,t.ofType,n.ofType):Object(U.L)(t)?V(e,t.ofType,n):Object(U.J)(n)?!!Object(U.J)(t)&&V(e,t.ofType,n.ofType):!Object(U.J)(t)&&!!(Object(U.C)(n)&&Object(U.N)(t)&&e.isPossibleType(n,t)))}function q(e,t,n){return t===n||(Object(U.C)(t)?Object(U.C)(n)?e.getPossibleTypes(t).some((function(t){return e.isPossibleType(n,t)})):e.isPossibleType(t,n):!!Object(U.C)(n)&&e.isPossibleType(n,t))}var H=n(35),W=n(44),G=n(24),K=n(12);function J(e){return Object(W.a)(e,Y)}function Q(e){if(!J(e))throw new Error("Expected ".concat(Object(o.a)(e)," to be a GraphQL directive."));return e}var Y=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(H.a)(e.extensions),this.astNode=e.astNode,e.name||Object(a.a)(0,"Directive must be named."),Array.isArray(e.locations)||Object(a.a)(0,"@".concat(e.name," locations must be an Array."));var t=e.args||{};Object(G.a)(t)&&!Array.isArray(t)||Object(a.a)(0,"@".concat(e.name," args must be an object with argument names as keys.")),this.args=Object(P.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(H.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(U.i)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},e}();Object(p.a)(Y),Object(s.a)(Y);var X=new Y({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[w.a.FIELD,w.a.FRAGMENT_SPREAD,w.a.INLINE_FRAGMENT],args:{if:{type:Object(U.e)(K.a),description:"Included when true."}}}),$=new Y({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[w.a.FIELD,w.a.FRAGMENT_SPREAD,w.a.INLINE_FRAGMENT],args:{if:{type:Object(U.e)(K.a),description:"Skipped when true."}}}),Z="No longer supported",ee=new Y({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[w.a.FIELD_DEFINITION,w.a.ENUM_VALUE],args:{reason:{type:K.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:Z}}}),te=Object.freeze([X,$,ee]);function ne(e){return J(e)&&te.some((function(t){return t.name===e.name}))}var re=n(11);function ie(e){return Object(W.a)(e,ae)}function oe(e){if(!ie(e))throw new Error("Expected ".concat(Object(o.a)(e)," to be a GraphQL schema."));return e}var ae=function(){function e(e){e&&e.assumeValid?this.__validationErrors=[]:(this.__validationErrors=void 0,Object(G.a)(e)||Object(a.a)(0,"Must provide configuration object."),!e.types||Array.isArray(e.types)||Object(a.a)(0,'"types" must be Array if provided but got: '.concat(Object(o.a)(e.types),".")),!e.directives||Array.isArray(e.directives)||Object(a.a)(0,'"directives" must be Array if provided but got: '+"".concat(Object(o.a)(e.directives),".")),!e.allowedLegacyNames||Array.isArray(e.allowedLegacyNames)||Object(a.a)(0,'"allowedLegacyNames" must be Array if provided but got: '+"".concat(Object(o.a)(e.allowedLegacyNames),"."))),this.extensions=e.extensions&&Object(H.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||te;var t=[this._queryType,this._mutationType,this._subscriptionType,re.__Schema].concat(e.types),n=Object.create(null);n=t.reduce(se,n),n=this._directives.reduce(ue,n),this._typeMap=n,this._possibleTypeMap=Object.create(null),this._implementations=Object.create(null);for(var r=0,i=Object(M.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 l.a.SELECTION_SET:var n=Object(U.A)(this.getType());this._parentTypeStack.push(Object(U.D)(n)?n:void 0);break;case l.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(U.O)(i)?i:void 0);break;case l.a.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case l.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(U.N)(a)?a:void 0);break;case l.a.INLINE_FRAGMENT:case l.a.FRAGMENT_DEFINITION:var s=e.typeCondition,u=s?Se(t,s):Object(U.A)(this.getType());this._typeStack.push(Object(U.O)(u)?u:void 0);break;case l.a.VARIABLE_DEFINITION:var c=Se(t,e.type);this._inputTypeStack.push(Object(U.G)(c)?c:void 0);break;case l.a.ARGUMENT:var p,f,d=this.getDirective()||this.getFieldDef();d&&(p=N(d.args,(function(t){return t.name===e.name.value})))&&(f=p.type),this._argument=p,this._defaultValueStack.push(p?p.defaultValue:void 0),this._inputTypeStack.push(Object(U.G)(f)?f:void 0);break;case l.a.LIST:var h=Object(U.B)(this.getInputType()),m=Object(U.J)(h)?h.ofType:h;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Object(U.G)(m)?m:void 0);break;case l.a.OBJECT_FIELD:var g,v,y=Object(U.A)(this.getInputType());Object(U.F)(y)&&(v=y.getFields()[e.name.value])&&(g=v.type),this._defaultValueStack.push(v?v.defaultValue:void 0),this._inputTypeStack.push(Object(U.G)(g)?g:void 0);break;case l.a.ENUM:var b,E=Object(U.A)(this.getInputType());Object(U.E)(E)&&(b=E.getValue(e.value)),this._enumValue=b}},t.leave=function(e){switch(e.kind){case l.a.SELECTION_SET:this._parentTypeStack.pop();break;case l.a.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case l.a.DIRECTIVE:this._directive=null;break;case l.a.OPERATION_DEFINITION:case l.a.INLINE_FRAGMENT:case l.a.FRAGMENT_DEFINITION:this._typeStack.pop();break;case l.a.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case l.a.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.a.LIST:case l.a.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.a.ENUM:this._enumValue=null}},e}();function Ae(e,t,n){var r=n.name.value;return r===re.SchemaMetaFieldDef.name&&e.getQueryType()===t?re.SchemaMetaFieldDef:r===re.TypeMetaFieldDef.name&&e.getQueryType()===t?re.TypeMetaFieldDef:r===re.TypeNameMetaFieldDef.name&&Object(U.D)(t)?re.TypeNameMetaFieldDef:Object(U.N)(t)||Object(U.H)(t)?t.getFields()[r]:void 0}var Te=n(127);function _e(e){var t=Object.create(null);return{OperationDefinition:function(n){var r=n.name;return r&&(t[r.value]?e.reportError(new u.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 Oe(e){var t=0;return{Document:function(e){t=e.definitions.filter((function(e){return e.kind===l.a.OPERATION_DEFINITION})).length},OperationDefinition:function(n){!n.name&&t>1&&e.reportError(new u.a("This anonymous operation must be the only defined operation.",n))}}}function Fe(e){return{OperationDefinition:function(t){var n;"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new u.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)))}}}var Ne=5;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,Ne),s=a.pop();return o+a.join(", ")+", or "+s+"?"}function je(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 u.a("Must provide only one schema definition.",t)),++r)}}},function(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]:Qt,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new ke(e),i=arguments.length>4?arguments[4]:void 0;t||Object(a.a)(0,"Must provide document"),le(e);var o=Object.freeze({}),s=[],c=i&&i.maxErrors,l=new en(e,t,r,(function(e){if(null!=c&&s.length>=c)throw s.push(new u.a("Too many validation errors, error limit reached. Validation aborted.")),o;s.push(e)})),p=Object(F.d)(n.map((function(e){return e(l)})));try{Object(F.c)(t,Object(F.e)(r,p))}catch(f){if(f!==o)throw f}return s}function nn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yt,r=[],i=new Zt(e,t,(function(e){r.push(e)})),o=n.map((function(e){return e(i)}));return Object(F.c)(e,Object(F.d)(o)),r}var rn=n(38);var on=n(103);function an(e,t){return{prev:e,key:t}}function sn(e){for(var t=[],n=e;n;)t.push(n.key),n=n.prev;return t.reverse()}function un(e,t,n){return e&&Array.isArray(e.path)?e:new u.a(e&&e.message,e&&e.nodes||t,e&&e.source,e&&e.positions,n,e)}function cn(e,t){if("query"===t.operation){var n=e.getQueryType();if(!n)throw new u.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 u.a("Schema is not configured for mutations.",t);return r}if("subscription"===t.operation){var i=e.getSubscriptionType();if(!i)throw new u.a("Schema is not configured for subscriptions.",t);return i}throw new u.a("Can only have query, mutation and subscription operations.",t)}function ln(e){return e.map((function(e){return"number"===typeof e?"["+e.toString()+"]":"."+e})).join("")}function pn(e,t,n){if(e){if(Object(U.L)(t)){if(e.kind===l.a.NULL)return;return pn(e,t.ofType,n)}if(e.kind===l.a.NULL)return null;if(e.kind===l.a.VARIABLE){var r=e.name.value;if(!n||Object(pt.a)(n[r]))return;var i=n[r];if(null===i&&Object(U.L)(t))return;return i}if(Object(U.J)(t)){var a=t.ofType;if(e.kind===l.a.LIST){for(var s=[],u=0,c=e.values;u2&&void 0!==arguments[2]?arguments[2]:hn)}function hn(e,t,n){var r="Invalid value "+Object(o.a)(t);throw e.length>0&&(r+=' at "value'.concat(ln(e),'": ')),n.message=r+": "+n.message,n}function mn(e,t,n,r){var i=r&&r.maxErrors,a=[];try{var s=function(e,t,n,r){for(var i={},a=function(a){var s=t[a],c=s.variable.name.value,l=Se(e,s.type);if(!Object(U.G)(l)){var p=Object(Be.print)(s.type);return r(new u.a('Variable "$'.concat(c,'" expected value of type "').concat(p,'" which cannot be used as an input type.'),s.type)),"continue"}if(!yn(n,c)){if(s.defaultValue)i[c]=pn(s.defaultValue,l);else if(Object(U.L)(l)){var f=Object(o.a)(l);r(new u.a('Variable "$'.concat(c,'" of required type "').concat(f,'" was not provided.'),s))}return"continue"}var d=n[c];if(null===d&&Object(U.L)(l)){var h=Object(o.a)(l);return r(new u.a('Variable "$'.concat(c,'" of non-null type "').concat(h,'" must not be null.'),s)),"continue"}i[c]=dn(d,l,(function(e,t,n){var i='Variable "$'.concat(c,'" got invalid value ')+Object(o.a)(t);e.length>0&&(i+=' at "'.concat(c).concat(ln(e),'"')),r(new u.a(i+"; "+n.message,s,void 0,void 0,void 0,n.originalError))}))},s=0;s=i)throw new u.a("Too many errors processing variables, error limit reached. Execution aborted.");a.push(e)}));if(0===a.length)return{coerced:s}}catch(c){a.push(c)}return{errors:a}}function gn(e,t,n){for(var r={},i=Object(lt.a)(t.arguments||[],(function(e){return e.name.value})),a=0,s=e.args;a0)return{errors:p};try{t=S(r)}catch(c){return{errors:[c]}}var f=tn(n,t);return f.length>0?{errors:f}:bn({schema:n,document:t,rootValue:i,contextValue:o,variableValues:a,operationName:s,fieldResolver:u,typeResolver:l})}var Wn=n(85),Gn=n(131);function Kn(e,t,n){var r,i,o,a,s,u,c=Object(rn.c)(e);function l(e){return e.done?e:Jn(e.value,t).then(Qn,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 Jn(e,p).then(Qn,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=rn.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 Jn(e,t){return new Promise((function(n){return n(t(e))}))}function Qn(e){return{value:e,done:!1}}function Yn(e,t,n,r,i,o,a,s){return 1===arguments.length?$n(e):$n({schema:e,document:t,rootValue:n,contextValue:r,variableValues:i,operationName:o,fieldResolver:a,subscribeFieldResolver:s})}function Xn(e){if(e instanceof u.a)return{errors:[e]};throw e}function $n(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=Zn(t,n,r,i,o,a,u),l=function(e){return bn(t,n,e,i,o,a,s)};return c.then((function(e){return Object(rn.d)(e)?Kn(e,l,Xn):e}))}function Zn(e,t,n,r,i,a,s){xn(e,t,i);try{var c=Dn(e,t,n,r,i,a,s);if(Array.isArray(c))return Promise.resolve({errors:c});var l=cn(e,c.operation),p=wn(c,l,c.operation.selectionSet,Object.create(null),Object.create(null)),f=Object.keys(p)[0],d=p[f],h=d[0].name.value,m=zn(e,l,h);if(!m)throw new u.a('The subscription field "'.concat(h,'" is not defined.'),d);var g=m.subscribe||c.fieldResolver,v=an(void 0,f),y=Tn(c,m,d,l,v),b=_n(c,m,d,g,n,y);return Promise.resolve(b).then((function(e){if(e instanceof Error)return{errors:[un(e,d,sn(v))]};if(Object(rn.d)(e))return e;throw new Error("Subscription field must return Async Iterable. Received: "+Object(o.a)(e))}))}catch(E){return E instanceof u.a?Promise.resolve({errors:[E]}):Promise.reject(E)}}function er(e){e||Object(a.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 tr(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 nr=tr(),rr=n(216);function ir(e,t){var n=bn(e,S(tr(t)));return!i(n)&&!n.errors&&n.data||Object(we.a)(0),n.data}var or=n(27);function ar(e,t){Object(G.a)(e)&&Object(G.a)(e.__schema)||Object(a.a)(0,'Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: '+Object(o.a)(e));for(var n=e.__schema,r=Object(or.a)(n.types,(function(e){return e.name}),(function(e){return function(e){if(e&&e.name&&e.kind)switch(e.kind){case re.TypeKind.SCALAR:return n=e,new U.g({name:n.name,description:n.description});case re.TypeKind.OBJECT:return function(e){if(!e.interfaces)throw new Error("Introspection result missing interfaces: "+Object(o.a)(e));return new U.f({name:e.name,description:e.description,interfaces:function(){return e.interfaces.map(g)},fields:function(){return v(e)}})}(e);case re.TypeKind.INTERFACE:return t=e,new U.c({name:t.name,description:t.description,fields:function(){return v(t)}});case re.TypeKind.UNION:return function(e){if(!e.possibleTypes)throw new Error("Introspection result missing possibleTypes: "+Object(o.a)(e));return new U.h({name:e.name,description:e.description,types:function(){return e.possibleTypes.map(m)}})}(e);case re.TypeKind.ENUM:return function(e){if(!e.enumValues)throw new Error("Introspection result missing enumValues: "+Object(o.a)(e));return new U.a({name:e.name,description:e.description,values:Object(or.a)(e.enumValues,(function(e){return e.name}),(function(e){return{description:e.description,deprecationReason:e.deprecationReason}}))})}(e);case re.TypeKind.INPUT_OBJECT:return function(e){if(!e.inputFields)throw new Error("Introspection result missing inputFields: "+Object(o.a)(e));return new U.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(o.a)(e))}(e)})),i=0,s=[].concat(K.g,re.introspectionTypes);i0?function(){return n.map((function(e){return t.getNamedType(e)}))}:[],o=r&&r.length>0?function(){return lr(r,(function(e){return t.buildField(e)}))}:Object.create(null);return new U.f({name:e.name.value,description:fr(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 lr(n,(function(e){return t.buildField(e)}))}:Object.create(null);return new U.c({name:e.name.value,description:fr(e,this._options),fields:r,astNode:e})},t._makeEnumDef=function(e){var t=this,n=e.values||[];return new U.a({name:e.name.value,description:fr(e,this._options),values:lr(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 U.h({name:e.name.value,description:fr(e,this._options),types:r,astNode:e})},t._makeScalarDef=function(e){return new U.g({name:e.name.value,description:fr(e,this._options),astNode:e})},t._makeInputObjectDef=function(e){var t=this,n=e.fields;return new U.b({name:e.name.value,description:fr(e,this._options),fields:n?function(){return lr(n,(function(e){return t.buildInputField(e)}))}:Object.create(null),astNode:e})},e}();function lr(e,t){return Object(or.a)(e,(function(e){return e.name.value}),t)}function pr(e){var t=vn(ee,e);return t&&t.reason}function fr(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===h.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(d.a)("\n"+n)}}function dr(e,t){return sr(S(e,t),t)}var hr=n(47);function mr(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 gr(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(Pr).join(", ")+")":"(\n"+t.map((function(t,r){return Rr(e,t," "+n,!r)+" "+n+Pr(t)})).join("\n")+"\n"+n+")"}function Pr(e){var t=Object(kr.a)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=" = ".concat(Object(Be.print)(t))),n}function Lr(e){if(!e.isDeprecated)return"";var t=e.deprecationReason,n=Object(kr.a)(t,K.e);return n&&""!==t&&t!==Z?" @deprecated(reason: "+Object(Be.print)(n)+")":" @deprecated"}function Rr(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=function(e,t){var n=e.split("\n");return j(n,(function(e){return e.length70;return(n&&!r?"\n"+n:n)+Object(d.c)(o,"",a).replace(/\n/g,"\n"+n)+"\n"}var Br=n(195);function Ur(e,t,n,r){var i=[],a=dn(e,t,(function(e,t,a){var s="Invalid value "+Object(o.a)(t),c=[].concat(sn(r),e);c.length>0&&(s+=' at "value'.concat(ln(c),'"')),i.push(new u.a(s+": "+a.message,n,void 0,void 0,void 0,a.originalError))}));return i.length>0?{errors:i,value:void 0}:{errors:void 0,value:a}}function zr(e,t){var n=Ur(e,t).errors;return n?n.map((function(e){return e.message})):[]}function Vr(e,t){var n=new ae({}),r={kind:l.a.DOCUMENT,definitions:[]},i=new ke(n,void 0,e),o=new en(n,r,i),a=ht(o);return Object(F.c)(t,Object(F.e)(i,a)),o.getErrors()}function qr(e){return{kind:"Document",definitions:j(e,(function(e){return e.definitions}))}}function Hr(e){var t,n=[],r=Object.create(null),i=new Map,o=Object.create(null),a=0;Object(F.c)(e,{OperationDefinition:function(e){t=Wr(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 Qr(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 Yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xr=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"}),$r=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 Zr(e,t){return ti(e,t).filter((function(e){return e.type in Xr}))}function ei(e,t){return ti(e,t).filter((function(e){return e.type in $r}))}function ti(e,t){return[].concat(function(e,t){for(var n=[],r=fi(Object(M.a)(e.getTypeMap()),Object(M.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=null,x={notify:function(){}};var D=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=x}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=E,e=E},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=k,this.store=null,this.selector.run=k,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 D(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(S)):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 C&&(s.prototype.UNSAFE_componentWillReceiveProps=s.prototype.componentWillReceiveProps,delete s.prototype.componentWillReceiveProps),s.WrappedComponent=t,s.displayName=o,s.childContextTypes=P,s.contextTypes=M,s.propTypes=M,g()(s,t)}}var T=Object.prototype.hasOwnProperty;function _(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function O(e,t){if(_(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 q(e,t){return e===t}var H=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?A:n,i=t.mapStateToPropsFactories,o=void 0===i?P:i,a=t.mapDispatchToPropsFactories,s=void 0===a?M:a,u=t.mergePropsFactories,c=void 0===u?R:u,l=t.selectorFactory,p=void 0===l?z: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?q:f,g=a.areOwnPropsEqual,v=void 0===g?O:g,y=a.areStatePropsEqual,b=void 0===y?O:y,E=a.areMergedPropsEqual,x=void 0===E?O:E,D=h(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),C=V(e,o,"mapStateToProps"),w=V(t,s,"mapDispatchToProps"),S=V(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))}}();n.d(t,"Provider",(function(){return p})),n.d(t,"createProvider",(function(){return l})),n.d(t,"connectAdvanced",(function(){return A})),n.d(t,"connect",(function(){return H}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(19),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(n){void 0===n&&(n=i);var r=e.call(this,"number"===typeof n?i+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=i,a(r,t.prototype),r}return Object(r.b)(t,e),t}(Error);function u(e,t){if(!e)throw new s(t)}function c(e){return function(){return console[e].apply(console,arguments)}}!function(e){e.warn=c("warn"),e.error=c("error")}(u||(u={}));var l={env:{}};if("object"===typeof e)l=e;else try{Function("stub","process = stub")(l)}catch(p){}}).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?c(e)+t:t}function p(){return!0}function f(e,t,n){return(0===e&&!g(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function d(e,t){return m(e,t,0)}function h(e,t){return m(e,t,t)}function m(e,t,n){return void 0===e?n:g(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function g(e){return e<0||0===e&&1/e===-1/0}var v="@@__IMMUTABLE_ITERABLE__@@";function y(e){return Boolean(e&&e[v])}var b="@@__IMMUTABLE_KEYED__@@";function E(e){return Boolean(e&&e[b])}var x="@@__IMMUTABLE_INDEXED__@@";function D(e){return Boolean(e&&e[x])}function C(e){return E(e)||D(e)}var w=function(e){return y(e)?e:Y(e)},S=function(e){function t(e){return E(e)?e:X(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(w),k=function(e){function t(e){return D(e)?e:$(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(w),A=function(e){function t(e){return y(e)&&!C(e)?e:Z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(w);w.Keyed=S,w.Indexed=k,w.Set=A;var T="@@__IMMUTABLE_SEQ__@@";function _(e){return Boolean(e&&e[T])}var O="@@__IMMUTABLE_RECORD__@@";function F(e){return Boolean(e&&e[O])}function N(e){return y(e)||F(e)}var I="@@__IMMUTABLE_ORDERED__@@";function j(e){return Boolean(e&&e[I])}var M=0,P=1,L=2,R="function"===typeof Symbol&&Symbol.iterator,B="@@iterator",U=R||B,z=function(e){this.next=e};function V(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 q(){return{value:void 0,done:!0}}function H(e){return!!K(e)}function W(e){return e&&"function"===typeof e.next}function G(e){var t=K(e);return t&&t.call(e)}function K(e){var t=e&&(R&&e[R]||e[B]);if("function"===typeof t)return t}z.prototype.toString=function(){return"[Iterator]"},z.KEYS=M,z.VALUES=P,z.ENTRIES=L,z.prototype.inspect=z.prototype.toSource=function(){return this.toString()},z.prototype[U]=function(){return this};var J=Object.prototype.hasOwnProperty;function Q(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 Y=function(e){function t(e){return null===e||void 0===e?ie():N(e)?e.toSeq():function(e){var t=se(e);if(t)return t;if("object"===typeof e)return new te(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 z((function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return V(e,o[0],o[1])}))}return this.__iteratorUncached(e,t)},t}(w),X=function(e){function t(e){return null===e||void 0===e?ie().toKeyedSeq():y(e)?E(e)?e.toSeq():e.fromEntrySeq():F(e)?e.toSeq():oe(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(Y),$=function(e){function t(e){return null===e||void 0===e?ie():y(e)?E(e)?e.entrySeq():e.toIndexedSeq():F(e)?e.toSeq().entrySeq():ae(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}(Y),Z=function(e){function t(e){return(y(e)&&!C(e)?e:$(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}(Y);Y.isSeq=_,Y.Keyed=X,Y.Set=Z,Y.Indexed=$,Y.prototype[T]=!0;var ee=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[l(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 z((function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return V(e,o,n[o])}))},t}($),te=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 J.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 z((function(){if(o===i)return{value:void 0,done:!0};var a=r[t?i-++o:o++];return V(e,a,n[a])}))},t}(X);te.prototype[I]=!0;var ne,re=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=G(this._collection),r=0;if(W(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=G(this._collection);if(!W(n))return new z(q);var r=0;return new z((function(){var t=n.next();return t.done?t:V(e,r++,t.value)}))},t}($);function ie(){return ne||(ne=new ee([]))}function oe(e){var t=Array.isArray(e)?new ee(e):H(e)?new re(e):void 0;if(t)return t.fromEntrySeq();if("object"===typeof e)return new te(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function ae(e){var t=se(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function se(e){return Q(e)?new ee(e):H(e)?new re(e):void 0}var ue="@@__IMMUTABLE_MAP__@@";function ce(e){return Boolean(e&&e[ue])}function le(e){return ce(e)&&j(e)}function pe(e){return Boolean(e&&"function"===typeof e.equals&&"function"===typeof e.hashCode)}function fe(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!!(pe(e)&&pe(t)&&e.equals(t))}var de="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 he(e){return e>>>1&1073741824|3221225471&e}var me=Object.prototype.valueOf;function ge(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 he(t)}(e);case"string":return e.length>we?function(e){var t=Ae[e];void 0===t&&(t=ve(e),ke===Se&&(ke=0,Ae={}),ke++,Ae[e]=t);return t}(e):ve(e);case"object":case"function":return null===e?1108378658:"function"===typeof e.hashCode?he(e.hashCode(e)):(e.valueOf!==me&&"function"===typeof e.valueOf&&(e=e.valueOf(e)),function(e){var t;if(xe&&void 0!==(t=Ee.get(e)))return t;if(void 0!==(t=e[Ce]))return t;if(!be){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ce]))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=++De,1073741824&De&&(De=0);if(xe)Ee.set(e,t);else{if(void 0!==ye&&!1===ye(e))throw new Error("Non-extensible objects are not allowed as keys.");if(be)Object.defineProperty(e,Ce,{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[Ce]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ce]=t}}return t}(e));case"undefined":return 1108378659;default:if("function"===typeof e.toString)return ve(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function ve(e){for(var t=0,n=0;n=0&&(c.get=function(t,n){return(t=l(this,t))>=0&&ts)return{value:void 0,done:!0};var e=i.next();return r||t===P||e.done?e:V(t,u-1,t===M?void 0:e.value[1],e)}))},c}function Le(e,t,n,r){var i=Ke(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(L,o),u=!0,c=0;return new z((function(){var e,o,l;do{if((e=s.next()).done)return r||i===P?e:V(i,c++,i===M?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 i===L?e:V(i,o,l,e)}))},i}function Re(e,t){var n=E(e),r=[e].concat(t).map((function(e){return y(e)?n&&(e=S(e)):e=n?oe(e):ae(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&&E(i)||D(e)&&D(i))return i}var o=new ee(r);return n?o=o.toKeyedSeq():D(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 Be(e,t,n){var r=Ke(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 qe(e,t,n,r){var i=Ke(e),o=new ee(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(P,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=w(e),G(i?e.reverse():e)})),a=0,s=!1;return new z((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}:V(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function He(e,t){return e===t?e:_(e)?t:e.constructor(t)}function We(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ge(e){return E(e)?S:D(e)?k:A}function Ke(e){return Object.create((E(e)?X:D(e)?$:Z).prototype)}function Je(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Y.prototype.cacheResult.call(this)}function Qe(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 yt(this,t,e)}function yt(e,t,n){for(var r=[],i=0;i0;)t[n]=arguments[n+1];return wt(e,t)}function Et(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return wt(t,n,e)}function xt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return Ct(e,t)}function Dt(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return Ct(t,n,e)}function Ct(e,t,n){return wt(e,t,function(e){return function t(n,r,i){return tt(n)&&tt(r)?wt(n,[r],t):e?e(n,r,i):r}}(n))}function wt(e,t,n){if(!tt(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(N(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?k:S,a=r?function(t){i===e&&(i=ot(i)),i.push(t)}:function(t,r){var o=J.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=ot(i)),i[r]=a)},s=0;s0;)t[n]=arguments[n+1];return Ct(this,t,e)}function At(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return ut(this,e,Wt(),(function(e){return wt(e,t)}))}function Tt(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return ut(this,e,Wt(),(function(e){return Ct(e,t)}))}function _t(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Ot(){return this.__ownerID?this:this.__ensureOwner(new u)}function Ft(){return this.__ensureOwner()}function Nt(){return this.__altered}_e.prototype.cacheResult=Te.prototype.cacheResult=Oe.prototype.cacheResult=Fe.prototype.cacheResult=Je;var It=function(e){function t(t){return null===t||void 0===t?Wt():ce(t)&&!j(t)?t:Wt().withMutations((function(n){var r=e(t);$e(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 Wt().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 Gt(this,e,t)},t.prototype.remove=function(e){return Gt(this,e,a)},t.prototype.deleteAll=function(e){var t=w(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):Wt()},t.prototype.sort=function(e){return yn(Ue(this,e))},t.prototype.sortBy=function(e,t){return yn(Ue(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 zt(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?Ht(this.size,this._root,e,this.__hash):0===this.size?Wt():(this.__ownerID=e,this.__altered=!1,this)},t}(S);It.isMap=ce;var jt=It.prototype;jt[ue]=!0,jt.delete=jt.remove,jt.removeAll=jt.deleteAll,jt.setIn=lt,jt.removeIn=jt.deleteIn=ft,jt.update=ht,jt.updateIn=mt,jt.merge=jt.concat=gt,jt.mergeWith=vt,jt.mergeDeep=St,jt.mergeDeepWith=kt,jt.mergeIn=At,jt.mergeDeepIn=Tt,jt.withMutations=_t,jt.wasAltered=Nt,jt.asImmutable=Ft,jt["@@transducer/init"]=jt.asMutable=Ot,jt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},jt["@@transducer/result"]=function(e){return e.asImmutable()};var Mt=function(e,t){this.ownerID=e,this.entries=t};Mt.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=$t)return function(e,t,n,r){e||(e=new u);for(var i=new Bt(e,ge(n),[n,r]),o=0;o>>e)&o),s=this.bitmap;return 0===(s&a)?i:this.nodes[Yt(s&a-1)].get(e+r,t,n,i)},Pt.prototype.update=function(e,t,n,s,u,c,l){void 0===n&&(n=ge(s));var p=(0===t?n:n>>>t)&o,f=1<=Zt)return function(e,t,n,r,o){for(var a=0,s=new Array(i),u=0;0!==n;u++,n>>>=1)s[u]=1&n?t[a++]:void 0;return s[r]=o,new Lt(e,a+1,s)}(e,g,d,p,y);if(h&&!y&&2===g.length&&Jt(g[1^m]))return g[1^m];if(h&&y&&1===g.length&&Jt(y))return y;var b=e&&e===this.ownerID,E=h?y?d:d^f:d|f,x=h?y?Xt(g,m,y,b):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,s=this.nodes[a];return s?s.get(e+r,t,n,i):i},Lt.prototype.update=function(e,t,n,i,s,u,c){void 0===n&&(n=ge(i));var l=(0===t?n:n>>>t)&o,p=s===a,f=this.nodes,d=f[l];if(p&&!d)return this;var h=Kt(d,e,t+r,n,i,s,u,c);if(h===d)return this;var m=this.count;if(d){if(!h&&--m>>n)&o,c=(0===n?i:i>>>n)&o,l=u===c?[Qt(e,t,n+r,i,a)]:(s=new Bt(t,i,a),u>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Xt(e,t,n,r){var i=r?e:Ye(e);return i[t]=n,i}var $t=i/4,Zt=i/2,en=i/4,tn="@@__IMMUTABLE_LIST__@@";function nn(e){return Boolean(e&&e[tn])}var rn=function(e){function t(t){var n=pn();if(null===t||void 0===t)return n;if(nn(t))return t;var o=e(t),a=o.size;return 0===a?n:($e(a),a>0&&a=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?mn(e,t).set(0,n):mn(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o={value:!1};t>=gn(e._capacity)?r=fn(r,e.__ownerID,0,t,n,o):i=fn(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 ln(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=r,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):pn()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){mn(n,0,t+e.length);for(var r=0;r>>t&o;if(i>=this.array.length)return new an([],e);var a,s=0===i;if(t>0){var u=this.array[i];if((a=u&&u.removeBefore(e,t-r,n))===u&&s)return this}if(s&&!a)return this;var c=dn(this,e);if(!s)for(var l=0;l>>t&o;if(a>=this.array.length)return this;if(t>0){var s=this.array[a];if((i=s&&s.removeAfter(e,t-r,n))===s&&a===this.array.length-1)return this}var u=dn(this,e);return u.array.splice(a+1),i&&(u.array[a]=i),u};var sn,un={};function cn(e,t){var n=e._origin,o=e._capacity,a=gn(o),s=e._tail;return u(e._root,e._level,0);function u(e,c,l){return 0===c?function(e,r){var u=r===a?s&&s.array:e&&e.array,c=r>n?0:n-r,l=o-r;l>i&&(l=i);return function(){if(c===l)return un;var e=t?--l:c++;return u&&u[e]}}(e,l):function(e,a,s){var c,l=e&&e.array,p=s>n?0:n-s>>a,f=1+(o-s>>a);f>i&&(f=i);return function(){for(;;){if(c){var e=c();if(e!==un)return e;c=null}if(p===f)return un;var n=t?--f:p++;c=u(l&&l[n],a-r,s+(n<>>n&o,p=e&&l0){var f=e&&e.array[l],d=fn(f,t,n-r,i,a,u);return d===f?e:((c=dn(e,t)).array[l]=d,c)}return p&&e.array[l]===a?e:(u&&s(u),c=dn(e,t),void 0===a&&l===c.array.length-1?c.array.pop():c.array[l]=a,c)}function dn(e,t){return t&&e&&t===e.ownerID?e:new an(e?e.array.slice():[],t)}function hn(e,t){if(t>=gn(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>i&o],i-=r;return n}}function mn(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var i=e.__ownerID||new u,a=e._origin,s=e._capacity,c=a+t,l=void 0===n?s:n<0?s+n:a+n;if(c===a&&l===s)return e;if(c>=l)return e.clear();for(var p=e._level,f=e._root,d=0;c+d<0;)f=new an(f&&f.array.length?[void 0,f]:[],i),d+=1<<(p+=r);d&&(c+=d,a+=d,l+=d,s+=d);for(var h=gn(s),m=gn(l);m>=1<h?new an([],i):g;if(g&&m>h&&cr;b-=r){var E=h>>>b&o;y=y.array[E]=dn(y.array[E],i)}y.array[h>>>r&o]=g}if(l=m)c-=m,l-=m,p=r,f=null,v=v&&v.removeBefore(i,0,c);else if(c>a||m>>p&o;if(x!==m>>>p&o)break;x&&(d+=(1<a&&(f=f.removeBefore(i,p,c-d)),f&&m>>r<=i&&u.size>=2*s.size?(r=(o=u.filter((function(e,t){return void 0!==e&&c!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=s.remove(t),o=c===u.size-1?u.pop():u.set(c,void 0))}else if(l){if(n===u.get(c)[1])return e;r=s,o=u.set(c,[t,n])}else r=s.set(t,u.size),o=u.set(u.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):bn(r,o)}yn.isOrderedMap=le,yn.prototype[I]=!0,yn.prototype.delete=yn.prototype.remove;var Dn="@@__IMMUTABLE_STACK__@@";function Cn(e){return Boolean(e&&e[Dn])}var wn=function(e){function t(e){return null===e||void 0===e?Tn():Cn(e)?e:Tn().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=l(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):An(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Cn(t))return t;$e(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):An(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):Tn()},t.prototype.slice=function(t,n){if(f(t,n,this.size))return this;var r=d(t,this.size);if(h(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):An(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?An(this.size,this._head,e,this.__hash):0===this.size?Tn():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new ee(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 ee(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new z((function(){if(r){var t=r.value;return r=r.next,V(e,n++,t)}return{value:void 0,done:!0}}))},t}(k);wn.isStack=Cn;var Sn,kn=wn.prototype;function An(e,t,n,r){var i=Object.create(kn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Tn(){return Sn||(Sn=An(0))}kn[Dn]=!0,kn.shift=kn.pop,kn.unshift=kn.push,kn.unshiftAll=kn.pushAll,kn.withMutations=_t,kn.wasAltered=Nt,kn.asImmutable=Ft,kn["@@transducer/init"]=kn.asMutable=Ot,kn["@@transducer/step"]=function(e,t){return e.unshift(t)},kn["@@transducer/result"]=function(e){return e.asImmutable()};var _n="@@__IMMUTABLE_SET__@@";function On(e){return Boolean(e&&e[_n])}function Fn(e){return On(e)&&j(e)}function Nn(e,t){if(e===t)return!0;if(!y(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||E(e)!==E(t)||D(e)!==D(t)||j(e)!==j(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!C(e);if(j(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&fe(i[1],e)&&(n||fe(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"===typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var s=!0,u=t.__iterate((function(t,r){if(n?!e.has(t):i?!fe(t,e.get(r,a)):!fe(e.get(r,a),t))return s=!1,!1}));return s&&e.size===u}function In(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 jn(e){if(!e||"object"!==typeof e)return e;if(!y(e)){if(!tt(e))return e;e=Y(e)}if(E(e)){var t={};return e.__iterate((function(e,n){t[n]=jn(e)})),t}var n=[];return e.__iterate((function(e){n.push(jn(e))})),n}var Mn=function(e){function t(t){return null===t||void 0===t?Un():On(t)&&!j(t)?t:Un().withMutations((function(n){var r=e(t);$e(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(S(e).keySeq())},t.intersect=function(e){return(e=w(e).toArray()).length?Ln.intersect.apply(t(e.pop()),e):Un()},t.union=function(e){return(e=w(e).toArray()).length?Ln.union.apply(t(e.pop()),e):Un()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Rn(this,this._map.set(e,e))},t.prototype.remove=function(e){return Rn(this,this._map.remove(e))},t.prototype.clear=function(){return Rn(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=de(t<<13|t>>>-13,5),t=de((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=he((t=de(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+rr(ge(e),ge(t))|0}:function(e,t){r=r+rr(ge(e),ge(t))|0}:t?function(e){r=31*r+ge(e)|0}:function(e){r=r+ge(e)|0}),r)}(this))}});var Kn=w.prototype;Kn[v]=!0,Kn[U]=Kn.values,Kn.toJSON=Kn.toArray,Kn.__toStringMapper=nt,Kn.inspect=Kn.toSource=function(){return this.toString()},Kn.chain=Kn.flatMap,Kn.contains=Kn.includes,In(S,{flip:function(){return He(this,Ne(this))},mapEntries:function(e,t){var n=this,r=0;return He(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return He(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Jn=S.prototype;Jn[b]=!0,Jn[U]=Kn.entries,Jn.toJSON=Gn,Jn.__toStringMapper=function(e,t){return nt(t)+": "+nt(e)},In(k,{toKeyedSeq:function(){return new Te(this,!1)},filter:function(e,t){return He(this,Me(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 He(this,je(this,!1))},slice:function(e,t){return He(this,Pe(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=d(e,e<0?this.count():this.size);var r=this.slice(0,e);return He(this,1===n?r:r.concat(Ye(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 He(this,Be(this,e,!1))},get:function(e,t){return(e=l(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=l(this,e))>=0&&(void 0!==this.size?this.size===1/0||et?-1:0}function rr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Qn[x]=!0,Qn[I]=!0,In(A,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),A.prototype.has=Kn.includes,A.prototype.contains=A.prototype.includes,In(X,S.prototype),In($,k.prototype),In(Z,A.prototype);var ir=function(e){function t(e){return null===e||void 0===e?ur():Fn(e)?e:ur().withMutations((function(t){var n=A(e);$e(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(S(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Mn);ir.isOrderedSet=Fn;var or,ar=ir.prototype;function sr(e,t){var n=Object.create(ar);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function ur(){return or||(or=sr(En()))}ar[I]=!0,ar.zip=Qn.zip,ar.zipWith=Qn.zipWith,ar.__empty=ur,ar.__make=sr;var cr=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 yr(e,t){return E(t)?t.toMap():t.toList()}var br="4.0.0-rc.11",Er={version:br,Collection:w,Iterable:w,Seq:Y,Map:It,OrderedMap:yn,List:rn,Stack:wn,Set:Mn,OrderedSet:ir,Record:cr,Range:Vn,Repeat:gr,is:fe,fromJS:vr,hash:ge,isImmutable:N,isCollection:y,isKeyed:E,isIndexed:D,isAssociative:C,isOrdered:j,isValueObject:pe,isSeq:_,isList:nn,isMap:ce,isOrderedMap:le,isStack:Cn,isSet:On,isOrderedSet:Fn,isRecord:F,get:it,getIn:qn,has:rt,hasIn:Wn,merge:bt,mergeDeep:xt,mergeWith:Et,mergeDeepWith:Dt,remove:at,removeIn:pt,set:st,setIn:ct,update:dt,updateIn:ut},xr=w;t.default=Er},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 f})),n.d(t,"d",(function(){return d})),n.d(t,"f",(function(){return h}));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")}return Object(r.h)(e,r.q.buffer,l),{take:function(i){o(),Object(r.h)(i,r.q.func,"channel.take's callback must be a function"),t&&e.isEmpty()?i(s):e.isEmpty()?(n.push(i),i.cancel=function(){return Object(r.w)(n,i)}):i(e.take())},put:function(i){if(o(),Object(r.h)(i,r.q.notUndef,p),!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=f(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 h(e){var t=d((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}v.prototype[d]=function(){return this},v.prototype.next=function(){var e=this._i.next();return Promise.resolve(e.value).then((function(t){return{value:t,done:e.done}}))}},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);var r=n(26),i=n.n(r),o=function(e){return"function"===typeof e},a=function(e){return"symbol"===typeof e||"object"===typeof e&&"[object Symbol]"===Object.prototype.toString.call(e)},s=function(e){return 0===e.length},u=function(e){return e.toString()},c=function(e){return"string"===typeof e},l="/",p="||";function f(e){return c(e)||o(e)||a(e)}function d(){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,u=0,c=0,l=function(t){n[u]=t,u=(u+1)%e,r++},p=function(){if(0!=r){var t=n[c];return n[c]=null,r--,c=(c+1)%e,t}},f=function(){for(var e=[];r;)e.push(p());return e};return{isEmpty:function(){return 0==r},put:function(p){if(rc);l++){var p=e.getLine(u++);a=null==a?p:a+"\n"+p}s*=2,t.lastIndex=n.ch;var f=t.exec(a);if(f){var d=a.slice(0,f.index).split("\n"),h=f[0].split("\n"),m=n.line+d.length-1,g=d[d.length-1].length;return{from:r(m,g),to:r(m+h.length-1,1==h.length?g+h[0].length:h[h.length-1].length),match:f}}}}function s(e,t){for(var n,r=0;;){t.lastIndex=r;var i=t.exec(e);if(!i)return n;if((r=(n=i).index+(n[0].length||1))==e.length)return n}}function u(e,t,n){t=i(t,"g");for(var o=n.line,a=n.ch,u=e.firstLine();o>=u;o--,a=-1){var c=e.getLine(o);a>-1&&(c=c.slice(0,a));var l=s(c,t);if(l)return{from:r(o,l.index),to:r(o,l.index+l[0].length),match:l}}}function c(e,t,n){t=i(t,"gm");for(var o,a=1,u=n.line,c=e.firstLine();u>=c;){for(var l=0;l>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function p(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,p=o.ch,f=e.lastLine()+1-u.length;c<=f;c++,p=0){var d=e.getLine(c).slice(p),h=s(d);if(1==u.length){var m=h.indexOf(u[0]);if(-1==m)continue e;return o=l(d,h,m,s)+p,{from:r(c,l(d,h,m,s)+p),to:r(c,l(d,h,m+u[0].length,s)+p)}}var g=h.length-u[0].length;if(h.slice(g)==u[0]){for(var v=1;v=f;c--,p=-1){var d=e.getLine(c);p>-1&&(d=d.slice(0,p));var h=s(d);if(1==u.length){var m=h.lastIndexOf(u[0]);if(-1==m)continue e;return{from:r(c,l(d,h,m,s)),to:r(c,l(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